diff options
| author | Thomas Martitz <kugel@rockbox.org> | 2009-10-20 21:54:59 +0000 |
|---|---|---|
| committer | Thomas Martitz <kugel@rockbox.org> | 2009-10-20 21:54:59 +0000 |
| commit | d85c3ec41020a6c56b0d5d95a9ed790f57d73c6e (patch) | |
| tree | 2f51ed47fee689024ed8c145634044362c8ed7d5 /apps/plugin.h | |
| parent | 774bacc692b4d5c7b769bb88d24e182db9e4656f (diff) | |
| download | rockbox-d85c3ec41020a6c56b0d5d95a9ed790f57d73c6e.zip rockbox-d85c3ec41020a6c56b0d5d95a9ed790f57d73c6e.tar.gz rockbox-d85c3ec41020a6c56b0d5d95a9ed790f57d73c6e.tar.bz2 rockbox-d85c3ec41020a6c56b0d5d95a9ed790f57d73c6e.tar.xz | |
Convert lcd_activation callbacks to use the event system to allow for multiple parallel callbacks (for custom statusbar).
Increase maximum event count as we need more (I actually had a report about it during custom statusbar testing).
Removed corresponding functions from the core and plugin api. Bump min version and sort.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23302 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugin.h')
| -rw-r--r-- | apps/plugin.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/apps/plugin.h b/apps/plugin.h index 6ff7e7e..7ea1943 100644 --- a/apps/plugin.h +++ b/apps/plugin.h @@ -133,12 +133,12 @@ void* plugin_get_buffer(size_t *buffer_size); #define PLUGIN_MAGIC 0x526F634B /* RocK */ /* increase this every time the api struct changes */ -#define PLUGIN_API_VERSION 172 +#define PLUGIN_API_VERSION 173 /* update this to latest version if a change to the api struct breaks backwards compatibility (and please take the opportunity to sort in any new function which are "waiting" at the end of the function table) */ -#define PLUGIN_MIN_API_VERSION 172 +#define PLUGIN_MIN_API_VERSION 173 /* plugin return codes */ enum plugin_status { @@ -244,7 +244,6 @@ struct plugin_api { #endif #if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP) - void (*lcd_activation_set_hook)(void (*enable_hook)(void)); struct event_queue *button_queue; #endif unsigned short *(*bidi_l2v)( const unsigned char *str, int orientation ); @@ -367,6 +366,7 @@ struct plugin_api { int (*button_status)(void); #ifdef HAVE_BUTTON_DATA intptr_t (*button_get_data)(void); + int (*button_status_wdata)(int *pdata); #endif void (*button_clear_queue)(void); int (*button_queue_count)(void); @@ -500,6 +500,10 @@ struct plugin_api { void (*profile_func_enter)(void *this_fn, void *call_site); void (*profile_func_exit)(void *this_fn, void *call_site); #endif + /* event api */ + bool (*add_event)(unsigned short id, bool oneshot, void (*handler)(void *data)); + void (*remove_event)(unsigned short id, void (*handler)(void *data)); + void (*send_event)(unsigned short id, void *data); #ifdef SIMULATOR /* special simulator hooks */ @@ -837,10 +841,6 @@ struct plugin_api { const char *appsversion; /* new stuff at the end, sort into place next time the API gets incompatible */ - -#ifdef HAVE_BUTTON_DATA - int (*button_status_wdata)(int *pdata); -#endif }; /* plugin header */ |