libxfce4kbd-private-sys 0.1.0

FFI bindings to libxfce4kbd-private
// This file was generated by gir (https://github.com/gtk-rs/gir)
// from gir-files.gtk (https://github.com/gtk-rs/gir-files)
// from gir-files.xfce
// 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 glib_sys as glib;
use gobject_sys as gobject;
use gtk_sys as gtk;

#[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};

// Records
#[derive(Copy, Clone)]
#[repr(C)]
pub struct XfceShortcut {
    pub property_name: *mut c_char,
    pub shortcut: *mut c_char,
    pub command: *mut c_char,
    pub snotify: c_uint,
}

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

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

pub type XfceShortcutDialogClass = _XfceShortcutDialogClass;

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

pub type XfceShortcutsEditorClass = _XfceShortcutsEditorClass;

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

pub type XfceShortcutsEditorDialogClass = _XfceShortcutsEditorDialogClass;

#[derive(Copy, Clone)]
#[repr(C)]
pub struct XfceShortcutsEditorSection {
    pub section_name: *mut c_char,
    pub entries: *mut libxfce4ui::XfceGtkActionEntry,
    pub size: size_t,
}

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

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

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

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

pub type XfceShortcutsGrabberPrivate = _XfceShortcutsGrabberPrivate;

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

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

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

pub type XfceShortcutsProviderPrivate = _XfceShortcutsProviderPrivate;

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

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

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

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

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

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

#[derive(Copy, Clone)]
#[repr(C)]
pub struct XfceShortcutsGrabber {
    pub __parent__: gobject::GObject,
    pub priv_: *mut XfceShortcutsGrabberPrivate,
}

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

#[derive(Copy, Clone)]
#[repr(C)]
pub struct XfceShortcutsProvider {
    pub __parent__: gobject::GObject,
    pub priv_: *mut XfceShortcutsProviderPrivate,
}

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

unsafe extern "C" {

    //=========================================================================
    // XfceShortcut
    //=========================================================================
    pub fn xfce_shortcut_get_type() -> GType;
    #[cfg(feature = "v4_21_4")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v4_21_4")))]
    pub fn xfce_shortcut_copy(shortcut: *mut XfceShortcut) -> *mut XfceShortcut;
    pub fn xfce_shortcut_free(shortcut: *mut XfceShortcut);
    pub fn xfce_shortcut_conflict_dialog(
        parent: *mut gtk::GtkWindow,
        owner: *const c_char,
        other: *const c_char,
        shortcut: *const c_char,
        owner_action: *const c_char,
        other_action: *const c_char,
        ignore_same_provider: gboolean,
    ) -> gboolean;

    //=========================================================================
    // XfceShortcutDialog
    //=========================================================================
    pub fn xfce_shortcut_dialog_get_type() -> GType;
    pub fn xfce_shortcut_dialog_new(
        provider: *const c_char,
        action_name: *const c_char,
        action: *const c_char,
    ) -> *mut gtk::GtkWidget;
    pub fn xfce_shortcut_dialog_get_action(action: *mut XfceShortcutDialog) -> *const c_char;
    pub fn xfce_shortcut_dialog_get_action_name(action: *mut XfceShortcutDialog) -> *const c_char;
    pub fn xfce_shortcut_dialog_get_shortcut(dialog: *mut XfceShortcutDialog) -> *const c_char;
    pub fn xfce_shortcut_dialog_run(
        dialog: *mut XfceShortcutDialog,
        parent: *mut gtk::GtkWidget,
    ) -> c_int;

    //=========================================================================
    // XfceShortcutsEditor
    //=========================================================================
    pub fn xfce_shortcuts_editor_get_type() -> GType;
    pub fn xfce_shortcuts_editor_new(argument_count: c_int, ...) -> *mut gtk::GtkWidget;
    pub fn xfce_shortcuts_editor_new_array(
        sections: *mut XfceShortcutsEditorSection,
        n_sections: c_int,
    ) -> *mut gtk::GtkWidget;
    //pub fn xfce_shortcuts_editor_new_variadic(argument_count: c_int, argument_list: /*Unimplemented*/va_list) -> *mut gtk::GtkWidget;
    pub fn xfce_shortcuts_editor_add_overlap_group(
        editor: *mut XfceShortcutsEditor,
        first_section_index: c_int,
        ...
    );
    pub fn xfce_shortcuts_editor_add_overlap_group_array(
        editor: *mut XfceShortcutsEditor,
        section_indexes: *mut size_t,
        n_section_indexes: size_t,
    );

    //=========================================================================
    // XfceShortcutsEditorDialog
    //=========================================================================
    pub fn xfce_shortcuts_editor_dialog_get_type() -> GType;
    pub fn xfce_shortcuts_editor_dialog_new(argument_count: c_int, ...) -> *mut gtk::GtkWidget;
    pub fn xfce_shortcuts_editor_dialog_new_with_parent(
        parent: *mut gtk::GtkWindow,
        argument_count: c_int,
        ...
    ) -> *mut gtk::GtkWidget;

    //=========================================================================
    // XfceShortcutsGrabber
    //=========================================================================
    pub fn xfce_shortcuts_grabber_get_type() -> GType;
    pub fn xfce_shortcuts_grabber_new() -> *mut XfceShortcutsGrabber;
    pub fn xfce_shortcuts_grabber_add(grabber: *mut XfceShortcutsGrabber, shortcut: *const c_char);
    pub fn xfce_shortcuts_grabber_remove(
        grabber: *mut XfceShortcutsGrabber,
        shortcut: *const c_char,
    );

    //=========================================================================
    // XfceShortcutsProvider
    //=========================================================================
    pub fn xfce_shortcuts_provider_get_type() -> GType;
    pub fn xfce_shortcuts_provider_new(name: *const c_char) -> *mut XfceShortcutsProvider;
    pub fn xfce_shortcuts_provider_free_providers(providers: *mut glib::GList);
    pub fn xfce_shortcuts_provider_get_providers() -> *mut glib::GList;
    pub fn xfce_shortcuts_provider_clone_defaults(provider: *mut XfceShortcutsProvider);
    pub fn xfce_shortcuts_provider_get_name(provider: *mut XfceShortcutsProvider) -> *const c_char;
    pub fn xfce_shortcuts_provider_get_shortcut(
        provider: *mut XfceShortcutsProvider,
        shortcut: *const c_char,
    ) -> *mut XfceShortcut;
    pub fn xfce_shortcuts_provider_get_shortcuts(
        provider: *mut XfceShortcutsProvider,
    ) -> *mut glib::GList;
    pub fn xfce_shortcuts_provider_has_shortcut(
        provider: *mut XfceShortcutsProvider,
        shortcut: *const c_char,
    ) -> gboolean;
    pub fn xfce_shortcuts_provider_is_custom(provider: *mut XfceShortcutsProvider) -> gboolean;
    pub fn xfce_shortcuts_provider_reset_shortcut(
        provider: *mut XfceShortcutsProvider,
        shortcut: *const c_char,
    );
    pub fn xfce_shortcuts_provider_reset_to_defaults(provider: *mut XfceShortcutsProvider);
    pub fn xfce_shortcuts_provider_set_shortcut(
        provider: *mut XfceShortcutsProvider,
        shortcut: *const c_char,
        command: *const c_char,
        snotify: gboolean,
    );

    //=========================================================================
    // Other functions
    //=========================================================================
    pub fn xfce_shortcuts_free(shortcuts: *mut glib::GList);
    pub fn xfce_shortcuts_xfwm4_get_feature_list() -> *mut glib::GList;
    pub fn xfce_shortcuts_xfwm4_get_feature_name(feature: *const c_char) -> *const c_char;

}