pub struct WebView { /* private fields */ }
Expand description
The central class of the WPE WebKit and WebKitGTK APIs.
#WebKitWebView 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 #WebKitWebView or a data string. With #WebKitSettings you can control various aspects of the rendering and loading of the content.
Note that in WebKitGTK, #WebKitWebView is scrollable by itself, so you don’t need to embed it in a #GtkScrolledWindow.
§Properties
§automation-presentation-type
The #WebKitAutomationBrowsingContextPresentation of #WebKitWebView. This should only be used when
creating a new #WebKitWebView as a response to #WebKitAutomationSession::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 #WebKitUserContentManager 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 #WebKitWebView are editable. For more information see webkit_web_view_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 #WebKitWebView. See webkit_web_view_get_favicon() for more details.
Readable
§is-controlled-by-automation
Whether the #WebKitWebView is controlled by automation. This should only be used when creating a new #WebKitWebView as a response to #WebKitAutomationSession::create-web-view signal request.
Readable | Writeable | Construct Only
§is-loading
Whether the #WebKitWebView is currently loading a page. This property becomes
true
as soon as a new load operation is requested and before the
#WebKitWebView::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
#WebKitWebView::load-changed is emitted with LoadEvent::Finished
.
Readable
§is-muted
Whether the #WebKitWebView audio is muted. When true
, audio is silenced.
It may still be playing, i.e. #WebKitWebView:is-playing-audio may be true
.
Readable | Writeable
§is-playing-audio
Whether the #WebKitWebView 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 #WebKitWebView 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 #WebKitNetworkSession of the view
Readable | Writeable | Construct Only
§page-id
The identifier of the #WebKitWebPage corresponding to the #WebKitWebView.
Readable
§related-view
The related #WebKitWebView 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 #WebKitSettings of the view.
Writeable | Construct
§title
The main frame document title of this #WebKitWebView. If
the title has not been received yet, it will be None
.
Readable
§uri
The current active URI of the #WebKitWebView. See webkit_web_view_get_uri() for more details.
Readable
§user-content-manager
The #WebKitUserContentManager of the view.
Readable | Writeable | Construct Only
§web-context
The #WebKitWebContext 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 #WebKitWebsitePolicies for the view.
Readable | Writeable | Construct Only
§zoom-level
The zoom level of the #WebKitWebView content. See webkit_web_view_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 ::query-tooltip signal on @widget.
A value of true
indicates that @widget can have a tooltip, in this case
the widget will be queried using query-tooltip
to
determine whether it will provide a tooltip or not.
Readable | Writeable
§height-request
Override 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 GtkLayoutManager
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
§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
[WidgetExtManual::set_size_request()
][crate::gtk::prelude::WidgetExtManual::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
[WidgetExtManual::set_size_request()
][crate::gtk::prelude::WidgetExtManual::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
[WidgetExtManual::set_size_request()
][crate::gtk::prelude::WidgetExtManual::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
[WidgetExtManual::set_size_request()
][crate::gtk::prelude::WidgetExtManual::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 None
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 Gtk::Tooltip::set_markup()
.
This is a convenience property which will take care of getting the
tooltip shown if the given string is not None
:
has-tooltip
will automatically be set to true
and there will be taken care of query-tooltip
in
the default signal handler.
Note that if both tooltip-text
and
tooltip-markup
are set, the last one wins.
Readable | Writeable
§tooltip-text
Sets the text of tooltip to be the given string.
Also see Gtk::Tooltip::set_text()
.
This is a convenience property which will take care of getting the
tooltip shown if the given string is not None
:
has-tooltip
will automatically be set to true
and there will be taken care of query-tooltip
in
the default signal handler.
Note that if both tooltip-text
and
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
Override 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
#WebKitAuthenticationRequest 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 #WebKitWebView is requested. This occurs when a
call is made from JavaScript’s
§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.
false
, and the menu represented
by @context_menu will be shown.
true
so that the proposed menu will not be shown.
false
so
that the menu will be shown. You can also ignore the proposed #WebKitContextMenu,
build your own #GtkMenu and return true
to prevent the proposed menu from being shown.
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 #WebKitContextMenu passed in @context_menu argument is only valid during the signal emission.
§context-menu-dismissed
Emitted after #WebKitWebView::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 #WebKitWebView is requested. If this signal is handled the signal handler should return the newly created #WebKitWebView.
The #WebKitNavigationAction parameter contains information about the navigation action that triggered this signal.
The new #WebKitWebView must be related to @web_view, see #WebKitWebView:related-view for more details.
The new #WebKitWebView should not be displayed to the user until the #WebKitWebView::ready-to-show signal is emitted.
§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 #WebKitNavigationPolicyDecision 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 #WebKitPolicyDecision and no decision has been
made explicitly, webkit_policy_decision_use() will be the default policy decision. The
default signal handler will simply call webkit_policy_decision_use(). Only the first
policy decision chosen for a given #WebKitPolicyDecision will have any affect.
§enter-fullscreen
Emitted when JavaScript code calls
§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 #WebKitWebView 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 #WebKitWebView::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 #WebKitWebView::load-failed signal is emitted
before #WebKitWebView::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, #WebKitWebView::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 #WebKitPermissionRequest and the
request has not been handled, webkit_permission_request_deny()
will be the default action.
If the signal is not handled, the @request will be completed automatically by the specific #WebKitPermissionRequest that could allow or deny it. Check the documentation of classes implementing #WebKitPermissionRequest 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 webkit_print_operation_set_print_settings() and
webkit_print_operation_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 webkit_permission_state_query_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 #WebKitWebView::create on the newly created #WebKitWebView 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 #WebKitWindowProperties of @web_view. See also webkit_web_view_get_window_properties().
§resource-load-started
Emitted when a new resource is going to be loaded. The @request parameter contains the #WebKitURIRequest 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 #WebKitWebView::ready-to-show on the newly
created #WebKitWebView when JavaScript code calls
§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 #WebKitColorChooserRequest 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 #WebKitFileChooserRequest 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 ScriptDialogType::Alert
: message dialog with a single Close button.
ScriptDialogType::Confirm
: message dialog with OK and Cancel buttons.
ScriptDialogType::Prompt
: message dialog with OK and Cancel buttons and
a text entry with the default text.
ScriptDialogType::BeforeUnloadConfirm
: message dialog with Stay and Leave buttons.
It is possible to handle the script dialog request asynchronously, by simply caling webkit_script_dialog_ref() on the @dialog argument and calling webkit_script_dialog_close() when done. If the last reference is removed on a #WebKitScriptDialog and the dialog has not been closed, webkit_script_dialog_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 #WebKitWebView 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 webkit_form_submission_request_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 webkit_form_submission_request_submit() when done to continue with the form submission. If the last reference is removed on a #WebKitFormSubmissionRequest and the form has not been submitted, webkit_form_submission_request_submit() will be called.
§user-message-received
This signal is emitted when a #WebKitUserMessage is received from the #WebKitWebPage corresponding to @web_view. You can reply to the message using webkit_user_message_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 [WidgetExtManual::keynav_failed()
][crate::gtk::prelude::WidgetExtManual::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
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 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 Tab to move forward, and Shift+Tab to move backward.
Action
§query-tooltip
Emitted when the widget’s tooltip is about to be shown.
This happens when the 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 [WidgetExtManual::realize()
][crate::gtk::prelude::WidgetExtManual::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 [WidgetExtManual::state_flags()
][crate::gtk::prelude::WidgetExtManual::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 [WidgetExtManual::unrealize()
][crate::gtk::prelude::WidgetExtManual::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 #WebKitWebView with the default #WebKitWebContext.
Creates a new #WebKitWebView with the default #WebKitWebContext and no #WebKitUserContentManager 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 #WebKitWebView 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§fn partial_cmp(&self, other: &OT) -> Option<Ordering>
fn partial_cmp(&self, other: &OT) -> Option<Ordering>
Partial comparison for two GObjects.
Compares the memory addresses of the provided objects.
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§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 UnwindSafe for WebView
Blanket Implementations§
source§impl<O> AccessibleExt for Owhere
O: IsA<Accessible>,
impl<O> AccessibleExt for Owhere
O: IsA<Accessible>,
fn accessible_role(&self) -> AccessibleRole
fn reset_property(&self, property: AccessibleProperty)
fn reset_relation(&self, relation: AccessibleRelation)
fn reset_state(&self, state: AccessibleState)
fn set_accessible_role(&self, accessible_role: AccessibleRole)
fn connect_accessible_role_notify<F>(&self, f: F) -> SignalHandlerId
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)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 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, )
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
source§fn can_go_forward(&self) -> bool
fn can_go_forward(&self) -> bool
source§fn can_show_mime_type(&self, mime_type: &str) -> bool
fn can_show_mime_type(&self, mime_type: &str) -> bool
source§fn download_uri(&self, uri: &str) -> Option<Download>
fn download_uri(&self, uri: &str) -> Option<Download>
source§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, )
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 automation_presentation_type(&self) -> AutomationBrowsingContextPresentation
fn automation_presentation_type(&self) -> AutomationBrowsingContextPresentation
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
source§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>
source§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>
source§fn estimated_load_progress(&self) -> f64
fn estimated_load_progress(&self) -> f64
source§fn find_controller(&self) -> Option<FindController>
fn find_controller(&self) -> Option<FindController>
source§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>
source§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 page_id(&self) -> u64
fn page_id(&self) -> u64
source§fn session_state(&self) -> Option<WebViewSessionState>
fn session_state(&self) -> Option<WebViewSessionState>
source§fn settings(&self) -> Option<Settings>
fn settings(&self) -> Option<Settings>
source§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 title(&self) -> Option<GString>
fn title(&self) -> Option<GString>
source§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>
source§fn web_extension_mode(&self) -> WebExtensionMode
fn web_extension_mode(&self) -> WebExtensionMode
source§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>
source§fn zoom_level(&self) -> f64
fn zoom_level(&self) -> f64
source§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)
source§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_loading(&self) -> bool
fn is_loading(&self) -> bool
source§fn is_playing_audio(&self) -> bool
fn is_playing_audio(&self) -> bool
source§fn load_alternate_html(
&self,
content: &str,
content_uri: &str,
base_uri: Option<&str>,
)
fn load_alternate_html( &self, content: &str, content_uri: &str, base_uri: Option<&str>, )
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_html(&self, content: &str, base_uri: Option<&str>)
fn load_html(&self, content: &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)
source§fn reload_bypass_cache(&self)
fn reload_bypass_cache(&self)
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)
source§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])
source§fn set_custom_charset(&self, charset: Option<&str>)
fn set_custom_charset(&self, charset: Option<&str>)
source§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)
source§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)
source§fn stop_loading(&self)
fn stop_loading(&self)
source§fn terminate_web_process(&self)
fn terminate_web_process(&self)
source§fn web_context(&self) -> Option<WebContext>
fn web_context(&self) -> Option<WebContext>
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
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
false
, and the menu represented
by @context_menu will be shown.
true
so that the proposed menu will not be shown.
false
so
that the menu will be shown. You can also ignore the proposed #WebKitContextMenu,
build your own #GtkMenu and return true
to prevent the proposed menu from being shown.
source§fn connect_create<F: Fn(&Self, &NavigationAction) -> Widget + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_create<F: Fn(&Self, &NavigationAction) -> 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
source§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
source§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
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
source§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
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 #WebKitWebView::load-failed signal is emitted
before #WebKitWebView::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
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
source§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
source§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
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
source§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
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
source§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
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
source§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
source§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
ScriptDialogType::Alert
: message dialog with a single Close button.
ScriptDialogType::Confirm
: message dialog with OK and Cancel buttons.
ScriptDialogType::Prompt
: message dialog with OK and Cancel buttons and
a text entry with the default text.
ScriptDialogType::BeforeUnloadConfirm
: message dialog with Stay and Leave buttons.