Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

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

XFree(XS)

XSetCommand(XS)

XSetTransientForHint(XS)

XSetTextProperty(XS)

XSetWMClientMachine(XS)

XSetWMColormapWindows(XS)

XSetWMIconName(XS)

XSetWMName(XS)

XSetWMProperties(XS)

XSetWMProtocols(XS)


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


 Name

    XStringListToTextProperty - convert string lists and text property
    structure

 Syntax


    Status XStringListToTextProperty(list, count, text_prop_return)
          char **list;
          int count;
          XTextProperty *text_prop_return;

    Status XTextPropertyToStringList(text_prop, list_return, count_return)
          XTextProperty *text_prop;
          char ***list_return;
          int *count_return;

    void XFreeStringList(list)
          char **list;


 Arguments


    count          Specifies the number of strings.

    countreturn   Returns the number of strings.

    list           Specifies the list of strings to be freed.

    list           Specifies a list of null-terminated character strings.

    listreturn    Returns a list of null-terminated character strings.

    textprop      Specifies the XTextProperty structure to be used.

    textpropreturn
                   Returns the XTextProperty structure.

 Description

    The XStringListToTextProperty function sets the specified XTextProperty
    to be of type STRING (format 8) with a value representing the concatena-
    tion of the specified list of null-separated character strings.  An extra
    null byte (which is not included in the nitems member) is stored at the
    end of the value field of textpropreturn.  The strings are assumed
    (without verification) to be in the STRING encoding.  If insufficient
    memory is available for the new value string, XStringListToTextProperty
    does not set any fields in the XTextProperty structure and returns a zero
    status.  Otherwise, it returns a nonzero status.  To free the storage for
    the value field, use XFree.

    The XTextPropertyToStringList function returns a list of strings
    representing the null-separated elements of the specified XTextProperty
    structure.  The data in textprop must be of type STRING and format 8.
    Multiple elements of the property (for example, the strings in a disjoint
    text selection) are separated by NULL (encoding 0).  The contents of the
    property are not null-terminated.  If insufficient memory is available
    for the list and its elements, XTextPropertyToStringList sets no return
    values and returns a zero status.  Otherwise, it returns a nonzero
    status.  To free the storage for the list and its contents, use XFreeS-
    tringList.

    The XFreeStringList function releases memory allocated by XmbTextProper-
    tyToTextList and XTextPropertyToStringList, and the missing charset list
    allocated by XCreateFontSet.

 Structures

    The XTextProperty structure contains:

       typedef struct          {
             unsigned char *value;  /* property data */
             Atom encoding;         /* type of property */
             int format;            /* 8, 16, or 32 */
             unsigned long nitems;  /* number of items in value */
       } XTextProperty;


 See also

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


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