Compare commits

..

2 Commits

Author SHA1 Message Date
Aaro Perämaa
a815a12627 fix broken / missing raw-window-handle implementation on android (#1258) 2019-11-04 11:53:57 -05:00
Osspial
2455ab8a03 Bump version in README.md 2019-10-16 22:39:15 -04:00
4 changed files with 15 additions and 2 deletions

View File

@@ -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.

View File

@@ -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"]

View File

@@ -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)

View File

@@ -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 {}