summaryrefslogtreecommitdiff
path: root/apps/plugin.h
diff options
context:
space:
mode:
authorSteve Bavin <pondlife@pondlife.me>2008-03-25 15:24:03 +0000
committerSteve Bavin <pondlife@pondlife.me>2008-03-25 15:24:03 +0000
commitcd88e2ad93881c9516c7c712b628b42450506f4f (patch)
tree90a5787cde4baddfdd6a6bb02285c7267671a855 /apps/plugin.h
parent222994f180a7cc6582864df8d13d1fb456e1d4f0 (diff)
downloadrockbox-cd88e2ad93881c9516c7c712b628b42450506f4f.zip
rockbox-cd88e2ad93881c9516c7c712b628b42450506f4f.tar.gz
rockbox-cd88e2ad93881c9516c7c712b628b42450506f4f.tar.bz2
rockbox-cd88e2ad93881c9516c7c712b628b42450506f4f.tar.xz
Code police raid on the settings code, consting and putting headers alongside their implementation.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16798 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugin.h')
-rw-r--r--apps/plugin.h27
1 files changed, 14 insertions, 13 deletions
diff --git a/apps/plugin.h b/apps/plugin.h
index 5762473..1283751 100644
--- a/apps/plugin.h
+++ b/apps/plugin.h
@@ -119,12 +119,12 @@
#define PLUGIN_MAGIC 0x526F634B /* RocK */
/* increase this every time the api struct changes */
-#define PLUGIN_API_VERSION 101
+#define PLUGIN_API_VERSION 102
/* 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 101
+#define PLUGIN_MIN_API_VERSION 102
/* plugin return codes */
enum plugin_status {
@@ -562,20 +562,21 @@ struct plugin_api {
void (*gui_syncstatusbar_draw)(struct gui_syncstatusbar * bars, bool force_redraw);
/* options */
- const struct settings_list* (*find_setting)(void* variable, int *id);
+ const struct settings_list* (*find_setting)(const void* variable, int *id);
bool (*option_screen)(struct settings_list *setting,
bool use_temp_var, unsigned char* option_title);
- bool (*set_option)(const char* string, void* variable,
- enum optiontype type, const struct opt_items* options,
- int numoptions, void (*function)(int));
- bool (*set_bool_options)(const char* string, bool* variable,
- const char* yes_str, int yes_voice,
- const char* no_str, int no_voice,
+ bool (*set_option)(const char* string, const void* variable,
+ const enum optiontype type, const struct opt_items* options,
+ const int numoptions, void (*function)(int));
+ bool (*set_bool_options)(const char* string, const bool* variable,
+ const char* yes_str, const int yes_voice,
+ const char* no_str, const int no_voice,
void (*function)(bool));
- bool (*set_int)(const unsigned char* string, const char* unit, int voice_unit,
- int* variable, void (*function)(int), int step, int min,
- int max, void (*formatter)(char*, size_t, int, const char*) );
- bool (*set_bool)(const char* string, bool* variable );
+ bool (*set_int)(const unsigned char* string, const char* unit, const int voice_unit,
+ const int* variable, void (*function)(int), const int step,
+ const int min, const int max,
+ void (*formatter)(char*, size_t, int, const char*) );
+ bool (*set_bool)(const char* string, const bool* variable );
#ifdef HAVE_LCD_COLOR
bool (*set_color)(struct screen *display, char *title, unsigned *color,