Merge pull request #393 from tomaka/reorganization
Create reorganization
This commit is contained in:
commit
b6252d9de2
27 changed files with 42 additions and 15 deletions
|
|
@ -1,3 +1,5 @@
|
||||||
|
#![cfg(target_os = "android")]
|
||||||
|
|
||||||
extern crate android_glue;
|
extern crate android_glue;
|
||||||
|
|
||||||
use libc;
|
use libc;
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
#![cfg(target_os = "macos")]
|
||||||
|
|
||||||
#[cfg(feature = "headless")]
|
#[cfg(feature = "headless")]
|
||||||
pub use self::headless::HeadlessContext;
|
pub use self::headless::HeadlessContext;
|
||||||
|
|
||||||
4
src/api/mod.rs
Normal file
4
src/api/mod.rs
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
pub mod android;
|
||||||
|
pub mod cocoa;
|
||||||
|
pub mod win32;
|
||||||
|
pub mod x11;
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
#![cfg(target_os = "windows")]
|
||||||
|
|
||||||
use std::sync::atomic::AtomicBool;
|
use std::sync::atomic::AtomicBool;
|
||||||
use std::mem;
|
use std::mem;
|
||||||
use std::ptr;
|
use std::ptr;
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
#![cfg(target_os = "linux")]
|
||||||
|
|
||||||
#[cfg(feature = "headless")]
|
#[cfg(feature = "headless")]
|
||||||
pub use self::headless::HeadlessContext;
|
pub use self::headless::HeadlessContext;
|
||||||
|
|
||||||
16
src/lib.rs
16
src/lib.rs
|
|
@ -61,22 +61,8 @@ pub use window::{AvailableMonitorsIter, MonitorID, get_available_monitors, get_p
|
||||||
#[cfg(feature = "window")]
|
#[cfg(feature = "window")]
|
||||||
pub use native_monitor::NativeMonitorId;
|
pub use native_monitor::NativeMonitorId;
|
||||||
|
|
||||||
#[cfg(all(not(target_os = "windows"), not(target_os = "linux"), not(target_os = "macos"), not(target_os = "android")))]
|
mod api;
|
||||||
use this_platform_is_not_supported;
|
|
||||||
|
|
||||||
#[cfg(target_os = "windows")]
|
|
||||||
#[path="win32/mod.rs"]
|
|
||||||
mod platform;
|
mod platform;
|
||||||
#[cfg(target_os = "linux")]
|
|
||||||
#[path="x11/mod.rs"]
|
|
||||||
mod platform;
|
|
||||||
#[cfg(target_os = "macos")]
|
|
||||||
#[path="cocoa/mod.rs"]
|
|
||||||
mod platform;
|
|
||||||
#[cfg(target_os = "android")]
|
|
||||||
#[path="android/mod.rs"]
|
|
||||||
mod platform;
|
|
||||||
|
|
||||||
mod events;
|
mod events;
|
||||||
#[cfg(feature = "headless")]
|
#[cfg(feature = "headless")]
|
||||||
mod headless;
|
mod headless;
|
||||||
|
|
|
||||||
3
src/platform/android/mod.rs
Normal file
3
src/platform/android/mod.rs
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
#![cfg(target_os = "android")]
|
||||||
|
|
||||||
|
pub use api::android::*;
|
||||||
3
src/platform/linux/mod.rs
Normal file
3
src/platform/linux/mod.rs
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
#![cfg(target_os = "linux")]
|
||||||
|
|
||||||
|
pub use api::x11::*;
|
||||||
3
src/platform/macos/mod.rs
Normal file
3
src/platform/macos/mod.rs
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
#![cfg(target_os = "macos")]
|
||||||
|
|
||||||
|
pub use api::cocoa::*;
|
||||||
17
src/platform/mod.rs
Normal file
17
src/platform/mod.rs
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
pub use self::platform::*;
|
||||||
|
|
||||||
|
#[cfg(target_os = "windows")]
|
||||||
|
#[path="windows/mod.rs"]
|
||||||
|
mod platform;
|
||||||
|
#[cfg(target_os = "linux")]
|
||||||
|
#[path="linux/mod.rs"]
|
||||||
|
mod platform;
|
||||||
|
#[cfg(target_os = "macos")]
|
||||||
|
#[path="macos/mod.rs"]
|
||||||
|
mod platform;
|
||||||
|
#[cfg(target_os = "android")]
|
||||||
|
#[path="android/mod.rs"]
|
||||||
|
mod platform;
|
||||||
|
|
||||||
|
#[cfg(all(not(target_os = "windows"), not(target_os = "linux"), not(target_os = "macos"), not(target_os = "android")))]
|
||||||
|
use this_platform_is_not_supported;
|
||||||
3
src/platform/windows/mod.rs
Normal file
3
src/platform/windows/mod.rs
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
#![cfg(target_os = "windows")]
|
||||||
|
|
||||||
|
pub use api::win32::*;
|
||||||
Loading…
Add table
Add a link
Reference in a new issue