NAME
XSetWMName, XGetWMName, XStoreName, XFetchName - set or read a window's WM_NAME property
SYNTAX
void XSetWMName(Display *_d_i_s_p_l_a_y, Window _w, XTextProperty
*_t_e_x_t___p_r_o_p);
Status XGetWMName(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);
int XStoreName(Display *_d_i_s_p_l_a_y, Window _w, char
*_w_i_n_d_o_w___n_a_m_e);
Status XFetchName(Display *_d_i_s_p_l_a_y, Window _w, char
**_w_i_n_d_o_w___n_a_m_e___r_e_t_u_r_n);
ARGUMENTS
-
_d_i_s_p_l_a_y
Specifies the connection to the X server.
-
-
_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.
-
_w
Specifies the window.
-
-
_w_i_n_d_o_w___n_a_m_e
Specifies the window name,
-
which should be a null-terminated string.
-
_w_i_n_d_o_w___n_a_m_e___r_e_t_u_r_n
Returns the window name, which is a null-terminated string.
-
DESCRIPTION
The
_X_S_e_t_W_M_N_a_m_e
convenience function calls
_X_S_e_t_T_e_x_t_P_r_o_p_e_r_t_y
to set the WM_NAME property.
The
_X_G_e_t_W_M_N_a_m_e
convenience function calls
_X_G_e_t_T_e_x_t_P_r_o_p_e_r_t_y
to obtain the WM_NAME property.
It returns a nonzero status on success;
otherwise, it returns a zero status.
The
_X_S_t_o_r_e_N_a_m_e
function assigns the name passed to window_name to the specified window.
A window manager can display the window name in some prominent
place, such as the title bar, to allow users to identify windows easily.
Some window managers may display a window's name in the window's icon,
although they are encouraged to use the window's icon name
if one is provided by the application.
If the string is not in the Host Portable Character Encoding,
the result is implementation-dependent.
_X_S_t_o_r_e_N_a_m_e
can generate
_B_a_d_A_l_l_o_c
and
_B_a_d_W_i_n_d_o_w
errors.
The
_X_F_e_t_c_h_N_a_m_e
function returns the name of the specified window.
If it succeeds,
it returns a nonzero status;
otherwise, no name has been set for the window,
and it returns zero.
If the WM_NAME property has not been set for this window,
_X_F_e_t_c_h_N_a_m_e
sets window_name_return to NULL.
If the data returned by the server is in the Latin Portable Character Encoding,
then the returned string is in the Host Portable Character Encoding.
Otherwise, the result is implementation-dependent.
When finished with it, a client must free
the window name string using
_X_F_r_e_e.
_X_F_e_t_c_h_N_a_m_e
can generate a
_B_a_d_W_i_n_d_o_w
error.
PROPERTIES
-
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_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),
XFree(3X11),
XSetCommand(3X11),
XSetTransientForHint(3X11),
XSetTextProperty(3X11),
XSetWMClientMachine(3X11),
XSetWMColormapWindows(3X11),
XSetWMIconName(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