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
|
|
@ -30,7 +30,9 @@ use std::str::FromStr;
|
|||
use std::str::from_utf8;
|
||||
use std::sync::Mutex;
|
||||
use std::ops::Deref;
|
||||
use std::os::raw::c_void;
|
||||
|
||||
use os::macos::WindowExt;
|
||||
use events::ElementState;
|
||||
use events::{self, MouseButton, TouchPhase};
|
||||
|
||||
|
|
@ -177,6 +179,18 @@ pub struct Window {
|
|||
unsafe impl Send for Window {}
|
||||
unsafe impl Sync for Window {}
|
||||
|
||||
impl WindowExt for Window {
|
||||
#[inline]
|
||||
fn get_nswindow(&self) -> *mut c_void {
|
||||
*self.window as *mut c_void
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn get_nsview(&self) -> *mut c_void {
|
||||
*self.view as *mut c_void
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct WindowProxy;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue