2018-05-06 03:36:34 +10:00
|
|
|
#![cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd",
|
2018-07-17 00:25:27 +10:00
|
|
|
target_os = "netbsd", target_os = "openbsd"))]
|
2015-04-30 15:49:46 +10:00
|
|
|
|
2017-10-20 18:46:42 +11:00
|
|
|
pub use self::window::Window;
|
2019-02-21 20:51:43 +11:00
|
|
|
pub use self::event_loop::{EventLoop, EventLoopWindowTarget, EventLoopProxy, WindowEventsSink, MonitorHandle};
|
2017-03-05 00:04:01 +11:00
|
|
|
|
2018-05-06 03:36:34 +10:00
|
|
|
use sctk::reexports::client::protocol::wl_surface;
|
2017-10-20 18:46:42 +11:00
|
|
|
|
2017-03-05 00:04:01 +11:00
|
|
|
mod event_loop;
|
2017-11-11 20:03:42 +11:00
|
|
|
mod pointer;
|
|
|
|
mod touch;
|
2016-10-10 01:03:00 +11:00
|
|
|
mod keyboard;
|
2015-12-09 08:54:06 +11:00
|
|
|
mod window;
|
2017-04-23 06:52:35 +10:00
|
|
|
|
|
|
|
#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
|
|
|
pub struct DeviceId;
|
2017-10-20 18:46:42 +11:00
|
|
|
|
2018-12-22 03:51:48 +11:00
|
|
|
impl DeviceId {
|
|
|
|
pub unsafe fn dummy() -> Self {
|
|
|
|
DeviceId
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-10-20 18:46:42 +11:00
|
|
|
#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
|
|
|
pub struct WindowId(usize);
|
|
|
|
|
2018-12-22 03:51:48 +11:00
|
|
|
impl WindowId {
|
|
|
|
pub unsafe fn dummy() -> Self {
|
|
|
|
WindowId(0)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-10-20 18:46:42 +11:00
|
|
|
#[inline]
|
2019-02-21 20:51:43 +11:00
|
|
|
fn make_wid(s: &wl_surface::WlSurface) -> WindowId {
|
|
|
|
WindowId(s.as_ref().c_ptr() as usize)
|
2018-05-06 03:36:34 +10:00
|
|
|
}
|