Class Settings
- All Implemented Interfaces:
Proxy
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);
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classSettings.Builder<B extends Settings.Builder<B>>Inner class implementing a builder pattern to construct a GObject with properties.static classNested classes/interfaces inherited from class org.gnome.gobject.GObject
GObject.NotifyCallback, GObject.ObjectClass -
Constructor Summary
ConstructorsConstructorDescriptionSettings()Creates a new Settings.Settings(MemorySegment address) Create a Settings proxy instance for the provided memory address. -
Method Summary
Modifier and TypeMethodDescriptionbooleanapplyFromKeyFile(KeyFile keyFile, String groupName) Reads the contents of the givengroupNamefrom the givenkeyFileand apply the value of each key/value to the corresponding property on thesettings.protected SettingsasParent()Returns this instance as if it were its parent type.static Settings.Builder<? extends Settings.Builder> builder()ASettings.Builderobject constructs aSettingswith the specified properties.static intfontSizeToPixels(int points) Convertpointsto the equivalent value in pixels.static intfontSizeToPoints(int pixels) Convertpixelsto the equivalent value in points.static FeatureListGets the list of all available WebKit features.booleanGet theWebKitSettings:allow-file-access-from-file-urls property.booleanGet theWebKitSettings:allow-modal-dialogs property.booleanGet theWebKitSettings:allow-top-navigation-to-data-urls property.booleanGet theWebKitSettings:allow-universal-access-from-file-urls property.booleanGet theWebKitSettings:auto-load-images property.Gets theWebKitSettings:cursive-font-family property.Gets theWebKitSettings:default-charset property.Gets theWebKitSettings:default-font-family property.intGets theWebKitSettings:default-font-size property.intGets theWebKitSettings:default-monospace-font-size property.static FeatureListGets the list of available development WebKit features.booleanGet theWebKitSettings:disable-web-security property.booleanGet theWebKitSettings:draw-compositing-indicators property.booleanGet theWebKitSettings:enable-2d-canvas-acceleration property.booleanGet theWebKitSettings:enable-back-forward-navigation-gestures property.booleanGet theWebKitSettings:enable-caret-browsing property.booleanGet theWebKitSettings:enable-developer-extras property.booleanDeprecated.booleanGet theWebKitSettings:enable-encrypted-media property.booleanGet theWebKitSettings:enable-fullscreen property.booleanGet theWebKitSettings:enable-html5-database property.booleanGet theWebKitSettings:enable-html5-local-storage property.booleanDeprecated.booleanGet theWebKitSettings:enable-javascript property.booleanGet theWebKitSettings:enable-javascript-markup property.booleanGet theWebKitSettings:enable-media property.booleanGet theWebKitSettings:enable-media-capabilities property.booleanGet theWebKitSettings:enable-mediasource property.booleanGet theWebKitSettings:enable-media-stream property.booleanGet theWebKitSettings:enable-mock-capture-devices property.booleanDeprecated.booleanGet theWebKitSettings:enable-page-cache property.booleanGet theWebKitSettings:enable-resizable-text-areas property.booleanGet theWebKitSettings:enable-site-specific-quirks property.booleanGet theWebKitSettings:enable-smooth-scrolling property.booleanGet theWebKitSettings:enable-spatial-navigation property.booleanGet theWebKitSettings:enable-tabs-to-links property.booleanGet theWebKitSettings:enable-webaudio property.booleanGet theWebKitSettings:enable-webgl property.booleanGet theSettings:enable-webrtcproperty.booleanGet theWebKitSettings:enable-write-console-messages-to-stdout property.static FeatureListGets the list of available experimental WebKit features.Gets theWebKitSettings:fantasy-font-family property.booleangetFeatureEnabled(Feature feature) Gets whether a feature is enabled.Get theWebKitSettings:hardware-acceleration-policy property.booleanGet theWebKitSettings:javascript-can-access-clipboard property.booleanGet theWebKitSettings:javascript-can-open-windows-automatically property.booleanDeprecated.Gets theWebKitSettings:media-content-types-requiring-hardware-support property.booleanGet theWebKitSettings:media-playback-allows-inline property.booleanGet theWebKitSettings:media-playback-requires-user-gesture property.intGets theWebKitSettings:minimum-font-size property.Gets theWebKitSettings:monospace-font-family property.Gets theWebKitSettings:pictograph-font-family property.booleanGet theWebKitSettings:print-backgrounds property.Gets theWebKitSettings:sans-serif-font-family property.Gets theWebKitSettings:serif-font-family property.static @Nullable TypegetType()Get the GType of the Settings classGet theWebKitSettings:user-agent property.Get theSettings:webrtc-udp-ports-rangeproperty.booleanGet theWebKitSettings:zoom-text-only property.voidsetAllowFileAccessFromFileUrls(boolean allowed) Set theWebKitSettings:allow-file-access-from-file-urls property.voidsetAllowModalDialogs(boolean allowed) Set theWebKitSettings:allow-modal-dialogs property.voidsetAllowTopNavigationToDataUrls(boolean allowed) Set theWebKitSettings:allow-top-navigation-to-data-urls property.voidsetAllowUniversalAccessFromFileUrls(boolean allowed) Set theWebKitSettings:allow-universal-access-from-file-urls property.voidsetAutoLoadImages(boolean enabled) Set theWebKitSettings:auto-load-images property.voidsetCursiveFontFamily(String cursiveFontFamily) Set theWebKitSettings:cursive-font-family property.voidsetDefaultCharset(String defaultCharset) Set theWebKitSettings:default-charset property.voidsetDefaultFontFamily(String defaultFontFamily) Set theWebKitSettings:default-font-family property.voidsetDefaultFontSize(int fontSize) Set theWebKitSettings:default-font-size property.voidsetDefaultMonospaceFontSize(int fontSize) Set theWebKitSettings:default-monospace-font-size property.voidsetDisableWebSecurity(boolean disabled) Set theWebKitSettings:disable-web-security property.voidsetDrawCompositingIndicators(boolean enabled) Set theWebKitSettings:draw-compositing-indicators property.voidsetEnable2dCanvasAcceleration(boolean enabled) Set theWebKitSettings:enable-2d-canvas-acceleration property.voidsetEnableBackForwardNavigationGestures(boolean enabled) Set theWebKitSettings:enable-back-forward-navigation-gestures property.voidsetEnableCaretBrowsing(boolean enabled) Set theWebKitSettings:enable-caret-browsing property.voidsetEnableDeveloperExtras(boolean enabled) Set theWebKitSettings:enable-developer-extras property.voidsetEnableDnsPrefetching(boolean enabled) Deprecated.voidsetEnableEncryptedMedia(boolean enabled) Set theWebKitSettings:enable-encrypted-media property.voidsetEnableFullscreen(boolean enabled) Set theWebKitSettings:enable-fullscreen property.voidsetEnableHtml5Database(boolean enabled) Set theWebKitSettings:enable-html5-database property.voidsetEnableHtml5LocalStorage(boolean enabled) Set theWebKitSettings:enable-html5-local-storage property.voidsetEnableHyperlinkAuditing(boolean enabled) Deprecated.voidsetEnableJavascript(boolean enabled) Set theWebKitSettings:enable-javascript property.voidsetEnableJavascriptMarkup(boolean enabled) Set theWebKitSettings:enable-javascript-markup property.voidsetEnableMedia(boolean enabled) Set theWebKitSettings:enable-media property.voidsetEnableMediaCapabilities(boolean enabled) Set theWebKitSettings:enable-media-capabilities property.voidsetEnableMediasource(boolean enabled) Set theWebKitSettings:enable-mediasource property.voidsetEnableMediaStream(boolean enabled) Set theWebKitSettings:enable-media-stream property.voidsetEnableMockCaptureDevices(boolean enabled) Set theWebKitSettings:enable-mock-capture-devices property.voidsetEnableOfflineWebApplicationCache(boolean enabled) Deprecated.voidsetEnablePageCache(boolean enabled) Set theWebKitSettings:enable-page-cache property.voidsetEnableResizableTextAreas(boolean enabled) Set theWebKitSettings:enable-resizable-text-areas property.voidsetEnableSiteSpecificQuirks(boolean enabled) Set theWebKitSettings:enable-site-specific-quirks property.voidsetEnableSmoothScrolling(boolean enabled) Set theWebKitSettings:enable-smooth-scrolling property.voidsetEnableSpatialNavigation(boolean enabled) Set theWebKitSettings:enable-spatial-navigation property.voidsetEnableTabsToLinks(boolean enabled) Set theWebKitSettings:enable-tabs-to-links property.voidsetEnableWebaudio(boolean enabled) Set theWebKitSettings:enable-webaudio property.voidsetEnableWebgl(boolean enabled) Set theWebKitSettings:enable-webgl property.voidsetEnableWebrtc(boolean enabled) Set theSettings:enable-webrtcproperty.voidsetEnableWriteConsoleMessagesToStdout(boolean enabled) Set theWebKitSettings:enable-write-console-messages-to-stdout property.voidsetFantasyFontFamily(String fantasyFontFamily) Set theWebKitSettings:fantasy-font-family property.voidsetFeatureEnabled(Feature feature, boolean enabled) Enables or disables a feature.voidSet theWebKitSettings:hardware-acceleration-policy property.voidsetJavascriptCanAccessClipboard(boolean enabled) Set theWebKitSettings:javascript-can-access-clipboard property.voidsetJavascriptCanOpenWindowsAutomatically(boolean enabled) Set theWebKitSettings:javascript-can-open-windows-automatically property.voidsetLoadIconsIgnoringImageLoadSetting(boolean enabled) Deprecated.voidsetMediaContentTypesRequiringHardwareSupport(@Nullable String contentTypes) Set theWebKitSettings:media-content-types-requiring-hardware-support property.voidsetMediaPlaybackAllowsInline(boolean enabled) Set theWebKitSettings:media-playback-allows-inline property.voidsetMediaPlaybackRequiresUserGesture(boolean enabled) Set theWebKitSettings:media-playback-requires-user-gesture property.voidsetMinimumFontSize(int fontSize) Set theWebKitSettings:minimum-font-size property.voidsetMonospaceFontFamily(String monospaceFontFamily) Set theWebKitSettings:monospace-font-family property.voidsetPictographFontFamily(String pictographFontFamily) Set theWebKitSettings:pictograph-font-family property.voidsetPrintBackgrounds(boolean printBackgrounds) Set theWebKitSettings:print-backgrounds property.voidsetSansSerifFontFamily(String sansSerifFontFamily) Set theWebKitSettings:sans-serif-font-family property.voidsetSerifFontFamily(String serifFontFamily) Set theWebKitSettings:serif-font-family property.voidsetUserAgent(@Nullable String userAgent) Set theWebKitSettings:user-agent property.voidsetUserAgentWithApplicationDetails(@Nullable String applicationName, @Nullable String applicationVersion) Set theWebKitSettings:user-agent property by appending the application details.voidsetWebrtcUdpPortsRange(String udpPortRange) Set theSettings:webrtc-udp-ports-rangeproperty.voidsetZoomTextOnly(boolean zoomTextOnly) Set theWebKitSettings:zoom-text-only property.static SettingswithSettings(String firstSettingName, Object... varargs) Creates a newWebKitSettingsinstance with the given settings.Methods inherited from class org.gnome.gobject.GObject
addToggleRef, addWeakPointer, bindProperty, bindProperty, bindProperty, bindPropertyFull, bindPropertyFull, bindPropertyWithClosures, bindPropertyWithClosures, compatControl, connect, connect, connect, constructed, disconnect, dispatchPropertiesChanged, dispose, dupData, dupQdata, emit, emitNotify, finalize_, forceFloating, freezeNotify, get, getData, getMemoryLayout, getProperty, getProperty, getProperty, getQdata, getv, interfaceFindProperty, interfaceInstallProperty, interfaceListProperties, isFloating, newInstance, newInstance, newv, notify, notify, notifyByPspec, onNotify, ref, refSink, removeToggleRef, removeWeakPointer, replaceData, replaceQdata, runDispose, set, setData, setDataFull, setProperty, setProperty, setProperty, setQdata, setQdataFull, setv, stealData, stealQdata, takeRef, thawNotify, unref, watchClosure, weakRef, weakUnref, withPropertiesMethods inherited from class org.gnome.gobject.TypeInstance
callParent, callParent, cast, getPrivate, readGClass, writeGClassMethods inherited from class org.javagi.base.ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
Settings
Create a Settings proxy instance for the provided memory address.- Parameters:
address- the memory address of the native object
-
Settings
public Settings()Creates a new Settings.
-
-
Method Details
-
getType
-
asParent
Returns this instance as if it were its parent type. This is mostly synonymous to the Javasuperkeyword, but will set the native typeclass function pointers to the parent type. When overriding a native virtual method in Java, "chaining up" withsuper.methodName()doesn't work, because it invokes the overridden function pointer again. To chain up, callasParent().methodName(). This will call the native function pointer of this virtual method in the typeclass of the parent type. -
withSettings
Creates a newWebKitSettingsinstance with the given settings.It must be manually attached to a
WebKitWebView.- Parameters:
firstSettingName- name of first setting to setvarargs- value of first setting, followed by more settings,null-terminated- Returns:
- a new
WebKitSettingsinstance.
-
fontSizeToPixels
public static int fontSizeToPixels(int points) Convertpointsto the equivalent value in pixels.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.- Parameters:
points- the font size in points to convert to pixels- Returns:
- the equivalent font size in pixels.
- Since:
- 2.20
-
fontSizeToPoints
public static int fontSizeToPoints(int pixels) Convertpixelsto the equivalent value in points.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.- Parameters:
pixels- the font size in pixels to convert to points- Returns:
- the equivalent font size in points.
- Since:
- 2.20
-
getAllFeatures
Gets the list of all available WebKit features.Features can be toggled with
setFeatureEnabled(org.webkitgtk.Feature, boolean), and their current state determined withgetFeatureEnabled(org.webkitgtk.Feature).Note that most applications should use
getDevelopmentFeatures()andgetExperimentalFeatures()instead.- Returns:
- List of all features.
- Since:
- 2.42
-
getDevelopmentFeatures
Gets the list of available development WebKit features.The returned features are a subset of those returned by
getAllFeatures(), and includes those which web and WebKit developers might find useful, but in general should not be exposed to end users; seeFeatureStatusfor more details.- Returns:
- List of development features.
- Since:
- 2.42
-
getExperimentalFeatures
Gets the list of available experimental WebKit features.The returned features are a subset of those returned by
getAllFeatures(), and includes those which certain applications may want to expose to end users; seeFeatureStatusfor more details.- Returns:
- List of experimental features.
- Since:
- 2.42
-
applyFromKeyFile
Reads the contents of the givengroupNamefrom the givenkeyFileand apply the value of each key/value to the corresponding property on thesettings.Value types have to match with the corresponding setting property type and the group keys have to match existing setting property names. If those conditions are not met, the function will return
false.Supported value types are strings (unquoted), booleans (0, 1, true, false) and unsigned integers.
- Parameters:
keyFile- aGKeyFilegroupName- Name of the group to read fromkeyFile- Returns:
trueif the settings were correctly applied orfalseon error.- Throws:
GErrorException- seeGError- Since:
- 2.46
-
getAllowFileAccessFromFileUrls
public boolean getAllowFileAccessFromFileUrls()Get theWebKitSettings:allow-file-access-from-file-urls property.- Returns:
trueIf file access from file URLs is allowed orfalseotherwise.- Since:
- 2.10
-
getAllowModalDialogs
public boolean getAllowModalDialogs()Get theWebKitSettings:allow-modal-dialogs property.- Returns:
trueif it's allowed to create and run modal dialogs orfalseotherwise.
-
getAllowUniversalAccessFromFileUrls
public boolean getAllowUniversalAccessFromFileUrls()Get theWebKitSettings:allow-universal-access-from-file-urls property.- Returns:
trueIf universal access from file URLs is allowed orfalseotherwise.- Since:
- 2.14
-
getAutoLoadImages
public boolean getAutoLoadImages()Get theWebKitSettings:auto-load-images property.- Returns:
trueIf auto loading of images is enabled orfalseotherwise.
-
getCursiveFontFamily
Gets theWebKitSettings:cursive-font-family property.- Returns:
- The default font family used to display content marked with cursive font.
-
getDefaultCharset
Gets theWebKitSettings:default-charset property.- Returns:
- Default charset.
-
getDefaultFontFamily
Gets theWebKitSettings:default-font-family property.- Returns:
- The default font family used to display content that does not specify a font.
-
getDefaultFontSize
public int getDefaultFontSize()Gets theWebKitSettings:default-font-size property.- Returns:
- The default font size, in pixels.
-
getDefaultMonospaceFontSize
public int getDefaultMonospaceFontSize()Gets theWebKitSettings:default-monospace-font-size property.- Returns:
- Default monospace font size, in pixels.
-
getDisableWebSecurity
public boolean getDisableWebSecurity()Get theWebKitSettings:disable-web-security property.- Returns:
trueIf web security support is disabled orfalseotherwise.- Since:
- 2.40
-
getDrawCompositingIndicators
public boolean getDrawCompositingIndicators()Get theWebKitSettings:draw-compositing-indicators property.- Returns:
trueIf compositing borders are drawn orfalseotherwise.
-
getEnable2dCanvasAcceleration
public boolean getEnable2dCanvasAcceleration()Get theWebKitSettings:enable-2d-canvas-acceleration property.- Returns:
trueif 2D canvas acceleration is enabled orfalseotherwise.- Since:
- 2.46
-
getEnableCaretBrowsing
public boolean getEnableCaretBrowsing()Get theWebKitSettings:enable-caret-browsing property.- Returns:
trueIf caret browsing is enabled orfalseotherwise.
-
getEnableDeveloperExtras
public boolean getEnableDeveloperExtras()Get theWebKitSettings:enable-developer-extras property.- Returns:
trueIf developer extras is enabled orfalseotherwise.
-
getEnableDnsPrefetching
Deprecated.Get theWebKitSettings:enable-dns-prefetching property.- Returns:
trueIf DNS prefetching is enabled orfalseotherwise.
-
getEnableEncryptedMedia
public boolean getEnableEncryptedMedia()Get theWebKitSettings:enable-encrypted-media property.- Returns:
trueif EncryptedMedia support is enabled orfalseotherwise.- Since:
- 2.20
-
getEnableFullscreen
public boolean getEnableFullscreen()Get theWebKitSettings:enable-fullscreen property.- Returns:
trueIf fullscreen support is enabled orfalseotherwise.
-
getEnableHtml5Database
public boolean getEnableHtml5Database()Get theWebKitSettings:enable-html5-database property.- Returns:
trueif IndexedDB support is enabled orfalseotherwise.
-
getEnableHtml5LocalStorage
public boolean getEnableHtml5LocalStorage()Get theWebKitSettings:enable-html5-local-storage property.- Returns:
trueIf HTML5 local storage support is enabled orfalseotherwise.
-
getEnableHyperlinkAuditing
Deprecated.Get theWebKitSettings:enable-hyperlink-auditing property.- Returns:
trueIf hyper link auditing is enabled orfalseotherwise.
-
getEnableJavascript
public boolean getEnableJavascript()Get theWebKitSettings:enable-javascript property.- Returns:
trueIf JavaScript is enabled orfalseotherwise.
-
getEnableJavascriptMarkup
public boolean getEnableJavascriptMarkup()Get theWebKitSettings:enable-javascript-markup property.- Returns:
trueif JavaScript markup is enabled orfalseotherwise.- Since:
- 2.24
-
getEnableMedia
public boolean getEnableMedia()Get theWebKitSettings:enable-media property.- Returns:
trueif media support is enabled orfalseotherwise.- Since:
- 2.26
-
getEnableMediaCapabilities
public boolean getEnableMediaCapabilities()Get theWebKitSettings:enable-media-capabilities property.- Returns:
trueif MediaCapabilities support is enabled orfalseotherwise.- Since:
- 2.22
-
getEnableMediaStream
public boolean getEnableMediaStream()Get theWebKitSettings:enable-media-stream property.- Returns:
trueIf mediastream support is enabled orfalseotherwise.- Since:
- 2.4
-
getEnableMediasource
public boolean getEnableMediasource()Get theWebKitSettings:enable-mediasource property.- Returns:
trueIf MediaSource support is enabled orfalseotherwise.- Since:
- 2.4
-
getEnableMockCaptureDevices
public boolean getEnableMockCaptureDevices()Get theWebKitSettings:enable-mock-capture-devices property.- Returns:
trueIf mock capture devices is enabled orfalseotherwise.- Since:
- 2.24
-
getEnableOfflineWebApplicationCache
Deprecated.Get theWebKitSettings:enable-offline-web-application-cache property.- Returns:
false.
-
getEnablePageCache
public boolean getEnablePageCache()Get theWebKitSettings:enable-page-cache property.- Returns:
trueif page cache enabled orfalseotherwise.
-
getEnableResizableTextAreas
public boolean getEnableResizableTextAreas()Get theWebKitSettings:enable-resizable-text-areas property.- Returns:
trueIf text areas can be resized orfalseotherwise.
-
getEnableSiteSpecificQuirks
public boolean getEnableSiteSpecificQuirks()Get theWebKitSettings:enable-site-specific-quirks property.- Returns:
trueif site specific quirks are enabled orfalseotherwise.
-
getEnableSmoothScrolling
public boolean getEnableSmoothScrolling()Get theWebKitSettings:enable-smooth-scrolling property.- Returns:
trueif smooth scrolling is enabled orfalseotherwise.
-
getEnableTabsToLinks
public boolean getEnableTabsToLinks()Get theWebKitSettings:enable-tabs-to-links property.- Returns:
trueIf tabs to link is enabled orfalseotherwise.
-
getEnableWebaudio
public boolean getEnableWebaudio()Get theWebKitSettings:enable-webaudio property.- Returns:
trueIf webaudio support is enabled orfalseotherwise.
-
getEnableWebgl
public boolean getEnableWebgl()Get theWebKitSettings:enable-webgl property.- Returns:
trueIf WebGL support is enabled orfalseotherwise.
-
getEnableWebrtc
public boolean getEnableWebrtc()Get theSettings:enable-webrtcproperty.- Returns:
trueIf WebRTC support is enabled orfalseotherwise.- Since:
- 2.38
-
getEnableWriteConsoleMessagesToStdout
public boolean getEnableWriteConsoleMessagesToStdout()Get theWebKitSettings:enable-write-console-messages-to-stdout property.- Returns:
trueif writing console messages to stdout is enabled orfalseotherwise.- Since:
- 2.2
-
getFantasyFontFamily
Gets theWebKitSettings:fantasy-font-family property.- Returns:
- The default font family used to display content marked with fantasy font.
-
getFeatureEnabled
Gets whether a feature is enabled.- Parameters:
feature- the feature to toggle.- Returns:
- Whether the feature is enabled.
- Since:
- 2.42
-
getHardwareAccelerationPolicy
Get theWebKitSettings:hardware-acceleration-policy property.- Returns:
- a
WebKitHardwareAccelerationPolicy - Since:
- 2.16
-
getJavascriptCanAccessClipboard
public boolean getJavascriptCanAccessClipboard()Get theWebKitSettings:javascript-can-access-clipboard property.- Returns:
trueIf javascript-can-access-clipboard is enabled orfalseotherwise.
-
getJavascriptCanOpenWindowsAutomatically
public boolean getJavascriptCanOpenWindowsAutomatically()Get theWebKitSettings:javascript-can-open-windows-automatically property.- Returns:
trueIf JavaScript can open window automatically orfalseotherwise.
-
getLoadIconsIgnoringImageLoadSetting
Deprecated.Setting no longer supported. This function returnsfalse.- Returns:
false
-
getMediaContentTypesRequiringHardwareSupport
Gets theWebKitSettings:media-content-types-requiring-hardware-support property.- Returns:
- Media content types requiring hardware support, or
null. - Since:
- 2.30
-
getMediaPlaybackAllowsInline
public boolean getMediaPlaybackAllowsInline()Get theWebKitSettings:media-playback-allows-inline property.- Returns:
trueIf inline playback is allowed for media orfalseif only fullscreen playback is allowed.
-
getMediaPlaybackRequiresUserGesture
public boolean getMediaPlaybackRequiresUserGesture()Get theWebKitSettings:media-playback-requires-user-gesture property.- Returns:
trueIf an user gesture is needed to play or load media orfalseif no user gesture is needed.
-
getMinimumFontSize
public int getMinimumFontSize()Gets theWebKitSettings:minimum-font-size property.- Returns:
- Minimum font size, in pixels.
-
getMonospaceFontFamily
Gets theWebKitSettings:monospace-font-family property.- Returns:
- Default font family used to display content marked with monospace font.
-
getPictographFontFamily
Gets theWebKitSettings:pictograph-font-family property.- Returns:
- The default font family used to display content marked with pictograph font.
-
getPrintBackgrounds
public boolean getPrintBackgrounds()Get theWebKitSettings:print-backgrounds property.- Returns:
trueIf background images should be printed orfalseotherwise.
-
getSansSerifFontFamily
Gets theWebKitSettings:sans-serif-font-family property.- Returns:
- The default font family used to display content marked with sans-serif font.
-
getSerifFontFamily
Gets theWebKitSettings:serif-font-family property.- Returns:
- The default font family used to display content marked with serif font.
-
getUserAgent
Get theWebKitSettings:user-agent property.- Returns:
- The current value of the user-agent property.
-
getWebrtcUdpPortsRange
Get theSettings:webrtc-udp-ports-rangeproperty.- Returns:
- The WebRTC UDP ports range, or
nullif un-set. - Since:
- 2.48
-
getZoomTextOnly
public boolean getZoomTextOnly()Get theWebKitSettings:zoom-text-only property.- Returns:
trueIf zoom level of the view should only affect the text orfalseif all view contents should be scaled.
-
setAllowFileAccessFromFileUrls
public void setAllowFileAccessFromFileUrls(boolean allowed) Set theWebKitSettings:allow-file-access-from-file-urls property.- Parameters:
allowed- Value to be set- Since:
- 2.10
-
setAllowModalDialogs
public void setAllowModalDialogs(boolean allowed) Set theWebKitSettings:allow-modal-dialogs property.- Parameters:
allowed- Value to be set
-
setAllowUniversalAccessFromFileUrls
public void setAllowUniversalAccessFromFileUrls(boolean allowed) Set theWebKitSettings:allow-universal-access-from-file-urls property.- Parameters:
allowed- Value to be set- Since:
- 2.14
-
setAutoLoadImages
public void setAutoLoadImages(boolean enabled) Set theWebKitSettings:auto-load-images property.- Parameters:
enabled- Value to be set
-
setCursiveFontFamily
Set theWebKitSettings:cursive-font-family property.- Parameters:
cursiveFontFamily- the new default cursive font family
-
setDefaultCharset
Set theWebKitSettings:default-charset property.- Parameters:
defaultCharset- default charset to be set
-
setDefaultFontFamily
Set theWebKitSettings:default-font-family property.- Parameters:
defaultFontFamily- the new default font family
-
setDefaultFontSize
public void setDefaultFontSize(int fontSize) Set theWebKitSettings:default-font-size property.- Parameters:
fontSize- default font size to be set in pixels
-
setDefaultMonospaceFontSize
public void setDefaultMonospaceFontSize(int fontSize) Set theWebKitSettings:default-monospace-font-size property.- Parameters:
fontSize- default monospace font size to be set in pixels
-
setDisableWebSecurity
public void setDisableWebSecurity(boolean disabled) Set theWebKitSettings:disable-web-security property.- Parameters:
disabled- Value to be set- Since:
- 2.40
-
setDrawCompositingIndicators
public void setDrawCompositingIndicators(boolean enabled) Set theWebKitSettings:draw-compositing-indicators property.- Parameters:
enabled- Value to be set
-
setEnable2dCanvasAcceleration
public void setEnable2dCanvasAcceleration(boolean enabled) Set theWebKitSettings:enable-2d-canvas-acceleration property.- Parameters:
enabled- Value to be set- Since:
- 2.46
-
setEnableCaretBrowsing
public void setEnableCaretBrowsing(boolean enabled) Set theWebKitSettings:enable-caret-browsing property.- Parameters:
enabled- Value to be set
-
setEnableDeveloperExtras
public void setEnableDeveloperExtras(boolean enabled) Set theWebKitSettings:enable-developer-extras property.- Parameters:
enabled- Value to be set
-
setEnableDnsPrefetching
Deprecated.Set theWebKitSettings:enable-dns-prefetching property.- Parameters:
enabled- Value to be set
-
setEnableEncryptedMedia
public void setEnableEncryptedMedia(boolean enabled) Set theWebKitSettings:enable-encrypted-media property.- Parameters:
enabled- Value to be set- Since:
- 2.20
-
setEnableFullscreen
public void setEnableFullscreen(boolean enabled) Set theWebKitSettings:enable-fullscreen property.- Parameters:
enabled- Value to be set
-
setEnableHtml5Database
public void setEnableHtml5Database(boolean enabled) Set theWebKitSettings:enable-html5-database property.- Parameters:
enabled- Value to be set
-
setEnableHtml5LocalStorage
public void setEnableHtml5LocalStorage(boolean enabled) Set theWebKitSettings:enable-html5-local-storage property.- Parameters:
enabled- Value to be set
-
setEnableHyperlinkAuditing
Deprecated.Set theWebKitSettings:enable-hyperlink-auditing property.- Parameters:
enabled- Value to be set
-
setEnableJavascript
public void setEnableJavascript(boolean enabled) Set theWebKitSettings:enable-javascript property.- Parameters:
enabled- Value to be set
-
setEnableJavascriptMarkup
public void setEnableJavascriptMarkup(boolean enabled) Set theWebKitSettings:enable-javascript-markup property.- Parameters:
enabled- Value to be set- Since:
- 2.24
-
setEnableMedia
public void setEnableMedia(boolean enabled) Set theWebKitSettings:enable-media property.- Parameters:
enabled- Value to be set- Since:
- 2.26
-
setEnableMediaCapabilities
public void setEnableMediaCapabilities(boolean enabled) Set theWebKitSettings:enable-media-capabilities property.- Parameters:
enabled- Value to be set- Since:
- 2.22
-
setEnableMediaStream
public void setEnableMediaStream(boolean enabled) Set theWebKitSettings:enable-media-stream property.- Parameters:
enabled- Value to be set- Since:
- 2.4
-
setEnableMediasource
public void setEnableMediasource(boolean enabled) Set theWebKitSettings:enable-mediasource property.- Parameters:
enabled- Value to be set- Since:
- 2.4
-
setEnableMockCaptureDevices
public void setEnableMockCaptureDevices(boolean enabled) Set theWebKitSettings:enable-mock-capture-devices property.- Parameters:
enabled- Value to be set- Since:
- 2.4
-
setEnableOfflineWebApplicationCache
Deprecated.Setting no longer supported. This function does nothing.- Parameters:
enabled- Value to be set
-
setEnablePageCache
public void setEnablePageCache(boolean enabled) Set theWebKitSettings:enable-page-cache property.- Parameters:
enabled- Value to be set
-
setEnableResizableTextAreas
public void setEnableResizableTextAreas(boolean enabled) Set theWebKitSettings:enable-resizable-text-areas property.- Parameters:
enabled- Value to be set
-
setEnableSiteSpecificQuirks
public void setEnableSiteSpecificQuirks(boolean enabled) Set theWebKitSettings:enable-site-specific-quirks property.- Parameters:
enabled- Value to be set
-
setEnableSmoothScrolling
public void setEnableSmoothScrolling(boolean enabled) Set theWebKitSettings:enable-smooth-scrolling property.- Parameters:
enabled- Value to be set
-
setEnableTabsToLinks
public void setEnableTabsToLinks(boolean enabled) Set theWebKitSettings:enable-tabs-to-links property.- Parameters:
enabled- Value to be set
-
setEnableWebaudio
public void setEnableWebaudio(boolean enabled) Set theWebKitSettings:enable-webaudio property.- Parameters:
enabled- Value to be set
-
setEnableWebgl
public void setEnableWebgl(boolean enabled) Set theWebKitSettings:enable-webgl property.- Parameters:
enabled- Value to be set
-
setEnableWebrtc
public void setEnableWebrtc(boolean enabled) Set theSettings:enable-webrtcproperty.Setting this property to
trueimplies the media-stream web-setting will also be enabled.- Parameters:
enabled- Value to be set- Since:
- 2.38
-
setEnableWriteConsoleMessagesToStdout
public void setEnableWriteConsoleMessagesToStdout(boolean enabled) Set theWebKitSettings:enable-write-console-messages-to-stdout property.- Parameters:
enabled- Value to be set- Since:
- 2.2
-
setFantasyFontFamily
Set theWebKitSettings:fantasy-font-family property.- Parameters:
fantasyFontFamily- the new default fantasy font family
-
setFeatureEnabled
Enables or disables a feature.The current status of the feature can be determined with
getFeatureEnabled(org.webkitgtk.Feature). To reset a feature to its initial status, pass the value returned byFeature.getDefaultValue()as theenabledparameter.- Parameters:
feature- the feature to toggle.enabled- whether the feature will be enabled.- Since:
- 2.42
-
setHardwareAccelerationPolicy
Set theWebKitSettings:hardware-acceleration-policy property.- Parameters:
policy- aWebKitHardwareAccelerationPolicy- Since:
- 2.16
-
setJavascriptCanAccessClipboard
public void setJavascriptCanAccessClipboard(boolean enabled) Set theWebKitSettings:javascript-can-access-clipboard property.- Parameters:
enabled- Value to be set
-
setJavascriptCanOpenWindowsAutomatically
public void setJavascriptCanOpenWindowsAutomatically(boolean enabled) Set theWebKitSettings:javascript-can-open-windows-automatically property.- Parameters:
enabled- Value to be set
-
setLoadIconsIgnoringImageLoadSetting
Deprecated.Setting no longer supported. This function does nothing.- Parameters:
enabled- Value to be set
-
setMediaContentTypesRequiringHardwareSupport
Set theWebKitSettings:media-content-types-requiring-hardware-support property.- Parameters:
contentTypes- list of media content types requiring hardware support split by semicolons (:) ornullto use the default value.- Since:
- 2.30
-
setMediaPlaybackAllowsInline
public void setMediaPlaybackAllowsInline(boolean enabled) Set theWebKitSettings:media-playback-allows-inline property.- Parameters:
enabled- Value to be set
-
setMediaPlaybackRequiresUserGesture
public void setMediaPlaybackRequiresUserGesture(boolean enabled) Set theWebKitSettings:media-playback-requires-user-gesture property.- Parameters:
enabled- Value to be set
-
setMinimumFontSize
public void setMinimumFontSize(int fontSize) Set theWebKitSettings:minimum-font-size property.- Parameters:
fontSize- minimum font size to be set in pixels
-
setMonospaceFontFamily
Set theWebKitSettings:monospace-font-family property.- Parameters:
monospaceFontFamily- the new default monospace font family
-
setPictographFontFamily
Set theWebKitSettings:pictograph-font-family property.- Parameters:
pictographFontFamily- the new default pictograph font family
-
setPrintBackgrounds
public void setPrintBackgrounds(boolean printBackgrounds) Set theWebKitSettings:print-backgrounds property.- Parameters:
printBackgrounds- Value to be set
-
setSansSerifFontFamily
Set theWebKitSettings:sans-serif-font-family property.- Parameters:
sansSerifFontFamily- the new default sans-serif font family
-
setSerifFontFamily
Set theWebKitSettings:serif-font-family property.- Parameters:
serifFontFamily- the new default serif font family
-
setUserAgent
Set theWebKitSettings:user-agent property.- Parameters:
userAgent- The new custom user agent string ornullto use the default user agent
-
setUserAgentWithApplicationDetails
public void setUserAgentWithApplicationDetails(@Nullable String applicationName, @Nullable String applicationVersion) Set theWebKitSettings:user-agent property by appending the application details.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.- Parameters:
applicationName- The application name used for the user agent ornullto use the default user agent.applicationVersion- The application version for the user agent ornullto user the default version.
-
setWebrtcUdpPortsRange
Set theSettings:webrtc-udp-ports-rangeproperty.- Parameters:
udpPortRange- Value to be set- Since:
- 2.48
-
setZoomTextOnly
public void setZoomTextOnly(boolean zoomTextOnly) Set theWebKitSettings:zoom-text-only property.- Parameters:
zoomTextOnly- Value to be set
-
builder
ASettings.Builderobject constructs aSettingswith the specified properties. Use the variousset...()methods to set properties, and finish construction withSettings.Builder.build().- Returns:
- the builder object
-