From 491458e418ba443b42167b6fc4c4933d72883f47 Mon Sep 17 00:00:00 2001 From: Dave Chapman Date: Tue, 26 Sep 2006 19:25:52 +0000 Subject: Add wheel_status() function to the ipod "4g" button driver (i.e. all ipods excluding the 3G and 1st gen mini) to read the absolute position the wheel is being touched (0..95 - clockwise from top, or -1 for untouched), plus the wheel_send_events(bool) function to disable/enable sending normal scrolling events - based on patch #4721 from Mikael Magnusson. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11068 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugin.c | 4 ++++ apps/plugin.h | 7 ++++++- 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'apps') diff --git a/apps/plugin.c b/apps/plugin.c index 04a4d1c735..a908016703 100644 --- a/apps/plugin.c +++ b/apps/plugin.c @@ -468,6 +468,10 @@ static const struct plugin_api rockbox_api = { the API gets incompatible */ strtok_r, +#ifdef HAVE_WHEEL_POSITION + wheel_status, + wheel_send_events, +#endif }; int plugin_load(const char* plugin, void* parameter) diff --git a/apps/plugin.h b/apps/plugin.h index b0221c489d..25bbeb2324 100644 --- a/apps/plugin.h +++ b/apps/plugin.h @@ -105,7 +105,7 @@ #define PLUGIN_MAGIC 0x526F634B /* RocK */ /* increase this every time the api struct changes */ -#define PLUGIN_API_VERSION 31 +#define PLUGIN_API_VERSION 32 /* update this to latest version if a change to the api struct breaks backwards compatibility (and please take the opportunity to sort in any @@ -547,6 +547,11 @@ struct plugin_api { the API gets incompatible */ char* (*strtok_r)(char *ptr, const char *sep, char **end); + +#ifdef HAVE_WHEEL_POSITION + int (*wheel_status)(void); + void (*wheel_send_events)(bool send); +#endif }; /* plugin header */ -- cgit v1.2.3