![]() |
![]() |
![]() |
Evolution Shell Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties | Signals |
#include <shell/e-shell.h> EShell; EShell * e_shell_get_default (void
); GList * e_shell_get_shell_backends (EShell *shell
); const gchar * e_shell_get_canonical_name (EShell *shell
,const gchar *name
); EShellBackend * e_shell_get_backend_by_name (EShell *shell
,const gchar *name
); EShellBackend * e_shell_get_backend_by_scheme (EShell *shell
,const gchar *scheme
); EShellSettings * e_shell_get_shell_settings (EShell *shell
); GConfClient * e_shell_get_gconf_client (EShell *shell
); GtkWidget * e_shell_create_shell_window (EShell *shell
,const gchar *view_name
); guint e_shell_handle_uris (EShell *shell
,gchar **uris
,gboolean do_import
); void e_shell_watch_window (EShell *shell
,GtkWindow *window
); GList * e_shell_get_watched_windows (EShell *shell
); GtkWindow * e_shell_get_active_window (EShell *shell
); void e_shell_send_receive (EShell *shell
,GtkWindow *parent
); gboolean e_shell_get_express_mode (EShell *shell
); const gchar * e_shell_get_module_directory (EShell *shell
); gboolean e_shell_get_network_available (EShell *shell
); void e_shell_set_network_available (EShell *shell
,gboolean network_available
); gboolean e_shell_get_online (EShell *shell
); void e_shell_set_online (EShell *shell
,gboolean online
); GtkWidget * e_shell_get_preferences_window (EShell *shell
); void e_shell_event (EShell *shell
,const gchar *event_name
,gpointer event_data
); gboolean e_shell_quit (EShell *shell
); void e_shell_cancel_quit (EShell *shell
); #define E_SHELL_MIGRATE_ERROR gboolean e_shell_migrate_attempt (EShell *shell
);
"express-mode" gboolean : Read / Write / Construct Only "geometry" gchar* : Write / Construct Only "module-directory" gchar* : Read / Write / Construct Only "network-available" gboolean : Read / Write / Construct "online" gboolean : Read / Write / Construct "shell-settings" EShellSettings* : Read
"event" : Run First / Has Details / Action "handle-uri" : Run Last / Action "prepare-for-offline" : Run First "prepare-for-online" : Run First "prepare-for-quit" : Run First "quit-requested" : Run First "send-receive" : Run Last / Action "window-created" : Run Last "window-destroyed" : Run Last
typedef struct _EShell EShell;
Contains only private data that should be read and manipulated using the functions below.
EShell * e_shell_get_default (void
);
Returns the EShell created by
.
main()
Try to obtain the EShell from elsewhere if you can. This function is intended as a temporary workaround for when that proves difficult.
Returns : |
the EShell singleton |
GList * e_shell_get_shell_backends (EShell *shell
);
Returns a list of loaded EShellBackend instances. The list is
owned by shell
and should not be modified or freed.
|
an EShell |
Returns : |
a list of loaded EShellBackend instances |
const gchar * e_shell_get_canonical_name (EShell *shell
,const gchar *name
);
Returns the canonical name for the EShellBackend whose name or alias
is name
.
|
an EShell |
|
the name or alias of an EShellBackend |
Returns : |
the canonical EShellBackend name |
EShellBackend * e_shell_get_backend_by_name (EShell *shell
,const gchar *name
);
Returns the corresponding EShellBackend for the given name or alias,
or NULL
if name
is not recognized.
|
an EShell |
|
the name or alias of an EShellBackend |
Returns : |
the EShellBackend named name , or NULL
|
EShellBackend * e_shell_get_backend_by_scheme (EShell *shell
,const gchar *scheme
);
Returns the EShellBackend that implements the given URI scheme,
or NULL
if scheme
is not recognized.
|
an EShell |
|
a URI scheme |
Returns : |
the EShellBackend that implements scheme , or NULL
|
EShellSettings * e_shell_get_shell_settings (EShell *shell
);
Returns the EShellSettings instance for shell
.
|
an EShell |
Returns : |
the EShellSettings instance for shell
|
GConfClient * e_shell_get_gconf_client (EShell *shell
);
Returns the default GConfClient. This function is purely for
convenience. The shell
owns the reference so you don't have to.
|
an EShell |
Returns : |
the default GConfClient |
GtkWidget * e_shell_create_shell_window (EShell *shell
,const gchar *view_name
);
Creates a new EShellWindow and emits the "window-created"
signal. Use this function instead of e_shell_window_new()
so that
shell
can track the window.
|
an EShell |
|
name of the initial shell view, or NULL
|
Returns : |
a new EShellWindow |
guint e_shell_handle_uris (EShell *shell
,gchar **uris
,gboolean do_import
);
Emits the "handle-uri" signal for each URI.
|
an EShell |
|
NULL -terminated list of URIs
|
|
request an import of the URIs |
Returns : |
the number of URIs successfully handled |
void e_shell_watch_window (EShell *shell
,GtkWindow *window
);
Makes shell
"watch" a newly created toplevel window, and emits the
"window-created" signal. All EShellWindows should be
watched, along with any editor or viewer windows that may be shown in
response to e_shell_handle_uris()
. When the last watched window is
closed, Evolution terminates.
|
an EShell |
|
a GtkWindow |
GList * e_shell_get_watched_windows (EShell *shell
);
Returns a list of windows being watched by shell
. The list is sorted
by the most recently focused window, such that the first instance is the
currently focused window. (Useful for choosing a parent for a transient
window.) The list is owned by shell
and should not be modified or freed.
|
an EShell |
Returns : |
a list of watched windows |
GtkWindow * e_shell_get_active_window (EShell *shell
);
Returns the most recently focused watched window, according to
e_shell_get_watched_windows()
. Convenient for finding a parent
for a transient window.
Note the returned window is not necessarily an EShellWindow.
|
an EShell or NULL to use the default shell
|
Returns : |
the most recently focused watched window |
void e_shell_send_receive (EShell *shell
,GtkWindow *parent
);
Emits the "send-receive" signal.
|
an EShell |
|
the parent GtkWindow |
gboolean e_shell_get_express_mode (EShell *shell
);
Returns TRUE
if Evolution is in express mode.
|
an EShell |
Returns : |
TRUE if Evolution is in express mode
|
const gchar * e_shell_get_module_directory (EShell *shell
);
Returns the directory from which EModules were loaded.
gboolean e_shell_get_network_available (EShell *shell
);
Returns TRUE
if a network is available.
|
an EShell |
Returns : |
TRUE if a network is available
|
void e_shell_set_network_available (EShell *shell
,gboolean network_available
);
Sets whether a network is available. This is usually called in
response to a status change signal from NetworkManager. If the
network becomes unavailable while "online" is TRUE
, the
shell
will force "online" to FALSE
until the network
becomes available again.
|
an EShell |
|
whether a network is available |
gboolean e_shell_get_online (EShell *shell
);
Returns TRUE
if Evolution is online, FALSE
if Evolution is offline.
Evolution may be offline because the user elected to work offline, or
because the network has become unavailable.
|
an EShell |
Returns : |
TRUE if Evolution is online
|
void e_shell_set_online (EShell *shell
,gboolean online
);
Asynchronously places Evolution in online or offline mode.
|
an EShell |
|
TRUE to go online, FALSE to go offline
|
GtkWidget * e_shell_get_preferences_window (EShell *shell
);
Returns the Evolution Preferences window.
|
an EShell |
Returns : |
the preferences window |
void e_shell_event (EShell *shell
,const gchar *event_name
,gpointer event_data
);
The "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.
|
an EShell |
|
the name of the event |
|
data associated with the event |
gboolean e_shell_quit (EShell *shell
);
Requests an application shutdown. This happens in two phases: the first is synchronous, the second is asynchronous.
In the first phase, the shell
emits a "quit-requested" signal
to potentially give the user a chance to cancel shutdown. If the user
cancels shutdown, the function returns FALSE
. Otherwise it proceeds
into the second phase.
In the second phase, the shell
emits a "prepare-for-quit"
signal and immediately returns TRUE
. Signal handlers may delay the
actual application shutdown while they clean up resources, but there
is no way to cancel shutdown at this point.
Consult the documentation for these two signals for details on how to handle them.
|
an EShell |
Returns : |
TRUE if shutdown is underway, FALSE if it was cancelled
|
void e_shell_cancel_quit (EShell *shell
);
This function may only be called from "quit-requested" signal handlers to prevent Evolution from quitting. Calling this will stop further emission of the "quit-requested" signal.
Note: This function has no effect during a "prepare-for-quit" signal emission.
|
an EShell |
#define 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.
"express-mode"
property "express-mode" gboolean : Read / Write / Construct Only
Express mode alters Evolution's user interface to be more usable on devices with small screens.
Default value: FALSE
"geometry"
property "geometry" gchar* : Write / Construct Only
User-specified initial window geometry string to apply to the first EShellWindow created.
Default value: NULL
"module-directory"
property "module-directory" gchar* : Read / Write / Construct Only
The directory from which to load EModules.
Default value: NULL
"network-available"
property "network-available" gboolean : Read / Write / Construct
Whether the network is available.
Default value: TRUE
"online"
property "online" gboolean : Read / Write / Construct
Whether the shell is online.
Default value: FALSE
"event"
signalvoid user_function (EShell *shell, gpointer event_data, gpointer user_data) : Run First / Has Details / Action
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.
|
the EShell which emitted the signal |
|
data associated with the event |
|
user data set when the signal handler was connected. |
"handle-uri"
signalgboolean user_function (EShell *shell, gchar *uri, gpointer user_data) : Run Last / Action
Emitted when shell
receives a URI to be handled, usually by
way of a command-line argument. An EShellBackend should listen
for this signal and try to handle the URI, usually by opening an
editor window for the identified resource.
|
the EShell which emitted the signal |
|
the URI to be handled |
|
user data set when the signal handler was connected. |
Returns : |
TRUE if the URI could be handled, FALSE otherwise
|
"prepare-for-offline"
signalvoid user_function (EShell *shell, EActivity *activity, gpointer user_data) : Run First
Emitted when the user elects to work offline. An EShellBackend should listen for this signal and make preparations for working in offline mode.
If preparations for working offline cannot immediately be
completed (such as when synchronizing with a remote server),
the EShellBackend should reference the activity
until
preparations are complete, and then unreference the activity
.
This will delay Evolution from actually going to offline mode
until all backends have unreferenced activity
.
|
the EShell which emitted the signal |
|
the EActivity for offline preparations |
|
user data set when the signal handler was connected. |
"prepare-for-online"
signalvoid user_function (EShell *shell, EActivity *activity, gpointer user_data) : Run First
Emitted when the user elects to work online. An EShellBackend should listen for this signal and make preparations for working in online mode.
If preparations for working online cannot immediately be
completed (such as when re-connecting to a remote server), the
EShellBackend should reference the activity
until preparations
are complete, and then unreference the activity
. This will
delay Evolution from actually going to online mode until all
backends have unreferenced activity
.
|
the EShell which emitted the signal |
|
the EActivity for offline preparations |
|
user data set when the signal handler was connected. |
"prepare-for-quit"
signalvoid user_function (EShell *shell, EActivity *activity, gpointer user_data) : Run First
Emitted when the user elects to quit the application, after "quit-requested". An EShellBackend should listen for this signal and make preparations for shutting down.
If preparations for shutting down cannot immediately be completed
(such as when there are uncompleted network operations), the
EShellBackend should reference the activity
until preparations
are complete, and then unreference the activity
. This will
delay Evolution from actually shutting down until all backends
have unreferenced activity
.
|
the EShell which emitted the signal |
|
the EActivity for quit preparations |
|
user data set when the signal handler was connected. |
"quit-requested"
signalvoid user_function (EShell *shell, gpointer user_data) : Run First
Emitted when the user elects to quit the application, before "prepare-for-quit".
EShellBackends and editor windows can listen for
this signal to prompt the user to save changes or finish
scheduled operations immediately (such as sending mail in
Outbox). If the user elects to cancel, the signal handler
should call e_shell_cancel_quit()
to abort the quit.
|
the EShell which emitted the signal |
|
user data set when the signal handler was connected. |
"send-receive"
signalvoid user_function (EShell *shell, GtkWindow *parent, gpointer user_data) : Run Last / Action
Emitted when the user chooses the "Send / Receive" action. The parent window can be used for showing transient windows.
|
the EShell which emitted the signal |
|
a parent GtkWindow |
|
user data set when the signal handler was connected. |
"window-created"
signalvoid user_function (EShell *shell, GtkWindow *window, gpointer user_data) : Run Last
Emitted when shell
begins watching a newly created window.
|
the EShell which emitted the signal |
|
the newly created GtkWindow |
|
user data set when the signal handler was connected. |