ocarina/ocarina/ocarina.h

89 lines
2.2 KiB
C++

#ifndef OCARINA_H
#define OCARINA_H
#include <notify.h>
#include <track.h>
#include <print.h>
#include <deck.h>
#include <gtk/gtk.h>
#include <string>
using namespace std;
enum ExtraWidgets {
NO_EXTRA_WIDGETS = 0,
CLOSE_BUTTON = (1 << 0),
DISABLE_BUTTON = (1 << 1),
RANDOM_BUTTON = (1 << 2),
SORT_BUTTON = (1 << 3),
};
struct PlaylistWidgets {
libsaria::Playlist *playlist;
GtkListStore *liststore;
GtkBox *page_box;
GtkBox *tab_box;
GtkTreeView *treeview;
GtkTreeModel *filter;
GtkLabel *size_label;
GtkLabel *page_label;
GtkEntry *entry;
GtkToggleButton *disable;
GtkToggleButton *random;
GtkToggleButton *sort;
set<string> *filter_text;
};
/* library.cpp */
void notify_library(notify_t, libsaria::library::Path *);
void init_library();
/* notify.cpp */
void on_notify(notify_t, void *);
/* ocarina.cpp */
string lib_file(const string &);
gboolean ocarina_idle(gpointer);
GObject *get_object(const string &);
GtkWidget *get_widget(const string &);
void connect_signal(const string &, const string &, GCallback, void *);
string run_chooser(const string &);
/* pipe.cpp */
void init_pipe();
/* playlist.cpp */
void update_playlist(notify_t, libsaria::PlaylistNotification *);
bool playlist_key_pressed(GtkTreeView *treeview, string &);
void setup_widgets(struct PlaylistWidgets *, libsaria::Playlist *);
void setup_playlist_page(struct PlaylistWidgets *, int);
void init_playlist();
/* status.cpp */
bool update_idle_bar(int);
void update_length_label(libsaria::Playlist *);
void update_labels(libsaria::Track *);
void update_buttons(notify_t);
void update_progress();
void update_autopause_type(AutoPauseType *);
void update_autopause_count(unsigned int *);
void init_status();
/* tabs.cpp */
struct PlaylistWidgets *find_playlist_widgets(libsaria::Playlist *);
struct PlaylistWidgets *current_widgets();
libsaria::Playlist *current_playlist();
bool playlist_entry_focused();
void playlist_focus_entry();
bool playlist_key_press(string &);
void playlist_focus_treeview();
void playlist_switch_to(string &);
void playlist_switch_to_n(unsigned int);
void init_tabs();
void update_tabs(notify_t, libsaria::Playlist *);
/* window.cpp */
void init_window();
#endif