summaryrefslogtreecommitdiff
path: root/docs/reference/gdk/tmpl/input.sgml
blob: 7781d3a25f17fbf96ba254c7b49eab4310cf5ece (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<!-- ##### SECTION Title ##### -->
Input

<!-- ##### SECTION Short_Description ##### -->
Callbacks on file descriptors

<!-- ##### SECTION Long_Description ##### -->
<para>
The functions in this section are used to establish
callbacks when some condition becomes true for
a file descriptor. They are currently just wrappers around
the <link linkend="glib-IO-Channels">IO Channel</link>
facility.
</para>

<!-- ##### SECTION See_Also ##### -->
<para>
<variablelist>

<varlistentry>
<term><link linkend="glib-The-Main-Event-Loop">GLib Main Loop</link></term>
<listitem><para>The main loop in which input callbacks run.</para></listitem>
</varlistentry>

<varlistentry>
<term><link linkend="glib-IO-Channels">IO Channels</link></term>
<listitem><para>A newer and more flexible way of doing IO
callbacks.</para></listitem>
</varlistentry>

</variablelist>
</para>

<!-- ##### SECTION Stability_Level ##### -->


<!-- ##### SECTION Image ##### -->


<!-- ##### FUNCTION gdk_input_add_full ##### -->


@source: 
@condition: 
@function: 
@data: 
@destroy: 
@Returns: 


<!-- ##### ENUM GdkInputCondition ##### -->
<para>
A set of bit flags used to specify conditions for which
an input callback will be triggered. The three members
of this enumeration correspond to the @readfds, 
@writefds, and @exceptfds arguments to the 
<function>select</function> system call.
</para>

@GDK_INPUT_READ: the file descriptor has become available for reading.
(Or, as is standard in Unix, a socket or pipe was closed
at the other end; this is the case if a subsequent read
on the file descriptor returns a count of zero.)
@GDK_INPUT_WRITE: the file descriptor has become available for writing.
@GDK_INPUT_EXCEPTION: an exception was raised on the file descriptor.

<!-- ##### USER_FUNCTION GdkInputFunction ##### -->
<para>
A callback function that will be called when some condition
occurs.
</para>

@data: the user data passed to gdk_input_add() or gdk_input_add_full().
@source: the source where the condition occurred.
@condition: the triggering condition.


<!-- ##### USER_FUNCTION GdkDestroyNotify ##### -->
<para>
A callback function called when a piece of user data is 
no longer being stored by GDK. Will typically free the
structure or object that @data points to.
</para>

@data: the user data.


<!-- ##### FUNCTION gdk_input_add ##### -->


@source: 
@condition: 
@function: 
@data: 
@Returns: 


<!-- ##### FUNCTION gdk_input_remove ##### -->
<para>
Remove a callback added with gdk_input_add() or 
gdk_input_add_full().
</para>

@tag: the tag returned when the callback was set up.