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_WEEKDAY_PICKER_H__
26 #define __HILDON_WEEKDAY_PICKER_H__
28 #include <gtk/gtkcontainer.h>
32 * HILDON_WEEKDAY_PICKER_TYPE:
34 * Macro for getting type of weekday picker.
36 #define HILDON_WEEKDAY_PICKER_TYPE \
37 ( hildon_weekday_picker_get_type() )
38 #define HILDON_WEEKDAY_PICKER(obj) \
39 (GTK_CHECK_CAST (obj, HILDON_WEEKDAY_PICKER_TYPE, \
41 #define HILDON_WEEKDAY_PICKER_CLASS(klass) \
42 (GTK_CHECK_CLASS_CAST ((klass), \
43 HILDON_WEEKDAY_PICKER_TYPE, HildonWeekdayPickerClass))
44 #define HILDON_IS_WEEKDAY_PICKER(obj) \
45 (GTK_CHECK_TYPE (obj, HILDON_WEEKDAY_PICKER_TYPE))
46 #define HILDON_IS_WEEKDAY_PICKER_CLASS(klass) \
47 (GTK_CHECK_CLASS_TYPE ((klass), HILDON_WEEKDAY_PICKER_TYPE))
49 * HildonWeekdayPicker:
51 * Internal struct for weekday picker.
53 typedef struct _HildonWeekdayPicker HildonWeekdayPicker;
54 typedef struct _HildonWeekdayPickerClass HildonWeekdayPickerClass;
56 struct _HildonWeekdayPicker {
60 struct _HildonWeekdayPickerClass {
61 GtkContainerClass parent_class;
63 void (*selection_changed) (HildonWeekdayPicker * self);
66 GType hildon_weekday_picker_get_type(void);
69 * hildon_weekday_picker_new:
71 * Creates a new #HildonWeekdayPicker.
73 * Return value: New #HildonWeekdayPicker.
75 GtkWidget *hildon_weekday_picker_new(void);
78 * hildon_weekday_picker_set_day:
79 * @picker: #HildonWeekdayPicker.
80 * @day: #GDateWeekday.
82 * Select specified weekday.
85 void hildon_weekday_picker_set_day(HildonWeekdayPicker * picker,
89 * hildon_weekday_picker_unset_day:
90 * @picker: #HildonWeekdayPicker.
91 * @day: #GDateWeekday.
93 * Unselect specified weekday.
96 void hildon_weekday_picker_unset_day(HildonWeekdayPicker * picker,
100 * hildon_weekday_picker_toggle_day:
101 * @picker: #HildonWeekdayPicker.
102 * @day: #GDateWeekday.
104 * Toggle current status of the specified weekday.
107 void hildon_weekday_picker_toggle_day(HildonWeekdayPicker * picker,
111 * hildon_weekday_picker_set_all:
112 * @picker: #HildonWeekdayPicker.
114 * Select all weekdays.
117 void hildon_weekday_picker_set_all(HildonWeekdayPicker * picker);
120 * hildon_weekday_picker_unset_all:
121 * @picker: #HildonWeekdayPicker.
123 * Unselect all weekdays.
126 void hildon_weekday_picker_unset_all(HildonWeekdayPicker * picker);
129 * hildon_weekday_picker_isset_day:
130 * @picker: #HildonWeekdayPicker.
131 * @day: #GDateWeekday.
133 * Check if the specified weekday is set.
135 * Return value: Set/not set.
137 gboolean hildon_weekday_picker_isset_day(HildonWeekdayPicker * picker,