#endif /*HAVE_CONFIG_H*/
#include <gtk/gtk.h>
-
+
/*
* admittedly, the ifdefs for gtk and maemo are rather ugly; still
* this way is probably the easiest to maintain
*/
-#ifdef MODEST_PLATFORM_GNOME
+#ifdef MODEST_TOOLKIT_GTK
#include <gtk/gtkwindow.h>
typedef GtkWindow ModestWindowParent;
typedef GtkWindowClass ModestWindowParentClass;
-#endif /* MODEST_PLATFORM_GNOME */
-
-#ifdef MODEST_PLATFORM_MAEMO
-#ifdef MODEST_HAVE_HILDON0_WIDGETS
+#else
+#if MODEST_HILDON_API == 0
#include <hildon-widgets/hildon-window.h>
#else
+#ifdef MODEST_TOOLKIT_HILDON2
+#include <hildon/hildon-stackable-window.h>
+#else
#include <hildon/hildon-window.h>
-#endif /*MODEST_HAVE_HILDON0_WIDGETS*/
+#endif
+#endif /*MODEST_HILDON_API == 0*/
+#ifdef MODEST_TOOLKIT_HILDON2
+typedef HildonStackableWindow ModestWindowParent;
+typedef HildonStackableWindowClass ModestWindowParentClass;
+#else
typedef HildonWindow ModestWindowParent;
typedef HildonWindowClass ModestWindowParentClass;
+#endif
#ifndef GTK_STOCK_FULLSCREEN
#define GTK_STOCK_FULLSCREEN ""
#endif /*GTK_STOCK_FULLSCREEN*/
-#endif /*MODEST_PLATFORM_MAEMO */
+#endif /*!MODEST_TOOLKIT_GTK */
+
+/* Dimmed state variables */
+typedef struct _DimmedState {
+ guint n_selected;
+ guint already_opened_msg;
+ gboolean any_marked_as_deleted;
+ gboolean all_marked_as_deleted;
+ gboolean any_marked_as_seen;
+ gboolean all_marked_as_seen;
+ gboolean any_marked_as_cached;
+ gboolean all_marked_as_cached;
+ gboolean any_has_attachments;
+ gboolean all_has_attachments;
+ gboolean sent_in_progress;
+ gboolean all_selected;
+} DimmedState;
/* convenience macros */
#define MODEST_TYPE_WINDOW (modest_window_get_type())
* @self: a modest window instance
* @active_account: a new active account name for this window
*
- * set the active account for this window
+ * set the active account for this window.
+ * NOTE: this must be a valid, non-pseudo account.
*
*/
void modest_window_set_active_account (ModestWindow *self, const gchar *active_account);
/**
+ * modest_window_get_active_mailbox:
+ * @self: a modest window instance
+ *
+ * get the name of the active mailbox
+ *
+ * Returns: the active mailbox as a constant string
+ */
+const gchar* modest_window_get_active_mailbox (ModestWindow *self);
+
+
+
+/**
+ * modest_window_set_active_account:
+ * @self: a modest window instance
+ * @active_mailbox: a new active mailbox name for this window
+ *
+ * set the active mailbox for this window.
+ *
+ */
+void modest_window_set_active_mailbox (ModestWindow *self, const gchar *active_mailbox);
+
+/**
* modest_window_set_zoom:
* @window: a #ModestWindow instance
* @zoom: the zoom level (1.0 is no zoom)
/**
+ * modest_window_set_dimming_state:
+ * @window: a #ModestWindow instance object
+ * @state: the #DimmedState state at specific time
+ *
+ * Set basic dimming variables from selected headers at
+ * specific moment.
+ **/
+void
+modest_window_set_dimming_state (ModestWindow *window,
+ DimmedState *state);
+
+/**
+ * modest_window_set_dimming_state:
+ * @window: a #ModestWindow instance object
+ *
+ * Set basic dimming variables from selected headers at
+ * specific moment.
+ *
+ * @Returns: a #DimmedState state saved previously.
+ **/
+const DimmedState *
+modest_window_get_dimming_state (ModestWindow *window);
+
+
+/**
* modest_window_get_action:
* @window: a #ModestWindow instance object
* @action_path: the full path of required action.
const gchar *group_name);
+/**
+ * modest_window_enable_dimming:
+ * @self: a #ModestWindow instance object
+ *
+ * Enables UI dimming rules checking.
+ *
+ **/
+void modest_window_enable_dimming (ModestWindow *self);
+
+
+/**
+ * modest_window_disable_dimming:
+ * @self: a #ModestWindow instance object
+ *
+ * Disables UI dimming rules checking.
+ *
+ **/
+void modest_window_disable_dimming (ModestWindow *self);
+
+
void modest_window_disconnect_signals (ModestWindow *self);