


XIfEvent(3X11)						       XIfEvent(3X11)
X11R5									X11R5



NAME
  XIfEvent, XCheckIfEvent, XPeekIfEvent	- check	the event queue	with a predi-
  cate procedure

SYNTAX
  XIfEvent(_d_i_s_p_l_a_y, _e_v_e_n_t__r_e_t_u_r_n, _p_r_e_d_i_c_a_t_e, _a_r_g)
	Display	*_d_i_s_p_l_a_y;
	XEvent *_e_v_e_n_t__r_e_t_u_r_n;
	Bool (*_p_r_e_d_i_c_a_t_e)();
	XPointer _a_r_g;

  Bool XCheckIfEvent(_d_i_s_p_l_a_y, _e_v_e_n_t__r_e_t_u_r_n, _p_r_e_d_i_c_a_t_e, _a_r_g)
	Display	*_d_i_s_p_l_a_y;
	XEvent *_e_v_e_n_t__r_e_t_u_r_n;
	Bool (*_p_r_e_d_i_c_a_t_e)();
	XPointer _a_r_g;

  XPeekIfEvent(_d_i_s_p_l_a_y,	_e_v_e_n_t__r_e_t_u_r_n, _p_r_e_d_i_c_a_t_e, _a_r_g)
	Display	*_d_i_s_p_l_a_y;
	XEvent *_e_v_e_n_t__r_e_t_u_r_n;
	Bool (*_p_r_e_d_i_c_a_t_e)();
	XPointer _a_r_g;

ARGUMENTS

  _a_r_g	    Specifies the user-supplied	argument that will be passed to	the
	    predicate procedure.

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

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

  _p_r_e_d_i_c_a_t_e Specifies the procedure that is to be called to determine if the
	    next event in the queue matches what you want.

DESCRIPTION
  The _X_I_f_E_v_e_n_t function	completes only when the	specified predicate procedure
  returns _T_r_u_e for an event, which indicates an	event in the queue matches.
  _X_I_f_E_v_e_n_t flushes the output buffer if	it blocks waiting for additional
  events.  _X_I_f_E_v_e_n_t removes the	matching event from the	queue and copies the
  structure into the client-supplied _X_E_v_e_n_t structure.

  When the predicate procedure finds a match, _X_C_h_e_c_k_I_f_E_v_e_n_t copies the
  matched event	into the client-supplied _X_E_v_e_n_t	structure and returns _T_r_u_e.
  (This	event is removed from the queue.) If the predicate procedure finds no
  match, _X_C_h_e_c_k_I_f_E_v_e_n_t returns _F_a_l_s_e, and the output buffer will have been
  flushed.  All	earlier	events stored in the queue are not discarded.

  The _X_P_e_e_k_I_f_E_v_e_n_t function returns only when the specified predicate pro-
  cedure returns _T_r_u_e for an event.  After the predicate procedure finds a
  match, _X_P_e_e_k_I_f_E_v_e_n_t copies the matched event into the	client-supplied
  _X_E_v_e_n_t structure without removing the	event from the queue.  _X_P_e_e_k_I_f_E_v_e_n_t
  flushes the output buffer if it blocks waiting for additional	events.



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































































