Skip to main content

gdk/
event_pad_axis.rs

1// Take a look at the license at the top of the repository in the LICENSE file.
2
3use glib::translate::*;
4
5/// Generated during [`InputSource::TabletPad`][crate::InputSource::TabletPad] interaction with tactile sensors.
6#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
7pub struct EventPadAxis(crate::Event);
8
9event_wrapper!(EventPadAxis, GdkEventPadAxis);
10event_subtype!(EventPadAxis, ffi::GDK_PAD_RING | ffi::GDK_PAD_STRIP);
11
12impl EventPadAxis {
13    #[doc(alias = "get_time")]
14    pub fn time(&self) -> u32 {
15        self.as_ref().time
16    }
17
18    #[doc(alias = "get_group")]
19    pub fn group(&self) -> u32 {
20        self.as_ref().group
21    }
22
23    #[doc(alias = "get_index")]
24    pub fn index(&self) -> u32 {
25        self.as_ref().index
26    }
27
28    #[doc(alias = "get_mode")]
29    pub fn mode(&self) -> u32 {
30        self.as_ref().mode
31    }
32
33    #[doc(alias = "get_value")]
34    pub fn value(&self) -> f64 {
35        self.as_ref().value
36    }
37}