diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/plugin.c | 9 | ||||
-rw-r--r-- | apps/plugin.h | 9 |
2 files changed, 17 insertions, 1 deletions
diff --git a/apps/plugin.c b/apps/plugin.c index 7f91415755..01604c0e24 100644 --- a/apps/plugin.c +++ b/apps/plugin.c | |||
@@ -30,6 +30,11 @@ | |||
30 | #include "mas.h" | 30 | #include "mas.h" |
31 | #include "plugin.h" | 31 | #include "plugin.h" |
32 | #include "lang.h" | 32 | #include "lang.h" |
33 | #include "keyboard.h" | ||
34 | |||
35 | #ifdef HAVE_LCD_BITMAP | ||
36 | #include "widgets.h" | ||
37 | #endif | ||
33 | 38 | ||
34 | #ifdef SIMULATOR | 39 | #ifdef SIMULATOR |
35 | #include <debug.h> | 40 | #include <debug.h> |
@@ -73,6 +78,9 @@ static struct plugin_api rockbox_api = { | |||
73 | lcd_getstringsize, | 78 | lcd_getstringsize, |
74 | lcd_update, | 79 | lcd_update, |
75 | lcd_update_rect, | 80 | lcd_update_rect, |
81 | progressbar, | ||
82 | slidebar, | ||
83 | scrollbar, | ||
76 | #ifndef SIMULATOR | 84 | #ifndef SIMULATOR |
77 | lcd_roll, | 85 | lcd_roll, |
78 | #endif | 86 | #endif |
@@ -125,6 +133,7 @@ static struct plugin_api rockbox_api = { | |||
125 | rand, | 133 | rand, |
126 | splash, | 134 | splash, |
127 | qsort, | 135 | qsort, |
136 | kbd_input, | ||
128 | }; | 137 | }; |
129 | 138 | ||
130 | int plugin_load(char* plugin, void* parameter) | 139 | int plugin_load(char* plugin, void* parameter) |
diff --git a/apps/plugin.h b/apps/plugin.h index 45acfaf5d7..12953ebc4d 100644 --- a/apps/plugin.h +++ b/apps/plugin.h | |||
@@ -37,7 +37,7 @@ | |||
37 | #include "lcd.h" | 37 | #include "lcd.h" |
38 | 38 | ||
39 | /* increase this every time the api struct changes */ | 39 | /* increase this every time the api struct changes */ |
40 | #define PLUGIN_API_VERSION 2 | 40 | #define PLUGIN_API_VERSION 3 |
41 | 41 | ||
42 | /* plugin return codes */ | 42 | /* plugin return codes */ |
43 | enum plugin_status { | 43 | enum plugin_status { |
@@ -98,6 +98,12 @@ struct plugin_api { | |||
98 | int (*lcd_getstringsize)(unsigned char *str, int *w, int *h); | 98 | int (*lcd_getstringsize)(unsigned char *str, int *w, int *h); |
99 | void (*lcd_update)(void); | 99 | void (*lcd_update)(void); |
100 | void (*lcd_update_rect)(int x, int y, int width, int height); | 100 | void (*lcd_update_rect)(int x, int y, int width, int height); |
101 | void (*progressbar)(int x, int y, int width, int height, | ||
102 | int percent, int direction); | ||
103 | void (*slidebar)(int x, int y, int width, int height, | ||
104 | int percent, int direction); | ||
105 | void (*scrollbar)(int x, int y, int width, int height, int items, | ||
106 | int min_shown, int max_shown, int orientation); | ||
101 | #ifndef SIMULATOR | 107 | #ifndef SIMULATOR |
102 | void (*lcd_roll)(int pixels); | 108 | void (*lcd_roll)(int pixels); |
103 | #endif | 109 | #endif |
@@ -151,6 +157,7 @@ struct plugin_api { | |||
151 | void (*splash)(int ticks, int keymask, bool center, char *fmt, ...); | 157 | void (*splash)(int ticks, int keymask, bool center, char *fmt, ...); |
152 | void (*qsort)(void *base, size_t nmemb, size_t size, | 158 | void (*qsort)(void *base, size_t nmemb, size_t size, |
153 | int(*compar)(const void *, const void *)); | 159 | int(*compar)(const void *, const void *)); |
160 | int (*kbd_input)(char* buffer, int buflen); | ||
154 | }; | 161 | }; |
155 | 162 | ||
156 | /* defined by the plugin loader (plugin.c) */ | 163 | /* defined by the plugin loader (plugin.c) */ |