| Epiphany Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | Object Hierarchy | Implemented Interfaces | Properties | Signals | ||||
struct EphyWebView; enum EphyWebViewChrome; struct EphyWebViewClass; enum EphyWebViewDocumentType; enum EphyWebViewNavigationFlags; EphyWebViewPrivate; enum EphyWebViewSecurityLevel; void ephy_web_view_copy_back_history (EphyWebView *source,EphyWebView *dest); const char * ephy_web_view_get_address (EphyWebView *view); EphyWebViewDocumentType ephy_web_view_get_document_type (EphyWebView *view); GdkPixbuf * ephy_web_view_get_icon (EphyWebView *view); gboolean ephy_web_view_get_is_blank (EphyWebView *view); const char * ephy_web_view_get_link_message (EphyWebView *view); const char * ephy_web_view_get_loading_title (EphyWebView *view); EphyWebViewNavigationFlags ephy_web_view_get_navigation_flags (EphyWebView *view); void ephy_web_view_get_security_level (EphyWebView *view,EphyWebViewSecurityLevel *level,GTlsCertificate **certificate,GTlsCertificateFlags *errors); const char * ephy_web_view_get_status_message (EphyWebView *view); const char * ephy_web_view_get_title (EphyWebView *view); const char * ephy_web_view_get_title_composite (EphyWebView *view); const char * ephy_web_view_get_typed_address (EphyWebView *view); gboolean ephy_web_view_get_visibility (EphyWebView *view); gboolean ephy_web_view_has_modified_forms (EphyWebView *view); gboolean ephy_web_view_is_loading (EphyWebView *view); gboolean ephy_web_view_load_failed (EphyWebView *view); void ephy_web_view_load_request (EphyWebView *view); void ephy_web_view_load_url (EphyWebView *view,const char *url); GtkWidget * ephy_web_view_new (void); void ephy_web_view_popups_manager_reset (EphyWebView *view); void ephy_web_view_save (EphyWebView *view,const char *uri); void ephy_web_view_set_link_message (EphyWebView *view,const char *link_message); void ephy_web_view_set_loading_title (EphyWebView *view,const char *title,gboolean is_address); void ephy_web_view_set_security_level (EphyWebView *view,EphyWebViewSecurityLevel level); void ephy_web_view_set_typed_address (EphyWebView *view,const char *address); void ephy_web_view_set_visibility (EphyWebView *view,gboolean visibility);
GObject
+----GInitiallyUnowned
+----GtkWidget
+----GtkContainer
+----WebKitWebView
+----EphyWebView
"address" gchar* : Read "document-type" EphyWebViewDocumentType : Read "embed-title" gchar* : Read "hidden-popup-count" gint : Read "icon" GdkPixbuf* : Read "is-blank" gboolean : Read "link-message" gchar* : Read "navigation" EphyWebViewNavigationFlags : Read "popups-allowed" gboolean : Read / Write "security-level" EphyWebViewSecurityLevel : Read "status-message" gchar* : Read "typed-address" gchar* : Read / Write "visibility" gboolean : Read
"content-blocked" :Run Last"ge-feed-link" :Run First"ge-modal-alert" :Run Last"ge-modal-alert-closed" :Run Last"ge-popup-blocked" :Run First"ge-search-link" :Run First"loading-homepage" :Run First"new-document-now" :Run First"new-window" :Run First"search-key-press" :Run Last
typedef enum {
EPHY_WEB_VIEW_CHROME_TOOLBAR = 1 << 0,
EPHY_WEB_VIEW_CHROME_DOWNLOADS_BOX = 1 << 1
} EphyWebViewChrome;
struct EphyWebViewClass {
WebKitWebViewClass parent_class;
/* Signals */
void (* feed_link) (EphyWebView *view,
const char *type,
const char *title,
const char *address);
void (* search_link) (EphyWebView *view,
const char *type,
const char *title,
const char *address);
void (* popup_blocked) (EphyWebView *view,
const char *address,
const char *target,
const char *features);
void (* content_blocked) (EphyWebView *view,
const char *uri);
gboolean (* modal_alert) (EphyWebView *view);
void (* modal_alert_closed) (EphyWebView *view);
void (* new_window) (EphyWebView *view,
EphyWebView *new_view);
gboolean (* search_key_press) (EphyWebView *view,
GdkEventKey *event);
void (* new_document_now) (EphyWebView *view,
const char *uri);
void (* loading_homepage) (EphyWebView *view);
};
typedef enum {
EPHY_WEB_VIEW_DOCUMENT_HTML,
EPHY_WEB_VIEW_DOCUMENT_XML,
EPHY_WEB_VIEW_DOCUMENT_IMAGE,
EPHY_WEB_VIEW_DOCUMENT_OTHER
} EphyWebViewDocumentType;
typedef enum {
EPHY_WEB_VIEW_NAV_BACK = 1 << 0,
EPHY_WEB_VIEW_NAV_FORWARD = 1 << 1
} EphyWebViewNavigationFlags;
typedef enum {
EPHY_WEB_VIEW_STATE_IS_UNKNOWN,
EPHY_WEB_VIEW_STATE_IS_INSECURE,
EPHY_WEB_VIEW_STATE_IS_BROKEN,
EPHY_WEB_VIEW_STATE_IS_SECURE_LOW,
EPHY_WEB_VIEW_STATE_IS_SECURE_MED,
EPHY_WEB_VIEW_STATE_IS_SECURE_HIGH
} EphyWebViewSecurityLevel;
void ephy_web_view_copy_back_history (EphyWebView *source,EphyWebView *dest);
Sets the back history (up to the current item) of source as the
back history of dest.
Useful to keep the history when opening links in new tabs or windows.
|
the EphyWebView from which to get the back history |
|
the EphyWebView to copy the history to |
const char * ephy_web_view_get_address (EphyWebView *view);
Returns the address of the currently loaded page.
|
an EphyWebView |
Returns : |
view's address. Will never be NULL. |
EphyWebViewDocumentType ephy_web_view_get_document_type (EphyWebView *view);
Returns the type of document loaded in the view
|
an EphyWebView |
Returns : |
the EphyWebViewDocumentType |
GdkPixbuf * ephy_web_view_get_icon (EphyWebView *view);
Returns the view's site icon as a GdkPixbuf,
or NULL if it is not available.
|
an EphyWebView |
Returns : |
a the view's site icon. [transfer none] |
gboolean ephy_web_view_get_is_blank (EphyWebView *view);
Returns whether the view's address is "blank".
|
an EphyWebView |
Returns : |
TRUE if the view's address is "blank" |
const char * ephy_web_view_get_link_message (EphyWebView *view);
When the user is hovering the mouse over a hyperlink, returns the URL of the hyperlink.
|
an EphyWebView |
Returns : |
the URL of the link over which the mouse is hovering |
const char * ephy_web_view_get_loading_title (EphyWebView *view);
Returns the loading title for view.
|
an EphyWebView |
Returns : |
the provisional title of view while loading |
EphyWebViewNavigationFlags ephy_web_view_get_navigation_flags
(EphyWebView *view);
Returns view's navigation flags.
|
an EphyWebView |
Returns : |
view's navigation flags |
void ephy_web_view_get_security_level (EphyWebView *view,EphyWebViewSecurityLevel *level,GTlsCertificate **certificate,GTlsCertificateFlags *errors);
Fetches the EphyWebViewSecurityLevel and a GTlsCertificate associated
with view and a GTlsCertificateFlags showing what problems, if any,
have been found with that certificate.
|
an EphyWebView |
|
return value of security level. [out] |
|
return value of TLS certificate. [out][transfer none] |
|
return value of TLS errors. [out] |
const char * ephy_web_view_get_status_message (EphyWebView *view);
Returns the message displayed in view's EphyWindow's
EphyStatusbar. If the user is hovering the mouse over a hyperlink,
this function will return the same value as
ephy_web_view_get_link_message(). Otherwise, it will return a network
status message, or NULL.
The message returned has a limited lifetime, and so should be copied with
g_strdup() if it must be stored.
|
an EphyWebView |
Returns : |
The current statusbar message |
const char * ephy_web_view_get_title (EphyWebView *view);
|
an EphyWebView |
Returns : |
the title of the web page displayed in view
|
const char * ephy_web_view_get_title_composite (EphyWebView *view);
Returns the title of the web page loaded in view.
This differs from ephy_web_view_get_title in that this function will return a special title while the page is still loading.
|
an EphyView |
Returns : |
view's web page's title. Will never be NULL. |
const char * ephy_web_view_get_typed_address (EphyWebView *view);
Returns the text that the user introduced in the view's
EphyWindow location entry, if any.
This is not guaranteed to be the same as view's location,
available through ephy_web_view_get_address(). As the user types a
new address into the location entry,
ephy_web_view_get_typed_address()'s returned string will
change. When the load starts, ephy_web_view_get_typed_address()
will return NULL, and ephy_web_view_get_address() will return the
new page being loaded. Note that the typed_address can be changed
again while a load is in progress (in case the user starts to type
again in the location entry); in that case
ephy_web_view_get_typed_address() will be again non-NULL, and the
contents of the entry will not be overwritten.
|
an EphyWebView |
Returns : |
view's EphyWindow's location entry text when view
is selected. |
gboolean ephy_web_view_get_visibility (EphyWebView *view);
Returns whether the view's toplevel is visible or not. Used
mostly for popup visibility management.
|
an EphyWebView |
Returns : |
TRUE if view's "visibility" property is set |
gboolean ephy_web_view_has_modified_forms (EphyWebView *view);
Returns TRUE if the user has modified <input> or <textarea>
values in view's loaded document.
|
an EphyWebView |
Returns : |
TRUE if view has user-modified forms |
gboolean ephy_web_view_is_loading (EphyWebView *view);
Returns whether the web page in view has finished loading. A web
page is only finished loading after all images, styles, and other
dependencies have been downloaded and rendered, or when the load
has failed for some reason.
|
an EphyWebView |
Returns : |
TRUE if the page is still loading, FALSE if complete |
gboolean ephy_web_view_load_failed (EphyWebView *view);
Returns whether the web page in view has failed to load.
|
an EphyWebView |
Returns : |
TRUE if the page failed to load, FALSE if it's loading
or load finished successfully |
void ephy_web_view_load_request (EphyWebView *view);
Loads the given WebKitNetworkRequest in the given EphyWebView.
|
the EphyWebView in which to load the request |
void ephy_web_view_load_url (EphyWebView *view,const char *url);
Loads url in view.
|
an EphyWebView |
|
a URL |
GtkWidget * ephy_web_view_new (void);
Equivalent to g_object_new() but returns an GtkWidget so you don't have
to cast it when dealing with most code.
Returns : |
the newly created EphyWebView widget |
void ephy_web_view_popups_manager_reset (EphyWebView *view);
Resets the state of the popups manager in view.
|
an EphyWebView |
void ephy_web_view_save (EphyWebView *view,const char *uri);
Saves the currently loaded page of view to uri.
|
an EphyWebView |
|
location to store the saved page |
void ephy_web_view_set_link_message (EphyWebView *view,const char *link_message);
Sets the value of link-message property which tells the URL of the hovered link.
|
an EphyWebView |
|
new value for link-message in view
|
void ephy_web_view_set_loading_title (EphyWebView *view,const char *title,gboolean is_address);
Update view's loading title to title, if is_address is TRUE it will
retrieve the title of the page at title.
|
an EphyWebView |
|
new loading title for view
|
|
TRUE if title is an address |
void ephy_web_view_set_security_level (EphyWebView *view,EphyWebViewSecurityLevel level);
Sets view's security-level property to level.
|
an EphyWebView |
|
the new EphyWebViewSecurityLevel for view
|
void ephy_web_view_set_typed_address (EphyWebView *view,const char *address);
Sets the text that view's EphyWindow will display in its location toolbar
entry when view is selected.
|
an EphyWebView |
|
the new typed address, or NULL to clear it |
void ephy_web_view_set_visibility (EphyWebView *view,gboolean visibility);
Sets whether the view's toplevel is visible or not. See
ephy_web_view_get_visibility().
|
an EphyWebView |
|
value for the visibility property of view
|
"document-type" property"document-type" EphyWebViewDocumentType : Read
Document type determined for the view.
Default value: EPHY_WEB_VIEW_DOCUMENT_HTML
"embed-title" property "embed-title" gchar* : Read
Title for this embed.
Default value: "Blank page"
"hidden-popup-count" property "hidden-popup-count" gint : Read
Number of hidden (blocked) popup windows.
Allowed values: >= 0
Default value: 0
"is-blank" property "is-blank" gboolean : Read
Whether the view is showing the blank address.
Default value: FALSE
"navigation" property"navigation" EphyWebViewNavigationFlags : Read
View's navigation flags as EphyWebViewNavigationFlags.
"popups-allowed" property "popups-allowed" gboolean : Read / Write
If popup windows from this view are to be displayed.
Default value: FALSE
"security-level" property"security-level" EphyWebViewSecurityLevel : Read
One of EphyWebViewSecurityLevel, determining view's current security level.
Default value: EPHY_WEB_VIEW_STATE_IS_UNKNOWN
"status-message" property "status-message" gchar* : Read
Statusbar message corresponding to this view.
Default value: NULL
"typed-address" property "typed-address" gchar* : Read / Write
User typed address for the current view.
Default value: ""
"content-blocked" signalvoid user_function (EphyWebView *view,
gchar *uri,
gpointer user_data) : Run Last
The ::content-blocked signal is emitted when an url has been blocked.
|
the EphyWebView that received the signal |
|
blocked URI |
|
user data set when the signal handler was connected. |
"ge-feed-link" signalvoid user_function (EphyWebView *view,
gchar *type,
gchar *title,
gchar *address,
gpointer user_data) : Run First
The ::ge_rss signal is emitted when embed discovers that a news feed
is available for the site it is visiting.
|
the EphyWebView that received the signal |
|
the mime-type of the news feed |
|
the title of the news feed |
|
the URL to embed's web site's news feed |
|
user data set when the signal handler was connected. |
"ge-modal-alert" signalgboolean user_function (EphyWebView *view,
gpointer user_data) : Run Last
The ::ge-modal-alert signal is emitted when a DOM event will open a modal alert.
Return TRUE to prevent the dialog from being opened.
|
the EphyWebView that received the signal |
|
user data set when the signal handler was connected. |
"ge-modal-alert-closed" signalvoid user_function (EphyWebView *view,
gpointer user_data) : Run Last
The ::ge-modal-alert-closed signal is emitted when a modal alert put up by a DOM event was closed.
|
the EphyWebView that received the signal |
|
user data set when the signal handler was connected. |
"ge-popup-blocked" signalvoid user_function (EphyWebView *view,
gchar *address,
gchar *target,
gchar *features,
gpointer user_data) : Run First
The ::ge_popup_blocked signal is emitted when the viewed web page requests
a popup window (with javascript:open()) but popup windows are not allowed.
|
the EphyWebView that received the signal |
|
The requested URL |
|
The requested window name, e.g. "_blank" |
|
The requested features: for example, "height=400,width=200" |
|
user data set when the signal handler was connected. |
"ge-search-link" signalvoid user_function (EphyWebView *view,
gchar *type,
gchar *title,
gchar *address,
gpointer user_data) : Run First
The ::ge_rss signal is emitted when embed discovers that a search
description is available for the site it is visiting.
|
the EphyWebView that received the signal |
|
the mime-type of the search description |
|
the title of the news feed |
|
the URL to embed's web site's search description |
|
user data set when the signal handler was connected. |
"loading-homepage" signalvoid user_function (EphyWebView *view,
gpointer user_data) : Run First
The ::loading-homepage signal is emitted when the view is about to
load the homepage set by the user.
|
the EphyWebView that received the signal |
|
user data set when the signal handler was connected. |
"new-document-now" signalvoid user_function (EphyWebView *view,
gchar *uri,
gpointer user_data) : Run First
The ::new-document-now signal is emitted when a new page content is being loaded into the browser. It's a good place to do view related changes, for example to restore the zoom level of a page or to set an user style sheet.
|
the EphyWebView that received the signal |
|
URI of the new content |
|
user data set when the signal handler was connected. |
"new-window" signalvoid user_function (EphyWebView *view,
GtkWidget *new_view,
gpointer user_data) : Run First
The ::new-window signal is emitted after a new window has been opened by the view. For example, when a JavaScript popup window is opened.
|
the EphyWebView that received the signal |
|
the newly opened EphyWebView |
|
user data set when the signal handler was connected. |
"search-key-press" signalgboolean user_function (EphyWebView *view,
GdkEvent *event,
gpointer user_data) : Run Last
The ::search-key-press signal is emitted for keypresses which should be used for find implementations.
|
the EphyWebView that received the signal |
|
the GdkEventKey which triggered this signal |
|
user data set when the signal handler was connected. |