1 /*
2 
3     (c) Fraser Stuart 2009
4 
5     This program is free software; you can redistribute it and/or modify
6     it under the terms of the GNU General Public License as published by
7     the Free Software Foundation; either version 2 of the License, or
8     (at your option) any later version.
9 
10     This program is distributed in the hope that it will be useful,
11     but WITHOUT ANY WARRANTY; without even the implied warranty of
12     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13     GNU General Public License for more details.
14 
15     You should have received a copy of the GNU General Public License
16     along with this program; if not, write to the Free Software
17     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 
19 */
20 
21 #ifndef __DISPLAY_COMP_H
22 #define __DISPLAY_COMP_H
23 
24 #include <gtk/gtk.h>
25 #include <cairo.h>
26 #include "widgets.h"
27 
28 G_BEGIN_DECLS
29 
30 #define INV_DISPLAYCOMP_DRAW_ALL 0
31 #define INV_DISPLAYCOMP_DRAW_DATA 1
32 
33 #define INV_DISPLAY_COMP(obj) GTK_CHECK_CAST(obj, inv_display_comp_get_type (), InvDisplayComp)
34 #define INV_DISPLAY_COMP_CLASS(klass) GTK_CHECK_CLASS_CAST(klass, inv_display_comp_get_type(), InvDisplayCompClass)
35 #define INV_IS_DISPLAY_COMP(obj) GTK_CHECK_TYPE(obj, inv_display_comp_get_type())
36 
37 
38 typedef struct _InvDisplayComp InvDisplayComp;
39 typedef struct _InvDisplayCompClass InvDisplayCompClass;
40 
41 
42 struct _InvDisplayComp {
43 	GtkWidget widget;
44 
45 	gint bypass;
46 	float rms;
47 	float attack;
48 	float release;
49 	float threshold;
50 	float ratio;
51 	float gain;
52 
53 	float Lastrms;
54 	float Lastattack;
55 	float Lastrelease;
56 	float Lastthreshold;
57 	float Lastratio;
58 	float Lastgain;
59 
60 	float SIG[292], SIGmax;
61 	float RMS[292];
62 	float ENV[292];
63 
64 	float header_font_size,label_font_size,info_font_size;
65 };
66 
67 struct _InvDisplayCompClass {
68 	GtkWidgetClass parent_class;
69 };
70 
71 
72 GtkType inv_display_comp_get_type(void);
73 GtkWidget * inv_display_comp_new();
74 
75 void inv_display_comp_set_bypass(InvDisplayComp *displayComp, gint num);
76 void inv_display_comp_set_rms(InvDisplayComp *displayComp, float num);
77 void inv_display_comp_set_attack(InvDisplayComp *displayComp, float num);
78 void inv_display_comp_set_release(InvDisplayComp *displayComp, float num);
79 void inv_display_comp_set_threshold(InvDisplayComp *displayComp, float num);
80 void inv_display_comp_set_ratio(InvDisplayComp *displayComp, float num);
81 void inv_display_comp_set_gain(InvDisplayComp *displayComp, float num);
82 
83 
84 G_END_DECLS
85 
86 #endif /* __DISPLAY_COMP_H */
87 
88