-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmenu.h
More file actions
49 lines (42 loc) · 978 Bytes
/
menu.h
File metadata and controls
49 lines (42 loc) · 978 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/*
* File: menu.h
* Author: Panagiotis Argyropoulos - pargyropoulos@gmail.com
*/
#ifndef MENU_H
#define MENU_H
#include <stdint.h>
typedef struct {
const char *text;
void (*menu_handler_on_entry)(void);
void (*menu_handler_on_exit)(void);
} menu_item_t;
typedef struct {
const menu_item_t *menu_tbl_ptr;
uint8_t menu_items;
} menu_t;
typedef struct {
uint8_t var;
const uint8_t min;
const uint8_t max;
} option_item_t;
typedef struct {
option_item_t *option_tbl_ptr;
uint8_t option_items;
const char *text;
char separator;
} option_t;
void MENU_MoveUp(void);
void MENU_MoveDown(void);
void MENU_Select(void);
void MENU_Esc(void);
void MENU_MoveLeft(void);
void MENU_MoveRight(void);
void MENU_SelectOption(void);
void MENU_EscOption(void);
void MENU_Add(void);
void MENU_Subtract(void);
void MENU_EditSelection(void);
void MENU_EscEdit(void);
void MENU_Navigate(void);
void MENU_Initialize(void);
#endif /* MENU_H */