modus
Menu

The program settings

The settings of the person (docs/FONTS.md, "The setting"): the font of the system, the order of the color stripes of the screen, the pointer theme and the grid fit of the vector font. The window shows each setting as a row of buttons and the text of the system at its three sizes; the exports set() and get() make the same changes from the console and from `kerneltool call`.

This program is the one writer of the settings page (contract:settings). A change is written first to its private store, as one record in one object (one commit), then to the page; the page wakes the compositor, which gives the new font and pointer theme to each window: every program draws again, with no code of its own for it.

At boot the root service starts this program for one pass with no window (the context value VALUE_BOOT_PASS): it reads the record of its store, writes the page, and stops.

FactValue
Sourceprograms/settings
Boot imagein the boot image; the image is not built, so its size is not known
Importsnone
Imported bynone

Exports

ExportWhat it does
set(name: Text, value: Text) -> Integerchanges a setting of the person, and keeps it in the store: set("font", "vector" or "spleen"); set("subpixel_order", "rgb", "bgr" or "none"); set("pointer_theme", "owner" or "system"); set("grid_fit", "on" or "off")
get(name: Text) -> Textgives the value of a setting of the person as a text: get("font"), get("subpixel_order"), get("pointer_theme"), get("grid_fit")
repeat(count: Integer) -> Integerkeeps count records in the store, one commit each, with the font and the subpixel order of each record from its number: the case of the loss of power of the machine test (a loss in the middle gives the record before or the record in flight, never a mix)
entry()

Read from the source of the module, as the build reads it to describe the exports (tools/kerneltool/describe.odin).

What the root service gives it

WhatValueAs the root service says
Grants{.Settings, .Serve, .Store}It writes the settings of the person, keeps them in its private store, and serves set() and get().
Budget: pages, programs, threads{pages = 2048, programs = 1, threads = 1}Not named in things_of: the budget of each other program.

Read from grants_of and things_of in programs/root/main.odin; budget_of in the same file adds the limits of processor time and of log records.