Updated Spanish translation
[evolution.git] / e-util / e-calendar.h
blob40ec4f8d2e2f6c8f91e67302ff5699e7e2c2b519
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.
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.
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/>.
15 * Authors:
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."
24 #endif
26 #ifndef _E_CALENDAR_H_
27 #define _E_CALENDAR_H_
29 #include <gtk/gtk.h>
30 #include <e-util/e-canvas.h>
31 #include <e-util/e-calendar-item.h>
33 G_BEGIN_DECLS
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;
65 struct _ECalendar {
66 ECanvas parent;
68 ECalendarItem *calitem;
70 GnomeCanvasItem *prev_item;
71 GnomeCanvasItem *next_item;
72 GnomeCanvasItem *prev_item_year;
73 GnomeCanvasItem *next_item_year;
75 gint min_rows;
76 gint min_cols;
78 gint max_rows;
79 gint max_cols;
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. */
84 gint timeout_id;
85 gint timeout_delay;
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,
96 gint rows,
97 gint cols);
98 void e_calendar_set_maximum_size (ECalendar *cal,
99 gint rows,
100 gint cols);
101 void e_calendar_get_border_size (ECalendar *cal,
102 gint *top,
103 gint *bottom,
104 gint *left,
105 gint *right);
106 void e_calendar_set_focusable (ECalendar *cal,
107 gboolean focusable);
109 G_END_DECLS
111 #endif /* _E_CALENDAR_H_ */