1 #ifndef __GBEMOL_PLAYLIST_H_
2 #define __GBEMOL_PLAYLIST_H_
3 
4 #include <gtk/gtkwidget.h>
5 #include <gtk/gtkvbox.h>
6 #include "gbemol-mpd.h"
7 #include "gbemol-locale.h"
8 
9  /*
10   *  Type macros.
11   */
12 
13 G_BEGIN_DECLS
14 
15 #define GBEMOL_TYPE_PLAYLIST         (gbemol_playlist_get_type ())
16 #define GBEMOL_PLAYLIST(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), GBEMOL_TYPE_PLAYLIST, GbemolPlaylist))
17 #define GBEMOL_PLAYLIST_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), GBEMOL_TYPE_PLAYLIST, GbemolPlaylistClass))
18 #define GBEMOL_IS_PLAYLIST(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), GBEMOL_TYPE_PLAYLIST))
19 #define GBEMOL_IS_PLAYLIST_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), GBEMOL_TYPE_PLAYLIST))
20 #define GBEMOL_PLAYLIST_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GBEMOL_TYPE_PLAYLIST, GbemolPlaylistClass))
21 
22 #define N_COLUMNS 12
23 
24 typedef struct _GbemolPlaylist GbemolPlaylist;
25 typedef struct _GbemolPlaylistClass GbemolPlaylistClass;
26 typedef struct _GbemolPlaylistPrivate GbemolPlaylistPrivate;
27 
28 typedef enum
29 {
30 	GBEMOL_PLAYLIST_MODE_COLUMNS,
31 	GBEMOL_PLAYLIST_MODE_LINES,
32 	N_PLAYLIST_MODES
33 } GbemolPlaylistMode;
34 
35 struct _GbemolPlaylist {
36 	GtkVBox parent;
37 	gchar* playlist_modes[N_PLAYLIST_MODES];
38 	GbemolPlaylistPrivate *priv;
39 };
40 
41 struct _GbemolPlaylistClass {
42 	GtkVBoxClass parent;
43 };
44 
45 
46 GType gbemol_playlist_get_type (void);
47 GbemolPlaylist* gbemol_playlist_new (GbemolMpd* mpd);
48 void gbemol_playlist_bold_song (GbemolPlaylist *pls, gint song_id);
49 gboolean gbemol_playlist_current_is_selected (GbemolPlaylist* pls);
50 void gbemol_playlist_set_mode (GbemolPlaylist* pls, GbemolPlaylistMode mode);
51 void gbemol_playlist_update_songs (GbemolPlaylist *pls);
52 void gbemol_playlist_populate_playlists (GbemolPlaylist* pls);
53 void gbemol_playlist_set_sensitive (GbemolPlaylist* pls, gboolean sensitive);
54 G_END_DECLS
55 
56 #endif
57