Move api module into platform::linux

This commit is contained in:
Victor Berger 2017-03-03 20:56:27 +01:00
parent d0ae5bda16
commit 4acf437221
16 changed files with 12 additions and 17 deletions

View file

@ -1,5 +0,0 @@
// TODO: remove this module altogether and move all implementations to `platform`
pub mod dlopen;
pub mod wayland;
pub mod x11;

View file

@ -128,7 +128,6 @@ pub use native_monitor::NativeMonitorId;
#[macro_use] #[macro_use]
mod api_transition; mod api_transition;
mod api;
mod platform; mod platform;
mod events; mod events;
mod window; mod window;

View file

@ -7,14 +7,12 @@ use Window;
use platform::Window as LinuxWindow; use platform::Window as LinuxWindow;
use platform::{UnixBackend, UNIX_BACKEND}; use platform::{UnixBackend, UNIX_BACKEND};
use WindowBuilder; use WindowBuilder;
use api::x11::XConnection; use platform::x11::XConnection;
use api::x11::ffi::XVisualInfo; use platform::x11::ffi::XVisualInfo;
use wayland_client::protocol::wl_display::WlDisplay; use wayland_client::protocol::wl_display::WlDisplay;
use wayland_client::protocol::wl_surface::WlSurface; use wayland_client::protocol::wl_surface::WlSurface;
pub use api::x11;
// TODO: do not expose XConnection // TODO: do not expose XConnection
pub fn get_x11_xconnection() -> Option<Arc<XConnection>> { pub fn get_x11_xconnection() -> Option<Arc<XConnection>> {
match *UNIX_BACKEND { match *UNIX_BACKEND {

View file

@ -10,12 +10,15 @@ use MouseCursor;
use WindowAttributes; use WindowAttributes;
use libc; use libc;
use api::wayland; use self::x11::XConnection;
use api::x11; use self::x11::XError;
use api::x11::XConnection; use self::x11::XNotSupported;
use api::x11::XError; use self::x11::ffi::XVisualInfo;
use api::x11::XNotSupported;
use api::x11::ffi::XVisualInfo; mod dlopen;
pub mod wayland;
pub mod x11;
gen_api_transition!(); gen_api_transition!();

View file

@ -7,7 +7,7 @@ use std::sync::Mutex;
use libc; use libc;
use super::ffi; use super::ffi;
use api::dlopen; use super::super::dlopen;
/// A connection to an X server. /// A connection to an X server.
pub struct XConnection { pub struct XConnection {