XLIB FUNCTIONS XStringListToTextProperty(3x11)
NAME
XStringListToTextProperty, XTextPropertyToStringList,XFreeStringList, XTextProperty - convert string lists and
text property structure SYNTAXcc [ flag... ] file... -lX11 [ library... ]
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);
ARGUMENTS count Specifies the number of strings.count_return
Returns the number of strings. list Specifies the list of strings to be freed.list Specifies a list of null-terminated character
strings.list_return
Returns a list of null-terminated character
strings.text_prop Specifies the XTextProperty structure to be used.
text_prop_return
Returns the XTextProperty structure.DESCRIPTION
The XStringListToTextProperty function sets the specified XTextProperty to be of type STRING (format 8) with a value representing the concatenation of the specified list ofnull-separated character strings. An extra null byte (which
is not included in the nitems member) is stored at the endof 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 inthe 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 ofstrings representing the null-separated elements of the
X Version 11 Last change: libX11 1.3.5 1 XLIB FUNCTIONS XStringListToTextProperty(3x11)specified XTextProperty structure. The data in text_prop
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 contentsof 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 freethe storage for the list and its contents, use XFreeS-
tringList.The XFreeStringList function releases memory allocated by
XmbTextPropertyToTextList, Xutf8TextPropertyToTextList andXTextPropertyToStringList and the missing charset list allo-
cated 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(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), XSetWMProtocols(3x11)Xlib - C Language X Interface
ATTRIBUTES
See attributes(5) for descriptions of the following attri-
butes:____________________________________________________________
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
|_____________________________|_____________________________|
| Availability | x11/library/libx11 ||_____________________________|_____________________________|
| Interface Stability | Committed ||_____________________________|_____________________________|
| MT-Level | See XInitThreads(3X11) |
|_____________________________|_____________________________|
X Version 11 Last change: libX11 1.3.5 2