


XSetSelectionOwner(3X11)			     XSetSelectionOwner(3X11)
X11R5									X11R5



NAME
  XSetSelectionOwner, XGetSelectionOwner, XConvertSelection - manipulate win-
  dow selection

SYNTAX
  XSetSelectionOwner(_d_i_s_p_l_a_y, _s_e_l_e_c_t_i_o_n, _o_w_n_e_r,	_t_i_m_e)
	Display	*_d_i_s_p_l_a_y;
	Atom _s_e_l_e_c_t_i_o_n;
	Window _o_w_n_e_r;
	Time _t_i_m_e;

  Window XGetSelectionOwner(_d_i_s_p_l_a_y, _s_e_l_e_c_t_i_o_n)
	Display	*_d_i_s_p_l_a_y;
	Atom _s_e_l_e_c_t_i_o_n;

  XConvertSelection(_d_i_s_p_l_a_y, _s_e_l_e_c_t_i_o_n,	_t_a_r_g_e_t,	_p_r_o_p_e_r_t_y, _r_e_q_u_e_s_t_o_r, _t_i_m_e)
	Display	*_d_i_s_p_l_a_y;
	Atom _s_e_l_e_c_t_i_o_n,	_t_a_r_g_e_t;
	Atom _p_r_o_p_e_r_t_y;
	Window _r_e_q_u_e_s_t_o_r;
	Time _t_i_m_e;

ARGUMENTS

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

  _o_w_n_e_r	    Specifies the owner	of the specified selection atom.  You can
	    pass a window or _N_o_n_e.

  _p_r_o_p_e_r_t_y  Specifies the property name.  You also can pass _N_o_n_e.

  _r_e_q_u_e_s_t_o_r Specifies the requestor.

  _s_e_l_e_c_t_i_o_n Specifies the selection atom.

  _t_a_r_g_e_t    Specifies the target atom.

  _t_i_m_e	    Specifies the time.	 You can pass either a timestamp or _C_u_r_r_e_n_t_-
	    _T_i_m_e.

DESCRIPTION
  The _X_S_e_t_S_e_l_e_c_t_i_o_n_O_w_n_e_r function changes the owner and	last-change time for
  the specified	selection and has no effect if the specified time is earlier
  than the current last-change time of the specified selection or is later
  than the current X server time.  Otherwise, the last-change time is set to
  the specified	time, with _C_u_r_r_e_n_t_T_i_m_e replaced	by the current server time.
  If the owner window is specified as _N_o_n_e, then the owner of the selection
  becomes _N_o_n_e (that is, no owner).  Otherwise,	the owner of the selection
  becomes the client executing the request.

  If the new owner (whether a client or	_N_o_n_e) is not the same as the current
  owner	of the selection and the current owner is not _N_o_n_e, the	current	owner
  is sent a _S_e_l_e_c_t_i_o_n_C_l_e_a_r event.  If the client that is the owner of a
  selection is later terminated	(that is, its connection is closed) or if the
  owner	window it has specified	in the request is later	destroyed, the owner
  of the selection automatically reverts to _N_o_n_e, but the last-change time is
  not affected.	 The selection atom is uninterpreted by	the X server.  _X_G_e_t_-
  _S_e_l_e_c_t_i_o_n_O_w_n_e_r returns the owner window, which is reported in
  _S_e_l_e_c_t_i_o_n_R_e_q_u_e_s_t and _S_e_l_e_c_t_i_o_n_C_l_e_a_r events.  Selections are global to	the X
  server.

  _X_S_e_t_S_e_l_e_c_t_i_o_n_O_w_n_e_r can generate _B_a_d_A_t_o_m and _B_a_d_W_i_n_d_o_w	errors.

  The _X_G_e_t_S_e_l_e_c_t_i_o_n_O_w_n_e_r function returns the window ID	associated with	the
  window that currently	owns the specified selection.  If no selection was
  specified, the function returns the constant _N_o_n_e.  If _N_o_n_e is returned,
  there	is no owner for	the selection.

  _X_G_e_t_S_e_l_e_c_t_i_o_n_O_w_n_e_r can generate a _B_a_d_A_t_o_m error.

  _X_C_o_n_v_e_r_t_S_e_l_e_c_t_i_o_n requests that the specified	selection be converted to the
  specified target type:

  oo++    If the specified	selection has an owner,	the X server sends a _S_e_l_e_c_-
       _t_i_o_n_R_e_q_u_e_s_t event to that owner.

  oo++    If no owner for the specified selection exists, the X server generates
       a _S_e_l_e_c_t_i_o_n_N_o_t_i_f_y event to the requestor	with property _N_o_n_e.

  The arguments	are passed on unchanged	in either of the events.  There	are
  two predefined selection atoms: PRIMARY and SECONDARY.

  _X_C_o_n_v_e_r_t_S_e_l_e_c_t_i_o_n can	generate _B_a_d_A_t_o_m and _B_a_d_W_i_n_d_o_w errors.

DIAGNOSTICS

  _B_a_d_A_t_o_m   A value for	an Atom	argument does not name a defined Atom.

  _B_a_d_W_i_n_d_o_w A value for	a Window argument does not name	a defined Window.

SEE ALSO
  _X_l_i_b - _C _L_a_n_g_u_a_g_e _X _I_n_t_e_r_f_a_c_e
































