// 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;

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

// Enums
pub type XfconfError = c_int;
pub const XFCONF_ERROR_UNKNOWN: XfconfError = 0;
pub const XFCONF_ERROR_CHANNEL_NOT_FOUND: XfconfError = 1;
pub const XFCONF_ERROR_PROPERTY_NOT_FOUND: XfconfError = 2;
pub const XFCONF_ERROR_READ_FAILURE: XfconfError = 3;
pub const XFCONF_ERROR_WRITE_FAILURE: XfconfError = 4;
pub const XFCONF_ERROR_PERMISSION_DENIED: XfconfError = 5;
pub const XFCONF_ERROR_INTERNAL_ERROR: XfconfError = 6;
pub const XFCONF_ERROR_NO_BACKEND: XfconfError = 7;
pub const XFCONF_ERROR_INVALID_PROPERTY: XfconfError = 8;
pub const XFCONF_ERROR_INVALID_CHANNEL: XfconfError = 9;

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

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

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

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

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

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

unsafe extern "C" {

    //=========================================================================
    // XfconfError
    //=========================================================================
    pub fn xfconf_error_get_type() -> GType;
    pub fn xfconf_get_error_quark() -> glib::GQuark;

    //=========================================================================
    // XfconfChannel
    //=========================================================================
    pub fn xfconf_channel_get_type() -> GType;
    pub fn xfconf_channel_get(channel_name: *const c_char) -> *mut XfconfChannel;
    pub fn xfconf_channel_new(channel_name: *const c_char) -> *mut XfconfChannel;
    pub fn xfconf_channel_new_with_property_base(
        channel_name: *const c_char,
        property_base: *const c_char,
    ) -> *mut XfconfChannel;
    pub fn xfconf_channel_get_array(
        channel: *mut XfconfChannel,
        property: *const c_char,
        first_value_type: GType,
        ...
    ) -> gboolean;
    //pub fn xfconf_channel_get_array_valist(channel: *mut XfconfChannel, property: *const c_char, first_value_type: GType, var_args: /*Unimplemented*/va_list) -> gboolean;
    pub fn xfconf_channel_get_arrayv(
        channel: *mut XfconfChannel,
        property: *const c_char,
    ) -> *mut glib::GPtrArray;
    pub fn xfconf_channel_get_bool(
        channel: *mut XfconfChannel,
        property: *const c_char,
        default_value: gboolean,
    ) -> gboolean;
    pub fn xfconf_channel_get_double(
        channel: *mut XfconfChannel,
        property: *const c_char,
        default_value: c_double,
    ) -> c_double;
    pub fn xfconf_channel_get_int(
        channel: *mut XfconfChannel,
        property: *const c_char,
        default_value: i32,
    ) -> i32;
    pub fn xfconf_channel_get_named_struct(
        channel: *mut XfconfChannel,
        property: *const c_char,
        struct_name: *const c_char,
        value_struct: gpointer,
    ) -> gboolean;
    pub fn xfconf_channel_get_properties(
        channel: *mut XfconfChannel,
        property_base: *const c_char,
    ) -> *mut glib::GHashTable;
    pub fn xfconf_channel_get_property(
        channel: *mut XfconfChannel,
        property: *const c_char,
        value: *mut gobject::GValue,
    ) -> gboolean;
    pub fn xfconf_channel_get_string(
        channel: *mut XfconfChannel,
        property: *const c_char,
        default_value: *const c_char,
    ) -> *mut c_char;
    pub fn xfconf_channel_get_string_list(
        channel: *mut XfconfChannel,
        property: *const c_char,
    ) -> *mut *mut c_char;
    pub fn xfconf_channel_get_struct(
        channel: *mut XfconfChannel,
        property: *const c_char,
        value_struct: gpointer,
        first_member_type: GType,
        ...
    ) -> gboolean;
    //pub fn xfconf_channel_get_struct_valist(channel: *mut XfconfChannel, property: *const c_char, value_struct: gpointer, first_member_type: GType, var_args: /*Unimplemented*/va_list) -> gboolean;
    pub fn xfconf_channel_get_structv(
        channel: *mut XfconfChannel,
        property: *const c_char,
        value_struct: gpointer,
        n_members: c_uint,
        member_types: *mut GType,
    ) -> gboolean;
    pub fn xfconf_channel_get_uint(
        channel: *mut XfconfChannel,
        property: *const c_char,
        default_value: u32,
    ) -> u32;
    pub fn xfconf_channel_get_uint64(
        channel: *mut XfconfChannel,
        property: *const c_char,
        default_value: u64,
    ) -> u64;
    pub fn xfconf_channel_has_property(
        channel: *mut XfconfChannel,
        property: *const c_char,
    ) -> gboolean;
    pub fn xfconf_channel_is_property_locked(
        channel: *mut XfconfChannel,
        property: *const c_char,
    ) -> gboolean;
    pub fn xfconf_channel_reset_property(
        channel: *mut XfconfChannel,
        property_base: *const c_char,
        recursive: gboolean,
    );
    pub fn xfconf_channel_set_array(
        channel: *mut XfconfChannel,
        property: *const c_char,
        first_value_type: GType,
        ...
    ) -> gboolean;
    //pub fn xfconf_channel_set_array_valist(channel: *mut XfconfChannel, property: *const c_char, first_value_type: GType, var_args: /*Unimplemented*/va_list) -> gboolean;
    pub fn xfconf_channel_set_arrayv(
        channel: *mut XfconfChannel,
        property: *const c_char,
        values: *mut glib::GPtrArray,
    ) -> gboolean;
    pub fn xfconf_channel_set_bool(
        channel: *mut XfconfChannel,
        property: *const c_char,
        value: gboolean,
    ) -> gboolean;
    pub fn xfconf_channel_set_double(
        channel: *mut XfconfChannel,
        property: *const c_char,
        value: c_double,
    ) -> gboolean;
    pub fn xfconf_channel_set_int(
        channel: *mut XfconfChannel,
        property: *const c_char,
        value: i32,
    ) -> gboolean;
    pub fn xfconf_channel_set_named_struct(
        channel: *mut XfconfChannel,
        property: *const c_char,
        struct_name: *const c_char,
        value_struct: gpointer,
    ) -> gboolean;
    pub fn xfconf_channel_set_property(
        channel: *mut XfconfChannel,
        property: *const c_char,
        value: *const gobject::GValue,
    ) -> gboolean;
    pub fn xfconf_channel_set_string(
        channel: *mut XfconfChannel,
        property: *const c_char,
        value: *const c_char,
    ) -> gboolean;
    pub fn xfconf_channel_set_string_list(
        channel: *mut XfconfChannel,
        property: *const c_char,
        values: *const *const c_char,
    ) -> gboolean;
    pub fn xfconf_channel_set_struct(
        channel: *mut XfconfChannel,
        property: *const c_char,
        value_struct: gpointer,
        first_member_type: GType,
        ...
    ) -> gboolean;
    //pub fn xfconf_channel_set_struct_valist(channel: *mut XfconfChannel, property: *const c_char, value_struct: gpointer, first_member_type: GType, var_args: /*Unimplemented*/va_list) -> gboolean;
    pub fn xfconf_channel_set_structv(
        channel: *mut XfconfChannel,
        property: *const c_char,
        value_struct: gpointer,
        n_members: c_uint,
        member_types: *mut GType,
    ) -> gboolean;
    pub fn xfconf_channel_set_uint(
        channel: *mut XfconfChannel,
        property: *const c_char,
        value: u32,
    ) -> gboolean;
    pub fn xfconf_channel_set_uint64(
        channel: *mut XfconfChannel,
        property: *const c_char,
        value: u64,
    ) -> gboolean;

    //=========================================================================
    // XfconfInt16
    //=========================================================================
    pub fn xfconf_int16_get_type() -> GType;

    //=========================================================================
    // XfconfUint16
    //=========================================================================
    pub fn xfconf_uint16_get_type() -> GType;

    //=========================================================================
    // Other functions
    //=========================================================================
    pub fn xfconf_array_free(arr: *mut glib::GPtrArray);
    pub fn xfconf_init(error: *mut *mut glib::GError) -> gboolean;
    pub fn xfconf_list_channels() -> *mut *mut c_char;
    pub fn xfconf_named_struct_register(
        struct_name: *const c_char,
        n_members: c_uint,
        member_types: *const GType,
    );
    pub fn xfconf_g_property_bind(
        channel: *mut XfconfChannel,
        xfconf_property: *const c_char,
        xfconf_property_type: GType,
        object: *mut gobject::GObject,
        object_property: *const c_char,
    ) -> c_ulong;
    pub fn xfconf_g_property_bind_gdkcolor(
        channel: *mut XfconfChannel,
        xfconf_property: *const c_char,
        object: *mut gobject::GObject,
        object_property: *const c_char,
    ) -> c_ulong;
    pub fn xfconf_g_property_bind_gdkrgba(
        channel: *mut XfconfChannel,
        xfconf_property: *const c_char,
        object: *mut gobject::GObject,
        object_property: *const c_char,
    ) -> c_ulong;
    pub fn xfconf_g_property_unbind(id: c_ulong);
    pub fn xfconf_g_property_unbind_all(channel_or_object: *mut gobject::GObject);
    pub fn xfconf_g_property_unbind_by_property(
        channel: *mut XfconfChannel,
        xfconf_property: *const c_char,
        object: *mut gobject::GObject,
        object_property: *const c_char,
    );
    pub fn xfconf_shutdown();
    pub fn xfconf_g_value_get_int16(value: *const gobject::GValue) -> i16;
    pub fn xfconf_g_value_get_uint16(value: *const gobject::GValue) -> u16;
    pub fn xfconf_g_value_set_int16(value: *mut gobject::GValue, v_int16: i16);
    pub fn xfconf_g_value_set_uint16(value: *mut gobject::GValue, v_uint16: u16);

}
