Settings
Object Hierarchy:
Description:
Control the behaviour of a WebView.
Settings can be applied to a WebView to control text charset, color, font sizes, printing mode, script support, loading of images and various other things on a WebView. After creation, a Settings object contains default settings.
```c // Disable JavaScript WebKitSettings *settings = webkit_web_view_group_get_settings (my_view_group); webkit_settings_set_enable_javascript (settings, FALSE); ```
Namespace: WebKit
Package: webkitgtk-6.0
Content:
Properties:
- public bool allow_file_access_from_file_urls { get; set construct; }
Whether file access is allowed from file URLs.
- public bool allow_modal_dialogs { get; set construct; }
Determine whether it's allowed to create and run modal dialogs from a WebView through JavaScript with <function>window.
- public bool allow_top_navigation_to_data_urls { get; set construct; }
Whether or not the top frame is allowed to navigate to data URLs.
- public bool allow_universal_access_from_file_urls { get; set construct; }
Whether or not JavaScript running in the context of a file scheme URL should be allowed to access content from any origin.
- public bool auto_load_images { get; set construct; }
Determines whether images should be automatically loaded or not.
- public string cursive_font_family { get; set construct; }
The font family used as the default for content using a cursive font.
- public string default_charset { get; set construct; }
The default text charset used when interpreting content with an unspecified charset.
- public string default_font_family { get; set construct; }
The font family to use as the default for content that does not specify a font.
- public uint default_font_size { get; set construct; }
The default font size in pixels to use for content displayed if no font size is specified.
- public uint default_monospace_font_size { get; set construct; }
The default font size in pixels to use for content displayed in monospace font if no font size is specified.
- public bool disable_web_security { get; set construct; }
Enable or disable support for Web Security on pages.
- public bool draw_compositing_indicators { get; set construct; }
Whether to draw compositing borders and repaint counters on layers drawn with accelerated compositing.
- public bool enable_back_forward_navigation_gestures { get; set construct; }
Enable or disable horizontal swipe gesture for back-forward navigation.
- public bool enable_caret_browsing { get; set construct; }
Whether to enable accessibility enhanced keyboard navigation.
- public bool enable_developer_extras { get; set construct; }
Determines whether or not developer tools, such as the Web Inspector, are enabled.
- public bool enable_dns_prefetching { get; set construct; }
Determines whether or not to prefetch domain names.
- public bool enable_encrypted_media { get; set construct; }
Enable or disable support for Encrypted Media API on pages.
- public bool enable_fullscreen { get; set construct; }
Whether to enable the Javascript Fullscreen API.
- public bool enable_html5_database { get; set construct; }
Whether to enable HTML5 client-side SQL database support (IndexedDB).
- public bool enable_html5_local_storage { get; set construct; }
Whether to enable HTML5 local storage support.
- public bool enable_hyperlink_auditing { get; set construct; }
Determines whether or not hyperlink auditing is enabled.
- public bool enable_javascript { get; set construct; }
Determines whether or not JavaScript executes within a page.
- public bool enable_javascript_markup { get; set construct; }
Determines whether or not JavaScript markup is allowed in document.
- public bool enable_media { get; set construct; }
Enable or disable support for media playback on pages.
- public bool enable_media_capabilities { get; set construct; }
Enable or disable support for MediaCapabilities on pages.
- public bool enable_media_stream { get; set construct; }
Enable or disable support for MediaStream on pages.
- public bool enable_mediasource { get; set construct; }
Enable or disable support for MediaSource on pages.
- public bool enable_mock_capture_devices { get; set construct; }
Enable or disable the Mock Capture Devices.
- public bool enable_offline_web_application_cache { get; set construct; }
Whether to enable HTML5 offline web application cache support.
- public bool enable_page_cache { get; set construct; }
Enable or disable the page cache.
- public bool enable_resizable_text_areas { get; set construct; }
Determines whether or not text areas can be resized.
- public bool enable_site_specific_quirks { get; set construct; }
Whether to turn on site-specific quirks.
- public bool enable_smooth_scrolling { get; set construct; }
Enable or disable smooth scrolling.
- public bool enable_spatial_navigation { get; set construct; }
Whether to enable Spatial Navigation.
- public bool enable_tabs_to_links { get; set construct; }
Determines whether the tab key cycles through the elements on the page.
- public bool enable_webaudio { get; set construct; }
Enable or disable support for WebAudio on pages.
- public bool enable_webgl { get; set construct; }
Enable or disable support for WebGL on pages.
- public bool enable_webrtc { get; set construct; }
Enable WebRTC support for loaded pages.
- public bool enable_write_console_messages_to_stdout { get; set construct; }
Enable or disable writing console messages to stdout.
- public string fantasy_font_family { get; set construct; }
The font family used as the default for content using a fantasy font.
- public HardwareAccelerationPolicy hardware_acceleration_policy { get; set construct; }
The HardwareAccelerationPolicy to decide how to enable and disable hardware acceleration.
- public bool javascript_can_access_clipboard { get; set construct; }
Whether JavaScript can access the clipboard.
- public bool javascript_can_open_windows_automatically { get; set construct; }
Whether JavaScript can open popup windows automatically without user intervention.
- public bool load_icons_ignoring_image_load_setting { get; set construct; }
Unsupported setting.
- public string media_content_types_requiring_hardware_support { get; set construct; }
List of media content types requiring hardware support, split by semicolons (:).
- public bool media_playback_allows_inline { get; set construct; }
Whether media playback is full-screen only or inline playback is allowed.
- public bool media_playback_requires_user_gesture { get; set construct; }
Whether a user gesture (such as clicking the play button) would be required to start media playback or load media.
- public uint minimum_font_size { get; set construct; }
The minimum font size in pixels used to display text.
- public string monospace_font_family { get; set construct; }
The font family used as the default for content using a monospace font.
- public string pictograph_font_family { get; set construct; }
The font family used as the default for content using a pictograph font.
- public bool print_backgrounds { get; set construct; }
Whether background images should be drawn during printing.
- public string sans_serif_font_family { get; set construct; }
The font family used as the default for content using a sans-serif font.
- public string serif_font_family { get; set construct; }
The font family used as the default for content using a serif font.
- public string user_agent { get; set construct; }
The user-agent string used by WebKit.
- public bool zoom_text_only { get; set construct; }
Whether zoom_level affects only the text of the page or all the contents.
Static methods:
- public static uint32 font_size_to_pixels (uint32 points)
Convert
points
to the equivalent value in pixels. - public static uint32 font_size_to_points (uint32 pixels)
Convert
pixels
to the equivalent value in points. - public static FeatureList get_all_features ()
Gets the list of all available WebKit features.
- public static FeatureList get_development_features ()
Gets the list of available development WebKit features.
- public static FeatureList get_experimental_features ()
Gets the list of available experimental WebKit features.
Creation methods:
- public Settings ()
Creates a new Settings instance with default values.
Methods:
- public bool get_allow_file_access_from_file_urls ()
Get the allow_file_access_from_file_urls property.
- public bool get_allow_modal_dialogs ()
Get the allow_modal_dialogs property.
- public bool get_allow_top_navigation_to_data_urls ()
Get the allow_top_navigation_to_data_urls property.
- public bool get_allow_universal_access_from_file_urls ()
Get the allow_universal_access_from_file_urls property.
- public bool get_auto_load_images ()
Get the auto_load_images property.
- public unowned string get_cursive_font_family ()
Gets the cursive_font_family property.
- public unowned string get_default_charset ()
Gets the default_charset property.
- public unowned string get_default_font_family ()
Gets the default_font_family property.
- public uint32 get_default_font_size ()
Gets the default_font_size property.
- public uint32 get_default_monospace_font_size ()
Gets the default_monospace_font_size property.
- public bool get_disable_web_security ()
Get the disable_web_security property.
- public bool get_draw_compositing_indicators ()
Get the draw_compositing_indicators property.
- public bool get_enable_back_forward_navigation_gestures ()
Get the enable_back_forward_navigation_gestures property.
- public bool get_enable_caret_browsing ()
Get the enable_caret_browsing property.
- public bool get_enable_developer_extras ()
Get the enable_developer_extras property.
- public bool get_enable_dns_prefetching ()
Get the enable_dns_prefetching property.
- public bool get_enable_encrypted_media ()
Get the enable_encrypted_media property.
- public bool get_enable_fullscreen ()
Get the enable_fullscreen property.
- public bool get_enable_html5_database ()
Get the enable_html5_database property.
- public bool get_enable_html5_local_storage ()
Get the enable_html5_local_storage property.
- public bool get_enable_hyperlink_auditing ()
Get the enable_hyperlink_auditing property.
- public bool get_enable_javascript ()
Get the enable_javascript property.
- public bool get_enable_javascript_markup ()
Get the enable_javascript_markup property.
- public bool get_enable_media ()
Get the enable_media property.
- public bool get_enable_media_capabilities ()
Get the enable_media_capabilities property.
- public bool get_enable_media_stream ()
Get the enable_media_stream property.
- public bool get_enable_mediasource ()
Get the enable_mediasource property.
- public bool get_enable_mock_capture_devices ()
Get the enable_mock_capture_devices property.
- public bool get_enable_offline_web_application_cache ()
Get the enable_offline_web_application_cache property.
- public bool get_enable_page_cache ()
Get the enable_page_cache property.
- public bool get_enable_resizable_text_areas ()
Get the enable_resizable_text_areas property.
- public bool get_enable_site_specific_quirks ()
Get the enable_site_specific_quirks property.
- public bool get_enable_smooth_scrolling ()
Get the enable_smooth_scrolling property.
- public bool get_enable_spatial_navigation ()
Get the enable_spatial_navigation property.
- public bool get_enable_tabs_to_links ()
Get the enable_tabs_to_links property.
- public bool get_enable_webaudio ()
Get the enable_webaudio property.
- public bool get_enable_webgl ()
Get the enable_webgl property.
- public bool get_enable_webrtc ()
Get the [property@Settings:enable-webrtc] property.
- public bool get_enable_write_console_messages_to_stdout ()
Get the enable_write_console_messages_to_stdout property.
- public unowned string get_fantasy_font_family ()
Gets the fantasy_font_family property.
- public bool get_feature_enabled (Feature feature)
Gets whether a feature is enabled.
- public HardwareAccelerationPolicy get_hardware_acceleration_policy ()
Get the hardware_acceleration_policy property.
- public bool get_javascript_can_access_clipboard ()
Get the javascript_can_access_clipboard property.
- public bool get_javascript_can_open_windows_automatically ()
Get the javascript_can_open_windows_automatically property.
- public bool get_load_icons_ignoring_image_load_setting ()
Setting no longer supported.
- public unowned string get_media_content_types_requiring_hardware_support ()
Gets the media_content_types_requiring_hardware_support property.
- public bool get_media_playback_allows_inline ()
Get the media_playback_allows_inline property.
- public bool get_media_playback_requires_user_gesture ()
Get the media_playback_requires_user_gesture property.
- public uint32 get_minimum_font_size ()
Gets the minimum_font_size property.
- public unowned string get_monospace_font_family ()
Gets the monospace_font_family property.
- public unowned string get_pictograph_font_family ()
Gets the pictograph_font_family property.
- public bool get_print_backgrounds ()
Get the print_backgrounds property.
- public unowned string get_sans_serif_font_family ()
Gets the sans_serif_font_family property.
- public unowned string get_serif_font_family ()
Gets the serif_font_family property.
- public unowned string get_user_agent ()
Get the user_agent property.
- public bool get_zoom_text_only ()
Get the zoom_text_only property.
- public void set_allow_file_access_from_file_urls (bool allowed)
Set the allow_file_access_from_file_urls property.
- public void set_allow_modal_dialogs (bool allowed)
Set the allow_modal_dialogs property.
- public void set_allow_top_navigation_to_data_urls (bool allowed)
Set the allow_top_navigation_to_data_urls property.
- public void set_allow_universal_access_from_file_urls (bool allowed)
Set the allow_universal_access_from_file_urls property.
- public void set_auto_load_images (bool enabled)
Set the auto_load_images property.
- public void set_cursive_font_family (string cursive_font_family)
Set the cursive_font_family property.
- public void set_default_charset (string default_charset)
Set the default_charset property.
- public void set_default_font_family (string default_font_family)
Set the default_font_family property.
- public void set_default_font_size (uint32 font_size)
Set the default_font_size property.
- public void set_default_monospace_font_size (uint32 font_size)
Set the default_monospace_font_size property.
- public void set_disable_web_security (bool disabled)
Set the disable_web_security property.
- public void set_draw_compositing_indicators (bool enabled)
Set the draw_compositing_indicators property.
- public void set_enable_back_forward_navigation_gestures (bool enabled)
Set the enable_back_forward_navigation_gestures property.
- public void set_enable_caret_browsing (bool enabled)
Set the enable_caret_browsing property.
- public void set_enable_developer_extras (bool enabled)
Set the enable_developer_extras property.
- public void set_enable_dns_prefetching (bool enabled)
Set the enable_dns_prefetching property.
- public void set_enable_encrypted_media (bool enabled)
Set the enable_encrypted_media property.
- public void set_enable_fullscreen (bool enabled)
Set the enable_fullscreen property.
- public void set_enable_html5_database (bool enabled)
Set the enable_html5_database property.
- public void set_enable_html5_local_storage (bool enabled)
Set the enable_html5_local_storage property.
- public void set_enable_hyperlink_auditing (bool enabled)
Set the enable_hyperlink_auditing property.
- public void set_enable_javascript (bool enabled)
Set the enable_javascript property.
- public void set_enable_javascript_markup (bool enabled)
Set the enable_javascript_markup property.
- public void set_enable_media (bool enabled)
Set the enable_media property.
- public void set_enable_media_capabilities (bool enabled)
Set the enable_media_capabilities property.
- public void set_enable_media_stream (bool enabled)
Set the enable_media_stream property.
- public void set_enable_mediasource (bool enabled)
Set the enable_mediasource property.
- public void set_enable_mock_capture_devices (bool enabled)
Set the enable_mock_capture_devices property.
- public void set_enable_offline_web_application_cache (bool enabled)
Set the enable_offline_web_application_cache property.
- public void set_enable_page_cache (bool enabled)
Set the enable_page_cache property.
- public void set_enable_resizable_text_areas (bool enabled)
Set the enable_resizable_text_areas property.
- public void set_enable_site_specific_quirks (bool enabled)
Set the enable_site_specific_quirks property.
- public void set_enable_smooth_scrolling (bool enabled)
Set the enable_smooth_scrolling property.
- public void set_enable_spatial_navigation (bool enabled)
Set the enable_spatial_navigation property.
- public void set_enable_tabs_to_links (bool enabled)
Set the enable_tabs_to_links property.
- public void set_enable_webaudio (bool enabled)
Set the enable_webaudio property.
- public void set_enable_webgl (bool enabled)
Set the enable_webgl property.
- public void set_enable_webrtc (bool enabled)
Set the [property@Settings:enable-webrtc] property.
- public void set_enable_write_console_messages_to_stdout (bool enabled)
Set the enable_write_console_messages_to_stdout property.
- public void set_fantasy_font_family (string fantasy_font_family)
Set the fantasy_font_family property.
- public void set_feature_enabled (Feature feature, bool enabled)
Enables or disables a feature.
- public void set_hardware_acceleration_policy (HardwareAccelerationPolicy policy)
Set the hardware_acceleration_policy property.
- public void set_javascript_can_access_clipboard (bool enabled)
Set the javascript_can_access_clipboard property.
- public void set_javascript_can_open_windows_automatically (bool enabled)
Set the javascript_can_open_windows_automatically property.
- public void set_load_icons_ignoring_image_load_setting (bool enabled)
Setting no longer supported.
- public void set_media_content_types_requiring_hardware_support (string? content_types)
Set the media_content_types_requiring_hardware_support property.
- public void set_media_playback_allows_inline (bool enabled)
Set the media_playback_allows_inline property.
- public void set_media_playback_requires_user_gesture (bool enabled)
Set the media_playback_requires_user_gesture property.
- public void set_minimum_font_size (uint32 font_size)
Set the minimum_font_size property.
- public void set_monospace_font_family (string monospace_font_family)
Set the monospace_font_family property.
- public void set_pictograph_font_family (string pictograph_font_family)
Set the pictograph_font_family property.
- public void set_print_backgrounds (bool print_backgrounds)
Set the print_backgrounds property.
- public void set_sans_serif_font_family (string sans_serif_font_family)
Set the sans_serif_font_family property.
- public void set_serif_font_family (string serif_font_family)
Set the serif_font_family property.
- public void set_user_agent (string? user_agent)
Set the user_agent property.
- public void set_user_agent_with_application_details (string? application_name, string? application_version)
Set the user_agent property by appending the application details.
- public void set_zoom_text_only (bool zoom_text_only)
Set the zoom_text_only property.
Inherited Members:
All known members inherited from class GLib.Object