Scroll to navigation

XSetTextProperty(3) XLIB FUNCTIONS XSetTextProperty(3)

NAME

XSetTextProperty, XGetTextProperty - set and read text properties

SYNTAX

void XSetTextProperty(Display *display, Window w, XTextProperty *text_prop, Atom property);

Status XGetTextProperty(Display *display, Window w, XTextProperty *text_prop_return, Atom property);

ARGUMENTS

Specifies the connection to the X server.
Specifies the property name.
Specifies theXTextPropertystructure to be used.
Returns theXTextPropertystructure.

DESCRIPTION

TheXSetTextPropertyfunction replaces the existing specified property for the named windowwith the data, type, format, and number of items determinedby the value field, the encoding field, the format field,and the nitems field, respectively, of the specifiedXTextPropertystructure.If the property does not already exist,XSetTextPropertysets it for the specified window.

XSetTextPropertycan generateBadAlloc,BadAtom,BadValue,andBadWindowerrors.

TheXGetTextPropertyfunction reads the specified property from the windowand stores the data in the returnedXTextPropertystructure.It stores the data in the value field,the type of the data in the encoding field,the format of the data in the format field,and the number of items of data in the nitems field.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_return.The particular interpretation of the property's encodingand data as text is left to the calling application.If the specified property does not exist on the window,XGetTextPropertysets the value field to NULL,the encoding field toNone,the format field to zero,and the nitems field to zero.

If it was able to read and store the data in theXTextPropertystructure,XGetTextPropertyreturns a nonzero status;otherwise, it returns a zero status.

XGetTextPropertycan generateBadAtomandBadWindowerrors.

PROPERTIES

The string name of the machine on which the client application is running.
The command and arguments, null-separated, used to invoke theapplication.
The name to be used in an icon.
The name of the application.

DIAGNOSTICS

The server failed to allocate the requested resource or server memory.
A value for an Atom argument does not name a defined Atom.
Some numeric value falls outside the range of values accepted by the request.Unless a specific range is specified for an argument, the full range definedby the argument's type is accepted.Any argument defined as a set ofalternatives can generate this error.
A value for a Window argument does not name a defined Window.

SEE ALSO

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

libX11 1.8.1 X Version 11