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 |
- Methods
- applicationCacheGetDatabaseDirectoryPath
- contextMenuItemGetAction
- geolocationPolicyAllow
- geolocationPolicyDeny
- getCacheModel
- getDefaultSession
- getDefaultWebDatabaseQuota
- getFaviconDatabase
- getIconDatabase
- getSecurityPolicyForUriScheme
- getTextChecker
- getWebDatabaseDirectoryPath
- getWebPluginDatabase
- majorVersion
- microVersion
- minorVersion
- removeAllWebDatabases
- setCacheModel
- setDefaultWebDatabaseQuota
- setSecurityPolicyForUriScheme
- setTextChecker
- setWebDatabaseDirectoryPath
- applicationCacheGetDatabaseDirectoryPath :: (HasCallStack, MonadIO m) => m Text
- contextMenuItemGetAction :: (HasCallStack, MonadIO m, IsMenuItem a) => a -> m ContextMenuAction
- geolocationPolicyAllow :: (HasCallStack, MonadIO m, IsGeolocationPolicyDecision a) => a -> m ()
- geolocationPolicyDeny :: (HasCallStack, MonadIO m, IsGeolocationPolicyDecision a) => a -> m ()
- getCacheModel :: (HasCallStack, MonadIO m) => m CacheModel
- getDefaultSession :: (HasCallStack, MonadIO m) => m Session
- getDefaultWebDatabaseQuota :: (HasCallStack, MonadIO m) => m Word64
- getFaviconDatabase :: (HasCallStack, MonadIO m) => m FaviconDatabase
- getIconDatabase :: (HasCallStack, MonadIO m) => m IconDatabase
- getSecurityPolicyForUriScheme :: (HasCallStack, MonadIO m) => Text -> m [SecurityPolicy]
- getTextChecker :: (HasCallStack, MonadIO m) => m Object
- getWebDatabaseDirectoryPath :: (HasCallStack, MonadIO m) => m Text
- getWebPluginDatabase :: (HasCallStack, MonadIO m) => m WebPluginDatabase
- majorVersion :: (HasCallStack, MonadIO m) => m Word32
- microVersion :: (HasCallStack, MonadIO m) => m Word32
- minorVersion :: (HasCallStack, MonadIO m) => m Word32
- removeAllWebDatabases :: (HasCallStack, MonadIO m) => m ()
- setCacheModel :: (HasCallStack, MonadIO m) => CacheModel -> m ()
- setDefaultWebDatabaseQuota :: (HasCallStack, MonadIO m) => Word64 -> m ()
- setSecurityPolicyForUriScheme :: (HasCallStack, MonadIO m) => Text -> [SecurityPolicy] -> m ()
- setTextChecker :: (HasCallStack, MonadIO m, IsObject a) => a -> m ()
- setWebDatabaseDirectoryPath :: (HasCallStack, MonadIO m) => Text -> m ()
Methods
applicationCacheGetDatabaseDirectoryPath
applicationCacheGetDatabaseDirectoryPath Source #
:: (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 #
:: (HasCallStack, MonadIO m, IsMenuItem a) | |
=> a |
|
-> m ContextMenuAction | Returns: the |
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)) { /* It's separator, do nothing */ continue; }
switch (webkit_context_menu_item_get_action (item)) { case WEBKIT_CONTEXT_MENU_ACTION_NO_ACTION: /* No action for this item */ break; /* Don't allow to ope links from context menu */ 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;
/* Add custom action to submenu */ 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 #
:: (HasCallStack, MonadIO m, IsGeolocationPolicyDecision a) | |
=> a |
|
-> m () |
Will send the allow decision to the policy implementer.
Since: 1.1.23
geolocationPolicyDeny
geolocationPolicyDeny Source #
:: (HasCallStack, MonadIO m, IsGeolocationPolicyDecision a) | |
=> a |
|
-> m () |
Will send the deny decision to the policy implementer.
Since: 1.1.23
getCacheModel
:: (HasCallStack, MonadIO m) | |
=> m CacheModel | Returns: the current |
Returns the current cache model. For more information about this
value check the documentation of the function
setCacheModel
.
Since: 1.1.18
getDefaultSession
:: (HasCallStack, MonadIO m) | |
=> m Session | Returns: the default |
getDefaultWebDatabaseQuota
getDefaultWebDatabaseQuota Source #
:: (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
:: (HasCallStack, MonadIO m) | |
=> m FaviconDatabase | Returns: the current |
Returns the FaviconDatabase
providing access to website
icons.
Since: 1.8
getIconDatabase
:: (HasCallStack, MonadIO m) | |
=> m IconDatabase | Returns: the current |
Deprecated: (Since version 1.8)Use getFaviconDatabase
instead
Returns the IconDatabase
providing access to website icons.
Since: 1.3.13
getSecurityPolicyForUriScheme
getSecurityPolicyForUriScheme Source #
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> m [SecurityPolicy] | Returns: a |
Get the security policy for the given URI scheme.
Since: 2.0
getTextChecker
:: (HasCallStack, MonadIO m) | |
=> m Object | Returns: the |
No description available in the introspection data.
Since: 1.5.1
getWebDatabaseDirectoryPath
getWebDatabaseDirectoryPath Source #
:: (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
:: (HasCallStack, MonadIO m) | |
=> m WebPluginDatabase | Returns: the current |
Returns the current WebPluginDatabase
with information about
all the plugins WebKit knows about in this instance.
Since: 1.3.8
majorVersion
:: (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
:: (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
:: (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
:: (HasCallStack, MonadIO m) | |
=> 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 #
:: (HasCallStack, MonadIO m) | |
=> Word64 |
|
-> m () |
Sets the default quota for Web Database databases.
Since: 1.1.14
setSecurityPolicyForUriScheme
setSecurityPolicyForUriScheme Source #
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> [SecurityPolicy] |
|
-> m () |
Set the security policy for the given URI scheme.
Since: 2.0
setTextChecker
:: (HasCallStack, MonadIO m, IsObject a) | |
=> a |
|
-> 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 #
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> m () |
Sets the current path to the directory WebKit will write Web Database and Indexed Database databases.
Since: 1.1.14