Initial import of ephy (rev# 7126) from svn
[ephy-soc.git] / src / ephy-shell.h
blob12c665fb6fe6cdea416f1da2dcb3859e13ebb7c8
1 /*
2 * Copyright © 2000-2004 Marco Pesenti Gritti
3 * Copyright © 2003, 2004, 2006 Christian Persch
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2, or (at your option)
8 * any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 * $Id: ephy-shell.h 6952 2007-03-11 19:42:02Z chpe $
22 #ifndef EPHY_SHELL_H
23 #define EPHY_SHELL_H
25 #include "ephy-embed-shell.h"
26 #include "ephy-bookmarks.h"
27 #include "ephy-window.h"
28 #include "ephy-tab.h"
30 #include <glib-object.h>
31 #include <glib.h>
33 G_BEGIN_DECLS
35 #define EPHY_TYPE_SHELL (ephy_shell_get_type ())
36 #define EPHY_SHELL(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), EPHY_TYPE_SHELL, EphyShell))
37 #define EPHY_SHELL_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), EPHY_TYPE_SHELL, EphyShellClass))
38 #define EPHY_IS_SHELL(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), EPHY_TYPE_SHELL))
39 #define EPHY_IS_SHELL_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), EPHY_TYPE_SHELL))
40 #define EPHY_SHELL_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), EPHY_TYPE_SHELL, EphyShellClass))
42 typedef struct _EphyShell EphyShell;
43 typedef struct _EphyShellClass EphyShellClass;
44 typedef struct _EphyShellPrivate EphyShellPrivate;
46 extern EphyShell *ephy_shell;
48 typedef enum
50 /* Page types */
51 EPHY_NEW_TAB_HOME_PAGE = 1 << 0,
52 EPHY_NEW_TAB_NEW_PAGE = 1 << 1,
53 EPHY_NEW_TAB_OPEN_PAGE = 1 << 2,
55 /* Page mode */
56 EPHY_NEW_TAB_FULLSCREEN_MODE = 1 << 4,
57 EPHY_NEW_TAB_DONT_SHOW_WINDOW = 1 << 5,
59 /* Tabs */
60 EPHY_NEW_TAB_APPEND_LAST = 1 << 7,
61 EPHY_NEW_TAB_APPEND_AFTER = 1 << 8,
62 EPHY_NEW_TAB_JUMP = 1 << 9,
63 EPHY_NEW_TAB_IN_NEW_WINDOW = 1 << 10,
64 EPHY_NEW_TAB_IN_EXISTING_WINDOW = 1 << 11,
66 /* The way to load */
67 EPHY_NEW_TAB_ALLOW_FIXUP = 1 << 12,
69 } EphyNewTabFlags;
71 struct _EphyShell
73 EphyEmbedShell parent;
75 /*< private >*/
76 EphyShellPrivate *priv;
79 struct _EphyShellClass
81 EphyEmbedShellClass parent_class;
84 GType ephy_new_tab_flags_get_type (void) G_GNUC_CONST;
86 GType ephy_shell_get_type (void);
88 EphyShell *ephy_shell_get_default (void);
90 EphyTab *ephy_shell_new_tab (EphyShell *shell,
91 EphyWindow *parent_window,
92 EphyTab *previous_tab,
93 const char *url,
94 EphyNewTabFlags flags);
96 EphyTab *ephy_shell_new_tab_full (EphyShell *shell,
97 EphyWindow *parent_window,
98 EphyTab *previous_tab,
99 const char *url,
100 EphyNewTabFlags flags,
101 EphyEmbedChrome chrome,
102 gboolean is_popup,
103 guint32 user_time);
105 GObject *ephy_shell_get_session (EphyShell *shell);
107 GObject *ephy_shell_get_net_monitor (EphyShell *shell);
109 EphyBookmarks *ephy_shell_get_bookmarks (EphyShell *shell);
111 GObject *ephy_shell_get_toolbars_model (EphyShell *shell,
112 gboolean fullscreen);
114 GObject *ephy_shell_get_extensions_manager (EphyShell *shell);
116 GtkWidget *ephy_shell_get_bookmarks_editor (EphyShell *shell);
118 GtkWidget *ephy_shell_get_history_window (EphyShell *shell);
120 GObject *ephy_shell_get_pdm_dialog (EphyShell *shell);
122 GObject *ephy_shell_get_prefs_dialog (EphyShell *shell);
124 /* private API */
125 void _ephy_shell_create_instance (void);
127 G_END_DECLS
129 #endif