From 0eda82c28fc776923bd5139ca03be503195b0010 Mon Sep 17 00:00:00 2001 From: Tomaka17 Date: Fri, 24 Oct 2014 12:54:58 +0200 Subject: [PATCH] Add `platform_display` impls for win32 and android Fix the cocoa function --- src/android/mod.rs | 3 ++- src/osx/mod.rs | 1 + src/win32/mod.rs | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/android/mod.rs b/src/android/mod.rs index ef2e5e01..4149cc95 100644 --- a/src/android/mod.rs +++ b/src/android/mod.rs @@ -1,6 +1,7 @@ extern crate android_glue; extern crate native; +use libc; use {Event, WindowBuilder}; pub struct Window { @@ -188,7 +189,7 @@ impl Window { } pub fn platform_display(&self) -> *mut libc::c_void { - unimplemented!() + self.surface as *mut libc::c_void } } diff --git a/src/osx/mod.rs b/src/osx/mod.rs index 2ad1ba39..287dcb4c 100644 --- a/src/osx/mod.rs +++ b/src/osx/mod.rs @@ -1,4 +1,5 @@ use Event; +use libc; use std::sync::atomic::AtomicBool; #[cfg(feature = "window")] diff --git a/src/win32/mod.rs b/src/win32/mod.rs index 5ce9677e..13349f7a 100644 --- a/src/win32/mod.rs +++ b/src/win32/mod.rs @@ -1,5 +1,6 @@ use std::sync::atomic::AtomicBool; use std::ptr; +use libc; use Event; #[cfg(feature = "window")] @@ -235,7 +236,7 @@ impl Window { } pub fn platform_display(&self) -> *mut libc::c_void { - unimplemented!() + self.window as *mut libc::c_void } }