2006-09-12 Michael Dominic Kostrzewa <michael.kostrzewa@nokia.com>
[hildon] / hildon-widgets / hildon-volumebar.h
1 /*
2  * This file is part of hildon-libs
3  *
4  * Copyright (C) 2005, 2006 Nokia Corporation, all rights reserved.
5  *
6  * Contact: Michael Dominic Kostrzewa <michael.kostrzewa@nokia.com>
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public License
10  * as published by the Free Software Foundation; version 2.1 of
11  * the License or any later version.
12  *
13  * This library is distributed in the hope that it will be useful, but
14  * WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with this library; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
21  * 02110-1301 USA
22  *
23  */
24 #ifndef __HILDON_VOLUMEBAR_H__
25 #define __HILDON_VOLUMEBAR_H__
26
27 #include <gtk/gtkcontainer.h>
28 #include <gtk/gtkadjustment.h>
29
30 G_BEGIN_DECLS
31
32 #define HILDON_TYPE_VOLUMEBAR ( hildon_volumebar_get_type() )
33 #define HILDON_VOLUMEBAR(obj) (GTK_CHECK_CAST (obj,\
34         HILDON_TYPE_VOLUMEBAR, HildonVolumebar))
35 #define HILDON_VOLUMEBAR_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass),\
36         HILDON_TYPE_VOLUMEBAR, HildonVolumebarClass))
37 #define HILDON_IS_VOLUMEBAR(obj) (GTK_CHECK_TYPE (obj,\
38         HILDON_TYPE_VOLUMEBAR))
39 #define HILDON_IS_VOLUMEBAR_CLASS(klass) \
40         (GTK_CHECK_CLASS_TYPE ((klass), HILDON_TYPE_VOLUMEBAR))
41
42 typedef struct _HildonVolumebar      HildonVolumebar;
43 typedef struct _HildonVolumebarClass HildonVolumebarClass;
44
45 struct _HildonVolumebar {
46     GtkContainer par;
47 };
48
49 struct _HildonVolumebarClass {
50     GtkContainerClass parent_class;
51
52     /* signals */
53     void (*mute_toggled)  (HildonVolumebar * self);
54     void (*level_changed) (HildonVolumebar * self);
55 };
56
57
58 GType           hildon_volumebar_get_type       (void) G_GNUC_CONST;
59
60 double          hildon_volumebar_get_level      (HildonVolumebar *self);
61 void            hildon_volumebar_set_level      (HildonVolumebar *self,
62                                                  gdouble          level);
63
64 gboolean        hildon_volumebar_get_mute       (HildonVolumebar *self);
65 void            hildon_volumebar_set_mute       (HildonVolumebar *self,
66                                                  gboolean         mute);
67
68 void            hildon_volumebar_level_change   (HildonVolumebar *self);
69
70 GtkAdjustment * hildon_volumebar_get_adjustment (HildonVolumebar *self);
71
72
73 G_END_DECLS
74 #endif /* __HILDON_VOLUMEBAR_H__ */