Skip to content

Commit 480f0c0

Browse files
committed
Prepare the Dart and Rust 0.5.0 releases
Bump cnativeapi, nativeapi and nativeapi_flutter, and the cnativeapi, nativeapi and nativeapi_gpui crates, to 0.5.0, with each package's dependency on the next one in step. The entries gathered since 0.4.1 move from under the 0.4.1 heading into their own section, and the Rust changelog gains its own: cancellable window close and application quit with deferred decisions, window property change and occlusion events, snap layouts for custom maximize buttons, system menus, content protection, corner preferences, mouse pass-through with hover forwarding, persistent tray identifiers, focus policies and web support for the Dart packages. Minor bump for the breaking set_ignore_mouse_events and QuitRequested changes.
1 parent 2894880 commit 480f0c0

21 files changed

Lines changed: 104 additions & 52 deletions

File tree

‎Cargo.lock‎

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎bindings/dart/cnativeapi/CHANGELOG.md‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1-
## 0.4.1
1+
## 0.5.0
2+
3+
* Regenerated against core for the additions listed in nativeapi 0.5.0: window
4+
close capability, object listeners, close and quit request payloads, event
5+
decisions, and the new window and tray icon functions.
26

3-
* Add raw window close capability, object listeners and close-request payloads.
7+
## 0.4.1
48

59
* Event loop shim for plain Dart programs (`src/event_loop*`, bound in
610
`lib/src/event_loop.dart`): `cnativeapi_run_ui_thread`,

‎bindings/dart/cnativeapi/pubspec.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: cnativeapi
22
description: "Raw Dart FFI bindings to the nativeapi C API. The native library is built from source by a build hook."
3-
version: 0.4.1
3+
version: 0.5.0
44
homepage: https://github.com/libnativeapi/nativeapi
55
repository: https://github.com/libnativeapi/nativeapi/tree/main/bindings/dart/cnativeapi
66
resolution: workspace

‎bindings/dart/nativeapi/CHANGELOG.md‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## 0.4.1
1+
## 0.5.0
22

33
* `Window.setMaximizeButtonBounds()`: tell the window where a custom title
44
bar draws its maximize button, so Windows 11 opens the snap layouts on it
@@ -80,6 +80,15 @@
8080
or executable name, with suffixes for additional live icons; macOS uses
8181
`NSStatusItem.autosaveName`. Windows records the name. The numeric object ID
8282
remains separate.
83+
* Windows and Linux: `Window.isFocusable` and `isNonActivating` take effect;
84+
disabling focus releases a keyboard focus the window holds.
85+
* `Window.focus()` is reliable, and `blur()` hands the focus back to where it
86+
was.
87+
* Linux: window hooks and shortcuts shut down safely; X11 always-on-top state
88+
is read back from the window manager; one window ID on both GTK objects.
89+
90+
## 0.4.1
91+
8392
* `TrayIcon.contentView`: any `View` in place of the icon and title, on macOS.
8493
The menu bar item is as wide as the view (its `preferredSize`, or what a Row
8594
or Column needs) and follows it as it changes; clicks outside buttons and

‎bindings/dart/nativeapi/pubspec.yaml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: nativeapi
22
description: "Dart bindings for nativeapi - providing seamless, unified access to native system APIs."
3-
version: 0.4.1
3+
version: 0.5.0
44
homepage: https://github.com/libnativeapi/nativeapi
55
repository: https://github.com/libnativeapi/nativeapi/tree/main/bindings/dart/nativeapi
66
resolution: workspace
@@ -16,7 +16,7 @@ platforms:
1616
windows:
1717

1818
dependencies:
19-
cnativeapi: ^0.4.1
19+
cnativeapi: ^0.5.0
2020
ffi: ">=1.2.1 <3.0.0"
2121

2222
dev_dependencies:

‎bindings/dart/nativeapi_flutter/CHANGELOG.md‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
## 0.4.1
1+
## 0.5.0
2+
3+
* Requires nativeapi 0.5.0.
24

3-
* `DragToMoveArea` opens the system window menu on the secondary button's
4-
release on Windows, as a native title bar does. Opened on the press, the
5-
menu's modal loop took the release and Flutter ignored the next secondary
6-
click, so the menu opened only once. Linux keeps the press, which a Wayland
7-
compositor requires.
5+
* `DragToMoveArea` opens the native system window menu on a secondary click:
6+
on the release on Windows, as a native title bar does, and on the press on
7+
supporting Linux window managers, which a Wayland compositor requires.
88

99
* `MaximizeButtonArea`: wrap a custom title bar's maximize button in it and
1010
Windows 11 shows the snap layouts when the pointer rests on it. The button
@@ -17,9 +17,9 @@
1717
* `DragToMoveArea` follows the macOS title-bar double-click preference,
1818
including Minimize and None, through the native window action.
1919

20+
## 0.4.1
21+
2022
* Requires nativeapi 0.4.1.
21-
* `DragToMoveArea` opens the native system window menu on a secondary-button
22-
press on Windows and supporting Linux window managers.
2323
* `runNativeApp` is not re-exported: it is for plain Dart programs, and a
2424
Flutter app's engine already runs the event loop.
2525

‎bindings/dart/nativeapi_flutter/pubspec.yaml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: nativeapi_flutter
22
description: "Flutter integration for nativeapi: widgets, dart:ui conversions and the multi-window bridge on top of package:nativeapi."
3-
version: 0.4.1
3+
version: 0.5.0
44
homepage: https://github.com/libnativeapi/nativeapi
55
repository: https://github.com/libnativeapi/nativeapi/tree/main/bindings/dart/nativeapi_flutter
66
resolution: workspace
@@ -12,7 +12,7 @@ environment:
1212
dependencies:
1313
flutter:
1414
sdk: flutter
15-
nativeapi: ^0.4.1
15+
nativeapi: ^0.5.0
1616
path: ^1.9.1
1717

1818
dev_dependencies:

‎bindings/rust/CHANGELOG.md‎

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,42 @@
1+
## 0.5.0
2+
3+
* `Window::set_ignore_mouse_events(ignore, forward)` takes a second argument
4+
and returns whether the native policy was applied: macOS, Windows and X11 can
5+
forward hover movement while clicks pass through, and Linux implements
6+
pass-through. `is_mouse_move_forwarding_enabled` and
7+
`is_mouse_move_forwarding_supported` inspect forwarding. **Breaking.**
8+
* `ApplicationEvent::QuitRequested` carries an `EventRequestRef`, and the new
9+
`WindowEvent::CloseRequested` one too: `cancel` it, or `defer` it into an
10+
`EventDecision` to `accept` or `cancel` later. `Window::close` asks the
11+
listeners first; `Window::is_close_supported` says whether it applies.
12+
**Breaking** for code matching `QuitRequested` without fields.
13+
* `Window::add_listener` and `remove_listener`: listeners on one window.
14+
* `WindowEvent::PropertyChanged` with `WindowProperty`: a window's title,
15+
resizable / movable / minimizable / maximizable / full-screenable / closable
16+
state, control button visibility, always-on-top / on-bottom and title bar
17+
style report each change, whoever made it.
18+
* `Window::occlusion_state` and `WindowEvent::OcclusionChanged`: whether any
19+
part of a window can be seen. macOS uses the system's state, Windows computes
20+
it from the windows above, Linux knows only hidden and minimized windows.
21+
* `Window::set_maximize_button_bounds`: where a custom title bar draws its
22+
maximize button, so Windows 11 opens the snap layouts on it.
23+
* `Window::show_system_menu`: the native system window menu on Windows and
24+
supporting Linux window managers.
25+
* `Window::perform_title_bar_double_click`: the macOS title-bar double-click
26+
preference (Maximize, Minimize or None) for custom title bars; a hidden
27+
title bar's empty band on macOS performs it by itself.
28+
* `Window::set_content_protection` and `is_content_protected`: native capture
29+
policy on Windows and macOS.
30+
* `Window::set_corner_preference` and `WindowCornerPreference`: Windows 11's
31+
corner rounding policy.
32+
* `TrayIcon::with_identifier` and `identifier`: a persistent tray host name
33+
(the SNI ID on Linux, `autosaveName` on macOS).
34+
* Windows and Linux: `Window::set_focusable` and `set_non_activating` take
35+
effect; disabling focus releases a keyboard focus the window holds.
36+
* `Window::focus` is reliable, and `blur` hands the focus back to where it was.
37+
* Linux: window hooks and shortcuts shut down safely; X11 always-on-top state
38+
is read back from the window manager; one window ID on both GTK objects.
39+
140
## 0.4.1
241

342
* `TrayIcon::set_content_view` and `content_view`: any `View` in place of the

‎bindings/rust/cnativeapi/Cargo.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "cnativeapi"
3-
version = "0.4.1"
3+
version = "0.5.0"
44
edition = "2021"
55
authors = ["LiJianying <lijy91@foxmail.com>"]
66
description = "Native API C bindings for Rust"

‎bindings/rust/nativeapi/Cargo.toml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "nativeapi"
3-
version = "0.4.1"
3+
version = "0.5.0"
44
edition = "2021"
55
authors = ["LiJianying <lijy91@foxmail.com>"]
66
description = "Rust bindings for nativeapi - providing seamless, unified access to native system APIs."
@@ -11,5 +11,5 @@ keywords = ["native", "desktop", "window", "tray", "menu"]
1111
categories = ["api-bindings", "gui", "os"]
1212

1313
[dependencies]
14-
cnativeapi = { version = "0.4.1", path = "../cnativeapi" }
14+
cnativeapi = { version = "0.5.0", path = "../cnativeapi" }
1515
thiserror = "2.0"

0 commit comments

Comments
 (0)