#![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;
#[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, size_t, ssize_t, uintptr_t, FILE,
};
#[allow(unused_imports)]
use glib::{gboolean, gconstpointer, gpointer, GType};
pub type LfbEventEndReason = c_int;
pub const LFB_EVENT_END_REASON_NOT_FOUND: LfbEventEndReason = -1;
pub const LFB_EVENT_END_REASON_NATURAL: LfbEventEndReason = 0;
pub const LFB_EVENT_END_REASON_EXPIRED: LfbEventEndReason = 1;
pub const LFB_EVENT_END_REASON_EXPLICIT: LfbEventEndReason = 2;
pub type LfbEventState = c_int;
pub const LFB_EVENT_STATE_ERRORED: LfbEventState = -1;
pub const LFB_EVENT_STATE_NONE: LfbEventState = 0;
pub const LFB_EVENT_STATE_RUNNING: LfbEventState = 1;
pub const LFB_EVENT_STATE_ENDED: LfbEventState = 2;
#[derive(Copy, Clone)]
#[repr(C)]
pub struct LfbEventClass {
pub parent_class: gobject::GObjectClass,
}
impl ::std::fmt::Debug for LfbEventClass {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
f.debug_struct(&format!("LfbEventClass @ {self:p}"))
.field("parent_class", &self.parent_class)
.finish()
}
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct LfbGdbusFeedbackProxyClass {
pub parent_class: gio::GDBusProxyClass,
}
impl ::std::fmt::Debug for LfbGdbusFeedbackProxyClass {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
f.debug_struct(&format!("LfbGdbusFeedbackProxyClass @ {self:p}"))
.field("parent_class", &self.parent_class)
.finish()
}
}
#[repr(C)]
pub struct _LfbGdbusFeedbackProxyPrivate {
_data: [u8; 0],
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}
pub type LfbGdbusFeedbackProxyPrivate = _LfbGdbusFeedbackProxyPrivate;
#[derive(Copy, Clone)]
#[repr(C)]
pub struct LfbGdbusFeedbackSkeletonClass {
pub parent_class: gio::GDBusInterfaceSkeletonClass,
}
impl ::std::fmt::Debug for LfbGdbusFeedbackSkeletonClass {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
f.debug_struct(&format!("LfbGdbusFeedbackSkeletonClass @ {self:p}"))
.field("parent_class", &self.parent_class)
.finish()
}
}
#[repr(C)]
pub struct _LfbGdbusFeedbackSkeletonPrivate {
_data: [u8; 0],
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}
pub type LfbGdbusFeedbackSkeletonPrivate = _LfbGdbusFeedbackSkeletonPrivate;
#[repr(C)]
pub struct LfbEvent {
_data: [u8; 0],
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}
impl ::std::fmt::Debug for LfbEvent {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
f.debug_struct(&format!("LfbEvent @ {self:p}")).finish()
}
}
#[link(name = "feedback-0.0")]
extern "C" {
pub fn lfb_event_end_reason_get_type() -> GType;
pub fn lfb_event_state_get_type() -> GType;
pub fn lfb_event_get_type() -> GType;
pub fn lfb_event_new(event: *const c_char) -> *mut LfbEvent;
pub fn lfb_event_end_feedback(self_: *mut LfbEvent, error: *mut *mut glib::GError) -> gboolean;
pub fn lfb_event_end_feedback_async(
self_: *mut LfbEvent,
cancellable: *mut gio::GCancellable,
callback: gio::GAsyncReadyCallback,
user_data: gpointer,
);
pub fn lfb_event_end_feedback_finish(
self_: *mut LfbEvent,
res: *mut gio::GAsyncResult,
error: *mut *mut glib::GError,
) -> gboolean;
pub fn lfb_event_get_app_id(self_: *mut LfbEvent) -> *const c_char;
pub fn lfb_event_get_end_reason(self_: *mut LfbEvent) -> LfbEventEndReason;
pub fn lfb_event_get_event(self_: *mut LfbEvent) -> *const c_char;
pub fn lfb_event_get_feedback_profile(self_: *mut LfbEvent) -> *const c_char;
pub fn lfb_event_get_important(self_: *mut LfbEvent) -> gboolean;
pub fn lfb_event_get_state(self_: *mut LfbEvent) -> LfbEventState;
pub fn lfb_event_get_timeout(self_: *mut LfbEvent) -> c_int;
pub fn lfb_event_set_app_id(self_: *mut LfbEvent, app_id: *const c_char);
pub fn lfb_event_set_feedback_profile(self_: *mut LfbEvent, profile: *const c_char);
pub fn lfb_event_set_important(self_: *mut LfbEvent, important: gboolean);
pub fn lfb_event_set_timeout(self_: *mut LfbEvent, timeout: c_int);
pub fn lfb_event_trigger_feedback(
self_: *mut LfbEvent,
error: *mut *mut glib::GError,
) -> gboolean;
pub fn lfb_event_trigger_feedback_async(
self_: *mut LfbEvent,
cancellable: *mut gio::GCancellable,
callback: gio::GAsyncReadyCallback,
user_data: gpointer,
);
pub fn lfb_event_trigger_feedback_finish(
self_: *mut LfbEvent,
res: *mut gio::GAsyncResult,
error: *mut *mut glib::GError,
) -> gboolean;
pub fn lfb_gdbus_feedback_proxy_get_type() -> GType;
pub fn lfb_gdbus_feedback_proxy_new(
connection: *mut gio::GDBusConnection,
flags: gio::GDBusProxyFlags,
name: *const c_char,
object_path: *const c_char,
cancellable: *mut gio::GCancellable,
callback: gio::GAsyncReadyCallback,
user_data: gpointer,
);
pub fn lfb_gdbus_feedback_proxy_new_for_bus(
bus_type: gio::GBusType,
flags: gio::GDBusProxyFlags,
name: *const c_char,
object_path: *const c_char,
cancellable: *mut gio::GCancellable,
callback: gio::GAsyncReadyCallback,
user_data: gpointer,
);
pub fn lfb_gdbus_feedback_skeleton_get_type() -> GType;
pub fn lfb_gdbus_feedback_get_type() -> GType;
pub fn lfb_gdbus_feedback_interface_info() -> *mut gio::GDBusInterfaceInfo;
pub fn lfb_gdbus_feedback_override_properties(
klass: *mut gobject::GObjectClass,
property_id_begin: c_uint,
) -> c_uint;
pub fn lfb_get_app_id() -> *const c_char;
pub fn lfb_get_feedback_profile() -> *const c_char;
pub fn lfb_init(app_id: *const c_char, error: *mut *mut glib::GError) -> gboolean;
pub fn lfb_is_initted() -> gboolean;
pub fn lfb_set_app_id(app_id: *const c_char);
pub fn lfb_set_feedback_profile(profile: *const c_char);
pub fn lfb_uninit();
}