2 * This program is free software; you can redistribute it and/or
3 * modify it under the terms of the GNU Lesser General Public
4 * License as published by the Free Software Foundation; either
5 * version 2 of the License, or (at your option) version 3.
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10 * Lesser General Public License for more details.
12 * You should have received a copy of the GNU Lesser General Public
13 * License along with the program; if not, see <http://www.gnu.org/licenses/>
17 * Damon Chaplin <damon@ximian.com>
19 * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
23 #ifndef _E_CALENDAR_H_
24 #define _E_CALENDAR_H_
27 #include <misc/e-canvas.h>
28 #include "e-calendar-item.h"
33 * ECalendar - displays a table of monthly calendars, allowing highlighting
34 * and selection of one or more days. Like GtkCalendar with more features.
35 * Most of the functionality is in the ECalendarItem canvas item, though
36 * we also add GnomeCanvasWidget buttons to go to the previous/next month and
37 * to got to the current day.
40 /* Standard GObject macros */
41 #define E_TYPE_CALENDAR \
42 (e_calendar_get_type ())
43 #define E_CALENDAR(obj) \
44 (G_TYPE_CHECK_INSTANCE_CAST \
45 ((obj), E_TYPE_CALENDAR, ECalendar))
46 #define E_CALENDAR_CLASS(cls) \
47 (G_TYPE_CHECK_CLASS_CAST \
48 ((cls), E_TYPE_CALENDAR, ECalendarClass))
49 #define E_IS_CALENDAR(obj) \
50 (G_TYPE_CHECK_INSTANCE_TYPE \
51 ((obj), E_TYPE_CALENDAR))
52 #define E_IS_CALENDAR_CLASS(cls) \
53 (G_TYPE_CHECK_CLASS_TYPE \
54 ((cls), E_TYPE_CALENDAR))
55 #define E_CALENDAR_GET_CLASS(obj) \
56 (G_TYPE_INSTANCE_GET_CLASS \
57 ((obj), E_TYPE_CALENDAR, ECalendarClass))
59 typedef struct _ECalendar ECalendar
;
60 typedef struct _ECalendarClass ECalendarClass
;
65 ECalendarItem
*calitem
;
67 GnomeCanvasItem
*prev_item
;
68 GnomeCanvasItem
*next_item
;
76 /* These are all used when the prev/next buttons are held down.
77 moving_forward is TRUE if we are moving forward in time, i.e. the
78 next button is pressed. */
81 gboolean moving_forward
;
84 struct _ECalendarClass
{
85 ECanvasClass parent_class
;
88 GType
e_calendar_get_type (void);
89 GtkWidget
* e_calendar_new (void);
90 void e_calendar_set_minimum_size (ECalendar
*cal
,
93 void e_calendar_set_maximum_size (ECalendar
*cal
,
96 void e_calendar_get_border_size (ECalendar
*cal
,
101 void e_calendar_set_focusable (ECalendar
*cal
,
106 #endif /* _E_CALENDAR_H_ */