Introduced a Screen (sub) module and divided app into multiple screens.

This commit is contained in:
t-moe
2015-04-27 23:37:54 +02:00
parent b300ac5890
commit cf72baaa3a
11 changed files with 541 additions and 272 deletions

25
common/gui/screen.h Normal file
View File

@@ -0,0 +1,25 @@
#ifndef SCREEN_H
#define SCREEN_H
#include <stdio.h>
#include <stdbool.h>
typedef void (*SCREEN_CALLBACK)(void* screen); //!< Function pointer used...
typedef struct SCREEN_S{
SCREEN_CALLBACK on_enter;
SCREEN_CALLBACK on_leave;
SCREEN_CALLBACK on_update;
struct SCREEN_S* next; //Used internally. do not modify
} SCREEN_STRUCT;
bool gui_screen_navigate(SCREEN_STRUCT* screen);
bool gui_screen_back();
SCREEN_STRUCT* gui_screen_get_current();
void gui_screen_update();
#endif /* SCREEN_H */