summaryrefslogtreecommitdiff
path: root/firmware/export/lcd.h
diff options
context:
space:
mode:
authorDave Chapman <dave@dchapman.com>2008-01-07 20:34:11 +0000
committerDave Chapman <dave@dchapman.com>2008-01-07 20:34:11 +0000
commit945c8a221ade41c462a93f8452320a806e5645b3 (patch)
tree2a17823e286e6252e60c44c7f4753d5c18ef5172 /firmware/export/lcd.h
parent2a8f39820b49f116820356c2ca224f82f2106c21 (diff)
downloadrockbox-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.h28
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
27struct 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);
76extern void lcd_setmargins(int xmargin, int ymargin); 98extern void lcd_setmargins(int xmargin, int ymargin);
77extern int lcd_getxmargin(void); 99extern int lcd_getxmargin(void);
78extern int lcd_getymargin(void); 100extern int lcd_getymargin(void);
101extern int lcd_getwidth(void);
102extern int lcd_getheight(void);
79extern int lcd_getstringsize(const unsigned char *str, int *w, int *h); 103extern int lcd_getstringsize(const unsigned char *str, int *w, int *h);
80 104
105extern void lcd_set_viewport(struct viewport* vp);
81extern void lcd_update(void); 106extern void lcd_update(void);
107extern void lcd_update_viewport(void);
108extern void lcd_clear_viewport(void);
82extern void lcd_clear_display(void); 109extern void lcd_clear_display(void);
83extern void lcd_putsxy(int x, int y, const unsigned char *string); 110extern void lcd_putsxy(int x, int y, const unsigned char *string);
84extern void lcd_puts(int x, int y, const unsigned char *string); 111extern 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 */
121extern void lcd_update_rect(int x, int y, int width, int height); 148extern void lcd_update_rect(int x, int y, int width, int height);
149extern 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
124extern void lcd_remote_update(void); 152extern void lcd_remote_update(void);