diff --git a/apps/gui/bitmap/list.c b/apps/gui/bitmap/list.c
index b4ecd79..7df85e9 100644
--- a/apps/gui/bitmap/list.c
+++ b/apps/gui/bitmap/list.c
@@ -312,7 +312,7 @@ void list_draw(struct screen *display, struct gui_synclist *list)
if (item_offset> item_width - (list_text_vp->width - text_pos))
{
/* don't scroll */
- display->puts_style_xyoffset(0, line, entry_name,
+ display->putsxy_style_xyoffset(0, line*h, entry_name,
style, item_offset, draw_offset);
}
else
@@ -327,7 +327,7 @@ void list_draw(struct screen *display, struct gui_synclist *list)
display->puts_scroll_style_xyoffset(0, line, entry_name,
style, item_offset, draw_offset);
else
- display->puts_style_xyoffset(0, line, entry_name,
+ display->putsxy_style_xyoffset(0, line*h, entry_name,
style, item_offset, draw_offset);
}
/* do the icon */
diff --git a/apps/gui/skin_engine/skin_display.c b/apps/gui/skin_engine/skin_display.c
index f7a0888..1269398 100644
--- a/apps/gui/skin_engine/skin_display.c
+++ b/apps/gui/skin_engine/skin_display.c
@@ -596,9 +596,10 @@ void write_line(struct screen *display, struct align_pos *format_align,
else
{
#ifdef HAVE_LCD_BITMAP
+ int ypos = line * string_height;
/* clear the line first */
display->set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID);
- display->fillrect(left_xpos, line*string_height, display->getwidth(), string_height);
+ display->fillrect(left_xpos, ypos, display->getwidth(), string_height);
display->set_drawmode(DRMODE_SOLID);
#endif
@@ -609,18 +610,18 @@ void write_line(struct screen *display, struct align_pos *format_align,
/* print aligned strings */
if (left_width != 0)
{
- display->puts_style_xyoffset(left_xpos/space_width, line,
+ display->putsxy_style_xyoffset(left_xpos, ypos,
(unsigned char *)format_align->left, style, 0, 0);
}
if (center_width != 0)
{
- display->puts_style_xyoffset(center_xpos/space_width, line,
+ display->putsxy_style_xyoffset(center_xpos, ypos,
(unsigned char *)format_align->center, style, 0, 0);
}
if (right_width != 0)
{
- display->puts_style_xyoffset(right_xpos/space_width, line,
+ display->putsxy_style_xyoffset(right_xpos, ypos,
(unsigned char *)format_align->right, style, 0, 0);
}
#else
diff --git a/apps/plugin.h b/apps/plugin.h
index e0ee951..b9d7daf 100644
--- a/apps/plugin.h
+++ b/apps/plugin.h
@@ -147,12 +147,12 @@ void* plugin_get_buffer(size_t *buffer_size);
#define PLUGIN_MAGIC 0x526F634B /* RocK */
/* increase this every time the api struct changes */
-#define PLUGIN_API_VERSION 212
+#define PLUGIN_API_VERSION 213
/* update this to latest version if a change to the api struct breaks
backwards compatibility (and please take the opportunity to sort in any
new function which are "waiting" at the end of the function table) */
-#define PLUGIN_MIN_API_VERSION 210
+#define PLUGIN_MIN_API_VERSION 213
/* plugin return codes */
/* internal returns start at 0x100 to make exit(1..255) work */
diff --git a/apps/screen_access.c b/apps/screen_access.c
index 01fdebe..b8cf8fa 100644
--- a/apps/screen_access.c
+++ b/apps/screen_access.c
@@ -186,10 +186,8 @@ struct screen screens[NB_SCREENS] =
.vline=&lcd_vline,
.hline=&lcd_hline,
.scroll_step=&lcd_scroll_step,
- .puts_style_offset=&lcd_puts_style_offset,
- .puts_style_xyoffset=&lcd_puts_style_xyoffset,
+ .putsxy_style_xyoffset=&lcd_putsxy_style_xyoffset,
.puts_scroll_style=&lcd_puts_scroll_style,
- .puts_scroll_style_offset=&lcd_puts_scroll_style_offset,
.puts_scroll_style_xyoffset=&lcd_puts_scroll_style_xyoffset,
#endif /* HAVE_LCD_BITMAP */
@@ -205,9 +203,7 @@ struct screen screens[NB_SCREENS] =
.putsxy=&lcd_putsxy,
.puts=&lcd_puts,
.putsf=&lcd_putsf,
- .puts_offset=&lcd_puts_offset,
.puts_scroll=&lcd_puts_scroll,
- .puts_scroll_offset=&lcd_puts_scroll_offset,
.scroll_speed=&lcd_scroll_speed,
.scroll_delay=&lcd_scroll_delay,
.stop_scroll=&lcd_stop_scroll,
@@ -279,10 +275,8 @@ struct screen screens[NB_SCREENS] =
.vline=&lcd_remote_vline,
.hline=&lcd_remote_hline,
.scroll_step=&lcd_remote_scroll_step,
- .puts_style_offset=&lcd_remote_puts_style_offset,
- .puts_style_xyoffset=&lcd_remote_puts_style_xyoffset,
+ .putsxy_style_xyoffset=&lcd_remote_putsxy_style_xyoffset,
.puts_scroll_style=&lcd_remote_puts_scroll_style,
- .puts_scroll_style_offset=&lcd_remote_puts_scroll_style_offset,
.puts_scroll_style_xyoffset=&lcd_remote_puts_scroll_style_xyoffset,
#endif /* 1 */
@@ -296,9 +290,7 @@ struct screen screens[NB_SCREENS] =
.putsxy=&lcd_remote_putsxy,
.puts=&lcd_remote_puts,
.putsf=&lcd_remote_putsf,
- .puts_offset=&lcd_remote_puts_offset,
.puts_scroll=&lcd_remote_puts_scroll,
- .puts_scroll_offset=&lcd_remote_puts_scroll_offset,
.scroll_speed=&lcd_remote_scroll_speed,
.scroll_delay=&lcd_remote_scroll_delay,
.stop_scroll=&lcd_remote_stop_scroll,
diff --git a/apps/screen_access.h b/apps/screen_access.h
index 31ec34f..3c3a5eb 100644
--- a/apps/screen_access.h
+++ b/apps/screen_access.h
@@ -78,14 +78,10 @@ struct screen
int (*getfont)(void);
void (*scroll_step)(int pixels);
- void (*puts_style_offset)(int x, int y, const unsigned char *str,
- int style, int x_offset);
- void (*puts_style_xyoffset)(int x, int y, const unsigned char *str,
+ void (*putsxy_style_xyoffset)(int x, int y, const unsigned char *str,
int style, int x_offset, int y_offset);
void (*puts_scroll_style)(int x, int y, const unsigned char *string,
int style);
- void (*puts_scroll_style_offset)(int x, int y, const unsigned char *string,
- int style, int x_offset);
void (*puts_scroll_style_xyoffset)(int x, int y, const unsigned char *string,
int style, int x_offset, int y_offset);
void (*mono_bitmap)(const unsigned char *src,
@@ -139,10 +135,7 @@ struct screen
void (*putsxy)(int x, int y, const unsigned char *str);
void (*puts)(int x, int y, const unsigned char *str);
void (*putsf)(int x, int y, const unsigned char *str, ...);
- void (*puts_offset)(int x, int y, const unsigned char *str, int offset);
void (*puts_scroll)(int x, int y, const unsigned char *string);
- void (*puts_scroll_offset)(int x, int y, const unsigned char *string,
- int x_offset);
void (*scroll_speed)(int speed);
void (*scroll_delay)(int ms);
void (*stop_scroll)(void);
diff --git a/firmware/drivers/lcd-bitmap-common.c b/firmware/drivers/lcd-bitmap-common.c
index fc84fdd..fea17d7 100644
--- a/firmware/drivers/lcd-bitmap-common.c
+++ b/firmware/drivers/lcd-bitmap-common.c
@@ -306,29 +306,26 @@ static void LCDFN(putsxyofs_style)(int xpos, int ypos,
/*** Line oriented text output ***/
/* put a string at a given char position */
-void LCDFN(puts_style_xyoffset)(int x, int y, const unsigned char *str,
+void LCDFN(putsxy_style_xyoffset)(int x, int y, const unsigned char *str,
int style, int x_offset, int y_offset)
{
int xpos, ypos, w, h;
- LCDFN(scroll_stop_line)(current_vp, y);
+ LCDFN(getstringsize)(" ", NULL, &h);
+ LCDFN(scroll_stop_line)(current_vp, y/h);
if(!str)
return;
LCDFN(getstringsize)(str, &w, &h);
- xpos = x * LCDFN(getstringsize)(" ", NULL, NULL);
- ypos = y * h + y_offset;
+ xpos = x;
+ ypos = y + y_offset;
LCDFN(putsxyofs_style)(xpos, ypos, str, style, w, h, x_offset);
}
-void LCDFN(puts_style_offset)(int x, int y, const unsigned char *str,
- int style, int x_offset)
-{
- LCDFN(puts_style_xyoffset)(x, y, str, style, x_offset, 0);
-}
-
void LCDFN(puts)(int x, int y, const unsigned char *str)
{
- LCDFN(puts_style_offset)(x, y, str, STYLE_DEFAULT, 0);
+ int w, h;
+ LCDFN(getstringsize)(" ", &w, &h);
+ LCDFN(putsxyofs)(x*w, y*h, 0, str);
}
/* Formatting version of LCDFN(puts) */
@@ -344,17 +341,14 @@ void LCDFN(putsf)(int x, int y, const unsigned char *fmt, ...)
void LCDFN(puts_style)(int x, int y, const unsigned char *str, int style)
{
- LCDFN(puts_style_offset)(x, y, str, style, 0);
-}
-
-void LCDFN(puts_offset)(int x, int y, const unsigned char *str, int offset)
-{
- LCDFN(puts_style_offset)(x, y, str, STYLE_DEFAULT, offset);
+ int w, h;
+ LCDFN(getstringsize)(" ", &w, &h);
+ LCDFN(putsxy_style_xyoffset)(x*w, y*h, str, style, 0, 0);
}
/*** scrolling ***/
-void LCDFN(puts_scroll_style_xyoffset)(int x, int y, const unsigned char *string,
+void LCDFN(putsxy_scroll_style_xyoffset)(int x, int y, const unsigned char *string,
int style, int x_offset, int y_offset)
{
struct scrollinfo* s;
@@ -366,12 +360,13 @@ void LCDFN(puts_scroll_style_xyoffset)(int x, int y, const unsigned char *string
return;
/* remove any previously scrolling line at the same location */
- LCDFN(scroll_stop_line)(current_vp, y);
+ LCDFN(getstringsize)(" ", NULL, &h);
+ LCDFN(scroll_stop_line)(current_vp, y/h);
if (LCDFN(scroll_info).lines >= LCDM(SCROLLABLE_LINES)) return;
if (!string)
return;
- LCDFN(puts_style_xyoffset)(x, y, string, style, x_offset, y_offset);
+ LCDFN(putsxy_style_xyoffset)(x, y, string, style, x_offset, y_offset);
LCDFN(getstringsize)(string, &w, &h);
@@ -410,7 +405,7 @@ void LCDFN(puts_scroll_style_xyoffset)(int x, int y, const unsigned char *string
s->vp = current_vp;
s->y = y;
s->offset = x_offset;
- s->startx = x * LCDFN(getstringsize)(" ", NULL, NULL);
+ s->startx = x;
s->y_offset = y_offset;
s->backward = false;
@@ -425,13 +420,7 @@ void LCDFN(puts_scroll)(int x, int y, const unsigned char *string)
void LCDFN(puts_scroll_style)(int x, int y, const unsigned char *string,
int style)
{
- LCDFN(puts_scroll_style_offset)(x, y, string, style, 0);
-}
-
-void LCDFN(puts_scroll_offset)(int x, int y, const unsigned char *string,
- int offset)
-{
- LCDFN(puts_scroll_style_offset)(x, y, string, STYLE_DEFAULT, offset);
+ LCDFN(puts_scroll_style_xyoffset)(x, y, string, style, 0, 0);
}
void LCDFN(scroll_fn)(void)
@@ -495,9 +484,3 @@ void LCDFN(scroll_fn)(void)
}
LCDFN(set_viewport)(old_vp);
}
-
-void LCDFN(puts_scroll_style_offset)(int x, int y, const unsigned char *string,
- int style, int x_offset)
-{
- LCDFN(puts_scroll_style_xyoffset)(x, y, string, style, x_offset, 0);
-}
diff --git a/firmware/export/lcd-remote.h b/firmware/export/lcd-remote.h
index e2f2ab1..46dba7e 100644
--- a/firmware/export/lcd-remote.h
+++ b/firmware/export/lcd-remote.h
@@ -124,11 +124,7 @@ extern void lcd_remote_puts(int x, int y, const unsigned char *str);
extern void lcd_remote_putsf(int x, int y, const unsigned char *fmt, ...);
extern void lcd_remote_puts_style(int x, int y, const unsigned char *str,
int style);
-extern void lcd_remote_puts_offset(int x, int y, const unsigned char *str,
- int offset);
-extern void lcd_remote_puts_style_offset(int x, int y, const unsigned char *str,
- int style, int offset);
-extern void lcd_remote_puts_style_xyoffset(int x, int y, const unsigned char *str,
+extern void lcd_remote_putsxy_style_xyoffset(int x, int y, const unsigned char *str,
int style, int x_offset, int y_offset);
extern void lcd_remote_putc(int x, int y, unsigned short ch);
extern void lcd_remote_stop_scroll(void);
@@ -137,11 +133,6 @@ extern void lcd_remote_scroll_delay(int ms);
extern void lcd_remote_puts_scroll(int x, int y, const unsigned char *str);
extern void lcd_remote_puts_scroll_style(int x, int y, const unsigned char *str,
int style);
-extern void lcd_remote_puts_scroll_offset(int x, int y,
- const unsigned char *str, int offset);
-extern void lcd_remote_puts_scroll_style_offset(int x, int y,
- const unsigned char *string,
- int style, int offset);
extern void lcd_remote_puts_scroll_style_xyoffset(int x, int y,
const unsigned char *string,
int style, int x_offset,
diff --git a/firmware/export/lcd.h b/firmware/export/lcd.h
index e6e19b1..4d5d050 100644
--- a/firmware/export/lcd.h
+++ b/firmware/export/lcd.h
@@ -197,9 +197,6 @@ extern void lcd_putsxy_style_offset(int x, int y, const unsigned char *str,
extern void lcd_puts(int x, int y, const unsigned char *string);
extern void lcd_putsf(int x, int y, const unsigned char *fmt, ...);
extern void lcd_puts_style(int x, int y, const unsigned char *string, int style);
-extern void lcd_puts_offset(int x, int y, const unsigned char *str, int offset);
-extern void lcd_puts_scroll_offset(int x, int y, const unsigned char *string,
- int offset);
extern void lcd_putc(int x, int y, unsigned long ucs);
extern void lcd_stop_scroll(void);
extern void lcd_bidir_scroll(int threshold);
@@ -481,12 +478,8 @@ extern int lcd_get_drawmode(void);
extern void lcd_setfont(int font);
extern int lcd_getfont(void);
-extern void lcd_puts_style_offset(int x, int y, const unsigned char *str,
- int style, int x_offset);
-extern void lcd_puts_style_xyoffset(int x, int y, const unsigned char *str,
+extern void lcd_putsxy_style_xyoffset(int x, int y, const unsigned char *str,
int style, int x_offset, int y_offset);
-extern void lcd_puts_scroll_style_offset(int x, int y, const unsigned char *string,
- int style, int x_offset);
extern void lcd_puts_scroll_style_xyoffset(int x, int y, const unsigned char *string,
int style, int x_offset, int y_offset);