gio-unix-sys 0.22.0

FFI bindings to libgio-2.0 Unix APIs
Documentation
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
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
// This file was generated by gir (https://github.com/gtk-rs/gir)
// from gir-files (https://github.com/gtk-rs/gir-files)
// DO NOT EDIT

#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)]
#![allow(
    clippy::approx_constant,
    clippy::type_complexity,
    clippy::unreadable_literal,
    clippy::upper_case_acronyms
)]
#![cfg_attr(docsrs, feature(doc_cfg))]

use gio_sys as gio;
use glib_sys as glib;
use gobject_sys as gobject;

mod manual;

pub use manual::*;

#[allow(unused_imports)]
use libc::{FILE, intptr_t, off_t, size_t, ssize_t, time_t, uintptr_t};
#[cfg(unix)]
#[allow(unused_imports)]
use libc::{dev_t, gid_t, pid_t, socklen_t, uid_t};
#[allow(unused_imports)]
use std::ffi::{
    c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void,
};

#[allow(unused_imports)]
use glib::{GType, gboolean, gconstpointer, gpointer};

// Constants
pub const G_DESKTOP_APP_INFO_LOOKUP_EXTENSION_POINT_NAME: &[u8] = b"gio-desktop-app-info-lookup\0";

// Callbacks
pub type GDesktopAppLaunchCallback =
    Option<unsafe extern "C" fn(*mut GDesktopAppInfo, glib::GPid, gpointer)>;

// Records
#[derive(Copy, Clone)]
#[repr(C)]
pub struct GDesktopAppInfoClass {
    pub parent_class: gobject::GObjectClass,
}

impl ::std::fmt::Debug for GDesktopAppInfoClass {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("GDesktopAppInfoClass @ {self:p}"))
            .field("parent_class", &self.parent_class)
            .finish()
    }
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct GDesktopAppInfoLookupIface {
    pub g_iface: gobject::GTypeInterface,
    pub get_default_for_uri_scheme: Option<
        unsafe extern "C" fn(*mut GDesktopAppInfoLookup, *const c_char) -> *mut gio::GAppInfo,
    >,
}

impl ::std::fmt::Debug for GDesktopAppInfoLookupIface {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("GDesktopAppInfoLookupIface @ {self:p}"))
            .field("g_iface", &self.g_iface)
            .field(
                "get_default_for_uri_scheme",
                &self.get_default_for_uri_scheme,
            )
            .finish()
    }
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct GFileDescriptorBasedIface {
    pub g_iface: gobject::GTypeInterface,
    pub get_fd: Option<unsafe extern "C" fn(*mut GFileDescriptorBased) -> c_int>,
}

impl ::std::fmt::Debug for GFileDescriptorBasedIface {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("GFileDescriptorBasedIface @ {self:p}"))
            .field("g_iface", &self.g_iface)
            .field("get_fd", &self.get_fd)
            .finish()
    }
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct GUnixFDMessageClass {
    pub parent_class: gio::GSocketControlMessageClass,
    pub _g_reserved1: Option<unsafe extern "C" fn()>,
    pub _g_reserved2: Option<unsafe extern "C" fn()>,
}

impl ::std::fmt::Debug for GUnixFDMessageClass {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("GUnixFDMessageClass @ {self:p}"))
            .field("parent_class", &self.parent_class)
            .field("_g_reserved1", &self._g_reserved1)
            .field("_g_reserved2", &self._g_reserved2)
            .finish()
    }
}

#[repr(C)]
#[allow(dead_code)]
pub struct _GUnixFDMessagePrivate {
    _data: [u8; 0],
    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}

pub type GUnixFDMessagePrivate = _GUnixFDMessagePrivate;

#[derive(Copy, Clone)]
#[repr(C)]
pub struct GUnixInputStreamClass {
    pub parent_class: gio::GInputStreamClass,
    pub _g_reserved1: Option<unsafe extern "C" fn()>,
    pub _g_reserved2: Option<unsafe extern "C" fn()>,
    pub _g_reserved3: Option<unsafe extern "C" fn()>,
    pub _g_reserved4: Option<unsafe extern "C" fn()>,
    pub _g_reserved5: Option<unsafe extern "C" fn()>,
}

impl ::std::fmt::Debug for GUnixInputStreamClass {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("GUnixInputStreamClass @ {self:p}"))
            .field("parent_class", &self.parent_class)
            .field("_g_reserved1", &self._g_reserved1)
            .field("_g_reserved2", &self._g_reserved2)
            .field("_g_reserved3", &self._g_reserved3)
            .field("_g_reserved4", &self._g_reserved4)
            .field("_g_reserved5", &self._g_reserved5)
            .finish()
    }
}

#[repr(C)]
#[allow(dead_code)]
pub struct _GUnixInputStreamPrivate {
    _data: [u8; 0],
    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}

pub type GUnixInputStreamPrivate = _GUnixInputStreamPrivate;

#[repr(C)]
#[allow(dead_code)]
pub struct GUnixMountEntry {
    _data: [u8; 0],
    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}

impl ::std::fmt::Debug for GUnixMountEntry {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("GUnixMountEntry @ {self:p}"))
            .finish()
    }
}

#[repr(C)]
#[allow(dead_code)]
pub struct _GUnixMountMonitorClass {
    _data: [u8; 0],
    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}

pub type GUnixMountMonitorClass = _GUnixMountMonitorClass;

#[repr(C)]
#[allow(dead_code)]
pub struct GUnixMountPoint {
    _data: [u8; 0],
    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}

impl ::std::fmt::Debug for GUnixMountPoint {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("GUnixMountPoint @ {self:p}"))
            .finish()
    }
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct GUnixOutputStreamClass {
    pub parent_class: gio::GOutputStreamClass,
    pub _g_reserved1: Option<unsafe extern "C" fn()>,
    pub _g_reserved2: Option<unsafe extern "C" fn()>,
    pub _g_reserved3: Option<unsafe extern "C" fn()>,
    pub _g_reserved4: Option<unsafe extern "C" fn()>,
    pub _g_reserved5: Option<unsafe extern "C" fn()>,
}

impl ::std::fmt::Debug for GUnixOutputStreamClass {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("GUnixOutputStreamClass @ {self:p}"))
            .field("parent_class", &self.parent_class)
            .field("_g_reserved1", &self._g_reserved1)
            .field("_g_reserved2", &self._g_reserved2)
            .field("_g_reserved3", &self._g_reserved3)
            .field("_g_reserved4", &self._g_reserved4)
            .field("_g_reserved5", &self._g_reserved5)
            .finish()
    }
}

#[repr(C)]
#[allow(dead_code)]
pub struct _GUnixOutputStreamPrivate {
    _data: [u8; 0],
    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}

pub type GUnixOutputStreamPrivate = _GUnixOutputStreamPrivate;

// Classes
#[repr(C)]
#[allow(dead_code)]
pub struct GDesktopAppInfo {
    _data: [u8; 0],
    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}

impl ::std::fmt::Debug for GDesktopAppInfo {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("GDesktopAppInfo @ {self:p}"))
            .finish()
    }
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct GUnixFDMessage {
    pub parent_instance: gio::GSocketControlMessage,
    pub priv_: *mut GUnixFDMessagePrivate,
}

impl ::std::fmt::Debug for GUnixFDMessage {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("GUnixFDMessage @ {self:p}"))
            .field("parent_instance", &self.parent_instance)
            .field("priv_", &self.priv_)
            .finish()
    }
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct GUnixInputStream {
    pub parent_instance: gio::GInputStream,
    pub priv_: *mut GUnixInputStreamPrivate,
}

impl ::std::fmt::Debug for GUnixInputStream {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("GUnixInputStream @ {self:p}"))
            .field("parent_instance", &self.parent_instance)
            .finish()
    }
}

#[repr(C)]
#[allow(dead_code)]
pub struct GUnixMountMonitor {
    _data: [u8; 0],
    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}

impl ::std::fmt::Debug for GUnixMountMonitor {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("GUnixMountMonitor @ {self:p}"))
            .finish()
    }
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct GUnixOutputStream {
    pub parent_instance: gio::GOutputStream,
    pub priv_: *mut GUnixOutputStreamPrivate,
}

impl ::std::fmt::Debug for GUnixOutputStream {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("GUnixOutputStream @ {self:p}"))
            .field("parent_instance", &self.parent_instance)
            .finish()
    }
}

// Interfaces
#[repr(C)]
#[allow(dead_code)]
pub struct GDesktopAppInfoLookup {
    _data: [u8; 0],
    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}

impl ::std::fmt::Debug for GDesktopAppInfoLookup {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        write!(f, "GDesktopAppInfoLookup @ {self:p}")
    }
}

#[repr(C)]
#[allow(dead_code)]
pub struct GFileDescriptorBased {
    _data: [u8; 0],
    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}

impl ::std::fmt::Debug for GFileDescriptorBased {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        write!(f, "GFileDescriptorBased @ {self:p}")
    }
}

unsafe extern "C" {

    //=========================================================================
    // GUnixMountEntry
    //=========================================================================
    pub fn g_unix_mount_entry_get_type() -> GType;
    #[cfg(feature = "v2_84")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))]
    pub fn g_unix_mount_entry_compare(
        mount1: *mut GUnixMountEntry,
        mount2: *mut GUnixMountEntry,
    ) -> c_int;
    #[cfg(feature = "v2_84")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))]
    pub fn g_unix_mount_entry_free(mount_entry: *mut GUnixMountEntry);
    #[cfg(feature = "v2_84")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))]
    pub fn g_unix_mount_entry_get_device_path(mount_entry: *mut GUnixMountEntry) -> *const c_char;
    #[cfg(feature = "v2_84")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))]
    pub fn g_unix_mount_entry_get_fs_type(mount_entry: *mut GUnixMountEntry) -> *const c_char;
    #[cfg(feature = "v2_84")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))]
    pub fn g_unix_mount_entry_get_mount_path(mount_entry: *mut GUnixMountEntry) -> *const c_char;
    #[cfg(feature = "v2_84")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))]
    pub fn g_unix_mount_entry_get_options(mount_entry: *mut GUnixMountEntry) -> *const c_char;
    #[cfg(feature = "v2_84")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))]
    pub fn g_unix_mount_entry_get_root_path(mount_entry: *mut GUnixMountEntry) -> *const c_char;
    #[cfg(feature = "v2_84")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))]
    pub fn g_unix_mount_entry_guess_can_eject(mount_entry: *mut GUnixMountEntry) -> gboolean;
    #[cfg(feature = "v2_84")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))]
    pub fn g_unix_mount_entry_guess_icon(mount_entry: *mut GUnixMountEntry) -> *mut gio::GIcon;
    #[cfg(feature = "v2_84")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))]
    pub fn g_unix_mount_entry_guess_name(mount_entry: *mut GUnixMountEntry) -> *mut c_char;
    #[cfg(feature = "v2_84")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))]
    pub fn g_unix_mount_entry_guess_should_display(mount_entry: *mut GUnixMountEntry) -> gboolean;
    #[cfg(feature = "v2_84")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))]
    pub fn g_unix_mount_entry_guess_symbolic_icon(
        mount_entry: *mut GUnixMountEntry,
    ) -> *mut gio::GIcon;
    #[cfg(feature = "v2_84")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))]
    pub fn g_unix_mount_entry_is_readonly(mount_entry: *mut GUnixMountEntry) -> gboolean;
    #[cfg(feature = "v2_84")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))]
    pub fn g_unix_mount_entry_is_system_internal(mount_entry: *mut GUnixMountEntry) -> gboolean;
    #[cfg(feature = "v2_84")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))]
    pub fn g_unix_mount_entry_at(
        mount_path: *const c_char,
        time_read: *mut u64,
    ) -> *mut GUnixMountEntry;
    #[cfg(feature = "v2_84")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))]
    pub fn g_unix_mount_entry_for(
        file_path: *const c_char,
        time_read: *mut u64,
    ) -> *mut GUnixMountEntry;

    //=========================================================================
    // GUnixMountPoint
    //=========================================================================
    pub fn g_unix_mount_point_get_type() -> GType;
    pub fn g_unix_mount_point_compare(
        mount1: *mut GUnixMountPoint,
        mount2: *mut GUnixMountPoint,
    ) -> c_int;
    pub fn g_unix_mount_point_free(mount_point: *mut GUnixMountPoint);
    pub fn g_unix_mount_point_get_device_path(mount_point: *mut GUnixMountPoint) -> *const c_char;
    pub fn g_unix_mount_point_get_fs_type(mount_point: *mut GUnixMountPoint) -> *const c_char;
    pub fn g_unix_mount_point_get_mount_path(mount_point: *mut GUnixMountPoint) -> *const c_char;
    pub fn g_unix_mount_point_get_options(mount_point: *mut GUnixMountPoint) -> *const c_char;
    pub fn g_unix_mount_point_guess_can_eject(mount_point: *mut GUnixMountPoint) -> gboolean;
    pub fn g_unix_mount_point_guess_icon(mount_point: *mut GUnixMountPoint) -> *mut gio::GIcon;
    pub fn g_unix_mount_point_guess_name(mount_point: *mut GUnixMountPoint) -> *mut c_char;
    pub fn g_unix_mount_point_guess_symbolic_icon(
        mount_point: *mut GUnixMountPoint,
    ) -> *mut gio::GIcon;
    pub fn g_unix_mount_point_is_loopback(mount_point: *mut GUnixMountPoint) -> gboolean;
    pub fn g_unix_mount_point_is_readonly(mount_point: *mut GUnixMountPoint) -> gboolean;
    pub fn g_unix_mount_point_is_user_mountable(mount_point: *mut GUnixMountPoint) -> gboolean;
    #[cfg(feature = "v2_66")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))]
    pub fn g_unix_mount_point_at(
        mount_path: *const c_char,
        time_read: *mut u64,
    ) -> *mut GUnixMountPoint;

    //=========================================================================
    // GDesktopAppInfo
    //=========================================================================
    pub fn g_desktop_app_info_get_type() -> GType;
    pub fn g_desktop_app_info_new(desktop_id: *const c_char) -> *mut GDesktopAppInfo;
    pub fn g_desktop_app_info_new_from_filename(filename: *const c_char) -> *mut GDesktopAppInfo;
    pub fn g_desktop_app_info_new_from_keyfile(
        key_file: *mut glib::GKeyFile,
    ) -> *mut GDesktopAppInfo;
    pub fn g_desktop_app_info_get_implementations(interface: *const c_char) -> *mut glib::GList;
    pub fn g_desktop_app_info_search(search_string: *const c_char) -> *mut *mut *mut c_char;
    pub fn g_desktop_app_info_set_desktop_env(desktop_env: *const c_char);
    pub fn g_desktop_app_info_get_action_name(
        info: *mut GDesktopAppInfo,
        action_name: *const c_char,
    ) -> *mut c_char;
    pub fn g_desktop_app_info_get_boolean(
        info: *mut GDesktopAppInfo,
        key: *const c_char,
    ) -> gboolean;
    pub fn g_desktop_app_info_get_categories(info: *mut GDesktopAppInfo) -> *const c_char;
    pub fn g_desktop_app_info_get_filename(info: *mut GDesktopAppInfo) -> *const c_char;
    pub fn g_desktop_app_info_get_generic_name(info: *mut GDesktopAppInfo) -> *const c_char;
    pub fn g_desktop_app_info_get_is_hidden(info: *mut GDesktopAppInfo) -> gboolean;
    pub fn g_desktop_app_info_get_keywords(info: *mut GDesktopAppInfo) -> *const *const c_char;
    pub fn g_desktop_app_info_get_locale_string(
        info: *mut GDesktopAppInfo,
        key: *const c_char,
    ) -> *mut c_char;
    pub fn g_desktop_app_info_get_nodisplay(info: *mut GDesktopAppInfo) -> gboolean;
    pub fn g_desktop_app_info_get_show_in(
        info: *mut GDesktopAppInfo,
        desktop_env: *const c_char,
    ) -> gboolean;
    pub fn g_desktop_app_info_get_startup_wm_class(info: *mut GDesktopAppInfo) -> *const c_char;
    pub fn g_desktop_app_info_get_string(
        info: *mut GDesktopAppInfo,
        key: *const c_char,
    ) -> *mut c_char;
    #[cfg(feature = "v2_60")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))]
    pub fn g_desktop_app_info_get_string_list(
        info: *mut GDesktopAppInfo,
        key: *const c_char,
        length: *mut size_t,
    ) -> *mut *mut c_char;
    pub fn g_desktop_app_info_has_key(info: *mut GDesktopAppInfo, key: *const c_char) -> gboolean;
    pub fn g_desktop_app_info_launch_action(
        info: *mut GDesktopAppInfo,
        action_name: *const c_char,
        launch_context: *mut gio::GAppLaunchContext,
    );
    pub fn g_desktop_app_info_launch_uris_as_manager(
        appinfo: *mut GDesktopAppInfo,
        uris: *mut glib::GList,
        launch_context: *mut gio::GAppLaunchContext,
        spawn_flags: glib::GSpawnFlags,
        user_setup: glib::GSpawnChildSetupFunc,
        user_setup_data: gpointer,
        pid_callback: GDesktopAppLaunchCallback,
        pid_callback_data: gpointer,
        error: *mut *mut glib::GError,
    ) -> gboolean;
    #[cfg(feature = "v2_58")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v2_58")))]
    pub fn g_desktop_app_info_launch_uris_as_manager_with_fds(
        appinfo: *mut GDesktopAppInfo,
        uris: *mut glib::GList,
        launch_context: *mut gio::GAppLaunchContext,
        spawn_flags: glib::GSpawnFlags,
        user_setup: glib::GSpawnChildSetupFunc,
        user_setup_data: gpointer,
        pid_callback: GDesktopAppLaunchCallback,
        pid_callback_data: gpointer,
        stdin_fd: c_int,
        stdout_fd: c_int,
        stderr_fd: c_int,
        error: *mut *mut glib::GError,
    ) -> gboolean;
    pub fn g_desktop_app_info_list_actions(info: *mut GDesktopAppInfo) -> *const *const c_char;

    //=========================================================================
    // GUnixFDMessage
    //=========================================================================
    pub fn g_unix_fd_message_get_type() -> GType;
    pub fn g_unix_fd_message_new() -> *mut gio::GSocketControlMessage;
    pub fn g_unix_fd_message_new_with_fd_list(
        fd_list: *mut gio::GUnixFDList,
    ) -> *mut gio::GSocketControlMessage;
    pub fn g_unix_fd_message_append_fd(
        message: *mut GUnixFDMessage,
        fd: c_int,
        error: *mut *mut glib::GError,
    ) -> gboolean;
    pub fn g_unix_fd_message_get_fd_list(message: *mut GUnixFDMessage) -> *mut gio::GUnixFDList;
    pub fn g_unix_fd_message_steal_fds(
        message: *mut GUnixFDMessage,
        length: *mut c_int,
    ) -> *mut c_int;

    //=========================================================================
    // GUnixInputStream
    //=========================================================================
    pub fn g_unix_input_stream_get_type() -> GType;
    pub fn g_unix_input_stream_new(fd: c_int, close_fd: gboolean) -> *mut gio::GInputStream;
    pub fn g_unix_input_stream_get_close_fd(stream: *mut GUnixInputStream) -> gboolean;
    pub fn g_unix_input_stream_get_fd(stream: *mut GUnixInputStream) -> c_int;
    pub fn g_unix_input_stream_set_close_fd(stream: *mut GUnixInputStream, close_fd: gboolean);

    //=========================================================================
    // GUnixMountMonitor
    //=========================================================================
    pub fn g_unix_mount_monitor_get_type() -> GType;
    pub fn g_unix_mount_monitor_new() -> *mut GUnixMountMonitor;
    pub fn g_unix_mount_monitor_get() -> *mut GUnixMountMonitor;
    pub fn g_unix_mount_monitor_set_rate_limit(
        mount_monitor: *mut GUnixMountMonitor,
        limit_msec: c_int,
    );

    //=========================================================================
    // GUnixOutputStream
    //=========================================================================
    pub fn g_unix_output_stream_get_type() -> GType;
    pub fn g_unix_output_stream_new(fd: c_int, close_fd: gboolean) -> *mut gio::GOutputStream;
    pub fn g_unix_output_stream_get_close_fd(stream: *mut GUnixOutputStream) -> gboolean;
    pub fn g_unix_output_stream_get_fd(stream: *mut GUnixOutputStream) -> c_int;
    pub fn g_unix_output_stream_set_close_fd(stream: *mut GUnixOutputStream, close_fd: gboolean);

    //=========================================================================
    // GDesktopAppInfoLookup
    //=========================================================================
    pub fn g_desktop_app_info_lookup_get_type() -> GType;
    pub fn g_desktop_app_info_lookup_get_default_for_uri_scheme(
        lookup: *mut GDesktopAppInfoLookup,
        uri_scheme: *const c_char,
    ) -> *mut gio::GAppInfo;

    //=========================================================================
    // GFileDescriptorBased
    //=========================================================================
    pub fn g_file_descriptor_based_get_type() -> GType;
    pub fn g_file_descriptor_based_get_fd(fd_based: *mut GFileDescriptorBased) -> c_int;

    //=========================================================================
    // Other functions
    //=========================================================================
    pub fn g_unix_is_mount_path_system_internal(mount_path: *const c_char) -> gboolean;
    pub fn g_unix_is_system_device_path(device_path: *const c_char) -> gboolean;
    pub fn g_unix_is_system_fs_type(fs_type: *const c_char) -> gboolean;
    pub fn g_unix_mount_at(mount_path: *const c_char, time_read: *mut u64) -> *mut GUnixMountEntry;
    pub fn g_unix_mount_compare(
        mount1: *mut GUnixMountEntry,
        mount2: *mut GUnixMountEntry,
    ) -> c_int;
    pub fn g_unix_mount_copy(mount_entry: *mut GUnixMountEntry) -> *mut GUnixMountEntry;
    pub fn g_unix_mount_entries_changed_since(time: u64) -> gboolean;
    #[cfg(feature = "v2_84")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))]
    pub fn g_unix_mount_entries_get(time_read: *mut u64) -> *mut glib::GList;
    #[cfg(feature = "v2_84")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))]
    pub fn g_unix_mount_entries_get_from_file(
        table_path: *const c_char,
        time_read_out: *mut u64,
        n_entries_out: *mut size_t,
    ) -> *mut *mut GUnixMountEntry;
    pub fn g_unix_mount_for(file_path: *const c_char, time_read: *mut u64) -> *mut GUnixMountEntry;
    pub fn g_unix_mount_free(mount_entry: *mut GUnixMountEntry);
    pub fn g_unix_mount_get_device_path(mount_entry: *mut GUnixMountEntry) -> *const c_char;
    pub fn g_unix_mount_get_fs_type(mount_entry: *mut GUnixMountEntry) -> *const c_char;
    pub fn g_unix_mount_get_mount_path(mount_entry: *mut GUnixMountEntry) -> *const c_char;
    #[cfg(feature = "v2_58")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v2_58")))]
    pub fn g_unix_mount_get_options(mount_entry: *mut GUnixMountEntry) -> *const c_char;
    #[cfg(feature = "v2_60")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))]
    pub fn g_unix_mount_get_root_path(mount_entry: *mut GUnixMountEntry) -> *const c_char;
    pub fn g_unix_mount_guess_can_eject(mount_entry: *mut GUnixMountEntry) -> gboolean;
    pub fn g_unix_mount_guess_icon(mount_entry: *mut GUnixMountEntry) -> *mut gio::GIcon;
    pub fn g_unix_mount_guess_name(mount_entry: *mut GUnixMountEntry) -> *mut c_char;
    pub fn g_unix_mount_guess_should_display(mount_entry: *mut GUnixMountEntry) -> gboolean;
    pub fn g_unix_mount_guess_symbolic_icon(mount_entry: *mut GUnixMountEntry) -> *mut gio::GIcon;
    pub fn g_unix_mount_is_readonly(mount_entry: *mut GUnixMountEntry) -> gboolean;
    pub fn g_unix_mount_is_system_internal(mount_entry: *mut GUnixMountEntry) -> gboolean;
    pub fn g_unix_mount_points_changed_since(time: u64) -> gboolean;
    pub fn g_unix_mount_points_get(time_read: *mut u64) -> *mut glib::GList;
    #[cfg(feature = "v2_82")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v2_82")))]
    pub fn g_unix_mount_points_get_from_file(
        table_path: *const c_char,
        time_read_out: *mut u64,
        n_points_out: *mut size_t,
    ) -> *mut *mut GUnixMountPoint;
    pub fn g_unix_mounts_changed_since(time: u64) -> gboolean;
    pub fn g_unix_mounts_get(time_read: *mut u64) -> *mut glib::GList;
    #[cfg(feature = "v2_82")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v2_82")))]
    pub fn g_unix_mounts_get_from_file(
        table_path: *const c_char,
        time_read_out: *mut u64,
        n_entries_out: *mut size_t,
    ) -> *mut *mut GUnixMountEntry;

}