Portability | portable (depends on GHC) |
---|---|
Stability | provisional |
Maintainer | gtk2hs-users@lists.sourceforge.net |
Safe Haskell | None |
Control the behaviour of a WebView
- 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 Source
class GObjectClass o => WebSettingsClass o Source
Constructors
webSettingsNew :: IO WebSettingsSource
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 WebSettingsSource
Copy an existing WebSettings
instance.
:: WebSettingsClass self | |
=> self | |
-> IO (Maybe String) | User-Agent string or |
Return the User-Agent string currently used.
Attributes
Family
webSettingsCursiveFontFamily :: WebSettingsClass self => Attr self StringSource
The default Cursive font family used to display text
Default value serif
webSettingsDefaultFontFamily :: WebSettingsClass self => Attr self StringSource
The default font family used to display text
Default value: sans-serif
webSettingsFantasyFontFamily :: WebSettingsClass self => Attr self StringSource
The default Fantasy font family used to display text
webSettingsMonospaceFontFamily :: WebSettingsClass self => Attr self StringSource
The default font family used to display monospace text.
Default value: monospace
webSettingsSansFontFamily :: WebSettingsClass self => Attr self StringSource
The default Sans Serif font family used to display text
Default value sans-serif
webSettingsSerifFontFamily :: WebSettingsClass self => Attr self StringSource
The default Serif font family used to display text
Default value: serif
FontSize
webSettingsDefaultFontSize :: WebSettingsClass self => Attr self IntSource
The default font size used to display text
Default value: >=5
webSettingsDefaultMonospaceFontSize :: WebSettingsClass self => Attr self IntSource
The default font size used to display monospace text
Allowed values: >= 5
Default value: 10
webSettingsMinimumFontSize :: WebSettingsClass self => Attr self IntSource
The minimum font size used to display text.
Allowed values: >=1
Default value: 5
webSettingsMinimumLogicalFontSize :: WebSettingsClass self => Attr self IntSource
The minimum logical font size used to display text
Allowed values: >=1
Default value: 5
Image
webSettingsAutoLoadImages :: WebSettingsClass self => Attr self BoolSource
Load images automatically
Default value: True
webSettingsAutoShrinkImages :: WebSettingsClass self => Attr self BoolSource
Automatically shrink standalone images to fit
Default value: True
Encoding
webSettingsDefaultEncoding :: WebSettingsClass self => Attr self StringSource
The default encoding used to display text
Default value iso-8859-1
Other
webSettingsEditingBehavior :: WebSettingsClass self => Attr self EditingBehaviorSource
This settings controls various editing behaviors
webSettingsEnableCaretBrowsing :: WebSettingsClass self => Attr self BoolSource
Whether to enable caret browsing mode.
webSettingsEnableDeveloperExtras :: WebSettingsClass self => Attr self BoolSource
Whether developer extensions should be enabled.
This enables, for now, the WebInspector
webSettingsEnableHtml5Database :: WebSettingsClass self => Attr self BoolSource
Whether to enable HTML5 client-side SQL database support.
webSettingsEnableHtml5LocalStorage :: WebSettingsClass self => Attr self BoolSource
Whether to enable HTML5 localStorage support.
webSettingsEnableOfflineWebApplicationCache :: WebSettingsClass self => Attr self BoolSource
Whether to enable HTML5 offline web application cache support.
webSettingsEnablePlugins :: WebSettingsClass self => Attr self BoolSource
Enable embedded plugin objects.
webSettingsEnablePrivateBrowsing :: WebSettingsClass self => Attr self BoolSource
Whether to enable private browsing mode.
webSettingsEnableScripts :: WebSettingsClass self => Attr self BoolSource
Enable embedded scripting languages
webSettingsEnableSpellChecking :: WebSettingsClass self => Attr self BoolSource
Whether to enable speel checking while typing.
webSettingsEnableUniversalAccessFromFileUris :: WebSettingsClass self => Attr self BoolSource
Whether to allow files loaded through file:
webSettingsEnableXssAuditor :: WebSettingsClass self => Attr self BoolSource
Whether to enable the XSS Auditor.
This feature filters some kinds of reflective XSS attacks on vulnerable web sites.
webSettingsEnableSiteSpecificQuirks :: WebSettingsClass self => Attr self BoolSource
Enables the site-specific compatibility workarounds.
Default value: False
webSettingsEnableDomPaste :: WebSettingsClass self => Attr self BoolSource
webSettingsEnableDefaultContextMenu :: WebSettingsClass self => Attr self BoolSource
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 BoolSource
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 BoolSource
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 BoolSource
Enforce a resolution of 96 DPI.
webSettingsJSCanOpenWindowAuto :: WebSettingsClass self => Attr self BoolSource
Whether JavaScript can open popup windows automatically without user intervention.
webSettingsPrintBackgrounds :: WebSettingsClass self => Attr self BoolSource
Whether background images should be printed
Default value: True
webSettingsResizableTextAreas :: WebSettingsClass self => Attr self BoolSource
Whether text areas are resizable
Default value : True
webSettingsSpellCheckingLang :: WebSettingsClass self => Attr self (Maybe String)Source
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 BoolSource
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 StringSource
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)Source
The URI of a stylesheet that is applied to every page.
Default value: Nothing
webSettingsZoomStep :: WebSettingsClass self => Attr self FloatSource
The value by which the zoom level is changed when zooming in or out
Allowed values: >= 0
Default value: 0.1