ocarina/include/tabs.h

59 lines
951 B
C
Raw Normal View History

/*
* Copyright 2014 (c) Anna Schumaker.
*/
#ifndef OCARINA_TABS_H
#define OCARINA_TABS_H
#include <gtkmm.h>
#include <sstream>
struct FilterDesc {
/*
* Set these variables
*/
Glib::RefPtr<PlayqueueModel> model;
Gtk::SearchEntry *entry;
/*
* These are configured automatically
*/
Glib::RefPtr<Gtk::TreeModelFilter> filter;
std::set<unsigned int> visible_ids;
};
struct TabType {
void (*init_late)();
void (*cleanup)();
bool (*has_queue)(Playqueue *);
void (*track_added)(Playqueue *, unsigned int);
void (*track_deleted)(Playqueue *, unsigned int);
};
static inline std::string itoa(unsigned int i)
{
std::stringstream ss;
ss << i;
return ss.str();
}
/* collection.cpp */
void init_collection_tab();
/* history.cpp */
void init_history_tab();
/* playlist.cpp */
void init_playlist_tab();
/* tabs.cpp */
void init_filter(struct FilterDesc *);
void register_tab_type(struct TabType *);
#endif /* OCARINA_TABS_H */