1 // Take a look at the license at the top of the repository in the LICENSE file. 2 3 use glib::translate::*; 4 5 #[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] 6 pub struct EventGrabBroken(crate::Event); 7 8 event_wrapper!(EventGrabBroken, GdkEventGrabBroken); 9 event_subtype!(EventGrabBroken, ffi::GDK_GRAB_BROKEN); 10 11 impl EventGrabBroken { is_keyboard(&self) -> bool12 pub fn is_keyboard(&self) -> bool { 13 unsafe { from_glib(self.as_ref().keyboard) } 14 } 15 is_implicit(&self) -> bool16 pub fn is_implicit(&self) -> bool { 17 unsafe { from_glib(self.as_ref().implicit) } 18 } 19 20 #[doc(alias = "get_grab_window")] grab_window(&self) -> Option<crate::Window>21 pub fn grab_window(&self) -> Option<crate::Window> { 22 unsafe { from_glib_none(self.as_ref().grab_window) } 23 } 24 } 25