From 0eb5dc649f34ca136d0160bf5d43961a2c3cea05 Mon Sep 17 00:00:00 2001 From: Jonathan Gordon Date: Mon, 20 Apr 2009 01:41:56 +0000 Subject: beginings of a working touchscreen interface for the WPS. 2 new tags: %T|x|y|width|height|action| <- setup a region (relative to the current viewport) where if pressed the "action" will be done (currently play/stop/prev/next/menu/browse work, suggestions for others to add and better names welcome) %Tl <- used as a conditional to say if the touchscreen was touched in the last , use this to enable/disable button viewports or something... same syntax as other timeout tags cabbiev2 for the mr500 has been modified to demonstrate the new tags. press the pause/play button to pause playback. press the rockbox logo to get back to the menu. pretty icons needed to make this more usable :) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20753 a1c6a512-1295-4272-9138-f99709370657 --- apps/gui/gwps.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'apps/gui/gwps.h') diff --git a/apps/gui/gwps.h b/apps/gui/gwps.h index 1042e1a795..935e015c93 100644 --- a/apps/gui/gwps.h +++ b/apps/gui/gwps.h @@ -88,6 +88,8 @@ struct progressbar { }; #endif + + struct align_pos { char* left; char* center; @@ -297,6 +299,7 @@ enum wps_token_type { /* buttons */ WPS_TOKEN_BUTTON_VOLUME, + WPS_TOKEN_LASTTOUCH, /* Setting option */ WPS_TOKEN_SETTING, @@ -363,6 +366,17 @@ struct wps_viewport { char label; }; +#ifdef HAVE_TOUCHSCREEN +struct touchregion { + struct wps_viewport* wvp;/* The viewport this region is in */ + short int x; /* x-pos */ + short int y; /* y-pos */ + short int width; /* width */ + short int height; /* height */ + int action; /* action this button will return */ +}; +#define MAX_TOUCHREGIONS 12 +#endif /* wps_data this struct holds all necessary data which describes the viewable content of a wps */ @@ -399,6 +413,11 @@ struct wps_data bool full_line_progressbar; #endif +#ifdef HAVE_TOUCHSCREEN + struct touchregion touchregion[MAX_TOUCHREGIONS]; + short touchregion_count; +#endif + #ifdef HAVE_REMOTE_LCD bool remote_wps; #endif -- cgit v1.2.3