#[macro_use] extern crate bitflags;
extern crate crossbeam;
#[macro_use] extern crate dlib;
extern crate libc;
extern crate wayland_sys;
mod env;
mod events;
mod sys;
#[cfg(feature = "egl")]
pub mod egl;
#[cfg(feature = "cursor")]
pub mod cursor;
pub mod wayland;
use wayland_sys::client::wl_proxy;
use wayland_sys::common::wl_interface;
pub use events::{Event, EventIterator};
pub trait Proxy {
fn ptr(&self) -> *mut wl_proxy;
fn interface() -> *mut wl_interface;
fn interface_name() -> &'static str;
fn version() -> u32;
fn id(&self) -> ProxyId;
unsafe fn from_ptr(ptr: *mut wl_proxy) -> Self;
unsafe fn from_ptr_no_own(ptr: *mut wl_proxy) -> Self;
fn set_evt_iterator(&mut self, iter: &EventIterator);
}
#[derive(Copy,Clone,PartialEq,Eq,Debug,Hash)]
pub struct ProxyId { id: usize }
fn wrap_proxy(ptr: *mut wl_proxy) -> ProxyId {
ProxyId { id: ptr as usize}
}
pub fn is_available() -> bool {
::wayland_sys::client::is_lib_available()
}