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