


XSetWMProperties(3X11)				       XSetWMProperties(3X11)
X11R5									X11R5



NAME
  XSetWMProperties, XmbSetWMProperties - set standard window properties

SYNTAX
  void XSetWMProperties(_d_i_s_p_l_a_y, _w, _w_i_n_d_o_w__n_a_m_e, _i_c_o_n__n_a_m_e, _a_r_g_v, _a_r_g_c,
  _n_o_r_m_a_l__h_i_n_t_s,	_w_m__h_i_n_t_s, _c_l_a_s_s__h_i_n_t_s)
	Display	*_d_i_s_p_l_a_y;
	Window _w;
	XTextProperty *_w_i_n_d_o_w__n_a_m_e;
	XTextProperty *_i_c_o_n__n_a_m_e;
	char **_a_r_g_v;
	int _a_r_g_c;
	XSizeHints *_n_o_r_m_a_l__h_i_n_t_s;
	XWMHints *_w_m__h_i_n_t_s;
	XClassHint *_c_l_a_s_s__h_i_n_t_s;

  void XmbSetWMProperties(_d_i_s_p_l_a_y, _w, _w_i_n_d_o_w__n_a_m_e, _i_c_o_n__n_a_m_e, _a_r_g_v, _a_r_g_c,
			_n_o_r_m_a_l__h_i_n_t_s, _w_m__h_i_n_t_s,	_c_l_a_s_s__h_i_n_t_s)
	Display	*_d_i_s_p_l_a_y;
	Window _w;
	char *_w_i_n_d_o_w__n_a_m_e;
	char *_i_c_o_n__n_a_m_e;
	char *_a_r_g_v[];
	int _a_r_g_c;
	XSizeHints *_n_o_r_m_a_l__h_i_n_t_s;
	XWMHints *_w_m__h_i_n_t_s;
	XClassHint *_c_l_a_s_s__h_i_n_t_s;

ARGUMENTS

  _a_r_g_c	    Specifies the number of arguments.

  _a_r_g_v	    Specifies the application's	argument list.

  _c_l_a_s_s__h_i_n_t_s
	    Specifies the _X_C_l_a_s_s_H_i_n_t structure to be used.

  _d_i_s_p_l_a_y   Specifies the connection to	the X server.

  _i_c_o_n__n_a_m_e Specifies the icon name, which should be a null-terminated
	    string.

  _n_o_r_m_a_l__h_i_n_t_s
	    Specifies the size hints for the window in its normal state.

  _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_m__h_i_n_t_s  Specifies the _X_W_M_H_i_n_t_s structure to	be used.

DESCRIPTION
  The _X_S_e_t_W_M_P_r_o_p_e_r_t_i_e_s convenience function provides a single programming
  interface for	setting	those essential	window properties that are used	for
  communicating	with other clients (particularly window	and session
  managers).

  If the window_name argument is non-NULL, _X_S_e_t_W_M_P_r_o_p_e_r_t_i_e_s calls _X_S_e_t_W_M_N_a_m_e,
  which	in turn, sets the WM_NAME property (see	section	14.1.4).  If the
  icon_name argument is	non-NULL, _X_S_e_t_W_M_P_r_o_p_e_r_t_i_e_s calls _X_S_e_t_W_M_I_c_o_n_N_a_m_e,
  which	sets the WM_ICON_NAME property (see section 14.1.5).  If the argv
  argument is non-NULL,	_X_S_e_t_W_M_P_r_o_p_e_r_t_i_e_s calls _X_S_e_t_C_o_m_m_a_n_d, which sets the
  WM_COMMAND property (see section 14.2.1).  Note that an argc of zero is
  allowed to indicate a	zero-length command.  Note also	that the hostname of
  this machine is stored using _X_S_e_t_W_M_C_l_i_e_n_t_M_a_c_h_i_n_e (see	section	14.2.2).

  If the normal_hints argument is non-NULL, _X_S_e_t_W_M_P_r_o_p_e_r_t_i_e_s calls _X_S_e_t_W_M_N_o_r_-
  _m_a_l_H_i_n_t_s, which sets the WM_NORMAL_HINTS property (see section 14.1.7).  If
  the wm_hints argument	is non-NULL, _X_S_e_t_W_M_P_r_o_p_e_r_t_i_e_s calls _X_S_e_t_W_M_H_i_n_t_s,
  which	sets the WM_HINTS property (see	section	14.1.6).

  If the class_hints argument is non-NULL, _X_S_e_t_W_M_P_r_o_p_e_r_t_i_e_s calls
  _X_S_e_t_C_l_a_s_s_H_i_n_t, which sets the	WM_CLASS property (see section 14.1.8).	 If
  the res_name member in the _X_C_l_a_s_s_H_i_n_t	structure is set to the	NULL pointer
  and the RESOURCE_NAME	environment variable is	set, then the value of the
  environment variable is substituted for res_name.  If	the res_name member
  is NULL, the environment variable is not set,	and argv and argv[0] are set,
  then the value of argv[0], stripped of any directory prefixes, is substi-
  tuted	for res_name.

  The _X_m_b_S_e_t_W_M_P_r_o_p_e_r_t_i_e_s convenience function provides a simple	programming
  interface for	setting	those essential	window properties that are used	for
  communicating	with other clients (particularly window	and session
  managers).

  If the window_name argument is non-NULL, _X_m_b_S_e_t_W_M_P_r_o_p_e_r_t_i_e_s sets the
  WM_NAME property.  If	the icon_name argument is non-NULL, _X_m_b_S_e_t_W_M_P_r_o_p_e_r_-
  _t_i_e_s sets the	WM_ICON_NAME property.	The window_name	and icon_name argu-
  ments	are null-terminated strings in the encoding of the current locale.
  If the arguments can be fully	converted to the STRING	encoding, the proper-
  ties are created with	type ``STRING'': otherwise, the	arguments are con-
  verted to Compound Text, and the properties are created with type
  ``COMPOUND_TEXT''.

  If the normal_hints argument is non-NULL, _X_m_b_S_e_t_W_M_P_r_o_p_e_r_t_i_e_s calls _X_S_e_t_W_M_-
  _N_o_r_m_a_l_H_i_n_t_s, which sets the WM_NORMAL_HINTS property (see section 14.1.7).
  If the wm_hints argument is non-NULL,	_X_m_b_S_e_t_W_M_P_r_o_p_e_r_t_i_e_s calls _X_S_e_t_W_M_H_i_n_t_s,
  which	sets the WM_HINTS property (see	section	14.1.6).

  If the argv argument is non-NULL, _X_m_b_S_e_t_W_M_P_r_o_p_e_r_t_i_e_s sets the	WM_COMMAND
  property from	argv and argc.	Note that an argc of 0 indicates a zero-
  length command.

  The hostname of this machine is stored using _X_S_e_t_W_M_C_l_i_e_n_t_M_a_c_h_i_n_e (see	sec-
  tion 14.2.2).

  If the class_hints argument is non-NULL, _X_m_b_S_e_t_W_M_P_r_o_p_e_r_t_i_e_s sets the
  WM_CLASS property.  If the res_name member in	the _X_C_l_a_s_s_H_i_n_t structure is
  set to the NULL pointer and the RESOURCE_NAME	environment variable is	set,
  the value of the environment variable	is substituted for res_name.  If the
  res_name member is NULL, the environment variable is not set,	and argv and
  argv[0] are set, then	the value of argv[0], stripped of any directory	pre-
  fixes, is substituted	for res_name.

  It is	assumed	that the supplied class_hints.res_name and argv, the
  RESOURCE_NAME	environment variable, and the hostname of this machine are in
  the encoding of the locale announced for the LC_CTYPE	category.  (On
  POSIX-compliant systems, the LC_CTYPE, else LANG environment variable).
  The corresponding WM_CLASS, WM_COMMAND, and WM_CLIENT_MACHINE	properties
  are typed according to the local host	locale announcer.  No encoding
  conversion is	performed prior	to storage in the properties.

  For clients that need	to process the property	text in	a locale, _X_m_b_S_e_t_W_M_-
  _P_r_o_p_e_r_t_i_e_s sets the WM_LOCALE_NAME property to be the	name of	the current
  locale.  The name is assumed to be in	the Host Portable Character Encoding,
  and is converted to STRING for storage in the	property.

  _X_S_e_t_W_M_P_r_o_p_e_r_t_i_e_s and _X_m_b_S_e_t_W_M_P_r_o_p_e_r_t_i_e_s can generate _B_a_d_A_l_l_o_c	and _B_a_d_W_i_n_d_o_w
  errors.

PROPERTIES

  WM_CLASS  Set	by application programs	to allow window	and session managers
	    to obtain the application's	resources from the resource database.

  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_HINTS  Additional hints set by the	client for use by the window manager.
	    The	C type of this property	is _X_W_M_H_i_n_t_s.

  WM_ICON_NAME
	    The	name to	be used	in an icon.

  WM_NAME   The	name of	the application.

  WM_NORMAL_HINTS
	    Size hints for a window in its normal state.  The C	type of	this
	    property is	_X_S_i_z_e_H_i_n_t_s.

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), XParseGeometry(3X11), XSetCommand(3X11),
  XSetTransientForHint(3X11), XSetTextProperty(3X11),
  XSetWMClientMachine(3X11), XSetWMColormapWindows(3X11),
  XSetWMIconName(3X11),	XSetWMName(3X11), XSetWMProtocols(3X11),
  XStringListToTextProperty(3X11), XmbTextListToTextProperty(3X11),
  XwcTextListToTextProperty(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

















