4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation.
8 * This program is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
10 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program; if not, see <http://www.gnu.org/licenses/>.
17 * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
24 #include <libedataserver/libedataserver.h>
25 #include <libedataserverui/libedataserverui.h>
27 #include <e-util/e-util.h>
29 #include <shell/e-shell-common.h>
30 #include <shell/e-shell-backend.h>
32 /* Standard GObject macros */
33 #define E_TYPE_SHELL \
35 #define E_SHELL(obj) \
36 (G_TYPE_CHECK_INSTANCE_CAST \
37 ((obj), E_TYPE_SHELL, EShell))
38 #define E_SHELL_CLASS(cls) \
39 (G_TYPE_CHECK_CLASS_CAST \
40 ((cls), E_TYPE_SHELL, EShellClass))
41 #define E_IS_SHELL(obj) \
42 (G_TYPE_CHECK_INSTANCE_TYPE \
43 ((obj), E_TYPE_SHELL))
44 #define E_IS_SHELL_CLASS(cls) \
45 (G_TYPE_CHECK_CLASS_TYPE \
46 ((cls), E_TYPE_SHELL))
47 #define E_SHELL_GET_CLASS(obj) \
48 (G_TYPE_INSTANCE_GET_CLASS \
49 ((obj), E_TYPE_SHELL, EShellClass))
53 typedef struct _EShell EShell
;
54 typedef struct _EShellClass EShellClass
;
55 typedef struct _EShellPrivate EShellPrivate
;
59 * @E_SHELL_QUIT_ACTION:
60 * @E_SHELL_WINDOW_ACTION_QUIT was activated.
61 * @E_SHELL_QUIT_LAST_WINDOW:
62 * The last watched window has been destroyed.
63 * @E_SHELL_QUIT_OPTION:
64 * The program was invoked with --quit. Extensions will never
65 * see this value because they are not loaded when --quit is given.
66 * @E_SHELL_QUIT_REMOTE_REQUEST:
67 * Another Evolution process requested we quit.
68 * @E_SHELL_QUIT_SESSION_REQUEST:
69 * The desktop session requested we quit.
71 * These values are passed in the #EShell::quit-requested signal to
72 * indicate why the shell is requesting to shut down.
76 E_SHELL_QUIT_LAST_WINDOW
,
78 E_SHELL_QUIT_REMOTE_REQUEST
,
79 E_SHELL_QUIT_SESSION_REQUEST
85 * Contains only private data that should be read and manipulated using the
89 GtkApplication parent
;
94 GtkApplicationClass parent_class
;
96 gboolean (*handle_uri
) (EShell
*shell
,
98 void (*prepare_for_offline
) (EShell
*shell
,
100 void (*prepare_for_online
) (EShell
*shell
,
101 EActivity
*activity
);
102 void (*prepare_for_quit
) (EShell
*shell
,
103 EActivity
*activity
);
104 void (*quit_requested
) (EShell
*shell
,
105 EShellQuitReason reason
);
108 GType
e_shell_get_type (void);
109 EShell
* e_shell_get_default (void);
110 void e_shell_load_modules (EShell
*shell
);
111 GList
* e_shell_get_shell_backends (EShell
*shell
);
112 const gchar
* e_shell_get_canonical_name (EShell
*shell
,
114 EShellBackend
* e_shell_get_backend_by_name (EShell
*shell
,
116 EShellBackend
* e_shell_get_backend_by_scheme (EShell
*shell
,
117 const gchar
*scheme
);
118 EClientCache
* e_shell_get_client_cache (EShell
*shell
);
120 e_shell_get_registry (EShell
*shell
);
121 ECredentialsPrompter
*
122 e_shell_get_credentials_prompter(EShell
*shell
);
123 void e_shell_allow_auth_prompt_for (EShell
*shell
,
125 GtkWidget
* e_shell_create_shell_window (EShell
*shell
,
126 const gchar
*view_name
);
127 guint
e_shell_handle_uris (EShell
*shell
,
128 const gchar
* const *uris
,
130 void e_shell_submit_alert (EShell
*shell
,
132 GtkWindow
* e_shell_get_active_window (EShell
*shell
);
133 gboolean
e_shell_get_express_mode (EShell
*shell
);
134 const gchar
* e_shell_get_module_directory (EShell
*shell
);
135 gboolean
e_shell_get_network_available (EShell
*shell
);
136 void e_shell_set_network_available (EShell
*shell
,
137 gboolean network_available
);
138 void e_shell_lock_network_available (EShell
*shell
);
139 gboolean
e_shell_get_online (EShell
*shell
);
140 void e_shell_set_online (EShell
*shell
,
142 GtkWidget
* e_shell_get_preferences_window (EShell
*shell
);
143 void e_shell_event (EShell
*shell
,
144 const gchar
*event_name
,
145 gpointer event_data
);
146 gboolean
e_shell_quit (EShell
*shell
,
147 EShellQuitReason reason
);
148 void e_shell_cancel_quit (EShell
*shell
);
149 gboolean
e_shell_requires_shutdown (EShell
*shell
);
153 #endif /* E_SHELL_H */