forked from len0rd/rockbox
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
This commit is contained in:
parent
88b509b7d2
commit
0eb5dc649f
8 changed files with 215 additions and 8 deletions
|
|
@ -36,6 +36,7 @@ static intptr_t button_data; /* data value from last message dequeued */
|
|||
#ifdef HAVE_TOUCHSCREEN
|
||||
#include "touchscreen.h"
|
||||
static int mouse_coords = 0;
|
||||
static int last_touchscreen_touch = 0xffff;
|
||||
#endif
|
||||
/* how long until repeat kicks in */
|
||||
#define REPEAT_START 6
|
||||
|
|
@ -1310,11 +1311,16 @@ void mouse_tick_task(void)
|
|||
}
|
||||
|
||||
mouse_coords = (x<<16)|y;
|
||||
last_touchscreen_touch = current_tick;
|
||||
button_event(BUTTON_TOUCHSCREEN, true);
|
||||
if (debug_wps)
|
||||
printf("Mouse at: (%d, %d)\n", x, y);
|
||||
}
|
||||
}
|
||||
int touchscreen_last_touch(void)
|
||||
{
|
||||
return last_touchscreen_touch;
|
||||
}
|
||||
#endif
|
||||
void button_init(void)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue