2006-11-29 James Livingston <doclivingston@gmail.com>
[rhythmbox.git] / widgets / bacon-volume.h
blob60ae878d6b8136d4ed1253b9e249efbe39afc502
1 /* Volume Button / popup widget
2 * (c) copyright 2005 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
14 * You should have received a copy of the GNU Library General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, USA.
20 #ifndef __BACON_VOLUME_BUTTON_H__
21 #define __BACON_VOLUME_BUTTON_H__
23 #include <gdk-pixbuf/gdk-pixbuf.h>
24 #include <gtk/gtkbutton.h>
25 #include <gtk/gtkicontheme.h>
27 G_BEGIN_DECLS
29 #define BACON_TYPE_VOLUME_BUTTON \
30 (bacon_volume_button_get_type ())
31 #define BACON_VOLUME_BUTTON(obj) \
32 (G_TYPE_CHECK_INSTANCE_CAST ((obj), BACON_TYPE_VOLUME_BUTTON, \
33 BaconVolumeButton))
35 typedef struct _BaconVolumeButton {
36 GtkButton parent;
38 /* popup */
39 GtkWidget *dock, *scale, *image, *plus, *min;
40 GtkIconSize size;
41 gint click_id;
42 float direction;
43 guint32 pop_time;
44 GdkPixbuf *icon[4];
45 guint timeout : 1;
46 } BaconVolumeButton;
48 typedef struct _BaconVolumeButtonClass {
49 GtkButtonClass parent_class;
51 /* signals */
52 void (* value_changed) (BaconVolumeButton * button);
54 gpointer __bla[4];
55 } BaconVolumeButtonClass;
57 GType bacon_volume_button_get_type (void);
59 GtkWidget * bacon_volume_button_new (GtkIconSize size,
60 float min, float max,
61 float step);
62 float bacon_volume_button_get_value (BaconVolumeButton * button);
63 void bacon_volume_button_set_value (BaconVolumeButton * button,
64 float value);
66 G_END_DECLS
68 #endif /* __BACON_VOLUME_BUTTON_H__ */