diff --git a/src/lib.rs b/src/lib.rs index 59f0aa0..d47d194 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -4,6 +4,8 @@ //! #![deny(missing_debug_implementations)] +extern crate raw_window_handle; + use std::fmt; use std::os::raw; @@ -91,6 +93,7 @@ pub trait InputCallback { mod error; pub use self::error::Error; pub type Result = std::result::Result; +pub use raw_window_handle::HasRawWindowHandle as HasRawWindowHandle; mod key; pub use key::Key; @@ -134,6 +137,12 @@ impl fmt::Debug for Window { } } +unsafe impl raw_window_handle::HasRawWindowHandle for Window { + fn raw_window_handle(&self) -> raw_window_handle::RawWindowHandle { + self.0.raw_window_handle() + } +} + pub fn clamp(low: T, value: T, high: T) -> T { if value < low { low