aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authortomaka <pierre.krieger1708@gmail.com>2015-04-24 14:05:35 +0200
committertomaka <pierre.krieger1708@gmail.com>2015-04-24 14:05:35 +0200
commitb6252d9de2f487982193569212e301fb598593dd (patch)
tree3061216335701a5faa8bd3c5c9ec0499a357be5a /src
parentc1af76550f311e3da7a08d393b4ea9805cb61a7b (diff)
parent3ad7f9a58429b02b11b18f6a70ac011f698b6f4b (diff)
downloadglutin-b6252d9de2f487982193569212e301fb598593dd.tar.gz
glutin-b6252d9de2f487982193569212e301fb598593dd.zip
Merge pull request #393 from tomaka/reorganization
Create reorganization
Diffstat (limited to 'src')
-rw-r--r--src/api/android/ffi.rs (renamed from src/android/ffi.rs)0
-rw-r--r--src/api/android/mod.rs (renamed from src/android/mod.rs)2
-rw-r--r--src/api/cocoa/event.rs (renamed from src/cocoa/event.rs)0
-rw-r--r--src/api/cocoa/headless.rs (renamed from src/cocoa/headless.rs)0
-rw-r--r--src/api/cocoa/mod.rs (renamed from src/cocoa/mod.rs)2
-rw-r--r--src/api/cocoa/monitor.rs (renamed from src/cocoa/monitor.rs)0
-rw-r--r--src/api/mod.rs4
-rw-r--r--src/api/win32/callback.rs (renamed from src/win32/callback.rs)0
-rw-r--r--src/api/win32/event.rs (renamed from src/win32/event.rs)0
-rw-r--r--src/api/win32/gl.rs (renamed from src/win32/gl.rs)0
-rw-r--r--src/api/win32/headless.rs (renamed from src/win32/headless.rs)0
-rw-r--r--src/api/win32/init.rs (renamed from src/win32/init.rs)0
-rw-r--r--src/api/win32/make_current_guard.rs (renamed from src/win32/make_current_guard.rs)0
-rw-r--r--src/api/win32/mod.rs (renamed from src/win32/mod.rs)2
-rw-r--r--src/api/win32/monitor.rs (renamed from src/win32/monitor.rs)0
-rw-r--r--src/api/x11/ffi.rs (renamed from src/x11/ffi.rs)0
-rw-r--r--src/api/x11/headless.rs (renamed from src/x11/headless.rs)0
-rw-r--r--src/api/x11/mod.rs (renamed from src/x11/mod.rs)2
-rw-r--r--src/api/x11/window/events.rs (renamed from src/x11/window/events.rs)0
-rw-r--r--src/api/x11/window/mod.rs (renamed from src/x11/window/mod.rs)0
-rw-r--r--src/api/x11/window/monitor.rs (renamed from src/x11/window/monitor.rs)0
-rw-r--r--src/lib.rs16
-rw-r--r--src/platform/android/mod.rs3
-rw-r--r--src/platform/linux/mod.rs3
-rw-r--r--src/platform/macos/mod.rs3
-rw-r--r--src/platform/mod.rs17
-rw-r--r--src/platform/windows/mod.rs3
27 files changed, 42 insertions, 15 deletions
diff --git a/src/android/ffi.rs b/src/api/android/ffi.rs
index 111f670..111f670 100644
--- a/src/android/ffi.rs
+++ b/src/api/android/ffi.rs
diff --git a/src/android/mod.rs b/src/api/android/mod.rs
index afe49c2..c769fc8 100644
--- a/src/android/mod.rs
+++ b/src/api/android/mod.rs
@@ -1,3 +1,5 @@
+#![cfg(target_os = "android")]
+
extern crate android_glue;
use libc;
diff --git a/src/cocoa/event.rs b/src/api/cocoa/event.rs
index 31bed10..31bed10 100644
--- a/src/cocoa/event.rs
+++ b/src/api/cocoa/event.rs
diff --git a/src/cocoa/headless.rs b/src/api/cocoa/headless.rs
index 298027f..298027f 100644
--- a/src/cocoa/headless.rs
+++ b/src/api/cocoa/headless.rs
diff --git a/src/cocoa/mod.rs b/src/api/cocoa/mod.rs
index 7125720..b9c566f 100644
--- a/src/cocoa/mod.rs
+++ b/src/api/cocoa/mod.rs
@@ -1,3 +1,5 @@
+#![cfg(target_os = "macos")]
+
#[cfg(feature = "headless")]
pub use self::headless::HeadlessContext;
diff --git a/src/cocoa/monitor.rs b/src/api/cocoa/monitor.rs
index 40c7896..40c7896 100644
--- a/src/cocoa/monitor.rs
+++ b/src/api/cocoa/monitor.rs
diff --git a/src/api/mod.rs b/src/api/mod.rs
new file mode 100644
index 0000000..472c716
--- /dev/null
+++ b/src/api/mod.rs
@@ -0,0 +1,4 @@
+pub mod android;
+pub mod cocoa;
+pub mod win32;
+pub mod x11;
diff --git a/src/win32/callback.rs b/src/api/win32/callback.rs
index e852eeb..e852eeb 100644
--- a/src/win32/callback.rs
+++ b/src/api/win32/callback.rs
diff --git a/src/win32/event.rs b/src/api/win32/event.rs
index 4c8f4f3..4c8f4f3 100644
--- a/src/win32/event.rs
+++ b/src/api/win32/event.rs
diff --git a/src/win32/gl.rs b/src/api/win32/gl.rs
index 1354d95..1354d95 100644
--- a/src/win32/gl.rs
+++ b/src/api/win32/gl.rs
diff --git a/src/win32/headless.rs b/src/api/win32/headless.rs
index 6189360..6189360 100644
--- a/src/win32/headless.rs
+++ b/src/api/win32/headless.rs
diff --git a/src/win32/init.rs b/src/api/win32/init.rs
index 5cdd6b8..5cdd6b8 100644
--- a/src/win32/init.rs
+++ b/src/api/win32/init.rs
diff --git a/src/win32/make_current_guard.rs b/src/api/win32/make_current_guard.rs
index 8983899..8983899 100644
--- a/src/win32/make_current_guard.rs
+++ b/src/api/win32/make_current_guard.rs
diff --git a/src/win32/mod.rs b/src/api/win32/mod.rs
index 4a9dcbf..41fb6aa 100644
--- a/src/win32/mod.rs
+++ b/src/api/win32/mod.rs
@@ -1,3 +1,5 @@
+#![cfg(target_os = "windows")]
+
use std::sync::atomic::AtomicBool;
use std::mem;
use std::ptr;
diff --git a/src/win32/monitor.rs b/src/api/win32/monitor.rs
index 4b592cb..4b592cb 100644
--- a/src/win32/monitor.rs
+++ b/src/api/win32/monitor.rs
diff --git a/src/x11/ffi.rs b/src/api/x11/ffi.rs
index 2fcda3b..2fcda3b 100644
--- a/src/x11/ffi.rs
+++ b/src/api/x11/ffi.rs
diff --git a/src/x11/headless.rs b/src/api/x11/headless.rs
index 8dffdea..8dffdea 100644
--- a/src/x11/headless.rs
+++ b/src/api/x11/headless.rs
diff --git a/src/x11/mod.rs b/src/api/x11/mod.rs
index cc87b2b..5aadc94 100644
--- a/src/x11/mod.rs
+++ b/src/api/x11/mod.rs
@@ -1,3 +1,5 @@
+#![cfg(target_os = "linux")]
+
#[cfg(feature = "headless")]
pub use self::headless::HeadlessContext;
diff --git a/src/x11/window/events.rs b/src/api/x11/window/events.rs
index 0a8c95f..0a8c95f 100644
--- a/src/x11/window/events.rs
+++ b/src/api/x11/window/events.rs
diff --git a/src/x11/window/mod.rs b/src/api/x11/window/mod.rs
index 80338c7..80338c7 100644
--- a/src/x11/window/mod.rs
+++ b/src/api/x11/window/mod.rs
diff --git a/src/x11/window/monitor.rs b/src/api/x11/window/monitor.rs
index 46f2062..46f2062 100644
--- a/src/x11/window/monitor.rs
+++ b/src/api/x11/window/monitor.rs
diff --git a/src/lib.rs b/src/lib.rs
index 9ed059e..4079a97 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -61,22 +61,8 @@ pub use window::{AvailableMonitorsIter, MonitorID, get_available_monitors, get_p
#[cfg(feature = "window")]
pub use native_monitor::NativeMonitorId;
-#[cfg(all(not(target_os = "windows"), not(target_os = "linux"), not(target_os = "macos"), not(target_os = "android")))]
-use this_platform_is_not_supported;
-
-#[cfg(target_os = "windows")]
-#[path="win32/mod.rs"]
+mod api;
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;
#[cfg(feature = "headless")]
mod headless;
diff --git a/src/platform/android/mod.rs b/src/platform/android/mod.rs
new file mode 100644
index 0000000..c90d8ce
--- /dev/null
+++ b/src/platform/android/mod.rs
@@ -0,0 +1,3 @@
+#![cfg(target_os = "android")]
+
+pub use api::android::*;
diff --git a/src/platform/linux/mod.rs b/src/platform/linux/mod.rs
new file mode 100644
index 0000000..df3a318
--- /dev/null
+++ b/src/platform/linux/mod.rs
@@ -0,0 +1,3 @@
+#![cfg(target_os = "linux")]
+
+pub use api::x11::*;
diff --git a/src/platform/macos/mod.rs b/src/platform/macos/mod.rs
new file mode 100644
index 0000000..1d253a0
--- /dev/null
+++ b/src/platform/macos/mod.rs
@@ -0,0 +1,3 @@
+#![cfg(target_os = "macos")]
+
+pub use api::cocoa::*;
diff --git a/src/platform/mod.rs b/src/platform/mod.rs
new file mode 100644
index 0000000..68ddfcc
--- /dev/null
+++ b/src/platform/mod.rs
@@ -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;
diff --git a/src/platform/windows/mod.rs b/src/platform/windows/mod.rs
new file mode 100644
index 0000000..c13f4f5
--- /dev/null
+++ b/src/platform/windows/mod.rs
@@ -0,0 +1,3 @@
+#![cfg(target_os = "windows")]
+
+pub use api::win32::*;