
// gcc -o testscale `pkg-config --libs --cflags gmodule-2.0 gtk+-2.0` testscale.c

#include <gtk/gtk.h>

gboolean
seek_slider_pressed_cb (GtkWidget *widget, GdkEventButton *event, gpointer data)
{
	g_message ("seek_slider_pressed_cb");

	return FALSE;
}

gboolean
seek_slider_released_cb (GtkWidget *widget, GdkEventButton *event, gpointer data)
{
	g_message ("seek_slider_released_cb");

	return FALSE;
}

void
seek_slider_changed_cb (GtkAdjustment *adj, gpointer data)
{
//	g_message ("seek_slider_changed_cb");
}

int main (int argc, char **argv)
{
	GtkWidget *window, *box, *scale, *volume;

	gtk_init (&argc, &argv);

	window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
	gtk_window_set_default_size (GTK_WINDOW (window), 500, 100);
	box = gtk_hbox_new (FALSE, 10);
	gtk_container_add (GTK_CONTAINER (window), box);
	scale = gtk_hscale_new_with_range (0, 65535, 1);
	gtk_container_add (GTK_CONTAINER (box), scale);

#if 0
	volume = gtk_button_new_with_label ("BLAHBLAH");
#else
	volume = gtk_volume_button_new ();
#endif
	gtk_widget_set_sensitive (volume, FALSE);
	gtk_container_add (GTK_CONTAINER (box), volume);

	g_signal_connect (G_OBJECT (scale), "button-press-event",
			  G_CALLBACK (seek_slider_pressed_cb), NULL);
	g_signal_connect (G_OBJECT (scale), "button-release-event",
			  G_CALLBACK (seek_slider_released_cb), NULL);

	gtk_widget_show_all (window);
	gtk_main ();

	return 0;
}

