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);



Specifies the number of strings.


Returns the number of strings.


Specifies the list of strings to be freed.


Specifies a list of null-terminated character strings.


Returns a list of null-terminated character strings.


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. 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 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 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 XFreeStringList.

The XFreeStringList function releases memory allocated by XmbTextPropertyToTextList, Xutf8TextPropertyToTextList and XTextPropertyToStringList and the missing charset list allocated 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(3), XAllocIconSize(3), XAllocSizeHints(3), XAllocWMHints(3), XFree(3), XSetCommand(3), XSetTransientForHint(3), XSetTextProperty(3), XSetWMClientMachine(3), XSetWMColormapWindows(3), XSetWMIconName(3), XSetWMName(3), XSetWMProperties(3), XSetWMProtocols(3)
Xlib − C Language X Interface

More Linux Commands

move_field(3form) - make and break connections between field
move_field.3form - The function set_form_fields changes the field pointer array of the given form. The array must be terminated by a NULL. The function form_fie

mount.ntfs(8) - Third Generation Read/Write NTFS Driver.....
ntfs-3g is an NTFS driver, which can create, remove, rename, move files, directories, hard links, and streams; it can read and write files, including streams, s

XSetRGBColormaps(3) - allocate, set, or read a standard colo
XSetRGBColormaps.3 - The XAllocStandardColormap function allocates and returns a pointer to a XStandardColormap structure. Note that all fields in the XStandard

sem_close(3) - close a named semaphore - Linux manual page
sem_close() closes the named semaphore referred to by sem, allowing any resources that the system has allocated to the calling process for this semaphore to be

tcsh(1) - C shell with file name completion and command line
tcsh is an enhanced but completely compatible version of the Berkeley UNIX C shell, csh(1). It is a command language interpreter usable both as an interactive l

systemd.target(5) - systemd target configuration files......
A unit configuration file whose name ends in .target encodes information about a target unit of systemd, which is used for grouping units and as well-known sync

ldapwhoami(1) - LDAP who am i? tool - Linux manual page.....
ldapwhoami implements the LDAP Who Am I? extended operation. ldapwhoami opens a connection to an LDAP server, binds, and performs a whoami operation. OPTIONS -V

errx(3) - formatted error messages - Linux manual page......
The err() and warn() family of functions display a formatted error message on the standard error output. In all cases, the last component of the program name, a

getdents(2) - get directory entries - Linux manual page.....
getdents.2 - This is not the function you are interested in. Look at readdir(3) for the POSIX conforming C library interface. This page documents the bare kerne

ipcmk(1) - create various ipc resources - Linux manual page
ipcmk allows you to create shared memory segments, message queues, and semaphore arrays. OPTIONS Resources can be specified with these options: -M, --shmem size

machine-id(5) - local machine ID configuration file.........
The /etc/machine-id file contains the unique machine ID of the local system that is set during installation. The machine ID is a single newline-terminated, hexa

puts(n) - Write to a channel (Local - Linux man page).......
Writes the characters given by string to the channel given by channelId. ChannelId must be an identifier for an open channel such as a Tcl standard channel (std

We can't live, work or learn in freedom unless the software we use is free.