summaryrefslogtreecommitdiff
path: root/src/gtkvumeter.h
blob: 73c7fa8d54f7d367a463ed2ddd8e25a6ef751669 (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
29
30
31
32
33
34
35
36
37
38
39
40
#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*/