mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-07 05:35:02 -05:00
plugins: Add touch API to plugin API and revamp touchscreen test
Change-Id: Iefb658693b03e0cda43e2a9fc93086485e790b4e
This commit is contained in:
parent
8aae723853
commit
e2363b0e2c
3 changed files with 304 additions and 96 deletions
|
|
@ -74,6 +74,7 @@ int plugin_open(const char *plugin, const char *parameter);
|
|||
#include "thread.h"
|
||||
#include "button.h"
|
||||
#include "action.h"
|
||||
#include "gesture.h"
|
||||
#include "load_code.h"
|
||||
#include "usb.h"
|
||||
#include "font.h"
|
||||
|
|
@ -997,6 +998,24 @@ struct plugin_api {
|
|||
#ifdef USB_ENABLE_AUDIO
|
||||
bool (*usb_audio_get_playing)(void);
|
||||
#endif
|
||||
#ifdef HAVE_TOUCHSCREEN
|
||||
int (*action_get_touch_event)(struct touchevent *ev);
|
||||
void (*action_gesture_reset)(void);
|
||||
bool (*action_gesture_get_event_in_vp)(struct gesture_event *gevt,
|
||||
const struct viewport *vp);
|
||||
bool (*action_gesture_get_event)(struct gesture_event *gevt);
|
||||
bool (*action_gesture_is_valid)(void);
|
||||
bool (*action_gesture_is_pressed)(void);
|
||||
void (*gesture_reset)(struct gesture *g);
|
||||
void (*gesture_process)(struct gesture *g, const struct touchevent *ev);
|
||||
bool (*gesture_get_event_in_vp)(struct gesture *g,
|
||||
struct gesture_event *gevt,
|
||||
const struct viewport *vp);
|
||||
void (*gesture_vel_reset)(struct gesture_vel *gv);
|
||||
void (*gesture_vel_process)(struct gesture_vel *gv,
|
||||
const struct touchevent *ev);
|
||||
bool (*gesture_vel_get)(struct gesture_vel *gv, int *xvel, int *yvel);
|
||||
#endif
|
||||
};
|
||||
|
||||
/* plugin header */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue