Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

NAME

XStringListToTextProperty − set the specified list of strings to an XTextProperty structure. 

Synopsis

Status XStringListToTextProperty(list, count, text_prop_return)

   char **list;
   int count;
   XTextProperty *text_prop_return;

Arguments

listSpecifies a list of null-terminated character strings. 

countSpecifies the number of strings. 

text_prop_return
Returns the XTextProperty structure. 

Availability

Release 4 and later. 

Description

XStringListToTextProperty() fills the specified XTextProperty structure so that it represents a property of type STRING (format 8) with a value representing the concatenation of the specified list of null-separated character strings.  An extra byte containing NULL (which is not included in the nitems member) is stored at the end of the value field of text_prop.  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 non-zero status.  To free the storage for the value field, use XFree().  For more information, see Volume One, Chapter 10, Interclient Communication. 

Structures

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

See Also

XSetTextProperty(), XGetTextProperty(), XTextPropertyToStringList(), XFreeStringList(). 

Copyright O’Reilly & Assoc.  —  

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