summaryrefslogtreecommitdiff
path: root/apps/action.h
diff options
context:
space:
mode:
Diffstat (limited to 'apps/action.h')
-rw-r--r--apps/action.h24
1 files changed, 19 insertions, 5 deletions
diff --git a/apps/action.h b/apps/action.h
index 24250ef869..8d8e8f50fd 100644
--- a/apps/action.h
+++ b/apps/action.h
@@ -22,6 +22,7 @@
22 22
23#include "stdbool.h" 23#include "stdbool.h"
24#include "button.h" 24#include "button.h"
25#include "viewport.h"
25 26
26#define TIMEOUT_BLOCK -1 27#define TIMEOUT_BLOCK -1
27#define TIMEOUT_NOBLOCK 0 28#define TIMEOUT_NOBLOCK 0
@@ -327,12 +328,25 @@ int get_action_statuscode(int *button);
327intptr_t get_action_data(void); 328intptr_t get_action_data(void);
328 329
329#ifdef HAVE_TOUCHSCREEN 330#ifdef HAVE_TOUCHSCREEN
330/* return BUTTON_NONE on error 331/* return BUTTON_NONE on error
331 BUTTON_REPEAT if repeated press 332 * BUTTON_REPEAT if repeated press
332 BUTTON_REL if its a short press 333 * BUTTON_REPEAT|BUTTON_REL if release after repeated press
333 BUTTON_TOUCHSCREEN otherwise 334 * BUTTON_REL if its a short press = release after press
334*/ 335 * BUTTON_TOUCHSCREEN if press
336 */
335int action_get_touchscreen_press(short *x, short *y); 337int action_get_touchscreen_press(short *x, short *y);
338
339/*
340 * wrapper action_get_touchscreen_press()
341 * to filter the touchscreen coordinates through a viewport
342 *
343 * returns the action and x1, y1 relative to the viewport if
344 * the press was within the viewport,
345 * ACTION_UNKNOWN (and x1, y1 untouched) if the press was outside
346 * BUTTON_NONE else
347 *
348 **/
349int action_get_touchscreen_press_in_vp(short *x1, short *y1, struct viewport *vp);
336#endif 350#endif
337 351
338/* Don't let get_action*() return any ACTION_* values untill the current buttons 352/* Don't let get_action*() return any ACTION_* values untill the current buttons