Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
d185ec7
feat: create workspace
Berrysoft Jun 29, 2025
d70d673
feat: winio-primitive
Berrysoft Jun 29, 2025
7b56591
feat: winio-layout
Berrysoft Jun 29, 2025
8c9b805
fix(layout): macros
Berrysoft Jun 29, 2025
af50176
feat: winio-elm
Berrysoft Jun 29, 2025
b90e25d
feat: winio-handle
Berrysoft Jun 29, 2025
4933ee2
fix(win): winio build
Berrysoft Jun 29, 2025
4d7f538
refactor(elm): move macros
Berrysoft Jun 29, 2025
d1b4bd1
refactor(elm): move collection
Berrysoft Jun 29, 2025
dddf167
feat: winio-ui-win32
Berrysoft Jun 29, 2025
99c4fc6
doc: fix
Berrysoft Jun 29, 2025
87cd24d
refactor: ColorExt
Berrysoft Jun 29, 2025
b565d98
feat: winio-callback
Berrysoft Jun 29, 2025
e4156ff
feat: winio-ui-gtk
Berrysoft Jun 29, 2025
e70cb7f
feat: winio-pollable
Berrysoft Jun 29, 2025
26d60f9
fix(gtk): winio-handle feature
Berrysoft Jun 29, 2025
bd0b3a1
fix(pollable): eventfd clear
Berrysoft Jun 29, 2025
d872517
feat: winio-ui-qt
Berrysoft Jun 29, 2025
66f1ba0
fix(win32): revert RawWindow back
Berrysoft Jun 29, 2025
1359131
fix(win32): deps
Berrysoft Jun 29, 2025
f2a0ae9
feat: winio-ui-app-kit
Berrysoft Jun 29, 2025
2a641b8
fix: remove unused deps
Berrysoft Jun 29, 2025
9fdec43
ci: try to fix packages
Berrysoft Jun 29, 2025
9f2c18d
ci: fix package name
Berrysoft Jun 29, 2025
46387ad
test: ignore doc tests
Berrysoft Jun 29, 2025
1f22b31
refactor(win32): inherit!
Berrysoft Jun 29, 2025
843682f
doc: fix links & hidden items
Berrysoft Jun 29, 2025
9c8e387
refactor: use proc macro
Berrysoft Jun 29, 2025
305f991
refactor(gtk): inherit
Berrysoft Jun 29, 2025
07e5840
refactor(qt): inherit
Berrysoft Jun 30, 2025
a106fde
refactor(appkit): inherit
Berrysoft Jun 30, 2025
09995a8
refactor: guard some deps
Berrysoft Jun 30, 2025
0480eb8
refactor: add prelude mod
Berrysoft Jun 30, 2025
db49084
doc: fix winio usage
Berrysoft Jun 30, 2025
d1097e3
feat(elm): guard deps with features
Berrysoft Jun 30, 2025
40e919e
feat: remove beta from ver
Berrysoft Jun 30, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,14 @@ jobs:
matrix:
toolchain: ['nightly']
setup:
- os: 'ubuntu-22.04'
deps: 'qtbase5-dev'
- os: 'ubuntu-24.04'
deps: 'qtbase5-dev'
- os: 'ubuntu-22.04'
deps: 'qt6-base-dev'
deps: 'qtbase5-dev libgtk-4-dev'
- os: 'ubuntu-24.04'
deps: 'qt6-base-dev'
deps: 'qt6-base-dev libgtk-4-dev'
- os: 'ubuntu-24.04'
features: 'gtk'
no_default_features: true
deps: 'libgtk-4-dev'
deps: 'qt6-base-dev libgtk-4-dev'
- os: 'windows-latest'
target: 'x86_64-pc-windows-msvc'
- os: 'windows-latest'
Expand All @@ -49,7 +45,7 @@ jobs:
if: runner.os == 'Linux'
run: |
sudo apt update
sudo apt install -y "${{ matrix.setup.deps }}"
sudo apt install -y ${{ matrix.setup.deps }}
- uses: msys2/setup-msys2@v2
if: ${{ endsWith(matrix.setup.target, 'gnullvm') }}
with:
Expand Down
207 changes: 37 additions & 170 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,189 +1,56 @@
[package]
name = "winio"
version = "0.7.0-beta.2"
[workspace]
members = [
"winio",
"winio-primitive",
"winio-callback",
"winio-layout",
"winio-handle",
"winio-elm",
"winio-pollable",
"winio-ui-win32",
"winio-ui-gtk",
"winio-ui-qt",
"winio-ui-app-kit",
]

resolver = "2"

[workspace.package]
edition = "2021"
description = "Single-threaded async GUI runtime based on compio."
license = "MIT"
authors = ["Berrysoft <Strawberry_Str@hotmail.com>"]
readme = "README.md"
license = "MIT"
repository = "https://github.com/compio-rs/winio"
categories = ["asynchronous", "gui"]
keywords = ["async", "gui"]

[dependencies]
[workspace.dependencies]
winio-primitive = { path = "winio-primitive", version = "0.1.0" }
winio-callback = { path = "winio-callback", version = "0.1.0" }
winio-layout = { path = "winio-layout", version = "0.1.0" }
winio-handle = { path = "winio-handle", version = "0.1.0" }
winio-elm = { path = "winio-elm", version = "0.1.0" }
winio-pollable = { path = "winio-pollable", version = "0.1.0" }
winio-ui-win32 = { path = "winio-ui-win32", version = "0.1.0" }
winio-ui-gtk = { path = "winio-ui-gtk", version = "0.1.0" }
winio-ui-qt = { path = "winio-ui-qt", version = "0.1.0" }
winio-ui-app-kit = { path = "winio-ui-app-kit", version = "0.1.0" }

compio = "0.15.0"
compio-log = "0.1.0"

bitflags = "2"
cfg-if = "1"
euclid = "0.22"
futures-util = { version = "0.3", features = ["alloc"] }
futures-util = "0.3"
image = { version = "0.25", default-features = false }
inherit-methods-macro = "0.1"
local-sync = "0.1"
paste = "1.0"
rgb = "0.8"
slab = "0.4"
smallvec = "1"
scoped-tls = "1.0"
taffy = "0.8"

[target.'cfg(windows)'.dependencies]
widestring = "1"
windows-sys = { version = "0.60", features = [
"Win32_Foundation",
"Win32_Globalization",
"Win32_Graphics_Gdi",
"Win32_Graphics_Dwm",
"Win32_Networking_WinSock",
"Win32_Security",
"Win32_Storage_FileSystem",
"Win32_System_IO",
"Win32_System_LibraryLoader",
"Win32_System_SystemServices",
"Win32_System_Threading",
"Win32_System_WindowsProgramming",
"Win32_UI_Accessibility",
"Win32_UI_Controls",
"Win32_UI_HiDpi",
"Win32_UI_Input_KeyboardAndMouse",
"Win32_UI_Shell",
"Win32_UI_WindowsAndMessaging",
] }
windows = { version = "0.61", features = [
"Foundation_Numerics",
"UI_ViewManagement",
"Win32_Foundation",
"Win32_Graphics_Direct2D",
"Win32_Graphics_Direct2D_Common",
"Win32_Graphics_DirectWrite",
"Win32_Graphics_Dxgi_Common",
"Win32_System_Com",
"Win32_UI_Shell",
"Win32_UI_Shell_Common",
] }
windows-numerics = "0.2"
slim-detours-sys = { version = "0.3", optional = true }
sync-unsafe-cell = { version = "0.1", optional = true }
windows-sys = "0.60"

[target.'cfg(target_os = "macos")'.dependencies]
block2 = "0.6"
objc2 = "0.6"
objc2-core-foundation = { version = "0.3", features = [
"CFCGTypes",
"CFFileDescriptor",
"CFRunLoop",
] }
objc2-core-graphics = { version = "0.3", features = ["CGColor", "CGPath"] }
objc2-foundation = { version = "0.3", features = [
"NSAffineTransform",
"NSAttributedString",
"NSDate",
"NSDictionary",
"NSEnumerator",
"NSNotification",
"NSObjCRuntime",
"NSRunLoop",
"NSString",
"NSThread",
"NSURL",
"NSUserDefaults",
] }
objc2-app-kit = { version = "0.3", features = [
"block2",
"objc2-core-foundation",
"objc2-quartz-core",
"objc2-uniform-type-identifiers",
"NSAlert",
"NSApplication",
"NSAttributedString",
"NSBitmapImageRep",
"NSButton",
"NSButtonCell",
"NSCell",
"NSColor",
"NSColorSpace",
"NSComboBox",
"NSControl",
"NSEvent",
"NSFont",
"NSFontDescriptor",
"NSGraphics",
"NSImage",
"NSImageRep",
"NSMatrix",
"NSOpenPanel",
"NSPanel",
"NSProgressIndicator",
"NSResponder",
"NSRunningApplication",
"NSSavePanel",
"NSScreen",
"NSScrollView",
"NSSecureTextField",
"NSStringDrawing",
"NSTableView",
"NSTableColumn",
"NSText",
"NSTextField",
"NSTrackingArea",
"NSView",
"NSWindow",
"NSWindowScripting",
] }
objc2-uniform-type-identifiers = { version = "0.3", features = ["UTType"] }
objc2-quartz-core = { version = "0.3", features = [
"objc2-core-graphics",
"CALayer",
"CAGradientLayer",
"CAShapeLayer",
"CATextLayer",
] }
local-sync = "0.1"

[target.'cfg(target_os = "linux")'.dependencies]
libc = "0.2"
objc2-app-kit = "0.3"

[target.'cfg(not(any(windows, target_os = "macos")))'.dependencies]
gtk4 = { version = "0.9", optional = true, features = ["v4_14"] }
pangocairo = { version = "0.20", optional = true }

cxx = { version = "1.0.160", optional = true, features = ["c++17"] }
local-sync = { version = "0.1", optional = true }

[dev-dependencies]
compio = { version = "0.15.0", features = ["time", "rustls", "ring"] }
cyper = { version = "0.4.0", default-features = false, features = [
"rustls",
"http2",
"http3-altsvc",
] }

dirs = "6.0"
futures-util = "0.3"
image = { version = "0.25", default-features = false, features = [
"default-formats",
] }
itertools = "0.14"
tracing-subscriber = "0.3"

[build-dependencies]
embed-resource = "3"

cxx-build = { version = "1.0.160", optional = true }
qt-build-utils = { version = "0.7", optional = true }

[features]
default = ["qt", "windows-dark-mode"]
gtk = ["dep:gtk4", "dep:pangocairo"]
qt = ["dep:cxx", "dep:cxx-build", "dep:qt-build-utils", "dep:local-sync"]
enable_log = ["compio/enable_log", "compio-log/enable_log"]

nightly = ["compio/nightly", "cyper/nightly"]
windows-dark-mode = ["dep:slim-detours-sys", "dep:sync-unsafe-cell"]
objc-static = [
"objc2/unstable-static-class-inlined",
"objc2/unstable-static-sel-inlined",
"objc2-foundation/unstable-static-nsstring",
]
gtk4 = "0.9"

[profile.release]
lto = true
Expand Down
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ Winio follows ELM-like design, inspired by [`yew`](https://yew.rs/) and [`relm4`
The application starts with a root `Component`:

```rust
use winio::{
App, Child, Component, ComponentSender, Layoutable, Size, Visible, Window, WindowEvent,
};
use winio::prelude::*;

fn main() {
App::new("rs.compio.winio.example").run::<MainModel>(());
Expand Down
94 changes: 0 additions & 94 deletions src/elm/button.rs

This file was deleted.

Loading