std1.0.0-beta-7 SafeC docs

Module gui::gui_fb

#include <std/gui/gui_fb.h> source

GUI: bare-metal framebuffer backend (gui_fb.sc).

The setup calls only this backend has: describe the bootloader-provided linear framebuffer once, and feed input events from your own drivers. Everything else is the portable API in gui.h.

Structs

GuiFbConfig

Functions

gui_fb_configureMust be called once, before GuiWindow::create(), with the real framebuffer's parameters (see struct GuiFbConfig's field comments). Without it GuiWindow::create() fails (its 'platform' is null).
gui_fb_set_clockA monotonic clock for timers and animation (GuiApp, gui_time_ms()): e.g. a SysTick or TSC-based counter, in nanoseconds. Without one, time is virtual and only moves while the event loop waits.
gui_fb_inject_eventCalled by a target's own input driver/ISR with whatever it decodes (e.g. a PS/2 scancode translated to a GuiEvent); GuiWindow::poll_event() hands it back out. Dropped when GUI_FB_QUEUE_CAP events are already waiting.

Macros

GUI_FB_QUEUE_CAPinjected events waiting for GuiWindow::poll_event()