XSetWMIconName(3X) XSetWMIconName(3X)NAME XSetWMIconName, XGetWMIconName, XSetIconName, XGetIconName - set and get a window's WM_ICON_NAME property SYNOPSIS void XSetWMIconName(display, w, text-prop) Display *display; Window w; XTextProperty *text-prop; Status XGetWMIconName(display, w, text-prop-return) Display *display; Window w; XTextProperty *text-prop-return; XSetIconName(display, w, icon-name) Display *display; Window w; char *icon-name; Status XGetIconName(display, w, icon-name-return) Display *display; Window w; char **icon-name-return; DESCRIPTION The XSetWMIconName convenience function performs a XSetTextProperty(3X) on the WM_ICON_NAME property (see Sec- tion 9.1.3 in Xlib - C Language Interface). The XGetWMIconName convenience function performs an XGetTextProperty(3X) on the WM_ICON_NAME property (see Sec- tion 9.1.3 in Xlib - C Language Interface). The XSetIconName function sets the name to be displayed in a window's icon. The XGetIconName function returns the name to be displayed in the specified window's icon. If it succeeds, it returns nonzero; otherwise, if no icon name has been set for the window, it returns zero. If you never assigned a name to the window, XGetIconName sets icon-name-return to NULL. When finished with it, a client must free the icon name string using XFree. Arguments These functions accept the following arguments: display Specifies the connection to the X server. icon-name November, 1990 1
XSetWMIconName(3X) XSetWMIconName(3X)Specifies the icon name, which should be a null- terminated string. icon-name-return Returns a pointer to the window's icon name, which is a null-terminated string. text-prop Specifies the XTextProperty structure to be used. text-prop-return Returns the XTextProperty structure. w Specifies the window. Properties These functions use the following property: WM_ICON_NAME Specifies the name to be used in icon. 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 XSetIconName function can generate BadAlloc and BadWin- dow errors. The XGetIconName function can generate a BadWindow error. SEE ALSO XAllocClassHint(3X), XAllocIconSize(3X), XAllocSizeHints(3X), XAllocWMHints(3X), XFree(3X), XSetCommand(3X), XSetTransientForHint(3X), XSetTextProperty(3X), XSetWMClientMachine(3X), XSetWMColormapWindows(3X), XSetWMName(3X), XSetWMProperties(3X), XSetWMProtocols(3X), XStringListToTextProperty(3X)Xlib - C Language Interface2 November, 1990