| Copyright | Will Thompson, Iñaki García Etxebarria and Jonas Platte |
|---|---|
| License | LGPL-2.1 |
| Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
| Safe Haskell | None |
| Language | Haskell2010 |
GI.WebKit2.Objects.WebContext
Contents
- Exported types
- Methods
- allowTlsCertificateForHost
- clearCache
- downloadUri
- getCacheModel
- getCookieManager
- getDefault
- getFaviconDatabase
- getFaviconDatabaseDirectory
- getPlugins
- getPluginsFinish
- getProcessModel
- getSecurityManager
- getSpellCheckingEnabled
- getSpellCheckingLanguages
- getTlsErrorsPolicy
- getWebProcessCountLimit
- getWebsiteDataManager
- initializeNotificationPermissions
- isEphemeral
- new
- newEphemeral
- newWithWebsiteDataManager
- prefetchDns
- registerUriScheme
- setAdditionalPluginsDirectory
- setCacheModel
- setDiskCacheDirectory
- setFaviconDatabaseDirectory
- setNetworkProxySettings
- setPreferredLanguages
- setProcessModel
- setSpellCheckingEnabled
- setSpellCheckingLanguages
- setTlsErrorsPolicy
- setWebExtensionsDirectory
- setWebExtensionsInitializationUserData
- setWebProcessCountLimit
- Properties
- Signals
Description
- newtype WebContext = WebContext (ManagedPtr WebContext)
- class GObject o => IsWebContext o
- toWebContext :: IsWebContext o => o -> IO WebContext
- noWebContext :: Maybe WebContext
- data WebContextAllowTlsCertificateForHostMethodInfo
- webContextAllowTlsCertificateForHost :: (HasCallStack, MonadIO m, IsWebContext a, IsTlsCertificate b) => a -> b -> Text -> m ()
- data WebContextClearCacheMethodInfo
- webContextClearCache :: (HasCallStack, MonadIO m, IsWebContext a) => a -> m ()
- data WebContextDownloadUriMethodInfo
- webContextDownloadUri :: (HasCallStack, MonadIO m, IsWebContext a) => a -> Text -> m Download
- data WebContextGetCacheModelMethodInfo
- webContextGetCacheModel :: (HasCallStack, MonadIO m, IsWebContext a) => a -> m CacheModel
- data WebContextGetCookieManagerMethodInfo
- webContextGetCookieManager :: (HasCallStack, MonadIO m, IsWebContext a) => a -> m CookieManager
- webContextGetDefault :: (HasCallStack, MonadIO m) => m WebContext
- data WebContextGetFaviconDatabaseMethodInfo
- webContextGetFaviconDatabase :: (HasCallStack, MonadIO m, IsWebContext a) => a -> m FaviconDatabase
- data WebContextGetFaviconDatabaseDirectoryMethodInfo
- webContextGetFaviconDatabaseDirectory :: (HasCallStack, MonadIO m, IsWebContext a) => a -> m Text
- data WebContextGetPluginsMethodInfo
- webContextGetPlugins :: (HasCallStack, MonadIO m, IsWebContext a, IsCancellable b) => a -> Maybe b -> Maybe AsyncReadyCallback -> m ()
- data WebContextGetPluginsFinishMethodInfo
- webContextGetPluginsFinish :: (HasCallStack, MonadIO m, IsWebContext a, IsAsyncResult b) => a -> b -> m [Plugin]
- data WebContextGetProcessModelMethodInfo
- webContextGetProcessModel :: (HasCallStack, MonadIO m, IsWebContext a) => a -> m ProcessModel
- data WebContextGetSecurityManagerMethodInfo
- webContextGetSecurityManager :: (HasCallStack, MonadIO m, IsWebContext a) => a -> m SecurityManager
- data WebContextGetSpellCheckingEnabledMethodInfo
- webContextGetSpellCheckingEnabled :: (HasCallStack, MonadIO m, IsWebContext a) => a -> m Bool
- data WebContextGetSpellCheckingLanguagesMethodInfo
- webContextGetSpellCheckingLanguages :: (HasCallStack, MonadIO m, IsWebContext a) => a -> m [Text]
- data WebContextGetTlsErrorsPolicyMethodInfo
- webContextGetTlsErrorsPolicy :: (HasCallStack, MonadIO m, IsWebContext a) => a -> m TLSErrorsPolicy
- data WebContextGetWebProcessCountLimitMethodInfo
- webContextGetWebProcessCountLimit :: (HasCallStack, MonadIO m, IsWebContext a) => a -> m Word32
- data WebContextGetWebsiteDataManagerMethodInfo
- webContextGetWebsiteDataManager :: (HasCallStack, MonadIO m, IsWebContext a) => a -> m WebsiteDataManager
- data WebContextInitializeNotificationPermissionsMethodInfo
- webContextInitializeNotificationPermissions :: (HasCallStack, MonadIO m, IsWebContext a) => a -> [SecurityOrigin] -> [SecurityOrigin] -> m ()
- data WebContextIsEphemeralMethodInfo
- webContextIsEphemeral :: (HasCallStack, MonadIO m, IsWebContext a) => a -> m Bool
- webContextNew :: (HasCallStack, MonadIO m) => m WebContext
- webContextNewEphemeral :: (HasCallStack, MonadIO m) => m WebContext
- webContextNewWithWebsiteDataManager :: (HasCallStack, MonadIO m, IsWebsiteDataManager a) => a -> m WebContext
- data WebContextPrefetchDnsMethodInfo
- webContextPrefetchDns :: (HasCallStack, MonadIO m, IsWebContext a) => a -> Text -> m ()
- data WebContextRegisterUriSchemeMethodInfo
- webContextRegisterUriScheme :: (HasCallStack, MonadIO m, IsWebContext a) => a -> Text -> URISchemeRequestCallback -> m ()
- data WebContextSetAdditionalPluginsDirectoryMethodInfo
- webContextSetAdditionalPluginsDirectory :: (HasCallStack, MonadIO m, IsWebContext a) => a -> Text -> m ()
- data WebContextSetCacheModelMethodInfo
- webContextSetCacheModel :: (HasCallStack, MonadIO m, IsWebContext a) => a -> CacheModel -> m ()
- data WebContextSetDiskCacheDirectoryMethodInfo
- webContextSetDiskCacheDirectory :: (HasCallStack, MonadIO m, IsWebContext a) => a -> Text -> m ()
- data WebContextSetFaviconDatabaseDirectoryMethodInfo
- webContextSetFaviconDatabaseDirectory :: (HasCallStack, MonadIO m, IsWebContext a) => a -> Maybe Text -> m ()
- data WebContextSetNetworkProxySettingsMethodInfo
- webContextSetNetworkProxySettings :: (HasCallStack, MonadIO m, IsWebContext a) => a -> NetworkProxyMode -> Maybe NetworkProxySettings -> m ()
- data WebContextSetPreferredLanguagesMethodInfo
- webContextSetPreferredLanguages :: (HasCallStack, MonadIO m, IsWebContext a) => a -> Maybe [Text] -> m ()
- data WebContextSetProcessModelMethodInfo
- webContextSetProcessModel :: (HasCallStack, MonadIO m, IsWebContext a) => a -> ProcessModel -> m ()
- data WebContextSetSpellCheckingEnabledMethodInfo
- webContextSetSpellCheckingEnabled :: (HasCallStack, MonadIO m, IsWebContext a) => a -> Bool -> m ()
- data WebContextSetSpellCheckingLanguagesMethodInfo
- webContextSetSpellCheckingLanguages :: (HasCallStack, MonadIO m, IsWebContext a) => a -> [Text] -> m ()
- data WebContextSetTlsErrorsPolicyMethodInfo
- webContextSetTlsErrorsPolicy :: (HasCallStack, MonadIO m, IsWebContext a) => a -> TLSErrorsPolicy -> m ()
- data WebContextSetWebExtensionsDirectoryMethodInfo
- webContextSetWebExtensionsDirectory :: (HasCallStack, MonadIO m, IsWebContext a) => a -> Text -> m ()
- data WebContextSetWebExtensionsInitializationUserDataMethodInfo
- webContextSetWebExtensionsInitializationUserData :: (HasCallStack, MonadIO m, IsWebContext a) => a -> GVariant -> m ()
- data WebContextSetWebProcessCountLimitMethodInfo
- webContextSetWebProcessCountLimit :: (HasCallStack, MonadIO m, IsWebContext a) => a -> Word32 -> m ()
- data WebContextLocalStorageDirectoryPropertyInfo
- constructWebContextLocalStorageDirectory :: IsWebContext o => Text -> IO (GValueConstruct o)
- getWebContextLocalStorageDirectory :: (MonadIO m, IsWebContext o) => o -> m (Maybe Text)
- webContextLocalStorageDirectory :: AttrLabelProxy "localStorageDirectory"
- data WebContextWebsiteDataManagerPropertyInfo
- constructWebContextWebsiteDataManager :: (IsWebContext o, IsWebsiteDataManager a) => a -> IO (GValueConstruct o)
- getWebContextWebsiteDataManager :: (MonadIO m, IsWebContext o) => o -> m WebsiteDataManager
- webContextWebsiteDataManager :: AttrLabelProxy "websiteDataManager"
- type C_WebContextDownloadStartedCallback = Ptr () -> Ptr Download -> Ptr () -> IO ()
- type WebContextDownloadStartedCallback = Download -> IO ()
- data WebContextDownloadStartedSignalInfo
- afterWebContextDownloadStarted :: (IsWebContext a, MonadIO m) => a -> WebContextDownloadStartedCallback -> m SignalHandlerId
- genClosure_WebContextDownloadStarted :: WebContextDownloadStartedCallback -> IO Closure
- mk_WebContextDownloadStartedCallback :: C_WebContextDownloadStartedCallback -> IO (FunPtr C_WebContextDownloadStartedCallback)
- noWebContextDownloadStartedCallback :: Maybe WebContextDownloadStartedCallback
- onWebContextDownloadStarted :: (IsWebContext a, MonadIO m) => a -> WebContextDownloadStartedCallback -> m SignalHandlerId
- wrap_WebContextDownloadStartedCallback :: WebContextDownloadStartedCallback -> Ptr () -> Ptr Download -> Ptr () -> IO ()
- type C_WebContextInitializeNotificationPermissionsCallback = Ptr () -> Ptr () -> IO ()
- type WebContextInitializeNotificationPermissionsCallback = IO ()
- data WebContextInitializeNotificationPermissionsSignalInfo
- afterWebContextInitializeNotificationPermissions :: (IsWebContext a, MonadIO m) => a -> WebContextInitializeNotificationPermissionsCallback -> m SignalHandlerId
- genClosure_WebContextInitializeNotificationPermissions :: WebContextInitializeNotificationPermissionsCallback -> IO Closure
- mk_WebContextInitializeNotificationPermissionsCallback :: C_WebContextInitializeNotificationPermissionsCallback -> IO (FunPtr C_WebContextInitializeNotificationPermissionsCallback)
- noWebContextInitializeNotificationPermissionsCallback :: Maybe WebContextInitializeNotificationPermissionsCallback
- onWebContextInitializeNotificationPermissions :: (IsWebContext a, MonadIO m) => a -> WebContextInitializeNotificationPermissionsCallback -> m SignalHandlerId
- wrap_WebContextInitializeNotificationPermissionsCallback :: WebContextInitializeNotificationPermissionsCallback -> Ptr () -> Ptr () -> IO ()
- type C_WebContextInitializeWebExtensionsCallback = Ptr () -> Ptr () -> IO ()
- type WebContextInitializeWebExtensionsCallback = IO ()
- data WebContextInitializeWebExtensionsSignalInfo
- afterWebContextInitializeWebExtensions :: (IsWebContext a, MonadIO m) => a -> WebContextInitializeWebExtensionsCallback -> m SignalHandlerId
- genClosure_WebContextInitializeWebExtensions :: WebContextInitializeWebExtensionsCallback -> IO Closure
- mk_WebContextInitializeWebExtensionsCallback :: C_WebContextInitializeWebExtensionsCallback -> IO (FunPtr C_WebContextInitializeWebExtensionsCallback)
- noWebContextInitializeWebExtensionsCallback :: Maybe WebContextInitializeWebExtensionsCallback
- onWebContextInitializeWebExtensions :: (IsWebContext a, MonadIO m) => a -> WebContextInitializeWebExtensionsCallback -> m SignalHandlerId
- wrap_WebContextInitializeWebExtensionsCallback :: WebContextInitializeWebExtensionsCallback -> Ptr () -> Ptr () -> IO ()
Exported types
newtype WebContext Source #
Constructors
| WebContext (ManagedPtr WebContext) |
Instances
| GObject WebContext Source # | |
| IsObject WebContext Source # | |
| IsWebContext WebContext Source # | |
| ((~) * info (ResolveWebContextMethod t WebContext), MethodInfo * info WebContext p) => IsLabel t (WebContext -> p) Source # | |
| ((~) * info (ResolveWebContextMethod t WebContext), MethodInfo * info WebContext p) => IsLabelProxy t (WebContext -> p) Source # | |
| HasAttributeList * WebContext Source # | |
| type AttributeList WebContext Source # | |
| type SignalList WebContext Source # | |
class GObject o => IsWebContext o Source #
Instances
toWebContext :: IsWebContext o => o -> IO WebContext Source #
Methods
allowTlsCertificateForHost
data WebContextAllowTlsCertificateForHostMethodInfo Source #
Instances
| ((~) * signature (b -> Text -> m ()), MonadIO m, IsWebContext a, IsTlsCertificate b) => MethodInfo * WebContextAllowTlsCertificateForHostMethodInfo a signature Source # | |
webContextAllowTlsCertificateForHost Source #
Arguments
| :: (HasCallStack, MonadIO m, IsWebContext a, IsTlsCertificate b) | |
| => a |
|
| -> b |
|
| -> Text |
|
| -> m () |
Ignore further TLS errors on the host for the certificate present in info.
Since: 2.6
clearCache
data WebContextClearCacheMethodInfo Source #
Instances
| ((~) * signature (m ()), MonadIO m, IsWebContext a) => MethodInfo * WebContextClearCacheMethodInfo a signature Source # | |
Arguments
| :: (HasCallStack, MonadIO m, IsWebContext a) | |
| => a |
|
| -> m () |
Clears all resources currently cached.
See also webContextSetCacheModel.
downloadUri
data WebContextDownloadUriMethodInfo Source #
Instances
| ((~) * signature (Text -> m Download), MonadIO m, IsWebContext a) => MethodInfo * WebContextDownloadUriMethodInfo a signature Source # | |
webContextDownloadUri Source #
Arguments
| :: (HasCallStack, MonadIO m, IsWebContext a) | |
| => a |
|
| -> Text |
|
| -> m Download | Returns: a new |
Requests downloading of the specified URI string. The download operation
will not be associated to any WebView, if you are interested in
starting a download from a particular WebView use
webViewDownloadUri instead.
getCacheModel
data WebContextGetCacheModelMethodInfo Source #
Instances
| ((~) * signature (m CacheModel), MonadIO m, IsWebContext a) => MethodInfo * WebContextGetCacheModelMethodInfo a signature Source # | |
webContextGetCacheModel Source #
Arguments
| :: (HasCallStack, MonadIO m, IsWebContext a) | |
| => a |
|
| -> m CacheModel | Returns: the current |
Returns the current cache model. For more information about this
value check the documentation of the function
webContextSetCacheModel.
getCookieManager
data WebContextGetCookieManagerMethodInfo Source #
Instances
| ((~) * signature (m CookieManager), MonadIO m, IsWebContext a) => MethodInfo * WebContextGetCookieManagerMethodInfo a signature Source # | |
webContextGetCookieManager Source #
Arguments
| :: (HasCallStack, MonadIO m, IsWebContext a) | |
| => a |
|
| -> m CookieManager | Returns: the |
Get the CookieManager of the context's WebsiteDataManager.
getDefault
Arguments
| :: (HasCallStack, MonadIO m) | |
| => m WebContext | Returns: a |
Gets the default web context
getFaviconDatabase
data WebContextGetFaviconDatabaseMethodInfo Source #
Instances
| ((~) * signature (m FaviconDatabase), MonadIO m, IsWebContext a) => MethodInfo * WebContextGetFaviconDatabaseMethodInfo a signature Source # | |
webContextGetFaviconDatabase Source #
Arguments
| :: (HasCallStack, MonadIO m, IsWebContext a) | |
| => a |
|
| -> m FaviconDatabase | Returns: the |
Get the FaviconDatabase associated with context.
To initialize the database you need to call
webContextSetFaviconDatabaseDirectory.
getFaviconDatabaseDirectory
data WebContextGetFaviconDatabaseDirectoryMethodInfo Source #
Instances
| ((~) * signature (m Text), MonadIO m, IsWebContext a) => MethodInfo * WebContextGetFaviconDatabaseDirectoryMethodInfo a signature Source # | |
webContextGetFaviconDatabaseDirectory Source #
Arguments
| :: (HasCallStack, MonadIO m, IsWebContext a) | |
| => a |
|
| -> m Text | Returns: the path of the directory of the favicons
database associated with |
Get the directory path being used to store the favicons database
for context, or Nothing if
webContextSetFaviconDatabaseDirectory hasn't been
called yet.
This function will always return the same path after having called
webContextSetFaviconDatabaseDirectory for the first
time.
getPlugins
data WebContextGetPluginsMethodInfo Source #
Instances
| ((~) * signature (Maybe b -> Maybe AsyncReadyCallback -> m ()), MonadIO m, IsWebContext a, IsCancellable b) => MethodInfo * WebContextGetPluginsMethodInfo a signature Source # | |
Arguments
| :: (HasCallStack, MonadIO m, IsWebContext a, IsCancellable b) | |
| => a |
|
| -> Maybe b |
|
| -> Maybe AsyncReadyCallback |
|
| -> m () |
Asynchronously get the list of installed plugins.
When the operation is finished, callback will be called. You can then call
webContextGetPluginsFinish to get the result of the operation.
getPluginsFinish
data WebContextGetPluginsFinishMethodInfo Source #
Instances
| ((~) * signature (b -> m [Plugin]), MonadIO m, IsWebContext a, IsAsyncResult b) => MethodInfo * WebContextGetPluginsFinishMethodInfo a signature Source # | |
webContextGetPluginsFinish Source #
Arguments
| :: (HasCallStack, MonadIO m, IsWebContext a, IsAsyncResult b) | |
| => a |
|
| -> b |
|
| -> m [Plugin] | Returns: a |
Finish an asynchronous operation started with webkit_web_context_get_plugins.
getProcessModel
data WebContextGetProcessModelMethodInfo Source #
Instances
| ((~) * signature (m ProcessModel), MonadIO m, IsWebContext a) => MethodInfo * WebContextGetProcessModelMethodInfo a signature Source # | |
webContextGetProcessModel Source #
Arguments
| :: (HasCallStack, MonadIO m, IsWebContext a) | |
| => a |
|
| -> m ProcessModel | Returns: the current |
Returns the current process model. For more information about this value
see webContextSetProcessModel.
Since: 2.4
getSecurityManager
data WebContextGetSecurityManagerMethodInfo Source #
Instances
| ((~) * signature (m SecurityManager), MonadIO m, IsWebContext a) => MethodInfo * WebContextGetSecurityManagerMethodInfo a signature Source # | |
webContextGetSecurityManager Source #
Arguments
| :: (HasCallStack, MonadIO m, IsWebContext a) | |
| => a |
|
| -> m SecurityManager | Returns: the |
Get the SecurityManager of context.
getSpellCheckingEnabled
data WebContextGetSpellCheckingEnabledMethodInfo Source #
Instances
| ((~) * signature (m Bool), MonadIO m, IsWebContext a) => MethodInfo * WebContextGetSpellCheckingEnabledMethodInfo a signature Source # | |
webContextGetSpellCheckingEnabled Source #
Arguments
| :: (HasCallStack, MonadIO m, IsWebContext a) | |
| => a |
|
| -> m Bool | Returns: |
Get whether spell checking feature is currently enabled.
getSpellCheckingLanguages
data WebContextGetSpellCheckingLanguagesMethodInfo Source #
Instances
| ((~) * signature (m [Text]), MonadIO m, IsWebContext a) => MethodInfo * WebContextGetSpellCheckingLanguagesMethodInfo a signature Source # | |
webContextGetSpellCheckingLanguages Source #
Arguments
| :: (HasCallStack, MonadIO m, IsWebContext a) | |
| => a |
|
| -> m [Text] | Returns: A |
Get the the list of spell checking languages associated with
context, or Nothing if no languages have been previously set.
See webContextSetSpellCheckingLanguages for more
details on the format of the languages in the list.
getTlsErrorsPolicy
data WebContextGetTlsErrorsPolicyMethodInfo Source #
Instances
| ((~) * signature (m TLSErrorsPolicy), MonadIO m, IsWebContext a) => MethodInfo * WebContextGetTlsErrorsPolicyMethodInfo a signature Source # | |
webContextGetTlsErrorsPolicy Source #
Arguments
| :: (HasCallStack, MonadIO m, IsWebContext a) | |
| => a |
|
| -> m TLSErrorsPolicy | Returns: a |
Get the TLS errors policy of context
getWebProcessCountLimit
data WebContextGetWebProcessCountLimitMethodInfo Source #
Instances
| ((~) * signature (m Word32), MonadIO m, IsWebContext a) => MethodInfo * WebContextGetWebProcessCountLimitMethodInfo a signature Source # | |
webContextGetWebProcessCountLimit Source #
Arguments
| :: (HasCallStack, MonadIO m, IsWebContext a) | |
| => a |
|
| -> m Word32 | Returns: the maximum limit of web processes, or 0 if there isn't a limit. |
Gets the maximum number of web processes that can be created at the same time for the context.
Since: 2.10
getWebsiteDataManager
data WebContextGetWebsiteDataManagerMethodInfo Source #
Instances
| ((~) * signature (m WebsiteDataManager), MonadIO m, IsWebContext a) => MethodInfo * WebContextGetWebsiteDataManagerMethodInfo a signature Source # | |
webContextGetWebsiteDataManager Source #
Arguments
| :: (HasCallStack, MonadIO m, IsWebContext a) | |
| => a |
|
| -> m WebsiteDataManager | Returns: a |
Get the WebsiteDataManager of context.
Since: 2.10
initializeNotificationPermissions
data WebContextInitializeNotificationPermissionsMethodInfo Source #
Instances
| ((~) * signature ([SecurityOrigin] -> [SecurityOrigin] -> m ()), MonadIO m, IsWebContext a) => MethodInfo * WebContextInitializeNotificationPermissionsMethodInfo a signature Source # | |
webContextInitializeNotificationPermissions Source #
Arguments
| :: (HasCallStack, MonadIO m, IsWebContext a) | |
| => a |
|
| -> [SecurityOrigin] |
|
| -> [SecurityOrigin] |
|
| -> m () |
Sets initial desktop notification permissions for the context.
allowedOrigins and disallowedOrigins must each be List of
SecurityOrigin objects representing origins that will,
respectively, either always or never have permission to show desktop
notifications. No NotificationPermissionRequest will ever be
generated for any of the security origins represented in
allowedOrigins or disallowedOrigins. This function is necessary
because some webpages proactively check whether they have permission
to display notifications without ever creating a permission request.
This function only affects web processes that have not already been
created. The best time to call it is when handling
WebContext::initialize-notification-permissions so as to
ensure that new web processes receive the most recent set of
permissions.
Since: 2.16
isEphemeral
data WebContextIsEphemeralMethodInfo Source #
Instances
| ((~) * signature (m Bool), MonadIO m, IsWebContext a) => MethodInfo * WebContextIsEphemeralMethodInfo a signature Source # | |
webContextIsEphemeral Source #
Arguments
| :: (HasCallStack, MonadIO m, IsWebContext a) | |
| => a |
|
| -> m Bool |
Get whether a WebContext is ephemeral.
Since: 2.16
new
Arguments
| :: (HasCallStack, MonadIO m) | |
| => m WebContext | Returns: a newly created |
Create a new WebContext
Since: 2.8
newEphemeral
webContextNewEphemeral Source #
Arguments
| :: (HasCallStack, MonadIO m) | |
| => m WebContext | Returns: a new ephemeral |
Create a new ephemeral WebContext. An ephemeral WebContext is a context
created with an ephemeral WebsiteDataManager. This is just a convenient method
to create ephemeral contexts without having to create your own WebsiteDataManager.
All WebView<!-- -->s associated with this context will also be ephemeral. Websites will
not store any data in the client storage.
This is normally used to implement private instances.
Since: 2.16
newWithWebsiteDataManager
webContextNewWithWebsiteDataManager Source #
Arguments
| :: (HasCallStack, MonadIO m, IsWebsiteDataManager a) | |
| => a |
|
| -> m WebContext | Returns: a newly created |
Create a new WebContext with a WebsiteDataManager.
Since: 2.10
prefetchDns
data WebContextPrefetchDnsMethodInfo Source #
Instances
| ((~) * signature (Text -> m ()), MonadIO m, IsWebContext a) => MethodInfo * WebContextPrefetchDnsMethodInfo a signature Source # | |
webContextPrefetchDns Source #
Arguments
| :: (HasCallStack, MonadIO m, IsWebContext a) | |
| => a |
|
| -> Text |
|
| -> m () |
Resolve the domain name of the given hostname in advance, so that if a URI
of hostname is requested the load will be performed more quickly.
registerUriScheme
data WebContextRegisterUriSchemeMethodInfo Source #
Instances
| ((~) * signature (Text -> URISchemeRequestCallback -> m ()), MonadIO m, IsWebContext a) => MethodInfo * WebContextRegisterUriSchemeMethodInfo a signature Source # | |
webContextRegisterUriScheme Source #
Arguments
| :: (HasCallStack, MonadIO m, IsWebContext a) | |
| => a |
|
| -> Text |
|
| -> URISchemeRequestCallback |
|
| -> m () |
Register scheme in context, so that when an URI request with scheme is made in the
WebContext, the URISchemeRequestCallback registered will be called with a
URISchemeRequest.
It is possible to handle URI scheme requests asynchronously, by calling objectRef on the
URISchemeRequest and calling uRISchemeRequestFinish later
when the data of the request is available or
uRISchemeRequestFinishError in case of error.
<informalexample><programlisting> static void about_uri_scheme_request_cb (WebKitURISchemeRequest *request, gpointer user_data) { GInputStream *stream; gsize stream_length; const gchar *path;
path = webkit_uri_scheme_request_get_path (request); if (!g_strcmp0 (path, "plugins")) { /<!-- -->* Create a GInputStream with the contents of plugins about page, and set its length to stream_length *<!-- -->/ } else if (!g_strcmp0 (path, "memory")) { /<!-- -->* Create a GInputStream with the contents of memory about page, and set its length to stream_length *<!-- -->/ } else if (!g_strcmp0 (path, "applications")) { /<!-- -->* Create a GInputStream with the contents of applications about page, and set its length to stream_length *<!-- -->/ } else if (!g_strcmp0 (path, "example")) { gchar *contents;
contents = g_strdup_printf ("<html><body><p>Example about page</p></body></html>"); stream_length = strlen (contents); stream = g_memory_input_stream_new_from_data (contents, stream_length, g_free); } else { GError *error;
error = g_error_new (ABOUT_HANDLER_ERROR, ABOUT_HANDLER_ERROR_INVALID, "Invalid about:s page.", path);
webkit_uri_scheme_request_finish_error (request, error);
g_error_free (error);
return;
}
webkit_uri_scheme_request_finish (request, stream, stream_length, "text/html");
g_object_unref (stream);
}
</programlisting></informalexample>
setAdditionalPluginsDirectory
data WebContextSetAdditionalPluginsDirectoryMethodInfo Source #
Instances
| ((~) * signature (Text -> m ()), MonadIO m, IsWebContext a) => MethodInfo * WebContextSetAdditionalPluginsDirectoryMethodInfo a signature Source # | |
webContextSetAdditionalPluginsDirectory Source #
Arguments
| :: (HasCallStack, MonadIO m, IsWebContext a) | |
| => a |
|
| -> Text |
|
| -> m () |
Set an additional directory where WebKit will look for plugins.
setCacheModel
data WebContextSetCacheModelMethodInfo Source #
Instances
| ((~) * signature (CacheModel -> m ()), MonadIO m, IsWebContext a) => MethodInfo * WebContextSetCacheModelMethodInfo a signature Source # | |
webContextSetCacheModel Source #
Arguments
| :: (HasCallStack, MonadIO m, IsWebContext a) | |
| => a |
|
| -> CacheModel |
|
| -> m () |
Specifies a usage model for WebViews, which WebKit will use to determine its caching behavior. All web views follow the cache model. This cache model determines the RAM and disk space to use for caching previously viewed content .
Research indicates that users tend to browse within clusters of documents that hold resources in common, and to revisit previously visited documents. WebKit and the frameworks below it include built-in caches that take advantage of these patterns, substantially improving document load speed in browsing situations. The WebKit cache model controls the behaviors of all of these caches, including various WebCore caches.
Browsers can improve document load speed substantially by
specifying CacheModelWebBrowser. Applications without a
browsing interface can reduce memory usage substantially by
specifying CacheModelDocumentViewer. The default value is
CacheModelWebBrowser.
setDiskCacheDirectory
data WebContextSetDiskCacheDirectoryMethodInfo Source #
Instances
| ((~) * signature (Text -> m ()), MonadIO m, IsWebContext a) => MethodInfo * WebContextSetDiskCacheDirectoryMethodInfo a signature Source # | |
webContextSetDiskCacheDirectory Source #
Arguments
| :: (HasCallStack, MonadIO m, IsWebContext a) | |
| => a |
|
| -> Text |
|
| -> m () |
Deprecated: (Since version 2.10.)Use webContextNewWithWebsiteDataManager instead.
Set the directory where disk cache files will be stored This method must be called before loading anything in this context, otherwise it will not have any effect.
Note that this method overrides the directory set in the WebsiteDataManager,
but it doesn't change the value returned by websiteDataManagerGetDiskCacheDirectory
since the WebsiteDataManager is immutable.
setFaviconDatabaseDirectory
data WebContextSetFaviconDatabaseDirectoryMethodInfo Source #
Instances
| ((~) * signature (Maybe Text -> m ()), MonadIO m, IsWebContext a) => MethodInfo * WebContextSetFaviconDatabaseDirectoryMethodInfo a signature Source # | |
webContextSetFaviconDatabaseDirectory Source #
Arguments
| :: (HasCallStack, MonadIO m, IsWebContext a) | |
| => a |
|
| -> Maybe Text |
|
| -> m () |
Set the directory path to be used to store the favicons database
for context on disk. Passing Nothing as path means using the
default directory for the platform (see getUserDataDir).
Calling this method also means enabling the favicons database for
its use from the applications, so that's why it's expected to be
called only once. Further calls for the same instance of
WebContext won't cause any effect.
setNetworkProxySettings
data WebContextSetNetworkProxySettingsMethodInfo Source #
Instances
| ((~) * signature (NetworkProxyMode -> Maybe NetworkProxySettings -> m ()), MonadIO m, IsWebContext a) => MethodInfo * WebContextSetNetworkProxySettingsMethodInfo a signature Source # | |
webContextSetNetworkProxySettings Source #
Arguments
| :: (HasCallStack, MonadIO m, IsWebContext a) | |
| => a |
|
| -> NetworkProxyMode |
|
| -> Maybe NetworkProxySettings |
|
| -> m () |
Set the network proxy settings to be used by connections started in context.
By default NetworkProxyModeDefault is used, which means that the
system settings will be used (proxyResolverGetDefault).
If you want to override the system default settings, you can either use
NetworkProxyModeNoProxy to make sure no proxies are used at all,
or NetworkProxyModeCustom to provide your own proxy settings.
When proxyMode is NetworkProxyModeCustom proxySettings must be
a valid NetworkProxySettings; otherwise, proxySettings must be Nothing.
Since: 2.16
setPreferredLanguages
data WebContextSetPreferredLanguagesMethodInfo Source #
Instances
| ((~) * signature (Maybe [Text] -> m ()), MonadIO m, IsWebContext a) => MethodInfo * WebContextSetPreferredLanguagesMethodInfo a signature Source # | |
webContextSetPreferredLanguages Source #
Arguments
| :: (HasCallStack, MonadIO m, IsWebContext a) | |
| => a |
|
| -> Maybe [Text] |
|
| -> m () |
Set the list of preferred languages, sorted from most desirable
to least desirable. The list will be used to build the "Accept-Language"
header that will be included in the network requests started by
the WebContext.
setProcessModel
data WebContextSetProcessModelMethodInfo Source #
Instances
| ((~) * signature (ProcessModel -> m ()), MonadIO m, IsWebContext a) => MethodInfo * WebContextSetProcessModelMethodInfo a signature Source # | |
webContextSetProcessModel Source #
Arguments
| :: (HasCallStack, MonadIO m, IsWebContext a) | |
| => a |
|
| -> ProcessModel |
|
| -> m () |
Specifies a process model for WebViews, which WebKit will use to
determine how auxiliary processes are handled. The default setting
(ProcessModelSharedSecondaryProcess) is suitable for most
applications which embed a small amount of WebViews, or are used to
display documents which are considered safe — like local files.
Applications which may potentially use a large amount of WebViews
—for example a multi-tabbed web browser— may want to use
ProcessModelMultipleSecondaryProcesses, which will use
one process per view most of the time, while still allowing for web
views to share a process when needed (for example when different
views interact with each other). Using this model, when a process
hangs or crashes, only the WebViews using it stop working, while
the rest of the WebViews in the application will still function
normally.
This method **must be called before any web process has been created**, as early as possible in your application. Calling it later will make your application crash.
Since: 2.4
setSpellCheckingEnabled
data WebContextSetSpellCheckingEnabledMethodInfo Source #
Instances
| ((~) * signature (Bool -> m ()), MonadIO m, IsWebContext a) => MethodInfo * WebContextSetSpellCheckingEnabledMethodInfo a signature Source # | |
webContextSetSpellCheckingEnabled Source #
Arguments
| :: (HasCallStack, MonadIO m, IsWebContext a) | |
| => a |
|
| -> Bool |
|
| -> m () |
Enable or disable the spell checking feature.
setSpellCheckingLanguages
data WebContextSetSpellCheckingLanguagesMethodInfo Source #
Instances
| ((~) * signature ([Text] -> m ()), MonadIO m, IsWebContext a) => MethodInfo * WebContextSetSpellCheckingLanguagesMethodInfo a signature Source # | |
webContextSetSpellCheckingLanguages Source #
Arguments
| :: (HasCallStack, MonadIO m, IsWebContext a) | |
| => a |
|
| -> [Text] |
|
| -> m () |
Set the list of spell checking languages to be used for spell checking.
The locale string typically is in the form lang_COUNTRY, where lang is an ISO-639 language code, and COUNTRY is an ISO-3166 country code. For instance, sv_FI for Swedish as written in Finland or pt_BR for Portuguese as written in Brazil.
You need to call this function with a valid list of languages at least once in order to properly enable the spell checking feature in WebKit.
setTlsErrorsPolicy
data WebContextSetTlsErrorsPolicyMethodInfo Source #
Instances
| ((~) * signature (TLSErrorsPolicy -> m ()), MonadIO m, IsWebContext a) => MethodInfo * WebContextSetTlsErrorsPolicyMethodInfo a signature Source # | |
webContextSetTlsErrorsPolicy Source #
Arguments
| :: (HasCallStack, MonadIO m, IsWebContext a) | |
| => a |
|
| -> TLSErrorsPolicy |
|
| -> m () |
Set the TLS errors policy of context as policy
setWebExtensionsDirectory
data WebContextSetWebExtensionsDirectoryMethodInfo Source #
Instances
| ((~) * signature (Text -> m ()), MonadIO m, IsWebContext a) => MethodInfo * WebContextSetWebExtensionsDirectoryMethodInfo a signature Source # | |
webContextSetWebExtensionsDirectory Source #
Arguments
| :: (HasCallStack, MonadIO m, IsWebContext a) | |
| => a |
|
| -> Text |
|
| -> m () |
Set the directory where WebKit will look for Web Extensions.
This method must be called before loading anything in this context,
otherwise it will not have any effect. You can connect to
WebContext::initialize-web-extensions to call this method
before anything is loaded.
setWebExtensionsInitializationUserData
data WebContextSetWebExtensionsInitializationUserDataMethodInfo Source #
Instances
| ((~) * signature (GVariant -> m ()), MonadIO m, IsWebContext a) => MethodInfo * WebContextSetWebExtensionsInitializationUserDataMethodInfo a signature Source # | |
webContextSetWebExtensionsInitializationUserData Source #
Arguments
| :: (HasCallStack, MonadIO m, IsWebContext a) | |
| => a |
|
| -> GVariant |
|
| -> m () |
Set user data to be passed to Web Extensions on initialization.
The data will be passed to the
WebKitWebExtensionInitializeWithUserDataFunction.
This method must be called before loading anything in this context,
otherwise it will not have any effect. You can connect to
WebContext::initialize-web-extensions to call this method
before anything is loaded.
Since: 2.4
setWebProcessCountLimit
data WebContextSetWebProcessCountLimitMethodInfo Source #
Instances
| ((~) * signature (Word32 -> m ()), MonadIO m, IsWebContext a) => MethodInfo * WebContextSetWebProcessCountLimitMethodInfo a signature Source # | |
webContextSetWebProcessCountLimit Source #
Arguments
| :: (HasCallStack, MonadIO m, IsWebContext a) | |
| => a |
|
| -> Word32 |
|
| -> m () |
Sets the maximum number of web processes that can be created at the same time for the context.
The default value is 0 and means no limit.
This method **must be called before any web process has been created**, as early as possible in your application. Calling it later will make your application crash.
Since: 2.10
Properties
localStorageDirectory
data WebContextLocalStorageDirectoryPropertyInfo Source #
Instances
constructWebContextLocalStorageDirectory :: IsWebContext o => Text -> IO (GValueConstruct o) Source #
getWebContextLocalStorageDirectory :: (MonadIO m, IsWebContext o) => o -> m (Maybe Text) Source #
webContextLocalStorageDirectory :: AttrLabelProxy "localStorageDirectory" Source #
websiteDataManager
data WebContextWebsiteDataManagerPropertyInfo Source #
Instances
constructWebContextWebsiteDataManager :: (IsWebContext o, IsWebsiteDataManager a) => a -> IO (GValueConstruct o) Source #
getWebContextWebsiteDataManager :: (MonadIO m, IsWebContext o) => o -> m WebsiteDataManager Source #
webContextWebsiteDataManager :: AttrLabelProxy "websiteDataManager" Source #
Signals
downloadStarted
type WebContextDownloadStartedCallback = Download -> IO () Source #
afterWebContextDownloadStarted :: (IsWebContext a, MonadIO m) => a -> WebContextDownloadStartedCallback -> m SignalHandlerId Source #
mk_WebContextDownloadStartedCallback :: C_WebContextDownloadStartedCallback -> IO (FunPtr C_WebContextDownloadStartedCallback) Source #
onWebContextDownloadStarted :: (IsWebContext a, MonadIO m) => a -> WebContextDownloadStartedCallback -> m SignalHandlerId Source #
wrap_WebContextDownloadStartedCallback :: WebContextDownloadStartedCallback -> Ptr () -> Ptr Download -> Ptr () -> IO () Source #
initializeNotificationPermissions
afterWebContextInitializeNotificationPermissions :: (IsWebContext a, MonadIO m) => a -> WebContextInitializeNotificationPermissionsCallback -> m SignalHandlerId Source #
genClosure_WebContextInitializeNotificationPermissions :: WebContextInitializeNotificationPermissionsCallback -> IO Closure Source #
mk_WebContextInitializeNotificationPermissionsCallback :: C_WebContextInitializeNotificationPermissionsCallback -> IO (FunPtr C_WebContextInitializeNotificationPermissionsCallback) Source #
noWebContextInitializeNotificationPermissionsCallback :: Maybe WebContextInitializeNotificationPermissionsCallback Source #
onWebContextInitializeNotificationPermissions :: (IsWebContext a, MonadIO m) => a -> WebContextInitializeNotificationPermissionsCallback -> m SignalHandlerId Source #
wrap_WebContextInitializeNotificationPermissionsCallback :: WebContextInitializeNotificationPermissionsCallback -> Ptr () -> Ptr () -> IO () Source #
initializeWebExtensions
type WebContextInitializeWebExtensionsCallback = IO () Source #
afterWebContextInitializeWebExtensions :: (IsWebContext a, MonadIO m) => a -> WebContextInitializeWebExtensionsCallback -> m SignalHandlerId Source #
genClosure_WebContextInitializeWebExtensions :: WebContextInitializeWebExtensionsCallback -> IO Closure Source #
mk_WebContextInitializeWebExtensionsCallback :: C_WebContextInitializeWebExtensionsCallback -> IO (FunPtr C_WebContextInitializeWebExtensionsCallback) Source #
noWebContextInitializeWebExtensionsCallback :: Maybe WebContextInitializeWebExtensionsCallback Source #
onWebContextInitializeWebExtensions :: (IsWebContext a, MonadIO m) => a -> WebContextInitializeWebExtensionsCallback -> m SignalHandlerId Source #
wrap_WebContextInitializeWebExtensionsCallback :: WebContextInitializeWebExtensionsCallback -> Ptr () -> Ptr () -> IO () Source #