diff options
author | Thomas Martitz <kugel@rockbox.org> | 2009-08-16 22:20:11 +0000 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2009-08-16 22:20:11 +0000 |
commit | 4c48b59be8ba41b80350d5329d0f13240229da0a (patch) | |
tree | e8cb9547c4d8d5faff39de2aef5626a5cabc689d /apps/main.c | |
parent | c0897a8002d493244efd69fca5c433dbafe8d5be (diff) | |
download | rockbox-4c48b59be8ba41b80350d5329d0f13240229da0a.tar.gz rockbox-4c48b59be8ba41b80350d5329d0f13240229da0a.zip |
User definable UI viewport, to be able to restrict the UI into a viewport for all bitmap displays.
Flyspray: FS#8799
This will allow for pretty themes, for example those with nice glass effects on their backdrops (some might argue they're wasting screen space but it's upto them),
as well as allowing for future background WPS updates in the main UI.
Plugins are not converted yet, they simply use the full screen. Ideally, any plugin that does *not* want the UI viewport, should take care of that itself (i.e. plugins should normally use the UI viewport).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22365 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/main.c')
-rw-r--r-- | apps/main.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/apps/main.c b/apps/main.c index d0fba3fcce..49542e8b01 100644 --- a/apps/main.c +++ b/apps/main.c | |||
@@ -72,6 +72,7 @@ | |||
72 | #include "eeprom_settings.h" | 72 | #include "eeprom_settings.h" |
73 | #include "scrobbler.h" | 73 | #include "scrobbler.h" |
74 | #include "icon.h" | 74 | #include "icon.h" |
75 | #include "viewport.h" | ||
75 | 76 | ||
76 | #ifdef IPOD_ACCESSORY_PROTOCOL | 77 | #ifdef IPOD_ACCESSORY_PROTOCOL |
77 | #include "iap.h" | 78 | #include "iap.h" |
@@ -135,9 +136,8 @@ static void app_main(void) | |||
135 | screens[i].update(); | 136 | screens[i].update(); |
136 | } | 137 | } |
137 | tree_gui_init(); | 138 | tree_gui_init(); |
138 | viewportmanager_set_statusbar(VP_SB_ALLSCREENS); | 139 | gui_syncstatusbar_init(&statusbars); |
139 | add_event(GUI_EVENT_STATUSBAR_TOGGLE, false, | 140 | viewportmanager_init(); |
140 | viewportmanager_statusbar_changed); | ||
141 | #ifdef HAVE_USBSTACK | 141 | #ifdef HAVE_USBSTACK |
142 | /* All threads should be created and public queues registered by now */ | 142 | /* All threads should be created and public queues registered by now */ |
143 | usb_start_monitoring(); | 143 | usb_start_monitoring(); |
@@ -296,8 +296,6 @@ static void init(void) | |||
296 | #ifdef DEBUG | 296 | #ifdef DEBUG |
297 | debug_init(); | 297 | debug_init(); |
298 | #endif | 298 | #endif |
299 | /* Must be done before any code uses the multi-screen APi */ | ||
300 | gui_syncstatusbar_init(&statusbars); | ||
301 | storage_init(); | 299 | storage_init(); |
302 | settings_reset(); | 300 | settings_reset(); |
303 | settings_load(SETTINGS_ALL); | 301 | settings_load(SETTINGS_ALL); |
@@ -419,9 +417,6 @@ static void init(void) | |||
419 | radio_init(); | 417 | radio_init(); |
420 | #endif | 418 | #endif |
421 | 419 | ||
422 | /* Must be done before any code uses the multi-screen APi */ | ||
423 | gui_syncstatusbar_init(&statusbars); | ||
424 | |||
425 | #if CONFIG_CHARGING && (CONFIG_CPU == SH7034) | 420 | #if CONFIG_CHARGING && (CONFIG_CPU == SH7034) |
426 | /* charger_inserted() can't be used here because power_thread() | 421 | /* charger_inserted() can't be used here because power_thread() |
427 | hasn't checked power_input_status() yet */ | 422 | hasn't checked power_input_status() yet */ |