1 /*
2     DeaDBeeF -- the music player
3     Copyright (C) 2009-2015 Alexey Yakovenko and other contributors
4 
5     This software is provided 'as-is', without any express or implied
6     warranty.  In no event will the authors be held liable for any damages
7     arising from the use of this software.
8 
9     Permission is granted to anyone to use this software for any purpose,
10     including commercial applications, and to alter it and redistribute it
11     freely, subject to the following restrictions:
12 
13     1. The origin of this software must not be misrepresented; you must not
14      claim that you wrote the original software. If you use this software
15      in a product, an acknowledgment in the product documentation would be
16      appreciated but is not required.
17 
18     2. Altered source versions must be plainly marked as such, and must not be
19      misrepresented as being the original software.
20 
21     3. This notice may not be removed or altered from any source distribution.
22 */
23 
24 #ifndef __PLCOLUMNS_H
25 #define __PLCOLUMNS_H
26 
27 #include "ddblistview.h"
28 
29 int
30 rewrite_column_config (DdbListview *listview, const char *name);
31 
32 void
33 draw_album_art (DdbListview *listview, cairo_t *drawable, DdbListviewIter group_it, int column, int group_pinned, int grp_next_y, int x, int y, int width, int height);
34 
35 void
36 draw_column_data (DdbListview *listview, cairo_t *drawable, DdbListviewIter it, int idx, int column, int iter, int x, int y, int width, int height);
37 
38 void
39 list_context_menu (DdbListview *listview, DdbListviewIter it, int idx);
40 
41 int
42 load_column_config (DdbListview *listview, const char *key);
43 
44 void
45 add_column_helper (DdbListview *listview, const char *title, int width, int id, const char *format, int align_right);
46 
47 GtkWidget*
48 create_headermenu (int groupby);
49 
50 void
51 set_last_playlist_cm (DdbListview *pl);
52 
53 void
54 set_active_column_cm (int col);
55 
56 void
57 pl_common_init(void);
58 
59 void
60 pl_common_free (void);
61 
62 int
63 pl_common_get_group (DdbListview *listview, DdbListviewIter it, char *str, int size);
64 
65 void
66 pl_common_draw_group_title (DdbListview *listview, cairo_t *drawable, DdbListviewIter it, int iter, int x, int y, int width, int height);
67 
68 // import old playlist configuration from "playlist.%02d" syntax with old title
69 // formatting to the new JSON syntax with new title formatting
70 int
71 import_column_config_0_6 (const char *oldkeyprefix, const char *newkey);
72 
73 #endif // __PLCOLUMNS_H
74