From da9af1db7efaa9e6ebca68db76e1c10956f777ba Mon Sep 17 00:00:00 2001 From: Alexey Yakovenko Date: Sat, 9 Nov 2013 17:08:11 +0100 Subject: gtkui: added API for accessing album covers from widget plugins --- plugins/gtkui/gtkui_api.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'plugins/gtkui/gtkui_api.h') diff --git a/plugins/gtkui/gtkui_api.h b/plugins/gtkui/gtkui_api.h index e57d99a3..c8057339 100644 --- a/plugins/gtkui/gtkui_api.h +++ b/plugins/gtkui/gtkui_api.h @@ -191,5 +191,16 @@ typedef struct { // function to create the standard playlist context menu (the same as // appears when right-clicked on playlist tab) GtkWidget* (*create_pltmenu) (int plt_idx); + + // get_cover_art_pixbuf will return pixbuf, if available. + // if not available, the requested cover will be loaded asyncronously. + // the callback will be called when the requested cover is available, + // in which case you will need to call the get_cover_art_pixbuf again from + // the callback. + GdkPixbuf *(*get_cover_art_pixbuf) (const char *uri, const char *artist, const char *album, int size, void (*callback)(void *user_data), void *user_data); + + // get_default_cover_pixbuf returns the default cover art image + GdkPixbuf *(*cover_get_default_pixbuf) (void); } ddb_gtkui_t; + #endif -- cgit v1.2.3