diff options
author | Steve Bavin <pondlife@pondlife.me> | 2008-05-13 09:57:56 +0000 |
---|---|---|
committer | Steve Bavin <pondlife@pondlife.me> | 2008-05-13 09:57:56 +0000 |
commit | 652657781805d9cc10d744a49fb23eb17019fbbf (patch) | |
tree | 2d1a6ae597a17531f726b57fd9f8cbaa2a46a07f /apps/plugins/lib | |
parent | a94e40d5153ab698fa8a1b6b57d91fcb6acc905e (diff) | |
download | rockbox-652657781805d9cc10d744a49fb23eb17019fbbf.tar.gz rockbox-652657781805d9cc10d744a49fb23eb17019fbbf.zip |
Plugin parameters should be const.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17492 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/lib')
26 files changed, 56 insertions, 56 deletions
diff --git a/apps/plugins/lib/bmp.c b/apps/plugins/lib/bmp.c index 20adc6de86..c46093a8d9 100644 --- a/apps/plugins/lib/bmp.c +++ b/apps/plugins/lib/bmp.c | |||
@@ -30,7 +30,7 @@ | |||
30 | /** | 30 | /** |
31 | * Save to 24 bit bitmap. | 31 | * Save to 24 bit bitmap. |
32 | */ | 32 | */ |
33 | int save_bmp_file( char* filename, struct bitmap *bm, struct plugin_api* rb ) | 33 | int save_bmp_file( char* filename, struct bitmap *bm, const struct plugin_api* rb ) |
34 | { | 34 | { |
35 | /* I'm not really sure about this one :) */ | 35 | /* I'm not really sure about this one :) */ |
36 | int line_width = bm->width*3+((bm->width*3)%4?4-((bm->width*3)%4):0); | 36 | int line_width = bm->width*3+((bm->width*3)%4?4-((bm->width*3)%4):0); |
diff --git a/apps/plugins/lib/bmp.h b/apps/plugins/lib/bmp.h index 10f71865f7..9114df1ee5 100644 --- a/apps/plugins/lib/bmp.h +++ b/apps/plugins/lib/bmp.h | |||
@@ -26,7 +26,7 @@ | |||
26 | /** | 26 | /** |
27 | * Save bitmap to file | 27 | * Save bitmap to file |
28 | */ | 28 | */ |
29 | int save_bmp_file( char* filename, struct bitmap *bm, struct plugin_api* rb ); | 29 | int save_bmp_file( char* filename, struct bitmap *bm, const struct plugin_api* rb ); |
30 | #endif | 30 | #endif |
31 | 31 | ||
32 | /** | 32 | /** |
diff --git a/apps/plugins/lib/checkbox.c b/apps/plugins/lib/checkbox.c index 5acc52a728..039d5f9cbf 100644 --- a/apps/plugins/lib/checkbox.c +++ b/apps/plugins/lib/checkbox.c | |||
@@ -25,7 +25,7 @@ | |||
25 | /* | 25 | /* |
26 | * Print a checkbox | 26 | * Print a checkbox |
27 | */ | 27 | */ |
28 | void checkbox(struct plugin_api *api, int x, int y, int width, int height, bool checked) | 28 | void checkbox(const struct plugin_api *api, int x, int y, int width, int height, bool checked) |
29 | { | 29 | { |
30 | /* draw box */ | 30 | /* draw box */ |
31 | api->lcd_drawrect(x, y, width, height); | 31 | api->lcd_drawrect(x, y, width, height); |
diff --git a/apps/plugins/lib/checkbox.h b/apps/plugins/lib/checkbox.h index 2a5ffea0aa..72de4952ca 100644 --- a/apps/plugins/lib/checkbox.h +++ b/apps/plugins/lib/checkbox.h | |||
@@ -24,6 +24,6 @@ | |||
24 | /* | 24 | /* |
25 | * Print a checkbox | 25 | * Print a checkbox |
26 | */ | 26 | */ |
27 | void checkbox(struct plugin_api *api, int x, int y, int width, int height, bool checked); | 27 | void checkbox(const struct plugin_api *api, int x, int y, int width, int height, bool checked); |
28 | 28 | ||
29 | #endif | 29 | #endif |
diff --git a/apps/plugins/lib/configfile.c b/apps/plugins/lib/configfile.c index b0d134fae9..516bf616cb 100644 --- a/apps/plugins/lib/configfile.c +++ b/apps/plugins/lib/configfile.c | |||
@@ -19,9 +19,9 @@ | |||
19 | #include "plugin.h" | 19 | #include "plugin.h" |
20 | #include "configfile.h" | 20 | #include "configfile.h" |
21 | 21 | ||
22 | static struct plugin_api *cfg_rb; | 22 | static const struct plugin_api *cfg_rb; |
23 | 23 | ||
24 | void configfile_init(struct plugin_api* newrb) | 24 | void configfile_init(const struct plugin_api* newrb) |
25 | { | 25 | { |
26 | cfg_rb = newrb; | 26 | cfg_rb = newrb; |
27 | } | 27 | } |
diff --git a/apps/plugins/lib/configfile.h b/apps/plugins/lib/configfile.h index 7aa69f3ecf..fe4b43c485 100644 --- a/apps/plugins/lib/configfile.h +++ b/apps/plugins/lib/configfile.h | |||
@@ -37,7 +37,7 @@ struct configdata | |||
37 | NULL otherwise */ | 37 | NULL otherwise */ |
38 | }; | 38 | }; |
39 | 39 | ||
40 | void configfile_init(struct plugin_api* newrb); | 40 | void configfile_init(const struct plugin_api* newrb); |
41 | 41 | ||
42 | /* configfile_save - Given configdata entries this function will | 42 | /* configfile_save - Given configdata entries this function will |
43 | create a config file with these entries, destroying any | 43 | create a config file with these entries, destroying any |
diff --git a/apps/plugins/lib/grey.h b/apps/plugins/lib/grey.h index 81912b1995..4a15bd38ea 100644 --- a/apps/plugins/lib/grey.h +++ b/apps/plugins/lib/grey.h | |||
@@ -50,7 +50,7 @@ | |||
50 | #define GREY_ON_COP 0x0004 /* Run ISR on COP (PP targets) */ | 50 | #define GREY_ON_COP 0x0004 /* Run ISR on COP (PP targets) */ |
51 | 51 | ||
52 | /* Library initialisation and release */ | 52 | /* Library initialisation and release */ |
53 | bool grey_init(struct plugin_api* newrb, unsigned char *gbuf, long gbuf_size, | 53 | bool grey_init(const struct plugin_api* newrb, unsigned char *gbuf, long gbuf_size, |
54 | unsigned features, int width, int height, long *buf_taken); | 54 | unsigned features, int width, int height, long *buf_taken); |
55 | void grey_release(void); | 55 | void grey_release(void); |
56 | 56 | ||
@@ -168,16 +168,16 @@ struct _grey_info | |||
168 | int by; /* 4-pixel or 8-pixel units */ | 168 | int by; /* 4-pixel or 8-pixel units */ |
169 | int bheight; /* 4-pixel or 8-pixel units */ | 169 | int bheight; /* 4-pixel or 8-pixel units */ |
170 | #endif | 170 | #endif |
171 | unsigned long flags; /* various flags, see #defines */ | 171 | unsigned long flags; /* various flags, see #defines */ |
172 | struct plugin_api *rb; /* plugin API pointer */ | 172 | const struct plugin_api *rb; /* plugin API pointer */ |
173 | unsigned char *values; /* start of greyscale pixel values */ | 173 | unsigned char *values; /* start of greyscale pixel values */ |
174 | unsigned char *phases; /* start of greyscale pixel phases */ | 174 | unsigned char *phases; /* start of greyscale pixel phases */ |
175 | unsigned char *buffer; /* start of chunky pixel buffer (for buffered mode) */ | 175 | unsigned char *buffer; /* start of chunky pixel buffer (for buffered mode) */ |
176 | unsigned char gvalue[256]; /* calculated brightness -> greyvalue table */ | 176 | unsigned char gvalue[256]; /* calculated brightness -> greyvalue table */ |
177 | int fg_brightness; /* current foreground brightness */ | 177 | int fg_brightness; /* current foreground brightness */ |
178 | int bg_brightness; /* current background brightness */ | 178 | int bg_brightness; /* current background brightness */ |
179 | int drawmode; /* current draw mode */ | 179 | int drawmode; /* current draw mode */ |
180 | int curfont; /* current selected font */ | 180 | int curfont; /* current selected font */ |
181 | }; | 181 | }; |
182 | 182 | ||
183 | /* Global variable, defined in the plugin */ | 183 | /* Global variable, defined in the plugin */ |
diff --git a/apps/plugins/lib/grey_core.c b/apps/plugins/lib/grey_core.c index e2260cdf11..e7f02dd6cb 100644 --- a/apps/plugins/lib/grey_core.c +++ b/apps/plugins/lib/grey_core.c | |||
@@ -478,7 +478,7 @@ static void fill_gvalues(void) | |||
478 | 478 | ||
479 | The function is authentic regarding memory usage on the simulator, even | 479 | The function is authentic regarding memory usage on the simulator, even |
480 | if it doesn't use all of the allocated memory. */ | 480 | if it doesn't use all of the allocated memory. */ |
481 | bool grey_init(struct plugin_api* newrb, unsigned char *gbuf, long gbuf_size, | 481 | bool grey_init(const struct plugin_api* newrb, unsigned char *gbuf, long gbuf_size, |
482 | unsigned features, int width, int height, long *buf_taken) | 482 | unsigned features, int width, int height, long *buf_taken) |
483 | { | 483 | { |
484 | int bdim, i; | 484 | int bdim, i; |
diff --git a/apps/plugins/lib/helper.c b/apps/plugins/lib/helper.c index 8ac822b407..691a17f15c 100644 --- a/apps/plugins/lib/helper.c +++ b/apps/plugins/lib/helper.c | |||
@@ -21,7 +21,7 @@ | |||
21 | #include "helper.h" | 21 | #include "helper.h" |
22 | 22 | ||
23 | /* Force the backlight on */ | 23 | /* Force the backlight on */ |
24 | void backlight_force_on(struct plugin_api* rb) | 24 | void backlight_force_on(const struct plugin_api* rb) |
25 | { | 25 | { |
26 | if(!rb) | 26 | if(!rb) |
27 | return; | 27 | return; |
@@ -34,7 +34,7 @@ void backlight_force_on(struct plugin_api* rb) | |||
34 | } | 34 | } |
35 | 35 | ||
36 | /* Reset backlight operation to its settings */ | 36 | /* Reset backlight operation to its settings */ |
37 | void backlight_use_settings(struct plugin_api* rb) | 37 | void backlight_use_settings(const struct plugin_api* rb) |
38 | { | 38 | { |
39 | if (!rb) | 39 | if (!rb) |
40 | return; | 40 | return; |
@@ -47,7 +47,7 @@ void backlight_use_settings(struct plugin_api* rb) | |||
47 | 47 | ||
48 | #ifdef HAVE_REMOTE_LCD | 48 | #ifdef HAVE_REMOTE_LCD |
49 | /* Force the backlight on */ | 49 | /* Force the backlight on */ |
50 | void remote_backlight_force_on(struct plugin_api* rb) | 50 | void remote_backlight_force_on(const struct plugin_api* rb) |
51 | { | 51 | { |
52 | if (!rb) | 52 | if (!rb) |
53 | return; | 53 | return; |
@@ -60,7 +60,7 @@ void remote_backlight_force_on(struct plugin_api* rb) | |||
60 | } | 60 | } |
61 | 61 | ||
62 | /* Reset backlight operation to its settings */ | 62 | /* Reset backlight operation to its settings */ |
63 | void remote_backlight_use_settings(struct plugin_api* rb) | 63 | void remote_backlight_use_settings(const struct plugin_api* rb) |
64 | { | 64 | { |
65 | if (!rb) | 65 | if (!rb) |
66 | return; | 66 | return; |
@@ -75,7 +75,7 @@ void remote_backlight_use_settings(struct plugin_api* rb) | |||
75 | 75 | ||
76 | #ifdef HAVE_BUTTON_LIGHT | 76 | #ifdef HAVE_BUTTON_LIGHT |
77 | /* Force the buttonlight on */ | 77 | /* Force the buttonlight on */ |
78 | void buttonlight_force_on(struct plugin_api* rb) | 78 | void buttonlight_force_on(const struct plugin_api* rb) |
79 | { | 79 | { |
80 | if (!rb) | 80 | if (!rb) |
81 | return; | 81 | return; |
@@ -84,7 +84,7 @@ void buttonlight_force_on(struct plugin_api* rb) | |||
84 | } | 84 | } |
85 | 85 | ||
86 | /* Reset buttonlight operation to its settings */ | 86 | /* Reset buttonlight operation to its settings */ |
87 | void buttonlight_use_settings(struct plugin_api* rb) | 87 | void buttonlight_use_settings(const struct plugin_api* rb) |
88 | { | 88 | { |
89 | if (!rb) | 89 | if (!rb) |
90 | return; | 90 | return; |
diff --git a/apps/plugins/lib/helper.h b/apps/plugins/lib/helper.h index 4d1328bd0c..d34e6334f0 100644 --- a/apps/plugins/lib/helper.h +++ b/apps/plugins/lib/helper.h | |||
@@ -24,14 +24,14 @@ | |||
24 | /** | 24 | /** |
25 | * Backlight on/off operations | 25 | * Backlight on/off operations |
26 | */ | 26 | */ |
27 | void backlight_force_on(struct plugin_api* rb); | 27 | void backlight_force_on(const struct plugin_api* rb); |
28 | void backlight_use_settings(struct plugin_api* rb); | 28 | void backlight_use_settings(const struct plugin_api* rb); |
29 | #ifdef HAVE_REMOTE_LCD | 29 | #ifdef HAVE_REMOTE_LCD |
30 | void remote_backlight_force_on(struct plugin_api* rb); | 30 | void remote_backlight_force_on(const struct plugin_api* rb); |
31 | void remote_backlight_use_settings(struct plugin_api* rb); | 31 | void remote_backlight_use_settings(const struct plugin_api* rb); |
32 | #endif | 32 | #endif |
33 | #ifdef HAVE_BUTTON_LIGHT | 33 | #ifdef HAVE_BUTTON_LIGHT |
34 | void buttonlight_force_on(struct plugin_api* rb); | 34 | void buttonlight_force_on(const struct plugin_api* rb); |
35 | void buttonlight_use_settings(struct plugin_api* rb); | 35 | void buttonlight_use_settings(const struct plugin_api* rb); |
36 | #endif | 36 | #endif |
37 | #endif | 37 | #endif |
diff --git a/apps/plugins/lib/highscore.c b/apps/plugins/lib/highscore.c index df7a71bcdf..94b6a7b947 100644 --- a/apps/plugins/lib/highscore.c +++ b/apps/plugins/lib/highscore.c | |||
@@ -19,9 +19,9 @@ | |||
19 | #include "plugin.h" | 19 | #include "plugin.h" |
20 | #include "highscore.h" | 20 | #include "highscore.h" |
21 | 21 | ||
22 | static struct plugin_api *rb; | 22 | static const struct plugin_api *rb; |
23 | 23 | ||
24 | void highscore_init(struct plugin_api* newrb) | 24 | void highscore_init(const struct plugin_api* newrb) |
25 | { | 25 | { |
26 | rb = newrb; | 26 | rb = newrb; |
27 | } | 27 | } |
diff --git a/apps/plugins/lib/highscore.h b/apps/plugins/lib/highscore.h index ba7da241f1..b6501cf568 100644 --- a/apps/plugins/lib/highscore.h +++ b/apps/plugins/lib/highscore.h | |||
@@ -26,7 +26,7 @@ struct highscore | |||
26 | int level; | 26 | int level; |
27 | }; | 27 | }; |
28 | 28 | ||
29 | void highscore_init(struct plugin_api* newrb); | 29 | void highscore_init(const struct plugin_api* newrb); |
30 | int highscore_save(char *filename, struct highscore *scores, int num_scores); | 30 | int highscore_save(char *filename, struct highscore *scores, int num_scores); |
31 | int highscore_load(char *filename, struct highscore *scores, int num_scores); | 31 | int highscore_load(char *filename, struct highscore *scores, int num_scores); |
32 | int highscore_update(int score, int level, struct highscore *scores, int num_scores); | 32 | int highscore_update(int score, int level, struct highscore *scores, int num_scores); |
diff --git a/apps/plugins/lib/oldmenuapi.c b/apps/plugins/lib/oldmenuapi.c index 27e4fdd49e..51fb4f3eb2 100644 --- a/apps/plugins/lib/oldmenuapi.c +++ b/apps/plugins/lib/oldmenuapi.c | |||
@@ -27,7 +27,7 @@ | |||
27 | #include "plugin.h" | 27 | #include "plugin.h" |
28 | #include "oldmenuapi.h" | 28 | #include "oldmenuapi.h" |
29 | 29 | ||
30 | struct plugin_api *rb = NULL; | 30 | const struct plugin_api *rb = NULL; |
31 | 31 | ||
32 | struct menu { | 32 | struct menu { |
33 | struct menu_item* items; | 33 | struct menu_item* items; |
@@ -65,7 +65,7 @@ static int menu_find_free(void) | |||
65 | return(i); | 65 | return(i); |
66 | } | 66 | } |
67 | 67 | ||
68 | int menu_init(struct plugin_api *api, const struct menu_item* mitems, | 68 | int menu_init(const struct plugin_api *api, const struct menu_item* mitems, |
69 | int count, int (*callback)(int, int), | 69 | int count, int (*callback)(int, int), |
70 | const char *button1, const char *button2, const char *button3) | 70 | const char *button1, const char *button2, const char *button3) |
71 | { | 71 | { |
diff --git a/apps/plugins/lib/oldmenuapi.h b/apps/plugins/lib/oldmenuapi.h index 34f6226d59..ccfd1400dd 100644 --- a/apps/plugins/lib/oldmenuapi.h +++ b/apps/plugins/lib/oldmenuapi.h | |||
@@ -31,7 +31,7 @@ struct menu_item { | |||
31 | bool (*function) (void); /* return true if USB was connected */ | 31 | bool (*function) (void); /* return true if USB was connected */ |
32 | }; | 32 | }; |
33 | 33 | ||
34 | int menu_init(struct plugin_api *api, const struct menu_item* mitems, | 34 | int menu_init(const struct plugin_api *api, const struct menu_item* mitems, |
35 | int count, int (*callback)(int, int), | 35 | int count, int (*callback)(int, int), |
36 | const char *button1, const char *button2, const char *button3); | 36 | const char *button1, const char *button2, const char *button3); |
37 | void menu_exit(int menu); | 37 | void menu_exit(int menu); |
diff --git a/apps/plugins/lib/overlay.c b/apps/plugins/lib/overlay.c index 53cc4a84f0..63fb776f02 100644 --- a/apps/plugins/lib/overlay.c +++ b/apps/plugins/lib/overlay.c | |||
@@ -44,7 +44,7 @@ | |||
44 | The linker script for the overlay should use a base address towards the | 44 | The linker script for the overlay should use a base address towards the |
45 | end of the audiobuffer, just low enough to make the overlay fit. */ | 45 | end of the audiobuffer, just low enough to make the overlay fit. */ |
46 | 46 | ||
47 | enum plugin_status run_overlay(struct plugin_api* rb, void* parameter, | 47 | enum plugin_status run_overlay(const struct plugin_api* rb, const void* parameter, |
48 | unsigned char *filename, unsigned char *name) | 48 | unsigned char *filename, unsigned char *name) |
49 | { | 49 | { |
50 | int fd, readsize; | 50 | int fd, readsize; |
diff --git a/apps/plugins/lib/overlay.h b/apps/plugins/lib/overlay.h index bbf7549274..ba9b1fa308 100644 --- a/apps/plugins/lib/overlay.h +++ b/apps/plugins/lib/overlay.h | |||
@@ -26,7 +26,7 @@ | |||
26 | #include "plugin.h" | 26 | #include "plugin.h" |
27 | 27 | ||
28 | /* load and run a plugin linked as an overlay. */ | 28 | /* load and run a plugin linked as an overlay. */ |
29 | enum plugin_status run_overlay(struct plugin_api* api, void* parameter, | 29 | enum plugin_status run_overlay(const struct plugin_api* api, const void* parameter, |
30 | unsigned char *filename, unsigned char *name); | 30 | unsigned char *filename, unsigned char *name); |
31 | 31 | ||
32 | #endif /* !SIMULATOR */ | 32 | #endif /* !SIMULATOR */ |
diff --git a/apps/plugins/lib/playback_control.c b/apps/plugins/lib/playback_control.c index 7e74728ab4..b0456248a8 100644 --- a/apps/plugins/lib/playback_control.c +++ b/apps/plugins/lib/playback_control.c | |||
@@ -20,7 +20,7 @@ | |||
20 | #include "plugin.h" | 20 | #include "plugin.h" |
21 | #include "playback_control.h" | 21 | #include "playback_control.h" |
22 | 22 | ||
23 | struct plugin_api* api = 0; | 23 | const struct plugin_api* api = 0; |
24 | struct viewport *parentvp = NULL; | 24 | struct viewport *parentvp = NULL; |
25 | 25 | ||
26 | static bool prevtrack(void) | 26 | static bool prevtrack(void) |
@@ -105,14 +105,14 @@ MAKE_MENU(playback_control_menu, "Playback Control", NULL, Icon_NOICON, | |||
105 | &prevtrack_item, &playpause_item, &stop_item, &nexttrack_item, | 105 | &prevtrack_item, &playpause_item, &stop_item, &nexttrack_item, |
106 | &volume_item, &shuffle_item, &repeat_mode_item); | 106 | &volume_item, &shuffle_item, &repeat_mode_item); |
107 | 107 | ||
108 | void playback_control_init(struct plugin_api* newapi, | 108 | void playback_control_init(const struct plugin_api* newapi, |
109 | struct viewport parent[NB_SCREENS]) | 109 | struct viewport parent[NB_SCREENS]) |
110 | { | 110 | { |
111 | api = newapi; | 111 | api = newapi; |
112 | parentvp = parent; | 112 | parentvp = parent; |
113 | } | 113 | } |
114 | 114 | ||
115 | bool playback_control(struct plugin_api* newapi, | 115 | bool playback_control(const struct plugin_api* newapi, |
116 | struct viewport parent[NB_SCREENS]) | 116 | struct viewport parent[NB_SCREENS]) |
117 | { | 117 | { |
118 | api = newapi; | 118 | api = newapi; |
diff --git a/apps/plugins/lib/playback_control.h b/apps/plugins/lib/playback_control.h index a3a0d7afbc..23b586095e 100644 --- a/apps/plugins/lib/playback_control.h +++ b/apps/plugins/lib/playback_control.h | |||
@@ -25,11 +25,11 @@ | |||
25 | So, make sure you use the same viewport for the rb->do_menu() call | 25 | So, make sure you use the same viewport for the rb->do_menu() call |
26 | that you use in the playback_control_init() call | 26 | that you use in the playback_control_init() call |
27 | */ | 27 | */ |
28 | void playback_control_init(struct plugin_api* newapi, | 28 | void playback_control_init(const struct plugin_api* newapi, |
29 | struct viewport parent[NB_SCREENS]); | 29 | struct viewport parent[NB_SCREENS]); |
30 | 30 | ||
31 | /* Use this if your menu still uses the old menu api */ | 31 | /* Use this if your menu still uses the old menu api */ |
32 | bool playback_control(struct plugin_api* api, | 32 | bool playback_control(const struct plugin_api* api, |
33 | struct viewport parent[NB_SCREENS]); | 33 | struct viewport parent[NB_SCREENS]); |
34 | 34 | ||
35 | #endif /* __PLAYBACK_CONTROL_H__ */ | 35 | #endif /* __PLAYBACK_CONTROL_H__ */ |
diff --git a/apps/plugins/lib/playergfx.c b/apps/plugins/lib/playergfx.c index 8853078fa1..4139a6c605 100644 --- a/apps/plugins/lib/playergfx.c +++ b/apps/plugins/lib/playergfx.c | |||
@@ -26,7 +26,7 @@ | |||
26 | 26 | ||
27 | /*** globals ***/ | 27 | /*** globals ***/ |
28 | 28 | ||
29 | static struct plugin_api *pgfx_rb = NULL; /* global api struct pointer */ | 29 | static const struct plugin_api *pgfx_rb = NULL; /* global api struct pointer */ |
30 | static int char_width; | 30 | static int char_width; |
31 | static int char_height; | 31 | static int char_height; |
32 | static int pixel_height; | 32 | static int pixel_height; |
@@ -38,7 +38,7 @@ static int drawmode = DRMODE_SOLID; | |||
38 | /*** Special functions ***/ | 38 | /*** Special functions ***/ |
39 | 39 | ||
40 | /* library init */ | 40 | /* library init */ |
41 | bool pgfx_init(struct plugin_api* newrb, int cwidth, int cheight) | 41 | bool pgfx_init(const struct plugin_api* newrb, int cwidth, int cheight) |
42 | { | 42 | { |
43 | int i; | 43 | int i; |
44 | 44 | ||
diff --git a/apps/plugins/lib/playergfx.h b/apps/plugins/lib/playergfx.h index 5f49831609..504599ae39 100644 --- a/apps/plugins/lib/playergfx.h +++ b/apps/plugins/lib/playergfx.h | |||
@@ -26,7 +26,7 @@ | |||
26 | 26 | ||
27 | #ifdef HAVE_LCD_CHARCELLS /* Player only :) */ | 27 | #ifdef HAVE_LCD_CHARCELLS /* Player only :) */ |
28 | 28 | ||
29 | bool pgfx_init(struct plugin_api* newrb, int cwidth, int cheight); | 29 | bool pgfx_init(const struct plugin_api* newrb, int cwidth, int cheight); |
30 | void pgfx_release(void); | 30 | void pgfx_release(void); |
31 | void pgfx_display(int cx, int cy); | 31 | void pgfx_display(int cx, int cy); |
32 | void pgfx_display_block(int cx, int cy, int x, int y); | 32 | void pgfx_display_block(int cx, int cy, int x, int y); |
diff --git a/apps/plugins/lib/pluginlib_actions.c b/apps/plugins/lib/pluginlib_actions.c index be78bf1408..a63ffb352a 100644 --- a/apps/plugins/lib/pluginlib_actions.c +++ b/apps/plugins/lib/pluginlib_actions.c | |||
@@ -464,7 +464,7 @@ static const struct button_mapping* get_context_map(int context) | |||
464 | else return NULL; | 464 | else return NULL; |
465 | } | 465 | } |
466 | 466 | ||
467 | int pluginlib_getaction(struct plugin_api *api,int timeout, | 467 | int pluginlib_getaction(const struct plugin_api *api,int timeout, |
468 | const struct button_mapping *plugin_contexts[], | 468 | const struct button_mapping *plugin_contexts[], |
469 | int count) | 469 | int count) |
470 | { | 470 | { |
diff --git a/apps/plugins/lib/pluginlib_actions.h b/apps/plugins/lib/pluginlib_actions.h index c11a087904..601cd73a8c 100644 --- a/apps/plugins/lib/pluginlib_actions.h +++ b/apps/plugins/lib/pluginlib_actions.h | |||
@@ -58,7 +58,7 @@ extern const struct button_mapping generic_left_right_fire[]; | |||
58 | extern const struct button_mapping generic_actions[]; | 58 | extern const struct button_mapping generic_actions[]; |
59 | extern const struct button_mapping generic_increase_decrease[]; | 59 | extern const struct button_mapping generic_increase_decrease[]; |
60 | 60 | ||
61 | int pluginlib_getaction(struct plugin_api *api,int timeout, | 61 | int pluginlib_getaction(const struct plugin_api *api,int timeout, |
62 | const struct button_mapping *plugin_contexts[], | 62 | const struct button_mapping *plugin_contexts[], |
63 | int count); | 63 | int count); |
64 | 64 | ||
diff --git a/apps/plugins/lib/profile_plugin.c b/apps/plugins/lib/profile_plugin.c index 38c6d81598..6f31288c8f 100644 --- a/apps/plugins/lib/profile_plugin.c +++ b/apps/plugins/lib/profile_plugin.c | |||
@@ -21,9 +21,9 @@ | |||
21 | 21 | ||
22 | #include "plugin.h" | 22 | #include "plugin.h" |
23 | 23 | ||
24 | static struct plugin_api *local_rb = NULL; /* global api struct pointer */ | 24 | static const struct plugin_api *local_rb = NULL; /* global api struct pointer */ |
25 | 25 | ||
26 | void profile_init(struct plugin_api* pa) | 26 | void profile_init(const struct plugin_api* pa) |
27 | { | 27 | { |
28 | local_rb = pa; | 28 | local_rb = pa; |
29 | } | 29 | } |
diff --git a/apps/plugins/lib/profile_plugin.h b/apps/plugins/lib/profile_plugin.h index 71cff37033..6bc19734d8 100644 --- a/apps/plugins/lib/profile_plugin.h +++ b/apps/plugins/lib/profile_plugin.h | |||
@@ -24,7 +24,7 @@ | |||
24 | 24 | ||
25 | #include "plugin.h" | 25 | #include "plugin.h" |
26 | 26 | ||
27 | void profile_init(struct plugin_api* pa); | 27 | void profile_init(const struct plugin_api* pa); |
28 | 28 | ||
29 | void __cyg_profile_func_enter(void *this_fn, void *call_site) | 29 | void __cyg_profile_func_enter(void *this_fn, void *call_site) |
30 | NO_PROF_ATTR ICODE_ATTR; | 30 | NO_PROF_ATTR ICODE_ATTR; |
diff --git a/apps/plugins/lib/xlcd.h b/apps/plugins/lib/xlcd.h index 59a048228b..a1e2389f39 100644 --- a/apps/plugins/lib/xlcd.h +++ b/apps/plugins/lib/xlcd.h | |||
@@ -26,7 +26,7 @@ | |||
26 | 26 | ||
27 | #ifdef HAVE_LCD_BITMAP | 27 | #ifdef HAVE_LCD_BITMAP |
28 | 28 | ||
29 | void xlcd_init(struct plugin_api* newrb); | 29 | void xlcd_init(const struct plugin_api* newrb); |
30 | void xlcd_filltriangle(int x1, int y1, int x2, int y2, int x3, int y3); | 30 | void xlcd_filltriangle(int x1, int y1, int x2, int y2, int x3, int y3); |
31 | void xlcd_filltriangle_screen(struct screen* display, | 31 | void xlcd_filltriangle_screen(struct screen* display, |
32 | int x1, int y1, int x2, int y2, int x3, int y3); | 32 | int x1, int y1, int x2, int y2, int x3, int y3); |
@@ -49,7 +49,7 @@ void xlcd_scroll_up(int count); | |||
49 | void xlcd_scroll_down(int count); | 49 | void xlcd_scroll_down(int count); |
50 | 50 | ||
51 | /* internal stuff */ | 51 | /* internal stuff */ |
52 | extern struct plugin_api *_xlcd_rb; /* global api struct pointer */ | 52 | extern const struct plugin_api *_xlcd_rb; /* global api struct pointer */ |
53 | 53 | ||
54 | #endif /* HAVE_LCD_BITMAP */ | 54 | #endif /* HAVE_LCD_BITMAP */ |
55 | #endif /* __XLCD_H__ */ | 55 | #endif /* __XLCD_H__ */ |
diff --git a/apps/plugins/lib/xlcd_core.c b/apps/plugins/lib/xlcd_core.c index e8cc688591..7f8e566865 100644 --- a/apps/plugins/lib/xlcd_core.c +++ b/apps/plugins/lib/xlcd_core.c | |||
@@ -27,12 +27,12 @@ | |||
27 | 27 | ||
28 | /*** globals ***/ | 28 | /*** globals ***/ |
29 | 29 | ||
30 | struct plugin_api *_xlcd_rb = NULL; /* global api struct pointer */ | 30 | const struct plugin_api *_xlcd_rb = NULL; /* global api struct pointer */ |
31 | 31 | ||
32 | /*** functions ***/ | 32 | /*** functions ***/ |
33 | 33 | ||
34 | /* library init */ | 34 | /* library init */ |
35 | void xlcd_init(struct plugin_api* newrb) | 35 | void xlcd_init(const struct plugin_api* newrb) |
36 | { | 36 | { |
37 | _xlcd_rb = newrb; | 37 | _xlcd_rb = newrb; |
38 | } | 38 | } |