XSetTextProperty(3X) XSetTextProperty(3X)
NAME
XSetTextProperty, XGetTextProperty - get and set text
properties
SYNOPSIS
void XSetTextProperty(display, w, text-prop, property)
Display *display;
Window w;
XTextProperty *text-prop;
Atom property;
Status XGetTextProperty(display, w, text-prop-return,
property)
Display *display;
Window w;
XTextProperty *text-prop-return;
Atom property;
DESCRIPTION
The XSetTextProperty function replaces the existing, speci-
fied property for the named window with the data, type, for-
mat, and number of items determined by the value,
encoding, format, and nitems members, respectively, of the
specified XTextProperty structure. If the property does not
already exist, XSetTextProperty sets it for the specified
window.
The XGetTextProperty function reads the specified property
from the window and stores the data in the returned
XTextProperty structure. It stores the data in the value
member, the type of the data in the encoding member, the
format of the data in the format member, and the number of
items of data in the nitems member. The particular in-
terpretation of the property's encoding and data as ``text''
is left to the calling application. If the specified pro-
perty does not exist on the window, XGetTextProperty sets
value to NULL,
encoding to None, format to 0, and nitems to 0.
If it was able to set these members in the XTextProperty
structure, XGetTextProperty returns a nonzero status; other-
wise, it returns a zero status.
Arguments
These functions accept the following arguments:
display Specifies the connection to the X server.
property
Specifies the property name.
text-prop
November, 1990 1
XSetTextProperty(3X) XSetTextProperty(3X)
Specifies the XTextProperty structure to be used.
text-prop-return
Returns the XTextProperty structure.
Properties
These functions use the following properties:
WM_CLIENT_MACHINE
Specifies the string name of the machine on which
the client application is running.
WM_COMMAND
Specifies the command and arguments, separated by
ASCII null characters, used to invoke the applica-
tion.
WM_ICON_NAME
Specifies the name to be used in an icon.
WM_NAME Specifies the name of the application.
ERRORS
BadAlloc
The server failed to allocate the requested resource
or server memory.
BadAtom A value for an Atom argument does not name a defined
Atom.
BadValue
Some numeric value falls outside the range of values
accepted by the request. Unless a range is speci-
fied for an argument, the full range defined by the
argument's type is accepted. Any argument defined
as a set of alternatives can generate this error.
BadWindow
A value for a Window argument does not name a de-
fined Window.
The XSetTextProperty function can generate BadAlloc, BadA-
tom, BadValue, and BadWindow errors.
The XGetTextProperty function can generate BadAtom and
BadWindow errors.
SEE ALSO
XAllocClassHint(3X), XAllocIconSize(3X),
XAllocSizeHints(3X), XAllocWMHints(3X), XSetCommand(3X),
XSetTransientForHint(3X), XSetWMClientMachine(3X),
XSetWMColormapWindows(3X), XSetWMIconName(3X),
2 November, 1990
XSetWMName(3X), XSetWMProperties(3X), XSetWMProtocols(3X),
XStringListToTextProperty(3X)
Xlib - C Language Interface
November, 1990 3