1
/*
2
 * This file is a part of hildon
3
 *
4
 * Copyright (C) 2005, 2008 Nokia Corporation.
5
 *
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.
10
 *
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.
15
 *
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.
19
 */
20
21
#ifndef                                         __HILDON_DATE_SELECTOR_H__
22
#define                                         __HILDON_DATE_SELECTOR_H__
23
24
#include                                        "hildon-touch-selector.h"
25
26
G_BEGIN_DECLS
27
#define                                         HILDON_TYPE_DATE_SELECTOR \
28
                                                (hildon_date_selector_get_type ())
29
30
#define                                         HILDON_DATE_SELECTOR(obj) \
31
                                                (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
32
                                                HILDON_TYPE_DATE_SELECTOR, HildonDateSelector))
33
34
#define                                         HILDON_DATE_SELECTOR_CLASS(vtable) \
35
                                                (G_TYPE_CHECK_CLASS_CAST ((vtable), \
36
                                                HILDON_TYPE_DATE_SELECTOR, HildonDateSelectorClass))
37
38
#define                                         HILDON_IS_DATE_SELECTOR(obj) \
39
                                                (G_TYPE_CHECK_INSTANCE_TYPE ((obj), HILDON_TYPE_DATE_SELECTOR))
40
41
#define                                         HILDON_IS_DATE_SELECTOR_CLASS(vtable) \
42
                                                (G_TYPE_CHECK_CLASS_TYPE ((vtable), HILDON_TYPE_DATE_SELECTOR))
43
44
#define                                         HILDON_DATE_SELECTOR_GET_CLASS(inst) \
45
                                                (G_TYPE_INSTANCE_GET_CLASS ((inst), \
46
                                                HILDON_TYPE_DATE_SELECTOR, HildonDateSelectorClass))
47
48
typedef struct                                  _HildonDateSelector HildonDateSelector;
49
typedef struct                                  _HildonDateSelectorClass HildonDateSelectorClass;
50
typedef struct                                  _HildonDateSelectorPrivate HildonDateSelectorPrivate;
51
52
struct                                          _HildonDateSelector
53
{
54
  HildonTouchSelector parent_instance;
55
56
  /*< private > */
57
  HildonDateSelectorPrivate *priv;
58
};
59
60
struct                                          _HildonDateSelectorClass
61
{
62
  HildonTouchSelectorClass parent_class;
63
64
  /* signals */
65
};
66
67
68
/* construction */
69
GType
70
hildon_date_selector_get_type                   (void) G_GNUC_CONST;
71
72
GtkWidget*
73
hildon_date_selector_new                        (void);
74
75
GtkWidget *
76
hildon_date_selector_new_with_year_range        (gint min_year,
77
                                                 gint max_year);
78
79
/* date management */
80
gboolean
81
hildon_date_selector_select_month               (HildonDateSelector *selector,
82
                                                 guint               month,
83
                                                 guint               year);
84
85
void
86
hildon_date_selector_select_day                 (HildonDateSelector *selector,
87
                                                 guint               day);
88
89
gboolean
90
hildon_date_selector_select_current_date        (HildonDateSelector *selector,
91
                                                 guint               year,
92
                                                 guint               month,
93
                                                 guint               day);
94
95
void
96
hildon_date_selector_get_date                   (HildonDateSelector *selector,
97
                                                 guint              *year,
98
                                                 guint              *month,
99
                                                 guint              *day);
100
101
G_END_DECLS
102
103
#endif /* __HILDON_DATE_SELECTOR_H__ */