2e2693097e8be075981b3db5f63b53cc5ce16d95
[hildon] / src / hildon-range-editor.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.
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
25 #ifndef                                         __HILDON_RANGE_EDITOR_H__
26 #define                                         __HILDON_RANGE_EDITOR_H__
27
28 #include                                        <gtk/gtkcontainer.h>
29
30 G_BEGIN_DECLS
31
32 #define                                         HILDON_TYPE_RANGE_EDITOR \
33                                                 (hildon_range_editor_get_type())
34
35 #define                                         HILDON_RANGE_EDITOR(obj) \
36                                                 (GTK_CHECK_CAST (obj, HILDON_TYPE_RANGE_EDITOR, HildonRangeEditor))
37
38 #define                                         HILDON_RANGE_EDITOR_CLASS(klass) \
39                                                 (GTK_CHECK_CLASS_CAST ((klass),\
40                                                 HILDON_TYPE_RANGE_EDITOR, HildonRangeEditorClass))
41
42 #define                                         HILDON_IS_RANGE_EDITOR(obj) \
43                                                 (GTK_CHECK_TYPE (obj, HILDON_TYPE_RANGE_EDITOR))
44
45 #define                                         HILDON_IS_RANGE_EDITOR_CLASS(klass) \
46                                                 (GTK_CHECK_CLASS_TYPE ((klass), HILDON_TYPE_RANGE_EDITOR))
47
48 #define                                         HILDON_RANGE_EDITOR_GET_CLASS(obj) \
49                                                 ((HildonRangeEditorClass *) G_OBJECT_GET_CLASS(obj))
50
51 typedef struct                                  _HildonRangeEditor HildonRangeEditor;
52
53 typedef struct                                  _HildonRangeEditorClass HildonRangeEditorClass;
54
55 struct _HildonRangeEditor 
56 {
57     GtkContainer parent;
58 };
59
60 struct _HildonRangeEditorClass 
61 {
62     GtkContainerClass parent_class;
63 };
64
65 GType G_GNUC_CONST
66 hildon_range_editor_get_type                    (void);
67
68 GtkWidget*
69 hildon_range_editor_new_with_separator          (const gchar * separator);
70
71 GtkWidget*
72 hildon_range_editor_new                         (void);
73
74 void
75 hildon_range_editor_set_range                   (HildonRangeEditor *editor,
76                                                  gint start, 
77                                                  gint end);
78
79 void 
80 hildon_range_editor_get_range                   (HildonRangeEditor *editor,
81                                                  gint * start, 
82                                                  gint * end);
83
84 void
85 hildon_range_editor_set_limits                  (HildonRangeEditor *editor,
86                                                  gint start, 
87                                                  gint end);
88
89 void 
90 hildon_range_editor_set_lower                   (HildonRangeEditor *editor, 
91                                                  gint value);
92
93 void 
94 hildon_range_editor_set_higher                  (HildonRangeEditor *editor, 
95                                                  gint value);
96
97 gint 
98 hildon_range_editor_get_lower                   (HildonRangeEditor *editor);
99
100 gint
101 hildon_range_editor_get_higher                  (HildonRangeEditor *editor);
102
103 void
104 hildon_range_editor_set_min                     (HildonRangeEditor *editor, 
105                                                  gint value);
106
107 void
108 hildon_range_editor_set_max                     (HildonRangeEditor *editor, 
109                                                  gint value);
110
111 gint
112 hildon_range_editor_get_min                     (HildonRangeEditor *editor);
113
114 gint
115 hildon_range_editor_get_max                     (HildonRangeEditor *editor);
116
117 void 
118 hildon_range_editor_set_separator               (HildonRangeEditor *editor,
119                                                  const gchar *separator);
120
121 const gchar*
122 hildon_range_editor_get_separator               (HildonRangeEditor *editor);
123
124 G_END_DECLS
125
126 #endif                                          /* __HILDON_RANGE_EDITOR_H__ */