Settings

Control the behaviour of a #WebKitWebView.

#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.

// Disable JavaScript
WebKitSettings *settings = webkit_web_view_group_get_settings (my_view_group);
webkit_settings_set_enable_javascript (settings, FALSE);
class Settings : ObjectG {}

Constructors

this
this(void* ptr, Flag!"Take" take)
this
this()

Creates a new #WebKitSettings instance with default values.

Members

Functions

applyFromKeyFile
bool applyFromKeyFile(glib.key_file.KeyFile keyFile, string groupName)

Reads the contents of the given group_name from the given key_file and apply the value of each key/value to the corresponding property on the settings.

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()

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

getDefaultFontSize
uint getDefaultFontSize()

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

getDefaultMonospaceFontSize
uint getDefaultMonospaceFontSize()

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

getDisableWebSecurity
bool getDisableWebSecurity()

Get the #WebKitSettings:disable-web-security property.

getDrawCompositingIndicators
bool getDrawCompositingIndicators()

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

getEnable2dCanvasAcceleration
bool getEnable2dCanvasAcceleration()

Get the #WebKitSettings:enable-2d-canvas-acceleration 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.

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.

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.

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.

getEnableWebrtc
bool getEnableWebrtc()

Get the propertySettings:enable-webrtc property.

getEnableWriteConsoleMessagesToStdout
bool getEnableWriteConsoleMessagesToStdout()

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

getFantasyFontFamily
string getFantasyFontFamily()

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

getFeatureEnabled
bool getFeatureEnabled(webkit.feature.Feature feature)

Gets whether a feature is enabled.

getHardwareAccelerationPolicy
webkit.types.HardwareAccelerationPolicy 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()

Setting no longer supported. This function returns false.

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.

getUserAgent
string getUserAgent()

Get the #WebKitSettings:user-agent property.

getWebrtcUdpPortsRange
string getWebrtcUdpPortsRange()

Get the propertySettings:webrtc-udp-ports-range property.

getZoomTextOnly
bool getZoomTextOnly()

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

self
Settings self()

Returns this, for use in with statements.

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.

setDisableWebSecurity
void setDisableWebSecurity(bool disabled)

Set the #WebKitSettings:disable-web-security property.

setDrawCompositingIndicators
void setDrawCompositingIndicators(bool enabled)

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

setEnable2dCanvasAcceleration
void setEnable2dCanvasAcceleration(bool enabled)

Set the #WebKitSettings:enable-2d-canvas-acceleration 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.

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.

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)

Setting no longer supported. This function does nothing.

setEnablePageCache
void setEnablePageCache(bool enabled)

Set the #WebKitSettings:enable-page-cache 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.

setEnableWebrtc
void setEnableWebrtc(bool enabled)

Set the propertySettings:enable-webrtc property.

setEnableWriteConsoleMessagesToStdout
void setEnableWriteConsoleMessagesToStdout(bool enabled)

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

setFantasyFontFamily
void setFantasyFontFamily(string fantasyFontFamily)

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

setFeatureEnabled
void setFeatureEnabled(webkit.feature.Feature feature, bool enabled)

Enables or disables a feature.

setHardwareAccelerationPolicy
void setHardwareAccelerationPolicy(webkit.types.HardwareAccelerationPolicy 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)

Setting no longer supported. This function does nothing.

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.

setWebrtcUdpPortsRange
void setWebrtcUdpPortsRange(string udpPortRange)

Set the propertySettings:webrtc-udp-ports-range property.

setZoomTextOnly
void setZoomTextOnly(bool zoomTextOnly)

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

Properties

gType
GType gType [@property getter]

Static functions

fontSizeToPixels
uint fontSizeToPixels(uint points)

Convert points to the equivalent value in pixels.

fontSizeToPoints
uint fontSizeToPoints(uint pixels)

Convert pixels to the equivalent value in points.

getAllFeatures
webkit.feature_list.FeatureList getAllFeatures()

Gets the list of all available WebKit features.

getDevelopmentFeatures
webkit.feature_list.FeatureList getDevelopmentFeatures()

Gets the list of available development WebKit features.

getExperimentalFeatures
webkit.feature_list.FeatureList getExperimentalFeatures()

Gets the list of available experimental WebKit features.

getGType
GType getGType()

Inherited Members

From ObjectG

setGObject
void setGObject(void* cObj, Flag!"Take" take)

Set the GObject of a D ObjectG wrapper.

cPtr
void* cPtr(Flag!"Dup" dup)

Get a pointer to the underlying C object.

ref_
void* ref_(void* gObj)

Calls g_object_ref() on a GObject.

unref
unref(void* gObj)

Calls g_object_unref() on a GObject.

getType
GType getType()

Get the GType of an object.

gType
GType gType [@property getter]

GObject GType property.

self
ObjectG self()

Convenience method to return this cast to a type. For use in D with statements.

getDObject
T getDObject(void* cptr, Flag!"Take" take)

Template to get the D object from a C GObject and cast it to the given D object type.

connectSignalClosure
ulong connectSignalClosure(string signalDetail, DClosure closure, Flag!"After" after)

Connect a D closure to an object signal.

setProperty
void setProperty(string propertyName, T val)

Template for setting a GObject property.

getProperty
T getProperty(string propertyName)

Template for getting a GObject property.

compatControl
size_t compatControl(size_t what, void* data)
bindProperty
gobject.binding.Binding bindProperty(string sourceProperty, gobject.object.ObjectG target, string targetProperty, gobject.types.BindingFlags flags)

Creates a binding between source_property on source and target_property on target.

bindPropertyFull
gobject.binding.Binding bindPropertyFull(string sourceProperty, gobject.object.ObjectG target, string targetProperty, gobject.types.BindingFlags flags, gobject.closure.Closure transformTo, gobject.closure.Closure transformFrom)

Creates a binding between source_property on source and target_property on target, allowing you to set the transformation functions to be used by the binding.

forceFloating
void forceFloating()

This function is intended for #GObject implementations to re-enforce a floating[floating-ref] object reference. Doing this is seldom required: all #GInitiallyUnowneds are created with a floating reference which usually just needs to be sunken by calling gobject.object.ObjectG.refSink.

freezeNotify
void freezeNotify()

Increases the freeze count on object. If the freeze count is non-zero, the emission of "notify" signals on object is stopped. The signals are queued until the freeze count is decreased to zero. Duplicate notifications are squashed so that at most one #GObject::notify signal is emitted for each property modified while the object is frozen.

getData
void* getData(string key)

Gets a named field from the objects table of associations (see gobject.object.ObjectG.setData).

getProperty
void getProperty(string propertyName, gobject.value.Value value)

Gets a property of an object.

getQdata
void* getQdata(glib.types.Quark quark)

This function gets back user data pointers stored via gobject.object.ObjectG.setQdata.

getv
void getv(string[] names, gobject.value.Value[] values)

Gets n_properties properties for an object. Obtained properties will be set to values. All properties must be valid. Warnings will be emitted and undefined behaviour may result if invalid properties are passed in.

isFloating
bool isFloating()

Checks whether object has a floating[floating-ref] reference.

notify
void notify(string propertyName)

Emits a "notify" signal for the property property_name on object.

notifyByPspec
void notifyByPspec(gobject.param_spec.ParamSpec pspec)

Emits a "notify" signal for the property specified by pspec on object.

refSink
gobject.object.ObjectG refSink()

Increase the reference count of object, and possibly remove the floating[floating-ref] reference, if object has a floating reference.

runDispose
void runDispose()

Releases all references to other objects. This can be used to break reference cycles.

setData
void setData(string key, void* data)

Each object carries around a table of associations from strings to pointers. This function lets you set an association.

setProperty
void setProperty(string propertyName, gobject.value.Value value)

Sets a property on an object.

stealData
void* stealData(string key)

Remove a specified datum from the object's data associations, without invoking the association's destroy handler.

stealQdata
void* stealQdata(glib.types.Quark quark)

This function gets back user data pointers stored via gobject.object.ObjectG.setQdata and removes the data from object without invoking its destroy() function (if any was set). Usually, calling this function is only required to update user data pointers with a destroy notifier, for example:

thawNotify
void thawNotify()

Reverts the effect of a previous call to gobject.object.ObjectG.freezeNotify. The freeze count is decreased on object and when it reaches zero, queued "notify" signals are emitted.

watchClosure
void watchClosure(gobject.closure.Closure closure)

This function essentially limits the life time of the closure to the life time of the object. That is, when the object is finalized, the closure is invalidated by calling gobject.closure.Closure.invalidate on it, in order to prevent invocations of the closure with a finalized (nonexisting) object. Also, gobject.object.ObjectG.ref_ and gobject.object.ObjectG.unref are added as marshal guards to the closure, to ensure that an extra reference count is held on object during invocation of the closure. Usually, this function will be called on closures that use this object as closure data.

connectNotify
ulong connectNotify(string detail, T callback, Flag!"After" after)

Connect to Notify signal.