#WebKitDownload carries information about a download request,
including a #WebKitNetworkRequest object. The application may use
this object to control the download process, or to simply figure
out what is to be downloaded, and do it itself.
Creates a new #WebKitDownload object for the given
#WebKitNetworkRequest object.
the new #WebKitDownload
a #WebKitNetworkRequest
Cancels the download. Calling this will not free the
#WebKitDownload object, so you still need to call
g_object_unref() on it, if you are the owner of a reference. Notice
that cancelling the download provokes the emission of the
WebKitDownload::error signal, reporting that the download was
cancelled.
Current already downloaded size.
the already downloaded size
Obtains the URI to which the downloaded file will be written. This
must have been set by the application before calling
webkit_download_start(), and may be %NULL.
the destination URI or %NULL
Elapsed time for the download in seconds, including any fractional
part. If the download is finished, had an error or was cancelled
this is the time between its start and the event.
seconds since the download was started, as a #gdouble
Retrieves the #WebKitNetworkRequest object that backs the download
process.
the #WebKitNetworkRequest instance
Retrieves the #WebKitNetworkResponse object that backs the download
process.
the #WebKitNetworkResponse instance
Determines the current progress of the download.
a #gdouble ranging from 0.0 to 1.0.
Obtains the current status of the download, as a
#WebKitDownloadStatus.
the current #WebKitDownloadStatus
Retrieves the filename that was suggested by the server, or the one
derived by WebKit from the URI.
the suggested filename
Returns the expected total size of the download. This is expected
because the server may provide incorrect or missing
Content-Length. Notice that this may grow over time, as it will be
always the same as current_size in the cases where current size
surpasses it.
the expected total size of the downloaded file
Convenience method to retrieve the URI from the
#WebKitNetworkRequest which is being downloaded.
the uri
Defines the URI that should be used to save the downloaded file to.
the destination URI
Initiates the download. Notice that you must have set the
destination-uri property before calling this method.
The length of the data already downloaded
The URI of the save location for this download.
The #WebKitNetworkRequest instance associated with the download.
The #WebKitNetworkResponse instance associated with the download.
Determines the current progress of the download. Notice that,
although the progress changes are reported as soon as possible,
the emission of the notify signal for this property is
throttled, for the benefit of download managers. If you care
about every update, use WebKitDownload:current-size.
Determines the current status of the download.
The file name suggested as default when saving
The total size of the file
Emitted when @download is interrupted either by user action or by
network errors, @error_detail will take any value of
#WebKitDownloadError.
the corresponding error code
detailed error code for the error, see #WebKitDownloadError
a string describing the error
#WebKitGeolocationPolicyDecision objects are given to the application when
geolocation-policy-decision-requested signal is emitted. The application
uses it to tell the engine whether it wants to allow or deny geolocation for
a given frame.
This class holds context information about the coordinates
specified by a GDK event.
Flags indicating the kind of target that received the event.
The URI of the image that is part of the target that received the event, if any.
The DOM node at the coordinates where the hit test
happened. Keep in mind that the node might not be
representative of the information given in the context
property, since WebKit uses a series of heuristics to figure
out that information. One common example is inner-node having
the text node inside the anchor (<a>) tag; WebKit knows the
whole context and will put WEBKIT_HIT_TEST_RESULT_CONTEXT_LINK
in the 'context' property, but the user might be confused by
the lack of any link tag in 'inner-node'.
The URI to which the target that received the event points, if any.
The URI of the media that is part of the target that received the event, if any.
Obtains a #GdkPixbuf of the favicon for the given page URI, or
a default icon if there is no icon for the given page. Use
webkit_icon_database_get_icon_uri() if you need to distinguish these cases.
Usually you want to connect to WebKitIconDatabase::icon-loaded and call this
method in the callback.
The pixbuf will have the largest size provided by the server and should
be resized before it is displayed.
See also webkit_web_view_get_icon_pixbuf().
a new reference to a #GdkPixbuf, or %NULL
URI of the page containing the icon
Obtains the URI for the favicon for the given page URI.
See also webkit_web_view_get_icon_uri().
a newly allocated URI for the favicon, or %NULL
URI of the page containing the icon
Determines the absolute path to the database folder on disk.
the absolute path of the database folder, or %NULL
Specifies the absolute path to the database folder on disk.
Passing %NULL or "" disables the icon database.
an absolute path to the icon database folder
The absolute path of the icon database folder.
This signal is emitted when a favicon is available for a page,
or a child frame.
See WebKitWebView::icon-loaded if you only need the favicon for
the main frame of a particular #WebKitWebView.
the frame containing the icon
the URI of the frame containing the icon
This class represents the network related aspects of a navigation
request. It is used whenever WebKit wants to provide information
about a request that will be sent, or has been sent. Inside it you
can find the URI of the request, and, for valid URIs, a
#SoupMessage object, which provides access to further information
such as headers.
Creates a new #WebKitNetworkRequest initialized with an URI.
invalid.
a new #WebKitNetworkRequest, or %NULL if the URI is
an URI
Obtains the #SoupMessage held and used by the given request. Notice
that modification of the SoupMessage of a request by signal
handlers is only supported (as in, will only affect what is
actually sent to the server) where explicitly documented.
the #SoupMessage
the uri of the #WebKitNetworkRequest
Sets the URI held and used by the given request. When the request
has an associated #SoupMessage, its URI will also be set by this
call.
an URI
The #SoupMessage that backs the request.
The URI to which the request will be made.
This class represents the network related aspects of a navigation
response.
Creates a new #WebKitNetworkResponse initialized with an URI.
invalid.
a new #WebKitNetworkResponse, or %NULL if the URI is
an URI
Obtains the #SoupMessage that represents the given response. Notice
that only the response side of the HTTP conversation is
represented.
the #SoupMessage
the uri of the #WebKitNetworkResponse
Sets the URI held and used by the given response. When the response
has an associated #SoupMessage, its URI will also be set by this
call.
an URI
The #SoupMessage that backs the response.
The URI to which the response will be made.
#WebKitSecurityOrigin is a representation of a security domain defined
by web sites. An origin consists of a host name, a protocol, and a port
number. Web sites with the same security origin can access each other's
resources for client-side scripting or database access.
Use #webkit_web_frame_get_security_origin to get the security origin of a
#WebKitWebFrame.
Database quotas and usages are also defined per security origin. The
cumulative disk usage of an origin's databases may be retrieved with
#webkit_security_origin_get_web_database_usage. An origin's quota can be
adjusted with #webkit_security_origin_set_web_database_quota.
Returns a list of all Web Databases in the security origin.
#GList of databases in the security origin.
a
Returns the hostname for the security origin.
the hostname for the security origin
Returns the port for the security origin.
the port for the security origin
Returns the protocol for the security origin.
the protocol for the security origin
Returns the quota for Web Database storage of the security origin
in bytes.
the Web Database quota
Returns the cumulative size of all Web Database database's in the origin
in bytes.
the cumulative size of all databases
Adjust the quota for Web Database storage of the security origin
a new Web Database quota in bytes
The host of the security origin.
The port of the security origin.
The protocol of the security origin.
The web database qouta of the security origin in bytes.
The cumulative size of all web databases in the security origin in bytes.
#WebKitSoupAuthDialog is a #SoupSessionFeature that you can attach to your
#SoupSession to provide a simple authentication dialog while
handling HTTP basic auth. It is built as a simple C-only module
to ease reuse.
This signal is emitted by the @authDialog when it needs to know
the current toplevel widget in order to correctly set the
transiency for the authentication dialog.
the current toplevel #GtkWidget or %NULL if there's none
the #SoupMessage being used in the authentication process
#WebKitViewportAttributes offers the viewport properties to user agents to
control the viewport layout. It contains the viewport size, initial scale with limits,
and information about whether a user is able to scale the contents in the viewport.
This makes a web page fit the device screen.
The #WebKitWebView::viewport-attributes-changed signal will be emitted with #WebKitViewportAttributes
when the viewport attributes are updated in the case of loading web pages contain
the viewport properties and calling webkit_viewport_attributes_recompute.
If the device size, available size, desktop width, or device DPI needs to be changed due to
a consequence of an explicit browser request (caused by screen rotation, resizing, or similar reasons),
You should call #webkit_viewport_attributes_recompute to recompute the viewport properties and
override those values in the handler of #WebKitWebView::viewport-attributes-recompute-requested signal.
For more information on the viewport properties, refer to the Safari reference library at
http://developer.apple.com/safari/library/documentation/appleapplications/reference/safarihtmlref/articles/metatags.html
<informalexample><programlisting>
/<!-- -->* Connect to the viewport-attributes-changes signal *<!-- -->/
WebKitViewportAttributes* attributes = webkit_web_view_get_viewport_attributes (web_view);
g_signal_connect (web_view, "viewport-attributes-recompute-requested", G_CALLBACK (viewport_recompute_cb), window);
g_signal_connect (web_view, "viewport-attributes-changed", G_CALLBACK (viewport_changed_cb), window);
g_signal_connect (attributes, "notify::valid", G_CALLBACK (viewport_valid_changed_cb), web_view);
/<!-- -->* Handle the viewport-attributes-recompute-requested signal to override the device width *<!-- -->/
static void
viewport_recompute_cb (WebKitWebView* web_view, WebKitViewportAttributes* attributes, GtkWidget* window)
{
int override_available_width = 480;
g_object_set (G_OBJECT(attributes), "available-width", override_available_width, NULL);
}
/<!-- -->* Handle the viewport-attributes-changed signal to recompute the initial scale factor *<!-- -->/
static void
viewport_changed_cb (WebKitWebView* web_view, WebKitViewportAttributes* attributes, gpointer data)
{
gfloat initialScale;
g_object_get (G_OBJECT (atributes), "initial-scale-factor", &initialScale, NULL);
webkit_web_view_set_zoom_level (web_view, initialScale);
}
/<!-- -->* Handle the notify::valid signal to initialize the zoom level *<!-- -->/
static void
viewport_valid_changed_cb (WebKitViewportAttributes* attributes, GParamSpec* pspec, WebKitWebView* web_view)
{
gboolean is_valid;
g_object_get (attributes, "valid", &is_valid, NULL);
if (!is_valid)
webkit_web_view_set_zoom_level (web_view, 1.0);
}
</programlisting></informalexample>
Recompute the optimal viewport attributes and emit the viewport-attribute-changed signal.
The viewport-attributes-recompute-requested signal also will be handled to override
the device size, available size, desktop width, or device DPI.
<informalexample><programlisting>
/<!-- -->* Get the WebKitWebBackForwardList from the WebKitWebView *<!-- -->/
WebKitWebBackForwardList *back_forward_list = webkit_web_view_get_back_forward_list (my_web_view);
WebKitWebHistoryItem *item = webkit_web_back_forward_list_get_current_item (back_forward_list);
/<!-- -->* Do something with a WebKitWebHistoryItem *<!-- -->/
g_print("%p", item);
/<!-- -->* Control some parameters *<!-- -->/
WebKitWebBackForwardList *back_forward_list = webkit_web_view_get_back_forward_list (my_web_view);
webkit_web_back_forward_list_set_limit (back_forward_list, 30);
</programlisting></informalexample>
Creates an instance of the back forward list with a controlling #WebKitWebView
created and owned by #WebKitWebView instances only.
a #WebKitWebBackForwardList
the back forward list's #WebKitWebView
Adds the item to the #WebKitWebBackForwardList.
The @webBackForwardList will add a reference to the @webHistoryItem, so you
don't need to keep a reference once you've added it to the list.
the #WebKitWebHistoryItem to add
Clears the @webBackForwardList by removing all its elements. Note that not even
the current page is kept in list when cleared so you would have to add it later.
Checks if @web_history_item is in the back forward list
%TRUE if @web_history_item is in the back forward list, %FALSE if it doesn't
the #WebKitWebHistoryItem to check
Returns the item that precedes the current item
the #WebKitWebHistoryItem preceding the current item
Returns the number of items that preced the current item.
a #gint corresponding to the number of items preceding the current item
Returns a list of items that precede the current item, limited by @limit
a #GList of items preceding the current item, limited by @limit
the number of items to retrieve
Returns the current item.
Returns a NULL value if the back forward list is empty
a #WebKitWebHistoryItem
Returns the item that succeeds the current item.
Returns a NULL value if there nothing that succeeds the current item
a #WebKitWebHistoryItem
Returns the number of items that succeed the current item.
a #gint corresponding to the nuber of items succeeding the current item
Returns a list of items that succeed the current item, limited by @limit
a #GList of items succeeding the current item, limited by @limit
the number of items to retrieve
Returns the maximum limit of the back forward list.
a #gint indicating the number of #WebKitWebHistoryItem the back forward list can hold
Returns the item at a given index relative to the current item.
the #WebKitWebHistoryItem located at the specified index relative to the current item
the index of the item
Steps backward in the back forward list
Steps forward in the back forward list
Go to the specified @web_history_item in the back forward list
the #WebKitWebHistoryItem to go to
Sets the maximum limit of the back forward list. If the back forward list
exceeds its capacity, items will be removed everytime a new item has been
added.
the limit to set the back forward list to
Data source encapsulates the content of a #WebKitWebFrame. A
#WebKitWebFrame has a main resource and subresources and the data source
provides access to these resources. When a request gets loaded initially,
it is set to a provisional state. The application can request for the
request that initiated the load by asking for the provisional data source
and invoking the webkit_web_data_source_get_initial_request method of
#WebKitWebDataSource. This data source may not have enough data and some
methods may return empty values. To get a "full" data source with the data
and resources loaded, you need to get the non-provisional data source
through #WebKitWebFrame's webkit_web_frame_get_data_source method. This
data source will have the data after everything was loaded. Make sure that
the data source was finished loading before using any of its methods. You
can do this via webkit_web_data_source_is_loading.
Creates a new #WebKitWebDataSource instance. The URL of the
#WebKitWebDataSource will be set to "about:blank".
a new #WebKitWebDataSource.
Creates a new #WebKitWebDataSource from a #WebKitNetworkRequest. Normally,
#WebKitWebFrame objects create their data sources so you will almost never
want to invoke this method directly.
a new #WebKitWebDataSource
the #WebKitNetworkRequest to use to create this data source
Returns the raw data that represents the the frame's content.The data will
be incomplete until the data has finished loading. Returns %NULL if the web
frame hasn't loaded any data. Use webkit_web_data_source_is_loading to test
if data source is in the process of loading.
data that represents the @data_source or %NULL if the @data_source
hasn't loaded any data.
a #GString which contains the raw
Returns the text encoding name as set in the #WebKitWebView, or if not, the
text encoding of the response.
the encoding name of the #WebKitWebView or of the response.
Returns a reference to the original request that was used to load the web
content. The #WebKitNetworkRequest returned by this method is the request
prior to the "committed" load state. See webkit_web_data_source_get_request
for getting the "committed" request.
the original #WebKitNetworkRequest
Returns the main resource of the @data_source
representing the main resource of the @data_source.
a new #WebKitWebResource
Returns a #WebKitNetworkRequest that was used to create this
#WebKitWebDataSource. The #WebKitNetworkRequest returned by this method is
the request that was "committed", and hence, different from the request you
get from the webkit_web_data_source_get_initial_request method.
created the @data_source or %NULL if the @data_source is not
attached to the frame or the frame hasn't been loaded.
the #WebKitNetworkRequest that
Gives you a #GList of #WebKitWebResource objects that compose the
#WebKitWebView to which this #WebKitWebDataSource is attached.
a #GList of #WebKitWebResource objects; the objects are owned by
WebKit, but the GList must be freed.
Return the unreachable URI of @data_source. The @data_source will have an
unreachable URL if it was created using #WebKitWebFrame's
webkit_web_frame_load_alternate_html_string method.
the unreachable URL of @data_source or %NULL if there is no unreachable URL.
Returns the #WebKitWebFrame that represents this data source
the @data_source. The #WebKitWebFrame is owned by WebKit and should
not be freed or destroyed. This will return %NULL if the
the #WebKitWebFrame that represents
Determines whether the data source is in the process of loading its content.
%TRUE if the @data_source is still loading, %FALSE otherwise
#WebKitWebDatabase is a representation of a Web Database database. The
proposed Web Database standard introduces support for SQL databases that web
sites can create and access on a local computer through JavaScript.
To get access to all databases defined by a security origin, use
#webkit_security_origin_get_databases. Each database has a canonical
name, as well as a user-friendly display name.
WebKit uses SQLite to create and access the local SQL databases. The location
of a #WebKitWebDatabase can be accessed wth #webkit_web_database_get_filename.
You can configure the location of all databases with
#webkit_set_database_directory_path.
For each database the web site can define an estimated size which can be
accessed with #webkit_web_database_get_expected_size. The current size of the
database in bytes is returned by #webkit_web_database_get_size.
For more information refer to the Web Database specification proposal at
http://dev.w3.org/html5/webdatabase
Returns the name of the #WebKitWebDatabase as seen by the user.
the name of the database as seen by the user.
Returns the expected size of the #WebKitWebDatabase in bytes as defined by the
web author. The Web Database standard allows web authors to specify an expected
size of the database to optimize the user experience.
the expected size of the database in bytes
Returns the absolute filename to the #WebKitWebDatabase file on disk.
the absolute filename of the database
Returns the canonical name of the #WebKitWebDatabase.
the name of the database
Returns the security origin of the #WebKitWebDatabase.
the security origin of the database
Returns the actual size of the #WebKitWebDatabase space on disk in bytes.
the actual size of the database in bytes
Removes the #WebKitWebDatabase from its security origin and destroys all data
stored in the database.
The display name of the Web Database database.
The expected size of the database in bytes as defined by the web author.
The absolute filename of the Web Database database.
The name of the Web Database database.
The security origin of the database.
The current size of the database in bytes.
A #WebKitWebView contains a main #WebKitWebFrame. A #WebKitWebFrame
contains the content of one URI. The URI and name of the frame can
be retrieved, the load status and progress can be observed using the
signals and can be controlled using the methods of the #WebKitWebFrame.
A #WebKitWebFrame can have any number of children and one child can
be found by using #webkit_web_frame_find_frame.
<informalexample><programlisting>
/<!-- -->* Get the frame from the #WebKitWebView *<!-- -->/
WebKitWebFrame *frame = webkit_web_view_get_main_frame (WEBKIT_WEB_VIEW(my_view));
g_print("The URI of this frame is '%s'", webkit_web_frame_get_uri (frame));
</programlisting></informalexample>
Creates a new #WebKitWebFrame initialized with a controlling #WebKitWebView.
frames.
a new #WebKitWebFrame
the controlling #WebKitWebView
For pre-defined names, returns @frame if @name is "_self" or "_current",
returns @frame's parent frame if @name is "_parent", and returns the main
frame if @name is "_top". Also returns @frame if it is the main frame and
the first frame that matches @name. This function searches @frame and its
descendents first, then @frame's parent and its children moving up the
hierarchy until a match is found. If no match is found in @frame's
hierarchy, this function will search for a matching frame in other main
frame hierarchies. Returns %NULL if no match is found.
the found #WebKitWebFrame or %NULL in case none is found
the name of the frame to be found
Returns the committed data source.
the committed #WebKitWebDataSource.
Gets the global JavaScript execution context. Use this function to bridge
between the WebKit and JavaScriptCore APIs.
the global JavaScript context
Determines the current status of the load.
Returns the @frame's name
the #WebKitWebFrame is invalid or an empty string if it is not backed
by a live WebCore frame.
the name of @frame. This method will return NULL if
Returns a #WebKitNetworkResponse object representing the response
that was given to the request for the given frame, or NULL if the
frame was not created by a load. You must unref the object when you
are done with it.
a #WebKitNetworkResponse object
Returns the @frame's parent frame, or %NULL if it has none.
the parent #WebKitWebFrame or %NULL in case there is none
You use the webkit_web_frame_load_request method to initiate a request that
creates a provisional data source. The provisional data source will
transition to a committed data source once any data has been received. Use
webkit_web_frame_get_data_source to get the committed data source.
request is not in progress.
the provisional #WebKitWebDataSource or %NULL if a load
Returns the @frame's security origin.
the security origin of @frame
Returns the @frame's document title
the title of @frame
Returns the current URI of the contents displayed by the @frame
the URI of @frame
Returns the #WebKitWebView that manages this #WebKitWebFrame.
The #WebKitWebView returned manages the entire hierarchy of #WebKitWebFrame
objects that contains @frame.
the #WebKitWebView that manages @frame
Request loading of an alternate content for a URL that is unreachable.
Using this method will preserve the back-forward list. The URI passed in
the alternate content to display as the main page of the @frame
the base URI for relative locations
the URL for the alternate page content
Connects to a given URI by initiating an 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_frame_stop_loading() to
stop the load. This function is typically invoked on the main frame.
a #WebKitNetworkRequest
Requests loading of the given @content with the specified @mime_type,
If @mime_type is %NULL, "text/html" is assumed.
If @encoding is %NULL, "UTF-8" is assumed.
an URI string
the MIME type, or %NULL
the encoding, or %NULL
the base URI for relative locations
Requests loading of the specified URI string.
an URI string
Prints the given #WebKitWebFrame, by presenting a print dialog to the
user. If you need more control over the printing process, see
webkit_web_frame_print_full().
Prints the given #WebKitWebFrame, using the given #GtkPrintOperation
and #GtkPrintOperationAction. This function wraps a call to
gtk_print_operation_run() for printing the contents of the
#WebKitWebFrame.
the #GtkPrintOperation to be carried
the #GtkPrintOperationAction to be performed
Reloads the initial request.
Stops any pending loads on @frame's data source, and those of its children.
Determines the current policy for the horizontal scrollbar of
the frame. For the main frame, make sure to set the same policy
on the scrollable widget containing the #WebKitWebView, unless
you know what you are doing.
Determines the current status of the load.
Determines the current policy for the vertical scrollbar of
the frame. For the main frame, make sure to set the same policy
on the scrollable widget containing the #WebKitWebView, unless
you know what you are doing.
Emitted when frame loading is done.
WebKitWebView::load-error to be notified of load errors
Signal emitted when policy for one or both of the scrollbars of
the view has changed. The default handler will apply the new
policy to the container that holds the #WebKitWebFrame if it is
a #GtkScrolledWindow and the frame is the main frame. If you do
not want this to be handled automatically, you need to handle
this signal.
The exception to this rule is that policies to disable the
scrollbars are applied as %GTK_POLICY_AUTOMATIC instead, since
the size request of the widget would force browser windows to
not be resizable.
You can obtain the new policies from the
WebKitWebFrame:horizontal-scrollbar-policy and
WebKitWebFrame:vertical-scrollbar-policy properties.
event. %FALSE to propagate the event further.
%TRUE to stop other handlers from being invoked for the
When a #WebKitWebFrame changes the document title this signal is emitted.
the new title
A history item consists out of a title and a uri. It can be part of the
#WebKitWebBackForwardList and the global history. The global history is used
for coloring the links of visited sites. #WebKitWebHistoryItem's constructed with
#webkit_web_history_item_new and #webkit_web_history_item_new_with_data are
automatically added to the global history.
<informalexample><programlisting>
/<!-- -->* Inject a visited page into the global history *<!-- -->/
webkit_web_history_item_new_with_data("http://www.webkit.org/", "The WebKit Open Source Project");
</programlisting></informalexample>
Creates a new #WebKitWebHistoryItem instance
the new #WebKitWebHistoryItem
Creates a new #WebKitWebHistoryItem with the given URI and title
the new #WebKitWebHistoryItem
the uri of the page
the title of the page
Makes a copy of the item for use with other WebView objects.
the new #WebKitWebHistoryItem.
Returns the alternate title of @web_history_item
the alternate title of @web_history_item
Returns the original URI of @web_history_item.
the original URI of @web_history_item
the page title of @web_history_item
Returns the URI of @this
the URI of @web_history_item
Sets an alternate title for @web_history_item
the alternate title for @this history item
The alternate title of the history item.
The time at which the history item was last visited.
The original URI of the history item.
The title of the history item.
The URI of the history item.
The WebKit Inspector is a graphical tool to inspect and change
the content of a #WebKitWebView. It also includes an interactive
JavaScriptDebugger. Using this class one can get a GtkWidget which
can be embedded into an application to show the inspector.
The inspector is available when the #WebKitWebSettings of the
#WebKitWebView has set the #WebKitWebSettings:enable-developer-extras
to true otherwise no inspector is available.
<informalexample><programlisting>
/<!-- -->* Enable the developer extras *<!-- -->/
WebKitWebSettings *setting = webkit_web_view_get_settings (WEBKIT_WEB_VIEW(my_webview));
g_object_set (G_OBJECT(settings), "enable-developer-extras", TRUE, NULL);
/<!-- -->* load some data or reload to be able to inspect the page*<!-- -->/
webkit_web_view_open (WEBKIT_WEB_VIEW(my_webview), "http://www.gnome.org");
/<!-- -->* Embed the inspector somewhere *<!-- -->/
WebKitWebInspector *inspector = webkit_web_view_get_inspector (WEBKIT_WEB_VIEW(my_webview));
g_signal_connect (G_OBJECT (inspector), "inspect-web-view", G_CALLBACK(create_gtk_window_around_it), NULL);
g_signal_connect (G_OBJECT (inspector), "show-window", G_CALLBACK(show_inpector_window), NULL));
g_signal_connect (G_OBJECT (inspector), "notify::inspected-uri", G_CALLBACK(inspected_uri_changed_do_stuff), NULL);
</programlisting></informalexample>
Causes the Web Inspector to be closed.
Obtains the URI that is currently being inspected.
should not be freed, modified or stored.
a pointer to the URI as an internally allocated string; it
Obtains the #WebKitWebView that is used to render the
inspector. The #WebKitWebView instance is created by the
application, by handling the #WebKitWebInspector::inspect-web-view signal. This means
that this method may return %NULL if the user hasn't inspected
anything.
to render the inspector or %NULL if it is not yet created.
the #WebKitWebView instance that is used
Causes the Web Inspector to inspect the node that is located at the
given coordinates of the widget. The coordinates should be relative
to the #WebKitWebView widget, not to the scrollable content, and
may be obtained from a #GdkEvent directly.
This means @x, and @y being zero doesn't guarantee you will hit the
left-most top corner of the content, since the contents may have
been scrolled.
the X coordinate of the node to be inspected
the Y coordinate of the node to be inspected
Causes the Web Inspector to inspect the given node.
the #WebKitDOMNode to inspect
Causes the Web Inspector to be shown.
The URI that is currently being inspected.
This is enabling JavaScript profiling in the Inspector. This means
that Console.profiles will return the profiles.
This is enabling Timeline profiling in the Inspector.
The Web View that renders the Web Inspector itself.
Emitted when the inspector should appear at the same window as
the #WebKitWebView being inspected.
Emitted when the inspector window should be closed. You can
destroy the window or hide it so that it can be displayed again
by handling #WebKitWebInspector::show-window later on.
Notice that the inspected #WebKitWebView may no longer exist
when this signal is emitted.
Notice, too, that if you decide to destroy the window,
#WebKitWebInspector::inspect-web-view will be emmited again, when the user
inspects an element.
Emitted when the inspector should appear in a separate window.
Emitted when the inspection is done. You should release your
references on the inspector at this time. The inspected
#WebKitWebView may no longer exist when this signal is emitted.
Emitted when the user activates the 'inspect' context menu item
to inspect a web view. The application which is interested in
the inspector should create a window, or otherwise add the
#WebKitWebView it creates to an existing window.
You don't need to handle the reference count of the
#WebKitWebView instance you create; the widget to which you add
it will do that.
a newly allocated #WebKitWebView or %NULL
the #WebKitWebView which will be inspected
Emitted when the inspector window should be displayed. Notice
that the window must have been created already by handling
#WebKitWebInspector::inspect-web-view.
#WebKitWebNavigationAction is used in signals to provide details about
what led the navigation to happen. This includes, for instance, if the user
clicked a link to start that navigation, and what mouse button was used.
The GTK+ identifier for the mouse button used to click. Notice that GTK+ button values
are 1, 2 and 3 for left, middle and right buttons, so they are DOM button values +1. If the action was not
initiated by a mouse click the value will be -1.
the mouse button used to click
Returns a bitmask with the the state of the modifier keys.
a bitmask with the state of the modifier keys
Returns the URI that was originally requested. This may differ from the
navigation target, for instance because of a redirect.
the originally requested URI
Returns the reason why WebKit is requesting a navigation.
a #WebKitWebNavigationReason
Returns the target frame of the action.
if there is no target.
the target frame of the action or NULL
Sets the URI that was originally requested. This may differ from the
navigation target, for instance because of a redirect.
a URI
Sets the reason why WebKit is requesting a navigation.
a #WebKitWebNavigationReason
The GTK+ identifier for the mouse button used to click. Notice that GTK+ button values
are 1, 2 and 3 for left, middle and right buttons, so they are DOM button values +1. If the action was not
initiated by a mouse click the value will be -1.
The state of the modifier keys when the action was requested.
The URI that was requested as the target for the navigation.
The reason why this navigation is occuring.
The target frame for the navigation.
This object represents a single plugin, found by WebKitGTK+ while
scanning the various usual directories. This object can be used to
get more information about a plugin, and enable/disable it,
allowing fine-grained control of plugins. The list of available
plugins can be obtained from the #WebKitWebPluginDatabase object.
the description string for @plugin.
%TRUE if the plugin is enabled, %FALSE otherwise
Returns all the #WebKitWebPluginMIMEType that @plugin is handling
at the moment.
a #GSList of #WebKitWebPluginMIMEType
the name string for @plugin.
Sets the enabled status of the @plugin.
This object allows you to query information about the plugins found
by the engine while scanning the usual directories. You can then
use the #WebKitWebPlugin objects to get more information or
enable/disable individual plugins.
Returns the #WebKitWebPlugin that is handling @mimeType in the
a #WebKitWebPlugin
Returns all #WebKitWebPlugin available in @database.
The returned list must be freed with webkit_web_plugin_database_plugins_list_free()
a #GSList of #WebKitWebPlugin
Refreshes @database adding new plugins that are now in use and
removing those that have been disabled or are otherwise no longer
available.
#WebKitWebPolicyDecision objects are given to the application on
signal emissions that deal with policy decisions, such as if a new
window should be opened, or if a given navigation should be
allowed. The application uses it to tell the engine what to do.
Will send the DOWNLOAD decision to the policy implementer.
Will send the IGNORE decision to the policy implementer.
Will send the USE decision to the policy implementer.
A web resource encapsulates the data of the download as well as the URI,
MIME type and frame name of the resource.
Returns a new #WebKitWebResource. The @encoding can be %NULL. The
entire HTML frame, otherwise pass %NULL.
a new #WebKitWebResource
the data to initialize the #WebKitWebResource
the length of @data
the uri of the #WebKitWebResource
the MIME type of the #WebKitWebResource
the text encoding name of the #WebKitWebResource
the frame name of the #WebKitWebResource
Returns the data of the @webResource.
data of the @webResource. The string is owned by WebKit and should
not be freed or destroyed.
a #GString containing the character
the encoding name of the resource
the frame name of the resource.
the MIME type of the resource
the URI of the resource
The encoding name to which the web resource was encoded in.
The frame name for the web resource.
The MIME type of the web resource.
The URI of the web resource
#WebKitWebSettings can be applied to a #WebKitWebView to control text encoding,
color, font sizes, printing mode, script support, loading of images and various other things.
After creation, a #WebKitWebSettings object contains default settings.
<informalexample><programlisting>
/<!-- -->* Create a new websettings and disable java script *<!-- -->/
WebKitWebSettings *settings = webkit_web_settings_new ();
g_object_set (G_OBJECT(settings), "enable-scripts", FALSE, NULL);
/<!-- -->* Apply the result *<!-- -->/
webkit_web_view_set_settings (WEBKIT_WEB_VIEW(my_webview), settings);
</programlisting></informalexample>
Creates a new #WebKitWebSettings instance with default values. It must
be manually attached to a WebView.
a new #WebKitWebSettings instance
Copies an existing #WebKitWebSettings instance.
a new #WebKitWebSettings instance
Returns the User-Agent string currently used by the web view(s) associated
with the @web_settings.
Web pages can request to modify the size and position of the
window containing the #WebKitWebView through various DOM methods
(resizeTo, moveTo, resizeBy, moveBy). By default WebKit will not
honor this requests, but you can set this property to %TRUE if
you'd like it to do so. If you wish to handle this manually, you
can connect to the notify signal for the
#WebKitWebWindowFeatures of your #WebKitWebView.
This setting controls various editing behaviors that differ
between platforms and that have been combined in two groups,
'Mac' and 'Windows'. Some examples:
1) Clicking below the last line of an editable area puts the
caret at the end of the last line on Mac, but in the middle of
the last line on Windows.
2) Pushing down the arrow key on the last line puts the caret
at the end of the last line on Mac, but does nothing on
Windows. A similar case exists on the top line.
Whether to enable caret browsing mode.
Whether right-clicks should be handled automatically to create,
and display the context menu. Turning this off will make
WebKitGTK+ not emit the populate-popup signal. Notice that the
default button press event handler may still handle right
clicks for other reasons, such as in-page context menus, or
right-clicks that are handled by the page itself.
Whether developer extensions should be enabled. This enables,
for now, the Web Inspector, which can be controlled using the
#WebKitWebInspector instance held by the #WebKitWebView this
setting is enabled for.
Whether webkit prefetches domain names. This is a separate knob from private browsing.
Whether private browsing should set this or not is up for debate, for now it doesn't.
Whether to enable DOM paste. If set to %TRUE, document.execCommand("Paste")
will correctly execute and paste content of the clipboard.
Boolean property to control file access for file:// URIs. If this
option is enabled every file:// will have its own security unique domain.
Whether to enable the Frame Flattening. With this setting each subframe is expanded
to its contents, which will flatten all the frames to become one scrollable page.
On touch devices, it is desired to not have any scrollable sub parts of the page as
it results in a confusing user experience, with scrolling sometimes scrolling sub parts
and at other times scrolling the page itself. For this reason iframes and framesets are
barely usable on touch devices.
Whether to enable HTML5 client-side SQL database support. Client-side
SQL database allows web pages to store structured data and be able to
use SQL to manipulate that data asynchronously.
Whether to enable HTML5 localStorage support. localStorage provides
simple synchronous storage access.
Enable or disable support for <a ping>.
Enable or disable support for the Java <applet> tag. Keep in
mind that Java content can be still shown in the page through
<object> or <embed>, which are the preferred tags for this task.
Whether to enable HTML5 offline web application cache support. Offline
Web Application Cache ensures web applications are available even when
the user is not connected to the network.
Enable or disable the page cache. Disabling the page cache is
generally only useful for special circumstances like low-memory
scenarios or special purpose applications like static HTML
viewers. This setting only controls the Page Cache, this cache
is different than the disk-based or memory-based traditional
resource caches, its point is to make going back and forth
between pages much faster. For details about the different types
of caches and their purposes see:
http://webkit.org/blog/427/webkit-page-cache-i-the-basics/
Whether to enable private browsing mode. Private browsing mode prevents
WebKit from updating the global history and storing any session
information e.g., on-disk cache, as well as suppressing any messages
from being printed into the (javascript) console.
This is currently experimental for WebKitGtk.
Whether to enable the Spatial Navigation. This feature consists in the ability
to navigate between focusable elements in a Web page, such as hyperlinks and
form controls, by using Left, Right, Up and Down arrow keys. For example, if
an user presses the Right key, heuristics determine whether there is an element
he might be trying to reach towards the right, and if there are multiple elements,
which element he probably wants.
Whether to enable spell checking while typing.
Whether to allow files loaded through file:// URIs universal access to
all pages.
Whether to enable the XSS Auditor. This feature filters some kinds of
reflective XSS attacks on vulnerable web sites.
Enforce a resolution of 96 DPI. This is meant for compatibility
with web pages which cope badly with different screen resolutions
and for automated testing.
Web browsers and applications that typically display arbitrary
content from the web should provide a preference for this.
Whether JavaScript can access Clipboard.
Whether JavaScript can open popup windows automatically without user
intervention.
The languages to be used for spell checking, separated by commas.
The locale string typically is in the form lang_COUNTRY, where lang
is an ISO-639 language code, and COUNTRY is an ISO-3166 country code.
For instance, sv_FI for Swedish as written in Finland or pt_BR
for Portuguese as written in Brazil.
If no value is specified then the value returned by
gtk_get_default_language will be used.
Whether the tab key cycles through elements on the page.
If @flag is %TRUE, pressing the tab key will focus the next element in
the @web_view. If @flag is %FALSE, the @web_view will interpret tab
key presses as normal key presses. If the selected element is editable, the
tab key will cause the insertion of a tab character.
The User-Agent string used by WebKitGtk.
This will return a default User-Agent string if a custom string wasn't
provided by the application. Setting this property to a NULL value or
an empty string will result in the User-Agent string being reset to the
default value.
The value by which the zoom level is changed when zooming in or out.
#WebKitWebView is the central class of the WebKitGTK+ 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.
<programlisting>
/<!-- -->* Create the widgets *<!-- -->/
GtkWidget *main_window = gtk_window_new (GTK_WINDOW_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_load_uri (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);
</programlisting>
Copies the current selection inside the @web_view to the clipboard.
Cuts the current selection inside the @web_view to the clipboard.
Pastes the current contents of the clipboard to the @web_view.
Redoes the last editing command in the view, if possible.
Attempts to select everything inside the @web_view.
Undoes the last editing command in the view, if possible.
Determines whether or not it is currently possible to copy to the clipboard.
%TRUE if a selection can be copied, %FALSE if not
Determines whether or not it is currently possible to cut to the clipboard.
%TRUE if a selection can be cut, %FALSE if not
Determines whether #web_view has a previous history item.
%TRUE if able to move back, %FALSE otherwise
Determines whether #web_view has a history item of @steps. Negative values
represent steps backward while positive values represent steps forward.
steps, %FALSE otherwise
%TRUE if able to move back or forward the given number of
the number of steps
Determines whether #web_view has a next history item.
%TRUE if able to move forward, %FALSE otherwise
Determines whether or not it is currently possible to paste from the clipboard.
%TRUE if a selection can be pasted, %FALSE if not
Determines whether or not it is currently possible to redo the last
editing command in the view.
%TRUE if a redo can be done, %FALSE if not
This functions returns whether or not a MIME type can be displayed using this view.
a #gboolean indicating if the MIME type can be displayed
a MIME type
Determines whether or not it is currently possible to undo the last
editing command in the view.
%TRUE if a undo can be done, %FALSE if not
Copies the current selection inside the @web_view to the clipboard.
Cuts the current selection inside the @web_view to the clipboard.
Deletes the current selection inside the @web_view.
Obtains the #WebKitWebBackForwardList associated with the given #WebKitWebView. The
#WebKitWebBackForwardList is owned by the #WebKitWebView.
the #WebKitWebBackForwardList
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 values from the #WebKitWebViewTargetInfo enum,
using gtk_target_list_add() and
gtk_target_list_add_text_targets().
the #GtkTargetList
Returns the current encoding of the #WebKitWebView, not the default-encoding
of WebKitWebSettings.
a string containing the current custom encoding for @web_view, or %NULL if there's none set.
the #WebKitDOMDocument currently loaded in the @webView
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.
a #gboolean indicating the editable state
Returns the default encoding of the #WebKitWebView.
the default encoding
Returns the frame that has focus or an active text selection.
The focused #WebKitWebFrame or %NULL if no frame is focused
Returns whether the zoom level affects only text or all elements.
%TRUE if the full content of the view should be scaled.
%FALSE if only text should be scaled (the default),
Does a 'hit test' in the coordinates specified by @event to figure
out context information about that position in the @webView.
specified position.
a newly created #WebKitHitTestResult with the context of the
a #GdkEventButton
Obtains a #GdkPixbuf of the favicon for the given #WebKitWebView, or
a default icon if there is no icon for the given page. Use
webkit_web_view_get_icon_uri() if you need to distinguish these cases.
Usually you want to connect to WebKitWebView::icon-loaded and call this
method in the callback.
The pixbuf will have the largest size provided by the server and should
be resized before it is displayed.
See also webkit_icon_database_get_icon_pixbuf().
a new reference to a #GdkPixbuf, or %NULL
Obtains the URI for the favicon for the given #WebKitWebView, or
%NULL if there is none.
the URI for the favicon, or %NULL
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.
the #WebKitWebInspector instance.
Determines the current status of the load.
Returns the main frame for the @webView.
the main #WebKitWebFrame for @webView
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 values from the #WebKitWebViewTargetInfo enum,
using gtk_target_list_add() and
gtk_target_list_add_text_targets().
the #GtkTargetList
Determines the current progress of the load.
Obtains the #WebKitWebSettings associated with the
#WebKitWebView. The #WebKitWebView always has an associated
instance of #WebKitWebSettings. The reference that is returned by
this call is owned by the #WebKitWebView. You may need to increase
its reference count if you intend to keep it alive for longer than
the #WebKitWebView.
the #WebKitWebSettings instance
Returns the @web_view's document title
the title of @web_view
Returns whether the #WebKitWebView has a transparent background.
(the default), otherwise %TRUE.
%FALSE when the #WebKitWebView draws a solid background
Returns the current URI of the contents displayed by the @web_view
the URI of @web_view
Gets the value of the view-mode property of the
#WebKitWebView. Check the property's documentation for more
information.
#WebKitWebView.
the %WebKitWebViewViewMode currently set for the
%TRUE if @web_view is in view source mode, %FALSE otherwise.
Obtains the #WebKitViewportAttributes associated with the
#WebKitWebView. Every #WebKitWebView object has a
#WebKitWebViewporAttributes 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. Do note however that the viewport
attributes object only contains valid information when the current
page has a viewport meta tag. You can check whether the data should
be used by checking the #WebKitViewport:valid property.
the #WebKitViewportAttributes instance.
Returns the instance of #WebKitWebWindowFeatures held by the given
#WebKitWebView.
the #WebKitWebWindowFeatures
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.
the zoom level of @web_view
Loads the previous history item.
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.
the number of steps
Loads the next history item.
Go to the specified #WebKitWebHistoryItem
%TRUE if loading of item is successful, %FALSE if not
a #WebKitWebHistoryItem*
Determines whether text was selected.
%TRUE if there is selected text, %FALSE if not
Requests loading of the given @content with the specified @base_uri.
an URI string
the base URI for relative locations
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_view_stop_loading() to
stop the load.
a #WebKitNetworkRequest
Requests loading of the given @content with the specified @mime_type,
If @mime_type is %NULL, "text/html" is assumed.
If @encoding is %NULL, "UTF-8" is assumed.
an URI string
the MIME type, or %NULL
the encoding, or %NULL
the base URI for relative locations
Requests loading of the specified URI string.
an URI string
Attempts to highlight all occurances of #string inside #web_view.
the number of strings highlighted
a string to look for
whether to respect the case of text
the maximum number of strings to look for or 0 for all
Move the cursor in @view as described by @step and @count.
a #GtkMovementStep
integer describing the direction of the movement. 1 for forward, -1 for backwards.
Requests loading of the specified URI string.
an URI
Pastes the current contents of the clipboard to the @web_view.
Redoes the last editing command in the view, if possible.
Reloads the @web_view without using any cached data.
Looks for a specified string inside #web_view.
%TRUE on success or %FALSE on failure
a string to look for
whether to respect the case of text
whether to find forward or not
whether to continue looking at the beginning after reaching the end
Attempts to select everything inside the @web_view.
Sets the current #WebKitWebView encoding, without modifying the default one,
and reloads the page.
the new encoding, or %NULL to restore the default encoding
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.
a #gboolean indicating the editable state
Sets whether the zoom level affects only text or all elements.
%FALSE if only text should be scaled (the default), %TRUE if the full content of the view should be scaled.
Highlights text matches previously marked by webkit_web_view_mark_text_matches.
whether to highlight text matches
Set the view to maintain a back or forward list of history items.
to tell the view to maintain a back or forward list
Replaces the #WebKitWebSettings instance that is currently attached
to @web_view with @settings. The reference held by the @web_view on
the old #WebKitWebSettings instance is dropped, and the reference
count of @settings is inscreased.
The settings are automatically applied to @web_view.
the #WebKitWebSettings to be set
Sets whether the #WebKitWebView has a transparent background.
Pass %FALSE to have the #WebKitWebView draw a solid background
(the default), otherwise %TRUE.
Sets the view-mode property of the #WebKitWebView. Check the
property's documentation for more information.
the %WebKitWebViewViewMode to be set
Set whether the view should be in view source mode. Setting this mode to
%TRUE before loading a URI will display the source of the web page in a
nice and readable format.
the mode to turn on or off view source mode
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.
the new zoom level
Stops any ongoing load in the @webView.
Undoes the last editing command in the view, if possible.
Removes highlighting previously set by webkit_web_view_mark_text_matches.
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.
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.
The list of targets this web view supports for clipboard copying.
The custom encoding of the web view.
The default encoding of the web view.
Whether the full content is scaled when zooming.
The URI for the favicon for the #WebKitWebView.
The GtkIMMulticontext for the #WebKitWebView.
This is the input method context used for all text entry widgets inside
the #WebKitWebView. It can be used to generate context menu items for
controlling the active input method.
Determines the current status of the load.
Connect to "notify::load-status" to monitor loading.
Some versions of WebKitGTK+ emitted this signal for the default
error page, while loading it. This behavior was considered bad,
because it was essentially exposing an implementation
detail. From 1.1.19 onwards this signal is no longer emitted for
the default error pages, but keep in mind that if you override
the error pages by using webkit_web_frame_load_alternate_string()
the signals will be emitted.
The list of targets this web view supports for clipboard pasting.
Determines the current progress of the load.
Returns the @web_view's document title.
Returns the current URI of the contents displayed by the @web_view.
The "view-mode" media feature for the #WebKitWebView.
The "view-mode" media feature is additional information for web
applications about how the application is running, when it comes
to user experience. Whether the application is running inside a
regular browser window, in a dedicated window, fullscreen, for
instance.
This property stores a %WebKitWebViewViewMode value that matches
the "view-mode" media feature the web application will see.
See http://www.w3.org/TR/view-mode/ for more information.
The associated #WebKitViewportAttributes instance.
The associated WebKitWebInspector instance.
An associated WebKitWebWindowFeatures instance.
The level of zoom of the content.
Emitted when closing a #WebKitWebView is requested. This occurs when a
call is made from JavaScript's window.close function. The default
signal handler does not do anything. It is the owner's responsibility
to hide or delete the web view, if necessary.
%FALSE to propagate the event furter
%TRUE to stop handlers from being invoked for the event or
A JavaScript console message was created.
event. %FALSE to propagate the event further.
%TRUE to stop other handlers from being invoked for the
the message text
the line where the error occured
the source id
The #WebKitWebView::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.
The #WebKitWebView::create-plugin-widget signal will be emitted to
create a plugin widget for embed or object HTML tags. This
allows to embed a GtkWidget as a plugin into HTML content. In
case of a textual selection of the GtkWidget WebCore will attempt
to set the property value of "webkit-widget-is-selected". This can
be used to draw a visual indicator of the selection.
a new #GtkWidget, or %NULL
the mimetype of the requested object
the URI to load
a #GHashTable with additional attributes (strings)
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 #WebKitWebView::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.
a newly allocated #WebKitWebView, or %NULL
the #WebKitWebFrame
The #WebKitWebView::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.
The #WebKitWebView::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.
the relevant frame
the #WebKitWebDatabase which exceeded the quota of its #WebKitSecurityOrigin
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
WebKitWebView::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_view_can_show_mime_type()).
cancel it
TRUE if the download should be performed, %FALSE to
a #WebKitDownload object that lets you control the download process
When a @frame wants to cancel geolocation permission it had requested
before.
the frame that cancels geolocation request.
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() 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.
the frame that requests permission
a WebKitGeolocationPolicyDecision
When the cursor is over a link, this signal is emitted.
the link's title
the URI the link points to
This signal is emitted when the main frame has got a favicon.
See WebKitIconDatabase::icon-loaded if you want to keep track of
icons for child frames.
the URI for the icon
When a #WebKitWebFrame loaded the first data this signal is emitted.
the main frame that received the first data
An error occurred while loading. By default, if the signal is not
handled, the @web_view will display a stock error page. You need to
handle the signal if you want to provide your own error page.
event. %FALSE to propagate the event further.
%TRUE to stop other handlers from being invoked for the
the #WebKitWebFrame
the URI that triggered the error
the #GError that was triggered
the #WebKitWebFrame
the global progress
When a #WebKitWebFrame begins to load this signal is emitted.
the frame going to do the load
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.
default behavior apply
%TRUE if a decision was made, %FALSE to have the
the #WebKitWebFrame that required the policy decision
a WebKitNetworkRequest
the MIME type attempted to load
a #WebKitWebPolicyDecision
The #WebKitWebView::move-cursor will be emitted to apply the
cursor movement described by its parameters to the @view.
%TRUE or %FALSE
the type of movement, one of #GtkMovementStep
an integer indicating the subtype of movement. Currently the permitted values are '1' = forward, '-1' = backwards.
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.
default behavior apply
%TRUE if a decision was made, %FALSE to have the
the #WebKitWebFrame that required the navigation
a #WebKitNetworkRequest
a #WebKitWebNavigationAction
a #WebKitWebPolicyDecision
Emitted when @frame requests a navigation to another page.
instead
a #WebKitNavigationResponse
the #WebKitWebFrame that required the navigation
a #WebKitNetworkRequest
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-web-view 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.
default behavior apply
%TRUE if a decision was made, %FALSE to have the
the #WebKitWebFrame that required the navigation
a #WebKitNetworkRequest
a #WebKitWebNavigationAction
a #WebKitWebPolicyDecision
When a #WebKitWebFrame receives an onload event this signal is emitted.
the frame
The #WebKitWebView::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.
When a context menu is about to be displayed this signal is emitted.
Add menu items to #menu to extend the context menu.
the context menu
Emitted when printing is requested by the frame, usually
because of a javascript call. When handling this signal you
should call webkit_web_frame_print_full() or
webkit_web_frame_print() to do the actual printing.
The default handler will present a print dialog and carry a
print operation. Notice that this means that if you intend to
ignore a print request you must connect to this signal, and
return %TRUE.
the default handler should run
%TRUE if the print request has been handled, %FALSE if
the frame that is requesting to be printed
The #WebKitWebView::redo signal is a keybinding signal which gets emitted to
redo the last editing command.
The default binding for this signal is Ctrl-Shift-z
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.
the #WebKitWebFrame whose load dispatched this request
an empty #WebKitWebResource object
the #WebKitNetworkRequest that will be dispatched
the #WebKitNetworkResponse representing the redirect response, if any
A JavaScript alert dialog was created.
event. %FALSE to propagate the event further.
%TRUE to stop other handlers from being invoked for the
the relevant frame
the message text
A JavaScript confirm dialog was created, providing Yes and No buttons.
event. %FALSE to propagate the event further.
%TRUE to stop other handlers from being invoked for the
the relevant frame
the message text
whether the dialog has been confirmed
A JavaScript prompt dialog was created, providing an entry to input text.
event. %FALSE to propagate the event further.
%TRUE to stop other handlers from being invoked for the
the relevant frame
the message text
the default value
To be filled with the return value or NULL if the dialog was cancelled.
The #WebKitWebView::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.
When a #WebKitWebFrame changes the document title this signal is emitted.
the main frame
the new title
The #WebKitWebView::undo signal is a keybinding signal which gets emitted to
undo the last editing command.
The default binding for this signal is Ctrl-z
Emitted after #WebKitWebView::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.
%FALSE to propagate the event furter
%TRUE to stop handlers from being invoked for the event or
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.
the #WebKitWebFrame to which @window_object belongs
the #JSGlobalContextRef holding the global object and other execution state; equivalent to the return value of webkit_web_frame_get_global_context(@frame)
the #JSObjectRef representing the frame's JavaScript window object
The content of a #WebKitWebView can request to change certain
properties of a #WebKitWebView. This can include the x, y position
of the window, the width and height but also if a toolbar,
scrollbar, statusbar, locationbar should be visible to the user,
the request to show the #WebKitWebView fullscreen.
In the normal case one will use #webkit_web_view_get_window_features
to get the #WebKitWebWindowFeatures and then monitor the property
changes. Be aware that the #WebKitWebWindowFeatures might change
before #WebKitWebView::web-view-ready signal is emitted.
To be safe listen to the notify::window-features signal of the #WebKitWebView
and reconnect the signals whenever the #WebKitWebWindowFeatures of
a #WebKitWebView changes.
<informalexample><programlisting>
/<!-- -->* Get the current WebKitWebWindowFeatures *<!-- -->/
WebKitWebWindowFeatures *features = webkit_web_view_get_window_features (my_webview);
/<!-- -->* Connect to the property changes *<!-- -->/
g_signal_connect (G_OBJECT(features), "notify::menubar-visible", G_CALLBACK(make_menu_bar_visible), NULL);
g_signal_connect (G_OBJECT(features), "notify::statusbar-visible", G_CALLBACK(make_status_bar_visible), NULL);
</programlisting></informalexample>
Creates a new #WebKitWebWindowFeatures instance with default values. It must
be manually attached to a WebView.
a new #WebKitWebWindowFeatures instance
Decides if a #WebKitWebWindowFeatures instance equals another, as
in has the same values.
otherwise
%TRUE if the instances have the same values, %FALSE
another #WebKitWebWindowFeatures instance
Controls whether window will be displayed fullscreen.
The height of the window on the screen.
Controls whether the locationbar should be visible for the window.
Controls whether the menubar should be visible for the window.
Controls whether the scrollbars should be visible for the window.
Controls whether the statusbar should be visible for the window.
Controls whether the toolbar should be visible for the window.
The width of the window on the screen.
The starting x position of the window on the screen.
The starting y position of the window on the screen.
Returns the maximum size of the cache storage.
By default it is set to UINT_MAX i.e. no quota.
the current application cache maximum storage size
Sets new application cache maximum storage size.
Changing the application cache storage size will clear the cache
and rebuild cache storage.
the new web application cache maximum storage size
Will send the allow decision to the policy implementer.
a #WebKitGeolocationPolicyDecision
Will send the deny decision to the policy implementer.
a #WebKitGeolocationPolicyDecision
Returns the current cache model. For more information about this
value check the documentation of the function
webkit_set_cache_model().
the current #WebKitCacheModel
Retrieves the default #SoupSession used by all web views.
Note that the session features are added by WebKit on demand,
so if you insert your own #SoupCookieJar before any network
traffic occurs, WebKit will use it instead of the default.
the default #SoupSession
Returns the default quota for Web Database databases. By default
this value is 5MB.
the current default database quota in bytes
Returns the #WebKitIconDatabase providing access to website icons.
the current #WebKitIconDatabase
Returns the current path to the directory WebKit will write Web
Database databases. By default this path will be in the user data
directory.
the current database directory path
Returns the current #WebKitWebPluginDatabase with information about
all the plugins WebKit knows about in this instance.
the current #WebKitWebPluginDatabase
The major version number of the WebKit that is linked against.
The major version
The micro version number of the WebKit that is linked against.
The micro version
The minor version number of the WebKit that is linked against.
The minor version
Removes all web databases from the current database directory path.
Specifies a usage model for WebViews, which WebKit will use to
determine its caching behavior. All web views follow the cache
model. This cache model determines the RAM and disk space to use
for caching previously viewed content .
Research indicates that users tend to browse within clusters of
documents that hold resources in common, and to revisit previously
visited documents. WebKit and the frameworks below it include
built-in caches that take advantage of these patterns,
substantially improving document load speed in browsing
situations. The WebKit cache model controls the behaviors of all of
these caches, including various WebCore caches.
Browsers can improve document load speed substantially by
specifying WEBKIT_CACHE_MODEL_WEB_BROWSER. Applications without a
browsing interface can reduce memory usage substantially by
specifying WEBKIT_CACHE_MODEL_DOCUMENT_VIEWER. Default value is
WEBKIT_CACHE_MODEL_WEB_BROWSER.
a #WebKitCacheModel
Sets the current path to the directory WebKit will write Web
Database databases.
the new default database quota
Sets the current path to the directory WebKit will write Web
Database databases.
the new database directory path