diff options
-rw-r--r-- | apps/SOURCES | 1 | ||||
-rw-r--r-- | apps/debug_menu.c | 10 | ||||
-rw-r--r-- | apps/playlist.c | 1 | ||||
-rw-r--r-- | apps/plugin.c | 8 | ||||
-rw-r--r-- | apps/plugin.h | 18 | ||||
-rw-r--r-- | apps/plugins/clock.c | 9 | ||||
-rw-r--r-- | apps/plugins/jpeg.c | 4 | ||||
-rw-r--r-- | apps/plugins/lib/SOURCES | 1 | ||||
-rw-r--r-- | apps/plugins/splitedit.c | 3 | ||||
-rw-r--r-- | apps/plugins/video.c | 4 | ||||
-rw-r--r-- | apps/plugins/viewer.c | 3 | ||||
-rw-r--r-- | apps/recorder/widgets.c | 54 | ||||
-rw-r--r-- | apps/recorder/widgets.h | 33 | ||||
-rw-r--r-- | apps/screens.c | 3 | ||||
-rw-r--r-- | apps/tree.c | 3 |
15 files changed, 31 insertions, 124 deletions
diff --git a/apps/SOURCES b/apps/SOURCES index 0fdb6f5955..c9587cf5bb 100644 --- a/apps/SOURCES +++ b/apps/SOURCES | |||
@@ -56,7 +56,6 @@ recorder/bmp.c | |||
56 | recorder/icons.c | 56 | recorder/icons.c |
57 | recorder/keyboard.c | 57 | recorder/keyboard.c |
58 | recorder/peakmeter.c | 58 | recorder/peakmeter.c |
59 | recorder/widgets.c | ||
60 | #if LCD_DEPTH > 1 | 59 | #if LCD_DEPTH > 1 |
61 | recorder/backdrop.c | 60 | recorder/backdrop.c |
62 | #endif | 61 | #endif |
diff --git a/apps/debug_menu.c b/apps/debug_menu.c index e1bb5ccb9f..ecdbe26370 100644 --- a/apps/debug_menu.c +++ b/apps/debug_menu.c | |||
@@ -67,7 +67,7 @@ | |||
67 | #endif | 67 | #endif |
68 | 68 | ||
69 | #ifdef HAVE_LCD_BITMAP | 69 | #ifdef HAVE_LCD_BITMAP |
70 | #include "widgets.h" | 70 | #include "scrollbar.h" |
71 | #include "peakmeter.h" | 71 | #include "peakmeter.h" |
72 | #endif | 72 | #endif |
73 | #include "logfdisp.h" | 73 | #include "logfdisp.h" |
@@ -260,11 +260,11 @@ bool dbg_audio_thread(void) | |||
260 | lcd_puts(0, 5, buf); | 260 | lcd_puts(0, 5, buf); |
261 | 261 | ||
262 | /* Playable space left */ | 262 | /* Playable space left */ |
263 | scrollbar(0, 6*8, 112, 4, d.audiobuflen, 0, | 263 | gui_scrollbar_draw(&screens[SCREEN_MAIN],0, 6*8, 112, 4, d.audiobuflen, 0, |
264 | d.playable_space, HORIZONTAL); | 264 | d.playable_space, HORIZONTAL); |
265 | 265 | ||
266 | /* Show the watermark limit */ | 266 | /* Show the watermark limit */ |
267 | scrollbar(0, 6*8+4, 112, 4, d.audiobuflen, 0, | 267 | gui_scrollbar_draw(&screens[SCREEN_MAIN],0, 6*8+4, 112, 4, d.audiobuflen, 0, |
268 | d.low_watermark_level, HORIZONTAL); | 268 | d.low_watermark_level, HORIZONTAL); |
269 | 269 | ||
270 | snprintf(buf, sizeof(buf), "wm: %x - %x", | 270 | snprintf(buf, sizeof(buf), "wm: %x - %x", |
@@ -334,14 +334,14 @@ bool dbg_audio_thread(void) | |||
334 | lcd_puts(0, line++, buf); | 334 | lcd_puts(0, line++, buf); |
335 | 335 | ||
336 | /* Playable space left */ | 336 | /* Playable space left */ |
337 | scrollbar(0, line*8, LCD_WIDTH, 6, bufsize, 0, bufused, HORIZONTAL); | 337 | gui_scrollbar_draw(&screens[SCREEN_MAIN],0, line*8, LCD_WIDTH, 6, bufsize, 0, bufused, HORIZONTAL); |
338 | line++; | 338 | line++; |
339 | 339 | ||
340 | snprintf(buf, sizeof(buf), "codec: %8ld/%8ld", audio_filebufused(), (long) filebuflen); | 340 | snprintf(buf, sizeof(buf), "codec: %8ld/%8ld", audio_filebufused(), (long) filebuflen); |
341 | lcd_puts(0, line++, buf); | 341 | lcd_puts(0, line++, buf); |
342 | 342 | ||
343 | /* Playable space left */ | 343 | /* Playable space left */ |
344 | scrollbar(0, line*8, LCD_WIDTH, 6, filebuflen, 0, | 344 | gui_scrollbar_draw(&screens[SCREEN_MAIN],0, line*8, LCD_WIDTH, 6, filebuflen, 0, |
345 | audio_filebufused(), HORIZONTAL); | 345 | audio_filebufused(), HORIZONTAL); |
346 | line++; | 346 | line++; |
347 | 347 | ||
diff --git a/apps/playlist.c b/apps/playlist.c index 134b52ea8b..23d79a6476 100644 --- a/apps/playlist.c +++ b/apps/playlist.c | |||
@@ -92,7 +92,6 @@ | |||
92 | #include "usb.h" | 92 | #include "usb.h" |
93 | #ifdef HAVE_LCD_BITMAP | 93 | #ifdef HAVE_LCD_BITMAP |
94 | #include "icons.h" | 94 | #include "icons.h" |
95 | #include "widgets.h" | ||
96 | #endif | 95 | #endif |
97 | 96 | ||
98 | #include "lang.h" | 97 | #include "lang.h" |
diff --git a/apps/plugin.c b/apps/plugin.c index a00a54e4ec..f5e6cebf65 100644 --- a/apps/plugin.c +++ b/apps/plugin.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #endif | 38 | #endif |
39 | 39 | ||
40 | #ifdef HAVE_LCD_BITMAP | 40 | #ifdef HAVE_LCD_BITMAP |
41 | #include "scrollbar.h" | ||
41 | #include "peakmeter.h" | 42 | #include "peakmeter.h" |
42 | #include "bmp.h" | 43 | #include "bmp.h" |
43 | #include "bidi.h" | 44 | #include "bidi.h" |
@@ -99,6 +100,7 @@ static const struct plugin_api rockbox_api = { | |||
99 | lcd_get_background, | 100 | lcd_get_background, |
100 | lcd_bitmap_part, | 101 | lcd_bitmap_part, |
101 | lcd_bitmap, | 102 | lcd_bitmap, |
103 | lcd_set_backdrop, | ||
102 | #endif | 104 | #endif |
103 | #if LCD_DEPTH == 16 | 105 | #if LCD_DEPTH == 16 |
104 | lcd_bitmap_transparent_part, | 106 | lcd_bitmap_transparent_part, |
@@ -114,8 +116,7 @@ static const struct plugin_api rockbox_api = { | |||
114 | lcd_blit, | 116 | lcd_blit, |
115 | lcd_update, | 117 | lcd_update, |
116 | lcd_update_rect, | 118 | lcd_update_rect, |
117 | scrollbar, | 119 | gui_scrollbar_draw, |
118 | checkbox, | ||
119 | font_get, | 120 | font_get, |
120 | font_getstringsize, | 121 | font_getstringsize, |
121 | font_get_width, | 122 | font_get_width, |
@@ -467,9 +468,6 @@ static const struct plugin_api rockbox_api = { | |||
467 | #endif /* HAVE_RECORDING */ | 468 | #endif /* HAVE_RECORDING */ |
468 | #endif /* CONFIG_CODEC == SWCODEC */ | 469 | #endif /* CONFIG_CODEC == SWCODEC */ |
469 | 470 | ||
470 | #if LCD_DEPTH > 1 | ||
471 | lcd_set_backdrop, | ||
472 | #endif | ||
473 | 471 | ||
474 | #ifdef IRAM_STEAL | 472 | #ifdef IRAM_STEAL |
475 | plugin_iram_init, | 473 | plugin_iram_init, |
diff --git a/apps/plugin.h b/apps/plugin.h index 608009d549..339afe93a8 100644 --- a/apps/plugin.h +++ b/apps/plugin.h | |||
@@ -66,7 +66,7 @@ | |||
66 | #include "timer.h" | 66 | #include "timer.h" |
67 | #include "playlist.h" | 67 | #include "playlist.h" |
68 | #ifdef HAVE_LCD_BITMAP | 68 | #ifdef HAVE_LCD_BITMAP |
69 | #include "widgets.h" | 69 | #include "scrollbar.h" |
70 | #endif | 70 | #endif |
71 | #include "menu.h" | 71 | #include "menu.h" |
72 | #include "rbunicode.h" | 72 | #include "rbunicode.h" |
@@ -107,12 +107,12 @@ | |||
107 | #define PLUGIN_MAGIC 0x526F634B /* RocK */ | 107 | #define PLUGIN_MAGIC 0x526F634B /* RocK */ |
108 | 108 | ||
109 | /* increase this every time the api struct changes */ | 109 | /* increase this every time the api struct changes */ |
110 | #define PLUGIN_API_VERSION 36 | 110 | #define PLUGIN_API_VERSION 37 |
111 | 111 | ||
112 | /* update this to latest version if a change to the api struct breaks | 112 | /* update this to latest version if a change to the api struct breaks |
113 | backwards compatibility (and please take the opportunity to sort in any | 113 | backwards compatibility (and please take the opportunity to sort in any |
114 | new function which are "waiting" at the end of the function table) */ | 114 | new function which are "waiting" at the end of the function table) */ |
115 | #define PLUGIN_MIN_API_VERSION 34 | 115 | #define PLUGIN_MIN_API_VERSION 37 |
116 | 116 | ||
117 | /* plugin return codes */ | 117 | /* plugin return codes */ |
118 | enum plugin_status { | 118 | enum plugin_status { |
@@ -169,6 +169,7 @@ struct plugin_api { | |||
169 | int stride, int x, int y, int width, int height); | 169 | int stride, int x, int y, int width, int height); |
170 | void (*lcd_bitmap)(const fb_data *src, int x, int y, int width, | 170 | void (*lcd_bitmap)(const fb_data *src, int x, int y, int width, |
171 | int height); | 171 | int height); |
172 | void (*lcd_set_backdrop)(fb_data* backdrop); | ||
172 | #endif | 173 | #endif |
173 | #if LCD_DEPTH == 16 | 174 | #if LCD_DEPTH == 16 |
174 | void (*lcd_bitmap_transparent_part)(const fb_data *src, | 175 | void (*lcd_bitmap_transparent_part)(const fb_data *src, |
@@ -189,9 +190,10 @@ struct plugin_api { | |||
189 | int bheight, int stride); | 190 | int bheight, int stride); |
190 | void (*lcd_update)(void); | 191 | void (*lcd_update)(void); |
191 | void (*lcd_update_rect)(int x, int y, int width, int height); | 192 | void (*lcd_update_rect)(int x, int y, int width, int height); |
192 | void (*scrollbar)(int x, int y, int width, int height, int items, | 193 | void (*gui_scrollbar_draw)(struct screen * screen, int x, int y, |
193 | int min_shown, int max_shown, int orientation); | 194 | int width, int height, int items, |
194 | void (*checkbox)(int x, int y, int width, int height, bool checked); | 195 | int min_shown, int max_shown, |
196 | unsigned flags); | ||
195 | struct font* (*font_get)(int font); | 197 | struct font* (*font_get)(int font); |
196 | int (*font_getstringsize)(const unsigned char *str, int *w, int *h, | 198 | int (*font_getstringsize)(const unsigned char *str, int *w, int *h, |
197 | int fontnumber); | 199 | int fontnumber); |
@@ -579,9 +581,7 @@ struct plugin_api { | |||
579 | #endif /* HAVE_RECORDING */ | 581 | #endif /* HAVE_RECORDING */ |
580 | #endif /* CONFIG_CODEC == SWCODEC */ | 582 | #endif /* CONFIG_CODEC == SWCODEC */ |
581 | 583 | ||
582 | #if LCD_DEPTH > 1 | 584 | |
583 | void (*lcd_set_backdrop)(fb_data* backdrop); | ||
584 | #endif | ||
585 | 585 | ||
586 | #ifdef IRAM_STEAL | 586 | #ifdef IRAM_STEAL |
587 | void (*plugin_iram_init)(char *iramstart, char *iramcopy, size_t iram_size, | 587 | void (*plugin_iram_init)(char *iramstart, char *iramcopy, size_t iram_size, |
diff --git a/apps/plugins/clock.c b/apps/plugins/clock.c index 032344263a..6a1d306339 100644 --- a/apps/plugins/clock.c +++ b/apps/plugins/clock.c | |||
@@ -89,6 +89,7 @@ Original release, featuring analog / digital modes and a few options. | |||
89 | *****************************/ | 89 | *****************************/ |
90 | #include "plugin.h" | 90 | #include "plugin.h" |
91 | #include "time.h" | 91 | #include "time.h" |
92 | #include "checkbox.h" | ||
92 | #include <pluginbitmaps/clock_logo.h> | 93 | #include <pluginbitmaps/clock_logo.h> |
93 | 94 | ||
94 | PLUGIN_HEADER | 95 | PLUGIN_HEADER |
@@ -2386,7 +2387,7 @@ void draw_extras(int year, int day, int month, int hour, int minute, int second) | |||
2386 | rb->lcd_putsxy((LCDWIDTH/2)-(w/2), 5, buf); | 2387 | rb->lcd_putsxy((LCDWIDTH/2)-(w/2), 5, buf); |
2387 | } | 2388 | } |
2388 | else if(settings.digital[digital_seconds] == 2) /* Second progressbar */ | 2389 | else if(settings.digital[digital_seconds] == 2) /* Second progressbar */ |
2389 | rb->scrollbar(0, 0, LCD_WIDTH, 4, 60, 0, second, HORIZONTAL); | 2390 | rb->gui_scrollbar_draw(rb->screens[SCREEN_MAIN],0, 0, LCD_WIDTH, 4, 60, 0, second, HORIZONTAL); |
2390 | else if(settings.digital[digital_seconds] == 3) /* Invert the LCD as seconds pass */ | 2391 | else if(settings.digital[digital_seconds] == 3) /* Invert the LCD as seconds pass */ |
2391 | { | 2392 | { |
2392 | rb->lcd_set_drawmode(DRMODE_COMPLEMENT); | 2393 | rb->lcd_set_drawmode(DRMODE_COMPLEMENT); |
@@ -2417,7 +2418,7 @@ void draw_extras(int year, int day, int month, int hour, int minute, int second) | |||
2417 | } | 2418 | } |
2418 | else if(settings.lcd[lcd_seconds] == 2) /* Second progressbar */ | 2419 | else if(settings.lcd[lcd_seconds] == 2) /* Second progressbar */ |
2419 | { | 2420 | { |
2420 | rb->scrollbar(0, 0, LCD_WIDTH, 4, 60, 0, second, HORIZONTAL); | 2421 | rb->gui_scrollbar_draw(rb->screens[SCREEN_MAIN],0, 0, LCD_WIDTH, 4, 60, 0, second, HORIZONTAL); |
2421 | } | 2422 | } |
2422 | else if(settings.lcd[lcd_seconds] == 3) /* Invert the LCD as seconds pass */ | 2423 | else if(settings.lcd[lcd_seconds] == 3) /* Invert the LCD as seconds pass */ |
2423 | { | 2424 | { |
@@ -2727,8 +2728,8 @@ void counter_settings(void) | |||
2727 | rb->lcd_puts(0, 7, "OFF: Return"); | 2728 | rb->lcd_puts(0, 7, "OFF: Return"); |
2728 | 2729 | ||
2729 | /* tell user what mode is selected */ | 2730 | /* tell user what mode is selected */ |
2730 | rb->checkbox(1, 17, 8, 6, counting_up); | 2731 | checkbox(rb,1, 17, 8, 6, counting_up); |
2731 | rb->checkbox(1, 25, 8, 6, !counting_up); | 2732 | checkbox(rb,1, 25, 8, 6, !counting_up); |
2732 | 2733 | ||
2733 | switch(cursorpos) | 2734 | switch(cursorpos) |
2734 | { | 2735 | { |
diff --git a/apps/plugins/jpeg.c b/apps/plugins/jpeg.c index 81b5098a2a..878c94408e 100644 --- a/apps/plugins/jpeg.c +++ b/apps/plugins/jpeg.c | |||
@@ -2386,7 +2386,7 @@ void cb_progess(int current, int total) | |||
2386 | rb->yield(); /* be nice to the other threads */ | 2386 | rb->yield(); /* be nice to the other threads */ |
2387 | if(!running_slideshow) | 2387 | if(!running_slideshow) |
2388 | { | 2388 | { |
2389 | rb->scrollbar(0, LCD_HEIGHT-8, LCD_WIDTH, 8, total, 0, | 2389 | rb->gui_scrollbar_draw(rb->screens[SCREEN_MAIN],0, LCD_HEIGHT-8, LCD_WIDTH, 8, total, 0, |
2390 | current, HORIZONTAL); | 2390 | current, HORIZONTAL); |
2391 | rb->lcd_update_rect(0, LCD_HEIGHT-8, LCD_WIDTH, 8); | 2391 | rb->lcd_update_rect(0, LCD_HEIGHT-8, LCD_WIDTH, 8); |
2392 | } | 2392 | } |
@@ -2394,7 +2394,7 @@ void cb_progess(int current, int total) | |||
2394 | else | 2394 | else |
2395 | { | 2395 | { |
2396 | /* in slideshow mode, keep gui interference to a minimum */ | 2396 | /* in slideshow mode, keep gui interference to a minimum */ |
2397 | rb->scrollbar(0, LCD_HEIGHT-4, LCD_WIDTH, 4, total, 0, | 2397 | rb->gui_scrollbar_draw(rb->screens[SCREEN_MAIN],0, LCD_HEIGHT-4, LCD_WIDTH, 4, total, 0, |
2398 | current, HORIZONTAL); | 2398 | current, HORIZONTAL); |
2399 | rb->lcd_update_rect(0, LCD_HEIGHT-4, LCD_WIDTH, 4); | 2399 | rb->lcd_update_rect(0, LCD_HEIGHT-4, LCD_WIDTH, 4); |
2400 | } | 2400 | } |
diff --git a/apps/plugins/lib/SOURCES b/apps/plugins/lib/SOURCES index d57db3bbc8..7441a98182 100644 --- a/apps/plugins/lib/SOURCES +++ b/apps/plugins/lib/SOURCES | |||
@@ -18,6 +18,7 @@ playergfx.c | |||
18 | profile_plugin.c | 18 | profile_plugin.c |
19 | #endif | 19 | #endif |
20 | #ifdef HAVE_LCD_BITMAP | 20 | #ifdef HAVE_LCD_BITMAP |
21 | checkbox.c | ||
21 | xlcd_core.c | 22 | xlcd_core.c |
22 | xlcd_draw.c | 23 | xlcd_draw.c |
23 | xlcd_scroll.c | 24 | xlcd_scroll.c |
diff --git a/apps/plugins/splitedit.c b/apps/plugins/splitedit.c index fa5ff8e35f..3d422ecb6c 100644 --- a/apps/plugins/splitedit.c +++ b/apps/plugins/splitedit.c | |||
@@ -604,7 +604,8 @@ static int copy_file( | |||
604 | return -1; | 604 | return -1; |
605 | } | 605 | } |
606 | 606 | ||
607 | rb->scrollbar(0, prg_y, LCD_WIDTH, prg_h, bytes, 0, i, HORIZONTAL); | 607 | rb->gui_scrollbar_draw(&rb->screens[SCREEN_MAIN],0, prg_y, LCD_WIDTH, |
608 | prg_h, bytes, 0, i, HORIZONTAL); | ||
608 | rb->lcd_update_rect(0, prg_y, LCD_WIDTH, prg_h); | 609 | rb->lcd_update_rect(0, prg_y, LCD_WIDTH, prg_h); |
609 | } | 610 | } |
610 | 611 | ||
diff --git a/apps/plugins/video.c b/apps/plugins/video.c index e82ec1a84f..5891740bfa 100644 --- a/apps/plugins/video.c +++ b/apps/plugins/video.c | |||
@@ -27,7 +27,6 @@ | |||
27 | #include "plugin.h" | 27 | #include "plugin.h" |
28 | #include "sh7034.h" | 28 | #include "sh7034.h" |
29 | #include "system.h" | 29 | #include "system.h" |
30 | #include "../apps/recorder/widgets.h" /* not in search path, booh */ | ||
31 | 30 | ||
32 | #ifndef SIMULATOR /* not for simulator by now */ | 31 | #ifndef SIMULATOR /* not for simulator by now */ |
33 | #ifdef HAVE_LCD_BITMAP /* and definitely not for the Player, haha */ | 32 | #ifdef HAVE_LCD_BITMAP /* and definitely not for the Player, haha */ |
@@ -256,7 +255,8 @@ void DrawPosition(int pos, int total) | |||
256 | /* draw a slider over the rest of the line */ | 255 | /* draw a slider over the rest of the line */ |
257 | rb->lcd_getstringsize(gPrint, &w, &h); | 256 | rb->lcd_getstringsize(gPrint, &w, &h); |
258 | w++; | 257 | w++; |
259 | rb->scrollbar(w, LCD_HEIGHT-7, LCD_WIDTH-w, 7, total, 0, pos, HORIZONTAL); | 258 | rb->gui_scrollbar_draw(&rb->screens[SCREEN_MAIN],w, LCD_HEIGHT-7, LCD_WIDTH-w, |
259 | 7, total, 0, pos, HORIZONTAL); | ||
260 | 260 | ||
261 | if (gPlay.state == paused) /* we have to draw ourselves */ | 261 | if (gPlay.state == paused) /* we have to draw ourselves */ |
262 | rb->lcd_update_rect(0, LCD_HEIGHT-8, LCD_WIDTH, 8); | 262 | rb->lcd_update_rect(0, LCD_HEIGHT-8, LCD_WIDTH, 8); |
diff --git a/apps/plugins/viewer.c b/apps/plugins/viewer.c index af73257508..af795e736b 100644 --- a/apps/plugins/viewer.c +++ b/apps/plugins/viewer.c | |||
@@ -662,7 +662,8 @@ static void viewer_scrollbar(void) { | |||
662 | else | 662 | else |
663 | max_shown = min_shown + (next_screen_ptr - screen_top_ptr); | 663 | max_shown = min_shown + (next_screen_ptr - screen_top_ptr); |
664 | 664 | ||
665 | rb->scrollbar(0, 0, SCROLLBAR_WIDTH-1, LCD_HEIGHT, items, min_shown, max_shown, VERTICAL); | 665 | rb->gui_scrollbar_draw(rb->screens[SCREEN_MAIN],0, 0, SCROLLBAR_WIDTH-1, |
666 | LCD_HEIGHT, items, min_shown, max_shown, VERTICAL); | ||
666 | } | 667 | } |
667 | #endif | 668 | #endif |
668 | 669 | ||
diff --git a/apps/recorder/widgets.c b/apps/recorder/widgets.c deleted file mode 100644 index f06ac4402f..0000000000 --- a/apps/recorder/widgets.c +++ /dev/null | |||
@@ -1,54 +0,0 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2002 Markus Braun | ||
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 | #include <lcd.h> | ||
20 | #include <limits.h> | ||
21 | #include "scrollbar.h" | ||
22 | |||
23 | #ifdef HAVE_LCD_BITMAP | ||
24 | |||
25 | /* | ||
26 | * Print a scroll bar | ||
27 | */ | ||
28 | void scrollbar(int x, int y, int width, int height, int items, int min_shown, | ||
29 | int max_shown, int orientation) | ||
30 | { | ||
31 | gui_scrollbar_draw(&screens[SCREEN_MAIN],x,y,width,height, | ||
32 | items,min_shown, max_shown, orientation); | ||
33 | } | ||
34 | |||
35 | /* | ||
36 | * Print a checkbox | ||
37 | */ | ||
38 | void checkbox(int x, int y, int width, int height, bool checked) | ||
39 | { | ||
40 | /* draw box */ | ||
41 | lcd_drawrect(x, y, width, height); | ||
42 | |||
43 | /* clear inner area */ | ||
44 | lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); | ||
45 | lcd_fillrect(x + 1, y + 1, width - 2, height - 2); | ||
46 | lcd_set_drawmode(DRMODE_SOLID); | ||
47 | |||
48 | if (checked){ | ||
49 | lcd_drawline(x + 2, y + 2, x + width - 2 - 1 , y + height - 2 - 1); | ||
50 | lcd_drawline(x + 2, y + height - 2 - 1, x + width - 2 - 1, y + 2); | ||
51 | } | ||
52 | } | ||
53 | |||
54 | #endif | ||
diff --git a/apps/recorder/widgets.h b/apps/recorder/widgets.h deleted file mode 100644 index 0a028144e8..0000000000 --- a/apps/recorder/widgets.h +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2002 Markus Braun | ||
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 | #ifndef __WIDGETS_H__ | ||
20 | #define __WIDGETS_H__ | ||
21 | #include <lcd.h> | ||
22 | |||
23 | #ifdef HAVE_LCD_BITMAP | ||
24 | /* Orientation for scrollbar */ | ||
25 | enum { | ||
26 | VERTICAL = 0, | ||
27 | HORIZONTAL | ||
28 | }; | ||
29 | |||
30 | extern void scrollbar(int x, int y, int width, int height, int items, int min_shown, int max_shown, int orientation); | ||
31 | extern void checkbox(int x, int y, int width, int height, bool checked); | ||
32 | #endif /* HAVE_LCD_BITMAP */ | ||
33 | #endif /* __WIDGETS_H__ */ | ||
diff --git a/apps/screens.c b/apps/screens.c index 8b69fdfee2..835cf09a13 100644 --- a/apps/screens.c +++ b/apps/screens.c | |||
@@ -65,9 +65,6 @@ | |||
65 | #include <bitmaps/remote_usblogo.h> | 65 | #include <bitmaps/remote_usblogo.h> |
66 | #endif | 66 | #endif |
67 | 67 | ||
68 | #if defined(HAVE_LCD_BITMAP) | ||
69 | #include "widgets.h" | ||
70 | #endif | ||
71 | #ifdef HAVE_MMC | 68 | #ifdef HAVE_MMC |
72 | #include "ata_mmc.h" | 69 | #include "ata_mmc.h" |
73 | #endif | 70 | #endif |
diff --git a/apps/tree.c b/apps/tree.c index fea7b21529..24b5c2114c 100644 --- a/apps/tree.c +++ b/apps/tree.c | |||
@@ -79,9 +79,6 @@ | |||
79 | #include "textarea.h" | 79 | #include "textarea.h" |
80 | #include "action.h" | 80 | #include "action.h" |
81 | 81 | ||
82 | #ifdef HAVE_LCD_BITMAP | ||
83 | #include "widgets.h" | ||
84 | #endif | ||
85 | 82 | ||
86 | #if LCD_DEPTH > 1 | 83 | #if LCD_DEPTH > 1 |
87 | #include "backdrop.h" | 84 | #include "backdrop.h" |