gdk4/auto/
grab_broken_event.rs

1// This file was generated by gir (https://github.com/gtk-rs/gir)
2// from gir-files (https://github.com/gtk-rs/gir-files)
3// DO NOT EDIT
4
5use crate::{ffi, Surface};
6use glib::{prelude::*, translate::*};
7
8glib::wrapper! {
9    #[doc(alias = "GdkGrabBrokenEvent")]
10    pub struct GrabBrokenEvent(Shared<ffi::GdkGrabBrokenEvent>);
11
12    match fn {
13        ref => |ptr| ffi::gdk_event_ref(ptr as *mut ffi::GdkEvent),
14        unref => |ptr| ffi::gdk_event_unref(ptr as *mut ffi::GdkEvent),
15    }
16}
17
18impl StaticType for GrabBrokenEvent {
19    fn static_type() -> glib::Type {
20        unsafe { from_glib(ffi::gdk_grab_broken_event_get_type()) }
21    }
22}
23
24impl GrabBrokenEvent {
25    #[doc(alias = "gdk_grab_broken_event_get_grab_surface")]
26    #[doc(alias = "get_grab_surface")]
27    pub fn grab_surface(&self) -> Surface {
28        unsafe {
29            from_glib_none(ffi::gdk_grab_broken_event_get_grab_surface(
30                self.to_glib_none().0,
31            ))
32        }
33    }
34
35    #[doc(alias = "gdk_grab_broken_event_get_implicit")]
36    #[doc(alias = "get_implicit")]
37    pub fn is_implicit(&self) -> bool {
38        unsafe {
39            from_glib(ffi::gdk_grab_broken_event_get_implicit(
40                self.to_glib_none().0,
41            ))
42        }
43    }
44}