summaryrefslogtreecommitdiff
path: root/apps/gui/gwps.h
diff options
context:
space:
mode:
authorNicolas Pennequin <nicolas.pennequin@free.fr>2007-11-11 12:29:37 +0000
committerNicolas Pennequin <nicolas.pennequin@free.fr>2007-11-11 12:29:37 +0000
commit9d4bed7ff06818b098926932db824a8d6532bfee (patch)
tree0a1cfa6a98a75a2badc1a8d2a2d7839454522beb /apps/gui/gwps.h
parentf34720b163aff1d167ae031f23f3250356aa2c1b (diff)
downloadrockbox-9d4bed7ff06818b098926932db824a8d6532bfee.tar.gz
rockbox-9d4bed7ff06818b098926932db824a8d6532bfee.zip
Album art support. Based on FS#3045, but heavily modified to adapt to MoB and for cleanness.
The cover pictures are loaded from external bitmaps. JPEG and embedded art are not supported. The pictures will only be drawn on the main display. There is no resizing but it is possible to specify the WPS bitmap size in the bitmap names (e.g. cover.100x100.bmp). The bitmaps are stored in the main buffer and read directly from there. Currently, duplicate bitmaps will simply be present several times in the buffer, but this will be improved. To enable for a target, #define HAVE_ALBUMART in its config file. For more information, see the wiki page: http://www.rockbox.org/wiki/AlbumArt. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15572 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/gwps.h')
-rw-r--r--apps/gui/gwps.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/apps/gui/gwps.h b/apps/gui/gwps.h
index 83ff14b80b..391fc72943 100644
--- a/apps/gui/gwps.h
+++ b/apps/gui/gwps.h
@@ -39,6 +39,23 @@
39#define WPS_ALIGN_CENTER 64 39#define WPS_ALIGN_CENTER 64
40#define WPS_ALIGN_LEFT 128 40#define WPS_ALIGN_LEFT 128
41 41
42#ifdef HAVE_ALBUMART
43
44/* albumart definitions */
45#define WPS_ALBUMART_NONE 0 /* WPS does not contain AA tag */
46#define WPS_ALBUMART_CHECK 1 /* WPS contains AA conditional tag */
47#define WPS_ALBUMART_LOAD 2 /* WPS contains AA tag */
48
49#define WPS_ALBUMART_ALIGN_RIGHT WPS_ALIGN_RIGHT /* x align: right */
50#define WPS_ALBUMART_ALIGN_CENTER WPS_ALIGN_CENTER /* x/y align: center */
51#define WPS_ALBUMART_ALIGN_LEFT WPS_ALIGN_LEFT /* x align: left */
52#define WPS_ALBUMART_ALIGN_TOP WPS_ALIGN_RIGHT /* y align: top */
53#define WPS_ALBUMART_ALIGN_BOTTOM WPS_ALIGN_LEFT /* y align: bottom */
54#define WPS_ALBUMART_INCREASE 8 /* increase if smaller */
55#define WPS_ALBUMART_DECREASE 16 /* decrease if larger */
56
57#endif /* HAVE_ALBUMART */
58
42/* wps_data*/ 59/* wps_data*/
43 60
44#ifdef HAVE_LCD_BITMAP 61#ifdef HAVE_LCD_BITMAP
@@ -187,6 +204,12 @@ enum wps_token_type {
187 WPS_TOKEN_IMAGE_DISPLAY, 204 WPS_TOKEN_IMAGE_DISPLAY,
188#endif 205#endif
189 206
207#ifdef HAVE_ALBUMART
208 /* Albumart */
209 WPS_TOKEN_ALBUMART_DISPLAY,
210 WPS_TOKEN_ALBUMART_FOUND,
211#endif
212
190 /* Metadata */ 213 /* Metadata */
191 WPS_TOKEN_METADATA_ARTIST, 214 WPS_TOKEN_METADATA_ARTIST,
192 WPS_TOKEN_METADATA_COMPOSER, 215 WPS_TOKEN_METADATA_COMPOSER,
@@ -309,6 +332,20 @@ struct wps_data
309 short progress_start; 332 short progress_start;
310 short progress_end; 333 short progress_end;
311 bool peak_meter_enabled; 334 bool peak_meter_enabled;
335
336#ifdef HAVE_ALBUMART
337 /* Album art support */
338 unsigned char wps_uses_albumart; /* WPS_ALBUMART_NONE, _CHECK, _LOAD */
339 short albumart_x;
340 short albumart_y;
341 unsigned short albumart_xalign; /* WPS_ALBUMART_ALIGN_LEFT, _CENTER, _RIGHT,
342 + .._INCREASE, + .._DECREASE */
343 unsigned short albumart_yalign; /* WPS_ALBUMART_ALIGN_TOP, _CENTER, _BOTTOM,
344 + .._INCREASE, + .._DECREASE */
345 short albumart_max_width;
346 short albumart_max_height;
347#endif
348
312#else /*HAVE_LCD_CHARCELLS */ 349#else /*HAVE_LCD_CHARCELLS */
313 unsigned short wps_progress_pat[8]; 350 unsigned short wps_progress_pat[8];
314 bool full_line_progressbar; 351 bool full_line_progressbar;
@@ -417,4 +454,9 @@ extern struct gui_wps gui_wps[NB_SCREENS];
417void gui_sync_wps_init(void); 454void gui_sync_wps_init(void);
418void gui_sync_wps_screen_init(void); 455void gui_sync_wps_screen_init(void);
419 456
457#ifdef HAVE_ALBUMART
458/* gives back if WPS contains an albumart tag */
459bool gui_sync_wps_uses_albumart(void);
460#endif
461
420#endif 462#endif