summaryrefslogtreecommitdiff
path: root/src/gtkvumeter.h
diff options
context:
space:
mode:
authorLudovic Pouzenc <ludovic@pouzenc.fr>2012-06-16 22:29:33 +0000
committerLudovic Pouzenc <ludovic@pouzenc.fr>2012-06-16 22:29:33 +0000
commit797149c5a9ee0c7c70947f72cbaece5efd3dd687 (patch)
tree1c5a8e9dcb09c08e7741c806650c5ef1163387d0 /src/gtkvumeter.h
parent593e1cbe3470f409c19a7f06f5d10c6f5677361a (diff)
download2012-violon-leds-797149c5a9ee0c7c70947f72cbaece5efd3dd687.tar.gz
2012-violon-leds-797149c5a9ee0c7c70947f72cbaece5efd3dd687.tar.bz2
2012-violon-leds-797149c5a9ee0c7c70947f72cbaece5efd3dd687.zip
Création du source tree princpal. Les routines de maths pour calculer le gain déconnent encore je trouve.
Reste à intégrer la partie DMX et a améliorer tout ce qui a été laissé de côté... git-svn-id: file:///var/svn/2012-violon-leds/trunk@20 6be1fa4d-33ac-4c33-becc-79fcb3794bb6
Diffstat (limited to 'src/gtkvumeter.h')
-rw-r--r--src/gtkvumeter.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/gtkvumeter.h b/src/gtkvumeter.h
new file mode 100644
index 0000000..07eb7c5
--- /dev/null
+++ b/src/gtkvumeter.h
@@ -0,0 +1,39 @@
+#ifndef GTKVUMETER_H
+#define GTKVUMETER_H
+#include <gtk/gtk.h>
+
+#define GTK_TYPE_VU_METER (gtk_vu_meter_get_type ())
+#define GTK_VU_METER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_VU_METER, GtkVuMeter))
+#define GTK_VU_METER_CLASS(obj) (G_TYPE_CHECK_CLASS_CAST ((obj), GTK_VU_METER, GtkVuMeterClass))
+#define GTK_IS_VU_METER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_VU_METER))
+#define GTK_IS_VU_METER_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE ((obj), GTK_TYPE_VU_METER))
+#define GTK_VU_METER_GET_CLASS (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_VU_METER, GtkVuMeterClass))
+
+typedef struct _GtkVuMeter GtkVuMeter;
+typedef struct _GtkVuMeterClass GtkVuMeterClass;
+
+struct _GtkVuMeter {
+ GtkDrawingArea parent;
+
+ /* private */
+ gboolean vertical;
+ gint level, min, max;
+
+ gint f_gradient_key_count, b_gradient_key_count;
+ GdkColor *f_gradient_keys, *b_gradient_keys;
+
+ gint colors;
+ GdkPixbuf *f_pixbuf, *b_pixbuf;
+};
+
+struct _GtkVuMeterClass {
+ GtkDrawingAreaClass parent_class;
+};
+
+GtkType gtk_vu_meter_get_type (void) G_GNUC_CONST;
+GtkWidget * gtk_vu_meter_new (gboolean vertical);
+void gtk_vu_meter_set_gradient (GtkVuMeter *vumeter, gint f_gradient_key_count, GdkColor *f_gradient_keys, gint b_gradient_key_count, GdkColor *b_gradient_keys);
+void gtk_vu_meter_set_min_max (GtkVuMeter *vumeter, gint min, gint max);
+void gtk_vu_meter_set_level(GtkVuMeter *vumeter, gint level);
+
+#endif /*GTKVUMETER_H*/