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_DATE_EDITOR_TYPE:
34 * Macro for getting type of date editor.
36 #define HILDON_DATE_EDITOR_TYPE ( hildon_date_editor_get_type() )
37 #define HILDON_DATE_EDITOR(obj) (GTK_CHECK_CAST (obj,\
38 HILDON_DATE_EDITOR_TYPE, HildonDateEditor))
39 #define HILDON_DATE_EDITOR_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass),\
40 HILDON_DATE_EDITOR_TYPE, HildonDateEditorClass))
41 #define HILDON_IS_DATE_EDITOR(obj) (GTK_CHECK_TYPE (obj,\
42 HILDON_DATE_EDITOR_TYPE))
43 #define HILDON_IS_DATE_EDITOR_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass),\
44 HILDON_DATE_EDITOR_TYPE))
49 * Internal struct for date editor.
51 typedef struct _HildonDateEditor HildonDateEditor;
52 typedef struct _HildonDateEditorClass HildonDateEditorClass;
67 }HildonDateEditorErrorType;
69 struct _HildonDateEditor {
73 struct _HildonDateEditorClass {
74 GtkContainerClass parent_class;
76 gboolean (*date_error) (HildonDateEditor *editor,
77 HildonDateEditorErrorType type);
80 GType hildon_date_editor_get_type(void);
82 GtkWidget *hildon_date_editor_new(void);
84 void hildon_date_editor_set_date(HildonDateEditor * date,
85 guint year, guint month, guint day);
87 void hildon_date_editor_get_date(HildonDateEditor * date,
88 guint * year, guint * month, guint * day);
90 gboolean hildon_date_editor_set_year(HildonDateEditor *editor, guint year);
91 gboolean hildon_date_editor_set_month(HildonDateEditor *editor, guint month);
92 gboolean hildon_date_editor_set_day(HildonDateEditor *editor, guint day);
94 guint hildon_date_editor_get_year(HildonDateEditor *editor);
95 guint hildon_date_editor_get_month(HildonDateEditor *editor);
96 guint hildon_date_editor_get_day(HildonDateEditor *editor);