path: root/apps/gui/viewport.h
diff options
authorJonathan Gordon <>2009-02-01 11:34:16 +0000
committerJonathan Gordon <>2009-02-01 11:34:16 +0000
commit80cb3551eb61cdf240cf24ad0c44016475bf2e61 (patch)
treee9c72c90954b73807d64df59fefcdf0b1c1fc615 /apps/gui/viewport.h
parente55f2329c059434452c62af48903b4607e500e4e (diff)
Statusbar handling fixes.
Fixes FS#9845 - %we/%wd wasnt working WPS no longer resets the viewportmanger more than needed (was doing it twice/draw before) screens can now enable/disable the statusbar easily ignoring the setting instead of needing special handling (fix for the radio screen coming soon) minor glitch introduced in this commit... the statusbar in the WPS might disappear for a fraction of a second when it is entered, I need to track this down... git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/viewport.h')
1 files changed, 12 insertions, 1 deletions
diff --git a/apps/gui/viewport.h b/apps/gui/viewport.h
index 53f522347f..02748527a4 100644
--- a/apps/gui/viewport.h
+++ b/apps/gui/viewport.h
@@ -41,7 +41,18 @@ int viewport_load_config(const char *config, struct viewport *vp);
void viewport_set_defaults(struct viewport *vp, enum screen_type screen);
-bool viewportmanager_set_statusbar(bool enabled);
+/* viewportmanager_set_statusbar() is used to specify which screens the statusbar
+ * should be displayed on.
+ * *usually* enabled will be VP_ALLSCREENS which means display the bar if the setting
+ * is enabled. (and it will be on both screens)
+ * For the WPS (and other possible exceptions) use VP_IGNORE_SB_SETTING() to
+ * FORCE the statusbar on for the given screen (i.e it will show regardless of the setting
+ */
+#define VP_SB_ONSCREEN(screen) (1<<screen) /* turn the SB on "screen" only */
+#define VP_ALLSCREENS (VP_SB_ONSCREEN(0)|VP_SB_ONSCREEN(1)) /* SB on for both screens */
+#define VP_IGNORE_SB_SETTING(screen) (1<<(4+screen))
+char viewportmanager_set_statusbar(char enabled);
/* callbacks for GUI_EVENT_* events */
void viewportmanager_draw_statusbars(void*data);
void viewportmanager_statusbar_changed(void* data);