pub struct WebView { /* private fields */ }Expand description
The central class of the WPE WebKit and WebKitGTK APIs.
WebView is the central class of the WPE WebKit and WebKitGTK
APIs. It is responsible for managing the drawing of the content and
forwarding of events. You can load any URI into the WebView or
a data string. With Settings you can control various aspects
of the rendering and loading of the content.
Note that in WebKitGTK, WebView is scrollable by itself, so
you don’t need to embed it in a GtkScrolledWindow.
§Properties
§automation-presentation-type
The AutomationBrowsingContextPresentation of WebView. This should only be used when
creating a new WebView as a response to create-web-view
signal request. If the new WebView was added to a new tab of current browsing context window
AutomationBrowsingContextPresentation::Tab should be used.
Readable | Writeable | Construct Only
§camera-capture-state
Capture state of the camera device. Whenever the user grants a media-request sent by the web
page, requesting video capture capabilities (navigator.mediaDevices.getUserMedia({video: true})) this property will be set to MediaCaptureState::Active.
The application can monitor this property and provide a visual indicator allowing to optionally
deactivate or mute the capture device by setting this property respectively to
MediaCaptureState::None or MediaCaptureState::Muted.
If the capture state of the device is set to MediaCaptureState::None the web-page
can still re-request the permission to the user. Permission desision caching is left to the
application.
Readable | Writeable
§default-content-security-policy
The default Content-Security-Policy used by the webview as if it were set by an HTTP header.
This applies to all content loaded including through navigation or via the various
webkit_web_view_load_* APIs. However do note that many WebKit APIs bypass
Content-Security-Policy in general such as UserContentManager and
webkit_web_view_run_javascript().
Policies are additive so if a website sets its own policy it still applies on top of the policy set here.
Readable | Writeable | Construct Only
§display-capture-state
Capture state of the display device. Whenever the user grants a media-request sent by the web
page, requesting screencasting capabilities (navigator.mediaDevices.getDisplayMedia() this property will be set to [MediaCaptureState::Active`]crate::MediaCaptureState::Active.
The application can monitor this property and provide a visual indicator allowing to
optionally deactivate or mute the capture device by setting this property respectively to
MediaCaptureState::None or MediaCaptureState::Muted.
If the capture state of the device is set to MediaCaptureState::None the web-page
can still re-request the permission to the user. Permission desision caching is left to the
application.
Readable | Writeable
§editable
Whether the pages loaded inside WebView are editable. For more
information see WebViewExt::set_editable().
Readable | Writeable
§estimated-load-progress
An estimate of the percent completion for the current loading operation. This value will range from 0.0 to 1.0 and, once a load completes, will remain at 1.0 until a new load starts, at which point it will be reset to 0.0. The value is an estimate based on the total number of bytes expected to be received for a document, including all its possible subresources and child documents.
Readable
§favicon
The favicon currently associated to the WebView.
See WebViewExt::favicon() for more details.
Readable
§is-controlled-by-automation
Whether the WebView is controlled by automation tools (e.g. WebDriver, Selenium). This is
required for views returned as a response to create-web-view signal,
alongside any view you want to control during an automation session.
As a G_PARAM_CONSTRUCT_ONLY, you need to set it during construction and it can’t be modified.
If related-view is also passed during construction, is-controlled-by-automation
ignores its own parameter and inherits directly from the related view is-controlled-by-automation
property. This is the recommended way when creating new views as a response to the create
signal. For example, as response to JavaScript window.open() calls during an automation session.
Readable | Writeable | Construct Only
§is-immersive-mode-enabled
Whether the WebView is in immersive mode.
Readable
§is-loading
Whether the WebView is currently loading a page. This property becomes
true as soon as a new load operation is requested and before the
load-changed signal is emitted with LoadEvent::Started and
at that point the active URI is the requested one.
When the load operation finishes the property is set to false before
load-changed is emitted with LoadEvent::Finished.
Readable
§is-muted
Whether the WebView audio is muted. When true, audio is silenced.
It may still be playing, i.e. is-playing-audio may be true.
Readable | Writeable
§is-playing-audio
Whether the WebView is currently playing audio from a page.
This property becomes true as soon as web content starts playing any
kind of audio. When a page is no longer playing any kind of sound,
the property is set back to false.
Readable
§is-web-process-responsive
Whether the web process currently associated to the WebView is responsive.
Readable
§microphone-capture-state
Capture state of the microphone device. Whenever the user grants a media-request sent by the web
page, requesting audio capture capabilities (navigator.mediaDevices.getUserMedia({audio: true})) this property will be set to MediaCaptureState::Active.
The application can monitor this property and provide a visual indicator allowing to
optionally deactivate or mute the capture device by setting this property respectively to
MediaCaptureState::None or MediaCaptureState::Muted.
If the capture state of the device is set to MediaCaptureState::None the web-page
can still re-request the permission to the user. Permission desision caching is left to the
application.
Readable | Writeable
§network-session
The NetworkSession of the view
Readable | Writeable | Construct Only
§page-id
The identifier of the WebKitWebPage corresponding to the WebView.
Readable
§related-view
The related WebView used when creating the view to share the
same web process and network session. This property is not readable
because the related web view is only valid during the object construction.
Writeable | Construct Only
§settings
The Settings of the view.
Writeable | Construct
§theme-color
The theme color of the WebView’s current page.
Readable
§title
The main frame document title of this WebView. If
the title has not been received yet, it will be None.
Readable
§uri
The current active URI of the WebView.
See WebViewExt::uri() for more details.
Readable
§user-content-manager
The UserContentManager of the view.
Readable | Writeable | Construct Only
§web-context
The WebContext of the view.
Readable | Writeable | Construct Only
§web-extension-mode
This configures web_view to treat the content as a WebExtension.
Note that this refers to the web standard WebExtensions and not WebKitWebExtensions.
In practice this limits the Content-Security-Policies that are allowed to be set. Some details can be found in Chrome’s documentation.
Readable | Writeable | Construct Only
§website-policies
The WebsitePolicies for the view.
Readable | Writeable | Construct Only
§zoom-level
The zoom level of the WebView content.
See WebViewExt::set_zoom_level() for more details.
Readable | Writeable
Widget
§can-focus
Whether the widget or any of its descendents can accept the input focus.
This property is meant to be set by widget implementations, typically in their instance init function.
Readable | Writeable
§can-target
Whether the widget can receive pointer events.
Readable | Writeable
§css-classes
A list of css classes applied to this widget.
Readable | Writeable
§css-name
The name of this widget in the CSS tree.
This property is meant to be set by widget implementations, typically in their instance init function.
Readable | Writeable | Construct Only
§cursor
The cursor used by widget.
Readable | Writeable
§focus-on-click
Whether the widget should grab focus when it is clicked with the mouse.
This property is only relevant for widgets that can take focus.
Readable | Writeable
§focusable
Whether this widget itself will accept the input focus.
Readable | Writeable
§halign
How to distribute horizontal space if widget gets extra space.
Readable | Writeable
§has-default
Whether the widget is the default widget.
Readable
§has-focus
Whether the widget has the input focus.
Readable
§has-tooltip
Enables or disables the emission of the [signalGtk::query-tooltip]
signal on widget.
A true value indicates that widget can have a tooltip, in this case
the widget will be queried using [signalGtk::query-tooltip] to
determine whether it will provide a tooltip or not.
Readable | Writeable
§height-request
Overrides for height request of the widget.
If this is -1, the natural request will be used.
Readable | Writeable
§hexpand
Whether to expand horizontally.
Readable | Writeable
§hexpand-set
Whether to use the hexpand property.
Readable | Writeable
§layout-manager
The [classGtk] instance to use to compute
the preferred size of the widget, and allocate its children.
This property is meant to be set by widget implementations, typically in their instance init function.
Readable | Writeable
§limit-events
Makes this widget act like a modal dialog, with respect to event delivery.
Global event controllers will not handle events with targets
inside the widget, unless they are set up to ignore propagation
limits. See [methodGtk.set_propagation_limit].
Readable | Writeable
§margin-bottom
Margin on bottom side of widget.
This property adds margin outside of the widget’s normal size
request, the margin will be added in addition to the size from
[methodGtk.set_size_request] for example.
Readable | Writeable
§margin-end
Margin on end of widget, horizontally.
This property supports left-to-right and right-to-left text directions.
This property adds margin outside of the widget’s normal size
request, the margin will be added in addition to the size from
[methodGtk.set_size_request] for example.
Readable | Writeable
§margin-start
Margin on start of widget, horizontally.
This property supports left-to-right and right-to-left text directions.
This property adds margin outside of the widget’s normal size
request, the margin will be added in addition to the size from
[methodGtk.set_size_request] for example.
Readable | Writeable
§margin-top
Margin on top side of widget.
This property adds margin outside of the widget’s normal size
request, the margin will be added in addition to the size from
[methodGtk.set_size_request] for example.
Readable | Writeable
§name
The name of the widget.
Readable | Writeable
§opacity
The requested opacity of the widget.
Readable | Writeable
§overflow
How content outside the widget’s content area is treated.
This property is meant to be set by widget implementations, typically in their instance init function.
Readable | Writeable
§parent
The parent widget of this widget.
Readable
§receives-default
Whether the widget will receive the default action when it is focused.
Readable | Writeable
§root
The GtkRoot widget of the widget tree containing this widget.
This will be NULL if the widget is not contained in a root widget.
Readable
§scale-factor
The scale factor of the widget.
Readable
§sensitive
Whether the widget responds to input.
Readable | Writeable
§tooltip-markup
Sets the text of tooltip to be the given string, which is marked up with Pango markup.
Also see [methodGtk.set_markup].
This is a convenience property which will take care of getting the
tooltip shown if the given string is not NULL:
[propertyGtk:has-tooltip] will automatically be set to true
and there will be taken care of [signalGtk::query-tooltip] in
the default signal handler.
Note that if both [propertyGtk:tooltip-text] and
[propertyGtk:tooltip-markup] are set, the last one wins.
Readable | Writeable
§tooltip-text
Sets the text of tooltip to be the given string.
Also see [methodGtk.set_text].
This is a convenience property which will take care of getting the
tooltip shown if the given string is not NULL:
[propertyGtk:has-tooltip] will automatically be set to true
and there will be taken care of [signalGtk::query-tooltip] in
the default signal handler.
Note that if both [propertyGtk:tooltip-text] and
[propertyGtk:tooltip-markup] are set, the last one wins.
Readable | Writeable
§valign
How to distribute vertical space if widget gets extra space.
Readable | Writeable
§vexpand
Whether to expand vertically.
Readable | Writeable
§vexpand-set
Whether to use the vexpand property.
Readable | Writeable
§visible
Whether the widget is visible.
Readable | Writeable
§width-request
Overrides for width request of the widget.
If this is -1, the natural request will be used.
Readable | Writeable
Accessible
§accessible-role
The accessible role of the given gtk::Accessible implementation.
The accessible role cannot be changed once set.
Readable | Writeable
§Signals
§authenticate
This signal is emitted when the user is challenged with HTTP
authentication. To let the application access or supply
the credentials as well as to allow the client application
to either cancel the request or perform the authentication,
the signal will pass an instance of the
AuthenticationRequest in the request argument.
To handle this signal asynchronously you should keep a ref
of the request and return true. To disable HTTP authentication
entirely, connect to this signal and simply return true.
The default signal handler will run a default authentication dialog asynchronously for the user to interact with.
§close
Emitted when closing a WebView is requested. This occurs when a
call is made from JavaScript’s <function>window.close</function> function or
after trying to close the web_view with WebViewExt::try_close().
It is the owner’s responsibility to handle this signal to hide or
destroy the WebView, if necessary.
§context-menu
Emitted when a context menu is about to be displayed to give the application
a chance to customize the proposed menu, prevent the menu from being displayed,
or build its own context menu.
<itemizedlist>
<listitem>``<para>
To customize the proposed menu you can use ContextMenu::prepend(),
ContextMenu::append() or ContextMenu::insert() to add new
ContextMenuItems to context_menu, ContextMenu::move_item()
to reorder existing items, or ContextMenu::remove() to remove an
existing item. The signal handler should return false, and the menu represented
by context_menu will be shown.
</para>``</listitem>
<listitem>``<para>
To prevent the menu from being displayed you can just connect to this signal
and return true so that the proposed menu will not be shown.
</para>``</listitem>
<listitem>``<para>
To build your own menu, you can remove all items from the proposed menu with
ContextMenu::remove_all(), add your own items and return false so
that the menu will be shown. You can also ignore the proposed ContextMenu,
build your own GtkMenu and return true to prevent the proposed menu from being shown.
</para>``</listitem>
<listitem>``<para>
If you just want the default menu to be shown always, simply don’t connect to this
signal because showing the proposed context menu is the default behaviour.
</para>``</listitem>
</itemizedlist>
If the signal handler returns false the context menu represented by context_menu
will be shown, if it return true the context menu will not be shown.
The proposed ContextMenu passed in context_menu argument is only valid
during the signal emission.
§context-menu-dismissed
Emitted after context-menu signal, if the context menu is shown,
to notify that the context menu is dismissed.
§create
Emitted when the creation of a new WebView is requested.
If this signal is handled the signal handler should return the
newly created WebView.
The NavigationAction parameter contains information about the
navigation action that triggered this signal.
The new WebView must be related to web_view, see
related-view for more details.
The new WebView should not be displayed to the user
until the ready-to-show signal is emitted.
For creating views as response to automation tools requests, see the
create-web-view signal.
§decide-policy
This signal is emitted when WebKit is requesting the client to decide a policy
decision, such as whether to navigate to a page, open a new window or whether or
not to download a resource. The NavigationPolicyDecision passed in the
decision argument is a generic type, but should be casted to a more
specific type when making the decision. For example:
⚠️ The following code is in c ⚠️
static gboolean
decide_policy_cb (WebKitWebView *web_view,
WebKitPolicyDecision *decision,
WebKitPolicyDecisionType type)
{
switch (type) {
case WEBKIT_POLICY_DECISION_TYPE_NAVIGATION_ACTION: {
WebKitNavigationPolicyDecision *navigation_decision = WEBKIT_NAVIGATION_POLICY_DECISION (decision);
// Make a policy decision here
break;
}
case WEBKIT_POLICY_DECISION_TYPE_NEW_WINDOW_ACTION: {
WebKitNavigationPolicyDecision *navigation_decision = WEBKIT_NAVIGATION_POLICY_DECISION (decision);
// Make a policy decision here
break;
}
case WEBKIT_POLICY_DECISION_TYPE_RESPONSE:
WebKitResponsePolicyDecision *response = WEBKIT_RESPONSE_POLICY_DECISION (decision);
// Make a policy decision here
break;
default:
// Making no decision results in webkit_policy_decision_use()
return FALSE;
}
return TRUE;
}It is possible to make policy decision asynchronously, by simply calling g_object_ref()
on the decision argument and returning true to block the default signal handler.
If the last reference is removed on a PolicyDecision and no decision has been
made explicitly, PolicyDecisionExt::use_() will be the default policy decision. The
default signal handler will simply call PolicyDecisionExt::use_(). Only the first
policy decision chosen for a given PolicyDecision will have any affect.
§enter-fullscreen
Emitted when JavaScript code calls
<function>element.webkitRequestFullScreen</function>. If the
signal is not handled the WebView will proceed to full screen
its top level window. This signal can be used by client code to
request permission to the user prior doing the full screen
transition and eventually prepare the top-level window
(e.g. hide some widgets that would otherwise be part of the
full screen window).
§insecure-content-detected
Prior to 2.46, this signal was emitted when insecure content was loaded in a secure content. Since 2.46, this signal is generally no longer emitted.
§leave-fullscreen
Emitted when the WebView is about to restore its top level
window out of its full screen state. This signal can be used by
client code to restore widgets hidden during the
enter-fullscreen stage for instance.
§load-changed
Emitted when a load operation in web_view changes.
The signal is always emitted with LoadEvent::Started when a
new load request is made and LoadEvent::Finished when the load
finishes successfully or due to an error. When the ongoing load
operation fails load-failed signal is emitted
before load-changed is emitted with
LoadEvent::Finished.
If a redirection is received from the server, this signal is emitted
with LoadEvent::Redirected after the initial emission with
LoadEvent::Started and before LoadEvent::Committed.
When the page content starts arriving the signal is emitted with
LoadEvent::Committed event.
You can handle this signal and use a switch to track any ongoing load operation.
⚠️ The following code is in c ⚠️
static void web_view_load_changed (WebKitWebView *web_view,
WebKitLoadEvent load_event,
gpointer user_data)
{
switch (load_event) {
case WEBKIT_LOAD_STARTED:
// New load, we have now a provisional URI
provisional_uri = webkit_web_view_get_uri (web_view);
// Here we could start a spinner or update the
// location bar with the provisional URI
break;
case WEBKIT_LOAD_REDIRECTED:
redirected_uri = webkit_web_view_get_uri (web_view);
break;
case WEBKIT_LOAD_COMMITTED:
// The load is being performed. Current URI is
// the final one and it won't change unless a new
// load is requested or a navigation within the
// same page is performed
uri = webkit_web_view_get_uri (web_view);
break;
case WEBKIT_LOAD_FINISHED:
// Load finished, we can now stop the spinner
break;
}
}§load-failed
Emitted when an error occurs during a load operation.
If the error happened when starting to load data for a page
load_event will be LoadEvent::Started. If it happened while
loading a committed data source load_event will be LoadEvent::Committed.
Since a load error causes the load operation to finish, the signal
WebKitWebView::load-changed will always be emitted with
LoadEvent::Finished event right after this one.
By default, if the signal is not handled, a stock error page will be displayed. You need to handle the signal if you want to provide your own error page.
§load-failed-with-tls-errors
Emitted when a TLS error occurs during a load operation.
To allow an exception for this certificate
and the host of failing_uri use webkit_web_context_allow_tls_certificate_for_host().
To handle this signal asynchronously you should call g_object_ref() on certificate
and return true.
If false is returned, load-failed will be emitted. The load
will finish regardless of the returned value.
§mouse-target-changed
This signal is emitted when the mouse cursor moves over an
element such as a link, image or a media element. To determine
what type of element the mouse cursor is over, a Hit Test is performed
on the current mouse coordinates and the result is passed in the
hit_test_result argument. The modifiers argument is a bitmask of
GdkModifierType flags indicating the state of modifier keys.
The signal is emitted again when the mouse is moved out of the
current element with a new hit_test_result.
§permission-request
This signal is emitted when WebKit is requesting the client to decide about a permission request, such as allowing the browser to switch to fullscreen mode, sharing its location or similar operations.
A possible way to use this signal could be through a dialog allowing the user decide what to do with the request:
⚠️ The following code is in c ⚠️
static gboolean permission_request_cb (WebKitWebView *web_view,
WebKitPermissionRequest *request,
GtkWindow *parent_window)
{
GtkWidget *dialog = gtk_message_dialog_new (parent_window,
GTK_DIALOG_MODAL,
GTK_MESSAGE_QUESTION,
GTK_BUTTONS_YES_NO,
"Allow Permission Request?");
gtk_widget_show (dialog);
gint result = gtk_dialog_run (GTK_DIALOG (dialog));
switch (result) {
case GTK_RESPONSE_YES:
webkit_permission_request_allow (request);
break;
default:
webkit_permission_request_deny (request);
break;
}
gtk_widget_destroy (dialog);
return TRUE;
}It is possible to handle permission requests asynchronously, by
simply calling g_object_ref() on the request argument and
returning true to block the default signal handler. If the
last reference is removed on a PermissionRequest and the
request has not been handled, PermissionRequestExt::deny()
will be the default action.
If the signal is not handled, the request will be completed automatically
by the specific PermissionRequest that could allow or deny it. Check the
documentation of classes implementing PermissionRequest interface to know
their default action.
§print
Emitted when printing is requested on web_view, usually by a JavaScript call,
before the print dialog is shown. This signal can be used to set the initial
print settings and page setup of print_operation to be used as default values in
the print dialog. You can call PrintOperation::set_print_settings() and
PrintOperation::set_page_setup() and then return false to propagate the
event so that the print dialog is shown.
You can connect to this signal and return true to cancel the print operation
or implement your own print dialog.
§query-permission-state
This signal allows the User-Agent to respond to permission requests for powerful features, as
specified by the Permissions W3C Specification.
You can reply to the query using PermissionStateQuery::finish().
You can handle the query asynchronously by calling webkit_permission_state_query_ref() on
query and returning true. If the last reference of query is removed and the query has not
been handled, the query result will be set to WEBKIT_QUERY_PERMISSION_PROMPT.
§ready-to-show
Emitted after create on the newly created WebView
when it 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 scrollbars
should be displayed, is already set on the WindowProperties
of web_view. See also WebViewExt::window_properties().
§resource-load-started
Emitted when a new resource is going to be loaded. The request parameter
contains the URIRequest that will be sent to the server.
You can monitor the load operation by connecting to the different signals
of resource.
§run-as-modal
Emitted after ready-to-show on the newly
created WebView when JavaScript code calls
<function>window.showModalDialog</function>. The purpose of
this signal is to allow the client application to prepare the
new view to behave as modal. Once the signal is emitted a new
main loop will be run to block user interaction in the parent
WebView until the new dialog is closed.
§run-color-chooser
This signal is emitted when the user interacts with a HTML element, requesting from WebKit to show
a dialog to select a color. To let the application know the details of
the color chooser, as well as to allow the client application to either
cancel the request or perform an actual color selection, the signal will
pass an instance of the ColorChooserRequest in the request
argument.
It is possible to handle this request asynchronously by increasing the reference count of the request.
The default signal handler will asynchronously run a regular
GtkColorChooser for the user to interact with.
§run-file-chooser
This signal is emitted when the user interacts with a HTML element, requesting from WebKit to show
a dialog to select one or more files to be uploaded. To let the
application know the details of the file chooser, as well as to
allow the client application to either cancel the request or
perform an actual selection of files, the signal will pass an
instance of the FileChooserRequest in the request
argument.
The default signal handler will asynchronously run a regular
GtkFileChooserDialog for the user to interact with.
§script-dialog
Emitted when JavaScript code calls <function>window.alert</function>,
<function>window.confirm</function> or <function>window.prompt</function>,
or when <function>onbeforeunload</function> event is fired.
The dialog parameter should be used to build the dialog.
If the signal is not handled a different dialog will be built and shown depending
on the dialog type:
<itemizedlist>
<listitem>``<para>
ScriptDialogType::Alert: message dialog with a single Close button.
</para>``</listitem>
<listitem>``<para>
ScriptDialogType::Confirm: message dialog with OK and Cancel buttons.
</para>``</listitem>
<listitem>``<para>
ScriptDialogType::Prompt: message dialog with OK and Cancel buttons and
a text entry with the default text.
</para>``</listitem>
<listitem>``<para>
ScriptDialogType::BeforeUnloadConfirm: message dialog with Stay and Leave buttons.
</para>``</listitem>
</itemizedlist>
It is possible to handle the script dialog request asynchronously, by simply
caling webkit_script_dialog_ref() on the dialog argument and calling
ScriptDialog::close() when done.
If the last reference is removed on a ScriptDialog and the dialog has not been
closed, ScriptDialog::close() will be called.
§show-notification
This signal is emitted when a notification should be presented to the
user. The notification is kept alive until either: 1) the web page cancels it
or 2) a navigation happens.
The default handler will emit a notification using libnotify, if built with support for it.
§show-option-menu
This signal is emitted when a select element in web_view needs to display a
dropdown menu. This signal can be used to show a custom menu, using menu to get
the details of all items that should be displayed. The area of the element in the
WebView is given as rectangle parameter, it can be used to position the
menu.
To handle this signal asynchronously you should keep a ref of the menu.
The default signal handler will pop up a GtkMenu.
§submit-form
This signal is emitted when a form is about to be submitted. The request
argument passed contains information about the text fields of the form. This
is typically used to store login information that can be used later to
pre-fill the form.
The form will not be submitted until FormSubmissionRequest::submit() is called.
It is possible to handle the form submission request asynchronously, by
simply calling g_object_ref() on the request argument and calling
FormSubmissionRequest::submit() when done to continue with the form submission.
If the last reference is removed on a FormSubmissionRequest and the
form has not been submitted, FormSubmissionRequest::submit() will be called.
§user-message-received
This signal is emitted when a UserMessage is received from the
WebKitWebPage corresponding to web_view. You can reply to the message
using UserMessage::send_reply().
You can handle the user message asynchronously by calling g_object_ref() on
message and returning true. If the last reference of message is removed
and the message has not been replied to, the operation in the WebKitWebPage will
finish with error UserMessageError::Message.
§web-process-terminated
This signal is emitted when the web process terminates abnormally due
to reason.
Widget
§destroy
Signals that all holders of a reference to the widget should release the reference that they hold.
May result in finalization of the widget if all references are released.
This signal is not suitable for saving widget state.
§direction-changed
Emitted when the text direction of a widget changes.
§hide
Emitted when widget is hidden.
§keynav-failed
Emitted if keyboard navigation fails.
See [methodGtk.keynav_failed] for details.
§map
Emitted when widget is going to be mapped.
A widget is mapped when the widget is visible (which is controlled with
[propertyGtk:visible]) and all its parents up to the toplevel widget
are also visible.
The ::map signal can be used to determine whether a widget will be drawn,
for instance it can resume an animation that was stopped during the
emission of [signalGtk::unmap].
§mnemonic-activate
Emitted when a widget is activated via a mnemonic.
The default handler for this signal activates widget if group_cycling
is false, or just makes widget grab focus if group_cycling is true.
§move-focus
Emitted when the focus is moved.
The ::move-focus signal is a keybinding signal.
The default bindings for this signal are <kbd>Tab</kbd> to move forward,
and <kbd>Shift</kbd>+<kbd>Tab</kbd> to move backward.
Action
§query-tooltip
Emitted when the widget’s tooltip is about to be shown.
This happens when the [propertyGtk:has-tooltip] property
is true and the hover timeout has expired with the cursor hovering
above widget; or emitted when widget got focus in keyboard mode.
Using the given coordinates, the signal handler should determine
whether a tooltip should be shown for widget. If this is the case
true should be returned, false otherwise. Note that if keyboard_mode
is true, the values of x and y are undefined and should not be used.
The signal handler is free to manipulate tooltip with the therefore
destined function calls.
§realize
Emitted when widget is associated with a GdkSurface.
This means that [methodGtk.realize] has been called
or the widget has been mapped (that is, it is going to be drawn).
§show
Emitted when widget is shown.
§state-flags-changed
Emitted when the widget state changes.
See [methodGtk.get_state_flags].
§unmap
Emitted when widget is going to be unmapped.
A widget is unmapped when either it or any of its parents up to the toplevel widget have been set as hidden.
As ::unmap indicates that a widget will not be shown any longer,
it can be used to, for example, stop an animation on the widget.
§unrealize
Emitted when the GdkSurface associated with widget is destroyed.
This means that [methodGtk.unrealize] has been called
or the widget has been unmapped (that is, it is going to be hidden).
§Implements
WebViewExt, [WebViewBaseExt][trait@crate::prelude::WebViewBaseExt], gtk::prelude::WidgetExt, gtk::prelude::AccessibleExt, gtk::prelude::BuildableExt, gtk::prelude::ConstraintTargetExt
GLib type: GObject with reference counted clone semantics.
Implementations§
Source§impl WebView
impl WebView
pub const NONE: Option<&'static WebView> = None
Sourcepub fn new() -> WebView
pub fn new() -> WebView
Creates a new WebView with the default WebContext.
Creates a new WebView with the default WebContext and
no UserContentManager associated with it.
See also webkit_web_view_new_with_context(),
webkit_web_view_new_with_user_content_manager(), and
webkit_web_view_new_with_settings().
§Returns
The newly created WebView widget
Sourcepub fn builder() -> WebViewBuilder
pub fn builder() -> WebViewBuilder
Creates a new builder-pattern struct instance to construct WebView objects.
This method returns an instance of WebViewBuilder which can be used to create WebView objects.
Trait Implementations§
Source§impl HasParamSpec for WebView
impl HasParamSpec for WebView
Source§impl Ord for WebView
impl Ord for WebView
Source§fn cmp(&self, other: &Self) -> Ordering
fn cmp(&self, other: &Self) -> Ordering
Comparison for two GObjects.
Compares the memory addresses of the provided objects.
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl ParentClassIs for WebView
impl ParentClassIs for WebView
type Parent = WebViewBase
Source§impl<OT: ObjectType> PartialEq<OT> for WebView
impl<OT: ObjectType> PartialEq<OT> for WebView
Source§impl<OT: ObjectType> PartialOrd<OT> for WebView
impl<OT: ObjectType> PartialOrd<OT> for WebView
Source§impl StaticType for WebView
impl StaticType for WebView
Source§fn static_type() -> Type
fn static_type() -> Type
Self.impl Eq for WebView
impl IsA<Accessible> for WebView
impl IsA<Buildable> for WebView
impl IsA<ConstraintTarget> for WebView
impl IsA<WebViewBase> for WebView
impl IsA<Widget> for WebView
Auto Trait Implementations§
impl Freeze for WebView
impl RefUnwindSafe for WebView
impl !Send for WebView
impl !Sync for WebView
impl Unpin for WebView
impl UnsafeUnpin for WebView
impl UnwindSafe for WebView
Blanket Implementations§
Source§impl<O> AccessibleExt for Owhere
O: IsA<Accessible>,
impl<O> AccessibleExt for Owhere
O: IsA<Accessible>,
Source§fn announce(&self, message: &str, priority: AccessibleAnnouncementPriority)
fn announce(&self, message: &str, priority: AccessibleAnnouncementPriority)
v4_14 only.Source§fn accessible_parent(&self) -> Option<Accessible>
fn accessible_parent(&self) -> Option<Accessible>
v4_10 only.fn accessible_role(&self) -> AccessibleRole
Source§fn at_context(&self) -> ATContext
fn at_context(&self) -> ATContext
v4_10 only.Source§fn first_accessible_child(&self) -> Option<Accessible>
fn first_accessible_child(&self) -> Option<Accessible>
v4_10 only.Source§fn next_accessible_sibling(&self) -> Option<Accessible>
fn next_accessible_sibling(&self) -> Option<Accessible>
v4_10 only.Source§fn platform_state(&self, state: AccessiblePlatformState) -> bool
fn platform_state(&self, state: AccessiblePlatformState) -> bool
v4_10 only.fn reset_property(&self, property: AccessibleProperty)
fn reset_relation(&self, relation: AccessibleRelation)
fn reset_state(&self, state: AccessibleState)
Source§fn set_accessible_parent(
&self,
parent: Option<&impl IsA<Accessible>>,
next_sibling: Option<&impl IsA<Accessible>>,
)
fn set_accessible_parent( &self, parent: Option<&impl IsA<Accessible>>, next_sibling: Option<&impl IsA<Accessible>>, )
v4_10 only.Source§fn update_next_accessible_sibling(
&self,
new_sibling: Option<&impl IsA<Accessible>>,
)
fn update_next_accessible_sibling( &self, new_sibling: Option<&impl IsA<Accessible>>, )
v4_10 only.Source§fn update_platform_state(&self, state: AccessiblePlatformState)
fn update_platform_state(&self, state: AccessiblePlatformState)
v4_18 only.fn set_accessible_role(&self, accessible_role: AccessibleRole)
fn connect_accessible_role_notify<F>(&self, f: F) -> SignalHandlerIdwhere
F: Fn(&Self) + 'static,
Source§impl<O> AccessibleExtManual for Owhere
O: IsA<Accessible>,
impl<O> AccessibleExtManual for Owhere
O: IsA<Accessible>,
fn update_property(&self, properties: &[Property<'_>])
fn update_relation(&self, relations: &[Relation<'_>])
fn update_state(&self, states: &[State])
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<O> BuildableExt for O
impl<O> BuildableExt for O
fn buildable_id(&self) -> Option<GString>
Source§impl<T> Cast for Twhere
T: ObjectType,
impl<T> Cast for Twhere
T: ObjectType,
Source§fn upcast<T>(self) -> Twhere
T: ObjectType,
Self: IsA<T>,
fn upcast<T>(self) -> Twhere
T: ObjectType,
Self: IsA<T>,
T. Read moreSource§fn upcast_ref<T>(&self) -> &Twhere
T: ObjectType,
Self: IsA<T>,
fn upcast_ref<T>(&self) -> &Twhere
T: ObjectType,
Self: IsA<T>,
T. Read moreSource§fn downcast<T>(self) -> Result<T, Self>where
T: ObjectType,
Self: MayDowncastTo<T>,
fn downcast<T>(self) -> Result<T, Self>where
T: ObjectType,
Self: MayDowncastTo<T>,
T. Read moreSource§fn downcast_ref<T>(&self) -> Option<&T>where
T: ObjectType,
Self: MayDowncastTo<T>,
fn downcast_ref<T>(&self) -> Option<&T>where
T: ObjectType,
Self: MayDowncastTo<T>,
T. Read moreSource§fn dynamic_cast<T>(self) -> Result<T, Self>where
T: ObjectType,
fn dynamic_cast<T>(self) -> Result<T, Self>where
T: ObjectType,
T. This handles upcasting, downcasting
and casting between interface and interface implementors. All checks are performed at
runtime, while upcast will do many checks at compile-time already. downcast will
perform the same checks at runtime as dynamic_cast, but will also ensure some amount of
compile-time safety. Read moreSource§fn dynamic_cast_ref<T>(&self) -> Option<&T>where
T: ObjectType,
fn dynamic_cast_ref<T>(&self) -> Option<&T>where
T: ObjectType,
T. This handles upcasting, downcasting
and casting between interface and interface implementors. All checks are performed at
runtime, while downcast and upcast will do many checks at compile-time already. Read moreSource§unsafe fn unsafe_cast<T>(self) -> Twhere
T: ObjectType,
unsafe fn unsafe_cast<T>(self) -> Twhere
T: ObjectType,
T unconditionally. Read moreSource§unsafe fn unsafe_cast_ref<T>(&self) -> &Twhere
T: ObjectType,
unsafe fn unsafe_cast_ref<T>(&self) -> &Twhere
T: ObjectType,
&T unconditionally. Read moreSource§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
unsafe fn from_glib_none_as_vec(ptr: *const GList) -> Vec<T>
unsafe fn from_glib_container_as_vec(_: *const GList) -> Vec<T>
unsafe fn from_glib_full_as_vec(_: *const GList) -> Vec<T>
Source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
unsafe fn from_glib_none_as_vec(ptr: *const GPtrArray) -> Vec<T>
unsafe fn from_glib_container_as_vec(_: *const GPtrArray) -> Vec<T>
unsafe fn from_glib_full_as_vec(_: *const GPtrArray) -> Vec<T>
Source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
unsafe fn from_glib_none_as_vec(ptr: *const GSList) -> Vec<T>
unsafe fn from_glib_container_as_vec(_: *const GSList) -> Vec<T>
unsafe fn from_glib_full_as_vec(_: *const GSList) -> Vec<T>
Source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
unsafe fn from_glib_none_as_vec(ptr: *mut GList) -> Vec<T>
unsafe fn from_glib_container_as_vec(ptr: *mut GList) -> Vec<T>
unsafe fn from_glib_full_as_vec(ptr: *mut GList) -> Vec<T>
Source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
unsafe fn from_glib_none_as_vec(ptr: *mut GPtrArray) -> Vec<T>
unsafe fn from_glib_container_as_vec(ptr: *mut GPtrArray) -> Vec<T>
unsafe fn from_glib_full_as_vec(ptr: *mut GPtrArray) -> Vec<T>
Source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
unsafe fn from_glib_none_as_vec(ptr: *mut GSList) -> Vec<T>
unsafe fn from_glib_container_as_vec(ptr: *mut GSList) -> Vec<T>
unsafe fn from_glib_full_as_vec(ptr: *mut GSList) -> Vec<T>
Source§impl<O> GObjectPropertyExpressionExt for O
impl<O> GObjectPropertyExpressionExt for O
Source§fn property_expression(&self, property_name: &str) -> PropertyExpression
fn property_expression(&self, property_name: &str) -> PropertyExpression
Source§fn property_expression_weak(&self, property_name: &str) -> PropertyExpression
fn property_expression_weak(&self, property_name: &str) -> PropertyExpression
Source§fn this_expression(property_name: &str) -> PropertyExpression
fn this_expression(property_name: &str) -> PropertyExpression
this object.Source§impl<T> IntoClosureReturnValue for T
impl<T> IntoClosureReturnValue for T
fn into_closure_return_value(self) -> Option<Value>
Source§impl<U> IsSubclassableExt for Uwhere
U: IsClass + ParentClassIs,
impl<U> IsSubclassableExt for Uwhere
U: IsClass + ParentClassIs,
fn parent_class_init<T>(class: &mut Class<U>)
fn parent_instance_init<T>(instance: &mut InitializingObject<T>)
Source§impl<T> ObjectExt for Twhere
T: ObjectType,
impl<T> ObjectExt for Twhere
T: ObjectType,
Source§fn is<U>(&self) -> boolwhere
U: StaticType,
fn is<U>(&self) -> boolwhere
U: StaticType,
true if the object is an instance of (can be cast to) T.Source§fn object_class(&self) -> &Class<Object>
fn object_class(&self) -> &Class<Object>
ObjectClass of the object. Read moreSource§fn class_of<U>(&self) -> Option<&Class<U>>where
U: IsClass,
fn class_of<U>(&self) -> Option<&Class<U>>where
U: IsClass,
T. Read moreSource§fn interface<U>(&self) -> Option<InterfaceRef<'_, U>>where
U: IsInterface,
fn interface<U>(&self) -> Option<InterfaceRef<'_, U>>where
U: IsInterface,
T of the object. Read moreSource§fn set_property_from_value(&self, property_name: &str, value: &Value)
fn set_property_from_value(&self, property_name: &str, value: &Value)
Source§fn set_properties(&self, property_values: &[(&str, &dyn ToValue)])
fn set_properties(&self, property_values: &[(&str, &dyn ToValue)])
Source§fn set_properties_from_value(&self, property_values: &[(&str, Value)])
fn set_properties_from_value(&self, property_values: &[(&str, Value)])
Source§fn property<V>(&self, property_name: &str) -> Vwhere
V: for<'b> FromValue<'b> + 'static,
fn property<V>(&self, property_name: &str) -> Vwhere
V: for<'b> FromValue<'b> + 'static,
property_name of the object and cast it to the type V. Read moreSource§fn property_value(&self, property_name: &str) -> Value
fn property_value(&self, property_name: &str) -> Value
property_name of the object. Read moreSource§fn has_property(&self, property_name: &str) -> bool
fn has_property(&self, property_name: &str) -> bool
property_name.Source§fn has_property_with_type(&self, property_name: &str, type_: Type) -> bool
fn has_property_with_type(&self, property_name: &str, type_: Type) -> bool
property_name of the given type_.Source§fn property_type(&self, property_name: &str) -> Option<Type>
fn property_type(&self, property_name: &str) -> Option<Type>
property_name of this object. Read moreSource§fn find_property(&self, property_name: &str) -> Option<ParamSpec>
fn find_property(&self, property_name: &str) -> Option<ParamSpec>
ParamSpec of the property property_name of this object.Source§fn list_properties(&self) -> PtrSlice<ParamSpec>
fn list_properties(&self) -> PtrSlice<ParamSpec>
ParamSpec of the properties of this object.Source§fn freeze_notify(&self) -> PropertyNotificationFreezeGuard
fn freeze_notify(&self) -> PropertyNotificationFreezeGuard
Source§unsafe fn set_qdata<QD>(&self, key: Quark, value: QD)where
QD: 'static,
unsafe fn set_qdata<QD>(&self, key: Quark, value: QD)where
QD: 'static,
key. Read moreSource§unsafe fn qdata<QD>(&self, key: Quark) -> Option<NonNull<QD>>where
QD: 'static,
unsafe fn qdata<QD>(&self, key: Quark) -> Option<NonNull<QD>>where
QD: 'static,
key. Read moreSource§unsafe fn steal_qdata<QD>(&self, key: Quark) -> Option<QD>where
QD: 'static,
unsafe fn steal_qdata<QD>(&self, key: Quark) -> Option<QD>where
QD: 'static,
key. Read moreSource§unsafe fn set_data<QD>(&self, key: &str, value: QD)where
QD: 'static,
unsafe fn set_data<QD>(&self, key: &str, value: QD)where
QD: 'static,
key. Read moreSource§unsafe fn data<QD>(&self, key: &str) -> Option<NonNull<QD>>where
QD: 'static,
unsafe fn data<QD>(&self, key: &str) -> Option<NonNull<QD>>where
QD: 'static,
key. Read moreSource§unsafe fn steal_data<QD>(&self, key: &str) -> Option<QD>where
QD: 'static,
unsafe fn steal_data<QD>(&self, key: &str) -> Option<QD>where
QD: 'static,
key. Read moreSource§fn block_signal(&self, handler_id: &SignalHandlerId)
fn block_signal(&self, handler_id: &SignalHandlerId)
Source§fn unblock_signal(&self, handler_id: &SignalHandlerId)
fn unblock_signal(&self, handler_id: &SignalHandlerId)
Source§fn stop_signal_emission(&self, signal_id: SignalId, detail: Option<Quark>)
fn stop_signal_emission(&self, signal_id: SignalId, detail: Option<Quark>)
Source§fn stop_signal_emission_by_name(&self, signal_name: &str)
fn stop_signal_emission_by_name(&self, signal_name: &str)
Source§fn connect<F>(
&self,
signal_name: &str,
after: bool,
callback: F,
) -> SignalHandlerId
fn connect<F>( &self, signal_name: &str, after: bool, callback: F, ) -> SignalHandlerId
signal_name on this object. Read moreSource§fn connect_id<F>(
&self,
signal_id: SignalId,
details: Option<Quark>,
after: bool,
callback: F,
) -> SignalHandlerId
fn connect_id<F>( &self, signal_id: SignalId, details: Option<Quark>, after: bool, callback: F, ) -> SignalHandlerId
signal_id on this object. Read moreSource§fn connect_local<F>(
&self,
signal_name: &str,
after: bool,
callback: F,
) -> SignalHandlerId
fn connect_local<F>( &self, signal_name: &str, after: bool, callback: F, ) -> SignalHandlerId
signal_name on this object. Read moreSource§fn connect_local_id<F>(
&self,
signal_id: SignalId,
details: Option<Quark>,
after: bool,
callback: F,
) -> SignalHandlerId
fn connect_local_id<F>( &self, signal_id: SignalId, details: Option<Quark>, after: bool, callback: F, ) -> SignalHandlerId
signal_id on this object. Read moreSource§unsafe fn connect_unsafe<F>(
&self,
signal_name: &str,
after: bool,
callback: F,
) -> SignalHandlerId
unsafe fn connect_unsafe<F>( &self, signal_name: &str, after: bool, callback: F, ) -> SignalHandlerId
signal_name on this object. Read moreSource§unsafe fn connect_unsafe_id<F>(
&self,
signal_id: SignalId,
details: Option<Quark>,
after: bool,
callback: F,
) -> SignalHandlerId
unsafe fn connect_unsafe_id<F>( &self, signal_id: SignalId, details: Option<Quark>, after: bool, callback: F, ) -> SignalHandlerId
signal_id on this object. Read moreSource§fn connect_closure(
&self,
signal_name: &str,
after: bool,
closure: RustClosure,
) -> SignalHandlerId
fn connect_closure( &self, signal_name: &str, after: bool, closure: RustClosure, ) -> SignalHandlerId
signal_name on this object. Read moreSource§fn connect_closure_id(
&self,
signal_id: SignalId,
details: Option<Quark>,
after: bool,
closure: RustClosure,
) -> SignalHandlerId
fn connect_closure_id( &self, signal_id: SignalId, details: Option<Quark>, after: bool, closure: RustClosure, ) -> SignalHandlerId
signal_id on this object. Read moreSource§fn watch_closure(&self, closure: &impl AsRef<Closure>)
fn watch_closure(&self, closure: &impl AsRef<Closure>)
closure to the lifetime of the object. When
the object’s reference count drops to zero, the closure will be
invalidated. An invalidated closure will ignore any calls to
invoke_with_values, or
invoke when using Rust closures.Source§fn emit<R>(&self, signal_id: SignalId, args: &[&dyn ToValue]) -> Rwhere
R: TryFromClosureReturnValue,
fn emit<R>(&self, signal_id: SignalId, args: &[&dyn ToValue]) -> Rwhere
R: TryFromClosureReturnValue,
Source§fn emit_with_values(&self, signal_id: SignalId, args: &[Value]) -> Option<Value>
fn emit_with_values(&self, signal_id: SignalId, args: &[Value]) -> Option<Value>
Self::emit but takes Value for the arguments.Source§fn emit_by_name<R>(&self, signal_name: &str, args: &[&dyn ToValue]) -> Rwhere
R: TryFromClosureReturnValue,
fn emit_by_name<R>(&self, signal_name: &str, args: &[&dyn ToValue]) -> Rwhere
R: TryFromClosureReturnValue,
Source§fn emit_by_name_with_values(
&self,
signal_name: &str,
args: &[Value],
) -> Option<Value>
fn emit_by_name_with_values( &self, signal_name: &str, args: &[Value], ) -> Option<Value>
Source§fn emit_by_name_with_details<R>(
&self,
signal_name: &str,
details: Quark,
args: &[&dyn ToValue],
) -> Rwhere
R: TryFromClosureReturnValue,
fn emit_by_name_with_details<R>(
&self,
signal_name: &str,
details: Quark,
args: &[&dyn ToValue],
) -> Rwhere
R: TryFromClosureReturnValue,
Source§fn emit_by_name_with_details_and_values(
&self,
signal_name: &str,
details: Quark,
args: &[Value],
) -> Option<Value>
fn emit_by_name_with_details_and_values( &self, signal_name: &str, details: Quark, args: &[Value], ) -> Option<Value>
Source§fn emit_with_details<R>(
&self,
signal_id: SignalId,
details: Quark,
args: &[&dyn ToValue],
) -> Rwhere
R: TryFromClosureReturnValue,
fn emit_with_details<R>(
&self,
signal_id: SignalId,
details: Quark,
args: &[&dyn ToValue],
) -> Rwhere
R: TryFromClosureReturnValue,
Source§fn emit_with_details_and_values(
&self,
signal_id: SignalId,
details: Quark,
args: &[Value],
) -> Option<Value>
fn emit_with_details_and_values( &self, signal_id: SignalId, details: Quark, args: &[Value], ) -> Option<Value>
Source§fn disconnect(&self, handler_id: SignalHandlerId)
fn disconnect(&self, handler_id: SignalHandlerId)
Source§fn connect_notify<F>(&self, name: Option<&str>, f: F) -> SignalHandlerId
fn connect_notify<F>(&self, name: Option<&str>, f: F) -> SignalHandlerId
notify signal of the object. Read moreSource§fn connect_notify_local<F>(&self, name: Option<&str>, f: F) -> SignalHandlerId
fn connect_notify_local<F>(&self, name: Option<&str>, f: F) -> SignalHandlerId
notify signal of the object. Read moreSource§unsafe fn connect_notify_unsafe<F>(
&self,
name: Option<&str>,
f: F,
) -> SignalHandlerId
unsafe fn connect_notify_unsafe<F>( &self, name: Option<&str>, f: F, ) -> SignalHandlerId
notify signal of the object. Read moreSource§fn notify(&self, property_name: &str)
fn notify(&self, property_name: &str)
Source§fn notify_by_pspec(&self, pspec: &ParamSpec)
fn notify_by_pspec(&self, pspec: &ParamSpec)
Source§fn add_weak_ref_notify<F>(&self, f: F) -> WeakRefNotify<T>
fn add_weak_ref_notify<F>(&self, f: F) -> WeakRefNotify<T>
Source§fn add_weak_ref_notify_local<F>(&self, f: F) -> WeakRefNotify<T>where
F: FnOnce() + 'static,
fn add_weak_ref_notify_local<F>(&self, f: F) -> WeakRefNotify<T>where
F: FnOnce() + 'static,
Source§fn bind_property<'a, 'f, 't, O>(
&'a self,
source_property: &'a str,
target: &'a O,
target_property: &'a str,
) -> BindingBuilder<'a, 'f, 't>where
O: ObjectType,
fn bind_property<'a, 'f, 't, O>(
&'a self,
source_property: &'a str,
target: &'a O,
target_property: &'a str,
) -> BindingBuilder<'a, 'f, 't>where
O: ObjectType,
Source§unsafe fn run_dispose(&self)
unsafe fn run_dispose(&self)
Source§impl<T> PropertyGet for Twhere
T: HasParamSpec,
impl<T> PropertyGet for Twhere
T: HasParamSpec,
Source§impl<T> StaticTypeExt for Twhere
T: StaticType,
impl<T> StaticTypeExt for Twhere
T: StaticType,
Source§fn ensure_type()
fn ensure_type()
Source§impl<T> TransparentType for Twhere
T: TransparentPtrType,
impl<T> TransparentType for Twhere
T: TransparentPtrType,
type GlibType = <T as GlibPtrDefault>::GlibType
Source§impl<T> TryFromClosureReturnValue for Twhere
T: for<'a> FromValue<'a> + StaticType + 'static,
impl<T> TryFromClosureReturnValue for Twhere
T: for<'a> FromValue<'a> + StaticType + 'static,
Source§impl<O> WebViewExt for O
impl<O> WebViewExt for O
Source§fn call_async_javascript_function<P: FnOnce(Result<Value, Error>) + 'static>(
&self,
body: &str,
arguments: Option<&Variant>,
world_name: Option<&str>,
source_uri: Option<&str>,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P,
)
fn call_async_javascript_function<P: FnOnce(Result<Value, Error>) + 'static>( &self, body: &str, arguments: Option<&Variant>, world_name: Option<&str>, source_uri: Option<&str>, cancellable: Option<&impl IsA<Cancellable>>, callback: P, )
body with arguments in the script world with name world_name of the main frame current context in self.
The arguments values must be one of the following types, or contain only the following GVariant types: number, string and dictionary.
The result of the operation can be a Promise that will be properly passed to the callback.
If world_name is None, the default world is used. Any value that is not None is a distin ct world.
The source_uri will be shown in exceptions and doesn’t affect the behavior of the script.
When not provided, the document URL is used. Read morefn call_async_javascript_function_future( &self, body: &str, arguments: Option<&Variant>, world_name: Option<&str>, source_uri: Option<&str>, ) -> Pin<Box_<dyn Future<Output = Result<Value, Error>> + 'static>>
Source§fn can_execute_editing_command<P: FnOnce(Result<(), Error>) + 'static>(
&self,
command: &str,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P,
)
fn can_execute_editing_command<P: FnOnce(Result<(), Error>) + 'static>( &self, command: &str, cancellable: Option<&impl IsA<Cancellable>>, callback: P, )
fn can_execute_editing_command_future( &self, command: &str, ) -> Pin<Box_<dyn Future<Output = Result<(), Error>> + 'static>>
Source§fn can_go_back(&self) -> bool
fn can_go_back(&self) -> bool
self has a previous history item. Read moreSource§fn can_go_forward(&self) -> bool
fn can_go_forward(&self) -> bool
self has a next history item. Read moreSource§fn can_show_mime_type(&self, mime_type: &str) -> bool
fn can_show_mime_type(&self, mime_type: &str) -> bool
self. Read moreSource§fn download_uri(&self, uri: &str) -> Option<Download>
fn download_uri(&self, uri: &str) -> Option<Download>
self. Read moreSource§fn evaluate_javascript<P: FnOnce(Result<Value, Error>) + 'static>(
&self,
script: &str,
world_name: Option<&str>,
source_uri: Option<&str>,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P,
)
fn evaluate_javascript<P: FnOnce(Result<Value, Error>) + 'static>( &self, script: &str, world_name: Option<&str>, source_uri: Option<&str>, cancellable: Option<&impl IsA<Cancellable>>, callback: P, )
script in the script world with name world_name of the main frame current context in self.
If world_name is None, the default world is used. Any value that is not None is a distinct world.
The source_uri will be shown in exceptions and doesn’t affect the behavior of the script.
When not provided, the document URL is used. Read morefn evaluate_javascript_future( &self, script: &str, world_name: Option<&str>, source_uri: Option<&str>, ) -> Pin<Box_<dyn Future<Output = Result<Value, Error>> + 'static>>
Source§fn execute_editing_command(&self, command: &str)
fn execute_editing_command(&self, command: &str)
Source§fn execute_editing_command_with_argument(&self, command: &str, argument: &str)
fn execute_editing_command_with_argument(&self, command: &str, argument: &str)
Source§fn back_forward_list(&self) -> Option<BackForwardList>
fn back_forward_list(&self) -> Option<BackForwardList>
Source§fn background_color(&self) -> RGBA
fn background_color(&self) -> RGBA
self background. Read moreSource§fn camera_capture_state(&self) -> MediaCaptureState
fn camera_capture_state(&self) -> MediaCaptureState
Source§fn custom_charset(&self) -> Option<GString>
fn custom_charset(&self) -> Option<GString>
self. Read moreSource§fn default_content_security_policy(&self) -> Option<GString>
fn default_content_security_policy(&self) -> Option<GString>
Source§fn display_capture_state(&self) -> MediaCaptureState
fn display_capture_state(&self) -> MediaCaptureState
Source§fn editor_state(&self) -> Option<EditorState>
fn editor_state(&self) -> Option<EditorState>
self. Read moreSource§fn estimated_load_progress(&self) -> f64
fn estimated_load_progress(&self) -> f64
estimated-load-progress property. Read moreSource§fn find_controller(&self) -> Option<FindController>
fn find_controller(&self) -> Option<FindController>
FindController. Read moreSource§fn input_method_context(&self) -> Option<InputMethodContext>
fn input_method_context(&self) -> Option<InputMethodContext>
Source§fn inspector(&self) -> Option<WebInspector>
fn inspector(&self) -> Option<WebInspector>
Source§fn is_web_process_responsive(&self) -> bool
fn is_web_process_responsive(&self) -> bool
Source§fn main_resource(&self) -> Option<WebResource>
fn main_resource(&self) -> Option<WebResource>
self. Read moreSource§fn microphone_capture_state(&self) -> MediaCaptureState
fn microphone_capture_state(&self) -> MediaCaptureState
Source§fn network_session(&self) -> Option<NetworkSession>
fn network_session(&self) -> Option<NetworkSession>
Source§fn session_state(&self) -> Option<WebViewSessionState>
fn session_state(&self) -> Option<WebViewSessionState>
self Read moreSource§fn snapshot<P: FnOnce(Result<Texture, Error>) + 'static>(
&self,
region: SnapshotRegion,
options: SnapshotOptions,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P,
)
fn snapshot<P: FnOnce(Result<Texture, Error>) + 'static>( &self, region: SnapshotRegion, options: SnapshotOptions, cancellable: Option<&impl IsA<Cancellable>>, callback: P, )
fn snapshot_future( &self, region: SnapshotRegion, options: SnapshotOptions, ) -> Pin<Box_<dyn Future<Output = Result<Texture, Error>> + 'static>>
Source§fn theme_color(&self) -> Option<RGBA>
fn theme_color(&self) -> Option<RGBA>
v2_50 only.self.
If the self doesn’t have a theme color it will fill the rgba
with transparent black content. Read moreSource§fn tls_info(&self) -> Option<(TlsCertificate, TlsCertificateFlags)>
fn tls_info(&self) -> Option<(TlsCertificate, TlsCertificateFlags)>
Source§fn user_content_manager(&self) -> Option<UserContentManager>
fn user_content_manager(&self) -> Option<UserContentManager>
self. Read moreSource§fn web_extension_mode(&self) -> WebExtensionMode
fn web_extension_mode(&self) -> WebExtensionMode
WebExtensionMode. Read moreSource§fn website_policies(&self) -> Option<WebsitePolicies>
fn website_policies(&self) -> Option<WebsitePolicies>
Source§fn window_properties(&self) -> Option<WindowProperties>
fn window_properties(&self) -> Option<WindowProperties>
WindowProperties object. Read moreSource§fn zoom_level(&self) -> f64
fn zoom_level(&self) -> f64
self. Read moreSource§fn go_forward(&self)
fn go_forward(&self)
Source§fn go_to_back_forward_list_item(&self, list_item: &BackForwardListItem)
fn go_to_back_forward_list_item(&self, list_item: &BackForwardListItem)
list_item. Read moreSource§fn is_controlled_by_automation(&self) -> bool
fn is_controlled_by_automation(&self) -> bool
Source§fn is_editable(&self) -> bool
fn is_editable(&self) -> bool
Source§fn is_immersive_mode_enabled(&self) -> bool
fn is_immersive_mode_enabled(&self) -> bool
v2_52 only.self is in immersive mode. Read moreSource§fn is_loading(&self) -> bool
fn is_loading(&self) -> bool
is-loading property. Read moreSource§fn is_playing_audio(&self) -> bool
fn is_playing_audio(&self) -> bool
is-playing-audio property. Read moreSource§fn leave_immersive_mode(&self)
fn leave_immersive_mode(&self)
v2_52 only.Source§fn load_bytes(
&self,
bytes: &Bytes,
mime_type: Option<&str>,
encoding: Option<&str>,
base_uri: Option<&str>,
)
fn load_bytes( &self, bytes: &Bytes, mime_type: Option<&str>, encoding: Option<&str>, base_uri: Option<&str>, )
Source§fn load_plain_text(&self, plain_text: &str)
fn load_plain_text(&self, plain_text: &str)
Source§fn load_request(&self, request: &URIRequest)
fn load_request(&self, request: &URIRequest)
URIRequest. Read moreSource§fn reload_bypass_cache(&self)
fn reload_bypass_cache(&self)
self without
using any cached data.Source§fn restore_session_state(&self, state: &WebViewSessionState)
fn restore_session_state(&self, state: &WebViewSessionState)
Source§fn save<P: FnOnce(Result<InputStream, Error>) + 'static>(
&self,
save_mode: SaveMode,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P,
)
fn save<P: FnOnce(Result<InputStream, Error>) + 'static>( &self, save_mode: SaveMode, cancellable: Option<&impl IsA<Cancellable>>, callback: P, )
fn save_future( &self, save_mode: SaveMode, ) -> Pin<Box_<dyn Future<Output = Result<InputStream, Error>> + 'static>>
Source§fn save_to_file<P: FnOnce(Result<(), Error>) + 'static>(
&self,
file: &impl IsA<File>,
save_mode: SaveMode,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P,
)
fn save_to_file<P: FnOnce(Result<(), Error>) + 'static>( &self, file: &impl IsA<File>, save_mode: SaveMode, cancellable: Option<&impl IsA<Cancellable>>, callback: P, )
fn save_to_file_future( &self, file: &(impl IsA<File> + Clone + 'static), save_mode: SaveMode, ) -> Pin<Box_<dyn Future<Output = Result<(), Error>> + 'static>>
Source§fn send_message_to_page<P: FnOnce(Result<UserMessage, Error>) + 'static>(
&self,
message: &UserMessage,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P,
)
fn send_message_to_page<P: FnOnce(Result<UserMessage, Error>) + 'static>( &self, message: &UserMessage, cancellable: Option<&impl IsA<Cancellable>>, callback: P, )
fn send_message_to_page_future( &self, message: &UserMessage, ) -> Pin<Box_<dyn Future<Output = Result<UserMessage, Error>> + 'static>>
Source§fn set_background_color(&self, rgba: &RGBA)
fn set_background_color(&self, rgba: &RGBA)
self background. Read moreSource§fn set_camera_capture_state(&self, state: MediaCaptureState)
fn set_camera_capture_state(&self, state: MediaCaptureState)
Source§fn set_cors_allowlist(&self, allowlist: &[&str])
fn set_cors_allowlist(&self, allowlist: &[&str])
allowlist for CORS. Read moreSource§fn set_custom_charset(&self, charset: Option<&str>)
fn set_custom_charset(&self, charset: Option<&str>)
self. Read moreSource§fn set_display_capture_state(&self, state: MediaCaptureState)
fn set_display_capture_state(&self, state: MediaCaptureState)
Source§fn set_editable(&self, editable: bool)
fn set_editable(&self, editable: bool)
Source§fn set_input_method_context(
&self,
context: Option<&impl IsA<InputMethodContext>>,
)
fn set_input_method_context( &self, context: Option<&impl IsA<InputMethodContext>>, )
Source§fn set_is_muted(&self, muted: bool)
fn set_is_muted(&self, muted: bool)
self. Read moreSource§fn set_microphone_capture_state(&self, state: MediaCaptureState)
fn set_microphone_capture_state(&self, state: MediaCaptureState)
Source§fn set_settings(&self, settings: &Settings)
fn set_settings(&self, settings: &Settings)
Source§fn set_zoom_level(&self, zoom_level: f64)
fn set_zoom_level(&self, zoom_level: f64)
self. Read moreSource§fn stop_loading(&self)
fn stop_loading(&self)
self. Read moreSource§fn terminate_web_process(&self)
fn terminate_web_process(&self)
self. Read moreSource§fn web_context(&self) -> Option<WebContext>
fn web_context(&self) -> Option<WebContext>
WebContext of the view.Source§fn connect_authenticate<F: Fn(&Self, &AuthenticationRequest) -> bool + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_authenticate<F: Fn(&Self, &AuthenticationRequest) -> bool + 'static>( &self, f: F, ) -> SignalHandlerId
AuthenticationRequest in the request argument.
To handle this signal asynchronously you should keep a ref
of the request and return true. To disable HTTP authentication
entirely, connect to this signal and simply return true. Read moreSource§fn connect_close<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
fn connect_close<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
WebView is requested. This occurs when a
call is made from JavaScript’s <function>window.close</function> function or
after trying to close the web_view with try_close().
It is the owner’s responsibility to handle this signal to hide or
destroy the WebView, if necessary.<itemizedlist>
<listitem>``<para>
To customize the proposed menu you can use ContextMenu::prepend(),
ContextMenu::append() or ContextMenu::insert() to add new
ContextMenuItems to context_menu, ContextMenu::move_item()
to reorder existing items, or ContextMenu::remove() to remove an
existing item. The signal handler should return false, and the menu represented
by context_menu will be shown.
</para>``</listitem>
<listitem>``<para>
To prevent the menu from being displayed you can just connect to this signal
and return true so that the proposed menu will not be shown.
</para>``</listitem>
<listitem>``<para>
To build your own menu, you can remove all items from the proposed menu with
ContextMenu::remove_all(), add your own items and return false so
that the menu will be shown. You can also ignore the proposed ContextMenu,
build your own GtkMenu and return true to prevent the proposed menu from being shown.
</para>``</listitem>
<listitem>``<para>
If you just want the default menu to be shown always, simply don’t connect to this
signal because showing the proposed context menu is the default behaviour.
</para>``</listitem>
</itemizedlist> Read morecontext-menu signal, if the context menu is shown,
to notify that the context menu is dismissed.Source§fn connect_create<F: Fn(&Self, &NavigationAction) -> Option<Widget> + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_create<F: Fn(&Self, &NavigationAction) -> Option<Widget> + 'static>( &self, f: F, ) -> SignalHandlerId
Source§fn connect_decide_policy<F: Fn(&Self, &PolicyDecision, PolicyDecisionType) -> bool + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_decide_policy<F: Fn(&Self, &PolicyDecision, PolicyDecisionType) -> bool + 'static>( &self, f: F, ) -> SignalHandlerId
NavigationPolicyDecision passed in the
decision argument is a generic type, but should be casted to a more
specific type when making the decision. For example: Read moreSource§fn connect_enter_fullscreen<F: Fn(&Self) -> bool + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_enter_fullscreen<F: Fn(&Self) -> bool + 'static>( &self, f: F, ) -> SignalHandlerId
<function>element.webkitRequestFullScreen</function>. If the
signal is not handled the WebView will proceed to full screen
its top level window. This signal can be used by client code to
request permission to the user prior doing the full screen
transition and eventually prepare the top-level window
(e.g. hide some widgets that would otherwise be part of the
full screen window). Read moreSource§fn connect_insecure_content_detected<F: Fn(&Self, InsecureContentEvent) + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_insecure_content_detected<F: Fn(&Self, InsecureContentEvent) + 'static>( &self, f: F, ) -> SignalHandlerId
Since 2.46
Source§fn connect_leave_fullscreen<F: Fn(&Self) -> bool + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_leave_fullscreen<F: Fn(&Self) -> bool + 'static>( &self, f: F, ) -> SignalHandlerId
WebView is about to restore its top level
window out of its full screen state. This signal can be used by
client code to restore widgets hidden during the
enter-fullscreen stage for instance. Read moreSource§fn connect_load_changed<F: Fn(&Self, LoadEvent) + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_load_changed<F: Fn(&Self, LoadEvent) + 'static>( &self, f: F, ) -> SignalHandlerId
web_view changes.
The signal is always emitted with LoadEvent::Started when a
new load request is made and LoadEvent::Finished when the load
finishes successfully or due to an error. When the ongoing load
operation fails load-failed signal is emitted
before load-changed is emitted with
LoadEvent::Finished.
If a redirection is received from the server, this signal is emitted
with LoadEvent::Redirected after the initial emission with
LoadEvent::Started and before LoadEvent::Committed.
When the page content starts arriving the signal is emitted with
LoadEvent::Committed event. Read moreSource§fn connect_load_failed<F: Fn(&Self, LoadEvent, &str, &Error) -> bool + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_load_failed<F: Fn(&Self, LoadEvent, &str, &Error) -> bool + 'static>( &self, f: F, ) -> SignalHandlerId
load_event will be LoadEvent::Started. If it happened while
loading a committed data source load_event will be LoadEvent::Committed.
Since a load error causes the load operation to finish, the signal
WebKitWebView::load-changed will always be emitted with
LoadEvent::Finished event right after this one. Read moreSource§fn connect_load_failed_with_tls_errors<F: Fn(&Self, &str, &TlsCertificate, TlsCertificateFlags) -> bool + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_load_failed_with_tls_errors<F: Fn(&Self, &str, &TlsCertificate, TlsCertificateFlags) -> bool + 'static>( &self, f: F, ) -> SignalHandlerId
certificate
and the host of failing_uri use webkit_web_context_allow_tls_certificate_for_host(). Read moreSource§fn connect_mouse_target_changed<F: Fn(&Self, &HitTestResult, u32) + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_mouse_target_changed<F: Fn(&Self, &HitTestResult, u32) + 'static>( &self, f: F, ) -> SignalHandlerId
hit_test_result argument. The modifiers argument is a bitmask of
GdkModifierType flags indicating the state of modifier keys.
The signal is emitted again when the mouse is moved out of the
current element with a new hit_test_result. Read moreSource§fn connect_permission_request<F: Fn(&Self, &PermissionRequest) -> bool + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_permission_request<F: Fn(&Self, &PermissionRequest) -> bool + 'static>( &self, f: F, ) -> SignalHandlerId
Source§fn connect_print<F: Fn(&Self, &PrintOperation) -> bool + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_print<F: Fn(&Self, &PrintOperation) -> bool + 'static>( &self, f: F, ) -> SignalHandlerId
web_view, usually by a JavaScript call,
before the print dialog is shown. This signal can be used to set the initial
print settings and page setup of print_operation to be used as default values in
the print dialog. You can call PrintOperation::set_print_settings() and
PrintOperation::set_page_setup() and then return false to propagate the
event so that the print dialog is shown. Read moreSource§fn connect_query_permission_state<F: Fn(&Self, &PermissionStateQuery) -> bool + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_query_permission_state<F: Fn(&Self, &PermissionStateQuery) -> bool + 'static>( &self, f: F, ) -> SignalHandlerId
PermissionStateQuery::finish(). Read moreSource§fn connect_ready_to_show<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
fn connect_ready_to_show<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
create on the newly created WebView
when it 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 scrollbars
should be displayed, is already set on the WindowProperties
of web_view. See also window_properties().Source§fn connect_resource_load_started<F: Fn(&Self, &WebResource, &URIRequest) + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_resource_load_started<F: Fn(&Self, &WebResource, &URIRequest) + 'static>( &self, f: F, ) -> SignalHandlerId
request parameter
contains the URIRequest that will be sent to the server.
You can monitor the load operation by connecting to the different signals
of resource. Read moreSource§fn connect_run_as_modal<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
fn connect_run_as_modal<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
ready-to-show on the newly
created WebView when JavaScript code calls
<function>window.showModalDialog</function>. The purpose of
this signal is to allow the client application to prepare the
new view to behave as modal. Once the signal is emitted a new
main loop will be run to block user interaction in the parent
WebView until the new dialog is closed.Source§fn connect_run_color_chooser<F: Fn(&Self, &ColorChooserRequest) -> bool + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_run_color_chooser<F: Fn(&Self, &ColorChooserRequest) -> bool + 'static>( &self, f: F, ) -> SignalHandlerId
ColorChooserRequest in the request
argument. Read moreSource§fn connect_run_file_chooser<F: Fn(&Self, &FileChooserRequest) -> bool + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_run_file_chooser<F: Fn(&Self, &FileChooserRequest) -> bool + 'static>( &self, f: F, ) -> SignalHandlerId
FileChooserRequest in the request
argument. Read moreSource§fn connect_script_dialog<F: Fn(&Self, &ScriptDialog) -> bool + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_script_dialog<F: Fn(&Self, &ScriptDialog) -> bool + 'static>( &self, f: F, ) -> SignalHandlerId
<function>window.alert</function>,
<function>window.confirm</function> or <function>window.prompt</function>,
or when <function>onbeforeunload</function> event is fired.
The dialog parameter should be used to build the dialog.
If the signal is not handled a different dialog will be built and shown depending
on the dialog type:
<itemizedlist>
<listitem>``<para>
ScriptDialogType::Alert: message dialog with a single Close button.
</para>``</listitem>
<listitem>``<para>
ScriptDialogType::Confirm: message dialog with OK and Cancel buttons.
</para>``</listitem>
<listitem>``<para>
ScriptDialogType::Prompt: message dialog with OK and Cancel buttons and
a text entry with the default text.
</para>``</listitem>
<listitem>``<para>
ScriptDialogType::BeforeUnloadConfirm: message dialog with Stay and Leave buttons.
</para>``</listitem>
</itemizedlist> Read moreSource§fn connect_show_notification<F: Fn(&Self, &Notification) -> bool + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_show_notification<F: Fn(&Self, &Notification) -> bool + 'static>( &self, f: F, ) -> SignalHandlerId
notification is kept alive until either: 1) the web page cancels it
or 2) a navigation happens. Read moreweb_view needs to display a
dropdown menu. This signal can be used to show a custom menu, using menu to get
the details of all items that should be displayed. The area of the element in the
WebView is given as rectangle parameter, it can be used to position the
menu.
To handle this signal asynchronously you should keep a ref of the menu. Read moreSource§fn connect_submit_form<F: Fn(&Self, &FormSubmissionRequest) + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_submit_form<F: Fn(&Self, &FormSubmissionRequest) + 'static>( &self, f: F, ) -> SignalHandlerId
request
argument passed contains information about the text fields of the form. This
is typically used to store login information that can be used later to
pre-fill the form.
The form will not be submitted until FormSubmissionRequest::submit() is called. Read moreSource§fn connect_user_message_received<F: Fn(&Self, &UserMessage) -> bool + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_user_message_received<F: Fn(&Self, &UserMessage) -> bool + 'static>( &self, f: F, ) -> SignalHandlerId
UserMessage is received from the
WebKitWebPage corresponding to web_view. You can reply to the message
using UserMessage::send_reply(). Read moreSource§fn connect_web_process_terminated<F: Fn(&Self, WebProcessTerminationReason) + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_web_process_terminated<F: Fn(&Self, WebProcessTerminationReason) + 'static>( &self, f: F, ) -> SignalHandlerId
reason. Read morefn connect_camera_capture_state_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_display_capture_state_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_editable_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_estimated_load_progress_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_favicon_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
Source§fn connect_is_immersive_mode_enabled_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_is_immersive_mode_enabled_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
v2_52 only.fn connect_is_loading_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_is_muted_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_is_playing_audio_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_is_web_process_responsive_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_microphone_capture_state_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_page_id_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_settings_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
Source§fn connect_theme_color_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_theme_color_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
v2_50 only.fn connect_title_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
fn connect_uri_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
fn connect_zoom_level_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
Source§impl<O> WidgetExt for O
impl<O> WidgetExt for O
fn action_set_enabled(&self, action_name: &str, enabled: bool)
fn activate(&self) -> bool
fn activate_action( &self, name: &str, args: Option<&Variant>, ) -> Result<(), BoolError>
fn activate_default(&self)
fn add_controller(&self, controller: impl IsA<EventController>)
fn add_css_class(&self, css_class: &str)
fn add_mnemonic_label(&self, label: &impl IsA<Widget>)
fn allocate( &self, width: i32, height: i32, baseline: i32, transform: Option<Transform>, )
fn child_focus(&self, direction: DirectionType) -> bool
fn compute_bounds(&self, target: &impl IsA<Widget>) -> Option<Rect>
fn compute_expand(&self, orientation: Orientation) -> bool
fn compute_point( &self, target: &impl IsA<Widget>, point: &Point, ) -> Option<Point>
fn compute_transform(&self, target: &impl IsA<Widget>) -> Option<Matrix>
fn contains(&self, x: f64, y: f64) -> bool
fn create_pango_context(&self) -> Context
fn create_pango_layout(&self, text: Option<&str>) -> Layout
fn drag_check_threshold( &self, start_x: i32, start_y: i32, current_x: i32, current_y: i32, ) -> bool
fn error_bell(&self)
Source§fn allocated_baseline(&self) -> i32
fn allocated_baseline(&self) -> i32
Since 4.12
Source§fn allocated_height(&self) -> i32
fn allocated_height(&self) -> i32
Since 4.12
Source§fn allocated_width(&self) -> i32
fn allocated_width(&self) -> i32
Since 4.12
Source§fn allocation(&self) -> Rectangle
fn allocation(&self) -> Rectangle
Since 4.12
fn ancestor(&self, widget_type: Type) -> Option<Widget>
fn can_focus(&self) -> bool
fn can_target(&self) -> bool
fn is_child_visible(&self) -> bool
fn clipboard(&self) -> Clipboard
fn css_classes(&self) -> Vec<GString>
fn css_name(&self) -> GString
fn cursor(&self) -> Option<Cursor>
fn direction(&self) -> TextDirection
fn display(&self) -> Display
fn first_child(&self) -> Option<Widget>
fn focus_child(&self) -> Option<Widget>
fn gets_focus_on_click(&self) -> bool
fn is_focusable(&self) -> bool
fn font_map(&self) -> Option<FontMap>
Source§fn font_options(&self) -> Option<FontOptions>
fn font_options(&self) -> Option<FontOptions>
Since 4.16
fn frame_clock(&self) -> Option<FrameClock>
fn halign(&self) -> Align
fn has_tooltip(&self) -> bool
fn height(&self) -> i32
fn hexpands(&self) -> bool
fn is_hexpand_set(&self) -> bool
fn last_child(&self) -> Option<Widget>
fn layout_manager(&self) -> Option<LayoutManager>
Source§fn is_limit_events(&self) -> bool
fn is_limit_events(&self) -> bool
v4_18 only.fn is_mapped(&self) -> bool
fn margin_bottom(&self) -> i32
fn margin_end(&self) -> i32
fn margin_start(&self) -> i32
fn margin_top(&self) -> i32
fn widget_name(&self) -> GString
fn native(&self) -> Option<Native>
fn next_sibling(&self) -> Option<Widget>
fn opacity(&self) -> f64
fn overflow(&self) -> Overflow
fn pango_context(&self) -> Context
fn parent(&self) -> Option<Widget>
fn preferred_size(&self) -> (Requisition, Requisition)
fn prev_sibling(&self) -> Option<Widget>
fn primary_clipboard(&self) -> Clipboard
fn is_realized(&self) -> bool
fn receives_default(&self) -> bool
fn request_mode(&self) -> SizeRequestMode
fn root(&self) -> Option<Root>
fn scale_factor(&self) -> i32
fn get_sensitive(&self) -> bool
fn settings(&self) -> Settings
fn size(&self, orientation: Orientation) -> i32
fn size_request(&self) -> (i32, i32)
fn state_flags(&self) -> StateFlags
Source§fn style_context(&self) -> StyleContext
fn style_context(&self) -> StyleContext
Since 4.10
fn tooltip_markup(&self) -> Option<GString>
fn tooltip_text(&self) -> Option<GString>
fn valign(&self) -> Align
fn vexpands(&self) -> bool
fn is_vexpand_set(&self) -> bool
fn get_visible(&self) -> bool
fn width(&self) -> i32
fn grab_focus(&self) -> bool
fn has_css_class(&self, css_class: &str) -> bool
fn has_default(&self) -> bool
fn has_focus(&self) -> bool
fn has_visible_focus(&self) -> bool
fn in_destruction(&self) -> bool
fn insert_action_group(&self, name: &str, group: Option<&impl IsA<ActionGroup>>)
fn insert_after( &self, parent: &impl IsA<Widget>, previous_sibling: Option<&impl IsA<Widget>>, )
fn insert_before( &self, parent: &impl IsA<Widget>, next_sibling: Option<&impl IsA<Widget>>, )
fn is_ancestor(&self, ancestor: &impl IsA<Widget>) -> bool
fn is_drawable(&self) -> bool
fn is_focus(&self) -> bool
fn is_sensitive(&self) -> bool
fn is_visible(&self) -> bool
fn list_mnemonic_labels(&self) -> Vec<Widget>
fn map(&self)
fn measure( &self, orientation: Orientation, for_size: i32, ) -> (i32, i32, i32, i32)
fn mnemonic_activate(&self, group_cycling: bool) -> bool
fn observe_children(&self) -> ListModel
fn observe_controllers(&self) -> ListModel
fn pick(&self, x: f64, y: f64, flags: PickFlags) -> Option<Widget>
fn queue_allocate(&self)
fn queue_draw(&self)
fn queue_resize(&self)
fn realize(&self)
fn remove_controller(&self, controller: &impl IsA<EventController>)
fn remove_css_class(&self, css_class: &str)
fn remove_mnemonic_label(&self, label: &impl IsA<Widget>)
fn set_can_focus(&self, can_focus: bool)
fn set_can_target(&self, can_target: bool)
fn set_child_visible(&self, child_visible: bool)
fn set_css_classes(&self, classes: &[&str])
fn set_cursor(&self, cursor: Option<&Cursor>)
fn set_cursor_from_name(&self, name: Option<&str>)
fn set_direction(&self, dir: TextDirection)
fn set_focus_child(&self, child: Option<&impl IsA<Widget>>)
fn set_focus_on_click(&self, focus_on_click: bool)
fn set_focusable(&self, focusable: bool)
fn set_font_map(&self, font_map: Option<&impl IsA<FontMap>>)
Source§fn set_font_options(&self, options: Option<&FontOptions>)
fn set_font_options(&self, options: Option<&FontOptions>)
Since 4.16
fn set_halign(&self, align: Align)
fn set_has_tooltip(&self, has_tooltip: bool)
fn set_hexpand(&self, expand: bool)
fn set_hexpand_set(&self, set: bool)
fn set_layout_manager(&self, layout_manager: Option<impl IsA<LayoutManager>>)
Source§fn set_limit_events(&self, limit_events: bool)
fn set_limit_events(&self, limit_events: bool)
v4_18 only.fn set_margin_bottom(&self, margin: i32)
fn set_margin_end(&self, margin: i32)
fn set_margin_start(&self, margin: i32)
fn set_margin_top(&self, margin: i32)
fn set_widget_name(&self, name: &str)
fn set_opacity(&self, opacity: f64)
fn set_overflow(&self, overflow: Overflow)
fn set_parent(&self, parent: &impl IsA<Widget>)
fn set_receives_default(&self, receives_default: bool)
fn set_sensitive(&self, sensitive: bool)
fn set_size_request(&self, width: i32, height: i32)
fn set_state_flags(&self, flags: StateFlags, clear: bool)
fn set_tooltip_markup(&self, markup: Option<&str>)
fn set_tooltip_text(&self, text: Option<&str>)
fn set_valign(&self, align: Align)
fn set_vexpand(&self, expand: bool)
fn set_vexpand_set(&self, set: bool)
fn set_visible(&self, visible: bool)
fn should_layout(&self) -> bool
fn size_allocate(&self, allocation: &Rectangle, baseline: i32)
fn snapshot_child( &self, child: &impl IsA<Widget>, snapshot: &impl IsA<Snapshot>, )
Source§fn translate_coordinates(
&self,
dest_widget: &impl IsA<Widget>,
src_x: f64,
src_y: f64,
) -> Option<(f64, f64)>
fn translate_coordinates( &self, dest_widget: &impl IsA<Widget>, src_x: f64, src_y: f64, ) -> Option<(f64, f64)>
Since 4.12
fn trigger_tooltip_query(&self)
fn unmap(&self)
fn unparent(&self)
fn unrealize(&self)
fn unset_state_flags(&self, flags: StateFlags)
fn height_request(&self) -> i32
fn set_height_request(&self, height_request: i32)
fn width_request(&self) -> i32
fn set_width_request(&self, width_request: i32)
fn connect_destroy<F>(&self, f: F) -> SignalHandlerIdwhere
F: Fn(&Self) + 'static,
fn connect_direction_changed<F>(&self, f: F) -> SignalHandlerIdwhere
F: Fn(&Self, TextDirection) + 'static,
fn connect_hide<F>(&self, f: F) -> SignalHandlerIdwhere
F: Fn(&Self) + 'static,
fn connect_map<F>(&self, f: F) -> SignalHandlerIdwhere
F: Fn(&Self) + 'static,
fn connect_mnemonic_activate<F>(&self, f: F) -> SignalHandlerId
fn connect_move_focus<F>(&self, f: F) -> SignalHandlerIdwhere
F: Fn(&Self, DirectionType) + 'static,
fn emit_move_focus(&self, direction: DirectionType)
fn connect_query_tooltip<F>(&self, f: F) -> SignalHandlerId
fn connect_realize<F>(&self, f: F) -> SignalHandlerIdwhere
F: Fn(&Self) + 'static,
fn connect_show<F>(&self, f: F) -> SignalHandlerIdwhere
F: Fn(&Self) + 'static,
fn connect_state_flags_changed<F>(&self, f: F) -> SignalHandlerIdwhere
F: Fn(&Self, StateFlags) + 'static,
fn connect_unmap<F>(&self, f: F) -> SignalHandlerIdwhere
F: Fn(&Self) + 'static,
fn connect_unrealize<F>(&self, f: F) -> SignalHandlerIdwhere
F: Fn(&Self) + 'static,
fn connect_can_focus_notify<F>(&self, f: F) -> SignalHandlerIdwhere
F: Fn(&Self) + 'static,
fn connect_can_target_notify<F>(&self, f: F) -> SignalHandlerIdwhere
F: Fn(&Self) + 'static,
fn connect_css_classes_notify<F>(&self, f: F) -> SignalHandlerIdwhere
F: Fn(&Self) + 'static,
fn connect_cursor_notify<F>(&self, f: F) -> SignalHandlerIdwhere
F: Fn(&Self) + 'static,
fn connect_focus_on_click_notify<F>(&self, f: F) -> SignalHandlerIdwhere
F: Fn(&Self) + 'static,
fn connect_focusable_notify<F>(&self, f: F) -> SignalHandlerIdwhere
F: Fn(&Self) + 'static,
fn connect_halign_notify<F>(&self, f: F) -> SignalHandlerIdwhere
F: Fn(&Self) + 'static,
fn connect_has_default_notify<F>(&self, f: F) -> SignalHandlerIdwhere
F: Fn(&Self) + 'static,
fn connect_has_focus_notify<F>(&self, f: F) -> SignalHandlerIdwhere
F: Fn(&Self) + 'static,
fn connect_has_tooltip_notify<F>(&self, f: F) -> SignalHandlerIdwhere
F: Fn(&Self) + 'static,
fn connect_height_request_notify<F>(&self, f: F) -> SignalHandlerIdwhere
F: Fn(&Self) + 'static,
fn connect_hexpand_notify<F>(&self, f: F) -> SignalHandlerIdwhere
F: Fn(&Self) + 'static,
fn connect_hexpand_set_notify<F>(&self, f: F) -> SignalHandlerIdwhere
F: Fn(&Self) + 'static,
fn connect_layout_manager_notify<F>(&self, f: F) -> SignalHandlerIdwhere
F: Fn(&Self) + 'static,
Source§fn connect_limit_events_notify<F>(&self, f: F) -> SignalHandlerIdwhere
F: Fn(&Self) + 'static,
fn connect_limit_events_notify<F>(&self, f: F) -> SignalHandlerIdwhere
F: Fn(&Self) + 'static,
v4_18 only.