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