WebKitWebView

WebKitWebView — The central class of the WebKit/Gtk+ API

Synopsis

enum                WebKitNavigationResponse;
enum                WebKitWebViewTargetInfo;
                    WebKitWebView;
gboolean            webkit_web_view_can_copy_clipboard  (WebKitWebView *web_view);
gboolean            webkit_web_view_can_cut_clipboard   (WebKitWebView *web_view);
gboolean            webkit_web_view_can_go_back         (WebKitWebView *web_view);
gboolean            webkit_web_view_can_go_back_or_forward
                                                        (WebKitWebView *web_view,
                                                         gint steps);
gboolean            webkit_web_view_can_go_forward      (WebKitWebView *web_view);
gboolean            webkit_web_view_can_paste_clipboard (WebKitWebView *web_view);
void                webkit_web_view_copy_clipboard      (WebKitWebView *web_view);
void                webkit_web_view_cut_clipboard       (WebKitWebView *web_view);
void                webkit_web_view_delete_selection    (WebKitWebView *web_view);
void                webkit_web_view_execute_script      (WebKitWebView *web_view,
                                                         const gchar *script);
WebKitWebBackForwardList* webkit_web_view_get_back_forward_list
                                                        (WebKitWebView *web_view);
GtkTargetList*      webkit_web_view_get_copy_target_list
                                                        (WebKitWebView *web_view);
gboolean            webkit_web_view_get_editable        (WebKitWebView *web_view);
WebKitWebFrame*     webkit_web_view_get_focused_frame   (WebKitWebView *web_view);
gboolean            webkit_web_view_get_full_content_zoom
                                                        (WebKitWebView *web_view);
WebKitWebInspector* webkit_web_view_get_inspector       (WebKitWebView *web_view);
WebKitWebFrame*     webkit_web_view_get_main_frame      (WebKitWebView *web_view);
GtkTargetList*      webkit_web_view_get_paste_target_list
                                                        (WebKitWebView *web_view);
WebKitWebSettings*  webkit_web_view_get_settings        (WebKitWebView *web_view);
gboolean            webkit_web_view_get_transparent     (WebKitWebView *web_view);
gfloat              webkit_web_view_get_zoom_level      (WebKitWebView *web_view);
void                webkit_web_view_go_back             (WebKitWebView *web_view);
void                webkit_web_view_go_back_or_forward  (WebKitWebView *web_view,
                                                         gint steps);
void                webkit_web_view_go_forward          (WebKitWebView *web_view);
gboolean            webkit_web_view_go_to_back_forward_item
                                                        (WebKitWebView *web_view,
                                                         WebKitWebHistoryItem *item);
gboolean            webkit_web_view_has_selection       (WebKitWebView *web_view);
void                webkit_web_view_load_html_string    (WebKitWebView *web_view,
                                                         const gchar *content,
                                                         const gchar *base_uri);
void                webkit_web_view_load_string         (WebKitWebView *web_view,
                                                         const gchar *content,
                                                         const gchar *content_mime_type,
                                                         const gchar *content_encoding,
                                                         const gchar *base_uri);
guint               webkit_web_view_mark_text_matches   (WebKitWebView *web_view,
                                                         const gchar *string,
                                                         gboolean case_sensitive,
                                                         guint limit);
GtkWidget*          webkit_web_view_new                 (void);
void                webkit_web_view_open                (WebKitWebView *web_view,
                                                         const gchar *uri);
void                webkit_web_view_paste_clipboard     (WebKitWebView *web_view);
void                webkit_web_view_reload              (WebKitWebView *web_view);
gboolean            webkit_web_view_search_text         (WebKitWebView *web_view,
                                                         const gchar *text,
                                                         gboolean case_sensitive,
                                                         gboolean forward,
                                                         gboolean wrap);
void                webkit_web_view_select_all          (WebKitWebView *web_view);
void                webkit_web_view_set_editable        (WebKitWebView *web_view,
                                                         gboolean flag);
void                webkit_web_view_set_full_content_zoom
                                                        (WebKitWebView *web_view,
                                                         gboolean full_content_zoom);
void                webkit_web_view_set_highlight_text_matches
                                                        (WebKitWebView *web_view,
                                                         gboolean highlight);
void                webkit_web_view_set_maintains_back_forward_list
                                                        (WebKitWebView *web_view,
                                                         gboolean flag);
void                webkit_web_view_set_settings        (WebKitWebView *web_view,
                                                         WebKitWebSettings *settings);
void                webkit_web_view_set_transparent     (WebKitWebView *web_view,
                                                         gboolean flag);
void                webkit_web_view_set_zoom_level      (WebKitWebView *web_view,
                                                         gfloat zoom_level);
void                webkit_web_view_stop_loading        (WebKitWebView *web_view);
void                webkit_web_view_unmark_text_matches (WebKitWebView *web_view);
void                webkit_web_view_zoom_in             (WebKitWebView *web_view);
void                webkit_web_view_zoom_out            (WebKitWebView *web_view);
WebKitWebWindowFeatures* webkit_web_view_get_window_features
                                                        (WebKitWebView *web_view);

Properties

  "copy-target-list"         GtkTargetList*        : Read
  "editable"                 gboolean              : Read / Write
  "full-content-zoom"        gboolean              : Read / Write
  "paste-target-list"        GtkTargetList*        : Read
  "settings"                 WebKitWebSettings*    : Read / Write
  "transparent"              gboolean              : Read / Write
  "web-inspector"            WebKitWebInspector*   : Read
  "window-features"          WebKitWebWindowFeatures*  : Read / Write
  "zoom-level"               gfloat                : Read / Write

Signals

  "console-message"                                : Run Last / Action
  "copy-clipboard"                                 : Run Last / Action
  "create-web-view"                                : Run Last / Action
  "cut-clipboard"                                  : Run Last / Action
  "hovering-over-link"                             : Run Last / Action
  "icon-loaded"                                    : Run Last / Action
  "load-committed"                                 : Run Last / Action
  "load-finished"                                  : Run Last / Action
  "load-progress-changed"                          : Run Last / Action
  "load-started"                                   : Run Last / Action
  "navigation-requested"                           : Run Last / Action
  "paste-clipboard"                                : Run Last / Action
  "populate-popup"                                 : Run Last / Action
  "script-alert"                                   : Run Last / Action
  "script-confirm"                                 : Run Last / Action
  "script-prompt"                                  : Run Last / Action
  "select-all"                                     : Run Last / Action
  "selection-changed"                              : Run Last / Action
  "set-scroll-adjustments"                         : Run Last / Action
  "status-bar-text-changed"                        : Run Last / Action
  "title-changed"                                  : Run Last / Action
  "web-view-ready"                                 : Run Last
  "window-object-cleared"                          : Run Last / Action

Description

WebKitWebView is the central class of the WebKit/Gtk+ API. It is a GtkWidget implementing the scrolling interface which means you can embed in a GtkScrolledWindow. It is responsible for managing the drawing of the content, forwarding of events. You can load any URI into the WebKitWebView or any kind of data string. With WebKitWebSettings you can control various aspects of the rendering and loading of the content. Each WebKitWebView has exactly one WebKitWebFrame as main frame. A WebKitWebFrame can have n children.

/* Create the widgets */
GtkWidget *main_window = gtk_window_new (GTK_WIDGET_TOPLEVEL);
GtkWidget *scrolled_window = gtk_scrolled_window_new (NULL, NULL);
GtkWidget *web_view = webkit_web_view_new ();

/* Place the WebKitWebView in the GtkScrolledWindow */
gtk_container_add (GTK_CONTAINER (scrolled_window), web_view);
gtk_container_add (GTK_CONTAINER (main_window), scrolled_window);

/* Open a webpage */
webkit_web_view_open (WEBKIT_WEB_VIEW (web_view), "http://www.gnome.org");

/* Show the result */
gtk_window_set_default_size (GTK_WINDOW (main_window), 800, 600);
gtk_widget_show_all (main_window);

Details

enum WebKitNavigationResponse

typedef enum {
    WEBKIT_NAVIGATION_RESPONSE_ACCEPT,
    WEBKIT_NAVIGATION_RESPONSE_IGNORE,
    WEBKIT_NAVIGATION_RESPONSE_DOWNLOAD
} WebKitNavigationResponse;


enum WebKitWebViewTargetInfo

typedef enum
{
    WEBKIT_WEB_VIEW_TARGET_INFO_HTML = - 1,
    WEBKIT_WEB_VIEW_TARGET_INFO_TEXT = - 2
} WebKitWebViewTargetInfo;


WebKitWebView

typedef struct {
    GtkContainer parent_instance;
} WebKitWebView;


webkit_web_view_can_copy_clipboard ()

gboolean            webkit_web_view_can_copy_clipboard  (WebKitWebView *web_view);

web_view :

Returns :


webkit_web_view_can_cut_clipboard ()

gboolean            webkit_web_view_can_cut_clipboard   (WebKitWebView *web_view);

web_view :

Returns :


webkit_web_view_can_go_back ()

gboolean            webkit_web_view_can_go_back         (WebKitWebView *web_view);

Determines whether web_view has a previous history item.

web_view :

a WebKitWebView

Returns :

TRUE if able to move back, FALSE otherwise

webkit_web_view_can_go_back_or_forward ()

gboolean            webkit_web_view_can_go_back_or_forward
                                                        (WebKitWebView *web_view,
                                                         gint steps);

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

web_view :

a WebKitWebView

steps :

the number of steps

Returns :

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

webkit_web_view_can_go_forward ()

gboolean            webkit_web_view_can_go_forward      (WebKitWebView *web_view);

Determines whether web_view has a next history item.

web_view :

a WebKitWebView

Returns :

TRUE if able to move forward, FALSE otherwise

webkit_web_view_can_paste_clipboard ()

gboolean            webkit_web_view_can_paste_clipboard (WebKitWebView *web_view);

web_view :

Returns :


webkit_web_view_copy_clipboard ()

void                webkit_web_view_copy_clipboard      (WebKitWebView *web_view);

Copies the current selection inside the web_view to the clipboard.

web_view :

a WebKitWebView

webkit_web_view_cut_clipboard ()

void                webkit_web_view_cut_clipboard       (WebKitWebView *web_view);

Cuts the current selection inside the web_view to the clipboard.

web_view :

a WebKitWebView

webkit_web_view_delete_selection ()

void                webkit_web_view_delete_selection    (WebKitWebView *web_view);

Deletes the current selection inside the web_view.

web_view :

a WebKitWebView

webkit_web_view_execute_script ()

void                webkit_web_view_execute_script      (WebKitWebView *web_view,
                                                         const gchar *script);

web_view :

script :


webkit_web_view_get_back_forward_list ()

WebKitWebBackForwardList* webkit_web_view_get_back_forward_list
                                                        (WebKitWebView *web_view);

Returns a WebKitWebBackForwardList

web_view :

a WebKitWebView

Returns :

the WebKitWebBackForwardList

webkit_web_view_get_copy_target_list ()

GtkTargetList*      webkit_web_view_get_copy_target_list
                                                        (WebKitWebView *web_view);

This function returns the list of targets this WebKitWebView can provide for clipboard copying and as DND source. The targets in the list are added with info values from the WebKitWebViewTargetInfo enum, using gtk_target_list_add() and gtk_target_list_add_text_targets().

web_view :

a WebKitWebView

Returns :

the GtkTargetList

webkit_web_view_get_editable ()

gboolean            webkit_web_view_get_editable        (WebKitWebView *web_view);

Returns whether the user is allowed to edit the document.

Returns TRUE if web_view allows the user to edit the HTML document, FALSE if it doesn't. You can change web_view's document programmatically regardless of this setting.

web_view :

a WebKitWebView

Returns :

a gboolean indicating the editable state

webkit_web_view_get_focused_frame ()

WebKitWebFrame*     webkit_web_view_get_focused_frame   (WebKitWebView *web_view);

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

web_view :

a WebKitWebView

Returns :

The focused WebKitWebFrame or NULL if no frame is focused

webkit_web_view_get_full_content_zoom ()

gboolean            webkit_web_view_get_full_content_zoom
                                                        (WebKitWebView *web_view);

Returns whether the zoom level affects only text or all elements.

web_view :

a WebKitWebView

Returns :

FALSE if only text should be scaled (the default), TRUE if the full content of the view should be scaled.

Since 1.0.1


webkit_web_view_get_inspector ()

WebKitWebInspector* webkit_web_view_get_inspector       (WebKitWebView *web_view);

Obtains the WebKitWebInspector associated with the WebKitWebView. Every WebKitWebView 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 WebKitWebView.

web_view :

a WebKitWebView

Returns :

the WebKitWebInspector instance associated with the WebKitWebView; NULL is only returned if the argument is not a valid WebKitWebView.

Since 1.0.3


webkit_web_view_get_main_frame ()

WebKitWebFrame*     webkit_web_view_get_main_frame      (WebKitWebView *web_view);

web_view :

Returns :


webkit_web_view_get_paste_target_list ()

GtkTargetList*      webkit_web_view_get_paste_target_list
                                                        (WebKitWebView *web_view);

This function returns the list of targets this WebKitWebView can provide for clipboard pasting and as DND destination. The targets in the list are added with info values from the WebKitWebViewTargetInfo enum, using gtk_target_list_add() and gtk_target_list_add_text_targets().

web_view :

a WebKitWebView

Returns :

the GtkTargetList

webkit_web_view_get_settings ()

WebKitWebSettings*  webkit_web_view_get_settings        (WebKitWebView *web_view);

web_view :

Returns :


webkit_web_view_get_transparent ()

gboolean            webkit_web_view_get_transparent     (WebKitWebView *web_view);

Returns whether the WebKitWebView has a transparent background.

web_view :

a WebKitWebView

Returns :

FALSE when the WebKitWebView draws a solid background (the default), otherwise TRUE.

webkit_web_view_get_zoom_level ()

gfloat              webkit_web_view_get_zoom_level      (WebKitWebView *web_view);

Returns the zoom level of web_view, i.e. the factor by which elements in the page are scaled with respect to their original size. If the "full-content-zoom" property is set to FALSE (the default) the zoom level changes the text size, or if TRUE, scales all elements in the page.

web_view :

a WebKitWebView

Returns :

the zoom level of web_view

Since 1.0.1


webkit_web_view_go_back ()

void                webkit_web_view_go_back             (WebKitWebView *web_view);

Loads the previous history item.

web_view :

a WebKitWebView

webkit_web_view_go_back_or_forward ()

void                webkit_web_view_go_back_or_forward  (WebKitWebView *web_view,
                                                         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_view :

a WebKitWebView

steps :

the number of steps

webkit_web_view_go_forward ()

void                webkit_web_view_go_forward          (WebKitWebView *web_view);

Loads the next history item.

web_view :

a WebKitWebView

webkit_web_view_go_to_back_forward_item ()

gboolean            webkit_web_view_go_to_back_forward_item
                                                        (WebKitWebView *web_view,
                                                         WebKitWebHistoryItem *item);

Go to the specified WebKitWebHistoryItem

web_view :

a WebKitWebView

item :

a WebKitWebHistoryItem*

Returns :

TRUE if loading of item is successful, FALSE if not

webkit_web_view_has_selection ()

gboolean            webkit_web_view_has_selection       (WebKitWebView *web_view);

Determines whether text was selected.

web_view :

a WebKitWebView

Returns :

TRUE if there is selected text, FALSE if not

webkit_web_view_load_html_string ()

void                webkit_web_view_load_html_string    (WebKitWebView *web_view,
                                                         const gchar *content,
                                                         const gchar *base_uri);

web_view :

content :

base_uri :


webkit_web_view_load_string ()

void                webkit_web_view_load_string         (WebKitWebView *web_view,
                                                         const gchar *content,
                                                         const gchar *content_mime_type,
                                                         const gchar *content_encoding,
                                                         const gchar *base_uri);

web_view :

content :

content_mime_type :

content_encoding :

base_uri :


webkit_web_view_mark_text_matches ()

guint               webkit_web_view_mark_text_matches   (WebKitWebView *web_view,
                                                         const gchar *string,
                                                         gboolean case_sensitive,
                                                         guint limit);

Attempts to highlight all occurances of string inside web_view.

web_view :

a WebKitWebView

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_view_new ()

GtkWidget*          webkit_web_view_new                 (void);

Returns :


webkit_web_view_open ()

void                webkit_web_view_open                (WebKitWebView *web_view,
                                                         const gchar *uri);

web_view :

uri :


webkit_web_view_paste_clipboard ()

void                webkit_web_view_paste_clipboard     (WebKitWebView *web_view);

Pastes the current contents of the clipboard to the web_view.

web_view :

a WebKitWebView

webkit_web_view_reload ()

void                webkit_web_view_reload              (WebKitWebView *web_view);

web_view :


webkit_web_view_search_text ()

gboolean            webkit_web_view_search_text         (WebKitWebView *web_view,
                                                         const gchar *text,
                                                         gboolean case_sensitive,
                                                         gboolean forward,
                                                         gboolean wrap);

Looks for a specified string inside web_view.

web_view :

a WebKitWebView

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_view_select_all ()

void                webkit_web_view_select_all          (WebKitWebView *web_view);

Attempts to select everything inside the web_view.

web_view :

a WebKitWebView

webkit_web_view_set_editable ()

void                webkit_web_view_set_editable        (WebKitWebView *web_view,
                                                         gboolean flag);

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

If flag is TRUE, web_view allows the user to edit the document. If flag is FALSE, an element in web_view'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_view's document programmatically regardless of this setting. By default a WebKitWebView 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 WebKitWebView editable without altering the document or DOM structure.

web_view :

a WebKitWebView

flag :

a gboolean indicating the editable state

webkit_web_view_set_full_content_zoom ()

void                webkit_web_view_set_full_content_zoom
                                                        (WebKitWebView *web_view,
                                                         gboolean full_content_zoom);

Sets whether the zoom level affects only text or all elements.

web_view :

a WebKitWebView

full_content_zoom :

FALSE if only text should be scaled (the default), TRUE if the full content of the view should be scaled.

Since 1.0.1


webkit_web_view_set_highlight_text_matches ()

void                webkit_web_view_set_highlight_text_matches
                                                        (WebKitWebView *web_view,
                                                         gboolean highlight);

Highlights text matches previously marked by webkit_web_view_mark_text_matches.

web_view :

a WebKitWebView

highlight :

whether to highlight text matches

webkit_web_view_set_maintains_back_forward_list ()

void                webkit_web_view_set_maintains_back_forward_list
                                                        (WebKitWebView *web_view,
                                                         gboolean flag);

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

web_view :

a WebKitWebView

flag :

to tell the view to maintain a back or forward list

webkit_web_view_set_settings ()

void                webkit_web_view_set_settings        (WebKitWebView *web_view,
                                                         WebKitWebSettings *settings);

web_view :

settings :


webkit_web_view_set_transparent ()

void                webkit_web_view_set_transparent     (WebKitWebView *web_view,
                                                         gboolean flag);

Sets whether the WebKitWebView has a transparent background.

Pass FALSE to have the WebKitWebView draw a solid background (the default), otherwise TRUE.

web_view :

a WebKitWebView

flag :


webkit_web_view_set_zoom_level ()

void                webkit_web_view_set_zoom_level      (WebKitWebView *web_view,
                                                         gfloat zoom_level);

Sets the zoom level of web_view, i.e. the factor by which elements in the page are scaled with respect to their original size. If the "full-content-zoom" property is set to FALSE (the default) the zoom level changes the text size, or if TRUE, scales all elements in the page.

web_view :

a WebKitWebView

zoom_level :

the new zoom level

Since 1.0.1


webkit_web_view_stop_loading ()

void                webkit_web_view_stop_loading        (WebKitWebView *web_view);

web_view :


webkit_web_view_unmark_text_matches ()

void                webkit_web_view_unmark_text_matches (WebKitWebView *web_view);

Removes highlighting previously set by webkit_web_view_mark_text_matches.

web_view :

a WebKitWebView

webkit_web_view_zoom_in ()

void                webkit_web_view_zoom_in             (WebKitWebView *web_view);

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

web_view :

a WebKitWebView

Since 1.0.1


webkit_web_view_zoom_out ()

void                webkit_web_view_zoom_out            (WebKitWebView *web_view);

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

web_view :

a WebKitWebView

Since 1.0.1


webkit_web_view_get_window_features ()

WebKitWebWindowFeatures* webkit_web_view_get_window_features
                                                        (WebKitWebView *web_view);

Returns the instance of WebKitWebWindowFeatures held by the given WebKitWebView.

web_view :

a WebKitWebView

Returns :

the WebKitWebWindowFeatures

Since 1.0.3

Property Details

The "copy-target-list" property

  "copy-target-list"         GtkTargetList*        : Read

The list of targets this web view supports for clipboard copying.

Since 1.0.2


The "editable" property

  "editable"                 gboolean              : Read / Write

Whether content can be modified by the user.

Default value: FALSE


The "full-content-zoom" property

  "full-content-zoom"        gboolean              : Read / Write

Whether the full content is scaled when zooming.

Default value: FALSE

Since 1.0.1


The "paste-target-list" property

  "paste-target-list"        GtkTargetList*        : Read

The list of targets this web view supports for clipboard pasting.

Since 1.0.2


The "settings" property

  "settings"                 WebKitWebSettings*    : Read / Write

An associated WebKitWebSettings instance.


The "transparent" property

  "transparent"              gboolean              : Read / Write

Whether content has a transparent background.

Default value: FALSE


The "web-inspector" property

  "web-inspector"            WebKitWebInspector*   : Read

The associated WebKitWebInspector instance.

Since 1.0.3


The "window-features" property

  "window-features"          WebKitWebWindowFeatures*  : Read / Write

An associated WebKitWebWindowFeatures instance.

Since 1.0.3


The "zoom-level" property

  "zoom-level"               gfloat                : Read / Write

The level of zoom of the content.

Allowed values: >= G_MINFLOAT

Default value: 1

Since 1.0.1

Signal Details

The "console-message" signal

gboolean            user_function                      (WebKitWebView *web_view,
                                                        gchar         *message,
                                                        gint           line,
                                                        gchar         *source_id,
                                                        gpointer       user_data)      : Run Last / Action

A JavaScript console message was created.

web_view :

the object on which the signal is emitted

message :

the message text

line :

the line where the error occured

source_id :

the source id

return :

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

user_data :

user data set when the signal handler was connected.

The "copy-clipboard" signal

void                user_function                      (WebKitWebView *web_view,
                                                        gpointer       user_data)      : Run Last / Action

The "copy-clipboard" signal is a keybinding signal which gets emitted to copy the selection to the clipboard.

The default bindings for this signal are Ctrl-c and Ctrl-Insert.

web_view :

the object which received the signal

user_data :

user data set when the signal handler was connected.

The "create-web-view" signal

WebKitWebView*      user_function                      (WebKitWebView  *web_view,
                                                        WebKitWebFrame *frame,
                                                        gpointer        user_data)      : Run Last / Action

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

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

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

Since 1.0.3

web_view :

the object on which the signal is emitted

frame :

the WebKitWebFrame

return :

a newly allocated WebKitWebView or NULL

user_data :

user data set when the signal handler was connected.

The "cut-clipboard" signal

void                user_function                      (WebKitWebView *web_view,
                                                        gpointer       user_data)      : Run Last / Action

The "cut-clipboard" signal is a keybinding signal which gets emitted to cut the selection to the clipboard.

The default bindings for this signal are Ctrl-x and Shift-Delete.

web_view :

the object which received the signal

user_data :

user data set when the signal handler was connected.

The "hovering-over-link" signal

void                user_function                      (WebKitWebView *web_view,
                                                        gchar         *title,
                                                        gchar         *uri,
                                                        gpointer       user_data)      : Run Last / Action

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

web_view :

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                      (WebKitWebView *webkitwebview,
                                                        gpointer       user_data)          : Run Last / Action

webkitwebview :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "load-committed" signal

void                user_function                      (WebKitWebView  *web_view,
                                                        WebKitWebFrame *frame,
                                                        gpointer        user_data)      : Run Last / Action

When a WebKitWebFrame loaded the first data this signal is emitted.

web_view :

the object on which the signal is emitted

frame :

the main frame that received the first data

user_data :

user data set when the signal handler was connected.

The "load-finished" signal

void                user_function                      (WebKitWebView  *webkitwebview,
                                                        WebKitWebFrame *arg1,
                                                        gpointer        user_data)          : Run Last / Action

webkitwebview :

the object which received the signal.

arg1 :

user_data :

user data set when the signal handler was connected.

The "load-progress-changed" signal

void                user_function                      (WebKitWebView *web_view,
                                                        gint           progress,
                                                        gpointer       user_data)      : Run Last / Action

web_view :

the WebKitWebView

progress :

the global progress

user_data :

user data set when the signal handler was connected.

The "load-started" signal

void                user_function                      (WebKitWebView  *web_view,
                                                        WebKitWebFrame *frame,
                                                        gpointer        user_data)      : Run Last / Action

When a WebKitWebFrame begins to load this signal is emitted.

web_view :

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 "navigation-requested" signal

gint                user_function                      (WebKitWebView *webkitwebview,
                                                        GObject       *arg1,
                                                        GObject       *arg2,
                                                        gpointer       user_data)          : Run Last / Action

webkitwebview :

the object which received the signal.

arg1 :

arg2 :

user_data :

user data set when the signal handler was connected.

Returns :


The "paste-clipboard" signal

void                user_function                      (WebKitWebView *web_view,
                                                        gpointer       user_data)      : Run Last / Action

The "paste-clipboard" signal is a keybinding signal which gets emitted to paste the contents of the clipboard into the Web view.

The default bindings for this signal are Ctrl-v and Shift-Insert.

web_view :

the object which received the signal

user_data :

user data set when the signal handler was connected.

The "populate-popup" signal

void                user_function                      (WebKitWebView *web_view,
                                                        GtkMenu       *menu,
                                                        gpointer       user_data)      : Run Last / Action

When a context menu is about to be displayed this signal is emitted.

Add menu items to menu to extend the context menu.

web_view :

the object on which the signal is emitted

menu :

the context menu

user_data :

user data set when the signal handler was connected.

The "script-alert" signal

gboolean            user_function                      (WebKitWebView  *web_view,
                                                        WebKitWebFrame *frame,
                                                        gchar          *message,
                                                        gpointer        user_data)      : Run Last / Action

A JavaScript alert dialog was created.

web_view :

the object on which the signal is emitted

frame :

the relevant frame

message :

the message text

return :

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

user_data :

user data set when the signal handler was connected.

The "script-confirm" signal

gboolean            user_function                      (WebKitWebView  *web_view,
                                                        WebKitWebFrame *frame,
                                                        gchar          *message,
                                                        gboolean        confirmed,
                                                        gpointer        user_data)      : Run Last / Action

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

web_view :

the object on which the signal is emitted

frame :

the relevant frame

message :

the message text

confirmed :

whether the dialog has been confirmed

return :

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

user_data :

user data set when the signal handler was connected.

The "script-prompt" signal

gboolean            user_function                      (WebKitWebView  *web_view,
                                                        WebKitWebFrame *frame,
                                                        gchar          *message,
                                                        gchar          *default,
                                                        gpointer        text,
                                                        gpointer        user_data)      : Run Last / Action

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

web_view :

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.

return :

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

user_data :

user data set when the signal handler was connected.

The "select-all" signal

void                user_function                      (WebKitWebView *web_view,
                                                        gpointer       user_data)      : Run Last / Action

The "select-all" signal is a keybinding signal which gets emitted to select the complete contents of the text view.

The default bindings for this signal is Ctrl-a.

web_view :

the object which received the signal

user_data :

user data set when the signal handler was connected.

The "selection-changed" signal

void                user_function                      (WebKitWebView *webkitwebview,
                                                        gpointer       user_data)          : Run Last / Action

webkitwebview :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "set-scroll-adjustments" signal

void                user_function                      (WebKitWebView *webkitwebview,
                                                        GtkAdjustment *arg1,
                                                        GtkAdjustment *arg2,
                                                        gpointer       user_data)          : Run Last / Action

webkitwebview :

the object which received the signal.

arg1 :

arg2 :

user_data :

user data set when the signal handler was connected.

The "status-bar-text-changed" signal

void                user_function                      (WebKitWebView *webkitwebview,
                                                        gchar         *arg1,
                                                        gpointer       user_data)          : Run Last / Action

webkitwebview :

the object which received the signal.

arg1 :

user_data :

user data set when the signal handler was connected.

The "title-changed" signal

void                user_function                      (WebKitWebView  *web_view,
                                                        WebKitWebFrame *frame,
                                                        gchar          *title,
                                                        gpointer        user_data)      : Run Last / Action

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

web_view :

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-view-ready" signal

gboolean            user_function                      (WebKitWebView *web_view,
                                                        gpointer       user_data)      : Run Last

Emitted after "create-web-view" when the new WebKitWebView 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 WebKitWebView.

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.

Since 1.0.3

web_view :

the object on which the signal is emitted

return :

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

user_data :

user data set when the signal handler was connected.

The "window-object-cleared" signal

void                user_function                      (WebKitWebView  *web_view,
                                                        WebKitWebFrame *frame,
                                                        gpointer        context,
                                                        gpointer        arg3,
                                                        gpointer        user_data)      : Run Last / Action

window_object: the JSObjectRef representing the frame's JavaScript window object

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_view :

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)

user_data :

user data set when the signal handler was connected.

See Also

WebKitWebSettings, WebKitWebFrame