1 /* 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. 5 * 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 9 * for more details. 10 * 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/>. 13 * 14 * 15 * Authors: 16 * Damon Chaplin <damon@ximian.com> 17 * 18 * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) 19 * 20 */ 21 22 #if !defined (__E_UTIL_H_INSIDE__) && !defined (LIBEUTIL_COMPILATION) 23 #error "Only <e-util/e-util.h> should be included directly." 24 #endif 25 26 #ifndef _E_CALENDAR_H_ 27 #define _E_CALENDAR_H_ 28 29 #include <gtk/gtk.h> 30 #include <e-util/e-canvas.h> 31 #include <e-util/e-calendar-item.h> 32 33 G_BEGIN_DECLS 34 35 /* 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. 41 */ 42 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)) 61 62 typedef struct _ECalendar ECalendar; 63 typedef struct _ECalendarClass ECalendarClass; 64 typedef struct _ECalendarPrivate ECalendarPrivate; 65 66 struct _ECalendar { 67 ECanvas parent; 68 69 ECalendarPrivate *priv; 70 }; 71 72 struct _ECalendarClass { 73 ECanvasClass parent_class; 74 }; 75 76 GType e_calendar_get_type (void) G_GNUC_CONST; 77 GtkWidget * e_calendar_new (void); 78 ECalendarItem * e_calendar_get_item (ECalendar *cal); 79 void e_calendar_set_minimum_size (ECalendar *cal, 80 gint rows, 81 gint cols); 82 void e_calendar_set_maximum_size (ECalendar *cal, 83 gint rows, 84 gint cols); 85 void e_calendar_get_border_size (ECalendar *cal, 86 gint *top, 87 gint *bottom, 88 gint *left, 89 gint *right); 90 void e_calendar_set_focusable (ECalendar *cal, 91 gboolean focusable); 92 93 G_END_DECLS 94 95 #endif /* _E_CALENDAR_H_ */ 96