// 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 glib::object::Cast;
use glib::translate::*;
use gtk;
use handy_sys;
use std::fmt;

glib_wrapper! {
    pub struct WindowHandle(Object<handy_sys::HdyWindowHandle, handy_sys::HdyWindowHandleClass, WindowHandleClass>) @extends gtk::EventBox, gtk::Bin, gtk::Container, gtk::Widget, @implements gtk::Buildable;

    match fn {
        get_type => || handy_sys::hdy_window_handle_get_type(),
    }
}

impl WindowHandle {
    pub fn new() -> WindowHandle {
        assert_initialized_main_thread!();
        unsafe { gtk::Widget::from_glib_full(handy_sys::hdy_window_handle_new()).unsafe_cast() }
    }
}

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

pub const NONE_WINDOW_HANDLE: Option<&WindowHandle> = None;

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