discoverpixy
screen.h
Go to the documentation of this file.
1 /**************************************************************************************************************************************
2 * Project: discoverpixy
3 * Website: https://github.com/t-moe/discoverpixy
4 * Authors: Aaron Schmocker, Timo Lang
5 * Institution: BFH Bern University of Applied Sciences
6 * File: common/gui/screen.h
7 *
8 * Version History:
9 * Date Autor Email SHA Changes
10 * 2015-04-27 timolang@gmail.com cf72baa Introduced a Screen (sub) module and divided app into multiple screens.
11 * 2015-04-27 timolang@gmail.com 77e6d0e Fixed screen implementation.
12 * 2015-05-11 timolang@gmail.com 08d9fe0 More work on doxygen module structure
13 * 2015-05-15 timolang@gmail.com 9a16865 Added doxgen comments to filesyste, checkbox, numupdown and screen module. And some minor changes to the other modules.
14 * 2015-05-17 timolang@gmail.com 2d46336 Improved comments in implementation of button, checkbox, numupdown, tft, touch and screen modules/submodules.
15 * 2015-06-06 timolang@gmail.com c06661d Fixed some outdated comments in source code. Documented Gui Module in docu.
16 *
17 **************************************************************************************************************************************/
18 
19 #ifndef SCREEN_H
20 #define SCREEN_H
21 
22 #include <stdio.h>
23 #include <stdbool.h>
24 
29 
37 
42 
47 typedef void (*SCREEN_CALLBACK)(void* screen);
48 
52 typedef struct SCREEN_S {
56 
57  struct SCREEN_S* next;
59 
60 
61 
70 
76 bool gui_screen_back();
77 
78 
84 
85 //Updates/switches the screens. Call this from the app main loop, as fast as you can.
90 void gui_screen_update();
91 
94 #endif /* SCREEN_H */
struct SCREEN_S SCREEN_STRUCT
SCREEN_CALLBACK on_enter
The Callback which is called when the screen is entered. Add/Register all UI-Elements here...
Definition: screen.h:53
struct SCREEN_S * next
Used internally. do not modify, do not initialize.
Definition: screen.h:57
void gui_screen_update()
Definition: screen.c:41
SCREEN_STRUCT * gui_screen_get_current()
Definition: screen.c:35
SCREEN_CALLBACK on_leave
The Callback which is called when the screen is left. Remove/Unregister all UI-Elements here...
Definition: screen.h:54
bool gui_screen_navigate(SCREEN_STRUCT *screen)
Definition: screen.c:74
static SCREEN_STRUCT screen
void(* SCREEN_CALLBACK)(void *screen)
Definition: screen.h:47
bool gui_screen_back()
Definition: screen.c:85
SCREEN_CALLBACK on_update
The Callback which is called repeatedly when the screen should be updated. Update/Redraw all UI-Eleme...
Definition: screen.h:55