From db8415c99e37b1ee2b152625d36e84cb9bbf690d Mon Sep 17 00:00:00 2001 From: Kevin Ferrare Date: Sun, 30 Oct 2005 22:34:51 +0000 Subject: Partial menus support on remote (only browsing is working, changing option isn't), corrected a bug in gui_list about scrollbar beeing displayed sometimes when it musn't git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7693 a1c6a512-1295-4272-9138-f99709370657 --- apps/screen_access.h | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'apps/screen_access.h') diff --git a/apps/screen_access.h b/apps/screen_access.h index a6190b1956..0a5452c580 100644 --- a/apps/screen_access.h +++ b/apps/screen_access.h @@ -49,6 +49,10 @@ struct screen int depth; int char_width; int char_height; +#ifdef HAS_BUTTONBAR + bool has_buttonbar; +#endif + #ifdef HAVE_LCD_BITMAP void (*setmargins)(int x, int y); @@ -109,6 +113,16 @@ extern void screen_init(struct screen * screen, enum screen_type screen_type); */ extern void screen_update_nblines(struct screen * screen); +#ifdef HAS_BUTTONBAR +/* + * Sets if the given screen has a buttonbar or not + * - screen : the screen structure + * - has : a boolean telling wether the current screen will have a buttonbar or not + */ +#define screen_has_buttonbar(screen, has_btnb) \ + (screen)->has_buttonbar=has_btnb; +#endif + #ifdef HAVE_LCD_BITMAP /* * Compute the number of pixels from which text can be displayed @@ -116,7 +130,7 @@ extern void screen_update_nblines(struct screen * screen); * Returns the number of pixels */ #define screen_get_text_y_start(screen) \ - (global_settings.statusbar?STATUSBAR_HEIGHT:0) + ( (global_settings.statusbar)? STATUSBAR_HEIGHT : 0) /* * Compute the number of pixels below which text can't be displayed @@ -125,7 +139,9 @@ extern void screen_update_nblines(struct screen * screen); */ #ifdef HAS_BUTTONBAR #define screen_get_text_y_end(screen) \ - ( (screen)->height - (global_settings.buttonbar?BUTTONBAR_HEIGHT:0) ) + ( (screen)->height - ( (global_settings.buttonbar && \ + (screen)->has_buttonbar)? \ + BUTTONBAR_HEIGHT : 0) ) #else #define screen_get_text_y_end(screen) \ ( (screen)->height ) -- cgit