gio_unix_sys/
lib.rs

1// This file was generated by gir (https://github.com/gtk-rs/gir)
2// from gir-files (https://github.com/gtk-rs/gir-files)
3// DO NOT EDIT
4
5#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)]
6#![allow(
7    clippy::approx_constant,
8    clippy::type_complexity,
9    clippy::unreadable_literal,
10    clippy::upper_case_acronyms
11)]
12#![cfg_attr(docsrs, feature(doc_cfg))]
13
14use gio_sys as gio;
15use glib_sys as glib;
16use gobject_sys as gobject;
17
18mod manual;
19
20pub use manual::*;
21
22#[cfg(unix)]
23#[allow(unused_imports)]
24use libc::{dev_t, gid_t, pid_t, socklen_t, uid_t};
25#[allow(unused_imports)]
26use libc::{intptr_t, off_t, size_t, ssize_t, time_t, uintptr_t, FILE};
27#[allow(unused_imports)]
28use std::ffi::{
29    c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void,
30};
31
32#[allow(unused_imports)]
33use glib::{gboolean, gconstpointer, gpointer, GType};
34
35// Constants
36pub const G_DESKTOP_APP_INFO_LOOKUP_EXTENSION_POINT_NAME: &[u8] = b"gio-desktop-app-info-lookup\0";
37
38// Callbacks
39pub type GDesktopAppLaunchCallback =
40    Option<unsafe extern "C" fn(*mut GDesktopAppInfo, glib::GPid, gpointer)>;
41
42// Records
43#[derive(Copy, Clone)]
44#[repr(C)]
45pub struct GDesktopAppInfoClass {
46    pub parent_class: gobject::GObjectClass,
47}
48
49impl ::std::fmt::Debug for GDesktopAppInfoClass {
50    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
51        f.debug_struct(&format!("GDesktopAppInfoClass @ {self:p}"))
52            .field("parent_class", &self.parent_class)
53            .finish()
54    }
55}
56
57#[derive(Copy, Clone)]
58#[repr(C)]
59pub struct GDesktopAppInfoLookupIface {
60    pub g_iface: gobject::GTypeInterface,
61    pub get_default_for_uri_scheme: Option<
62        unsafe extern "C" fn(*mut GDesktopAppInfoLookup, *const c_char) -> *mut gio::GAppInfo,
63    >,
64}
65
66impl ::std::fmt::Debug for GDesktopAppInfoLookupIface {
67    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
68        f.debug_struct(&format!("GDesktopAppInfoLookupIface @ {self:p}"))
69            .field("g_iface", &self.g_iface)
70            .field(
71                "get_default_for_uri_scheme",
72                &self.get_default_for_uri_scheme,
73            )
74            .finish()
75    }
76}
77
78#[derive(Copy, Clone)]
79#[repr(C)]
80pub struct GFileDescriptorBasedIface {
81    pub g_iface: gobject::GTypeInterface,
82    pub get_fd: Option<unsafe extern "C" fn(*mut GFileDescriptorBased) -> c_int>,
83}
84
85impl ::std::fmt::Debug for GFileDescriptorBasedIface {
86    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
87        f.debug_struct(&format!("GFileDescriptorBasedIface @ {self:p}"))
88            .field("g_iface", &self.g_iface)
89            .field("get_fd", &self.get_fd)
90            .finish()
91    }
92}
93
94#[derive(Copy, Clone)]
95#[repr(C)]
96pub struct GUnixFDMessageClass {
97    pub parent_class: gio::GSocketControlMessageClass,
98    pub _g_reserved1: Option<unsafe extern "C" fn()>,
99    pub _g_reserved2: Option<unsafe extern "C" fn()>,
100}
101
102impl ::std::fmt::Debug for GUnixFDMessageClass {
103    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
104        f.debug_struct(&format!("GUnixFDMessageClass @ {self:p}"))
105            .field("parent_class", &self.parent_class)
106            .field("_g_reserved1", &self._g_reserved1)
107            .field("_g_reserved2", &self._g_reserved2)
108            .finish()
109    }
110}
111
112#[repr(C)]
113#[allow(dead_code)]
114pub struct _GUnixFDMessagePrivate {
115    _data: [u8; 0],
116    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
117}
118
119pub type GUnixFDMessagePrivate = _GUnixFDMessagePrivate;
120
121#[derive(Copy, Clone)]
122#[repr(C)]
123pub struct GUnixInputStreamClass {
124    pub parent_class: gio::GInputStreamClass,
125    pub _g_reserved1: Option<unsafe extern "C" fn()>,
126    pub _g_reserved2: Option<unsafe extern "C" fn()>,
127    pub _g_reserved3: Option<unsafe extern "C" fn()>,
128    pub _g_reserved4: Option<unsafe extern "C" fn()>,
129    pub _g_reserved5: Option<unsafe extern "C" fn()>,
130}
131
132impl ::std::fmt::Debug for GUnixInputStreamClass {
133    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
134        f.debug_struct(&format!("GUnixInputStreamClass @ {self:p}"))
135            .field("parent_class", &self.parent_class)
136            .field("_g_reserved1", &self._g_reserved1)
137            .field("_g_reserved2", &self._g_reserved2)
138            .field("_g_reserved3", &self._g_reserved3)
139            .field("_g_reserved4", &self._g_reserved4)
140            .field("_g_reserved5", &self._g_reserved5)
141            .finish()
142    }
143}
144
145#[repr(C)]
146#[allow(dead_code)]
147pub struct _GUnixInputStreamPrivate {
148    _data: [u8; 0],
149    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
150}
151
152pub type GUnixInputStreamPrivate = _GUnixInputStreamPrivate;
153
154#[repr(C)]
155#[allow(dead_code)]
156pub struct GUnixMountEntry {
157    _data: [u8; 0],
158    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
159}
160
161impl ::std::fmt::Debug for GUnixMountEntry {
162    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
163        f.debug_struct(&format!("GUnixMountEntry @ {self:p}"))
164            .finish()
165    }
166}
167
168#[repr(C)]
169#[allow(dead_code)]
170pub struct _GUnixMountMonitorClass {
171    _data: [u8; 0],
172    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
173}
174
175pub type GUnixMountMonitorClass = _GUnixMountMonitorClass;
176
177#[repr(C)]
178#[allow(dead_code)]
179pub struct GUnixMountPoint {
180    _data: [u8; 0],
181    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
182}
183
184impl ::std::fmt::Debug for GUnixMountPoint {
185    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
186        f.debug_struct(&format!("GUnixMountPoint @ {self:p}"))
187            .finish()
188    }
189}
190
191#[derive(Copy, Clone)]
192#[repr(C)]
193pub struct GUnixOutputStreamClass {
194    pub parent_class: gio::GOutputStreamClass,
195    pub _g_reserved1: Option<unsafe extern "C" fn()>,
196    pub _g_reserved2: Option<unsafe extern "C" fn()>,
197    pub _g_reserved3: Option<unsafe extern "C" fn()>,
198    pub _g_reserved4: Option<unsafe extern "C" fn()>,
199    pub _g_reserved5: Option<unsafe extern "C" fn()>,
200}
201
202impl ::std::fmt::Debug for GUnixOutputStreamClass {
203    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
204        f.debug_struct(&format!("GUnixOutputStreamClass @ {self:p}"))
205            .field("parent_class", &self.parent_class)
206            .field("_g_reserved1", &self._g_reserved1)
207            .field("_g_reserved2", &self._g_reserved2)
208            .field("_g_reserved3", &self._g_reserved3)
209            .field("_g_reserved4", &self._g_reserved4)
210            .field("_g_reserved5", &self._g_reserved5)
211            .finish()
212    }
213}
214
215#[repr(C)]
216#[allow(dead_code)]
217pub struct _GUnixOutputStreamPrivate {
218    _data: [u8; 0],
219    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
220}
221
222pub type GUnixOutputStreamPrivate = _GUnixOutputStreamPrivate;
223
224// Classes
225#[repr(C)]
226#[allow(dead_code)]
227pub struct GDesktopAppInfo {
228    _data: [u8; 0],
229    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
230}
231
232impl ::std::fmt::Debug for GDesktopAppInfo {
233    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
234        f.debug_struct(&format!("GDesktopAppInfo @ {self:p}"))
235            .finish()
236    }
237}
238
239#[derive(Copy, Clone)]
240#[repr(C)]
241pub struct GUnixFDMessage {
242    pub parent_instance: gio::GSocketControlMessage,
243    pub priv_: *mut GUnixFDMessagePrivate,
244}
245
246impl ::std::fmt::Debug for GUnixFDMessage {
247    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
248        f.debug_struct(&format!("GUnixFDMessage @ {self:p}"))
249            .field("parent_instance", &self.parent_instance)
250            .field("priv_", &self.priv_)
251            .finish()
252    }
253}
254
255#[derive(Copy, Clone)]
256#[repr(C)]
257pub struct GUnixInputStream {
258    pub parent_instance: gio::GInputStream,
259    pub priv_: *mut GUnixInputStreamPrivate,
260}
261
262impl ::std::fmt::Debug for GUnixInputStream {
263    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
264        f.debug_struct(&format!("GUnixInputStream @ {self:p}"))
265            .field("parent_instance", &self.parent_instance)
266            .finish()
267    }
268}
269
270#[repr(C)]
271#[allow(dead_code)]
272pub struct GUnixMountMonitor {
273    _data: [u8; 0],
274    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
275}
276
277impl ::std::fmt::Debug for GUnixMountMonitor {
278    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
279        f.debug_struct(&format!("GUnixMountMonitor @ {self:p}"))
280            .finish()
281    }
282}
283
284#[derive(Copy, Clone)]
285#[repr(C)]
286pub struct GUnixOutputStream {
287    pub parent_instance: gio::GOutputStream,
288    pub priv_: *mut GUnixOutputStreamPrivate,
289}
290
291impl ::std::fmt::Debug for GUnixOutputStream {
292    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
293        f.debug_struct(&format!("GUnixOutputStream @ {self:p}"))
294            .field("parent_instance", &self.parent_instance)
295            .finish()
296    }
297}
298
299// Interfaces
300#[repr(C)]
301#[allow(dead_code)]
302pub struct GDesktopAppInfoLookup {
303    _data: [u8; 0],
304    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
305}
306
307impl ::std::fmt::Debug for GDesktopAppInfoLookup {
308    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
309        write!(f, "GDesktopAppInfoLookup @ {self:p}")
310    }
311}
312
313#[repr(C)]
314#[allow(dead_code)]
315pub struct GFileDescriptorBased {
316    _data: [u8; 0],
317    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
318}
319
320impl ::std::fmt::Debug for GFileDescriptorBased {
321    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
322        write!(f, "GFileDescriptorBased @ {self:p}")
323    }
324}
325
326extern "C" {
327
328    //=========================================================================
329    // GUnixMountEntry
330    //=========================================================================
331    pub fn g_unix_mount_entry_get_type() -> GType;
332    #[cfg(feature = "v2_84")]
333    #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))]
334    pub fn g_unix_mount_entry_compare(
335        mount1: *mut GUnixMountEntry,
336        mount2: *mut GUnixMountEntry,
337    ) -> c_int;
338    #[cfg(feature = "v2_84")]
339    #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))]
340    pub fn g_unix_mount_entry_free(mount_entry: *mut GUnixMountEntry);
341    #[cfg(feature = "v2_84")]
342    #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))]
343    pub fn g_unix_mount_entry_get_device_path(mount_entry: *mut GUnixMountEntry) -> *const c_char;
344    #[cfg(feature = "v2_84")]
345    #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))]
346    pub fn g_unix_mount_entry_get_fs_type(mount_entry: *mut GUnixMountEntry) -> *const c_char;
347    #[cfg(feature = "v2_84")]
348    #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))]
349    pub fn g_unix_mount_entry_get_mount_path(mount_entry: *mut GUnixMountEntry) -> *const c_char;
350    #[cfg(feature = "v2_84")]
351    #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))]
352    pub fn g_unix_mount_entry_get_options(mount_entry: *mut GUnixMountEntry) -> *const c_char;
353    #[cfg(feature = "v2_84")]
354    #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))]
355    pub fn g_unix_mount_entry_get_root_path(mount_entry: *mut GUnixMountEntry) -> *const c_char;
356    #[cfg(feature = "v2_84")]
357    #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))]
358    pub fn g_unix_mount_entry_guess_can_eject(mount_entry: *mut GUnixMountEntry) -> gboolean;
359    #[cfg(feature = "v2_84")]
360    #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))]
361    pub fn g_unix_mount_entry_guess_icon(mount_entry: *mut GUnixMountEntry) -> *mut gio::GIcon;
362    #[cfg(feature = "v2_84")]
363    #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))]
364    pub fn g_unix_mount_entry_guess_name(mount_entry: *mut GUnixMountEntry) -> *mut c_char;
365    #[cfg(feature = "v2_84")]
366    #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))]
367    pub fn g_unix_mount_entry_guess_should_display(mount_entry: *mut GUnixMountEntry) -> gboolean;
368    #[cfg(feature = "v2_84")]
369    #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))]
370    pub fn g_unix_mount_entry_guess_symbolic_icon(
371        mount_entry: *mut GUnixMountEntry,
372    ) -> *mut gio::GIcon;
373    #[cfg(feature = "v2_84")]
374    #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))]
375    pub fn g_unix_mount_entry_is_readonly(mount_entry: *mut GUnixMountEntry) -> gboolean;
376    #[cfg(feature = "v2_84")]
377    #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))]
378    pub fn g_unix_mount_entry_is_system_internal(mount_entry: *mut GUnixMountEntry) -> gboolean;
379    #[cfg(feature = "v2_84")]
380    #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))]
381    pub fn g_unix_mount_entry_at(
382        mount_path: *const c_char,
383        time_read: *mut u64,
384    ) -> *mut GUnixMountEntry;
385    #[cfg(feature = "v2_84")]
386    #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))]
387    pub fn g_unix_mount_entry_for(
388        file_path: *const c_char,
389        time_read: *mut u64,
390    ) -> *mut GUnixMountEntry;
391
392    //=========================================================================
393    // GUnixMountPoint
394    //=========================================================================
395    pub fn g_unix_mount_point_get_type() -> GType;
396    pub fn g_unix_mount_point_compare(
397        mount1: *mut GUnixMountPoint,
398        mount2: *mut GUnixMountPoint,
399    ) -> c_int;
400    pub fn g_unix_mount_point_free(mount_point: *mut GUnixMountPoint);
401    pub fn g_unix_mount_point_get_device_path(mount_point: *mut GUnixMountPoint) -> *const c_char;
402    pub fn g_unix_mount_point_get_fs_type(mount_point: *mut GUnixMountPoint) -> *const c_char;
403    pub fn g_unix_mount_point_get_mount_path(mount_point: *mut GUnixMountPoint) -> *const c_char;
404    pub fn g_unix_mount_point_get_options(mount_point: *mut GUnixMountPoint) -> *const c_char;
405    pub fn g_unix_mount_point_guess_can_eject(mount_point: *mut GUnixMountPoint) -> gboolean;
406    pub fn g_unix_mount_point_guess_icon(mount_point: *mut GUnixMountPoint) -> *mut gio::GIcon;
407    pub fn g_unix_mount_point_guess_name(mount_point: *mut GUnixMountPoint) -> *mut c_char;
408    pub fn g_unix_mount_point_guess_symbolic_icon(
409        mount_point: *mut GUnixMountPoint,
410    ) -> *mut gio::GIcon;
411    pub fn g_unix_mount_point_is_loopback(mount_point: *mut GUnixMountPoint) -> gboolean;
412    pub fn g_unix_mount_point_is_readonly(mount_point: *mut GUnixMountPoint) -> gboolean;
413    pub fn g_unix_mount_point_is_user_mountable(mount_point: *mut GUnixMountPoint) -> gboolean;
414    #[cfg(feature = "v2_66")]
415    #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))]
416    pub fn g_unix_mount_point_at(
417        mount_path: *const c_char,
418        time_read: *mut u64,
419    ) -> *mut GUnixMountPoint;
420
421    //=========================================================================
422    // GDesktopAppInfo
423    //=========================================================================
424    pub fn g_desktop_app_info_get_type() -> GType;
425    pub fn g_desktop_app_info_new(desktop_id: *const c_char) -> *mut GDesktopAppInfo;
426    pub fn g_desktop_app_info_new_from_filename(filename: *const c_char) -> *mut GDesktopAppInfo;
427    pub fn g_desktop_app_info_new_from_keyfile(
428        key_file: *mut glib::GKeyFile,
429    ) -> *mut GDesktopAppInfo;
430    pub fn g_desktop_app_info_get_implementations(interface: *const c_char) -> *mut glib::GList;
431    pub fn g_desktop_app_info_search(search_string: *const c_char) -> *mut *mut *mut c_char;
432    pub fn g_desktop_app_info_set_desktop_env(desktop_env: *const c_char);
433    pub fn g_desktop_app_info_get_action_name(
434        info: *mut GDesktopAppInfo,
435        action_name: *const c_char,
436    ) -> *mut c_char;
437    pub fn g_desktop_app_info_get_boolean(
438        info: *mut GDesktopAppInfo,
439        key: *const c_char,
440    ) -> gboolean;
441    pub fn g_desktop_app_info_get_categories(info: *mut GDesktopAppInfo) -> *const c_char;
442    pub fn g_desktop_app_info_get_filename(info: *mut GDesktopAppInfo) -> *const c_char;
443    pub fn g_desktop_app_info_get_generic_name(info: *mut GDesktopAppInfo) -> *const c_char;
444    pub fn g_desktop_app_info_get_is_hidden(info: *mut GDesktopAppInfo) -> gboolean;
445    pub fn g_desktop_app_info_get_keywords(info: *mut GDesktopAppInfo) -> *const *const c_char;
446    pub fn g_desktop_app_info_get_locale_string(
447        info: *mut GDesktopAppInfo,
448        key: *const c_char,
449    ) -> *mut c_char;
450    pub fn g_desktop_app_info_get_nodisplay(info: *mut GDesktopAppInfo) -> gboolean;
451    pub fn g_desktop_app_info_get_show_in(
452        info: *mut GDesktopAppInfo,
453        desktop_env: *const c_char,
454    ) -> gboolean;
455    pub fn g_desktop_app_info_get_startup_wm_class(info: *mut GDesktopAppInfo) -> *const c_char;
456    pub fn g_desktop_app_info_get_string(
457        info: *mut GDesktopAppInfo,
458        key: *const c_char,
459    ) -> *mut c_char;
460    #[cfg(feature = "v2_60")]
461    #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))]
462    pub fn g_desktop_app_info_get_string_list(
463        info: *mut GDesktopAppInfo,
464        key: *const c_char,
465        length: *mut size_t,
466    ) -> *mut *mut c_char;
467    pub fn g_desktop_app_info_has_key(info: *mut GDesktopAppInfo, key: *const c_char) -> gboolean;
468    pub fn g_desktop_app_info_launch_action(
469        info: *mut GDesktopAppInfo,
470        action_name: *const c_char,
471        launch_context: *mut gio::GAppLaunchContext,
472    );
473    pub fn g_desktop_app_info_launch_uris_as_manager(
474        appinfo: *mut GDesktopAppInfo,
475        uris: *mut glib::GList,
476        launch_context: *mut gio::GAppLaunchContext,
477        spawn_flags: glib::GSpawnFlags,
478        user_setup: glib::GSpawnChildSetupFunc,
479        user_setup_data: gpointer,
480        pid_callback: GDesktopAppLaunchCallback,
481        pid_callback_data: gpointer,
482        error: *mut *mut glib::GError,
483    ) -> gboolean;
484    #[cfg(feature = "v2_58")]
485    #[cfg_attr(docsrs, doc(cfg(feature = "v2_58")))]
486    pub fn g_desktop_app_info_launch_uris_as_manager_with_fds(
487        appinfo: *mut GDesktopAppInfo,
488        uris: *mut glib::GList,
489        launch_context: *mut gio::GAppLaunchContext,
490        spawn_flags: glib::GSpawnFlags,
491        user_setup: glib::GSpawnChildSetupFunc,
492        user_setup_data: gpointer,
493        pid_callback: GDesktopAppLaunchCallback,
494        pid_callback_data: gpointer,
495        stdin_fd: c_int,
496        stdout_fd: c_int,
497        stderr_fd: c_int,
498        error: *mut *mut glib::GError,
499    ) -> gboolean;
500    pub fn g_desktop_app_info_list_actions(info: *mut GDesktopAppInfo) -> *const *const c_char;
501
502    //=========================================================================
503    // GUnixFDMessage
504    //=========================================================================
505    pub fn g_unix_fd_message_get_type() -> GType;
506    pub fn g_unix_fd_message_new() -> *mut gio::GSocketControlMessage;
507    pub fn g_unix_fd_message_new_with_fd_list(
508        fd_list: *mut gio::GUnixFDList,
509    ) -> *mut gio::GSocketControlMessage;
510    pub fn g_unix_fd_message_append_fd(
511        message: *mut GUnixFDMessage,
512        fd: c_int,
513        error: *mut *mut glib::GError,
514    ) -> gboolean;
515    pub fn g_unix_fd_message_get_fd_list(message: *mut GUnixFDMessage) -> *mut gio::GUnixFDList;
516    pub fn g_unix_fd_message_steal_fds(
517        message: *mut GUnixFDMessage,
518        length: *mut c_int,
519    ) -> *mut c_int;
520
521    //=========================================================================
522    // GUnixInputStream
523    //=========================================================================
524    pub fn g_unix_input_stream_get_type() -> GType;
525    pub fn g_unix_input_stream_new(fd: c_int, close_fd: gboolean) -> *mut gio::GInputStream;
526    pub fn g_unix_input_stream_get_close_fd(stream: *mut GUnixInputStream) -> gboolean;
527    pub fn g_unix_input_stream_get_fd(stream: *mut GUnixInputStream) -> c_int;
528    pub fn g_unix_input_stream_set_close_fd(stream: *mut GUnixInputStream, close_fd: gboolean);
529
530    //=========================================================================
531    // GUnixMountMonitor
532    //=========================================================================
533    pub fn g_unix_mount_monitor_get_type() -> GType;
534    pub fn g_unix_mount_monitor_new() -> *mut GUnixMountMonitor;
535    pub fn g_unix_mount_monitor_get() -> *mut GUnixMountMonitor;
536    pub fn g_unix_mount_monitor_set_rate_limit(
537        mount_monitor: *mut GUnixMountMonitor,
538        limit_msec: c_int,
539    );
540
541    //=========================================================================
542    // GUnixOutputStream
543    //=========================================================================
544    pub fn g_unix_output_stream_get_type() -> GType;
545    pub fn g_unix_output_stream_new(fd: c_int, close_fd: gboolean) -> *mut gio::GOutputStream;
546    pub fn g_unix_output_stream_get_close_fd(stream: *mut GUnixOutputStream) -> gboolean;
547    pub fn g_unix_output_stream_get_fd(stream: *mut GUnixOutputStream) -> c_int;
548    pub fn g_unix_output_stream_set_close_fd(stream: *mut GUnixOutputStream, close_fd: gboolean);
549
550    //=========================================================================
551    // GDesktopAppInfoLookup
552    //=========================================================================
553    pub fn g_desktop_app_info_lookup_get_type() -> GType;
554    pub fn g_desktop_app_info_lookup_get_default_for_uri_scheme(
555        lookup: *mut GDesktopAppInfoLookup,
556        uri_scheme: *const c_char,
557    ) -> *mut gio::GAppInfo;
558
559    //=========================================================================
560    // GFileDescriptorBased
561    //=========================================================================
562    pub fn g_file_descriptor_based_get_type() -> GType;
563    pub fn g_file_descriptor_based_get_fd(fd_based: *mut GFileDescriptorBased) -> c_int;
564
565    //=========================================================================
566    // Other functions
567    //=========================================================================
568    pub fn g_unix_is_mount_path_system_internal(mount_path: *const c_char) -> gboolean;
569    pub fn g_unix_is_system_device_path(device_path: *const c_char) -> gboolean;
570    pub fn g_unix_is_system_fs_type(fs_type: *const c_char) -> gboolean;
571    pub fn g_unix_mount_at(mount_path: *const c_char, time_read: *mut u64) -> *mut GUnixMountEntry;
572    pub fn g_unix_mount_compare(
573        mount1: *mut GUnixMountEntry,
574        mount2: *mut GUnixMountEntry,
575    ) -> c_int;
576    pub fn g_unix_mount_copy(mount_entry: *mut GUnixMountEntry) -> *mut GUnixMountEntry;
577    pub fn g_unix_mount_entries_changed_since(time: u64) -> gboolean;
578    #[cfg(feature = "v2_84")]
579    #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))]
580    pub fn g_unix_mount_entries_get(time_read: *mut u64) -> *mut glib::GList;
581    #[cfg(feature = "v2_84")]
582    #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))]
583    pub fn g_unix_mount_entries_get_from_file(
584        table_path: *const c_char,
585        time_read_out: *mut u64,
586        n_entries_out: *mut size_t,
587    ) -> *mut *mut GUnixMountEntry;
588    pub fn g_unix_mount_for(file_path: *const c_char, time_read: *mut u64) -> *mut GUnixMountEntry;
589    pub fn g_unix_mount_free(mount_entry: *mut GUnixMountEntry);
590    pub fn g_unix_mount_get_device_path(mount_entry: *mut GUnixMountEntry) -> *const c_char;
591    pub fn g_unix_mount_get_fs_type(mount_entry: *mut GUnixMountEntry) -> *const c_char;
592    pub fn g_unix_mount_get_mount_path(mount_entry: *mut GUnixMountEntry) -> *const c_char;
593    #[cfg(feature = "v2_58")]
594    #[cfg_attr(docsrs, doc(cfg(feature = "v2_58")))]
595    pub fn g_unix_mount_get_options(mount_entry: *mut GUnixMountEntry) -> *const c_char;
596    #[cfg(feature = "v2_60")]
597    #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))]
598    pub fn g_unix_mount_get_root_path(mount_entry: *mut GUnixMountEntry) -> *const c_char;
599    pub fn g_unix_mount_guess_can_eject(mount_entry: *mut GUnixMountEntry) -> gboolean;
600    pub fn g_unix_mount_guess_icon(mount_entry: *mut GUnixMountEntry) -> *mut gio::GIcon;
601    pub fn g_unix_mount_guess_name(mount_entry: *mut GUnixMountEntry) -> *mut c_char;
602    pub fn g_unix_mount_guess_should_display(mount_entry: *mut GUnixMountEntry) -> gboolean;
603    pub fn g_unix_mount_guess_symbolic_icon(mount_entry: *mut GUnixMountEntry) -> *mut gio::GIcon;
604    pub fn g_unix_mount_is_readonly(mount_entry: *mut GUnixMountEntry) -> gboolean;
605    pub fn g_unix_mount_is_system_internal(mount_entry: *mut GUnixMountEntry) -> gboolean;
606    pub fn g_unix_mount_points_changed_since(time: u64) -> gboolean;
607    pub fn g_unix_mount_points_get(time_read: *mut u64) -> *mut glib::GList;
608    #[cfg(feature = "v2_82")]
609    #[cfg_attr(docsrs, doc(cfg(feature = "v2_82")))]
610    pub fn g_unix_mount_points_get_from_file(
611        table_path: *const c_char,
612        time_read_out: *mut u64,
613        n_points_out: *mut size_t,
614    ) -> *mut *mut GUnixMountPoint;
615    pub fn g_unix_mounts_changed_since(time: u64) -> gboolean;
616    pub fn g_unix_mounts_get(time_read: *mut u64) -> *mut glib::GList;
617    #[cfg(feature = "v2_82")]
618    #[cfg_attr(docsrs, doc(cfg(feature = "v2_82")))]
619    pub fn g_unix_mounts_get_from_file(
620        table_path: *const c_char,
621        time_read_out: *mut u64,
622        n_entries_out: *mut size_t,
623    ) -> *mut *mut GUnixMountEntry;
624
625}