summaryrefslogtreecommitdiff
path: root/uisimulator/app.c
diff options
context:
space:
mode:
Diffstat (limited to 'uisimulator/app.c')
-rw-r--r--uisimulator/app.c104
1 files changed, 0 insertions, 104 deletions
diff --git a/uisimulator/app.c b/uisimulator/app.c
deleted file mode 100644
index c5149d8171..0000000000
--- a/uisimulator/app.c
+++ /dev/null
@@ -1,104 +0,0 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2002 Daniel Stenberg
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#include "lcd.h"
21#include "button.h"
22#include "kernel.h"
23#include "menu.h"
24
25/* Apps to include */
26#include "tree.h"
27
28#ifdef HAVE_LCD_BITMAP
29
30/*#include "screensaver.h"*/
31
32/*extern void tetris(void);*/
33
34void app_main(void)
35{
36 int key;
37
38 menu_init();
39 menu_draw();
40 put_cursor_menu_top();
41
42 while(1) {
43 key = button_get();
44
45 if(!key) {
46 sleep(1);
47 continue;
48 }
49
50 switch(key) {
51 case BUTTON_UP:
52 if(is_cursor_menu_top()){
53 /* wrap around to menu bottom */
54 put_cursor_menu_bottom();
55 } else {
56 /* move up */
57 move_cursor_up();
58 }
59 break;
60 case BUTTON_DOWN:
61 if(is_cursor_menu_bottom() ){
62 /* wrap around to menu top */
63 put_cursor_menu_top();
64 } else {
65 /* move down */
66 move_cursor_down();
67 }
68 break;
69 case BUTTON_RIGHT:
70 case BUTTON_PLAY:
71 /* Erase current display state */
72 lcd_clear_display();
73
74 execute_menu_item();
75
76 /* Return to previous display state */
77 lcd_clear_display();
78 menu_draw();
79 break;
80 case BUTTON_OFF:
81 return;
82 default:
83 break;
84 }
85
86 lcd_update();
87 }
88}
89
90#else
91
92void app_main(void)
93{
94 int key;
95 int cursor = 0;
96
97 lcd_puts(0,0, "Mooo!");
98 lcd_puts(1,1, " Rockbox!");
99
100 browse_root();
101
102}
103
104#endif