2011-08-18 08:20:56 -04:00
|
|
|
#ifndef OCARINA_H
|
|
|
|
#define OCARINA_H
|
|
|
|
|
2012-09-12 08:15:31 -04:00
|
|
|
#include <notify.h>
|
|
|
|
#include <track.h>
|
|
|
|
#include <print.h>
|
|
|
|
#include <deck.h>
|
2012-03-10 10:33:01 -05:00
|
|
|
|
|
|
|
#include <gtk/gtk.h>
|
|
|
|
#include <string>
|
|
|
|
using namespace std;
|
|
|
|
|
2012-09-03 13:32:34 -04:00
|
|
|
enum ExtraWidgets {
|
|
|
|
NO_EXTRA_WIDGETS = 0,
|
|
|
|
CLOSE_BUTTON = (1 << 0),
|
2012-09-04 09:17:20 -04:00
|
|
|
DISABLE_BUTTON = (1 << 1),
|
2012-09-16 10:29:11 -04:00
|
|
|
RANDOM_BUTTON = (1 << 2),
|
2012-09-17 08:18:13 -04:00
|
|
|
SORT_BUTTON = (1 << 3),
|
2012-09-03 13:32:34 -04:00
|
|
|
};
|
|
|
|
|
2012-09-01 12:08:20 -04:00
|
|
|
struct PlaylistWidgets {
|
|
|
|
libsaria::Playlist *playlist;
|
|
|
|
GtkListStore *liststore;
|
2012-09-02 12:55:08 -04:00
|
|
|
GtkBox *page_box;
|
2012-09-04 09:17:20 -04:00
|
|
|
GtkBox *tab_box;
|
2012-09-01 12:08:20 -04:00
|
|
|
GtkTreeView *treeview;
|
|
|
|
GtkTreeModel *filter;
|
2012-09-02 12:55:08 -04:00
|
|
|
GtkLabel *size_label;
|
|
|
|
GtkLabel *page_label;
|
2012-09-01 12:08:20 -04:00
|
|
|
GtkEntry *entry;
|
2012-09-04 09:17:20 -04:00
|
|
|
GtkToggleButton *disable;
|
2012-09-16 10:29:11 -04:00
|
|
|
GtkToggleButton *random;
|
2012-09-17 08:18:13 -04:00
|
|
|
GtkToggleButton *sort;
|
2012-11-04 09:17:22 -05:00
|
|
|
set<string> *filter_text;
|
2012-09-01 12:08:20 -04:00
|
|
|
};
|
|
|
|
|
2012-08-08 08:17:10 -04:00
|
|
|
/* library.cpp */
|
2012-08-21 17:55:27 -04:00
|
|
|
void notify_library(notify_t, libsaria::library::Path *);
|
2012-08-08 08:17:10 -04:00
|
|
|
void init_library();
|
|
|
|
|
2012-08-20 08:23:47 -04:00
|
|
|
/* notify.cpp */
|
2012-08-21 07:56:45 -04:00
|
|
|
void on_notify(notify_t, void *);
|
2012-08-20 08:23:47 -04:00
|
|
|
|
2012-08-04 11:57:31 -04:00
|
|
|
/* ocarina.cpp */
|
2012-07-29 14:53:23 -04:00
|
|
|
string lib_file(const string &);
|
2012-08-29 10:17:17 -04:00
|
|
|
gboolean ocarina_idle(gpointer);
|
2012-08-07 19:29:18 -04:00
|
|
|
GObject *get_object(const string &);
|
2012-08-04 11:57:31 -04:00
|
|
|
GtkWidget *get_widget(const string &);
|
|
|
|
void connect_signal(const string &, const string &, GCallback, void *);
|
2012-08-09 08:29:41 -04:00
|
|
|
string run_chooser(const string &);
|
2012-03-10 10:33:01 -05:00
|
|
|
|
2012-09-09 10:54:50 -04:00
|
|
|
/* pipe.cpp */
|
|
|
|
void init_pipe();
|
|
|
|
|
2012-08-24 08:31:40 -04:00
|
|
|
/* playlist.cpp */
|
|
|
|
void update_playlist(notify_t, libsaria::PlaylistNotification *);
|
2012-09-04 10:02:21 -04:00
|
|
|
bool playlist_key_pressed(GtkTreeView *treeview, string &);
|
2012-09-02 10:32:56 -04:00
|
|
|
void setup_widgets(struct PlaylistWidgets *, libsaria::Playlist *);
|
2012-09-03 13:32:34 -04:00
|
|
|
void setup_playlist_page(struct PlaylistWidgets *, int);
|
2012-09-08 09:28:28 -04:00
|
|
|
void init_playlist();
|
2012-08-24 08:31:40 -04:00
|
|
|
|
2012-07-29 16:03:42 -04:00
|
|
|
/* status.cpp */
|
2012-08-04 13:20:15 -04:00
|
|
|
bool update_idle_bar(int);
|
2012-09-05 09:13:47 -04:00
|
|
|
void update_length_label(libsaria::Playlist *);
|
2012-08-21 07:56:45 -04:00
|
|
|
void update_labels(libsaria::Track *);
|
2012-08-21 18:19:27 -04:00
|
|
|
void update_buttons(notify_t);
|
2012-08-22 08:04:21 -04:00
|
|
|
void update_progress();
|
|
|
|
void update_autopause_type(AutoPauseType *);
|
|
|
|
void update_autopause_count(unsigned int *);
|
2012-08-04 11:57:31 -04:00
|
|
|
void init_status();
|
2012-07-29 16:03:42 -04:00
|
|
|
|
2012-09-01 12:08:20 -04:00
|
|
|
/* tabs.cpp */
|
|
|
|
struct PlaylistWidgets *find_playlist_widgets(libsaria::Playlist *);
|
2012-09-08 09:28:28 -04:00
|
|
|
struct PlaylistWidgets *current_widgets();
|
2012-09-01 12:08:20 -04:00
|
|
|
libsaria::Playlist *current_playlist();
|
|
|
|
bool playlist_entry_focused();
|
|
|
|
void playlist_focus_entry();
|
2012-09-04 10:02:21 -04:00
|
|
|
bool playlist_key_press(string &);
|
2012-09-01 12:08:20 -04:00
|
|
|
void playlist_focus_treeview();
|
|
|
|
void playlist_switch_to(string &);
|
2012-09-02 12:20:43 -04:00
|
|
|
void playlist_switch_to_n(unsigned int);
|
2012-09-01 12:08:20 -04:00
|
|
|
void init_tabs();
|
2012-09-02 12:55:08 -04:00
|
|
|
void update_tabs(notify_t, libsaria::Playlist *);
|
2012-09-01 12:08:20 -04:00
|
|
|
|
|
|
|
/* window.cpp */
|
|
|
|
void init_window();
|
|
|
|
|
2011-08-18 08:20:56 -04:00
|
|
|
#endif
|