summaryrefslogtreecommitdiff
path: root/tests/test4/gtkvumeter.h
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test4/gtkvumeter.h')
-rw-r--r--tests/test4/gtkvumeter.h93
1 files changed, 26 insertions, 67 deletions
diff --git a/tests/test4/gtkvumeter.h b/tests/test4/gtkvumeter.h
index ea64dcb..ec7ee67 100644
--- a/tests/test4/gtkvumeter.h
+++ b/tests/test4/gtkvumeter.h
@@ -1,80 +1,39 @@
-/***************************************************************************
- * gtkvumeter.h
- *
- * Fri Jan 10 20:06:41 2003
- * Copyright 2003 Todd Goyen
- * wettoad@knighthoodofbuh.org
- ****************************************************************************/
-
-#ifndef __GTKVUMETER_H__
-#define __GTKVUMETER_H__
-
+#ifndef GTKVUMETER_H
+#define GTKVUMETER_H
#include <gtk/gtk.h>
-G_BEGIN_DECLS
+#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))
-#define GTK_TYPE_VUMETER (gtk_vumeter_get_type ())
-#define GTK_VUMETER(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_VUMETER, GtkVUMeter))
-#define GTK_VUMETER_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_VUMETER GtkVUMeterClass))
-#define GTK_IS_VUMETER(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_VUMETER))
-#define GTK_IS_VUMETER_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_VUMETER))
-#define GTK_VUMETER_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_VUMETER, GtkVUMeterClass))
+typedef struct _GtkVuMeter GtkVuMeter;
+typedef struct _GtkVuMeterClass GtkVuMeterClass;
-typedef struct _GtkVUMeter GtkVUMeter;
-typedef struct _GtkVUMeterClass GtkVUMeterClass;
-
-struct _GtkVUMeter {
- GtkWidget widget;
-
- gint f_gradient_key_count;
- GdkColor *f_gradient_keys;
- gint b_gradient_key_count;
- GdkColor *b_gradient_keys;
+struct _GtkVuMeter {
+ GtkDrawingArea parent;
- GdkColormap *colormap;
- gint colors;
-
- GdkGC **f_gc;
- GdkGC **b_gc;
- GdkColor *f_colors;
- GdkColor *b_colors;
-
- gboolean vertical;
- gint level;
- gint min;
- gint max;
+ /* private */
+ gboolean vertical;
+ gint level, min, max;
- gint peaks_falloff;
- gint peak_level;
-
- gint scale;
-};
-
-struct _GtkVUMeterClass {
- GtkWidgetClass parent_class;
-};
+ gint f_gradient_key_count, b_gradient_key_count;
+ GdkColor *f_gradient_keys, *b_gradient_keys;
-enum {
- GTK_VUMETER_PEAKS_FALLOFF_SLOW,
- GTK_VUMETER_PEAKS_FALLOFF_MEDIUM,
- GTK_VUMETER_PEAKS_FALLOFF_FAST,
- GTK_VUMETER_PEAKS_FALLOFF_LAST
+ gint colors;
+ GdkPixbuf *f_pixbuf, *b_pixbuf;
};
-enum {
- GTK_VUMETER_SCALE_LINEAR,
- GTK_VUMETER_SCALE_LOG,
- GTK_VUMETER_SCALE_LAST
+struct _GtkVuMeterClass {
+ GtkDrawingAreaClass parent_class;
};
-GtkType gtk_vumeter_get_type (void) G_GNUC_CONST;
-GtkWidget *gtk_vumeter_new (gboolean vertical);
-void gtk_vumeter_set_min_max (GtkVUMeter *vumeter, gint min, gint max);
-void gtk_vumeter_set_level (GtkVUMeter *vumeter, gint level);
-void gtk_vumeter_set_peaks_falloff (GtkVUMeter *vumeter, gint peaks_falloff);
-void gtk_vumeter_set_scale (GtkVUMeter *vumeter, gint scale);
-void gtk_vumeter_set_gradient (GtkVUMeter *vumeter, gint f_gradient_key_count, GdkColor *f_gradient_keys, gint b_gradient_key_count, GdkColor *b_gradient_keys);
-G_END_DECLS
+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__ */
+#endif /*GTKVUMETER_H*/