Class Settings

All Implemented Interfaces:
Proxy

@Generated("org.javagi.JavaGI") public final class Settings extends GObject

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);
  • Constructor Details

    • Settings

      public Settings(MemorySegment address)
      Create a Settings instance for the provided memory address.
      Parameters:
      address - the memory address of the native object
    • Settings

      public Settings()
      Create a new Settings.
  • Method Details

    • getType

      public static @Nullable Type getType()
      Get the GType of the Settings class.
      Returns:
      the GType
    • getMemoryLayout

      public static MemoryLayout getMemoryLayout()
      The memory layout of the native struct.
      Returns:
      the memory layout
    • asParent

      protected Settings asParent()
      Return this instance as if it were its parent type. Comparable to the Java super keyword, but ensures the parent typeclass is also used in native code.
      Overrides:
      asParent in class GObject
      Returns:
      the instance as if it were its parent type
    • withSettings

      public static Settings withSettings(String firstSettingName, Object... varargs)

      Creates a new WebKitSettings instance with the given settings.

      It must be manually attached to a WebKitWebView.

      Parameters:
      firstSettingName - name of first setting to set
      varargs - value of first setting, followed by more settings, null-terminated
      Returns:
      a new WebKitSettings instance.
    • fontSizeToPixels

      public static int fontSizeToPixels(int points)

      Convert points to 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)

      Convert pixels to 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

      public static FeatureList getAllFeatures()

      Gets the list of all available WebKit features.

      Features can be toggled with setFeatureEnabled(Feature, boolean), and their current state determined with getFeatureEnabled(Feature).

      Note that most applications should use getDevelopmentFeatures() and getExperimentalFeatures() instead.

      Returns:
      List of all features.
      Since:
      2.42
    • getDevelopmentFeatures

      public static FeatureList 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; see FeatureStatus for more details.

      Returns:
      List of development features.
      Since:
      2.42
    • getExperimentalFeatures

      public static FeatureList 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; see FeatureStatus for more details.

      Returns:
      List of experimental features.
      Since:
      2.42
    • applyFromKeyFile

      public boolean applyFromKeyFile(KeyFile keyFile, String groupName) throws GErrorException

      Reads the contents of the given groupName from the given keyFile and apply the value of each key/value to the corresponding property on the 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 - a GKeyFile
      groupName - Name of the group to read from keyFile
      Returns:
      true if the settings were correctly applied or false on error.
      Throws:
      GErrorException - see GError
      Since:
      2.46
    • getAllowFileAccessFromFileUrls

      public boolean getAllowFileAccessFromFileUrls()
      Get the WebKitSettings:allow-file-access-from-file-urls property.
      Returns:
      true If file access from file URLs is allowed or false otherwise.
      Since:
      2.10
    • getAllowModalDialogs

      public boolean getAllowModalDialogs()
      Get the WebKitSettings:allow-modal-dialogs property.
      Returns:
      true if it's allowed to create and run modal dialogs or false otherwise.
    • getAllowTopNavigationToDataUrls

      public boolean getAllowTopNavigationToDataUrls()
      Get the WebKitSettings:allow-top-navigation-to-data-urls property.
      Returns:
      true If navigation to data URLs from the top frame is allowed or false\ otherwise.
      Since:
      2.28
    • getAllowUniversalAccessFromFileUrls

      public boolean getAllowUniversalAccessFromFileUrls()
      Get the WebKitSettings:allow-universal-access-from-file-urls property.
      Returns:
      true If universal access from file URLs is allowed or false otherwise.
      Since:
      2.14
    • getAutoLoadImages

      public boolean getAutoLoadImages()
      Get the WebKitSettings:auto-load-images property.
      Returns:
      true If auto loading of images is enabled or false otherwise.
    • getCursiveFontFamily

      public String getCursiveFontFamily()
      Gets the WebKitSettings:cursive-font-family property.
      Returns:
      The default font family used to display content marked with cursive font.
    • getDefaultCharset

      public String getDefaultCharset()
      Gets the WebKitSettings:default-charset property.
      Returns:
      Default charset.
    • getDefaultFontFamily

      public String getDefaultFontFamily()
      Gets the WebKitSettings:default-font-family property.
      Returns:
      The default font family used to display content that does not specify a font.
    • getDefaultFontSize

      public int getDefaultFontSize()
      Gets the WebKitSettings:default-font-size property.
      Returns:
      The default font size, in pixels.
    • getDefaultMonospaceFontSize

      public int getDefaultMonospaceFontSize()
      Gets the WebKitSettings:default-monospace-font-size property.
      Returns:
      Default monospace font size, in pixels.
    • getDisableWebSecurity

      public boolean getDisableWebSecurity()
      Get the WebKitSettings:disable-web-security property.
      Returns:
      true If web security support is disabled or false otherwise.
      Since:
      2.40
    • getDrawCompositingIndicators

      public boolean getDrawCompositingIndicators()
      Get the WebKitSettings:draw-compositing-indicators property.
      Returns:
      true If compositing borders are drawn or false otherwise.
    • getEnable2dCanvasAcceleration

      public boolean getEnable2dCanvasAcceleration()
      Get the WebKitSettings:enable-2d-canvas-acceleration property.
      Returns:
      true if 2D canvas acceleration is enabled or false otherwise.
      Since:
      2.46
    • getEnableBackForwardNavigationGestures

      public boolean getEnableBackForwardNavigationGestures()
      Get the WebKitSettings:enable-back-forward-navigation-gestures property.
      Returns:
      true if horizontal swipe gesture will trigger back-forward navigaiton or false otherwise.
      Since:
      2.24
    • getEnableCaretBrowsing

      public boolean getEnableCaretBrowsing()
      Get the WebKitSettings:enable-caret-browsing property.
      Returns:
      true If caret browsing is enabled or false otherwise.
    • getEnableDeveloperExtras

      public boolean getEnableDeveloperExtras()
      Get the WebKitSettings:enable-developer-extras property.
      Returns:
      true If developer extras is enabled or false otherwise.
    • getEnableDnsPrefetching

      @Deprecated public boolean getEnableDnsPrefetching()
      Deprecated.
      Get the WebKitSettings:enable-dns-prefetching property.
      Returns:
      true If DNS prefetching is enabled or false otherwise.
    • getEnableEncryptedMedia

      public boolean getEnableEncryptedMedia()
      Get the WebKitSettings:enable-encrypted-media property.
      Returns:
      true if EncryptedMedia support is enabled or false otherwise.
      Since:
      2.20
    • getEnableFullscreen

      public boolean getEnableFullscreen()
      Get the WebKitSettings:enable-fullscreen property.
      Returns:
      true If fullscreen support is enabled or false otherwise.
    • getEnableHtml5Database

      public boolean getEnableHtml5Database()
      Get the WebKitSettings:enable-html5-database property.
      Returns:
      true if IndexedDB support is enabled or false otherwise.
    • getEnableHtml5LocalStorage

      public boolean getEnableHtml5LocalStorage()
      Get the WebKitSettings:enable-html5-local-storage property.
      Returns:
      true If HTML5 local storage support is enabled or false otherwise.
    • getEnableHyperlinkAuditing

      @Deprecated public boolean getEnableHyperlinkAuditing()
      Deprecated.
      Get the WebKitSettings:enable-hyperlink-auditing property.
      Returns:
      true If hyper link auditing is enabled or false otherwise.
    • getEnableJavascript

      public boolean getEnableJavascript()
      Get the WebKitSettings:enable-javascript property.
      Returns:
      true If JavaScript is enabled or false otherwise.
    • getEnableJavascriptMarkup

      public boolean getEnableJavascriptMarkup()
      Get the WebKitSettings:enable-javascript-markup property.
      Returns:
      true if JavaScript markup is enabled or false otherwise.
      Since:
      2.24
    • getEnableMedia

      public boolean getEnableMedia()
      Get the WebKitSettings:enable-media property.
      Returns:
      true if media support is enabled or false otherwise.
      Since:
      2.26
    • getEnableMediaCapabilities

      public boolean getEnableMediaCapabilities()
      Get the WebKitSettings:enable-media-capabilities property.
      Returns:
      true if MediaCapabilities support is enabled or false otherwise.
      Since:
      2.22
    • getEnableMediaStream

      public boolean getEnableMediaStream()
      Get the WebKitSettings:enable-media-stream property.
      Returns:
      true If mediastream support is enabled or false otherwise.
      Since:
      2.4
    • getEnableMediasource

      public boolean getEnableMediasource()
      Get the WebKitSettings:enable-mediasource property.
      Returns:
      true If MediaSource support is enabled or false otherwise.
      Since:
      2.4
    • getEnableMockCaptureDevices

      public boolean getEnableMockCaptureDevices()
      Get the WebKitSettings:enable-mock-capture-devices property.
      Returns:
      true If mock capture devices is enabled or false otherwise.
      Since:
      2.24
    • getEnableOfflineWebApplicationCache

      @Deprecated public boolean getEnableOfflineWebApplicationCache()
      Deprecated.
      Get the WebKitSettings:enable-offline-web-application-cache property.
      Returns:
      false.
    • getEnablePageCache

      public boolean getEnablePageCache()
      Get the WebKitSettings:enable-page-cache property.
      Returns:
      true if page cache enabled or false otherwise.
    • getEnableResizableTextAreas

      public boolean getEnableResizableTextAreas()
      Get the WebKitSettings:enable-resizable-text-areas property.
      Returns:
      true If text areas can be resized or false otherwise.
    • getEnableSiteSpecificQuirks

      public boolean getEnableSiteSpecificQuirks()
      Get the WebKitSettings:enable-site-specific-quirks property.
      Returns:
      true if site specific quirks are enabled or false otherwise.
    • getEnableSmoothScrolling

      public boolean getEnableSmoothScrolling()
      Get the WebKitSettings:enable-smooth-scrolling property.
      Returns:
      true if smooth scrolling is enabled or false otherwise.
    • getEnableSpatialNavigation

      public boolean getEnableSpatialNavigation()
      Get the WebKitSettings:enable-spatial-navigation property.
      Returns:
      true If HTML5 spatial navigation support is enabled or false otherwise.
      Since:
      2.2
    • getEnableTabsToLinks

      public boolean getEnableTabsToLinks()
      Get the WebKitSettings:enable-tabs-to-links property.
      Returns:
      true If tabs to link is enabled or false otherwise.
    • getEnableWebaudio

      public boolean getEnableWebaudio()
      Get the WebKitSettings:enable-webaudio property.
      Returns:
      true If webaudio support is enabled or false otherwise.
    • getEnableWebgl

      public boolean getEnableWebgl()
      Get the WebKitSettings:enable-webgl property.
      Returns:
      true If WebGL support is enabled or false otherwise.
    • getEnableWebrtc

      public boolean getEnableWebrtc()
      Get the Settings:enable-webrtc property.
      Returns:
      true If WebRTC support is enabled or false otherwise.
      Since:
      2.38
    • getEnableWriteConsoleMessagesToStdout

      public boolean getEnableWriteConsoleMessagesToStdout()
      Get the WebKitSettings:enable-write-console-messages-to-stdout property.
      Returns:
      true if writing console messages to stdout is enabled or false otherwise.
      Since:
      2.2
    • getFantasyFontFamily

      public String getFantasyFontFamily()
      Gets the WebKitSettings:fantasy-font-family property.
      Returns:
      The default font family used to display content marked with fantasy font.
    • getFeatureEnabled

      public boolean getFeatureEnabled(Feature feature)
      Gets whether a feature is enabled.
      Parameters:
      feature - the feature to toggle.
      Returns:
      Whether the feature is enabled.
      Since:
      2.42
    • getHardwareAccelerationPolicy

      public HardwareAccelerationPolicy getHardwareAccelerationPolicy()
      Get the WebKitSettings:hardware-acceleration-policy property.
      Returns:
      a WebKitHardwareAccelerationPolicy
      Since:
      2.16
    • getJavascriptCanAccessClipboard

      public boolean getJavascriptCanAccessClipboard()
      Get the WebKitSettings:javascript-can-access-clipboard property.
      Returns:
      true If javascript-can-access-clipboard is enabled or false otherwise.
    • getJavascriptCanOpenWindowsAutomatically

      public boolean getJavascriptCanOpenWindowsAutomatically()
      Get the WebKitSettings:javascript-can-open-windows-automatically property.
      Returns:
      true If JavaScript can open window automatically or false otherwise.
    • getLoadIconsIgnoringImageLoadSetting

      @Deprecated public boolean getLoadIconsIgnoringImageLoadSetting()
      Deprecated.
      Setting no longer supported. This function returns false.
      Returns:
      false
    • getMathFontFamily

      public @Nullable String getMathFontFamily()
      Gets the WebKitSettings:math-font-family property.
      Returns:

      The default font family used to display content marked with math font.

      Since 2.52

    • getMediaContentTypesRequiringHardwareSupport

      public String getMediaContentTypesRequiringHardwareSupport()
      Gets the WebKitSettings:media-content-types-requiring-hardware-support property.
      Returns:
      Media content types requiring hardware support, or null.
      Since:
      2.30
    • getMediaPlaybackAllowsInline

      public boolean getMediaPlaybackAllowsInline()
      Get the WebKitSettings:media-playback-allows-inline property.
      Returns:
      true If inline playback is allowed for media or false if only fullscreen playback is allowed.
    • getMediaPlaybackRequiresUserGesture

      public boolean getMediaPlaybackRequiresUserGesture()
      Get the WebKitSettings:media-playback-requires-user-gesture property.
      Returns:
      true If an user gesture is needed to play or load media or false if no user gesture is needed.
    • getMinimumFontSize

      public int getMinimumFontSize()
      Gets the WebKitSettings:minimum-font-size property.
      Returns:
      Minimum font size, in pixels.
    • getMonospaceFontFamily

      public String getMonospaceFontFamily()
      Gets the WebKitSettings:monospace-font-family property.
      Returns:
      Default font family used to display content marked with monospace font.
    • getPictographFontFamily

      public String getPictographFontFamily()
      Gets the WebKitSettings:pictograph-font-family property.
      Returns:
      The default font family used to display content marked with pictograph font.
    • getPrintBackgrounds

      public boolean getPrintBackgrounds()
      Get the WebKitSettings:print-backgrounds property.
      Returns:
      true If background images should be printed or false otherwise.
    • getSansSerifFontFamily

      public String getSansSerifFontFamily()
      Gets the WebKitSettings:sans-serif-font-family property.
      Returns:
      The default font family used to display content marked with sans-serif font.
    • getSerifFontFamily

      public String getSerifFontFamily()
      Gets the WebKitSettings:serif-font-family property.
      Returns:
      The default font family used to display content marked with serif font.
    • getUserAgent

      public String getUserAgent()
      Get the WebKitSettings:user-agent property.
      Returns:
      The current value of the user-agent property.
    • getWebrtcUdpPortsRange

      public String getWebrtcUdpPortsRange()
      Get the Settings:webrtc-udp-ports-range property.
      Returns:
      The WebRTC UDP ports range, or null if un-set.
      Since:
      2.48
    • getZoomTextOnly

      public boolean getZoomTextOnly()
      Get the WebKitSettings:zoom-text-only property.
      Returns:
      true If zoom level of the view should only affect the text or false if all view contents should be scaled.
    • setAllowFileAccessFromFileUrls

      public void setAllowFileAccessFromFileUrls(boolean allowed)
      Set the WebKitSettings:allow-file-access-from-file-urls property.
      Parameters:
      allowed - Value to be set
      Since:
      2.10
    • setAllowModalDialogs

      public void setAllowModalDialogs(boolean allowed)
      Set the WebKitSettings:allow-modal-dialogs property.
      Parameters:
      allowed - Value to be set
    • setAllowTopNavigationToDataUrls

      public void setAllowTopNavigationToDataUrls(boolean allowed)
      Set the WebKitSettings:allow-top-navigation-to-data-urls property.
      Parameters:
      allowed - Value to be set
      Since:
      2.28
    • setAllowUniversalAccessFromFileUrls

      public void setAllowUniversalAccessFromFileUrls(boolean allowed)
      Set the WebKitSettings:allow-universal-access-from-file-urls property.
      Parameters:
      allowed - Value to be set
      Since:
      2.14
    • setAutoLoadImages

      public void setAutoLoadImages(boolean enabled)
      Set the WebKitSettings:auto-load-images property.
      Parameters:
      enabled - Value to be set
    • setCursiveFontFamily

      public void setCursiveFontFamily(String cursiveFontFamily)
      Set the WebKitSettings:cursive-font-family property.
      Parameters:
      cursiveFontFamily - the new default cursive font family
    • setDefaultCharset

      public void setDefaultCharset(String defaultCharset)
      Set the WebKitSettings:default-charset property.
      Parameters:
      defaultCharset - default charset to be set
    • setDefaultFontFamily

      public void setDefaultFontFamily(String defaultFontFamily)
      Set the WebKitSettings:default-font-family property.
      Parameters:
      defaultFontFamily - the new default font family
    • setDefaultFontSize

      public void setDefaultFontSize(int fontSize)
      Set the WebKitSettings:default-font-size property.
      Parameters:
      fontSize - default font size to be set in pixels
    • setDefaultMonospaceFontSize

      public void setDefaultMonospaceFontSize(int fontSize)
      Set the WebKitSettings:default-monospace-font-size property.
      Parameters:
      fontSize - default monospace font size to be set in pixels
    • setDisableWebSecurity

      public void setDisableWebSecurity(boolean disabled)
      Set the WebKitSettings:disable-web-security property.
      Parameters:
      disabled - Value to be set
      Since:
      2.40
    • setDrawCompositingIndicators

      public void setDrawCompositingIndicators(boolean enabled)
      Set the WebKitSettings:draw-compositing-indicators property.
      Parameters:
      enabled - Value to be set
    • setEnable2dCanvasAcceleration

      public void setEnable2dCanvasAcceleration(boolean enabled)
      Set the WebKitSettings:enable-2d-canvas-acceleration property.
      Parameters:
      enabled - Value to be set
      Since:
      2.46
    • setEnableBackForwardNavigationGestures

      public void setEnableBackForwardNavigationGestures(boolean enabled)
      Set the WebKitSettings:enable-back-forward-navigation-gestures property.
      Parameters:
      enabled - value to be set
      Since:
      2.24
    • setEnableCaretBrowsing

      public void setEnableCaretBrowsing(boolean enabled)
      Set the WebKitSettings:enable-caret-browsing property.
      Parameters:
      enabled - Value to be set
    • setEnableDeveloperExtras

      public void setEnableDeveloperExtras(boolean enabled)
      Set the WebKitSettings:enable-developer-extras property.
      Parameters:
      enabled - Value to be set
    • setEnableDnsPrefetching

      @Deprecated public void setEnableDnsPrefetching(boolean enabled)
      Deprecated.
      Set the WebKitSettings:enable-dns-prefetching property.
      Parameters:
      enabled - Value to be set
    • setEnableEncryptedMedia

      public void setEnableEncryptedMedia(boolean enabled)
      Set the WebKitSettings:enable-encrypted-media property.
      Parameters:
      enabled - Value to be set
      Since:
      2.20
    • setEnableFullscreen

      public void setEnableFullscreen(boolean enabled)
      Set the WebKitSettings:enable-fullscreen property.
      Parameters:
      enabled - Value to be set
    • setEnableHtml5Database

      public void setEnableHtml5Database(boolean enabled)
      Set the WebKitSettings:enable-html5-database property.
      Parameters:
      enabled - Value to be set
    • setEnableHtml5LocalStorage

      public void setEnableHtml5LocalStorage(boolean enabled)
      Set the WebKitSettings:enable-html5-local-storage property.
      Parameters:
      enabled - Value to be set
    • setEnableHyperlinkAuditing

      @Deprecated public void setEnableHyperlinkAuditing(boolean enabled)
      Deprecated.
      Set the WebKitSettings:enable-hyperlink-auditing property.
      Parameters:
      enabled - Value to be set
    • setEnableJavascript

      public void setEnableJavascript(boolean enabled)
      Set the WebKitSettings:enable-javascript property.
      Parameters:
      enabled - Value to be set
    • setEnableJavascriptMarkup

      public void setEnableJavascriptMarkup(boolean enabled)
      Set the WebKitSettings:enable-javascript-markup property.
      Parameters:
      enabled - Value to be set
      Since:
      2.24
    • setEnableMedia

      public void setEnableMedia(boolean enabled)
      Set the WebKitSettings:enable-media property.
      Parameters:
      enabled - Value to be set
      Since:
      2.26
    • setEnableMediaCapabilities

      public void setEnableMediaCapabilities(boolean enabled)
      Set the WebKitSettings:enable-media-capabilities property.
      Parameters:
      enabled - Value to be set
      Since:
      2.22
    • setEnableMediaStream

      public void setEnableMediaStream(boolean enabled)
      Set the WebKitSettings:enable-media-stream property.
      Parameters:
      enabled - Value to be set
      Since:
      2.4
    • setEnableMediasource

      public void setEnableMediasource(boolean enabled)
      Set the WebKitSettings:enable-mediasource property.
      Parameters:
      enabled - Value to be set
      Since:
      2.4
    • setEnableMockCaptureDevices

      public void setEnableMockCaptureDevices(boolean enabled)
      Set the WebKitSettings:enable-mock-capture-devices property.
      Parameters:
      enabled - Value to be set
      Since:
      2.4
    • setEnableOfflineWebApplicationCache

      @Deprecated public void setEnableOfflineWebApplicationCache(boolean enabled)
      Deprecated.
      Setting no longer supported. This function does nothing.
      Parameters:
      enabled - Value to be set
    • setEnablePageCache

      public void setEnablePageCache(boolean enabled)
      Set the WebKitSettings:enable-page-cache property.
      Parameters:
      enabled - Value to be set
    • setEnableResizableTextAreas

      public void setEnableResizableTextAreas(boolean enabled)
      Set the WebKitSettings:enable-resizable-text-areas property.
      Parameters:
      enabled - Value to be set
    • setEnableSiteSpecificQuirks

      public void setEnableSiteSpecificQuirks(boolean enabled)
      Set the WebKitSettings:enable-site-specific-quirks property.
      Parameters:
      enabled - Value to be set
    • setEnableSmoothScrolling

      public void setEnableSmoothScrolling(boolean enabled)
      Set the WebKitSettings:enable-smooth-scrolling property.
      Parameters:
      enabled - Value to be set
    • setEnableSpatialNavigation

      public void setEnableSpatialNavigation(boolean enabled)
      Set the WebKitSettings:enable-spatial-navigation property.
      Parameters:
      enabled - Value to be set
      Since:
      2.2
    • setEnableTabsToLinks

      public void setEnableTabsToLinks(boolean enabled)
      Set the WebKitSettings:enable-tabs-to-links property.
      Parameters:
      enabled - Value to be set
    • setEnableWebaudio

      public void setEnableWebaudio(boolean enabled)
      Set the WebKitSettings:enable-webaudio property.
      Parameters:
      enabled - Value to be set
    • setEnableWebgl

      public void setEnableWebgl(boolean enabled)
      Set the WebKitSettings:enable-webgl property.
      Parameters:
      enabled - Value to be set
    • setEnableWebrtc

      public void setEnableWebrtc(boolean enabled)

      Set the Settings:enable-webrtc property.

      Setting this property to true implies 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 the WebKitSettings:enable-write-console-messages-to-stdout property.
      Parameters:
      enabled - Value to be set
      Since:
      2.2
    • setFantasyFontFamily

      public void setFantasyFontFamily(String fantasyFontFamily)
      Set the WebKitSettings:fantasy-font-family property.
      Parameters:
      fantasyFontFamily - the new default fantasy font family
    • setFeatureEnabled

      public void setFeatureEnabled(Feature feature, boolean enabled)

      Enables or disables a feature.

      The current status of the feature can be determined with

      invalid reference
      org.webkitgtk.SettingsgetFeatureEnabled
      . To reset a feature to its

      initial status, pass the value returned by

      invalid reference
      org.webkitgtk.FeaturegetDefaultValue
      as the `enabled` parameter.
      Parameters:
      feature - the feature to toggle.
      enabled - whether the feature will be enabled.
      Since:
      2.42
    • setHardwareAccelerationPolicy

      public void setHardwareAccelerationPolicy(HardwareAccelerationPolicy policy)
      Set the WebKitSettings:hardware-acceleration-policy property.
      Parameters:
      policy - a WebKitHardwareAccelerationPolicy
      Since:
      2.16
    • setJavascriptCanAccessClipboard

      public void setJavascriptCanAccessClipboard(boolean enabled)
      Set the WebKitSettings:javascript-can-access-clipboard property.
      Parameters:
      enabled - Value to be set
    • setJavascriptCanOpenWindowsAutomatically

      public void setJavascriptCanOpenWindowsAutomatically(boolean enabled)
      Set the WebKitSettings:javascript-can-open-windows-automatically property.
      Parameters:
      enabled - Value to be set
    • setLoadIconsIgnoringImageLoadSetting

      @Deprecated public void setLoadIconsIgnoringImageLoadSetting(boolean enabled)
      Deprecated.
      Setting no longer supported. This function does nothing.
      Parameters:
      enabled - Value to be set
    • setMathFontFamily

      public void setMathFontFamily(@Nullable String mathFontFamily)

      Set the WebKitSettings:math-font-family property.

      Since 2.52

      Parameters:
      mathFontFamily - the new default math font family
    • setMediaContentTypesRequiringHardwareSupport

      public void setMediaContentTypesRequiringHardwareSupport(@Nullable String contentTypes)
      Set the WebKitSettings:media-content-types-requiring-hardware-support property.
      Parameters:
      contentTypes - list of media content types requiring hardware support split by semicolons (:) or null to use the default value.
      Since:
      2.30
    • setMediaPlaybackAllowsInline

      public void setMediaPlaybackAllowsInline(boolean enabled)
      Set the WebKitSettings:media-playback-allows-inline property.
      Parameters:
      enabled - Value to be set
    • setMediaPlaybackRequiresUserGesture

      public void setMediaPlaybackRequiresUserGesture(boolean enabled)
      Set the WebKitSettings:media-playback-requires-user-gesture property.
      Parameters:
      enabled - Value to be set
    • setMinimumFontSize

      public void setMinimumFontSize(int fontSize)
      Set the WebKitSettings:minimum-font-size property.
      Parameters:
      fontSize - minimum font size to be set in pixels
    • setMonospaceFontFamily

      public void setMonospaceFontFamily(String monospaceFontFamily)
      Set the WebKitSettings:monospace-font-family property.
      Parameters:
      monospaceFontFamily - the new default monospace font family
    • setPictographFontFamily

      public void setPictographFontFamily(String pictographFontFamily)
      Set the WebKitSettings:pictograph-font-family property.
      Parameters:
      pictographFontFamily - the new default pictograph font family
    • setPrintBackgrounds

      public void setPrintBackgrounds(boolean printBackgrounds)
      Set the WebKitSettings:print-backgrounds property.
      Parameters:
      printBackgrounds - Value to be set
    • setSansSerifFontFamily

      public void setSansSerifFontFamily(String sansSerifFontFamily)
      Set the WebKitSettings:sans-serif-font-family property.
      Parameters:
      sansSerifFontFamily - the new default sans-serif font family
    • setSerifFontFamily

      public void setSerifFontFamily(String serifFontFamily)
      Set the WebKitSettings:serif-font-family property.
      Parameters:
      serifFontFamily - the new default serif font family
    • setUserAgent

      public void setUserAgent(@Nullable String userAgent)
      Set the WebKitSettings:user-agent property.
      Parameters:
      userAgent - The new custom user agent string or null to use the default user agent
    • setUserAgentWithApplicationDetails

      public void setUserAgentWithApplicationDetails(@Nullable String applicationName, @Nullable String applicationVersion)

      Set the WebKitSettings: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 or null to use the default user agent.
      applicationVersion - The application version for the user agent or null to user the default version.
    • setWebrtcUdpPortsRange

      public void setWebrtcUdpPortsRange(String udpPortRange)
      Set the Settings:webrtc-udp-ports-range property.
      Parameters:
      udpPortRange - Value to be set
      Since:
      2.48
    • setZoomTextOnly

      public void setZoomTextOnly(boolean zoomTextOnly)
      Set the WebKitSettings:zoom-text-only property.
      Parameters:
      zoomTextOnly - Value to be set
    • builder

      public static Settings.Builder<? extends Settings.Builder> builder()
      A Settings.Builder object constructs a Settings with the specified properties. Use the various set...() methods to set properties, and finish construction with Settings.Builder.build().
      Returns:
      the builder object