summaryrefslogtreecommitdiff
path: root/apps/screen_access.h
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2014-01-12 01:30:26 +0100
committerThomas Martitz <kugel@rockbox.org>2014-01-12 01:34:06 +0100
commit488a1b983e1c2fac14de25aa781caf12628e53c8 (patch)
tree8d5b5b33e0c7eb9e5222b843f84c6b2d65d1a352 /apps/screen_access.h
parent656261bde1122612d1bf8ffc3c992c75a7fbc52e (diff)
downloadrockbox-488a1b983e1c2fac14de25aa781caf12628e53c8.tar.gz
rockbox-488a1b983e1c2fac14de25aa781caf12628e53c8.zip
put_line/scrolling: Make the scroll engine inform custom scrollers about start/stop of scrolling.
With the new lcd_putsxy_scroll_func() code can register custom scroll functions (put_line() makes use of that). In order for the custom scroller to be able to properly manage its userdata pointer (set via struct scrollinfo::userdata) the scroll engine must inform the scroller about start and stop of scrolling. To inform about start the lcd_scroll_* functions now return true when the line will scroll. To inform about stop the scroll engine calls into the scroller one last time, with the text set to NULL. put_line() can use this to release the userdata registered per scrolling line so that it can be recycled. This fixes that some scrolling lines became glitchy after some time because the userdata was recycled too early. Change-Id: Iff0a6ce2a4f9ae2bada1b8e62f4f5950224942a9
Diffstat (limited to 'apps/screen_access.h')
-rw-r--r--apps/screen_access.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/screen_access.h b/apps/screen_access.h
index 7efc38b174..c4a87849b8 100644
--- a/apps/screen_access.h
+++ b/apps/screen_access.h
@@ -126,8 +126,8 @@ struct screen
126 void (*putsxy)(int x, int y, const unsigned char *str); 126 void (*putsxy)(int x, int y, const unsigned char *str);
127 void (*puts)(int x, int y, const unsigned char *str); 127 void (*puts)(int x, int y, const unsigned char *str);
128 void (*putsf)(int x, int y, const unsigned char *str, ...); 128 void (*putsf)(int x, int y, const unsigned char *str, ...);
129 void (*puts_scroll)(int x, int y, const unsigned char *string); 129 bool (*puts_scroll)(int x, int y, const unsigned char *string);
130 void (*putsxy_scroll_func)(int x, int y, const unsigned char *string, 130 bool (*putsxy_scroll_func)(int x, int y, const unsigned char *string,
131 void (*scroll_func)(struct scrollinfo *), 131 void (*scroll_func)(struct scrollinfo *),
132 void *data, int x_offset); 132 void *data, int x_offset);
133 void (*scroll_speed)(int speed); 133 void (*scroll_speed)(int speed);