Expand description
The descriptor a compiled program hands the runtime: its states, windows, views and the compiled functions behind every dynamic part of their UI.
nf build emits these as data next to the machine code, laid out as the #[repr(C)]
types here say, so their layout is the contract between the two.
Structs§
- Binding
Desc - Frame
Desc - The types of a frame’s locals; a frame starts with every local empty.
- Menu
Desc - A menu: its title and its entries.
- Menu
Entry Desc - One entry of a menu. Which fields matter depends on
kind: - Program
Desc - Every function returns
falseafter a runtime call recorded why it failed. - Region
Desc - Shortcut
Desc - An item’s shortcut, which
shortcutholds whenpresent. - Span
Desc - State
Desc - Template
Desc - One element of a window’s UI. Which fields matter depends on
kind: - View
Desc - Window
Desc
Enums§
Constants§
- ABI_
VERSION - Bumped whenever these layouts or the meaning of a runtime call change, so a program built against another runtime is refused instead of misread.
Type Aliases§
- Action
Fn - Runs a button’s action in a copy of its frame, which it may change.
- Expand
Fn - Tells
sinkwhat a region shows now, through thenf_show_*calls. - InitFn
- Writes a state’s starting value to
out. - ReadFn
- Writes the value a piece of UI shows, such as a string, an
intor abool, toout;frameholds its locals. - WriteFn
- Writes
value, which it takes ownership of, to a bound place.