1 /*
2  *
3  * This program is free software; you can redistribute it and/or modify it
4  * under the terms of the GNU Lesser General Public License as published by
5  * the Free Software Foundation.
6  *
7  * This program is distributed in the hope that it will be useful, but
8  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
9  * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
10  * for more details.
11  *
12  * You should have received a copy of the GNU Lesser General Public License
13  * along with this program; if not, see <http://www.gnu.org/licenses/>.
14  *
15  *
16  * Authors:
17  *		Damon Chaplin <damon@ximian.com>
18  *
19  * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
20  *
21  */
22 
23 /*
24  * ETimezoneEntry - a field for setting a timezone. It shows the timezone in
25  * a GtkEntry with a '...' button beside it which shows a dialog for changing
26  * the timezone. The dialog contains a map of the world with a point for each
27  * timezone, and an option menu as an alternative way of selecting the
28  * timezone.
29  */
30 
31 #ifndef E_TIMEZONE_ENTRY_H
32 #define E_TIMEZONE_ENTRY_H
33 
34 #include <gtk/gtk.h>
35 #include <libecal/libecal.h>
36 
37 /* Standard GObject macros */
38 #define E_TYPE_TIMEZONE_ENTRY \
39 	(e_timezone_entry_get_type ())
40 #define E_TIMEZONE_ENTRY(obj) \
41 	(G_TYPE_CHECK_INSTANCE_CAST \
42 	((obj), E_TYPE_TIMEZONE_ENTRY, ETimezoneEntry))
43 #define E_TIMEZONE_ENTRY_CLASS(cls) \
44 	(G_TYPE_CHECK_CLASS_CAST \
45 	((cls), E_TYPE_TIMEZONE_ENTRY, ETimezoneEntryClass))
46 #define E_IS_TIMEZONE_ENTRY(obj) \
47 	(G_TYPE_CHECK_INSTANCE_TYPE \
48 	((obj), E_TYPE_TIMEZONE_ENTRY))
49 #define E_IS_TIMEZONE_ENTRY_CLASS(cls) \
50 	(G_TYPE_CHECK_CLASS_TYPE \
51 	((cls), E_TYPE_TIMEZONE_ENTRY))
52 #define E_IS_TIMEZONE_ENTRY_GET_CLASS(obj) \
53 	(G_TYPE_INSTANCE_GET_CLASS \
54 	((obj), E_TYPE_TIMEZONE_ENTRY, ETimezoneEntryClass))
55 
56 G_BEGIN_DECLS
57 
58 typedef struct _ETimezoneEntry ETimezoneEntry;
59 typedef struct _ETimezoneEntryClass ETimezoneEntryClass;
60 typedef struct _ETimezoneEntryPrivate ETimezoneEntryPrivate;
61 
62 struct _ETimezoneEntry {
63 	GtkBox parent;
64 	ETimezoneEntryPrivate *priv;
65 };
66 
67 struct _ETimezoneEntryClass {
68 	GtkBoxClass parent_class;
69 
70 	void		(*changed)		(ETimezoneEntry *timezone_entry);
71 };
72 
73 GType		e_timezone_entry_get_type	(void);
74 GtkWidget *	e_timezone_entry_new		(void);
75 ICalTimezone *	e_timezone_entry_get_timezone	(ETimezoneEntry *timezone_entry);
76 void		e_timezone_entry_set_timezone	(ETimezoneEntry *timezone_entry,
77 						 const ICalTimezone *timezone);
78 gboolean	e_timezone_entry_get_allow_none	(ETimezoneEntry *timezone_entry);
79 void		e_timezone_entry_set_allow_none	(ETimezoneEntry *timezone_entry,
80 						 gboolean allow_none);
81 
82 G_END_DECLS
83 
84 #endif /* E_TIMEZONE_ENTRY_H */
85