1
0
Fork 0
forked from len0rd/rockbox

FS#10824 - viewport/statusbar API rework.

Hopefully the only user visible changes are:
- fm and recording screens go by the statusbar setting (sbs or inbuilt)
- plugins go back to using the theme as they should for menus and lists
- splash screens might get cut a bit... entirely theme and splash dependant.. if there is a problematic one we can look at it later.
- hopefully nothing more than very minor screen flickerings... let me know exactly where they are so they can be fixed

New GUI screen rules:
* Screens assume that the theme (sbs+ui viewport+ maybe background image) are always enabled. They may be disabled on a per display basis, but MUST be re-enabled on exit
* Screens must not be coded in a way that requires a statusbar of any type.. the inbuilt bar will be removed shortly.
ALWAYS RESPECT THE USERS SETTINGS unless the screen requires the full display to fit.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23904 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Jonathan Gordon 2009-12-09 07:25:46 +00:00
parent 85aad9b397
commit b2eb44ce0e
24 changed files with 292 additions and 426 deletions

View file

@ -150,7 +150,7 @@ static void usb_screen_fix_viewports(struct screen *screen,
viewport_set_defaults(parent, screen->screen_type);
if (parent->width < logo_width || parent->height < logo_height)
viewport_set_fullscreen(parent, screen->screen_type);
viewportmanager_theme_enable(screen->screen_type, false, parent);
*logo = *parent;
logo->x = parent->x + parent->width - logo_width;
@ -180,8 +180,6 @@ static void usb_screen_fix_viewports(struct screen *screen,
static void usb_screens_draw(struct usb_screen_vps_t *usb_screen_vps_ar)
{
int i;
int usb_bars = VP_SB_ALLSCREENS; /* force statusbars */
lcd_clear_display();
#ifdef HAVE_LCD_REMOTE
lcd_remote_clear_display();
@ -236,18 +234,12 @@ static void usb_screens_draw(struct usb_screen_vps_t *usb_screen_vps_ar)
screen->update_viewport();
screen->set_viewport(NULL);
/* force statusbar by ignoring the setting */
usb_bars |= VP_SB_IGNORE_SETTING(i);
}
viewportmanager_set_statusbar(usb_bars);
}
void gui_usb_screen_run(void)
{
int i;
int old_bars = viewportmanager_get_statusbar();
struct usb_screen_vps_t usb_screen_vps_ar[NB_SCREENS];
#if defined HAVE_TOUCHSCREEN
enum touchscreen_mode old_mode = touchscreen_get_mode();
@ -319,9 +311,8 @@ void gui_usb_screen_run(void)
FOR_NB_SCREENS(i)
{
screens[i].backlight_on();
viewportmanager_theme_undo(i);
}
viewportmanager_set_statusbar(old_bars);
send_event(GUI_EVENT_REFRESH, NULL);
}
#endif /* !defined(USB_NONE) */