blob: edf464fb7af61d0ec0d376398de4f73baa6cf5ac [file] [log] [blame]
Nicolas Pennequin9d4bed72007-11-11 12:29:37 +00001/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2007 Nicolas Pennequin
11 *
Daniel Stenberg2acc0ac2008-06-28 18:10:04 +000012 * 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.
Nicolas Pennequin9d4bed72007-11-11 12:29:37 +000016 *
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
19 *
20 ****************************************************************************/
21
22#ifndef _ALBUMART_H_
23#define _ALBUMART_H_
24
Andrew Mahone6fc558b2009-01-24 09:29:22 +000025#if defined(HAVE_ALBUMART) || defined(PLUGIN)
Nicolas Pennequin9d4bed72007-11-11 12:29:37 +000026
27#include <stdbool.h>
Björn Stenberg51b45d52008-10-15 06:38:51 +000028#include "metadata.h"
Nicolas Pennequin9d4bed72007-11-11 12:29:37 +000029#include "gwps.h"
30
31/* Look for albumart bitmap in the same dir as the track and in its parent dir.
32 * Stores the found filename in the buf parameter.
33 * Returns true if a bitmap was found, false otherwise */
34bool find_albumart(const struct mp3entry *id3, char *buf, int buflen);
35
Nicolas Pennequin81dedee2007-11-12 01:31:42 +000036/* Draw the album art bitmap from the given handle ID onto the given WPS.
37 Call with clear = true to clear the bitmap instead of drawing it. */
38void draw_album_art(struct gui_wps *gwps, int handle_id, bool clear);
Nicolas Pennequin9d4bed72007-11-11 12:29:37 +000039
Nicolas Pennequin90ce8262007-12-09 18:48:02 +000040bool search_albumart_files(const struct mp3entry *id3, const char *size_string,
41 char *buf, int buflen);
42
Andrew Mahone781421a2008-12-09 23:07:59 +000043void get_albumart_size(struct bitmap *bmp);
44
Nicolas Pennequin9d4bed72007-11-11 12:29:37 +000045#endif /* HAVE_ALBUMART */
46
47#endif /* _ALBUMART_H_ */