summaryrefslogtreecommitdiff
path: root/apps/plugin.h
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugin.h')
-rw-r--r--apps/plugin.h40
1 files changed, 18 insertions, 22 deletions
diff --git a/apps/plugin.h b/apps/plugin.h
index 29e7f5d318..a95d80b7aa 100644
--- a/apps/plugin.h
+++ b/apps/plugin.h
@@ -115,12 +115,12 @@
115#define PLUGIN_MAGIC 0x526F634B /* RocK */ 115#define PLUGIN_MAGIC 0x526F634B /* RocK */
116 116
117/* increase this every time the api struct changes */ 117/* increase this every time the api struct changes */
118#define PLUGIN_API_VERSION 59 118#define PLUGIN_API_VERSION 60
119 119
120/* update this to latest version if a change to the api struct breaks 120/* update this to latest version if a change to the api struct breaks
121 backwards compatibility (and please take the opportunity to sort in any 121 backwards compatibility (and please take the opportunity to sort in any
122 new function which are "waiting" at the end of the function table) */ 122 new function which are "waiting" at the end of the function table) */
123#define PLUGIN_MIN_API_VERSION 58 123#define PLUGIN_MIN_API_VERSION 60
124 124
125/* plugin return codes */ 125/* plugin return codes */
126enum plugin_status { 126enum plugin_status {
@@ -179,6 +179,7 @@ struct plugin_api {
179 int stride, int x, int y, int width, int height); 179 int stride, int x, int y, int width, int height);
180 void (*lcd_bitmap)(const fb_data *src, int x, int y, int width, 180 void (*lcd_bitmap)(const fb_data *src, int x, int y, int width,
181 int height); 181 int height);
182 fb_data* (*lcd_get_backdrop)(void);
182 void (*lcd_set_backdrop)(fb_data* backdrop); 183 void (*lcd_set_backdrop)(fb_data* backdrop);
183#endif 184#endif
184#if LCD_DEPTH == 16 185#if LCD_DEPTH == 16
@@ -310,6 +311,9 @@ struct plugin_api {
310#endif 311#endif
311 void (*ata_spindown)(int seconds); 312 void (*ata_spindown)(int seconds);
312 void (*reload_directory)(void); 313 void (*reload_directory)(void);
314 char *(*create_numbered_filename)(char *buffer, const char *path,
315 const char *prefix, const char *suffix,
316 int numberlen IF_CNFN_NUM_(, int *num));
313 317
314 /* dir */ 318 /* dir */
315 DIR* (*PREFIX(opendir))(const char* name); 319 DIR* (*PREFIX(opendir))(const char* name);
@@ -333,6 +337,7 @@ struct plugin_api {
333 long* current_tick; 337 long* current_tick;
334 long (*default_event_handler)(long event); 338 long (*default_event_handler)(long event);
335 long (*default_event_handler_ex)(long event, void (*callback)(void *), void *parameter); 339 long (*default_event_handler_ex)(long event, void (*callback)(void *), void *parameter);
340 struct thread_entry* threads;
336 struct thread_entry* (*create_thread)(void (*function)(void), void* stack, 341 struct thread_entry* (*create_thread)(void (*function)(void), void* stack,
337 int stack_size, const char *name 342 int stack_size, const char *name
338 IF_PRIO(, int priority) 343 IF_PRIO(, int priority)
@@ -507,11 +512,19 @@ struct plugin_api {
507 bool (*set_option)(const char* string, void* variable, 512 bool (*set_option)(const char* string, void* variable,
508 enum optiontype type, const struct opt_items* options, 513 enum optiontype type, const struct opt_items* options,
509 int numoptions, void (*function)(int)); 514 int numoptions, void (*function)(int));
515 bool (*set_bool_options)(const char* string, bool* variable,
516 const char* yes_str, int yes_voice,
517 const char* no_str, int no_voice,
518 void (*function)(bool));
510 bool (*set_int)(const unsigned char* string, const char* unit, int voice_unit, 519 bool (*set_int)(const unsigned char* string, const char* unit, int voice_unit,
511 int* variable, void (*function)(int), int step, int min, 520 int* variable, void (*function)(int), int step, int min,
512 int max, void (*formatter)(char*, int, int, const char*) ); 521 int max, void (*formatter)(char*, int, int, const char*) );
513 bool (*set_bool)(const char* string, bool* variable ); 522 bool (*set_bool)(const char* string, bool* variable );
514 523
524#ifdef HAVE_LCD_COLOR
525 bool (*set_color)(struct screen *display, char *title, unsigned *color,
526 unsigned banned_color);
527#endif
515 /* action handling */ 528 /* action handling */
516 int (*get_custom_action)(int context,int timeout, 529 int (*get_custom_action)(int context,int timeout,
517 const struct button_mapping* (*get_context_map)(int)); 530 const struct button_mapping* (*get_context_map)(int));
@@ -587,11 +600,6 @@ struct plugin_api {
587 int (*wheel_status)(void); 600 int (*wheel_status)(void);
588 void (*wheel_send_events)(bool send); 601 void (*wheel_send_events)(bool send);
589#endif 602#endif
590#if LCD_DEPTH > 1
591 fb_data* (*lcd_get_backdrop)(void);
592#endif
593 /* new stuff at the end, sort into place next time
594 the API gets incompatible */
595 603
596#ifdef IRIVER_H100_SERIES 604#ifdef IRIVER_H100_SERIES
597 /* Routines for the iriver_flash -plugin. */ 605 /* Routines for the iriver_flash -plugin. */
@@ -599,6 +607,8 @@ struct plugin_api {
599 bool (*detect_flashed_ramimage)(void); 607 bool (*detect_flashed_ramimage)(void);
600 bool (*detect_flashed_romimage)(void); 608 bool (*detect_flashed_romimage)(void);
601#endif 609#endif
610 /* new stuff at the end, sort into place next time
611 the API gets incompatible */
602 612
603#if NUM_CORES > 1 613#if NUM_CORES > 1
604 void (*spinlock_init)(struct mutex *m); 614 void (*spinlock_init)(struct mutex *m);
@@ -608,23 +618,9 @@ struct plugin_api {
608 618
609#if (CONFIG_CODEC == SWCODEC) 619#if (CONFIG_CODEC == SWCODEC)
610 int (*codec_load_file)(const char* codec, struct codec_api *api); 620 int (*codec_load_file)(const char* codec, struct codec_api *api);
621 const char *(*get_codec_filename)(int cod_spec);
611 bool (*get_metadata)(struct track_info* track, int fd, const char* trackname, 622 bool (*get_metadata)(struct track_info* track, int fd, const char* trackname,
612 bool v1first); 623 bool v1first);
613 const char *(*get_codec_filename)(int cod_spec);
614#endif
615 struct thread_entry* threads;
616
617 char *(*create_numbered_filename)(char *buffer, const char *path,
618 const char *prefix, const char *suffix,
619 int numberlen IF_CNFN_NUM_(, int *num));
620
621 bool (*set_bool_options)(const char* string, bool* variable,
622 const char* yes_str, int yes_voice,
623 const char* no_str, int no_voice,
624 void (*function)(bool));
625#ifdef HAVE_LCD_COLOR
626 bool (*set_color)(struct screen *display, char *title, unsigned *color,
627 unsigned banned_color);
628#endif 624#endif
629}; 625};
630 626