#![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;
use gtk_sys as gtk;
#[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, off_t, size_t, ssize_t, time_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};
#[derive(Copy, Clone)]
#[repr(C)]
pub struct SpellingCheckerClass {
pub parent_class: gobject::GObjectClass,
}
impl ::std::fmt::Debug for SpellingCheckerClass {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
f.debug_struct(&format!("SpellingCheckerClass @ {self:p}"))
.field("parent_class", &self.parent_class)
.finish()
}
}
#[repr(C)]
pub struct _SpellingLanguageClass {
_data: [u8; 0],
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}
pub type SpellingLanguageClass = _SpellingLanguageClass;
#[derive(Copy, Clone)]
#[repr(C)]
pub struct SpellingLanguageInfoClass {
pub parent_class: gobject::GObjectClass,
}
impl ::std::fmt::Debug for SpellingLanguageInfoClass {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
f.debug_struct(&format!("SpellingLanguageInfoClass @ {self:p}"))
.field("parent_class", &self.parent_class)
.finish()
}
}
#[repr(C)]
pub struct _SpellingProviderClass {
_data: [u8; 0],
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}
pub type SpellingProviderClass = _SpellingProviderClass;
#[derive(Copy, Clone)]
#[repr(C)]
pub struct SpellingTextBufferAdapterClass {
pub parent_class: gobject::GObjectClass,
}
impl ::std::fmt::Debug for SpellingTextBufferAdapterClass {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
f.debug_struct(&format!("SpellingTextBufferAdapterClass @ {self:p}"))
.field("parent_class", &self.parent_class)
.finish()
}
}
#[repr(C)]
pub struct SpellingChecker {
_data: [u8; 0],
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}
impl ::std::fmt::Debug for SpellingChecker {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
f.debug_struct(&format!("SpellingChecker @ {self:p}"))
.finish()
}
}
#[repr(C)]
pub struct SpellingLanguage {
_data: [u8; 0],
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}
impl ::std::fmt::Debug for SpellingLanguage {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
f.debug_struct(&format!("SpellingLanguage @ {self:p}"))
.finish()
}
}
#[repr(C)]
pub struct SpellingLanguageInfo {
_data: [u8; 0],
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}
impl ::std::fmt::Debug for SpellingLanguageInfo {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
f.debug_struct(&format!("SpellingLanguageInfo @ {self:p}"))
.finish()
}
}
#[repr(C)]
pub struct SpellingProvider {
_data: [u8; 0],
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}
impl ::std::fmt::Debug for SpellingProvider {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
f.debug_struct(&format!("SpellingProvider @ {self:p}"))
.finish()
}
}
#[repr(C)]
pub struct SpellingTextBufferAdapter {
_data: [u8; 0],
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}
impl ::std::fmt::Debug for SpellingTextBufferAdapter {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
f.debug_struct(&format!("SpellingTextBufferAdapter @ {self:p}"))
.finish()
}
}
#[link(name = "spelling-1")]
extern "C" {
pub fn spelling_checker_get_type() -> GType;
pub fn spelling_checker_new(
provider: *mut SpellingProvider,
language: *const c_char,
) -> *mut SpellingChecker;
pub fn spelling_checker_get_default() -> *mut SpellingChecker;
pub fn spelling_checker_add_word(self_: *mut SpellingChecker, word: *const c_char);
pub fn spelling_checker_check_word(
self_: *mut SpellingChecker,
word: *const c_char,
word_len: ssize_t,
) -> gboolean;
pub fn spelling_checker_get_extra_word_chars(self_: *mut SpellingChecker) -> *const c_char;
pub fn spelling_checker_get_language(self_: *mut SpellingChecker) -> *const c_char;
pub fn spelling_checker_get_provider(self_: *mut SpellingChecker) -> *mut SpellingProvider;
pub fn spelling_checker_ignore_word(self_: *mut SpellingChecker, word: *const c_char);
pub fn spelling_checker_list_corrections(
self_: *mut SpellingChecker,
word: *const c_char,
) -> *mut *mut c_char;
pub fn spelling_checker_set_language(self_: *mut SpellingChecker, language: *const c_char);
pub fn spelling_language_get_type() -> GType;
pub fn spelling_language_add_word(self_: *mut SpellingLanguage, word: *const c_char);
pub fn spelling_language_contains_word(
self_: *mut SpellingLanguage,
word: *const c_char,
word_len: ssize_t,
) -> gboolean;
pub fn spelling_language_get_code(self_: *mut SpellingLanguage) -> *const c_char;
pub fn spelling_language_get_extra_word_chars(self_: *mut SpellingLanguage) -> *const c_char;
pub fn spelling_language_ignore_word(self_: *mut SpellingLanguage, word: *const c_char);
pub fn spelling_language_list_corrections(
self_: *mut SpellingLanguage,
word: *const c_char,
word_len: ssize_t,
) -> *mut *mut c_char;
pub fn spelling_language_info_get_type() -> GType;
pub fn spelling_language_info_get_code(self_: *mut SpellingLanguageInfo) -> *const c_char;
pub fn spelling_language_info_get_group(self_: *mut SpellingLanguageInfo) -> *const c_char;
pub fn spelling_language_info_get_name(self_: *mut SpellingLanguageInfo) -> *const c_char;
pub fn spelling_provider_get_type() -> GType;
pub fn spelling_provider_get_default() -> *mut SpellingProvider;
pub fn spelling_provider_get_default_code(self_: *mut SpellingProvider) -> *const c_char;
pub fn spelling_provider_get_display_name(self_: *mut SpellingProvider) -> *const c_char;
pub fn spelling_provider_get_language(
self_: *mut SpellingProvider,
language: *const c_char,
) -> *mut SpellingLanguage;
pub fn spelling_provider_list_languages(self_: *mut SpellingProvider) -> *mut glib::GPtrArray;
pub fn spelling_provider_supports_language(
self_: *mut SpellingProvider,
language: *const c_char,
) -> gboolean;
pub fn spelling_text_buffer_adapter_get_type() -> GType;
pub fn spelling_text_buffer_adapter_new(
buffer: *mut gtk_source::GtkSourceBuffer,
checker: *mut SpellingChecker,
) -> *mut SpellingTextBufferAdapter;
pub fn spelling_text_buffer_adapter_get_buffer(
self_: *mut SpellingTextBufferAdapter,
) -> *mut gtk_source::GtkSourceBuffer;
pub fn spelling_text_buffer_adapter_get_checker(
self_: *mut SpellingTextBufferAdapter,
) -> *mut SpellingChecker;
pub fn spelling_text_buffer_adapter_get_enabled(
self_: *mut SpellingTextBufferAdapter,
) -> gboolean;
pub fn spelling_text_buffer_adapter_get_language(
self_: *mut SpellingTextBufferAdapter,
) -> *const c_char;
pub fn spelling_text_buffer_adapter_get_menu_model(
self_: *mut SpellingTextBufferAdapter,
) -> *mut gio::GMenuModel;
pub fn spelling_text_buffer_adapter_get_tag(
self_: *mut SpellingTextBufferAdapter,
) -> *mut gtk::GtkTextTag;
pub fn spelling_text_buffer_adapter_invalidate_all(self_: *mut SpellingTextBufferAdapter);
pub fn spelling_text_buffer_adapter_set_checker(
self_: *mut SpellingTextBufferAdapter,
checker: *mut SpellingChecker,
);
pub fn spelling_text_buffer_adapter_set_enabled(
self_: *mut SpellingTextBufferAdapter,
enabled: gboolean,
);
pub fn spelling_text_buffer_adapter_set_language(
self_: *mut SpellingTextBufferAdapter,
language: *const c_char,
);
pub fn spelling_init();
}