diff options
author | Jonathan Gordon <rockbox@jdgordon.info> | 2009-04-20 01:41:56 +0000 |
---|---|---|
committer | Jonathan Gordon <rockbox@jdgordon.info> | 2009-04-20 01:41:56 +0000 |
commit | 0eb5dc649f34ca136d0160bf5d43961a2c3cea05 (patch) | |
tree | 5082fcd0d0479979a51891e082e742e2cf769266 /apps/gui/gwps.h | |
parent | 88b509b7d258c820f2eeda513524acbf76dcaaf5 (diff) | |
download | rockbox-0eb5dc649f34ca136d0160bf5d43961a2c3cea05.tar.gz rockbox-0eb5dc649f34ca136d0160bf5d43961a2c3cea05.zip |
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<timeout> <- used as a conditional to say if the touchscreen was touched in the last <timeout>, 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
Diffstat (limited to 'apps/gui/gwps.h')
-rw-r--r-- | apps/gui/gwps.h | 19 |
1 files changed, 19 insertions, 0 deletions
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 { | |||
88 | }; | 88 | }; |
89 | #endif | 89 | #endif |
90 | 90 | ||
91 | |||
92 | |||
91 | struct align_pos { | 93 | struct align_pos { |
92 | char* left; | 94 | char* left; |
93 | char* center; | 95 | char* center; |
@@ -297,6 +299,7 @@ enum wps_token_type { | |||
297 | 299 | ||
298 | /* buttons */ | 300 | /* buttons */ |
299 | WPS_TOKEN_BUTTON_VOLUME, | 301 | WPS_TOKEN_BUTTON_VOLUME, |
302 | WPS_TOKEN_LASTTOUCH, | ||
300 | 303 | ||
301 | /* Setting option */ | 304 | /* Setting option */ |
302 | WPS_TOKEN_SETTING, | 305 | WPS_TOKEN_SETTING, |
@@ -363,6 +366,17 @@ struct wps_viewport { | |||
363 | char label; | 366 | char label; |
364 | }; | 367 | }; |
365 | 368 | ||
369 | #ifdef HAVE_TOUCHSCREEN | ||
370 | struct touchregion { | ||
371 | struct wps_viewport* wvp;/* The viewport this region is in */ | ||
372 | short int x; /* x-pos */ | ||
373 | short int y; /* y-pos */ | ||
374 | short int width; /* width */ | ||
375 | short int height; /* height */ | ||
376 | int action; /* action this button will return */ | ||
377 | }; | ||
378 | #define MAX_TOUCHREGIONS 12 | ||
379 | #endif | ||
366 | /* wps_data | 380 | /* wps_data |
367 | this struct holds all necessary data which describes the | 381 | this struct holds all necessary data which describes the |
368 | viewable content of a wps */ | 382 | viewable content of a wps */ |
@@ -399,6 +413,11 @@ struct wps_data | |||
399 | bool full_line_progressbar; | 413 | bool full_line_progressbar; |
400 | #endif | 414 | #endif |
401 | 415 | ||
416 | #ifdef HAVE_TOUCHSCREEN | ||
417 | struct touchregion touchregion[MAX_TOUCHREGIONS]; | ||
418 | short touchregion_count; | ||
419 | #endif | ||
420 | |||
402 | #ifdef HAVE_REMOTE_LCD | 421 | #ifdef HAVE_REMOTE_LCD |
403 | bool remote_wps; | 422 | bool remote_wps; |
404 | #endif | 423 | #endif |