-
-
Notifications
You must be signed in to change notification settings - Fork 46
/
GLibUnix-2.0.gir
348 lines (339 loc) · 15.9 KB
/
GLibUnix-2.0.gir
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
<?xml version="1.0"?>
<!-- This file was automatically generated from C sources - DO NOT EDIT!
To affect the contents of this file, edit the original C definitions,
and/or use gtk-doc annotations. -->
<repository xmlns="http://www.gtk.org/introspection/core/1.0" xmlns:c="http://www.gtk.org/introspection/c/1.0" xmlns:glib="http://www.gtk.org/introspection/glib/1.0" version="1.2">
<include name="GLib" version="2.0"/>
<package name="glib-2.0"/>
<c:include name="glib-unix.h"/>
<c:include name="glib.h"/>
<namespace name="GLibUnix" version="2.0" shared-library="libgobject-2.0.so.0,libglib-2.0.so.0" c:identifier-prefixes="GUnix,G" c:symbol-prefixes="glib,g_unix,g">
<callback name="FDSourceFunc" c:type="GUnixFDSourceFunc">
<doc xml:space="preserve">The type of functions to be called when a UNIX fd watch source
triggers.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%FALSE if the source should be removed</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="fd" transfer-ownership="none">
<doc xml:space="preserve">the fd that triggered the event</doc>
<type name="gint" c:type="gint"/>
</parameter>
<parameter name="condition" transfer-ownership="none">
<doc xml:space="preserve">the IO conditions reported on @fd</doc>
<type name="GLib.IOCondition" c:type="GIOCondition"/>
</parameter>
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1" closure="2">
<doc xml:space="preserve">user data passed to g_unix_fd_add()</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
</parameters>
</callback>
<record name="Pipe" c:type="GUnixPipe" version="2.80">
<doc xml:space="preserve">A Unix pipe. The advantage of this type over `int[2]` is that it can
be closed automatically when it goes out of scope, using `g_auto(GUnixPipe)`,
on compilers that support that feature.</doc>
<field name="fds" writable="1">
<doc xml:space="preserve">A pair of file descriptors, each negative if closed or not yet opened.
The file descriptor with index %G_UNIX_PIPE_END_READ is readable.
The file descriptor with index %G_UNIX_PIPE_END_WRITE is writable.</doc>
<array zero-terminated="0" fixed-size="2">
<type name="gint" c:type="int"/>
</array>
</field>
<function name="clear" c:identifier="g_unix_pipe_clear" version="2.80" introspectable="0">
<doc xml:space="preserve">Close both ends of the pipe, unless they have already been closed or
stolen. Any errors are ignored: use g_unix_pipe_close() or g_clear_fd()
if error-handling is required.
This function is async-signal safe if @error is %NULL and each member
of @fds are either negative or a valid open file descriptor.
As a result, it is safe to call this function or use `g_auto(GUnixPipe)`
(on compilers that support it) in a signal handler or a
#GSpawnChildSetupFunc, as long as those conditions are ensured to be true.
See [`signal(7)`](man:signal(7)) and
[`signal-safety(7)`](man:signal-safety(7)) for more details.
This function preserves the value of `errno`.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a #GUnixPipe</doc>
<type name="GLib.UnixPipe" c:type="GUnixPipe*"/>
</parameter>
</parameters>
</function>
<function name="close" c:identifier="g_unix_pipe_close" version="2.80" introspectable="0" throws="1">
<doc xml:space="preserve">Close one of the ends of the pipe and set the relevant member of @fds
to `-1` before returning, equivalent to g_clear_fd().
Like g_close(), if closing the file descriptor fails, the error is
stored in both %errno and @error. If this function succeeds,
%errno is undefined.
This function is async-signal safe if @error is %NULL and the relevant
member of @fds is either negative or a valid open file descriptor.
This makes it safe to call from a signal handler or a #GSpawnChildSetupFunc
under those conditions.
See [`signal(7)`](man:signal(7)) and
[`signal-safety(7)`](man:signal-safety(7)) for more details.
To close both file descriptors and ignore any errors, use
g_unix_pipe_clear() instead.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE on success</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">A pair of file descriptors</doc>
<type name="GLib.UnixPipe" c:type="GUnixPipe*"/>
</parameter>
<parameter name="end" transfer-ownership="none">
<doc xml:space="preserve">One of the ends of the pipe</doc>
<type name="GLib.UnixPipeEnd" c:type="GUnixPipeEnd"/>
</parameter>
</parameters>
</function>
<function name="get" c:identifier="g_unix_pipe_get" version="2.80" introspectable="0">
<doc xml:space="preserve">Return one of the ends of the pipe. It remains owned by @self.
This function is async-signal safe (see [`signal(7)`](man:signal(7)) and
[`signal-safety(7)`](man:signal-safety(7))), making it safe to call from a
signal handler or a #GSpawnChildSetupFunc.
This function preserves the value of `errno`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a non-negative file descriptor owned by @self, which must not
be closed by the caller, or a negative number if the corresponding
end of the pipe was already closed or stolen</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">A pair of file descriptors</doc>
<type name="GLib.UnixPipe" c:type="GUnixPipe*"/>
</parameter>
<parameter name="end" transfer-ownership="none">
<doc xml:space="preserve">One of the ends of the pipe</doc>
<type name="GLib.UnixPipeEnd" c:type="GUnixPipeEnd"/>
</parameter>
</parameters>
</function>
<function name="open" c:identifier="g_unix_pipe_open" version="2.80" introspectable="0" throws="1">
<doc xml:space="preserve">Open a pipe. This is the same as g_unix_open_pipe(), but uses the
#GUnixPipe data structure.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE on success</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">A pair of file descriptors</doc>
<type name="GLib.UnixPipe" c:type="GUnixPipe*"/>
</parameter>
<parameter name="flags" transfer-ownership="none">
<doc xml:space="preserve">Flags to pass to g_unix_open_pipe(), typically `O_CLOEXEC`</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</function>
<function name="steal" c:identifier="g_unix_pipe_steal" version="2.80" introspectable="0">
<doc xml:space="preserve">Return one of the ends of the pipe. It becomes owned by the caller,
and the file descriptor in the data structure is set to `-1`,
similar to g_steal_fd().
This function is async-signal safe (see [`signal(7)`](man:signal(7)) and
[`signal-safety(7)`](man:signal-safety(7))), making it safe to call from a
signal handler or a #GSpawnChildSetupFunc.
This function preserves the value of `errno`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a non-negative file descriptor, which becomes owned by the
caller and must be closed by the caller if required, or a negative
number if the corresponding end of the pipe was already closed or stolen</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">A pair of file descriptors</doc>
<type name="GLib.UnixPipe" c:type="GUnixPipe*"/>
</parameter>
<parameter name="end" transfer-ownership="none">
<doc xml:space="preserve">One of the ends of the pipe</doc>
<type name="GLib.UnixPipeEnd" c:type="GUnixPipeEnd"/>
</parameter>
</parameters>
</function>
</record>
<enumeration name="PipeEnd" version="2.80" c:type="GUnixPipeEnd">
<doc xml:space="preserve">Mnemonic constants for the ends of a Unix pipe.</doc>
<member name="read" value="0" c:identifier="G_UNIX_PIPE_END_READ">
<doc xml:space="preserve">The readable file descriptor 0</doc>
</member>
<member name="write" value="1" c:identifier="G_UNIX_PIPE_END_WRITE">
<doc xml:space="preserve">The writable file descriptor 1</doc>
</member>
</enumeration>
<function name="closefrom" c:identifier="g_closefrom">
<return-value transfer-ownership="none">
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<parameter name="lowfd" transfer-ownership="none">
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</function>
<function name="error_quark" c:identifier="g_unix_error_quark">
<return-value transfer-ownership="none">
<type name="GLib.Quark" c:type="GQuark"/>
</return-value>
</function>
<function name="fd_add" c:identifier="g_unix_fd_add" introspectable="0">
<return-value transfer-ownership="none">
<type name="guint" c:type="guint"/>
</return-value>
<parameters>
<parameter name="fd" transfer-ownership="none">
<type name="gint" c:type="gint"/>
</parameter>
<parameter name="condition" transfer-ownership="none">
<type name="GLib.IOCondition" c:type="GIOCondition"/>
</parameter>
<parameter name="function" transfer-ownership="none" closure="3">
<type name="GLib.UnixFDSourceFunc" c:type="GUnixFDSourceFunc"/>
</parameter>
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1">
<type name="gpointer" c:type="gpointer"/>
</parameter>
</parameters>
</function>
<function name="fd_add_full" c:identifier="g_unix_fd_add_full">
<return-value transfer-ownership="none">
<type name="guint" c:type="guint"/>
</return-value>
<parameters>
<parameter name="priority" transfer-ownership="none">
<type name="gint" c:type="gint"/>
</parameter>
<parameter name="fd" transfer-ownership="none">
<type name="gint" c:type="gint"/>
</parameter>
<parameter name="condition" transfer-ownership="none">
<type name="GLib.IOCondition" c:type="GIOCondition"/>
</parameter>
<parameter name="function" transfer-ownership="none" scope="notified" closure="4" destroy="5">
<type name="GLib.UnixFDSourceFunc" c:type="GUnixFDSourceFunc"/>
</parameter>
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1">
<type name="gpointer" c:type="gpointer"/>
</parameter>
<parameter name="notify" transfer-ownership="none" scope="async">
<type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
</parameter>
</parameters>
</function>
<function name="fd_source_new" c:identifier="g_unix_fd_source_new">
<return-value transfer-ownership="full">
<type name="GLib.Source" c:type="GSource*"/>
</return-value>
<parameters>
<parameter name="fd" transfer-ownership="none">
<type name="gint" c:type="gint"/>
</parameter>
<parameter name="condition" transfer-ownership="none">
<type name="GLib.IOCondition" c:type="GIOCondition"/>
</parameter>
</parameters>
</function>
<function name="fdwalk_set_cloexec" c:identifier="g_fdwalk_set_cloexec">
<return-value transfer-ownership="none">
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<parameter name="lowfd" transfer-ownership="none">
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</function>
<function name="get_passwd_entry" c:identifier="g_unix_get_passwd_entry" throws="1">
<return-value transfer-ownership="none" nullable="1">
<type name="gpointer" c:type="passwd*"/>
</return-value>
<parameters>
<parameter name="user_name" transfer-ownership="none">
<type name="utf8" c:type="const gchar*"/>
</parameter>
</parameters>
</function>
<function name="open_pipe" c:identifier="g_unix_open_pipe" throws="1">
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="fds" transfer-ownership="none">
<type name="gint" c:type="gint*"/>
</parameter>
<parameter name="flags" transfer-ownership="none">
<type name="gint" c:type="gint"/>
</parameter>
</parameters>
</function>
<function name="set_fd_nonblocking" c:identifier="g_unix_set_fd_nonblocking" throws="1">
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="fd" transfer-ownership="none">
<type name="gint" c:type="gint"/>
</parameter>
<parameter name="nonblock" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</function>
<function name="signal_add" c:identifier="g_unix_signal_add" introspectable="0">
<return-value transfer-ownership="none">
<type name="guint" c:type="guint"/>
</return-value>
<parameters>
<parameter name="signum" transfer-ownership="none">
<type name="gint" c:type="gint"/>
</parameter>
<parameter name="handler" transfer-ownership="none" closure="2">
<type name="GLib.SourceFunc" c:type="GSourceFunc"/>
</parameter>
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1">
<type name="gpointer" c:type="gpointer"/>
</parameter>
</parameters>
</function>
<function name="signal_add_full" c:identifier="g_unix_signal_add_full">
<return-value transfer-ownership="none">
<type name="guint" c:type="guint"/>
</return-value>
<parameters>
<parameter name="priority" transfer-ownership="none">
<type name="gint" c:type="gint"/>
</parameter>
<parameter name="signum" transfer-ownership="none">
<type name="gint" c:type="gint"/>
</parameter>
<parameter name="handler" transfer-ownership="none" scope="notified" closure="3" destroy="4">
<type name="GLib.SourceFunc" c:type="GSourceFunc"/>
</parameter>
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1">
<type name="gpointer" c:type="gpointer"/>
</parameter>
<parameter name="notify" transfer-ownership="none" scope="async">
<type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
</parameter>
</parameters>
</function>
<function name="signal_source_new" c:identifier="g_unix_signal_source_new">
<return-value transfer-ownership="full">
<type name="GLib.Source" c:type="GSource*"/>
</return-value>
<parameters>
<parameter name="signum" transfer-ownership="none">
<type name="gint" c:type="gint"/>
</parameter>
</parameters>
</function>
</namespace>
</repository>