1use crate::ffi;
6use glib::{prelude::*, translate::*};
7
8glib::wrapper! {
9 #[doc(alias = "GdkTouchEvent")]
11 pub struct TouchEvent(Shared<ffi::GdkTouchEvent>);
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 TouchEvent {
20 fn static_type() -> glib::Type {
21 unsafe { from_glib(ffi::gdk_touch_event_get_type()) }
22 }
23}
24
25impl TouchEvent {
26 #[doc(alias = "gdk_touch_event_get_emulating_pointer")]
32 #[doc(alias = "get_emulating_pointer")]
33 pub fn is_emulating_pointer(&self) -> bool {
34 unsafe {
35 from_glib(ffi::gdk_touch_event_get_emulating_pointer(
36 self.to_glib_none().0,
37 ))
38 }
39 }
40}