Android: When the backlight goes off, the RockboxFramebuffer/View isn't made invisibl...
[maemo-rb.git] / firmware / export / lcd.h
blobe6e19b159713ba2c91d74727e442c1d108ea81b9
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * Copyright (C) 2002 by Alan Korr
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
20 ****************************************************************************/
22 #ifndef __LCD_H__
23 #define __LCD_H__
25 #include <stdbool.h>
26 #include "cpu.h"
27 #include "config.h"
28 #include "events.h"
30 #define VP_FLAG_ALIGN_RIGHT 0x01
31 #define VP_FLAG_ALIGN_CENTER 0x02
33 #define VP_FLAG_ALIGNMENT_MASK \
34 (VP_FLAG_ALIGN_RIGHT|VP_FLAG_ALIGN_CENTER)
36 #define VP_IS_RTL(vp) (((vp)->flags & VP_FLAG_ALIGNMENT_MASK) == VP_FLAG_ALIGN_RIGHT)
38 struct viewport {
39 int x;
40 int y;
41 int width;
42 int height;
43 #ifdef HAVE_LCD_BITMAP
44 int flags;
45 int font;
46 int drawmode;
47 #endif
48 #if LCD_DEPTH > 1
49 unsigned fg_pattern;
50 unsigned bg_pattern;
51 #ifdef HAVE_LCD_COLOR
52 unsigned lss_pattern;
53 unsigned lse_pattern;
54 unsigned lst_pattern;
55 #endif
56 #endif
59 /* Frame buffer stride
61 * Stride describes the amount that you need to increment to get to the next
62 * line. For screens that have the pixels in contiguous horizontal strips
63 * stride should be equal to the image width.
65 * For example, if the screen pixels are layed out as follows:
67 * width0 width1 width2 widthX-1
68 * ------ ------ ------ ------------------ --------
69 * height0 | pixel0 pixel1 pixel2 ----------------> pixelX-1
70 * height1 | pixelX
72 * then you need to add X pixels to get to the next line. (the next line
73 * in this case is height1).
75 * Similarly, if the screen has the pixels in contiguous vertical strips
76 * the stride would be equal to the image height.
78 * For example if the screen pixels are layed out as follows:
80 * width0 width1
81 * ------ ------
82 * height0 | pixel0 pixelY
83 * height1 | pixel1
84 * height2 | pixel2
85 * | | |
86 * \|/ | \|/
87 * heightY-1 | pixelY-1
89 * then you would need to add Y pixels to get to the next line (the next
90 * line in this case is from width0 to width1).
92 * The remote might have a different stride than the main screen so the screen
93 * number needs to be passed to the STRIDE macro so that the appropriate height
94 * or width can be passed to the lcd_bitmap, or lcd_remote_bitmap calls.
96 * STRIDE_REMOTE and STRIDE_MAIN should never be used when it is not clear whether
97 * lcd_remote_bitmap calls or lcd_bitmap calls are being made (for example the
98 * screens api).
100 * Screen should always use the screen_type enum that is at the top of this
101 * header.
103 enum screen_type {
104 SCREEN_MAIN
105 #ifdef HAVE_REMOTE_LCD
106 ,SCREEN_REMOTE
107 #endif
110 #if defined(LCD_STRIDEFORMAT) && LCD_STRIDEFORMAT == VERTICAL_STRIDE
111 #define STRIDE_MAIN(w, h) (h)
112 #else
113 #define STRIDE_MAIN(w, h) (w)
114 #endif
116 #define STRIDE_REMOTE(w, h) (w)
118 #define STRIDE(screen, w, h) (screen==SCREEN_MAIN?STRIDE_MAIN((w), \
119 (h)):STRIDE_REMOTE((w),(h)))
121 #define STYLE_DEFAULT 0x00000000
122 #define STYLE_COLORED 0x10000000
123 #define STYLE_INVERT 0x20000000
124 #define STYLE_COLORBAR 0x40000000
125 #define STYLE_GRADIENT 0x80000000
126 #define STYLE_MODE_MASK 0xF0000000
127 #define STYLE_COLOR_MASK 0x0000FFFF
128 #ifdef HAVE_LCD_COLOR
129 #define STYLE_CURLN_MASK 0x0000FF00
130 #define STYLE_MAXLN_MASK 0x000000FF
131 #define CURLN_PACK(x) (((x)<<8) & STYLE_CURLN_MASK)
132 #define CURLN_UNPACK(x) ((unsigned char)(((x)&STYLE_CURLN_MASK) >> 8))
133 #define NUMLN_PACK(x) ((x) & STYLE_MAXLN_MASK)
134 #define NUMLN_UNPACK(x) ((unsigned char)((x) & STYLE_MAXLN_MASK))
135 #endif
137 #ifdef HAVE_LCD_BITMAP
138 #if LCD_DEPTH <=8
139 #if (LCD_PIXELFORMAT == VERTICAL_INTERLEAVED) \
140 || (LCD_PIXELFORMAT == HORIZONTAL_INTERLEAVED)
141 typedef unsigned short fb_data;
142 #define FB_DATA_SZ 2
143 #else
144 typedef unsigned char fb_data;
145 #define FB_DATA_SZ 1
146 #endif
147 #elif LCD_DEPTH <= 16
148 typedef unsigned short fb_data;
149 #define FB_DATA_SZ 2
150 #else /* LCD_DEPTH > 16 */
151 typedef unsigned long fb_data;
152 #define FB_DATA_SZ 4
153 #endif /* LCD_DEPTH */
155 #else /* LCD_CHARCELLS */
156 typedef unsigned char fb_data;
157 #endif
159 #if defined(HAVE_LCD_MODES)
160 void lcd_set_mode(int mode);
161 #define LCD_MODE_RGB565 0x00000001
162 #define LCD_MODE_YUV 0x00000002
163 #define LCD_MODE_PAL256 0x00000004
165 #if HAVE_LCD_MODES & LCD_MODE_PAL256
166 void lcd_blit_pal256(unsigned char *src, int src_x, int src_y, int x, int y,
167 int width, int height);
168 void lcd_pal256_update_pal(fb_data *palette);
169 #endif
170 #endif
173 /* common functions */
174 extern void lcd_write_command(int byte);
175 extern void lcd_write_command_e(int cmd, int data);
176 extern void lcd_write_command_ex(int cmd, int data1, int data2);
177 extern void lcd_write_data(const fb_data* p_bytes, int count);
178 extern void lcd_init(void) INIT_ATTR;
179 extern void lcd_init_device(void) INIT_ATTR;
181 extern void lcd_backlight(bool on);
182 extern int lcd_default_contrast(void);
183 extern void lcd_set_contrast(int val);
184 extern int lcd_getwidth(void);
185 extern int lcd_getheight(void);
186 extern int lcd_getstringsize(const unsigned char *str, int *w, int *h);
188 extern void lcd_set_viewport(struct viewport* vp);
189 extern void lcd_update(void);
190 extern void lcd_update_viewport(void);
191 extern void lcd_clear_viewport(void);
192 extern void lcd_clear_display(void);
193 extern void lcd_putsxy(int x, int y, const unsigned char *string);
194 extern void lcd_putsxyf(int x, int y, const unsigned char *fmt, ...);
195 extern void lcd_putsxy_style_offset(int x, int y, const unsigned char *str,
196 int style, int offset);
197 extern void lcd_puts(int x, int y, const unsigned char *string);
198 extern void lcd_putsf(int x, int y, const unsigned char *fmt, ...);
199 extern void lcd_puts_style(int x, int y, const unsigned char *string, int style);
200 extern void lcd_puts_offset(int x, int y, const unsigned char *str, int offset);
201 extern void lcd_puts_scroll_offset(int x, int y, const unsigned char *string,
202 int offset);
203 extern void lcd_putc(int x, int y, unsigned long ucs);
204 extern void lcd_stop_scroll(void);
205 extern void lcd_bidir_scroll(int threshold);
206 extern void lcd_scroll_speed(int speed);
207 extern void lcd_scroll_delay(int ms);
208 extern void lcd_puts_scroll(int x, int y, const unsigned char* string);
209 extern void lcd_puts_scroll_style(int x, int y, const unsigned char* string,
210 int style);
212 #ifdef HAVE_LCD_BITMAP
214 /* performance function */
215 #if defined(HAVE_LCD_COLOR)
216 #if MEMORYSIZE > 2
217 #define LCD_YUV_DITHER 0x1
218 extern void lcd_yuv_set_options(unsigned options);
219 extern void lcd_blit_yuv(unsigned char * const src[3],
220 int src_x, int src_y, int stride,
221 int x, int y, int width, int height);
222 #endif /* MEMORYSIZE > 2 */
223 #else
224 extern void lcd_blit_mono(const unsigned char *data, int x, int by, int width,
225 int bheight, int stride);
226 extern void lcd_blit_grey_phase(unsigned char *values, unsigned char *phases,
227 int bx, int by, int bwidth, int bheight,
228 int stride);
229 #endif
232 /* update a fraction of the screen */
233 extern void lcd_update_rect(int x, int y, int width, int height);
234 extern void lcd_update_viewport_rect(int x, int y, int width, int height);
236 #ifdef HAVE_REMOTE_LCD
237 extern void lcd_remote_update(void);
238 /* update a fraction of the screen */
239 extern void lcd_remote_update_rect(int x, int y, int width, int height);
240 #endif /* HAVE_REMOTE_LCD */
241 #endif /* HAVE_LCD_BITMAP */
243 #ifdef HAVE_LCD_CHARCELLS
245 /* Icon definitions for lcd_icon() */
246 enum
248 ICON_BATTERY = 0,
249 ICON_BATTERY_1,
250 ICON_BATTERY_2,
251 ICON_BATTERY_3,
252 ICON_USB,
253 ICON_PLAY,
254 ICON_RECORD,
255 ICON_PAUSE,
256 ICON_AUDIO,
257 ICON_REPEAT,
258 ICON_1,
259 ICON_VOLUME,
260 ICON_VOLUME_1,
261 ICON_VOLUME_2,
262 ICON_VOLUME_3,
263 ICON_VOLUME_4,
264 ICON_VOLUME_5,
265 ICON_PARAM
268 void lcd_icon(int icon, bool enable);
269 void lcd_double_height(bool on);
270 void lcd_define_pattern(unsigned long ucs, const char *pattern);
271 unsigned long lcd_get_locked_pattern(void);
272 void lcd_unlock_pattern(unsigned long ucs);
273 void lcd_put_cursor(int x, int y, unsigned long cursor_ucs);
274 void lcd_remove_cursor(void);
275 #define JUMP_SCROLL_ALWAYS 5
276 extern void lcd_jump_scroll(int mode); /* 0=off, 1=once, ..., ALWAYS */
277 extern void lcd_jump_scroll_delay(int ms);
278 #endif /* HAVE_LCD_CHARCELLS */
280 /* Draw modes */
281 #define DRMODE_COMPLEMENT 0
282 #define DRMODE_BG 1
283 #define DRMODE_FG 2
284 #define DRMODE_SOLID 3
285 #define DRMODE_INVERSEVID 4 /* used as bit modifier for basic modes */
287 /* Low-level drawing function types */
288 typedef void lcd_pixelfunc_type(int x, int y);
289 typedef void lcd_blockfunc_type(fb_data *address, unsigned mask, unsigned bits);
290 #if LCD_DEPTH >= 8
291 typedef void lcd_fastpixelfunc_type(fb_data *address);
292 #endif
294 #ifdef HAVE_LCD_BITMAP
296 #if defined(HAVE_LCD_COLOR) && defined(LCD_REMOTE_DEPTH) && \
297 LCD_REMOTE_DEPTH > 1
298 /* Just return color for screens use */
299 static inline unsigned lcd_color_to_native(unsigned color)
300 { return color; }
301 #define SCREEN_COLOR_TO_NATIVE(screen, color) (screen)->color_to_native(color)
302 #else
303 #define SCREEN_COLOR_TO_NATIVE(screen, color) (color)
304 #endif
306 #ifdef HAVE_LCD_COLOR
307 #if LCD_PIXELFORMAT == RGB565 || LCD_PIXELFORMAT == RGB565SWAPPED
308 #define LCD_MAX_RED 31
309 #define LCD_MAX_GREEN 63
310 #define LCD_MAX_BLUE 31
311 #define LCD_RED_BITS 5
312 #define LCD_GREEN_BITS 6
313 #define LCD_BLUE_BITS 5
315 /* pack/unpack native RGB values */
316 #define _RGBPACK_LCD(r, g, b) ( ((r) << 11) | ((g) << 5) | (b) )
317 #define _RGB_UNPACK_RED_LCD(x) ( (((x) >> 11) ) )
318 #define _RGB_UNPACK_GREEN_LCD(x) ( (((x) >> 5) & 0x3f) )
319 #define _RGB_UNPACK_BLUE_LCD(x) ( (((x) ) & 0x1f) )
321 /* pack/unpack 24-bit RGB values */
322 #define _RGBPACK(r, g, b) _RGBPACK_LCD((r) >> 3, (g) >> 2, (b) >> 3)
323 #define _RGB_UNPACK_RED(x) ( (((x) >> 8) & 0xf8) | (((x) >> 13) & 0x07) )
324 #define _RGB_UNPACK_GREEN(x) ( (((x) >> 3) & 0xfc) | (((x) >> 9) & 0x03) )
325 #define _RGB_UNPACK_BLUE(x) ( (((x) << 3) & 0xf8) | (((x) >> 2) & 0x07) )
327 #if (LCD_PIXELFORMAT == RGB565SWAPPED)
328 /* RGB3553 */
329 #define _LCD_UNSWAP_COLOR(x) swap16(x)
330 #define LCD_RGBPACK_LCD(r, g, b) ( (((r) << 3) ) | \
331 (((g) >> 3) ) | \
332 (((g) & 0x07) << 13) | \
333 (((b) << 8) ) )
334 #define LCD_RGBPACK(r, g, b) ( (((r) >> 3) << 3) | \
335 (((g) >> 5) ) | \
336 (((g) & 0x1c) << 11) | \
337 (((b) >> 3) << 8) )
338 /* swap color once - not currenly used in static inits */
339 #define _SWAPUNPACK(x, _unp_) \
340 ({ typeof (x) _x_ = swap16(x); _unp_(_x_); })
341 #define RGB_UNPACK_RED(x) _SWAPUNPACK((x), _RGB_UNPACK_RED)
342 #define RGB_UNPACK_GREEN(x) _SWAPUNPACK((x), _RGB_UNPACK_GREEN)
343 #define RGB_UNPACK_BLUE(x) _SWAPUNPACK((x), _RGB_UNPACK_BLUE)
344 #define RGB_UNPACK_RED_LCD(x) _SWAPUNPACK((x), _RGB_UNPACK_RED_LCD)
345 #define RGB_UNPACK_GREEN_LCD(x) _SWAPUNPACK((x), _RGB_UNPACK_GREEN_LCD)
346 #define RGB_UNPACK_BLUE_LCD(x) _SWAPUNPACK((x), _RGB_UNPACK_BLUE_LCD)
347 #else /* LCD_PIXELFORMAT == RGB565 */
348 /* RGB565 */
349 #define _LCD_UNSWAP_COLOR(x) (x)
350 #define LCD_RGBPACK(r, g, b) _RGBPACK((r), (g), (b))
351 #define LCD_RGBPACK_LCD(r, g, b) _RGBPACK_LCD((r), (g), (b))
352 #define RGB_UNPACK_RED(x) _RGB_UNPACK_RED(x)
353 #define RGB_UNPACK_GREEN(x) _RGB_UNPACK_GREEN(x)
354 #define RGB_UNPACK_BLUE(x) _RGB_UNPACK_BLUE(x)
355 #define RGB_UNPACK_RED_LCD(x) _RGB_UNPACK_RED_LCD(x)
356 #define RGB_UNPACK_GREEN_LCD(x) _RGB_UNPACK_GREEN_LCD(x)
357 #define RGB_UNPACK_BLUE_LCD(x) _RGB_UNPACK_BLUE_LCD(x)
358 #endif /* RGB565* */
359 #else
360 /* other colour depths */
361 #endif
363 #define LCD_BLACK LCD_RGBPACK(0, 0, 0)
364 #define LCD_DARKGRAY LCD_RGBPACK(85, 85, 85)
365 #define LCD_LIGHTGRAY LCD_RGBPACK(170, 170, 170)
366 #define LCD_WHITE LCD_RGBPACK(255, 255, 255)
367 #define LCD_DEFAULT_FG LCD_WHITE
368 #define LCD_DEFAULT_BG LCD_BLACK
369 #define LCD_DEFAULT_LS LCD_WHITE
371 #elif LCD_DEPTH > 1 /* greyscale */
373 #define LCD_MAX_LEVEL ((1 << LCD_DEPTH) - 1)
374 #define LCD_BRIGHTNESS(y) (((y) * LCD_MAX_LEVEL + 127) / 255)
376 #define LCD_BLACK LCD_BRIGHTNESS(0)
377 #define LCD_DARKGRAY LCD_BRIGHTNESS(85)
378 #define LCD_LIGHTGRAY LCD_BRIGHTNESS(170)
379 #define LCD_WHITE LCD_BRIGHTNESS(255)
380 #define LCD_DEFAULT_FG LCD_BLACK
381 #define LCD_DEFAULT_BG LCD_WHITE
383 #endif /* HAVE_LCD_COLOR */
385 /* Frame buffer dimensions */
386 #if LCD_DEPTH == 1
387 #if LCD_PIXELFORMAT == HORIZONTAL_PACKING
388 #define LCD_FBWIDTH ((LCD_WIDTH+7)/8)
389 #else /* LCD_PIXELFORMAT == VERTICAL_PACKING */
390 #define LCD_FBHEIGHT ((LCD_HEIGHT+7)/8)
391 #endif /* LCD_PIXELFORMAT */
392 #elif LCD_DEPTH == 2
393 #if LCD_PIXELFORMAT == HORIZONTAL_PACKING
394 #define LCD_FBWIDTH ((LCD_WIDTH+3)/4)
395 #elif LCD_PIXELFORMAT == VERTICAL_PACKING
396 #define LCD_FBHEIGHT ((LCD_HEIGHT+3)/4)
397 #elif LCD_PIXELFORMAT == VERTICAL_INTERLEAVED
398 #define LCD_FBHEIGHT ((LCD_HEIGHT+7)/8)
399 #endif /* LCD_PIXELFORMAT */
400 #endif /* LCD_DEPTH */
401 /* Set defaults if not defined different yet. The defaults apply to both
402 * dimensions for LCD_DEPTH >= 8 */
403 #ifndef LCD_FBWIDTH
404 #define LCD_FBWIDTH LCD_WIDTH
405 #endif
406 #ifndef LCD_FBHEIGHT
407 #define LCD_FBHEIGHT LCD_HEIGHT
408 #endif
409 /* The actual framebuffer */
410 extern fb_data lcd_framebuffer[LCD_FBHEIGHT][LCD_FBWIDTH];
412 /** Port-specific functions. Enable in port config file. **/
413 #ifdef HAVE_REMOTE_LCD_AS_MAIN
414 void lcd_on(void);
415 void lcd_off(void);
416 void lcd_poweroff(void);
417 #endif
419 #ifdef HAVE_LCD_ENABLE
420 /* Enable/disable the main display. */
421 extern void lcd_enable(bool on);
422 #endif /* HAVE_LCD_ENABLE */
424 #ifdef HAVE_LCD_SLEEP
425 /* Put the LCD into a power saving state deeper than lcd_enable(false). */
426 extern void lcd_sleep(void);
427 #endif /* HAVE_LCD_SLEEP */
428 #if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP)
429 /* Register a hook that is called when the lcd is powered and after the
430 * framebuffer data is synchronized */
431 /* Sansa Clip has these function in it's lcd driver, since it's the only
432 * 1-bit display featuring lcd_active, so far */
434 enum {
435 LCD_EVENT_ACTIVATION = (EVENT_CLASS_LCD|1),
438 extern bool lcd_active(void);
439 #endif
441 #ifdef HAVE_LCD_SHUTDOWN
442 extern void lcd_shutdown(void);
443 #endif
445 /* Bitmap formats */
446 enum
448 FORMAT_MONO,
449 FORMAT_NATIVE,
450 FORMAT_ANY /* For passing to read_bmp_file() */
453 #define FORMAT_TRANSPARENT 0x40000000
454 #define FORMAT_DITHER 0x20000000
455 #define FORMAT_REMOTE 0x10000000
456 #define FORMAT_RESIZE 0x08000000
457 #define FORMAT_KEEP_ASPECT 0x04000000
458 #define FORMAT_RETURN_SIZE 0x02000000
460 #define TRANSPARENT_COLOR LCD_RGBPACK(255,0,255)
461 #define REPLACEWITHFG_COLOR LCD_RGBPACK(0,255,255)
463 struct bitmap {
464 int width;
465 int height;
466 #if (LCD_DEPTH > 1) || defined(HAVE_REMOTE_LCD) && (LCD_REMOTE_DEPTH > 1)
467 int format;
468 unsigned char *maskdata;
469 #endif
470 unsigned char *data;
473 extern void lcd_set_invert_display(bool yesno);
474 #ifdef HAVE_BACKLIGHT_INVERSION
475 extern void lcd_set_backlight_inversion(bool yesno);
476 #endif /* HAVE_BACKLIGHT_INVERSION */
477 extern void lcd_set_flip(bool yesno);
479 extern void lcd_set_drawmode(int mode);
480 extern int lcd_get_drawmode(void);
481 extern void lcd_setfont(int font);
482 extern int lcd_getfont(void);
484 extern void lcd_puts_style_offset(int x, int y, const unsigned char *str,
485 int style, int x_offset);
486 extern void lcd_puts_style_xyoffset(int x, int y, const unsigned char *str,
487 int style, int x_offset, int y_offset);
488 extern void lcd_puts_scroll_style_offset(int x, int y, const unsigned char *string,
489 int style, int x_offset);
490 extern void lcd_puts_scroll_style_xyoffset(int x, int y, const unsigned char *string,
491 int style, int x_offset, int y_offset);
493 /* low level drawing function pointer arrays */
494 #if LCD_DEPTH >= 8
495 extern lcd_fastpixelfunc_type* const *lcd_fastpixelfuncs;
496 #elif LCD_DEPTH > 1
497 extern lcd_pixelfunc_type* const *lcd_pixelfuncs;
498 extern lcd_blockfunc_type* const *lcd_blockfuncs;
499 #else /* LCD_DEPTH == 1*/
500 extern lcd_pixelfunc_type* const lcd_pixelfuncs[8];
501 extern lcd_blockfunc_type* const lcd_blockfuncs[8];
502 #endif /* LCD_DEPTH */
504 extern void lcd_drawpixel(int x, int y);
505 extern void lcd_drawline(int x1, int y1, int x2, int y2);
506 extern void lcd_hline(int x1, int x2, int y);
507 extern void lcd_vline(int x, int y1, int y2);
508 extern void lcd_drawrect(int x, int y, int width, int height);
509 extern void lcd_fillrect(int x, int y, int width, int height);
510 extern void lcd_draw_border_viewport(void);
511 extern void lcd_fill_viewport(void);
512 extern void lcd_bitmap_part(const fb_data *src, int src_x, int src_y,
513 int stride, int x, int y, int width, int height);
514 extern void lcd_bitmap(const fb_data *src, int x, int y, int width,
515 int height);
517 extern void lcd_scroll_step(int pixels);
519 #if LCD_DEPTH > 1
520 extern void lcd_set_foreground(unsigned foreground);
521 extern unsigned lcd_get_foreground(void);
522 extern void lcd_set_background(unsigned background);
523 extern unsigned lcd_get_background(void);
524 #ifdef HAVE_LCD_COLOR
525 extern void lcd_set_selector_start(unsigned selector);
526 extern void lcd_set_selector_end(unsigned selector);
527 extern void lcd_set_selector_text(unsigned selector_text);
528 #endif
529 extern void lcd_set_drawinfo(int mode, unsigned foreground,
530 unsigned background);
531 void lcd_set_backdrop(fb_data* backdrop);
533 fb_data* lcd_get_backdrop(void);
535 extern void lcd_mono_bitmap_part(const unsigned char *src, int src_x, int src_y,
536 int stride, int x, int y, int width, int height);
537 extern void lcd_mono_bitmap(const unsigned char *src, int x, int y, int width,
538 int height);
539 extern void lcd_bitmap_transparent_part(const fb_data *src,
540 int src_x, int src_y,
541 int stride, int x, int y, int width,
542 int height);
543 extern void lcd_bitmap_transparent(const fb_data *src, int x, int y,
544 int width, int height);
545 #else /* LCD_DEPTH == 1 */
546 #define lcd_mono_bitmap lcd_bitmap
547 #define lcd_mono_bitmap_part lcd_bitmap_part
548 #endif /* LCD_DEPTH */
550 #endif /* HAVE_LCD_BITMAP */
553 #ifdef HAVE_TOUCHSCREEN
554 /* only needed for touchscreen for now, feel free to implement it for others
555 * once needed
558 /* returns the pixel density of the display */
559 extern int lcd_get_dpi(void);
560 #endif
562 #endif /* __LCD_H__ */