diff options
author | Thomas Martitz <kugel@rockbox.org> | 2013-12-20 23:34:28 +0100 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2014-01-07 11:36:00 +0100 |
commit | 6630958533d02d66dca8cc79897fda2cb744c076 (patch) | |
tree | 598f20a9ebd1248dd4fdbfdf3875ab928f80980a /firmware/drivers/lcd-charcell.c | |
parent | b8505222c02a7a5a19571c3d4577f3b473cb8558 (diff) | |
download | rockbox-6630958533d02d66dca8cc79897fda2cb744c076.tar.gz rockbox-6630958533d02d66dca8cc79897fda2cb744c076.zip |
lcd-common/scroll_engine: Introduce lcd_putsxy_scroll_func().
This function supports installing a custom scroll callback. This will be
called when the scrollengine redraws the line. It allows to draw extended
styles (or anything your can possible imagine) along with the text.
It is also strictly pixel-based, the first pixel-based function that supports
scrolling.
Change-Id: I57f81ac7b3d08b877aea4cb8afa882f175ebcdfc
Diffstat (limited to 'firmware/drivers/lcd-charcell.c')
-rw-r--r-- | firmware/drivers/lcd-charcell.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/firmware/drivers/lcd-charcell.c b/firmware/drivers/lcd-charcell.c index db867cdb0a..54159519a3 100644 --- a/firmware/drivers/lcd-charcell.c +++ b/firmware/drivers/lcd-charcell.c | |||
@@ -563,6 +563,16 @@ void lcd_puts_scroll_worker(int x, int y, const unsigned char *string, | |||
563 | lcd_scroll_info.lines++; | 563 | lcd_scroll_info.lines++; |
564 | } | 564 | } |
565 | 565 | ||
566 | void lcd_putsxy_scroll_func(int x, int y, const unsigned char *string, | ||
567 | void (*scroll_func)(struct scrollinfo *), | ||
568 | void *data, int x_offset) | ||
569 | { | ||
570 | if (!scroll_func) | ||
571 | lcd_putsxyofs(x, y, x_offset, string); | ||
572 | else | ||
573 | lcd_puts_scroll_worker(x, y, string, x_offset, scroll_func, data); | ||
574 | } | ||
575 | |||
566 | void lcd_scroll_fn(struct scrollinfo* s) | 576 | void lcd_scroll_fn(struct scrollinfo* s) |
567 | { | 577 | { |
568 | lcd_putsxyofs(s->x, s->y, s->offset, s->line); | 578 | lcd_putsxyofs(s->x, s->y, s->offset, s->line); |