// This file was generated by gir (https://github.com/gtk-rs/gir)
// from ../../gir-files
// from ../../pps-girs
// 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_sys as gdk;
use gio_sys as gio;
use glib_sys as glib;
use gobject_sys as gobject;
use gtk_sys as gtk;
use pango_sys as pango;
use papers_document_sys as papers_document;

#[cfg(unix)]
#[allow(unused_imports)]
use libc::{dev_t, gid_t, pid_t, socklen_t, uid_t};
#[allow(unused_imports)]
use libc::{intptr_t, off_t, size_t, ssize_t, time_t, uintptr_t, FILE};
#[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::{gboolean, gconstpointer, gpointer, GType};

// Enums
pub type PpsAttachmentContextError = c_int;
pub const PPS_ATTACHMENT_CONTEXT_ERROR_NOT_IMPLEMENTED: PpsAttachmentContextError = 0;
pub const PPS_ATTACHMENT_CONTEXT_ERROR_EMPTY_INPUT: PpsAttachmentContextError = 1;

pub type PpsJobPriority = c_int;
pub const PPS_JOB_PRIORITY_URGENT: PpsJobPriority = 0;
pub const PPS_JOB_PRIORITY_HIGH: PpsJobPriority = 1;
pub const PPS_JOB_PRIORITY_LOW: PpsJobPriority = 2;
pub const PPS_JOB_PRIORITY_NONE: PpsJobPriority = 3;
pub const PPS_JOB_N_PRIORITIES: PpsJobPriority = 4;

pub type PpsPageLayout = c_int;
pub const PPS_PAGE_LAYOUT_SINGLE: PpsPageLayout = 0;
pub const PPS_PAGE_LAYOUT_DUAL: PpsPageLayout = 1;
pub const PPS_PAGE_LAYOUT_AUTOMATIC: PpsPageLayout = 2;

pub type PpsSizingMode = c_int;
pub const PPS_SIZING_FIT_PAGE: PpsSizingMode = 0;
pub const PPS_SIZING_FIT_WIDTH: PpsSizingMode = 1;
pub const PPS_SIZING_FREE: PpsSizingMode = 2;
pub const PPS_SIZING_AUTOMATIC: PpsSizingMode = 3;

// Flags
pub type PpsAnnotationEditingState = c_uint;
pub const PPS_ANNOTATION_EDITING_STATE_NONE: PpsAnnotationEditingState = 0;
pub const PPS_ANNOTATION_EDITING_STATE_INK: PpsAnnotationEditingState = 1;
pub const PPS_ANNOTATION_EDITING_STATE_TEXT: PpsAnnotationEditingState = 2;

pub type PpsJobPageDataFlags = c_uint;
pub const PPS_PAGE_DATA_INCLUDE_NONE: PpsJobPageDataFlags = 0;
pub const PPS_PAGE_DATA_INCLUDE_LINKS: PpsJobPageDataFlags = 1;
pub const PPS_PAGE_DATA_INCLUDE_TEXT: PpsJobPageDataFlags = 2;
pub const PPS_PAGE_DATA_INCLUDE_TEXT_MAPPING: PpsJobPageDataFlags = 4;
pub const PPS_PAGE_DATA_INCLUDE_TEXT_LAYOUT: PpsJobPageDataFlags = 8;
pub const PPS_PAGE_DATA_INCLUDE_TEXT_ATTRS: PpsJobPageDataFlags = 16;
pub const PPS_PAGE_DATA_INCLUDE_TEXT_LOG_ATTRS: PpsJobPageDataFlags = 32;
pub const PPS_PAGE_DATA_INCLUDE_IMAGES: PpsJobPageDataFlags = 64;
pub const PPS_PAGE_DATA_INCLUDE_FORMS: PpsJobPageDataFlags = 128;
pub const PPS_PAGE_DATA_INCLUDE_MEDIA: PpsJobPageDataFlags = 256;
pub const PPS_PAGE_DATA_INCLUDE_ALL: PpsJobPageDataFlags = 511;

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

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

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

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

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

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

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PpsHistoryClass {
    pub parent_class: gobject::GObjectClass,
    pub changed: Option<unsafe extern "C" fn(*mut PpsHistory)>,
    pub activate_link: Option<unsafe extern "C" fn(*mut PpsHistory, *mut papers_document::PpsLink)>,
}

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

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

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

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

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

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PpsJobClass {
    pub parent_class: gobject::GObjectClass,
    pub run: Option<unsafe extern "C" fn(*mut PpsJob)>,
    pub cancelled: Option<unsafe extern "C" fn(*mut PpsJob)>,
    pub finished: Option<unsafe extern "C" fn(*mut PpsJob)>,
}

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

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

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

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PpsJobFindClass {
    pub parent_class: PpsJobClass,
    pub updated: Option<unsafe extern "C" fn(*mut PpsJobFind, c_int)>,
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pub type PpsPrintOperationClass = _PpsPrintOperationClass;

#[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 PpsUndoContextClass {
    pub parent_class: gobject::GObjectClass,
}

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

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PpsUndoHandlerInterface {
    pub parent_iface: gobject::GTypeInterface,
    pub undo: Option<unsafe extern "C" fn(*mut PpsUndoHandler, gpointer)>,
    pub free_action: Option<unsafe extern "C" fn(gpointer)>,
}

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

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

pub type PpsViewClass = _PpsViewClass;

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

pub type PpsViewPresentationClass = _PpsViewPresentationClass;

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PpsViewSelection {
    pub page: c_int,
    pub rect: papers_document::PpsRectangle,
    pub covered_region: *mut cairo::cairo_region_t,
    pub style: papers_document::PpsSelectionStyle,
}

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

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

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

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

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

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

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

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

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

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

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

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PpsJobAnnots {
    pub parent: PpsJob,
}

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

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PpsJobAttachments {
    pub parent: PpsJob,
}

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

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PpsJobExport {
    pub parent: PpsJob,
}

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

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PpsJobFind {
    pub parent: PpsJob,
    pub start_page: c_int,
    pub n_pages: c_int,
    pub pages: *mut *mut glib::GList,
    pub text: *mut c_char,
    pub has_results: gboolean,
    pub options: papers_document::PpsFindOptions,
}

impl ::std::fmt::Debug for PpsJobFind {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("PpsJobFind @ {self:p}"))
            .field("parent", &self.parent)
            .field("start_page", &self.start_page)
            .field("n_pages", &self.n_pages)
            .field("pages", &self.pages)
            .field("text", &self.text)
            .field("has_results", &self.has_results)
            .field("options", &self.options)
            .finish()
    }
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PpsJobFonts {
    pub parent: PpsJob,
}

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

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PpsJobLayers {
    pub parent: PpsJob,
}

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

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PpsJobLinks {
    pub parent: PpsJob,
}

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

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PpsJobLoad {
    pub parent: PpsJob,
}

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

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PpsJobPageData {
    pub parent: PpsJob,
    pub page: c_int,
    pub flags: PpsJobPageDataFlags,
    pub link_mapping: *mut papers_document::PpsMappingList,
    pub image_mapping: *mut papers_document::PpsMappingList,
    pub form_field_mapping: *mut papers_document::PpsMappingList,
    pub media_mapping: *mut papers_document::PpsMappingList,
    pub text_mapping: *mut cairo::cairo_region_t,
    pub text: *mut c_char,
    pub text_layout: *mut papers_document::PpsRectangle,
    pub text_layout_length: c_uint,
    pub text_attrs: *mut pango::PangoAttrList,
    pub text_log_attrs: *mut pango::PangoLogAttr,
    pub text_log_attrs_length: c_ulong,
}

impl ::std::fmt::Debug for PpsJobPageData {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("PpsJobPageData @ {self:p}"))
            .field("parent", &self.parent)
            .field("page", &self.page)
            .field("flags", &self.flags)
            .field("link_mapping", &self.link_mapping)
            .field("image_mapping", &self.image_mapping)
            .field("form_field_mapping", &self.form_field_mapping)
            .field("media_mapping", &self.media_mapping)
            .field("text_mapping", &self.text_mapping)
            .field("text", &self.text)
            .field("text_layout", &self.text_layout)
            .field("text_layout_length", &self.text_layout_length)
            .field("text_attrs", &self.text_attrs)
            .field("text_log_attrs", &self.text_log_attrs)
            .field("text_log_attrs_length", &self.text_log_attrs_length)
            .finish()
    }
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PpsJobPrint {
    pub parent: PpsJob,
}

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

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PpsJobRenderTexture {
    pub parent: PpsJob,
    pub page: c_int,
    pub rotation: c_int,
    pub scale: c_double,
    pub page_ready: gboolean,
    pub target_width: c_int,
    pub target_height: c_int,
    pub texture: *mut gdk::GdkTexture,
    pub include_selection: gboolean,
    pub selection: *mut gdk::GdkTexture,
    pub selection_region: *mut cairo::cairo_region_t,
    pub selection_points: papers_document::PpsRectangle,
    pub selection_style: papers_document::PpsSelectionStyle,
    pub base: gdk::GdkRGBA,
    pub text: gdk::GdkRGBA,
    pub annot_flags: papers_document::PpsRenderAnnotsFlags,
}

impl ::std::fmt::Debug for PpsJobRenderTexture {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("PpsJobRenderTexture @ {self:p}"))
            .field("parent", &self.parent)
            .field("page", &self.page)
            .field("rotation", &self.rotation)
            .field("scale", &self.scale)
            .field("page_ready", &self.page_ready)
            .field("target_width", &self.target_width)
            .field("target_height", &self.target_height)
            .field("texture", &self.texture)
            .field("include_selection", &self.include_selection)
            .field("selection", &self.selection)
            .field("selection_region", &self.selection_region)
            .field("selection_points", &self.selection_points)
            .field("selection_style", &self.selection_style)
            .field("base", &self.base)
            .field("text", &self.text)
            .field("annot_flags", &self.annot_flags)
            .finish()
    }
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PpsJobSave {
    pub parent: PpsJob,
}

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

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PpsJobSignatures {
    pub parent: PpsJob,
}

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

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PpsJobThumbnailTexture {
    pub parent: PpsJob,
}

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

#[repr(C)]
#[allow(dead_code)]
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()
    }
}

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

impl ::std::fmt::Debug for PpsPrintOperation {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("PpsPrintOperation @ {self:p}"))
            .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()
    }
}

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

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

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PpsView {
    pub parent_instance: gtk::GtkWidget,
}

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

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PpsViewPresentation {
    pub parent_instance: gtk::GtkWidget,
}

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

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

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

extern "C" {

    //=========================================================================
    // PpsAttachmentContextError
    //=========================================================================
    pub fn pps_attachment_context_error_get_type() -> GType;
    pub fn pps_attachment_context_error_quark() -> glib::GQuark;

    //=========================================================================
    // PpsJobPriority
    //=========================================================================
    pub fn pps_job_priority_get_type() -> GType;

    //=========================================================================
    // PpsPageLayout
    //=========================================================================
    pub fn pps_page_layout_get_type() -> GType;

    //=========================================================================
    // PpsSizingMode
    //=========================================================================
    pub fn pps_sizing_mode_get_type() -> GType;

    //=========================================================================
    // PpsAnnotationEditingState
    //=========================================================================
    pub fn pps_annotation_editing_state_get_type() -> GType;

    //=========================================================================
    // PpsJobPageDataFlags
    //=========================================================================
    pub fn pps_job_page_data_flags_get_type() -> GType;

    //=========================================================================
    // PpsViewSelection
    //=========================================================================
    pub fn pps_view_selection_get_type() -> GType;
    pub fn pps_view_selection_copy(selection: *mut PpsViewSelection) -> *mut PpsViewSelection;
    pub fn pps_view_selection_free(selection: *mut PpsViewSelection);

    //=========================================================================
    // PpsAnnotationsContext
    //=========================================================================
    pub fn pps_annotations_context_get_type() -> GType;
    pub fn pps_annotations_context_new(
        model: *mut PpsDocumentModel,
        undo_context: *mut PpsUndoContext,
    ) -> *mut PpsAnnotationsContext;
    #[cfg(feature = "v48")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v48")))]
    pub fn pps_annotations_context_add_annotation_sync(
        self_: *mut PpsAnnotationsContext,
        page_index: c_int,
        type_: papers_document::PpsAnnotationType,
        start: *const papers_document::PpsPoint,
        end: *const papers_document::PpsPoint,
        color: *const gdk::GdkRGBA,
        user_data: gpointer,
    ) -> *mut papers_document::PpsAnnotation;
    #[cfg(feature = "v49")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v49")))]
    pub fn pps_annotations_context_get_annot_at_doc_point(
        self_: *mut PpsAnnotationsContext,
        doc_point: *const papers_document::PpsDocumentPoint,
    ) -> *mut papers_document::PpsAnnotation;
    pub fn pps_annotations_context_get_annots_model(
        self_: *mut PpsAnnotationsContext,
    ) -> *mut gio::GListModel;
    pub fn pps_annotations_context_remove_annotation(
        self_: *mut PpsAnnotationsContext,
        annot: *mut papers_document::PpsAnnotation,
    );
    pub fn pps_annotations_context_set_color(
        self_: *mut PpsAnnotationsContext,
        color: *const gdk::GdkRGBA,
    );

    //=========================================================================
    // PpsAttachmentContext
    //=========================================================================
    pub fn pps_attachment_context_get_type() -> GType;
    pub fn pps_attachment_context_new(model: *mut PpsDocumentModel) -> *mut PpsAttachmentContext;
    pub fn pps_attachment_context_get_model(
        context: *mut PpsAttachmentContext,
    ) -> *mut gio::GListModel;
    pub fn pps_attachment_context_save_attachments_async(
        context: *mut PpsAttachmentContext,
        attachments: *mut gio::GListModel,
        parent: *mut gtk::GtkWindow,
        cancellable: *mut gio::GCancellable,
        callback: gio::GAsyncReadyCallback,
        user_data: gpointer,
    );
    pub fn pps_attachment_context_save_attachments_finish(
        context: *mut PpsAttachmentContext,
        result: *mut gio::GAsyncResult,
        error: *mut *mut glib::GError,
    ) -> gboolean;

    //=========================================================================
    // PpsDocumentModel
    //=========================================================================
    pub fn pps_document_model_get_type() -> GType;
    pub fn pps_document_model_new() -> *mut PpsDocumentModel;
    pub fn pps_document_model_new_with_document(
        document: *mut papers_document::PpsDocument,
    ) -> *mut PpsDocumentModel;
    #[cfg(feature = "v48")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v48")))]
    pub fn pps_document_model_get_annotation_editing_state(
        model: *mut PpsDocumentModel,
    ) -> PpsAnnotationEditingState;
    pub fn pps_document_model_get_continuous(model: *mut PpsDocumentModel) -> gboolean;
    pub fn pps_document_model_get_document(
        model: *mut PpsDocumentModel,
    ) -> *mut papers_document::PpsDocument;
    pub fn pps_document_model_get_dual_page_odd_pages_left(
        model: *mut PpsDocumentModel,
    ) -> gboolean;
    pub fn pps_document_model_get_inverted_colors(model: *mut PpsDocumentModel) -> gboolean;
    pub fn pps_document_model_get_max_scale(model: *mut PpsDocumentModel) -> c_double;
    pub fn pps_document_model_get_min_scale(model: *mut PpsDocumentModel) -> c_double;
    pub fn pps_document_model_get_page(model: *mut PpsDocumentModel) -> c_int;
    pub fn pps_document_model_get_page_layout(model: *mut PpsDocumentModel) -> PpsPageLayout;
    pub fn pps_document_model_get_rotation(model: *mut PpsDocumentModel) -> c_int;
    pub fn pps_document_model_get_rtl(model: *mut PpsDocumentModel) -> gboolean;
    pub fn pps_document_model_get_scale(model: *mut PpsDocumentModel) -> c_double;
    pub fn pps_document_model_get_sizing_mode(model: *mut PpsDocumentModel) -> PpsSizingMode;
    #[cfg(feature = "v48")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v48")))]
    pub fn pps_document_model_set_annotation_editing_state(
        model: *mut PpsDocumentModel,
        state: PpsAnnotationEditingState,
    );
    pub fn pps_document_model_set_continuous(model: *mut PpsDocumentModel, continuous: gboolean);
    pub fn pps_document_model_set_document(
        model: *mut PpsDocumentModel,
        document: *mut papers_document::PpsDocument,
    );
    pub fn pps_document_model_set_dual_page_odd_pages_left(
        model: *mut PpsDocumentModel,
        odd_left: gboolean,
    );
    pub fn pps_document_model_set_inverted_colors(
        model: *mut PpsDocumentModel,
        inverted_colors: gboolean,
    );
    pub fn pps_document_model_set_max_scale(model: *mut PpsDocumentModel, max_scale: c_double);
    pub fn pps_document_model_set_min_scale(model: *mut PpsDocumentModel, min_scale: c_double);
    pub fn pps_document_model_set_page(model: *mut PpsDocumentModel, page: c_int);
    pub fn pps_document_model_set_page_by_label(
        model: *mut PpsDocumentModel,
        page_label: *const c_char,
    );
    pub fn pps_document_model_set_page_layout(model: *mut PpsDocumentModel, layout: PpsPageLayout);
    pub fn pps_document_model_set_rotation(model: *mut PpsDocumentModel, rotation: c_int);
    pub fn pps_document_model_set_rtl(model: *mut PpsDocumentModel, rtl: gboolean);
    pub fn pps_document_model_set_scale(model: *mut PpsDocumentModel, scale: c_double);
    pub fn pps_document_model_set_sizing_mode(model: *mut PpsDocumentModel, mode: PpsSizingMode);

    //=========================================================================
    // PpsHistory
    //=========================================================================
    pub fn pps_history_get_type() -> GType;
    pub fn pps_history_new(model: *mut PpsDocumentModel) -> *mut PpsHistory;
    pub fn pps_history_add_link(history: *mut PpsHistory, link: *mut papers_document::PpsLink);
    pub fn pps_history_add_page(history: *mut PpsHistory, page: c_int);
    pub fn pps_history_can_go_back(history: *mut PpsHistory) -> gboolean;
    pub fn pps_history_can_go_forward(history: *mut PpsHistory) -> gboolean;
    pub fn pps_history_freeze(history: *mut PpsHistory);
    pub fn pps_history_get_back_list(history: *mut PpsHistory) -> *mut glib::GList;
    pub fn pps_history_get_forward_list(history: *mut PpsHistory) -> *mut glib::GList;
    pub fn pps_history_go_back(history: *mut PpsHistory);
    pub fn pps_history_go_forward(history: *mut PpsHistory);
    pub fn pps_history_go_to_link(
        history: *mut PpsHistory,
        link: *mut papers_document::PpsLink,
    ) -> gboolean;
    pub fn pps_history_is_frozen(history: *mut PpsHistory) -> gboolean;
    pub fn pps_history_thaw(history: *mut PpsHistory);

    //=========================================================================
    // PpsJob
    //=========================================================================
    pub fn pps_job_get_type() -> GType;
    pub fn pps_job_scheduler_wait();
    pub fn pps_job_cancel(job: *mut PpsJob);
    pub fn pps_job_failed(
        job: *mut PpsJob,
        domain: glib::GQuark,
        code: c_int,
        format: *const c_char,
        ...
    );
    pub fn pps_job_failed_from_error(job: *mut PpsJob, error: *mut glib::GError);
    pub fn pps_job_get_cancellable(job: *mut PpsJob) -> *mut gio::GCancellable;
    pub fn pps_job_get_document(job: *mut PpsJob) -> *mut papers_document::PpsDocument;
    pub fn pps_job_is_finished(job: *mut PpsJob) -> gboolean;
    pub fn pps_job_is_succeeded(job: *mut PpsJob, error: *mut *mut glib::GError) -> gboolean;
    pub fn pps_job_reset(job: *mut PpsJob);
    pub fn pps_job_run(job: *mut PpsJob);
    pub fn pps_job_scheduler_push_job(job: *mut PpsJob, priority: PpsJobPriority);
    pub fn pps_job_scheduler_update_job(job: *mut PpsJob, priority: PpsJobPriority);
    pub fn pps_job_succeeded(job: *mut PpsJob);

    //=========================================================================
    // PpsJobAnnots
    //=========================================================================
    pub fn pps_job_annots_get_type() -> GType;
    pub fn pps_job_annots_new(document: *mut papers_document::PpsDocument) -> *mut PpsJob;
    pub fn pps_job_annots_get_annots(job: *mut PpsJobAnnots) -> *mut glib::GList;

    //=========================================================================
    // PpsJobAttachments
    //=========================================================================
    pub fn pps_job_attachments_get_type() -> GType;
    pub fn pps_job_attachments_new(document: *mut papers_document::PpsDocument) -> *mut PpsJob;
    pub fn pps_job_attachments_get_attachments(
        job_attachments: *mut PpsJobAttachments,
    ) -> *mut glib::GList;

    //=========================================================================
    // PpsJobExport
    //=========================================================================
    pub fn pps_job_export_get_type() -> GType;
    pub fn pps_job_export_new(document: *mut papers_document::PpsDocument) -> *mut PpsJob;
    pub fn pps_job_export_set_page(job: *mut PpsJobExport, page: c_int);

    //=========================================================================
    // PpsJobFind
    //=========================================================================
    pub fn pps_job_find_get_type() -> GType;
    pub fn pps_job_find_new(
        document: *mut papers_document::PpsDocument,
        start_page: c_int,
        n_pages: c_int,
        text: *const c_char,
        options: papers_document::PpsFindOptions,
    ) -> *mut PpsJob;
    pub fn pps_job_find_get_n_main_results(job: *mut PpsJobFind, page: c_int) -> c_int;
    pub fn pps_job_find_get_options(job: *mut PpsJobFind) -> papers_document::PpsFindOptions;
    pub fn pps_job_find_get_results(job: *mut PpsJobFind) -> *mut *mut glib::GList;
    pub fn pps_job_find_has_results(job: *mut PpsJobFind) -> gboolean;

    //=========================================================================
    // PpsJobFonts
    //=========================================================================
    pub fn pps_job_fonts_get_type() -> GType;
    pub fn pps_job_fonts_new(document: *mut papers_document::PpsDocument) -> *mut PpsJob;

    //=========================================================================
    // PpsJobLayers
    //=========================================================================
    pub fn pps_job_layers_get_type() -> GType;
    pub fn pps_job_layers_new(document: *mut papers_document::PpsDocument) -> *mut PpsJob;
    pub fn pps_job_layers_get_model(job_layers: *mut PpsJobLayers) -> *mut gio::GListModel;

    //=========================================================================
    // PpsJobLinks
    //=========================================================================
    pub fn pps_job_links_get_type() -> GType;
    pub fn pps_job_links_new(document: *mut papers_document::PpsDocument) -> *mut PpsJob;
    pub fn pps_job_links_get_model(job: *mut PpsJobLinks) -> *mut gio::GListModel;

    //=========================================================================
    // PpsJobLoad
    //=========================================================================
    pub fn pps_job_load_get_type() -> GType;
    pub fn pps_job_load_new() -> *mut PpsJob;
    #[cfg(feature = "v46")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v46")))]
    pub fn pps_job_load_get_loaded_document(
        job: *mut PpsJobLoad,
    ) -> *mut papers_document::PpsDocument;
    pub fn pps_job_load_get_password(job: *mut PpsJobLoad) -> *const c_char;
    pub fn pps_job_load_get_password_save(job: *mut PpsJobLoad) -> gio::GPasswordSave;
    #[cfg(feature = "v46")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v46")))]
    pub fn pps_job_load_set_fd(
        job: *mut PpsJobLoad,
        fd: c_int,
        mime_type: *const c_char,
        error: *mut *mut glib::GError,
    ) -> gboolean;
    pub fn pps_job_load_set_password(job: *mut PpsJobLoad, password: *const c_char);
    pub fn pps_job_load_set_password_save(job: *mut PpsJobLoad, save: gio::GPasswordSave);
    pub fn pps_job_load_set_uri(job: *mut PpsJobLoad, uri: *const c_char);
    #[cfg(feature = "v46")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v46")))]
    pub fn pps_job_load_take_fd(job: *mut PpsJobLoad, fd: c_int, mime_type: *const c_char);

    //=========================================================================
    // PpsJobPageData
    //=========================================================================
    pub fn pps_job_page_data_get_type() -> GType;
    pub fn pps_job_page_data_new(
        document: *mut papers_document::PpsDocument,
        page: c_int,
        flags: PpsJobPageDataFlags,
    ) -> *mut PpsJob;

    //=========================================================================
    // PpsJobPrint
    //=========================================================================
    pub fn pps_job_print_get_type() -> GType;
    pub fn pps_job_print_new(document: *mut papers_document::PpsDocument) -> *mut PpsJob;
    pub fn pps_job_print_set_cairo(job: *mut PpsJobPrint, cr: *mut cairo::cairo_t);
    pub fn pps_job_print_set_page(job: *mut PpsJobPrint, page: c_int);

    //=========================================================================
    // PpsJobRenderTexture
    //=========================================================================
    pub fn pps_job_render_texture_get_type() -> GType;
    pub fn pps_job_render_texture_new(
        document: *mut papers_document::PpsDocument,
        page: c_int,
        rotation: c_int,
        scale: c_double,
        width: c_int,
        height: c_int,
        annot_flags: papers_document::PpsRenderAnnotsFlags,
    ) -> *mut PpsJob;
    pub fn pps_job_render_texture_set_selection_info(
        job: *mut PpsJobRenderTexture,
        selection_points: *mut papers_document::PpsRectangle,
        selection_style: papers_document::PpsSelectionStyle,
        text: *mut gdk::GdkRGBA,
        base: *mut gdk::GdkRGBA,
    );

    //=========================================================================
    // PpsJobSave
    //=========================================================================
    pub fn pps_job_save_get_type() -> GType;
    pub fn pps_job_save_new(
        document: *mut papers_document::PpsDocument,
        uri: *const c_char,
        document_uri: *const c_char,
    ) -> *mut PpsJob;
    pub fn pps_job_save_get_uri(job_save: *mut PpsJobSave) -> *const c_char;

    //=========================================================================
    // PpsJobSignatures
    //=========================================================================
    pub fn pps_job_signatures_get_type() -> GType;
    pub fn pps_job_signatures_new(document: *mut papers_document::PpsDocument) -> *mut PpsJob;
    pub fn pps_job_signatures_get_signatures(self_: *mut PpsJobSignatures) -> *mut glib::GList;

    //=========================================================================
    // PpsJobThumbnailTexture
    //=========================================================================
    pub fn pps_job_thumbnail_texture_get_type() -> GType;
    pub fn pps_job_thumbnail_texture_new(
        document: *mut papers_document::PpsDocument,
        page: c_int,
        rotation: c_int,
        scale: c_double,
    ) -> *mut PpsJob;
    pub fn pps_job_thumbnail_texture_new_with_target_size(
        document: *mut papers_document::PpsDocument,
        page: c_int,
        rotation: c_int,
        target_width: c_int,
        target_height: c_int,
    ) -> *mut PpsJob;
    pub fn pps_job_thumbnail_texture_get_texture(
        job: *mut PpsJobThumbnailTexture,
    ) -> *mut gdk::GdkTexture;

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

    //=========================================================================
    // PpsPrintOperation
    //=========================================================================
    pub fn pps_print_operation_get_type() -> GType;
    pub fn pps_print_operation_new(
        document: *mut papers_document::PpsDocument,
    ) -> *mut PpsPrintOperation;
    pub fn pps_print_operation_exists_for_document(
        document: *mut papers_document::PpsDocument,
    ) -> gboolean;
    pub fn pps_print_operation_cancel(op: *mut PpsPrintOperation);
    pub fn pps_print_operation_get_default_page_setup(
        op: *mut PpsPrintOperation,
    ) -> *mut gtk::GtkPageSetup;
    pub fn pps_print_operation_get_embed_page_setup(op: *mut PpsPrintOperation) -> gboolean;
    pub fn pps_print_operation_get_error(op: *mut PpsPrintOperation, error: *mut *mut glib::GError);
    pub fn pps_print_operation_get_job_name(op: *mut PpsPrintOperation) -> *const c_char;
    pub fn pps_print_operation_get_print_settings(
        op: *mut PpsPrintOperation,
    ) -> *mut gtk::GtkPrintSettings;
    pub fn pps_print_operation_get_progress(op: *mut PpsPrintOperation) -> c_double;
    pub fn pps_print_operation_get_status(op: *mut PpsPrintOperation) -> *const c_char;
    pub fn pps_print_operation_run(op: *mut PpsPrintOperation, parent: *mut gtk::GtkWindow);
    pub fn pps_print_operation_set_current_page(op: *mut PpsPrintOperation, current_page: c_int);
    pub fn pps_print_operation_set_default_page_setup(
        op: *mut PpsPrintOperation,
        page_setup: *mut gtk::GtkPageSetup,
    );
    pub fn pps_print_operation_set_embed_page_setup(op: *mut PpsPrintOperation, embed: gboolean);
    pub fn pps_print_operation_set_job_name(op: *mut PpsPrintOperation, job_name: *const c_char);
    pub fn pps_print_operation_set_print_settings(
        op: *mut PpsPrintOperation,
        print_settings: *mut gtk::GtkPrintSettings,
    );

    //=========================================================================
    // PpsSearchContext
    //=========================================================================
    pub fn pps_search_context_get_type() -> GType;
    pub fn pps_search_context_new(model: *mut PpsDocumentModel) -> *mut PpsSearchContext;
    #[cfg(feature = "v48")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v48")))]
    pub fn pps_search_context_activate(context: *mut PpsSearchContext);
    #[cfg(feature = "v48")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v48")))]
    pub fn pps_search_context_autoselect_result(
        context: *mut PpsSearchContext,
        result: *mut PpsSearchResult,
    );
    #[cfg(feature = "v48")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v48")))]
    pub fn pps_search_context_get_active(context: *mut PpsSearchContext) -> gboolean;
    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 gtk::GtkSingleSelection;
    #[cfg(feature = "v48")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v48")))]
    pub fn pps_search_context_get_results_on_page(
        context: *mut PpsSearchContext,
        page: c_uint,
    ) -> *mut glib::GPtrArray;
    pub fn pps_search_context_get_search_term(context: *mut PpsSearchContext) -> *const c_char;
    pub fn pps_search_context_has_results_on_page(
        context: *mut PpsSearchContext,
        page: c_uint,
    ) -> gboolean;
    #[cfg(feature = "v48")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v48")))]
    pub fn pps_search_context_release(context: *mut PpsSearchContext);
    pub fn pps_search_context_restart(context: *mut PpsSearchContext);
    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,
        global_index: c_uint,
        rect: *mut papers_document::PpsFindRectangle,
    ) -> *mut PpsSearchResult;
    pub fn pps_search_result_append_rectangle(
        self_: *mut PpsSearchResult,
        rect: *mut papers_document::PpsFindRectangle,
    );
    #[cfg(feature = "v48")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v48")))]
    pub fn pps_search_result_get_global_index(self_: *mut PpsSearchResult) -> c_uint;
    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;
    pub fn pps_search_result_get_rectangle_list(self_: *mut PpsSearchResult) -> *mut glib::GList;

    //=========================================================================
    // PpsUndoContext
    //=========================================================================
    pub fn pps_undo_context_get_type() -> GType;
    pub fn pps_undo_context_new(document_model: *mut PpsDocumentModel) -> *mut PpsUndoContext;
    pub fn pps_undo_context_add_action(
        context: *mut PpsUndoContext,
        handler: *mut PpsUndoHandler,
        data: gpointer,
    );
    pub fn pps_undo_context_get_last_action(context: *mut PpsUndoContext) -> gpointer;
    pub fn pps_undo_context_get_last_handler(context: *mut PpsUndoContext) -> *mut PpsUndoHandler;
    pub fn pps_undo_context_redo(context: *mut PpsUndoContext);
    pub fn pps_undo_context_undo(context: *mut PpsUndoContext);

    //=========================================================================
    // PpsView
    //=========================================================================
    pub fn pps_view_get_type() -> GType;
    pub fn pps_view_new() -> *mut PpsView;
    pub fn pps_view_get_resource() -> *mut gio::GResource;
    pub fn pps_view_can_zoom_in(view: *mut PpsView) -> gboolean;
    pub fn pps_view_can_zoom_out(view: *mut PpsView) -> gboolean;
    pub fn pps_view_cancel_signature_rect(view: *mut PpsView);
    pub fn pps_view_copy(view: *mut PpsView);
    pub fn pps_view_copy_link_address(
        view: *mut PpsView,
        action: *mut papers_document::PpsLinkAction,
    );
    pub fn pps_view_current_event_is_type(view: *mut PpsView, type_: gdk::GdkEventType)
        -> gboolean;
    pub fn pps_view_focus_annotation(
        view: *mut PpsView,
        annot: *mut papers_document::PpsAnnotation,
    );
    pub fn pps_view_get_allow_links_change_zoom(view: *mut PpsView) -> gboolean;
    #[cfg(feature = "v48")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v48")))]
    pub fn pps_view_get_document_point_for_view_point(
        view: *mut PpsView,
        view_point_x: c_double,
        view_point_y: c_double,
    ) -> *mut papers_document::PpsDocumentPoint;
    pub fn pps_view_get_enable_spellchecking(view: *mut PpsView) -> gboolean;
    pub fn pps_view_get_selected_text(view: *mut PpsView) -> *mut c_char;
    #[cfg(feature = "v48")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v48")))]
    pub fn pps_view_get_selections(view: *mut PpsView) -> *mut glib::GList;
    pub fn pps_view_handle_link(view: *mut PpsView, link: *mut papers_document::PpsLink);
    pub fn pps_view_has_selection(view: *mut PpsView) -> gboolean;
    pub fn pps_view_is_caret_navigation_enabled(view: *mut PpsView) -> gboolean;
    pub fn pps_view_next_page(view: *mut PpsView) -> gboolean;
    pub fn pps_view_previous_page(view: *mut PpsView) -> gboolean;
    pub fn pps_view_reload(view: *mut PpsView);
    pub fn pps_view_select_all(view: *mut PpsView);
    pub fn pps_view_set_allow_links_change_zoom(view: *mut PpsView, allowed: gboolean);
    #[cfg(feature = "v48")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v48")))]
    pub fn pps_view_set_annotations_context(
        view: *mut PpsView,
        context: *mut PpsAnnotationsContext,
    );
    pub fn pps_view_set_caret_cursor_position(view: *mut PpsView, page: c_uint, offset: c_uint);
    pub fn pps_view_set_caret_navigation_enabled(view: *mut PpsView, enabled: gboolean);
    pub fn pps_view_set_enable_spellchecking(view: *mut PpsView, spellcheck: gboolean);
    pub fn pps_view_set_model(view: *mut PpsView, model: *mut PpsDocumentModel);
    pub fn pps_view_set_page_cache_size(view: *mut PpsView, cache_size: size_t);
    pub fn pps_view_set_search_context(view: *mut PpsView, context: *mut PpsSearchContext);
    pub fn pps_view_start_signature_rect(view: *mut PpsView);
    pub fn pps_view_supports_caret_navigation(view: *mut PpsView) -> gboolean;
    pub fn pps_view_zoom_in(view: *mut PpsView);
    pub fn pps_view_zoom_out(view: *mut PpsView);

    //=========================================================================
    // PpsViewPresentation
    //=========================================================================
    pub fn pps_view_presentation_get_type() -> GType;
    pub fn pps_view_presentation_new(
        document: *mut papers_document::PpsDocument,
        current_page: c_uint,
        rotation: c_uint,
        inverted_colors: gboolean,
    ) -> *mut PpsViewPresentation;
    pub fn pps_view_presentation_get_current_page(pview: *mut PpsViewPresentation) -> c_uint;
    pub fn pps_view_presentation_get_rotation(pview: *mut PpsViewPresentation) -> c_uint;
    pub fn pps_view_presentation_next_page(pview: *mut PpsViewPresentation);
    pub fn pps_view_presentation_previous_page(pview: *mut PpsViewPresentation);
    pub fn pps_view_presentation_set_rotation(pview: *mut PpsViewPresentation, rotation: c_int);

    //=========================================================================
    // PpsUndoHandler
    //=========================================================================
    pub fn pps_undo_handler_get_type() -> GType;
    pub fn pps_undo_handler_free_action(self_: *mut PpsUndoHandler, data: gpointer);
    pub fn pps_undo_handler_undo(self_: *mut PpsUndoHandler, data: gpointer);

}
