1XStringListToTextProperty(3)    XLIB FUNCTIONS    XStringListToTextProperty(3)
2
3
4

NAME

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

SYNTAX

10       Status XStringListToTextProperty(char **list, int count,  XTextProperty
11              *text_prop_return);
12
13       Status    XTextPropertyToStringList(XTextProperty    *text_prop,   char
14              ***list_return, int *count_return);
15
16       void XFreeStringList(char **list);
17

ARGUMENTS

19       count     Specifies the number of strings.
20
21       count_return
22                 Returns the number of strings.
23
24       list      Specifies the list of strings to be freed.
25
26       list      Specifies a list of null-terminated character strings.
27
28       list_return
29                 Returns a list of null-terminated character strings.
30
31       text_prop Specifies the XTextProperty structure to be used.
32
33       text_prop_return
34                 Returns the XTextProperty structure.
35

DESCRIPTION

37       The XStringListToTextProperty function sets the specified XTextProperty
38       to  be of type STRING (format 8) with a value representing the concate‐
39       nation of the specified list of null-separated character  strings.   An
40       extra  null byte (which is not included in the nitems member) is stored
41       at the end of the value field of  text_prop_return.   The  strings  are
42       assumed (without verification) to be in the STRING encoding.  If insuf‐
43       ficient memory is available for the new  value  string,  XStringListTo‐
44       TextProperty does not set any fields in the XTextProperty structure and
45       returns a zero status.  Otherwise, it returns  a  nonzero  status.   To
46       free the storage for the value field, use XFree.
47
48       The XTextPropertyToStringList function returns a list of strings repre‐
49       senting the null-separated  elements  of  the  specified  XTextProperty
50       structure.   The data in text_prop must be of type STRING and format 8.
51       Multiple elements of the property (for example, the strings in  a  dis‐
52       joint text selection) are separated by NULL (encoding 0).  The contents
53       of the property are not null-terminated.   If  insufficient  memory  is
54       available for the list and its elements, XTextPropertyToStringList sets
55       no return values and returns a zero status.  Otherwise,  it  returns  a
56       nonzero status.  To free the storage for the list and its contents, use
57       XFreeStringList.
58
59       The XFreeStringList function releases memory allocated by  XmbTextProp‐
60       ertyToTextList,    Xutf8TextPropertyToTextList    and    XTextProperty‐
61       ToStringList and the missing charset list allocated by XCreateFontSet.
62

STRUCTURES

64       The XTextProperty structure contains:
65
66       typedef struct {
67               unsigned char *value;   /* property data */
68               Atom encoding;  /* type of property */
69               int format;     /* 8, 16, or 32 */
70               unsigned long nitems;   /* number of items in value */
71       } XTextProperty;
72

SEE ALSO

74       XAllocClassHint(3),   XAllocIconSize(3),    XAllocSizeHints(3),    XAl‐
75       locWMHints(3), XFree(3), XSetCommand(3), XSetTransientForHint(3), XSet‐
76       TextProperty(3),   XSetWMClientMachine(3),    XSetWMColormapWindows(3),
77       XSetWMIconName(3),   XSetWMName(3),  XSetWMProperties(3),  XSetWMProto‐
78       cols(3)
79       Xlib - C Language X Interface
80
81
82
83X Version 11                     libX11 1.6.12    XStringListToTextProperty(3)
Impressum