MirBSD manpage: XFreeStringList(3), XStringListToTextProperty(3), XTextProperty(3), XTextPropertyToStringList(3)



     XStringListToTextProperty, XTextPropertyToStringList,
     XFreeStringList, XTextProperty - convert string lists and
     text property structure


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

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

     void XFreeStringList(char **list);


     count     Specifies the number of strings.

               Returns the number of strings.

     list      Specifies the list of strings to be freed.

     list      Specifies a list of null-terminated character

               Returns a list of null-terminated character

     text_prop Specifies the XTextProperty structure to be used.

               Returns the XTextProperty structure.


     The XStringListToTextProperty function sets the specified
     XTextProperty to be of type STRING (format 8) with a value
     representing the concatenation 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 text_prop_return. 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. Oth-
     erwise, 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 text_prop
     must be of type STRING and format 8. Multiple elements of

XFree86                   Version 4.5.0                         1


     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, XTextPro-
     pertyToStringList 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 XFreeStringList.

     The XFreeStringList function releases memory allocated by
     XmbTextPropertyToTextList, Xutf8TextPropertyToTextList and
     XTextPropertyToStringList and the missing charset list allo-
     cated by XCreateFontSet.


     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;


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

XFree86                   Version 4.5.0                         2

Generated on 2021-12-07 11:07:08 by $MirOS: src/scripts/roff2htm,v 1.103 2021/01/23 20:24:35 tg Exp $ — This product includes material provided by mirabilos.

These manual pages and other documentation are copyrighted by their respective writers; their sources are available at the project’s CVSweb, AnonCVS and other mirrors. The rest is Copyright © 2002–2021 MirBSD.

This manual page’s HTML representation is supposed to be valid XHTML/1.1; if not, please send a bug report — diffs preferred.