summaryrefslogtreecommitdiff
path: root/apps/plugin.h
diff options
context:
space:
mode:
authorJörg Hohensohn <hohensoh@rockbox.org>2004-04-30 20:37:11 +0000
committerJörg Hohensohn <hohensoh@rockbox.org>2004-04-30 20:37:11 +0000
commit68002763a788e7b56904c658e73a78d4d7b1e6ab (patch)
treeee6d22c0572f38e78619813e20c4954e177ae002 /apps/plugin.h
parent7bd007a597a15cd5fcb4f9c7d20f4309e2cbe1e3 (diff)
downloadrockbox-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.h28
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) */
216int plugin_load(char* plugin, void* parameter); 237int plugin_load(char* plugin, void* parameter);
217void* plugin_get_buffer(int *buffer_size); 238void* plugin_get_buffer(int *buffer_size);
218void* plugin_get_mp3_buffer(int *buffer_size); 239void* plugin_get_mp3_buffer(int *buffer_size);
240int plugin_register_timer(int cycles, int prio, void (*timer_callback)(void));
241void plugin_unregister_timer(void);
242void plugin_tsr(void (*exit_callback)(void));
219 243
220/* defined by the plugin */ 244/* defined by the plugin */
221enum plugin_status plugin_start(struct plugin_api* rockbox, void* parameter) 245enum plugin_status plugin_start(struct plugin_api* rockbox, void* parameter)