1XSetCommand(3)                  XLIB FUNCTIONS                  XSetCommand(3)
2
3
4

NAME

6       XSetCommand, XGetCommand - set or read a window's WM_COMMAND property
7

SYNTAX

9       int XSetCommand(Display *display, Window w, char **argv, int argc);
10
11       Status XGetCommand(Display *display, Window w, char ***argv_return, int
12              *argc_return);
13

ARGUMENTS

15       argc      Specifies the number of arguments.
16
17       argc_return
18                 Returns the number of arguments returned.
19
20       argv      Specifies the application's argument list.
21
22       argv_return
23                 Returns the application's argument list.
24
25       display   Specifies the connection to the X server.
26
27       w         Specifies the window.
28

DESCRIPTION

30       The XSetCommand function sets the command and arguments used to invoke
31       the application.  (Typically, argv is the argv array of your main pro‐
32       gram.)  If the strings are not in the Host Portable Character Encoding,
33       the result is implementation-dependent.
34
35       XSetCommand can generate BadAlloc and BadWindow errors.
36
37       The XGetCommand function reads the WM_COMMAND property from the speci‐
38       fied window and returns a string list.  If the WM_COMMAND property
39       exists, it is of type STRING and format 8.  If sufficient memory can be
40       allocated to contain the string list, XGetCommand fills in the
41       argv_return and argc_return arguments and returns a nonzero status.
42       Otherwise, or if any other error is encountered, it returns a zero sta‐
43       tus.  If the data returned by the server is in the Latin Portable Char‐
44       acter Encoding, then the returned strings are in the Host Portable
45       Character Encoding.  Otherwise, the result is implementation-dependent.
46       To free the memory allocated to the string list, use XFreeStringList.
47

PROPERTIES

49       WM_COMMAND
50                 The command and arguments, null-separated, used to invoke the
51                 application.
52

DIAGNOSTICS

54       BadAlloc  The server failed to allocate the requested resource or
55                 server memory.
56
57       BadWindow A value for a Window argument does not name a defined Window.
58

SEE ALSO

60       XAllocClassHint(3), XAllocIconSize(3), XAllocSizeHints(3), XAl‐
61       locWMHints(3), XSetTransientForHint(3), XSetTextProperty(3), XSetWM‐
62       ClientMachine(3), XSetWMColormapWindows(3), XSetWMIconName(3), XSetWM‐
63       Name(3), XSetWMProperties(3), XSetWMProtocols(3), XStringListTo‐
64       TextProperty(3)
65       Xlib - C Language X Interface
66
67
68
69X Version 11                     libX11 1.6.5                   XSetCommand(3)
Impressum