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 __METER_H 22 #define __METER_H 23 24 #include <gtk/gtk.h> 25 #include <cairo.h> 26 #include "widgets.h" 27 28 G_BEGIN_DECLS 29 30 #define INV_METER_DRAW_ALL 0 31 #define INV_METER_DRAW_L 1 32 #define INV_METER_DRAW_R 2 33 34 #define INV_METER_DRAW_MODE_TOZERO 0 35 #define INV_METER_DRAW_MODE_FROMZERO 1 36 #define INV_METER_DRAW_MODE_BIGTOZERO 2 37 38 #define INV_METER(obj) GTK_CHECK_CAST(obj, inv_meter_get_type (), InvMeter) 39 #define INV_METER_CLASS(klass) GTK_CHECK_CLASS_CAST(klass, inv_meter_get_type(), InvMeterClass) 40 #define INV_IS_METER(obj) GTK_CHECK_TYPE(obj, inv_meter_get_type()) 41 42 43 typedef struct _InvMeter InvMeter; 44 typedef struct _InvMeterClass InvMeterClass; 45 46 47 struct _InvMeter { 48 GtkWidget widget; 49 50 gint bypass; 51 gint channels; 52 gint mode; 53 54 float LdB; 55 float RdB; 56 57 gint lastLpos; 58 gint lastRpos; 59 60 struct colour mOff60,mOff12,mOff6,mOff0,overOff; 61 struct colour mOn60, mOn12, mOn6, mOn0, overOn; /* delta */ 62 63 gint label_font_size,scale_font_size; 64 }; 65 66 struct _InvMeterClass { 67 GtkWidgetClass parent_class; 68 }; 69 70 71 GtkType inv_meter_get_type(void); 72 GtkWidget * inv_meter_new(); 73 74 void inv_meter_set_bypass(InvMeter *meter, gint num); 75 void inv_meter_set_mode(InvMeter *meter, gint num); 76 void inv_meter_set_channels(InvMeter *meter, gint num); 77 void inv_meter_set_LdB(InvMeter *meter, float num); 78 void inv_meter_set_RdB(InvMeter *meter, float num); 79 80 81 G_END_DECLS 82 83 #endif /* __METER_H */ 84 85