touchscreen: Update action system touch event reporting

Add a cleaner API for reporting touch events and deprecate the old
action_get_touchscreen_press() API. The old API is now emulated by
using the new one internally.

Change-Id: I001378e66f9c81806f134f011420d671954fcde2
This commit is contained in:
Aidan MacDonald 2022-04-23 15:32:32 +01:00 committed by Solomon Peachy
parent fa164f89e0
commit 9e254acab3
3 changed files with 100 additions and 67 deletions

View file

@ -42,6 +42,21 @@ enum touchscreen_mode
from button_get_data */
};
enum touchevent_type
{
TOUCHEVENT_NONE = 0,
TOUCHEVENT_PRESS,
TOUCHEVENT_CONTACT,
TOUCHEVENT_RELEASE,
};
struct touchevent
{
int type;
short x, y;
long tick;
};
extern struct touchscreen_parameter calibration_parameters;
extern const struct touchscreen_parameter default_calibration_parameters;
int touchscreen_calibrate(struct touchscreen_calibration *cal);