ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
ra8_app_vtable_t Struct Reference

App lifecycle callbacks (shared by all instances of one app). More...

#include <ra8_app.h>

Data Fields

ra8_err_t(* init )(struct ra8_app *a)
 One-time setup (at register).
void(* on_enter )(struct ra8_app *a)
 Gained focus / foreground.
void(* tick )(struct ra8_app *a)
 Per-frame update (foreground).
void(* render )(const struct ra8_app *a)
 Draw (on-target, foreground).
bool(* on_input )(struct ra8_app *a, const ra8_widget_event_t *ev)
 Handle.
void(* on_leave )(struct ra8_app *a)
 Lost focus / background.
void(* deinit )(struct ra8_app *a)
 Teardown.

Detailed Description

App lifecycle callbacks (shared by all instances of one app).

init runs once at registration; on_enter / on_leave bracket focus; tick + render run each frame while foreground; on_input routes events (returning whether the app consumed them); deinit tears down. Any callback except on_input may be NULL (a no-op). render is the only on-target one.

Definition at line 133 of file ra8_app.h.

Field Documentation

◆ deinit

void(* ra8_app_vtable_t::deinit) (struct ra8_app *a)

Teardown.

Definition at line 141 of file ra8_app.h.

◆ init

ra8_err_t(* ra8_app_vtable_t::init) (struct ra8_app *a)

One-time setup (at register).

Definition at line 134 of file ra8_app.h.

◆ on_enter

void(* ra8_app_vtable_t::on_enter) (struct ra8_app *a)

Gained focus / foreground.

Definition at line 135 of file ra8_app.h.

◆ on_input

bool(* ra8_app_vtable_t::on_input) (struct ra8_app *a, const ra8_widget_event_t *ev)

Handle.

Definition at line 138 of file ra8_app.h.

◆ on_leave

void(* ra8_app_vtable_t::on_leave) (struct ra8_app *a)

Lost focus / background.

Definition at line 140 of file ra8_app.h.

◆ render

void(* ra8_app_vtable_t::render) (const struct ra8_app *a)

Draw (on-target, foreground).

Definition at line 137 of file ra8_app.h.

◆ tick

void(* ra8_app_vtable_t::tick) (struct ra8_app *a)

Per-frame update (foreground).

Definition at line 136 of file ra8_app.h.


The documentation for this struct was generated from the following file: