2 * This file is a part of hildon
4 * Copyright (C) 2005, 2008 Nokia Corporation.
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free
18 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 #ifndef __HILDON_DATE_SELECTOR_H__
22 #define __HILDON_DATE_SELECTOR_H__
24 #include "hildon-touch-picker.h"
27 #define HILDON_TYPE_DATE_SELECTOR (hildon_date_selector_get_type ())
28 #define HILDON_DATE_SELECTOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), HILDON_TYPE_DATE_SELECTOR, HildonDateSelector))
29 #define HILDON_DATE_SELECTOR_CLASS(vtable) (G_TYPE_CHECK_CLASS_CAST ((vtable), HILDON_TYPE_DATE_SELECTOR, HildonDateSelectorClass))
30 #define HILDON_IS_DATE_SELECTOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), HILDON_TYPE_DATE_SELECTOR))
31 #define HILDON_IS_DATE_SELECTOR_CLASS(vtable) (G_TYPE_CHECK_CLASS_TYPE ((vtable), HILDON_TYPE_DATE_SELECTOR))
32 #define HILDON_DATE_SELECTOR_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), HILDON_TYPE_DATE_SELECTOR, HildonDateSelectorClass))
34 typedef struct _HildonDateSelector HildonDateSelector;
35 typedef struct _HildonDateSelectorClass HildonDateSelectorClass;
36 typedef struct _HildonDateSelectorPrivate HildonDateSelectorPrivate;
38 struct _HildonDateSelector
40 HildonTouchPicker parent_instance;
43 HildonDateSelectorPrivate *priv;
46 struct _HildonDateSelectorClass
48 HildonTouchPickerClass parent_class;
55 GType hildon_date_selector_get_type (void) G_GNUC_CONST;
56 GtkWidget * hildon_date_selector_new (void);
59 gboolean hildon_date_selector_select_month (HildonDateSelector * selector,
60 guint month, guint year);
61 void hildon_date_selector_select_day (HildonDateSelector * selector, guint day);
64 * This is an addition to the current hildon-calendar API,
65 * probably we'll require to set the whole date, and not the
66 * current two-step (year,month)+(day)
70 gboolean hildon_date_selector_select_current_date (HildonDateSelector * selector,
71 guint year, guint month, guint day);
72 void hildon_date_selector_get_date (HildonDateSelector * selector,
73 guint * year, guint * month, guint * day);
77 #endif /* __HILDON_DATE_SELECTOR_H__ */