gdk/event_pad_button.rs
1// Take a look at the license at the top of the repository in the LICENSE file.
2
3use glib::translate::*;
4
5#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
6pub struct EventPadButton(crate::Event);
7
8event_wrapper!(EventPadButton, GdkEventPadButton);
9event_subtype!(
10 EventPadButton,
11 ffi::GDK_PAD_BUTTON_PRESS | ffi::GDK_PAD_BUTTON_RELEASE
12);
13
14impl EventPadButton {
15 #[doc(alias = "get_time")]
16 pub fn time(&self) -> u32 {
17 self.as_ref().time
18 }
19
20 #[doc(alias = "get_group")]
21 pub fn group(&self) -> u32 {
22 self.as_ref().group
23 }
24
25 #[doc(alias = "get_button")]
26 pub fn button(&self) -> u32 {
27 self.as_ref().button
28 }
29
30 #[doc(alias = "get_mode")]
31 pub fn mode(&self) -> u32 {
32 self.as_ref().mode
33 }
34}