Add get_nsview to WindowExt for MacOS
This commit is contained in:
parent
41e1a768e5
commit
d5b88f1d5f
2 changed files with 19 additions and 7 deletions
|
|
@ -9,15 +9,13 @@ use {Window, WindowBuilder};
|
|||
pub trait WindowExt {
|
||||
/// Returns a pointer to the cocoa `NSWindow` that is used by this window.
|
||||
///
|
||||
/// The pointer will become invalid when the glutin `Window` is destroyed.
|
||||
/// The pointer will become invalid when the `Window` is destroyed.
|
||||
fn get_nswindow(&self) -> *mut c_void;
|
||||
}
|
||||
|
||||
impl WindowExt for Window {
|
||||
#[inline]
|
||||
fn get_nswindow(&self) -> *mut c_void {
|
||||
self.window.platform_window() as *mut c_void
|
||||
}
|
||||
/// Returns a pointer to the cocoa `NSView` that is used by this window.
|
||||
///
|
||||
/// The pointer will become invalid when the `Window` is destroyed.
|
||||
fn get_nsview(&self) -> *mut c_void;
|
||||
}
|
||||
|
||||
/// Corresponds to `NSApplicationActivationPolicy`.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue