NAME
XSetCommand, XGetCommand - set or read a window's WM_COMMAND property
SYNTAX
int XSetCommand(Display *_d_i_s_p_l_a_y, Window _w, char
**_a_r_g_v, int _a_r_g_c);
Status XGetCommand(Display *_d_i_s_p_l_a_y, Window _w, char
***_a_r_g_v___r_e_t_u_r_n, int *_a_r_g_c___r_e_t_u_r_n);
ARGUMENTS
-
_a_r_g_c
Specifies the number of arguments.
-
-
_a_r_g_c___r_e_t_u_r_n
Returns the number of arguments returned.
-
-
_a_r_g_v
Specifies the application's argument list.
-
-
_a_r_g_v___r_e_t_u_r_n
Returns the application's argument list.
-
-
_d_i_s_p_l_a_y
Specifies the connection to the X server.
-
-
_w
Specifies the window.
-
DESCRIPTION
The
_X_S_e_t_C_o_m_m_a_n_d
function sets the command and arguments used to invoke the
application.
(Typically, argv is the argv array of your main program.)
If the strings are not in the Host Portable Character Encoding,
the result is implementation-dependent.
_X_S_e_t_C_o_m_m_a_n_d
can generate
_B_a_d_A_l_l_o_c
and
_B_a_d_W_i_n_d_o_w
errors.
The
_X_G_e_t_C_o_m_m_a_n_d
function reads the WM_COMMAND property from the specified window
and returns a string list.
If the WM_COMMAND property exists,
it is of type STRING and format 8.
If sufficient memory can be allocated to contain the string list,
_X_G_e_t_C_o_m_m_a_n_d
fills in the argv_return and argc_return arguments
and returns a nonzero status.
Otherwise, it returns a zero status.
If the data returned by the server is in the Latin Portable Character Encoding,
then the returned strings are in the Host Portable Character Encoding.
Otherwise, the result is implementation-dependent.
To free the memory allocated to the string list, use
_X_F_r_e_e_S_t_r_i_n_g_L_i_s_t.
PROPERTIES
-
WM_COMMAND
-
The command and arguments, null-separated, used to invoke the
application.
DIAGNOSTICS
-
_B_a_d_A_l_l_o_c
-
The server failed to allocate the requested resource or server memory.
-
_B_a_d_W_i_n_d_o_w
-
A value for a Window argument does not name a defined Window.
SEE ALSO
XAllocClassHint(3X11),
XAllocIconSize(3X11),
XAllocSizeHints(3X11),
XAllocWMHints(3X11),
XSetTransientForHint(3X11),
XSetTextProperty(3X11),
XSetWMClientMachine(3X11),
XSetWMColormapWindows(3X11),
XSetWMIconName(3X11),
XSetWMName(3X11),
XSetWMProperties(3X11),
XSetWMProtocols(3X11),
XStringListToTextProperty(3X11)
_X_l_i_b _- _C _L_a_n_g_u_a_g_e _X _I_n_t_e_r_f_a_c_e