62 lines
1.3 KiB
C++
62 lines
1.3 KiB
C++
|
|
#include <version.h>
|
|
#include <ocarina/callback.h>
|
|
#include <ocarina/gtk.h>
|
|
#include <ocarina/button.h>
|
|
#include <ocarina/window.h>
|
|
#include <libsaria/libsaria.h>
|
|
|
|
void ocarina_init(int argc, char **argv)
|
|
{
|
|
GtkWidget *open;
|
|
GtkWidget *rewind;
|
|
GtkWidget *play;
|
|
GtkWidget *pause;
|
|
GtkWidget *stop;
|
|
GtkWidget *volume;
|
|
GtkWidget *hbox;
|
|
|
|
window_init();
|
|
window_title("Ocarina " + vers_str());
|
|
window_icon("images/ocarina.png");
|
|
|
|
hbox = gtk_hbox_new(FALSE, 0);
|
|
open = make_open_button(GTK_ICON_SIZE_MENU);
|
|
rewind = make_rewind_button(GTK_ICON_SIZE_MENU);
|
|
play = make_play_button(GTK_ICON_SIZE_MENU);
|
|
pause = make_pause_button(GTK_ICON_SIZE_MENU);
|
|
stop = make_stop_button(GTK_ICON_SIZE_MENU);
|
|
volume = make_volume_button();
|
|
|
|
box_pack_start(hbox, open, FALSE, FALSE, 0);
|
|
box_pack_start(hbox, rewind, FALSE, FALSE, 0);
|
|
box_pack_start(hbox, play, FALSE, FALSE, 0);
|
|
box_pack_start(hbox, pause , FALSE, FALSE, 0);
|
|
box_pack_start(hbox, stop, FALSE, FALSE, 0);
|
|
box_pack_start(hbox, volume, FALSE, FALSE, 0);
|
|
gtk_widget_show(hbox);
|
|
window_add(hbox);
|
|
}
|
|
|
|
void ocarina_quit()
|
|
{
|
|
gtk_main_quit();
|
|
}
|
|
|
|
int main(int argc, char **argv)
|
|
{
|
|
print("Ocarina 5.0");
|
|
|
|
libsaria_init(argc, argv);
|
|
setup_callbacks();
|
|
gtk_init(&argc, &argv);
|
|
ocarina_init(argc, argv);
|
|
|
|
if (argc > 1)
|
|
libsaria_get()->load(argv[1]);
|
|
|
|
gtk_main();
|
|
libsaria_quit();
|
|
return 0;
|
|
}
|