diff options
| author | salmonik <salmonik@tuta.io> | 2026-08-17 18:56:04 +0200 |
|---|---|---|
| committer | salmonik <salmonik@tuta.io> | 2026-08-17 18:56:04 +0200 |
| commit | 5558e3509d020a0e021a77f0617044497b2f2aee (patch) | |
| tree | cd7b6cee9f7c327f9fae7ad9ac27602d1a97b222 /CONTEXT.md | |
| parent | USB2/1.1 (EHCI/UHCI) drivers + real-hardware bring-up hardening (diff) | |
| download | rs-dos-5558e3509d020a0e021a77f0617044497b2f2aee.tar.gz rs-dos-5558e3509d020a0e021a77f0617044497b2f2aee.zip | |
Windowed GUI: wm module, input routing, and the paint app
- Add the wm window-manager facility per ADR 0004: overlapping
pixel-surface windows, damage-rectangle compositing, WM-drawn title
bar, focus/minimize/close, and F1-F4 keybindings
- Add gop shadow compositing primitives and vt::repaint_region so the
console stays layer 0 beneath windows
- Route mouse (absolute coords, press/release edges) and keyboard
(focus-aware input pump) to the focused window
- Add the rspaint drawing-program crate (pen, 8 colors, clear) and shell
draw/windows/restore commands
- Extend TaskMsg with AppMouse/Focus/Close and document the design in
CONTEXT.md + ADR 0004
Diffstat (limited to 'CONTEXT.md')
| -rw-r--r-- | CONTEXT.md | 52 |
1 files changed, 52 insertions, 0 deletions
| @@ -77,6 +77,58 @@ Two-phase model matching output: | |||
| 77 | The framebuffer address stays valid after `ExitBootServices` — the GPU's | 77 | The framebuffer address stays valid after `ExitBootServices` — the GPU's |
| 78 | linear frame buffer is system memory that we own once boot services are gone. | 78 | linear frame buffer is system memory that we own once boot services are gone. |
| 79 | 79 | ||
| 80 | ## Window | ||
| 81 | |||
| 82 | A rectangular display surface owned by exactly one task and composited | ||
| 83 | onto the 800×600 canvas by the window manager. The global console (vt) | ||
| 84 | becomes the first window, owned by the shell; further windows are spawned | ||
| 85 | per task (a terminal, a drawing canvas, …). Windows may overlap, so they | ||
| 86 | carry a z-order. Every window is a pixel surface: a terminal window is a | ||
| 87 | text grid rendered into its own pixels, a drawing canvas draws pixels | ||
| 88 | directly. The ruling constraint is "stupid simple". | ||
| 89 | |||
| 90 | ## Chrome | ||
| 91 | |||
| 92 | Window-manager-owned UI drawn on the canvas but not a window: the | ||
| 93 | background/desktop fill, per-window title bars, and (later) a | ||
| 94 | launcher/menu. Chrome is not focusable and does not take input as a | ||
| 95 | window. | ||
| 96 | |||
| 97 | ## Title bar | ||
| 98 | |||
| 99 | Per-window chrome strip at the top of a window showing the window's title | ||
| 100 | and its minimize and close buttons. Drawn by the window manager, not the | ||
| 101 | app. | ||
| 102 | |||
| 103 | ## Minimized | ||
| 104 | |||
| 105 | A window state in which the window is not rendered (hidden); the app keeps | ||
| 106 | running. The inverse of the normal visible state. | ||
| 107 | |||
| 108 | ## Close | ||
| 109 | |||
| 110 | The action that destroys a window and ends its app. | ||
| 111 | |||
| 112 | ## App | ||
| 113 | |||
| 114 | A task that owns exactly one window and receives input events through its | ||
| 115 | message queue. A GUI program is an app; there is no separate "process" | ||
| 116 | concept — the app is its task plus its window. The console is app 0 | ||
| 117 | (window 0). | ||
| 118 | |||
| 119 | ## Focus | ||
| 120 | |||
| 121 | The single window (if any) that receives keyboard and mouse input. Focus | ||
| 122 | is set by clicking a window, which also raises it; input is delivered to | ||
| 123 | the focused app's message queue. With no focused window, a click only | ||
| 124 | sets focus. | ||
| 125 | |||
| 126 | ## Keybinding | ||
| 127 | |||
| 128 | A global keyboard shortcut handled by the window manager before input is | ||
| 129 | routed to the focused window. It triggers a WM action (spawn a terminal, | ||
| 130 | focus/restore the next window, close, …) and is never delivered to an app. | ||
| 131 | |||
| 80 | ## Keyboard layout | 132 | ## Keyboard layout |
| 81 | 133 | ||
| 82 | Scancode set 1, US QWERTY layout. Hardcoded scancode→ASCII table. | 134 | Scancode set 1, US QWERTY layout. Hardcoded scancode→ASCII table. |
