NAME

XSetTextProperty, XGetTextProperty - set and read text properties

SYNTAX

void XSetTextProperty(Display *_d_i_s_p_l_a_y, Window _w, XTextProperty *_t_e_x_t___p_r_o_p, Atom _p_r_o_p_e_r_t_y); Status XGetTextProperty(Display *_d_i_s_p_l_a_y, Window _w, XTextProperty *_t_e_x_t___p_r_o_p___r_e_t_u_r_n, Atom _p_r_o_p_e_r_t_y);

ARGUMENTS

_d_i_s_p_l_a_y Specifies the connection to the X server.
_p_r_o_p_e_r_t_y Specifies the property name.
_t_e_x_t___p_r_o_p Specifies the
_X_T_e_x_t_P_r_o_p_e_r_t_y structure to be used.
_t_e_x_t___p_r_o_p___r_e_t_u_r_n Returns the
_X_T_e_x_t_P_r_o_p_e_r_t_y structure.

DESCRIPTION

The _X_S_e_t_T_e_x_t_P_r_o_p_e_r_t_y 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 _X_T_e_x_t_P_r_o_p_e_r_t_y structure. If the property does not already exist, _X_S_e_t_T_e_x_t_P_r_o_p_e_r_t_y sets it for the specified window.

_X_S_e_t_T_e_x_t_P_r_o_p_e_r_t_y can generate _B_a_d_A_l_l_o_c, _B_a_d_A_t_o_m, _B_a_d_V_a_l_u_e, and _B_a_d_W_i_n_d_o_w errors.

The _X_G_e_t_T_e_x_t_P_r_o_p_e_r_t_y function reads the specified property from the window and stores the data in the returned _X_T_e_x_t_P_r_o_p_e_r_t_y 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, _X_G_e_t_T_e_x_t_P_r_o_p_e_r_t_y sets the value field to NULL, the encoding field to _N_o_n_e, the format field to zero, and the nitems field to zero.

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

_X_G_e_t_T_e_x_t_P_r_o_p_e_r_t_y can generate _B_a_d_A_t_o_m and _B_a_d_W_i_n_d_o_w 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

_B_a_d_A_l_l_o_c
The server failed to allocate the requested resource or server memory.
_B_a_d_A_t_o_m
A value for an Atom argument does not name a defined Atom.
_B_a_d_V_a_l_u_e
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.
_B_a_d_W_i_n_d_o_w
A value for a Window argument does not name a defined Window.

SEE ALSO

XAllocClassHint(3X11), XAllocIconSize(3X11), XAllocSizeHints(3X11), XAllocWMHints(3X11), XSetCommand(3X11), XSetTransientForHint(3X11), XSetWMClientMachine(3X11), XSetWMColormapWindows(3X11), XSetWMIconName(3X11), XSetWMName(3X11), XSetWMProperties(3X11), XSetWMProtocols(3X11), XStringListToTextProperty(3X11)
_X_l_i_b _- _C _L_a_n_g_u_a_g_e _X _I_n_t_e_r_f_a_c_e