summaryrefslogtreecommitdiff
path: root/apps/plugin.c
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2009-08-16 22:20:11 +0000
committerThomas Martitz <kugel@rockbox.org>2009-08-16 22:20:11 +0000
commit4c48b59be8ba41b80350d5329d0f13240229da0a (patch)
treee8cb9547c4d8d5faff39de2aef5626a5cabc689d /apps/plugin.c
parentc0897a8002d493244efd69fca5c433dbafe8d5be (diff)
downloadrockbox-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/plugin.c')
-rw-r--r--apps/plugin.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/apps/plugin.c b/apps/plugin.c
index 238a01c322..e9acc97824 100644
--- a/apps/plugin.c
+++ b/apps/plugin.c
@@ -673,10 +673,10 @@ static const struct plugin_api rockbox_api = {
673 673
674int plugin_load(const char* plugin, const void* parameter) 674int plugin_load(const char* plugin, const void* parameter)
675{ 675{
676 int rc; 676 int rc, i;
677 int i;
678 int oldbars; 677 int oldbars;
679 struct plugin_header *hdr; 678 struct plugin_header *hdr;
679 struct viewport plugin_vp[NB_SCREENS];
680#ifdef SIMULATOR 680#ifdef SIMULATOR
681 void *pd; 681 void *pd;
682#else /* !SIMULATOR */ 682#else /* !SIMULATOR */
@@ -781,8 +781,14 @@ int plugin_load(const char* plugin, const void* parameter)
781 lcd_remote_update(); 781 lcd_remote_update();
782#endif 782#endif
783 783
784 cpucache_invalidate();
785 oldbars = viewportmanager_set_statusbar(VP_SB_HIDE_ALL); 784 oldbars = viewportmanager_set_statusbar(VP_SB_HIDE_ALL);
785
786 FOR_NB_SCREENS(i)
787 viewport_set_fullscreen(&plugin_vp[i], i);
788
789 viewport_set_current_vp(plugin_vp);
790
791 cpucache_invalidate();
786 792
787#ifdef HAVE_TOUCHSCREEN 793#ifdef HAVE_TOUCHSCREEN
788 touchscreen_set_mode(TOUCHSCREEN_BUTTON); 794 touchscreen_set_mode(TOUCHSCREEN_BUTTON);
@@ -826,14 +832,11 @@ int plugin_load(const char* plugin, const void* parameter)
826 832
827 if (rc != PLUGIN_GOTO_WPS) 833 if (rc != PLUGIN_GOTO_WPS)
828 { 834 {
829 FOR_NB_SCREENS(i) 835 send_event(GUI_EVENT_REFRESH, NULL);
830 {
831 screens[i].clear_display();
832 screens[i].update();
833 }
834 } 836 }
835 837
836 viewportmanager_set_statusbar(oldbars); 838 viewportmanager_set_statusbar(oldbars);
839 viewport_set_current_vp(NULL);
837 if (pfn_tsr_exit == NULL) 840 if (pfn_tsr_exit == NULL)
838 plugin_loaded = false; 841 plugin_loaded = false;
839 842