webkit.c.types
C types for webkit6 library
Types 173
Enum values representing the authentication scheme.
Enum values used for determining the automation browsing context presentation.
Enum values used to specify autoplay policies.
Enum values used for determining the #WebKitWebContext cache model.
Enum values used to denote the stock actions for #WebKitContextMenuItem<!-- -->s
Enum values used to denote the cookie acceptance policies.
Enum values used to denote the cookie persistent storage types.
Enum values representing the duration for which a credential persists.
Enum values used to denote the various download errors.
Enum values with flags representing typing attributes.
Enum values used to denote the various errors related to the #WebKitFaviconDatabase.
Describes the status of a struct@WebKitFeature.
The status for a given feature can be obtained with id@webkit_feature_get_status.
Enum values used to specify search options.
Enum values used for determining the hardware acceleration policy.
Enum values with flags representing the context of a #WebKitHitTestResult.
Enum values used to describe hints that might be taken into account by input methods.
Enum values used to describe the primary purpose of the active editable element.
Enum values previously used to denote the different events which can trigger the detection of insecure content. Since 2.46, WebKit generally no longer loads insecure content in secure contexts.
Enum values used to denote errors happening when executing JavaScript
Enum values used to denote the different events that happen during a #WebKitWebView load operation.
Enum values used to specify the capture state of a media device.
Enum values used to denote the various media errors.
Enum values used to denote the various navigation types.
Enum values used to denote the various network errors.
Enum values used to set the network proxy mode.
Enum values representing query permission results.
Enum values used for determining the type of a policy decision during #WebKitWebView::decide-policy.
Enum values used to denote the various policy errors.
Enum values used to denote the various print errors.
Enum values representing the response of the print dialog shown with [webkit.print_operation.PrintOperation.runDialog].
Enum values to specify the different ways in which a #WebKitWebView can save its current web page into a self-contained file.
Enum values used for determining the type of #WebKitScriptDialog
Enum values used to denote errors happening when creating snapshots of #WebKitWebView
Enum values used to specify options when taking a snapshot from a #WebKitWebView.
Enum values used to specify the region from which to get a #WebKitWebView snapshot
Enum values used to denote the TLS errors policy.
Errors that can occur while compiling content filters.
Specifies in which frames user style sheets are to be inserted in.
Enum values used to denote errors happening when sending user messages.
Specifies at which place of documents an user script will be inserted.
Specifies how to treat an user style sheet.
Enum values used to denote errors happening when creating a #WebKitWebExtensionMatchPattern
Enum values representing matching options.
Enum values used for setting if a #WebKitWebView is intended for WebExtensions.
Enum values used to specify the reason why the web process terminated abnormally.
Enum values with flags representing types of Website data.
Information about an application running in automation mode.
Represents an authentication request.
Whenever a client attempts to load a page protected by HTTP authentication, credentials will need to be provided to authorize access. To allow the client to decide how it wishes to handle authentication, WebKit will fire a #WebKitWebView::authenticate signal with a WebKitAuthenticationRequest object to provide client side authentication support. Credentials are exposed through the #WebKitCredential object.
In case the client application does not wish to handle this signal WebKit will provide a default handler. To handle authentication asynchronously, simply increase the reference count of the WebKitAuthenticationRequest object.
GObjectClass parentClassAutomation Session.
WebKitAutomationSession represents an automation session of a WebKitWebContext. When a new session is requested, a WebKitAutomationSession is created and the signal WebKitWebContext::automation-started is emitted with the WebKitAutomationSession as argument. Then, the automation client can request the session to create a new #WebKitWebView to interact with it. When this happens the signal #WebKitAutomationSession::create-web-view is emitted.
GObjectClass parentClassList of visited pages.
WebKitBackForwardList maintains a list of visited pages used to navigate to recent pages. Items are inserted in the list in the order they are visited.
WebKitBackForwardList also maintains the notion of the current item (which is always at index 0), the preceding item (which is at index -1), and the following item (which is at index 1). Methods [webkit.web_view.WebView.goBack] and [webkit.web_view.WebView.goForward] move the current item backward or forward by one. Method [webkit.web_view.WebView.goToBackForwardListItem] sets the current item to the specified item. All other methods returning #WebKitBackForwardListItem<!-- -->s do not change the value of the current item, they just return the requested item or items.
GObjectClass parentClassOne item of the #WebKitBackForwardList.
A history item is part of the #WebKitBackForwardList and consists out of a title and a URI.
GInitiallyUnownedClass parentClassA permission request for reading clipboard contents.
WebKitClipboardPermissionRequest represents a request for permission to decide whether WebKit can access the clipboard to read its contents through the Async Clipboard API.
When a WebKitClipboardPermissionRequest is not handled by the user, it is denied by default.
GObjectClass parentClassA request to open a color chooser.
Whenever the user interacts with an <input type='color' /> HTML element, WebKit will need to show a dialog to choose a color. For that to happen in a general way, instead of just opening a #GtkColorChooser (which might be not desirable in some cases, which could prefer to use their own color chooser dialog), WebKit will fire the #WebKitWebView::run-color-chooser signal with a #WebKitColorChooserRequest object, which will allow the client application to specify the color to be selected, to inspect the details of the request (e.g. to get initial color) and to cancel the request, in case nothing was selected.
In case the client application does not wish to handle this signal, WebKit will provide a default handler which will asynchronously run a regular #GtkColorChooserDialog for the user to interact with.
GObjectClass parentClassRepresents the context menu in a #WebKitWebView.
#WebKitContextMenu represents a context menu containing #WebKitContextMenuItem<!-- -->s in a #WebKitWebView.
When a #WebKitWebView is about to display the context menu, it emits the #WebKitWebView::context-menu signal, which has the #WebKitContextMenu as an argument. You can modify it, adding new submenus that you can create with [webkitwebprocessextension.context_menu.ContextMenu.new_], adding new #WebKitContextMenuItem<!-- -->s with [webkitwebprocessextension.context_menu.ContextMenu.prepend], [webkitwebprocessextension.context_menu.ContextMenu.append] or [webkitwebprocessextension.context_menu.ContextMenu.insert], maybe after having removed the existing ones with [webkitwebprocessextension.context_menu.ContextMenu.removeAll].
GObjectClass parentClassOne item of a #WebKitContextMenu.
The #WebKitContextMenu is composed of #WebKitContextMenuItem<!-- -->s. These items can be created from a #GtkAction, from a #WebKitContextMenuAction or from a #WebKitContextMenuAction and a label. These #WebKitContextMenuAction<!-- -->s denote stock actions for the items. You can also create separators and submenus.
GInitiallyUnownedClass parentClassDefines how to handle cookies in a #WebKitWebContext.
The WebKitCookieManager defines how to set up and handle cookies. You can get it from a #WebKitWebsiteDataManager with webkit_website_data_manager_get_cookie_manager(), and use it to set where to store cookies with [webkit.cookie_manager.CookieManager.setPersistentStorage], or to set the acceptance policy, with [webkit.cookie_manager.CookieManager.getAcceptPolicy].
GObjectClass parentClassGroups information used for user authentication.
A permission request for accessing user's audio/video devices.
WebKitUserMediaPermissionRequest represents a request for permission to whether WebKit should be allowed to access the user's devices information when requested through the enumerateDevices API.
When a WebKitDeviceInfoPermissionRequest is not handled by the user, it is denied by default.
GObjectClass parentClassObject used to communicate with the application when downloading.
#WebKitDownload carries information about a download request and response, including a #WebKitURIRequest and a #WebKitURIResponse objects. The application may use this object to control the download process, or to simply figure out what is to be downloaded, and handle the download process itself.
GObjectClass parentClassWeb editor state.
WebKitEditorState represents the state of a #WebKitWebView editor. Use [webkit.web_view.WebView.getEditorState] to get the WebKitEditorState of a #WebKitWebView.
GObjectClass parentClassProvides access to the icons associated with web sites.
WebKit will automatically look for available icons in <link> elements on opened pages as well as an existing favicon.ico and load the images found into a memory cache if possible. That cache is frozen to an on-disk database for persistence.
If #WebKitSettings:enable-private-browsing is true, new icons won't be added to the on-disk database and no existing icons will be deleted from it. Nevertheless, WebKit will still store them in the in-memory cache during the current execution.
GObjectClass parentClassDescribes a web engine feature that may be toggled at runtime.
The WebKit web engine includes a set of features which may be toggled programmatically, each one represented by a #WebKitFeature that provides information about it:
- A unique “identifier”: [webkit.feature.Feature.getIdentifier].
- A “default value”, which indicates whether the option is enabled
automatically: [webkit.feature.Feature.getDefaultValue].
- Its “status”, which determines whether it should be considered
user-settable and its development stage (see enum@FeatureStatus for details): [webkit.feature.Feature.getStatus].
- A category, which may be used to group features together:
[webkit.feature.Feature.getCategory].
- An optional short “name” which can be presented to an user:
[webkit.feature.Feature.getName].
- An optional longer “detailed” description:
[webkit.feature.Feature.getDetails].
The lists of available features can be obtained with [webkit.settings.Settings.getAllFeatures], [webkit.settings.Settings.getExperimentalFeatures], and [webkit.settings.Settings.getDevelopmentFeatures]). As a rule of thumb, applications which may want to allow users (i.e. web developers) to test WebKit features should use the list of experimental features. Additionally, applications might want to expose development features *when targeting technically inclined users* for early testing of in-development features (i.e. in “technology preview” or “canary” builds).
Applications must not expose the list of all features to end users because they often lack descriptions and control parts of the web engine which are either intended to be used during development of WebKit itself, or in specific scenarios to tweak how WebKit integrates with the application.
Contains a set of toggle-able web engine features.
The list supports passing around a set of struct@Feature objects and iterating over them:
g_autoptr(WebKitFeatureList) list = webkit_settings_get_experimental_features();
for (gsize i = 0; i < webkit_feature_list_get_length(list): i++) {
WebKitFeature *feature = webkit_feature_list_get(list, i);
// Do something with "feature".
}Lists of features can be obtained with [webkit.settings.Settings.getExperimentalFeatures], [webkit.settings.Settings.getDevelopmentFeatures], and [webkit.settings.Settings.getAllFeatures].
A request to open a file chooser.
Whenever the user interacts with an HTML input element with file type, WebKit will need to show a dialog to choose one or more files to be uploaded to the server along with the rest of the form data. For that to happen in a general way, instead of just opening a #GtkFileChooserDialog (which might be not desirable in some cases, which could prefer to use their own file chooser dialog), WebKit will fire the #WebKitWebView::run-file-chooser signal with a #WebKitFileChooserRequest object, which will allow the client application to specify the files to be selected, to inspect the details of the request (e.g. if multiple selection should be allowed) and to cancel the request, in case nothing was selected.
In case the client application does not wish to handle this signal, WebKit will provide a default handler which will asynchronously run a regular #GtkFileChooserDialog for the user to interact with.
GObjectClass parentClassControls text search in a #WebKitWebView.
A #WebKitFindController is used to search text in a #WebKitWebView. You can get a #WebKitWebView<!-- -->'s #WebKitFindController with [webkit.web_view.WebView.getFindController], and later use it to search for text using [webkit.find_controller.FindController.search], or get the number of matches using [webkit.find_controller.FindController.countMatches]. The operations are asynchronous and trigger signals when ready, such as #WebKitFindController::found-text, #WebKitFindController::failed-to-find-text or #WebKitFindController::counted-matches<!-- -->.
GObjectClass parentClassRepresents a form submission request.
When a form is about to be submitted in a #WebKitWebView, the #WebKitWebView::submit-form signal is emitted. Its request argument contains information about the text fields of the form, that are typically used to store login information, returned as lists by [webkit.form_submission_request.FormSubmissionRequest.listTextFields]. You can submit the form with [webkit.form_submission_request.FormSubmissionRequest.submit].
GObjectClass parentClassGeolocation manager.
WebKitGeolocationManager provides API to get the geographical position of the user. Once a #WebKitGeolocationPermissionRequest is allowed, when WebKit needs to know the user location #WebKitGeolocationManager::start signal is emitted. If the signal is handled and returns true, the application is responsible for providing the position every time it's updated by calling [webkit.geolocation_manager.GeolocationManager.updatePosition]. The signal #WebKitGeolocationManager::stop will be emitted when location updates are no longer needed.
GObjectClass parentClassA permission request for sharing the user's location.
WebKitGeolocationPermissionRequest represents a request for permission to decide whether WebKit should provide the user's location to a website when requested through the Geolocation API.
When a WebKitGeolocationPermissionRequest is not handled by the user, it is denied by default.
When embedding web views in your application, you must configure an application identifier to allow web content to use geolocation services. The identifier must match the name of the .desktop file which describes the application, sans the suffix.
If your application uses #GApplication (or any subclass like #GtkApplication), WebKit will automatically use the identifier returned by [gio.application.Application.getApplicationId]. This is the recommended approach for enabling geolocation in applications.
If an identifier cannot be obtained through #GApplication, the value returned by [glib.global.getPrgname] will be used instead as a fallback. For programs which cannot use #GApplication, calling [glib.global.setPrgname] early during initialization is needed when the name of the executable on disk does not match the name of a valid .desktop file.
GObjectClass parentClassAn opaque struct to provide position updates to a #WebKitGeolocationManager.
WebKitGeolocationPosition is an opaque struct used to provide position updates to a #WebKitGeolocationManager using [webkit.geolocation_manager.GeolocationManager.updatePosition].
Result of a Hit Test.
A Hit Test is an operation to get context information about a given point in a #WebKitWebView. #WebKitHitTestResult represents the result of a Hit Test. It provides context information about what is at the coordinates of the Hit Test, such as if there's a link, an image or a media.
You can get the context of the HitTestResult with [webkitwebprocessextension.hit_test_result.HitTestResult.getContext] that returns a bitmask of #WebKitHitTestResultContext flags. You can also use [webkitwebprocessextension.hit_test_result.HitTestResult.contextIsLink], [webkitwebprocessextension.hit_test_result.HitTestResult.contextIsImage] and [webkitwebprocessextension.hit_test_result.HitTestResult.contextIsMedia] to determine whether there's a link, image or a media element at the coordinates of the Hit Test. Note that it's possible that several #WebKitHitTestResultContext flags are active at the same time, for example if there's a link containing an image.
When the mouse is moved over a #WebKitWebView a Hit Test is performed for the mouse coordinates and #WebKitWebView::mouse-target-changed signal is emitted with a #WebKitHitTestResult.
GObjectClass parentClassDescribes a first party origin.
Describes a third party origin.
Base class for input method contexts.
WebKitInputMethodContext defines the interface to implement WebKit input methods. The input methods are used by WebKit, when editable content is focused, to map from key events to Unicode character strings.
An input method may consume multiple key events in sequence and finally output the composed result. This is called preediting, and an input method may provide feedback about this process by displaying the intermediate composition states as preedit text.
GObjectClass parentClassvoid function(WebKitInputMethodContext * context) preeditStartedvoid function(WebKitInputMethodContext * context) preeditChangedvoid function(WebKitInputMethodContext * context) preeditFinishedvoid function(WebKitInputMethodContext * context, const(char) * text) committedvoid function(WebKitInputMethodContext * context, int offset, uint nChars) deleteSurroundingvoid function(WebKitInputMethodContext * context, gboolean enabled) setEnablePreeditCalled via [webkit.inputmethodcontext.InputMethodContext.setEnablePreedit] to control the use of the preedit string.void function(WebKitInputMethodContext * context, char * * text, GList * * underlines, uint * cursorOffset) getPreeditCalled via [webkit.inputmethodcontext.InputMethodContext.getPreedit] to retrieve the text currently being preedited for display at the cursor position. Any input method which composes complex chara...gboolean function(WebKitInputMethodContext * context, GdkEvent * keyEvent) filterKeyEventCalled via [webkit.inputmethodcontext.InputMethodContext.filterKeyEvent] on every key press or release event. Every non-trivial input method needs to override this in order to implement the mapping...void function(WebKitInputMethodContext * context) notifyFocusInCalled via [webkit.inputmethodcontext.InputMethodContext.notifyFocusIn] when an editable element of the #WebKitWebView has gained focus.void function(WebKitInputMethodContext * context) notifyFocusOutCalled via [webkit.inputmethodcontext.InputMethodContext.notifyFocusOut] when an editable element of the #WebKitWebView has lost focus.void function(WebKitInputMethodContext * context, int x, int y, int width, int height) notifyCursorAreaCalled via [webkit.inputmethodcontext.InputMethodContext.notifyCursorArea] to inform the input method of the current cursor location relative to the client window.void function(WebKitInputMethodContext * context, const(char) * text, uint length, uint cursorIndex, uint selectionIndex) notifySurroundingCalled via [webkit.inputmethodcontext.InputMethodContext.notifySurrounding] to update the context surrounding the cursor. The provided text should not include the preedit string.void function(WebKitInputMethodContext * context) resetCalled via [webkit.inputmethodcontext.InputMethodContext.reset] to signal a change that requires a reset. An input method that implements preediting should override this method to clear the preedit...void function() WebkitReserved0void function() WebkitReserved1void function() WebkitReserved2void function() WebkitReserved3void function() WebkitReserved4void function() WebkitReserved5void function() WebkitReserved6void function() WebkitReserved7void function() WebkitReserved8void function() WebkitReserved9void function() WebkitReserved10void function() WebkitReserved11void function() WebkitReserved12void function() WebkitReserved13void function() WebkitReserved14void function() WebkitReserved15Range of text in an preedit string to be shown underlined.
A permission request for using an EME Content Decryption Module.
WebKitMediaKeySystemPermissionRequest represents a request for permission to decide whether WebKit should use the given CDM to access protected media when requested through the MediaKeySystem API.
When a WebKitMediaKeySystemPermissionRequest is not handled by the user, it is denied by default.
When handling this permission request the application may perform additional installation of the requested CDM, unless it is already present on the host system.
GObjectClass parentClassA boxed type representing the settings for the memory pressure handler
#WebKitMemoryPressureSettings is a boxed type that can be used to provide some custom settings to control how the memory pressure situations are handled by the different processes.
The memory pressure system implemented inside the different process will try to keep the memory usage under the defined memory limit. In order to do that, it will check the used memory with a user defined frequency and decide whether it should try to release memory. The thresholds passed will define how urgent is to release that memory.
Take into account that badly defined parameters can greatly reduce the performance of the engine. For example, setting memory limit too low with a fast poll interval can cause the process to constantly be trying to release memory.
A #WebKitMemoryPressureSettings can be passed to a #WebKitWebContext constructor, and the settings will be applied to all the web processes created by that context.
A #WebKitMemoryPressureSettings can be passed to webkit_website_data_manager_set_memory_pressure_settings(), and the settings will be applied to all the network processes created after that call by any instance of #WebKitWebsiteDataManager.
Provides details about interaction resulting in a resource load.
A policy decision for navigation actions.
WebKitNavigationPolicyDecision represents a policy decision for events associated with navigations. If the value of #WebKitNavigationPolicyDecision:mouse-button is not 0, then the navigation was triggered by a mouse event.
WebKitPolicyDecisionClass parentClassConfigures network proxies.
WebKitNetworkProxySettings can be used to provide a custom proxy configuration to a #WebKitWebContext. You need to call webkit_web_context_set_network_proxy_settings() with [webkit.types.NetworkProxyMode.Custom] and a WebKitNetworkProxySettings.
Manages network configuration.
GObjectClass parentClassHolds information about a notification that should be shown to the user.
GObjectClass parentClassA permission request for displaying web notifications.
WebKitNotificationPermissionRequest represents a request for permission to decide whether WebKit should provide the user with notifications through the Web Notification API.
When a WebKitNotificationPermissionRequest is not handled by the user, it is denied by default.
GObjectClass parentClassRepresents the dropdown menu of a select element in a #WebKitWebView.
When a select element in a #WebKitWebView needs to display a dropdown menu, the signal #WebKitWebView::show-option-menu is emitted, providing a WebKitOptionMenu with the #WebKitOptionMenuItem<!-- -->s that should be displayed.
GObjectClass parentClassOne item of a #WebKitOptionMenu.
The #WebKitOptionMenu is composed of WebKitOptionMenuItem<!-- -->s. A WebKitOptionMenuItem always has a label and can contain a tooltip text. You can use the WebKitOptionMenuItem of a #WebKitOptionMenu to build your own menus.
A permission request.
There are situations where an embedder would need to ask the user for permission to do certain types of operations, such as switching to fullscreen mode or reporting the user's location through the standard Geolocation API. In those cases, WebKit will emit a #WebKitWebView::permission-request signal with a #WebKitPermissionRequest object attached to it.
GTypeInterface parentInterfacevoid function(WebKitPermissionRequest * request) allowvoid function(WebKitPermissionRequest * request) denyThis query represents a user's choice to allow or deny access to "powerful features" of the platform, as specified in the Permissions W3C Specification.
When signalled by the #WebKitWebView through the query-permission-state signal, the application has to eventually respond, via [webkit.permission_state_query.PermissionStateQuery.finish], whether it grants, denies or requests a dedicated permission prompt for the given query.
When a #WebKitPermissionStateQuery is not handled by the user, the user-agent is instructed to prompt the user for the given permission.
A permission request for locking the pointer.
WebKitPointerLockPermissionRequest represents a request for permission to decide whether WebKit can lock the pointer device when requested by web content.
When a WebKitPointerLockPermissionRequest is not handled by the user, it is allowed by default.
GObjectClass parentClassA pending policy decision.
Often WebKit allows the client to decide the policy for certain operations. For instance, a client may want to open a link in a new tab, block a navigation entirely, query the user or trigger a download instead of a navigation. In these cases WebKit will fire the #WebKitWebView::decide-policy signal with a #WebKitPolicyDecision object. If the signal handler does nothing, WebKit will act as if [webkit.policy_decision.PolicyDecision.use] was called as soon as signal handling completes. To make a policy decision asynchronously, simply increment the reference count of the #WebKitPolicyDecision object.
GObjectClass parentClassvoid function() WebkitReserved0void function() WebkitReserved1void function() WebkitReserved2void function() WebkitReserved3void function() WebkitReserved4void function() WebkitReserved5void function() WebkitReserved6void function() WebkitReserved7Controls a print operation.
A #WebKitPrintOperation controls a print operation in WebKit. With a similar API to #GtkPrintOperation, it lets you set the print settings with [webkit.print_operation.PrintOperation.setPrintSettings] or display the print dialog with [webkit.print_operation.PrintOperation.runDialog].
GObjectClass parentClassA policy decision for resource responses.
WebKitResponsePolicyDecision represents a policy decision for a resource response, whether from the network or the local system. A very common use case for these types of decision is deciding whether or not to download a particular resource or to load it normally.
WebKitPolicyDecisionClass parentClassCarries details to be shown in user-facing dialogs.
A reply for a script message received. If no reply has been sent by the user, an automatically generated reply with undefined value with be sent.
Controls security settings in a #WebKitWebContext.
The #WebKitSecurityManager defines security settings for URI schemes in a #WebKitWebContext. Get it from the context with [webkit.web_context.WebContext.getSecurityManager], and use it to register a URI scheme with a certain security level, or to check if it already has it.
GObjectClass parentClassA security boundary for websites.
#WebKitSecurityOrigin is a representation of a security domain defined by websites. A security origin consists of a protocol, a hostname, and an optional port number.
Resources with the same security origin can generally access each other for client-side scripting or database access. When comparing origins, beware that if both protocol and host are null, the origins should not be treated as equal.
Control the behaviour of a #WebKitWebView.
#WebKitSettings can be applied to a #WebKitWebView to control text charset, color, font sizes, printing mode, script support, loading of images and various other things on a #WebKitWebView. After creation, a #WebKitSettings object contains default settings.
// Disable JavaScript
WebKitSettings *settings = webkit_web_view_group_get_settings (my_view_group);
webkit_settings_set_enable_javascript (settings, FALSE);GObjectClass parentClassRepresents a URI request.
A #WebKitURIRequest can be created with a URI using the [webkitwebprocessextension.urirequest.URIRequest.new_] method, and you can get the URI of an existing request with the [webkitwebprocessextension.urirequest.URIRequest.getUri] one.
GObjectClass parentClassRepresents an URI response.
A #WebKitURIResponse contains information such as the URI, the status code, the content length, the mime type, the HTTP status or the suggested filename.
GObjectClass parentClassRepresents a URI scheme request.
If you register a particular URI scheme in a #WebKitWebContext, using [webkit.web_context.WebContext.registerUriScheme], you have to provide a #WebKitURISchemeRequestCallback. After that, when a URI request is made with that particular scheme, your callback will be called. There you will be able to access properties such as the scheme, the URI and path, and the #WebKitWebView that initiated the request, and also finish the request with [webkit.urischeme_request.URISchemeRequest.finish].
GObjectClass parentClassRepresents a URI scheme response.
If you register a particular URI scheme in a #WebKitWebContext, using [webkit.web_context.WebContext.registerUriScheme], you have to provide a #WebKitURISchemeRequestCallback. After that, when a URI response is made with that particular scheme, your callback will be called. There you will be able to provide more response parameters when the methods and properties of a #WebKitURISchemeRequest is not enough.
When you finished setting up your #WebKitURISchemeResponse, call webkit_uri_request_finish_with_response() with it to return the response.
GObjectClass parentClassA compiled set of rules which applied to resource loads.
Handles storage of user content filters on disk.
The WebKitUserContentFilterStore provides the means to import and save
JSON rule sets,which can be loaded later in an efficient manner. Once filters are stored, the #WebKitUserContentFilter objects which represent them can be added to a #WebKitUserContentManager with [webkit.user_content_manager.UserContentManager.addFilter].
JSON rule sets are imported using [webkit.user_content_filter_store.UserContentFilterStore.save] and stored on disk in an implementation defined format. The contents of a filter store must be managed using the #WebKitUserContentFilterStore: a list of all the stored filters can be obtained with [webkit.user_content_filter_store.UserContentFilterStore.fetchIdentifiers], [webkit.user_content_filter_store.UserContentFilterStore.load] can be used to retrieve a previously saved filter, and removed from the store with [webkit.user_content_filter_store.UserContentFilterStore.remove].
GObjectClass parentClassManages user-defined content which affects web pages.
Using a #WebKitUserContentManager user CSS style sheets can be set to be injected in the web pages loaded by a #WebKitWebView, by [webkit.user_content_manager.UserContentManager.addStyleSheet].
To use a #WebKitUserContentManager, it must be created using [webkit.user_content_manager.UserContentManager.new_], and then used to construct a #WebKitWebView. User style sheets can be created with [webkit.user_style_sheet.UserStyleSheet.new_].
User style sheets can be added and removed at any time, but they will affect the web pages loaded afterwards.
GObjectClass parentClassA permission request for accessing user's audio/video devices.
WebKitUserMediaPermissionRequest represents a request for permission to decide whether WebKit should be allowed to access the user's audio and video source devices when requested through the getUserMedia API.
When a WebKitUserMediaPermissionRequest is not handled by the user, it is denied by default.
GObjectClass parentClassMessage that can be sent between the UI process and web process extensions.
A WebKitUserMessage is a message that can be used for the communication between the UI process and web process extensions. A WebKitUserMessage always has a name, and it can also include parameters and UNIX file descriptors. Messages can be sent from a #WebKitWebContext to all web process extensions, from a web process extension to its corresponding #WebKitWebContext, and from a #WebKitWebView to its corresponding #WebKitWebPage (and vice versa). One to one messages can be replied to directly with [webkitwebprocessextension.user_message.UserMessage.sendReply].
GInitiallyUnownedClass parentClassA JavaScript snippet which can be injected in loaded pages.
A CSS style sheet which can be injected in loaded pages.
Manages aspects common to all #WebKitWebView<!-- -->s
The #WebKitWebContext manages all aspects common to all #WebKitWebView<!-- -->s.
You can define the #WebKitCacheModel with [webkit.web_context.WebContext.setCacheModel], depending on the needs of your application. You can access the #WebKitSecurityManager to specify the behaviour of your application regarding security using [webkit.web_context.WebContext.getSecurityManager].
It is also possible to change your preferred language or enable spell checking, using [webkit.web_context.WebContext.setPreferredLanguages], [webkit.web_context.WebContext.setSpellCheckingLanguages] and [webkit.web_context.WebContext.setSpellCheckingEnabled].
You can use [webkit.web_context.WebContext.registerUriScheme] to register custom URI schemes, and manage several other settings.
TLS certificate validation failure is now treated as a transport error by default. To handle TLS failures differently, you can connect to #WebKitWebView::load-failed-with-tls-errors. Alternatively, you can use webkit_web_context_set_tls_errors_policy() to set the policy [webkit.types.TLSErrorsPolicy.Ignore]; however, this is not appropriate for Internet applications.
GObjectClass parentClassRepresents a way to specify a group of URLs for use in WebExtensions.
All match patterns are specified as strings. Apart from the special <all_urls> pattern, match patterns consist of three parts: scheme, host, and path.
Generally, match patterns are returned from a #WebKitWebExtension.
Access to the WebKit inspector.
The WebKit Inspector is a graphical tool to inspect and change the content of a #WebKitWebView. It also includes an interactive JavaScript debugger. Using this class one can get a #GtkWidget which can be embedded into an application to show the inspector.
The inspector is available when the #WebKitSettings of the #WebKitWebView has set the #WebKitSettings:enable-developer-extras to true, otherwise no inspector is available.
// Enable the developer extras
WebKitSettings *settings = webkit_web_view_get_settings (WEBKIT_WEB_VIEW(my_webview));
g_object_set (G_OBJECT(settings), "enable-developer-extras", TRUE, NULL);
// Load some data or reload to be able to inspect the page
webkit_web_view_load_uri (WEBKIT_WEB_VIEW(my_webview), "http://www.gnome.org");
// Show the inspector
WebKitWebInspector *inspector = webkit_web_view_get_inspector (WEBKIT_WEB_VIEW(my_webview));
webkit_web_inspector_show (WEBKIT_WEB_INSPECTOR(inspector));GObjectClass parentClassRepresents a resource at the end of a URI.
A #WebKitWebResource encapsulates content for each resource at the end of a particular URI. For example, one #WebKitWebResource will be created for each separate image and stylesheet when a page is loaded.
You can access the response and the URI for a given #WebKitWebResource, using [webkit.web_resource.WebResource.getUri] and [webkit.web_resource.WebResource.getResponse], as well as the raw data, using [webkit.web_resource.WebResource.getData].
GObjectClass parentClassThe 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.
GtkWidgetClass parentClassvoid function() WebkitReserved0void function() WebkitReserved1void function() WebkitReserved2void function() WebkitReserved3WebKitWebViewBaseClass parentvoid function(WebKitWebView * webView, WebKitLoadEvent loadEvent) loadChangedgboolean function(WebKitWebView * webView, WebKitLoadEvent loadEvent, const(char) * failingUri, GError * error) loadFailedGtkWidget * function(WebKitWebView * webView, WebKitNavigationAction * navigationAction) createvoid function(WebKitWebView * webView) readyToShowvoid function(WebKitWebView * webView) runAsModalvoid function(WebKitWebView * webView) closegboolean function(WebKitWebView * webView, WebKitScriptDialog * dialog) scriptDialoggboolean function(WebKitWebView * webView, WebKitPolicyDecision * decision, WebKitPolicyDecisionType type) decidePolicygboolean function(WebKitWebView * webView, WebKitPermissionRequest * permissionRequest) permissionRequestvoid function(WebKitWebView * webView, WebKitHitTestResult * hitTestResult, uint modifiers) mouseTargetChangedgboolean function(WebKitWebView * webView, WebKitPrintOperation * printOperation) printvoid function(WebKitWebView * webView, WebKitWebResource * resource, WebKitURIRequest * request) resourceLoadStartedgboolean function(WebKitWebView * webView) enterFullscreengboolean function(WebKitWebView * webView) leaveFullscreengboolean function(WebKitWebView * webView, WebKitFileChooserRequest * request) runFileChoosergboolean function(WebKitWebView * webView, WebKitContextMenu * contextMenu, WebKitHitTestResult * hitTestResult) contextMenuvoid function(WebKitWebView * webView) contextMenuDismissedvoid function(WebKitWebView * webView, WebKitFormSubmissionRequest * request) submitFormvoid function(WebKitWebView * webView, WebKitInsecureContentEvent event) insecureContentDetectedgboolean function(WebKitWebView * webView) webProcessCrashedgboolean function(WebKitWebView * webView, WebKitAuthenticationRequest * request) authenticategboolean function(WebKitWebView * webView, const(char) * failingUri, GTlsCertificate * certificate, GTlsCertificateFlags errors) loadFailedWithTlsErrorsgboolean function(WebKitWebView * webView, WebKitNotification * notification) showNotificationgboolean function(WebKitWebView * webView, WebKitColorChooserRequest * request) runColorChoosergboolean function(WebKitWebView * webView, WebKitOptionMenu * menu, GdkRectangle * rectangle) showOptionMenuvoid function(WebKitWebView * webView, WebKitWebProcessTerminationReason reason) webProcessTerminatedgboolean function(WebKitWebView * webView, WebKitUserMessage * message) userMessageReceivedgboolean function(WebKitWebView * webView, WebKitPermissionStateQuery * query) queryPermissionStatevoid function() WebkitReserved0void function() WebkitReserved1void function() WebkitReserved2void function() WebkitReserved3void function() WebkitReserved4void function() WebkitReserved5void function() WebkitReserved6void function() WebkitReserved7void function() WebkitReserved8void function() WebkitReserved9void function() WebkitReserved10void function() WebkitReserved11void function() WebkitReserved12void function() WebkitReserved13void function() WebkitReserved14void function() WebkitReserved15void function() WebkitReserved16void function() WebkitReserved17void function() WebkitReserved18void function() WebkitReserved19void function() WebkitReserved20void function() WebkitReserved21void function() WebkitReserved22void function() WebkitReserved23void function() WebkitReserved24void function() WebkitReserved25void function() WebkitReserved26void function() WebkitReserved27void function() WebkitReserved28void function() WebkitReserved29void function() WebkitReserved30Handles serialization of a web view's browsing state.
Data stored locally by a web site.
WebKitWebsiteData represents data stored in the client by a particular website. A website is normally a set of URLs grouped by domain name. You can get the website name, which is usually the domain, with [webkit.website_data.WebsiteData.getName]. Documents loaded from the file system, like file:// URIs, are all grouped in the same WebKitWebsiteData with the name "Local files".
A website can store different types of data in the client side. #WebKitWebsiteDataTypes is an enum containing all the possible data types; use [webkit.website_data.WebsiteData.getTypes] to get the bitmask of data types. It's also possible to know the size of the data stored for some of the #WebKitWebsiteDataTypes by using [webkit.website_data.WebsiteData.getSize].
A list of WebKitWebsiteData can be retrieved with [webkit.website_data_manager.WebsiteDataManager.fetch]. See #WebKitWebsiteDataManager for more information.
A permission request for accessing website data from third-party domains.
WebKitWebsiteDataAccessPermissionRequest represents a request for permission to allow a third-party domain access its cookies.
When a WebKitWebsiteDataAccessPermissionRequest is not handled by the user, it is denied by default.
GObjectClass parentClassManages data stored locally by web sites.
You can use WebKitWebsiteDataManager to configure the local directories where website data will be stored. Use #WebKitWebsiteDataManager:base-data-directory and #WebKitWebsiteDataManager:base-cache-directory set a common base directory for all website data and caches.
A WebKitWebsiteDataManager can be ephemeral, in which case all the directory configuration is not needed because website data will never persist. You can create an ephemeral WebKitWebsiteDataManager with webkit_website_data_manager_new_ephemeral().
WebKitWebsiteDataManager can also be used to fetch website data, remove data stored by particular websites, or clear data for all websites modified since a given period of time.
GObjectClass parentClassView specific website policies.
WebKitWebsitePolicies allows you to configure per-page policies, currently only autoplay policies are supported.
GObjectClass parentClassWindow properties of a #WebKitWebView.
The content of a #WebKitWebView can request to change certain properties of the window containing the view. This can include the x, y position of the window, the width and height but also if a toolbar, scrollbar, statusbar, locationbar should be visible to the user, and the request to show the #WebKitWebView fullscreen.
The #WebKitWebView::ready-to-show signal handler is the proper place to apply the initial window properties. Then you can monitor the #WebKitWindowProperties by connecting to ::notify signal.
static void ready_to_show_cb (WebKitWebView *web_view, gpointer user_data)
{
GtkWidget *window;
WebKitWindowProperties *window_properties;
gboolean visible;
// Create the window to contain the WebKitWebView.
window = browser_window_new ();
gtk_container_add (GTK_CONTAINER (window), GTK_WIDGET (web_view));
gtk_widget_show (GTK_WIDGET (web_view));
// Get the WebKitWindowProperties of the web view and monitor it.
window_properties = webkit_web_view_get_window_properties (web_view);
g_signal_connect (window_properties, "notify::geometry",
G_CALLBACK (window_geometry_changed), window);
g_signal_connect (window_properties, "notify::toolbar-visible",
G_CALLBACK (window_toolbar_visibility_changed), window);
g_signal_connect (window_properties, "notify::menubar-visible",
G_CALLBACK (window_menubar_visibility_changed), window);
// Apply the window properties before showing the window.
visible = webkit_window_properties_get_toolbar_visible (window_properties);
browser_window_set_toolbar_visible (BROWSER_WINDOW (window), visible);
visible = webkit_window_properties_get_menubar_visible (window_properties);
browser_window_set_menubar_visible (BROWSER_WINDOW (window), visible);
if (webkit_window_properties_get_fullscreen (window_properties)) {
gtk_window_fullscreen (GTK_WINDOW (window));
} else {
GdkRectangle geometry;
gtk_window_set_resizable (GTK_WINDOW (window),
webkit_window_properties_get_resizable (window_properties));
webkit_window_properties_get_geometry (window_properties, &geometry);
gtk_window_move (GTK_WINDOW (window), geometry.x, geometry.y);
gtk_window_resize (GTK_WINDOW (window), geometry.width, geometry.height);
}
gtk_widget_show (window);
}GObjectClass parentClass