2 * This file is a part of hildon
4 * Copyright (C) 2005, 2006 Nokia Corporation, all rights reserved.
6 * Contact: Rodrigo Novo <rodrigo.novo@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; 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_DISABLE_DEPRECATED
27 #ifndef __HILDON_TIME_EDITOR_H__
28 #define __HILDON_TIME_EDITOR_H__
34 #define HILDON_TYPE_TIME_EDITOR \
35 (hildon_time_editor_get_type())
37 #define HILDON_TIME_EDITOR(obj) \
38 (GTK_CHECK_CAST (obj, HILDON_TYPE_TIME_EDITOR, HildonTimeEditor))
40 #define HILDON_TIME_EDITOR_CLASS(klass) \
41 (GTK_CHECK_CLASS_CAST ((klass), HILDON_TYPE_TIME_EDITOR, \
42 HildonTimeEditorClass))
44 #define HILDON_IS_TIME_EDITOR(obj) \
45 (GTK_CHECK_TYPE (obj, HILDON_TYPE_TIME_EDITOR))
47 #define HILDON_IS_TIME_EDITOR_CLASS(klass) \
48 (GTK_CHECK_CLASS_TYPE ((klass), HILDON_TYPE_TIME_EDITOR))
52 HILDON_DATE_TIME_ERROR_NO_ERROR = -1,
53 HILDON_DATE_TIME_ERROR_MAX_HOURS,
54 HILDON_DATE_TIME_ERROR_MAX_MINS,
55 HILDON_DATE_TIME_ERROR_MAX_SECS,
56 HILDON_DATE_TIME_ERROR_MAX_DAY,
57 HILDON_DATE_TIME_ERROR_MAX_MONTH,
58 HILDON_DATE_TIME_ERROR_MAX_YEAR,
59 HILDON_DATE_TIME_ERROR_MIN_HOURS,
60 HILDON_DATE_TIME_ERROR_MIN_MINS,
61 HILDON_DATE_TIME_ERROR_MIN_SECS,
62 HILDON_DATE_TIME_ERROR_MIN_DAY,
63 HILDON_DATE_TIME_ERROR_MIN_MONTH,
64 HILDON_DATE_TIME_ERROR_MIN_YEAR,
65 HILDON_DATE_TIME_ERROR_EMPTY_HOURS,
66 HILDON_DATE_TIME_ERROR_EMPTY_MINS,
67 HILDON_DATE_TIME_ERROR_EMPTY_SECS,
68 HILDON_DATE_TIME_ERROR_EMPTY_DAY,
69 HILDON_DATE_TIME_ERROR_EMPTY_MONTH,
70 HILDON_DATE_TIME_ERROR_EMPTY_YEAR,
71 HILDON_DATE_TIME_ERROR_MIN_DURATION,
72 HILDON_DATE_TIME_ERROR_MAX_DURATION,
73 HILDON_DATE_TIME_ERROR_INVALID_CHAR,
74 HILDON_DATE_TIME_ERROR_INVALID_DATE,
75 HILDON_DATE_TIME_ERROR_INVALID_TIME
76 } HildonDateTimeError;
78 typedef struct _HildonTimeEditor HildonTimeEditor;
80 typedef struct _HildonTimeEditorClass HildonTimeEditorClass;
82 struct _HildonTimeEditor
87 struct _HildonTimeEditorClass
89 GtkContainerClass parent_class;
91 gboolean (*time_error) (HildonTimeEditor *editor,
92 HildonDateTimeError type);
96 hildon_time_editor_get_type (void);
99 hildon_time_editor_new (void);
102 hildon_time_editor_set_time (HildonTimeEditor *editor,
108 hildon_time_editor_get_time (HildonTimeEditor *editor,
114 hildon_time_editor_set_duration_range (HildonTimeEditor *editor,
119 hildon_time_editor_get_duration_range (HildonTimeEditor *editor,
124 hildon_time_editor_set_ticks (HildonTimeEditor *editor,
128 hildon_time_editor_get_ticks (HildonTimeEditor *editor);
131 hildon_time_editor_set_show_seconds (HildonTimeEditor *editor,
132 gboolean show_seconds);
135 hildon_time_editor_get_show_seconds (HildonTimeEditor *editor);
138 hildon_time_editor_set_show_hours (HildonTimeEditor *editor,
139 gboolean show_hours);
142 hildon_time_editor_get_show_hours (HildonTimeEditor *editor);
145 hildon_time_editor_set_duration_mode (HildonTimeEditor *editor,
146 gboolean duration_mode);
149 hildon_time_editor_get_duration_mode (HildonTimeEditor *editor);
152 hildon_time_editor_set_duration_min (HildonTimeEditor *editor,
156 hildon_time_editor_get_duration_min (HildonTimeEditor *editor);
159 hildon_time_editor_set_duration_max (HildonTimeEditor *editor,
163 hildon_time_editor_get_duration_max (HildonTimeEditor *editor);
166 hildon_time_editor_get_time_separators (GtkLabel *hm_sep_label,
167 GtkLabel *ms_sep_label);
171 #endif /* __HILDON_TIME_EDITOR_H__ */
173 #endif /* HILDON_DISABLE_DEPRECATED */