XIfEvent(3X11) AIX (XLIB FUNCTIONS) XIfEvent(3X11) NAME XIfEvent, XCheckIfEvent, XPeekIfEvent - check the event queue with a predicate 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 indi- cates 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 struc- ture. 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. Rev. Release 5 Page 1 XIfEvent(3X11) AIX (XLIB FUNCTIONS) XIfEvent(3X11) The _X_P_e_e_k_I_f_E_v_e_n_t function returns only when the specified predicate procedure 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 addi- tional 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 Rev. Release 5 Page 2