* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-
#ifndef __MODEST_WINDOW_H__
#define __MODEST_WINDOW_H__
+#include <glib-object.h>
+#include <tny-account-store.h>
+
+G_BEGIN_DECLS
+
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif /*HAVE_CONFIG_H*/
-/* admittedly, the ifdefs for gtk and maemo are rather ugly; still this way
- * is probably the easiest to maintain*/
-#if MODEST_PLATFORM_ID==1 /* gtk */
+/*
+ * admittedly, the ifdefs for gtk and maemo are rather ugly; still
+ * this way is probably the easiest to maintain
+ */
+#ifdef MODEST_PLATFORM_GNOME
#include <gtk/gtkwindow.h>
-typedef GtkWindow ModestWindow;
-typedef GtkWindowClass ModestWindowClass;
-#elif MODEST_PLATFORM_ID==2 /* hildon (maemo) */
+typedef GtkWindow ModestWindowParent;
+typedef GtkWindowClass ModestWindowParentClass;
+#endif /* MODEST_PLATFORM_GNOME */
+
+#ifdef MODEST_PLATFORM_MAEMO
#include <hildon-widgets/hildon-window.h>
-typedef HildonWindow ModestWindow;
-typedef HildonWindowClass ModestWindowClass;
-#endif /*MODEST_PLATFORM_ID*/
-/************************************************/
+typedef HildonWindow ModestWindowParent;
+typedef HildonWindowClass ModestWindowParentClass;
+#endif /*MODEST_PLATFORM_MAEMO */
+
+/* convenience macros */
+#define MODEST_TYPE_WINDOW (modest_window_get_type())
+#define MODEST_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),MODEST_TYPE_WINDOW,ModestWindow))
+#define MODEST_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),MODEST_TYPE_WINDOW,GObject))
+#define MODEST_IS_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),MODEST_TYPE_WINDOW))
+#define MODEST_IS_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),MODEST_TYPE_WINDOW))
+#define MODEST_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj),MODEST_TYPE_WINDOW,ModestWindowClass))
+
+typedef struct _ModestWindow ModestWindow;
+typedef struct _ModestWindowClass ModestWindowClass;
+
+struct _ModestWindow {
+ ModestWindowParent parent;
+};
+
+struct _ModestWindowClass {
+ ModestWindowParentClass parent_class;
+};
+
+/**
+ * modest_window_get_type:
+ *
+ * get the #GType for #ModestWindow
+ *
+ * Returns: the type
+ */
+GType modest_window_get_type (void) G_GNUC_CONST;
+
+
+/**
+ * modest_window_get_active_account:
+ * @self: a modest window instance
+ *
+ * get the name of the active account
+ *
+ * Returns: the active account name as a constant string
+ */
+const gchar* modest_window_get_active_account (ModestWindow *self);
+
+
+
+/**
+ * modest_window_set_active_account:
+ * @self: a modest window instance
+ * @active_account: a new active account name for this window
+ *
+ * set the active account for this window
+ *
+ */
+void modest_window_set_active_account (ModestWindow *self, const gchar *active_account);
+
+
+G_END_DECLS
-#endif /* MODEST_WINDOW_H__ */
+#endif /* __MODEST_WINDOW_H__ */