Choco OS  V.0.16.9.0
Join to the chocolate world
Screens Manager

Module for managing screens. More...

Functions

oC_ErrorCode_t oC_ScreenMan_TurnOn (void)
 turns on the screen manager module More...
 
oC_ErrorCode_t oC_ScreenMan_TurnOff (void)
 turns off screen manager More...
 
void oC_ScreenMan_ConfigureAll (void)
 configures all screens More...
 
void oC_ScreenMan_UnconfigureAll (void)
 unconfigures all screens More...
 
oC_Screen_t oC_ScreenMan_GetDefaultScreen (void)
 returns default screen More...
 
static oC_List (oC_Screen_t)
 returns screens list More...
 
oC_Screen_t oC_ScreenMan_GetScreen (const char *Name)
 returns selected screen More...
 
oC_ErrorCode_t oC_ScreenMan_AddScreen (oC_Screen_t Screen)
 adds screen to the screens list More...
 
oC_ErrorCode_t oC_ScreenMan_RemoveScreen (oC_Screen_t Screen)
 removes screen from the screens list More...
 

Detailed Description

The screen manager module is designed for storing screens that are handled by the system. It has to be turned on before usage by calling a function oC_ScreenMan_TurnOn. If the turning operation is finished with success, the drivers that are associated with screens can be configured by calling the function named #oc_ScreenMan_ConfigureAll.

If you want draw something at the screen, you have to choose one. If you don't know which screen should you take, you can draw at the default screen. It can be received by the function named oC_ScreenMan_GetDefaultScreen

Function Documentation

static oC_List ( oC_Screen_t  )
static

The function returns list of screens available in the system. It also can return NULL if the module did not start yet.

Warning
This function returns real list of the screens (IT IS NOT A COPY!!!) You can read it, but don't change anything in this list - otherwise it may cause undefined behavior.
Returns
List of screens

Definition at line 52 of file oc_screenman.c.

oC_ErrorCode_t oC_ScreenMan_AddScreen ( oC_Screen_t  Screen)

The function is for adding the screen to the screen manager list. Screen has to be correct and the screen manager module must be turned on.

Parameters
ScreenCorrect screen to add
Returns
code of error or #oC_ErrorCode_None if success

Definition at line 291 of file oc_screenman.c.

void oC_ScreenMan_ConfigureAll ( void  )

The function is for configuration of all not configured screens. The function checks if the associated graphic driver is turned on and the screen is not configured. If both conditions are true, then it configures the screen driver. Each error during these operations is logged into the system errors stack.

Definition at line 164 of file oc_screenman.c.

oC_Screen_t oC_ScreenMan_GetDefaultScreen ( void  )

The function returns screen that is set as default screen. If the default screen is not set or it does not exist, the function will return NULL pointer.

Returns
pointer to the default screen or NULL in case of error

Definition at line 215 of file oc_screenman.c.

oC_Screen_t oC_ScreenMan_GetScreen ( const char *  Name)

The function looking for a screen that matches the given name. If none of screens matches, the function returns NULL.

Parameters
NameName of the screen to find
Returns
screen object or NULL if not found

Definition at line 260 of file oc_screenman.c.

oC_ErrorCode_t oC_ScreenMan_RemoveScreen ( oC_Screen_t  Screen)

The function is for removing the screen from the screen manager list. Screen has to be correct and the screen manager module must be turned on.

Parameters
ScreenCorrect screen to remove
Returns
code of error or #oC_ErrorCode_None if success

Definition at line 324 of file oc_screenman.c.

oC_ErrorCode_t oC_ScreenMan_TurnOff ( void  )

The function is for turning off the screen manager. All screens will be destroyed.

Returns
code of error or #oC_ErrorCode_None if success

Definition at line 125 of file oc_screenman.c.

oC_ErrorCode_t oC_ScreenMan_TurnOn ( void  )

The function initializes the screen manager to work. It should be called by the system at boot time. The function creates screens and adds it to the list. It does not configures drivers associated with the screens.

Returns
code of error or #oC_ErrorCode_None if success

Definition at line 80 of file oc_screenman.c.

void oC_ScreenMan_UnconfigureAll ( void  )

The function is for deconfiguration of all configured screens. Each error that occurs during screen unconfiguration is logged in to the system errors stack.

Definition at line 189 of file oc_screenman.c.