gi-webkit-3.0.14: WebKit bindings

CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (garetxe@gmail.com)
Safe HaskellNone
LanguageHaskell2010

GI.WebKit.Functions

Contents

Description

 

Synopsis

Methods

applicationCacheGetDatabaseDirectoryPath

applicationCacheGetDatabaseDirectoryPath Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m Text

Returns: the application cache database directory path

Returns the path to the directory WebKit will write web application cache databases to. By default this path is set to $XDG_CACHE_HOME/webkitgtk/applications and cannot be modified.

Since: 1.3.13

contextMenuItemGetAction

contextMenuItemGetAction Source #

Arguments

:: (HasCallStack, MonadIO m, IsMenuItem a) 
=> a

item: a MenuItem of the default context menu

-> m ContextMenuAction

Returns: the ContextMenuAction of the given item

Returns the ContextMenuAction of the given item. This function can be used to determine the items present in the default context menu. In order to inspect the default context menu, you should connect to WebView::context-menu signal.

<example> <title>Inspecting the default context menu</title> <programlisting> static gboolean context_menu_cb (WebKitWebView *webView, GtkWidget *default_menu, WebKitHitTestResult *hit_test_result, gboolean triggered_with_keyboard, gpointer user_data) { GList *items = gtk_container_get_children (GTK_CONTAINER (default_menu)); GList *l; GtkAction *action; GtkWidget *sub_menu;

for (l = items; l; l = g_list_next (l)) { GtkMenuItem *item = (GtkMenuItem *)l->data;

if (GTK_IS_SEPARATOR_MENU_ITEM (item)) { /&ast; It's separator, do nothing &ast;/ continue; }

switch (webkit_context_menu_item_get_action (item)) { case WEBKIT_CONTEXT_MENU_ACTION_NO_ACTION: /&ast; No action for this item &ast;/ break; /&ast; Don't allow to ope links from context menu &ast;/ case WEBKIT_CONTEXT_MENU_ACTION_OPEN_LINK: case WEBKIT_CONTEXT_MENU_ACTION_OPEN_LINK_IN_NEW_WINDOW: action = gtk_activatable_get_related_action (GTK_ACTIVATABLE (item)); gtk_action_set_sensitive (action, FALSE); break; default: break; }

sub_menu = gtk_menu_item_get_submenu (item); if (sub_menu) { GtkWidget *menu_item;

/&ast; Add custom action to submenu &ast;/ action = gtk_action_new ("CustomItemName", "Custom Action", NULL, NULL); g_signal_connect (action, "activate", G_CALLBACK (custom_menu_item_activated), NULL);

menu_item = gtk_action_create_menu_item (action); g_object_unref (action); gtk_menu_shell_append (GTK_MENU_SHELL (sub_menu), menu_item); gtk_widget_show (menu_item); } }

g_list_free(items); } </programlisting> </example>

Note that you can get the Action of any item in the default context menu with activatableGetRelatedAction.

Since: 1.10

geolocationPolicyAllow

geolocationPolicyAllow Source #

Arguments

:: (HasCallStack, MonadIO m, IsGeolocationPolicyDecision a) 
=> a

decision: a GeolocationPolicyDecision

-> m () 

Will send the allow decision to the policy implementer.

Since: 1.1.23

geolocationPolicyDeny

geolocationPolicyDeny Source #

Arguments

:: (HasCallStack, MonadIO m, IsGeolocationPolicyDecision a) 
=> a

decision: a GeolocationPolicyDecision

-> m () 

Will send the deny decision to the policy implementer.

Since: 1.1.23

getCacheModel

getCacheModel Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m CacheModel

Returns: the current CacheModel

Returns the current cache model. For more information about this value check the documentation of the function setCacheModel.

Since: 1.1.18

getDefaultSession

getDefaultSession Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m Session

Returns: the default Session

Retrieves the default Session used by all web views. Note that the session features are added by WebKit on demand, so if you insert your own CookieJar before any network traffic occurs, WebKit will use it instead of the default.

Since: 1.1.1

getDefaultWebDatabaseQuota

getDefaultWebDatabaseQuota Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m Word64

Returns: the current default database quota in bytes

Returns the default quota for Web Database databases. By default this value is 5MB.

Since: 1.1.14

getFaviconDatabase

getFaviconDatabase Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m FaviconDatabase

Returns: the current FaviconDatabase

Returns the FaviconDatabase providing access to website icons.

Since: 1.8

getIconDatabase

getIconDatabase Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m IconDatabase

Returns: the current IconDatabase

Deprecated: (Since version 1.8)Use getFaviconDatabase instead

Returns the IconDatabase providing access to website icons.

Since: 1.3.13

getSecurityPolicyForUriScheme

getSecurityPolicyForUriScheme Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

scheme: a URI scheme

-> m [SecurityPolicy]

Returns: a SecurityPolicy

Get the security policy for the given URI scheme.

Since: 2.0

getTextChecker

getTextChecker Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m Object

Returns: the SpellChecker used by WebKit, or Nothing if spell checking is not enabled

No description available in the introspection data.

Since: 1.5.1

getWebDatabaseDirectoryPath

getWebDatabaseDirectoryPath Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m Text

Returns: the current database directory path in the filesystem encoding

Returns the current path to the directory WebKit will write Web Database and Indexed Database databases. By default this path will be in the user data directory.

Since: 1.1.14

getWebPluginDatabase

getWebPluginDatabase Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m WebPluginDatabase

Returns: the current WebPluginDatabase

Returns the current WebPluginDatabase with information about all the plugins WebKit knows about in this instance.

Since: 1.3.8

majorVersion

majorVersion Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m Word32

Returns: The major version

The major version number of the WebKit that is linked against.

Since: 1.0.1

microVersion

microVersion Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m Word32

Returns: The micro version

The micro version number of the WebKit that is linked against.

Since: 1.0.1

minorVersion

minorVersion Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m Word32

Returns: The minor version

The minor version number of the WebKit that is linked against.

Since: 1.0.1

removeAllWebDatabases

removeAllWebDatabases :: (HasCallStack, MonadIO m) => m () Source #

Removes all web databases from the current database directory path.

Since: 1.1.14

setCacheModel

setCacheModel Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> CacheModel

cacheModel: 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 WEBKIT_CACHE_MODEL_WEB_BROWSER. Applications without a browsing interface can reduce memory usage substantially by specifying WEBKIT_CACHE_MODEL_DOCUMENT_VIEWER. Default value is WEBKIT_CACHE_MODEL_WEB_BROWSER.

Since: 1.1.18

setDefaultWebDatabaseQuota

setDefaultWebDatabaseQuota Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Word64

defaultQuota: the new default database quota

-> m () 

Sets the default quota for Web Database databases.

Since: 1.1.14

setSecurityPolicyForUriScheme

setSecurityPolicyForUriScheme Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

scheme: a URI scheme

-> [SecurityPolicy]

policy: a SecurityPolicy

-> m () 

Set the security policy for the given URI scheme.

Since: 2.0

setTextChecker

setTextChecker Source #

Arguments

:: (HasCallStack, MonadIO m, IsObject a) 
=> a

checker: a SpellChecker or Nothing

-> m () 

Sets checker as the spell checker to be used by WebKit. The API accepts GObject since in the future we might accept objects implementing multiple interfaces (for example, spell checking and grammar checking).

Since: 1.5.1

setWebDatabaseDirectoryPath

setWebDatabaseDirectoryPath Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

path: the new database directory path in the filesystem encoding

-> m () 

Sets the current path to the directory WebKit will write Web Database and Indexed Database databases.

Since: 1.1.14