2 * This program is free software; you can redistribute it and/or modify it
3 * under the terms of the GNU Lesser General Public License as published by
4 * the Free Software Foundation.
6 * This program is distributed in the hope that it will be useful, but
7 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
8 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
11 * You should have received a copy of the GNU Lesser General Public License
12 * along with this program; if not, see <http://www.gnu.org/licenses/>.
16 * Damon Chaplin <damon@ximian.com>
18 * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
22 #if !defined (__E_UTIL_H_INSIDE__) && !defined (LIBEUTIL_COMPILATION)
23 #error "Only <e-util/e-util.h> should be included directly."
26 #ifndef _E_CALENDAR_H_
27 #define _E_CALENDAR_H_
30 #include <e-util/e-canvas.h>
31 #include <e-util/e-calendar-item.h>
36 * ECalendar - displays a table of monthly calendars, allowing highlighting
37 * and selection of one or more days. Like GtkCalendar with more features.
38 * Most of the functionality is in the ECalendarItem canvas item, though
39 * we also add GnomeCanvasWidget buttons to go to the previous/next month and
40 * to got to the current day.
43 /* Standard GObject macros */
44 #define E_TYPE_CALENDAR \
45 (e_calendar_get_type ())
46 #define E_CALENDAR(obj) \
47 (G_TYPE_CHECK_INSTANCE_CAST \
48 ((obj), E_TYPE_CALENDAR, ECalendar))
49 #define E_CALENDAR_CLASS(cls) \
50 (G_TYPE_CHECK_CLASS_CAST \
51 ((cls), E_TYPE_CALENDAR, ECalendarClass))
52 #define E_IS_CALENDAR(obj) \
53 (G_TYPE_CHECK_INSTANCE_TYPE \
54 ((obj), E_TYPE_CALENDAR))
55 #define E_IS_CALENDAR_CLASS(cls) \
56 (G_TYPE_CHECK_CLASS_TYPE \
57 ((cls), E_TYPE_CALENDAR))
58 #define E_CALENDAR_GET_CLASS(obj) \
59 (G_TYPE_INSTANCE_GET_CLASS \
60 ((obj), E_TYPE_CALENDAR, ECalendarClass))
62 typedef struct _ECalendar ECalendar
;
63 typedef struct _ECalendarClass ECalendarClass
;
68 ECalendarItem
*calitem
;
70 GnomeCanvasItem
*prev_item
;
71 GnomeCanvasItem
*next_item
;
72 GnomeCanvasItem
*prev_item_year
;
73 GnomeCanvasItem
*next_item_year
;
81 /* These are all used when the prev/next buttons are held down.
82 * moving_forward is TRUE if we are moving forward in time, i.e. the
83 * next button is pressed. */
86 gboolean moving_forward
;
89 struct _ECalendarClass
{
90 ECanvasClass parent_class
;
93 GType
e_calendar_get_type (void) G_GNUC_CONST
;
94 GtkWidget
* e_calendar_new (void);
95 void e_calendar_set_minimum_size (ECalendar
*cal
,
98 void e_calendar_set_maximum_size (ECalendar
*cal
,
101 void e_calendar_get_border_size (ECalendar
*cal
,
106 void e_calendar_set_focusable (ECalendar
*cal
,
111 #endif /* _E_CALENDAR_H_ */