2 * This file is a part of hildon
4 * Copyright (C) 2005, 2006 Nokia Corporation, all rights reserved.
6 * Contact: Michael Dominic Kostrzewa <michael.kostrzewa@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_TIME_EDITOR_PRIVATE_H__
26 #define __HILDON_TIME_EDITOR_PRIVATE_H__
32 #define HILDON_TIME_EDITOR_GET_PRIVATE(obj) \
33 (G_TYPE_INSTANCE_GET_PRIVATE ((obj),\
34 HILDON_TYPE_TIME_EDITOR, HildonTimeEditorPrivate));
36 /* Indices for h/m/s entries in priv->entries */
45 typedef struct _HildonTimeEditorPrivate HildonTimeEditorPrivate;
47 struct _HildonTimeEditorPrivate
49 guint ticks; /* Current duration in seconds */
54 GtkWidget *iconbutton; /* button for icon */
56 GtkWidget *frame; /* frame around the entries */
57 GtkWidget *entries[ENTRY_COUNT]; /* h, m, s entries */
58 GtkWidget *hm_label; /* between hour and minute */
59 GtkWidget *sec_label; /* between minute and second */
60 GtkWidget *ampm_label; /* label for showing am or pm */
62 GtkWidget *error_widget; /* field to highlight in idle */
63 GtkWidget *ampm_button; /* am/pm change button */
66 gboolean duration_mode; /* In HildonDurationEditor mode */
67 gboolean show_seconds; /* show seconds */
68 gboolean show_hours; /* show hours */
70 gboolean ampm_pos_after; /* is am/pm shown after others */
71 gboolean clock_24h; /* whether to show a 24h clock */
72 gboolean am; /* TRUE == am, FALSE == pm */
74 guint duration_min; /* duration editor ranges */
75 guint duration_max; /* duration editor ranges */
78 gboolean skipper; /* FIXME (MDK): To prevent us from looping inside the validation events.
79 When set to TRUE further validations (that can happen from-inside other
80 validations) are being skipped. Nasty hack to cope with a bad design. */
85 #endif /* __HILDON_TIME_EDITOR_H__ */