Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

XGetClassHint − get the XA_WM_CLASS property of a window. 

Synopsis

Status XGetClassHint(display, w, class_hints_return)
Display *display;
Window w;
XClassHint *class_hints_return;

Arguments

displaySpecifies a connection to an X server; returned from XOpenDisplay(). 

wSpecifies the ID of the window for which the property is desired. 

class_hints_return
Returns the XClassHints structure. 

Description

XGetClassHint() obtains the XA_WM_CLASS property for the specified window.  This property stores the resource class and instance name, that the window manager uses to get any resource settings that may control how the window manager manages the application that set this property.  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.  XGetClassHint() returns a Status of zero on failure, nonzero on success.  The XClassHint structure returned contains res_class, which is the name of the client such as "emacs", and res_name, which should be the first of the following that applies:

•command line option ( − rn name)

•a specific environment variable (e.g., RESOURCE_NAME)

•the trailing component of argv[0] (after the last /) To free res_name and res_class when finished with the strings, use XFree().  For more information on using hints, see Volume One, Chapter 10, Interclient Communication. 

Structures

typedef struct {
char *res_name;
char *res_class;
} XClassHint;

Errors

BadWindow

See Also

XAllocClassHint(), XGetIconSizes(), XGetNormalHints(), XGetSizeHints(), XGetTransientForHint(), XGetWMHints(), XGetZoomHints(), XSetClassHint(), XSetCommand(), XSetIconSizes(), XSetNormalHints(), XSetSizeHints(), XSetTransientForHint(), XSetWMHints(), XSetZoomHints(), XSetWMProperties(), XSetWMProperties(). 

Copyright O’Reilly & Assoc.  —  

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