1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Take a look at the license at the top of the repository in the LICENSE file.

glib::wrapper! {
    /// A [`TimeCoord`][crate::TimeCoord] stores a single event in a motion history.
    #[doc(alias = "GdkTimeCoord")]
    pub struct TimeCoord(BoxedInline<ffi::GdkTimeCoord>);
}

impl TimeCoord {
    pub fn time(&self) -> u32 {
        self.inner.time
    }

    pub fn axes(&self) -> &[f64; ffi::GDK_MAX_TIMECOORD_AXES as usize] {
        &self.inner.axes
    }
}