From 3646c313679c4bd16c9eec98c2e35c7a7bf5c961 Mon Sep 17 00:00:00 2001 From: Dave Chapman Date: Tue, 8 Jan 2008 01:22:14 +0000 Subject: 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 --- apps/screen_access.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'apps/screen_access.h') 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 #ifdef HAS_BUTTONBAR bool has_buttonbar; #endif + 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); #endif 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); -- cgit v1.2.3