XSetTextProperty(3)
π XSetTextProperty(3) π
okay so this page is from the XLIB FUNCTIONS corner of the manual, and it's all about XSetTextProperty + XGetTextProperty β the little duo that sets and reads text properties. no cap, they're lowkey iconic. β¨
πΈ NAME πΈ
XSetTextProperty, XGetTextProperty β set and read text properties. that's the vibe, bestie. π
β¨ 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 π
displayβ specifies the connection to the X server. like, which server bestie are we even talking to? π«Άpropertyβ specifies the property name.text_propβ specifies theXTextPropertystructure to be used.text_prop_returnβ returns theXTextPropertystructure.
π DESCRIPTION π
okay so 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 XTextProperty structure. If the property does not already exist, XSetTextProperty sets it for the specified window. periodt. π
XSetTextProperty can generate BadAlloc, BadAtom, BadValue, and BadWindow errors.
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.
π¦ PROPERTIES π¦
WM_CLIENT_MACHINEβ the string name of the machine on which the client application is running.WM_COMMANDβ the command and arguments, null-separated, used to invoke the application.WM_ICON_NAMEβ the name to be used in an icon.WM_NAMEβ the name of the application.
π₯ DIAGNOSTICS π₯
BadAllocβ the server failed to allocate the requested resource or server memory.BadAtomβ a value for anAtomargument does not name a definedAtom.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.BadWindowβ a value for aWindowargument does not name a definedWindow.
π 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
π that's the whole page! footer tea: X Version 11, libX11 1.8.14, XSetTextProperty(3) β stay iconic, bestie π β¨
π¦ where this page comes from
- alpine 3.24: libx11-doc 1.8.14-r0 Β· X11
- arch rolling: libx11 1.8.14-1 Β· MIT AND X11
- nixos 26.05: libx11 1.8.14
- nixpkgs unstable: libx11 1.8.14
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms