diff options
author | Matthew Barnes <mbarnes@src.gnome.org> | 2008-11-20 07:54:02 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@src.gnome.org> | 2008-11-20 07:54:02 +0800 |
commit | ab0ea462f39d13d56f10ccefeae882cc001469e4 (patch) | |
tree | a6e6c9256125e7f04198f0aba2ead1f4c3b3168d /shell | |
parent | b06cdfab92313ca7b1ce9a88ccb0ffba33cb17ab (diff) | |
download | gsoc2013-evolution-ab0ea462f39d13d56f10ccefeae882cc001469e4.tar gsoc2013-evolution-ab0ea462f39d13d56f10ccefeae882cc001469e4.tar.gz gsoc2013-evolution-ab0ea462f39d13d56f10ccefeae882cc001469e4.tar.bz2 gsoc2013-evolution-ab0ea462f39d13d56f10ccefeae882cc001469e4.tar.lz gsoc2013-evolution-ab0ea462f39d13d56f10ccefeae882cc001469e4.tar.xz gsoc2013-evolution-ab0ea462f39d13d56f10ccefeae882cc001469e4.tar.zst gsoc2013-evolution-ab0ea462f39d13d56f10ccefeae882cc001469e4.zip |
Documentation improvements.
svn path=/branches/kill-bonobo/; revision=36806
Diffstat (limited to 'shell')
-rw-r--r-- | shell/e-shell-migrate.h | 7 | ||||
-rw-r--r-- | shell/e-shell-module.h | 3 | ||||
-rw-r--r-- | shell/e-shell-sidebar.c | 8 | ||||
-rw-r--r-- | shell/e-shell-switcher.c | 1 | ||||
-rw-r--r-- | shell/e-shell.c | 156 |
5 files changed, 169 insertions, 6 deletions
diff --git a/shell/e-shell-migrate.h b/shell/e-shell-migrate.h index 315a2904c5..45907ce7ce 100644 --- a/shell/e-shell-migrate.h +++ b/shell/e-shell-migrate.h @@ -27,6 +27,13 @@ #include <shell/e-shell-common.h> #include <shell/e-shell.h> +/** + * E_SHELL_MIGRATE_ERROR: + * + * Error domain for migration operations. Errors in this domain will be + * from the #EShellMigrateError enumeration. See #GError for information + * on error domains. + **/ #define E_SHELL_MIGRATE_ERROR \ (e_shell_migrate_error_quark ()) diff --git a/shell/e-shell-module.h b/shell/e-shell-module.h index 7186b13a62..0f7016532d 100644 --- a/shell/e-shell-module.h +++ b/shell/e-shell-module.h @@ -60,9 +60,6 @@ typedef struct _EShellModuleInfo EShellModuleInfo; typedef struct _EShellModuleClass EShellModuleClass; typedef struct _EShellModulePrivate EShellModulePrivate; -typedef struct _EShellModuleEvent EShellModuleEvent; -typedef void (*EShellModuleEventFunc) (EShellModuleEvent *event); - /** * EShellModuleInfo: * @name: The name of the module. Also becomes the name of diff --git a/shell/e-shell-sidebar.c b/shell/e-shell-sidebar.c index 3f2494cba4..7e5a1f7695 100644 --- a/shell/e-shell-sidebar.c +++ b/shell/e-shell-sidebar.c @@ -333,7 +333,7 @@ shell_sidebar_class_init (EShellSidebarClass *class) container_class->forall = shell_sidebar_forall; /** - * EShellTaskbar:primary-text + * EShellSidebar:primary-text * * The primary text is displayed in bold at the top of the sidebar. **/ @@ -348,7 +348,7 @@ shell_sidebar_class_init (EShellSidebarClass *class) G_PARAM_READWRITE)); /** - * EShellTaskbar:secondary-text + * EShellSidebar:secondary-text * * The secondary text is displayed in a smaller font at the top of * the sidebar. @@ -448,7 +448,7 @@ e_shell_sidebar_new (EShellView *shell_view) /** * e_shell_sidebar_check_state: - * @shell_sidebar an #EShellSidebar + * @shell_sidebar: an #EShellSidebar * * #EShellSidebar subclasses should implement the * <structfield>check_state</structfield> method in #EShellSidebarClass @@ -511,6 +511,7 @@ e_shell_sidebar_get_primary_text (EShellSidebar *shell_sidebar) /** * e_shell_sidebar_set_primary_text: * @shell_sidebar: an #EShellSidebar + * @primary_text: text to be displayed in a bold font * * Sets the primary text for @shell_sidebar. * @@ -566,6 +567,7 @@ e_shell_sidebar_get_secondary_text (EShellSidebar *shell_sidebar) /** * e_shell_sidebar_set_secondary_text: * @shell_sidebar: an #EShellSidebar + * @secondary_text: text to be displayed in a smaller font * * Sets the secondary text for @shell_sidebar. * diff --git a/shell/e-shell-switcher.c b/shell/e-shell-switcher.c index fd202c0f4e..e29fa1cb89 100644 --- a/shell/e-shell-switcher.c +++ b/shell/e-shell-switcher.c @@ -673,6 +673,7 @@ e_shell_switcher_get_visible (EShellSwitcher *switcher) /** * e_shell_switcher_set_visible: * @switcher: an #EShellSwitcher + * @visible: whether the switcher buttons should be visible * * Sets the switcher button visiblity to @visible. * diff --git a/shell/e-shell.c b/shell/e-shell.c index 1840571767..6e92750eb9 100644 --- a/shell/e-shell.c +++ b/shell/e-shell.c @@ -360,6 +360,11 @@ shell_class_init (EShellClass *class) object_class->finalize = shell_finalize; object_class->constructed = shell_constructed; + /** + * EShell:online-mode + * + * Whether the shell is online. + **/ g_object_class_install_property ( object_class, PROP_ONLINE_MODE, @@ -371,6 +376,11 @@ shell_class_init (EShellClass *class) G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); + /** + * EShell:settings + * + * The #EShellSettings object stores application settings. + **/ g_object_class_install_property ( object_class, PROP_SETTINGS, @@ -381,6 +391,15 @@ shell_class_init (EShellClass *class) E_TYPE_SHELL_SETTINGS, G_PARAM_READABLE)); + /** + * EShell::event + * @shell: the #EShell which emitted the signal + * @event_data: data associated with the event + * + * This signal is used to broadcast custom events to the entire + * application. The nature of @event_data depends on the event + * being broadcast. The signal's detail denotes the event. + **/ signals[EVENT] = g_signal_new ( "event", G_OBJECT_CLASS_TYPE (object_class), @@ -390,6 +409,18 @@ shell_class_init (EShellClass *class) G_TYPE_NONE, 1, G_TYPE_POINTER); + /** + * EShell:handle-uri + * @shell: the #EShell which emitted the signal + * @uri: the URI to be handled + * + * Emitted when @shell receives a URI to be handled, usually by + * way of a command-line argument. An #EShellModule should listen + * for this signal and try to handle the URI, usually by opening an + * editor window for the identified resource. + * + * Returns: %TRUE if the URI could be handled, %FALSE otherwise + **/ signals[HANDLE_URI] = g_signal_new ( "handle-uri", G_OBJECT_CLASS_TYPE (object_class), @@ -399,6 +430,14 @@ shell_class_init (EShellClass *class) G_TYPE_BOOLEAN, 1, G_TYPE_STRING); + /** + * EShell:send-receive + * @shell: the #EShell which emitted the signal + * @parent: a parent #GtkWindow + * + * Emitted when the user chooses the "Send / Receive" action. + * The parent window can be used for showing transient windows. + **/ signals[SEND_RECEIVE] = g_signal_new ( "send-receive", G_OBJECT_CLASS_TYPE (object_class), @@ -408,6 +447,13 @@ shell_class_init (EShellClass *class) G_TYPE_NONE, 1, GTK_TYPE_WINDOW); + /** + * EShell:window-created + * @shell: the #EShell which emitted the signal + * @shell_window: the newly created #EShellWindow + * + * Emitted when a new #EShellWindow is created. + **/ signals[WINDOW_CREATED] = g_signal_new ( "window-created", G_OBJECT_CLASS_TYPE (object_class), @@ -417,6 +463,13 @@ shell_class_init (EShellClass *class) G_TYPE_NONE, 1, E_TYPE_SHELL_WINDOW); + /** + * EShell:window-destroyed + * @shell: the #EShell which emitted the signal + * @last_window: whether that was the last #EShellWindow + * + * Emitted when an #EShellWindow is destroyed. + **/ signals[WINDOW_DESTROYED] = g_signal_new ( "window-destroyed", G_OBJECT_CLASS_TYPE (object_class), @@ -476,6 +529,13 @@ e_shell_get_type (void) return type; } +/** + * e_shell_get_default: + * + * Returns the #EShell created by <function>main()</function>. + * + * Returns: the #EShell singleton + **/ EShell * e_shell_get_default (void) { @@ -485,6 +545,15 @@ e_shell_get_default (void) return default_shell; } +/** + * e_shell_list_modules: + * @shell: an #EShell + * + * Returns a list of loaded #EShellModule instances. The list is + * owned by @shell and should not be modified or freed. + * + * Returns: a list of loaded #EShellModule instances + **/ GList * e_shell_list_modules (EShell *shell) { @@ -493,6 +562,18 @@ e_shell_list_modules (EShell *shell) return shell->priv->loaded_modules; } +/** + * e_shell_get_canonical_name: + * @shell: an #EShell + * @name: the name or alias of an #EShellModule + * + * Returns the canonical name for the #EShellModule whose name or alias + * is @name. + * + * XXX Not sure this function is worth keeping around. + * + * Returns: the canonical #EShellModule name + **/ const gchar * e_shell_get_canonical_name (EShell *shell, const gchar *name) @@ -513,6 +594,16 @@ e_shell_get_canonical_name (EShell *shell, return G_TYPE_MODULE (shell_module)->name; } +/** + * e_shell_get_module_by_name: + * @shell: an #EShell + * @name: the name or alias of an #EShellModule + * + * Returns the corresponding #EShellModule for the given name or alias, + * or %NULL if @name is not recognized. + * + * Returns: the #EShellModule named @name, or %NULL + **/ EShellModule * e_shell_get_module_by_name (EShell *shell, const gchar *name) @@ -527,6 +618,16 @@ e_shell_get_module_by_name (EShell *shell, return g_hash_table_lookup (hash_table, name); } +/** + * e_shell_get_module_by_scheme: + * @shell: an #EShell + * @scheme: a URI scheme + * + * Returns the #EShellModule that implements the given URI scheme, + * or %NULL if @scheme is not recognized. + * + * Returns: the #EShellModule that implements @scheme, or %NULL + **/ EShellModule * e_shell_get_module_by_scheme (EShell *shell, const gchar *scheme) @@ -541,6 +642,14 @@ e_shell_get_module_by_scheme (EShell *shell, return g_hash_table_lookup (hash_table, scheme); } +/** + * e_shell_get_settings: + * @shell: an #EShell + * + * Returns the #EShellSettings instance for @shell. + * + * Returns: the #EShellSettings instance for @shell + **/ EShellSettings * e_shell_get_settings (EShell *shell) { @@ -549,6 +658,16 @@ e_shell_get_settings (EShell *shell) return shell->priv->settings; } +/** + * e_shell_create_window: + * @shell: an #EShell + * + * Creates a new #EShellWindow and emits the #EShell::window-created + * signal. Use this function instead of e_shell_window_new() so that + * @shell can track the window. + * + * Returns: a new #EShellWindow + **/ GtkWidget * e_shell_create_window (EShell *shell) { @@ -582,6 +701,16 @@ e_shell_create_window (EShell *shell) return shell_window; } +/** + * e_shell_get_focused_window: + * @shell: an #EShell + * + * Returns the most recently focused #EShellWindow. Useful for choosing + * a parent for a transient window. This only works for windows created + * with e_shell_create_window(). + * + * Returns: the most recently focused #EShellWindow + **/ GtkWidget * e_shell_get_focused_window (EShell *shell) { @@ -593,6 +722,15 @@ e_shell_get_focused_window (EShell *shell) return GTK_WIDGET (shell->priv->active_windows->data); } +/** + * e_shell_handle_uri: + * @shell: an #EShell + * @uri: the URI to be handled + * + * Emits the #EShell::handle-uri signal. + * + * Returns: %TRUE if the URI was handled, %FALSE otherwise + **/ gboolean e_shell_handle_uri (EShell *shell, const gchar *uri) @@ -607,6 +745,13 @@ e_shell_handle_uri (EShell *shell, return handled; } +/** + * e_shell_send_receive: + * @shell: an #EShell + * @parent: the parent #GtkWindow + * + * Emits the #EShell::send-receive signal. + **/ void e_shell_send_receive (EShell *shell, GtkWindow *parent) @@ -661,6 +806,17 @@ e_shell_get_preferences_window (void) return preferences_window; } +/** + * e_shell_event: + * @shell: an #EShell + * @event_name: the name of the event + * @event_data: data associated with the event + * + * The #EShell::event signal acts as a cheap mechanism for broadcasting + * events to the rest of the application, such as new mail arriving. The + * @event_name is used as the signal detail, and @event_data may point to + * an object or data structure associated with the event. + **/ void e_shell_event (EShell *shell, const gchar *event_name, |