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

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

glib::wrapper! {
    #[doc(alias = "PpsDocumentLayers")]
    pub struct DocumentLayers(Interface<ffi::PpsDocumentLayers, ffi::PpsDocumentLayersInterface>);

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

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

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

pub trait DocumentLayersExt: IsA<DocumentLayers> + sealed::Sealed + 'static {
    #[doc(alias = "pps_document_layers_get_layers")]
    #[doc(alias = "get_layers")]
    fn layers(&self) -> Option<gio::ListModel> {
        unsafe {
            from_glib_full(ffi::pps_document_layers_get_layers(self.as_ref().to_glib_none().0))
        }
    }

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

    #[doc(alias = "pps_document_layers_hide_layer")]
    fn hide_layer(&self, layer: &impl IsA<Layer>) {
        unsafe {
            ffi::pps_document_layers_hide_layer(self.as_ref().to_glib_none().0, layer.as_ref().to_glib_none().0);
        }
    }

    #[doc(alias = "pps_document_layers_layer_is_visible")]
    fn layer_is_visible(&self, layer: &impl IsA<Layer>) -> bool {
        unsafe {
            from_glib(ffi::pps_document_layers_layer_is_visible(self.as_ref().to_glib_none().0, layer.as_ref().to_glib_none().0))
        }
    }

    #[doc(alias = "pps_document_layers_show_layer")]
    fn show_layer(&self, layer: &impl IsA<Layer>) {
        unsafe {
            ffi::pps_document_layers_show_layer(self.as_ref().to_glib_none().0, layer.as_ref().to_glib_none().0);
        }
    }
}

impl<O: IsA<DocumentLayers>> DocumentLayersExt for O {}
