XGetTextProperty
Syntax
Status XGetTextProperty(display, w, text_prop_return, property)
Display *display;
Window w;
XTextProperty *text_prop_return;
Atom property;
Arguments
display
| Specifies the connection to the X server.
|
w
| Specifies the window.
|
text_prop_return
| Returns the
XTextProperty
structure.
|
property
| Specifies the property name.
|
Description
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 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 encoding
and data as text is left to the calling application.
If the specified property does not exist on the window,
XGetTextProperty()
sets the value field to NULL,
the encoding field to
None ,
the format field to zero,
and the nitems field to zero.
If it was able to read and store the data in the
XTextProperty
structure,
XGetTextProperty()
returns a nonzero status;
otherwise, it returns a zero status.
XGetTextProperty()
can generate
BadAtom
and
BadWindow
errors.
Diagnostics
BadAtom
| A value for an Atom argument does not name a
defined Atom.
|
BadWindow
| A value for a Window argument does not name a defined Window.
|
See also
XAllocClassHint(),
XAllocIconSize(),
XAllocSizeHints(),
XAllocWMHints(),
XSetCommand(),
XSetTextProperty(),
XSetTransientForHint(),
XSetWMClientMachine(),
XSetWMColormapWindows(),
XSetWMIconName(),
XSetWMName(),
XSetWMProperties(),
XSetWMProtocols(),
XStringListToTextProperty(),
"Setting and Reading Text Properties".
Christophe Tronche, ch@tronche.com