2006-09-12 Michael Dominic Kostrzewa <michael.kostrzewa@nokia.com>
[hildon] / hildon-widgets / 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 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
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  * HILDON_TYPE_RANGE_EDITOR
33  *
34  * Macro for getting type of range editor.
35  * Since: 0.12.10
36  */
37 #define HILDON_TYPE_RANGE_EDITOR (hildon_range_editor_get_type())
38
39 /**
40  * HILDON_RANGE_EDITOR_TYPE
41  *
42  * Deprecated: use #HILDON_TYPE_RANGE_EDITOR instead
43  */
44 #define HILDON_RANGE_EDITOR_TYPE HILDON_TYPE_RANGE_EDITOR
45
46 #define HILDON_RANGE_EDITOR(obj) \
47         (GTK_CHECK_CAST (obj, HILDON_TYPE_RANGE_EDITOR, HildonRangeEditor))
48 #define HILDON_RANGE_EDITOR_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass),\
49          HILDON_TYPE_RANGE_EDITOR, HildonRangeEditorClass))
50 #define HILDON_IS_RANGE_EDITOR(obj) \
51         (GTK_CHECK_TYPE (obj, HILDON_TYPE_RANGE_EDITOR))
52 #define HILDON_IS_RANGE_EDITOR_CLASS(klass) \
53         (GTK_CHECK_CLASS_TYPE ((klass), HILDON_TYPE_RANGE_EDITOR))
54 /**
55  * HildonRangeEditor:
56  *
57  * Internal struct for range editor.
58  */
59 typedef struct _HildonRangeEditor HildonRangeEditor;
60 typedef struct _HildonRangeEditorClass HildonRangeEditorClass;
61
62
63 struct _HildonRangeEditor {
64     GtkContainer parent;
65 };
66
67 struct _HildonRangeEditorClass {
68     GtkContainerClass parent_class;
69 };
70
71 GType hildon_range_editor_get_type(void) G_GNUC_CONST;
72
73 GtkWidget *hildon_range_editor_new_with_separator(const gchar * separator);
74 GtkWidget *hildon_range_editor_new(void);
75
76 void hildon_range_editor_set_range(HildonRangeEditor * editor,
77                                    gint start, gint end);
78 void hildon_range_editor_get_range(HildonRangeEditor * editor,
79                                    gint * start, gint * end);
80 void hildon_range_editor_set_limits(HildonRangeEditor * editor,
81                                     gint start, gint end);
82
83 void hildon_range_editor_set_lower (HildonRangeEditor *editor, gint value);
84 void hildon_range_editor_set_higher (HildonRangeEditor *editor, gint value);
85 gint hildon_range_editor_get_lower (HildonRangeEditor *editor);
86 gint hildon_range_editor_get_higher (HildonRangeEditor *editor);
87 void hildon_range_editor_set_min (HildonRangeEditor *editor, gint value);
88 void hildon_range_editor_set_max (HildonRangeEditor *editor, gint value);
89 gint hildon_range_editor_get_min (HildonRangeEditor *editor);
90 gint hildon_range_editor_get_max (HildonRangeEditor *editor);
91 void hildon_range_editor_set_separator (HildonRangeEditor *editor,
92                                         const gchar *separator);
93 const gchar *hildon_range_editor_get_separator (HildonRangeEditor *editor);
94
95 G_END_DECLS
96 #endif /* __HILDON_RANGE_EDITOR_H__ */