forked from Zizzle/stm32_freertos_example
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmenu.h
30 lines (24 loc) · 853 Bytes
/
menu.h
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
///////////////////////////////////////////////////////////////////////////////
// Copyright (C) 2011, Matthew Pratt
//
// Licensed under the GNU General Public License v3 or greater
//
// Date: 21 Jun 2007
///////////////////////////////////////////////////////////////////////////////
#ifndef MENU_H
#define MENU_H
struct menu {
const char *text;
struct menu *next;
void (*activate)(int initializing);
void (*press_handler)(unsigned char button_down); // called when a menu item is pressed/released
int (*touch_handler)(int xx, int yy); // return non-zero if the key was consumed
};
#define MAX_DEPTH 10
void menu_set_root(struct menu *root_menu);
void menu_key(unsigned char key);
void menu_clear(void);
void menu_run_applet(int (*applet_key_handler)(unsigned char));
#define CRUMB_H 18
#define COL_W (LCD_W / 2)
#endif