Muteki
EABI code execution on Besta® RTOS devices.
Loading...
Searching...
No Matches
group.h File Reference

Component group/container methods. More...

Go to the source code of this file.

Functions

void PGROUP_draw (ui_group_t *self)
 Draw the group and its children.
void PGROUP_handleEvent (ui_group_t *self, ui_event_t *event)
 Handle events.
void PGROUP_insert (ui_group_t *self, ui_component_t *child)
 Insert a component to the component ring.
void PGROUP_redraw (ui_group_t *self)
 Redraw the child components.
void PGROUP_setCurrent (ui_group_t *self, ui_component_t *child)
 Set the current component ring head to child.
void PGROUP_setState (ui_group_t *self, unsigned short mask, bool set)
 Operate on the component state bitfield.
int PGROUP_execute (ui_group_t *self)
 Execute a group container.
ui_component_t * PGROUP_preView (ui_group_t *self)
 Find and return the component that has the ui_group_t::current component as its next component.
void Destroy (ui_group_t *group)
 Dispose a group component and free up its memory.
void SetDeskBoxReturn (ui_group_t *self, int execution_result)
 Set the group execution result.
int ExecView (ui_group_t *group)
 Activates a group.
int SetExitWordVal (int val)
 Set the exit word.
int GetExitWordVal (void)
 Get the current exit word.
void Delete (ui_group_t *group, ui_component_t *child)
 Remove a child from group.

Detailed Description

Component group/container methods.

Methods of a ui_group_t but as syscalls.

Function Documentation

◆ Delete()

void Delete ( ui_group_t * group,
ui_component_t * child )
extern

Remove a child from group.

Finds and unlinks the specified child component from the group's component ring.

Warning
This does not free the component.
Syscall Number
0x10182
Parameters
groupThe group object.
childTarget child to remove.

◆ Destroy()

void Destroy ( ui_group_t * group)
extern

Dispose a group component and free up its memory.

This function sets the exit word to 0, sends itself a destroy event, restores the exit value, and frees up the memory occupied by this component.

Syscall Number
0x10177
Parameters
groupThe group object to be freed.
Returns
None.

◆ ExecView()

int ExecView ( ui_group_t * group)
extern

Activates a group.

This manages the global navigation state and calls the ui_group_t::on_exec callback, which starts a local event loop that routes all events through the group. Returns ui_group_t::execution_result when it is set to a non-zero value or, in case when exit work is permitted, when exit word is set to a non-zero value.

Syscall Number
0x1017c
Parameters
groupThe group object.
Returns
The group-defined execution result.

◆ GetExitWordVal()

int GetExitWordVal ( void )
extern

Get the current exit word.

Syscall Number
0x1017e
Parameters
None.
Returns
The exit word value.

◆ PGROUP_draw()

void PGROUP_draw ( ui_group_t * self)
extern

Draw the group and its children.

Syscall Number
0x1016a
Parameters
selfThe group object.
Returns
None.

◆ PGROUP_execute()

int PGROUP_execute ( ui_group_t * self)
extern

Execute a group container.

This starts a local event loop that synchronously checks for new events using GetEvent(), dispatches any received events to its children, and checks the ui_group_t::execution_result for any non-zero return values.

When the container allows exit word processing and the exit word has been set to a non-zero value, the execution may terminate early with an execution result of 0.

Syscall Number
0x10170
Parameters
selfThe group object.
Returns
Return value of the execution.

◆ PGROUP_handleEvent()

void PGROUP_handleEvent ( ui_group_t * self,
ui_event_t * event )
extern

Handle events.

Syscall Number
0x1016b
Parameters
selfThe group object.
eventThe incoming event object.
Returns
None.

◆ PGROUP_insert()

void PGROUP_insert ( ui_group_t * self,
ui_component_t * child )
extern

Insert a component to the component ring.

This method inserts the component to the tail of the component ring relative to ui_group_t::current.

Syscall Number
0x1016c
Parameters
selfThe group object.
childThe child component.
Returns
None.

◆ PGROUP_preView()

ui_component_t * PGROUP_preView ( ui_group_t * self)
extern

Find and return the component that has the ui_group_t::current component as its next component.

Syscall Number
0x10171
Parameters
selfThe group object.
Returns
The previous component of the ring head aka. the tail of the ring relative to ui_group_t::current.

◆ PGROUP_redraw()

void PGROUP_redraw ( ui_group_t * self)
extern

Redraw the child components.

Syscall Number
0x1016d
Parameters
selfThe group object.
Returns
None.

◆ PGROUP_setCurrent()

void PGROUP_setCurrent ( ui_group_t * self,
ui_component_t * child )
extern

Set the current component ring head to child.

child must already form a ring with other components.

Syscall Number
0x1016e
Parameters
selfThe group object.
childThe child component that will become the component ring head.

◆ PGROUP_setState()

void PGROUP_setState ( ui_group_t * self,
unsigned short mask,
bool set )
extern

Operate on the component state bitfield.

This calls PVIEW_setState() and also calls the virtual method ui_group_t::on_set_current with ui_group_t::current.

Syscall Number
0x1016f
Parameters
selfThe group object.
maskBitmask that corresponds bits in the component state.
setAny state bits that has a corresponding 1 bit in the bitmask will be set when this is true. If this is false, they will be cleared instead.
Returns
None.

◆ SetDeskBoxReturn()

void SetDeskBoxReturn ( ui_group_t * self,
int execution_result )
extern

Set the group execution result.

Syscall Number
0x1017b
Parameters
selfThe group object.
execution_resultThe new execution result.

◆ SetExitWordVal()

int SetExitWordVal ( int val)
extern

Set the exit word.

Setting this to a non-zero value (usually 1) causes eligible components to exit early after an event handling callback.

Syscall Number
0x1017d
Parameters
valThe new value.
Returns
The old value.