ocarina: Add the library list to the ocarina namespace
This commit is contained in:
parent
0b1684620d
commit
c894815dad
|
@ -1,7 +1,15 @@
|
|||
#ifndef OCARINA_LIBRARY_H
|
||||
#define OCARINA_LIBRARY_H
|
||||
|
||||
void library_init();
|
||||
void ocarina_library_refresh();
|
||||
namespace ocarina
|
||||
{
|
||||
namespace library
|
||||
{
|
||||
|
||||
void init();
|
||||
void refresh();
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
#endif /* OCARINA_LIBRARY_H */
|
||||
|
|
|
@ -31,7 +31,7 @@ void cb_idle_task_queued()
|
|||
void cb_library_refresh()
|
||||
{
|
||||
println("Ocarina LIBRARY_REFRESH callback!");
|
||||
ocarina_library_refresh();
|
||||
ocarina::library::refresh();
|
||||
library_settings_refresh();
|
||||
}
|
||||
|
||||
|
|
|
@ -14,18 +14,23 @@ using namespace std;
|
|||
static SongList library_list;
|
||||
struct SongListFuncs library_funcs;
|
||||
|
||||
void ocarina_library_refresh()
|
||||
namespace ocarina
|
||||
{
|
||||
library_list.clear();
|
||||
library_list.fill();
|
||||
}
|
||||
|
||||
void library_init()
|
||||
{
|
||||
library_funcs.for_each = libsaria::library::for_each;
|
||||
library_funcs.size = libsaria::library::size;
|
||||
void library::refresh()
|
||||
{
|
||||
library_list.clear();
|
||||
library_list.fill();
|
||||
}
|
||||
|
||||
library_list.init("Library", &library_funcs);
|
||||
add_page(library_list.get_label(), library_list.get_window(), true);
|
||||
ocarina_library_refresh();
|
||||
}
|
||||
void library::init()
|
||||
{
|
||||
library_funcs.for_each = libsaria::library::for_each;
|
||||
library_funcs.size = libsaria::library::size;
|
||||
|
||||
library_list.init("Library", &library_funcs);
|
||||
add_page(library_list.get_label(), library_list.get_window(), true);
|
||||
ocarina::library::refresh();
|
||||
}
|
||||
|
||||
};
|
||||
|
|
|
@ -31,7 +31,7 @@ namespace ocarina
|
|||
{
|
||||
window_init("Ocarina " + vers_str(), "images/ocarina.png");
|
||||
window_add(get_tabs());
|
||||
library_init();
|
||||
ocarina::library::init();
|
||||
settings_init();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue