module Graphics.UI.Gtk.WebKit.WebSettings (
WebSettings,
WebSettingsClass,
EditingBehavior,
webSettingsNew,
webSettingsCopy,
webSettingsGetUserAgent,
webSettingsCursiveFontFamily,
webSettingsDefaultFontFamily,
webSettingsFantasyFontFamily,
webSettingsMonospaceFontFamily,
webSettingsSansFontFamily,
webSettingsSerifFontFamily,
webSettingsDefaultFontSize,
webSettingsDefaultMonospaceFontSize,
webSettingsMinimumFontSize,
webSettingsMinimumLogicalFontSize,
webSettingsAutoLoadImages,
webSettingsAutoShrinkImages,
webSettingsDefaultEncoding,
webSettingsEditingBehavior,
webSettingsEnableCaretBrowsing,
webSettingsEnableDeveloperExtras,
webSettingsEnableHtml5Database,
webSettingsEnableHtml5LocalStorage,
webSettingsEnableOfflineWebApplicationCache,
webSettingsEnablePlugins,
webSettingsEnablePrivateBrowsing,
webSettingsEnableScripts,
webSettingsEnableSpellChecking,
webSettingsEnableUniversalAccessFromFileUris,
webSettingsEnableXssAuditor,
webSettingsEnableSiteSpecificQuirks,
webSettingsEnableDomPaste,
webSettingsEnableDefaultContextMenu,
webSettingsEnablePageCache,
webSettingsEnableSpatialNavigation,
webSettingsEnforce96Dpi,
webSettingsJSCanOpenWindowAuto,
webSettingsPrintBackgrounds,
webSettingsResizableTextAreas,
webSettingsSpellCheckingLang,
webSettingsTabKeyCyclesThroughElements,
webSettingsUserAgent,
webSettingsUserStylesheetUri,
webSettingsZoomStep,
) where
import Control.Monad (liftM)
import System.Glib.FFI
import System.Glib.UTFString
import System.Glib.GList
import System.Glib.GError
import System.Glib.Properties
import System.Glib.Attributes as G
import Graphics.UI.Gtk.Gdk.Events
import Graphics.UI.Gtk.Abstract.Object (makeNewObject)
import Graphics.UI.Gtk.WebKit.Types
import System.Glib.GObject
data EditingBehavior = EditingBehaviorMac
| EditingBehaviorWindows
| EditingBehaviorUnix
deriving (Enum)
webSettingsNew :: IO WebSettings
webSettingsNew =
wrapNewGObject mkWebSettings $ webkit_web_settings_new
webSettingsCopy ::
WebSettingsClass self => self
-> IO WebSettings
webSettingsCopy websettings =
constructNewGObject mkWebSettings $ (\(WebSettings arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_web_settings_copy argPtr1) (toWebSettings websettings)
webSettingsGetUserAgent ::
(WebSettingsClass self, GlibString string) => self
-> IO (Maybe string)
webSettingsGetUserAgent websettings =
(\(WebSettings arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_web_settings_get_user_agent argPtr1) (toWebSettings websettings) >>= maybePeek peekUTFString
webSettingsAutoLoadImages :: (WebSettingsClass self) => G.Attr self Bool
webSettingsAutoLoadImages = newAttrFromBoolProperty "auto-load-images"
webSettingsAutoShrinkImages :: (WebSettingsClass self) => G.Attr self Bool
webSettingsAutoShrinkImages = newAttrFromBoolProperty "auto-shrink-images"
webSettingsCursiveFontFamily :: (WebSettingsClass self, GlibString string) => G.Attr self string
webSettingsCursiveFontFamily = newAttrFromStringProperty "cursive-font-family"
webSettingsDefaultEncoding :: (WebSettingsClass self, GlibString string) => G.Attr self string
webSettingsDefaultEncoding = newAttrFromStringProperty "default-encoding"
webSettingsDefaultFontFamily :: (WebSettingsClass self, GlibString string) => G.Attr self string
webSettingsDefaultFontFamily = newAttrFromStringProperty "default-font-family"
webSettingsDefaultFontSize :: (WebSettingsClass self) => G.Attr self Int
webSettingsDefaultFontSize = newAttrFromIntProperty "default-font-size"
webSettingsDefaultMonospaceFontSize :: (WebSettingsClass self) => G.Attr self Int
webSettingsDefaultMonospaceFontSize = newAttrFromIntProperty "default-monospace-font-size"
webSettingsEditingBehavior :: (WebSettingsClass self) => G.Attr self EditingBehavior
webSettingsEditingBehavior = newAttrFromEnumProperty "editing-behavior"
webkit_editing_behavior_get_type
webSettingsEnableCaretBrowsing :: (WebSettingsClass self) => G.Attr self Bool
webSettingsEnableCaretBrowsing = newAttrFromBoolProperty "enable-caret-browsing"
webSettingsEnableDeveloperExtras :: (WebSettingsClass self) => G.Attr self Bool
webSettingsEnableDeveloperExtras = newAttrFromBoolProperty "enable-developer-extras"
webSettingsEnableDomPaste :: (WebSettingsClass self) => G.Attr self Bool
webSettingsEnableDomPaste = newAttrFromBoolProperty "enable-dom-paste"
webSettingsEnableHtml5Database :: (WebSettingsClass self) => G.Attr self Bool
webSettingsEnableHtml5Database = newAttrFromBoolProperty "enable-html5-database"
webSettingsEnableHtml5LocalStorage :: (WebSettingsClass self) => G.Attr self Bool
webSettingsEnableHtml5LocalStorage = newAttrFromBoolProperty "enable-html5-local-storage"
webSettingsEnableOfflineWebApplicationCache :: (WebSettingsClass self) => G.Attr self Bool
webSettingsEnableOfflineWebApplicationCache = newAttrFromBoolProperty "enable-offline-web-application-cache"
webSettingsEnablePlugins :: (WebSettingsClass self) => G.Attr self Bool
webSettingsEnablePlugins = newAttrFromBoolProperty "enable-plugins"
webSettingsEnablePrivateBrowsing :: (WebSettingsClass self) => G.Attr self Bool
webSettingsEnablePrivateBrowsing = newAttrFromBoolProperty "enable-private-browsing"
webSettingsEnableScripts :: (WebSettingsClass self) => G.Attr self Bool
webSettingsEnableScripts = newAttrFromBoolProperty "enable-scripts"
webSettingsEnableSpellChecking :: (WebSettingsClass self) => G.Attr self Bool
webSettingsEnableSpellChecking = newAttrFromBoolProperty "enable-spell-checking"
webSettingsEnableUniversalAccessFromFileUris :: (WebSettingsClass self) => G.Attr self Bool
webSettingsEnableUniversalAccessFromFileUris = newAttrFromBoolProperty "enable-universal-access-from-file-uris"
webSettingsEnableXssAuditor :: (WebSettingsClass self) => G.Attr self Bool
webSettingsEnableXssAuditor = newAttrFromBoolProperty "enable-xss-auditor"
webSettingsEnforce96Dpi :: (WebSettingsClass self) => G.Attr self Bool
webSettingsEnforce96Dpi = newAttrFromBoolProperty "enforce-96-dpi"
webSettingsFantasyFontFamily :: (WebSettingsClass self, GlibString string) => G.Attr self string
webSettingsFantasyFontFamily = newAttrFromStringProperty "fantasy-font-family"
webSettingsJSCanOpenWindowAuto :: (WebSettingsClass self) => G.Attr self Bool
webSettingsJSCanOpenWindowAuto = newAttrFromBoolProperty "javascript-can-open-windows-automatically"
webSettingsMinimumFontSize :: (WebSettingsClass self) => G.Attr self Int
webSettingsMinimumFontSize = newAttrFromIntProperty "minimum-font-size"
webSettingsMinimumLogicalFontSize :: (WebSettingsClass self) => G.Attr self Int
webSettingsMinimumLogicalFontSize = newAttrFromIntProperty "minimum-logical-font-size"
webSettingsMonospaceFontFamily :: (WebSettingsClass self, GlibString string) => G.Attr self string
webSettingsMonospaceFontFamily = newAttrFromStringProperty "monospace-font-family"
webSettingsPrintBackgrounds :: (WebSettingsClass self) => G.Attr self Bool
webSettingsPrintBackgrounds = newAttrFromBoolProperty "print-backgrounds"
webSettingsResizableTextAreas :: (WebSettingsClass self) => G.Attr self Bool
webSettingsResizableTextAreas = newAttrFromBoolProperty "resizable-text-areas"
webSettingsSansFontFamily :: (WebSettingsClass self, GlibString string) => G.Attr self string
webSettingsSansFontFamily = newAttrFromStringProperty "sans-serif-font-family"
webSettingsSerifFontFamily :: (WebSettingsClass self, GlibString string) => G.Attr self string
webSettingsSerifFontFamily = newAttrFromStringProperty "serif-font-family"
webSettingsSpellCheckingLang :: (WebSettingsClass self, GlibString string) => G.Attr self (Maybe string)
webSettingsSpellCheckingLang = newAttrFromMaybeStringProperty "spell-checking-languages"
webSettingsTabKeyCyclesThroughElements :: (WebSettingsClass self) => G.Attr self Bool
webSettingsTabKeyCyclesThroughElements = newAttrFromBoolProperty "tab-key-cycles-through-elements"
webSettingsEnableDefaultContextMenu :: (WebSettingsClass self) => G.Attr self Bool
webSettingsEnableDefaultContextMenu = newAttrFromBoolProperty "enable-default-context-menu"
webSettingsEnablePageCache :: (WebSettingsClass self) => G.Attr self Bool
webSettingsEnablePageCache = newAttrFromBoolProperty "enable-page-cache"
webSettingsUserAgent :: (WebSettingsClass self, GlibString string) => G.Attr self string
webSettingsUserAgent = newAttrFromStringProperty "user-agent"
webSettingsUserStylesheetUri :: (WebSettingsClass self, GlibString string) => G.Attr self (Maybe string)
webSettingsUserStylesheetUri = newAttrFromMaybeStringProperty "user-stylesheet-uri"
webSettingsZoomStep :: (WebSettingsClass self) => G.Attr self Float
webSettingsZoomStep = newAttrFromFloatProperty "zoom-step"
webSettingsEnableSiteSpecificQuirks :: WebSettingsClass self => G.Attr self Bool
webSettingsEnableSiteSpecificQuirks = newAttrFromBoolProperty "enable-site-specific-quirks"
webSettingsEnableSpatialNavigation :: WebSettingsClass self => G.Attr self Bool
webSettingsEnableSpatialNavigation = newAttrFromBoolProperty "enable-spatial-navigation"
foreign import ccall safe "webkit_web_settings_new"
webkit_web_settings_new :: (IO (Ptr WebSettings))
foreign import ccall safe "webkit_web_settings_copy"
webkit_web_settings_copy :: ((Ptr WebSettings) -> (IO (Ptr WebSettings)))
foreign import ccall safe "webkit_web_settings_get_user_agent"
webkit_web_settings_get_user_agent :: ((Ptr WebSettings) -> (IO (Ptr CChar)))
foreign import ccall unsafe "webkit_editing_behavior_get_type"
webkit_editing_behavior_get_type :: CULong