2008-09-24 Claudio Saavedra <csaavedra@igalia.com>
[hildon] / src / hildon-date-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: Michael Dominic Kostrzewa <michael.kostrzewa@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_DATE_EDITOR_H__
26 #define                                         __HILDON_DATE_EDITOR_H__
27
28 #include                                        <gtk/gtk.h>
29
30 #include                                        "hildon-time-editor.h"
31
32 G_BEGIN_DECLS
33
34 #define                                         HILDON_TYPE_DATE_EDITOR \
35                                                 (hildon_date_editor_get_type())
36
37 #define                                         HILDON_DATE_EDITOR(obj) \
38                                                 (GTK_CHECK_CAST (obj,\
39                                                 HILDON_TYPE_DATE_EDITOR, HildonDateEditor))
40
41 #define                                         HILDON_DATE_EDITOR_CLASS(klass) \
42                                                 (GTK_CHECK_CLASS_CAST ((klass),\
43                                                 HILDON_TYPE_DATE_EDITOR, HildonDateEditorClass))
44
45 #define                                         HILDON_IS_DATE_EDITOR(obj) \
46                                                 (GTK_CHECK_TYPE (obj,\
47                                                 HILDON_TYPE_DATE_EDITOR))
48
49 #define                                         HILDON_IS_DATE_EDITOR_CLASS(klass) \
50                                                 (GTK_CHECK_CLASS_TYPE ((klass),\
51                                                 HILDON_TYPE_DATE_EDITOR))
52
53 typedef struct                                  _HildonDateEditor HildonDateEditor;
54
55 typedef struct                                  _HildonDateEditorClass HildonDateEditorClass;
56
57
58 struct                                          _HildonDateEditor 
59 {
60     GtkContainer parent;
61 };
62
63 struct                                          _HildonDateEditorClass 
64 {
65     GtkContainerClass parent_class;
66
67     gboolean (*date_error) (HildonDateEditor *editor, HildonDateTimeError type);
68 };
69
70 GType G_GNUC_CONST
71 hildon_date_editor_get_type                     (void);
72
73 GtkWidget*
74 hildon_date_editor_new                          (void);
75
76 void 
77 hildon_date_editor_set_date                     (HildonDateEditor *date,
78                                                  guint year, 
79                                                  guint month, 
80                                                  guint day);
81
82 void 
83 hildon_date_editor_get_date                     (HildonDateEditor *date,
84                                                  guint *year, 
85                                                  guint *month, 
86                                                  guint *day);
87
88 gboolean 
89 hildon_date_editor_set_year                     (HildonDateEditor *editor, 
90                                                  guint year);
91
92 gboolean 
93 hildon_date_editor_set_month                    (HildonDateEditor *editor, 
94                                                  guint month);
95
96 gboolean hildon_date_editor_set_day             (HildonDateEditor *editor, 
97                                                  guint day);
98
99 guint
100 hildon_date_editor_get_year                     (HildonDateEditor *editor);
101
102 guint
103 hildon_date_editor_get_month                    (HildonDateEditor *editor);
104
105 guint
106 hildon_date_editor_get_day                      (HildonDateEditor *editor);
107
108 G_END_DECLS
109
110 #endif                                          /* __HILDON_DATE_EDITOR_H__ */