Skip to main content

pms_sys/
lib.rs

1// This file was generated by gir (https://github.com/gtk-rs/gir)
2// from ../..
3// from ../../gir-files
4// DO NOT EDIT
5
6#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)]
7#![allow(clippy::approx_constant, clippy::type_complexity, clippy::unreadable_literal, clippy::upper_case_acronyms)]
8#![cfg_attr(docsrs, feature(doc_cfg))]
9
10use gobject_sys as gobject;
11use glib_sys as glib;
12use gio_sys as gio;
13use gtk_sys as gtk;
14use adw_sys as adw;
15
16#[allow(unused_imports)]
17use std::ffi::{c_int, c_char, c_uchar, c_float, c_uint, c_double,
18    c_short, c_ushort, c_long, c_ulong, c_void};
19#[allow(unused_imports)]
20use libc::{size_t, ssize_t, time_t, off_t, intptr_t, uintptr_t, FILE};
21#[cfg(unix)]
22#[allow(unused_imports)]
23use libc::{dev_t, gid_t, pid_t, socklen_t, uid_t};
24
25#[allow(unused_imports)]
26use glib::{gboolean, gconstpointer, gpointer, GType};
27
28// Records
29#[derive(Copy, Clone)]
30#[repr(C)]
31pub struct MsLanguageChooserClass {
32    pub parent_class: adw::AdwDialogClass,
33}
34
35impl ::std::fmt::Debug for MsLanguageChooserClass {
36    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
37        f.debug_struct(&format!("MsLanguageChooserClass @ {self:p}"))
38         .field("parent_class", &self.parent_class)
39         .finish()
40    }
41}
42
43#[derive(Copy, Clone)]
44#[repr(C)]
45pub struct MsOskAddLayoutDialogClass {
46    pub parent_class: adw::AdwDialogClass,
47}
48
49impl ::std::fmt::Debug for MsOskAddLayoutDialogClass {
50    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
51        f.debug_struct(&format!("MsOskAddLayoutDialogClass @ {self:p}"))
52         .field("parent_class", &self.parent_class)
53         .finish()
54    }
55}
56
57#[derive(Copy, Clone)]
58#[repr(C)]
59pub struct MsOskLayoutClass {
60    pub parent_class: gobject::GObjectClass,
61}
62
63impl ::std::fmt::Debug for MsOskLayoutClass {
64    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
65        f.debug_struct(&format!("MsOskLayoutClass @ {self:p}"))
66         .field("parent_class", &self.parent_class)
67         .finish()
68    }
69}
70
71#[derive(Copy, Clone)]
72#[repr(C)]
73pub struct MsOskLayoutPrefsClass {
74    pub parent_class: adw::AdwPreferencesGroupClass,
75}
76
77impl ::std::fmt::Debug for MsOskLayoutPrefsClass {
78    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
79        f.debug_struct(&format!("MsOskLayoutPrefsClass @ {self:p}"))
80         .field("parent_class", &self.parent_class)
81         .finish()
82    }
83}
84
85// Classes
86#[repr(C)]
87#[allow(dead_code)]
88pub struct MsLanguageChooser {
89    _data: [u8; 0],
90    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
91}
92
93impl ::std::fmt::Debug for MsLanguageChooser {
94    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
95        f.debug_struct(&format!("MsLanguageChooser @ {self:p}"))
96         .finish()
97    }
98}
99
100#[repr(C)]
101#[allow(dead_code)]
102pub struct MsOskAddLayoutDialog {
103    _data: [u8; 0],
104    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
105}
106
107impl ::std::fmt::Debug for MsOskAddLayoutDialog {
108    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
109        f.debug_struct(&format!("MsOskAddLayoutDialog @ {self:p}"))
110         .finish()
111    }
112}
113
114#[repr(C)]
115#[allow(dead_code)]
116pub struct MsOskLayout {
117    _data: [u8; 0],
118    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
119}
120
121impl ::std::fmt::Debug for MsOskLayout {
122    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
123        f.debug_struct(&format!("MsOskLayout @ {self:p}"))
124         .finish()
125    }
126}
127
128#[repr(C)]
129#[allow(dead_code)]
130pub struct MsOskLayoutPrefs {
131    _data: [u8; 0],
132    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
133}
134
135impl ::std::fmt::Debug for MsOskLayoutPrefs {
136    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
137        f.debug_struct(&format!("MsOskLayoutPrefs @ {self:p}"))
138         .finish()
139    }
140}
141
142unsafe extern "C" {
143
144    //=========================================================================
145    // MsLanguageChooser
146    //=========================================================================
147    pub fn ms_language_chooser_get_type() -> GType;
148    pub fn ms_language_chooser_new() -> *mut MsLanguageChooser;
149    pub fn ms_language_chooser_clear_filter(chooser: *mut MsLanguageChooser);
150    pub fn ms_language_chooser_get_language(chooser: *mut MsLanguageChooser) -> *const c_char;
151    pub fn ms_language_chooser_set_language(chooser: *mut MsLanguageChooser, language: *const c_char);
152
153    //=========================================================================
154    // MsOskAddLayoutDialog
155    //=========================================================================
156    pub fn ms_osk_add_layout_dialog_get_type() -> GType;
157    pub fn ms_osk_add_layout_dialog_new(layouts: *mut gio::GListModel) -> *mut gtk::GtkWidget;
158
159    //=========================================================================
160    // MsOskLayout
161    //=========================================================================
162    pub fn ms_osk_layout_get_type() -> GType;
163    pub fn ms_osk_layout_new(name: *const c_char, type_: *const c_char, id: *const c_char) -> *mut MsOskLayout;
164    pub fn ms_osk_layout_get_id(self_: *mut MsOskLayout) -> *const c_char;
165    pub fn ms_osk_layout_get_name(self_: *mut MsOskLayout) -> *const c_char;
166    pub fn ms_osk_layout_get_type_(self_: *mut MsOskLayout) -> *const c_char;
167
168    //=========================================================================
169    // MsOskLayoutPrefs
170    //=========================================================================
171    pub fn ms_osk_layout_prefs_get_type() -> GType;
172    pub fn ms_osk_layout_prefs_new() -> *mut MsOskLayoutPrefs;
173    pub fn ms_osk_layout_prefs_load_osk_layouts(self_: *mut MsOskLayoutPrefs);
174
175    //=========================================================================
176    // Other functions
177    //=========================================================================
178    pub fn ms_init();
179    pub fn ms_lang_get_country_from_locale(locale: *const c_char, translation: *const c_char) -> *mut c_char;
180    pub fn ms_lang_get_language_from_locale(locale: *const c_char, translation: *const c_char) -> *mut c_char;
181
182}