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
// Generated by gir (https://github.com/gtk-rs/gir @ 5c4134d75fd1)
// from
// from gir-files (https://github.com/gtk-rs/gir-files.git @ fa73af2178bc)
// 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 gdk_sys as gdk;
use gio_sys as gio;
use glib_sys as glib;
use gobject_sys as gobject;
use gtk_sys as gtk;
use pango_sys as pango;

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

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

// Enums
pub type FuseboxFuseCategory = c_int;
pub const FUSEBOX_FUSE_CATEGORY_NETWORK: FuseboxFuseCategory = 0;
pub const FUSEBOX_FUSE_CATEGORY_PERSONAL: FuseboxFuseCategory = 1;
pub const FUSEBOX_FUSE_CATEGORY_SYSTEM: FuseboxFuseCategory = 2;
pub const FUSEBOX_FUSE_CATEGORY_CUSTOM: FuseboxFuseCategory = 3;

// Records
#[derive(Copy, Clone)]
#[repr(C)]
pub struct FuseboxFuseClass {
    pub parent_class: gobject::GObjectClass,
    pub get_widget: Option<unsafe extern "C" fn(*mut FuseboxFuse) -> *mut gtk::GtkWidget>,
    pub shown: Option<unsafe extern "C" fn(*mut FuseboxFuse)>,
    pub hidden: Option<unsafe extern "C" fn(*mut FuseboxFuse)>,
    pub search: Option<
        unsafe extern "C" fn(
            *mut FuseboxFuse,
            *const c_char,
            gio::GAsyncReadyCallback,
            *mut c_void,
        ),
    >,
    pub search_finish: Option<
        unsafe extern "C" fn(*mut FuseboxFuse, *mut gio::GAsyncResult) -> *mut glib::GHashTable,
    >,
    pub search_callback: Option<unsafe extern "C" fn(*mut FuseboxFuse, *const c_char)>,
}

impl ::std::fmt::Debug for FuseboxFuseClass {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("FuseboxFuseClass @ {self:p}"))
            .field("get_widget", &self.get_widget)
            .field("shown", &self.shown)
            .field("hidden", &self.hidden)
            .field("search", &self.search)
            .field("search_finish", &self.search_finish)
            .field("search_callback", &self.search_callback)
            .finish()
    }
}

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

pub type FuseboxFusePrivate = _FuseboxFusePrivate;

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

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

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

pub type FuseboxFusesManagerPrivate = _FuseboxFusesManagerPrivate;

// Classes
#[derive(Copy, Clone)]
#[repr(C)]
pub struct FuseboxFuse {
    pub parent_instance: gobject::GObject,
    pub priv_: *mut FuseboxFusePrivate,
    pub SEP: *mut c_char,
}

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

#[derive(Copy, Clone)]
#[repr(C)]
pub struct FuseboxFusesManager {
    pub parent_instance: gobject::GObject,
    pub priv_: *mut FuseboxFusesManagerPrivate,
}

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

#[link(name = "fusebox-1")]
extern "C" {

    //=========================================================================
    // FuseboxFuseCategory
    //=========================================================================
    pub fn fusebox_fuse_category_get_type() -> GType;

    //=========================================================================
    // FuseboxFuse
    //=========================================================================
    pub fn fusebox_fuse_get_type() -> GType;
    pub fn fusebox_fuse_get_widget(self_: *mut FuseboxFuse) -> *mut gtk::GtkWidget;
    pub fn fusebox_fuse_shown(self_: *mut FuseboxFuse);
    pub fn fusebox_fuse_hidden(self_: *mut FuseboxFuse);
    pub fn fusebox_fuse_search(
        self_: *mut FuseboxFuse,
        search: *const c_char,
        _callback_: gio::GAsyncReadyCallback,
        _callback__target: *mut c_void,
    );
    pub fn fusebox_fuse_search_finish(
        self_: *mut FuseboxFuse,
        _res_: *mut gio::GAsyncResult,
    ) -> *mut glib::GHashTable;
    pub fn fusebox_fuse_search_callback(self_: *mut FuseboxFuse, location: *const c_char);
    pub fn fusebox_fuse_get_category(self_: *mut FuseboxFuse) -> FuseboxFuseCategory;
    pub fn fusebox_fuse_get_index(self_: *mut FuseboxFuse) -> c_int;
    pub fn fusebox_fuse_get_code_name(self_: *mut FuseboxFuse) -> *const c_char;
    pub fn fusebox_fuse_get_display_name(self_: *mut FuseboxFuse) -> *const c_char;
    pub fn fusebox_fuse_get_description(self_: *mut FuseboxFuse) -> *const c_char;
    pub fn fusebox_fuse_get_icon(self_: *mut FuseboxFuse) -> *const c_char;
    pub fn fusebox_fuse_get_supported_settings(self_: *mut FuseboxFuse) -> *mut glib::GHashTable;
    pub fn fusebox_fuse_get_can_show(self_: *mut FuseboxFuse) -> gboolean;
    pub fn fusebox_fuse_set_can_show(self_: *mut FuseboxFuse, value: gboolean);

    //=========================================================================
    // FuseboxFusesManager
    //=========================================================================
    pub fn fusebox_fuses_manager_get_type() -> GType;
    pub fn fusebox_fuses_manager_get_default() -> *mut FuseboxFusesManager;
    pub fn fusebox_fuses_manager_has_fuses(self_: *mut FuseboxFusesManager) -> gboolean;
    pub fn fusebox_fuses_manager_get_fuses(self_: *mut FuseboxFusesManager) -> *mut glib::GList;

}