aboutsummaryrefslogtreecommitdiffstats
path: root/embed/ephy-embed-single.h
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@it.gnome.org>2003-02-06 04:29:48 +0800
committerMarco Pesenti Gritti <mpeseng@src.gnome.org>2003-02-06 04:29:48 +0800
commit7e908772c6a1050721a0a8ed4f4d1a0416277bbd (patch)
treefc926be33f5f9204bd3c090cf01cc83a3261fa23 /embed/ephy-embed-single.h
parent768eae4a4874a7fe0eada98423f61d84f6416bde (diff)
downloadgsoc2013-epiphany-7e908772c6a1050721a0a8ed4f4d1a0416277bbd.tar.gz
gsoc2013-epiphany-7e908772c6a1050721a0a8ed4f4d1a0416277bbd.tar.zst
gsoc2013-epiphany-7e908772c6a1050721a0a8ed4f4d1a0416277bbd.zip
Split mozilla related calls out of EmbedShell. Load default mozilla prefs
2003-02-05 Marco Pesenti Gritti <marco@it.gnome.org> * embed/Makefile.am: * embed/ephy-embed-event.h: * embed/ephy-embed-shell.c: (ephy_embed_shell_init), (ephy_embed_shell_finalize), (ephy_embed_shell_new), (ephy_embed_shell_get_embed_single), (impl_get_downloader_view): * embed/ephy-embed-shell.h: * embed/ephy-embed-utils.c: (ephy_embed_utils_save), (ephy_embed_utils_build_charsets_submenu): * embed/ephy-embed.c: (ephy_embed_new): * embed/ephy-embed.h: * embed/mozilla/ContentHandler.h: * embed/mozilla/EventContext.cpp: * embed/mozilla/GlobalHistory.cpp: * embed/mozilla/Makefile.am: * embed/mozilla/MozRegisterComponents.cpp: * embed/mozilla/PromptService.cpp: * embed/mozilla/mozilla-notifiers.cpp: * embed/mozilla/mozilla-notifiers.h: * embed/mozilla/mozilla-prefs.cpp: * embed/mozilla/mozilla-prefs.h: * src/appearance-prefs.c: (setup_font_menu): * src/ephy-encoding-menu.c: (ephy_encoding_menu_rebuild): * src/ephy-nautilus-view.c: (ephy_nautilus_view_instance_init): * src/ephy-shell.c: (ephy_shell_get_type), (ephy_shell_init): * src/ephy-tab.c: (ephy_tab_init): * src/general-prefs.c: (default_charset_menu_changed_cb), (create_default_charset_menu): * src/pdm-dialog.c: (pdm_dialog_cookie_remove), (pdm_dialog_password_remove), (pdm_dialog_cookies_free), (pdm_dialog_passwords_free), (pdm_dialog_init): * src/prefs-dialog.c: (prefs_clear_memory_cache_button_clicked_cb), (prefs_clear_disk_cache_button_clicked_cb): * src/window-commands.c: (window_cmd_file_open): Split mozilla related calls out of EmbedShell. Load default mozilla prefs from a .js file. Disable stupid useless security dialogs. Fix chechbox alert to have Ok as default action.
Diffstat (limited to 'embed/ephy-embed-single.h')
-rw-r--r--embed/ephy-embed-single.h226
1 files changed, 226 insertions, 0 deletions
diff --git a/embed/ephy-embed-single.h b/embed/ephy-embed-single.h
new file mode 100644
index 000000000..d685ac475
--- /dev/null
+++ b/embed/ephy-embed-single.h
@@ -0,0 +1,226 @@
+/*
+ * Copyright (C) 2000, 2001, 2002 Marco Pesenti Gritti
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * 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
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef EPHY_EMBED_SINGLE_H
+#define EPHY_EMBED_SINGLE_H
+
+#include "ephy-embed.h"
+#include "ephy-favicon-cache.h"
+#include "ephy-history.h"
+#include "downloader-view.h"
+
+#include <glib-object.h>
+#include <glib.h>
+
+G_BEGIN_DECLS
+
+typedef struct EphyEmbedSingleClass EphyEmbedSingleClass;
+
+#define EPHY_EMBED_SINGLE_TYPE (ephy_embed_single_get_type ())
+#define EPHY_EMBED_SINGLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EPHY_EMBED_SINGLE_TYPE, EphyEmbedSingle))
+#define EPHY_EMBED_SINGLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EPHY_EMBED_SINGLE_TYPE, EphyEmbedSingleClass))
+#define IS_EPHY_EMBED_SINGLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EPHY_EMBED_SINGLE_TYPE))
+#define IS_EPHY_EMBED_SINGLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EPHY_EMBED_SINGLE_TYPE))
+#define EPHY_EMBED_SINGLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EPHY_EMBED_SINGLE_TYPE, EphyEmbedSingleClass))
+
+typedef struct EphyEmbedSingle EphyEmbedSingle;
+typedef struct EphyEmbedSinglePrivate EphyEmbedSinglePrivate;
+
+/**
+ * FilePickerMode: What mode FilePicker should run in
+ */
+
+typedef enum
+{
+ modeOpen = 0,
+ modeSave = 1,
+ modeGetFolder =2
+} FilePickerMode;
+
+typedef struct
+{
+ /* description of the file format */
+ gchar *description;
+ /* tipical sufixes, NULL terminated */
+ gchar **extensions;
+} FileFormat;
+
+/**
+ * Cookie: the type of cookies
+ */
+typedef struct
+{
+ gchar *domain;
+ gchar *name;
+ gchar *value;
+ gchar *path;
+ gchar *secure;
+ gchar *expire;
+} CookieInfo;
+
+/**
+ * Password: a password manager entry
+ */
+typedef struct
+{
+ gchar *host;
+ gchar *username;
+} PasswordInfo;
+
+typedef struct
+{
+ const char *name;
+ const char *title;
+} CharsetInfo;
+
+/**
+ * PasswordType: To distinguish actual passwords from blocked password sites
+ */
+typedef enum
+{
+ PASSWORD_PASSWORD,
+ PASSWORD_REJECT
+} PasswordType;
+
+typedef enum
+{
+ COOKIES_PERMISSION,
+ IMAGES_PERMISSION
+} PermissionType;
+
+typedef enum
+{
+ DISK_CACHE = 2,
+ MEMORY_CACHE = 1
+} CacheType;
+
+struct EphyEmbedSingle
+{
+ GObject parent;
+ EphyEmbedSinglePrivate *priv;
+};
+
+struct EphyEmbedSingleClass
+{
+ GObjectClass parent_class;
+
+ /* Methods */
+
+ gresult (* clear_cache) (EphyEmbedSingle *shell,
+ CacheType type);
+ gresult (* set_offline_mode) (EphyEmbedSingle *shell,
+ gboolean offline);
+ gresult (* load_proxy_autoconf) (EphyEmbedSingle *shell,
+ const char* url);
+ gresult (* show_java_console) (EphyEmbedSingle *shell);
+ gresult (* show_js_console) (EphyEmbedSingle *shell);
+ gresult (* get_charset_groups) (EphyEmbedSingle *shell,
+ GList **groups);
+ gresult (* get_charset_titles) (EphyEmbedSingle *shell,
+ const char *group,
+ GList **charsets);
+ gresult (* get_font_list) (EphyEmbedSingle *shell,
+ const char *langGroup,
+ const char *fontType,
+ GList **fontList,
+ char **default_font);
+ gresult (* list_cookies) (EphyEmbedSingle *shell,
+ GList **cokies);
+ gresult (* remove_cookies) (EphyEmbedSingle *shell,
+ GList *cookies);
+ gresult (* list_passwords) (EphyEmbedSingle *shell,
+ PasswordType type,
+ GList **passwords);
+ gresult (* remove_passwords) (EphyEmbedSingle *shell,
+ GList *passwords,
+ PasswordType type);
+ gresult (* show_file_picker) (EphyEmbedSingle *shell,
+ GtkWidget *parentWidget,
+ const char* title,
+ const char* directory,
+ const char* file,
+ FilePickerMode mode,
+ char **ret_fullpath,
+ gboolean *ret_save_content,
+ FileFormat *file_formats,
+ gint *ret_file_format);
+};
+
+GType ephy_embed_single_get_type (void);
+
+EphyEmbedSingle *ephy_embed_single_new (const char *type);
+
+gresult ephy_embed_single_clear_cache (EphyEmbedSingle *shell,
+ CacheType type);
+
+gresult ephy_embed_single_set_offline_mode (EphyEmbedSingle *shell,
+ gboolean offline);
+
+gresult ephy_embed_single_load_proxy_autoconf (EphyEmbedSingle *shell,
+ const char* url);
+
+/* Charsets */
+gresult ephy_embed_single_get_charset_groups (EphyEmbedSingle *shell,
+ GList **groups);
+
+gresult ephy_embed_single_get_charset_titles (EphyEmbedSingle *shell,
+ const char *group,
+ GList **charsets);
+
+gresult ephy_embed_single_get_font_list (EphyEmbedSingle *shell,
+ const char *langGroup,
+ const char *fontType,
+ GList **fontList,
+ char **default_font);
+
+/* Cookies */
+gresult ephy_embed_single_list_cookies (EphyEmbedSingle *shell,
+ GList **cookies);
+
+gresult ephy_embed_single_remove_cookies (EphyEmbedSingle *shell,
+ GList *cookies);
+
+gresult ephy_embed_single_free_cookies (EphyEmbedSingle *shell,
+ GList *cookies);
+
+/* Passwords */
+gresult ephy_embed_single_list_passwords (EphyEmbedSingle *shell,
+ PasswordType type,
+ GList **passwords);
+
+gresult ephy_embed_single_free_passwords (EphyEmbedSingle *shell,
+ GList *passwords);
+
+gresult ephy_embed_single_remove_passwords (EphyEmbedSingle *shell,
+ GList *passwords,
+ PasswordType type);
+
+gresult ephy_embed_single_show_file_picker (EphyEmbedSingle *shell,
+ GtkWidget *parentWidget,
+ const char *title,
+ const char *directory,
+ const char *file,
+ FilePickerMode mode,
+ char **ret_fullpath,
+ gboolean *ret_save_content,
+ FileFormat *file_formats,
+ int *ret_file_format);
+
+G_END_DECLS
+
+#endif