mirror of
https://github.com/rust-windowing/winit.git
synced 2026-06-27 07:03:15 -04:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a815a12627 | ||
|
|
2455ab8a03 |
@@ -1,5 +1,9 @@
|
||||
# Unreleased
|
||||
|
||||
# Version 0.19.5 (2019-11-04)
|
||||
|
||||
- On Android, fix the missing `raw-window-handle` support
|
||||
|
||||
# Version 0.19.4 (2019-10-16)
|
||||
|
||||
- Add support for `raw-window-handle` 0.3.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "winit"
|
||||
version = "0.19.4"
|
||||
version = "0.19.5"
|
||||
authors = ["The winit contributors", "Pierre Krieger <pierre.krieger1708@gmail.com>"]
|
||||
description = "Cross-platform window creation library."
|
||||
keywords = ["windowing"]
|
||||
|
||||
@@ -13,7 +13,7 @@ Please direct all work against `master`.
|
||||
|
||||
```toml
|
||||
[dependencies]
|
||||
winit = "0.19.3"
|
||||
winit = "0.19.5"
|
||||
```
|
||||
|
||||
## [Documentation](https://docs.rs/winit)
|
||||
|
||||
@@ -4,6 +4,7 @@ extern crate android_glue;
|
||||
|
||||
mod ffi;
|
||||
|
||||
use raw_window_handle::{android::AndroidHandle, RawWindowHandle};
|
||||
use std::cell::RefCell;
|
||||
use std::collections::VecDeque;
|
||||
use std::fmt;
|
||||
@@ -422,6 +423,14 @@ impl Window {
|
||||
pub fn id(&self) -> WindowId {
|
||||
WindowId
|
||||
}
|
||||
|
||||
pub fn raw_window_handle(&self) -> RawWindowHandle {
|
||||
let handle = AndroidHandle {
|
||||
a_native_window: self.native_window as _,
|
||||
..AndroidHandle::empty()
|
||||
};
|
||||
RawWindowHandle::Android(handle)
|
||||
}
|
||||
}
|
||||
|
||||
unsafe impl Send for Window {}
|
||||
|
||||
Reference in New Issue
Block a user