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