Skip to content

Commit 8946d3a

Browse files
committed
todo: migrate AsRawWidget, RawWidget, port winio_handle
1 parent 981e5ba commit 8946d3a

8 files changed

Lines changed: 19 additions & 7 deletions

File tree

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ members = [
1313
"winio-ui-gtk",
1414
"winio-ui-qt",
1515
"winio-ui-app-kit",
16+
"winio-ui-android",
1617
]
1718

1819
resolver = "3"
@@ -36,6 +37,7 @@ winio-ui-winui = { path = "winio-ui-winui", version = "0.6.0-rc.2" }
3637
winio-ui-gtk = { path = "winio-ui-gtk", version = "0.6.0-rc.1" }
3738
winio-ui-qt = { path = "winio-ui-qt", version = "0.6.0-rc.1" }
3839
winio-ui-app-kit = { path = "winio-ui-app-kit", version = "0.6.0-rc.1" }
40+
winio-ui-android = { path = "winio-ui-android", version = "0.1.0" }
3941

4042
compio = { version = "0.19.0-rc.2", default-features = false }
4143
compio-log = "0.1.0"

winio-ui-android/Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,31 @@ name = "winio-ui-android"
33
version = "0.1.0"
44
description = "Android backend for winio."
55
edition = { workspace = true }
6-
authors = { workspace = true }
76
readme = { workspace = true }
87
license = { workspace = true }
98
repository = { workspace = true }
109

1110
[dependencies]
1211

1312
[target.'cfg(target_os = "android")'.dependencies]
14-
log.workspace = true
15-
jni.workspace = true
1613
image = { workspace = true, default-features = false }
1714
futures-util = "0.3.31"
1815
libc = "1.0.0-alpha.1"
16+
jni = "0.21.1"
17+
log = "0.4"
18+
19+
oneshot = { version = "0.1.13", features = ["default"] }
1920

2021
winio-primitive = { workspace = true }
2122
winio-callback = { workspace = true }
2223
winio-handle = { workspace = true }
2324
winio-pollable = { workspace = true }
2425

2526
compio = { workspace = true }
26-
oneshot = {workspace = true,features = ["default"]}
2727

2828
inherit-methods-macro = { workspace = true }
2929

3030
scoped-tls = { workspace = true }
3131

3232
[build-dependencies]
33-
encoding_rs = "0.8.35"
33+
encoding_rs = "0.8.35"

winio-ui-gtk/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ readme = { workspace = true }
77
license = { workspace = true }
88
repository = { workspace = true }
99

10-
[target.'cfg(not(any(windows, target_os = "macos")))'.dependencies]
10+
[target.'cfg(not(any(windows, target_os = "macos", target_os = "android")))'.dependencies]
1111
winio-primitive = { workspace = true }
1212
winio-handle = { workspace = true, features = ["gtk"] }
1313
winio-callback = { workspace = true }

winio-ui-gtk/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
33
#![cfg_attr(docsrs, feature(doc_cfg))]
44
#![cfg(not(any(windows, target_os = "macos")))]
5+
#![cfg(not(target_os = "android"))]
56

67
pub(crate) use winio_pollable::GlobalRuntime;
78

winio-ui-qt/build.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ fn main() {
55

66
let target_os = std::env::var("CARGO_CFG_TARGET_OS");
77

8-
if target_os.as_deref() != Ok("windows") && target_os.as_deref() != Ok("macos") {
8+
if target_os.as_deref() != Ok("windows")
9+
&& target_os.as_deref() != Ok("macos")
10+
&& target_os.as_deref() != Ok("android")
11+
{
912
let mut modules = vec![
1013
"Core".into(),
1114
"Gui".into(),

winio-ui-qt/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
33
#![cfg_attr(docsrs, feature(doc_cfg))]
44
#![cfg(not(any(windows, target_os = "macos")))]
5+
#![cfg(not(target_os = "android"))]
56

67
pub(crate) use winio_pollable::GlobalRuntime;
78

winio/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ winio-ui-winui = { workspace = true, optional = true }
3333
[target.'cfg(target_os = "macos")'.dependencies]
3434
winio-ui-app-kit = { workspace = true }
3535

36+
[target.'cfg(target_os = "android")'.dependencies]
37+
winio-ui-android = { workspace = true }
38+
3639
[target.'cfg(not(any(windows, target_os = "macos")))'.dependencies]
3740
winio-ui-gtk = { workspace = true, optional = true }
3841
winio-ui-qt = { workspace = true, optional = true }

winio/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ cfg_if::cfg_if! {
3030
}
3131
} else if #[cfg(target_os = "macos")] {
3232
use winio_ui_app_kit as sys;
33+
} else if #[cfg(target_os = "android")] {
34+
use winio_ui_android as sys;
3335
} else {
3436
#[cfg(all(feature = "gtk", feature = "qt"))]
3537
compile_error!("You must choose only one of these features: [\"gtk\", \"qt\"]");

0 commit comments

Comments
 (0)