From e5a257607dd93afe239a03dff0d093dfb3af64be Mon Sep 17 00:00:00 2001 From: Yoshihisa Uchida Date: Wed, 7 Jul 2010 11:35:30 +0000 Subject: [PATCH] plugin api: add the following functions. - get the viewport of the current skin. - update the current skin statusbar. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27333 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugin.c | 5 +++++ apps/plugin.h | 9 +++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/apps/plugin.c b/apps/plugin.c index 51ef40f010..1196a88195 100644 --- a/apps/plugin.c +++ b/apps/plugin.c @@ -565,6 +565,11 @@ static const struct plugin_api rockbox_api = { /* statusbars */ &statusbars, gui_syncstatusbar_draw, +#ifdef HAVE_LCD_BITMAP + sb_skin_get_info_vp, + sb_skin_update, +#endif + /* options */ get_settings_list, find_setting, diff --git a/apps/plugin.h b/apps/plugin.h index edad8c4e9b..21ec7e42df 100644 --- a/apps/plugin.h +++ b/apps/plugin.h @@ -84,6 +84,7 @@ void* plugin_get_buffer(size_t *buffer_size); #include "scrollbar.h" #include "jpeg_load.h" #include "../recorder/bmp.h" +#include "statusbar-skinned.h" #endif #include "statusbar.h" #include "menu.h" @@ -144,12 +145,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 188 +#define PLUGIN_API_VERSION 189 /* 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 188 +#define PLUGIN_MIN_API_VERSION 189 /* plugin return codes */ enum plugin_status { @@ -694,6 +695,10 @@ struct plugin_api { /* scroll bar */ struct gui_syncstatusbar *statusbars; void (*gui_syncstatusbar_draw)(struct gui_syncstatusbar * bars, bool force_redraw); +#ifdef HAVE_LCD_BITMAP + struct viewport *(*sb_skin_get_info_vp)(enum screen_type screen); + void (*sb_skin_update)(enum screen_type screen, bool force); +#endif /* options */ const struct settings_list* (*get_settings_list)(int*count);