ephy-embed-shell.h 4.32 KB
Newer Older
1
/* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
Marco Pesenti Gritti's avatar
Marco Pesenti Gritti committed
2
/*
3
 *  Copyright © 2000-2003 Marco Pesenti Gritti
4
 *  Copyright © 2011 Igalia S.L.
Marco Pesenti Gritti's avatar
Marco Pesenti Gritti committed
5
 *
Michael Catanzaro's avatar
Michael Catanzaro committed
6 7 8
 *  This file is part of Epiphany.
 *
 *  Epiphany is free software: you can redistribute it and/or modify
Marco Pesenti Gritti's avatar
Marco Pesenti Gritti committed
9
 *  it under the terms of the GNU General Public License as published by
Michael Catanzaro's avatar
Michael Catanzaro committed
10 11
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
Marco Pesenti Gritti's avatar
Marco Pesenti Gritti committed
12
 *
Michael Catanzaro's avatar
Michael Catanzaro committed
13
 *  Epiphany is distributed in the hope that it will be useful,
Marco Pesenti Gritti's avatar
Marco Pesenti Gritti committed
14 15 16 17 18
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
Michael Catanzaro's avatar
Michael Catanzaro committed
19
 *  along with Epiphany.  If not, see <http://www.gnu.org/licenses/>.
Marco Pesenti Gritti's avatar
Marco Pesenti Gritti committed
20 21
 */

22
#pragma once
Marco Pesenti Gritti's avatar
Marco Pesenti Gritti committed
23

24
#include <dazzle.h>
25
#include <webkit2/webkit2.h>
26

27
#include "ephy-downloads-manager.h"
28
#include "ephy-encodings.h"
29
#include "ephy-gsb-service.h"
30
#include "ephy-history-service.h"
31
#include "ephy-password-manager.h"
32
#include "ephy-permissions-manager.h"
33
#include "ephy-search-engine-manager.h"
Marco Pesenti Gritti's avatar
Marco Pesenti Gritti committed
34 35 36

G_BEGIN_DECLS

37
#define EPHY_TYPE_EMBED_SHELL (ephy_embed_shell_get_type ())
Marco Pesenti Gritti's avatar
Marco Pesenti Gritti committed
38

39
G_DECLARE_DERIVABLE_TYPE (EphyEmbedShell, ephy_embed_shell, EPHY, EMBED_SHELL, DzlApplication)
Marco Pesenti Gritti's avatar
Marco Pesenti Gritti committed
40

41 42
typedef enum
{
43
  EPHY_EMBED_SHELL_MODE_BROWSER,
44
  EPHY_EMBED_SHELL_MODE_STANDALONE,
45
  EPHY_EMBED_SHELL_MODE_PRIVATE,
46
  EPHY_EMBED_SHELL_MODE_INCOGNITO,
47
  EPHY_EMBED_SHELL_MODE_APPLICATION,
48
  EPHY_EMBED_SHELL_MODE_TEST,
49 50
  EPHY_EMBED_SHELL_MODE_SEARCH_PROVIDER,
  EPHY_EMBED_SHELL_MODE_AUTOMATION
51 52
} EphyEmbedShellMode;

53
struct _EphyEmbedShellClass
Marco Pesenti Gritti's avatar
Marco Pesenti Gritti committed
54
{
55
  DzlApplicationClass parent_class;
56

57
  void    (* restored_window)  (EphyEmbedShell *shell);
Marco Pesenti Gritti's avatar
Marco Pesenti Gritti committed
58 59
};

60
EphyEmbedShell    *ephy_embed_shell_get_default                (void);
61
const char        *ephy_embed_shell_get_guid                   (EphyEmbedShell   *shell);
62
WebKitWebContext  *ephy_embed_shell_get_web_context            (EphyEmbedShell   *shell);
63 64
EphyHistoryService
                  *ephy_embed_shell_get_global_history_service (EphyEmbedShell   *shell);
65
EphyGSBService    *ephy_embed_shell_get_global_gsb_service     (EphyEmbedShell   *shell);
66
EphyEncodings     *ephy_embed_shell_get_encodings              (EphyEmbedShell   *shell);
67
void               ephy_embed_shell_restored_window            (EphyEmbedShell   *shell);
68 69 70 71 72 73 74
void               ephy_embed_shell_set_page_setup             (EphyEmbedShell   *shell,
                                                                GtkPageSetup     *page_setup);
GtkPageSetup      *ephy_embed_shell_get_page_setup             (EphyEmbedShell   *shell);
void               ephy_embed_shell_set_print_settings         (EphyEmbedShell   *shell,
                                                                GtkPrintSettings *settings);
GtkPrintSettings  *ephy_embed_shell_get_print_settings         (EphyEmbedShell   *shell);
EphyEmbedShellMode ephy_embed_shell_get_mode                   (EphyEmbedShell   *shell);
75 76 77 78
gboolean           ephy_embed_shell_launch_handler             (EphyEmbedShell   *shell,
                                                                GFile            *file,
                                                                const char       *mime_type,
                                                                guint32           user_time);
79
void               ephy_embed_shell_clear_cache                (EphyEmbedShell   *shell);
80
void               ephy_embed_shell_set_thumbnail_path         (EphyEmbedShell   *shell,
81 82
                                                                const char       *url,
                                                                const char       *path);
83 84
void               ephy_embed_shell_schedule_thumbnail_update  (EphyEmbedShell   *shell,
                                                                EphyHistoryURL   *url);
85
WebKitUserContentManager *ephy_embed_shell_get_user_content_manager (EphyEmbedShell *shell);
86
EphyDownloadsManager     *ephy_embed_shell_get_downloads_manager    (EphyEmbedShell *shell);
87
EphyPermissionsManager   *ephy_embed_shell_get_permissions_manager  (EphyEmbedShell *shell);
88
EphySearchEngineManager  *ephy_embed_shell_get_search_engine_manager (EphyEmbedShell *shell);
89
EphyPasswordManager      *ephy_embed_shell_get_password_manager      (EphyEmbedShell *shell);
90

Marco Pesenti Gritti's avatar
Marco Pesenti Gritti committed
91
G_END_DECLS