gtk/invisible.rs
1// Copyright 2013-2017, The Gtk-rs Project Developers.
2// See the COPYRIGHT file at the top-level directory of this distribution.
3// Licensed under the MIT license, see the LICENSE file or <http://opensource.org/licenses/MIT>
4
5use gdk;
6use glib::translate::{from_glib_none, ToGlibPtr};
7use glib::IsA;
8use gtk_sys;
9use Invisible;
10
11// For some reasons, it's not generated...
12pub trait InvisibleExtManual: 'static {
13 fn get_screen(&self) -> Option<gdk::Screen>;
14}
15
16impl<T: IsA<Invisible>> InvisibleExtManual for T {
17 fn get_screen(&self) -> Option<gdk::Screen> {
18 unsafe {
19 from_glib_none(gtk_sys::gtk_invisible_get_screen(
20 self.as_ref().to_glib_none().0,
21 ))
22 }
23 }
24}