Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ XSetClassHint(3X) — A/UX 3.0.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

XAllocIconSize(3X)

XAllocSizeHints(3X)

XAllocWMHints(3X)

XFree(3X)

XSetCommand(3X)

XSetTransientForHint(3X)

XSetTextProperty(3X)

XSetWMClientMachine(3X)

XSetWMColormapWindows(3X)

XSetWMIconName(3X)

XSetWMName(3X)

XSetWMProperties(3X)

XSetWMProtocols(3X)

XStringListToTextProperty(3X)




XAllocClassHint(3X) XAllocClassHint(3X)
NAME XAllocClassHint, XSetClassHint, XGetClassHint, XClassHint - allocate the class hints structure and set and read a window's WM_CLASS property SYNOPSIS XClassHint *XAllocClassHint() XSetClassHint(display, w, class-hints) Display *display; Window w; XClassHint *class-hints; Status XGetClassHint(display, w, class-hints-return) Display *display; Window w; XClassHint *class-hints-return; DESCRIPTION The XAllocClassHint function allocates and returns a pointer to a XClassHint structure. Note that the pointer members of the XClassHint structure are initially set to NULL. If in- sufficient memory is available, XAllocClassHint returns NULL. To free the memory allocated to this structure, use XFree. The XSetClassHint function sets the class hint for the specified window. The XGetClassHint function returns the class of the speci- fied window. To free res_name and res_class (described below) when finished with the strings, use XFree. Arguments These functions accept the following arguments: display Specifies the connection to the X server. class-hints Specifies the XClassHint structure that is to be used. class-hints-return Returns the XClassHint structure. w Specifies the window. Properties These functions use the following property: WM_CLASS Set by client application to allow window and ses- November, 1990 1



XAllocClassHint(3X) XAllocClassHint(3X)
sion managers to obtain the application's resources from the resource database. Structures The XClassHint structure is defined as follows. typedef struct { char *res_name; char *res_class; } XClassHint; The res_name member contains the application name, and the res_class member contains the application class. Note that the name set in this property may differ from the name set as WM_NAME. That is, WM_NAME specifies what should be displayed in the title bar and, therefore, can contain tem- poral information (for example, the name of a file currently in an editor's buffer). On the other hand, the name speci- fied as part of WM_CLASS is the formal name of the applica- tion that should be used when retrieving the application's resources from the resource database. 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 XSetClassHint function can generate BadAlloc and BadWin- dow errors. The XGetClassHint function can generate a BadWindow error. SEE ALSO XAllocIconSize(3X), XAllocSizeHints(3X), XAllocWMHints(3X), XFree(3X), XSetCommand(3X), XSetTransientForHint(3X), XSetTextProperty(3X), XSetWMClientMachine(3X), XSetWMColormapWindows(3X), XSetWMIconName(3X), XSetWMName(3X), XSetWMProperties(3X), XSetWMProtocols(3X), XStringListToTextProperty(3X)
Xlib - C Language Interface
2 November, 1990

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026