Muteki
EABI code execution on Besta® RTOS devices.
Loading...
Searching...
No Matches
ui_component_s Struct Reference

Common part of all widgets and modals. More...

#include <framework.h>

Data Fields

ui_component_t * next
 Next component in a component ring or list.
ui_component_t * parent
 Parent component.
unsigned short state
 Component state bit field.
unsigned short flags
 Component behavior bit field.
lcd_rect_t footprint
 Component visual footprint.
void(*) on_set_state (ui_component_t *self, unsigned short mask, bool value)
 Component state change callback.
void(*) on_erase_bg (ui_component_t *self)
 Component callback for erasing background.
void(*) on_draw (ui_component_t *self)
 Component draw callback.
void(*) on_event (ui_component_t *self, ui_event_t *event)
 Component event callback.
void * user_data
 User data pointer. Content is component-specific.
unsigned short tag
 Component tag. Can be used to distinguish components under some circumstances (like when sharing a callback with another component, or looking up an item with GetDeskItem()). Does not need to be unique. Usually will be set by AllocBlock() after the memory was allocated.
unsigned short runtime_type
 Unknown. Set to 0x65 on buttons.
int unk_0x2c
 Unknown.
unsigned short unk_0x30
 Unknown.
short unk_0x32
 Unknown. Probably padding bytes.

Detailed Description

Common part of all widgets and modals.

Todo
Find a way to make the callbacks respect subtypes? Currently type-specific callbacks need to have their self argument defined as ui_component_t * (or void * if we opt to do that) which is a bit less ideal.

Field Documentation

◆ flags

unsigned short ui_component_s::flags

Component behavior bit field.

See also
ui_component_flag_e

◆ footprint

lcd_rect_t ui_component_s::footprint

Component visual footprint.

This defines the size and location of the component on screen.

◆ next

ui_component_t* ui_component_s::next

Next component in a component ring or list.

This will be set to NULL when initialized, and, depending on context, will be a pointer to the next component, a pointer to this component or NULL.

◆ on_draw

void(*) ui_component_s::on_draw(ui_component_t *self)

Component draw callback.

See also
PVIEW_draw

◆ on_erase_bg

void(*) ui_component_s::on_erase_bg(ui_component_t *self)

Component callback for erasing background.

Todo
Figure out exactly what this does.
See also
PVIEW_EraseBackGround

◆ on_event

void(*) ui_component_s::on_event(ui_component_t *self, ui_event_t *event)

Component event callback.

See also
PVIEW_handleEvent

◆ on_set_state

void(*) ui_component_s::on_set_state(ui_component_t *self, unsigned short mask, bool value)

Component state change callback.

See also
PVIEW_setState

◆ parent

ui_component_t* ui_component_s::parent

Parent component.

This will usually be a group.

◆ state

unsigned short ui_component_s::state

Component state bit field.

Each component may use this differently to represent different states.

◆ tag

unsigned short ui_component_s::tag

Component tag. Can be used to distinguish components under some circumstances (like when sharing a callback with another component, or looking up an item with GetDeskItem()). Does not need to be unique. Usually will be set by AllocBlock() after the memory was allocated.

◆ unk_0x32

short ui_component_s::unk_0x32

Unknown. Probably padding bytes.


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