summaryrefslogtreecommitdiff
path: root/apps/plugin.h
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2007-03-26 07:52:13 +0000
committerJens Arnold <amiconn@rockbox.org>2007-03-26 07:52:13 +0000
commitad4e3d665734b14a28f1ba5fa874663772dab3e7 (patch)
treebff44652495f1319a4d11ed63b3d4e90cb11197f /apps/plugin.h
parent165f62d0cd771660e4b8d2ba7475e14d0d6f2e9f (diff)
downloadrockbox-ad4e3d665734b14a28f1ba5fa874663772dab3e7.tar.gz
rockbox-ad4e3d665734b14a28f1ba5fa874663772dab3e7.zip
First step of charcell LCD code rework: * Make it fully unicode aware so that adding non-ISO8859-1 scripts becomes possible (limited by the LCD capabilities of course). * Make the API more similar to the bitmap LCD code's API. * Moved hardware dependent parts to target tree. * Simplified code. * Jumpscroll temporarily non-functional.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12916 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugin.h')
-rw-r--r--apps/plugin.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/apps/plugin.h b/apps/plugin.h
index dbe79368da..7688057d86 100644
--- a/apps/plugin.h
+++ b/apps/plugin.h
@@ -29,7 +29,7 @@
29#define MEM 2 29#define MEM 2
30#endif 30#endif
31 31
32#include <stdbool.h> 32#include <stdbool.h>
33#include <sys/types.h> 33#include <sys/types.h>
34#include <stdarg.h> 34#include <stdarg.h>
35#include <stdio.h> 35#include <stdio.h>
@@ -110,12 +110,12 @@
110#define PLUGIN_MAGIC 0x526F634B /* RocK */ 110#define PLUGIN_MAGIC 0x526F634B /* RocK */
111 111
112/* increase this every time the api struct changes */ 112/* increase this every time the api struct changes */
113#define PLUGIN_API_VERSION 49 113#define PLUGIN_API_VERSION 50
114 114
115/* update this to latest version if a change to the api struct breaks 115/* update this to latest version if a change to the api struct breaks
116 backwards compatibility (and please take the opportunity to sort in any 116 backwards compatibility (and please take the opportunity to sort in any
117 new function which are "waiting" at the end of the function table) */ 117 new function which are "waiting" at the end of the function table) */
118#define PLUGIN_MIN_API_VERSION 47 118#define PLUGIN_MIN_API_VERSION 50
119 119
120/* plugin return codes */ 120/* plugin return codes */
121enum plugin_status { 121enum plugin_status {
@@ -135,24 +135,25 @@ struct plugin_api {
135 /* lcd */ 135 /* lcd */
136 void (*lcd_set_contrast)(int x); 136 void (*lcd_set_contrast)(int x);
137 void (*lcd_clear_display)(void); 137 void (*lcd_clear_display)(void);
138 void (*lcd_setmargins)(int x, int y);
139 int (*lcd_getstringsize)(const unsigned char *str, int *w, int *h);
140 void (*lcd_putsxy)(int x, int y, const unsigned char *string);
138 void (*lcd_puts)(int x, int y, const unsigned char *string); 141 void (*lcd_puts)(int x, int y, const unsigned char *string);
139 void (*lcd_puts_scroll)(int x, int y, const unsigned char* string); 142 void (*lcd_puts_scroll)(int x, int y, const unsigned char* string);
140 void (*lcd_stop_scroll)(void); 143 void (*lcd_stop_scroll)(void);
141#ifdef HAVE_LCD_CHARCELLS 144#ifdef HAVE_LCD_CHARCELLS
142 void (*lcd_define_pattern)(int which,const char *pattern); 145 void (*lcd_define_pattern)(unsigned long ucs, const char *pattern);
143 unsigned char (*lcd_get_locked_pattern)(void); 146 unsigned long (*lcd_get_locked_pattern)(void);
144 void (*lcd_unlock_pattern)(unsigned char pat); 147 void (*lcd_unlock_pattern)(unsigned long ucs);
145 void (*lcd_putc)(int x, int y, unsigned short ch); 148 void (*lcd_putc)(int x, int y, unsigned long ucs);
146 void (*lcd_put_cursor)(int x, int y, char cursor_char); 149 void (*lcd_put_cursor)(int x, int y, unsigned long ucs);
147 void (*lcd_remove_cursor)(void); 150 void (*lcd_remove_cursor)(void);
148 void (*PREFIX(lcd_icon))(int icon, bool enable); 151 void (*PREFIX(lcd_icon))(int icon, bool enable);
149 void (*lcd_double_height)(bool on); 152 void (*lcd_double_height)(bool on);
150#else 153#else
151 void (*lcd_setmargins)(int x, int y);
152 void (*lcd_set_drawmode)(int mode); 154 void (*lcd_set_drawmode)(int mode);
153 int (*lcd_get_drawmode)(void); 155 int (*lcd_get_drawmode)(void);
154 void (*lcd_setfont)(int font); 156 void (*lcd_setfont)(int font);
155 int (*lcd_getstringsize)(const unsigned char *str, int *w, int *h);
156 void (*lcd_drawpixel)(int x, int y); 157 void (*lcd_drawpixel)(int x, int y);
157 void (*lcd_drawline)(int x1, int y1, int x2, int y2); 158 void (*lcd_drawline)(int x1, int y1, int x2, int y2);
158 void (*lcd_hline)(int x1, int x2, int y); 159 void (*lcd_hline)(int x1, int x2, int y);
@@ -184,7 +185,6 @@ struct plugin_api {
184 unsigned short *(*bidi_l2v)( const unsigned char *str, int orientation ); 185 unsigned short *(*bidi_l2v)( const unsigned char *str, int orientation );
185 const unsigned char *(*font_get_bits)( struct font *pf, unsigned short char_code ); 186 const unsigned char *(*font_get_bits)( struct font *pf, unsigned short char_code );
186 struct font* (*font_load)(const char *path); 187 struct font* (*font_load)(const char *path);
187 void (*lcd_putsxy)(int x, int y, const unsigned char *string);
188 void (*lcd_puts_style)(int x, int y, const unsigned char *str, int style); 188 void (*lcd_puts_style)(int x, int y, const unsigned char *str, int style);
189 void (*lcd_puts_scroll_style)(int x, int y, const unsigned char* string, 189 void (*lcd_puts_scroll_style)(int x, int y, const unsigned char* string,
190 int style); 190 int style);