1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// This file was generated by gir (https://github.com/gtk-rs/gir)
// from gir-files (https://github.com/gtk-rs/gir-files)
// DO NOT EDIT

use gdk;
use gdk_x11_sys;
use glib::object::IsA;
use glib::translate::*;
use std::fmt;
use xlib;

glib_wrapper! {
    pub struct X11Monitor(Object<gdk_x11_sys::GdkX11Monitor, gdk_x11_sys::GdkX11MonitorClass, X11MonitorClass>) @extends gdk::Monitor;

    match fn {
        get_type => || gdk_x11_sys::gdk_x11_monitor_get_type(),
    }
}

impl X11Monitor {
    pub fn get_output<P: IsA<gdk::Monitor>>(monitor: &P) -> xlib::XID {
        assert_initialized_main_thread!();
        unsafe { gdk_x11_sys::gdk_x11_monitor_get_output(monitor.as_ref().to_glib_none().0) }
    }
}

impl fmt::Display for X11Monitor {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "X11Monitor")
    }
}