Fix debian/changelog
[hildon] / hildon / hildon-time-editor.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_DISABLE_DEPRECATED
26
27 #ifndef                                         __HILDON_TIME_EDITOR_H__
28 #define                                         __HILDON_TIME_EDITOR_H__
29
30 #include                                        <gtk/gtk.h>
31
32 G_BEGIN_DECLS
33
34 #define                                         HILDON_TYPE_TIME_EDITOR \
35                                                 (hildon_time_editor_get_type())
36
37 #define                                         HILDON_TIME_EDITOR(obj) \
38                                                 (GTK_CHECK_CAST (obj, HILDON_TYPE_TIME_EDITOR, HildonTimeEditor))
39
40 #define                                         HILDON_TIME_EDITOR_CLASS(klass) \
41                                                 (GTK_CHECK_CLASS_CAST ((klass), HILDON_TYPE_TIME_EDITOR, \
42                                                 HildonTimeEditorClass))
43
44 #define                                         HILDON_IS_TIME_EDITOR(obj) \
45                                                 (GTK_CHECK_TYPE (obj, HILDON_TYPE_TIME_EDITOR))
46
47 #define                                         HILDON_IS_TIME_EDITOR_CLASS(klass) \
48                                                 (GTK_CHECK_CLASS_TYPE ((klass), HILDON_TYPE_TIME_EDITOR))
49
50 typedef enum 
51 {
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;
77
78 typedef struct                                  _HildonTimeEditor HildonTimeEditor;
79
80 typedef struct                                  _HildonTimeEditorClass HildonTimeEditorClass;
81
82 struct                                          _HildonTimeEditor 
83 {
84     GtkContainer parent;
85 };
86
87 struct                                          _HildonTimeEditorClass 
88 {
89     GtkContainerClass parent_class;
90
91     gboolean (*time_error) (HildonTimeEditor *editor,
92                             HildonDateTimeError type);
93 };
94
95 GType G_GNUC_CONST
96 hildon_time_editor_get_type                     (void);
97
98 GtkWidget*
99 hildon_time_editor_new                          (void);
100
101 void      
102 hildon_time_editor_set_time                     (HildonTimeEditor *editor,
103                                                  guint hours,
104                                                  guint minutes,
105                                                  guint seconds);
106
107 void       
108 hildon_time_editor_get_time                     (HildonTimeEditor *editor,
109                                                  guint *hours,
110                                                  guint *minutes,
111                                                  guint *seconds);
112
113 void       
114 hildon_time_editor_set_duration_range           (HildonTimeEditor *editor,
115                                                  guint min_seconds,
116                                                  guint max_seconds);
117
118 void       
119 hildon_time_editor_get_duration_range           (HildonTimeEditor *editor,
120                                                  guint *min_seconds,
121                                                  guint *max_seconds);
122
123 void       
124 hildon_time_editor_set_ticks                    (HildonTimeEditor *editor, 
125                                                  guint ticks);
126
127 guint    
128 hildon_time_editor_get_ticks                    (HildonTimeEditor *editor);
129
130 void       
131 hildon_time_editor_set_show_seconds             (HildonTimeEditor *editor, 
132                                                  gboolean show_seconds);
133
134 gboolean
135 hildon_time_editor_get_show_seconds             (HildonTimeEditor *editor);
136
137 void       
138 hildon_time_editor_set_show_hours               (HildonTimeEditor *editor, 
139                                                  gboolean show_hours);
140
141 gboolean  
142 hildon_time_editor_get_show_hours               (HildonTimeEditor *editor);
143
144 void     
145 hildon_time_editor_set_duration_mode            (HildonTimeEditor *editor, 
146                                                  gboolean duration_mode);
147
148 gboolean   
149 hildon_time_editor_get_duration_mode            (HildonTimeEditor *editor);
150
151 void    
152 hildon_time_editor_set_duration_min             (HildonTimeEditor *editor, 
153                                                  guint duration_min);
154
155 guint     
156 hildon_time_editor_get_duration_min             (HildonTimeEditor *editor);
157
158 void    
159 hildon_time_editor_set_duration_max             (HildonTimeEditor *editor, 
160                                                  guint duration_max);
161
162 guint 
163 hildon_time_editor_get_duration_max             (HildonTimeEditor *editor);
164
165 void 
166 hildon_time_editor_get_time_separators          (GtkLabel *hm_sep_label,
167                                                  GtkLabel *ms_sep_label);
168
169 G_END_DECLS
170
171 #endif                                          /* __HILDON_TIME_EDITOR_H__ */
172
173 #endif                                          /* HILDON_DISABLE_DEPRECATED */