webkit-0.12.6.1: Binding to the Webkit library.

Maintainer | gtk2hs-users@lists.sourceforge.net
Stability | provisional
Portability | portable (depends on GHC)
Safe Haskell | None
Language | Haskell98

Graphics.UI.Gtk.WebKit.WebSettings

Contents

- Desciption
- Types
- Constructors
- Methods
- Attributes
  - Family
  - FontSize
  - Image
  - Encoding
  - Other

Description

Control the behaviour of a `WebView`

Synopsis

- data WebSettings
- class GObjectClass o => WebSettingsClass o
- data EditingBehavior
- webSettingsNew :: IO WebSettings
- webSettingsCopy :: WebSettingsClass self => self -> IO WebSettings
- webSettingsGetUserAgent :: WebSettingsClass self => self -> IO (Maybe String)
- webSettingsCursiveFontFamily :: WebSettingsClass self => Attr self String
- webSettingsDefaultFontFamily :: WebSettingsClass self => Attr self String
- webSettingsFantasyFontFamily :: WebSettingsClass self => Attr self String
- webSettingsMonospaceFontFamily :: WebSettingsClass self => Attr self String
- webSettingsSansFontFamily :: WebSettingsClass self => Attr self String
- webSettingsSerifFontFamily :: WebSettingsClass self => Attr self String
- webSettingsDefaultFontSize :: WebSettingsClass self => Attr self Int
- webSettingsDefaultMonospaceFontSize :: WebSettingsClass self => Attr self Int
- webSettingsMinimumFontSize :: WebSettingsClass self => Attr self Int
- webSettingsMinimumLogicalFontSize :: WebSettingsClass self => Attr self Int
- webSettingsAutoLoadImages :: WebSettingsClass self => Attr self Bool
- webSettingsAutoShrinkImages :: WebSettingsClass self => Attr self Bool
- webSettingsDefaultEncoding :: WebSettingsClass self => Attr self String
- webSettingsEditingBehavior :: WebSettingsClass self => Attr self EditingBehavior
- webSettingsEnableCaretBrowsing :: WebSettingsClass self => Attr self Bool
- webSettingsEnableDeveloperExtras :: WebSettingsClass self => Attr self Bool
- webSettingsEnableHtml5Database :: WebSettingsClass self => Attr self Bool
- webSettingsEnableHtml5LocalStorage :: WebSettingsClass self => Attr self Bool
- webSettingsEnableOfflineWebApplicationCache :: WebSettingsClass self => Attr self Bool
- webSettingsEnablePlugins :: WebSettingsClass self => Attr self Bool
- webSettingsEnablePrivateBrowsing :: WebSettingsClass self => Attr self Bool
- webSettingsEnableScripts :: WebSettingsClass self => Attr self Bool
- webSettingsEnableSpellChecking :: WebSettingsClass self => Attr self Bool
- webSettingsEnableUniversalAccessFromFileUris :: WebSettingsClass self => Attr self Bool
- webSettingsEnableXssAuditor :: WebSettingsClass self => Attr self Bool
- webSettingsEnableSiteSpecificQuirks :: WebSettingsClass self => Attr self Bool
- webSettingsEnableDomPaste :: WebSettingsClass self => Attr self Bool
- webSettingsEnableDefaultContextMenu :: WebSettingsClass self => Attr self Bool
- webSettingsEnablePageCache :: WebSettingsClass self => Attr self Bool
- webSettingsEnableSpatialNavigation :: WebSettingsClass self => Attr self Bool
- webSettingsEnforce96Dpi :: WebSettingsClass self => Attr self Bool
- webSettingsJSCanOpenWindowAuto :: WebSettingsClass self => Attr self Bool
- webSettingsPrintBackgrounds :: WebSettingsClass self => Attr self Bool
- webSettingsResizableTextAreas :: WebSettingsClass self => Attr self Bool
- webSettingsSpellCheckingLang :: WebSettingsClass self => Attr self (Maybe String)
- webSettingsTabKeyCyclesThroughElements :: WebSettingsClass self => Attr self Bool
- webSettingsUserAgent :: WebSettingsClass self => Attr self String
- webSettingsUserStylesheetUri :: WebSettingsClass self => Attr self (Maybe String)
- webSettingsZoomStep :: WebSettingsClass self => Attr self Float

# Desciption

WebKitWebSettings can be applied to a WebKitWebView to control the to be used text encoding, color, font sizes, printing mode, script support, loading of images and various other things.

# Types

data WebSettings

Instances

Eq WebSettings |
Ord WebSettings |
GObjectClass WebSettings |
WebSettingsClass WebSettings |

class GObjectClass o => WebSettingsClass o

Instances

WebSettingsClass WebSettings |

data EditingBehavior

Instances

Enum EditingBehavior |

# Constructors

webSettingsNew :: IO WebSettings

Create a new `WebSettings` instance.

A `WebSettings` can be applied to a `WebView` to control the to be used text encoding, color, font size, printing mode,script support, loading of images and various other things.

# Methods

webSettingsCopy :: WebSettingsClass self => self -> IO WebSettings

Copy an existing `WebSettings` instance.

webSettingsGetUserAgent

Arguments

:: WebSettingsClass self |
=> self |
-> IO (Maybe String) | User-Agent string or `Nothing` in case failed.

Return the User-Agent string currently used.

# Attributes

## Family

webSettingsCursiveFontFamily :: WebSettingsClass self => Attr self String

The default Cursive font family used to display text

Default value "serif"

webSettingsDefaultFontFamily :: WebSettingsClass self => Attr self String

The default font family used to display text

Default value: "sans-serif"

webSettingsFantasyFontFamily :: WebSettingsClass self => Attr self String

The default Fantasy font family used to display text

webSettingsMonospaceFontFamily :: WebSettingsClass self => Attr self String

The default font family used to display monospace text.

Default value: "monospace"

webSettingsSansFontFamily :: WebSettingsClass self => Attr self String

The default Sans Serif font family used to display text

Default value "sans-serif"

webSettingsSerifFontFamily :: WebSettingsClass self => Attr self String

The default Serif font family used to display text

Default value: "serif"

## FontSize

webSettingsDefaultFontSize :: WebSettingsClass self => Attr self Int

The default font size used to display text

Default value: >=5

webSettingsDefaultMonospaceFontSize :: WebSettingsClass self => Attr self Int

The default font size used to display monospace text

Allowed values: >= 5

Default value: 10

webSettingsMinimumFontSize :: WebSettingsClass self => Attr self Int

The minimum font size used to display text.

Allowed values: >=1

Default value: 5

webSettingsMinimumLogicalFontSize :: WebSettingsClass self => Attr self Int

The minimum logical font size used to display text

Allowed values: >=1

Default value: 5

## Image

webSettingsAutoLoadImages :: WebSettingsClass self => Attr self Bool

Load images automatically

Default value: True

webSettingsAutoShrinkImages :: WebSettingsClass self => Attr self Bool

Automatically shrink standalone images to fit

Default value: True

## Encoding

webSettingsDefaultEncoding :: WebSettingsClass self => Attr self String

The default encoding used to display text

Default value "iso-8859-1"

## Other

webSettingsEditingBehavior :: WebSettingsClass self => Attr self EditingBehavior

This settings controls various editing behaviors

webSettingsEnableCaretBrowsing :: WebSettingsClass self => Attr self Bool

Whether to enable caret browsing mode.

webSettingsEnableDeveloperExtras :: WebSettingsClass self => Attr self Bool

Whether developer extensions should be enabled.

This enables, for now, the `WebInspector`

webSettingsEnableHtml5Database :: WebSettingsClass self => Attr self Bool

Whether to enable HTML5 client-side SQL database support.

webSettingsEnableHtml5LocalStorage :: WebSettingsClass self => Attr self Bool

Whether to enable HTML5 localStorage support.

webSettingsEnableOfflineWebApplicationCache :: WebSettingsClass self => Attr self Bool

Whether to enable HTML5 offline web application cache support.

webSettingsEnablePlugins :: WebSettingsClass self => Attr self Bool

Enable embedded plugin objects.

webSettingsEnablePrivateBrowsing :: WebSettingsClass self => Attr self Bool

Whether to enable private browsing mode.

webSettingsEnableScripts :: WebSettingsClass self => Attr self Bool

Enable embedded scripting languages

webSettingsEnableSpellChecking :: WebSettingsClass self => Attr self Bool

Whether to enable speel checking while typing.

webSettingsEnableUniversalAccessFromFileUris :: WebSettingsClass self => Attr self Bool

Whether to allow files loaded through file:

webSettingsEnableXssAuditor :: WebSettingsClass self => Attr self Bool

Whether to enable the XSS Auditor.

This feature filters some kinds of reflective XSS attacks on vulnerable web sites.

webSettingsEnableSiteSpecificQuirks :: WebSettingsClass self => Attr self Bool

Enables the site-specific compatibility workarounds.

Default value: False

webSettingsEnableDomPaste :: WebSettingsClass self => Attr self Bool

Whether to enable DOM paste. If set to `True`, document.execCommand(Paste) will correctly execute and paste content of the clipboard.

Default value: `False`

- Since 1.1.16

webSettingsEnableDefaultContextMenu :: WebSettingsClass self => Attr self Bool

Whether right-clicks should be handled automatically to create, and display the context menu. Turning this off will make WebKitGTK+ not emit the populate-popup signal. Notice that the default button press event handler may still handle right clicks for other reasons, such as in-page context menus, or right-clicks that are handled by the page itself.

Default value: `True`

- Since 1.1.18

webSettingsEnablePageCache :: WebSettingsClass self => Attr self Bool

Enable or disable the page cache. Disabling the page cache is generally only useful for special circumstances like low-memory scenarios or special purpose applications like static HTML viewers. This setting only controls the Page Cache, this cache is different than the disk-based or memory-based traditional resource caches, its point is to make going back and forth between pages much faster. For details about the different types of caches and their purposes see: http:

Default value: `False`

- Since 1.1.18

webSettingsEnableSpatialNavigation :: WebSettingsClass self => Attr self Bool

Whether to enable the Spatial Navigation. This feature consists in the ability to navigate between focusable elements in a Web page, such as hyperlinks and form controls, by using Left, Right, Up and Down arrow keys. For example, if an user presses the Right key, heuristics determine whether there is an element he might be trying to reach towards the right, and if there are multiple elements, which element he probably wants.

Default value: `False`

- Since 1.1.23

webSettingsEnforce96Dpi :: WebSettingsClass self => Attr self Bool

Enforce a resolution of 96 DPI.

webSettingsJSCanOpenWindowAuto :: WebSettingsClass self => Attr self Bool

Whether JavaScript can open popup windows automatically without user intervention.

webSettingsPrintBackgrounds :: WebSettingsClass self => Attr self Bool

Whether background images should be printed

Default value: True

webSettingsResizableTextAreas :: WebSettingsClass self => Attr self Bool

Whether text areas are resizable

Default value : True

webSettingsSpellCheckingLang :: WebSettingsClass self => Attr self (Maybe String)

The languages to be used for spell checking, separated by commas

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.

If no value is specified then the value returned by gtk_get_default_language will be used.

Default value: `Nothing`

webSettingsTabKeyCyclesThroughElements :: WebSettingsClass self => Attr self Bool

Whether the tab key cycles through elements on the page.

If flag is `True`, pressing the tab key will focus the next element in the `webView`. If flag is `False`, the `webView` will interpret tab key presses as normal key presses. If the selected element is editable, the tab key will cause the insertion of a tab character.

Default value: `True`

- Since 1.1.17

webSettingsUserAgent :: WebSettingsClass self => Attr self String

The User-Agent string used by WebKit

This will return a default User-Agent string if a custom string wasn't provided by the application. Setting this property to a ((void *)0) value or an empty string will result in the User-Agent string being reset to the default value.

Default value: "Mozilla5.0 (X11; U; Linux x86_64; c) AppleWebKit531.2+ (KHTML, like Gecko) Safari/531.2+"

webSettingsUserStylesheetUri :: WebSettingsClass self => Attr self (Maybe String)

The URI of a stylesheet that is applied to every page.

Default value: `Nothing`

webSettingsZoomStep :: WebSettingsClass self => Attr self Float

The value by which the zoom level is changed when zooming in or out

Allowed values: >= 0

Default value: 0.1