1XtAppAddInput(3)                 XT FUNCTIONS                 XtAppAddInput(3)
2
3
4

NAME

6       XtAppAddInput, XtRemoveInput - register and remove an input source
7

SYNTAX

9       #include <X11/Intrinsic.h>
10
11       XtInputId XtAppAddInput(XtAppContext app_context, int source, XtPointer
12              condition, XtInputCallbackProc proc, XtPointer client_data);
13
14       void XtRemoveInput(XtInputId id);
15

ARGUMENTS

17       app_context
18                 Specifies the application context that identifies the appli‐
19                 cation.
20
21       client_data
22                 Specifies the argument that is to be passed to the specified
23                 procedure when input is available.
24
25       condition Specifies the mask that indicates a read, write, or exception
26                 condition or some operating system dependent condition.
27
28       id        Specifies the ID returned from the corresponding XtAppAdd‐
29                 Input call.
30
31       proc      Specifies the procedure that is to be called when input is
32                 available.
33
34       source    Specifies the source file descriptor on a UNIX-based system
35                 or other operating system dependent device specification.
36

DESCRIPTION

38       The XtAppAddInput function registers with the Intrinsics read routine a
39       new source of events, which is usually file input but can also be file
40       output.  Note that file should be loosely interpreted to mean any sink
41       or source of data.  XtAppAddInput also specifies the conditions under
42       which the source can generate events.  When input is pending on this
43       source, the callback procedure is called.
44
45       The legal values for the condition argument are operating-system depen‐
46       dent.  On a UNIX-based system, the condition is some union of XtInpu‐
47       tReadMask, XtInputWriteMask, and XtInputExceptMask.  The XtRemoveInput
48       function causes the Intrinsics read routine to stop watching for input
49       from the input source.
50

SEE ALSO

52       XtAppAddTimeOut(3),XtAppAddSignal(3)
53       X Toolkit Intrinsics - C Language Interface
54       Xlib - C Language X Interface
55

BUGS

57       In ANSI C it is necessary to cast the condition to an XtPointer, e.g.:
58           XtAppAddInput(app_context,
59               source,
60               (XtPointer) (XtInputReadMask | XtInputWriteMask),
61               proc,
62               client_data);
63
64
65
66X Version 11                      libXt 1.2.1                 XtAppAddInput(3)
Impressum