diff options
author | Jörg Hohensohn <hohensoh@rockbox.org> | 2004-04-30 20:37:11 +0000 |
---|---|---|
committer | Jörg Hohensohn <hohensoh@rockbox.org> | 2004-04-30 20:37:11 +0000 |
commit | 68002763a788e7b56904c658e73a78d4d7b1e6ab (patch) | |
tree | ee6d22c0572f38e78619813e20c4954e177ae002 /apps/plugin.h | |
parent | 7bd007a597a15cd5fcb4f9c7d20f4309e2cbe1e3 (diff) | |
download | rockbox-68002763a788e7b56904c658e73a78d4d7b1e6ab.tar.gz rockbox-68002763a788e7b56904c658e73a78d4d7b1e6ab.zip |
new plugin features for stuff I'm working on: user timer, TSR, threads, contrast, playback control
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4563 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugin.h')
-rw-r--r-- | apps/plugin.h | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/apps/plugin.h b/apps/plugin.h index 720e4b20f3..2da469f004 100644 --- a/apps/plugin.h +++ b/apps/plugin.h | |||
@@ -43,9 +43,10 @@ | |||
43 | #include "mpeg.h" | 43 | #include "mpeg.h" |
44 | #include "mp3_playback.h" | 44 | #include "mp3_playback.h" |
45 | #include "settings.h" | 45 | #include "settings.h" |
46 | #include "thread.h" | ||
46 | 47 | ||
47 | /* increase this every time the api struct changes */ | 48 | /* increase this every time the api struct changes */ |
48 | #define PLUGIN_API_VERSION 11 | 49 | #define PLUGIN_API_VERSION 12 |
49 | 50 | ||
50 | /* update this to latest version if a change to the api struct breaks | 51 | /* update this to latest version if a change to the api struct breaks |
51 | backwards compatibility (and please take the opportunity to sort in any | 52 | backwards compatibility (and please take the opportunity to sort in any |
@@ -195,7 +196,7 @@ struct plugin_api { | |||
195 | void* (*plugin_get_mp3_buffer)(int* buffer_size); | 196 | void* (*plugin_get_mp3_buffer)(int* buffer_size); |
196 | void (*mpeg_sound_set)(int setting, int value); | 197 | void (*mpeg_sound_set)(int setting, int value); |
197 | #ifndef SIMULATOR | 198 | #ifndef SIMULATOR |
198 | void (*mp3_play_init)(void); | 199 | void (*mp3_play_init)(void); /* FIXME: remove this next time we break compatibility */ |
199 | void (*mp3_play_data)(unsigned char* start, int size, void (*get_more)(unsigned char** start, int* size)); | 200 | void (*mp3_play_data)(unsigned char* start, int size, void (*get_more)(unsigned char** start, int* size)); |
200 | void (*mp3_play_pause)(bool play); | 201 | void (*mp3_play_pause)(bool play); |
201 | void (*mp3_play_stop)(void); | 202 | void (*mp3_play_stop)(void); |
@@ -210,12 +211,35 @@ struct plugin_api { | |||
210 | #ifdef HAVE_LCD_BITMAP | 211 | #ifdef HAVE_LCD_BITMAP |
211 | void (*checkbox)(int x, int y, int width, int height, bool checked); | 212 | void (*checkbox)(int x, int y, int width, int height, bool checked); |
212 | #endif | 213 | #endif |
214 | #ifndef SIMULATOR | ||
215 | int (*plugin_register_timer)(int cycles, int prio, void (*timer_callback)(void)); | ||
216 | void (*plugin_unregister_timer)(void); | ||
217 | #endif | ||
218 | void (*plugin_tsr)(void (*exit_callback)(void)); | ||
219 | int (*create_thread)(void* function, void* stack, int stack_size, char *name); | ||
220 | void (*remove_tread)(void); | ||
221 | void (*lcd_set_contrast)(int x); | ||
222 | |||
223 | /* playback control */ | ||
224 | void (*mpeg_play)(int offset); | ||
225 | void (*mpeg_stop)(void); | ||
226 | void (*mpeg_pause)(void); | ||
227 | void (*mpeg_resume)(void); | ||
228 | void (*mpeg_next)(void); | ||
229 | void (*mpeg_prev)(void); | ||
230 | void (*mpeg_ff_rewind)(int newtime); | ||
231 | struct mp3entry* (*mpeg_next_track)(void); | ||
232 | bool (*mpeg_has_changed_track)(void); | ||
233 | int (*mpeg_status)(void); | ||
213 | }; | 234 | }; |
214 | 235 | ||
215 | /* defined by the plugin loader (plugin.c) */ | 236 | /* defined by the plugin loader (plugin.c) */ |
216 | int plugin_load(char* plugin, void* parameter); | 237 | int plugin_load(char* plugin, void* parameter); |
217 | void* plugin_get_buffer(int *buffer_size); | 238 | void* plugin_get_buffer(int *buffer_size); |
218 | void* plugin_get_mp3_buffer(int *buffer_size); | 239 | void* plugin_get_mp3_buffer(int *buffer_size); |
240 | int plugin_register_timer(int cycles, int prio, void (*timer_callback)(void)); | ||
241 | void plugin_unregister_timer(void); | ||
242 | void plugin_tsr(void (*exit_callback)(void)); | ||
219 | 243 | ||
220 | /* defined by the plugin */ | 244 | /* defined by the plugin */ |
221 | enum plugin_status plugin_start(struct plugin_api* rockbox, void* parameter) | 245 | enum plugin_status plugin_start(struct plugin_api* rockbox, void* parameter) |