From 6288523cfee31a474435ce3445e67733f532d916 Mon Sep 17 00:00:00 2001 From: Jonathan Gordon Date: Sun, 19 Nov 2006 14:11:42 +0000 Subject: * Move checkbox to plugin api (core never uses it) * replace the last of the scrollbar() calls with gui_scrollbar_draw() git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11552 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/clock.c | 9 +++++---- apps/plugins/jpeg.c | 4 ++-- apps/plugins/lib/SOURCES | 1 + apps/plugins/splitedit.c | 3 ++- apps/plugins/video.c | 4 ++-- apps/plugins/viewer.c | 3 ++- 6 files changed, 14 insertions(+), 10 deletions(-) (limited to 'apps/plugins') 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. *****************************/ #include "plugin.h" #include "time.h" +#include "checkbox.h" #include PLUGIN_HEADER @@ -2386,7 +2387,7 @@ void draw_extras(int year, int day, int month, int hour, int minute, int second) rb->lcd_putsxy((LCDWIDTH/2)-(w/2), 5, buf); } else if(settings.digital[digital_seconds] == 2) /* Second progressbar */ - rb->scrollbar(0, 0, LCD_WIDTH, 4, 60, 0, second, HORIZONTAL); + rb->gui_scrollbar_draw(rb->screens[SCREEN_MAIN],0, 0, LCD_WIDTH, 4, 60, 0, second, HORIZONTAL); else if(settings.digital[digital_seconds] == 3) /* Invert the LCD as seconds pass */ { 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) } else if(settings.lcd[lcd_seconds] == 2) /* Second progressbar */ { - rb->scrollbar(0, 0, LCD_WIDTH, 4, 60, 0, second, HORIZONTAL); + rb->gui_scrollbar_draw(rb->screens[SCREEN_MAIN],0, 0, LCD_WIDTH, 4, 60, 0, second, HORIZONTAL); } else if(settings.lcd[lcd_seconds] == 3) /* Invert the LCD as seconds pass */ { @@ -2727,8 +2728,8 @@ void counter_settings(void) rb->lcd_puts(0, 7, "OFF: Return"); /* tell user what mode is selected */ - rb->checkbox(1, 17, 8, 6, counting_up); - rb->checkbox(1, 25, 8, 6, !counting_up); + checkbox(rb,1, 17, 8, 6, counting_up); + checkbox(rb,1, 25, 8, 6, !counting_up); switch(cursorpos) { 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) rb->yield(); /* be nice to the other threads */ if(!running_slideshow) { - rb->scrollbar(0, LCD_HEIGHT-8, LCD_WIDTH, 8, total, 0, + rb->gui_scrollbar_draw(rb->screens[SCREEN_MAIN],0, LCD_HEIGHT-8, LCD_WIDTH, 8, total, 0, current, HORIZONTAL); rb->lcd_update_rect(0, LCD_HEIGHT-8, LCD_WIDTH, 8); } @@ -2394,7 +2394,7 @@ void cb_progess(int current, int total) else { /* in slideshow mode, keep gui interference to a minimum */ - rb->scrollbar(0, LCD_HEIGHT-4, LCD_WIDTH, 4, total, 0, + rb->gui_scrollbar_draw(rb->screens[SCREEN_MAIN],0, LCD_HEIGHT-4, LCD_WIDTH, 4, total, 0, current, HORIZONTAL); rb->lcd_update_rect(0, LCD_HEIGHT-4, LCD_WIDTH, 4); } 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 profile_plugin.c #endif #ifdef HAVE_LCD_BITMAP +checkbox.c xlcd_core.c xlcd_draw.c 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( return -1; } - rb->scrollbar(0, prg_y, LCD_WIDTH, prg_h, bytes, 0, i, HORIZONTAL); + rb->gui_scrollbar_draw(&rb->screens[SCREEN_MAIN],0, prg_y, LCD_WIDTH, + prg_h, bytes, 0, i, HORIZONTAL); rb->lcd_update_rect(0, prg_y, LCD_WIDTH, prg_h); } 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 @@ #include "plugin.h" #include "sh7034.h" #include "system.h" -#include "../apps/recorder/widgets.h" /* not in search path, booh */ #ifndef SIMULATOR /* not for simulator by now */ #ifdef HAVE_LCD_BITMAP /* and definitely not for the Player, haha */ @@ -256,7 +255,8 @@ void DrawPosition(int pos, int total) /* draw a slider over the rest of the line */ rb->lcd_getstringsize(gPrint, &w, &h); w++; - rb->scrollbar(w, LCD_HEIGHT-7, LCD_WIDTH-w, 7, total, 0, pos, HORIZONTAL); + rb->gui_scrollbar_draw(&rb->screens[SCREEN_MAIN],w, LCD_HEIGHT-7, LCD_WIDTH-w, + 7, total, 0, pos, HORIZONTAL); if (gPlay.state == paused) /* we have to draw ourselves */ 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) { else max_shown = min_shown + (next_screen_ptr - screen_top_ptr); - rb->scrollbar(0, 0, SCROLLBAR_WIDTH-1, LCD_HEIGHT, items, min_shown, max_shown, VERTICAL); + rb->gui_scrollbar_draw(rb->screens[SCREEN_MAIN],0, 0, SCROLLBAR_WIDTH-1, + LCD_HEIGHT, items, min_shown, max_shown, VERTICAL); } #endif -- cgit v1.2.3