Skip to main content

clutter/auto/
event_motion.rs

1use glib::translate::*;
2
3#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
4pub struct MotionEvent(crate::Event);
5
6event_wrapper!(MotionEvent, ClutterMotionEvent);
7event_subtype!(MotionEvent, ffi::CLUTTER_MOTION);
8
9impl MotionEvent {
10    // pub fn get_position(&self) -> (f64, f64) {
11    //     let x = self.as_ref().x;
12    //     let y = self.as_ref().y;
13    //     (x, y)
14    // }
15
16    // pub fn get_state(&self) -> ::ModifierType {
17    //     from_glib(self.as_ref().state)
18    // }
19
20    // pub fn get_time(&self) -> u32 {
21    //     self.as_ref().time
22    // }
23
24    // pub fn request_motions(&self) {
25    //     unsafe { ffi::gdk_event_request_motions(self.as_ref()) }
26    // }
27
28    // pub fn get_device(&self) -> Option<::Device> {
29    //     unsafe { from_glib_none(self.as_ref().device) }
30    // }
31
32    // pub fn get_axes(&self) -> Option<(f64, f64)> {
33    //     let axes = self.as_ref().axes;
34
35    //     if axes.is_null() {
36    //         None
37    //     } else {
38    //         unsafe { Some((*axes, *axes.offset(1))) }
39    //     }
40    // }
41
42    // pub fn get_root(&self) -> (f64, f64) {
43    //     let x_root = self.as_ref().x_root;
44    //     let y_root = self.as_ref().y_root;
45    //     (x_root, y_root)
46    // }
47
48    // pub fn get_is_hint(&self) -> bool {
49    //     from_glib(self.as_ref().is_hint as _)
50    // }
51}