path: root/apps/screen_access.h
diff options
authorDave Chapman <>2008-01-08 01:22:14 +0000
committerDave Chapman <>2008-01-08 01:22:14 +0000
commit3646c313679c4bd16c9eec98c2e35c7a7bf5c961 (patch)
treeb6508cc00ae60c70c9499090fb87d97f3370c131 /apps/screen_access.h
parent08e6c6bc2a90e953372e503367c406c469994da2 (diff)
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:// a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/screen_access.h')
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
bool has_buttonbar;
+ void (*set_viewport)(struct viewport* vp);
void (*setmargins)(int x, int y);
+ int (*getwidth)(void);
+ int (*getheight)(void);
int (*getxmargin)(void);
int (*getymargin)(void);
int (*getstringsize)(const unsigned char *str, int *w, int *h);
#if defined(HAVE_LCD_BITMAP) || defined(HAVE_REMOTE_LCD) /* always bitmap */
void (*setfont)(int newfont);
+ int (*getfont)(void);
void (*scroll_step)(int pixels);
void (*puts_style_offset)(int x, int y, const unsigned char *str,
@@ -113,6 +117,7 @@ struct screen
void (*set_selector_text)(unsigned selector_text);
void (*update_rect)(int x, int y, int width, int height);
+ void (*update_viewport_rect)(int x, int y, int width, int height);
void (*fillrect)(int x, int y, int width, int height);
void (*drawrect)(int x, int y, int width, int height);
void (*drawpixel)(int x, int y);
@@ -139,7 +144,11 @@ struct screen
void (*scroll_delay)(int ms);
void (*stop_scroll)(void);
void (*clear_display)(void);
+ void (*clear_viewport)(void);
+ void (*scroll_stop)(struct viewport* vp);
+ void (*scroll_stop_line)(struct viewport* vp, int y);
void (*update)(void);
+ void (*update_viewport)(void);
void (*backlight_on)(void);
void (*backlight_off)(void);
bool (*is_backlight_on)(void);