aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/misc/e-calendar-item.h
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/misc/e-calendar-item.h')
-rw-r--r--widgets/misc/e-calendar-item.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/widgets/misc/e-calendar-item.h b/widgets/misc/e-calendar-item.h
index 3d4e582e39..0ef25ed62a 100644
--- a/widgets/misc/e-calendar-item.h
+++ b/widgets/misc/e-calendar-item.h
@@ -55,6 +55,8 @@ typedef enum
typedef struct _ECalendarItem ECalendarItem;
typedef struct _ECalendarItemClass ECalendarItemClass;
+/* The type of the callback function optionally used to get the colors to
+ use for each day. */
typedef void (*ECalendarItemStyleCallback) (ECalendarItem *calitem,
gint year,
gint month,
@@ -71,6 +73,11 @@ typedef void (*ECalendarItemStyleCallback) (ECalendarItem *calitem,
gboolean *bold,
gpointer data);
+/* The type of the callback function optionally used to get the current time.
+ */
+typedef struct tm (*ECalendarItemGetTimeCallback) (ECalendarItem *calitem,
+ gpointer data);
+
#define E_CALENDAR_ITEM(obj) (GTK_CHECK_CAST((obj), \
e_calendar_item_get_type (), ECalendarItem))
@@ -199,6 +206,10 @@ struct _ECalendarItem
gpointer style_callback_data;
GtkDestroyNotify style_callback_destroy;
+ ECalendarItemGetTimeCallback time_callback;
+ gpointer time_callback_data;
+ GtkDestroyNotify time_callback_destroy;
+
/* Colors for drawing. */
GdkColor colors[E_CALENDAR_ITEM_COLOR_LAST];
@@ -313,6 +324,14 @@ void e_calendar_item_set_style_callback (ECalendarItem *calitem,
gpointer data,
GtkDestroyNotify destroy);
+/* Sets a callback to use to get the current time. This is useful if the
+ application needs to use its own timezone data rather than rely on the
+ Unix timezone. */
+void e_calendar_item_set_get_time_callback (ECalendarItem *calitem,
+ ECalendarItemGetTimeCallback cb,
+ gpointer data,
+ GtkDestroyNotify destroy);
+
#ifdef __cplusplus
}
#endif /* __cplusplus */