1use crate::ffi;
6use glib::{prelude::*, translate::*};
7
8glib::wrapper! {
9 #[doc(alias = "GdkFocusEvent")]
11 pub struct FocusEvent(Shared<ffi::GdkFocusEvent>);
12
13 match fn {
14 ref => |ptr| ffi::gdk_event_ref(ptr as *mut ffi::GdkEvent),
15 unref => |ptr| ffi::gdk_event_unref(ptr as *mut ffi::GdkEvent),
16 }
17}
18
19impl StaticType for FocusEvent {
20 fn static_type() -> glib::Type {
21 unsafe { from_glib(ffi::gdk_focus_event_get_type()) }
22 }
23}
24
25impl FocusEvent {
26 #[doc(alias = "gdk_focus_event_get_in")]
33 #[doc(alias = "get_in")]
34 pub fn is_in(&self) -> bool {
35 unsafe { from_glib(ffi::gdk_focus_event_get_in(self.to_glib_none().0)) }
36 }
37}