64 lines
1.9 KiB
C++
64 lines
1.9 KiB
C++
/*
|
|
* Copyright 2014 (c) Anna Schumaker.
|
|
*/
|
|
#ifndef OCARINA_H
|
|
#define OCARINA_H
|
|
|
|
#include <playqueue.h>
|
|
#include <gtkmm.h>
|
|
|
|
/* main.cpp */
|
|
Gtk::Window *ocarina_init(int *, char ***);
|
|
|
|
/* model.cpp */
|
|
class PlayqueueModel : public Gtk::TreeModel, public Glib::Object {
|
|
private:
|
|
void get_value_uint(struct library::Song &, int, Glib::ValueBase &) const;
|
|
void get_value_str(struct library::Song &, int, Glib::ValueBase &) const;
|
|
bool check_iter_validity(const Gtk::TreeIter &) const;
|
|
|
|
protected:
|
|
/* Inherited from Gtk::TreeModel */
|
|
Gtk::TreeModelFlags get_flags_vfunc() const;
|
|
int get_n_columns_vfunc() const;
|
|
GType get_column_type_vfunc(int) const;
|
|
void get_value_vfunc(const Gtk::TreeIter &, int, Glib::ValueBase &) const;
|
|
bool iter_next_vfunc(const Gtk::TreeIter &, Gtk::TreeIter &) const;
|
|
bool iter_children_vfunc(const Gtk::TreeIter &, Gtk::TreeIter &) const;
|
|
bool iter_has_child_vfunc(const Gtk::TreeIter &) const;
|
|
int iter_n_children_vfunc(const Gtk::TreeIter &) const;
|
|
int iter_n_root_children_vfunc(const Gtk::TreeIter &) const;
|
|
bool iter_nth_child_vfunc(const Gtk::TreeIter &, int, Gtk::TreeIter &) const;
|
|
bool iter_nth_root_child_vfunc(int, Gtk::TreeIter &) const;
|
|
bool iter_parent_vfunc(const Gtk::TreeIter &, Gtk::TreeIter &) const;
|
|
Gtk::TreeModel::Path get_path_vfunc(const Gtk::TreeIter &) const;
|
|
bool get_iter_vfunc(const Gtk::TreePath &, Gtk::TreeIter &) const;
|
|
|
|
public:
|
|
int stamp;
|
|
Playqueue *queue;
|
|
PlayqueueModel(Playqueue *);
|
|
|
|
void on_row_inserted(unsigned int);
|
|
void on_row_deleted(unsigned int);
|
|
void on_row_changed(unsigned int);
|
|
void on_path_selected(const Gtk::TreePath &);
|
|
};
|
|
|
|
/* tabs.cpp */
|
|
void init_tabs();
|
|
void init_tabs2();
|
|
void cleanup_tabs();
|
|
|
|
/* wires.cpp */
|
|
Gtk::Window *connect_wires();
|
|
Gtk::Button *get_button(const std::string &);
|
|
Glib::RefPtr<Gtk::Builder> &get_builder();
|
|
|
|
#ifdef CONFIG_TEST
|
|
void do_collection_delete();
|
|
void on_collection_toggled(const Glib::ustring &);
|
|
#endif /* CONFIG_TEST */
|
|
|
|
#endif /* OCARINA_H */
|