[go: up one dir, main page]

gdk4/auto/
touch_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;
6use glib::{prelude::*, translate::*};
7
8glib::wrapper! {
9    #[doc(alias = "GdkTouchEvent")]
10    pub struct TouchEvent(Shared<ffi::GdkTouchEvent>);
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 TouchEvent {
19    fn static_type() -> glib::Type {
20        unsafe { from_glib(ffi::gdk_touch_event_get_type()) }
21    }
22}
23
24impl TouchEvent {
25    #[doc(alias = "gdk_touch_event_get_emulating_pointer")]
26    #[doc(alias = "get_emulating_pointer")]
27    pub fn is_emulating_pointer(&self) -> bool {
28        unsafe {
29            from_glib(ffi::gdk_touch_event_get_emulating_pointer(
30                self.to_glib_none().0,
31            ))
32        }
33    }
34}