]> git.karo-electronics.de Git - oswald.git/blob - ui/oswald.h
Add support for more screens
[oswald.git] / ui / oswald.h
1 #ifndef _OSWALD_H
2 #define _OSWALD_H
3
4 typedef signed char s8t;
5 typedef unsigned char u8t;
6 typedef signed short s16t;
7 typedef unsigned short u16t;
8 typedef u8t boolean;
9 #ifdef TRUE
10 #undef TRUE
11 #endif
12 #define TRUE 1
13 #ifdef FALSE
14 #undef FALSE
15 #endif
16 #define FALSE 0
17 #ifndef NULL
18 #define NULL 0
19 #endif
20
21 typedef struct {
22         u8t     hour;
23         u8t     minute;
24         u8t     second;
25         u8t     day;
26         u8t     month;
27         u8t     year;
28 } clock_state;
29
30 typedef enum {
31         IDLE_SCREEN = 0,
32         SETTING_DATETIME_SCREEN,
33 //      SCREEN2_SCREEN,
34 //      SCREEN3_SCREEN,
35 //      APPLICATION_SCREEN,
36         LAST_SCREEN,            // a marker for the last (not valid) screen)
37 } screen_number;
38
39 typedef enum {
40         BUTTON_A = 0,
41         BUTTON_B,
42         BUTTON_C,
43         BUTTON_D,
44         BUTTON_E,
45         BUTTON_F,
46 } watch_button;
47
48 typedef struct {
49         void (*button_func)(watch_button button);
50 } watch_screen;
51
52 typedef struct {
53         screen_number   screen;
54         // void (*draw_watchface_func)(boolean show_seconds);
55         boolean idle_show_seconds;
56         void (*user_button_func)(watch_button button);
57         void (*user_screendraw_func)(void);
58 } watch_state;
59
60 #endif
61