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

use crate::{Annot, AnnotMarkup, Attachment, ffi};
use glib::translate::*;

glib::wrapper! {
    #[doc(alias = "PopplerAnnotFileAttachment")]
    pub struct AnnotFileAttachment(Object<ffi::PopplerAnnotFileAttachment>) @extends AnnotMarkup, Annot;

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

impl AnnotFileAttachment {
    #[doc(alias = "poppler_annot_file_attachment_get_attachment")]
    #[doc(alias = "get_attachment")]
    pub fn attachment(&self) -> Option<Attachment> {
        unsafe {
            from_glib_full(ffi::poppler_annot_file_attachment_get_attachment(
                self.to_glib_none().0,
            ))
        }
    }

    #[doc(alias = "poppler_annot_file_attachment_get_name")]
    #[doc(alias = "get_name")]
    pub fn name(&self) -> Option<glib::GString> {
        unsafe {
            from_glib_full(ffi::poppler_annot_file_attachment_get_name(
                self.to_glib_none().0,
            ))
        }
    }
}
