Added widgets and keyboard to plugin api.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3823 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
9f372f1f59
commit
0ef911d43c
2 changed files with 17 additions and 1 deletions
|
@ -30,6 +30,11 @@
|
|||
#include "mas.h"
|
||||
#include "plugin.h"
|
||||
#include "lang.h"
|
||||
#include "keyboard.h"
|
||||
|
||||
#ifdef HAVE_LCD_BITMAP
|
||||
#include "widgets.h"
|
||||
#endif
|
||||
|
||||
#ifdef SIMULATOR
|
||||
#include <debug.h>
|
||||
|
@ -73,6 +78,9 @@ static struct plugin_api rockbox_api = {
|
|||
lcd_getstringsize,
|
||||
lcd_update,
|
||||
lcd_update_rect,
|
||||
progressbar,
|
||||
slidebar,
|
||||
scrollbar,
|
||||
#ifndef SIMULATOR
|
||||
lcd_roll,
|
||||
#endif
|
||||
|
@ -125,6 +133,7 @@ static struct plugin_api rockbox_api = {
|
|||
rand,
|
||||
splash,
|
||||
qsort,
|
||||
kbd_input,
|
||||
};
|
||||
|
||||
int plugin_load(char* plugin, void* parameter)
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
#include "lcd.h"
|
||||
|
||||
/* increase this every time the api struct changes */
|
||||
#define PLUGIN_API_VERSION 2
|
||||
#define PLUGIN_API_VERSION 3
|
||||
|
||||
/* plugin return codes */
|
||||
enum plugin_status {
|
||||
|
@ -98,6 +98,12 @@ struct plugin_api {
|
|||
int (*lcd_getstringsize)(unsigned char *str, int *w, int *h);
|
||||
void (*lcd_update)(void);
|
||||
void (*lcd_update_rect)(int x, int y, int width, int height);
|
||||
void (*progressbar)(int x, int y, int width, int height,
|
||||
int percent, int direction);
|
||||
void (*slidebar)(int x, int y, int width, int height,
|
||||
int percent, int direction);
|
||||
void (*scrollbar)(int x, int y, int width, int height, int items,
|
||||
int min_shown, int max_shown, int orientation);
|
||||
#ifndef SIMULATOR
|
||||
void (*lcd_roll)(int pixels);
|
||||
#endif
|
||||
|
@ -151,6 +157,7 @@ struct plugin_api {
|
|||
void (*splash)(int ticks, int keymask, bool center, char *fmt, ...);
|
||||
void (*qsort)(void *base, size_t nmemb, size_t size,
|
||||
int(*compar)(const void *, const void *));
|
||||
int (*kbd_input)(char* buffer, int buflen);
|
||||
};
|
||||
|
||||
/* defined by the plugin loader (plugin.c) */
|
||||
|
|
Loading…
Reference in a new issue