diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/gui/splash.c | 6 | ||||
-rw-r--r-- | apps/plugin.c | 8 | ||||
-rw-r--r-- | apps/plugin.h | 8 | ||||
-rw-r--r-- | apps/screen_access.c | 16 | ||||
-rw-r--r-- | apps/screen_access.h | 7 |
5 files changed, 28 insertions, 17 deletions
diff --git a/apps/gui/splash.c b/apps/gui/splash.c index 1f04b89fc0..30909217b2 100644 --- a/apps/gui/splash.c +++ b/apps/gui/splash.c | |||
@@ -137,7 +137,8 @@ static void splash(struct screen * screen, bool center, | |||
137 | { | 137 | { |
138 | prevfg = screen->get_foreground(); | 138 | prevfg = screen->get_foreground(); |
139 | screen->set_drawmode(DRMODE_FG); | 139 | screen->set_drawmode(DRMODE_FG); |
140 | screen->set_foreground(LCD_LIGHTGRAY); | 140 | screen->set_foreground( |
141 | SCREEN_COLOR_TO_NATIVE(screen, LCD_LIGHTGRAY)); | ||
141 | } | 142 | } |
142 | else | 143 | else |
143 | #endif | 144 | #endif |
@@ -147,7 +148,8 @@ static void splash(struct screen * screen, bool center, | |||
147 | 148 | ||
148 | #if LCD_DEPTH > 1 | 149 | #if LCD_DEPTH > 1 |
149 | if (screen->depth > 1) | 150 | if (screen->depth > 1) |
150 | screen->set_foreground(LCD_BLACK); | 151 | screen->set_foreground( |
152 | SCREEN_COLOR_TO_NATIVE(screen, LCD_BLACK)); | ||
151 | else | 153 | else |
152 | #endif | 154 | #endif |
153 | screen->set_drawmode(DRMODE_SOLID); | 155 | screen->set_drawmode(DRMODE_SOLID); |
diff --git a/apps/plugin.c b/apps/plugin.c index 876f82d774..38fdaa8f35 100644 --- a/apps/plugin.c +++ b/apps/plugin.c | |||
@@ -220,7 +220,7 @@ static const struct plugin_api rockbox_api = { | |||
220 | gui_synclist_scroll_left, | 220 | gui_synclist_scroll_left, |
221 | #endif | 221 | #endif |
222 | gui_synclist_do_button, | 222 | gui_synclist_do_button, |
223 | 223 | ||
224 | /* button */ | 224 | /* button */ |
225 | button_get, | 225 | button_get, |
226 | button_get_w_tmo, | 226 | button_get_w_tmo, |
@@ -413,7 +413,7 @@ static const struct plugin_api rockbox_api = { | |||
413 | get_action, | 413 | get_action, |
414 | action_signalscreenchange, | 414 | action_signalscreenchange, |
415 | action_userabort, | 415 | action_userabort, |
416 | 416 | ||
417 | /* power */ | 417 | /* power */ |
418 | battery_level, | 418 | battery_level, |
419 | battery_level_safe, | 419 | battery_level_safe, |
@@ -466,7 +466,7 @@ static const struct plugin_api rockbox_api = { | |||
466 | 466 | ||
467 | /* new stuff at the end, sort into place next time | 467 | /* new stuff at the end, sort into place next time |
468 | the API gets incompatible */ | 468 | the API gets incompatible */ |
469 | 469 | ||
470 | strtok_r, | 470 | strtok_r, |
471 | #ifdef HAVE_WHEEL_POSITION | 471 | #ifdef HAVE_WHEEL_POSITION |
472 | wheel_status, | 472 | wheel_status, |
@@ -608,7 +608,7 @@ int plugin_load(const char* plugin, void* parameter) | |||
608 | 608 | ||
609 | #ifdef HAVE_REMOTE_LCD | 609 | #ifdef HAVE_REMOTE_LCD |
610 | #if LCD_REMOTE_DEPTH > 1 | 610 | #if LCD_REMOTE_DEPTH > 1 |
611 | lcd_remote_set_drawinfo(DRMODE_SOLID, LCD_REMOTE_DEFAULT_FG, | 611 | lcd_remote_set_drawinfo(DRMODE_SOLID, LCD_REMOTE_DEFAULT_FG, |
612 | LCD_REMOTE_DEFAULT_BG); | 612 | LCD_REMOTE_DEFAULT_BG); |
613 | #else | 613 | #else |
614 | lcd_remote_set_drawmode(DRMODE_SOLID); | 614 | lcd_remote_set_drawmode(DRMODE_SOLID); |
diff --git a/apps/plugin.h b/apps/plugin.h index 25bbeb2324..461c0d816a 100644 --- a/apps/plugin.h +++ b/apps/plugin.h | |||
@@ -237,7 +237,7 @@ struct plugin_api { | |||
237 | #if defined(HAVE_REMOTE_LCD) && (LCD_REMOTE_DEPTH > 1) | 237 | #if defined(HAVE_REMOTE_LCD) && (LCD_REMOTE_DEPTH > 1) |
238 | void (*lcd_remote_set_foreground)(unsigned foreground); | 238 | void (*lcd_remote_set_foreground)(unsigned foreground); |
239 | unsigned (*lcd_remote_get_foreground)(void); | 239 | unsigned (*lcd_remote_get_foreground)(void); |
240 | void (*lcd_remote_set_background)(unsigned foreground); | 240 | void (*lcd_remote_set_background)(unsigned background); |
241 | unsigned (*lcd_remote_get_background)(void); | 241 | unsigned (*lcd_remote_get_background)(void); |
242 | void (*lcd_remote_bitmap_part)(const fb_remote_data *src, int src_x, int src_y, | 242 | void (*lcd_remote_bitmap_part)(const fb_remote_data *src, int src_x, int src_y, |
243 | int stride, int x, int y, int width, int height); | 243 | int stride, int x, int y, int width, int height); |
@@ -276,7 +276,7 @@ struct plugin_api { | |||
276 | void (*gui_synclist_scroll_left)(struct gui_synclist * lists); | 276 | void (*gui_synclist_scroll_left)(struct gui_synclist * lists); |
277 | #endif | 277 | #endif |
278 | unsigned (*gui_synclist_do_button)(struct gui_synclist * lists, unsigned button); | 278 | unsigned (*gui_synclist_do_button)(struct gui_synclist * lists, unsigned button); |
279 | 279 | ||
280 | /* button */ | 280 | /* button */ |
281 | long (*button_get)(bool block); | 281 | long (*button_get)(bool block); |
282 | long (*button_get_w_tmo)(int ticks); | 282 | long (*button_get_w_tmo)(int ticks); |
@@ -319,8 +319,8 @@ struct plugin_api { | |||
319 | long* current_tick; | 319 | long* current_tick; |
320 | long (*default_event_handler)(long event); | 320 | long (*default_event_handler)(long event); |
321 | long (*default_event_handler_ex)(long event, void (*callback)(void *), void *parameter); | 321 | long (*default_event_handler_ex)(long event, void (*callback)(void *), void *parameter); |
322 | struct thread_entry* (*create_thread)(void (*function)(void), void* stack, | 322 | struct thread_entry* (*create_thread)(void (*function)(void), void* stack, |
323 | int stack_size, const char *name | 323 | int stack_size, const char *name |
324 | IF_PRIO(, int priority)); | 324 | IF_PRIO(, int priority)); |
325 | void (*remove_thread)(struct thread_entry *thread); | 325 | void (*remove_thread)(struct thread_entry *thread); |
326 | void (*reset_poweroff_timer)(void); | 326 | void (*reset_poweroff_timer)(void); |
diff --git a/apps/screen_access.c b/apps/screen_access.c index 704cab1a37..b784637308 100644 --- a/apps/screen_access.c +++ b/apps/screen_access.c | |||
@@ -52,9 +52,12 @@ void screen_init(struct screen * screen, enum screen_type screen_type) | |||
52 | screen->getstringsize=&lcd_remote_getstringsize; | 52 | screen->getstringsize=&lcd_remote_getstringsize; |
53 | screen->putsxy=&lcd_remote_putsxy; | 53 | screen->putsxy=&lcd_remote_putsxy; |
54 | screen->mono_bitmap=&lcd_remote_mono_bitmap; | 54 | screen->mono_bitmap=&lcd_remote_mono_bitmap; |
55 | screen->mono_bitmap_part=&lcd_remote_mono_bitmap_part; | 55 | screen->mono_bitmap_part=&lcd_remote_mono_bitmap_part; |
56 | screen->set_drawmode=&lcd_remote_set_drawmode; | 56 | screen->set_drawmode=&lcd_remote_set_drawmode; |
57 | #if LCD_REMOTE_DEPTH > 1 | 57 | #if LCD_REMOTE_DEPTH > 1 |
58 | #if defined(HAVE_LCD_COLOR) | ||
59 | screen->color_to_native=&lcd_remote_color_to_native; | ||
60 | #endif | ||
58 | screen->get_background=&lcd_remote_get_background; | 61 | screen->get_background=&lcd_remote_get_background; |
59 | screen->get_foreground=&lcd_remote_get_foreground; | 62 | screen->get_foreground=&lcd_remote_get_foreground; |
60 | screen->set_background=&lcd_remote_set_background; | 63 | screen->set_background=&lcd_remote_set_background; |
@@ -126,9 +129,9 @@ void screen_init(struct screen * screen, enum screen_type screen_type) | |||
126 | screen->mono_bitmap=&lcd_mono_bitmap; | 129 | screen->mono_bitmap=&lcd_mono_bitmap; |
127 | screen->mono_bitmap_part=&lcd_mono_bitmap_part; | 130 | screen->mono_bitmap_part=&lcd_mono_bitmap_part; |
128 | screen->set_drawmode=&lcd_set_drawmode; | 131 | screen->set_drawmode=&lcd_set_drawmode; |
129 | #if LCD_DEPTH > 1 | 132 | #if LCD_DEPTH > 1 |
130 | screen->bitmap=&lcd_bitmap; | 133 | screen->bitmap=&lcd_bitmap; |
131 | screen->bitmap_part=&lcd_bitmap_part; | 134 | screen->bitmap_part=&lcd_bitmap_part; |
132 | #if LCD_DEPTH == 2 | 135 | #if LCD_DEPTH == 2 |
133 | /* No transparency yet for grayscale lcd */ | 136 | /* No transparency yet for grayscale lcd */ |
134 | screen->transparent_bitmap=&lcd_bitmap; | 137 | screen->transparent_bitmap=&lcd_bitmap; |
@@ -137,6 +140,9 @@ void screen_init(struct screen * screen, enum screen_type screen_type) | |||
137 | screen->transparent_bitmap=&lcd_bitmap_transparent; | 140 | screen->transparent_bitmap=&lcd_bitmap_transparent; |
138 | screen->transparent_bitmap_part=&lcd_bitmap_transparent_part; | 141 | screen->transparent_bitmap_part=&lcd_bitmap_transparent_part; |
139 | #endif | 142 | #endif |
143 | #if defined(HAVE_LCD_COLOR) && LCD_REMOTE_DEPTH > 1 | ||
144 | screen->color_to_native=&lcd_color_to_native; | ||
145 | #endif | ||
140 | screen->get_background=&lcd_get_background; | 146 | screen->get_background=&lcd_get_background; |
141 | screen->get_foreground=&lcd_get_foreground; | 147 | screen->get_foreground=&lcd_get_foreground; |
142 | screen->set_background=&lcd_set_background; | 148 | screen->set_background=&lcd_set_background; |
@@ -149,8 +155,8 @@ void screen_init(struct screen * screen, enum screen_type screen_type) | |||
149 | screen->drawline=&lcd_drawline; | 155 | screen->drawline=&lcd_drawline; |
150 | screen->vline=&lcd_vline; | 156 | screen->vline=&lcd_vline; |
151 | screen->hline=&lcd_hline; | 157 | screen->hline=&lcd_hline; |
152 | screen->scroll_speed=&lcd_scroll_speed; | 158 | screen->scroll_speed=&lcd_scroll_speed; |
153 | screen->scroll_delay=&lcd_scroll_delay; | 159 | screen->scroll_delay=&lcd_scroll_delay; |
154 | screen->scroll_step=&lcd_scroll_step; | 160 | screen->scroll_step=&lcd_scroll_step; |
155 | screen->invertscroll=&lcd_invertscroll; | 161 | screen->invertscroll=&lcd_invertscroll; |
156 | screen->puts_offset=&lcd_puts_offset; | 162 | screen->puts_offset=&lcd_puts_offset; |
diff --git a/apps/screen_access.h b/apps/screen_access.h index 680c6625fe..cf74a97ba1 100644 --- a/apps/screen_access.h +++ b/apps/screen_access.h | |||
@@ -72,7 +72,7 @@ struct screen | |||
72 | 72 | ||
73 | void (*scroll_step)(int pixels); | 73 | void (*scroll_step)(int pixels); |
74 | void (*puts_offset)(int x, int y, const unsigned char *str, int offset); | 74 | void (*puts_offset)(int x, int y, const unsigned char *str, int offset); |
75 | void (*puts_style_offset)(int x, int y, const unsigned char *str, | 75 | void (*puts_style_offset)(int x, int y, const unsigned char *str, |
76 | int style, int offset); | 76 | int style, int offset); |
77 | void (*puts_scroll_style)(int x, int y, const unsigned char *string, | 77 | void (*puts_scroll_style)(int x, int y, const unsigned char *string, |
78 | int style); | 78 | int style); |
@@ -87,12 +87,15 @@ struct screen | |||
87 | void (*bitmap)(const fb_data *src, | 87 | void (*bitmap)(const fb_data *src, |
88 | int x, int y, int width, int height); | 88 | int x, int y, int width, int height); |
89 | void (*bitmap_part)(const fb_data *src, int src_x, int src_y, | 89 | void (*bitmap_part)(const fb_data *src, int src_x, int src_y, |
90 | int stride, int x, int y, int width, int height); | 90 | int stride, int x, int y, int width, int height); |
91 | void (*transparent_bitmap)(const fb_data *src, | 91 | void (*transparent_bitmap)(const fb_data *src, |
92 | int x, int y, int width, int height); | 92 | int x, int y, int width, int height); |
93 | void (*transparent_bitmap_part)(const fb_data *src, int src_x, int src_y, | 93 | void (*transparent_bitmap_part)(const fb_data *src, int src_x, int src_y, |
94 | int stride, int x, int y, int width, int height); | 94 | int stride, int x, int y, int width, int height); |
95 | void (*set_drawmode)(int mode); | 95 | void (*set_drawmode)(int mode); |
96 | #if defined(HAVE_LCD_COLOR) && LCD_REMOTE_DEPTH > 1 | ||
97 | unsigned (*color_to_native)(unsigned color); | ||
98 | #endif | ||
96 | #if (LCD_DEPTH > 1) || (LCD_REMOTE_DEPTH > 1) | 99 | #if (LCD_DEPTH > 1) || (LCD_REMOTE_DEPTH > 1) |
97 | unsigned (*get_background)(void); | 100 | unsigned (*get_background)(void); |
98 | unsigned (*get_foreground)(void); | 101 | unsigned (*get_foreground)(void); |