Update raw-window-handle to 0.2 (#1191)
This commit is contained in:
parent
34348435fd
commit
18a0119b06
4 changed files with 16 additions and 6 deletions
|
|
@ -19,6 +19,7 @@ use crate::{
|
|||
CreationError, CursorIcon, Event, LogicalPosition, LogicalSize, PhysicalPosition, PhysicalSize,
|
||||
WindowAttributes, WindowEvent, WindowId as RootWindowId,
|
||||
};
|
||||
use raw_window_handle::{android::AndroidHandle, RawWindowHandle};
|
||||
use CreationError::OsError;
|
||||
|
||||
pub type OsError = std::io::Error;
|
||||
|
|
@ -421,6 +422,15 @@ impl Window {
|
|||
pub fn id(&self) -> WindowId {
|
||||
WindowId
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn raw_window_handle(&self) -> RawWindowHandle {
|
||||
let handle = AndroidHandle {
|
||||
a_native_window: self.native_window,
|
||||
..WindowsHandle::empty()
|
||||
};
|
||||
RawWindowHandle::Android(handle)
|
||||
}
|
||||
}
|
||||
|
||||
unsafe impl Send for Window {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue