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) | |
download | rockbox-945c8a221ade41c462a93f8452320a806e5645b3.tar.gz rockbox-945c8a221ade41c462a93f8452320a806e5645b3.zip |
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 @@ | |||
24 | #include "cpu.h" | 24 | #include "cpu.h" |
25 | #include "config.h" | 25 | #include "config.h" |
26 | 26 | ||
27 | struct viewport { | ||
28 | int x; | ||
29 | int y; | ||
30 | int width; | ||
31 | int height; | ||
32 | #ifdef HAVE_LCD_BITMAP | ||
33 | int font; | ||
34 | int drawmode; | ||
35 | #endif | ||
36 | int xmargin; /* During the transition only - to be removed */ | ||
37 | int ymargin; /* During the transition only - to be removed */ | ||
38 | #if LCD_DEPTH > 1 | ||
39 | unsigned fg_pattern; | ||
40 | unsigned bg_pattern; | ||
41 | #ifdef HAVE_LCD_COLOR | ||
42 | unsigned lss_pattern; | ||
43 | unsigned lse_pattern; | ||
44 | unsigned lst_pattern; | ||
45 | #endif | ||
46 | #endif | ||
47 | }; | ||
48 | |||
27 | #define STYLE_DEFAULT 0x00000000 | 49 | #define STYLE_DEFAULT 0x00000000 |
28 | #define STYLE_COLORED 0x10000000 | 50 | #define STYLE_COLORED 0x10000000 |
29 | #define STYLE_INVERT 0x20000000 | 51 | #define STYLE_INVERT 0x20000000 |
@@ -76,9 +98,14 @@ extern void lcd_set_contrast(int val); | |||
76 | extern void lcd_setmargins(int xmargin, int ymargin); | 98 | extern void lcd_setmargins(int xmargin, int ymargin); |
77 | extern int lcd_getxmargin(void); | 99 | extern int lcd_getxmargin(void); |
78 | extern int lcd_getymargin(void); | 100 | extern int lcd_getymargin(void); |
101 | extern int lcd_getwidth(void); | ||
102 | extern int lcd_getheight(void); | ||
79 | extern int lcd_getstringsize(const unsigned char *str, int *w, int *h); | 103 | extern int lcd_getstringsize(const unsigned char *str, int *w, int *h); |
80 | 104 | ||
105 | extern void lcd_set_viewport(struct viewport* vp); | ||
81 | extern void lcd_update(void); | 106 | extern void lcd_update(void); |
107 | extern void lcd_update_viewport(void); | ||
108 | extern void lcd_clear_viewport(void); | ||
82 | extern void lcd_clear_display(void); | 109 | extern void lcd_clear_display(void); |
83 | extern void lcd_putsxy(int x, int y, const unsigned char *string); | 110 | extern void lcd_putsxy(int x, int y, const unsigned char *string); |
84 | extern void lcd_puts(int x, int y, const unsigned char *string); | 111 | 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, | |||
119 | 146 | ||
120 | /* update a fraction of the screen */ | 147 | /* update a fraction of the screen */ |
121 | extern void lcd_update_rect(int x, int y, int width, int height); | 148 | extern void lcd_update_rect(int x, int y, int width, int height); |
149 | extern void lcd_update_viewport_rect(int x, int y, int width, int height); | ||
122 | 150 | ||
123 | #ifdef HAVE_REMOTE_LCD | 151 | #ifdef HAVE_REMOTE_LCD |
124 | extern void lcd_remote_update(void); | 152 | extern void lcd_remote_update(void); |