Copyright 1993 X Consortium
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of the X Consortium shall
not be used in advertising or otherwise to promote the sale, use or
other dealings in this Software without prior written authorization
from the X Consortium.
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of the X Consortium shall
not be used in advertising or otherwise to promote the sale, use or
other dealings in this Software without prior written authorization
from the X Consortium.
XtAppAddInput __libmansuffix__ __xorgversion__ "XT FUNCTIONS"
NAME
XtAppAddInput, XtRemoveInput - register and remove an input source
SYNTAX
#include <X11/Intrinsic.h>
XtInputId XtAppAddInput(XtAppContext app_context, int source, XtPointer condition, XtInputCallbackProc proc, XtPointer client_data);
void XtRemoveInput(XtInputId id);
ARGUMENTS
app_context 1i
Specifies the application context that identifies the application.
client_data 1i
Specifies the argument that is to be passed to the specified procedure
when input is available.
condition 1i
Specifies the mask that indicates a read, write, or exception condition
or some operating system dependent condition.
id 1i
Specifies the ID returned from the corresponding
XtAppAddInput call.
proc 1i
Specifies the procedure that is to be called when input is available.
source 1i
Specifies the source file descriptor on a UNIX-based system
or other operating system dependent device specification.
DESCRIPTION
The
XtAppAddInput function registers with the \*(xI 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.
XtAppAddInput 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 XtInputReadMask , XtInputWriteMask , and XtInputExceptMask . The XtRemoveInput function causes the \*(xI read routine to stop watching for input from the input source.
"SEE ALSO"
XtAppAddTimeOut(__libmansuffix__),XtAppAddSignal(__libmansuffix__)
\*(xT
\*(xL
"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);