discoverpixy
screen.h
Go to the documentation of this file.
1 #ifndef SCREEN_H
2 #define SCREEN_H
3 
4 #include <stdio.h>
5 #include <stdbool.h>
6 
11 
19 
24 
29 typedef void (*SCREEN_CALLBACK)(void* screen);
30 
34 typedef struct SCREEN_S{
38 
39  struct SCREEN_S* next;
41 
42 
43 
52 
58 bool gui_screen_back();
59 
60 
66 
67 //Updates/switches the screens. Call this from the app main loop, as fast as you can.
72 void gui_screen_update();
73 
76 #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:35
struct SCREEN_S * next
Used internally. do not modify, do not initialize.
Definition: screen.h:39
void gui_screen_update()
Definition: screen.c:22
SCREEN_STRUCT * gui_screen_get_current()
Definition: screen.c:17
SCREEN_CALLBACK on_leave
The Callback which is called when the screen is left. Remove/Unregister all UI-Elements here...
Definition: screen.h:36
bool gui_screen_navigate(SCREEN_STRUCT *screen)
Definition: screen.c:51
Definition: screen.h:34
static SCREEN_STRUCT screen
Definition: screen_filetest.c:121
void(* SCREEN_CALLBACK)(void *screen)
Definition: screen.h:29
bool gui_screen_back()
Definition: screen.c:60
SCREEN_CALLBACK on_update
The Callback which is called repeatedly when the screen should be updated. Update/Redraw all UI-Eleme...
Definition: screen.h:37