gdk: bind Event::get_device_tool
Fixes
// Take a look at the license at the top of the repository in the LICENSE file.
-use crate::{AxisUse, Device, Display, EventType, ModifierType, Seat, Surface, TimeCoord};
+use crate::{
+ AxisUse, Device, DeviceTool, Display, EventType, ModifierType, Seat, Surface, TimeCoord,
+};
use glib::translate::*;
use glib::{StaticType, Type};
use std::fmt;
@@ -46,6 +48,12 @@ impl Event {
}
}
+ #[doc(alias = "gdk_event_get_device_tool")]
+ #[doc(alias = "get_device_tool")]
+ pub fn device_tool(&self) -> Option<DeviceTool> {
+ unsafe { from_glib_none(ffi::gdk_event_get_device_tool(self.to_glib_none().0)) }
+ }
+
#[doc(alias = "gdk_events_get_angle")]
#[doc(alias = "get_angle")]
pub fn angle<P: AsRef<Event>>(&self, event: P) -> Option<f64> {
