2 * This file is part of hildon-libs
4 * Copyright (C) 2005 Nokia Corporation.
6 * Contact: Luc Pionchon <luc.pionchon@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; either 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_DATE_EDITOR_H__
26 #define __HILDON_DATE_EDITOR_H__
28 #include <gtk/gtkcontainer.h>
32 * HILDON_TYPE_DATE_EDITOR:
34 * Macro for getting type of date editor.
37 #define HILDON_TYPE_DATE_EDITOR ( hildon_date_editor_get_type() )
41 * HILDON_DATE_EDITOR_TYPE:
43 * Deprecated: use #HILDON_TYPE_DATE_EDITOR instead
45 #define HILDON_DATE_EDITOR_TYPE HILDON_TYPE_DATE_EDITOR
47 #define HILDON_DATE_EDITOR(obj) (GTK_CHECK_CAST (obj,\
48 HILDON_TYPE_DATE_EDITOR, HildonDateEditor))
49 #define HILDON_DATE_EDITOR_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass),\
50 HILDON_TYPE_DATE_EDITOR, HildonDateEditorClass))
51 #define HILDON_IS_DATE_EDITOR(obj) (GTK_CHECK_TYPE (obj,\
52 HILDON_TYPE_DATE_EDITOR))
53 #define HILDON_IS_DATE_EDITOR_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass),\
54 HILDON_TYPE_DATE_EDITOR))
59 * Internal struct for date editor.
61 typedef struct _HildonDateEditor HildonDateEditor;
62 typedef struct _HildonDateEditorClass HildonDateEditorClass;
78 }HildonDateEditorErrorType;
80 struct _HildonDateEditor {
84 struct _HildonDateEditorClass {
85 GtkContainerClass parent_class;
87 gboolean (*date_error) (HildonDateEditor *editor,
88 HildonDateEditorErrorType type);
91 GType hildon_date_editor_get_type(void) G_GNUC_CONST;
93 GtkWidget *hildon_date_editor_new(void);
95 void hildon_date_editor_set_date(HildonDateEditor * date,
96 guint year, guint month, guint day);
98 void hildon_date_editor_get_date(HildonDateEditor * date,
99 guint * year, guint * month, guint * day);
101 gboolean hildon_date_editor_set_year(HildonDateEditor *editor, guint year);
102 gboolean hildon_date_editor_set_month(HildonDateEditor *editor, guint month);
103 gboolean hildon_date_editor_set_day(HildonDateEditor *editor, guint day);
105 guint hildon_date_editor_get_year(HildonDateEditor *editor);
106 guint hildon_date_editor_get_month(HildonDateEditor *editor);
107 guint hildon_date_editor_get_day(HildonDateEditor *editor);