


XSetWMName(3X11)					     XSetWMName(3X11)
X11R5									X11R5



NAME
  XSetWMName, XGetWMName, XStoreName, XFetchName - set or read a window's
  WM_NAME property

SYNTAX
  void XSetWMName(_d_i_s_p_l_a_y, _w, _t_e_x_t__p_r_o_p)
	Display	*_d_i_s_p_l_a_y;
	Window _w;
	XTextProperty *_t_e_x_t__p_r_o_p;

  Status XGetWMName(_d_i_s_p_l_a_y, _w,	_t_e_x_t__p_r_o_p__r_e_t_u_r_n)
	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;

  XStoreName(_d_i_s_p_l_a_y, _w, _w_i_n_d_o_w__n_a_m_e)
	Display	*_d_i_s_p_l_a_y;
	Window _w;
	char *_w_i_n_d_o_w__n_a_m_e;

  Status XFetchName(_d_i_s_p_l_a_y, _w,	_w_i_n_d_o_w__n_a_m_e__r_e_t_u_r_n)
	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	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 nonzero;	otherwise, no name has been set	for the	win-
  dow, 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	delim off
































