NAME
XtAddEventHandler, XtAddRawEventHandler, XtRemoveEventHandler, XtRemoveRawEventHandler, XtInsertEventHandler, XtInsertRawEventHandler - add and remove event handlers
SYNTAX
void XtAddEventHandler(Widget _w, EventMask _e_v_e_n_t___m_a_s_k, Boolean
_n_o_n_m_a_s_k_a_b_l_e, XtEventHandler _p_r_o_c, XtPointer _c_l_i_e_n_t___d_a_t_a);
void XtAddRawEventHandler(Widget _w, EventMask _e_v_e_n_t___m_a_s_k, Boolean
_n_o_n_m_a_s_k_a_b_l_e, XtEventHandler _p_r_o_c, XtPointer _c_l_i_e_n_t___d_a_t_a);
void XtRemoveEventHandler(Widget _w, EventMask _e_v_e_n_t___m_a_s_k, Boolean
_n_o_n_m_a_s_k_a_b_l_e, XtEventHandler _p_r_o_c, XtPointer _c_l_i_e_n_t___d_a_t_a);
void XtRemoveRawEventHandler(Widget _w, EventMask _e_v_e_n_t___m_a_s_k,
Boolean _n_o_n_m_a_s_k_a_b_l_e, XtEventHandler _p_r_o_c, XtPointer
_c_l_i_e_n_t___d_a_t_a);
void XtInsertEventHandler(Widget _w, EventMask _e_v_e_n_t___m_a_s_k, Boolean
_n_o_n_m_a_s_k_a_b_l_e, XtEventHandler _p_r_o_c, XtPointer _c_l_i_e_n_t___d_a_t_a,
XtListPosition _p_o_s_i_t_i_o_n);
void XtInsertRawEventHandler(Widget _w, EventMask _e_v_e_n_t___m_a_s_k,
Boolean _n_o_n_m_a_s_k_a_b_l_e, XtEventHandler _p_r_o_c, XtPointer
_c_l_i_e_n_t___d_a_t_a, XtListPosition _p_o_s_i_t_i_o_n);
typedef enum { XtListHead, XtListTail } XtListPosition;
ARGUMENTS
-
_c_l_i_e_n_t___d_a_t_a
Specifies additional data to be passed to the client's event handler.
-
-
_e_v_e_n_t___m_a_s_k
Specifies the event mask for which to call or unregister this procedure.
-
-
_n_o_n_m_a_s_k_a_b_l_e
Specifies a Boolean value that indicates whether this procedure should be
-
called or removed on the nonmaskable events
(_G_r_a_p_h_i_c_s_E_x_p_o_s_e,
_N_o_E_x_p_o_s_e,
_S_e_l_e_c_t_i_o_n_C_l_e_a_r,
_S_e_l_e_c_t_i_o_n_R_e_q_u_e_s_t,
_S_e_l_e_c_t_i_o_n_N_o_t_i_f_y,
_C_l_i_e_n_t_M_e_s_s_a_g_e,
and
_M_a_p_p_i_n_g_N_o_t_i_f_y).
-
_p_r_o_c
Specifies the procedure that is to be added or removed.
-
-
_w
Specifies the widget for which this event handler is being registered.
-
-
_p_o_s_i_t_i_o_n
Specifies when the event handler is to be called relative to other
-
previously registered handlers.
DESCRIPTION
The
_X_t_A_d_d_E_v_e_n_t_H_a_n_d_l_e_r
function registers a procedure with the dispatch mechanism that is
to be called when an event that matches the mask occurs on the specified
widget.
If the procedure is already registered with the same client_data,
the specified mask is ORed into the existing mask.
If the widget is realized,
_X_t_A_d_d_E_v_e_n_t_H_a_n_d_l_e_r
calls
_X_S_e_l_e_c_t_I_n_p_u_t,
if necessary.
The
_X_t_A_d_d_R_a_w_E_v_e_n_t_H_a_n_d_l_e_r
function is similar to
_X_t_A_d_d_E_v_e_n_t_H_a_n_d_l_e_r
except that it does not affect the widget's mask and never causes an
_X_S_e_l_e_c_t_I_n_p_u_t
for its events.
Note that the widget might already have those mask bits set
because of other nonraw event handlers registered on it.
The
_X_t_R_e_m_o_v_e_R_a_w_E_v_e_n_t_H_a_n_d_l_e_r
function stops the specified procedure from receiving the specified events.
Because the procedure is a raw event handler,
this does not affect the widget's mask and never causes a call on
_X_S_e_l_e_c_t_I_n_p_u_t.
_X_t_I_n_s_e_r_t_E_v_e_n_t_H_a_n_d_l_e_r
is identical to
_X_t_A_d_d_E_v_e_n_t_H_a_n_d_l_e_r
with the additional _p_o_s_i_t_i_o_n argument. if _p_o_s_i_t_i_o_n is
_X_t_L_i_s_t_H_e_a_d,
the event handler is registered to that it will be called before
any event handlers that were previously registered for the same widget.
If _p_o_s_i_t_i_o_n is
_X_t_L_i_s_t_T_a_i_l,
the event handler is registered to be called after any previously
registered event handlers. If the procedure is already registered with
the same _c_l_i_e_n_t___d_a_t_a value, the specified mask augments the
existing mask and the procedure is repositioned in the list.
_X_t_I_n_s_e_r_t_R_a_w_E_v_e_n_t_H_a_n_d_l_e_r
is similar to
_X_t_I_n_s_e_r_t_E_v_e_n_t_H_a_n_d_l_e_r
except that it does not modify the widget's event mask and never causes an
_X_S_e_l_e_c_t_I_n_p_u_t
for the specified events. If the procedure is already registered with the
same _c_l_i_e_n_t___d_a_t_a value, the specified mask augments the existing
mask and the procedure is repositioned in the list.
SEE ALSO
XtAppNextEvent(3Xt),
XtBuildEventMask(3Xt)
_X _T_o_o_l_k_i_t _I_n_t_r_i_n_s_i_c_s _- _C _L_a_n_g_u_a_g_e _I_n_t_e_r_f_a_c_e
_X_l_i_b _- _C _L_a_n_g_u_a_g_e _X _I_n_t_e_r_f_a_c_e