-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathglib_bridging.h
401 lines (389 loc) · 11.3 KB
/
glib_bridging.h
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
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
#ifdef __linux__
#include <sys/types.h>
#include <utime.h>
#ifdef __aarch64__
extern int g_open(const char *, int, int) __nonnull ((1));
#define g_open g_open_orig
#else
extern int g_open(const char *, int, ...) __nonnull ((1));
#endif
#endif
#define __GLIB_H_INSIDE__
#include <glib/gversion.h>
#include <glib/gversionmacros.h>
#undef __GLIB_H_INSIDE__
#if defined(__linux__)
#undef g_open
#endif
struct _GAllocator {};
struct _GAsyncQueue {};
struct _GBookmarkFile {};
struct _GBinding {};
struct _GBytes {};
struct _GCache {};
struct _GChecksum {};
struct _GData {};
struct _GDatagramBased {};
struct _GDateTime {};
struct _GDebugController {};
struct _GDir {};
struct _GHashTable {};
struct _GHmac {};
struct _GKeyFile {};
struct _GMainContext {};
struct _GMainLoop {};
struct _GMappedFile {};
struct _GMarkupParseContext {};
struct _GMatchInfo {};
struct _GMemChunk {};
struct _GMemoryMonitor {};
struct _GModule {};
struct _GMutexLocker {};
struct _GOptionContext {};
struct _GOptionGroup {};
struct _GParamSpecPool {};
struct _GPatternSpec {};
struct _GPowerProfileMonitor {};
struct _GRand {};
struct _GRegex {};
struct _GRelation {};
struct _GSequence {};
struct _GSequenceNode {};
struct _GSequenceIter {};
struct _GSignalGroup {};
struct _GSourcePrivate {};
struct _GStringChunk {};
struct _GTestCase {};
struct _GTestSuite {};
struct _GTimeZone {};
struct _GTimer {};
struct _GTree {};
struct _GTypePlugin {};
struct _GUnixConnectionPrivate {};
struct _GUnixCredentialsMessagePrivate {};
struct _GUnixFDListPrivate {};
struct _GUnixFDMessagePrivate {};
struct _GUnixInputStreamPrivate {};
struct _GUnixOutputStreamPrivate {};
struct _GUnixSocketAddressPrivate {};
struct _GUri {};
struct _GVariant {};
struct _GVariantType {};
#if GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION < 84
struct GMainContextPusher {};
#endif
struct GMutexLocker {};
struct GTestCase {};
struct GTestSuite {};
struct _GAction {};
struct _GActionGroup {};
struct _GActionMap {};
struct _GAppInfo {};
struct _GAppInfoMonitor {};
struct _GAppLaunchContextPrivate {};
struct _GApplicationCommandLinePrivate {};
struct _GApplicationPrivate {};
struct _GAsyncInitable {};
struct _GAsyncResult {};
struct _GBindingGroup {};
struct _GBufferedInputStreamPrivate {};
struct _GBufferedOutputStreamPrivate {};
struct _GBytesIcon {};
struct _GCancellablePrivate {};
struct _GCharsetConverter {};
struct _GConverter {};
struct _GConverterInputStreamPrivate {};
struct _GConverterOutputStreamPrivate {};
struct _GCredentials {};
struct _GCredentialsClass {};
struct _GDBusActionGroup {};
struct _GDBusAuthObserver {};
struct _GDBusConnection {};
struct _GDBusInterface {};
struct _GDBusInterfaceSkeletonPrivate {};
struct _GDBusMenuModel {};
struct _GDBusMessage {};
struct _GDBusMethodInvocation {};
struct _GDBusObject {};
struct _GDBusObjectManager {};
struct _GDBusObjectManagerClientPrivate {};
struct _GDBusObjectManagerServerPrivate {};
struct _GDBusObjectProxyPrivate {};
struct _GDBusObjectSkeletonPrivate {};
struct _GDBusProxyPrivate {};
struct _GDBusServer {};
struct _GDataInputStreamPrivate {};
struct _GDataOutputStreamPrivate {};
struct _GDesktopAppInfo {};
struct _GDesktopAppInfoLookup {};
struct _GDesktopAppLaunchCallback {};
struct _GDrive {};
struct _GEmblem {};
struct _GEmblemClass {};
struct _GEmblemedIconPrivate {};
struct _GFile {};
struct _GFileAttributeMatcher {};
struct _GFileDescriptorBased {};
struct _GFileEnumeratorPrivate {};
struct _GFileIOStreamPrivate {};
struct _GFileIcon {};
struct _GFileIconClass {};
struct _GFileInfo {};
struct _GFileInfoClass {};
struct _GFileInputStreamPrivate {};
struct _GFileMonitorPrivate {};
struct _GFileOutputStreamPrivate {};
struct _GFilenameCompleter {};
struct _GIOExtension {};
struct _GIOExtensionPoint {};
struct _GIOModule {};
struct _GIOModuleClass {};
struct _GIOModuleScope {};
struct _GIOSchedulerJob {};
struct _GIOStreamAdapter {};
struct _GIOStreamPrivate {};
struct _GIConv {};
struct _GIcon {};
struct _GInetAddressMaskPrivate {};
struct _GInetAddressPrivate {};
struct _GInetSocketAddressPrivate {};
struct _GInitable {};
struct _GInputStreamPrivate {};
struct _GListModel {};
struct _GListStore {};
struct _GLoadableIcon {};
struct _GMemoryInputStreamPrivate {};
struct _GMemoryOutputStreamPrivate {};
struct _GMenu {};
struct _GMenuAttributeIterPrivate {};
struct _GMenuItem {};
struct _GMenuLinkIterPrivate {};
struct _GMenuModelPrivate {};
struct _GMount {};
struct _GMountOperationPrivate {};
#if GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION < 62
struct _GNativeSocketAddress {};
typedef struct _GNativeSocketAddress GNativeSocketAddress;
#else
struct _GNativeSocketAddressPrivate {};
typedef struct _GNativeSocketAddressClass GNativeSocketAddressClass;
typedef struct _GNativeSocketAddressPrivate GNativeSocketAddressPrivate;
#endif
struct _GNetworkAddressPrivate {};
struct _GNetworkMonitor {};
struct _GNetworkServicePrivate {};
struct _GNotification {};
struct _GOsxAppInfo {};
struct _GOutputStreamPrivate {};
struct _GPermissionPrivate {};
struct _GPollableInputStream {};
struct _GPollableOutputStream {};
struct _GPropertyAction {};
struct _GProxy {};
struct _GProxyAddressEnumeratorPrivate {};
struct _GProxyAddressPrivate {};
struct _GProxyResolver {};
struct _GRemoteActionGroup {};
struct _GResolverPrivate {};
struct _GResource {};
struct _GSeekable {};
struct _GSettingsBackendPrivate {};
struct _GSettingsPrivate {};
struct _GSettingsSchema {};
struct _GSettingsSchemaKey {};
struct _GSettingsSchemaSource {};
struct _GSimpleAction {};
struct _GSimpleActionGroupPrivate {};
struct _GSimpleAsyncResult {};
struct _GSimpleAsyncResultClass {};
struct _GSimpleIOStream {};
struct _GSimplePermission {};
struct _GSimpleProxyResolverPrivate {};
struct _GSocketClientPrivate {};
struct _GSocketConnectable {};
struct _GSocketConnectionPrivate {};
struct _GSocketControlMessagePrivate {};
struct _GSocketListenerPrivate {};
struct _GSocketPrivate {};
struct _GSocketServicePrivate {};
struct _GSrvTarget {};
struct _GSubprocess {};
struct _GSubprocessLauncher {};
struct _GTask {};
struct _GTaskClass {};
struct _GTcpConnectionPrivate {};
struct _GTcpWrapperConnectionPrivate {};
struct _GTestDBus {};
struct _GThemedIcon {};
struct _GThemedIconClass {};
struct _GThreadedSocketServicePrivate {};
struct _GTlsBackend {};
struct _GTlsCertificatePrivate {};
struct _GTlsClientConnection {};
struct _GTlsConnectionPrivate {};
struct _GTlsDatabasePrivate {};
struct _GTlsFileDatabase {};
struct _GTlsInteractionPrivate {};
struct _GTlsPasswordPrivate {};
struct _GTlsServerConnection {};
struct _GUnixMountEntry {};
struct _GUnixMountMonitor {};
struct _GUnixMountMonitorClass {};
struct _GUnixMountPoint {};
struct _GVolume {};
struct _GZlibCompressor {};
struct _GZlibDecompressor {};
struct _GDtlsClientConnection {};
struct _GDtlsConnection {};
struct _GDtlsServerConnection {};
struct _GTreeNode {};
struct _GStrvBuilder {};
#define GLIB_DISABLE_DEPRECATION_WARNINGS
#define G_SETTINGS_ENABLE_BACKEND
#include <unistd.h>
#include <termios.h>
#include <sys/types.h>
#include <pwd.h>
#include <glib-unix.h>
#include <glib-object.h>
#include <gobject/gvaluecollector.h>
#include <gmodule.h>
#include <glib/gstdio.h>
#include <glib/garray.h>
#include <glib/gasyncqueue.h>
#include <glib/gbookmarkfile.h>
#include <glib/gchecksum.h>
#include <glib/gdataset.h>
#include <glib/gdatetime.h>
#include <glib/gdir.h>
#include <glib/ghash.h>
#include <glib/ghmac.h>
#include <glib/gkeyfile.h>
#include <glib/gmain.h>
#include <glib/gmappedfile.h>
#include <glib/gmarkup.h>
#include <glib/gregex.h>
#include <glib/gthread.h>
#include <glib/goption.h>
#include <glib/gpattern.h>
#include <glib/grand.h>
#include <glib/gsequence.h>
#include <glib/gstringchunk.h>
#include <glib/gtestutils.h>
#include <glib/gtimezone.h>
#include <glib/gtimer.h>
#include <glib/gtree.h>
#if GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION >= 66
#include <glib/guri.h>
#else
struct _GUriParamsIter {};
typedef struct _GUriParamsIter GUriParamsIter;
typedef enum {
G_URI_ERROR_FAILED,
G_URI_ERROR_BAD_SCHEME,
G_URI_ERROR_BAD_USER,
G_URI_ERROR_BAD_PASSWORD,
G_URI_ERROR_BAD_AUTH_PARAMS,
G_URI_ERROR_BAD_HOST,
G_URI_ERROR_BAD_PORT,
G_URI_ERROR_BAD_PATH,
G_URI_ERROR_BAD_QUERY,
G_URI_ERROR_BAD_FRAGMENT,
} GUriError;
typedef enum {
G_URI_FLAGS_NONE = 0,
G_URI_FLAGS_PARSE_RELAXED = 1 << 0,
G_URI_FLAGS_HAS_PASSWORD = 1 << 1,
G_URI_FLAGS_HAS_AUTH_PARAMS = 1 << 2,
G_URI_FLAGS_ENCODED = 1 << 3,
G_URI_FLAGS_NON_DNS = 1 << 4,
G_URI_FLAGS_ENCODED_QUERY = 1 << 5,
G_URI_FLAGS_ENCODED_PATH = 1 << 6,
G_URI_FLAGS_ENCODED_FRAGMENT = 1 << 7,
} GUriFlags;
typedef enum {
G_URI_PARAMS_NONE = 0,
G_URI_PARAMS_CASE_INSENSITIVE = 1 << 0,
G_URI_PARAMS_WWW_FORM = 1 << 1,
G_URI_PARAMS_PARSE_RELAXED = 1 << 2,
} GUriParamsFlags;
typedef enum {
G_URI_HIDE_NONE = 0,
G_URI_HIDE_USERINFO = 1 << 0,
G_URI_HIDE_PASSWORD = 1 << 1,
G_URI_HIDE_AUTH_PARAMS = 1 << 2,
G_URI_HIDE_QUERY = 1 << 3,
G_URI_HIDE_FRAGMENT = 1 << 4,
} GUriHideFlags;
#endif
#include <glib/gvariant.h>
#include <glib/gvarianttype.h>
#include <gio/gio.h>
#include <gio/gnetworking.h>
#if !defined(__APPLE__) || (GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION < 60)
#include <gio/gdesktopappinfo.h>
#else
#include <gio/gioenums.h>
# ifdef __APPLE__
#include <gio/gosxappinfo.h>
# endif
#endif
#include <gio/gfiledescriptorbased.h>
#include <gio/gunixconnection.h>
#include <gio/gunixcredentialsmessage.h>
#include <gio/gunixfdlist.h>
#include <gio/gunixfdmessage.h>
#include <gio/gunixinputstream.h>
#include <gio/gunixmounts.h>
#include <gio/gunixoutputstream.h>
#include <gio/gunixsocketaddress.h>
#include <gio/gsettingsbackend.h>
#ifndef G_VALUE_INTERNED_STRING
#define G_VALUE_INTERNED_STRING (1 << 28)
#endif
typedef void (*GObjectNotifyQueueDispatcher) (GObject *object, guint n_pspecs, GParamSpec **pspecs);
typedef struct _GObjectNotifyContext
{
GQuark quark_notify_queue;
GObjectNotifyQueueDispatcher dispatcher;
GTrashStack *_nqueue_trash; /* unused */
} GObjectNotifyContext;
typedef struct _GObjectNotifyQueue
{
GObjectNotifyContext *context;
GSList *pspecs;
guint16 n_pspecs;
guint16 freeze_count;
} GObjectNotifyQueue;
#ifndef __G_DESKTOP_APP_INFO_H__
struct _GDesktopAppInfoClass {};
typedef struct _GDesktopAppInfo GDesktopAppInfo;
typedef struct _GDesktopAppInfoClass GDesktopAppInfoClass;
typedef void (*GDesktopAppLaunchCallback) (GDesktopAppInfo *appinfo,
GPid pid,
gpointer user_data);
#endif
#ifndef G_VA_COPY_AS_ARRAY
#define G_VA_COPY_AS_ARRAY 1
#endif
//
// Type aliases for idiomatic Swift
//
typedef struct _GUri GURI;
typedef struct _GUriParamsIter GURIParamsIter;
typedef GUriError GURIError;
typedef GUriFlags GURIFlags;
typedef GUriParamsFlags GURIParamsFlags;
typedef GUriHideFlags GURIHideFlags;
typedef struct _GTreeNode GTreeNode;
typedef struct _GStrvBuilder GStrvBuilder;
#if GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION >= 80
extern GType g_threaded_resolver_get_type(void);
struct _GThreadedResolver {};
struct _GThreadedResolverClass
{
GResolverClass parent_class;
};
typedef struct _GThreadedResolver GThreadedResolver;
typedef struct _GThreadedResolverClass GThreadedResolverClass;
#endif