


XNextEvent(3X11)					     XNextEvent(3X11)
X11R5									X11R5



NAME
  XNextEvent, XPeekEvent, XWindowEvent,	XCheckWindowEvent, XMaskEvent,
  XCheckMaskEvent, XCheckTypedEvent, XCheckTypedWindowEvent - select events
  by type

SYNTAX
  XNextEvent(_d_i_s_p_l_a_y, _e_v_e_n_t__r_e_t_u_r_n)
	Display	*_d_i_s_p_l_a_y;
	XEvent *_e_v_e_n_t__r_e_t_u_r_n;

  XPeekEvent(_d_i_s_p_l_a_y, _e_v_e_n_t__r_e_t_u_r_n)
	Display	*_d_i_s_p_l_a_y;
	XEvent *_e_v_e_n_t__r_e_t_u_r_n;

  XWindowEvent(_d_i_s_p_l_a_y,	_w, _e_v_e_n_t__m_a_s_k, _e_v_e_n_t__r_e_t_u_r_n)
	Display	*_d_i_s_p_l_a_y;
	Window _w;
	long _e_v_e_n_t__m_a_s_k;
	XEvent *_e_v_e_n_t__r_e_t_u_r_n;

  Bool XCheckWindowEvent(_d_i_s_p_l_a_y, _w, _e_v_e_n_t__m_a_s_k, _e_v_e_n_t__r_e_t_u_r_n)
	Display	*_d_i_s_p_l_a_y;
	Window _w;
	long _e_v_e_n_t__m_a_s_k;
	XEvent *_e_v_e_n_t__r_e_t_u_r_n;

  XMaskEvent(_d_i_s_p_l_a_y, _e_v_e_n_t__m_a_s_k, _e_v_e_n_t__r_e_t_u_r_n)
	Display	*_d_i_s_p_l_a_y;
	long _e_v_e_n_t__m_a_s_k;
	XEvent *_e_v_e_n_t__r_e_t_u_r_n;

  Bool XCheckMaskEvent(_d_i_s_p_l_a_y,	_e_v_e_n_t__m_a_s_k, _e_v_e_n_t__r_e_t_u_r_n)
	Display	*_d_i_s_p_l_a_y;
	long _e_v_e_n_t__m_a_s_k;
	XEvent *_e_v_e_n_t__r_e_t_u_r_n;

  Bool XCheckTypedEvent(_d_i_s_p_l_a_y, _e_v_e_n_t__t_y_p_e, _e_v_e_n_t__r_e_t_u_r_n)
	Display	*_d_i_s_p_l_a_y;
	int _e_v_e_n_t__t_y_p_e;
	XEvent *_e_v_e_n_t__r_e_t_u_r_n;

  Bool XCheckTypedWindowEvent(_d_i_s_p_l_a_y, _w, _e_v_e_n_t__t_y_p_e, _e_v_e_n_t__r_e_t_u_r_n)
	Display	*_d_i_s_p_l_a_y;
	Window _w;
	int _e_v_e_n_t__t_y_p_e;
	XEvent *_e_v_e_n_t__r_e_t_u_r_n;

ARGUMENTS

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

  _e_v_e_n_t__m_a_s_k
	    Specifies the event	mask.

  _e_v_e_n_t__r_e_t_u_r_n
	    Returns the	matched	event's	associated structure.

  _e_v_e_n_t__r_e_t_u_r_n
	    Returns the	next event in the queue.

  _e_v_e_n_t__r_e_t_u_r_n
	    Returns a copy of the matched event's associated structure.

  _e_v_e_n_t__t_y_p_e
	    Specifies the event	type to	be compared.


  _w	    Specifies the window  whose	event uou are interested in.

DESCRIPTION
  The _X_N_e_x_t_E_v_e_n_t function copies the first event from the event	queue into
  the specified	_X_E_v_e_n_t structure and then removes it from the queue.  If the
  event	queue is empty,	_X_N_e_x_t_E_v_e_n_t flushes the output buffer and blocks	until
  an event is received.

  The _X_P_e_e_k_E_v_e_n_t function returns the first event from the event queue,	but
  it does not remove the event from the	queue.	If the queue is	empty,
  _X_P_e_e_k_E_v_e_n_t flushes the output	buffer and blocks until	an event is received.
  It then copies the event into	the client-supplied _X_E_v_e_n_t structure without
  removing it from the event queue.

  The _X_W_i_n_d_o_w_E_v_e_n_t function searches the event queue for an event that
  matches both the specified window and	event mask.  When it finds a match,
  _X_W_i_n_d_o_w_E_v_e_n_t removes that event from the queue and copies it into the
  specified _X_E_v_e_n_t structure.  The other events	stored in the queue are	not
  discarded.  If a matching event is not in the	queue, _X_W_i_n_d_o_w_E_v_e_n_t flushes
  the output buffer and	blocks until one is received.

  The _X_C_h_e_c_k_W_i_n_d_o_w_E_v_e_n_t	function searches the event queue and then the events
  available on the server connection for the first event that matches the
  specified window and event mask.  If it finds	a match, _X_C_h_e_c_k_W_i_n_d_o_w_E_v_e_n_t
  removes that event, copies it	into the specified _X_E_v_e_n_t structure, and
  returns _T_r_u_e.	 The other events stored in the	queue are not discarded.  If
  the event you	requested is not available, _X_C_h_e_c_k_W_i_n_d_o_w_E_v_e_n_t returns _F_a_l_s_e,
  and the output buffer	will have been flushed.

  The _X_M_a_s_k_E_v_e_n_t function searches the event queue for the events associated
  with the specified mask.  When it finds a match, _X_M_a_s_k_E_v_e_n_t removes that
  event	and copies it into the specified _X_E_v_e_n_t	structure.  The	other events
  stored in the	queue are not discarded.  If the event you requested is	not
  in the queue,	_X_M_a_s_k_E_v_e_n_t flushes the output buffer and blocks	until one is
  received.

  The _X_C_h_e_c_k_M_a_s_k_E_v_e_n_t function searches	the event queue	and then any events
  available on the server connection for the first event that matches the
  specified mask.  If it finds a match,	_X_C_h_e_c_k_M_a_s_k_E_v_e_n_t	removes	that event,
  copies it into the specified _X_E_v_e_n_t structure, and returns _T_r_u_e.  The	other
  events stored	in the queue are not discarded.	 If the	event you requested
  is not available, _X_C_h_e_c_k_M_a_s_k_E_v_e_n_t returns _F_a_l_s_e, and the output buffer will
  have been flushed.

  The _X_C_h_e_c_k_T_y_p_e_d_E_v_e_n_t function	searches the event queue and then any events
  available on the server connection for the first event that matches the
  specified type.  If it finds a match,	_X_C_h_e_c_k_T_y_p_e_d_E_v_e_n_t removes that event,
  copies it into the specified _X_E_v_e_n_t structure, and returns _T_r_u_e.  The	other
  events in the	queue are not discarded.  If the event is not available,
  _X_C_h_e_c_k_T_y_p_e_d_E_v_e_n_t returns _F_a_l_s_e, and the output buffer	will have been
  flushed.

  The _X_C_h_e_c_k_T_y_p_e_d_W_i_n_d_o_w_E_v_e_n_t function searches the event queue and then	any
  events available on the server connection for	the first event	that matches
  the specified	type and window.  If it	finds a	match, _X_C_h_e_c_k_T_y_p_e_d_W_i_n_d_o_w_E_v_e_n_t
  removes the event from the queue, copies it into the specified _X_E_v_e_n_t
  structure, and returns _T_r_u_e.	The other events in the	queue are not
  discarded.  If the event is not available, _X_C_h_e_c_k_T_y_p_e_d_W_i_n_d_o_w_E_v_e_n_t returns
  _F_a_l_s_e, and the output	buffer will have been flushed.

SEE ALSO
  XAnyEvent(3X11), XIfEvent(3X11), XPutBackEvent(3X11),	XSendEvent(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




























































