aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/calendar-view.h
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-07-03 02:44:14 +0800
committerMatthew Barnes <mbarnes@redhat.com>2013-07-06 04:40:49 +0800
commit3f5f362e0df717f2aaca8d21c3b3e180904a6897 (patch)
tree777bb5c4b968e627e893afd04d66b9189aef6f5f /calendar/gui/calendar-view.h
parent2b9713656b939ec657b8d77932a2a7d147aa1f23 (diff)
downloadgsoc2013-evolution-3f5f362e0df717f2aaca8d21c3b3e180904a6897.tar.gz
gsoc2013-evolution-3f5f362e0df717f2aaca8d21c3b3e180904a6897.tar.zst
gsoc2013-evolution-3f5f362e0df717f2aaca8d21c3b3e180904a6897.zip
Split CalendarView into separate classes by view type.
It's better to have separate classes each with a fixed type code, than one class with a variable type code. You'll see why in the next commit.
Diffstat (limited to 'calendar/gui/calendar-view.h')
-rw-r--r--calendar/gui/calendar-view.h57
1 files changed, 25 insertions, 32 deletions
diff --git a/calendar/gui/calendar-view.h b/calendar/gui/calendar-view.h
index 00e1eb6ed1..60b41ea0ea 100644
--- a/calendar/gui/calendar-view.h
+++ b/calendar/gui/calendar-view.h
@@ -1,6 +1,5 @@
/*
- *
- * Evolution calendar - Generic view object for calendar views
+ * calendar-view.h
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -15,48 +14,42 @@
* You should have received a copy of the GNU Lesser General Public
* License along with the program; if not, see <http://www.gnu.org/licenses/>
*
- *
- * Authors:
- * Federico Mena-Quintero <federico@ximian.com>
- *
- * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
- *
*/
#ifndef CALENDAR_VIEW_H
#define CALENDAR_VIEW_H
-#include "gnome-cal.h"
+#include <e-util/e-util.h>
-G_BEGIN_DECLS
-
-#define TYPE_CALENDAR_VIEW (calendar_view_get_type ())
-#define CALENDAR_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CALENDAR_VIEW, CalendarView))
-#define CALENDAR_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CALENDAR_VIEW, \
- CalendarViewClass))
-#define IS_CALENDAR_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CALENDAR_VIEW))
-#define IS_CALENDAR_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CALENDAR_VIEW))
+/* Standard GObject macros */
+#define GAL_TYPE_VIEW_CALENDAR_DAY \
+ (gal_view_calendar_day_get_type ())
+#define GAL_TYPE_VIEW_CALENDAR_WORK_WEEK \
+ (gal_view_calendar_work_week_get_type ())
+#define GAL_TYPE_VIEW_CALENDAR_WEEK \
+ (gal_view_calendar_week_get_type ())
+#define GAL_TYPE_VIEW_CALENDAR_MONTH \
+ (gal_view_calendar_month_get_type ())
-typedef struct _CalendarViewPrivate CalendarViewPrivate;
-
-typedef struct {
- GalView view;
+G_BEGIN_DECLS
- /* Private data */
- CalendarViewPrivate *priv;
-} CalendarView;
+typedef struct _GalView GalViewCalendarDay;
+typedef struct _GalViewClass GalViewCalendarDayClass;
-typedef struct {
- GalViewClass parent_class;
-} CalendarViewClass;
+typedef struct _GalView GalViewCalendarWorkWeek;
+typedef struct _GalViewClass GalViewCalendarWorkWeekClass;
-GType calendar_view_get_type (void);
+typedef struct _GalView GalViewCalendarWeek;
+typedef struct _GalViewClass GalViewCalendarWeekClass;
-CalendarView *calendar_view_new (GnomeCalendarViewType view_type,
- const gchar *title);
+typedef struct _GalView GalViewCalendarMonth;
+typedef struct _GalViewClass GalViewCalendarMonthClass;
-GnomeCalendarViewType calendar_view_get_view_type (CalendarView *cal_view);
+GType gal_view_calendar_day_get_type (void) G_GNUC_CONST;
+GType gal_view_calendar_work_week_get_type (void) G_GNUC_CONST;
+GType gal_view_calendar_week_get_type (void) G_GNUC_CONST;
+GType gal_view_calendar_month_get_type (void) G_GNUC_CONST;
G_END_DECLS
-#endif
+#endif /* CALENDAR_VIEW_H */