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

glib_wrapper! {
    pub struct ApplicationWindow(Object<handy_sys::HdyApplicationWindow, handy_sys::HdyApplicationWindowClass, ApplicationWindowClass>) @extends gtk::ApplicationWindow, gtk::Window, gtk::Bin, gtk::Container, gtk::Widget, @implements gtk::Buildable, gio::ActionGroup, gio::ActionMap;

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

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

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

pub const NONE_APPLICATION_WINDOW: Option<&ApplicationWindow> = None;

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