]> Pileus Git - ~andy/gtk/blob - docs/reference/gdk/tmpl/input.sgml
2.14.2
[~andy/gtk] / docs / reference / gdk / tmpl / input.sgml
1 <!-- ##### SECTION Title ##### -->
2 Input
3
4 <!-- ##### SECTION Short_Description ##### -->
5 Callbacks on file descriptors
6
7 <!-- ##### SECTION Long_Description ##### -->
8 <para>
9 The functions in this section are used to establish
10 callbacks when some condition becomes true for
11 a file descriptor. They are currently just wrappers around
12 the <link linkend="glib-IO-Channels">IO Channel</link>
13 facility.
14 </para>
15
16 <!-- ##### SECTION See_Also ##### -->
17 <para>
18 <variablelist>
19
20 <varlistentry>
21 <term><link linkend="glib-The-Main-Event-Loop">GLib Main Loop</link></term>
22 <listitem><para>The main loop in which input callbacks run.</para></listitem>
23 </varlistentry>
24
25 <varlistentry>
26 <term><link linkend="glib-IO-Channels">IO Channels</link></term>
27 <listitem><para>A newer and more flexible way of doing IO
28 callbacks.</para></listitem>
29 </varlistentry>
30
31 </variablelist>
32 </para>
33
34 <!-- ##### SECTION Stability_Level ##### -->
35
36
37 <!-- ##### FUNCTION gdk_input_add_full ##### -->
38
39
40 @source: 
41 @condition: 
42 @function: 
43 @data: 
44 @destroy: 
45 @Returns: 
46
47
48 <!-- ##### ENUM GdkInputCondition ##### -->
49 <para>
50 A set of bit flags used to specify conditions for which
51 an input callback will be triggered. The three members
52 of this enumeration correspond to the @readfds, 
53 @writefds, and @exceptfds arguments to the 
54 <function>select</function> system call.
55 </para>
56
57 @GDK_INPUT_READ: the file descriptor has become available for reading.
58 (Or, as is standard in Unix, a socket or pipe was closed
59 at the other end; this is the case if a subsequent read
60 on the file descriptor returns a count of zero.)
61 @GDK_INPUT_WRITE: the file descriptor has become available for writing.
62 @GDK_INPUT_EXCEPTION: an exception was raised on the file descriptor.
63
64 <!-- ##### USER_FUNCTION GdkInputFunction ##### -->
65 <para>
66 A callback function that will be called when some condition
67 occurs.
68 </para>
69
70 @data: the user data passed to gdk_input_add() or gdk_input_add_full().
71 @source: the source where the condition occurred.
72 @condition: the triggering condition.
73
74
75 <!-- ##### USER_FUNCTION GdkDestroyNotify ##### -->
76 <para>
77 A callback function called when a piece of user data is 
78 no longer being stored by GDK. Will typically free the
79 structure or object that @data points to.
80 </para>
81
82 @data: the user data.
83
84
85 <!-- ##### FUNCTION gdk_input_add ##### -->
86
87
88 @source: 
89 @condition: 
90 @function: 
91 @data: 
92 @Returns: 
93
94
95 <!-- ##### FUNCTION gdk_input_remove ##### -->
96 <para>
97 Remove a callback added with gdk_input_add() or 
98 gdk_input_add_full().
99 </para>
100
101 @tag: the tag returned when the callback was set up.
102
103