Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ XSeWMProp(XS) — OpenDesktop Software Development System 3.0.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

XAllocClassHint(XS)

XAllocIconSize(XS)

XAllocSizeHints(XS)

XAllocWMHints(XS)

XParseGeometry(XS)

XSetCommand(XS)

XSetTransientForHint(XS)

XSetTextProperty(XS)

XSetWMClientMachine(XS)

XSetWMColormapWindows(XS)

XSetWMIconName(XS)

XSetWMName(XS)

XSetWMProtocols(XS)

XStringListToTextProperty(XS)

XmbTextListToTextProperty(XS)


 XSetWMProperties(XS)     X Version 11 (Release 5)       XSetWMProperties(XS)
                                6 January 1993


 Name

    XSetWMProperties - set standard window properties

 Syntax


    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;
          XSizeHints *normal_hints;
          XWMHints *wm_hints;
          XClassHint *class_hints;

    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


    argc           Specifies the number of arguments.

    argv           Specifies the application's argument list.

    classhints    Specifies the XClassHint structure to be used.

    display        Specifies the connection to the X server.

    iconname      Specifies the icon name, which should be a null-terminated
                   string.

    normalhints   Specifies the size hints for the window in its normal
                   state.

    w              Specifies the window.

    windowname    Specifies the window name, which should be a null-
                   terminated string.

    wmhints       Specifies the XWMHints structure to be used.

 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 manag-
    ers).

    If the windowname argument is non-NULL, XSetWMProperties calls XSetWM-
    Name, which in turn, sets the WMNAME property (see section 14.1.4 of
    Xlib - C Language X Interface).  If the iconname argument is non-NULL,
    XSetWMProperties calls XSetWMIconName, which sets the WMICONNAME pro-
    perty (see section 14.1.5 of Xlib - C Language X Interface).  If the argv
    argument is non-NULL, XSetWMProperties calls XSetCommand, which sets the
    WMCOMMAND property (see section 14.2.1 of Xlib - C Language X Inter-
    face).  Note that an argc of zero is allowed to indicate a zero-length
    command.  Note also that the hostname of this machine is stored using
    XSetWMClientMachine (see section 14.2.2 of Xlib - C Language X Inter-
    face).

    If the normalhints argument is non-NULL, XSetWMProperties calls
    XSetWMNormalHints, which sets the WMNORMALHINTS property (see section
    14.1.7 of Xlib - C Language X Interface).  If the wmhints argument is
    non-NULL, XSetWMProperties calls XSetWMHints, which sets the WMHINTS
    property (see section 14.1.6 of Xlib - C Language X Interface).

    If the classhints argument is non-NULL, XSetWMProperties calls
    XSetClassHint, which sets the WMCLASS property (see section 14.1.8 of
    Xlib - C Language X Interface).  If the resname member in the XClassHint
    structure is set to the NULL pointer and the RESOURCENAME environment
    variable is set, then the value of the environment variable is substi-
    tuted for resname.  If the resname 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 resname.

    The XmbSetWMProperties convenience function provides a simple programming
    interface for setting those essential window properties that are used for
    communicating with other clients (particularly window and session manag-
    ers).

    If the windowname argument is non-NULL, XmbSetWMProperties sets the
    WMNAME property.  If the iconname argument is non-NULL, XmbSetWMProper-
    ties sets the WMICONNAME property.  The windowname and iconname argu-
    ments are null-terminated strings in the encoding of the current locale.
    If the arguments can be fully converted to the STRING encoding, the pro-
    perties are created with type ``STRING'':  otherwise, the arguments are
    converted to Compound Text, and the properties are created with type
    ``COMPOUNDTEXT''.

    If the normalhints argument is non-NULL, XmbSetWMProperties calls
    XSetWMNormalHints, which sets the WMNORMALHINTS property (see section
    14.1.7 of Xlib - C Language X Interface).  If the wmhints argument is
    non-NULL, XmbSetWMProperties calls XSetWMHints, which sets the WMHINTS
    property (see section 14.1.6 of Xlib - C Language X Interface).

    If the argv argument is non-NULL, XmbSetWMProperties sets the WMCOMMAND
    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 (see
    section 14.2.2 of Xlib - C Language X Interface).

    If the classhints argument is non-NULL, XmbSetWMProperties sets the
    WMCLASS property.  If the resname member in the XClassHint structure is
    set to the NULL pointer and the RESOURCENAME environment variable is
    set, the value of the environment variable is substituted for resname.
    If the resname 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 resname.

    It is assumed that the supplied classhints.resname and argv, the
    RESOURCENAME environment variable, and the hostname of this machine are
    in the encoding of the locale announced for the LCCTYPE category.  (On
    POSIX-compliant systems, the LCCTYPE, else LANG environment variable).
    The corresponding WMCLASS, WMCOMMAND, and WMCLIENTMACHINE 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, XmbSetWM-
    Properties sets the WMLOCALENAME property to be the name of the current
    locale.  The name is assumed to be in the Host Portable Character Encod-
    ing, and is converted to STRING for storage in the property.

    XSetWMProperties and XmbSetWMProperties can generate ``BadAlloc'' and
    ``BadWindow'' errors.

 Properties


    WMCLASS       Set by application programs to allow window and session
                   managers to obtain the application's resources from the
                   resource database.

    WMCLIENTMACHINE
                   The string name of the machine on which the client appli-
                   cation is running.

    WMCOMMAND     The command and arguments, null-separated, used to invoke
                   the application.

    WMHINTS       Additional hints set by the client for use by the window
                   manager.  The C type of this property is XWMHints.

    WMICONNAME   The name to be used in an icon.

    WMNAME        The name of the application.

    WMNORMALHINTS
                   Size hints for a window in its normal state.  The C type
                   of this property is XSizeHints.

 Diagnostics


    ``BadAlloc''   The server failed to allocate the requested resource or
                   server memory.

    ``BadWindow''  A value for a Window argument does not name a defined
                   Window.

 See also

    XAllocClassHint(XS), XAllocIconSize(XS), XAllocSizeHints(XS),
    XAllocWMHints(XS), XParseGeometry(XS), XSetCommand(XS),
    XSetTransientForHint(XS), XSetTextProperty(XS), XSetWMClientMachine(XS),
    XSetWMColormapWindows(XS), XSetWMIconName(XS), XSetWMName(XS),
    XSetWMProtocols(XS), XStringListToTextProperty(XS),
    XmbTextListToTextProperty(XS)
    Xlib - C Language X Interface


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