summaryrefslogtreecommitdiff
path: root/tests/test4/tuto-cairo/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test4/tuto-cairo/main.c')
-rw-r--r--tests/test4/tuto-cairo/main.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/test4/tuto-cairo/main.c b/tests/test4/tuto-cairo/main.c
new file mode 100644
index 0000000..085c143
--- /dev/null
+++ b/tests/test4/tuto-cairo/main.c
@@ -0,0 +1,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;
+}
+