aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/misc/e-cell-date-edit.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-cell-date-edit.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-cell-date-edit.h')
-rw-r--r--widgets/misc/e-cell-date-edit.h31
1 files changed, 27 insertions, 4 deletions
diff --git a/widgets/misc/e-cell-date-edit.h b/widgets/misc/e-cell-date-edit.h
index f3f8beb02b..67af112c94 100644
--- a/widgets/misc/e-cell-date-edit.h
+++ b/widgets/misc/e-cell-date-edit.h
@@ -30,6 +30,7 @@
#ifndef _E_CELL_DATE_EDIT_H_
#define _E_CELL_DATE_EDIT_H_
+#include <time.h>
#include <gal/e-table/e-cell-popup.h>
#define E_CELL_DATE_EDIT_TYPE (e_cell_date_edit_get_type ())
@@ -39,7 +40,15 @@
#define E_IS_CELL_DATE_EDIT_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), E_CELL_DATE_EDIT_TYPE))
-typedef struct {
+typedef struct _ECellDateEdit ECellDateEdit;
+typedef struct _ECellDateEditClass ECellDateEditClass;
+
+/* The type of the callback function optionally used to get the current time.
+ */
+typedef struct tm (*ECellDateEditGetTimeCallback) (ECellDateEdit *ecde,
+ gpointer data);
+
+struct _ECellDateEdit {
ECellPopup parent;
GtkWidget *popup_window;
@@ -64,11 +73,15 @@ typedef struct {
/* The freeze count for rebuilding the time list. We only rebuild when
this is 0. */
gint freeze_count;
-} ECellDateEdit;
-typedef struct {
+ ECellDateEditGetTimeCallback time_callback;
+ gpointer time_callback_data;
+ GtkDestroyNotify time_callback_destroy;
+};
+
+struct _ECellDateEditClass {
ECellPopupClass parent_class;
-} ECellDateEditClass;
+};
GtkType e_cell_date_edit_get_type (void);
@@ -81,4 +94,14 @@ ECell *e_cell_date_edit_new (void);
void e_cell_date_edit_freeze (ECellDateEdit *ecde);
void e_cell_date_edit_thaw (ECellDateEdit *ecde);
+
+/* 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_cell_date_edit_set_get_time_callback(ECellDateEdit *ecde,
+ ECellDateEditGetTimeCallback cb,
+ gpointer data,
+ GtkDestroyNotify destroy);
+
+
#endif /* _E_CELL_DATE_EDIT_H_ */