discoverpixy
screen.h
Go to the documentation of this file.
1 #ifndef SCREEN_H
2 #define SCREEN_H
3 
8 
14 
15 #include <stdio.h>
16 #include <stdbool.h>
17 
18 typedef void (*SCREEN_CALLBACK)(void* screen);
19 
20 typedef struct SCREEN_S{
24 
25 
26  struct SCREEN_S* next; //Used internally. do not modify
27 
29 
30 
31 //Navigate to the given string as soon as the app enters the main loop again. Method can be called from an interrupt
33 
34 //Navigate one screen back as soon as the app enters the main loop again. Method can be called from an interrupt
35 bool gui_screen_back();
36 
37 //Returns the current active screen
39 
40 //Updates/switches the screens. Call this from the app main loop, as fast as you can.
41 void gui_screen_update();
42 
45 #endif /* SCREEN_H */
struct SCREEN_S SCREEN_STRUCT
void gui_screen_update()
Definition: screen.c:12
SCREEN_CALLBACK on_leave
Definition: screen.h:22
struct SCREEN_S * next
Definition: screen.h:26
SCREEN_STRUCT * gui_screen_get_current()
Definition: screen.c:8
bool gui_screen_navigate(SCREEN_STRUCT *screen)
Definition: screen.c:39
Definition: screen.h:20
static SCREEN_STRUCT screen
Definition: screen_filetest.c:120
void(* SCREEN_CALLBACK)(void *screen)
Function pointer used...
Definition: screen.h:18
SCREEN_CALLBACK on_update
Definition: screen.h:23
bool gui_screen_back()
Definition: screen.c:48
SCREEN_CALLBACK on_enter
Definition: screen.h:21