// 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::ffi;
use glib::translate::*;

glib::wrapper! {
    #[doc(alias = "PopplerLayer")]
    pub struct Layer(Object<ffi::PopplerLayer>);

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

impl Layer {
    #[doc(alias = "poppler_layer_get_radio_button_group_id")]
    #[doc(alias = "get_radio_button_group_id")]
    pub fn radio_button_group_id(&self) -> i32 {
        unsafe { ffi::poppler_layer_get_radio_button_group_id(self.to_glib_none().0) }
    }

    #[doc(alias = "poppler_layer_get_title")]
    #[doc(alias = "get_title")]
    pub fn title(&self) -> Option<glib::GString> {
        unsafe { from_glib_none(ffi::poppler_layer_get_title(self.to_glib_none().0)) }
    }

    #[doc(alias = "poppler_layer_hide")]
    pub fn hide(&self) {
        unsafe {
            ffi::poppler_layer_hide(self.to_glib_none().0);
        }
    }

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

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

    #[doc(alias = "poppler_layer_show")]
    pub fn show(&self) {
        unsafe {
            ffi::poppler_layer_show(self.to_glib_none().0);
        }
    }
}
