2
/* GnomeMeeting -- A Video-Conferencing application
3
* Copyright (C) 2000-2006 Damien Sandras
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.
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.
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20
* GnomeMeeting is licensed under the GPL license and as a special exception,
21
* you have permission to link or otherwise combine this program with the
22
* programs OpenH323 and Pwlib, and distribute the combination, without
23
* applying the requirements of the GNU GPL to the OpenH323 program, as long
24
* as you do follow the requirements of the GNU GPL for all the rest of the
25
* software thus combined.
30
* gtklevelmeter.h - description
31
* -------------------------------
32
* begin : Sat Dec 23 2003
33
* copyright : (C) 2003 by Stefan Br�ns <lurch@gmx.li>
34
* description : This file contains a GTK VU Meter.
39
#ifndef __GTK_LEVELMETER_H__
40
#define __GTK_LEVELMETER_H__
43
#include <gtk/gtkwidget.h>
50
#define GTK_LEVELMETER(obj) GTK_CHECK_CAST (obj, gtk_levelmeter_get_type (), GtkLevelMeter)
51
#define GTK_LEVELMETER_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gtk_levelmeter_get_type (), GtkLevelMeterClass)
52
#define GTK_IS_LEVELMETER(obj) GTK_CHECK_TYPE (obj, gtk_levelmeter_get_type ())
55
typedef struct _GtkLevelMeter GtkLevelMeter;
56
typedef struct _GtkLevelMeterClass GtkLevelMeterClass;
61
GTK_METER_LEFT_TO_RIGHT,
62
GTK_METER_BOTTOM_TO_TOP
63
} GtkLevelMeterOrientation;
70
/* Orientation of the level meter */
71
GtkLevelMeterOrientation orientation;
73
/* show a peak indicator */
76
/* show a continous or a segmented (LED like) display */
79
/* The ranges of different color of the display */
82
/* The pixmap for double buffering */
83
GdkPixmap* offscreen_image;
85
/* The pixmap with the highlighted bar */
86
GdkPixmap* offscreen_image_hl;
88
/* The pixmap with the dark bar */
89
GdkPixmap* offscreen_image_dark;
96
struct _GtkLevelMeterClass
98
GtkWidgetClass parent_class;
102
struct _GtkLevelMeterColorEntry
110
typedef struct _GtkLevelMeterColorEntry GtkLevelMeterColorEntry;
113
* BEHAVIOR : Creates a new VU meter
116
GtkWidget *gtk_levelmeter_new (void);
119
* BEHAVIOR : Get the GType
122
GType gtk_levelmeter_get_type (void);
125
* BEHAVIOR : Set new values for level.
126
* PRE : Level should be between 0.0 and 1.0,
127
* lower/higher values are clamped.
129
void gtk_levelmeter_set_level (GtkLevelMeter *,
134
* BEHAVIOR : Clear the GtkLevelMeter.
137
void gtk_levelmeter_clear (GtkLevelMeter *);
141
* BEHAVIOR : Set new colors for the different ranges of the meter
142
* PRE : Each array entry has to be a GtkLevelMeterColorEntry,
143
* the number of entries is not limited, each range starts
144
* at the stopvalue of the previous entry (or 0.0 for the
145
* first), color allocation is done by the widget. A copy
146
* of the array is stored, so the array given as an argument
147
* can be deleted after the function call.
149
void gtk_levelmeter_set_colors (GtkLevelMeter *,
154
#endif /* __GTK_LEVELMETER_H__ */