diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/plugin.c | 9 | ||||
-rw-r--r-- | apps/plugin.h | 12 | ||||
-rw-r--r-- | apps/plugins/viewer.c | 9 |
3 files changed, 13 insertions, 17 deletions
diff --git a/apps/plugin.c b/apps/plugin.c index e9c538fd78..983e4991b9 100644 --- a/apps/plugin.c +++ b/apps/plugin.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <stdio.h> | 21 | #include <stdio.h> |
22 | #include <atoi.h> | 22 | #include <atoi.h> |
23 | #include <timefuncs.h> | 23 | #include <timefuncs.h> |
24 | #include <ctype.h> | ||
24 | #include "debug.h" | 25 | #include "debug.h" |
25 | #include "button.h" | 26 | #include "button.h" |
26 | #include "lcd.h" | 27 | #include "lcd.h" |
@@ -147,6 +148,9 @@ static struct plugin_api rockbox_api = { | |||
147 | strlen, | 148 | strlen, |
148 | memset, | 149 | memset, |
149 | memcpy, | 150 | memcpy, |
151 | #ifndef SIMULATOR | ||
152 | _ctype_, | ||
153 | #endif | ||
150 | 154 | ||
151 | /* sound */ | 155 | /* sound */ |
152 | #ifndef SIMULATOR | 156 | #ifndef SIMULATOR |
@@ -209,6 +213,7 @@ static struct plugin_api rockbox_api = { | |||
209 | mpeg_next_track, | 213 | mpeg_next_track, |
210 | playlist_amount, | 214 | playlist_amount, |
211 | mpeg_status, | 215 | mpeg_status, |
216 | mpeg_has_changed_track, | ||
212 | #ifdef HAVE_LCD_BITMAP | 217 | #ifdef HAVE_LCD_BITMAP |
213 | font_get, | 218 | font_get, |
214 | #endif | 219 | #endif |
@@ -230,6 +235,7 @@ static struct plugin_api rockbox_api = { | |||
230 | #endif | 235 | #endif |
231 | battery_level, | 236 | battery_level, |
232 | set_time, | 237 | set_time, |
238 | reset_poweroff_timer, | ||
233 | 239 | ||
234 | backlight_on, | 240 | backlight_on, |
235 | backlight_off, | 241 | backlight_off, |
@@ -237,9 +243,6 @@ static struct plugin_api rockbox_api = { | |||
237 | #ifdef HAVE_LCD_CHARCELLS | 243 | #ifdef HAVE_LCD_CHARCELLS |
238 | lcd_icon, | 244 | lcd_icon, |
239 | #endif | 245 | #endif |
240 | |||
241 | reset_poweroff_timer, | ||
242 | mpeg_has_changed_track, | ||
243 | }; | 246 | }; |
244 | 247 | ||
245 | int plugin_load(char* plugin, void* parameter) | 248 | int plugin_load(char* plugin, void* parameter) |
diff --git a/apps/plugin.h b/apps/plugin.h index 5b3193c42b..d9b32055d6 100644 --- a/apps/plugin.h +++ b/apps/plugin.h | |||
@@ -60,12 +60,12 @@ | |||
60 | #endif | 60 | #endif |
61 | 61 | ||
62 | /* increase this every time the api struct changes */ | 62 | /* increase this every time the api struct changes */ |
63 | #define PLUGIN_API_VERSION 18 | 63 | #define PLUGIN_API_VERSION 19 |
64 | 64 | ||
65 | /* update this to latest version if a change to the api struct breaks | 65 | /* update this to latest version if a change to the api struct breaks |
66 | backwards compatibility (and please take the opportunity to sort in any | 66 | backwards compatibility (and please take the opportunity to sort in any |
67 | new function which are "waiting" at the end of the function table) */ | 67 | new function which are "waiting" at the end of the function table) */ |
68 | #define PLUGIN_MIN_API_VERSION 18 | 68 | #define PLUGIN_MIN_API_VERSION 19 |
69 | 69 | ||
70 | /* plugin return codes */ | 70 | /* plugin return codes */ |
71 | enum plugin_status { | 71 | enum plugin_status { |
@@ -176,6 +176,9 @@ struct plugin_api { | |||
176 | size_t (*strlen)(const char *str); | 176 | size_t (*strlen)(const char *str); |
177 | void* (*memset)(void *dst, int c, size_t length); | 177 | void* (*memset)(void *dst, int c, size_t length); |
178 | void* (*memcpy)(void *out, const void *in, size_t n); | 178 | void* (*memcpy)(void *out, const void *in, size_t n); |
179 | #ifndef SIMULATOR | ||
180 | char *_ctype_; | ||
181 | #endif | ||
179 | 182 | ||
180 | /* sound */ | 183 | /* sound */ |
181 | #ifndef SIMULATOR | 184 | #ifndef SIMULATOR |
@@ -240,6 +243,7 @@ struct plugin_api { | |||
240 | struct mp3entry* (*mpeg_next_track)(void); | 243 | struct mp3entry* (*mpeg_next_track)(void); |
241 | int (*playlist_amount)(void); | 244 | int (*playlist_amount)(void); |
242 | int (*mpeg_status)(void); | 245 | int (*mpeg_status)(void); |
246 | bool (*mpeg_has_changed_track)(void); | ||
243 | 247 | ||
244 | #ifdef HAVE_LCD_BITMAP | 248 | #ifdef HAVE_LCD_BITMAP |
245 | struct font* (*font_get)(int font); | 249 | struct font* (*font_get)(int font); |
@@ -267,6 +271,7 @@ struct plugin_api { | |||
267 | #endif | 271 | #endif |
268 | int (*battery_level)(void); | 272 | int (*battery_level)(void); |
269 | int (*set_time)(struct tm *tm); | 273 | int (*set_time)(struct tm *tm); |
274 | void (*reset_poweroff_timer)(void); | ||
270 | 275 | ||
271 | void (*backlight_on)(void); | 276 | void (*backlight_on)(void); |
272 | void (*backlight_off)(void); | 277 | void (*backlight_off)(void); |
@@ -274,9 +279,6 @@ struct plugin_api { | |||
274 | #ifdef HAVE_LCD_CHARCELLS | 279 | #ifdef HAVE_LCD_CHARCELLS |
275 | void (*lcd_icon)(int icon, bool enable); | 280 | void (*lcd_icon)(int icon, bool enable); |
276 | #endif | 281 | #endif |
277 | |||
278 | void (*reset_poweroff_timer)(void); | ||
279 | bool (*mpeg_has_changed_track)(void); | ||
280 | }; | 282 | }; |
281 | 283 | ||
282 | /* defined by the plugin loader (plugin.c) */ | 284 | /* defined by the plugin loader (plugin.c) */ |
diff --git a/apps/plugins/viewer.c b/apps/plugins/viewer.c index d8d6b516bd..a593da28e7 100644 --- a/apps/plugins/viewer.c +++ b/apps/plugins/viewer.c | |||
@@ -18,17 +18,8 @@ | |||
18 | * | 18 | * |
19 | ****************************************************************************/ | 19 | ****************************************************************************/ |
20 | #include "plugin.h" | 20 | #include "plugin.h" |
21 | |||
22 | #ifdef HAVE_LCD_BITMAP | ||
23 | #include "recorder/widgets.h" | ||
24 | #endif | ||
25 | |||
26 | #include <ctype.h> | 21 | #include <ctype.h> |
27 | 22 | ||
28 | #ifndef SIMULATOR | ||
29 | #include <ctype.c> | ||
30 | #endif | ||
31 | |||
32 | #if PLUGIN_API_VERSION < 3 | 23 | #if PLUGIN_API_VERSION < 3 |
33 | #error Scrollbar function requires PLUGIN_API_VERSION 3 at least | 24 | #error Scrollbar function requires PLUGIN_API_VERSION 3 at least |
34 | #endif | 25 | #endif |