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
Modifier and TypeClassDescriptionstatic class
Settings.Builder<B extends Settings.Builder<B>>
Inner class implementing a builder pattern to construct a GObject with properties.static class
Nested classes/interfaces inherited from class org.gnome.gobject.GObject
GObject.NotifyCallback, GObject.ObjectClass
-
Constructor Summary
ConstructorDescriptionSettings()
Creates a newWebKitSettings
instance with default values.Settings
(MemorySegment address) Create a Settings proxy instance for the provided memory address. -
Method Summary
Modifier and TypeMethodDescriptionboolean
applyFromKeyFile
(KeyFile keyFile, String groupName) Reads the contents of the givengroupName
from the givenkeyFile
and apply the value of each key/value to the corresponding property on the this Settings.protected Settings
asParent()
Returns this instance as if it were its parent type.static Settings.Builder
<? extends Settings.Builder> builder()
ASettings.Builder
object constructs aSettings
with the specified properties.static int
fontSizeToPixels
(int points) Convertpoints
to the equivalent value in pixels.static int
fontSizeToPoints
(int pixels) Convertpixels
to the equivalent value in points.static FeatureList
Gets the list of all available WebKit features.boolean
Get theWebKitSettings
:allow-file-access-from-file-urls property.boolean
Get theWebKitSettings
:allow-modal-dialogs property.boolean
Get theWebKitSettings
:allow-top-navigation-to-data-urls property.boolean
Get theWebKitSettings
:allow-universal-access-from-file-urls property.boolean
Get theWebKitSettings
:auto-load-images property.Gets theWebKitSettings
:cursive-font-family property.Gets theWebKitSettings
:default-charset property.Gets theWebKitSettings
:default-font-family property.int
Gets theWebKitSettings
:default-font-size property.int
Gets theWebKitSettings
:default-monospace-font-size property.static FeatureList
Gets the list of available development WebKit features.boolean
Get theWebKitSettings
:disable-web-security property.boolean
Get theWebKitSettings
:draw-compositing-indicators property.boolean
Get theWebKitSettings
:enable-2d-canvas-acceleration property.boolean
Get theWebKitSettings
:enable-back-forward-navigation-gestures property.boolean
Get theWebKitSettings
:enable-caret-browsing property.boolean
Get theWebKitSettings
:enable-developer-extras property.boolean
Get theWebKitSettings
:enable-dns-prefetching property.boolean
Get theWebKitSettings
:enable-encrypted-media property.boolean
Get theWebKitSettings
:enable-fullscreen property.boolean
Get theWebKitSettings
:enable-html5-database property.boolean
Get theWebKitSettings
:enable-html5-local-storage property.boolean
Get theWebKitSettings
:enable-hyperlink-auditing property.boolean
Get theWebKitSettings
:enable-javascript property.boolean
Get theWebKitSettings
:enable-javascript-markup property.boolean
Get theWebKitSettings
:enable-media property.boolean
Get theWebKitSettings
:enable-media-capabilities property.boolean
Get theWebKitSettings
:enable-mediasource property.boolean
Get theWebKitSettings
:enable-media-stream property.boolean
Get theWebKitSettings
:enable-mock-capture-devices property.boolean
Deprecated.boolean
Get theWebKitSettings
:enable-page-cache property.boolean
Get theWebKitSettings
:enable-resizable-text-areas property.boolean
Get theWebKitSettings
:enable-site-specific-quirks property.boolean
Get theWebKitSettings
:enable-smooth-scrolling property.boolean
Get theWebKitSettings
:enable-spatial-navigation property.boolean
Get theWebKitSettings
:enable-tabs-to-links property.boolean
Get theWebKitSettings
:enable-webaudio property.boolean
Get theWebKitSettings
:enable-webgl property.boolean
Get theSettings:enable-webrtc
property.boolean
Get theWebKitSettings
:enable-write-console-messages-to-stdout property.static FeatureList
Gets the list of available experimental WebKit features.Gets theWebKitSettings
:fantasy-font-family property.boolean
getFeatureEnabled
(Feature feature) Gets whether a feature is enabled.Get theWebKitSettings
:hardware-acceleration-policy property.boolean
Get theWebKitSettings
:javascript-can-access-clipboard property.boolean
Get theWebKitSettings
:javascript-can-open-windows-automatically property.boolean
Deprecated.Gets theWebKitSettings
:media-content-types-requiring-hardware-support property.boolean
Get theWebKitSettings
:media-playback-allows-inline property.boolean
Get theWebKitSettings
:media-playback-requires-user-gesture property.int
Gets theWebKitSettings
:minimum-font-size property.Gets theWebKitSettings
:monospace-font-family property.Gets theWebKitSettings
:pictograph-font-family property.boolean
Get theWebKitSettings
:print-backgrounds property.Gets theWebKitSettings
:sans-serif-font-family property.Gets theWebKitSettings
:serif-font-family property.static Type
getType()
Get the GType of the Settings classGet theWebKitSettings
:user-agent property.boolean
Get theWebKitSettings
:zoom-text-only property.void
setAllowFileAccessFromFileUrls
(boolean allowed) Set theWebKitSettings
:allow-file-access-from-file-urls property.void
setAllowModalDialogs
(boolean allowed) Set theWebKitSettings
:allow-modal-dialogs property.void
setAllowTopNavigationToDataUrls
(boolean allowed) Set theWebKitSettings
:allow-top-navigation-to-data-urls property.void
setAllowUniversalAccessFromFileUrls
(boolean allowed) Set theWebKitSettings
:allow-universal-access-from-file-urls property.void
setAutoLoadImages
(boolean enabled) Set theWebKitSettings
:auto-load-images property.void
setCursiveFontFamily
(String cursiveFontFamily) Set theWebKitSettings
:cursive-font-family property.void
setDefaultCharset
(String defaultCharset) Set theWebKitSettings
:default-charset property.void
setDefaultFontFamily
(String defaultFontFamily) Set theWebKitSettings
:default-font-family property.void
setDefaultFontSize
(int fontSize) Set theWebKitSettings
:default-font-size property.void
setDefaultMonospaceFontSize
(int fontSize) Set theWebKitSettings
:default-monospace-font-size property.void
setDisableWebSecurity
(boolean disabled) Set theWebKitSettings
:disable-web-security property.void
setDrawCompositingIndicators
(boolean enabled) Set theWebKitSettings
:draw-compositing-indicators property.void
setEnable2dCanvasAcceleration
(boolean enabled) Set theWebKitSettings
:enable-2d-canvas-acceleration property.void
setEnableBackForwardNavigationGestures
(boolean enabled) Set theWebKitSettings
:enable-back-forward-navigation-gestures property.void
setEnableCaretBrowsing
(boolean enabled) Set theWebKitSettings
:enable-caret-browsing property.void
setEnableDeveloperExtras
(boolean enabled) Set theWebKitSettings
:enable-developer-extras property.void
setEnableDnsPrefetching
(boolean enabled) Set theWebKitSettings
:enable-dns-prefetching property.void
setEnableEncryptedMedia
(boolean enabled) Set theWebKitSettings
:enable-encrypted-media property.void
setEnableFullscreen
(boolean enabled) Set theWebKitSettings
:enable-fullscreen property.void
setEnableHtml5Database
(boolean enabled) Set theWebKitSettings
:enable-html5-database property.void
setEnableHtml5LocalStorage
(boolean enabled) Set theWebKitSettings
:enable-html5-local-storage property.void
setEnableHyperlinkAuditing
(boolean enabled) Set theWebKitSettings
:enable-hyperlink-auditing property.void
setEnableJavascript
(boolean enabled) Set theWebKitSettings
:enable-javascript property.void
setEnableJavascriptMarkup
(boolean enabled) Set theWebKitSettings
:enable-javascript-markup property.void
setEnableMedia
(boolean enabled) Set theWebKitSettings
:enable-media property.void
setEnableMediaCapabilities
(boolean enabled) Set theWebKitSettings
:enable-media-capabilities property.void
setEnableMediasource
(boolean enabled) Set theWebKitSettings
:enable-mediasource property.void
setEnableMediaStream
(boolean enabled) Set theWebKitSettings
:enable-media-stream property.void
setEnableMockCaptureDevices
(boolean enabled) Set theWebKitSettings
:enable-mock-capture-devices property.void
setEnableOfflineWebApplicationCache
(boolean enabled) Deprecated.void
setEnablePageCache
(boolean enabled) Set theWebKitSettings
:enable-page-cache property.void
setEnableResizableTextAreas
(boolean enabled) Set theWebKitSettings
:enable-resizable-text-areas property.void
setEnableSiteSpecificQuirks
(boolean enabled) Set theWebKitSettings
:enable-site-specific-quirks property.void
setEnableSmoothScrolling
(boolean enabled) Set theWebKitSettings
:enable-smooth-scrolling property.void
setEnableSpatialNavigation
(boolean enabled) Set theWebKitSettings
:enable-spatial-navigation property.void
setEnableTabsToLinks
(boolean enabled) Set theWebKitSettings
:enable-tabs-to-links property.void
setEnableWebaudio
(boolean enabled) Set theWebKitSettings
:enable-webaudio property.void
setEnableWebgl
(boolean enabled) Set theWebKitSettings
:enable-webgl property.void
setEnableWebrtc
(boolean enabled) Set theSettings:enable-webrtc
property.void
setEnableWriteConsoleMessagesToStdout
(boolean enabled) Set theWebKitSettings
:enable-write-console-messages-to-stdout property.void
setFantasyFontFamily
(String fantasyFontFamily) Set theWebKitSettings
:fantasy-font-family property.void
setFeatureEnabled
(Feature feature, boolean enabled) Enables or disables a feature.void
Set theWebKitSettings
:hardware-acceleration-policy property.void
setJavascriptCanAccessClipboard
(boolean enabled) Set theWebKitSettings
:javascript-can-access-clipboard property.void
setJavascriptCanOpenWindowsAutomatically
(boolean enabled) Set theWebKitSettings
:javascript-can-open-windows-automatically property.void
setLoadIconsIgnoringImageLoadSetting
(boolean enabled) Deprecated.void
setMediaContentTypesRequiringHardwareSupport
(@Nullable String contentTypes) Set theWebKitSettings
:media-content-types-requiring-hardware-support property.void
setMediaPlaybackAllowsInline
(boolean enabled) Set theWebKitSettings
:media-playback-allows-inline property.void
setMediaPlaybackRequiresUserGesture
(boolean enabled) Set theWebKitSettings
:media-playback-requires-user-gesture property.void
setMinimumFontSize
(int fontSize) Set theWebKitSettings
:minimum-font-size property.void
setMonospaceFontFamily
(String monospaceFontFamily) Set theWebKitSettings
:monospace-font-family property.void
setPictographFontFamily
(String pictographFontFamily) Set theWebKitSettings
:pictograph-font-family property.void
setPrintBackgrounds
(boolean printBackgrounds) Set theWebKitSettings
:print-backgrounds property.void
setSansSerifFontFamily
(String sansSerifFontFamily) Set theWebKitSettings
:sans-serif-font-family property.void
setSerifFontFamily
(String serifFontFamily) Set theWebKitSettings
:serif-font-family property.void
setUserAgent
(@Nullable String userAgent) Set theWebKitSettings
:user-agent property.void
setUserAgentWithApplicationDetails
(@Nullable String applicationName, @Nullable String applicationVersion) Set theWebKitSettings
:user-agent property by appending the application details.void
setZoomTextOnly
(boolean zoomTextOnly) Set theWebKitSettings
:zoom-text-only property.static Settings
withSettings
(String firstSettingName, Object... varargs) Creates a newWebKitSettings
instance 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, 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, withProperties
Methods inherited from class org.gnome.gobject.TypeInstance
callParent, callParent, getPrivate, readGClass, writeGClass
Methods inherited from class io.github.jwharm.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
Creates a newWebKitSettings
instance with default values.It must be manually attached to a
WebKitWebView
. See also webkit_settings_new_with_settings().- Throws:
UnsupportedPlatformException
- when run on a platform other than linux
-
-
Method Details
-
getType
-
asParent
Returns this instance as if it were its parent type. This is mostly synonymous to the Javasuper
keyword, 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 newWebKitSettings
instance 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
WebKitSettings
instance. - Throws:
UnsupportedPlatformException
- when run on a platform other than linux
-
fontSizeToPixels
Convertpoints
to the equivalent value in pixels.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 ofWebKitSettings
.- Parameters:
points
- the font size in points to convert to pixels- Returns:
- the equivalent font size in pixels.
- Throws:
UnsupportedPlatformException
- when run on a platform other than linux
-
fontSizeToPoints
Convertpixels
to the equivalent value in points.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 ofWebKitSettings
.- Parameters:
pixels
- the font size in pixels to convert to points- Returns:
- the equivalent font size in points.
- Throws:
UnsupportedPlatformException
- when run on a platform other than linux
-
getAllFeatures
Gets the list of all available WebKit features.Features can be toggled with
setFeatureEnabled(org.gnome.webkit.Feature, boolean)
, and their current state determined withgetFeatureEnabled(org.gnome.webkit.Feature)
.Note that most applications should use
getDevelopmentFeatures()
andgetExperimentalFeatures()
instead.- Returns:
- List of all features.
- Throws:
UnsupportedPlatformException
- when run on a platform other than linux
-
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; seeFeatureStatus
for more details.- Returns:
- List of development features.
- Throws:
UnsupportedPlatformException
- when run on a platform other than linux
-
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; seeFeatureStatus
for more details.- Returns:
- List of experimental features.
- Throws:
UnsupportedPlatformException
- when run on a platform other than linux
-
applyFromKeyFile
Reads the contents of the givengroupName
from the givenkeyFile
and apply the value of each key/value to the corresponding property on the this Settings.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
- aGKeyFile
groupName
- Name of the group to read fromkeyFile
- Returns:
true
if the settings were correctly applied orfalse
on error.- Throws:
GErrorException
- seeGError
-
getAllowFileAccessFromFileUrls
public boolean getAllowFileAccessFromFileUrls()Get theWebKitSettings
:allow-file-access-from-file-urls property.- Returns:
true
If file access from file URLs is allowed orfalse
otherwise.
-
getAllowModalDialogs
public boolean getAllowModalDialogs()Get theWebKitSettings
:allow-modal-dialogs property.- Returns:
true
if it's allowed to create and run modal dialogs orfalse
otherwise.
-
getAllowUniversalAccessFromFileUrls
public boolean getAllowUniversalAccessFromFileUrls()Get theWebKitSettings
:allow-universal-access-from-file-urls property.- Returns:
true
If universal access from file URLs is allowed orfalse
otherwise.
-
getAutoLoadImages
public boolean getAutoLoadImages()Get theWebKitSettings
:auto-load-images property.- Returns:
true
If auto loading of images is enabled orfalse
otherwise.
-
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:
true
If web security support is disabled orfalse
otherwise.
-
getDrawCompositingIndicators
public boolean getDrawCompositingIndicators()Get theWebKitSettings
:draw-compositing-indicators property.- Returns:
true
If compositing borders are drawn orfalse
otherwise.
-
getEnable2dCanvasAcceleration
public boolean getEnable2dCanvasAcceleration()Get theWebKitSettings
:enable-2d-canvas-acceleration property.- Returns:
true
if 2D canvas acceleration is enabled orfalse
otherwise.
-
getEnableCaretBrowsing
public boolean getEnableCaretBrowsing()Get theWebKitSettings
:enable-caret-browsing property.- Returns:
true
If caret browsing is enabled orfalse
otherwise.
-
getEnableDeveloperExtras
public boolean getEnableDeveloperExtras()Get theWebKitSettings
:enable-developer-extras property.- Returns:
true
If developer extras is enabled orfalse
otherwise.
-
getEnableDnsPrefetching
public boolean getEnableDnsPrefetching()Get theWebKitSettings
:enable-dns-prefetching property.- Returns:
true
If DNS prefetching is enabled orfalse
otherwise.
-
getEnableEncryptedMedia
public boolean getEnableEncryptedMedia()Get theWebKitSettings
:enable-encrypted-media property.- Returns:
true
if EncryptedMedia support is enabled orfalse
otherwise.
-
getEnableFullscreen
public boolean getEnableFullscreen()Get theWebKitSettings
:enable-fullscreen property.- Returns:
true
If fullscreen support is enabled orfalse
otherwise.
-
getEnableHtml5Database
public boolean getEnableHtml5Database()Get theWebKitSettings
:enable-html5-database property.- Returns:
true
if IndexedDB support is enabled orfalse
otherwise.
-
getEnableHtml5LocalStorage
public boolean getEnableHtml5LocalStorage()Get theWebKitSettings
:enable-html5-local-storage property.- Returns:
true
If HTML5 local storage support is enabled orfalse
otherwise.
-
getEnableHyperlinkAuditing
public boolean getEnableHyperlinkAuditing()Get theWebKitSettings
:enable-hyperlink-auditing property.- Returns:
true
If hyper link auditing is enabled orfalse
otherwise.
-
getEnableJavascript
public boolean getEnableJavascript()Get theWebKitSettings
:enable-javascript property.- Returns:
true
If JavaScript is enabled orfalse
otherwise.
-
getEnableJavascriptMarkup
public boolean getEnableJavascriptMarkup()Get theWebKitSettings
:enable-javascript-markup property.- Returns:
true
if JavaScript markup is enabled orfalse
otherwise.
-
getEnableMedia
public boolean getEnableMedia()Get theWebKitSettings
:enable-media property.- Returns:
true
if media support is enabled orfalse
otherwise.
-
getEnableMediaCapabilities
public boolean getEnableMediaCapabilities()Get theWebKitSettings
:enable-media-capabilities property.- Returns:
true
if MediaCapabilities support is enabled orfalse
otherwise.
-
getEnableMediaStream
public boolean getEnableMediaStream()Get theWebKitSettings
:enable-media-stream property.- Returns:
true
If mediastream support is enabled orfalse
otherwise.
-
getEnableMediasource
public boolean getEnableMediasource()Get theWebKitSettings
:enable-mediasource property.- Returns:
true
If MediaSource support is enabled orfalse
otherwise.
-
getEnableMockCaptureDevices
public boolean getEnableMockCaptureDevices()Get theWebKitSettings
:enable-mock-capture-devices property.- Returns:
true
If mock capture devices is enabled orfalse
otherwise.
-
getEnableOfflineWebApplicationCache
Deprecated.Get theWebKitSettings
:enable-offline-web-application-cache property.- Returns:
false
.
-
getEnablePageCache
public boolean getEnablePageCache()Get theWebKitSettings
:enable-page-cache property.- Returns:
true
if page cache enabled orfalse
otherwise.
-
getEnableResizableTextAreas
public boolean getEnableResizableTextAreas()Get theWebKitSettings
:enable-resizable-text-areas property.- Returns:
true
If text areas can be resized orfalse
otherwise.
-
getEnableSiteSpecificQuirks
public boolean getEnableSiteSpecificQuirks()Get theWebKitSettings
:enable-site-specific-quirks property.- Returns:
true
if site specific quirks are enabled orfalse
otherwise.
-
getEnableSmoothScrolling
public boolean getEnableSmoothScrolling()Get theWebKitSettings
:enable-smooth-scrolling property.- Returns:
true
if smooth scrolling is enabled orfalse
otherwise.
-
getEnableTabsToLinks
public boolean getEnableTabsToLinks()Get theWebKitSettings
:enable-tabs-to-links property.- Returns:
true
If tabs to link is enabled orfalse
otherwise.
-
getEnableWebaudio
public boolean getEnableWebaudio()Get theWebKitSettings
:enable-webaudio property.- Returns:
true
If webaudio support is enabled orfalse
otherwise.
-
getEnableWebgl
public boolean getEnableWebgl()Get theWebKitSettings
:enable-webgl property.- Returns:
true
If WebGL support is enabled orfalse
otherwise.
-
getEnableWebrtc
public boolean getEnableWebrtc()Get theSettings:enable-webrtc
property.- Returns:
true
If WebRTC support is enabled orfalse
otherwise.
-
getEnableWriteConsoleMessagesToStdout
public boolean getEnableWriteConsoleMessagesToStdout()Get theWebKitSettings
:enable-write-console-messages-to-stdout property.- Returns:
true
if writing console messages to stdout is enabled orfalse
otherwise.
-
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.
-
getHardwareAccelerationPolicy
Get theWebKitSettings
:hardware-acceleration-policy property.- Returns:
- a
WebKitHardwareAccelerationPolicy
-
getJavascriptCanAccessClipboard
public boolean getJavascriptCanAccessClipboard()Get theWebKitSettings
:javascript-can-access-clipboard property.- Returns:
true
If javascript-can-access-clipboard is enabled orfalse
otherwise.
-
getJavascriptCanOpenWindowsAutomatically
public boolean getJavascriptCanOpenWindowsAutomatically()Get theWebKitSettings
:javascript-can-open-windows-automatically property.- Returns:
true
If JavaScript can open window automatically orfalse
otherwise.
-
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
.
-
getMediaPlaybackAllowsInline
public boolean getMediaPlaybackAllowsInline()Get theWebKitSettings
:media-playback-allows-inline property.- Returns:
true
If inline playback is allowed for media orfalse
if only fullscreen playback is allowed.
-
getMediaPlaybackRequiresUserGesture
public boolean getMediaPlaybackRequiresUserGesture()Get theWebKitSettings
:media-playback-requires-user-gesture property.- Returns:
true
If an user gesture is needed to play or load media orfalse
if 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:
true
If background images should be printed orfalse
otherwise.
-
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.
-
getZoomTextOnly
public boolean getZoomTextOnly()Get theWebKitSettings
:zoom-text-only property.- Returns:
true
If zoom level of the view should only affect the text orfalse
if 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
-
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
-
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
-
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
-
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
public void setEnableDnsPrefetching(boolean enabled) 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
-
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
public void setEnableHyperlinkAuditing(boolean enabled) 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
-
setEnableMedia
public void setEnableMedia(boolean enabled) Set theWebKitSettings
:enable-media property.- Parameters:
enabled
- Value to be set
-
setEnableMediaCapabilities
public void setEnableMediaCapabilities(boolean enabled) Set theWebKitSettings
:enable-media-capabilities property.- Parameters:
enabled
- Value to be set
-
setEnableMediaStream
public void setEnableMediaStream(boolean enabled) Set theWebKitSettings
:enable-media-stream property.- Parameters:
enabled
- Value to be set
-
setEnableMediasource
public void setEnableMediasource(boolean enabled) Set theWebKitSettings
:enable-mediasource property.- Parameters:
enabled
- Value to be set
-
setEnableMockCaptureDevices
public void setEnableMockCaptureDevices(boolean enabled) Set theWebKitSettings
:enable-mock-capture-devices property.- Parameters:
enabled
- Value to be set
-
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-webrtc
property.Setting this property to
true
implies the media-stream web-setting will also be enabled.- Parameters:
enabled
- Value to be set
-
setEnableWriteConsoleMessagesToStdout
public void setEnableWriteConsoleMessagesToStdout(boolean enabled) Set theWebKitSettings
:enable-write-console-messages-to-stdout property.- Parameters:
enabled
- Value to be set
-
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.gnome.webkit.Feature)
. To reset a feature to its initial status, pass the value returned byFeature.getDefaultValue()
as theenabled
parameter.- Parameters:
feature
- the feature to toggle.enabled
- whether the feature will be enabled.
-
setHardwareAccelerationPolicy
Set theWebKitSettings
:hardware-acceleration-policy property.- Parameters:
policy
- aWebKitHardwareAccelerationPolicy
-
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 (:) ornull
to use the default value.
-
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 ornull
to use the default user agent
-
setUserAgentWithApplicationDetails
public void setUserAgentWithApplicationDetails(@Nullable @Nullable String applicationName, @Nullable @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 ornull
to use the default user agent.applicationVersion
- The application version for the user agent ornull
to user the default version.
-
setZoomTextOnly
public void setZoomTextOnly(boolean zoomTextOnly) Set theWebKitSettings
:zoom-text-only property.- Parameters:
zoomTextOnly
- Value to be set
-
builder
ASettings.Builder
object constructs aSettings
with the specified properties. Use the variousset...()
methods to set properties, and finish construction withSettings.Builder.build()
.
-