X-Git-Url: http://git.maemo.org/git/?p=modest;a=blobdiff_plain;f=src%2Fwidgets%2Fmodest-window.h;h=cd159d4e079fe147e7b14c20ee146914865f3b45;hp=90d60319a9e605fba96cf6ba6a6dd550963151c4;hb=f6d386ff93e929092ba105385a29d760aeba9ff7;hpb=fcb7d06056e0f4e988f3751a2f76951b22577e2e diff --git a/src/widgets/modest-window.h b/src/widgets/modest-window.h index 90d6031..cd159d4 100644 --- a/src/widgets/modest-window.h +++ b/src/widgets/modest-window.h @@ -40,23 +40,21 @@ G_BEGIN_DECLS #endif /*HAVE_CONFIG_H*/ #include - + /* * 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 typedef GtkWindow ModestWindowParent; typedef GtkWindowClass ModestWindowParentClass; -#endif /* MODEST_PLATFORM_GNOME */ - -#ifdef MODEST_PLATFORM_MAEMO -#ifdef MODEST_HILDON_VERSION_0 +#else +#if MODEST_HILDON_API == 0 #include #else #include -#endif /*MODEST_HILDON_VERSION_0*/ +#endif /*MODEST_HILDON_API == 0*/ typedef HildonWindow ModestWindowParent; typedef HildonWindowClass ModestWindowParentClass; @@ -64,7 +62,23 @@ typedef HildonWindowClass ModestWindowParentClass; #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()) @@ -90,6 +104,8 @@ struct _ModestWindowClass { gboolean (*zoom_plus_func) (ModestWindow *self); gboolean (*zoom_minus_func) (ModestWindow *self); void (*show_toolbar_func) (ModestWindow *self, gboolean show_toolbar); + void (*save_state_func) (ModestWindow *self); + void (*disconnect_signals_func) (ModestWindow *self); }; /** @@ -119,7 +135,8 @@ const gchar* modest_window_get_active_account (ModestWindow *self); * @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); @@ -174,6 +191,110 @@ gboolean modest_window_zoom_minus (ModestWindow *window); **/ void modest_window_show_toolbar (ModestWindow *window, gboolean show_toolbar); + +/** + * modest_window_save_state: + * @window: + * + * Ask the window to save its settings for loading again later. + * This actually invokes the save_setting_func vfunc, which + * derived windows should implement. + **/ +void modest_window_save_state (ModestWindow *window); + + +/** + * 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. + * + * Get an action from ui manager, using @action_path parameter, + * which represent the full path to the required action into UIManager + * xml definition. + **/ +GtkAction * modest_window_get_action (ModestWindow *window, const gchar *action_path); + +/** + * modest_window_get_action_widget: + * @window: a #ModestWindow instance object + * @action_path: the full path of required action. + * + * Get action widget from ui manager, using @action_path parameter, + * which represent the full path to the required action into UIManager + * xml definition. + **/ +GtkWidget *modest_window_get_action_widget (ModestWindow *window, + const gchar *action_path); + +/** + * modest_window_check_dimming_rules: + * @self: a #ModestWindow instance object + * + * Calls UI Dimming Manager of @self window to check all dimming rules. + * + **/ +void modest_window_check_dimming_rules (ModestWindow *self); + +/** + * modest_window_check_dimming_rules: + * @self: a #ModestWindow instance object + * @group: a #ModestWindow instance object + * + * Calls UI Dimming Manager of @self window to check @group_name specific + * dimming rules. + * + **/ +void modest_window_check_dimming_rules_group (ModestWindow *self, + 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); + G_END_DECLS