1
0
Fork 0
forked from len0rd/rockbox

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
This commit is contained in:
Kevin Ferrare 2005-10-30 22:34:51 +00:00
parent fca6b63ef7
commit db8415c99e
11 changed files with 317 additions and 476 deletions

View file

@ -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 )