Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ XSetWMProperties(3X) — A/UX 3.0.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

XAllocClassHint(3X)

XAllocIconSize(3X)

XAllocSizeHints(3X)

XAllocWMHints(3X)

XParseGeometry(3X)

XSetCommand(3X)

XSetTransientForHint(3X)

XSetTextProperty(3X)

XSetWMClientMachine(3X)

XSetWMColormapWindows(3X)

XSetWMIconName(3X)

XSetWMName(3X)

XSetWMProtocols(3X)

XStringListToTextProperty(3X)




XSetWMProperties(3X) XSetWMProperties(3X)
NAME XSetWMProperties, XWMGeometry - set essential window properties SYNOPSIS void XSetWMProperties(display, w, window-name, icon-name, argv, argc, normal-hints, wm-hints, class-hints) Display *display; Window w; XTextProperty *window-name; XTextProperty *icon-name; char **argv; int argc; XSize_hints *normal-hints; XWMHints *wm-hints; XClassHint *class-hints; int WMGeometry(display, screen, user-geom, def-geom, bwidth, hints, x-return, y-return, width-return, height-return, gravity-return) Display *display; int screen; char *user-geom; char *def-geom; unsigned int bwidth; XSizeHints *hints; int *x-return, *y-return; int *width-return; int *height-return; int *gravity-return; DESCRIPTION The XSetWMProperties convenience function provides a single programming interface for setting those essential window properties that are used for communicating with other clients (particularly window and session managers). If window-name is non-null, XSetWMProperties calls XSetWMName(3X), which, in turn, sets the WM_NAME property (see Section 9.1.4 in Xlib - C Language Interface). If the icon-name argument is non-null, XSetWMProperties calls XSetWMIconName(3X), which sets the WM_ICON_NAME property (see Section 9.1.5 in Xlib - C Language Interface). If argv is non-null, XSetWMProperties calls XSetCommand(3X), which sets the WM_COMMAND property (see Section 9.2.1 in Xlib - C Language Interface). Note that an argc of 0 is al- lowed to indicate a zero-length command. Note also that the host name of this machine is stored using XSetWM- ClientMachine (see Section 9.2.2 in Xlib - C Language Inter- face). November, 1990 1



XSetWMProperties(3X) XSetWMProperties(3X)
If normal-hints is non-null, XSetWMProperties calls XSetWMNormalHints(3X), which sets the WM_NORMAL_HINTS pro- perty (see Section 9.1.7 in Xlib - C Language Interface). If wm-hints is non-null, XSetWMProperties calls XSetWMHints(3X), which sets the WM_HINTS property (see Section 9.1.6 in Xlib - C Language Interface). If class-hints is non-null, XSetWMProperties calls XSetClassHint(3X), which sets the WM_CLASS property (see Section 9.1.8 in Xlib - C Language Interface). If res-name in the XClassHint structure is set to the null pointer and the RESOURCE_NAME environment variable is set, the value of the environment variable is substituted for res-name. If res-name is null, the environment variable is not set, and argv and argv[0] are set, the value of argv[0], stripped of any directory prefixes, is substituted for res-name. The XWMGeometry function combines any geometry information (given in the format used by XParseGeometry) specified by the user and by the calling program with size hints (usually the ones to be stored in WM_NORMAL_HINTS) and returns the position, size, and gravity (NorthWestGravity, NorthEastGravity, SouthEastGravity or SouthWestGravity) that describe the window. If the base size is not set in the XSizeHints structure, the minimum size is used if set. Otherwise, a base size of 0 is as- sumed. If no minimum size is set in the hints structure, the base size is used. A mask (in the form returned by XParseGeometry) that describes which values came from the user specification and whether or not the position coordi- nates are relative to the right and bottom edges is returned (which is already accounted for in the x-return and y-return values). Note that invalid geometry specifications can cause a width or height of 0 to be returned. The caller may pass the ad- dress of the hints win_gravity member in gravity-return to update the hints directly. Arguments These functions accept the following arguments: argc Specifies the number of arguments. argv Specifies the application's argument list. bwidth Specifies the border width. class-hints Specifies the XClassHint structure to be used. 2 November, 1990



XSetWMProperties(3X) XSetWMProperties(3X)
def-geom Specifies the application's default geometry or NULL. display Specifies the connection to the X server. gravity-return Returns the window gravity. hints Specifies the size hints for the window in its nor- mal state. icon-name Specifies the icon name, which should be a null- terminated string. normal-hints Specifies the size hints for the window in its nor- mal state. screen Specifies the screen. user-geom Specifies the user-specified geometry or NULL. x-return, y-return Return the x and y offsets. width-return, height-return Return the width and height determined. w Specifies the window. window-name Specifies the window name, which should be a null- terminated string. wm-hints Specifies the XWMHints structure to be used. Properties These functions use the following properties: WM_CLASS Set by application programs to allow window and ses- sion managers to obtain the application's resources from the resource database. WM_CLIENT_MACHINE Specifies the string name of the machine on which the client application is running. November, 1990 3



XSetWMProperties(3X) XSetWMProperties(3X)
WM_COMMAND Specifies the command and arguments, separated by ASCII nulls, used to invoke the application. WM_HINTS Specifies additional hints set by client for use by the window manager. The C type of this property is XWMHints. WM_ICON_NAME Specifies the name to be used in icon. WM_NAME Specifies the name of the application. WM_NORMAL_HINTS Specifies size hints for a window in its normal state. The C type of this property is XSizeHints. 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 XSetWMProperties function can generate BadAlloc and BadWindow errors. SEE ALSO XAllocClassHint(3X), XAllocIconSize(3X), XAllocSizeHints(3X), XAllocWMHints(3X), XParseGeometry(3X), XSetCommand(3X), XSetTransientForHint(3X), XSetTextProperty(3X), XSetWMClientMachine(3X), XSetWMColormapWindows(3X), XSetWMIconName(3X), XSetWMName(3X), XSetWMProtocols(3X), XStringListToTextProperty(3X)
Xlib - C Language Interface
4 November, 1990

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