Query: xmbsetwmproperties
OS: hpux
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
XmbSetWMProperties() XmbSetWMProperties() Name XmbSetWMProperties - set window manager properties using internationalized encoding. Synopsis void XmbSetWMProperties(display, w, window_name, icon_name, argv, argc, normal_hints, wm_hints, class_hints) Display *display; Window w; char *window_name; char *icon_name; char *argv[]; int argc; XSizeHints *normal_hints; XWMHints *wm_hints; XClassHint *class_hints; Arguments display Specifies a connection to an X server; returned from XOpenDisplay(). w Specifies the window. Should be a top-level window. window_name Specifies the window name, which should be a NULL-terminated string. icon_name Specifies the icon name, which should be a NULL-terminated string. argv Specifies the application's argument list. argc Specifies the number of arguments. hints Specifies the size hints for the window in its normal state. wm_hints Specifies the XWMHints structure to be used. class_hints Specifies the XClassHint structure to be used. Availability Release 5 and later. Description XmbSetWMProperties() stores the standard set of window manager properties, with text properties in standard encodings for internationalized text communication. The standard window manager properties for a given window are WM_NAME, WM_ICON_NAME, WM_HINTS, WM_NORMAL_HINTS, WM_CLASS, WM_COMMAND, WM_CLIENT_MACHINE, and WM_LOCALE_NAME. If the window_name argument is non-NULL, XmbSetWMProperties() sets the WM_NAME property. If the icon_name argument is non-NULL, XmbSetWM- Properties() sets the WM_ICON_NAME property. The window_name and icon_name arguments are NULL-terminated strings in the encoding of the current locale. If the arguments can be fully converted to the XA_STRING encoding, the properties are created with type XA_STRING: other- wise, the arguments are converted to Compound Text, and the properties are created with type COMPOUND_TEXT. If the normal_hints argument is non-NULL, XmbSetWMProperties() calls XSetWMNormalHints(), which sets the WM_NORMAL_HINTS property. If the wm_hints argument is non-NULL, XmbSetWMProperties() calls XSetWMHints(), which sets the WM_HINTS property. If the argv argument is non-NULL, XmbSetWMProperties() sets the WM_COMMAND property from argv and argc. Note that an argc of 0 indicates a zero-length command. The hostname of this machine is stored using XSetWMClientMachine(). If the class_hints argument is non-NULL, XmbSetWMProperties() sets the WM_CLASS property. If the res_name member in the XClassHint struc- ture 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 the res_name member is NULL, the environment variable is not set, and argv and argv[0] are set, then the value of argv[0], stripped of any directory prefixes, is substituted for res_name. It is assumed that the supplied class_hints.res_name and argv, the RESOURCE_NAME environment variable, and the hostname of this machine are in the encoding of the locale announced for the LC_CTYPE category. (On POSIX-compliant systems, the LC_CTYPE, else LANG environment vari- able). The corresponding WM_CLASS, WM_COMMAND, and WM_CLIENT_MACHINE properties are typed according to the local host locale announcer. No encoding conversion is performed prior to storage in the properties. For clients that need to process the property text in a locale, XmbSetWMProperties() sets the WM_LOCALE_NAME property to be the name of the current locale. The name is assumed to be in the Host Portable Character Encoding, and is converted to STRING for storage in the property. Structures typedef struct { long flags; /* marks which fields in this structure */ /* are defined */ int x, y; /* obsolete for new window mgrs, but clients */ int width, height; /* should set so old wm's don't mess up */ int min_width, min_height; int max_width, max_height; int width_inc, height_inc; struct { int x; /* numerator */ int y; /* denominator */ } min_aspect, max_aspect; int base_width, base_height; /* added by ICCCM version 1 */ int win_gravity; /* added by ICCCM version 1 */ } XSizeHints; /* flags argument in size hints */ #define USPosition (1L << 0) /* user specified x, y */ #define USSize (1L << 1) /* user specified width, height */ #define PPosition (1L << 2) /* program specified position */ #define PSize (1L << 3) /* program specified size */ #define PMinSize (1L << 4) /* program specified minimum size */ #define PMaxSize (1L << 5) /* program specified maximum size */ #define PResizeInc (1L << 6) /* program specified resize increments */ #define PAspect (1L << 7) /* program specified min/max aspect ratios */ #define PAllHints (PPosition PSize PMinSize PMaxSize PResizeInc PAspect) typedef struct { long flags; /* marks which fields in this structure */ /* are defined */ Bool input; /* does this application rely on the window */ /* manager to get keyboard input? */ int initial_state; /* see below */ Pixmap icon_pixmap; /* pixmap to be used as icon */ Window icon_window; /* window to be used as icon */ int icon_x, icon_y; /* initial position of icon */ Pixmap icon_mask; /* icon mask bitmap */ XID window_group; /* id of related window group */ /* this structure may be extended in the future */ } XWMHints; #define USPosition (1L << 0) /* user specified x, y */ #define USSize (1L << 1) /* user specified width, height */ #define PPosition (1L << 2) /* program specified position */ #define PSize (1L << 3) /* program specified size */ #define PMinSize (1L << 4) /* program specified minimum size */ #define PMaxSize (1L << 5) /* program specified maximum size */ #define PResizeInc (1L << 6) /* program specified resize increments * / #define PAspect (1L << 7) /* program specified min/max aspect ratios */ #define PAllHints (PPosition PSize PMinSize PMaxSize PResizeInc PAspect) #define PBaseSize (1L << 8) /* program specified base for incrementing */ #define PWinGravity (1L << 9) /* program specified window gravity */ typedef struct { char *res_name; char *res_class; } XClassHint; Errors BadAlloc BadWindow See Also XSetWMClientMachine(), XSetWMColormapWindows(), XSetWMHints(), XSetWMNormalHints(), XSetWMProperties(), XSetWMProtocols(). Xlib - Internationalized Text XmbSetWMProperties()