ocarina: Use the new libsaria convenience functions

When libsaria changes, I won't have to recompile as much (in theory)
This commit is contained in:
Bryan Schumaker 2011-09-03 21:10:41 -04:00
parent e10a8e97f4
commit ef3e18ba25
3 changed files with 10 additions and 9 deletions

View File

@ -2,7 +2,8 @@
#include <ocarina/button.h>
#include <ocarina/chooser.h>
#include <libsaria/libsaria.h>
#include <libsaria/print.h>
#include <libsaria/controls.h>
GtkWidget *make_button(const gchar *stockid, GtkIconSize size,
void (* func)(GtkWidget *, GdkEvent *, gpointer),
@ -23,7 +24,7 @@ static void on_click_open_file(GtkWidget *b, GdkEvent *e, gpointer d)
{
string file = ocarina_choose_file();
print("Playing file: " + file);
libsaria_get()->load(file);
libsaria_load(file);
}
GtkWidget *make_open_button(GtkIconSize size)

View File

@ -3,7 +3,7 @@
using namespace std;
#include <ocarina/button.h>
#include <libsaria/libsaria.h>
#include <libsaria/controls.h>
static list<GtkWidget *> play_buttons;
static list<GtkWidget *> pause_buttons;
@ -36,7 +36,7 @@ void hide_button_list(button_list_t bttn_list)
static void on_click_play(GtkWidget *b, GdkEvent *e, gpointer d)
{
libsaria_get()->play();
libsaria_play();
}
GtkWidget *make_play_button(GtkIconSize size)
@ -51,7 +51,7 @@ GtkWidget *make_play_button(GtkIconSize size)
static void on_click_pause(GtkWidget *b, GdkEvent *e, gpointer d)
{
libsaria_get()->pause();
libsaria_pause();
}
GtkWidget *make_pause_button(GtkIconSize size)
@ -66,7 +66,7 @@ GtkWidget *make_pause_button(GtkIconSize size)
static void on_click_stop(GtkWidget *b, GdkEvent *e, gpointer d)
{
libsaria_get()->stop();
libsaria_stop();
}
GtkWidget *make_stop_button(GtkIconSize size)

View File

@ -1,5 +1,5 @@
#include <libsaria/libsaria.h>
#include <libsaria/controls.h>
#include <libsaria/print.h>
#include <ocarina/button.h>
@ -25,7 +25,7 @@ static void set_increment(GtkWidget *volume, double incr)
static void changed(GtkWidget *button, gdouble value, gpointer data)
{
libsaria_get()->set_volume(value);
libsaria_set_volume(value);
resize(button);
}
@ -33,7 +33,7 @@ GtkWidget *make_volume_button()
{
GtkWidget *volume = gtk_volume_button_new();
gtk_scale_button_set_value(GTK_SCALE_BUTTON(volume),
libsaria_get()->get_volume());
libsaria_get_volume());
gtk_widget_show(volume);
set_increment(volume, 0.05);
resize(volume);