gdk/time_coord.rs
1// Take a look at the license at the top of the repository in the LICENSE file.
2
3use crate::ffi;
4
5glib::wrapper! {
6 /// A [`TimeCoord`][crate::TimeCoord] stores a single event in a motion history.
7 #[doc(alias = "GdkTimeCoord")]
8 pub struct TimeCoord(BoxedInline<ffi::GdkTimeCoord>);
9}
10
11impl TimeCoord {
12 pub fn time(&self) -> u32 {
13 self.inner.time
14 }
15
16 pub fn axes(&self) -> &[f64; ffi::GDK_MAX_TIMECOORD_AXES as usize] {
17 &self.inner.axes
18 }
19}