summaryrefslogtreecommitdiffstats
path: root/apps/gui/viewport.h
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2009-09-05 23:57:09 +0000
committerThomas Martitz <kugel@rockbox.org>2009-09-05 23:57:09 +0000
commitc17037a80266e9e97643e8c34459f3ac81510be0 (patch)
treea28fa4f0bb9339cdd6d900276e4694f8be5a02ee /apps/gui/viewport.h
parenta17d06ccc3b589cfc5eb92edbea3c09494b1ed48 (diff)
downloadrockbox-c17037a80266e9e97643e8c34459f3ac81510be0.tar.gz
rockbox-c17037a80266e9e97643e8c34459f3ac81510be0.tar.bz2
rockbox-c17037a80266e9e97643e8c34459f3ac81510be0.zip
Factor out/generalise the function that checks whether a point is within a viewport to, and use it in the wps' touchregion code. This corrects the check that was done there.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22638 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/viewport.h')
-rw-r--r--apps/gui/viewport.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/gui/viewport.h b/apps/gui/viewport.h
index 2ed138b365..93b5c70fc3 100644
--- a/apps/gui/viewport.h
+++ b/apps/gui/viewport.h
@@ -116,6 +116,10 @@ struct viewport* viewport_get_current_vp(void);
*/
void viewport_set_current_vp(struct viewport* vp);
+#ifdef HAVE_TOUCHSCREEN
+bool viewport_point_within_vp(const struct viewport *vp, int x, int y);
+#endif
+
#else /* HAVE_LCD_CHARCELL */
#define viewport_set_current_vp(a)
#define viewport_get_current_vp() NULL