summaryrefslogtreecommitdiff
path: root/tests/test4/tuto-cairo/main.c
blob: 085c143d4f8ae2f9422754582b7d157fd0d8535f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include <gtk/gtk.h>
#include "gtkvumeter.h"

int main (int argc, char **argv) {
	GtkWidget *window;
	GtkWidget *vumeter;

	gtk_init (&argc, &argv);

	window = gtk_window_new (GTK_WINDOW_TOPLEVEL);

	vumeter = gtk_vu_meter_new();
	gtk_vu_meter_set_min_max(GTK_VU_METER(vumeter), 0, 255);
	gtk_vu_meter_set_level(GTK_VU_METER(vumeter), 42);
	
	gtk_container_add(GTK_CONTAINER (window), vumeter);

	g_signal_connect (window, "destroy",
			G_CALLBACK (gtk_main_quit), NULL);

	gtk_widget_show_all (window);

	gtk_main ();

	return 0;
}