winui-svelte 0.0.7 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/API.md +565 -19
- package/README.md +21 -5
- package/dist/app/activate.d.ts.map +1 -1
- package/dist/app/activate.js +3 -0
- package/dist/app/activate.js.map +1 -1
- package/dist/app/activation/index.d.ts +3 -0
- package/dist/app/activation/index.d.ts.map +1 -1
- package/dist/app/activation/index.js +2 -0
- package/dist/app/activation/index.js.map +1 -1
- package/dist/app/activation/login.d.ts +2 -1
- package/dist/app/activation/login.d.ts.map +1 -1
- package/dist/app/activation/login.js +2 -1
- package/dist/app/activation/login.js.map +1 -1
- package/dist/app/activation/native.js +1 -2
- package/dist/app/activation/native.js.map +1 -1
- package/dist/app/activation/packaged.d.ts +49 -0
- package/dist/app/activation/packaged.d.ts.map +1 -0
- package/dist/app/activation/packaged.js +90 -0
- package/dist/app/activation/packaged.js.map +1 -0
- package/dist/app/activation/receive.d.ts +11 -2
- package/dist/app/activation/receive.d.ts.map +1 -1
- package/dist/app/activation/receive.js +11 -4
- package/dist/app/activation/receive.js.map +1 -1
- package/dist/app/activation/registration.d.ts +3 -3
- package/dist/app/activation/registration.js +7 -7
- package/dist/app/activation/registration.js.map +1 -1
- package/dist/app/activation/scheme.d.ts +10 -0
- package/dist/app/activation/scheme.d.ts.map +1 -1
- package/dist/app/activation/scheme.js +17 -0
- package/dist/app/activation/scheme.js.map +1 -1
- package/dist/app/index.d.ts +4 -2
- package/dist/app/index.d.ts.map +1 -1
- package/dist/app/index.js +3 -1
- package/dist/app/index.js.map +1 -1
- package/dist/app/instance-running.d.ts +15 -0
- package/dist/app/instance-running.d.ts.map +1 -0
- package/dist/app/instance-running.js +20 -0
- package/dist/app/instance-running.js.map +1 -0
- package/dist/app/jump-list/native.d.ts.map +1 -1
- package/dist/app/jump-list/native.js +1 -2
- package/dist/app/jump-list/native.js.map +1 -1
- package/dist/app/native-messaging/browsers.d.ts +19 -0
- package/dist/app/native-messaging/browsers.d.ts.map +1 -0
- package/dist/app/native-messaging/browsers.js +17 -0
- package/dist/app/native-messaging/browsers.js.map +1 -0
- package/dist/app/native-messaging/index.d.ts +41 -0
- package/dist/app/native-messaging/index.d.ts.map +1 -0
- package/dist/app/native-messaging/index.js +84 -0
- package/dist/app/native-messaging/index.js.map +1 -0
- package/dist/app/native.d.ts +0 -6
- package/dist/app/native.d.ts.map +1 -1
- package/dist/app/native.js +1 -24
- package/dist/app/native.js.map +1 -1
- package/dist/app/notification-source.d.ts.map +1 -1
- package/dist/app/notification-source.js +1 -2
- package/dist/app/notification-source.js.map +1 -1
- package/dist/app/shell/native.js +1 -2
- package/dist/app/shell/native.js.map +1 -1
- package/dist/app/single-instance.d.ts +27 -1
- package/dist/app/single-instance.d.ts.map +1 -1
- package/dist/app/single-instance.js +32 -10
- package/dist/app/single-instance.js.map +1 -1
- package/dist/automation/native.d.ts.map +1 -1
- package/dist/automation/native.js +1 -2
- package/dist/automation/native.js.map +1 -1
- package/dist/bindings/.dynwinrt-js-types +198 -0
- package/dist/bindings/.dynwinrt-managed +1 -1
- package/dist/bindings/index.d.ts +15 -0
- package/dist/bindings/index.js +20 -0
- package/dist/bindings/index.mjs +2902 -2882
- package/dist/bindings/index.proxy.js +10 -0
- package/dist/bindings/windows/application-model/activation/ActivationKind.d.ts +49 -0
- package/dist/bindings/windows/application-model/activation/ActivationKind.js +50 -0
- package/dist/bindings/windows/application-model/activation/ApplicationExecutionState.d.ts +9 -0
- package/dist/bindings/windows/application-model/activation/ApplicationExecutionState.js +10 -0
- package/dist/bindings/windows/application-model/activation/IActivatedEventArgs.d.ts +36 -0
- package/dist/bindings/windows/application-model/activation/IActivatedEventArgs.js +149 -0
- package/dist/bindings/windows/application-model/activation/IActivatedEventArgsWithUser.d.ts +28 -0
- package/dist/bindings/windows/application-model/activation/IActivatedEventArgsWithUser.js +119 -0
- package/dist/bindings/windows/application-model/activation/IApplicationViewActivatedEventArgs.d.ts +27 -0
- package/dist/bindings/windows/application-model/activation/IApplicationViewActivatedEventArgs.js +116 -0
- package/dist/bindings/windows/application-model/activation/IProtocolActivatedEventArgsWithCallerPackageFamilyNameAndData.d.ts +31 -0
- package/dist/bindings/windows/application-model/activation/IProtocolActivatedEventArgsWithCallerPackageFamilyNameAndData.js +131 -0
- package/dist/bindings/windows/application-model/activation/IViewSwitcherProvider.d.ts +28 -0
- package/dist/bindings/windows/application-model/activation/IViewSwitcherProvider.js +119 -0
- package/dist/bindings/windows/application-model/activation/ProtocolActivatedEventArgs.d.ts +25 -0
- package/dist/bindings/windows/application-model/activation/ProtocolActivatedEventArgs.js +166 -0
- package/dist/bindings/windows/application-model/activation/SplashScreen.d.ts +35 -0
- package/dist/bindings/windows/application-model/activation/SplashScreen.js +105 -0
- package/dist/bindings/windows/foundation/TypedEventHandler_WindowsApplicationModelActivationSplashScreen_Object_g7a7dbfa699cd28ff.d.ts +7 -0
- package/dist/bindings/windows/foundation/TypedEventHandler_WindowsApplicationModelActivationSplashScreen_Object_g7a7dbfa699cd28ff.js +7 -0
- package/dist/bindings/windows/ui/view-management/ActivationViewSwitcher.d.ts +12 -0
- package/dist/bindings/windows/ui/view-management/ActivationViewSwitcher.js +96 -0
- package/dist/chrome/context-menus/context-menu-schema.d.ts.map +1 -1
- package/dist/chrome/context-menus/context-menu-schema.js +1 -7
- package/dist/chrome/context-menus/context-menu-schema.js.map +1 -1
- package/dist/chrome/parse-or-throw.d.ts +7 -0
- package/dist/chrome/parse-or-throw.d.ts.map +1 -0
- package/dist/chrome/parse-or-throw.js +9 -0
- package/dist/chrome/parse-or-throw.js.map +1 -0
- package/dist/chrome/permissions/permission-schema.d.ts.map +1 -1
- package/dist/chrome/permissions/permission-schema.js +1 -7
- package/dist/chrome/permissions/permission-schema.js.map +1 -1
- package/dist/chrome/windows/chrome-windows.d.ts.map +1 -1
- package/dist/chrome/windows/chrome-windows.js +1 -7
- package/dist/chrome/windows/chrome-windows.js.map +1 -1
- package/dist/components/hand-written/items/keyed-rows.svelte.d.ts.map +1 -1
- package/dist/components/hand-written/items/keyed-rows.svelte.js +6 -0
- package/dist/components/hand-written/items/keyed-rows.svelte.js.map +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/runtime.svelte.d.ts.map +1 -1
- package/dist/components/runtime.svelte.js +7 -0
- package/dist/components/runtime.svelte.js.map +1 -1
- package/dist/composition/expression.d.ts +1 -1
- package/dist/css/runtime/containers.d.ts.map +1 -1
- package/dist/css/runtime/containers.js +1 -17
- package/dist/css/runtime/containers.js.map +1 -1
- package/dist/css/runtime/native.d.ts.map +1 -1
- package/dist/css/runtime/native.js +40 -20
- package/dist/css/runtime/native.js.map +1 -1
- package/dist/css/translate/property-kit.d.ts +9 -0
- package/dist/css/translate/property-kit.d.ts.map +1 -1
- package/dist/css/translate/property-kit.js.map +1 -1
- package/dist/css/translate/transition-properties.d.ts +1 -1
- package/dist/css/translate/transition-properties.d.ts.map +1 -1
- package/dist/css/translate/transition-properties.js +32 -5
- package/dist/css/translate/transition-properties.js.map +1 -1
- package/dist/data-transfer/data-transfer.d.ts +3 -3
- package/dist/data-transfer/data-transfer.d.ts.map +1 -1
- package/dist/data-transfer/data-transfer.js.map +1 -1
- package/dist/data-transfer/drag-effects.d.ts +25 -2
- package/dist/data-transfer/drag-effects.d.ts.map +1 -1
- package/dist/data-transfer/drag-effects.js +27 -2
- package/dist/data-transfer/drag-effects.js.map +1 -1
- package/dist/data-transfer/drag-helper.d.ts +50 -0
- package/dist/data-transfer/drag-helper.d.ts.map +1 -0
- package/dist/data-transfer/drag-helper.js +156 -0
- package/dist/data-transfer/drag-helper.js.map +1 -0
- package/dist/data-transfer/drop-target.d.ts +6 -5
- package/dist/data-transfer/drop-target.d.ts.map +1 -1
- package/dist/data-transfer/drop-target.js +68 -20
- package/dist/data-transfer/drop-target.js.map +1 -1
- package/dist/data-transfer/index.d.ts +1 -0
- package/dist/data-transfer/index.d.ts.map +1 -1
- package/dist/data-transfer/index.js.map +1 -1
- package/dist/data-transfer/launcher.d.ts +4 -3
- package/dist/data-transfer/launcher.d.ts.map +1 -1
- package/dist/data-transfer/launcher.js +58 -9
- package/dist/data-transfer/launcher.js.map +1 -1
- package/dist/data-transfer/native.d.ts +66 -0
- package/dist/data-transfer/native.d.ts.map +1 -0
- package/dist/data-transfer/native.js +148 -0
- package/dist/data-transfer/native.js.map +1 -0
- package/dist/data-transfer/ole-data-object.d.ts +62 -0
- package/dist/data-transfer/ole-data-object.d.ts.map +1 -0
- package/dist/data-transfer/ole-data-object.js +162 -0
- package/dist/data-transfer/ole-data-object.js.map +1 -0
- package/dist/data-transfer/ole-drop-target.d.ts +54 -0
- package/dist/data-transfer/ole-drop-target.d.ts.map +1 -0
- package/dist/data-transfer/ole-drop-target.js +192 -0
- package/dist/data-transfer/ole-drop-target.js.map +1 -0
- package/dist/data-transfer/share-interop.d.ts.map +1 -1
- package/dist/data-transfer/share-interop.js +1 -1
- package/dist/data-transfer/share-interop.js.map +1 -1
- package/dist/data-transfer/shell-items.d.ts +10 -0
- package/dist/data-transfer/shell-items.d.ts.map +1 -0
- package/dist/data-transfer/shell-items.js +67 -0
- package/dist/data-transfer/shell-items.js.map +1 -0
- package/dist/data-transfer/window-drop.d.ts +35 -0
- package/dist/data-transfer/window-drop.d.ts.map +1 -0
- package/dist/data-transfer/window-drop.js +311 -0
- package/dist/data-transfer/window-drop.js.map +1 -0
- package/dist/devices/native.js +1 -2
- package/dist/devices/native.js.map +1 -1
- package/dist/enums.d.ts +3 -0
- package/dist/enums.d.ts.map +1 -1
- package/dist/enums.js +3 -0
- package/dist/enums.js.map +1 -1
- package/dist/input/index.d.ts +2 -0
- package/dist/input/index.d.ts.map +1 -1
- package/dist/input/index.js +1 -0
- package/dist/input/index.js.map +1 -1
- package/dist/input/modifier-keys.d.ts +24 -0
- package/dist/input/modifier-keys.d.ts.map +1 -0
- package/dist/input/modifier-keys.js +20 -0
- package/dist/input/modifier-keys.js.map +1 -0
- package/dist/media/pixel-buffer.d.ts.map +1 -1
- package/dist/media/pixel-buffer.js +1 -1
- package/dist/media/pixel-buffer.js.map +1 -1
- package/dist/messaging/web-view2/core.d.ts +56 -0
- package/dist/messaging/web-view2/core.d.ts.map +1 -1
- package/dist/messaging/web-view2/core.js +6 -0
- package/dist/messaging/web-view2/core.js.map +1 -1
- package/dist/messaging/web-view2/environment.d.ts +41 -0
- package/dist/messaging/web-view2/environment.d.ts.map +1 -0
- package/dist/messaging/web-view2/environment.js +91 -0
- package/dist/messaging/web-view2/environment.js.map +1 -0
- package/dist/messaging/web-view2/index.d.ts +9 -1
- package/dist/messaging/web-view2/index.d.ts.map +1 -1
- package/dist/messaging/web-view2/index.js +5 -0
- package/dist/messaging/web-view2/index.js.map +1 -1
- package/dist/messaging/web-view2/input.d.ts +68 -0
- package/dist/messaging/web-view2/input.d.ts.map +1 -0
- package/dist/messaging/web-view2/input.js +108 -0
- package/dist/messaging/web-view2/input.js.map +1 -0
- package/dist/messaging/web-view2/protocol.d.ts +24 -0
- package/dist/messaging/web-view2/protocol.d.ts.map +1 -0
- package/dist/messaging/web-view2/protocol.js +31 -0
- package/dist/messaging/web-view2/protocol.js.map +1 -0
- package/dist/messaging/web-view2/recovery.d.ts +65 -0
- package/dist/messaging/web-view2/recovery.d.ts.map +1 -0
- package/dist/messaging/web-view2/recovery.js +138 -0
- package/dist/messaging/web-view2/recovery.js.map +1 -0
- package/dist/messaging/web-view2/requests.d.ts +88 -0
- package/dist/messaging/web-view2/requests.d.ts.map +1 -0
- package/dist/messaging/web-view2/requests.js +169 -0
- package/dist/messaging/web-view2/requests.js.map +1 -0
- package/dist/messaging/web-view2/transport.d.ts.map +1 -1
- package/dist/messaging/web-view2/transport.js +1 -4
- package/dist/messaging/web-view2/transport.js.map +1 -1
- package/dist/native-identity.d.ts +10 -0
- package/dist/native-identity.d.ts.map +1 -0
- package/dist/native-identity.js +20 -0
- package/dist/native-identity.js.map +1 -0
- package/dist/renderer/host/host.d.ts.map +1 -1
- package/dist/renderer/host/host.js +33 -16
- package/dist/renderer/host/host.js.map +1 -1
- package/dist/renderer/host/structure-sync.d.ts +9 -0
- package/dist/renderer/host/structure-sync.d.ts.map +1 -0
- package/dist/renderer/host/structure-sync.js +24 -0
- package/dist/renderer/host/structure-sync.js.map +1 -0
- package/dist/security/data-protection-error.d.ts +14 -0
- package/dist/security/data-protection-error.d.ts.map +1 -0
- package/dist/security/data-protection-error.js +15 -0
- package/dist/security/data-protection-error.js.map +1 -0
- package/dist/security/index.d.ts +48 -0
- package/dist/security/index.d.ts.map +1 -0
- package/dist/security/index.js +32 -0
- package/dist/security/index.js.map +1 -0
- package/dist/security/native.d.ts +43 -0
- package/dist/security/native.d.ts.map +1 -0
- package/dist/security/native.js +170 -0
- package/dist/security/native.js.map +1 -0
- package/dist/security/protection-scope.d.ts +13 -0
- package/dist/security/protection-scope.d.ts.map +1 -0
- package/dist/security/protection-scope.js +11 -0
- package/dist/security/protection-scope.js.map +1 -0
- package/dist/store/states.d.ts +2 -2
- package/dist/store/windows-identity.d.ts +2 -6
- package/dist/store/windows-identity.d.ts.map +1 -1
- package/dist/store/windows-identity.js +2 -29
- package/dist/store/windows-identity.js.map +1 -1
- package/dist/store/windows-packages.d.ts +2 -2
- package/dist/store/windows-store.d.ts +2 -2
- package/dist/tray/click-detector.d.ts.map +1 -1
- package/dist/tray/click-detector.js.map +1 -1
- package/dist/tray/flyout-model.d.ts +4 -3
- package/dist/tray/flyout-model.d.ts.map +1 -1
- package/dist/tray/flyout-model.js +12 -2
- package/dist/tray/flyout-model.js.map +1 -1
- package/dist/tray/menu/icon.d.ts +17 -0
- package/dist/tray/menu/icon.d.ts.map +1 -0
- package/dist/tray/menu/icon.js +31 -0
- package/dist/tray/menu/icon.js.map +1 -0
- package/dist/tray/menu/index.d.ts +1 -1
- package/dist/tray/menu/index.d.ts.map +1 -1
- package/dist/tray/menu/index.js.map +1 -1
- package/dist/tray/menu/types.d.ts +23 -6
- package/dist/tray/menu/types.d.ts.map +1 -1
- package/dist/tray/menu/types.js.map +1 -1
- package/dist/tray/menu-svelte/menu-node.d.ts +4 -4
- package/dist/tray/native.d.ts +9 -4
- package/dist/tray/native.d.ts.map +1 -1
- package/dist/tray/native.js +10 -18
- package/dist/tray/native.js.map +1 -1
- package/dist/tray/personalize.d.ts +18 -0
- package/dist/tray/personalize.d.ts.map +1 -0
- package/dist/tray/personalize.js +42 -0
- package/dist/tray/personalize.js.map +1 -0
- package/dist/tray/standalone/icon-raster.d.ts +72 -0
- package/dist/tray/standalone/icon-raster.d.ts.map +1 -0
- package/dist/tray/standalone/icon-raster.js +161 -0
- package/dist/tray/standalone/icon-raster.js.map +1 -0
- package/dist/tray/standalone/index.d.ts +3 -2
- package/dist/tray/standalone/index.d.ts.map +1 -1
- package/dist/tray/standalone/index.js +1 -0
- package/dist/tray/standalone/index.js.map +1 -1
- package/dist/tray/standalone/menu-icons.d.ts +9 -0
- package/dist/tray/standalone/menu-icons.d.ts.map +1 -0
- package/dist/tray/standalone/menu-icons.js +280 -0
- package/dist/tray/standalone/menu-icons.js.map +1 -0
- package/dist/tray/standalone/native.d.ts +19 -6
- package/dist/tray/standalone/native.d.ts.map +1 -1
- package/dist/tray/standalone/native.js +58 -15
- package/dist/tray/standalone/native.js.map +1 -1
- package/dist/tray/standalone/standalone-tray.d.ts +4 -2
- package/dist/tray/standalone/standalone-tray.d.ts.map +1 -1
- package/dist/tray/standalone/standalone-tray.js +12 -2
- package/dist/tray/standalone/standalone-tray.js.map +1 -1
- package/dist/tray/themed-icon.d.ts.map +1 -1
- package/dist/tray/themed-icon.js +4 -28
- package/dist/tray/themed-icon.js.map +1 -1
- package/dist/tray/tray-core.d.ts.map +1 -1
- package/dist/tray/tray-core.js +5 -1
- package/dist/tray/tray-core.js.map +1 -1
- package/dist/tray/tray-extras.d.ts +26 -2
- package/dist/tray/tray-extras.d.ts.map +1 -1
- package/dist/web-apis/eye-dropper.d.ts.map +1 -1
- package/dist/web-apis/eye-dropper.js +8 -5
- package/dist/web-apis/eye-dropper.js.map +1 -1
- package/dist/web-apis/media-devices-source.d.ts +1 -1
- package/dist/web-apis/native.d.ts +0 -7
- package/dist/web-apis/native.d.ts.map +1 -1
- package/dist/web-apis/native.js +0 -19
- package/dist/web-apis/native.js.map +1 -1
- package/dist/win2d/activation-failure.d.ts +10 -0
- package/dist/win2d/activation-failure.d.ts.map +1 -0
- package/dist/win2d/activation-failure.js +30 -0
- package/dist/win2d/activation-failure.js.map +1 -0
- package/dist/win2d/element-lifecycle.d.ts.map +1 -1
- package/dist/win2d/element-lifecycle.js +6 -1
- package/dist/win2d/element-lifecycle.js.map +1 -1
- package/dist/win2d/manifest.d.ts +29 -0
- package/dist/win2d/manifest.d.ts.map +1 -0
- package/dist/win2d/manifest.js +67 -0
- package/dist/win2d/manifest.js.map +1 -0
- package/dist/win32/index.d.ts +3 -0
- package/dist/win32/index.d.ts.map +1 -0
- package/dist/win32/index.js +11 -0
- package/dist/win32/index.js.map +1 -0
- package/dist/win32-calls.d.ts +6 -0
- package/dist/win32-calls.d.ts.map +1 -1
- package/dist/win32-calls.js +6 -1
- package/dist/win32-calls.js.map +1 -1
- package/dist/win32-foreground.d.ts +20 -0
- package/dist/win32-foreground.d.ts.map +1 -1
- package/dist/win32-foreground.js +24 -4
- package/dist/win32-foreground.js.map +1 -1
- package/dist/win32-icons.d.ts.map +1 -1
- package/dist/win32-icons.js +1 -2
- package/dist/win32-icons.js.map +1 -1
- package/dist/win32-key-state.d.ts +31 -0
- package/dist/win32-key-state.d.ts.map +1 -0
- package/dist/win32-key-state.js +41 -0
- package/dist/win32-key-state.js.map +1 -0
- package/dist/window/anchor.d.ts +15 -0
- package/dist/window/anchor.d.ts.map +1 -1
- package/dist/window/anchor.js +23 -0
- package/dist/window/anchor.js.map +1 -1
- package/dist/window/apply-frame.d.ts +4 -2
- package/dist/window/apply-frame.d.ts.map +1 -1
- package/dist/window/apply-frame.js +2 -3
- package/dist/window/apply-frame.js.map +1 -1
- package/dist/window/bootstrap-core.d.ts +69 -0
- package/dist/window/bootstrap-core.d.ts.map +1 -0
- package/dist/window/bootstrap-core.js +93 -0
- package/dist/window/bootstrap-core.js.map +1 -0
- package/dist/window/bootstrap-mode.d.ts +21 -0
- package/dist/window/bootstrap-mode.d.ts.map +1 -0
- package/dist/window/bootstrap-mode.js +17 -0
- package/dist/window/bootstrap-mode.js.map +1 -0
- package/dist/window/bootstrap.d.ts +12 -28
- package/dist/window/bootstrap.d.ts.map +1 -1
- package/dist/window/bootstrap.js +18 -66
- package/dist/window/bootstrap.js.map +1 -1
- package/dist/window/cover.d.ts +43 -0
- package/dist/window/cover.d.ts.map +1 -0
- package/dist/window/cover.js +64 -0
- package/dist/window/cover.js.map +1 -0
- package/dist/window/create-window.d.ts +1 -1
- package/dist/window/create-window.d.ts.map +1 -1
- package/dist/window/create-window.js +1 -0
- package/dist/window/create-window.js.map +1 -1
- package/dist/window/dpi-awareness.d.ts +71 -0
- package/dist/window/dpi-awareness.d.ts.map +1 -0
- package/dist/window/dpi-awareness.js +127 -0
- package/dist/window/dpi-awareness.js.map +1 -0
- package/dist/window/foreground-native.d.ts.map +1 -1
- package/dist/window/foreground-native.js +3 -5
- package/dist/window/foreground-native.js.map +1 -1
- package/dist/window/index.d.ts +2 -0
- package/dist/window/index.d.ts.map +1 -1
- package/dist/window/index.js +1 -0
- package/dist/window/index.js.map +1 -1
- package/dist/window/native.d.ts.map +1 -1
- package/dist/window/native.js +1 -2
- package/dist/window/native.js.map +1 -1
- package/dist/window/package-identity.d.ts +17 -0
- package/dist/window/package-identity.d.ts.map +1 -0
- package/dist/window/package-identity.js +97 -0
- package/dist/window/package-identity.js.map +1 -0
- package/dist/window/system-dispatcher-queue.d.ts.map +1 -1
- package/dist/window/system-dispatcher-queue.js +1 -2
- package/dist/window/system-dispatcher-queue.js.map +1 -1
- package/dist/window/taskbar-calls.d.ts +1 -1
- package/dist/window/taskbar-native.d.ts.map +1 -1
- package/dist/window/taskbar-native.js +1 -2
- package/dist/window/taskbar-native.js.map +1 -1
- package/dist/window/window-handle.d.ts +25 -1
- package/dist/window/window-handle.d.ts.map +1 -1
- package/dist/window/window-handle.js +27 -1
- package/dist/window/window-handle.js.map +1 -1
- package/dist/window/window-host.svelte.d.ts +10 -1
- package/dist/window/window-host.svelte.d.ts.map +1 -1
- package/dist/window/window-host.svelte.js +38 -4
- package/dist/window/window-host.svelte.js.map +1 -1
- package/package.json +26 -4
- package/src/app/activate.ts +3 -0
- package/src/app/activation/index.ts +3 -0
- package/src/app/activation/login.ts +2 -1
- package/src/app/activation/native.ts +1 -1
- package/src/app/activation/packaged.ts +118 -0
- package/src/app/activation/receive.ts +24 -4
- package/src/app/activation/registration.ts +7 -7
- package/src/app/activation/scheme.ts +19 -0
- package/src/app/index.ts +4 -2
- package/src/app/instance-running.ts +22 -0
- package/src/app/jump-list/native.ts +1 -2
- package/src/app/native-messaging/browsers.ts +21 -0
- package/src/app/native-messaging/index.ts +124 -0
- package/src/app/native.ts +1 -32
- package/src/app/notification-source.ts +1 -3
- package/src/app/shell/native.ts +1 -1
- package/src/app/single-instance.ts +34 -10
- package/src/automation/native.ts +1 -2
- package/src/chrome/context-menus/context-menu-schema.ts +1 -12
- package/src/chrome/parse-or-throw.ts +14 -0
- package/src/chrome/permissions/permission-schema.ts +1 -12
- package/src/chrome/windows/chrome-windows.ts +1 -13
- package/src/components/hand-written/items/keyed-rows.svelte.ts +6 -0
- package/src/components/index.ts +1 -0
- package/src/components/runtime.svelte.ts +8 -0
- package/src/css/runtime/containers.ts +1 -20
- package/src/css/runtime/native.ts +46 -21
- package/src/css/translate/property-kit.ts +9 -0
- package/src/css/translate/transition-properties.ts +44 -10
- package/src/data-transfer/data-transfer.ts +3 -3
- package/src/data-transfer/drag-effects.ts +48 -4
- package/src/data-transfer/drag-helper.ts +216 -0
- package/src/data-transfer/drop-target.ts +90 -26
- package/src/data-transfer/index.ts +1 -0
- package/src/data-transfer/launcher.ts +65 -9
- package/src/data-transfer/native.ts +184 -0
- package/src/data-transfer/ole-data-object.ts +200 -0
- package/src/data-transfer/ole-drop-target.ts +263 -0
- package/src/data-transfer/share-interop.ts +1 -1
- package/src/data-transfer/shell-items.ts +81 -0
- package/src/data-transfer/window-drop.ts +411 -0
- package/src/devices/native.ts +1 -1
- package/src/enums.ts +3 -0
- package/src/input/index.ts +2 -0
- package/src/input/modifier-keys.ts +30 -0
- package/src/media/pixel-buffer.ts +1 -1
- package/src/messaging/web-view2/core.ts +64 -0
- package/src/messaging/web-view2/environment.ts +131 -0
- package/src/messaging/web-view2/index.ts +11 -0
- package/src/messaging/web-view2/input.ts +154 -0
- package/src/messaging/web-view2/protocol.ts +41 -0
- package/src/messaging/web-view2/recovery.ts +177 -0
- package/src/messaging/web-view2/requests.ts +238 -0
- package/src/messaging/web-view2/transport.ts +1 -5
- package/src/native-identity.ts +22 -0
- package/src/renderer/host/host.ts +39 -17
- package/src/renderer/host/structure-sync.ts +25 -0
- package/src/security/data-protection-error.ts +18 -0
- package/src/security/index.ts +57 -0
- package/src/security/native.ts +234 -0
- package/src/security/protection-scope.ts +13 -0
- package/src/store/windows-identity.ts +3 -35
- package/src/tray/click-detector.ts +6 -7
- package/src/tray/flyout-model.ts +14 -3
- package/src/tray/menu/icon.ts +40 -0
- package/src/tray/menu/index.ts +3 -0
- package/src/tray/menu/types.ts +27 -6
- package/src/tray/native.ts +20 -21
- package/src/tray/personalize.ts +57 -0
- package/src/tray/pointer-share.ts +3 -3
- package/src/tray/standalone/icon-raster.ts +208 -0
- package/src/tray/standalone/index.ts +4 -1
- package/src/tray/standalone/menu-icons.ts +317 -0
- package/src/tray/standalone/native.ts +78 -15
- package/src/tray/standalone/standalone-tray.ts +26 -5
- package/src/tray/themed-icon.ts +4 -36
- package/src/tray/tray-core.ts +6 -1
- package/src/tray/tray-extras.ts +31 -2
- package/src/web-apis/eye-dropper.ts +9 -5
- package/src/web-apis/native.ts +0 -20
- package/src/win2d/activation-failure.ts +35 -0
- package/src/win2d/element-lifecycle.ts +6 -1
- package/src/win2d/manifest.ts +78 -0
- package/src/win32/index.ts +19 -0
- package/src/win32-calls.ts +8 -1
- package/src/win32-foreground.ts +28 -4
- package/src/win32-icons.ts +7 -2
- package/src/win32-key-state.ts +48 -0
- package/src/window/anchor.ts +28 -0
- package/src/window/apply-frame.ts +6 -4
- package/src/window/bootstrap-core.ts +165 -0
- package/src/window/bootstrap-mode.ts +23 -0
- package/src/window/bootstrap.ts +20 -103
- package/src/window/cover.ts +100 -0
- package/src/window/create-window.ts +2 -0
- package/src/window/dpi-awareness.ts +162 -0
- package/src/window/foreground-native.ts +3 -5
- package/src/window/index.ts +2 -0
- package/src/window/native.ts +1 -1
- package/src/window/package-identity.ts +112 -0
- package/src/window/system-dispatcher-queue.ts +7 -2
- package/src/window/taskbar-native.ts +1 -2
- package/src/window/window-handle.ts +29 -1
- package/src/window/window-host.svelte.ts +58 -5
- package/web-types.json +11 -3
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import { bindDll } from "#src/win32-calls.js";
|
|
2
|
+
|
|
3
|
+
// The process's DPI awareness, apart from the window runtime: it imports no
|
|
4
|
+
// WinRT, so it runs on a host's main thread before anything else. Bound when
|
|
5
|
+
// called, never when the module loads.
|
|
6
|
+
|
|
7
|
+
/** How a process is told the pixels of a display: from not at all to per monitor. */
|
|
8
|
+
export const DpiAwareness = {
|
|
9
|
+
unaware: "unaware",
|
|
10
|
+
system: "system",
|
|
11
|
+
perMonitor: "per-monitor",
|
|
12
|
+
perMonitorV2: "per-monitor-v2"
|
|
13
|
+
} as const;
|
|
14
|
+
|
|
15
|
+
/** One of the `DpiAwareness` values. */
|
|
16
|
+
export type DpiAwareness = (typeof DpiAwareness)[keyof typeof DpiAwareness];
|
|
17
|
+
|
|
18
|
+
/** From the lowest awareness to the highest: a later one satisfies an earlier request. */
|
|
19
|
+
const AWARENESS_ORDER = [
|
|
20
|
+
DpiAwareness.unaware,
|
|
21
|
+
DpiAwareness.system,
|
|
22
|
+
DpiAwareness.perMonitor,
|
|
23
|
+
DpiAwareness.perMonitorV2
|
|
24
|
+
] as const;
|
|
25
|
+
|
|
26
|
+
/** The pseudo handles of `DPI_AWARENESS_CONTEXT`, signed as Windows defines them; the one table. */
|
|
27
|
+
export const DPI_CONTEXT_HANDLES = {
|
|
28
|
+
[DpiAwareness.unaware]: -1n,
|
|
29
|
+
[DpiAwareness.system]: -2n,
|
|
30
|
+
[DpiAwareness.perMonitor]: -3n,
|
|
31
|
+
[DpiAwareness.perMonitorV2]: -4n
|
|
32
|
+
} as const;
|
|
33
|
+
|
|
34
|
+
const UNAWARE_GDI_SCALED_HANDLE = -5n;
|
|
35
|
+
const POINTER_BITS = 64;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* The awareness a pseudo handle stands for.
|
|
39
|
+
*
|
|
40
|
+
* @param handle - A `DPI_AWARENESS_CONTEXT` pseudo handle, signed or as a 64-bit address.
|
|
41
|
+
* @returns The awareness; undefined for a handle that is not one of the pseudo values.
|
|
42
|
+
*/
|
|
43
|
+
export function awarenessOfHandle(handle: bigint) {
|
|
44
|
+
const signed = BigInt.asIntN(POINTER_BITS, handle);
|
|
45
|
+
const isGdiScaled = signed === UNAWARE_GDI_SCALED_HANDLE;
|
|
46
|
+
if (isGdiScaled) {
|
|
47
|
+
return DpiAwareness.unaware;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
return AWARENESS_ORDER.find(awareness => DPI_CONTEXT_HANDLES[awareness] === signed);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* The awareness the process asked for was refused and what it has is lower;
|
|
55
|
+
* a manifest or an earlier call set it, or a window already exists.
|
|
56
|
+
*/
|
|
57
|
+
export class DpiAwarenessTooLow extends Error {
|
|
58
|
+
/** What the process asked for. */
|
|
59
|
+
readonly requested: DpiAwareness;
|
|
60
|
+
|
|
61
|
+
/** What the process has. */
|
|
62
|
+
readonly current: DpiAwareness;
|
|
63
|
+
|
|
64
|
+
constructor({ requested, current }: {
|
|
65
|
+
readonly requested: DpiAwareness;
|
|
66
|
+
readonly current: DpiAwareness;
|
|
67
|
+
}) {
|
|
68
|
+
super(`The process is ${current} DPI aware and cannot become ${requested}: set the awareness before the first window exists, or in the application manifest`);
|
|
69
|
+
this.requested = requested;
|
|
70
|
+
this.current = current;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/** The two native steps `ensureDpiAwareness` takes, so a test can stand in for them. */
|
|
75
|
+
export interface DpiAwarenessCalls {
|
|
76
|
+
/** Asks Windows to make the process this aware; true when it did. */
|
|
77
|
+
readonly setProcess: (awareness: DpiAwareness) => boolean;
|
|
78
|
+
|
|
79
|
+
/** What the process is now. */
|
|
80
|
+
readonly current: () => DpiAwareness;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
function rankOf(awareness: DpiAwareness) {
|
|
84
|
+
return AWARENESS_ORDER.indexOf(awareness);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Asks for an awareness; refusal is success when the process already has at
|
|
89
|
+
* least that (a manifest or an earlier call set it).
|
|
90
|
+
*
|
|
91
|
+
* @param options - `requested`, and the native `calls`.
|
|
92
|
+
* @throws {DpiAwarenessTooLow} when refused and the process has less
|
|
93
|
+
*/
|
|
94
|
+
export function ensureDpiAwareness({ requested, calls }: {
|
|
95
|
+
readonly requested: DpiAwareness;
|
|
96
|
+
readonly calls: DpiAwarenessCalls;
|
|
97
|
+
}) {
|
|
98
|
+
const isSet = calls.setProcess(requested);
|
|
99
|
+
if (isSet) {
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
const current = calls.current();
|
|
104
|
+
const isSufficient = rankOf(current) >= rankOf(requested);
|
|
105
|
+
if (!isSufficient) {
|
|
106
|
+
throw new DpiAwarenessTooLow({
|
|
107
|
+
requested,
|
|
108
|
+
current
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
function bindUser32() {
|
|
114
|
+
return bindDll({
|
|
115
|
+
dll: "user32.dll",
|
|
116
|
+
functions: {
|
|
117
|
+
setProcess: ["SetProcessDpiAwarenessContext", ["pointer"], "i32"],
|
|
118
|
+
thread: ["GetThreadDpiAwarenessContext", [], "pointer"],
|
|
119
|
+
areEqual: ["AreDpiAwarenessContextsEqual", ["pointer", "pointer"], "i32"]
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
function handleArgument(awareness: DpiAwareness) {
|
|
125
|
+
return BigInt.asUintN(POINTER_BITS, DPI_CONTEXT_HANDLES[awareness]);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* What this process is now, from `GetThreadDpiAwarenessContext`.
|
|
130
|
+
*
|
|
131
|
+
* @returns The awareness; `unaware` for the GDI-scaled flavour of it.
|
|
132
|
+
*/
|
|
133
|
+
export function processDpiAwareness() {
|
|
134
|
+
const user32 = bindUser32();
|
|
135
|
+
const context = user32.thread();
|
|
136
|
+
function isEqual(awareness: DpiAwareness) {
|
|
137
|
+
return user32.areEqual(context, handleArgument(awareness)) !== 0;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
return [...AWARENESS_ORDER].reverse().find(isEqual) ?? DpiAwareness.unaware;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Asks Windows for a process-wide awareness. Call it on the main thread
|
|
145
|
+
* before any window exists: user32 allows it once, and a library that created
|
|
146
|
+
* a window first keeps an unaware process.
|
|
147
|
+
*
|
|
148
|
+
* @param requested - The awareness to ask for.
|
|
149
|
+
* @throws {DpiAwarenessTooLow} when refused and the process has less
|
|
150
|
+
*/
|
|
151
|
+
export function requestDpiAwareness(requested: DpiAwareness) {
|
|
152
|
+
const user32 = bindUser32();
|
|
153
|
+
ensureDpiAwareness({
|
|
154
|
+
requested,
|
|
155
|
+
calls: {
|
|
156
|
+
setProcess(awareness) {
|
|
157
|
+
return user32.setProcess(handleArgument(awareness)) !== 0;
|
|
158
|
+
},
|
|
159
|
+
current: processDpiAwareness
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { ForegroundSource } from "./foreground-filter.ts";
|
|
2
2
|
import { DynComRawMemory } from "@microsoft/dynwinrt/com/unsafe/raw";
|
|
3
|
-
import { bindDll, WIDE_CHAR_BYTES, wideMemory } from "#src/win32-calls.js";
|
|
3
|
+
import { bindDll, DWORD_BYTES, WIDE_CHAR_BYTES, wideMemory } from "#src/win32-calls.js";
|
|
4
|
+
import { FOREGROUND_QUERY_CALLS } from "#src/win32-foreground.js";
|
|
4
5
|
|
|
5
6
|
// The Win32 calls behind foreground tracking. Bound when a function is called, never when the module loads.
|
|
6
7
|
|
|
7
8
|
const CLASS_NAME_CHARS = 256;
|
|
8
|
-
const DWORD_BYTES = 4;
|
|
9
9
|
const WS_POPUP = 0x80000000;
|
|
10
10
|
const NO_WINDOW = 0n;
|
|
11
11
|
const SHELL_HOOK_MESSAGE = "SHELLHOOK";
|
|
@@ -15,10 +15,8 @@ function bindUser32() {
|
|
|
15
15
|
return bindDll({
|
|
16
16
|
dll: "user32.dll",
|
|
17
17
|
functions: {
|
|
18
|
-
|
|
18
|
+
...FOREGROUND_QUERY_CALLS,
|
|
19
19
|
className: ["GetClassNameW", ["pointer", "pointer", "i32"], "i32"],
|
|
20
|
-
threadOf: ["GetWindowThreadProcessId", ["pointer", "pointer"], "u32"],
|
|
21
|
-
isWindow: ["IsWindow", ["pointer"], "i32"],
|
|
22
20
|
createWindow: [
|
|
23
21
|
"CreateWindowExW",
|
|
24
22
|
["u32", "pointer", "pointer", "u32", "i32", "i32", "i32", "i32", "pointer", "pointer", "pointer", "pointer"],
|
package/src/window/index.ts
CHANGED
|
@@ -4,6 +4,8 @@ export type { AppWindow, WindowOptions } from "./create-window.ts";
|
|
|
4
4
|
export { Backdrop } from "./backdrop.ts";
|
|
5
5
|
export type { WindowBounds, WindowSize } from "./anchor.ts";
|
|
6
6
|
export { SizeToContent, WindowAnchor } from "./anchor.ts";
|
|
7
|
+
export type { CoverOptions } from "./cover.ts";
|
|
8
|
+
export { coverWindow } from "./cover.ts";
|
|
7
9
|
export type { DockOptions } from "./dock.ts";
|
|
8
10
|
export { displayAreaOf, DockDisplay, dockWindow } from "./dock.ts";
|
|
9
11
|
export type { CaptionButtonColors, WindowRegion } from "./chrome.ts";
|
package/src/window/native.ts
CHANGED
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
addressOf,
|
|
10
10
|
bind,
|
|
11
11
|
numberOf,
|
|
12
|
+
POINTER_BYTES,
|
|
12
13
|
pointerOf,
|
|
13
14
|
wideMemory,
|
|
14
15
|
withMemory
|
|
@@ -598,7 +599,6 @@ export function requestFineTimerResolution() {
|
|
|
598
599
|
|
|
599
600
|
const LOOP_OFFSET = 8;
|
|
600
601
|
const IOCP_OFFSET = 56;
|
|
601
|
-
const POINTER_BYTES = 8;
|
|
602
602
|
const POINTER_ALIGNMENT = 8;
|
|
603
603
|
const OBJECT_TYPE_BUFFER_BYTES = 256;
|
|
604
604
|
const OBJECT_TYPE_NAME_LENGTH_OFFSET = 0;
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import type { DynComRawMemory } from "@microsoft/dynwinrt/com/unsafe/raw";
|
|
2
|
+
import { bindDll, DWORD_BYTES, POINTER_BYTES, withMemory } from "#src/win32-calls.js";
|
|
3
|
+
|
|
4
|
+
// Two questions of the process's package identity, answered with kernel32 calls
|
|
5
|
+
// only, no WinRT: this module is on the path of `winui-svelte/bootstrap`, which
|
|
6
|
+
// promises to import nothing of WinRT. GetCurrentPackageFullName (appmodel.h)
|
|
7
|
+
// is the cheap check: called with a zero length it answers
|
|
8
|
+
// APPMODEL_ERROR_NO_PACKAGE outside a package and ERROR_INSUFFICIENT_BUFFER
|
|
9
|
+
// inside one. GetCurrentPackageInfo lists the package graph, whose framework
|
|
10
|
+
// packages tell whether the Windows App SDK is already loaded for the process.
|
|
11
|
+
|
|
12
|
+
const NO_PACKAGE_ERROR = 15_700;
|
|
13
|
+
const INSUFFICIENT_BUFFER_ERROR = 122;
|
|
14
|
+
const SUCCESS = 0;
|
|
15
|
+
const PACKAGE_FILTER_HEAD = 0x10;
|
|
16
|
+
const PACKAGE_FILTER_DIRECT = 0x20;
|
|
17
|
+
const FRAMEWORK_PREFIX = "Microsoft.WindowsAppRuntime";
|
|
18
|
+
// PACKAGE_INFO on 64-bit Windows: reserved, flags, path, full name, family name,
|
|
19
|
+
// then the PACKAGE_ID (reserved, architecture, version, name, publisher, ...).
|
|
20
|
+
const PACKAGE_INFO_BYTES = 80;
|
|
21
|
+
const NAME_OFFSET = 48;
|
|
22
|
+
const COUNT_OFFSET = DWORD_BYTES;
|
|
23
|
+
|
|
24
|
+
const appModel = bindDll({
|
|
25
|
+
dll: "kernel32.dll",
|
|
26
|
+
functions: {
|
|
27
|
+
currentPackageFullName: ["GetCurrentPackageFullName", ["pointer", "pointer"], "i32"],
|
|
28
|
+
currentPackageInfo: ["GetCurrentPackageInfo", ["u32", "pointer", "pointer", "pointer"], "i32"]
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Whether this process has a package identity (MSIX, or a sparse package).
|
|
34
|
+
*
|
|
35
|
+
* @returns False for plain Node.js, Electron and `pnpm dev`.
|
|
36
|
+
*/
|
|
37
|
+
export function hasPackageIdentity() {
|
|
38
|
+
return withMemory({
|
|
39
|
+
size: DWORD_BYTES,
|
|
40
|
+
alignment: DWORD_BYTES,
|
|
41
|
+
use(length) {
|
|
42
|
+
length.writeU32(0, 0);
|
|
43
|
+
return appModel.currentPackageFullName(length, null) !== NO_PACKAGE_ERROR;
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function nameAt({ buffer, address }: {
|
|
49
|
+
buffer: DynComRawMemory;
|
|
50
|
+
address: bigint;
|
|
51
|
+
}) {
|
|
52
|
+
const start = Number(address - buffer.pointer().address);
|
|
53
|
+
const remaining = Number(buffer.size) - start;
|
|
54
|
+
const [name = ""] = buffer.readBytes(start, remaining).toString("utf16le").split("\0");
|
|
55
|
+
return name;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function packageNames({ buffer, count }: {
|
|
59
|
+
buffer: DynComRawMemory;
|
|
60
|
+
count: number;
|
|
61
|
+
}) {
|
|
62
|
+
return Array.from({ length: count }, (_, iPackage) => {
|
|
63
|
+
const address = buffer.readU64(iPackage * PACKAGE_INFO_BYTES + NAME_OFFSET);
|
|
64
|
+
return nameAt({
|
|
65
|
+
buffer,
|
|
66
|
+
address
|
|
67
|
+
});
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// The two-call pattern: the first call, given no buffer, reports the size.
|
|
72
|
+
function packageGraphNames() {
|
|
73
|
+
const flags = PACKAGE_FILTER_HEAD | PACKAGE_FILTER_DIRECT;
|
|
74
|
+
return withMemory({
|
|
75
|
+
size: DWORD_BYTES * 2,
|
|
76
|
+
alignment: DWORD_BYTES,
|
|
77
|
+
use(sizes) {
|
|
78
|
+
const count = sizes.pointer(COUNT_OFFSET).address;
|
|
79
|
+
sizes.writeU32(0, 0);
|
|
80
|
+
const isSized = appModel.currentPackageInfo(flags, sizes, null, count) === INSUFFICIENT_BUFFER_ERROR;
|
|
81
|
+
if (!isSized) {
|
|
82
|
+
return [];
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
return withMemory({
|
|
86
|
+
size: sizes.readU32(0),
|
|
87
|
+
alignment: POINTER_BYTES,
|
|
88
|
+
use(buffer) {
|
|
89
|
+
const isFilled = appModel.currentPackageInfo(flags, sizes, buffer, count) === SUCCESS;
|
|
90
|
+
return isFilled ? packageNames({
|
|
91
|
+
buffer,
|
|
92
|
+
count: sizes.readU32(COUNT_OFFSET)
|
|
93
|
+
}) : [];
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Whether a Windows App SDK framework package is in this process's package
|
|
102
|
+
* graph, which is the case when the manifest declares the `PackageDependency`:
|
|
103
|
+
* WinRT and WinUI then activate with no bootstrapper, and the bootstrapper
|
|
104
|
+
* refuses to run. A sparse package has an identity and may have no such
|
|
105
|
+
* dependency.
|
|
106
|
+
*
|
|
107
|
+
* @returns False outside a package and in a package without the framework.
|
|
108
|
+
*/
|
|
109
|
+
export function hasWindowsAppRuntimeDependency() {
|
|
110
|
+
const isPackaged = hasPackageIdentity();
|
|
111
|
+
return isPackaged && packageGraphNames().some(name => name.startsWith(FRAMEWORK_PREFIX));
|
|
112
|
+
}
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
bind,
|
|
3
|
+
numberOf,
|
|
4
|
+
POINTER_BYTES,
|
|
5
|
+
pointerOf,
|
|
6
|
+
withMemory
|
|
7
|
+
} from "#src/win32-calls.js";
|
|
2
8
|
|
|
3
9
|
// Windows.UI.Composition.Compositor (the system's, which the transparent
|
|
4
10
|
// backdrop needs) refuses to be created on a thread with no
|
|
@@ -9,7 +15,6 @@ import { bind, numberOf, pointerOf, withMemory } from "#src/win32-calls.js";
|
|
|
9
15
|
// makes it, as Microsoft's own MicaController samples do.
|
|
10
16
|
|
|
11
17
|
const OPTIONS_BYTES = 12;
|
|
12
|
-
const POINTER_BYTES = 8;
|
|
13
18
|
const ALIGNMENT = 8;
|
|
14
19
|
const THREAD_CURRENT = 2;
|
|
15
20
|
const APARTMENT_NONE = 0;
|
|
@@ -2,7 +2,7 @@ import type { TaskbarBackend } from "./taskbar.ts";
|
|
|
2
2
|
import { DynWinRtValue, WinGuid } from "@microsoft/dynwinrt";
|
|
3
3
|
import { DynCom, DynComMethodSig, DynComUnsafe } from "@microsoft/dynwinrt/com/unsafe";
|
|
4
4
|
import { DynComRawMemory } from "@microsoft/dynwinrt/com/unsafe/raw";
|
|
5
|
-
import { bind, pointerOf } from "#src/win32-calls.js";
|
|
5
|
+
import { bind, POINTER_BYTES, pointerOf } from "#src/win32-calls.js";
|
|
6
6
|
import { createIconFileCalls, createPixelIconCalls } from "#src/win32-icons.js";
|
|
7
7
|
|
|
8
8
|
// ITaskbarList3 (shobjidl_core.h) has no WinRT form, so its methods are
|
|
@@ -25,7 +25,6 @@ const OFFSET_TOP = 4;
|
|
|
25
25
|
const OFFSET_RIGHT = 8;
|
|
26
26
|
const OFFSET_BOTTOM = 12;
|
|
27
27
|
const FLASH_INFO_SIZE = 32;
|
|
28
|
-
const POINTER_BYTES = 8;
|
|
29
28
|
const NO_ICON = 0n;
|
|
30
29
|
const OFFSET_SIZE = 0;
|
|
31
30
|
const OFFSET_HWND = 8;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { applyShownInSwitchers } from "./apply-chrome.ts";
|
|
2
|
+
import type { CoverOptions } from "./cover.ts";
|
|
3
|
+
import { coverWindow } from "./cover.ts";
|
|
2
4
|
import type { DockOptions } from "./dock.ts";
|
|
3
5
|
import { dockWindow } from "./dock.ts";
|
|
4
6
|
import { scaleOf } from "./native.ts";
|
|
@@ -8,6 +10,7 @@ import { createTaskbarButton } from "./taskbar.ts";
|
|
|
8
10
|
import type { TaskbarButton } from "./taskbar.ts";
|
|
9
11
|
import { WindowControlsOverlay, windowTitleBarSource } from "#src/web-apis/window-controls-overlay.js";
|
|
10
12
|
import { WindowGeometry } from "#src/web-apis/window-geometry.js";
|
|
13
|
+
import { bringWindowToFront } from "#src/win32-foreground.js";
|
|
11
14
|
import type { Window } from "#src/winui.js";
|
|
12
15
|
import {
|
|
13
16
|
FileOpenPicker,
|
|
@@ -121,6 +124,24 @@ export class WindowHandle {
|
|
|
121
124
|
});
|
|
122
125
|
}
|
|
123
126
|
|
|
127
|
+
/**
|
|
128
|
+
* Covers a whole display, or a rectangle of one, in physical pixels, and
|
|
129
|
+
* returns the bounds it applied. A covering window needs `isBorderless` and
|
|
130
|
+
* `isResizable={false}`; `cover` leaves those props to you. `dock` is a
|
|
131
|
+
* corner of the work area at the window's own size, `cover` is the whole
|
|
132
|
+
* display at the display's size, and `geometry` is in CSS pixels and can do
|
|
133
|
+
* neither exactly.
|
|
134
|
+
*
|
|
135
|
+
* @param options - The display (the active one by default) and the region of
|
|
136
|
+
* it, from its top left (the whole display by default).
|
|
137
|
+
*/
|
|
138
|
+
cover(options: CoverOptions = {}) {
|
|
139
|
+
return coverWindow({
|
|
140
|
+
appWindow: this.appWindow,
|
|
141
|
+
...options
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
|
|
124
145
|
/** Shows the window and gives it focus. */
|
|
125
146
|
activate() {
|
|
126
147
|
this.window.activate();
|
|
@@ -141,10 +162,17 @@ export class WindowHandle {
|
|
|
141
162
|
this.presenter.restore();
|
|
142
163
|
}
|
|
143
164
|
|
|
144
|
-
/**
|
|
165
|
+
/**
|
|
166
|
+
* Restored, shown and focused: what launching an app again does. WinUI's
|
|
167
|
+
* activation alone is refused by Windows' foreground lock when this process
|
|
168
|
+
* was not just given the foreground (a tray menu in another process asked
|
|
169
|
+
* for the window), and the window then only flashes on the taskbar, so the
|
|
170
|
+
* window is also brought to the front the way `bringWindowToFront` does.
|
|
171
|
+
*/
|
|
145
172
|
bringToFront() {
|
|
146
173
|
this.restore();
|
|
147
174
|
this.activate();
|
|
175
|
+
bringWindowToFront(this.appWindow.id.value);
|
|
148
176
|
}
|
|
149
177
|
|
|
150
178
|
/**
|
|
@@ -184,6 +184,16 @@ export interface WindowProps {
|
|
|
184
184
|
*/
|
|
185
185
|
isActivatable?: boolean | undefined;
|
|
186
186
|
|
|
187
|
+
/**
|
|
188
|
+
* The window is shown, so its page runs at full speed, and never seen: a
|
|
189
|
+
* tool window that is not activatable, opens without taking focus and sits
|
|
190
|
+
* clear of every display (left of the virtual screen). `placement` and
|
|
191
|
+
* `width`/`height` give only the size. Dropped again, the window goes back
|
|
192
|
+
* where it was. Not the same as `isHidden`: a hidden window is a hidden
|
|
193
|
+
* page, and Chromium slows it down.
|
|
194
|
+
*/
|
|
195
|
+
isParked?: boolean | undefined;
|
|
196
|
+
|
|
187
197
|
/** Clicks go to whatever is behind the window. */
|
|
188
198
|
isClickThrough?: boolean | undefined;
|
|
189
199
|
|
|
@@ -216,7 +226,7 @@ export interface WindowProps {
|
|
|
216
226
|
* again when the window goes back to it.
|
|
217
227
|
*/
|
|
218
228
|
presentation?: WindowPresentation | undefined;
|
|
219
|
-
isResizable?: boolean;
|
|
229
|
+
isResizable?: boolean | undefined;
|
|
220
230
|
isMaximizable?: boolean;
|
|
221
231
|
isMinimizable?: boolean;
|
|
222
232
|
|
|
@@ -355,6 +365,12 @@ class WindowHost {
|
|
|
355
365
|
private isBorderApplied = false;
|
|
356
366
|
private isCaptureApplied = false;
|
|
357
367
|
private isSwitcherApplied = false;
|
|
368
|
+
private unparkedBounds: {
|
|
369
|
+
x: number;
|
|
370
|
+
y: number;
|
|
371
|
+
width: number;
|
|
372
|
+
height: number;
|
|
373
|
+
} | null = null;
|
|
358
374
|
private isClipApplied = false;
|
|
359
375
|
private isTopApplied = false;
|
|
360
376
|
private hasShown = false;
|
|
@@ -392,7 +408,7 @@ class WindowHost {
|
|
|
392
408
|
file: windowStateFile(stateKey)
|
|
393
409
|
}) : null;
|
|
394
410
|
|
|
395
|
-
const isNewBackgroundWindow =
|
|
411
|
+
const isNewBackgroundWindow = this.isKeptInBackground && !this.isTakenOver;
|
|
396
412
|
if (isNewBackgroundWindow) {
|
|
397
413
|
keepInBackground(this.handle.appWindow.id.value);
|
|
398
414
|
}
|
|
@@ -409,6 +425,7 @@ class WindowHost {
|
|
|
409
425
|
this.keepInLine(() => this.syncPresentation());
|
|
410
426
|
this.keepInLine(() => this.syncLimits());
|
|
411
427
|
this.keepInLine(() => this.syncFrame());
|
|
428
|
+
$effect(() => this.syncParked());
|
|
412
429
|
this.keepInLine(() => this.syncShape());
|
|
413
430
|
|
|
414
431
|
if (!this.isTakenOver) {
|
|
@@ -630,6 +647,10 @@ class WindowHost {
|
|
|
630
647
|
}
|
|
631
648
|
}
|
|
632
649
|
|
|
650
|
+
private get isKeptInBackground() {
|
|
651
|
+
return isBackgroundRun() || this.props.isParked === true;
|
|
652
|
+
}
|
|
653
|
+
|
|
633
654
|
private get isWindowed() {
|
|
634
655
|
const presentation = this.props.presentation ?? WindowPresentation.windowed;
|
|
635
656
|
return presentation === WindowPresentation.windowed;
|
|
@@ -650,7 +671,7 @@ class WindowHost {
|
|
|
650
671
|
presentation: presentation ?? WindowPresentation.windowed
|
|
651
672
|
});
|
|
652
673
|
|
|
653
|
-
if (
|
|
674
|
+
if (this.isKeptInBackground) {
|
|
654
675
|
// A presenter (full screen, compact overlay) puts the window on a display.
|
|
655
676
|
this.handle.appWindow.moveAndResize(backgroundPlacement(this.handle.appWindow.size));
|
|
656
677
|
}
|
|
@@ -711,6 +732,37 @@ class WindowHost {
|
|
|
711
732
|
}
|
|
712
733
|
}
|
|
713
734
|
|
|
735
|
+
// Parking after the window is open moves it off every display; dropping the
|
|
736
|
+
// prop moves it back. The first placement is placeFirst's.
|
|
737
|
+
private syncParked() {
|
|
738
|
+
const isParked = this.props.isParked === true && !isBackgroundRun();
|
|
739
|
+
const { appWindow } = this.handle;
|
|
740
|
+
if (!this.hasShown) {
|
|
741
|
+
return;
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
const isToPark = isParked && this.unparkedBounds === null;
|
|
745
|
+
if (isToPark) {
|
|
746
|
+
const { x, y } = appWindow.position;
|
|
747
|
+
const { width, height } = appWindow.size;
|
|
748
|
+
this.unparkedBounds = {
|
|
749
|
+
x,
|
|
750
|
+
y,
|
|
751
|
+
width,
|
|
752
|
+
height
|
|
753
|
+
};
|
|
754
|
+
appWindow.moveAndResize(backgroundPlacement(appWindow.size));
|
|
755
|
+
return;
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
const { unparkedBounds } = this;
|
|
759
|
+
const isToUnpark = !isParked && unparkedBounds !== null;
|
|
760
|
+
if (isToUnpark) {
|
|
761
|
+
appWindow.moveAndResize(unparkedBounds);
|
|
762
|
+
this.unparkedBounds = null;
|
|
763
|
+
}
|
|
764
|
+
}
|
|
765
|
+
|
|
714
766
|
// The window styles, the borderless presenter and the capture affinity: all
|
|
715
767
|
// left alone until the app names them.
|
|
716
768
|
private syncFrame() {
|
|
@@ -745,6 +797,7 @@ class WindowHost {
|
|
|
745
797
|
hwnd,
|
|
746
798
|
style,
|
|
747
799
|
isOn,
|
|
800
|
+
isParked: this.isKeptInBackground,
|
|
748
801
|
applied: this.appliedStyles
|
|
749
802
|
});
|
|
750
803
|
}
|
|
@@ -893,7 +946,7 @@ class WindowHost {
|
|
|
893
946
|
scale
|
|
894
947
|
})
|
|
895
948
|
};
|
|
896
|
-
if (
|
|
949
|
+
if (this.isKeptInBackground) {
|
|
897
950
|
appWindow.moveAndResize(
|
|
898
951
|
backgroundPlacement({
|
|
899
952
|
width: props.placement?.width ?? size.width,
|
|
@@ -1142,7 +1195,7 @@ class WindowHost {
|
|
|
1142
1195
|
|
|
1143
1196
|
private showWindow() {
|
|
1144
1197
|
const { window } = this.handle;
|
|
1145
|
-
const isBackground = this.props.activate === false ||
|
|
1198
|
+
const isBackground = this.props.activate === false || this.isKeptInBackground;
|
|
1146
1199
|
if (isBackground) {
|
|
1147
1200
|
window.appWindow.showWithActivation(false);
|
|
1148
1201
|
} else {
|
package/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/web-types",
|
|
3
3
|
"name": "winui-svelte",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.7",
|
|
5
5
|
"framework": "svelte",
|
|
6
6
|
"description-markup": "markdown",
|
|
7
7
|
"contributions": {
|
|
@@ -26666,6 +26666,14 @@
|
|
|
26666
26666
|
"type": "boolean"
|
|
26667
26667
|
}
|
|
26668
26668
|
},
|
|
26669
|
+
{
|
|
26670
|
+
"name": "isParked",
|
|
26671
|
+
"description": "The window is shown, so its page runs at full speed, and never seen: a tool window that is not activatable, opens without taking focus and sits clear of every display (left of the virtual screen). `placement` and `width`/`height` give only the size. Dropped again, the window goes back where it was. Not the same as `isHidden`: a hidden window is a hidden page, and Chromium slows it down.",
|
|
26672
|
+
"value": {
|
|
26673
|
+
"kind": "expression",
|
|
26674
|
+
"type": "boolean"
|
|
26675
|
+
}
|
|
26676
|
+
},
|
|
26669
26677
|
{
|
|
26670
26678
|
"name": "isClickThrough",
|
|
26671
26679
|
"description": "Clicks go to whatever is behind the window.",
|
|
@@ -26933,7 +26941,7 @@
|
|
|
26933
26941
|
},
|
|
26934
26942
|
{
|
|
26935
26943
|
"name": "icon",
|
|
26936
|
-
"description": "
|
|
26944
|
+
"description": "The picture beside the label; each renderer decides what it can draw."
|
|
26937
26945
|
},
|
|
26938
26946
|
{
|
|
26939
26947
|
"name": "badge",
|
|
@@ -27023,7 +27031,7 @@
|
|
|
27023
27031
|
},
|
|
27024
27032
|
{
|
|
27025
27033
|
"name": "icon",
|
|
27026
|
-
"description": "
|
|
27034
|
+
"description": "The picture beside the label; each renderer decides what it can draw."
|
|
27027
27035
|
},
|
|
27028
27036
|
{
|
|
27029
27037
|
"name": "badge",
|