1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
/// An opaque unique identifier to a surface, can be tested for equality. #[derive(PartialEq, Eq, Copy, Clone, Hash)] pub struct SurfaceId { p: usize } #[inline] pub fn wrap_surface_id(p: usize) -> SurfaceId { SurfaceId { p: p } } /// An opaque identifier to the serial number associated to an event. /// /// Many events in the wayland protocol have a serial number associated to them, /// which must be provided in queries made in response to these events. #[derive(Copy, Clone)] pub struct Serial { s: u32 } #[inline] pub fn wrap_serial(s: u32) -> Serial { Serial { s: s } } // will be useful in the future #[allow(dead_code)] #[inline] pub fn unwrap_serial(s: Serial) -> u32 { s.s }