-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathui.h
67 lines (50 loc) · 2.2 KB
/
ui.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/*
Infobar plugin for DeaDBeeF music player
Copyright (C) 2011-2012 Dmitriy Simbiriatin <dmitriy.simbiriatin@gmail.com>
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.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef INFOBAR_UI_HEADER
#define INFOBAR_UI_HEADER
#include <stdio.h>
#include <stdlib.h>
#include <gtk/gtk.h>
#include <deadbeef/deadbeef.h>
#include <deadbeef/gtkui_api.h>
#include "infobar.h"
#include "types.h"
#include "utils.h"
/* Messages. */
#define TITLE_UNKNOWN "Unknown title"
#define ARTIST_UNKNOWN "Unknown artist"
#define LYR_NOT_FOUND "Lyrics not found."
/* Properties. */
#define BIO_IMAGE_HEIGHT 220
/* Infobar widget. */
GtkWidget *infobar;
/* Creates infobar with all available tabs. */
void create_infobar(void);
/* Updates "Similar" tab with the new list of similar artists. */
void update_similar_view(SimilarInfo *similar, size_t size);
/* Updates "Biography" tab with the new artist's image and biography text. */
void update_bio_view(const char *bio_txt, const char *img_file);
/* Updates "Lyrics" tab with the new lyrics. */
void update_lyrics_view(const char *lyr_txt, DB_playItem_t *track);
/* This function should be invoked, when some changes to the plug-in's
* configuration were made. It updates infobar view according to the
* new changes. */
void infobar_config_changed(void);
/* Callback function to initialize widget called during plug-in connect. */
void infobar_init(struct ddb_gtkui_widget_s *widget);
/* Callback function to destroy widget called during plug-in disconnect. */
void infobar_destroy(struct ddb_gtkui_widget_s *widget);
#endif