1. NAME▲
XSetTextProperty, XGetTextProperty - set and read text properties
2. SYNTAX ▲
void XSetTextProperty(Display *display, Window w, XTextProperty *text_prop, Atom property); Status XGetTextProperty(Display *display, Window w, XTextProperty *text_prop_return, Atom property);
3. ARGUMENTS ▲
display 1i Specifies the connection to the X server.
property 1i Specifies the property name.
text_prop 1i Specifies the .ZN XTextProperty structure to be used.
text_prop_return 1i Returns the .ZN XTextProperty structure.
4. DESCRIPTION ▲
The .ZN XSetTextProperty function replaces the existing specified property for the named window with the data, type, format, and number of items determined by the value field, the encoding field, the format field, and the nitems field, respectively, of the specified .ZN XTextProperty structure. If the property does not already exist, .ZN XSetTextProperty sets it for the specified window.
.ZN XSetTextProperty can generate .ZN BadAlloc , .ZN BadAtom , .ZN BadValue , and .ZN BadWindow errors.
The .ZN XGetTextProperty function reads the specified property from the window and stores the data in the returned .ZN 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, .ZN XGetTextProperty sets the value field to NULL, the encoding field to .ZN None , the format field to zero, and the nitems field to zero.
If it was able to read and store the data in the .ZN XTextProperty structure, .ZN XGetTextProperty returns a nonzero status; otherwise, it returns a zero status.
.ZN XGetTextProperty can generate .ZN BadAtom and .ZN BadWindow errors.
5. PROPERTIES ▲
- \s-1WM_CLIENT_MACHINE\s+1
The string name of the machine on which the client application is running. - \s-1WM_COMMAND\s+1
The command and arguments, null-separated, used to invoke the application. - \s-1WM_ICON_NAME\s+1
The name to be used in an icon. - \s-1WM_NAME\s+1
The name of the application.
6. DIAGNOSTICS ▲
- .ZN BadAlloc
The server failed to allocate the requested resource or server memory. - .ZN BadAtom
A value for an Atom argument does not name a defined Atom. - .ZN BadValue
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 defined by the argument's type is accepted. Any argument defined as a set of alternatives can generate this error. - .ZN BadWindow
A value for a Window argument does not name a defined Window.
7. 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)
\*(xL