// This file was generated by gir (https://github.com/gtk-rs/gir)
// from ../ev-girs
// from ../gir-files
// DO NOT EDIT

use glib::{prelude::*,translate::*};

glib::wrapper! {
    #[doc(alias = "PpsSidebarPage")]
    pub struct SidebarPage(Interface<ffi::PpsSidebarPage, ffi::PpsSidebarPageInterface>);

    match fn {
        type_ => || ffi::pps_sidebar_page_get_type(),
    }
}

impl SidebarPage {
        pub const NONE: Option<&'static SidebarPage> = None;
    
}

mod sealed {
    pub trait Sealed {}
    impl<T: super::IsA<super::SidebarPage>> Sealed for T {}
}

pub trait SidebarPageExt: IsA<SidebarPage> + sealed::Sealed + 'static {
    #[doc(alias = "pps_sidebar_page_set_model")]
    fn set_model(&self, model: &papers_view::DocumentModel) {
        unsafe {
            ffi::pps_sidebar_page_set_model(self.as_ref().to_glib_none().0, model.to_glib_none().0);
        }
    }

    #[doc(alias = "pps_sidebar_page_support_document")]
    fn support_document(&self, document: &impl IsA<papers_document::Document>) -> bool {
        unsafe {
            from_glib(ffi::pps_sidebar_page_support_document(self.as_ref().to_glib_none().0, document.as_ref().to_glib_none().0))
        }
    }
}

impl<O: IsA<SidebarPage>> SidebarPageExt for O {}
