X-Git-Url: http://git.maemo.org/git/?p=modest;a=blobdiff_plain;f=src%2Fwidgets%2Fmodest-window-mgr.h;h=a8e7411fb8fe3d35a48a54f5a32bf9d8b05ec4e1;hp=4b1e697e38de931d61f63771be3240bb69afd4ed;hb=f6d386ff93e929092ba105385a29d760aeba9ff7;hpb=94a4612a68cf9129d80418e40d177911297b76e7;ds=sidebyside diff --git a/src/widgets/modest-window-mgr.h b/src/widgets/modest-window-mgr.h index 4b1e697..a8e7411 100644 --- a/src/widgets/modest-window-mgr.h +++ b/src/widgets/modest-window-mgr.h @@ -52,6 +52,9 @@ struct _ModestWindowMgr { struct _ModestWindowMgrClass { GObjectClass parent_class; + + /* Signals */ + void (*window_list_empty) (ModestWindowMgr *self); }; @@ -84,7 +87,21 @@ void modest_window_mgr_register_window (ModestWindowMgr *self, void modest_window_mgr_unregister_window (ModestWindowMgr *self, ModestWindow *window); +/** + * modest_window_mgr_register_banner: + * @self: a #ModestWindowMgr + * + * Increase the count of pending banners in the window manager + */ +void modest_window_mgr_register_banner (ModestWindowMgr *self); +/** + * modest_window_mgr_unregister_banner: + * @self: a #ModestWindowMgr + * + * Decrease the count of pending banners in the window manager + */ +void modest_window_mgr_unregister_banner (ModestWindowMgr *self); /** * modest_window_mgr_set_fullscreen_mode: @@ -128,13 +145,27 @@ void modest_window_mgr_show_toolbars (ModestWindowMgr *self, /** * modest_window_mgr_get_main_window: * @self: a #ModestWindowMgr + * @create: if TRUE, create the main window if it was not yet existing * - * get the main window, or create if it's not there. don't destroy - * it. + * get the main window, and depending on @create, create one if it does not exist yet * - * Returns: the main window or NULL in case of error + * Returns: the main window or NULL in case of error, or the main-window + * did not yet exist **/ -ModestWindow* modest_window_mgr_get_main_window (ModestWindowMgr *self); +ModestWindow* modest_window_mgr_get_main_window (ModestWindowMgr *self, + gboolean create); + + +/** + * modest_window_mgr_main_window_exists: + * @self: a #ModestWindowMgr + * + * do we have a main window? + * + * Returns: TRUE if there's a main window, FALSE otherwise + **/ +gboolean modest_window_mgr_main_window_exists (ModestWindowMgr *self); + /** @@ -154,7 +185,6 @@ GtkWindow* modest_window_mgr_get_modal (ModestWindowMgr *self); * * set the modal dialog; set it to NULL after destroying the dialog * - * Returns: the modal dialog just set **/ void modest_window_mgr_set_modal (ModestWindowMgr *self, GtkWindow *window); @@ -175,6 +205,34 @@ void modest_window_mgr_prevent_hibernation_while_window_is_shown (ModestWindowMg GtkWindow *window); + +/** + * modest_window_mgr_register_help_id + * @self: a #ModestWindowMgr + * @win: some window + * @help_id: the help_id for this window + * + * register a help id for a window + **/ +void +modest_window_mgr_register_help_id (ModestWindowMgr *self, GtkWindow *win, const gchar* help_id); + + +/** + * modest_window_mgr_get_help_id: + * @self: a #ModestWindowMgr + * @win: some window + * + * get the help id for a window; if the window is the main-window and some folder is + * selected, it will return the proper help_id for that + * + * Returns: a help _id + **/ +const gchar* +modest_window_mgr_get_help_id (ModestWindowMgr *self, GtkWindow *win); + + + /** * modest_window_mgr_find_registered_header * @self: a #ModestWindowMgr @@ -201,13 +259,14 @@ void modest_window_mgr_close_all_windows (ModestWindowMgr *self); * modest_window_mgr_register_header * @self: a #ModestWindowMgr * @header: a valid #TnyHeader + * @alt_uid: alternative uid in case @header does not provide one * * register the uid, even before the window is created. thus, we know when * some window creation might already be underway. the uid will automatically be * removed when the window itself will registered * **/ -void modest_window_mgr_register_header (ModestWindowMgr *self, TnyHeader *header); +void modest_window_mgr_register_header (ModestWindowMgr *self, TnyHeader *header, const gchar *alt_uid); /** @@ -243,6 +302,38 @@ gboolean modest_window_mgr_get_hibernation_is_prevented (ModestWindowMgr *self); * application hibernation. **/ void modest_window_mgr_save_state_for_all_windows (ModestWindowMgr *self); + +/** + * modest_window_mgr_num_windows: + * @self: a #ModestWindowMgr + * + * Gets the number of already registered windows, and pending banners + * + * Returns: the number of already registered windows, and pending banners + **/ +gint modest_window_mgr_num_windows (ModestWindowMgr *self); + +/** + * modest_window_mgr_get_msg_view_window: + * @self: a #ModestWindowMgr + * + * obtain a cached #ModestMsgViewWindow if available, or construct a new + * one. + * + * Returns: a #ModestMsgViewWindow + */ +GtkWidget * modest_window_mgr_get_msg_view_window (ModestWindowMgr *self); + +/** + * modest_window_mgr_get_msg_edit_window: + * @self: a #ModestWindowMgr + * + * obtain a cached #ModestMsgEditWindow if available, or construct a new + * one. + * + * Returns: a #ModestMsgEditWindow + */ +GtkWidget * modest_window_mgr_get_msg_edit_window (ModestWindowMgr *self); G_END_DECLS