include: one folder per subsystem, and includes that name it
Sixty-five headers sat side by side in include/, so `#include "irq.h"` said nothing about where irq.h was or what it belonged to, and errno.h, stat.h and fcntl.h at the top shadowed the system's for any host tool built with -I./include. They are in folders now -- arch/ core/ fs/ dev/ gfx/ net/ uapi/ (and ldls/ for the Linux driver layer) -- and every include names the folder, as Linux's do: "core/proc.h". Done mechanically and checked the hard way: the kernel built from this tree disassembles identically to the one built from the tree before it. The full image boots, and userland is the same set of programs. Paths in docs and comments follow; docs/guides/layout.md has a table of what is where, and tools/fix-includes.py rewrites old-style includes from the folders in the tree, for code written before this. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01S1giNvrHTrPMPw7V6x1kQ4
This commit is contained in:
parent
0e39e711f1
commit
a1c965da1e
267 changed files with 1560 additions and 1440 deletions
57
include/gfx/theme.h
Normal file
57
include/gfx/theme.h
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
#pragma once
|
||||
|
||||
// SchOS visual identity — one palette, shared by everything that draws.
|
||||
//
|
||||
// This header exists because there were three unrelated designs and the seams
|
||||
// showed. The bootloader splash was deep purple with gold text, deliberately
|
||||
// matching the *panic* screen; the kernel console was cream with near-black
|
||||
// text; the panic screen was the purple both were copying. So a normal boot
|
||||
// looked like a crash, then abruptly became an amber terminal, and none of the
|
||||
// three looked like the same product.
|
||||
//
|
||||
// The rule now: **normal states are calm and dark; only failure is loud.**
|
||||
// Boot, console and shell share SCH_BG/SCH_FG. The panic screen keeps the
|
||||
// full-bleed purple entirely to itself, which is what makes it mean something.
|
||||
//
|
||||
// Included by boot/bios/stage2main.c (freestanding, pre-kernel), kernel/dev/vga.c,
|
||||
// kernel/core/console.c and kernel/core/panic.c. Plain #defines only — no
|
||||
// types, no code — because stage2 is compiled 32-bit against a different
|
||||
// world than the kernel.
|
||||
//
|
||||
// Colours are 0xRRGGBB. gfx_draw_pixel packs them for whatever depth the
|
||||
// framebuffer actually is.
|
||||
|
||||
// --- the product ---------------------------------------------------------
|
||||
// Near-black with a slight blue cast rather than pure #000: pure black on an
|
||||
// LCD reads as "the machine is off", and every serious platform sits a few
|
||||
// points above it.
|
||||
#define SCH_BG 0x0C0E13
|
||||
#define SCH_FG 0xE6E8EC // primary text
|
||||
#define SCH_DIM 0x707784 // secondary text, hints, version strings
|
||||
#define SCH_ACCENT 0x7C5CFF // the one accent: violet, keeping the
|
||||
// project's purple lineage without the
|
||||
// eye-searing chroma of the old splash
|
||||
#define SCH_ACCENT_DIM 0x2A2440 // unused track behind a progress bar
|
||||
#define SCH_OK 0x4ADE80 // reserved: success states
|
||||
#define SCH_WARN 0xFBBF24 // reserved: warnings that are not panics
|
||||
|
||||
// --- failure -------------------------------------------------------------
|
||||
// PSOGM. Deliberately unlike anything above, because its whole job is to be
|
||||
// unmistakable. See kernel/core/panic.c.
|
||||
//
|
||||
// These are the values panic.c actually renders. It used to carry a second,
|
||||
// different set of PSOGM_* defines of its own, so the two disagreed about what
|
||||
// the crash screen looked like and this header was quietly fiction. There was
|
||||
// also a PSOGM_TITLE in gold here, left over from a splash design that no
|
||||
// longer exists -- the screen is one background and two weights of text, on
|
||||
// purpose, because a crash screen with an accent colour is a crash screen
|
||||
// someone was enjoying designing.
|
||||
#define PSOGM_BG 0x4B1D9A // the purple
|
||||
#define PSOGM_FG 0xFFFFFF // the face, the headline, the values
|
||||
#define PSOGM_DIM 0xC3AEEC // labels and the closing lines
|
||||
|
||||
// The one exception to "two weights of text": the QR card has to be a light
|
||||
// panel with dark modules, because that is what a scanner needs. It reads as a
|
||||
// label stuck onto the screen, which is roughly what it is.
|
||||
#define PSOGM_CARD 0xFFFFFF
|
||||
#define PSOGM_INK 0x000000
|
||||
Loading…
Reference in a new issue