5 * Copyright (C) 2002-2005 Monty
7 * Postfish is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2, or (at your option)
12 * Postfish is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with Postfish; see the file COPYING. If not, write to the
19 * Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
24 #ifndef __MULTIBAR_H__
25 #define __MULTIBAR_H__
30 #include <glib-object.h>
31 #include <gtk/gtkcontainer.h>
32 #include <gtk/gtksignal.h>
33 #include <gtk/gtkdrawingarea.h>
37 #define MULTIBAR_TYPE (multibar_get_type ())
38 #define MULTIBAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MULTIBAR_TYPE, Multibar))
39 #define MULTIBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MULTIBAR_TYPE, MultibarClass))
40 #define IS_MULTIBAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MULTIBAR_TYPE))
41 #define IS_MULTIBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MULTIBAR_TYPE))
43 typedef struct _Multibar Multibar
;
44 typedef struct _MultibarClass MultibarClass
;
46 typedef struct bartack
{
53 #define HI_ATTACK (1<<0)
54 #define LO_ATTACK (1<<1)
55 #define HI_DECAY (1<<2)
56 #define LO_DECAY (1<<3)
57 #define ZERO_DAMP (1<<4)
58 #define PEAK_FOLLOW (1<<5)
63 GtkDrawingArea canvas
;
78 bartrack
*bartrackers
;
86 GtkStateType thumbstate
[3];
102 void (*callback
)(GtkWidget
*,gpointer
);
106 struct _MultibarClass
{
108 GtkDrawingAreaClass parent_class
;
109 void (* multibar
) (Multibar
*m
);
112 GType
multibar_get_type (void);
113 GtkWidget
* multibar_new (int n
, char **labels
, float *levels
,
114 int thumbs
, int flags
);
115 GtkWidget
* multibar_slider_new (int n
, char **labels
, float *levels
,
118 void multibar_clear (Multibar
*m
);
119 void multibar_set (Multibar
*m
,float *lo
,float *hi
, int n
,int drawp
);
120 void multibar_thumb_set (Multibar
*m
,float v
, int n
);
121 void multibar_setwarn (Multibar
*m
,int drawp
);
122 void multibar_reset (Multibar
*m
);
123 void multibar_callback (Multibar
*m
,
125 (GtkWidget
*,gpointer
),
127 float multibar_get_value (Multibar
*m
,int n
);
128 void multibar_thumb_bounds (Multibar
*m
,float lo
, float hi
);
129 void multibar_thumb_increment (Multibar
*m
,float small
, float large
);
130 int multibar_thumb_grab_p (Multibar
*m
);
131 int multibar_thumb_focus (Multibar
*m
);