summaryrefslogtreecommitdiffstats
path: root/apps/screen_access.h
diff options
context:
space:
mode:
authorKevin Ferrare <kevin@rockbox.org>2005-10-30 22:34:51 +0000
committerKevin Ferrare <kevin@rockbox.org>2005-10-30 22:34:51 +0000
commitdb8415c99e37b1ee2b152625d36e84cb9bbf690d (patch)
treebd4ff98ebf76d79221d0f511daae879c66e78a28 /apps/screen_access.h
parentfca6b63ef7310a36010d843f295e37ec368febf8 (diff)
downloadrockbox-db8415c99e37b1ee2b152625d36e84cb9bbf690d.tar.gz
rockbox-db8415c99e37b1ee2b152625d36e84cb9bbf690d.tar.bz2
rockbox-db8415c99e37b1ee2b152625d36e84cb9bbf690d.zip
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
Diffstat (limited to 'apps/screen_access.h')
-rw-r--r--apps/screen_access.h20
1 files changed, 18 insertions, 2 deletions
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 )