summaryrefslogtreecommitdiff
path: root/firmware/export/scroll_engine.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/scroll_engine.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/scroll_engine.h')
-rw-r--r--firmware/export/scroll_engine.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/firmware/export/scroll_engine.h b/firmware/export/scroll_engine.h
index 5e39990129..48d5c5cb8c 100644
--- a/firmware/export/scroll_engine.h
+++ b/firmware/export/scroll_engine.h
@@ -23,9 +23,17 @@
23#ifndef __SCROLL_ENGINE_H__ 23#ifndef __SCROLL_ENGINE_H__
24#define __SCROLL_ENGINE_H__ 24#define __SCROLL_ENGINE_H__
25 25
26#include <lcd.h>
27
26void scroll_init(void); 28void scroll_init(void);
29void lcd_scroll_stop(struct viewport* vp);
30void lcd_scroll_stop_line(struct viewport* vp, int y);
27void lcd_scroll_fn(void); 31void lcd_scroll_fn(void);
32#ifdef HAVE_REMOTE_LCD
28void lcd_remote_scroll_fn(void); 33void lcd_remote_scroll_fn(void);
34void lcd_remote_scroll_stop(struct viewport* vp);
35void lcd_remote_scroll_stop_line(struct viewport* vp, int y);
36#endif
29 37
30/* internal usage, but in multiple drivers */ 38/* internal usage, but in multiple drivers */
31#define SCROLL_SPACING 3 39#define SCROLL_SPACING 3
@@ -37,8 +45,10 @@ void lcd_remote_scroll_fn(void);
37 45
38struct scrollinfo 46struct scrollinfo
39{ 47{
48 struct viewport* vp;
40 char line[SCROLL_LINE_SIZE]; 49 char line[SCROLL_LINE_SIZE];
41 int len; /* length of line in chars */ 50 int len; /* length of line in chars */
51 int y; /* Position of the line on the screen (char co-ordinates) */
42 int offset; 52 int offset;
43 int startx; 53 int startx;
44#ifdef HAVE_LCD_BITMAP 54#ifdef HAVE_LCD_BITMAP
@@ -54,7 +64,7 @@ struct scroll_screen_info
54{ 64{
55 struct scrollinfo * const scroll; 65 struct scrollinfo * const scroll;
56 const int num_scroll; /* number of scrollable lines (also number of scroll structs) */ 66 const int num_scroll; /* number of scrollable lines (also number of scroll structs) */
57 int lines; /* Bitpattern of which lines are scrolling */ 67 int lines; /* Number of currently scrolling lines */
58 long ticks; /* # of ticks between updates*/ 68 long ticks; /* # of ticks between updates*/
59 long delay; /* ticks delay before start */ 69 long delay; /* ticks delay before start */
60 int bidir_limit; /* percent */ 70 int bidir_limit; /* percent */
@@ -74,7 +84,7 @@ struct scroll_screen_info
74#ifdef HAVE_LCD_BITMAP 84#ifdef HAVE_LCD_BITMAP
75#define LCD_SCROLLABLE_LINES ((LCD_HEIGHT+4)/5 < 32 ? (LCD_HEIGHT+4)/5 : 32) 85#define LCD_SCROLLABLE_LINES ((LCD_HEIGHT+4)/5 < 32 ? (LCD_HEIGHT+4)/5 : 32)
76#else 86#else
77#define LCD_SCROLLABLE_LINES LCD_HEIGHT 87#define LCD_SCROLLABLE_LINES LCD_HEIGHT * 2
78#endif 88#endif
79 89
80extern struct scroll_screen_info lcd_scroll_info; 90extern struct scroll_screen_info lcd_scroll_info;