HackerOs.Windowing.Core
2.2.1
dotnet add package HackerOs.Windowing.Core --version 2.2.1
NuGet\Install-Package HackerOs.Windowing.Core -Version 2.2.1
<PackageReference Include="HackerOs.Windowing.Core" Version="2.2.1" />
<PackageVersion Include="HackerOs.Windowing.Core" Version="2.2.1" />
<PackageReference Include="HackerOs.Windowing.Core" />
paket add HackerOs.Windowing.Core --version 2.2.1
#r "nuget: HackerOs.Windowing.Core, 2.2.1"
#:package HackerOs.Windowing.Core@2.2.1
#addin nuget:?package=HackerOs.Windowing.Core&version=2.2.1
#tool nuget:?package=HackerOs.Windowing.Core&version=2.2.1
HackerOs.Windowing.Core
A headless, renderer-independent window manager engine: applies
HackerOs.Windowing.Abstractions commands to authoritative window state
(focus, z-order, geometry, modality, lifecycle) and emits deterministic
events.
This package depends only on HackerOs.Windowing.Abstractions for its
contract types (WindowId, WindowBounds, WindowRuntimeState, commands,
events). It has no dependency on Blazor rendering, a browser, or any
particular host application model.
Usage
WindowRuntime runtime = new(new WindowBounds(0, 0, 1280, 720));
WindowRuntimeState state = new(
WindowId.FromGuid(Guid.NewGuid()),
appId: "my-app",
ownerInstanceId: WindowOwnerId.FromGuid(Guid.NewGuid()),
title: "My Window",
iconAssetPath: null,
new WindowBounds(60, 50, 420, 280),
restoreBounds: null,
zOrder: 0,
WindowVisualState.Normal,
new WindowConstraints(isResizable: true, minWidth: 260, minHeight: 180));
runtime.Apply(new CreateWindowCommand(state));
Pair this package with HackerOs.Windowing.Blazor for the Blazor
components that render a WindowRuntime's state, and
HackerOs.Taskbar.Blazor for a taskbar over the same runtime.
See HackerOs.Windowing.SampleHost in the source repository for a complete,
minimal host that uses only these three packages.
Single surface policy
SingleSurfacePresentationPolicy decides what a one-window screen (a phone)
shows. SelectSurfaceStack returns the focused or frontmost window, walked up
to its owner when it is an owner-modal dialog, followed by that owner's modal
dialogs (a dialog opened from a dialog last); SelectPrimary is the top of
that stack, even before a new dialog has the focus. WindowsToMinimize leaves
the stack alone and WindowsToMaximize lists the stack's windows that are not
maximized yet (ADR 0171).
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- HackerOs.Windowing.Abstractions (>= 2.2.1)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on HackerOs.Windowing.Core:
| Package | Downloads |
|---|---|
|
HackerOs.Taskbar.Blazor
A taskbar Razor component driven entirely by host-supplied contracts (window source, command dispatcher, launcher, status, notifications, session commands) -- each optional, each cleanly absent from render when not supplied. |
|
|
HackerOs.Platform.Blazor
HackerOS Blazor shell: desktop, launcher, window launching, dialogs and lazy app loading. For composing an OS host. |
|
|
HackerOs.Windowing.Blazor
Razor components (DesktopArea, WindowHost, WindowChrome) that render a HackerOs.Windowing.Core WindowRuntime. No MudBlazor dependency. |
GitHub repositories
This package is not used by any popular GitHub repositories.
HackerOS 2.2.1, changes for app developers:
- Mouse Back and Forward buttons in apps. The mouse Back button, Alt+← and the phone's Back (Android button or gesture, iOS swipe) now go to the active app instead of moving the browser tab back and leaving HackerOS; the mouse Forward button and Alt+→ go forward. On a phone, Back follows the ◁ button. Apps receive them through IAppBackHandler and the new IAppForwardHandler, with the new MouseButton and SystemBack sources.
- App packages carry their satellite assemblies. HackerOsPack puts the satellite assemblies of the app's own assemblies in the package at lib/<culture>/<assembly>.resources.dll; the OS checks them and loads them before the app's first render.
- HackerOsPack packs every static resource of an app. The package now holds the whole wwwroot/, the collocated .razor.js files and the scoped CSS bundle, declared in the package's manifest with their SHA-256; the publish workflow of the hackeros-solution template copies that manifest into the catalog folder.
- Signing tool for app authors. dotnet build -t:HackerOsKeyGen creates an author's signing key, HackerOsPack signs each package with the HACKEROS_APP_SIGNING_KEY secret, and the hackeros-solution template publishes the signed packages on the hackeros-packages branch on each version tag. Administrators require an author's signature by adding their public key to [signing-keys].
Release notes: https://github.com/Kazo-ca/HackerOs/releases/tag/v2.2.1