49 lines
1.2 KiB
C++
49 lines
1.2 KiB
C++
|
|
#include <ocarina/gtk.h>
|
|
#include <ocarina/button.h>
|
|
#include "footer.h"
|
|
|
|
static GtkWidget *controls = NULL;
|
|
|
|
static GtkWidget *make_bottom_row()
|
|
{
|
|
GtkWidget *buttons = gtk_hbox_new(FALSE, 0);
|
|
gtk_widget_show(buttons);
|
|
|
|
box_pack_end(buttons, make_next_button(), FALSE, FALSE, 0);
|
|
box_pack_end(buttons, make_stop_button(), FALSE, FALSE, 0);
|
|
box_pack_end(buttons, make_pause_button(), FALSE, FALSE, 0);
|
|
box_pack_end(buttons, make_play_button(), FALSE, FALSE, 0);
|
|
box_pack_end(buttons, make_forward_button(), FALSE, FALSE, 0);
|
|
box_pack_end(buttons, make_rewind_button(), FALSE, FALSE, 0);
|
|
|
|
return buttons;
|
|
}
|
|
|
|
static GtkWidget *make_top_row()
|
|
{
|
|
GtkWidget *buttons = gtk_hbox_new(FALSE, 0);
|
|
|
|
box_pack_end(buttons, make_volume_button(), FALSE, FALSE, 0);
|
|
box_pack_end(buttons, make_open_button(), FALSE, FALSE, 0);
|
|
|
|
gtk_widget_show_all(buttons);
|
|
return buttons;
|
|
}
|
|
|
|
static void make_controls()
|
|
{
|
|
controls = gtk_vbox_new(FALSE, 0);
|
|
gtk_widget_show(controls);
|
|
|
|
box_pack_start(controls, make_top_row(), FALSE, FALSE, 0);
|
|
box_pack_start(controls, make_bottom_row(), FALSE, FALSE, 0);
|
|
}
|
|
|
|
GtkWidget *get_controls()
|
|
{
|
|
if (controls == NULL)
|
|
make_controls();
|
|
return controls;
|
|
}
|