// Generated by gir (https://github.com/gtk-rs/gir @ d7c0763cacbc)
// from ../../ev-girs (@ 46c15e591a1e+)
// from ../../gir-files (@ 20031a537e40)
// 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 cairo_sys as cairo;
use gdk_pixbuf_sys as gdk_pixbuf;
use gio_sys as gio;
use glib_sys as glib;
use gobject_sys as gobject;
use gtk_sys as gtk;
use papers_document_sys as papers_document;
use papers_view_sys as papers_view;

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

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

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

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PpsFindSidebarClass {
    pub base_class: adw::AdwBinClass,
}

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

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

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

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

pub type PpsMetadataClass = _PpsMetadataClass;

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PpsObjectIface {
    pub parent_iface: gobject::GTypeInterface,
}

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

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PpsObjectManagerClientClass {
    pub parent_class: gio::GDBusObjectManagerClientClass,
}

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

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

pub type PpsObjectManagerClientPrivate = _PpsObjectManagerClientPrivate;

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PpsObjectProxyClass {
    pub parent_class: gio::GDBusObjectProxyClass,
}

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

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

pub type PpsObjectProxyPrivate = _PpsObjectProxyPrivate;

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PpsObjectSkeletonClass {
    pub parent_class: gio::GDBusObjectSkeletonClass,
}

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

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

pub type PpsObjectSkeletonPrivate = _PpsObjectSkeletonPrivate;

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PpsPapersApplicationIface {
    pub parent_iface: gobject::GTypeInterface,
}

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

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PpsPapersApplicationProxyClass {
    pub parent_class: gio::GDBusProxyClass,
}

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

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

pub type PpsPapersApplicationProxyPrivate = _PpsPapersApplicationProxyPrivate;

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PpsPapersApplicationSkeletonClass {
    pub parent_class: gio::GDBusInterfaceSkeletonClass,
}

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

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

pub type PpsPapersApplicationSkeletonPrivate = _PpsPapersApplicationSkeletonPrivate;

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PpsProgressMessageAreaClass {
    pub parent_class: PpsMessageAreaClass,
}

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

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

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

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

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

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PpsSidebarAnnotationsClass {
    pub base_class: PpsSidebarPageClass,
    pub annot_activated:
        Option<unsafe extern "C" fn(*mut PpsSidebarAnnotations, *mut papers_document::PpsMapping)>,
}

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

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

pub type PpsSidebarAnnotationsPrivate = _PpsSidebarAnnotationsPrivate;

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PpsSidebarPageClass {
    pub parent_class: adw::AdwBinClass,
    pub support_document: Option<
        unsafe extern "C" fn(*mut PpsSidebarPage, *mut papers_document::PpsDocument) -> gboolean,
    >,
}

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

// Classes
#[derive(Copy, Clone)]
#[repr(C)]
pub struct PpsDocumentView {
    pub base_instance: adw::AdwBreakpointBin,
}

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

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PpsFindSidebar {
    pub base_instance: adw::AdwBin,
}

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

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PpsMessageArea {
    pub parent_instance: adw::AdwBin,
}

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

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

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

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PpsObjectManagerClient {
    pub parent_instance: gio::GDBusObjectManagerClient,
    pub priv_: *mut PpsObjectManagerClientPrivate,
}

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

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PpsObjectProxy {
    pub parent_instance: gio::GDBusObjectProxy,
    pub priv_: *mut PpsObjectProxyPrivate,
}

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

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PpsObjectSkeleton {
    pub parent_instance: gio::GDBusObjectSkeleton,
    pub priv_: *mut PpsObjectSkeletonPrivate,
}

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

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PpsPapersApplicationProxy {
    pub parent_instance: gio::GDBusProxy,
    pub priv_: *mut PpsPapersApplicationProxyPrivate,
}

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

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PpsPapersApplicationSkeleton {
    pub parent_instance: gio::GDBusInterfaceSkeleton,
    pub priv_: *mut PpsPapersApplicationSkeletonPrivate,
}

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

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PpsProgressMessageArea {
    pub parent_instance: PpsMessageArea,
}

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

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PpsSearchContext {
    pub parent_instance: gobject::GObject,
}

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

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PpsSearchResult {
    pub parent_instance: gobject::GObject,
}

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

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PpsSidebarAnnotations {
    pub parent_instance: PpsSidebarPage,
}

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

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PpsSidebarPage {
    pub parent_instance: adw::AdwBin,
}

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

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

impl ::std::fmt::Debug for PpsObject {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        write!(f, "PpsObject @ {self:p}")
    }
}

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

impl ::std::fmt::Debug for PpsPapersApplication {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        write!(f, "PpsPapersApplication @ {self:p}")
    }
}

#[link(name = "ppsshell-4.0")]
#[link(name = "ppsview-4.0")]
#[link(name = "ppsdocument-4.0")]
extern "C" {

    //=========================================================================
    // PpsDocumentView
    //=========================================================================
    pub fn pps_document_view_get_type() -> GType;
    pub fn pps_document_view_new() -> *mut PpsDocumentView;
    pub fn pps_document_view_close_handled(pps_doc_view: *mut PpsDocumentView) -> gboolean;
    pub fn pps_document_view_focus_view(pps_doc_view: *mut PpsDocumentView);
    pub fn pps_document_view_get_dbus_object_path(
        pps_doc_view: *mut PpsDocumentView,
    ) -> *const c_char;
    pub fn pps_document_view_get_header_bar(
        pps_doc_view: *mut PpsDocumentView,
    ) -> *mut adw::AdwHeaderBar;
    pub fn pps_document_view_get_metadata(pps_doc_view: *mut PpsDocumentView) -> *mut PpsMetadata;
    pub fn pps_document_view_get_model(
        pps_doc_view: *mut PpsDocumentView,
    ) -> *mut papers_view::PpsDocumentModel;
    pub fn pps_document_view_get_uri(pps_doc_view: *mut PpsDocumentView) -> *const c_char;
    pub fn pps_document_view_handle_annot_popup(
        pps_doc_view: *mut PpsDocumentView,
        annot: *mut papers_document::PpsAnnotation,
    );
    pub fn pps_document_view_is_empty(pps_doc_view: *mut PpsDocumentView) -> gboolean;
    pub fn pps_document_view_open_document(
        pps_doc_view: *mut PpsDocumentView,
        document: *mut papers_document::PpsDocument,
        metadata: *mut PpsMetadata,
        dest: *mut papers_document::PpsLinkDest,
    );
    pub fn pps_document_view_print_range(
        pps_doc_view: *mut PpsDocumentView,
        first_page: c_int,
        last_page: c_int,
    );
    pub fn pps_document_view_reload_document(
        pps_doc_view: *mut PpsDocumentView,
        document: *mut papers_document::PpsDocument,
    );
    pub fn pps_document_view_set_document(
        pps_doc_view: *mut PpsDocumentView,
        document: *mut papers_document::PpsDocument,
    );
    pub fn pps_document_view_set_filenames(
        pps_doc_view: *mut PpsDocumentView,
        display_name: *const c_char,
        edit_name: *const c_char,
    );
    pub fn pps_document_view_set_fullscreen_mode(
        pps_doc_view: *mut PpsDocumentView,
        fullscreened: gboolean,
    );
    pub fn pps_document_view_set_inverted_colors(
        pps_doc_view: *mut PpsDocumentView,
        inverted: gboolean,
    );

    //=========================================================================
    // PpsFindSidebar
    //=========================================================================
    pub fn pps_find_sidebar_get_type() -> GType;
    pub fn pps_find_sidebar_new() -> *mut gtk::GtkWidget;
    pub fn pps_find_sidebar_clear(find_sidebar: *mut PpsFindSidebar);
    pub fn pps_find_sidebar_next(find_sidebar: *mut PpsFindSidebar);
    pub fn pps_find_sidebar_previous(find_sidebar: *mut PpsFindSidebar);
    pub fn pps_find_sidebar_restart(find_sidebar: *mut PpsFindSidebar, page: c_int);
    pub fn pps_find_sidebar_set_search_context(
        find_sidebar: *mut PpsFindSidebar,
        context: *mut PpsSearchContext,
    );
    pub fn pps_find_sidebar_update(find_sidebar: *mut PpsFindSidebar);

    //=========================================================================
    // PpsMessageArea
    //=========================================================================
    pub fn pps_message_area_get_type() -> GType;
    pub fn pps_message_area_new(
        type_: gtk::GtkMessageType,
        text: *const c_char,
        first_button_text: *const c_char,
        ...
    ) -> *mut gtk::GtkWidget;
    pub fn pps_message_area_add_button(
        area: *mut PpsMessageArea,
        first_button_text: *const c_char,
        response_id: c_int,
    );
    pub fn pps_message_area_get_info_bar(area: *mut PpsMessageArea) -> *mut gtk::GtkInfoBar;
    pub fn pps_message_area_set_image(area: *mut PpsMessageArea, image: *mut gtk::GtkWidget);
    pub fn pps_message_area_set_image_from_icon_name(
        area: *mut PpsMessageArea,
        icon_name: *const c_char,
    );
    pub fn pps_message_area_set_secondary_text(area: *mut PpsMessageArea, str: *const c_char);
    pub fn pps_message_area_set_text(area: *mut PpsMessageArea, str: *const c_char);

    //=========================================================================
    // PpsMetadata
    //=========================================================================
    pub fn pps_metadata_get_type() -> GType;
    pub fn pps_metadata_new(file: *mut gio::GFile) -> *mut PpsMetadata;
    pub fn pps_metadata_is_file_supported(file: *mut gio::GFile) -> gboolean;
    pub fn pps_metadata_get_boolean(
        metadata: *mut PpsMetadata,
        key: *const c_char,
        value: *mut gboolean,
    ) -> gboolean;
    pub fn pps_metadata_get_double(
        metadata: *mut PpsMetadata,
        key: *const c_char,
        value: *mut c_double,
    ) -> gboolean;
    pub fn pps_metadata_get_int(
        metadata: *mut PpsMetadata,
        key: *const c_char,
        value: *mut c_int,
    ) -> gboolean;
    pub fn pps_metadata_get_string(
        metadata: *mut PpsMetadata,
        key: *const c_char,
        value: *mut *const c_char,
    ) -> gboolean;
    pub fn pps_metadata_has_key(metadata: *mut PpsMetadata, key: *const c_char) -> gboolean;
    pub fn pps_metadata_is_empty(metadata: *mut PpsMetadata) -> gboolean;
    pub fn pps_metadata_set_boolean(
        metadata: *mut PpsMetadata,
        key: *const c_char,
        value: gboolean,
    ) -> gboolean;
    pub fn pps_metadata_set_double(
        metadata: *mut PpsMetadata,
        key: *const c_char,
        value: c_double,
    ) -> gboolean;
    pub fn pps_metadata_set_int(
        metadata: *mut PpsMetadata,
        key: *const c_char,
        value: c_int,
    ) -> gboolean;
    pub fn pps_metadata_set_string(
        metadata: *mut PpsMetadata,
        key: *const c_char,
        value: *const c_char,
    ) -> gboolean;

    //=========================================================================
    // PpsObjectManagerClient
    //=========================================================================
    pub fn pps_object_manager_client_get_type() -> GType;
    pub fn pps_object_manager_client_new_finish(
        res: *mut gio::GAsyncResult,
        error: *mut *mut glib::GError,
    ) -> *mut PpsObjectManagerClient;
    pub fn pps_object_manager_client_new_for_bus_finish(
        res: *mut gio::GAsyncResult,
        error: *mut *mut glib::GError,
    ) -> *mut PpsObjectManagerClient;
    pub fn pps_object_manager_client_new_for_bus_sync(
        bus_type: gio::GBusType,
        flags: gio::GDBusObjectManagerClientFlags,
        name: *const c_char,
        object_path: *const c_char,
        cancellable: *mut gio::GCancellable,
        error: *mut *mut glib::GError,
    ) -> *mut PpsObjectManagerClient;
    pub fn pps_object_manager_client_new_sync(
        connection: *mut gio::GDBusConnection,
        flags: gio::GDBusObjectManagerClientFlags,
        name: *const c_char,
        object_path: *const c_char,
        cancellable: *mut gio::GCancellable,
        error: *mut *mut glib::GError,
    ) -> *mut PpsObjectManagerClient;
    pub fn pps_object_manager_client_get_proxy_type(
        manager: *mut gio::GDBusObjectManagerClient,
        object_path: *const c_char,
        interface_name: *const c_char,
        user_data: gpointer,
    ) -> GType;
    pub fn pps_object_manager_client_new(
        connection: *mut gio::GDBusConnection,
        flags: gio::GDBusObjectManagerClientFlags,
        name: *const c_char,
        object_path: *const c_char,
        cancellable: *mut gio::GCancellable,
        callback: gio::GAsyncReadyCallback,
        user_data: gpointer,
    );
    pub fn pps_object_manager_client_new_for_bus(
        bus_type: gio::GBusType,
        flags: gio::GDBusObjectManagerClientFlags,
        name: *const c_char,
        object_path: *const c_char,
        cancellable: *mut gio::GCancellable,
        callback: gio::GAsyncReadyCallback,
        user_data: gpointer,
    );

    //=========================================================================
    // PpsObjectProxy
    //=========================================================================
    pub fn pps_object_proxy_get_type() -> GType;
    pub fn pps_object_proxy_new(
        connection: *mut gio::GDBusConnection,
        object_path: *const c_char,
    ) -> *mut PpsObjectProxy;

    //=========================================================================
    // PpsObjectSkeleton
    //=========================================================================
    pub fn pps_object_skeleton_get_type() -> GType;
    pub fn pps_object_skeleton_new(object_path: *const c_char) -> *mut PpsObjectSkeleton;
    pub fn pps_object_skeleton_set_papers_application(
        object: *mut PpsObjectSkeleton,
        interface_: *mut PpsPapersApplication,
    );

    //=========================================================================
    // PpsPapersApplicationProxy
    //=========================================================================
    pub fn pps_papers_application_proxy_get_type() -> GType;
    pub fn pps_papers_application_proxy_new_finish(
        res: *mut gio::GAsyncResult,
        error: *mut *mut glib::GError,
    ) -> *mut PpsPapersApplicationProxy;
    pub fn pps_papers_application_proxy_new_for_bus_finish(
        res: *mut gio::GAsyncResult,
        error: *mut *mut glib::GError,
    ) -> *mut PpsPapersApplicationProxy;
    pub fn pps_papers_application_proxy_new_for_bus_sync(
        bus_type: gio::GBusType,
        flags: gio::GDBusProxyFlags,
        name: *const c_char,
        object_path: *const c_char,
        cancellable: *mut gio::GCancellable,
        error: *mut *mut glib::GError,
    ) -> *mut PpsPapersApplicationProxy;
    pub fn pps_papers_application_proxy_new_sync(
        connection: *mut gio::GDBusConnection,
        flags: gio::GDBusProxyFlags,
        name: *const c_char,
        object_path: *const c_char,
        cancellable: *mut gio::GCancellable,
        error: *mut *mut glib::GError,
    ) -> *mut PpsPapersApplicationProxy;
    pub fn pps_papers_application_proxy_new(
        connection: *mut gio::GDBusConnection,
        flags: gio::GDBusProxyFlags,
        name: *const c_char,
        object_path: *const c_char,
        cancellable: *mut gio::GCancellable,
        callback: gio::GAsyncReadyCallback,
        user_data: gpointer,
    );
    pub fn pps_papers_application_proxy_new_for_bus(
        bus_type: gio::GBusType,
        flags: gio::GDBusProxyFlags,
        name: *const c_char,
        object_path: *const c_char,
        cancellable: *mut gio::GCancellable,
        callback: gio::GAsyncReadyCallback,
        user_data: gpointer,
    );

    //=========================================================================
    // PpsPapersApplicationSkeleton
    //=========================================================================
    pub fn pps_papers_application_skeleton_get_type() -> GType;
    pub fn pps_papers_application_skeleton_new() -> *mut PpsPapersApplicationSkeleton;

    //=========================================================================
    // PpsProgressMessageArea
    //=========================================================================
    pub fn pps_progress_message_area_get_type() -> GType;
    pub fn pps_progress_message_area_new(
        icon_name: *const c_char,
        text: *const c_char,
    ) -> *mut gtk::GtkWidget;
    pub fn pps_progress_message_area_set_fraction(
        area: *mut PpsProgressMessageArea,
        fraction: c_double,
    );
    pub fn pps_progress_message_area_set_status(
        area: *mut PpsProgressMessageArea,
        str: *const c_char,
    );

    //=========================================================================
    // PpsSearchContext
    //=========================================================================
    pub fn pps_search_context_get_type() -> GType;
    pub fn pps_search_context_new(
        model: *mut papers_view::PpsDocumentModel,
    ) -> *mut PpsSearchContext;
    pub fn pps_search_context_get_options(
        context: *mut PpsSearchContext,
    ) -> papers_document::PpsFindOptions;
    pub fn pps_search_context_get_result_model(
        context: *mut PpsSearchContext,
    ) -> *mut gio::GListModel;
    pub fn pps_search_context_get_search_term(context: *mut PpsSearchContext) -> *const c_char;
    pub fn pps_search_context_restart(context: *mut PpsSearchContext);
    pub fn pps_search_context_select_result(
        context: *mut PpsSearchContext,
        result: *mut PpsSearchResult,
    );
    pub fn pps_search_context_set_options(
        context: *mut PpsSearchContext,
        options: papers_document::PpsFindOptions,
    );
    pub fn pps_search_context_set_search_term(
        context: *mut PpsSearchContext,
        search_term: *const c_char,
    );

    //=========================================================================
    // PpsSearchResult
    //=========================================================================
    pub fn pps_search_result_get_type() -> GType;
    pub fn pps_search_result_new(
        markup: *mut c_char,
        label: *mut c_char,
        page: c_uint,
        index: c_uint,
    ) -> *mut PpsSearchResult;
    pub fn pps_search_result_get_index(self_: *mut PpsSearchResult) -> c_uint;
    pub fn pps_search_result_get_label(self_: *mut PpsSearchResult) -> *const c_char;
    pub fn pps_search_result_get_markup(self_: *mut PpsSearchResult) -> *const c_char;
    pub fn pps_search_result_get_page(self_: *mut PpsSearchResult) -> c_uint;

    //=========================================================================
    // PpsSidebarAnnotations
    //=========================================================================
    pub fn pps_sidebar_annotations_get_type() -> GType;
    pub fn pps_sidebar_annotations_new() -> *mut gtk::GtkWidget;
    pub fn pps_sidebar_annotations_annot_added(
        sidebar_annots: *mut PpsSidebarAnnotations,
        annot: *mut papers_document::PpsAnnotation,
    );
    pub fn pps_sidebar_annotations_annot_removed(sidebar_annots: *mut PpsSidebarAnnotations);

    //=========================================================================
    // PpsSidebarPage
    //=========================================================================
    pub fn pps_sidebar_page_get_type() -> GType;
    pub fn pps_sidebar_page_get_document_model(
        sidebar_page: *mut PpsSidebarPage,
    ) -> *mut papers_view::PpsDocumentModel;
    pub fn pps_sidebar_page_navigate_to_view(sidebar_page: *mut PpsSidebarPage);
    pub fn pps_sidebar_page_support_document(
        sidebar_page: *mut PpsSidebarPage,
        document: *mut papers_document::PpsDocument,
    ) -> gboolean;

    //=========================================================================
    // PpsObject
    //=========================================================================
    pub fn pps_object_get_type() -> GType;
    pub fn pps_object_get_papers_application(object: *mut PpsObject) -> *mut PpsPapersApplication;
    pub fn pps_object_peek_papers_application(object: *mut PpsObject) -> *mut PpsPapersApplication;

    //=========================================================================
    // PpsPapersApplication
    //=========================================================================
    pub fn pps_papers_application_get_type() -> GType;
    pub fn pps_papers_application_interface_info() -> *mut gio::GDBusInterfaceInfo;
    pub fn pps_papers_application_override_properties(
        klass: *mut gobject::GObjectClass,
        property_id_begin: c_uint,
    ) -> c_uint;

    //=========================================================================
    // Other functions
    //=========================================================================
    pub fn pps_gdk_pixbuf_format_by_extension(
        uri: *const c_char,
    ) -> *mut gdk_pixbuf::GdkPixbufFormat;
    pub fn pps_get_resource() -> *mut gio::GResource;
    pub fn pps_keyring_lookup_password(uri: *const c_char) -> *mut c_char;
    pub fn pps_keyring_save_password(
        uri: *const c_char,
        password: *const c_char,
        flags: gio::GPasswordSave,
    ) -> gboolean;
    pub fn pps_print_region_contents(region: *mut cairo::cairo_region_t);
    pub fn pps_spawn(uri: *const c_char, dest: *mut papers_document::PpsLinkDest);

}
