diff options
author | Dave Chapman <dave@dchapman.com> | 2008-01-08 01:22:14 +0000 |
---|---|---|
committer | Dave Chapman <dave@dchapman.com> | 2008-01-08 01:22:14 +0000 |
commit | 3646c313679c4bd16c9eec98c2e35c7a7bf5c961 (patch) | |
tree | b6508cc00ae60c70c9499090fb87d97f3370c131 /firmware/drivers | |
parent | 08e6c6bc2a90e953372e503367c406c469994da2 (diff) | |
download | rockbox-3646c313679c4bd16c9eec98c2e35c7a7bf5c961.tar.gz rockbox-3646c313679c4bd16c9eec98c2e35c7a7bf5c961.zip |
Add the viewport functions to the screens API, including a new getfont() function to return the font used by the current viewport. A change to the screens API makes the plugin API incompatible, so we bump version and sort. Also commit the test_viewports plugin (not built by default). This is some more of FS#8385.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16022 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/drivers')
-rw-r--r-- | firmware/drivers/lcd-16bit.c | 5 | ||||
-rw-r--r-- | firmware/drivers/lcd-1bit-vert.c | 5 | ||||
-rw-r--r-- | firmware/drivers/lcd-2bit-horz.c | 5 | ||||
-rw-r--r-- | firmware/drivers/lcd-2bit-vert.c | 5 | ||||
-rw-r--r-- | firmware/drivers/lcd-remote-1bit-v.c | 5 | ||||
-rw-r--r-- | firmware/drivers/lcd-remote-2bit-vi.c | 5 |
6 files changed, 30 insertions, 0 deletions
diff --git a/firmware/drivers/lcd-16bit.c b/firmware/drivers/lcd-16bit.c index cc5a6c5ab7..2a766d4006 100644 --- a/firmware/drivers/lcd-16bit.c +++ b/firmware/drivers/lcd-16bit.c | |||
@@ -190,6 +190,11 @@ void lcd_setfont(int newfont) | |||
190 | current_vp->font = newfont; | 190 | current_vp->font = newfont; |
191 | } | 191 | } |
192 | 192 | ||
193 | int lcd_getfont(void) | ||
194 | { | ||
195 | return current_vp->font; | ||
196 | } | ||
197 | |||
193 | int lcd_getstringsize(const unsigned char *str, int *w, int *h) | 198 | int lcd_getstringsize(const unsigned char *str, int *w, int *h) |
194 | { | 199 | { |
195 | return font_getstringsize(str, w, h, current_vp->font); | 200 | return font_getstringsize(str, w, h, current_vp->font); |
diff --git a/firmware/drivers/lcd-1bit-vert.c b/firmware/drivers/lcd-1bit-vert.c index 5c651a9613..7c9cd26e2a 100644 --- a/firmware/drivers/lcd-1bit-vert.c +++ b/firmware/drivers/lcd-1bit-vert.c | |||
@@ -122,6 +122,11 @@ void lcd_setfont(int newfont) | |||
122 | current_vp->font = newfont; | 122 | current_vp->font = newfont; |
123 | } | 123 | } |
124 | 124 | ||
125 | int lcd_getfont(void) | ||
126 | { | ||
127 | return current_vp->font; | ||
128 | } | ||
129 | |||
125 | int lcd_getstringsize(const unsigned char *str, int *w, int *h) | 130 | int lcd_getstringsize(const unsigned char *str, int *w, int *h) |
126 | { | 131 | { |
127 | return font_getstringsize(str, w, h, current_vp->font); | 132 | return font_getstringsize(str, w, h, current_vp->font); |
diff --git a/firmware/drivers/lcd-2bit-horz.c b/firmware/drivers/lcd-2bit-horz.c index 1ee0addba4..195885c072 100644 --- a/firmware/drivers/lcd-2bit-horz.c +++ b/firmware/drivers/lcd-2bit-horz.c | |||
@@ -172,6 +172,11 @@ void lcd_setfont(int newfont) | |||
172 | current_vp->font = newfont; | 172 | current_vp->font = newfont; |
173 | } | 173 | } |
174 | 174 | ||
175 | int lcd_getfont(void) | ||
176 | { | ||
177 | return current_vp->font; | ||
178 | } | ||
179 | |||
175 | int lcd_getstringsize(const unsigned char *str, int *w, int *h) | 180 | int lcd_getstringsize(const unsigned char *str, int *w, int *h) |
176 | { | 181 | { |
177 | return font_getstringsize(str, w, h, current_vp->font); | 182 | return font_getstringsize(str, w, h, current_vp->font); |
diff --git a/firmware/drivers/lcd-2bit-vert.c b/firmware/drivers/lcd-2bit-vert.c index 2341ddb3df..cb532b7aaf 100644 --- a/firmware/drivers/lcd-2bit-vert.c +++ b/firmware/drivers/lcd-2bit-vert.c | |||
@@ -175,6 +175,11 @@ void lcd_setfont(int newfont) | |||
175 | current_vp->font = newfont; | 175 | current_vp->font = newfont; |
176 | } | 176 | } |
177 | 177 | ||
178 | int lcd_getfont(void) | ||
179 | { | ||
180 | return current_vp->font; | ||
181 | } | ||
182 | |||
178 | int lcd_getstringsize(const unsigned char *str, int *w, int *h) | 183 | int lcd_getstringsize(const unsigned char *str, int *w, int *h) |
179 | { | 184 | { |
180 | return font_getstringsize(str, w, h, current_vp->font); | 185 | return font_getstringsize(str, w, h, current_vp->font); |
diff --git a/firmware/drivers/lcd-remote-1bit-v.c b/firmware/drivers/lcd-remote-1bit-v.c index a33648b76a..20c6f6655c 100644 --- a/firmware/drivers/lcd-remote-1bit-v.c +++ b/firmware/drivers/lcd-remote-1bit-v.c | |||
@@ -117,6 +117,11 @@ void lcd_remote_setfont(int newfont) | |||
117 | current_vp->font = newfont; | 117 | current_vp->font = newfont; |
118 | } | 118 | } |
119 | 119 | ||
120 | int lcd_remote_getfont(void) | ||
121 | { | ||
122 | return current_vp->font; | ||
123 | } | ||
124 | |||
120 | int lcd_remote_getstringsize(const unsigned char *str, int *w, int *h) | 125 | int lcd_remote_getstringsize(const unsigned char *str, int *w, int *h) |
121 | { | 126 | { |
122 | return font_getstringsize(str, w, h, current_vp->font); | 127 | return font_getstringsize(str, w, h, current_vp->font); |
diff --git a/firmware/drivers/lcd-remote-2bit-vi.c b/firmware/drivers/lcd-remote-2bit-vi.c index 9ab98c69aa..9f70e95195 100644 --- a/firmware/drivers/lcd-remote-2bit-vi.c +++ b/firmware/drivers/lcd-remote-2bit-vi.c | |||
@@ -174,6 +174,11 @@ void lcd_remote_setfont(int newfont) | |||
174 | current_vp->font = newfont; | 174 | current_vp->font = newfont; |
175 | } | 175 | } |
176 | 176 | ||
177 | int lcd_remote_getfont(void) | ||
178 | { | ||
179 | return current_vp->font; | ||
180 | } | ||
181 | |||
177 | int lcd_remote_getstringsize(const unsigned char *str, int *w, int *h) | 182 | int lcd_remote_getstringsize(const unsigned char *str, int *w, int *h) |
178 | { | 183 | { |
179 | return font_getstringsize(str, w, h, current_vp->font); | 184 | return font_getstringsize(str, w, h, current_vp->font); |