diff options
author | Dave Chapman <dave@dchapman.com> | 2008-01-07 20:34:11 +0000 |
---|---|---|
committer | Dave Chapman <dave@dchapman.com> | 2008-01-07 20:34:11 +0000 |
commit | 945c8a221ade41c462a93f8452320a806e5645b3 (patch) | |
tree | 2a17823e286e6252e60c44c7f4753d5c18ef5172 /firmware/export/lcd.h | |
parent | 2a8f39820b49f116820356c2ca224f82f2106c21 (diff) |
Add viewport capabilities to all the LCD drivers, and adapt scrolling code. This is the firmware/ part of FS#8385 - the changes to the WPS code still need more work and will be committed at a later date. NOTE: There are no user-visible changes with this commit - just the infrastructure.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16018 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/export/lcd.h')
-rw-r--r-- | firmware/export/lcd.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/firmware/export/lcd.h b/firmware/export/lcd.h index 60d9efaf92..276dcdfedc 100644 --- a/firmware/export/lcd.h +++ b/firmware/export/lcd.h @@ -24,6 +24,28 @@ #include "cpu.h" #include "config.h" +struct viewport { + int x; + int y; + int width; + int height; +#ifdef HAVE_LCD_BITMAP + int font; + int drawmode; +#endif + int xmargin; /* During the transition only - to be removed */ + int ymargin; /* During the transition only - to be removed */ +#if LCD_DEPTH > 1 + unsigned fg_pattern; + unsigned bg_pattern; +#ifdef HAVE_LCD_COLOR + unsigned lss_pattern; + unsigned lse_pattern; + unsigned lst_pattern; +#endif +#endif +}; + #define STYLE_DEFAULT 0x00000000 #define STYLE_COLORED 0x10000000 #define STYLE_INVERT 0x20000000 @@ -76,9 +98,14 @@ extern void lcd_set_contrast(int val); extern void lcd_setmargins(int xmargin, int ymargin); extern int lcd_getxmargin(void); extern int lcd_getymargin(void); +extern int lcd_getwidth(void); +extern int lcd_getheight(void); extern int lcd_getstringsize(const unsigned char *str, int *w, int *h); +extern void lcd_set_viewport(struct viewport* vp); extern void lcd_update(void); +extern void lcd_update_viewport(void); +extern void lcd_clear_viewport(void); extern void lcd_clear_display(void); extern void lcd_putsxy(int x, int y, const unsigned char *string); extern void lcd_puts(int x, int y, const unsigned char *string); @@ -119,6 +146,7 @@ extern void lcd_blit(const fb_data* data, int x, int by, int width, /* update a fraction of the screen */ extern void lcd_update_rect(int x, int y, int width, int height); +extern void lcd_update_viewport_rect(int x, int y, int width, int height); #ifdef HAVE_REMOTE_LCD extern void lcd_remote_update(void); |