WebKitWebPage

WebKitWebPage

Synopsis

                    AtkObject;
                    ClutterActor;
                    WebKitWebPage;
enum                WebKitWebPagePageMode;
GType               webkit_web_page_get_type            (void);
WebKitWebPage *     webkit_web_page_new                 (WebKitIWebView *web_page);
WebKitIWebView *    webkit_web_page_get_view            (WebKitWebPage *Param1);
WebKitWebFrame *    webkit_web_page_get_main_frame      (WebKitWebPage *web_page);
void                webkit_web_page_get_viewport_size   (WebKitWebPage *webPage,
                                                         int *width,
                                                         int *height);
void                webkit_web_page_set_viewport_size   (WebKitWebPage *webPage,
                                                         const int width,
                                                         const int height);
void                webkit_web_page_reload              (WebKitWebPage *web_page);
void                webkit_web_page_reload_bypass_cache (WebKitWebPage *web_page);
void                webkit_web_page_load_uri            (WebKitWebPage *web_page,
                                                         const gchar *uri);
void                webkit_web_page_load_string         (WebKitWebPage *webPage,
                                                         const gchar *content,
                                                         const gchar *mimeType,
                                                         const gchar *encoding,
                                                         const gchar *baseUri);
void                webkit_web_page_load_request        (WebKitWebPage *web_page,
                                                         WebKitNetworkRequest *request);
gboolean            webkit_web_page_search_text         (WebKitWebPage *web_page,
                                                         const gchar *text,
                                                         gboolean case_sensitive,
                                                         gboolean forward,
                                                         gboolean wrap);
guint               webkit_web_page_mark_text_matches   (WebKitWebPage *web_page,
                                                         const gchar *string,
                                                         gboolean case_sensitive,
                                                         guint limit);
void                webkit_web_page_set_highlight_text_matches
                                                        (WebKitWebPage *web_page,
                                                         gboolean highlight);
void                webkit_web_page_unmark_text_matches (WebKitWebPage *web_page);
void                webkit_web_page_set_settings        (WebKitWebPage *web_page,
                                                         WebKitWebSettings *settings);
WebKitWebSettings * webkit_web_page_get_settings        (WebKitWebPage *web_page);
WebKitWebInspector * webkit_web_page_get_inspector      (WebKitWebPage *web_page);
WebKitLoadStatus    webkit_web_page_get_load_status     (WebKitWebPage *web_page);
gdouble             webkit_web_page_get_progress        (WebKitWebPage *web_page);
gboolean            webkit_web_page_can_go_back         (WebKitWebPage *web_page);
gboolean            webkit_web_page_can_go_back_or_forward
                                                        (WebKitWebPage *web_page,
                                                         gint steps);
gboolean            webkit_web_page_can_go_forward      (WebKitWebPage *web_page);
void                webkit_web_page_go_back             (WebKitWebPage *web_page);
void                webkit_web_page_go_back_or_forward  (WebKitWebPage *web_page,
                                                         gint steps);
void                webkit_web_page_go_forward          (WebKitWebPage *web_page);
void                webkit_web_page_set_maintains_back_forward_list
                                                        (WebKitWebPage *web_page,
                                                         gboolean flag);
WebKitWebBackForwardList * webkit_web_page_get_back_forward_list
                                                        (WebKitWebPage *web_page);
gboolean            webkit_web_page_go_to_back_forward_item
                                                        (WebKitWebPage *web_page,
                                                         WebKitWebHistoryItem *item);
AtkObject *         webkit_web_page_get_accessible      (WebKitWebPage *page);
void                webkit_web_page_stop_loading        (WebKitWebPage *web_page);
const gchar *       webkit_web_page_get_title           (WebKitWebPage *web_page);
const char *        webkit_web_page_get_uri             (WebKitWebPage *web_page);
WebKitWebWindowFeatures * webkit_web_page_get_window_features
                                                        (WebKitWebPage *webPage);
WebKitDOMDocument * webkit_web_page_get_dom_document    (WebKitWebPage *webPage);
WebKitHitTestResult * webkit_web_page_hit_test          (WebKitWebPage *webPage,
                                                         int x,
                                                         int y);
WebKitHitTestResult * webkit_web_page_hit_test_rectangle
                                                        (WebKitWebPage *webPage,
                                                         int x,
                                                         int y,
                                                         guint topPadding,
                                                         guint bottomPadding,
                                                         guint leftPadding,
                                                         guint rightPadding);
gboolean            webkit_web_page_get_full_content_zoom
                                                        (WebKitWebPage *web_page);
void                webkit_web_page_set_full_content_zoom
                                                        (WebKitWebPage *web_page,
                                                         gboolean full_content_zoom);
gfloat              webkit_web_page_get_zoom_level      (WebKitWebPage *web_page);
void                webkit_web_page_set_zoom_level      (WebKitWebPage *web_page,
                                                         gfloat zoom_level);
void                webkit_web_page_zoom_in             (WebKitWebPage *web_page);
void                webkit_web_page_zoom_out            (WebKitWebPage *web_page);
WebKitWebFrame *    webkit_web_page_get_focused_frame   (WebKitWebPage *webPage);
void                webkit_web_page_execute_script      (WebKitWebPage *webPage,
                                                         const gchar *script);
const gchar *       webkit_web_page_get_icon_uri        (WebKitWebPage *web_page);
gboolean            webkit_web_page_get_editable        (WebKitWebPage *web_page);
void                webkit_web_page_set_editable        (WebKitWebPage *web_page,
                                                         gboolean flag);
gboolean            webkit_web_page_can_show_mime_type  (WebKitWebPage *web_page,
                                                         const gchar *mime_type);
const gchar *       webkit_web_page_get_encoding        (WebKitWebPage *webPage);
void                webkit_web_page_set_custom_encoding (WebKitWebPage *webPage,
                                                         const gchar *encoding);
const char *        webkit_web_page_get_custom_encoding (WebKitWebPage *webPage);
void                webkit_web_page_set_page_mode       (WebKitWebPage *web_page,
                                                         WebKitWebPagePageMode mode);
WebKitWebPagePageMode webkit_web_page_get_page_mode     (WebKitWebPage *web_page);
void                webkit_web_page_load_image          (WebKitWebPage *webPage,
                                                         const gchar *url);
gboolean            webkit_web_page_get_use_fixed_layout
                                                        (WebKitWebPage *webPage);
void                webkit_web_page_set_use_fixed_layout
                                                        (WebKitWebPage *webPage,
                                                         gboolean used);
guint               webkit_web_page_get_fixed_layout_width
                                                        (WebKitWebPage *webPage);
void                webkit_web_page_set_fixed_layout_width
                                                        (WebKitWebPage *webPage,
                                                         guint width);
guint               webkit_web_page_get_fixed_layout_height
                                                        (WebKitWebPage *webPage);
void                webkit_web_page_set_fixed_layout_height
                                                        (WebKitWebPage *webPage,
                                                         guint height);
WebKitDOMElement *  (*ChooseElementToZoomCallback)      (GSList *candidates,
                                                         void *userData);
bool                webkit_web_page_get_zoom_target     (WebKitWebPage *webPage,
                                                         float x,
                                                         float y,
                                                         int *zoomCenterX,
                                                         int *zoomCenterY,
                                                         double *zoomFactor,
                                                         ChooseElementToZoomCallback callback,
                                                         void *userData);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----ClutterActor
               +----MxWidget
               +----ClutterTexture
  GObject
   +----WebKitWebPage

Implemented Interfaces

ClutterActor implements ClutterContainer, ClutterScriptable, ClutterAnimatable and AtkImplementorIface.

Properties

  "fixed-layout-height"      guint                 : Read / Write
  "fixed-layout-width"       guint                 : Read / Write
  "icon-uri"                 gchar*                : Read
  "load-status"              WebKitLoadStatus      : Read
  "progress"                 gdouble               : Read
  "settings"                 WebKitWebSettings*    : Read / Write
  "title"                    gchar*                : Read
  "uri"                      gchar*                : Read
  "use-fixed-layout"         gboolean              : Read / Write
  "web-inspector"            WebKitWebInspector*   : Read
  "web-view"                 WebKitIWebView*       : Read / Write / Construct Only
  "window-features"          WebKitWebWindowFeatures*  : Read / Write
  "zoom-level"               gfloat                : Read / Write

Signals

  "console-message"                                : Run Last
  "create-window"                                  : Run Last
  "database-quota-exceeded"                        : Action
  "document-load-finished"                         : Action
  "download-requested"                             : Run Last
  "frame-created"                                  : Action
  "geolocation-policy-decision-cancelled"          : Run Last
  "geolocation-policy-decision-requested"          : Run Last
  "hovering-over-link"                             : Run Last
  "icon-loaded"                                    : Run Last
  "input-method-state-set"                         : Run Last
  "inspection-requested"                           : Run Last
  "microfocus-changed"                             : Run Last
  "mime-type-policy-decision-requested"            : Run Last
  "navigation-policy-decision-requested"           : Run Last
  "new-window-policy-decision-requested"           : Run Last
  "onload-event"                                   : Run Last
  "resource-request-starting"                      : Action
  "script-alert"                                   : Run Last
  "script-confirm"                                 : Run Last
  "script-prompt"                                  : Run Last
  "should-interrupt-script"                        : Run Last
  "status-bar-text-changed"                        : Run Last
  "title-changed"                                  : Run Last
  "web-load-error"                                 : Run Last
  "web-load-finished"                              : Run Last
  "web-load-started"                               : Run Last
  "web-page-ready"                                 : Run Last
  "window-object-cleared"                          : Run Last

Description

Details

AtkObject

typedef struct _AtkObject AtkObject;


ClutterActor

typedef struct _ClutterActor ClutterActor;


WebKitWebPage

typedef struct _WebKitWebPage WebKitWebPage;


enum WebKitWebPagePageMode

typedef enum {
    WEBKIT_WEB_PAGE_PAGE_MODE_WINDOWED,
    WEBKIT_WEB_PAGE_PAGE_MODE_FLOATING,
    WEBKIT_WEB_PAGE_PAGE_MODE_FULLSCREEN,
    WEBKIT_WEB_PAGE_PAGE_MODE_MAXIMIZED,
    WEBKIT_WEB_PAGE_PAGE_MODE_MINIMIZED
} WebKitWebPagePageMode;

Update dscription.

WEBKIT_WEB_PAGE_PAGE_MODE_WINDOWED

description

WEBKIT_WEB_PAGE_PAGE_MODE_FLOATING

description

WEBKIT_WEB_PAGE_PAGE_MODE_FULLSCREEN

description

WEBKIT_WEB_PAGE_PAGE_MODE_MAXIMIZED

description

WEBKIT_WEB_PAGE_PAGE_MODE_MINIMIZED

description

webkit_web_page_get_type ()

GType               webkit_web_page_get_type            (void);


webkit_web_page_new ()

WebKitWebPage *     webkit_web_page_new                 (WebKitIWebView *web_page);


webkit_web_page_get_view ()

WebKitIWebView *    webkit_web_page_get_view            (WebKitWebPage *Param1);


webkit_web_page_get_main_frame ()

WebKitWebFrame *    webkit_web_page_get_main_frame      (WebKitWebPage *web_page);


webkit_web_page_get_viewport_size ()

void                webkit_web_page_get_viewport_size   (WebKitWebPage *webPage,
                                                         int *width,
                                                         int *height);


webkit_web_page_set_viewport_size ()

void                webkit_web_page_set_viewport_size   (WebKitWebPage *webPage,
                                                         const int width,
                                                         const int height);


webkit_web_page_reload ()

void                webkit_web_page_reload              (WebKitWebPage *web_page);

Reloads the web_page.

web_page :

a WebKitWebPage

webkit_web_page_reload_bypass_cache ()

void                webkit_web_page_reload_bypass_cache (WebKitWebPage *web_page);

Reloads the web_page without using any cached data.

web_page :

a WebKitWebPage

webkit_web_page_load_uri ()

void                webkit_web_page_load_uri            (WebKitWebPage *web_page,
                                                         const gchar *uri);

Requests loading of the specified URI string.

web_page :

a WebKitWebPage

uri :

an URI string

webkit_web_page_load_string ()

void                webkit_web_page_load_string         (WebKitWebPage *webPage,
                                                         const gchar *content,
                                                         const gchar *mimeType,
                                                         const gchar *encoding,
                                                         const gchar *baseUri);

Requests loading of the given content with the specified mimeType, encoding and baseUri.

If mimeType is NULL, "text/html" is assumed.

If encoding is NULL, "UTF-8" is assumed.

webPage :

a WebKitWebPage

content :

an URI string

mimeType :

the MIME type, or NULL

encoding :

the encoding, or NULL

baseUri :

the base URI for relative locations

webkit_web_page_load_request ()

void                webkit_web_page_load_request        (WebKitWebPage *web_page,
                                                         WebKitNetworkRequest *request);

Requests loading of the specified asynchronous client request.

Creates a provisional data source that will transition to a committed data source once any data has been received. Use webkit_web_page_stop_loading() to stop the load.

web_page :

a WebKitWebPage

request :

a WebKitNetworkRequest

webkit_web_page_search_text ()

gboolean            webkit_web_page_search_text         (WebKitWebPage *web_page,
                                                         const gchar *text,
                                                         gboolean case_sensitive,
                                                         gboolean forward,
                                                         gboolean wrap);

Looks for a specified string inside web_page.

web_page :

a WebKitWebPage

text :

a string to look for

case_sensitive :

whether to respect the case of text

forward :

whether to find forward or not

wrap :

whether to continue looking at the beginning after reaching the end

Returns :

TRUE on success or FALSE on failure

webkit_web_page_mark_text_matches ()

guint               webkit_web_page_mark_text_matches   (WebKitWebPage *web_page,
                                                         const gchar *string,
                                                         gboolean case_sensitive,
                                                         guint limit);

Attempts to highlight all occurances of string inside web_page.

web_page :

a WebKitWebPage

string :

a string to look for

case_sensitive :

whether to respect the case of text

limit :

the maximum number of strings to look for or 0 for all

Returns :

the number of strings highlighted

webkit_web_page_set_highlight_text_matches ()

void                webkit_web_page_set_highlight_text_matches
                                                        (WebKitWebPage *web_page,
                                                         gboolean highlight);

Highlights text matches previously marked by webkit_web_page_mark_text_matches.

web_page :

a WebKitWebPage

highlight :

whether to highlight text matches

webkit_web_page_unmark_text_matches ()

void                webkit_web_page_unmark_text_matches (WebKitWebPage *web_page);

Removes highlighting previously set by webkit_web_page_mark_text_matches.

web_page :

a WebKitWebPage

webkit_web_page_set_settings ()

void                webkit_web_page_set_settings        (WebKitWebPage *web_page,
                                                         WebKitWebSettings *settings);

Replaces the WebKitWebSettings instance that is currently attached to web_page with settings. The reference held by the web_page on the old WebKitWebSettings instance is dropped, and the reference count of settings is increased.

The settings are automatically applied to web_page.

web_page :

a WebKitWebPage

settings :

the WebKitWebSettings to be set. [transfer none]

webkit_web_page_get_settings ()

WebKitWebSettings * webkit_web_page_get_settings        (WebKitWebPage *web_page);

Obtains the WebKitWebSettings associated with the WebKitWebPage. The WebKitWebPage always has an associated instance of WebKitWebSettings. The reference that is returned by this call is owned by the WebKitWebPage. You may need to increase its reference count if you intend to keep it alive for longer than the WebKitWebPage.

web_page :

a WebKitWebPage

Returns :

the WebKitWebSettings instance. [transfer none]

webkit_web_page_get_inspector ()

WebKitWebInspector * webkit_web_page_get_inspector      (WebKitWebPage *web_page);

Obtains the WebKitWebInspector associated with the WebKitWebPage. Every WebKitWebPage object has a WebKitWebInspector object attached to it as soon as it is created, so this function will only return NULL if the argument is not a valid WebKitWebPage.

web_page :

a WebKitWebPage

Returns :

the WebKitWebInspector instance. [transfer none]

webkit_web_page_get_load_status ()

WebKitLoadStatus    webkit_web_page_get_load_status     (WebKitWebPage *web_page);

Determines the current status of the load.

web_page :

a WebKitWebPage

Returns :

the WebKitLoadStatus.

webkit_web_page_get_progress ()

gdouble             webkit_web_page_get_progress        (WebKitWebPage *web_page);

Determines the current progress of the load.

FIXME: Update below comment.

web_page :

a WebKitWebPage

Returns :

TRUE or FALSE.

webkit_web_page_can_go_back ()

gboolean            webkit_web_page_can_go_back         (WebKitWebPage *web_page);

Determines whether web_page has a previous history item.

web_page :

a WebKitWebPage

Returns :

TRUE if able to move back, FALSE otherwise

webkit_web_page_can_go_back_or_forward ()

gboolean            webkit_web_page_can_go_back_or_forward
                                                        (WebKitWebPage *web_page,
                                                         gint steps);

Determines whether web_page has a history item of steps. Negative values represent steps backward while positive values represent steps forward.

web_page :

a WebKitWebPage

steps :

the number of steps

Returns :

TRUE if able to move back or forward the given number of steps, FALSE otherwise

webkit_web_page_can_go_forward ()

gboolean            webkit_web_page_can_go_forward      (WebKitWebPage *web_page);

Determines whether web_page has a next history item.

web_page :

a WebKitWebPage

Returns :

TRUE if able to move forward, FALSE otherwise

webkit_web_page_go_back ()

void                webkit_web_page_go_back             (WebKitWebPage *web_page);

Loads the previous history item.

web_page :

a WebKitWebPage

webkit_web_page_go_back_or_forward ()

void                webkit_web_page_go_back_or_forward  (WebKitWebPage *web_page,
                                                         gint steps);

Loads the history item that is the number of steps away from the current item. Negative values represent steps backward while positive values represent steps forward.

web_page :

a WebKitWebPage

steps :

the number of steps

webkit_web_page_go_forward ()

void                webkit_web_page_go_forward          (WebKitWebPage *web_page);

Loads the next history item.

web_page :

a WebKitWebPage

webkit_web_page_set_maintains_back_forward_list ()

void                webkit_web_page_set_maintains_back_forward_list
                                                        (WebKitWebPage *web_page,
                                                         gboolean flag);

Set the page to maintain a back or forward list of history items.

web_page :

a WebKitWebPage

flag :

to tell the page to maintain a back or forward list

webkit_web_page_get_back_forward_list ()

WebKitWebBackForwardList * webkit_web_page_get_back_forward_list
                                                        (WebKitWebPage *web_page);

Obtains the WebKitWebBackForwardList associated with the given WebKitWebPage. The WebKitWebBackForwardList is owned by the WebKitWebPage.

web_page :

a WebKitWebPage

Returns :

the WebKitWebBackForwardList. [transfer none]

webkit_web_page_go_to_back_forward_item ()

gboolean            webkit_web_page_go_to_back_forward_item
                                                        (WebKitWebPage *web_page,
                                                         WebKitWebHistoryItem *item);

Go to the specified WebKitWebHistoryItem

web_page :

a WebKitWebPage

item :

a WebKitWebHistoryItem*

Returns :

TRUE if loading of item is successful, FALSE if not

webkit_web_page_get_accessible ()

AtkObject *         webkit_web_page_get_accessible      (WebKitWebPage *page);


webkit_web_page_stop_loading ()

void                webkit_web_page_stop_loading        (WebKitWebPage *web_page);

Stops any ongoing load in the web_page.

web_page :

a WebKitWebPage

webkit_web_page_get_title ()

const gchar *       webkit_web_page_get_title           (WebKitWebPage *web_page);

Return the web_page's document title

web_page :

a WebKitWebPage

Returns :

the title of web_page

webkit_web_page_get_uri ()

const char *        webkit_web_page_get_uri             (WebKitWebPage *web_page);

Return the current URI of the contents displayed by the web_page

web_page :

a WebKitWebPage

Returns :

the URI of web_page

webkit_web_page_get_window_features ()

WebKitWebWindowFeatures * webkit_web_page_get_window_features
                                                        (WebKitWebPage *webPage);

Return the instance of WebKitWebWindowFeatures held by the given WebKitWebPage.

webPage :

a WebKitWebPage

Returns :

the WebKitWebWindowFeatures. [transfer none]

webkit_web_page_get_dom_document ()

WebKitDOMDocument * webkit_web_page_get_dom_document    (WebKitWebPage *webPage);

webPage :

a WebKitWebPage

Returns :

the WebKitDOMDocument currently loaded in the webPage. [transfer none]

webkit_web_page_hit_test ()

WebKitHitTestResult * webkit_web_page_hit_test          (WebKitWebPage *webPage,
                                                         int x,
                                                         int y);

Does a 'hit test' in the coordinates specified by x and y to figure out context information about that position in the webPage.

webPage :

a WebKitWebPage

x :

the X coordinate of the test, relative to the viewport

y :

the Y coordinate of the test, relative to the viewport

Returns :

a newly created WebKitHitTestResult with the context of the specified position. [transfer none]

webkit_web_page_hit_test_rectangle ()

WebKitHitTestResult * webkit_web_page_hit_test_rectangle
                                                        (WebKitWebPage *webPage,
                                                         int x,
                                                         int y,
                                                         guint topPadding,
                                                         guint bottomPadding,
                                                         guint leftPadding,
                                                         guint rightPadding);

Does a 'hit test' in the coordinates specified by x and y and the surrounding area provided by the padding arguments to figure out context information about that position in the webPage.

webPage :

a WebKitWebPage

x :

the X coordinate of the test, relative to the viewport

y :

the Y coordinate of the test, relative to the viewport

topPadding :

the number of pixels to consider above the hit test point

bottomPadding :

the number of pixels to consider bellow the hit test point

leftPadding :

the number of pixels to consider to the left the hit test point

rightPadding :

the number of pixels to consider to the right the hit test point

Returns :

a newly created GList with WebKitHitTestResult objects as the elements with the context of the specified position.

webkit_web_page_get_full_content_zoom ()

gboolean            webkit_web_page_get_full_content_zoom
                                                        (WebKitWebPage *web_page);


webkit_web_page_set_full_content_zoom ()

void                webkit_web_page_set_full_content_zoom
                                                        (WebKitWebPage *web_page,
                                                         gboolean full_content_zoom);


webkit_web_page_get_zoom_level ()

gfloat              webkit_web_page_get_zoom_level      (WebKitWebPage *web_page);

Return the zoom level of web_page, i.e. the factor by which elements in the page are scaled with respect to their original size.

web_page :

a WebKitWebPage

Returns :

the zoom level of web_page

webkit_web_page_set_zoom_level ()

void                webkit_web_page_set_zoom_level      (WebKitWebPage *web_page,
                                                         gfloat zoom_level);

Sets the zoom level of web_page, i.e. the factor by which elements in the page are scaled with respect to their original size.

web_page :

a WebKitWebPage

zoom_level :

the new zoom level

webkit_web_page_zoom_in ()

void                webkit_web_page_zoom_in             (WebKitWebPage *web_page);

Increases the zoom level of web_page. The current zoom level is incremented by the value of the "zoom-step" property of the WebKitWebSettings associated with web_page.

web_page :

a WebKitWebPage

webkit_web_page_zoom_out ()

void                webkit_web_page_zoom_out            (WebKitWebPage *web_page);

Decreases the zoom level of web_page. The current zoom level is decremented by the value of the "zoom-step" property of the WebKitWebSettings associated with web_page.

web_page :

a WebKitWebPage

webkit_web_page_get_focused_frame ()

WebKitWebFrame *    webkit_web_page_get_focused_frame   (WebKitWebPage *webPage);

Return the frame that has focus or an active text selection.

webPage :

a WebKitWebPage

Returns :

The focused WebKitWebFrame or NULL if no frame is focused. [transfer none]

webkit_web_page_execute_script ()

void                webkit_web_page_execute_script      (WebKitWebPage *webPage,
                                                         const gchar *script);

This is a convenience to run very simple scripts in the context of the main frame of a given page. If your needs are more complex you should use the JavaScripCore API or the DOM bindings instead.

webPage :

the WebKitWebPage

script :

a string containing the script to be executed

webkit_web_page_get_icon_uri ()

const gchar *       webkit_web_page_get_icon_uri        (WebKitWebPage *web_page);

Obtains the URI for the favicon for the given WebKitWebPage, or NULL if there is none.

web_page :

the WebKitWebPage object

Returns :

the URI for the favicon, or NULL

webkit_web_page_get_editable ()

gboolean            webkit_web_page_get_editable        (WebKitWebPage *web_page);

Return whether the user is allowed to edit the document.

Returns TRUE if web_page allows the user to edit the HTML document, FALSE if it doesn't. You can change web_page's document programmatically regardless of this setting using the DOM bindings or JavaScriptCore.

web_page :

a WebKitWebPage

Returns :

a gboolean indicating the editable state

webkit_web_page_set_editable ()

void                webkit_web_page_set_editable        (WebKitWebPage *web_page,
                                                         gboolean flag);

Sets whether web_page allows the user to edit its HTML document.

If flag is TRUE, web_page allows the user to edit the document. If flag is FALSE, an element in web_page's document can only be edited if the CONTENTEDITABLE attribute has been set on the element or one of its parent elements. You can change web_page's document programmatically regardless of this setting. By default a WebKitWebPage is not editable.

Normally, an HTML document is not editable unless the elements within the document are editable. This function provides a low-level way to make the contents of a WebKitWebPage editable without altering the document or DOM structure.

web_page :

a WebKitWebPage

flag :

a gboolean indicating the editable state

webkit_web_page_can_show_mime_type ()

gboolean            webkit_web_page_can_show_mime_type  (WebKitWebPage *web_page,
                                                         const gchar *mime_type);

This functions returns whether or not a MIME type can be displayed using this page.

web_page :

a WebKitWebPage

mime_type :

a MIME type

Returns :

a gboolean indicating if the MIME type can be displayed

webkit_web_page_get_encoding ()

const gchar *       webkit_web_page_get_encoding        (WebKitWebPage *webPage);

Return the default encoding of the WebKitWebPage.

webPage :

a WebKitWebPage

Returns :

the default encoding

webkit_web_page_set_custom_encoding ()

void                webkit_web_page_set_custom_encoding (WebKitWebPage *webPage,
                                                         const gchar *encoding);

Sets the current WebKitWebPage encoding, without modifying the default one, and reloads the page.

webPage :

a WebKitWebPage

encoding :

the new encoding, or NULL to restore the default encoding

webkit_web_page_get_custom_encoding ()

const char *        webkit_web_page_get_custom_encoding (WebKitWebPage *webPage);

Returns the current encoding of the WebKitWebPage, not the default-encoding of WebKitWebSettings.

webPage :

a WebKitWebPage

Returns :

a string containing the current custom encoding for webPage, or NULL if there's none set.

webkit_web_page_set_page_mode ()

void                webkit_web_page_set_page_mode       (WebKitWebPage *web_page,
                                                         WebKitWebPagePageMode mode);

Sets the page-mode property of the WebKitWebPage. Check the property's documentation for more information.

web_page :

the WebKitWebPage that will have its page mode set

mode :

the WebKitWebPagePageMode to be set

webkit_web_page_get_page_mode ()

WebKitWebPagePageMode webkit_web_page_get_page_mode     (WebKitWebPage *web_page);

Gets the value of the page-mode property of the WebKitWebPage. Check the property's documentation for more information.

web_page :

the WebKitWebPage to obtain the page mode from

Returns :

the WebKitWebPagePageMode currently set for the WebKitWebPage.

webkit_web_page_load_image ()

void                webkit_web_page_load_image          (WebKitWebPage *webPage,
                                                         const gchar *url);

Starts loading the image at url, if it hadn't been loaded already.

webPage :

a WebKitWebPage

url :

url of the image to load

webkit_web_page_get_use_fixed_layout ()

gboolean            webkit_web_page_get_use_fixed_layout
                                                        (WebKitWebPage *webPage);


webkit_web_page_set_use_fixed_layout ()

void                webkit_web_page_set_use_fixed_layout
                                                        (WebKitWebPage *webPage,
                                                         gboolean used);


webkit_web_page_get_fixed_layout_width ()

guint               webkit_web_page_get_fixed_layout_width
                                                        (WebKitWebPage *webPage);


webkit_web_page_set_fixed_layout_width ()

void                webkit_web_page_set_fixed_layout_width
                                                        (WebKitWebPage *webPage,
                                                         guint width);


webkit_web_page_get_fixed_layout_height ()

guint               webkit_web_page_get_fixed_layout_height
                                                        (WebKitWebPage *webPage);


webkit_web_page_set_fixed_layout_height ()

void                webkit_web_page_set_fixed_layout_height
                                                        (WebKitWebPage *webPage,
                                                         guint height);


ChooseElementToZoomCallback ()

WebKitDOMElement *  (*ChooseElementToZoomCallback)      (GSList *candidates,
                                                         void *userData);

The type of functions which are used to select the most relevant node when operating a contextual zoom.

candidates :

a list of WebKitDOMElement

userData :

a data pointer

Returns :

the node to zoom to.

webkit_web_page_get_zoom_target ()

bool                webkit_web_page_get_zoom_target     (WebKitWebPage *webPage,
                                                         float x,
                                                         float y,
                                                         int *zoomCenterX,
                                                         int *zoomCenterY,
                                                         double *zoomFactor,
                                                         ChooseElementToZoomCallback callback,
                                                         void *userData);

Compute the zoom center and factor for a contextual zoom requested at the point defined by the x and y arguments.

The callback (if any) will be called with a list of the candidate nodes to zoom at. If the callback returns a node, it will be chosen to be zoomed at, otherwise the first node will be chosen.

webPage :

a WebKitWebPage

x :

the horizontal coordinate of the event

y :

the vertical coordinate of the event

zoomCenterX :

return location for the X coordinate of the zoomed area center. [out]

zoomCenterY :

return location for the Y coordinate of the zoomed area center. [out]

zoomFactor :

return location for the final zoom factor. [out]

callback :

the ChooseElementToZoomCallback, or NULL. [allow-none]

userData :

user data to pass to callback, or NULL. [allow-none]

Returns :

FALSE if no suitable node was found

Property Details

The "fixed-layout-height" property

  "fixed-layout-height"      guint                 : Read / Write

An associated WebKitWebWindowFeatures instance.

Default value: 600


The "fixed-layout-width" property

  "fixed-layout-width"       guint                 : Read / Write

An associated WebKitWebWindowFeatures instance.

Default value: 800


The "icon-uri" property

  "icon-uri"                 gchar*                : Read

The URI for the favicon for the WebKitWebPage.

Default value: NULL


The "load-status" property

  "load-status"              WebKitLoadStatus      : Read

Determines the current status of the load.

Connect to "notify::load-status" to monitor loading.

Default value: WEBKIT_LOAD_FINISHED


The "progress" property

  "progress"                 gdouble               : Read

Determines the current progress of the load.

Allowed values: [0,1]

Default value: 1


The "settings" property

  "settings"                 WebKitWebSettings*    : Read / Write

An associated WebKitWebSettings instance.


The "title" property

  "title"                    gchar*                : Read

Returns the @web_page's document title.

Default value: NULL


The "uri" property

  "uri"                      gchar*                : Read

Returns the current URI of the contents displayed by the @web_page.

Default value: NULL


The "use-fixed-layout" property

  "use-fixed-layout"         gboolean              : Read / Write

An associated WebKitWebWindowFeatures instance.

Default value: FALSE


The "web-inspector" property

  "web-inspector"            WebKitWebInspector*   : Read

The associated WebKitWebInspector instance.


The "web-view" property

  "web-view"                 WebKitIWebView*       : Read / Write / Construct Only

The associated WebKitIWebView instance.


The "window-features" property

  "window-features"          WebKitWebWindowFeatures*  : Read / Write

An associated WebKitWebWindowFeatures instance.


The "zoom-level" property

  "zoom-level"               gfloat                : Read / Write

The level of zoom of the content.

Allowed values: >= G_MINFLOAT

Default value: 1

Signal Details

The "console-message" signal

gboolean            user_function                      (WebKitWebPage *webPage,
                                                        gchar         *message,
                                                        gint           line,
                                                        gchar         *source_id,
                                                        gpointer       user_data)      : Run Last

A JavaScript console message was created.

webPage :

the object on which the signal is emitted

message :

the message text

line :

the line where the error occured

source_id :

the source id

user_data :

user data set when the signal handler was connected.

Returns :

TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further.

The "create-window" signal

WebKitWebPage*      user_function                      (WebKitWebPage  *web_page,
                                                        WebKitWebFrame *frame,
                                                        gpointer        user_data)      : Run Last

Emitted when the creation of a new window is requested. If this signal is handled the signal handler should return the newly created WebKitWebPage.

The new WebKitWebPage should not be displayed to the user until the "web-page-ready" signal is emitted.

The signal handlers should not try to deal with the reference count for the new WebKitWebPage. The page to which the page is added will handle that.

web_page :

the object on which the signal is emitted

frame :

the WebKitWebFrame

user_data :

user data set when the signal handler was connected.

Returns :

a newly allocated WebKitWebPage, or NULL. [transfer full]

The "database-quota-exceeded" signal

void                user_function                      (WebKitWebPage *web_page,
                                                        GObject       *frame,
                                                        GObject       *database,
                                                        gpointer       user_data)      : Action

The "database-quota-exceeded" signal will be emitted when a Web Database exceeds the quota of its security origin. This signal may be used to increase the size of the quota before the originating operation fails.

web_page :

the object which received the signal

frame :

the relevant frame

database :

the WebKitWebDatabase which exceeded the quota of its WebKitSecurityOrigin

user_data :

user data set when the signal handler was connected.

The "document-load-finished" signal

void                user_function                      (WebKitWebPage  *web_page,
                                                        WebKitWebFrame *web_frame,
                                                        gpointer        user_data)      : Action

Emitted when the DOM document object load is finished for the given frame.

web_page :

the object which received the signal

web_frame :

the WebKitWebFrame whose load dispatched this request

user_data :

user data set when the signal handler was connected.

The "download-requested" signal

gboolean            user_function                      (WebKitWebPage *web_page,
                                                        GObject       *download,
                                                        gpointer       user_data)      : Run Last

A new Download is being requested. By default, if the signal is not handled, the download is cancelled. If you handle the download and call webkit_download_set_destination_uri(), it will be started for you. If you need to set the destination asynchronously you are responsible for starting or cancelling it yourself.

If you intend to handle downloads yourself rather than using the WebKitDownload helper object you must handle this signal, and return FALSE.

Also, keep in mind that the default policy for WebKitGTK+ is to ignore files with a MIME type that it does not know how to handle, which means this signal won't be emitted in the default setup. One way to trigger downloads is to connect to WebKitWebPage::mime-type-policy-decision-requested and call webkit_web_policy_decision_download() on the WebKitWebPolicyDecision in the parameter list for the kind of files you want your application to download (a common solution is to download anything that WebKit can't handle, which you can figure out by using webkit_web_page_can_show_mime_type()).

web_page :

the object on which the signal is emitted

download :

a WebKitDownload object that lets you control the download process

user_data :

user data set when the signal handler was connected.

Returns :

TRUE if the download should be performed, FALSE to cancel it

The "frame-created" signal

void                user_function                      (WebKitWebPage  *webkitwebpage,
                                                        WebKitWebFrame *arg1,
                                                        gpointer        user_data)          : Action

webkitwebpage :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "geolocation-policy-decision-cancelled" signal

void                user_function                      (WebKitWebPage  *webPage,
                                                        WebKitWebFrame *frame,
                                                        gpointer        user_data)      : Run Last

When a frame wants to cancel geolocation permission it had requested before.

webPage :

the object on which the signal is emitted

frame :

the frame that cancels geolocation request.

user_data :

user data set when the signal handler was connected.

The "geolocation-policy-decision-requested" signal

gboolean            user_function                      (WebKitWebPage                   *webPage,
                                                        WebKitWebFrame                  *frame,
                                                        WebKitGeolocationPolicyDecision *policy_decision,
                                                        gpointer                         user_data)            : Run Last

This signal is emitted when a frame wants to obtain the user's location. The decision can be made asynchronously, but you must call g_object_ref() on the policy_decision, and return TRUE if you are going to handle the request. To actually make the decision you need to call webkit_geolocation_policy_allow() or webkit_geolocation_policy_deny() on policy_decision.

webPage :

the object on which the signal is emitted

frame :

the frame that requests permission

policy_decision :

a WebKitGeolocationPolicyDecision

user_data :

user data set when the signal handler was connected.

The "hovering-over-link" signal

void                user_function                      (WebKitWebPage *web_page,
                                                        gchar         *title,
                                                        gchar         *uri,
                                                        gpointer       user_data)      : Run Last

When the cursor is over a link, this signal is emitted.

web_page :

the object on which the signal is emitted

title :

the link's title

uri :

the URI the link points to

user_data :

user data set when the signal handler was connected.

The "icon-loaded" signal

void                user_function                      (WebKitWebPage *web_page,
                                                        gchar         *icon_uri,
                                                        gpointer       user_data)      : Run Last

This signal is emitted when the main frame has got a favicon.

web_page :

the object on which the signal is emitted

icon_uri :

the URI for the icon

user_data :

user data set when the signal handler was connected.

The "input-method-state-set" signal

void                user_function                      (WebKitWebPage *web_page,
                                                        WebKitDOMNode *element,
                                                        gboolean       active,
                                                        gpointer       user_data)      : Run Last

This signal is emitted when an editable element has been focused.

web_page :

the object on which the signal is emitted

element :

the focused WebKitDOMElement

active :

TRUE if editing

user_data :

user data set when the signal handler was connected.

The "inspection-requested" signal

WebKitWebPage*      user_function                      (WebKitWebPage      *webkitwebpage,
                                                        WebKitWebInspector *arg1,
                                                        gpointer            user_data)          : Run Last

webkitwebpage :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "microfocus-changed" signal

void                user_function                      (WebKitWebPage *web_page,
                                                        WebKitDOMNode *element,
                                                        gpointer       user_data)      : Run Last

This signal is emitted when the focus in the web page changes to another element.

web_page :

the object on which the signal is emitted

element :

the focused WebKitDOMElement, or NULL

user_data :

user data set when the signal handler was connected.

The "mime-type-policy-decision-requested" signal

gboolean            user_function                      (WebKitWebPage           *web_page,
                                                        WebKitWebFrame          *frame,
                                                        WebKitNetworkRequest    *request,
                                                        gchar                   *mimetype,
                                                        WebKitWebPolicyDecision *policy_decision,
                                                        gpointer                 user_data)            : Run Last

Decide whether or not to display the given MIME type. If this signal is not handled, the default behavior is to show the content of the requested URI if WebKit can show this MIME type and the content disposition is not a download; if WebKit is not able to show the MIME type nothing happens.

Notice that if you return TRUE, meaning that you handled the signal, you are expected to be aware of the "Content-Disposition" header. A value of "attachment" usually indicates a download regardless of the MIME type, see also soup_message_headers_get_content_disposition(). And you must call webkit_web_policy_decision_ignore(), webkit_web_policy_decision_use(), or webkit_web_policy_decision_download() on the policy_decision object.

web_page :

the object on which the signal is emitted

frame :

the WebKitWebFrame that required the policy decision

request :

a WebKitNetworkRequest

mimetype :

the MIME type attempted to load

policy_decision :

a WebKitWebPolicyDecision

user_data :

user data set when the signal handler was connected.

Returns :

TRUE if a decision was made, FALSE to have the default behavior apply

The "navigation-policy-decision-requested" signal

gboolean            user_function                      (WebKitWebPage             *web_page,
                                                        WebKitWebFrame            *frame,
                                                        WebKitNetworkRequest      *request,
                                                        WebKitWebNavigationAction *navigation_action,
                                                        WebKitWebPolicyDecision   *policy_decision,
                                                        gpointer                   user_data)              : Run Last

Emitted when frame requests a navigation to another page. If this signal is not handled, the default behavior is to allow the navigation.

Notice that if you return TRUE, meaning that you handled the signal, you are expected to have decided what to do, by calling webkit_web_policy_decision_ignore(), webkit_web_policy_decision_use(), or webkit_web_policy_decision_download() on the policy_decision object.

web_page :

the object on which the signal is emitted

frame :

the WebKitWebFrame that required the navigation

request :

a WebKitNetworkRequest

navigation_action :

a WebKitWebNavigationAction

policy_decision :

a WebKitWebPolicyDecision

user_data :

user data set when the signal handler was connected.

Returns :

TRUE if a decision was made, FALSE to have the default behavior apply

The "new-window-policy-decision-requested" signal

gboolean            user_function                      (WebKitWebPage             *web_page,
                                                        WebKitWebFrame            *frame,
                                                        WebKitNetworkRequest      *request,
                                                        WebKitWebNavigationAction *navigation_action,
                                                        WebKitWebPolicyDecision   *policy_decision,
                                                        gpointer                   user_data)              : Run Last

Emitted when frame requests opening a new window. With this signal the browser can use the context of the request to decide about the new window. If the request is not handled the default behavior is to allow opening the new window to load the URI, which will cause a create-window signal emission where the browser handles the new window action but without information of the context that caused the navigation. The following navigation-policy-decision-requested emissions will load the page after the creation of the new window just with the information of this new navigation context, without any information about the action that made this new window to be opened.

Notice that if you return TRUE, meaning that you handled the signal, you are expected to have decided what to do, by calling webkit_web_policy_decision_ignore(), webkit_web_policy_decision_use(), or webkit_web_policy_decision_download() on the policy_decision object.

web_page :

the object on which the signal is emitted

frame :

the WebKitWebFrame that required the navigation

request :

a WebKitNetworkRequest

navigation_action :

a WebKitWebNavigationAction

policy_decision :

a WebKitWebPolicyDecision

user_data :

user data set when the signal handler was connected.

Returns :

TRUE if a decision was made, FALSE to have the default behavior apply

The "onload-event" signal

void                user_function                      (WebKitWebPage  *web_page,
                                                        WebKitWebFrame *frame,
                                                        gpointer        user_data)      : Run Last

When a WebKitWebFrame receives an onload event this signal is emitted.

web_page :

the object on which the signal is emitted

frame :

the frame

user_data :

user data set when the signal handler was connected.

The "resource-request-starting" signal

void                user_function                      (WebKitWebPage         *web_page,
                                                        WebKitWebFrame        *web_frame,
                                                        WebKitWebResource     *web_resource,
                                                        WebKitNetworkRequest  *request,
                                                        WebKitNetworkResponse *response,
                                                        gpointer               user_data)         : Action

Emitted when a request is about to be sent. You can modify the request while handling this signal. You can set the URI in the WebKitNetworkRequest object itself, and add/remove/replace headers using the SoupMessage object it carries, if it is present. See webkit_network_request_get_message(). Setting the request URI to "about:blank" will effectively cause the request to load nothing, and can be used to disable the loading of specific resources.

Notice that information about an eventual redirect is available in response's SoupMessage, not in the SoupMessage carried by the request. If response is NULL, then this is not a redirected request.

The WebKitWebResource object will be the same throughout all the lifetime of the resource, but the contents may change from inbetween signal emissions.

web_page :

the object which received the signal

web_frame :

the WebKitWebFrame whose load dispatched this request

web_resource :

an empty WebKitWebResource object

request :

the WebKitNetworkRequest that will be dispatched

response :

the WebKitNetworkResponse representing the redirect response, if any

user_data :

user data set when the signal handler was connected.

The "script-alert" signal

gboolean            user_function                      (WebKitWebPage  *webPage,
                                                        WebKitWebFrame *frame,
                                                        gchar          *message,
                                                        gpointer        user_data)      : Run Last

A JavaScript alert dialog was created.

webPage :

the object on which the signal is emitted

frame :

the relevant frame

message :

the message text

user_data :

user data set when the signal handler was connected.

Returns :

TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further.

The "script-confirm" signal

gboolean            user_function                      (WebKitWebPage  *webPage,
                                                        WebKitWebFrame *frame,
                                                        gchar          *message,
                                                        gpointer        confirmed,
                                                        gpointer        user_data)      : Run Last

A JavaScript confirm dialog was created, providing Yes and No buttons.

webPage :

the object on which the signal is emitted

frame :

the relevant frame

message :

the message text

confirmed :

whether the dialog has been confirmed

user_data :

user data set when the signal handler was connected.

Returns :

TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further.

The "script-prompt" signal

gboolean            user_function                      (WebKitWebPage  *webPage,
                                                        WebKitWebFrame *frame,
                                                        gchar          *message,
                                                        gchar          *default,
                                                        gpointer        text,
                                                        gpointer        user_data)      : Run Last

A JavaScript prompt dialog was created, providing an entry to input text.

webPage :

the object on which the signal is emitted

frame :

the relevant frame

message :

the message text

default :

the default value

text :

To be filled with the return value or NULL if the dialog was cancelled.

user_data :

user data set when the signal handler was connected.

Returns :

TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further.

The "should-interrupt-script" signal

gboolean            user_function                      (WebKitWebPage *web_page,
                                                        gpointer       user_data)      : Run Last

Notification that JavaScript code may be stuck or is using up too much time. Return TRUE if execution should be interrupted, FALSE otherwise.

web_page :

the object on which the signal is emitted

user_data :

user data set when the signal handler was connected.

Returns :

TRUE if execution should be interrupted, FALSE otherwise

The "status-bar-text-changed" signal

void                user_function                      (WebKitWebPage *webkitwebpage,
                                                        gchar         *arg1,
                                                        gpointer       user_data)          : Run Last

webkitwebpage :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "title-changed" signal

void                user_function                      (WebKitWebPage  *web_page,
                                                        WebKitWebFrame *frame,
                                                        gchar          *title,
                                                        gpointer        user_data)      : Run Last

Warning

WebKitWebPage::title-changed has been deprecated since version 1.1.4 and should not be used in newly-written code. Use "notify::title" instead.

When a WebKitWebFrame changes the document title this signal is emitted.

web_page :

the object on which the signal is emitted

frame :

the main frame

title :

the new title

user_data :

user data set when the signal handler was connected.

The "web-load-error" signal

gboolean            user_function                      (WebKitWebPage  *web_page,
                                                        WebKitWebFrame *web_frame,
                                                        gchar          *uri,
                                                        gpointer        web_error,
                                                        gpointer        user_data)      : Run Last

An error occurred while loading. By default, if the signal is not handled, the web_page will display a stock error page. You need to handle the signal if you want to provide your own error page.

web_page :

the object on which the signal is emitted

web_frame :

the WebKitWebFrame

uri :

the URI that triggered the error

web_error :

the GError that was triggered

user_data :

user data set when the signal handler was connected.

Returns :

TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further.

The "web-load-finished" signal

void                user_function                      (WebKitWebPage  *web_page,
                                                        WebKitWebFrame *frame,
                                                        gpointer        user_data)      : Run Last

web_page :

the WebKitWebPage

frame :

the WebKitWebFrame

user_data :

user data set when the signal handler was connected.

The "web-load-started" signal

void                user_function                      (WebKitWebPage  *web_page,
                                                        WebKitWebFrame *frame,
                                                        gpointer        user_data)      : Run Last

When a WebKitWebFrame begins to load this signal is emitted.

web_page :

the object on which the signal is emitted

frame :

the frame going to do the load

user_data :

user data set when the signal handler was connected.

The "web-page-ready" signal

gboolean            user_function                      (WebKitWebPage *web_page,
                                                        gpointer       user_data)      : Run Last

Emitted after "create-window" when the new WebKitWebPage should be displayed to the user. When this signal is emitted all the information about how the window should look, including size, position, whether the location, status and scroll bars should be displayed, is already set on the WebKitWebWindowFeatures object contained by the WebKitWebPage.

Notice that some of that information may change during the life time of the window, so you may want to connect to the ::notify signal of the WebKitWebWindowFeatures object to handle those.

web_page :

the object on which the signal is emitted

user_data :

user data set when the signal handler was connected.

Returns :

TRUE to stop handlers from being invoked for the event or FALSE to propagate the event furter

The "window-object-cleared" signal

void                user_function                      (WebKitWebPage  *web_page,
                                                        WebKitWebFrame *frame,
                                                        gpointer        context,
                                                        gpointer        window_object,
                                                        gpointer        user_data)          : Run Last

Emitted when the JavaScript window object in a WebKitWebFrame has been cleared in preparation for a new load. This is the preferred place to set custom properties on the window object using the JavaScriptCore API.

web_page :

the object on which the signal is emitted

frame :

the WebKitWebFrame to which window_object belongs

context :

the JSGlobalContextRef holding the global object and other execution state; equivalent to the return value of webkit_web_frame_get_global_context(frame)

window_object :

the JSObjectRef representing the frame's JavaScript window object

user_data :

user data set when the signal handler was connected.