summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2009-08-03 15:09:41 +0000
committerThomas Martitz <kugel@rockbox.org>2009-08-03 15:09:41 +0000
commit2287dd9daaf62e8624755c41f2a0571c5b9d3357 (patch)
tree4cc9346e7430a667cb8521b8d2ee285470efff73 /apps
parent3b75c86d74937a6bffcb371bb08bdfb182db9d2b (diff)
downloadrockbox-2287dd9daaf62e8624755c41f2a0571c5b9d3357.tar.gz
rockbox-2287dd9daaf62e8624755c41f2a0571c5b9d3357.tar.bz2
rockbox-2287dd9daaf62e8624755c41f2a0571c5b9d3357.zip
Remove find_albumart() from the plugin API as it doesn't exist for them.
Remove lcd_set_viewport() too, and replace the calls with the appropriate multi-screen api calls as calling lcd_* functions should be avoided in favor of the api. Bump API version and sort a bit. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22140 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/plugin.c9
-rw-r--r--apps/plugin.h14
-rw-r--r--apps/plugins/lib/pluginlib_touchscreen.c4
-rw-r--r--apps/plugins/reversi/reversi-gui.c8
4 files changed, 14 insertions, 21 deletions
diff --git a/apps/plugin.c b/apps/plugin.c
index 52565b82cc..d66cccbc85 100644
--- a/apps/plugin.c
+++ b/apps/plugin.c
@@ -367,6 +367,9 @@ static const struct plugin_api rockbox_api = {
queue_reply,
#endif
usb_acknowledge,
+#if defined(HAVE_USBSTACK) && defined(USB_ENABLE_HID)
+ usb_hid_send,
+#endif
#ifdef RB_PROFILE
profile_thread,
profstop,
@@ -651,7 +654,6 @@ static const struct plugin_api rockbox_api = {
#endif
#ifdef HAVE_ALBUMART
- find_albumart,
search_albumart_files,
#endif
@@ -665,11 +667,6 @@ static const struct plugin_api rockbox_api = {
/* new stuff at the end, sort into place next time
the API gets incompatible */
-#if defined(HAVE_USBSTACK) && defined(USB_ENABLE_HID)
- usb_hid_send,
-#endif
-
- lcd_set_viewport,
};
int plugin_load(const char* plugin, const void* parameter)
diff --git a/apps/plugin.h b/apps/plugin.h
index d2130f48df..9413a38553 100644
--- a/apps/plugin.h
+++ b/apps/plugin.h
@@ -133,12 +133,12 @@ void* plugin_get_buffer(size_t *buffer_size);
#define PLUGIN_MAGIC 0x526F634B /* RocK */
/* increase this every time the api struct changes */
-#define PLUGIN_API_VERSION 165
+#define PLUGIN_API_VERSION 166
/* 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 164
+#define PLUGIN_MIN_API_VERSION 166
/* plugin return codes */
enum plugin_status {
@@ -491,6 +491,9 @@ struct plugin_api {
#endif /* CONFIG_CODEC == SWCODEC */
void (*usb_acknowledge)(long id);
+#if defined(HAVE_USBSTACK) && defined(USB_ENABLE_HID)
+ void (*usb_hid_send)(usage_page_t usage_page, int id);
+#endif
#ifdef RB_PROFILE
void (*profile_thread)(void);
void (*profstop)(void);
@@ -818,7 +821,6 @@ struct plugin_api {
#endif
#ifdef HAVE_ALBUMART
- bool (*find_albumart)(const struct mp3entry *id3, char *buf, int buflen);
bool (*search_albumart_files)(const struct mp3entry *id3, const char *size_string,
char *buf, int buflen);
#endif
@@ -832,12 +834,6 @@ struct plugin_api {
const char *appsversion;
/* new stuff at the end, sort into place next time
the API gets incompatible */
-
-#if defined(HAVE_USBSTACK) && defined(USB_ENABLE_HID)
- void (*usb_hid_send)(usage_page_t usage_page, int id);
-#endif
-
- void (*lcd_set_viewport)(struct viewport* vp);
};
/* plugin header */
diff --git a/apps/plugins/lib/pluginlib_touchscreen.c b/apps/plugins/lib/pluginlib_touchscreen.c
index eb023b064c..3168b46ac8 100644
--- a/apps/plugins/lib/pluginlib_touchscreen.c
+++ b/apps/plugins/lib/pluginlib_touchscreen.c
@@ -98,7 +98,7 @@ void touchbutton_draw(struct touchbutton *data, int num_buttons) {
/* Set the current viewport to the button so that all drawing
* operations are within the button location.
*/
- rb->lcd_set_viewport(&data[i].vp);
+ rb->screens[SCREEN_MAIN]->set_viewport(&data[i].vp);
/* Get the string size so that the title can be centered. */
rb->lcd_getstringsize(data[i].title, &title_width, &title_height);
@@ -132,7 +132,7 @@ void touchbutton_draw(struct touchbutton *data, int num_buttons) {
rb->lcd_drawrect( 0, 0, data[i].vp.width, data[i].vp.height);
}
}
- rb->lcd_set_viewport(NULL); /* Go back to the default viewport */
+ rb->screens[SCREEN_MAIN]->set_viewport(NULL); /* Go back to the default viewport */
}
/*******************************************************************************
diff --git a/apps/plugins/reversi/reversi-gui.c b/apps/plugins/reversi/reversi-gui.c
index 630ea5a0e1..c006965bd3 100644
--- a/apps/plugins/reversi/reversi-gui.c
+++ b/apps/plugins/reversi/reversi-gui.c
@@ -336,9 +336,9 @@ static void reversi_gui_display_board(void) {
#endif
#endif
- rb->lcd_set_viewport(&tempvp);
+ rb->screens[SCREEN_MAIN]->set_viewport(&tempvp);
rb->lcd_puts_scroll(0, 0, buf);
- rb->lcd_set_viewport(NULL);
+ rb->screens[SCREEN_MAIN]->set_viewport(NULL);
y = LEGEND_Y(1);
@@ -346,9 +346,9 @@ static void reversi_gui_display_board(void) {
rb->snprintf(buf, sizeof(buf), "%01d", r);
tempvp.y=y;
- rb->lcd_set_viewport(&tempvp);
+ rb->screens[SCREEN_MAIN]->set_viewport(&tempvp);
rb->lcd_puts_scroll(0, 0, buf);
- rb->lcd_set_viewport(NULL);
+ rb->screens[SCREEN_MAIN]->set_viewport(NULL);
/* Draw the box around the current player */
r = (cur_player == BLACK ? 0 : 1);