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_TIME_EDITOR_H__
26 #define __HILDON_TIME_EDITOR_H__
28 #include <gtk/gtkcontainer.h>
31 #define HILDON_TYPE_TIME_EDITOR ( hildon_time_editor_get_type() )
32 #define HILDON_TIME_EDITOR(obj) (GTK_CHECK_CAST (obj,\
33 HILDON_TYPE_TIME_EDITOR, HildonTimeEditor))
34 #define HILDON_TIME_EDITOR_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass),\
35 HILDON_TYPE_TIME_EDITOR, HildonTimeEditorClass))
36 #define HILDON_IS_TIME_EDITOR(obj) (GTK_CHECK_TYPE (obj,\
37 HILDON_TYPE_TIME_EDITOR))
38 #define HILDON_IS_TIME_EDITOR_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass),\
39 HILDON_TYPE_TIME_EDITOR))
40 typedef struct _HildonTimeEditor HildonTimeEditor;
41 typedef struct _HildonTimeEditorClass HildonTimeEditorClass;
43 struct _HildonTimeEditor {
47 struct _HildonTimeEditorClass {
48 GtkContainerClass parent_class;
52 * HildonTimeEditorField:
53 * @HILDON_TIME_EDITOR_HOUR_FIELD: select and highlight hour field.
54 * @HILDON_TIME_EDITOR_MINUTE_FIELD: select and highlight minute field.
55 * @HILDON_TIME_EDITOR_SECOND_FIELD: select and highlight second field.
57 * These values are used to indicate which editor field should be highlighted.
60 HILDON_TIME_EDITOR_HOUR_FIELD,
61 HILDON_TIME_EDITOR_MINUTE_FIELD,
62 HILDON_TIME_EDITOR_SECOND_FIELD
63 } HildonTimeEditorField;
65 GType hildon_time_editor_get_type(void);
66 GtkWidget *hildon_time_editor_new(void);
68 void hildon_time_editor_set_time(HildonTimeEditor * editor, guint hours,
69 guint minutes, guint seconds);
70 void hildon_time_editor_get_time(HildonTimeEditor * editor, guint * hours,
71 guint * minutes, guint * seconds);
73 void hildon_time_editor_show_seconds(HildonTimeEditor * editor,
75 void hildon_time_editor_enable_duration_mode(HildonTimeEditor * editor,
78 void hildon_time_editor_set_duration_range(HildonTimeEditor * editor,
81 void hildon_time_editor_get_duration_range(HildonTimeEditor * editor,