Enumerations | |
enum | lcdgraph_dialog_state_e { DIALOG_FOCUS, DIALOG_EDIT } |
Current state of dialog. More... | |
enum | lcdgraph_dialog_event_e { DIALOG_EVENT_NONE, DIALOG_KEY_NEXT, DIALOG_KEY_PREV, DIALOG_KEY_ENTER, DIALOG_KEY_ESC } |
Key code. More... | |
Functions | |
lcdgraph_result_e | LCDGRAPH_DIALOG_DrawItem (rom_type lcdgraph_control_t *control, lcdgraph_dialog_control_state_e state) |
Draw single item. | |
lcdgraph_result_e | LCDGRAPH_DIALOG_Create (void) |
Draw dialog box. | |
lcdgraph_result_e | LCDGRAPH_DIALOG_RegisterEvent (lcdgraph_dialog_event_e event) |
Register event. | |
lcdgraph_result_e | LCDGRAPH_DIALOG_GetStatus (lcdgraph_dialog_state_e *state) |
Get status. | |
lcdgraph_result_e | LCDGRAPH_DIALOG_GetFocus (unsigned char *current_focus, rom_type lcdgraph_control_t **control) |
Get currently focused item. | |
lcdgraph_result_e | LCDGRAPH_DIALOG_Init (rom_type lcdgraph_dialog_t *dialog_ptr) |
Initialize Dialog Module. |
Key code.
Code of the pressed key passed to dialog facility. It is treated as single event and will be processed accordingly
lcdgraph_result_e LCDGRAPH_DIALOG_Create | ( | void | ) |
Draw dialog box.
Draw entire dialog box, all items and set focus to the first focusable item
LCDGRAPH_OK | if all is ok | |
LCDGRAPH_MEMORY_FAIL | if dialog box is not initialized. See LCDGRAPH_DIALOG_Init |
lcdgraph_result_e LCDGRAPH_DIALOG_DrawItem | ( | rom_type lcdgraph_control_t * | control, | |
lcdgraph_dialog_control_state_e | state | |||
) |
Draw single item.
Draw single item
[in] | control | pointer to control item to be drawed |
[in] | state | state of drawed control item |
LCDGRAPH_OK | if all is ok | |
LCDGRAPH_PARAM_FAIL | if pointer to control item is NULL or given state is unknown |
lcdgraph_result_e LCDGRAPH_DIALOG_GetFocus | ( | unsigned char * | current_focus, | |
rom_type lcdgraph_control_t ** | control | |||
) |
Get currently focused item.
Get index of currently focused item and a pointer to focused control
[out] | current_focus | Pointer to variable to hold index if currently focused item. Pass NULL if out of interest |
[out] | control | Pointer to pointer to variable to hold currently focused control's pointer. Pass NULL if out of interest |
LCDGRAPH_OK | if all is ok |
lcdgraph_result_e LCDGRAPH_DIALOG_GetStatus | ( | lcdgraph_dialog_state_e * | state | ) |
Get status.
Get current status of dialog machine state
[out] | state | Pointer to variable to hold current status |
LCDGRAPH_OK | if all is ok | |
LCDGRAPH_PARAM_FAIL | if parameter state is NULL |
lcdgraph_result_e LCDGRAPH_DIALOG_Init | ( | rom_type lcdgraph_dialog_t * | dialog_ptr | ) |
Initialize Dialog Module.
Initialize dialog module
[in] | dialog_ptr | pointer to struct holding all dialog data |
LCDGRAPH_OK | if all is ok | |
LCDGRAPH_PARAM_FAIL | if either dialog_ptr or any of its significant member is NULL |
lcdgraph_result_e LCDGRAPH_DIALOG_RegisterEvent | ( | lcdgraph_dialog_event_e | event | ) |
Register event.
Register event such as a 'key pressed'. Function performs action right for a key
event | type of event to handle |
LCDGRAPH_OK | if all is ok | |
LCDGRAPH_PARAM_FAIL | if parameter event is incorrect |