diff options
Diffstat (limited to 'apps/plugins/lib/oldmenuapi.h')
-rw-r--r-- | apps/plugins/lib/oldmenuapi.h | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/apps/plugins/lib/oldmenuapi.h b/apps/plugins/lib/oldmenuapi.h new file mode 100644 index 0000000000..34f6226d59 --- /dev/null +++ b/apps/plugins/lib/oldmenuapi.h | |||
@@ -0,0 +1,56 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2002 Robert E. Hak | ||
11 | * | ||
12 | * All files in this archive are subject to the GNU General Public License. | ||
13 | * See the file COPYING in the source tree root for full license agreement. | ||
14 | * | ||
15 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
16 | * KIND, either express or implied. | ||
17 | * | ||
18 | ****************************************************************************/ | ||
19 | |||
20 | |||
21 | /* This API is for existing plugins and shouldn't be used by new ones. | ||
22 | This provides a simpler menu system for plugins, but does not allow for | ||
23 | translatable or talkable strings in the menus. */ | ||
24 | #ifndef __OLDMENUAPI_H__ | ||
25 | #define __OLDMENUAPI_H__ | ||
26 | |||
27 | #include <stdbool.h> | ||
28 | |||
29 | struct menu_item { | ||
30 | unsigned char *desc; /* string or ID */ | ||
31 | bool (*function) (void); /* return true if USB was connected */ | ||
32 | }; | ||
33 | |||
34 | int menu_init(struct plugin_api *api, const struct menu_item* mitems, | ||
35 | int count, int (*callback)(int, int), | ||
36 | const char *button1, const char *button2, const char *button3); | ||
37 | void menu_exit(int menu); | ||
38 | |||
39 | void put_cursorxy(int x, int y, bool on); | ||
40 | |||
41 | /* Returns below define, or number of selected menu item*/ | ||
42 | int menu_show(int m); | ||
43 | |||
44 | bool menu_run(int menu); | ||
45 | int menu_cursor(int menu); | ||
46 | char* menu_description(int menu, int position); | ||
47 | void menu_delete(int menu, int position); | ||
48 | int menu_count(int menu); | ||
49 | bool menu_moveup(int menu); | ||
50 | bool menu_movedown(int menu); | ||
51 | void menu_draw(int menu); | ||
52 | void menu_insert(int menu, int position, char *desc, bool (*function) (void)); | ||
53 | void menu_set_cursor(int menu, int position); | ||
54 | void menu_talk_selected(int m); | ||
55 | |||
56 | #endif /* End __OLDMENUAPI_H__ */ | ||