1#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)]
7#![allow(
8 clippy::approx_constant,
9 clippy::type_complexity,
10 clippy::unreadable_literal,
11 clippy::upper_case_acronyms
12)]
13#![cfg_attr(docsrs, feature(doc_cfg))]
14
15use gio_sys as gio;
16use glib_sys as glib;
17use gobject_sys as gobject;
18
19#[allow(unused_imports)]
20use libc::{
21 c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void,
22 intptr_t, size_t, ssize_t, uintptr_t, FILE,
23};
24
25#[allow(unused_imports)]
26use glib::{gboolean, gconstpointer, gpointer, GType};
27
28pub type LfbEventEndReason = c_int;
30pub const LFB_EVENT_END_REASON_NOT_FOUND: LfbEventEndReason = -1;
31pub const LFB_EVENT_END_REASON_NATURAL: LfbEventEndReason = 0;
32pub const LFB_EVENT_END_REASON_EXPIRED: LfbEventEndReason = 1;
33pub const LFB_EVENT_END_REASON_EXPLICIT: LfbEventEndReason = 2;
34
35pub type LfbEventState = c_int;
36pub const LFB_EVENT_STATE_ERRORED: LfbEventState = -1;
37pub const LFB_EVENT_STATE_NONE: LfbEventState = 0;
38pub const LFB_EVENT_STATE_RUNNING: LfbEventState = 1;
39pub const LFB_EVENT_STATE_ENDED: LfbEventState = 2;
40
41#[derive(Copy, Clone)]
43#[repr(C)]
44pub struct LfbEventClass {
45 pub parent_class: gobject::GObjectClass,
46}
47
48impl ::std::fmt::Debug for LfbEventClass {
49 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
50 f.debug_struct(&format!("LfbEventClass @ {self:p}"))
51 .field("parent_class", &self.parent_class)
52 .finish()
53 }
54}
55
56#[derive(Copy, Clone)]
57#[repr(C)]
58pub struct LfbGdbusFeedbackProxyClass {
59 pub parent_class: gio::GDBusProxyClass,
60}
61
62impl ::std::fmt::Debug for LfbGdbusFeedbackProxyClass {
63 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
64 f.debug_struct(&format!("LfbGdbusFeedbackProxyClass @ {self:p}"))
65 .field("parent_class", &self.parent_class)
66 .finish()
67 }
68}
69
70#[repr(C)]
71pub struct _LfbGdbusFeedbackProxyPrivate {
72 _data: [u8; 0],
73 _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
74}
75
76pub type LfbGdbusFeedbackProxyPrivate = _LfbGdbusFeedbackProxyPrivate;
77
78#[derive(Copy, Clone)]
79#[repr(C)]
80pub struct LfbGdbusFeedbackSkeletonClass {
81 pub parent_class: gio::GDBusInterfaceSkeletonClass,
82}
83
84impl ::std::fmt::Debug for LfbGdbusFeedbackSkeletonClass {
85 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
86 f.debug_struct(&format!("LfbGdbusFeedbackSkeletonClass @ {self:p}"))
87 .field("parent_class", &self.parent_class)
88 .finish()
89 }
90}
91
92#[repr(C)]
93pub struct _LfbGdbusFeedbackSkeletonPrivate {
94 _data: [u8; 0],
95 _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
96}
97
98pub type LfbGdbusFeedbackSkeletonPrivate = _LfbGdbusFeedbackSkeletonPrivate;
99
100#[repr(C)]
102pub struct LfbEvent {
103 _data: [u8; 0],
104 _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
105}
106
107impl ::std::fmt::Debug for LfbEvent {
108 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
109 f.debug_struct(&format!("LfbEvent @ {self:p}")).finish()
110 }
111}
112
113#[link(name = "feedback-0.0")]
116extern "C" {
117
118 pub fn lfb_event_end_reason_get_type() -> GType;
122
123 pub fn lfb_event_state_get_type() -> GType;
127
128 pub fn lfb_event_get_type() -> GType;
132 pub fn lfb_event_new(event: *const c_char) -> *mut LfbEvent;
133 pub fn lfb_event_end_feedback(self_: *mut LfbEvent, error: *mut *mut glib::GError) -> gboolean;
134 pub fn lfb_event_end_feedback_async(
135 self_: *mut LfbEvent,
136 cancellable: *mut gio::GCancellable,
137 callback: gio::GAsyncReadyCallback,
138 user_data: gpointer,
139 );
140 pub fn lfb_event_end_feedback_finish(
141 self_: *mut LfbEvent,
142 res: *mut gio::GAsyncResult,
143 error: *mut *mut glib::GError,
144 ) -> gboolean;
145 pub fn lfb_event_get_app_id(self_: *mut LfbEvent) -> *const c_char;
146 pub fn lfb_event_get_end_reason(self_: *mut LfbEvent) -> LfbEventEndReason;
147 pub fn lfb_event_get_event(self_: *mut LfbEvent) -> *const c_char;
148 pub fn lfb_event_get_feedback_profile(self_: *mut LfbEvent) -> *const c_char;
149 pub fn lfb_event_get_important(self_: *mut LfbEvent) -> gboolean;
150 pub fn lfb_event_get_state(self_: *mut LfbEvent) -> LfbEventState;
151 pub fn lfb_event_get_timeout(self_: *mut LfbEvent) -> c_int;
152 pub fn lfb_event_set_app_id(self_: *mut LfbEvent, app_id: *const c_char);
153 pub fn lfb_event_set_feedback_profile(self_: *mut LfbEvent, profile: *const c_char);
154 pub fn lfb_event_set_important(self_: *mut LfbEvent, important: gboolean);
155 pub fn lfb_event_set_timeout(self_: *mut LfbEvent, timeout: c_int);
156 pub fn lfb_event_trigger_feedback(
157 self_: *mut LfbEvent,
158 error: *mut *mut glib::GError,
159 ) -> gboolean;
160 pub fn lfb_event_trigger_feedback_async(
161 self_: *mut LfbEvent,
162 cancellable: *mut gio::GCancellable,
163 callback: gio::GAsyncReadyCallback,
164 user_data: gpointer,
165 );
166 pub fn lfb_event_trigger_feedback_finish(
167 self_: *mut LfbEvent,
168 res: *mut gio::GAsyncResult,
169 error: *mut *mut glib::GError,
170 ) -> gboolean;
171
172 pub fn lfb_gdbus_feedback_proxy_get_type() -> GType;
176 pub fn lfb_gdbus_feedback_proxy_new(
181 connection: *mut gio::GDBusConnection,
182 flags: gio::GDBusProxyFlags,
183 name: *const c_char,
184 object_path: *const c_char,
185 cancellable: *mut gio::GCancellable,
186 callback: gio::GAsyncReadyCallback,
187 user_data: gpointer,
188 );
189 pub fn lfb_gdbus_feedback_proxy_new_for_bus(
190 bus_type: gio::GBusType,
191 flags: gio::GDBusProxyFlags,
192 name: *const c_char,
193 object_path: *const c_char,
194 cancellable: *mut gio::GCancellable,
195 callback: gio::GAsyncReadyCallback,
196 user_data: gpointer,
197 );
198
199 pub fn lfb_gdbus_feedback_skeleton_get_type() -> GType;
203 pub fn lfb_gdbus_feedback_get_type() -> GType;
209 pub fn lfb_gdbus_feedback_interface_info() -> *mut gio::GDBusInterfaceInfo;
210 pub fn lfb_gdbus_feedback_override_properties(
211 klass: *mut gobject::GObjectClass,
212 property_id_begin: c_uint,
213 ) -> c_uint;
214 pub fn lfb_get_app_id() -> *const c_char;
231 pub fn lfb_get_feedback_profile() -> *const c_char;
232 pub fn lfb_init(app_id: *const c_char, error: *mut *mut glib::GError) -> gboolean;
234 pub fn lfb_is_initted() -> gboolean;
235 pub fn lfb_set_app_id(app_id: *const c_char);
236 pub fn lfb_set_feedback_profile(profile: *const c_char);
237 pub fn lfb_uninit();
238
239}