+ Line graph: added dot support
[calfwidgets.git] / src / calfwidgets / vumeter.h
blobe828119750378f59740059f35178484e9181bae0
1 /* Calf DSP Library
2 * A LED-line-style volume meter widget
4 * Copyright (C) 2007-2008 Krzysztof Foltman
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General
17 * Public License along with this program; if not, write to the
18 * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
19 * Boston, MA 02111-1307, USA.
21 #ifndef __CALF_VUMETER_CTL
22 #define __CALF_VUMETER_CTL
24 #include <gtk/gtk.h>
26 G_BEGIN_DECLS
28 #define CALF_TYPE_VU_METER (calf_vu_meter_get_type())
29 #define CALF_VU_METER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CALF_TYPE_VU_METER, CalfVUMeter))
30 #define CALF_IS_VU_METER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CALF_TYPE_VU_METER))
31 #define CALF_VU_METER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CALF_TYPE_VU_METER, CalfVUMeterClass))
32 #define CALF_IS_VU_METER_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE ((klass), CALF_TYPE_VU_METER))
34 typedef enum
36 CALF_VU_METER_MODE_STANDARD,
37 CALF_VU_METER_MODE_MONOCHROME,
38 CALF_VU_METER_MODE_MONOCHROME_REVERSE
39 } CalfVUMeterMode;
41 struct _CalfVUMeter
43 GtkWidget parent;
44 CalfVUMeterMode mode;
45 float value;
48 struct _CalfVUMeterClass
50 GtkWidgetClass parent_class;
53 typedef struct _CalfVUMeter CalfVUMeter;
54 typedef struct _CalfVUMeterClass CalfVUMeterClass;
56 GType calf_vu_meter_get_type();
58 GtkWidget *calf_vu_meter_new ();
59 void calf_vu_meter_set_value (CalfVUMeter *meter, float value);
60 float calf_vu_meter_get_value (CalfVUMeter *meter);
61 void calf_vu_meter_set_mode (CalfVUMeter *meter, CalfVUMeterMode mode);
62 CalfVUMeterMode calf_vu_meter_get_mode (CalfVUMeter *meter);
64 G_END_DECLS
66 #endif