aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/misc/e-calendar-item.h
diff options
context:
space:
mode:
authorDamon Chaplin <damon@ximian.com>2001-07-03 12:12:17 +0800
committerDamon Chaplin <damon@src.gnome.org>2001-07-03 12:12:17 +0800
commitbacd3a85a434032316b3e63b95282175ce2b0659 (patch)
tree00e6b5444efed4ad1ef742968c292d52f4ee6a78 /widgets/misc/e-calendar-item.h
parent0e27010e0b193b787e93cbf50c08a6d477e33dee (diff)
downloadgsoc2013-evolution-bacd3a85a434032316b3e63b95282175ce2b0659.tar
gsoc2013-evolution-bacd3a85a434032316b3e63b95282175ce2b0659.tar.gz
gsoc2013-evolution-bacd3a85a434032316b3e63b95282175ce2b0659.tar.bz2
gsoc2013-evolution-bacd3a85a434032316b3e63b95282175ce2b0659.tar.lz
gsoc2013-evolution-bacd3a85a434032316b3e63b95282175ce2b0659.tar.xz
gsoc2013-evolution-bacd3a85a434032316b3e63b95282175ce2b0659.tar.zst
gsoc2013-evolution-bacd3a85a434032316b3e63b95282175ce2b0659.zip
added functions to set a callback to get the current time, which is used
2001-07-02 Damon Chaplin <damon@ximian.com> * e-calendar-item.c: * e-cell-date-edit.c: * e-dateedit.c: added functions to set a callback to get the current time, which is used instead of localtime(). We need this as we have to use our own timezones. svn path=/trunk/; revision=10728
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 */