Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ XSeTProp(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)

XSetCommand(XS)

XSetTransientForHint(XS)

XSetWMClientMachine(XS)

XSetWMColormapWindows(XS)

XSetWMIconName(XS)

XSetWMName(XS)

XSetWMProperties(XS)

XSetWMProtocols(XS)

XStringListToTextProperty(XS)


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


 Name

    XSetTextProperty - set and read text properties

 Syntax


    void XSetTextProperty(display, w, text_prop, property)
          Display *display;
          Window w;
          XTextProperty *text_prop;
          Atom property;

    Status XGetTextProperty(display, w, text_prop_return, property)
          Display *display;
          Window w;
          XTextProperty *text_prop_return;
          Atom property;


 Arguments


    display        Specifies the connection to the X server.

    property       Specifies the property name.

    textprop      Specifies the XTextProperty structure to be used.

    textpropreturn
                   Returns the XTextProperty structure.

 Description

    The XSetTextProperty function replaces the existing specified property
    for the named window with the data, type, format, and number of items
    determined by the value field, the encoding field, the format field, and
    the nitems field, respectively, of the specified XTextProperty structure.
    If the property does not already exist, XSetTextProperty sets it for the
    specified window.

    XSetTextProperty can generate ``BadAlloc'', ``BadAtom'', ``BadValue'',
    and ``BadWindow'' errors.

    The XGetTextProperty function reads the specified property from the win-
    dow and stores the data in the returned XTextProperty structure.  It
    stores the data in the value field, the type of the data in the encoding
    field, the format of the data in the format field, and the number of
    items of data in the nitems field.  An extra byte containing null (which
    is not included in the nitems member) is stored at the end of the value
    field of textpropreturn.  The particular interpretation of the
    property's encoding and data as ``text'' is left to the calling applica-
    tion.  If the specified property does not exist on the window, XGet-
    TextProperty sets the value field to NULL, the encoding field to None,
    the format field to zero, and the nitems field to zero.

    If it was able to read and store the data in the XTextProperty structure,
    XGetTextProperty returns a nonzero status; otherwise, it returns a zero
    status.

    XGetTextProperty can generate ``BadAtom'' and ``BadWindow'' errors.

 Properties


    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.

    WMICONNAME   The name to be used in an icon.

    WMNAME        The name of the application.

 Diagnostics


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

    ``BadAtom''    A value for an Atom argument does not name a defined Atom.

    ``BadValue''   Some numeric value falls outside the range of values
                   accepted by the request.  Unless a specific range is
                   specified for an argument, the full range defined by the
                   argument's type is accepted.  Any argument defined as a
                   set of alternatives can generate this error.

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

 See also

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


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