summaryrefslogtreecommitdiffstats
path: root/apps/gui/viewport.h
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2009-09-13 13:40:58 +0000
committerThomas Martitz <kugel@rockbox.org>2009-09-13 13:40:58 +0000
commitc0f1c49178b4c205e1c990ea2fb25a417305528c (patch)
tree637fdedd15f2119125cdaa257fbf7798e8687e74 /apps/gui/viewport.h
parent541dd6fda5ae93073a0b9c499f62af2cf46f3529 (diff)
downloadrockbox-c0f1c49178b4c205e1c990ea2fb25a417305528c.tar.gz
rockbox-c0f1c49178b4c205e1c990ea2fb25a417305528c.tar.bz2
rockbox-c0f1c49178b4c205e1c990ea2fb25a417305528c.zip
Get rid of some of the code duplication from checkwps, it still duplicates a lot though.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22695 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/viewport.h')
-rw-r--r--apps/gui/viewport.h44
1 files changed, 25 insertions, 19 deletions
diff --git a/apps/gui/viewport.h b/apps/gui/viewport.h
index d431766ab5..9cabc00468 100644
--- a/apps/gui/viewport.h
+++ b/apps/gui/viewport.h
@@ -66,6 +66,7 @@ void viewport_set_defaults(struct viewport *vp, enum screen_type screen);
#define VP_SB_IGNORE_SETTING(screen) BIT_N(4+screen)
#define VP_SB_ALLSCREENS (VP_SB_ONSCREEN(0)|VP_SB_ONSCREEN(1))
+#ifndef __PCTOOL__
/*
* Initialize the viewportmanager, which in turns initializes the UI vp and
* statusbar stuff
@@ -86,25 +87,6 @@ void viewport_set_fullscreen(struct viewport *vp, enum screen_type screen);
#ifdef HAVE_LCD_BITMAP
/*
- * Parse a viewport definition (vp_def), which looks like:
- *
- * Screens with depth > 1:
- * X|Y|width|height|font|foregorund color|background color
- * Screens with depth = 1:
- * X|Y|width|height|font
- *
- * | is a separator and can be specified via the parameter
- *
- * Returns the pointer to the char after the last character parsed
- * if everything went OK or NULL if an error happened (some values
- * not specified in the definition)
- */
-const char* viewport_parse_viewport(struct viewport *vp,
- enum screen_type screen,
- const char *vp_def,
- const char separator);
-
-/*
* Returns a pointer to the current viewport
* - That could be the UI vp, or a viewport passed to do_menu() or the like
*/
@@ -129,4 +111,28 @@ bool viewport_point_within_vp(const struct viewport *vp, int x, int y);
#define viewport_set_current_vp(a)
#define viewport_get_current_vp() NULL
#endif
+
+#endif /* __PCTOOL__ */
+
+#ifdef HAVE_LCD_BITMAP
+
+/*
+ * Parse a viewport definition (vp_def), which looks like:
+ *
+ * Screens with depth > 1:
+ * X|Y|width|height|font|foregorund color|background color
+ * Screens with depth = 1:
+ * X|Y|width|height|font
+ *
+ * | is a separator and can be specified via the parameter
+ *
+ * Returns the pointer to the char after the last character parsed
+ * if everything went OK or NULL if an error happened (some values
+ * not specified in the definition)
+ */
+const char* viewport_parse_viewport(struct viewport *vp,
+ enum screen_type screen,
+ const char *vp_def,
+ const char separator);
+#endif /* HAVE_LCD_BITMAP */
#endif /* __VIEWPORT_H__ */