Implement raw_window_handle::HasRawWindowHandle for Window type (#1105)
* Implement raw_window_handle::HasRawWindowHandle for Window type * Format * Address compilation issues * Fix Linux build hopefully * Fix iOS build
This commit is contained in:
parent
1aab328e2a
commit
604016d69d
9 changed files with 67 additions and 0 deletions
|
|
@ -1,3 +1,4 @@
|
|||
use raw_window_handle::{ios::IOSHandle, RawWindowHandle};
|
||||
use std::{
|
||||
collections::VecDeque,
|
||||
ops::{Deref, DerefMut},
|
||||
|
|
@ -250,6 +251,16 @@ impl Inner {
|
|||
pub fn id(&self) -> WindowId {
|
||||
self.window.into()
|
||||
}
|
||||
|
||||
pub fn raw_window_handle(&self) -> RawWindowHandle {
|
||||
let handle = IOSHandle {
|
||||
ui_window: self.window as _,
|
||||
ui_view: self.view as _,
|
||||
ui_view_controller: self.view_controller as _,
|
||||
..IOSHandle::empty()
|
||||
};
|
||||
RawWindowHandle::IOS(handle)
|
||||
}
|
||||
}
|
||||
|
||||
pub struct Window {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue