]> Pileus Git - ~andy/gtk/blob - docs/reference/gdk/tmpl/input.sgml
Markup fixes
[~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 <!-- ##### FUNCTION gdk_input_add_full ##### -->
35 <para>
36 Establish a callback when a condition becomes true on
37 a file descriptor.
38 </para>
39
40 @source: a file descriptor.
41 @condition: the condition.
42 @function: the callback function.
43 @data: callback data passed to @function.
44 @destroy: callback function to call with @data when the input
45   handler is removed.
46 @Returns: a tag that can later be used as an argument to
47  gdk_input_remove().
48
49
50 <!-- ##### ENUM GdkInputCondition ##### -->
51 <para>
52 A set of bit flags used to specify conditions for which
53 an input callback will be triggered. The three members
54 of this enumeration correspond to the @readfds, 
55 @writefds, and @exceptfds arguments to the 
56 <function>select</function> system call.
57
58 <informaltable pgwide="1" frame="none" role="enum">
59 <tgroup cols="2"><colspec colwidth="2*"/><colspec colwidth="8*"/>
60 <tbody>
61
62 <row>
63 <entry>GDK_INPUT_READ</entry>
64 <entry>the file descriptor has become available for reading.
65 (Or, as is standard in Unix, a socket or pipe was closed
66 at the other end; this is the case if a subsequent read
67 on the file descriptor returns a count of zero.)</entry>
68 </row>
69
70 <row>
71 <entry>GDK_INPUT_WRITE</entry>
72 <entry>the file descriptor has become available for writing.</entry>
73 </row>
74
75 <row>
76 <entry>GDK_INPUT_EXCEPTION</entry>
77 <entry>an exception was raised on the file descriptor.</entry>
78 </row>
79
80 </tbody></tgroup></informaltable>
81 </para>
82
83 @GDK_INPUT_READ: 
84 @GDK_INPUT_WRITE: 
85 @GDK_INPUT_EXCEPTION: 
86
87 <!-- ##### USER_FUNCTION GdkInputFunction ##### -->
88 <para>
89 A callback function that will be called when some condition
90 occurs.
91 </para>
92
93 @data: the user data passed to gdk_input_add() or gdk_input_add_full().
94 @source: the source where the condition occurred.
95 @condition: the triggering condition.
96
97
98 <!-- ##### USER_FUNCTION GdkDestroyNotify ##### -->
99 <para>
100 A callback function called when a piece of user data is 
101 no longer being stored by GDK. Will typically free the
102 structure or object that @data points to.
103 </para>
104
105 @data: the user data.
106
107
108 <!-- ##### FUNCTION gdk_input_add ##### -->
109 <para>
110 Establish a callback when a condition becomes true on
111 a file descriptor.
112 </para>
113
114 @source: a file descriptor.
115 @condition: the condition.
116 @function: the callback function.
117 @data: callback data passed to @function.
118 @Returns: a tag that can later be used as an argument to
119  gdk_input_remove().
120
121
122 <!-- ##### FUNCTION gdk_input_remove ##### -->
123 <para>
124 Remove a callback added with gdk_input_add() or 
125 gdk_input_add_full().
126 </para>
127
128 @tag: the tag returned when the callback was set up.
129
130