gdk/event_window_state.rs
1// Take a look at the license at the top of the repository in the LICENSE file.
2
3use glib::translate::*;
4
5/// Generated when the state of a toplevel window changes.
6#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
7pub struct EventWindowState(crate::Event);
8
9event_wrapper!(EventWindowState, GdkEventWindowState);
10event_subtype!(EventWindowState, ffi::GDK_WINDOW_STATE);
11
12impl EventWindowState {
13 #[doc(alias = "get_changed_mask")]
14 pub fn changed_mask(&self) -> crate::WindowState {
15 unsafe { from_glib(self.as_ref().changed_mask) }
16 }
17
18 #[doc(alias = "get_new_window_state")]
19 pub fn new_window_state(&self) -> crate::WindowState {
20 unsafe { from_glib(self.as_ref().new_window_state) }
21 }
22}