gdk/
event_pad_axis.rs

1// Copyright 2018, The Gtk-rs Project Developers.
2// See the COPYRIGHT file at the top-level directory of this distribution.
3// Licensed under the MIT license, see the LICENSE file or <http://opensource.org/licenses/MIT>
4
5use gdk_sys;
6use glib::translate::*;
7
8#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
9pub struct EventPadAxis(::Event);
10
11event_wrapper!(EventPadAxis, GdkEventPadAxis);
12event_subtype!(EventPadAxis, gdk_sys::GDK_PAD_RING | gdk_sys::GDK_PAD_STRIP);
13
14impl EventPadAxis {
15    pub fn get_time(&self) -> u32 {
16        self.as_ref().time
17    }
18
19    pub fn get_group(&self) -> u32 {
20        self.as_ref().group
21    }
22
23    pub fn get_index(&self) -> u32 {
24        self.as_ref().index
25    }
26
27    pub fn get_mode(&self) -> u32 {
28        self.as_ref().mode
29    }
30
31    pub fn get_value(&self) -> f64 {
32        self.as_ref().value
33    }
34}