2 * This file is part of hildon-libs
4 * Copyright (C) 2005, 2006 Nokia Corporation.
6 * Contact: Michael Dominic Kostrzewa <michael.kostrzewa@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; version 2.1 of
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_TYPE_WEEKDAY_PICKER:
34 * Macro for getting type of weekday picker.
37 #define HILDON_TYPE_WEEKDAY_PICKER ( hildon_weekday_picker_get_type() )
40 * HILDON_WEEKDAY_PICKER_TYPE:
42 * Deprecated: use #HILDON_TYPE_WEEKDAY_PICKER instead.
44 #define HILDON_WEEKDAY_PICKER_TYPE HILDON_TYPE_WEEKDAY_PICKER
46 #define HILDON_WEEKDAY_PICKER(obj) \
47 (GTK_CHECK_CAST (obj, HILDON_TYPE_WEEKDAY_PICKER, \
49 #define HILDON_WEEKDAY_PICKER_CLASS(klass) \
50 (GTK_CHECK_CLASS_CAST ((klass), \
51 HILDON_TYPE_WEEKDAY_PICKER, HildonWeekdayPickerClass))
52 #define HILDON_IS_WEEKDAY_PICKER(obj) \
53 (GTK_CHECK_TYPE (obj, HILDON_TYPE_WEEKDAY_PICKER))
54 #define HILDON_IS_WEEKDAY_PICKER_CLASS(klass) \
55 (GTK_CHECK_CLASS_TYPE ((klass), HILDON_TYPE_WEEKDAY_PICKER))
57 * HildonWeekdayPicker:
59 * Internal struct for weekday picker.
61 typedef struct _HildonWeekdayPicker HildonWeekdayPicker;
62 typedef struct _HildonWeekdayPickerClass HildonWeekdayPickerClass;
64 struct _HildonWeekdayPicker {
68 struct _HildonWeekdayPickerClass {
69 GtkContainerClass parent_class;
71 void (*selection_changed) (HildonWeekdayPicker * self);
74 GType hildon_weekday_picker_get_type(void) G_GNUC_CONST;
77 * hildon_weekday_picker_new:
79 * Creates a new #HildonWeekdayPicker.
81 * Return value: New #HildonWeekdayPicker.
83 GtkWidget *hildon_weekday_picker_new(void);
86 * hildon_weekday_picker_set_day:
87 * @picker: #HildonWeekdayPicker.
88 * @day: #GDateWeekday.
90 * Select specified weekday.
93 void hildon_weekday_picker_set_day(HildonWeekdayPicker * picker,
97 * hildon_weekday_picker_unset_day:
98 * @picker: #HildonWeekdayPicker.
99 * @day: #GDateWeekday.
101 * Unselect specified weekday.
104 void hildon_weekday_picker_unset_day(HildonWeekdayPicker * picker,
108 * hildon_weekday_picker_toggle_day:
109 * @picker: #HildonWeekdayPicker.
110 * @day: #GDateWeekday.
112 * Toggle current status of the specified weekday.
115 void hildon_weekday_picker_toggle_day(HildonWeekdayPicker * picker,
119 * hildon_weekday_picker_set_all:
120 * @picker: #HildonWeekdayPicker.
122 * Select all weekdays.
125 void hildon_weekday_picker_set_all(HildonWeekdayPicker * picker);
128 * hildon_weekday_picker_unset_all:
129 * @picker: #HildonWeekdayPicker.
131 * Unselect all weekdays.
134 void hildon_weekday_picker_unset_all(HildonWeekdayPicker * picker);
137 * hildon_weekday_picker_isset_day:
138 * @picker: #HildonWeekdayPicker.
139 * @day: #GDateWeekday.
141 * Check if the specified weekday is set.
143 * Return value: Set/not set.
145 gboolean hildon_weekday_picker_isset_day(HildonWeekdayPicker * picker,
149 #endif /* __HILDON_WEEKDAY_PICKER_H__ */