2 * This file is part of hildon-libs
4 * Copyright (C) 2005 Nokia Corporation.
6 * Contact: Luc Pionchon <luc.pionchon@nokia.com>
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; either version 2.1 of
11 * the License, or (at your option) any later version.
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.
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
25 #ifndef HILDON_RANGE_EDITOR_H
26 #define HILDON_RANGE_EDITOR_H
29 #include <glib-object.h>
30 #include <gtk/gtkcontainer.h>
31 #include <gtk/gtkhbox.h>
36 * HILDON_RANGE_EDITOR_TYPE
38 * Macro for getting type of range editor.
40 #define HILDON_RANGE_EDITOR_TYPE (hildon_range_editor_get_type())
41 #define HILDON_RANGE_EDITOR(obj) \
42 (GTK_CHECK_CAST (obj, HILDON_RANGE_EDITOR_TYPE, HildonRangeEditor))
43 #define HILDON_RANGE_EDITOR_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass),\
44 HILDON_RANGE_EDITOR_TYPE, HildonRangeEditorClass))
45 #define HILDON_IS_RANGE_EDITOR(obj) \
46 (GTK_CHECK_TYPE (obj, HILDON_RANGE_EDITOR_TYPE))
47 #define HILDON_IS_RANGE_EDITOR_CLASS(klass) \
48 (GTK_CHECK_CLASS_TYPE ((klass), HILDON_RANGE_EDITOR_TYPE))
52 * Internal struct for range editor.
54 typedef struct _HildonRangeEditor HildonRangeEditor;
55 typedef struct _HildonRangeEditorClass HildonRangeEditorClass;
58 struct _HildonRangeEditor {
62 struct _HildonRangeEditorClass {
63 GtkContainerClass parent_class;
66 GType hildon_range_editor_get_type(void) G_GNUC_CONST;
68 GtkWidget *hildon_range_editor_new_with_separator(gchar * separator);
69 GtkWidget *hildon_range_editor_new(void);
71 void hildon_range_editor_set_range(HildonRangeEditor * editor,
72 gint start, gint end);
73 void hildon_range_editor_get_range(HildonRangeEditor * editor,
74 gint * start, gint * end);
75 void hildon_range_editor_set_limits(HildonRangeEditor * editor,
76 gint start, gint end);
78 void hildon_range_editor_set_lower (HildonRangeEditor *editor, gint value);
79 void hildon_range_editor_set_higher (HildonRangeEditor *editor, gint value);
80 gint hildon_range_editor_get_lower (HildonRangeEditor *editor);
81 gint hildon_range_editor_get_higher (HildonRangeEditor *editor);
82 void hildon_range_editor_set_min (HildonRangeEditor *editor, gint value);
83 void hildon_range_editor_set_max (HildonRangeEditor *editor, gint value);
84 gint hildon_range_editor_get_min (HildonRangeEditor *editor);
85 gint hildon_range_editor_get_max (HildonRangeEditor *editor);
86 void hildon_range_editor_set_separator (HildonRangeEditor *editor,
87 const gchar *separator);
88 const gchar *hildon_range_editor_get_separator (HildonRangeEditor *editor);