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

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

glib::wrapper! {
    #[doc(alias = "PpsDocumentAttachments")]
    pub struct DocumentAttachments(Interface<ffi::PpsDocumentAttachments, ffi::PpsDocumentAttachmentsInterface>);

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

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

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

pub trait DocumentAttachmentsExt: IsA<DocumentAttachments> + sealed::Sealed + 'static {
    #[doc(alias = "pps_document_attachments_get_attachments")]
    #[doc(alias = "get_attachments")]
    fn attachments(&self) -> Vec<Attachment> {
        unsafe {
            FromGlibPtrContainer::from_glib_full(ffi::pps_document_attachments_get_attachments(self.as_ref().to_glib_none().0))
        }
    }

    #[doc(alias = "pps_document_attachments_has_attachments")]
    fn has_attachments(&self) -> bool {
        unsafe {
            from_glib(ffi::pps_document_attachments_has_attachments(self.as_ref().to_glib_none().0))
        }
    }
}

impl<O: IsA<DocumentAttachments>> DocumentAttachmentsExt for O {}
