|
ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
|
Behaviour table shared by all widgets of one kind. More...
#include <ra8_widget.h>
Data Fields | |
| void(* | measure )(struct ra8_widget *w, int32_t avail_w, int32_t avail_h, int32_t *out_w, int32_t *out_h) |
| Report the widget's desired size within an available box. | |
| void(* | render )(struct ra8_widget *w) |
| Draw the widget within its current rect (on-target only). | |
| bool(* | on_input )(struct ra8_widget *w, const ra8_widget_event_t *ev) |
| Handle an input event. | |
Behaviour table shared by all widgets of one kind.
measure and on_input are pure (no framebuffer) so the compositor's layout + routing logic is host-testable. render is the only callback that touches pixels; it is invoked on-target and may be NULL for a widget that draws nothing (a pure spacer / hit area).
Definition at line 121 of file ra8_widget.h.
| void(* ra8_widget_vtable_t::measure) (struct ra8_widget *w, int32_t avail_w, int32_t avail_h, int32_t *out_w, int32_t *out_h) |
Report the widget's desired size within an available box.
| [in] | w | The widget instance. |
| [in] | avail_w | Available width (pixels). |
| [in] | avail_h | Available height (pixels). |
| [out] | out_w | Desired width (clamped by the caller). |
| [out] | out_h | Desired height (clamped by the caller). |
Definition at line 130 of file ra8_widget.h.
| bool(* ra8_widget_vtable_t::on_input) (struct ra8_widget *w, const ra8_widget_event_t *ev) |
Handle an input event.
| [in] | w | The widget instance. |
| [in] | ev | The event (already routed to this widget). |
Definition at line 146 of file ra8_widget.h.
| void(* ra8_widget_vtable_t::render) (struct ra8_widget *w) |
Draw the widget within its current rect (on-target only).
| [in] | w | The widget instance. NULL is a no-op (spacer). |
Definition at line 139 of file ra8_widget.h.