Add HildonAppMenu::changed signal
[hildon] / hildon / hildon-time-editor-private.h
1 /*
2  * This file is a part of hildon
3  *
4  * Copyright (C) 2005, 2006 Nokia Corporation, all rights reserved.
5  *
6  * Contact: Rodrigo Novo <rodrigo.novo@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 (at your option) 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_TIME_EDITOR_PRIVATE_H__
26 #define                                         __HILDON_TIME_EDITOR_PRIVATE_H__
27
28 #include                                        <gtk/gtk.h>
29
30 G_BEGIN_DECLS
31
32 #define                                         HILDON_TIME_EDITOR_GET_PRIVATE(obj) \
33                                                 (G_TYPE_INSTANCE_GET_PRIVATE ((obj),\
34                                                 HILDON_TYPE_TIME_EDITOR, HildonTimeEditorPrivate));
35
36 /* Indices for h/m/s entries in priv->entries */
37 enum {
38     ENTRY_HOURS,
39     ENTRY_MINS,
40     ENTRY_SECS,
41   
42     ENTRY_COUNT
43 };
44
45 typedef struct                                  _HildonTimeEditorPrivate  HildonTimeEditorPrivate;
46
47 struct                                          _HildonTimeEditorPrivate 
48 {
49     guint      ticks;                           /* Current duration in seconds  */
50
51     gchar     *am_symbol;
52     gchar     *pm_symbol;
53
54     GtkWidget *iconbutton;                      /* button for icon              */
55
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   */
61
62     GtkWidget *error_widget;                    /* field to highlight in idle   */
63     GtkWidget *ampm_button;                     /* am/pm change button */
64
65
66     gboolean   duration_mode;                   /* In HildonDurationEditor mode */
67     gboolean   show_seconds;                    /* show seconds                 */
68     gboolean   show_hours;                      /* show hours                   */
69
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      */
73
74     guint      duration_min;                    /* duration editor ranges       */
75     guint      duration_max;                    /* duration editor ranges       */
76
77     guint      highlight_idle;
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. */
81 };
82
83 G_END_DECLS
84
85 #endif                                          /* __HILDON_TIME_EDITOR_H__ */