// Generated by gir (https://github.com/gtk-rs/gir @ d7c0763cacbc)
// from ../../ev-girs (@ e59f8e8f4a52+)
// 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_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;

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

// 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 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_ANNOTS: PpsJobPageDataFlags = 256;
pub const PPS_PAGE_DATA_INCLUDE_MEDIA: PpsJobPageDataFlags = 512;
pub const PPS_PAGE_DATA_INCLUDE_ALL: PpsJobPageDataFlags = 1023;

// Records
#[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 PpsBookmark {
    pub page: c_uint,
    pub title: *mut c_char,
}

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

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

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

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

pub type PpsViewClass = _PpsViewClass;

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

pub type PpsViewPresentationClass = _PpsViewPresentationClass;

// Classes
#[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)]
pub struct PpsBookmarks {
    _data: [u8; 0],
    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}

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

#[repr(C)]
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,
    pub annots: *mut glib::GList,
}

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)
            .field("annots", &self.annots)
            .finish()
    }
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PpsJobAttachments {
    pub parent: PpsJob,
    pub attachments: *mut glib::GList,
}

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)
            .field("attachments", &self.attachments)
            .finish()
    }
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PpsJobExport {
    pub parent: PpsJob,
    pub page: c_int,
    pub rc: *mut papers_document::PpsRenderContext,
}

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)
            .field("page", &self.page)
            .field("rc", &self.rc)
            .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,
    pub model: *mut gio::GListModel,
}

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)
            .field("model", &self.model)
            .finish()
    }
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PpsJobLinks {
    pub parent: PpsJob,
    pub model: *mut gio::GListModel,
}

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)
            .field("model", &self.model)
            .finish()
    }
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PpsJobLoad {
    pub parent: PpsJob,
    pub uri: *mut c_char,
    pub fd: c_int,
    pub mime_type: *mut c_char,
    pub password: *mut c_char,
    pub password_save: gio::GPasswordSave,
    pub flags: papers_document::PpsDocumentLoadFlags,
    pub loaded_document: *mut papers_document::PpsDocument,
}

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)
            .field("uri", &self.uri)
            .field("fd", &self.fd)
            .field("mime_type", &self.mime_type)
            .field("password", &self.password)
            .field("password_save", &self.password_save)
            .field("flags", &self.flags)
            .field("loaded_document", &self.loaded_document)
            .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 annot_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("annot_mapping", &self.annot_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,
    pub page: c_int,
    pub cr: *mut cairo::cairo_t,
}

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)
            .field("page", &self.page)
            .field("cr", &self.cr)
            .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,
}

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)
            .finish()
    }
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PpsJobSave {
    pub parent: PpsJob,
    pub uri: *mut c_char,
    pub document_uri: *mut c_char,
}

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)
            .field("uri", &self.uri)
            .field("document_uri", &self.document_uri)
            .finish()
    }
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PpsJobThumbnailTexture {
    pub parent: PpsJob,
    pub page: c_int,
    pub rotation: c_int,
    pub scale: c_double,
    pub target_width: c_int,
    pub target_height: c_int,
    pub thumbnail_texture: *mut gdk::GdkTexture,
}

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)
            .field("page", &self.page)
            .field("rotation", &self.rotation)
            .field("scale", &self.scale)
            .field("target_width", &self.target_width)
            .field("target_height", &self.target_height)
            .field("thumbnail_texture", &self.thumbnail_texture)
            .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()
    }
}

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

#[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()
    }
}

#[link(name = "ppsview-4.0")]
#[link(name = "ppsdocument-4.0")]
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;

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

    //=========================================================================
    // PpsBookmark
    //=========================================================================
    pub fn pps_bookmark_get_type() -> GType;
    pub fn pps_bookmark_new(page: c_int, title: *const c_char) -> *mut PpsBookmark;
    pub fn pps_bookmark_copy(bookmark: *const PpsBookmark) -> *mut PpsBookmark;
    pub fn pps_bookmark_free(bookmark: *mut PpsBookmark);
    pub fn pps_bookmark_get_page(bookmark: *const PpsBookmark) -> c_uint;
    pub fn pps_bookmark_get_title(bookmark: *const PpsBookmark) -> *const c_char;

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

    //=========================================================================
    // PpsBookmarks
    //=========================================================================
    pub fn pps_bookmarks_get_type() -> GType;
    pub fn pps_bookmarks_new(metadata: *mut PpsMetadata) -> *mut PpsBookmarks;
    pub fn pps_bookmarks_add(bookmarks: *mut PpsBookmarks, bookmark: *mut PpsBookmark);
    pub fn pps_bookmarks_delete(bookmarks: *mut PpsBookmarks, bookmark: *mut PpsBookmark);
    pub fn pps_bookmarks_get_bookmarks(bookmarks: *mut PpsBookmarks) -> *mut glib::GList;
    pub fn pps_bookmarks_has_bookmarks(bookmarks: *mut PpsBookmarks) -> gboolean;
    pub fn pps_bookmarks_update(bookmarks: *mut PpsBookmarks, bookmark: *mut PpsBookmark);

    //=========================================================================
    // 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;
    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;
    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) -> gboolean;
    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_load_flags(
        job: *mut PpsJobLoad,
        flags: papers_document::PpsDocumentLoadFlags,
    );
    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,
    ) -> *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;

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

    //=========================================================================
    // 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_add_text_markup_annotation_for_selected_text(view: *mut PpsView) -> gboolean;
    pub fn pps_view_begin_add_text_annotation(view: *mut PpsView);
    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_add_text_annotation(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_find_next(view: *mut PpsView);
    pub fn pps_view_find_previous(view: *mut PpsView);
    pub fn pps_view_find_restart(view: *mut PpsView, page: c_int);
    pub fn pps_view_find_set_highlight_search(view: *mut PpsView, value: gboolean);
    pub fn pps_view_find_set_result(view: *mut PpsView, page: c_int, result: c_int);
    pub fn pps_view_focus_annotation(
        view: *mut PpsView,
        annot_mapping: *mut papers_document::PpsMapping,
    );
    pub fn pps_view_get_allow_links_change_zoom(view: *mut PpsView) -> gboolean;
    pub fn pps_view_get_enable_spellchecking(view: *mut PpsView) -> gboolean;
    pub fn pps_view_get_page_extents(
        view: *mut PpsView,
        page: c_int,
        page_area: *mut gdk::GdkRectangle,
        border: *mut gtk::GtkBorder,
    ) -> gboolean;
    pub fn pps_view_get_page_extents_for_border(
        view: *mut PpsView,
        page: c_int,
        border: *mut gtk::GtkBorder,
        page_area: *mut gdk::GdkRectangle,
    ) -> gboolean;
    pub fn pps_view_get_selected_text(view: *mut PpsView) -> *mut c_char;
    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_is_loading(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_remove_annotation(
        view: *mut PpsView,
        annot: *mut papers_document::PpsAnnotation,
    );
    pub fn pps_view_select_all(view: *mut PpsView);
    pub fn pps_view_set_allow_links_change_zoom(view: *mut PpsView, allowed: gboolean);
    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_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);

}
