![]() |
![]() |
![]() |
Epiphany Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Properties | Signals |
EphyWebView; enum EphyWebViewChrome; EphyWebViewClass; enum EphyWebViewDocumentType; enum EphyWebViewNavigationFlags; enum EphyWebViewNetState; EphyWebViewPrivate; enum EphyWebViewSecurityLevel; gboolean ephy_web_view_can_go_up (EphyWebView *view
); 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
); GSList * ephy_web_view_get_go_up_list (EphyWebView *view
); GdkPixbuf * ephy_web_view_get_icon (EphyWebView *view
); gboolean ephy_web_view_get_is_blank (EphyWebView *view
); char * ephy_web_view_get_js_status (EphyWebView *view
); const char * ephy_web_view_get_link_message (EphyWebView *view
); const char * ephy_web_view_get_loading_title (EphyWebView *view
); char * ephy_web_view_get_location (EphyWebView *view
,gboolean toplevel
); EphyWebViewNavigationFlags ephy_web_view_get_navigation_flags (EphyWebView *view
); void ephy_web_view_get_security_level (EphyWebView *view
,EphyWebViewSecurityLevel *level
,char **description
); 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
); void ephy_web_view_go_up (EphyWebView *view
); gboolean ephy_web_view_has_modified_forms (EphyWebView *view
); gboolean ephy_web_view_is_loading (EphyWebView *view
); void ephy_web_view_load_request (EphyWebView *view
,WebKitNetworkRequest *request
); void ephy_web_view_load_url (EphyWebView *view
,const char *url
); void ephy_web_view_location_changed (EphyWebView *view
,const char *location
); 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_address (EphyWebView *view
,const char *address
); void ephy_web_view_set_link_message (EphyWebView *view
,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_title (EphyWebView *view
,const char *view_title
); void ephy_web_view_set_typed_address (EphyWebView *view
,const char *address
); void ephy_web_view_set_visibility (EphyWebView *view
,gboolean visibility
); void ephy_web_view_show_page_certificate (EphyWebView *view
); void ephy_web_view_update_from_net_state (EphyWebView *view
,const char *uri
,EphyWebViewNetState state
);
GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkContainer +----WebKitWebView +----EphyWebView
"address" gchar* : Read "document-type" EphyWebViewDocumentType : Read "embed-title" gchar* : Read "hidden-popup-count" gint : Read "icon" GdkPixbuf* : 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
"close-request" : Run Last "content-blocked" : Run Last "ge-dom-mouse-click" : Run Last "ge-dom-mouse-down" : 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 "new-document-now" : Run First "new-window" : Run First "search-key-press" : Run Last
typedef enum { EPHY_WEB_VIEW_CHROME_MENUBAR = 1 << 0, EPHY_WEB_VIEW_CHROME_TOOLBAR = 1 << 1, EPHY_WEB_VIEW_CHROME_STATUSBAR = 1 << 2, EPHY_WEB_VIEW_CHROME_BOOKMARKSBAR = 1 << 3 } EphyWebViewChrome;
typedef struct { 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); gboolean (* dom_mouse_click) (EphyWebView *view, EphyEmbedEvent *event); gboolean (* dom_mouse_down) (EphyWebView *view, EphyEmbedEvent *event); 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); gboolean (* close_request) (EphyWebView *view); void (* new_document_now) (EphyWebView *view, const char *uri); } EphyWebViewClass;
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_UP = 1 << 0, EPHY_WEB_VIEW_NAV_BACK = 1 << 1, EPHY_WEB_VIEW_NAV_FORWARD = 1 << 2 } EphyWebViewNavigationFlags;
typedef enum { EPHY_WEB_VIEW_STATE_UNKNOWN = 0, EPHY_WEB_VIEW_STATE_START = 1 << 0, EPHY_WEB_VIEW_STATE_REDIRECTING = 1 << 1, EPHY_WEB_VIEW_STATE_TRANSFERRING = 1 << 2, EPHY_WEB_VIEW_STATE_NEGOTIATING = 1 << 3, EPHY_WEB_VIEW_STATE_STOP = 1 << 4, EPHY_WEB_VIEW_STATE_IS_REQUEST = 1 << 5, EPHY_WEB_VIEW_STATE_IS_DOCUMENT = 1 << 6, EPHY_WEB_VIEW_STATE_IS_NETWORK = 1 << 7, EPHY_WEB_VIEW_STATE_IS_WINDOW = 1 << 8, EPHY_WEB_VIEW_STATE_RESTORING = 1 << 9 } EphyWebViewNetState;
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;
gboolean ephy_web_view_can_go_up (EphyWebView *view
);
Returns whether view
can travel to a higher-level directory on the server.
For example, for http://www.example.com/subdir/foo.html, returns TRUE
; for
http://www.example.com/, returns FALSE
.
|
an EphyWebView |
Returns : |
TRUE if view can browse to a higher-level directory
|
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 |
GSList * ephy_web_view_get_go_up_list
(EphyWebView *view
);
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/".
|
an EphyWebView |
Returns : |
a list of URLs higher up in view 's web page's directory
hierarchy
|
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"
|
char * ephy_web_view_get_js_status (EphyWebView *view
);
Displays the message JavaScript is attempting to display in the statusbar.
Note that Epiphany does not display JavaScript statusbar messages.
|
an EphyWebView |
Returns : |
a message from JavaScript meant to be displayed in the statusbar |
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
|
char * ephy_web_view_get_location (EphyWebView *view
,gboolean toplevel
);
Returns the URL of the web page displayed in view
.
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.
|
an EphyWebView |
|
FALSE to return the location of the focused frame only
|
Returns : |
the URL of the web page displayed in view
|
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
,char **description
);
Fetches the EphyWebViewSecurityLevel and a string description of the
security state of view
. The description will be a newly-allocated
string or NULL
.
|
an EphyWebView |
|
return value of security level. [out] |
|
return value of the description of the security level. [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 view
's EphyWindow will display in its location toolbar
entry when view
is selected.
This is not guaranteed to be the same as view
's location,
available through ephy_web_view_get_location()
. As the user types a new address
into the location entry, ephy_web_view_get_location()
's returned string will
change.
|
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
|
void ephy_web_view_go_up (EphyWebView *view
);
Moves view
one level up in its web page's directory hierarchy.
|
an EphyWebView |
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
|
void ephy_web_view_load_request (EphyWebView *view
,WebKitNetworkRequest *request
);
Loads the given WebKitNetworkRequest in the given EphyWebView.
|
the EphyWebView in which to load the request |
|
the WebKitNetworkRequest to be loaded |
void ephy_web_view_load_url (EphyWebView *view
,const char *url
);
Loads url
in view
.
|
an EphyWebView |
|
a URL |
void ephy_web_view_location_changed (EphyWebView *view
,const char *location
);
Sets location
as the new address for view
while preventing notify events
in view
.
|
an EphyWebView |
|
new location for view
|
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_address (EphyWebView *view
,const char *address
);
Sets view
location to be address
. Note that this function might also set
the typed-address property to NULL
.
|
an EphyWebView |
|
address to set view to
|
void ephy_web_view_set_link_message (EphyWebView *view
,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_title (EphyWebView *view
,const char *view_title
);
Sets view
title to view_title
.
|
an EphyWebView |
|
new title 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
|
void ephy_web_view_show_page_certificate (EphyWebView *view
);
Shows a dialogue displaying the certificate of the currently loaded page
of view
, if it was loaded over a secure connection; else does nothing.
|
an EphyWebView |
void ephy_web_view_update_from_net_state (EphyWebView *view
,const char *uri
,EphyWebViewNetState state
);
Update view
at uri
with info from state
.
|
an EphyWebView |
|
the uri associated with view
|
|
an EphyWebViewNetState |
"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
"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: ""
"close-request"
signalgboolean user_function (EphyWebView *view, gpointer user_data) : Run Last
The ::close signal is emitted when the embed requests closing.
Return TRUE
to prevent closing. You HAVE to process removal of the embed
as soon as possible after that.
|
the EphyWebView that received the signal |
|
user data set when the signal handler was connected. |
"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-dom-mouse-click"
signalgboolean user_function (EphyWebView *view, GObject *event, gpointer user_data) : Run Last
The ::ge_dom_mouse_click signal is emitted when the user clicks in the view
.
|
the EphyWebView that received the signal |
|
the EphyEmbedEvent which triggered this signal |
|
user data set when the signal handler was connected. |
"ge-dom-mouse-down"
signalgboolean user_function (EphyWebView *view, GObject *event, gpointer user_data) : Run Last
The ::ge_dom_mouse_down signal is emitted when the user depresses a mouse button.
|
the EphyWebView that received the signal |
|
the EphyEmbedEvent which triggered this signal |
|
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. |
"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. |