gdk/
event_window_state.rs

1// Copyright 2016, 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_sys;
6use glib::translate::*;
7
8#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
9pub struct EventWindowState(::Event);
10
11event_wrapper!(EventWindowState, GdkEventWindowState);
12event_subtype!(EventWindowState, gdk_sys::GDK_WINDOW_STATE);
13
14impl EventWindowState {
15    pub fn get_changed_mask(&self) -> ::WindowState {
16        from_glib(self.as_ref().changed_mask)
17    }
18
19    pub fn get_new_window_state(&self) -> ::WindowState {
20        from_glib(self.as_ref().new_window_state)
21    }
22}