summaryrefslogtreecommitdiffstats
path: root/apps/gui/viewport.h
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2009-02-01 13:43:08 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2009-02-01 13:43:08 +0000
commit036fb05dfdfb98615bf4f8841b8f8b0a1bbfb8d1 (patch)
tree406697049f3b4f1176948b5eaf9d3cb2a30dd0ff /apps/gui/viewport.h
parentee8c479dff7f4eb208901dc1da38a79cbd588414 (diff)
downloadrockbox-036fb05dfdfb98615bf4f8841b8f8b0a1bbfb8d1.tar.gz
rockbox-036fb05dfdfb98615bf4f8841b8f8b0a1bbfb8d1.tar.bz2
rockbox-036fb05dfdfb98615bf4f8841b8f8b0a1bbfb8d1.zip
Accept a quick patch from Alexander Levin to neaten up the #defines and comments from my earlier commit
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19897 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/viewport.h')
-rw-r--r--apps/gui/viewport.h35
1 files changed, 24 insertions, 11 deletions
diff --git a/apps/gui/viewport.h b/apps/gui/viewport.h
index 02748527a4..9d5237bd28 100644
--- a/apps/gui/viewport.h
+++ b/apps/gui/viewport.h
@@ -41,19 +41,32 @@ int viewport_load_config(const char *config, struct viewport *vp);
void viewport_set_defaults(struct viewport *vp, enum screen_type screen);
-/* 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
+/* Used to specify which screens the statusbar (SB) should be displayed on.
+ *
+ * The parameter is a bit OR'ed combination of the following (screen is
+ * SCREEN_MAIN or SCREEN_REMOTE from screen_access.h):
+ *
+ * VP_SB_HIDE_ALL means "hide the SB on all screens"
+ * VP_SB_ONSCREEN(screen) means "display the SB on the given screen
+ * as specified by the SB setting for that screen"
+ * VP_SB_IGNORE_SETTING(screen) means "ignore the SB setting for that screen"
+ * VP_SB_ALLSCREENS means "VP_SB_ONSCREEN for all screens"
+ *
+ * In most cases, VP_SB_ALLSCREENS should be used which means display the SB
+ * as specified by the settings.
+ * For the WPS (and other possible exceptions) use VP_SB_IGNORE_SETTING() to
+ * FORCE the statusbar on for the given screen (i.e it will show regardless
+ * of the setting)
+ *
+ * Returns the status before the call. This value can be used to restore the
+ * SB "displaying rules".
*/
-#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);
+#define VP_SB_HIDE_ALL 0
+#define VP_SB_ONSCREEN(screen) (1<<screen)
+#define VP_SB_IGNORE_SETTING(screen) (1<<(4+screen))
+#define VP_SB_ALLSCREENS (VP_SB_ONSCREEN(0)|VP_SB_ONSCREEN(1))
+int viewportmanager_set_statusbar(int enabled);
/* callbacks for GUI_EVENT_* events */
void viewportmanager_draw_statusbars(void*data);
void viewportmanager_statusbar_changed(void* data);
-