2007-11-11 12:29:37 +00:00
|
|
|
/***************************************************************************
|
|
|
|
* __________ __ ___.
|
|
|
|
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
|
|
|
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
|
|
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
|
|
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
|
|
|
* \/ \/ \/ \/ \/
|
|
|
|
* $Id$
|
|
|
|
*
|
|
|
|
* Copyright (C) 2007 Nicolas Pennequin
|
|
|
|
*
|
2008-06-28 18:10:04 +00:00
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
2007-11-11 12:29:37 +00:00
|
|
|
*
|
|
|
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
|
|
* KIND, either express or implied.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
#ifndef _ALBUMART_H_
|
|
|
|
#define _ALBUMART_H_
|
|
|
|
|
2009-01-24 09:29:22 +00:00
|
|
|
#if defined(HAVE_ALBUMART) || defined(PLUGIN)
|
2007-11-11 12:29:37 +00:00
|
|
|
|
|
|
|
#include <stdbool.h>
|
2008-10-15 06:38:51 +00:00
|
|
|
#include "metadata.h"
|
2009-08-03 04:43:34 +00:00
|
|
|
#include "skin_engine/skin_engine.h"
|
2007-11-11 12:29:37 +00:00
|
|
|
|
|
|
|
/* Look for albumart bitmap in the same dir as the track and in its parent dir.
|
2009-10-16 19:14:41 +00:00
|
|
|
* Calls size_func to get the dimensions to look for
|
2007-11-11 12:29:37 +00:00
|
|
|
* Stores the found filename in the buf parameter.
|
|
|
|
* Returns true if a bitmap was found, false otherwise */
|
2009-10-16 19:14:41 +00:00
|
|
|
bool find_albumart(const struct mp3entry *id3, char *buf, int buflen,
|
|
|
|
struct dim *dim);
|
2007-11-11 12:29:37 +00:00
|
|
|
|
2010-07-29 12:37:48 +00:00
|
|
|
#ifndef PLUGIN
|
|
|
|
/* Draw the album art bitmap from the given handle ID onto the given Skin.
|
2007-11-12 01:31:42 +00:00
|
|
|
Call with clear = true to clear the bitmap instead of drawing it. */
|
|
|
|
void draw_album_art(struct gui_wps *gwps, int handle_id, bool clear);
|
2010-07-29 12:37:48 +00:00
|
|
|
#endif
|
2007-11-11 12:29:37 +00:00
|
|
|
|
2007-12-09 18:48:02 +00:00
|
|
|
bool search_albumart_files(const struct mp3entry *id3, const char *size_string,
|
|
|
|
char *buf, int buflen);
|
|
|
|
|
2008-12-09 23:07:59 +00:00
|
|
|
void get_albumart_size(struct bitmap *bmp);
|
|
|
|
|
2007-11-11 12:29:37 +00:00
|
|
|
#endif /* HAVE_ALBUMART */
|
|
|
|
|
|
|
|
#endif /* _ALBUMART_H_ */
|