libphosh 0.0.7

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

use crate::{ffi};
use glib::{translate::*};

glib::wrapper! {
    #[doc(alias = "PhoshScreenshotManager")]
    pub struct ScreenshotManager(Object<ffi::PhoshScreenshotManager, ffi::PhoshScreenshotManagerClass>);

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

impl ScreenshotManager {
    #[doc(alias = "phosh_screenshot_manager_new")]
    pub fn new() -> ScreenshotManager {
        assert_initialized_main_thread!();
        unsafe {
            from_glib_full(ffi::phosh_screenshot_manager_new())
        }
    }

    #[doc(alias = "phosh_screenshot_manager_take_screenshot")]
    pub fn take_screenshot(&self, area: Option<&gdk::Rectangle>, filename: Option<&str>, copy_to_clipboard: bool, include_cursor: bool) -> bool {
        unsafe {
            from_glib(ffi::phosh_screenshot_manager_take_screenshot(self.to_glib_none().0, area.to_glib_none().0, filename.to_glib_none().0, copy_to_clipboard.into_glib(), include_cursor.into_glib()))
        }
    }
}

impl Default for ScreenshotManager {
                     fn default() -> Self {
                         Self::new()
                     }
                 }