discoverpixy
Data Structures | Typedefs | Functions
Screen
Collaboration diagram for Screen:

Data Structures

struct  SCREEN_S
 

Typedefs

typedef void(* SCREEN_CALLBACK) (void *screen)
 
typedef struct SCREEN_S SCREEN_STRUCT
 

Functions

bool gui_screen_navigate (SCREEN_STRUCT *screen)
 
bool gui_screen_back ()
 
SCREEN_STRUCTgui_screen_get_current ()
 
void gui_screen_update ()
 

Detailed Description

The Screen Submodule provides an api to navigate between different "screens" on the UI. Each screen must provide an enter, update and a leave method; which will be called from this module at the right time. The implemented screens of the application are documented in the Screens module.

Typedef Documentation

typedef void(* SCREEN_CALLBACK) (void *screen)

Prototype for Event Listeners (called when the screen is entered, left or should be updated)

Parameters
screenThe pointer to the SCREEN_STRUCT where the event occurred
typedef struct SCREEN_S SCREEN_STRUCT

Structure to configure the Screen

Function Documentation

bool gui_screen_back ( )

Navigate one screen back as soon as the app enters the main loop again. It's safe to call this method from an interrupt

Returns
true on success

Here is the caller graph for this function:

SCREEN_STRUCT* gui_screen_get_current ( )

Returns the currently active screen

Returns
A Pointer to the active SCREEN_STRUCT
bool gui_screen_navigate ( SCREEN_STRUCT screen)

Navigate to the given screen as soon as the app enters the main loop again (and gui_screen_update() is called) It's safe to call this method from an interrupt

Note
Do not pass a screen which is already in your history of screens!
Parameters
screenA Pointer to the preinitialized SCREEN_STRUCT
Returns
true on success

Here is the caller graph for this function:

void gui_screen_update ( )

Updates the current screen. Switches the screen if gui_screen_navigate() or gui_screen_back() have been called since the last call to this method. This method should be called repeatedly from the main loop (e.g. app_process())

Here is the caller graph for this function: