Settings

#WebKitSettings can be applied to a #WebKitWebView to control text charset, color, font sizes, printing mode, script support, loading of images and various other things on a #WebKitWebView. After creation, a #WebKitSettings object contains default settings.

<informalexample><programlisting> /<!-- -->* Disable JavaScript. *<!-- -->/ WebKitSettings *settings = webkit_web_view_group_get_settings (my_view_group); webkit_settings_set_enable_javascript (settings, FALSE);

</programlisting></informalexample>

class Settings : ObjectG {}

Constructors

this
this(WebKitSettings* webKitSettings, bool ownedRef)

Sets our main struct and passes it to the parent class.

this
this()

Creates a new #WebKitSettings instance with default values. It must be manually attached to a #WebKitWebView. See also webkit_settings_new_with_settings().

Members

Functions

getAllowFileAccessFromFileUrls
bool getAllowFileAccessFromFileUrls()

Get the #WebKitSettings:allow-file-access-from-file-urls property.

getAllowModalDialogs
bool getAllowModalDialogs()

Get the #WebKitSettings:allow-modal-dialogs property.

getAllowTopNavigationToDataUrls
bool getAllowTopNavigationToDataUrls()

Get the #WebKitSettings:allow-top-navigation-to-data-urls property.

getAllowUniversalAccessFromFileUrls
bool getAllowUniversalAccessFromFileUrls()

Get the #WebKitSettings:allow-universal-access-from-file-urls property.

getAutoLoadImages
bool getAutoLoadImages()

Get the #WebKitSettings:auto-load-images property.

getCursiveFontFamily
string getCursiveFontFamily()

Gets the #WebKitSettings:cursive-font-family property.

getDefaultCharset
string getDefaultCharset()

Gets the #WebKitSettings:default-charset property.

getDefaultFontFamily
string getDefaultFontFamily()
getDefaultFontSize
uint getDefaultFontSize()

Gets the #WebKitSettings:default-font-size property.

getDefaultMonospaceFontSize
uint getDefaultMonospaceFontSize()

Gets the #WebKitSettings:default-monospace-font-size property.

getDrawCompositingIndicators
bool getDrawCompositingIndicators()

Get the #WebKitSettings:draw-compositing-indicators property.

getEnableAccelerated2dCanvas
bool getEnableAccelerated2dCanvas()

Get the #WebKitSettings:enable-accelerated-2d-canvas property.

getEnableBackForwardNavigationGestures
bool getEnableBackForwardNavigationGestures()

Get the #WebKitSettings:enable-back-forward-navigation-gestures property.

getEnableCaretBrowsing
bool getEnableCaretBrowsing()

Get the #WebKitSettings:enable-caret-browsing property.

getEnableDeveloperExtras
bool getEnableDeveloperExtras()

Get the #WebKitSettings:enable-developer-extras property.

getEnableDnsPrefetching
bool getEnableDnsPrefetching()

Get the #WebKitSettings:enable-dns-prefetching property.

getEnableEncryptedMedia
bool getEnableEncryptedMedia()

Get the #WebKitSettings:enable-encrypted-media property.

getEnableFrameFlattening
bool getEnableFrameFlattening()

Get the #WebKitSettings:enable-frame-flattening property.

getEnableFullscreen
bool getEnableFullscreen()

Get the #WebKitSettings:enable-fullscreen property.

getEnableHtml5Database
bool getEnableHtml5Database()

Get the #WebKitSettings:enable-html5-database property.

getEnableHtml5LocalStorage
bool getEnableHtml5LocalStorage()

Get the #WebKitSettings:enable-html5-local-storage property.

getEnableHyperlinkAuditing
bool getEnableHyperlinkAuditing()

Get the #WebKitSettings:enable-hyperlink-auditing property.

getEnableJava
bool getEnableJava()

Get the #WebKitSettings:enable-java property.

getEnableJavascript
bool getEnableJavascript()

Get the #WebKitSettings:enable-javascript property.

getEnableJavascriptMarkup
bool getEnableJavascriptMarkup()

Get the #WebKitSettings:enable-javascript-markup property.

getEnableMedia
bool getEnableMedia()

Get the #WebKitSettings:enable-media property.

getEnableMediaCapabilities
bool getEnableMediaCapabilities()

Get the #WebKitSettings:enable-media-capabilities property.

getEnableMediaStream
bool getEnableMediaStream()

Get the #WebKitSettings:enable-media-stream property.

getEnableMediasource
bool getEnableMediasource()

Get the #WebKitSettings:enable-mediasource property.

getEnableMockCaptureDevices
bool getEnableMockCaptureDevices()

Get the #WebKitSettings:enable-mock-capture-devices property.

getEnableOfflineWebApplicationCache
bool getEnableOfflineWebApplicationCache()

Get the #WebKitSettings:enable-offline-web-application-cache property.

getEnablePageCache
bool getEnablePageCache()

Get the #WebKitSettings:enable-page-cache property.

getEnablePlugins
bool getEnablePlugins()

Get the #WebKitSettings:enable-plugins property.

getEnablePrivateBrowsing
bool getEnablePrivateBrowsing()

Get the #WebKitSettings:enable-private-browsing property.

getEnableResizableTextAreas
bool getEnableResizableTextAreas()

Get the #WebKitSettings:enable-resizable-text-areas property.

getEnableSiteSpecificQuirks
bool getEnableSiteSpecificQuirks()

Get the #WebKitSettings:enable-site-specific-quirks property.

getEnableSmoothScrolling
bool getEnableSmoothScrolling()

Get the #WebKitSettings:enable-smooth-scrolling property.

getEnableSpatialNavigation
bool getEnableSpatialNavigation()

Get the #WebKitSettings:enable-spatial-navigation property.

getEnableTabsToLinks
bool getEnableTabsToLinks()

Get the #WebKitSettings:enable-tabs-to-links property.

getEnableWebaudio
bool getEnableWebaudio()

Get the #WebKitSettings:enable-webaudio property.

getEnableWebgl
bool getEnableWebgl()

Get the #WebKitSettings:enable-webgl property.

getEnableWriteConsoleMessagesToStdout
bool getEnableWriteConsoleMessagesToStdout()

Get the #WebKitSettings:enable-write-console-messages-to-stdout property.

getEnableXssAuditor
bool getEnableXssAuditor()

Get the #WebKitSettings:enable-xss-auditor property.

getFantasyFontFamily
string getFantasyFontFamily()

Gets the #WebKitSettings:fantasy-font-family property.

getHardwareAccelerationPolicy
WebKitHardwareAccelerationPolicy getHardwareAccelerationPolicy()

Get the #WebKitSettings:hardware-acceleration-policy property.

getJavascriptCanAccessClipboard
bool getJavascriptCanAccessClipboard()

Get the #WebKitSettings:javascript-can-access-clipboard property.

getJavascriptCanOpenWindowsAutomatically
bool getJavascriptCanOpenWindowsAutomatically()

Get the #WebKitSettings:javascript-can-open-windows-automatically property.

getLoadIconsIgnoringImageLoadSetting
bool getLoadIconsIgnoringImageLoadSetting()

Get the #WebKitSettings:load-icons-ignoring-image-load-setting property.

getMediaContentTypesRequiringHardwareSupport
string getMediaContentTypesRequiringHardwareSupport()

Gets the #WebKitSettings:media-content-types-requiring-hardware-support property.

getMediaPlaybackAllowsInline
bool getMediaPlaybackAllowsInline()

Get the #WebKitSettings:media-playback-allows-inline property.

getMediaPlaybackRequiresUserGesture
bool getMediaPlaybackRequiresUserGesture()

Get the #WebKitSettings:media-playback-requires-user-gesture property.

getMinimumFontSize
uint getMinimumFontSize()

Gets the #WebKitSettings:minimum-font-size property.

getMonospaceFontFamily
string getMonospaceFontFamily()

Gets the #WebKitSettings:monospace-font-family property.

getPictographFontFamily
string getPictographFontFamily()

Gets the #WebKitSettings:pictograph-font-family property.

getPrintBackgrounds
bool getPrintBackgrounds()

Get the #WebKitSettings:print-backgrounds property.

getSansSerifFontFamily
string getSansSerifFontFamily()

Gets the #WebKitSettings:sans-serif-font-family property.

getSerifFontFamily
string getSerifFontFamily()

Gets the #WebKitSettings:serif-font-family property.

getSettingsStruct
WebKitSettings* getSettingsStruct(bool transferOwnership)

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

getUserAgent
string getUserAgent()

Get the #WebKitSettings:user-agent property.

getZoomTextOnly
bool getZoomTextOnly()

Get the #WebKitSettings:zoom-text-only property.

setAllowFileAccessFromFileUrls
void setAllowFileAccessFromFileUrls(bool allowed)

Set the #WebKitSettings:allow-file-access-from-file-urls property.

setAllowModalDialogs
void setAllowModalDialogs(bool allowed)

Set the #WebKitSettings:allow-modal-dialogs property.

setAllowTopNavigationToDataUrls
void setAllowTopNavigationToDataUrls(bool allowed)

Set the #WebKitSettings:allow-top-navigation-to-data-urls property.

setAllowUniversalAccessFromFileUrls
void setAllowUniversalAccessFromFileUrls(bool allowed)

Set the #WebKitSettings:allow-universal-access-from-file-urls property.

setAutoLoadImages
void setAutoLoadImages(bool enabled)

Set the #WebKitSettings:auto-load-images property.

setCursiveFontFamily
void setCursiveFontFamily(string cursiveFontFamily)

Set the #WebKitSettings:cursive-font-family property.

setDefaultCharset
void setDefaultCharset(string defaultCharset)

Set the #WebKitSettings:default-charset property.

setDefaultFontFamily
void setDefaultFontFamily(string defaultFontFamily)

Set the #WebKitSettings:default-font-family property.

setDefaultFontSize
void setDefaultFontSize(uint fontSize)

Set the #WebKitSettings:default-font-size property.

setDefaultMonospaceFontSize
void setDefaultMonospaceFontSize(uint fontSize)

Set the #WebKitSettings:default-monospace-font-size property.

setDrawCompositingIndicators
void setDrawCompositingIndicators(bool enabled)

Set the #WebKitSettings:draw-compositing-indicators property.

setEnableAccelerated2dCanvas
void setEnableAccelerated2dCanvas(bool enabled)

Set the #WebKitSettings:enable-accelerated-2d-canvas property.

setEnableBackForwardNavigationGestures
void setEnableBackForwardNavigationGestures(bool enabled)

Set the #WebKitSettings:enable-back-forward-navigation-gestures property.

setEnableCaretBrowsing
void setEnableCaretBrowsing(bool enabled)

Set the #WebKitSettings:enable-caret-browsing property.

setEnableDeveloperExtras
void setEnableDeveloperExtras(bool enabled)

Set the #WebKitSettings:enable-developer-extras property.

setEnableDnsPrefetching
void setEnableDnsPrefetching(bool enabled)

Set the #WebKitSettings:enable-dns-prefetching property.

setEnableEncryptedMedia
void setEnableEncryptedMedia(bool enabled)

Set the #WebKitSettings:enable-encrypted-media property.

setEnableFrameFlattening
void setEnableFrameFlattening(bool enabled)

Set the #WebKitSettings:enable-frame-flattening property.

setEnableFullscreen
void setEnableFullscreen(bool enabled)

Set the #WebKitSettings:enable-fullscreen property.

setEnableHtml5Database
void setEnableHtml5Database(bool enabled)

Set the #WebKitSettings:enable-html5-database property.

setEnableHtml5LocalStorage
void setEnableHtml5LocalStorage(bool enabled)

Set the #WebKitSettings:enable-html5-local-storage property.

setEnableHyperlinkAuditing
void setEnableHyperlinkAuditing(bool enabled)

Set the #WebKitSettings:enable-hyperlink-auditing property.

setEnableJava
void setEnableJava(bool enabled)

Set the #WebKitSettings:enable-java property.

setEnableJavascript
void setEnableJavascript(bool enabled)

Set the #WebKitSettings:enable-javascript property.

setEnableJavascriptMarkup
void setEnableJavascriptMarkup(bool enabled)

Set the #WebKitSettings:enable-javascript-markup property.

setEnableMedia
void setEnableMedia(bool enabled)

Set the #WebKitSettings:enable-media property.

setEnableMediaCapabilities
void setEnableMediaCapabilities(bool enabled)

Set the #WebKitSettings:enable-media-capabilities property.

setEnableMediaStream
void setEnableMediaStream(bool enabled)

Set the #WebKitSettings:enable-media-stream property.

setEnableMediasource
void setEnableMediasource(bool enabled)

Set the #WebKitSettings:enable-mediasource property.

setEnableMockCaptureDevices
void setEnableMockCaptureDevices(bool enabled)

Set the #WebKitSettings:enable-mock-capture-devices property.

setEnableOfflineWebApplicationCache
void setEnableOfflineWebApplicationCache(bool enabled)

Set the #WebKitSettings:enable-offline-web-application-cache property.

setEnablePageCache
void setEnablePageCache(bool enabled)

Set the #WebKitSettings:enable-page-cache property.

setEnablePlugins
void setEnablePlugins(bool enabled)

Set the #WebKitSettings:enable-plugins property.

setEnablePrivateBrowsing
void setEnablePrivateBrowsing(bool enabled)

Set the #WebKitSettings:enable-private-browsing property.

setEnableResizableTextAreas
void setEnableResizableTextAreas(bool enabled)

Set the #WebKitSettings:enable-resizable-text-areas property.

setEnableSiteSpecificQuirks
void setEnableSiteSpecificQuirks(bool enabled)

Set the #WebKitSettings:enable-site-specific-quirks property.

setEnableSmoothScrolling
void setEnableSmoothScrolling(bool enabled)

Set the #WebKitSettings:enable-smooth-scrolling property.

setEnableSpatialNavigation
void setEnableSpatialNavigation(bool enabled)

Set the #WebKitSettings:enable-spatial-navigation property.

setEnableTabsToLinks
void setEnableTabsToLinks(bool enabled)

Set the #WebKitSettings:enable-tabs-to-links property.

setEnableWebaudio
void setEnableWebaudio(bool enabled)

Set the #WebKitSettings:enable-webaudio property.

setEnableWebgl
void setEnableWebgl(bool enabled)

Set the #WebKitSettings:enable-webgl property.

setEnableWriteConsoleMessagesToStdout
void setEnableWriteConsoleMessagesToStdout(bool enabled)

Set the #WebKitSettings:enable-write-console-messages-to-stdout property.

setEnableXssAuditor
void setEnableXssAuditor(bool enabled)

Set the #WebKitSettings:enable-xss-auditor property.

setFantasyFontFamily
void setFantasyFontFamily(string fantasyFontFamily)

Set the #WebKitSettings:fantasy-font-family property.

setHardwareAccelerationPolicy
void setHardwareAccelerationPolicy(WebKitHardwareAccelerationPolicy policy)

Set the #WebKitSettings:hardware-acceleration-policy property.

setJavascriptCanAccessClipboard
void setJavascriptCanAccessClipboard(bool enabled)

Set the #WebKitSettings:javascript-can-access-clipboard property.

setJavascriptCanOpenWindowsAutomatically
void setJavascriptCanOpenWindowsAutomatically(bool enabled)

Set the #WebKitSettings:javascript-can-open-windows-automatically property.

setLoadIconsIgnoringImageLoadSetting
void setLoadIconsIgnoringImageLoadSetting(bool enabled)

Set the #WebKitSettings:load-icons-ignoring-image-load-setting property.

setMediaContentTypesRequiringHardwareSupport
void setMediaContentTypesRequiringHardwareSupport(string contentTypes)

Set the #WebKitSettings:media-content-types-requiring-hardware-support property.

setMediaPlaybackAllowsInline
void setMediaPlaybackAllowsInline(bool enabled)

Set the #WebKitSettings:media-playback-allows-inline property.

setMediaPlaybackRequiresUserGesture
void setMediaPlaybackRequiresUserGesture(bool enabled)

Set the #WebKitSettings:media-playback-requires-user-gesture property.

setMinimumFontSize
void setMinimumFontSize(uint fontSize)

Set the #WebKitSettings:minimum-font-size property.

setMonospaceFontFamily
void setMonospaceFontFamily(string monospaceFontFamily)

Set the #WebKitSettings:monospace-font-family property.

setPictographFontFamily
void setPictographFontFamily(string pictographFontFamily)

Set the #WebKitSettings:pictograph-font-family property.

setPrintBackgrounds
void setPrintBackgrounds(bool printBackgrounds)

Set the #WebKitSettings:print-backgrounds property.

setSansSerifFontFamily
void setSansSerifFontFamily(string sansSerifFontFamily)

Set the #WebKitSettings:sans-serif-font-family property.

setSerifFontFamily
void setSerifFontFamily(string serifFontFamily)

Set the #WebKitSettings:serif-font-family property.

setUserAgent
void setUserAgent(string userAgent)

Set the #WebKitSettings:user-agent property.

setUserAgentWithApplicationDetails
void setUserAgentWithApplicationDetails(string applicationName, string applicationVersion)

Set the #WebKitSettings:user-agent property by appending the application details to the default user agent. If no application name or version is given, the default user agent used will be used. If only the version is given, the default engine version is used with the given application name.

setZoomTextOnly
void setZoomTextOnly(bool zoomTextOnly)

Set the #WebKitSettings:zoom-text-only property.

Static functions

fontSizeToPixels
uint fontSizeToPixels(uint points)

Convert @points to the equivalent value in pixels, based on the current screen DPI. Applications can use this function to convert font size values in points to font size values in pixels when setting the font size properties of #WebKitSettings.

fontSizeToPoints
uint fontSizeToPoints(uint pixels)

Convert @pixels to the equivalent value in points, based on the current screen DPI. Applications can use this function to convert font size values in pixels to font size values in points when getting the font size properties of #WebKitSettings.

getType
GType getType()

Variables

webKitSettings
WebKitSettings* webKitSettings;

the main Gtk struct

Meta