From 6630958533d02d66dca8cc79897fda2cb744c076 Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Fri, 20 Dec 2013 23:34:28 +0100 Subject: 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 --- firmware/export/lcd-remote.h | 3 +++ firmware/export/lcd.h | 5 +++++ 2 files changed, 8 insertions(+) (limited to 'firmware/export') diff --git a/firmware/export/lcd-remote.h b/firmware/export/lcd-remote.h index be6816cd7e..f209e6b47d 100644 --- a/firmware/export/lcd-remote.h +++ b/firmware/export/lcd-remote.h @@ -196,6 +196,9 @@ extern void lcd_remote_puts_scroll_style_xyoffset(int x, int y, const unsigned char *string, int style, int x_offset, int y_offset); +extern void lcd_remote_putsxy_scroll_func(int x, int y, const unsigned char *string, + void (*scroll_func)(struct scrollinfo *), + void *data, int x_offset); extern void lcd_remote_update(void); extern void lcd_remote_update_rect(int x, int y, int width, int height); diff --git a/firmware/export/lcd.h b/firmware/export/lcd.h index 7842ce59f2..745c445dda 100644 --- a/firmware/export/lcd.h +++ b/firmware/export/lcd.h @@ -108,6 +108,8 @@ enum screen_type { #endif }; +struct scrollinfo; + #if defined(LCD_STRIDEFORMAT) && LCD_STRIDEFORMAT == VERTICAL_STRIDE #define STRIDE_MAIN(w, h) (h) #else @@ -212,6 +214,9 @@ extern void lcd_putc(int x, int y, unsigned long ucs); extern void lcd_puts_scroll(int x, int y, const unsigned char* string); extern void lcd_puts_scroll_style(int x, int y, const unsigned char* string, int style); +extern void lcd_putsxy_scroll_func(int x, int y, const unsigned char *string, + void (*scroll_func)(struct scrollinfo *), + void *data, int x_offset); #ifdef HAVE_LCD_BITMAP -- cgit v1.2.3