WebKitWebContext

WebKitWebContext

Functions

WebKitWebContext * webkit_web_context_get_default ()
WebKitWebContext * webkit_web_context_new ()
WebKitWebContext * webkit_web_context_new_ephemeral ()
WebKitWebContext * webkit_web_context_new_with_website_data_manager ()
gboolean webkit_web_context_is_ephemeral ()
gboolean webkit_web_context_is_automation_allowed ()
void webkit_web_context_set_automation_allowed ()
WebKitWebsiteDataManager * webkit_web_context_get_website_data_manager ()
WebKitCacheModel webkit_web_context_get_cache_model ()
void webkit_web_context_set_cache_model ()
guint webkit_web_context_get_web_process_count_limit ()
void webkit_web_context_set_web_process_count_limit ()
void webkit_web_context_clear_cache ()
void webkit_web_context_set_network_proxy_settings ()
WebKitDownload * webkit_web_context_download_uri ()
WebKitCookieManager * webkit_web_context_get_cookie_manager ()
WebKitFaviconDatabase * webkit_web_context_get_favicon_database ()
void webkit_web_context_set_favicon_database_directory ()
const gchar * webkit_web_context_get_favicon_database_directory ()
WebKitSecurityManager * webkit_web_context_get_security_manager ()
void webkit_web_context_set_additional_plugins_directory ()
void webkit_web_context_get_plugins ()
GList * webkit_web_context_get_plugins_finish ()
gboolean webkit_web_context_get_spell_checking_enabled ()
void webkit_web_context_set_spell_checking_enabled ()
const gchar * const * webkit_web_context_get_spell_checking_languages ()
void webkit_web_context_set_spell_checking_languages ()
void webkit_web_context_set_preferred_languages ()
void webkit_web_context_set_tls_errors_policy ()
WebKitTLSErrorsPolicy webkit_web_context_get_tls_errors_policy ()
void webkit_web_context_set_web_extensions_directory ()
void webkit_web_context_set_web_extensions_initialization_user_data ()
void webkit_web_context_prefetch_dns ()
void webkit_web_context_set_disk_cache_directory ()
void webkit_web_context_allow_tls_certificate_for_host ()
WebKitProcessModel webkit_web_context_get_process_model ()
void webkit_web_context_set_process_model ()
void webkit_web_context_initialize_notification_permissions ()
void (*WebKitURISchemeRequestCallback) ()
void webkit_web_context_register_uri_scheme ()

Properties

gchar * local-storage-directory Read / Write / Construct Only
WebKitWebsiteDataManager * website-data-manager Read / Write / Construct Only

Signals

Types and Values

Object Hierarchy

    GObject
    ╰── WebKitWebContext

Description

Functions

webkit_web_context_get_default ()

WebKitWebContext *
webkit_web_context_get_default (void);

webkit_web_context_new ()

WebKitWebContext *
webkit_web_context_new (void);

webkit_web_context_new_ephemeral ()

WebKitWebContext *
webkit_web_context_new_ephemeral (void);

webkit_web_context_new_with_website_data_manager ()

WebKitWebContext *
webkit_web_context_new_with_website_data_manager
                               (WebKitWebsiteDataManager *manager);

webkit_web_context_is_ephemeral ()

gboolean
webkit_web_context_is_ephemeral (WebKitWebContext *context);

webkit_web_context_is_automation_allowed ()

gboolean
webkit_web_context_is_automation_allowed
                               (WebKitWebContext *context);

webkit_web_context_set_automation_allowed ()

void
webkit_web_context_set_automation_allowed
                               (WebKitWebContext *context,
                                gboolean allowed);

webkit_web_context_get_website_data_manager ()

WebKitWebsiteDataManager *
webkit_web_context_get_website_data_manager
                               (WebKitWebContext *context);

webkit_web_context_get_cache_model ()

WebKitCacheModel
webkit_web_context_get_cache_model (WebKitWebContext *context);

webkit_web_context_set_cache_model ()

void
webkit_web_context_set_cache_model (WebKitWebContext *context,
                                    WebKitCacheModel cache_model);

webkit_web_context_get_web_process_count_limit ()

guint
webkit_web_context_get_web_process_count_limit
                               (WebKitWebContext *context);

webkit_web_context_set_web_process_count_limit ()

void
webkit_web_context_set_web_process_count_limit
                               (WebKitWebContext *context,
                                guint limit);

webkit_web_context_clear_cache ()

void
webkit_web_context_clear_cache (WebKitWebContext *context);

webkit_web_context_set_network_proxy_settings ()

void
webkit_web_context_set_network_proxy_settings
                               (WebKitWebContext *context,
                                WebKitNetworkProxyMode proxy_mode,
                                WebKitNetworkProxySettings *proxy_settings);

webkit_web_context_download_uri ()

WebKitDownload *
webkit_web_context_download_uri (WebKitWebContext *context,
                                 const gchar *uri);

webkit_web_context_get_cookie_manager ()

WebKitCookieManager *
webkit_web_context_get_cookie_manager (WebKitWebContext *context);

webkit_web_context_get_favicon_database ()

WebKitFaviconDatabase *
webkit_web_context_get_favicon_database
                               (WebKitWebContext *context);

webkit_web_context_set_favicon_database_directory ()

void
webkit_web_context_set_favicon_database_directory
                               (WebKitWebContext *context,
                                const gchar *path);

webkit_web_context_get_favicon_database_directory ()

const gchar *
webkit_web_context_get_favicon_database_directory
                               (WebKitWebContext *context);

webkit_web_context_get_security_manager ()

WebKitSecurityManager *
webkit_web_context_get_security_manager
                               (WebKitWebContext *context);

webkit_web_context_set_additional_plugins_directory ()

void
webkit_web_context_set_additional_plugins_directory
                               (WebKitWebContext *context,
                                const gchar *directory);

webkit_web_context_get_plugins ()

void
webkit_web_context_get_plugins (WebKitWebContext *context,
                                GCancellable *cancellable,
                                GAsyncReadyCallback callback,
                                gpointer user_data);

webkit_web_context_get_plugins_finish ()

GList *
webkit_web_context_get_plugins_finish (WebKitWebContext *context,
                                       GAsyncResult *result,
                                       GError **error);

webkit_web_context_get_spell_checking_enabled ()

gboolean
webkit_web_context_get_spell_checking_enabled
                               (WebKitWebContext *context);

webkit_web_context_set_spell_checking_enabled ()

void
webkit_web_context_set_spell_checking_enabled
                               (WebKitWebContext *context,
                                gboolean enabled);

webkit_web_context_get_spell_checking_languages ()

const gchar * const *
webkit_web_context_get_spell_checking_languages
                               (WebKitWebContext *context);

webkit_web_context_set_spell_checking_languages ()

void
webkit_web_context_set_spell_checking_languages
                               (WebKitWebContext *context,
                                const gchar * const *languages);

webkit_web_context_set_preferred_languages ()

void
webkit_web_context_set_preferred_languages
                               (WebKitWebContext *context,
                                const gchar * const *languages);

webkit_web_context_set_tls_errors_policy ()

void
webkit_web_context_set_tls_errors_policy
                               (WebKitWebContext *context,
                                WebKitTLSErrorsPolicy policy);

webkit_web_context_get_tls_errors_policy ()

WebKitTLSErrorsPolicy
webkit_web_context_get_tls_errors_policy
                               (WebKitWebContext *context);

webkit_web_context_set_web_extensions_directory ()

void
webkit_web_context_set_web_extensions_directory
                               (WebKitWebContext *context,
                                const gchar *directory);

webkit_web_context_set_web_extensions_initialization_user_data ()

void
webkit_web_context_set_web_extensions_initialization_user_data
                               (WebKitWebContext *context,
                                GVariant *user_data);

webkit_web_context_prefetch_dns ()

void
webkit_web_context_prefetch_dns (WebKitWebContext *context,
                                 const gchar *hostname);

webkit_web_context_set_disk_cache_directory ()

void
webkit_web_context_set_disk_cache_directory
                               (WebKitWebContext *context,
                                const gchar *directory);

webkit_web_context_set_disk_cache_directory is deprecated and should not be used in newly-written code.


webkit_web_context_allow_tls_certificate_for_host ()

void
webkit_web_context_allow_tls_certificate_for_host
                               (WebKitWebContext *context,
                                GTlsCertificate *certificate,
                                const gchar *host);

webkit_web_context_get_process_model ()

WebKitProcessModel
webkit_web_context_get_process_model (WebKitWebContext *context);

webkit_web_context_set_process_model ()

void
webkit_web_context_set_process_model (WebKitWebContext *context,
                                      WebKitProcessModel process_model);

webkit_web_context_initialize_notification_permissions ()

void
webkit_web_context_initialize_notification_permissions
                               (WebKitWebContext *context,
                                GList *allowed_origins,
                                GList *disallowed_origins);

WebKitURISchemeRequestCallback ()

void
(*WebKitURISchemeRequestCallback) (WebKitURISchemeRequest *request,
                                   gpointer user_data);

Type definition for a function that will be called back when an URI request is made for a user registered URI scheme.

Parameters

request

the WebKitURISchemeRequest

 

user_data

user data passed to the callback

 

webkit_web_context_register_uri_scheme ()

void
webkit_web_context_register_uri_scheme
                               (WebKitWebContext *context,
                                const gchar *scheme,
                                WebKitURISchemeRequestCallback callback,
                                gpointer user_data,
                                GDestroyNotify user_data_destroy_func);

Types and Values

struct WebKitWebContext

struct WebKitWebContext;

enum WebKitCacheModel

Enum values used for determining the WebKitWebContext cache model.

Members

WEBKIT_CACHE_MODEL_DOCUMENT_VIEWER

Disable the cache completely, which substantially reduces memory usage. Useful for applications that only access a single local file, with no navigation to other pages. No remote resources will be cached.

 

WEBKIT_CACHE_MODEL_WEB_BROWSER

Improve document load speed substantially by caching a very large number of resources and previously viewed content.

 

WEBKIT_CACHE_MODEL_DOCUMENT_BROWSER

A cache model optimized for viewing a series of local files -- for example, a documentation viewer or a website designer. WebKit will cache a moderate number of resources.

 

enum WebKitProcessModel

Enum values used for determining the WebKitWebContext process model.

Members

WEBKIT_PROCESS_MODEL_SHARED_SECONDARY_PROCESS

Use a single process to perform content rendering. The process is shared among all the WebKitWebView instances created by the application: if the process hangs or crashes all the web views in the application will be affected. This is the default process model, and it should suffice for most cases.

 

WEBKIT_PROCESS_MODEL_MULTIPLE_SECONDARY_PROCESSES

Use one process for each WebKitWebView, while still allowing for some of them to share a process in certain situations. The main advantage of this process model is that the rendering process for a web view can crash while the rest of the views keep working normally. This process model is indicated for applications which may use a number of web views and the content of in each must not interfere with the rest — for example a full-fledged web browser with support for multiple tabs.

 

Since: 2.4


enum WebKitTLSErrorsPolicy

Enum values used to denote the TLS errors policy.

Members

WEBKIT_TLS_ERRORS_POLICY_IGNORE

Ignore TLS errors.

 

WEBKIT_TLS_ERRORS_POLICY_FAIL

TLS errors will emit “load-failed-with-tls-errors” and, if the signal is handled, finish the load. In case the signal is not handled, “load-failed” is emitted before the load finishes.

 

enum WebKitNetworkProxyMode

Enum values used to set the network proxy mode.

Members

WEBKIT_NETWORK_PROXY_MODE_DEFAULT

Use the default proxy of the system.

 

WEBKIT_NETWORK_PROXY_MODE_NO_PROXY

Do not use any proxy.

 

WEBKIT_NETWORK_PROXY_MODE_CUSTOM

Use custom proxy settings.

 

Since: 2.16

Property Details

The “local-storage-directory” property

  “local-storage-directory”  gchar *

The directory where local storage data will be saved.

Flags: Read / Write / Construct Only

Default value: NULL


The “website-data-manager” property

  “website-data-manager”     WebKitWebsiteDataManager *

The WebKitWebsiteDataManager associated with this context.

Flags: Read / Write / Construct Only

Signal Details

The “automation-started” signal

void
user_function (WebKitWebContext        *webkitwebcontext,
               WebKitAutomationSession *arg1,
               gpointer                 user_data)

Flags: Run Last


The “download-started” signal

void
user_function (WebKitWebContext *webkitwebcontext,
               WebKitDownload   *arg1,
               gpointer          user_data)

Flags: Run Last


The “initialize-notification-permissions” signal

void
user_function (WebKitWebContext *webkitwebcontext,
               gpointer          user_data)

Flags: Run Last


The “initialize-web-extensions” signal

void
user_function (WebKitWebContext *webkitwebcontext,
               gpointer          user_data)

Flags: Run Last