libpms-sys 0.0.2

FFI bindings for libpms
Documentation
// This file was generated by gir (https://github.com/gtk-rs/gir)
// from ../..
// from ../../gir-files
// 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 gobject_sys as gobject;
use glib_sys as glib;
use gio_sys as gio;
use gtk_sys as gtk;
use adw_sys as adw;

#[allow(unused_imports)]
use std::ffi::{c_int, c_char, c_uchar, c_float, c_uint, c_double,
    c_short, c_ushort, c_long, c_ulong, c_void};
#[allow(unused_imports)]
use libc::{size_t, ssize_t, time_t, off_t, intptr_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};

// Records
#[derive(Copy, Clone)]
#[repr(C)]
pub struct MsLanguageChooserClass {
    pub parent_class: adw::AdwDialogClass,
}

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

#[derive(Copy, Clone)]
#[repr(C)]
pub struct MsOskAddLayoutDialogClass {
    pub parent_class: adw::AdwDialogClass,
}

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

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

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

#[derive(Copy, Clone)]
#[repr(C)]
pub struct MsOskLayoutPrefsClass {
    pub parent_class: adw::AdwPreferencesGroupClass,
}

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

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

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

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

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

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

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

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

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

unsafe extern "C" {

    //=========================================================================
    // MsLanguageChooser
    //=========================================================================
    pub fn ms_language_chooser_get_type() -> GType;
    pub fn ms_language_chooser_new() -> *mut MsLanguageChooser;
    pub fn ms_language_chooser_clear_filter(chooser: *mut MsLanguageChooser);
    pub fn ms_language_chooser_get_language(chooser: *mut MsLanguageChooser) -> *const c_char;
    pub fn ms_language_chooser_set_language(chooser: *mut MsLanguageChooser, language: *const c_char);

    //=========================================================================
    // MsOskAddLayoutDialog
    //=========================================================================
    pub fn ms_osk_add_layout_dialog_get_type() -> GType;
    pub fn ms_osk_add_layout_dialog_new(layouts: *mut gio::GListModel) -> *mut gtk::GtkWidget;

    //=========================================================================
    // MsOskLayout
    //=========================================================================
    pub fn ms_osk_layout_get_type() -> GType;
    pub fn ms_osk_layout_new(name: *const c_char, type_: *const c_char, id: *const c_char) -> *mut MsOskLayout;
    pub fn ms_osk_layout_get_id(self_: *mut MsOskLayout) -> *const c_char;
    pub fn ms_osk_layout_get_name(self_: *mut MsOskLayout) -> *const c_char;
    pub fn ms_osk_layout_get_type_(self_: *mut MsOskLayout) -> *const c_char;

    //=========================================================================
    // MsOskLayoutPrefs
    //=========================================================================
    pub fn ms_osk_layout_prefs_get_type() -> GType;
    pub fn ms_osk_layout_prefs_new() -> *mut MsOskLayoutPrefs;
    pub fn ms_osk_layout_prefs_load_osk_layouts(self_: *mut MsOskLayoutPrefs);

    //=========================================================================
    // Other functions
    //=========================================================================
    pub fn ms_init();
    pub fn ms_lang_get_country_from_locale(locale: *const c_char, translation: *const c_char) -> *mut c_char;
    pub fn ms_lang_get_language_from_locale(locale: *const c_char, translation: *const c_char) -> *mut c_char;

}