XSetCommand(3X) XSetCommand(3X)NAME XSetCommand, XGetCommand - set the command atom SYNOPSIS XSetCommand (display, w, argv, argc) Display *display; Window w; char **argv; int argc; Status XGetCommand (display, w, argv-return, argc-return) Display *display; Window w; char ***argv-return; int *argc-return; DESCRIPTION The XSetCommand function records the command and arguments used to invoke the application. Typically, argv is the argv array of the main program. The XGetCommand 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, XGetCommand fills in the argv-return and argc- return arguments and returns a nonzero status. Otherwise, it returns 0. To free the memory allocated to the string list, use XFreeStringList. Arguments These functions accept the following arguments: argc Specifies the number of arguments. argc-return Specifies the number of arguments returned. argv Specifies a pointer to the application's argument list. argv-return Returns the application's argument list. display Specifies the connection to the X server. w Specifies the window ID. Properties These functions use the following property: November, 1990 1
XSetCommand(3X) XSetCommand(3X)WM_COMMAND Specifies the command and arguments, separated by ASCII nulls, used to invoke the application. ERRORS BadAlloc The server failed to allocate the requested resource or server memory. BadWindow A value for a Window argument does not name a de- fined window. The XSetCommand function can generate BadAlloc and BadWindow errors. SEE ALSO XAllocClassHint(3X), XAllocIconSize(3X), XAllocSizeHints(3X), XAllocWMHints(3X), XSetTransientForHint(3X), XSetTextProperty(3X), XSetWMClientMachine(3X), XSetWMColormapWindows(3X), XSetWMIconName(3X), XSetWMName(3X), XSetWMProperties(3X), XSetWMProtocols(3X), XStringListToTextProperty(3X)Xlib - C Language Interface2 November, 1990