/* * Author: Chris Lord * * Copyright (c) 2007 OpenedHand Ltd - http://www.openedhand.com/ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * */ #ifndef _JANA_GTK_MONTH_VIEW_H #define _JANA_GTK_MONTH_VIEW_H #include #include #include #include G_BEGIN_DECLS #define JANA_GTK_TYPE_MONTH_VIEW jana_gtk_month_view_get_type() #define JANA_GTK_MONTH_VIEW(obj) \ (G_TYPE_CHECK_INSTANCE_CAST ((obj), \ JANA_GTK_TYPE_MONTH_VIEW, JanaGtkMonthView)) #define JANA_GTK_MONTH_VIEW_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST ((klass), \ JANA_GTK_TYPE_MONTH_VIEW, JanaGtkMonthViewClass)) #define JANA_GTK_IS_MONTH_VIEW(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \ JANA_GTK_TYPE_MONTH_VIEW)) #define JANA_GTK_IS_MONTH_VIEW_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE ((klass), \ JANA_GTK_TYPE_MONTH_VIEW)) #define JANA_GTK_MONTH_VIEW_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), \ JANA_GTK_TYPE_MONTH_VIEW, JanaGtkMonthViewClass)) typedef struct { GtkEventBox parent; } JanaGtkMonthView; typedef struct { GtkEventBoxClass parent_class; /* Signals */ void (*selection_changed) (JanaGtkMonthView *self, JanaTime *day); } JanaGtkMonthViewClass; enum { JANA_GTK_MONTH_VIEW_COL_ROW, JANA_GTK_MONTH_VIEW_COL_LAST }; GType jana_gtk_month_view_get_type (void); GtkWidget * jana_gtk_month_view_new (JanaTime *month); void jana_gtk_month_view_add_store (JanaGtkMonthView *self, JanaGtkEventStore *store); void jana_gtk_month_view_remove_store (JanaGtkMonthView *self, JanaGtkEventStore *store); JanaGtkCellRendererEvent * jana_gtk_month_view_get_cell_renderer (JanaGtkMonthView *self); void jana_gtk_month_view_set_month (JanaGtkMonthView *self, JanaTime *month); JanaTime * jana_gtk_month_view_get_month (JanaGtkMonthView *self); void jana_gtk_month_view_set_spacing (JanaGtkMonthView *self, guint spacing); guint jana_gtk_month_view_get_spacing (JanaGtkMonthView *self); void jana_gtk_month_view_set_selection (JanaGtkMonthView *self, JanaTime *day); JanaTime * jana_gtk_month_view_get_selection (JanaGtkMonthView *self); void jana_gtk_month_view_set_visible_func (JanaGtkMonthView *self, GtkTreeModelFilterVisibleFunc visible_cb, gpointer data); void jana_gtk_month_view_refilter (JanaGtkMonthView *self); void jana_gtk_month_view_set_highlighted_time(JanaGtkMonthView *self, JanaTime *time); G_END_DECLS #endif /* _JANA_GTK_MONTH_VIEW_H */