summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorDave Chapman <dave@dchapman.com>2006-09-26 19:25:52 +0000
committerDave Chapman <dave@dchapman.com>2006-09-26 19:25:52 +0000
commit491458e418ba443b42167b6fc4c4933d72883f47 (patch)
treeb02968aa4860bf3011ae0f6baa378fdc21af0a70 /apps
parent181dab41379e743a87319a975385f6caa3521230 (diff)
downloadrockbox-491458e418ba443b42167b6fc4c4933d72883f47.tar.gz
rockbox-491458e418ba443b42167b6fc4c4933d72883f47.zip
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
Diffstat (limited to 'apps')
-rw-r--r--apps/plugin.c4
-rw-r--r--apps/plugin.h7
2 files changed, 10 insertions, 1 deletions
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 = {
468 the API gets incompatible */ 468 the API gets incompatible */
469 469
470 strtok_r, 470 strtok_r,
471#ifdef HAVE_WHEEL_POSITION
472 wheel_status,
473 wheel_send_events,
474#endif
471}; 475};
472 476
473int plugin_load(const char* plugin, void* parameter) 477int 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 @@
105#define PLUGIN_MAGIC 0x526F634B /* RocK */ 105#define PLUGIN_MAGIC 0x526F634B /* RocK */
106 106
107/* increase this every time the api struct changes */ 107/* increase this every time the api struct changes */
108#define PLUGIN_API_VERSION 31 108#define PLUGIN_API_VERSION 32
109 109
110/* update this to latest version if a change to the api struct breaks 110/* update this to latest version if a change to the api struct breaks
111 backwards compatibility (and please take the opportunity to sort in any 111 backwards compatibility (and please take the opportunity to sort in any
@@ -547,6 +547,11 @@ struct plugin_api {
547 the API gets incompatible */ 547 the API gets incompatible */
548 548
549 char* (*strtok_r)(char *ptr, const char *sep, char **end); 549 char* (*strtok_r)(char *ptr, const char *sep, char **end);
550
551#ifdef HAVE_WHEEL_POSITION
552 int (*wheel_status)(void);
553 void (*wheel_send_events)(bool send);
554#endif
550}; 555};
551 556
552/* plugin header */ 557/* plugin header */