aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog33
-rw-r--r--doc/reference/Makefile.am4
-rw-r--r--doc/reference/epiphany-docs.sgml1
-rw-r--r--doc/reference/epiphany-sections.txt80
-rw-r--r--doc/reference/epiphany.types2
-rw-r--r--doc/reference/tmpl/ephy-embed.sgml515
-rw-r--r--doc/reference/tmpl/ephy-tab.sgml9
-rw-r--r--doc/reference/tmpl/epiphany-unused.sgml22
-rw-r--r--embed/ephy-embed.c377
-rw-r--r--embed/ephy-embed.h18
-rw-r--r--embed/mozilla/EphyBrowser.cpp29
-rw-r--r--embed/mozilla/EphyBrowser.h7
-rw-r--r--embed/mozilla/mozilla-embed.cpp10
-rw-r--r--src/ephy-nautilus-view.c12
-rw-r--r--src/ephy-tab.c6
-rw-r--r--src/ephy-window.c4
16 files changed, 1040 insertions, 89 deletions
diff --git a/ChangeLog b/ChangeLog
index e17a63485..6b06cb361 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,36 @@
+2004-03-25 Adam Hooper <adamh@cvs.gnome.org>
+
+ * doc/reference/Makefile.am:
+ * doc/reference/epiphany-docs.sgml:
+ * doc/reference/epiphany-sections.txt:
+ * doc/reference/epiphany.types:
+ * doc/reference/tmpl/ephy-embed.sgml
+ * doc/reference/tmpl/ephy-tab.sgml:
+ * doc/reference/tmpl/epiphany-unused.sgml:
+ * embed/ephy-embed.c: (ephy_embed_base_init),
+ (ephy_embed_set_zoom), (ephy_embed_get_zoom),
+ (ephy_embed_find_set_properties):
+ * embed/ephy-embed.h:
+ * embed/mozilla/EphyBrowser.cpp:
+ * embed/mozilla/EphyBrowser.h:
+ * embed/mozilla/mozilla-embed.cpp:
+ * src/ephy-nautilus-view.c: (gnv_zoomable_set_zoom_level_cb),
+ (gnv_zoomable_zoom_in_cb), (gnv_zoomable_zoom_out_cb),
+ (gnv_zoomable_zoom_to_default_cb):
+ * src/ephy-tab.c: (ephy_tab_address_cb),
+ (ephy_tab_zoom_changed_cb):
+ * src/ephy-window.c: (ephy_window_set_zoom):
+
+ Documented EphyEmbed.
+
+ s/zoom_[sg]et/[sg]et_zoom/g.
+
+ Removed the ge_popup_blocked signal, which can be done entirely from
+ an extension now.
+
+ s/match_word/wrap_around/ and s/char */const char */ in
+ ephy_embed_find_set_properties.
+
2004-03-23 Christian Persch <chpe@cvs.gnome.org>
* src/ephy-tab.c:
diff --git a/doc/reference/Makefile.am b/doc/reference/Makefile.am
index c1026de81..cf981f0b6 100644
--- a/doc/reference/Makefile.am
+++ b/doc/reference/Makefile.am
@@ -1,6 +1,9 @@
## Process this file with automake to produce Makefile.in
AUTOMAKE_OPTIONS = 1.6
+INCLUDES = $(MOZILLA_COMPONENT_CFLAGS) \
+ -include $(MOZILLA_INCLUDE_ROOT)/mozilla-config.h
+
# The name of the module
DOC_MODULE=epiphany
@@ -66,7 +69,6 @@ IGNORE_HFILES = \
ephy-download.h \
ephy-embed-dialog.h \
ephy-embed-event.h \
- ephy-embed.h \
ephy-embed-persist.h \
ephy-embed-popup-control.h \
ephy-embed-prefs.h \
diff --git a/doc/reference/epiphany-docs.sgml b/doc/reference/epiphany-docs.sgml
index 7adab1ca0..92185ba87 100644
--- a/doc/reference/epiphany-docs.sgml
+++ b/doc/reference/epiphany-docs.sgml
@@ -11,6 +11,7 @@
<xi:include href="xml/ephy-permission-manager.xml"/>
<xi:include href="xml/ephy-window.xml"/>
<xi:include href="xml/ephy-tab.xml"/>
+ <xi:include href="xml/ephy-embed.xml"/>
</chapter>
<chapter>
<title>Incomplete</title>
diff --git a/doc/reference/epiphany-sections.txt b/doc/reference/epiphany-sections.txt
index f77ba5439..5d6d8bda3 100644
--- a/doc/reference/epiphany-sections.txt
+++ b/doc/reference/epiphany-sections.txt
@@ -10,6 +10,16 @@ ephy_permission_manager_remove
ephy_permission_manager_clear
ephy_permission_manager_test
ephy_permission_manager_list
+<SUBSECTION Standard>
+EPHY_PERMISSION_MANAGER
+EPHY_IS_PERMISSION_MANAGER
+EPHY_TYPE_PERMISSION_MANAGER
+EPHY_TYPE_PERMISSION_INFO
+ephy_permission_info_get_type
+EPHY_PERMISSION_MANAGER_GET_IFACE
+EPHY_IS_PERMISSION_MANAGER_IFACE
+EPHY_PERMISSION_MANAGER_IFACE
+ephy_permission_manager_get_type
</SECTION>
<SECTION>
@@ -18,7 +28,6 @@ ephy_permission_manager_list
EphyWindow
ephy_window_new
ephy_window_new_with_chrome
-
ephy_window_get_notebook
ephy_window_add_tab
ephy_window_remove_tab
@@ -34,6 +43,14 @@ ephy_window_set_print_preview
ephy_window_set_zoom
ephy_window_activate_location
ephy_window_load_url
+<SUBSECTION Standard>
+EPHY_WINDOW
+EPHY_IS_WINDOW
+EPHY_TYPE_WINDOW
+ephy_window_get_type
+EPHY_WINDOW_CLASS
+EPHY_IS_WINDOW_CLASS
+EPHY_WINDOW_GET_CLASS
</SECTION>
<SECTION>
@@ -41,7 +58,6 @@ ephy_window_load_url
<TITLE>EphyTab</TITLE>
EphyTab
ephy_tab_new
-ephy_tab_get_window
ephy_tab_get_embed
ephy_tab_for_embed
ephy_tab_get_icon_address
@@ -53,8 +69,68 @@ ephy_tab_get_load_status
ephy_tab_get_load_percent
ephy_tab_get_link_message
ephy_tab_get_status_message
+<SUBSECTION Standard>
+EPHY_TAB
+EPHY_IS_TAB
+EPHY_TYPE_TAB
+ephy_tab_get_type
+EPHY_TAB_CLASS
+EPHY_IS_TAB_CLASS
+EPHY_TAB_GET_CLASS
</SECTION>
+<SECTION>
+<FILE>ephy-embed</FILE>
+<TITLE>EphyEmbed</TITLE>
+EphyEmbed
+EphyEmbedIface
+EmbedState
+EphyEmbedChrome
+EmbedReloadFlags
+EmbedPrintPreviewNavType
+EmbedSecurityLevel
+ephy_embed_load_url
+ephy_embed_stop_load
+ephy_embed_reload
+ephy_embed_get_title
+ephy_embed_get_location
+ephy_embed_get_link_message
+ephy_embed_get_js_status
+ephy_embed_can_go_back
+ephy_embed_can_go_forward
+ephy_embed_can_go_up
+ephy_embed_get_go_up_list
+ephy_embed_go_back
+ephy_embed_go_forward
+ephy_embed_go_up
+ephy_embed_shistory_n_items
+ephy_embed_shistory_get_nth
+ephy_embed_shistory_get_pos
+ephy_embed_shistory_go_nth
+ephy_embed_get_security_level
+ephy_embed_set_zoom
+ephy_embed_get_zoom
+ephy_embed_find_set_properties
+ephy_embed_find_next
+ephy_embed_set_encoding
+ephy_embed_get_encoding_info
+ephy_embed_print
+ephy_embed_print_preview_close
+ephy_embed_print_preview_n_pages
+ephy_embed_print_preview_navigate
+ephy_embed_activate
+ephy_embed_has_modified_forms
+<SUBSECTION Standard>
+ephy_embed_get_type
+EPHY_EMBED
+EPHY_IS_EMBED
+EPHY_TYPE_EMBED
+ephy_embed_chrome_get_type
+EPHY_EMBED_GET_IFACE
+EPHY_EMBED_IFACE
+EPHY_IS_EMBED_IFACE
+EPHY_TYPE_EMBED_CHROME_MASK
+</SECTION>
diff --git a/doc/reference/epiphany.types b/doc/reference/epiphany.types
index 69a003fff..dffbaa6f0 100644
--- a/doc/reference/epiphany.types
+++ b/doc/reference/epiphany.types
@@ -29,6 +29,7 @@ ephy_cell_renderer_progress_get_type
#include <ephy-cookie-manager.h>
#include <ephy-password-manager.h>
#include <ephy-permission-manager.h>
+#include <mozilla-embed.h>
ephy_embed_get_type
downloader_view_get_type
@@ -41,6 +42,7 @@ ephy_embed_single_get_type
ephy_cookie_manager_get_type
ephy_permission_manager_get_type
ephy_password_manager_get_type
+mozilla_embed_get_type
#include <ephy-window.h>
#include <ephy-shell.h>
diff --git a/doc/reference/tmpl/ephy-embed.sgml b/doc/reference/tmpl/ephy-embed.sgml
new file mode 100644
index 000000000..c57e5cf98
--- /dev/null
+++ b/doc/reference/tmpl/ephy-embed.sgml
@@ -0,0 +1,515 @@
+<!-- ##### SECTION Title ##### -->
+EphyEmbed
+
+<!-- ##### SECTION Short_Description ##### -->
+An interface to the widget displaying web pages
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+Each #EphyTab contains an #EphyEmbed. An #EphyEmbed is an interface; right now
+it is only implemented by #MozillaEmbed, but whenever possible, #EphyEmbed's
+functions should be used instead of their #MozillaEmbed equivalents.
+</para>
+<para>
+#EphyEmbed's most important functions can be divided into sets:
+</para>
+<itemizedlist>
+<listitem>Functions which affect navigation</listitem>
+<listitem>Functions which return information about the displayed web
+page</listitem>
+<listitem>Functions which manipulate the session history</listitem>
+</itemizedlist>
+<para>The first two sets of functions are self-explanitory.</para>
+<para>The session history functions are used to traverse the embedded browser's
+history. Each #EphyEmbed remembers a history of the web pages it has visited.
+There can be a maximum limit, however; for #MozillaEmbed, this limit is
+determined by Mozilla's browser.sessionhistory.max_entries preference. Because
+of this limit, ephy_embed_shistory_n_items() will not necessarily return the
+number of web pages visited in the embed's lifetime; likewise,
+ephy_embed_shistory_go_nth() will not always return to the user's home page
+when called with a 0 argument.</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+Using #EphyEmbed instead of #MozillaEmbed is good practice. However, using a
+#MozillaEmbed or even a #GtkMozEmbed may be necessary in certain cases (this can
+be done by casting).
+</para>
+
+<!-- ##### STRUCT EphyEmbed ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### STRUCT EphyEmbedIface ##### -->
+<para>
+
+</para>
+
+@base_iface:
+@context_menu:
+@favicon:
+@location:
+@net_state:
+@new_window:
+@dom_mouse_click:
+@dom_mouse_down:
+@popup_blocked:
+@security_change:
+@zoom_change:
+@load_url:
+@stop_load:
+@reload:
+@can_go_back:
+@can_go_forward:
+@can_go_up:
+@get_go_up_list:
+@go_back:
+@go_forward:
+@go_up:
+@get_title:
+@get_location:
+@get_link_message:
+@get_js_status:
+@shistory_n_items:
+@shistory_get_nth:
+@shistory_get_pos:
+@shistory_go_nth:
+@get_security_level:
+@set_zoom:
+@get_zoom:
+@find_set_properties:
+@find_next:
+@set_encoding:
+@get_encoding_info:
+@print:
+@print_preview_close:
+@print_preview_n_pages:
+@print_preview_navigate:
+@activate:
+@has_modified_forms:
+
+<!-- ##### ENUM EmbedState ##### -->
+<para>
+Represents the state of an #EphyEmbed with regards to networking negotiations.
+</para>
+
+@EMBED_STATE_UNKNOWN:
+@EMBED_STATE_START:
+@EMBED_STATE_REDIRECTING:
+@EMBED_STATE_TRANSFERRING:
+@EMBED_STATE_NEGOTIATING:
+@EMBED_STATE_STOP:
+@EMBED_STATE_IS_REQUEST:
+@EMBED_STATE_IS_DOCUMENT:
+@EMBED_STATE_IS_NETWORK:
+@EMBED_STATE_IS_WINDOW:
+
+<!-- ##### ENUM EphyEmbedChrome ##### -->
+<para>
+Determines which aspects of the user interface should be displayed. Most of the
+time, an #EphyEmbed's chrome will simply be %EPHY_EMBED_CHROME_DEFAULT. However,
+windows opened with JavaScript often use a nonstandard chrome.
+</para>
+
+@EPHY_EMBED_CHROME_DEFAULT:
+@EPHY_EMBED_CHROME_MENUBAR: %TRUE for the #EphyEmbed's containing #EphyWindow
+ to display its menubar.
+@EPHY_EMBED_CHROME_TOOLBAR: %TRUE for the #EphyEmbed's containing #EphyWindow
+ to display its toolbars.
+@EPHY_EMBED_CHROME_STATUSBAR: %TRUE for the #EphyEmbed's containing #EphyWindow
+ to display its statusbar.
+
+<!-- ##### ENUM EmbedReloadFlags ##### -->
+<para>
+
+</para>
+
+@EMBED_RELOAD_NORMAL:
+@EMBED_RELOAD_FORCE: Bypass cache and proxy while reloading a web page
+
+<!-- ##### ENUM EmbedPrintPreviewNavType ##### -->
+<para>
+Specifies the action to perform in ephy_embed_print_preview_navigate().
+</para>
+
+@PRINTPREVIEW_GOTO_PAGENUM:
+@PRINTPREVIEW_PREV_PAGE:
+@PRINTPREVIEW_NEXT_PAGE:
+@PRINTPREVIEW_HOME:
+@PRINTPREVIEW_END:
+
+<!-- ##### ENUM EmbedSecurityLevel ##### -->
+<para>
+Represents the security status of an #EphyEmbed. For example, a page with an
+invalid SSL certificate will have an #EmbedSecurityLevel of %STATE_IS_BROKEN.
+</para>
+
+@STATE_IS_UNKNOWN:
+@STATE_IS_INSECURE:
+@STATE_IS_BROKEN:
+@STATE_IS_SECURE_MED:
+@STATE_IS_SECURE_LOW:
+@STATE_IS_SECURE_HIGH:
+
+<!-- ##### FUNCTION ephy_embed_load_url ##### -->
+<para>
+
+</para>
+
+@embed:
+@url:
+
+
+<!-- ##### FUNCTION ephy_embed_stop_load ##### -->
+<para>
+
+</para>
+
+@embed:
+
+
+<!-- ##### FUNCTION ephy_embed_reload ##### -->
+<para>
+
+</para>
+
+@embed:
+@flags:
+
+
+<!-- ##### FUNCTION ephy_embed_get_title ##### -->
+<para>
+
+</para>
+
+@embed:
+@Returns:
+
+
+<!-- ##### FUNCTION ephy_embed_get_location ##### -->
+<para>
+
+</para>
+
+@embed:
+@toplevel:
+@Returns:
+
+
+<!-- ##### FUNCTION ephy_embed_get_link_message ##### -->
+<para>
+
+</para>
+
+@embed:
+@Returns:
+
+
+<!-- ##### FUNCTION ephy_embed_get_js_status ##### -->
+<para>
+
+</para>
+
+@embed:
+@Returns:
+
+
+<!-- ##### FUNCTION ephy_embed_can_go_back ##### -->
+<para>
+
+</para>
+
+@embed:
+@Returns:
+
+
+<!-- ##### FUNCTION ephy_embed_can_go_forward ##### -->
+<para>
+
+</para>
+
+@embed:
+@Returns:
+
+
+<!-- ##### FUNCTION ephy_embed_can_go_up ##### -->
+<para>
+
+</para>
+
+@embed:
+@Returns:
+
+
+<!-- ##### FUNCTION ephy_embed_get_go_up_list ##### -->
+<para>
+
+</para>
+
+@embed:
+@Returns:
+
+
+<!-- ##### FUNCTION ephy_embed_go_back ##### -->
+<para>
+
+</para>
+
+@embed:
+
+
+<!-- ##### FUNCTION ephy_embed_go_forward ##### -->
+<para>
+
+</para>
+
+@embed:
+
+
+<!-- ##### FUNCTION ephy_embed_go_up ##### -->
+<para>
+
+</para>
+
+@embed:
+
+
+<!-- ##### FUNCTION ephy_embed_shistory_n_items ##### -->
+<para>
+
+</para>
+
+@embed:
+@Returns:
+
+
+<!-- ##### FUNCTION ephy_embed_shistory_get_nth ##### -->
+<para>
+
+</para>
+
+@embed:
+@nth:
+@is_relative:
+@url:
+@title:
+
+
+<!-- ##### FUNCTION ephy_embed_shistory_get_pos ##### -->
+<para>
+
+</para>
+
+@embed:
+@Returns:
+
+
+<!-- ##### FUNCTION ephy_embed_shistory_go_nth ##### -->
+<para>
+
+</para>
+
+@embed:
+@nth:
+
+
+<!-- ##### FUNCTION ephy_embed_get_security_level ##### -->
+<para>
+
+</para>
+
+@embed:
+@level:
+@description:
+
+
+<!-- ##### FUNCTION ephy_embed_set_zoom ##### -->
+<para>
+
+</para>
+
+@embed:
+@zoom:
+@reflow:
+
+
+<!-- ##### FUNCTION ephy_embed_get_zoom ##### -->
+<para>
+
+</para>
+
+@embed:
+@Returns:
+
+
+<!-- ##### FUNCTION ephy_embed_find_set_properties ##### -->
+<para>
+
+</para>
+
+@embed:
+@search_string:
+@case_sensitive:
+@wrap_around:
+
+
+<!-- ##### FUNCTION ephy_embed_find_next ##### -->
+<para>
+
+</para>
+
+@embed:
+@backwards:
+@Returns:
+
+
+<!-- ##### FUNCTION ephy_embed_set_encoding ##### -->
+<para>
+
+</para>
+
+@embed:
+@encoding:
+
+
+<!-- ##### FUNCTION ephy_embed_get_encoding_info ##### -->
+<para>
+
+</para>
+
+@embed:
+@Returns:
+
+
+<!-- ##### FUNCTION ephy_embed_print ##### -->
+<para>
+
+</para>
+
+@embed:
+@info:
+
+
+<!-- ##### FUNCTION ephy_embed_print_preview_close ##### -->
+<para>
+
+</para>
+
+@embed:
+
+
+<!-- ##### FUNCTION ephy_embed_print_preview_n_pages ##### -->
+<para>
+
+</para>
+
+@embed:
+@Returns:
+
+
+<!-- ##### FUNCTION ephy_embed_print_preview_navigate ##### -->
+<para>
+
+</para>
+
+@embed:
+@type:
+@page:
+
+
+<!-- ##### FUNCTION ephy_embed_activate ##### -->
+<para>
+
+</para>
+
+@embed:
+
+
+<!-- ##### FUNCTION ephy_embed_has_modified_forms ##### -->
+<para>
+
+</para>
+
+@embed:
+@Returns:
+
+
+<!-- ##### SIGNAL EphyEmbed::ge-context-menu ##### -->
+<para>
+
+</para>
+
+@ephyembed: the object which received the signal.
+@arg1:
+@Returns:
+
+<!-- ##### SIGNAL EphyEmbed::ge-dom-mouse-click ##### -->
+<para>
+
+</para>
+
+@ephyembed: the object which received the signal.
+@arg1:
+@Returns:
+
+<!-- ##### SIGNAL EphyEmbed::ge-dom-mouse-down ##### -->
+<para>
+
+</para>
+
+@ephyembed: the object which received the signal.
+@arg1:
+@Returns:
+
+<!-- ##### SIGNAL EphyEmbed::ge-favicon ##### -->
+<para>
+
+</para>
+
+@ephyembed: the object which received the signal.
+@arg1:
+
+<!-- ##### SIGNAL EphyEmbed::ge-location ##### -->
+<para>
+
+</para>
+
+@ephyembed: the object which received the signal.
+@arg1:
+
+<!-- ##### SIGNAL EphyEmbed::ge-net-state ##### -->
+<para>
+
+</para>
+
+@ephyembed: the object which received the signal.
+@arg1:
+@arg2:
+
+<!-- ##### SIGNAL EphyEmbed::ge-new-window ##### -->
+<para>
+
+</para>
+
+@ephyembed: the object which received the signal.
+@arg1:
+@arg2:
+
+<!-- ##### SIGNAL EphyEmbed::ge-security-change ##### -->
+<para>
+
+</para>
+
+@ephyembed: the object which received the signal.
+@arg1:
+
+<!-- ##### SIGNAL EphyEmbed::ge-zoom-change ##### -->
+<para>
+
+</para>
+
+@ephyembed: the object which received the signal.
+@arg1:
+
diff --git a/doc/reference/tmpl/ephy-tab.sgml b/doc/reference/tmpl/ephy-tab.sgml
index c598e77a8..94d71bb1f 100644
--- a/doc/reference/tmpl/ephy-tab.sgml
+++ b/doc/reference/tmpl/ephy-tab.sgml
@@ -29,15 +29,6 @@ An #EphyTab is basically a container for an #EphyEmbed.
@Returns:
-<!-- ##### FUNCTION ephy_tab_get_window ##### -->
-<para>
-
-</para>
-
-@tab:
-@Returns:
-
-
<!-- ##### FUNCTION ephy_tab_get_embed ##### -->
<para>
diff --git a/doc/reference/tmpl/epiphany-unused.sgml b/doc/reference/tmpl/epiphany-unused.sgml
index c984df54a..5fcda58b0 100644
--- a/doc/reference/tmpl/epiphany-unused.sgml
+++ b/doc/reference/tmpl/epiphany-unused.sgml
@@ -24,6 +24,20 @@ mozilla-embed-event
</para>
+<!-- ##### SIGNAL EphyEmbed::ge-popup-blocked ##### -->
+<para>
+
+</para>
+
+@ephyembed: the object which received the signal.
+
+<!-- ##### FUNCTION ephy_embed_get_type ##### -->
+<para>
+
+</para>
+
+@Returns:
+
<!-- ##### FUNCTION ephy_shell_delete_on_exit ##### -->
<para>
@@ -33,6 +47,14 @@ mozilla-embed-event
@path:
@gs:
+<!-- ##### FUNCTION ephy_tab_get_window ##### -->
+<para>
+
+</para>
+
+@tab:
+@Returns:
+
<!-- ##### FUNCTION mozilla_embed_event_new ##### -->
<para>
diff --git a/embed/ephy-embed.c b/embed/ephy-embed.c
index 852090e44..7f8eb7572 100644
--- a/embed/ephy-embed.c
+++ b/embed/ephy-embed.c
@@ -82,6 +82,15 @@ ephy_embed_base_init (gpointer g_class)
if (!initialized)
{
+/**
+ * EphyEmbed::ge-new-window:
+ * @embed:
+ * @new_embed: a newly-generated child #EphyEmbed
+ * @mark: @new_embed's #EphyChromeMask
+ *
+ * The ::ge_new_window signal is emitted when a new window has been opened by
+ * the embed. For example, when a JavaScript popup window is opened.
+ **/
g_signal_new ("ge_new_window",
EPHY_TYPE_EMBED,
G_SIGNAL_RUN_FIRST,
@@ -92,6 +101,15 @@ ephy_embed_base_init (gpointer g_class)
2,
G_TYPE_POINTER,
G_TYPE_INT);
+/**
+ * EphyEmbed::ge-context-menu:
+ * @embed:
+ * @event: the #EphyEmbedEvent which triggered this signal
+ *
+ * The ::ge_context_menu signal is emitted when a context menu is to be
+ * displayed. This will usually happen when the user right-clicks on a part of
+ * @embed.
+ **/
g_signal_new ("ge_context_menu",
EPHY_TYPE_EMBED,
G_SIGNAL_RUN_LAST,
@@ -101,6 +119,14 @@ ephy_embed_base_init (gpointer g_class)
G_TYPE_BOOLEAN,
1,
G_TYPE_OBJECT);
+/**
+ * EphyEmbed::ge-favicon:
+ * @embed:
+ * @address: the URL to @embed's web site's favicon
+ *
+ * The ::ge_favicon signal is emitted when @embed discovers that a favourite
+ * icon (favicon) is available for the site it is visiting.
+ **/
g_signal_new ("ge_favicon",
EPHY_TYPE_EMBED,
G_SIGNAL_RUN_FIRST,
@@ -110,6 +136,18 @@ ephy_embed_base_init (gpointer g_class)
G_TYPE_NONE,
1,
G_TYPE_STRING);
+/**
+ * EphyEmbed::ge-location:
+ * @embed:
+ * @address: the new URL @embed is visiting
+ *
+ * The ::ge_location signal is emitted when @embed begins to load a new web
+ * page. For example, if the user clicks on a link or enters an address of if
+ * the previous web page had JavaScript or a META REFRESH tag.
+ *
+ * The ::ge_location signal will be emitted even when @embed is simply
+ * refreshing the same web page.
+ **/
g_signal_new ("ge_location",
EPHY_TYPE_EMBED,
G_SIGNAL_RUN_FIRST,
@@ -119,6 +157,16 @@ ephy_embed_base_init (gpointer g_class)
G_TYPE_NONE,
1,
G_TYPE_STRING);
+/**
+ * EphyEmbed::ge-net-state:
+ * @embed:
+ * @uri: the URI @embed is loading
+ * @state: the #EmbedState of @embed
+ *
+ * The ::ge_net_state signal is emitted when @embed's network negotiation state
+ * changes. For example, this will indicate when page loading is complete or
+ * cancelled.
+ **/
g_signal_new ("ge_net_state",
EPHY_TYPE_EMBED,
G_SIGNAL_RUN_FIRST,
@@ -129,6 +177,13 @@ ephy_embed_base_init (gpointer g_class)
2,
G_TYPE_STRING,
G_TYPE_INT);
+/**
+ * EphyEmbed::ge-dom-mouse-click:
+ * @embed:
+ * @event: the #EphyEmbedEvent which triggered this signal
+ *
+ * The ::ge_dom_mouse_click signal is emitted when the user clicks in @embed.
+ **/
g_signal_new ("ge_dom_mouse_click",
EPHY_TYPE_EMBED,
G_SIGNAL_RUN_LAST,
@@ -138,6 +193,14 @@ ephy_embed_base_init (gpointer g_class)
G_TYPE_BOOLEAN,
1,
G_TYPE_POINTER);
+/**
+ * EphyEmbed::ge-dom-mouse-down:
+ * @embed:
+ * @event: the #EphyEmbedEvent which triggered this signal
+ *
+ * The ::ge_dom_mouse_down signal is emitted when the user depresses a mouse
+ * button.
+ **/
g_signal_new ("ge_dom_mouse_down",
EPHY_TYPE_EMBED,
G_SIGNAL_RUN_LAST,
@@ -147,14 +210,15 @@ ephy_embed_base_init (gpointer g_class)
G_TYPE_BOOLEAN,
1,
G_TYPE_POINTER);
- g_signal_new ("ge_popup_blocked",
- EPHY_TYPE_EMBED,
- G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET (EphyEmbedIface, popup_blocked),
- NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE,
- 0);
+/**
+ * EphyEmbed::ge-security-change:
+ * @embed:
+ * @level: @embed's new #EmbedSecurityLevel
+ *
+ * The ::ge_security_change signal is emitted when the security level of @embed
+ * changes. For example, this will happen when the user browses from an
+ * insecure website to an SSL-secured one.
+ **/
g_signal_new ("ge_security_change",
EPHY_TYPE_EMBED,
G_SIGNAL_RUN_LAST,
@@ -164,6 +228,18 @@ ephy_embed_base_init (gpointer g_class)
G_TYPE_NONE,
1,
G_TYPE_INT);
+/**
+ * EphyEmbed::ge-zoom-change:
+ * @embed:
+ * @zoom: @embed's new zoom level
+ *
+ * The ::ge_zoom_change signal is emitted when @embed's zoom changes. This can
+ * be manual (the user modified the zoom level) or automatic (@embed's zoom is
+ * automatically changed when browsing to a new site for which the user
+ * previously specified a zoom level).
+ *
+ * A @zoom value of 1.0 indicates 100% (normal zoom).
+ **/
g_signal_new ("ge_zoom_change",
EPHY_TYPE_EMBED,
G_SIGNAL_RUN_LAST,
@@ -178,6 +254,13 @@ ephy_embed_base_init (gpointer g_class)
}
}
+/**
+ * ephy_embed_load_url:
+ * @embed: an #EphyEmbed
+ * @url: a URL
+ *
+ * Loads a new web page in @embed.
+ **/
void
ephy_embed_load_url (EphyEmbed *embed,
const char *url)
@@ -186,6 +269,12 @@ ephy_embed_load_url (EphyEmbed *embed,
iface->load_url (embed, url);
}
+/**
+ * ephy_embed_stop_load:
+ * @embed: an #EphyEmbed
+ *
+ * If @embed is loading, stops it from continuing.
+ **/
void
ephy_embed_stop_load (EphyEmbed *embed)
{
@@ -193,6 +282,12 @@ ephy_embed_stop_load (EphyEmbed *embed)
iface->stop_load (embed);
}
+/**
+ * ephy_embed_can_go_back:
+ * @embed: an #EphyEmbed
+ *
+ * Return value: %TRUE if @embed can return to a previously-visited location
+ **/
gboolean
ephy_embed_can_go_back (EphyEmbed *embed)
{
@@ -200,6 +295,12 @@ ephy_embed_can_go_back (EphyEmbed *embed)
return iface->can_go_back (embed);
}
+/**
+ * ephy_embed_can_go_forward:
+ * @embed: an #EphyEmbed
+ *
+ * Return value: %TRUE if @embed has gone back, and can thus go forward again
+ **/
gboolean
ephy_embed_can_go_forward (EphyEmbed *embed)
{
@@ -207,6 +308,16 @@ ephy_embed_can_go_forward (EphyEmbed *embed)
return iface->can_go_forward (embed);
}
+/**
+ * ephy_embed_can_go_up:
+ * @embed: an #EphyEmbed
+ *
+ * Returns whether @embed can travel to a higher-level directory on the server.
+ * For example, for http://www.example.com/subdir/index.html, returns %TRUE; for
+ * http://www.example.com/index.html, returns %FALSE.
+ *
+ * Return value: %TRUE if @embed can browse to a higher-level directory
+ **/
gboolean
ephy_embed_can_go_up (EphyEmbed *embed)
{
@@ -214,6 +325,18 @@ ephy_embed_can_go_up (EphyEmbed *embed)
return iface->can_go_up (embed);
}
+/**
+ * ephy_embed_get_go_up_list:
+ * @embed: an #EphyEmbed
+ *
+ * Returns a list of (%char *) URLs to higher-level directories on the same
+ * server, in order of deepest to shallowest. For example, given
+ * "http://www.example.com/dir/subdir/file.html", will return a list containing
+ * "http://www.example.com/dir/subdir/", "http://www.example.com/dir/" and
+ * "http://www.example.com/".
+ *
+ * Returns: a list of URLs higher up in @embed's web page's directory hierarchy
+ **/
GSList *
ephy_embed_get_go_up_list (EphyEmbed *embed)
{
@@ -221,6 +344,12 @@ ephy_embed_get_go_up_list (EphyEmbed *embed)
return iface->get_go_up_list (embed);
}
+/**
+ * ephy_embed_go_back:
+ * @embed: an #EphyEmbed
+ *
+ * Causes @embed to return to the previously-visited web page.
+ **/
void
ephy_embed_go_back (EphyEmbed *embed)
{
@@ -228,6 +357,13 @@ ephy_embed_go_back (EphyEmbed *embed)
iface->go_back (embed);
}
+/**
+ * ephy_embed_go_forward:
+ * @embed: an #EphyEmbed
+ *
+ * If @embed has returned to a previously-visited web page, proceed forward to
+ * the next page.
+ **/
void
ephy_embed_go_forward (EphyEmbed *embed)
{
@@ -235,6 +371,12 @@ ephy_embed_go_forward (EphyEmbed *embed)
iface->go_forward (embed);
}
+/**
+ * ephy_embed_go_up:
+ * @embed: an #EphyEmbed
+ *
+ * Moves @embed one level up in its web page's directory hierarchy.
+ **/
void
ephy_embed_go_up (EphyEmbed *embed)
{
@@ -242,7 +384,12 @@ ephy_embed_go_up (EphyEmbed *embed)
iface->go_up (embed);
}
-
+/**
+ * ephy_embed_get_title:
+ * @embed: an #EphyEmbed
+ *
+ * Return value: the title of the web page displayed in @embed
+ **/
char *
ephy_embed_get_title (EphyEmbed *embed)
{
@@ -250,6 +397,20 @@ ephy_embed_get_title (EphyEmbed *embed)
return iface->get_title (embed);
}
+/**
+ * ephy_embed_get_location:
+ * @embed: an #EphyEmbed
+ * @toplevel: %FALSE to return the location of the focused frame only
+ *
+ * Returns the URL of the web page displayed in @embed.
+ *
+ * If the web page contains frames, @toplevel will determine which location to
+ * retrieve. If @toplevel is %TRUE, the return value will be the location of the
+ * frameset document. If @toplevel is %FALSE, the return value will be the
+ * location of the currently-focused frame.
+ *
+ * Return value: the URL of the web page displayed in @embed
+ **/
char *
ephy_embed_get_location (EphyEmbed *embed,
gboolean toplevel)
@@ -258,6 +419,15 @@ ephy_embed_get_location (EphyEmbed *embed,
return iface->get_location (embed, toplevel);
}
+/**
+ * ephy_embed_get_link_message:
+ * @embed: an #EphyEmbed
+ *
+ * When the user is hovering the mouse over a hyperlink, returns the URL of the
+ * hyperlink.
+ *
+ * Return value: the URL of the link over which the mouse is hovering
+ **/
char *
ephy_embed_get_link_message (EphyEmbed *embed)
{
@@ -265,6 +435,17 @@ ephy_embed_get_link_message (EphyEmbed *embed)
return iface->get_link_message (embed);
}
+/**
+ * ephy_embed_get_js_status:
+ * @embed: an #EphyEmbed
+ *
+ * Displays the message JavaScript is attempting to display in the statusbar.
+ *
+ * Note that Epiphany does not display JavaScript statusbar messages.
+ *
+ * Return value: a message from JavaScript meant to be displayed in the
+ * statusbar
+ **/
char *
ephy_embed_get_js_status (EphyEmbed *embed)
{
@@ -272,6 +453,16 @@ ephy_embed_get_js_status (EphyEmbed *embed)
return iface->get_js_status (embed);
}
+/**
+ * ephy_embed_reload:
+ * @embed: an #EphyEmbed
+ * @flags: %EMBED_RELOAD_FORCE to bypass cache
+ *
+ * Reloads the web page being displayed in @embed.
+ *
+ * If @flags is %EMBED_RELOAD_FORCE, cache and proxy will be bypassed when
+ * reloading the page. Otherwise, use %EMBED_RELOAD_NORMAL.
+ **/
void
ephy_embed_reload (EphyEmbed *embed,
EmbedReloadFlags flags)
@@ -280,22 +471,55 @@ ephy_embed_reload (EphyEmbed *embed,
iface->reload (embed, flags);
}
+/**
+ * ephy_embed_set_zoom:
+ * @embed: an #EphyEmbed
+ * @zoom: the new zoom level
+ * @reflow: %TRUE to reload the page
+ *
+ * Sets the zoom level for a web page.
+ *
+ * Zoom is normally controlled by the Epiphany itself and remembered in
+ * Epiphany's history data. Be very careful not to break this behavior if using
+ * this function; better yet, don't use this function at all.
+ **/
void
-ephy_embed_zoom_set (EphyEmbed *embed,
+ephy_embed_set_zoom (EphyEmbed *embed,
float zoom,
gboolean reflow)
{
EphyEmbedIface *iface = EPHY_EMBED_GET_IFACE (embed);
- iface->zoom_set (embed, zoom, reflow);
+ iface->set_zoom (embed, zoom, reflow);
}
+/**
+ * ephy_embed_get_zoom:
+ * @embed: an #EphyEmbed
+ *
+ * Returns the zoom level of @embed. A zoom of 1.0 corresponds to 100% (normal
+ * size).
+ *
+ * Return value: the zoom level of @embed
+ **/
float
-ephy_embed_zoom_get (EphyEmbed *embed)
+ephy_embed_get_zoom (EphyEmbed *embed)
{
EphyEmbedIface *iface = EPHY_EMBED_GET_IFACE (embed);
- return iface->zoom_get (embed);
+ return iface->get_zoom (embed);
}
+/**
+ * ephy_embed_shistory_n_items:
+ * @embed: an #EphyEmbed
+ *
+ * Returns the number of items in @embed's history. In other words, returns the
+ * number of pages @embed has visited.
+ *
+ * The number is upper-bound by Mozilla's browser.sessionhistory.max_entries
+ * preference.
+ *
+ * Return value: the number of items in @embed's history
+ **/
int
ephy_embed_shistory_n_items (EphyEmbed *embed)
{
@@ -303,6 +527,19 @@ ephy_embed_shistory_n_items (EphyEmbed *embed)
return iface->shistory_n_items (embed);
}
+/**
+ * ephy_embed_shistory_get_nth:
+ * @embed: an #EphyEmbed
+ * @nth: index of the desired page in @embed's browser history
+ * @is_relative: if %TRUE, add @embed's current history position to @nth
+ * @url: return value of the history entry's URL
+ * @title: return value of the history entry's title
+ *
+ * Returns the @url and @title of the @nth item in @embed's session history.
+ * If @is_relative is %TRUE, @nth is an offset from the browser's current
+ * history position. For example, calling this function with @is_relative %TRUE
+ * and @nth %0 will return the URL and title of the current page.
+ **/
void
ephy_embed_shistory_get_nth (EphyEmbed *embed,
int nth,
@@ -314,6 +551,16 @@ ephy_embed_shistory_get_nth (EphyEmbed *embed,
iface->shistory_get_nth (embed, nth, is_relative, url, title);
}
+/**
+ * ephy_embed_shistory_get_pos:
+ * @embed: an #EphyEmbed
+ *
+ * Returns @embed's current position in its history. If the user never uses the
+ * "Back" button, this number will be the same as the return value of
+ * ephy_embed_shistory_n_items().
+ *
+ * Return value: @embed's current position in its history
+ **/
int
ephy_embed_shistory_get_pos (EphyEmbed *embed)
{
@@ -321,6 +568,13 @@ ephy_embed_shistory_get_pos (EphyEmbed *embed)
return iface->shistory_get_pos (embed);
}
+/**
+ * ephy_embed_shistory_go_nth:
+ * @embed: an #EphyEmbed
+ * @nth: desired history index
+ *
+ * Opens the webpage at location @nth in @embed's history.
+ **/
void
ephy_embed_shistory_go_nth (EphyEmbed *embed,
int nth)
@@ -329,6 +583,15 @@ ephy_embed_shistory_go_nth (EphyEmbed *embed,
iface->shistory_go_nth (embed, nth);
}
+/**
+ * ephy_embed_get_security_level:
+ * @embed: an #EphyEmbed
+ * @level: return value of security level
+ * @description: return value of the description of the security level
+ *
+ * Returns the an #EmbedSecurityLevel and a newly-allocated string description
+ * of the security state of @embed.
+ **/
void
ephy_embed_get_security_level (EphyEmbed *embed,
EmbedSecurityLevel *level,
@@ -338,16 +601,33 @@ ephy_embed_get_security_level (EphyEmbed *embed,
iface->get_security_level (embed, level, description);
}
+/**
+ * ephy_embed_find_set_properties:
+ * @embed: an #EphyEmbed
+ * @search_string: the desired search string
+ * @case_sensitive: %TRUE for "case sensitive" to be set
+ * @wrap_around: %TRUE for "wrap around" to be set
+ *
+ * Sets the properties of @embed's "Find" dialog.
+ **/
void
ephy_embed_find_set_properties (EphyEmbed *embed,
- char *search_string,
+ const char *search_string,
gboolean case_sensitive,
- gboolean match_word)
+ gboolean wrap_around)
{
EphyEmbedIface *iface = EPHY_EMBED_GET_IFACE (embed);
- iface->find_set_properties (embed, search_string, case_sensitive, match_word);
+ iface->find_set_properties (embed, search_string, case_sensitive,
+ wrap_around);
}
+/**
+ * ephy_embed_find_next:
+ * @embed: an #EphyEmbed
+ * @backwards: %FALSE to search forwards in the document
+ *
+ * Equivalent to pressing "Next" in @embed's Find dialog.
+ **/
gboolean
ephy_embed_find_next (EphyEmbed *embed,
gboolean backwards)
@@ -356,6 +636,12 @@ ephy_embed_find_next (EphyEmbed *embed,
return iface->find_next (embed, backwards);
}
+/**
+ * ephy_embed_activate:
+ * @embed: an #EphyEmbed
+ *
+ * Gives focus to @embed (i.e., Mozilla).
+ **/
void
ephy_embed_activate (EphyEmbed *embed)
{
@@ -363,6 +649,17 @@ ephy_embed_activate (EphyEmbed *embed)
iface->activate (embed);
}
+/**
+ * ephy_embed_set_encoding:
+ * @embed: an #EphyEmbed
+ * @encoding: the desired encoding
+ *
+ * Sets @embed's character encoding to @encoding. These cryptic encoding
+ * strings are listed in <filename>embed/ephy-encodings.c</filename>.
+ *
+ * Pass an empty string (not NULL) in @encoding to reset @embed to use the
+ * document-specified encoding.
+ **/
void
ephy_embed_set_encoding (EphyEmbed *embed,
const char *encoding)
@@ -371,6 +668,12 @@ ephy_embed_set_encoding (EphyEmbed *embed,
iface->set_encoding (embed, encoding);
}
+/**
+ * ephy_embed_get_encoding_info:
+ * @embed: an #EphyEmbed
+ *
+ * Returns @embed's #EphyEncodingInfo.
+ **/
EphyEncodingInfo *
ephy_embed_get_encoding_info (EphyEmbed *embed)
{
@@ -378,6 +681,16 @@ ephy_embed_get_encoding_info (EphyEmbed *embed)
return iface->get_encoding_info (embed);
}
+/**
+ * ephy_embed_print:
+ * @embed: an #EphyEmbed
+ * @info: an #EmbedPrintInfo with all printing settings
+ *
+ * Sends a document to the printer.
+ *
+ * Normally one would use ephy_window_print() to display the print dialog, which
+ * will build its own #EmbedPrintInfo and then call this function.
+ **/
void
ephy_embed_print (EphyEmbed *embed,
EmbedPrintInfo *info)
@@ -386,6 +699,12 @@ ephy_embed_print (EphyEmbed *embed,
iface->print (embed, info);
}
+/**
+ * ephy_embed_print_preview_close:
+ * @embed: an #EphyEmbed
+ *
+ * Closes @embed's print preview dialog.
+ **/
void
ephy_embed_print_preview_close (EphyEmbed *embed)
{
@@ -393,6 +712,15 @@ ephy_embed_print_preview_close (EphyEmbed *embed)
iface->print_preview_close (embed);
}
+/**
+ * ephy_embed_print_preview_n_pages:
+ * @embed: an #EphyEmbed
+ *
+ * Returns the number of pages which would appear in @embed's loaded document
+ * if it were to be printed.
+ *
+ * Return value: the number of pages in @embed's loaded document
+ **/
int
ephy_embed_print_preview_n_pages (EphyEmbed *embed)
{
@@ -400,6 +728,14 @@ ephy_embed_print_preview_n_pages (EphyEmbed *embed)
return iface->print_preview_n_pages (embed);
}
+/**
+ * ephy_embed_print_preview_navigate:
+ * @embed: an #EphyEmbed
+ * @type: an #EphyPrintPreviewNavType which determines where to navigate
+ * @page: if @type is %PRINTPREVIEW_GOTO_PAGENUM, the desired page number
+ *
+ * Navigates @embed's print preview.
+ **/
void
ephy_embed_print_preview_navigate (EphyEmbed *embed,
EmbedPrintPreviewNavType type,
@@ -409,6 +745,15 @@ ephy_embed_print_preview_navigate (EphyEmbed *embed,
return iface->print_preview_navigate (embed, type, page);
}
+/**
+ * ephy_embed_has_modified_forms:
+ * @embed: an #EphyEmbed
+ *
+ * Returns %TRUE if the user has modified &lt;input&gt; or &lt;textarea&gt;
+ * values in @embed's loaded document.
+ *
+ * Return value: %TRUE if @embed has user-modified forms
+ **/
gboolean
ephy_embed_has_modified_forms (EphyEmbed *embed)
{
diff --git a/embed/ephy-embed.h b/embed/ephy-embed.h
index afeee8d9f..217d3df2a 100644
--- a/embed/ephy-embed.h
+++ b/embed/ephy-embed.h
@@ -39,8 +39,8 @@ G_BEGIN_DECLS
#define EPHY_TYPE_EMBED_CHROME_MASK (ephy_embed_chrome_get_type ())
-typedef struct EphyEmbed EphyEmbed;
-typedef struct EphyEmbedIface EphyEmbedIface;
+typedef struct _EphyEmbed EphyEmbed; /* dummy typedef */
+typedef struct _EphyEmbedIface EphyEmbedIface;
typedef enum
{
@@ -127,7 +127,7 @@ typedef enum
STATE_IS_SECURE_HIGH
} EmbedSecurityLevel;
-struct EphyEmbedIface
+struct _EphyEmbedIface
{
GTypeInterface base_iface;
@@ -198,12 +198,12 @@ struct EphyEmbedIface
void (* get_security_level) (EphyEmbed *embed,
EmbedSecurityLevel *level,
char **description);
- void (* zoom_set) (EphyEmbed *embed,
+ void (* set_zoom) (EphyEmbed *embed,
float zoom,
gboolean reflow);
- float (* zoom_get) (EphyEmbed *embed);
+ float (* get_zoom) (EphyEmbed *embed);
void (* find_set_properties) (EphyEmbed *embed,
- char *search_string,
+ const char *search_string,
gboolean case_sensitive,
gboolean wrap_around);
gboolean (* find_next) (EphyEmbed *embed,
@@ -277,15 +277,15 @@ void ephy_embed_get_security_level (EphyEmbed *embed,
char **description);
/* Zoom */
-void ephy_embed_zoom_set (EphyEmbed *embed,
+void ephy_embed_set_zoom (EphyEmbed *embed,
float zoom,
gboolean reflow);
-float ephy_embed_zoom_get (EphyEmbed *embed);
+float ephy_embed_get_zoom (EphyEmbed *embed);
/* Find */
void ephy_embed_find_set_properties (EphyEmbed *embed,
- char *search_string,
+ const char *search_string,
gboolean case_sensitive,
gboolean wrap_around);
diff --git a/embed/mozilla/EphyBrowser.cpp b/embed/mozilla/EphyBrowser.cpp
index c04183247..d09bfca5e 100644
--- a/embed/mozilla/EphyBrowser.cpp
+++ b/embed/mozilla/EphyBrowser.cpp
@@ -59,7 +59,6 @@
#include "nsIDOMEventTarget.h"
#include "nsIDOMNode.h"
#include "nsIDOMElement.h"
-#include "nsIDOMPopupBlockedEvent.h"
#include "nsIDocShellTreeItem.h"
#include "nsIDocShellTreeNode.h"
#include "nsIDocShellTreeOwner.h"
@@ -170,23 +169,9 @@ EphyFaviconEventListener::HandleEvent(nsIDOMEvent* aDOMEvent)
return NS_OK;
}
-NS_IMETHODIMP
-EphyPopupEventListener::HandleEvent(nsIDOMEvent* aDOMEvent)
-{
- nsCOMPtr<nsIDOMPopupBlockedEvent> popupEvent =
- do_QueryInterface(aDOMEvent);
- if (popupEvent)
- {
- g_signal_emit_by_name (mOwner, "ge_popup_blocked");
- }
-
- return NS_OK;
-}
-
EphyBrowser::EphyBrowser ()
{
mFaviconEventListener = nsnull;
- mPopupEventListener = nsnull;
mEventReceiver = nsnull;
mInitialized = PR_FALSE;
}
@@ -216,15 +201,9 @@ nsresult EphyBrowser::Init (GtkMozEmbed *mozembed)
mFaviconEventListener = new EphyFaviconEventListener();
if (!mFaviconEventListener) return NS_ERROR_OUT_OF_MEMORY;
- mPopupEventListener = new EphyPopupEventListener();
- if (!mPopupEventListener) return NS_ERROR_OUT_OF_MEMORY;
-
rv = mFaviconEventListener->Init (EPHY_EMBED (mozembed));
NS_ENSURE_SUCCESS (rv, NS_ERROR_FAILURE);
- rv = mPopupEventListener->Init (EPHY_EMBED (mozembed));
- NS_ENSURE_SUCCESS (rv, NS_ERROR_FAILURE);
-
rv = GetListener();
NS_ENSURE_SUCCESS (rv, NS_ERROR_FAILURE);
@@ -270,10 +249,6 @@ EphyBrowser::AttachListeners(void)
mFaviconEventListener, PR_FALSE);
NS_ENSURE_SUCCESS (rv, NS_ERROR_FAILURE);
- rv = target->AddEventListener(NS_LITERAL_STRING("DOMPopupBlocked"),
- mPopupEventListener, PR_FALSE);
- NS_ENSURE_SUCCESS (rv, NS_ERROR_FAILURE);
-
return NS_OK;
}
@@ -291,10 +266,6 @@ EphyBrowser::DetachListeners(void)
mFaviconEventListener, PR_FALSE);
NS_ENSURE_SUCCESS (rv, NS_ERROR_FAILURE);
- rv = target->RemoveEventListener(NS_LITERAL_STRING("DOMPopupBlocked"),
- mPopupEventListener, PR_FALSE);
- NS_ENSURE_SUCCESS (rv, NS_ERROR_FAILURE);
-
return NS_OK;
}
diff --git a/embed/mozilla/EphyBrowser.h b/embed/mozilla/EphyBrowser.h
index 0e4d7815d..6569cd502 100644
--- a/embed/mozilla/EphyBrowser.h
+++ b/embed/mozilla/EphyBrowser.h
@@ -67,12 +67,6 @@ private:
nsresult HandleFaviconLink (nsIDOMNode *node);
};
-class EphyPopupEventListener : public EphyEventListener
-{
-public:
- NS_IMETHOD HandleEvent(nsIDOMEvent* aEvent);
-};
-
class EphyBrowser
{
public:
@@ -129,7 +123,6 @@ private:
nsCOMPtr<nsIDOMEventReceiver> mEventReceiver;
nsCOMPtr<nsIDOMWindow> mDOMWindow;
EphyFaviconEventListener *mFaviconEventListener;
- EphyPopupEventListener *mPopupEventListener;
PRBool mInitialized;
nsresult GetListener (void);
diff --git a/embed/mozilla/mozilla-embed.cpp b/embed/mozilla/mozilla-embed.cpp
index 70a17bbb6..e02abad73 100644
--- a/embed/mozilla/mozilla-embed.cpp
+++ b/embed/mozilla/mozilla-embed.cpp
@@ -190,7 +190,7 @@ impl_activate (EphyEmbed *embed)
static void
impl_find_set_properties (EphyEmbed *embed,
- char *search_string,
+ const char *search_string,
gboolean case_sensitive,
gboolean wrap_around)
{
@@ -521,7 +521,7 @@ impl_reload (EphyEmbed *embed,
}
static void
-impl_zoom_set (EphyEmbed *embed,
+impl_set_zoom (EphyEmbed *embed,
float zoom,
gboolean reflow)
{
@@ -542,7 +542,7 @@ impl_zoom_set (EphyEmbed *embed,
}
static float
-impl_zoom_get (EphyEmbed *embed)
+impl_get_zoom (EphyEmbed *embed)
{
MozillaEmbedPrivate *mpriv = MOZILLA_EMBED(embed)->priv;
float f;
@@ -1089,8 +1089,8 @@ ephy_embed_iface_init (EphyEmbedIface *iface)
iface->get_link_message = impl_get_link_message;
iface->get_js_status = impl_get_js_status;
iface->reload = impl_reload;
- iface->zoom_set = impl_zoom_set;
- iface->zoom_get = impl_zoom_get;
+ iface->set_zoom = impl_set_zoom;
+ iface->get_zoom = impl_get_zoom;
iface->shistory_n_items = impl_shistory_n_items;
iface->shistory_get_nth = impl_shistory_get_nth;
iface->shistory_get_pos = impl_shistory_get_pos;
diff --git a/src/ephy-nautilus-view.c b/src/ephy-nautilus-view.c
index ef8b64a7d..db379cd6d 100644
--- a/src/ephy-nautilus-view.c
+++ b/src/ephy-nautilus-view.c
@@ -577,7 +577,7 @@ gnv_zoomable_set_zoom_level_cb (BonoboZoomable *zoomable,
EphyNautilusView *view)
{
g_return_if_fail (EPHY_IS_NAUTILUS_VIEW (view));
- ephy_embed_zoom_set (view->priv->embed,
+ ephy_embed_set_zoom (view->priv->embed,
ephy_zoom_get_nearest_zoom_level (level), TRUE);
}
@@ -589,10 +589,10 @@ gnv_zoomable_zoom_in_cb (BonoboZoomable *zoomable,
g_return_if_fail (EPHY_IS_NAUTILUS_VIEW (view));
- zoom = ephy_embed_zoom_get (view->priv->embed);
+ zoom = ephy_embed_get_zoom (view->priv->embed);
new_zoom = ephy_zoom_get_changed_zoom_level (zoom, 1);
- ephy_embed_zoom_set (view->priv->embed, new_zoom, TRUE);
+ ephy_embed_set_zoom (view->priv->embed, new_zoom, TRUE);
}
static void
@@ -603,10 +603,10 @@ gnv_zoomable_zoom_out_cb (BonoboZoomable *zoomable,
g_return_if_fail (EPHY_IS_NAUTILUS_VIEW (view));
- zoom = ephy_embed_zoom_get (view->priv->embed);
+ zoom = ephy_embed_get_zoom (view->priv->embed);
new_zoom = ephy_zoom_get_changed_zoom_level (zoom, -1);
- ephy_embed_zoom_set (view->priv->embed, new_zoom, TRUE);
+ ephy_embed_set_zoom (view->priv->embed, new_zoom, TRUE);
}
static void
@@ -621,7 +621,7 @@ gnv_zoomable_zoom_to_default_cb (BonoboZoomable *zoomable,
EphyNautilusView *view)
{
g_return_if_fail (EPHY_IS_NAUTILUS_VIEW (view));
- ephy_embed_zoom_set (view->priv->embed, 1.0, TRUE);
+ ephy_embed_set_zoom (view->priv->embed, 1.0, TRUE);
}
static void
diff --git a/src/ephy-tab.c b/src/ephy-tab.c
index 622033614..db364b9f1 100644
--- a/src/ephy-tab.c
+++ b/src/ephy-tab.c
@@ -696,11 +696,11 @@ ephy_tab_address_cb (EphyEmbed *embed, const char *address, EphyTab *tab)
g_value_unset (&value);
}
- current_zoom = ephy_embed_zoom_get (embed);
+ current_zoom = ephy_embed_get_zoom (embed);
if (zoom != current_zoom)
{
tab->priv->setting_zoom = TRUE;
- ephy_embed_zoom_set (embed, zoom, FALSE);
+ ephy_embed_set_zoom (embed, zoom, FALSE);
tab->priv->setting_zoom = FALSE;
}
}
@@ -734,7 +734,7 @@ ephy_tab_zoom_changed_cb (EphyEmbed *embed, float zoom, EphyTab *tab)
{
float zoom;
- zoom = ephy_embed_zoom_get (embed);
+ zoom = ephy_embed_get_zoom (embed);
g_value_init (&value, G_TYPE_FLOAT);
g_value_set_float (&value, zoom);
diff --git a/src/ephy-window.c b/src/ephy-window.c
index 9750f4037..d3069ba36 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -2550,7 +2550,7 @@ ephy_window_set_zoom (EphyWindow *window,
embed = ephy_window_get_active_embed (window);
g_return_if_fail (embed != NULL);
- current_zoom = ephy_embed_zoom_get (embed);
+ current_zoom = ephy_embed_get_zoom (embed);
if (zoom == ZOOM_IN)
{
@@ -2563,7 +2563,7 @@ ephy_window_set_zoom (EphyWindow *window,
if (zoom != current_zoom)
{
- ephy_embed_zoom_set (embed, zoom, TRUE);
+ ephy_embed_set_zoom (embed, zoom, TRUE);
}
}