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