aboutsummaryrefslogtreecommitdiffstats
path: root/src/platform
diff options
context:
space:
mode:
authortomaka <pierre.krieger1708@gmail.com>2015-06-29 09:29:46 +0200
committertomaka <pierre.krieger1708@gmail.com>2015-06-29 09:29:46 +0200
commit836e53e55a94f3126ff17a956fe6328198d20f38 (patch)
tree9dcd66615bd0467e89fbcd8d6a00c114679c690d /src/platform
parent164d47b93c7dc95cf52c5ef205a107a8a439e4ef (diff)
parent7053837ac19d5c6159f492e177d417aa994b7d04 (diff)
downloadglutin-836e53e55a94f3126ff17a956fe6328198d20f38.tar.gz
glutin-836e53e55a94f3126ff17a956fe6328198d20f38.zip
Merge pull request #477 from rozaliev/feature/ios
[WIP] ios support
Diffstat (limited to 'src/platform')
-rw-r--r--src/platform/ios/mod.rs47
-rw-r--r--src/platform/mod.rs5
2 files changed, 51 insertions, 1 deletions
diff --git a/src/platform/ios/mod.rs b/src/platform/ios/mod.rs
new file mode 100644
index 0000000..7cbdd84
--- /dev/null
+++ b/src/platform/ios/mod.rs
@@ -0,0 +1,47 @@
+#![cfg(target_os = "ios")]
+use libc::c_void;
+
+use BuilderAttribs;
+use CreationError;
+use PixelFormat;
+
+pub use api::ios::*;
+
+pub struct HeadlessContext(i32);
+
+impl HeadlessContext {
+ /// See the docs in the crate root file.
+ pub fn new(_builder: BuilderAttribs) -> Result<HeadlessContext, CreationError> {
+ unimplemented!()
+ }
+
+ /// See the docs in the crate root file.
+ pub unsafe fn make_current(&self) {
+ unimplemented!()
+ }
+
+ pub fn swap_buffers(&self) {
+ unimplemented!()
+ }
+
+ /// See the docs in the crate root file.
+ pub fn is_current(&self) -> bool {
+ unimplemented!()
+ }
+
+ /// See the docs in the crate root file.
+ pub fn get_proc_address(&self, _addr: &str) -> *const c_void {
+ unimplemented!()
+ }
+
+ pub fn get_api(&self) -> ::Api {
+ ::Api::OpenGlEs
+ }
+
+ pub fn get_pixel_format(&self) -> PixelFormat {
+ unimplemented!();
+ }
+}
+
+unsafe impl Send for HeadlessContext {}
+unsafe impl Sync for HeadlessContext {}
diff --git a/src/platform/mod.rs b/src/platform/mod.rs
index 68ddfcc..c4b2265 100644
--- a/src/platform/mod.rs
+++ b/src/platform/mod.rs
@@ -12,6 +12,9 @@ mod platform;
#[cfg(target_os = "android")]
#[path="android/mod.rs"]
mod platform;
+#[cfg(target_os = "ios")]
+#[path="ios/mod.rs"]
+mod platform;
-#[cfg(all(not(target_os = "windows"), not(target_os = "linux"), not(target_os = "macos"), not(target_os = "android")))]
+#[cfg(all(not(target_os = "ios"), not(target_os = "windows"), not(target_os = "linux"), not(target_os = "macos"), not(target_os = "android")))]
use this_platform_is_not_supported;