Skip to main content

clutter/auto/
event_scroll.rs

1use glib::translate::*;
2
3#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
4pub struct ScrollEvent(crate::Event);
5
6event_wrapper!(ScrollEvent, ClutterScrollEvent);
7event_subtype!(ScrollEvent, ffi::CLUTTER_SCROLL);
8
9impl ScrollEvent {
10    // pub fn get_time(&self) -> u32 {
11    //     self.as_ref().time
12    // }
13
14    // pub fn get_position(&self) -> (f64, f64) {
15    //     let x = self.as_ref().x;
16    //     let y = self.as_ref().y;
17    //     (x, y)
18    // }
19
20    // pub fn get_state(&self) -> ::ModifierType {
21    //     from_glib(self.as_ref().state)
22    // }
23
24    // pub fn get_device(&self) -> Option<::Device> {
25    //     unsafe { from_glib_none(self.as_ref().device) }
26    // }
27
28    // pub fn get_direction(&self) -> ::ScrollDirection {
29    //     from_glib(self.as_ref().direction)
30    // }
31
32    // pub fn get_root(&self) -> (f64, f64) {
33    //     let x_root = self.as_ref().x_root;
34    //     let y_root = self.as_ref().y_root;
35    //     (x_root, y_root)
36    // }
37
38    // pub fn get_delta(&self) -> (f64, f64) {
39    //     let dx = self.as_ref().delta_x;
40    //     let dy = self.as_ref().delta_y;
41    //     (dx, dy)
42    // }
43
44    // pub fn get_is_stop(&self) -> bool {
45    //     self.as_ref().is_stop & 1 != 0
46    // }
47}