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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
/***************************************************************************
* gtkvumeter.h
*
* Fri Jan 10 20:06:41 2003
* Copyright 2003 Todd Goyen
* wettoad@knighthoodofbuh.org
****************************************************************************/
#ifndef __GTKVUMETER_H__
#define __GTKVUMETER_H__
#include <gtk/gtk.h>
G_BEGIN_DECLS
#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;
struct _GtkVUMeter {
GtkWidget widget;
gint f_gradient_key_count;
GdkColor *f_gradient_keys;
gint b_gradient_key_count;
GdkColor *b_gradient_keys;
GdkColormap *colormap;
gint colors;
GdkGC **f_gc;
GdkGC **b_gc;
GdkColor *f_colors;
GdkColor *b_colors;
gboolean vertical;
gint level;
gint min;
gint max;
gint peaks_falloff;
gint peak_level;
gint scale;
};
struct _GtkVUMeterClass {
GtkWidgetClass parent_class;
};
enum {
GTK_VUMETER_PEAKS_FALLOFF_SLOW,
GTK_VUMETER_PEAKS_FALLOFF_MEDIUM,
GTK_VUMETER_PEAKS_FALLOFF_FAST,
GTK_VUMETER_PEAKS_FALLOFF_LAST
};
enum {
GTK_VUMETER_SCALE_LINEAR,
GTK_VUMETER_SCALE_LOG,
GTK_VUMETER_SCALE_LAST
};
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
#endif /* __GTKVUMETER_H__ */
|