summaryrefslogtreecommitdiff
path: root/apps/screen_access.h
diff options
context:
space:
mode:
authorDave Chapman <dave@dchapman.com>2008-01-08 01:22:14 +0000
committerDave Chapman <dave@dchapman.com>2008-01-08 01:22:14 +0000
commit3646c313679c4bd16c9eec98c2e35c7a7bf5c961 (patch)
treeb6508cc00ae60c70c9499090fb87d97f3370c131 /apps/screen_access.h
parent08e6c6bc2a90e953372e503367c406c469994da2 (diff)
downloadrockbox-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 'apps/screen_access.h')
-rw-r--r--apps/screen_access.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/apps/screen_access.h b/apps/screen_access.h
index 35bcdef0a2..7efa48c423 100644
--- a/apps/screen_access.h
+++ b/apps/screen_access.h
@@ -71,12 +71,16 @@ struct screen
71#ifdef HAS_BUTTONBAR 71#ifdef HAS_BUTTONBAR
72 bool has_buttonbar; 72 bool has_buttonbar;
73#endif 73#endif
74 void (*set_viewport)(struct viewport* vp);
74 void (*setmargins)(int x, int y); 75 void (*setmargins)(int x, int y);
76 int (*getwidth)(void);
77 int (*getheight)(void);
75 int (*getxmargin)(void); 78 int (*getxmargin)(void);
76 int (*getymargin)(void); 79 int (*getymargin)(void);
77 int (*getstringsize)(const unsigned char *str, int *w, int *h); 80 int (*getstringsize)(const unsigned char *str, int *w, int *h);
78#if defined(HAVE_LCD_BITMAP) || defined(HAVE_REMOTE_LCD) /* always bitmap */ 81#if defined(HAVE_LCD_BITMAP) || defined(HAVE_REMOTE_LCD) /* always bitmap */
79 void (*setfont)(int newfont); 82 void (*setfont)(int newfont);
83 int (*getfont)(void);
80 84
81 void (*scroll_step)(int pixels); 85 void (*scroll_step)(int pixels);
82 void (*puts_style_offset)(int x, int y, const unsigned char *str, 86 void (*puts_style_offset)(int x, int y, const unsigned char *str,
@@ -113,6 +117,7 @@ struct screen
113 void (*set_selector_text)(unsigned selector_text); 117 void (*set_selector_text)(unsigned selector_text);
114#endif 118#endif
115 void (*update_rect)(int x, int y, int width, int height); 119 void (*update_rect)(int x, int y, int width, int height);
120 void (*update_viewport_rect)(int x, int y, int width, int height);
116 void (*fillrect)(int x, int y, int width, int height); 121 void (*fillrect)(int x, int y, int width, int height);
117 void (*drawrect)(int x, int y, int width, int height); 122 void (*drawrect)(int x, int y, int width, int height);
118 void (*drawpixel)(int x, int y); 123 void (*drawpixel)(int x, int y);
@@ -139,7 +144,11 @@ struct screen
139 void (*scroll_delay)(int ms); 144 void (*scroll_delay)(int ms);
140 void (*stop_scroll)(void); 145 void (*stop_scroll)(void);
141 void (*clear_display)(void); 146 void (*clear_display)(void);
147 void (*clear_viewport)(void);
148 void (*scroll_stop)(struct viewport* vp);
149 void (*scroll_stop_line)(struct viewport* vp, int y);
142 void (*update)(void); 150 void (*update)(void);
151 void (*update_viewport)(void);
143 void (*backlight_on)(void); 152 void (*backlight_on)(void);
144 void (*backlight_off)(void); 153 void (*backlight_off)(void);
145 bool (*is_backlight_on)(void); 154 bool (*is_backlight_on)(void);