1XSetCommand(3) XLIB FUNCTIONS XSetCommand(3)
2
3
4
6 XSetCommand, XGetCommand - set or read a window's WM_COMMAND property
7
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
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
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 ex‐
39 ists, it is of type STRING and format 8. If sufficient memory can be
40 allocated to contain the string list, XGetCommand fills in the argv_re‐
41 turn and argc_return arguments and returns a nonzero status. Other‐
42 wise, or if any other error is encountered, it returns a zero status.
43 If the data returned by the server is in the Latin Portable Character
44 Encoding, then the returned strings are in the Host Portable Character
45 Encoding. Otherwise, the result is implementation-dependent. To free
46 the memory allocated to the string list, use XFreeStringList.
47
49 WM_COMMAND
50 The command and arguments, null-separated, used to invoke the
51 application.
52
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
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.8.7 XSetCommand(3)