NAME
XtAppAddInput, XtRemoveInput - register and remove an input source
SYNTAX
XtInputId XtAppAddInput(XtAppContext _a_p_p___c_o_n_t_e_x_t, int _s_o_u_r_c_e,
XtPointer _c_o_n_d_i_t_i_o_n, XtInputCallbackProc _p_r_o_c, XtPointer
_c_l_i_e_n_t___d_a_t_a);
void XtRemoveInput(XtInputId _i_d);
ARGUMENTS
-
_a_p_p___c_o_n_t_e_x_t
Specifies the application context that identifies the application.
-
-
_c_l_i_e_n_t___d_a_t_a
Specifies the argument that is to be passed to the specified procedure
-
when input is available.
-
_c_o_n_d_i_t_i_o_n
Specifies the mask that indicates a read, write, or exception condition
-
or some operating system dependent condition.
-
_i_d
Specifies the ID returned from the corresponding
-
_X_t_A_p_p_A_d_d_I_n_p_u_t
call.
-
_p_r_o_c
Specifies the procedure that is to be called when input is available.
-
-
_s_o_u_r_c_e
Specifies the source file descriptor on a UNIX-based system
-
or other operating system dependent device specification.
DESCRIPTION
The
_X_t_A_p_p_A_d_d_I_n_p_u_t
function registers with the Intrinsics read routine a new source of events,
which is usually file input but can also be file output.
Note that file should be loosely interpreted to mean any sink
or source of data.
_X_t_A_p_p_A_d_d_I_n_p_u_t
also specifies the conditions under which the source can generate events.
When input is pending on this source,
the callback procedure is called.
The legal values for the condition argument are operating-system dependent.
On a UNIX-based system,
the condition is some union of
_X_t_I_n_p_u_t_R_e_a_d_M_a_s_k,
_X_t_I_n_p_u_t_W_r_i_t_e_M_a_s_k,
and
_X_t_I_n_p_u_t_E_x_c_e_p_t_M_a_s_k.
The
_X_t_R_e_m_o_v_e_I_n_p_u_t
function causes the Intrinsics read routine to stop watching for input
from the input source.
SEE ALSO
XtAppAddTimeOut(3Xt),XtAppAddSignal(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
BUGS
In ANSI C it is necessary to cast the condition to an XtPointer, e.g.:
XtAppAddInput(app_context,
source,
(XtPointer)
(XtInputReadMask | XtInputWriteMask),
proc,
client_data);