window: extract XWindow primitive; XNotifications stops carrying focus

The window-focus signal had no business living on the notifications
primitive — it was there because the same NotificationsPlugin happened
to observe NSApplication active/resign for its own reasons. Splitting
it into a sibling XWindow primitive (with its own WindowPlugin on
macOS, ux/window/events) lets future consumers — paused video,
deferred-work scheduling, dock badge counts — read focus state without
pulling in UNUserNotificationCenter.

XNotifications now only exposes notification I/O (show/cancel + tap +
authorization). The 'type:focus' event-channel branch is gone.
This commit is contained in:
agra
2026-05-27 14:42:39 +03:00
parent c3e540599a
commit 76621a4132
6 changed files with 127 additions and 48 deletions

View File

@@ -20,6 +20,7 @@ export 'src/video/x_video_player_channel.dart' show MethodChannelXVideoPlayerBac
export 'src/video/x_video_player_view.dart' show XVideoPlayerView;
export 'src/clipboard.dart';
export 'src/notifications/x_notifications.dart';
export 'src/window/x_window.dart';
export 'src/file.dart';
export 'src/gallery.dart';
export 'src/keyboard.dart';