forked from len0rd/rockbox
Implement lcd(_remote)_putsxyf() and export to plugins
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27921 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
e78a12bca7
commit
0f063b7d72
5 changed files with 15 additions and 0 deletions
|
|
@ -723,6 +723,7 @@ static const struct plugin_api rockbox_api = {
|
||||||
the API gets incompatible */
|
the API gets incompatible */
|
||||||
|
|
||||||
lcd_putsf,
|
lcd_putsf,
|
||||||
|
lcd_putsxyf,
|
||||||
};
|
};
|
||||||
|
|
||||||
int plugin_load(const char* plugin, const void* parameter)
|
int plugin_load(const char* plugin, const void* parameter)
|
||||||
|
|
|
||||||
|
|
@ -896,6 +896,7 @@ struct plugin_api {
|
||||||
the API gets incompatible */
|
the API gets incompatible */
|
||||||
|
|
||||||
void (*lcd_putsf)(int x, int y, const unsigned char *fmt, ...);
|
void (*lcd_putsf)(int x, int y, const unsigned char *fmt, ...);
|
||||||
|
void (*lcd_putsxyf)(int x, int y, const unsigned char *fmt, ...);
|
||||||
};
|
};
|
||||||
|
|
||||||
/* plugin header */
|
/* plugin header */
|
||||||
|
|
|
||||||
|
|
@ -219,6 +219,17 @@ void LCDFN(putsxy)(int x, int y, const unsigned char *str)
|
||||||
LCDFN(putsxyofs)(x, y, 0, str);
|
LCDFN(putsxyofs)(x, y, 0, str);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Formatting version of LCDFN(putsxy) */
|
||||||
|
void LCDFN(putsxyf)(int x, int y, const unsigned char *fmt, ...)
|
||||||
|
{
|
||||||
|
va_list ap;
|
||||||
|
char buf[256];
|
||||||
|
va_start(ap, fmt);
|
||||||
|
vsnprintf(buf, sizeof (buf), fmt, ap);
|
||||||
|
va_end(ap);
|
||||||
|
LCDFN(putsxy)(x, y, buf);
|
||||||
|
}
|
||||||
|
|
||||||
static void LCDFN(putsxyofs_style)(int xpos, int ypos,
|
static void LCDFN(putsxyofs_style)(int xpos, int ypos,
|
||||||
const unsigned char *str, int style,
|
const unsigned char *str, int style,
|
||||||
int w, int h, int offset)
|
int w, int h, int offset)
|
||||||
|
|
|
||||||
|
|
@ -178,6 +178,7 @@ extern void lcd_remote_bitmap_part(const fb_remote_data *src, int src_x,
|
||||||
extern void lcd_remote_bitmap(const fb_remote_data *src, int x, int y,
|
extern void lcd_remote_bitmap(const fb_remote_data *src, int x, int y,
|
||||||
int width, int height);
|
int width, int height);
|
||||||
extern void lcd_remote_putsxy(int x, int y, const unsigned char *str);
|
extern void lcd_remote_putsxy(int x, int y, const unsigned char *str);
|
||||||
|
extern void lcd_remote_putsxyf(int x, int y, const unsigned char *fmt, ...);
|
||||||
|
|
||||||
extern void lcd_remote_bidir_scroll(int threshold);
|
extern void lcd_remote_bidir_scroll(int threshold);
|
||||||
extern void lcd_remote_scroll_step(int pixels);
|
extern void lcd_remote_scroll_step(int pixels);
|
||||||
|
|
|
||||||
|
|
@ -191,6 +191,7 @@ extern void lcd_update_viewport(void);
|
||||||
extern void lcd_clear_viewport(void);
|
extern void lcd_clear_viewport(void);
|
||||||
extern void lcd_clear_display(void);
|
extern void lcd_clear_display(void);
|
||||||
extern void lcd_putsxy(int x, int y, const unsigned char *string);
|
extern void lcd_putsxy(int x, int y, const unsigned char *string);
|
||||||
|
extern void lcd_putsxyf(int x, int y, const unsigned char *fmt, ...);
|
||||||
extern void lcd_puts(int x, int y, const unsigned char *string);
|
extern void lcd_puts(int x, int y, const unsigned char *string);
|
||||||
extern void lcd_putsf(int x, int y, const unsigned char *fmt, ...);
|
extern void lcd_putsf(int x, int y, const unsigned char *fmt, ...);
|
||||||
extern void lcd_puts_style(int x, int y, const unsigned char *string, int style);
|
extern void lcd_puts_style(int x, int y, const unsigned char *string, int style);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue