Rewrite of wayland backend to new wayland-client API (#325)

* wayland: clean state for rewrite to new wayland-client API

* wayland: context init

* wayland: Monitors logic

* wayland: Basic event loop logic

* wayland: Keyboard handling

* wayland: pointer handling

* wayland: refactor to remove WaylandContext

* wayland: window logic

* wayland: event dispatching logic

* wayland: update changelog
This commit is contained in:
Victor Berger 2017-10-20 09:46:42 +02:00 committed by tomaka
parent 4e4db1749d
commit d10312c6b1
8 changed files with 953 additions and 1158 deletions

View file

@ -1,22 +1,27 @@
#![cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd", target_os = "openbsd"))]
pub use self::window::{Window, WindowId};
pub use self::event_loop::{EventsLoop, EventsLoopProxy};
pub use self::context::{WaylandContext, MonitorId, get_available_monitors,
get_primary_monitor};
use self::window::{make_wid, DecoratedHandler};
use self::event_loop::EventsLoopSink;
pub use self::window::Window;
pub use self::event_loop::{EventsLoop, EventsLoopProxy, EventsLoopSink, MonitorId};
extern crate wayland_kbd;
extern crate wayland_window;
extern crate wayland_protocols;
extern crate tempfile;
mod context;
use wayland_client::protocol::wl_surface;
use wayland_client::Proxy;
mod event_loop;
mod keyboard;
mod window;
#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct DeviceId;
#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct WindowId(usize);
#[inline]
fn make_wid(s: &wl_surface::WlSurface) -> WindowId {
WindowId(s.ptr() as usize)
}