Struct webkit6::Settings

source ·
pub struct Settings { /* private fields */ }
Expand description

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.

⚠️ The following code is in c ⚠️

// Disable JavaScript
WebKitSettings *settings = webkit_web_view_group_get_settings (my_view_group);
webkit_settings_set_enable_javascript (settings, FALSE);

§Properties

§allow-file-access-from-file-urls

Whether file access is allowed from file URLs. By default, when something is loaded in a #WebKitWebView using a file URI, cross origin requests to other file resources are not allowed. This setting allows you to change that behaviour, so that it would be possible to do a XMLHttpRequest of a local file, for example.

Readable | Writeable | Construct

§allow-modal-dialogs

Determine whether it’s allowed to create and run modal dialogs from a #WebKitWebView through JavaScript with window.showModalDialog. If it’s set to false, the associated #WebKitWebView won’t be able to create new modal dialogs, so not even the #WebKitWebView::create signal will be emitted.

Readable | Writeable | Construct

§allow-top-navigation-to-data-urls

Whether or not the top frame is allowed to navigate to data URLs. It is disabled by default due to the risk it poses when loading untrusted URLs, with data URLs being used in scamming and phishing attacks. In contrast, a scenario where it could be enabled could be an app that embeds a WebView and you have control of the pages being show instead of a generic browser.

Readable | Writeable | Construct

§allow-universal-access-from-file-urls

Whether or not JavaScript running in the context of a file scheme URL should be allowed to access content from any origin. By default, when something is loaded in a #WebKitWebView using a file scheme URL, access to the local file system and arbitrary local storage is not allowed. This setting allows you to change that behaviour, so that it would be possible to use local storage, for example.

Readable | Writeable | Construct

§auto-load-images

Determines whether images should be automatically loaded or not. On devices where network bandwidth is of concern, it might be useful to turn this property off.

Readable | Writeable | Construct

§cursive-font-family

The font family used as the default for content using a cursive font.

Readable | Writeable | Construct

§default-charset

The default text charset used when interpreting content with an unspecified charset.

Readable | Writeable | Construct

§default-font-family

The font family to use as the default for content that does not specify a font.

Readable | Writeable | Construct

§default-font-size

The default font size in pixels to use for content displayed if no font size is specified.

Readable | Writeable | Construct

§default-monospace-font-size

The default font size in pixels to use for content displayed in monospace font if no font size is specified.

Readable | Writeable | Construct

§disable-web-security

Enable or disable support for Web Security on pages.

This setting disables the same-origin policy, allowing every website full control over all other websites. This is for use in special environments where you wish to disable all security and allow websites to hack each other. It is impossible to use this setting securely.

Readable | Writeable | Construct

§draw-compositing-indicators

Whether to draw compositing borders and repaint counters on layers drawn with accelerated compositing. This is useful for debugging issues related to web content that is composited with the GPU.

Readable | Writeable | Construct

§enable-2d-canvas-acceleration

Enable or disable 2D canvas acceleration. If this setting is enabled, the 2D canvas will be accelerated even if Skia CPU is used for rendering. However, the canvas can be unaccelerated even when this setting is enabled, for other reasons like its size or when willReadFrequently property is used.

Readable | Writeable | Construct

§enable-back-forward-navigation-gestures

Enable or disable horizontal swipe gesture for back-forward navigation.

Readable | Writeable | Construct

§enable-caret-browsing

Whether to enable accessibility enhanced keyboard navigation.

Readable | Writeable | Construct

§enable-developer-extras

Determines whether or not developer tools, such as the Web Inspector, are enabled.

Readable | Writeable | Construct

§enable-dns-prefetching

Determines whether or not to prefetch domain names. DNS prefetching attempts to resolve domain names before a user tries to follow a link.

Readable | Writeable | Construct

§enable-encrypted-media

Enable or disable support for Encrypted Media API on pages. EncryptedMedia is an experimental JavaScript API for playing encrypted media in HTML. This property will only work as intended if the EncryptedMedia feature is enabled at build time with the ENABLE_ENCRYPTED_MEDIA flag.

See https://www.w3.org/TR/encrypted-media/

Readable | Writeable | Construct

§enable-fullscreen

Whether to enable the Javascript Fullscreen API. The API allows any HTML element to request fullscreen display. See also the current draft of the spec: http://www.w3.org/TR/fullscreen/

Readable | Writeable | Construct

§enable-html5-database

Whether to enable HTML5 client-side SQL database support (IndexedDB).

Readable | Writeable | Construct

§enable-html5-local-storage

Whether to enable HTML5 local storage support. Local storage provides simple synchronous storage access.

HTML5 local storage specification is available at http://dev.w3.org/html5/webstorage/.

Readable | Writeable | Construct

Determines whether or not hyperlink auditing is enabled.

The hyperlink auditing specification is available at http://www.whatwg.org/specs/web-apps/current-work/multipage/links.html#hyperlink-auditing.

Readable | Writeable | Construct

§enable-javascript

Determines whether or not JavaScript executes within a page.

Readable | Writeable | Construct

§enable-javascript-markup

Determines whether or not JavaScript markup is allowed in document. When this setting is disabled, all JavaScript-related elements and attributes are removed from the document during parsing. Note that executing JavaScript is still allowed if #WebKitSettings:enable-javascript is true.

Readable | Writeable | Construct

§enable-media

Enable or disable support for media playback on pages. This setting is enabled by default. Disabling it means <audio>, <track> and <video> elements will have playback support disabled.

Readable | Writeable | Construct

§enable-media-capabilities

Enable or disable support for MediaCapabilities on pages. This specification intends to provide APIs to allow websites to make an optimal decision when picking media content for the user. The APIs will expose information about the decoding and encoding capabilities for a given format but also output capabilities to find the best match based on the device’s display.

See also https://wicg.github.io/media-capabilities/

Readable | Writeable | Construct

§enable-media-stream

Enable or disable support for MediaStream on pages. MediaStream is an experimental proposal for allowing web pages to access audio and video devices for capture.

See also http://dev.w3.org/2011/webrtc/editor/getusermedia.html

Readable | Writeable | Construct

§enable-mediasource

Enable or disable support for MediaSource on pages. MediaSource extends HTMLMediaElement to allow JavaScript to generate media streams for playback.

See also http://www.w3.org/TR/media-source/

Readable | Writeable | Construct

§enable-mock-capture-devices

Enable or disable the Mock Capture Devices. Those are fake Microphone and Camera devices to be used as MediaStream sources.

Readable | Writeable | Construct

§enable-offline-web-application-cache

Unsupported setting. This property does nothing.

Readable | Writeable | Construct

§enable-page-cache

Enable or disable the page cache. Disabling the page cache is generally only useful for special circumstances like low-memory scenarios or special purpose applications like static HTML viewers. This setting only controls the Page Cache, this cache is different than the disk-based or memory-based traditional resource caches, its point is to make going back and forth between pages much faster. For details about the different types of caches and their purposes see: http://webkit.org/blog/427/webkit-page-cache-i-the-basics/

Readable | Writeable | Construct

§enable-resizable-text-areas

Determines whether or not text areas can be resized.

Readable | Writeable | Construct

§enable-site-specific-quirks

Whether to turn on site-specific quirks. Turning this on will tell WebKit to use some site-specific workarounds for better web compatibility. For example, older versions of MediaWiki will incorrectly send to WebKit a CSS file with KHTML workarounds. By turning on site-specific quirks, WebKit will special-case this and other cases to make some specific sites work.

Readable | Writeable | Construct

§enable-smooth-scrolling

Enable or disable smooth scrolling.

Readable | Writeable | Construct

§enable-spatial-navigation

Whether to enable Spatial Navigation. This feature consists in the ability to navigate between focusable elements in a Web page, such as hyperlinks and form controls, by using Left, Right, Up and Down arrow keys. For example, if an user presses the Right key, heuristics determine whether there is an element they might be trying to reach towards the right, and if there are multiple elements, which element they probably wants.

Readable | Writeable | Construct

Determines whether the tab key cycles through the elements on the page. When this setting is enabled, users will be able to focus the next element in the page by pressing the tab key. If the selected element is editable, then pressing tab key will insert the tab character.

Readable | Writeable | Construct

§enable-webaudio

Enable or disable support for WebAudio on pages. WebAudio is an API for processing and synthesizing audio in web applications

See also https://webaudio.github.io/web-audio-api

Readable | Writeable | Construct

§enable-webgl

Enable or disable support for WebGL on pages. WebGL enables web content to use an API based on OpenGL ES 2.0.

Readable | Writeable | Construct

§enable-webrtc

Enable WebRTC support for loaded pages.

Enabling this setting implies that enable-media-stream will be enabled as well.

See also https://www.w3.org/TR/webrtc/

Readable | Writeable | Construct

§enable-write-console-messages-to-stdout

Enable or disable writing console messages to stdout. These are messages sent to the console with console.log and related methods.

Readable | Writeable | Construct

§fantasy-font-family

The font family used as the default for content using a fantasy font.

Readable | Writeable | Construct

§hardware-acceleration-policy

The #WebKitHardwareAccelerationPolicy to decide how to enable and disable hardware acceleration. Disabling hardware acceleration might cause some websites to not render correctly or consume more CPU.

Note that changing this setting might not be possible if hardware acceleration is not supported by the hardware or the system. In that case, you can get the value to know the actual policy being used, but changing the setting will not have any effect.

Readable | Writeable | Construct

§javascript-can-access-clipboard

Whether JavaScript can access the clipboard. The default value is false. If set to true, document.execCommand() allows cut, copy and paste commands.

Readable | Writeable | Construct

§javascript-can-open-windows-automatically

Whether JavaScript can open popup windows automatically without user intervention.

Readable | Writeable | Construct

§load-icons-ignoring-image-load-setting

Unsupported setting. This property does nothing.

Readable | Writeable | Construct

§media-content-types-requiring-hardware-support

List of media content types requiring hardware support, split by semicolons (:). For example: ‘video/webm; codecs=“vp*”:video/mp4; codecs=“avc*”:video/* codecs=“av1*”’.

Readable | Writeable | Construct

§media-playback-allows-inline

Whether media playback is full-screen only or inline playback is allowed. This is true by default, so media playback can be inline. Setting it to false allows specifying that media playback should be always fullscreen.

Readable | Writeable | Construct

§media-playback-requires-user-gesture

Whether a user gesture (such as clicking the play button) would be required to start media playback or load media. This is off by default, so media playback could start automatically. Setting it on requires a gesture by the user to start playback, or to load the media.

Readable | Writeable | Construct

§minimum-font-size

The minimum font size in pixels used to display text. This setting controls the absolute smallest size. Values other than 0 can potentially break page layouts.

Readable | Writeable | Construct

§monospace-font-family

The font family used as the default for content using a monospace font.

Readable | Writeable | Construct

§pictograph-font-family

The font family used as the default for content using a pictograph font.

Readable | Writeable | Construct

Whether background images should be drawn during printing.

Readable | Writeable | Construct

§sans-serif-font-family

The font family used as the default for content using a sans-serif font.

Readable | Writeable | Construct

§serif-font-family

The font family used as the default for content using a serif font.

Readable | Writeable | Construct

§user-agent

The user-agent string used by WebKit. Unusual user-agent strings may cause web content to render incorrectly or fail to run, as many web pages are written to parse the user-agent strings of only the most popular browsers. Therefore, it’s typically better to not completely override the standard user-agent, but to use webkit_settings_set_user_agent_with_application_details() instead.

If this property is set to the empty string or None, it will revert to the standard user-agent.

Readable | Writeable | Construct

§zoom-text-only

Whether #WebKitWebView:zoom-level affects only the text of the page or all the contents. Other contents containing text like form controls will be also affected by zoom factor when this property is enabled.

Readable | Writeable | Construct

GLib type: GObject with reference counted clone semantics.

Implementations§

source§

impl Settings

source

pub fn new() -> Settings

Creates a new #WebKitSettings instance with default values.

It must be manually attached to a #WebKitWebView. See also webkit_settings_new_with_settings().

§Returns

a new #WebKitSettings instance.

source

pub fn builder() -> SettingsBuilder

Creates a new builder-pattern struct instance to construct Settings objects.

This method returns an instance of SettingsBuilder which can be used to create Settings objects.

source

pub fn apply_from_key_file( &self, key_file: &KeyFile, group_name: &str, ) -> Result<(), Error>

Available on crate feature v2_46 only.

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

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.

§key_file

a #GKeyFile

§group_name

Name of the group to read from @key_file

§Returns

true if the settings were correctly applied or false on error.

source

pub fn allows_file_access_from_file_urls(&self) -> bool

Get the #WebKitSettings:allow-file-access-from-file-urls property.

§Returns

true If file access from file URLs is allowed or false otherwise.

source

pub fn allows_modal_dialogs(&self) -> bool

Get the #WebKitSettings:allow-modal-dialogs property.

§Returns

true if it’s allowed to create and run modal dialogs or false otherwise.

source

pub fn allows_top_navigation_to_data_urls(&self) -> bool

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.

source

pub fn allows_universal_access_from_file_urls(&self) -> bool

Get the #WebKitSettings:allow-universal-access-from-file-urls property.

§Returns

true If universal access from file URLs is allowed or false otherwise.

source

pub fn is_auto_load_images(&self) -> bool

Get the #WebKitSettings:auto-load-images property.

§Returns

true If auto loading of images is enabled or false otherwise.

source

pub fn cursive_font_family(&self) -> Option<GString>

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

§Returns

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

source

pub fn default_charset(&self) -> Option<GString>

Gets the #WebKitSettings:default-charset property.

§Returns

Default charset.

source

pub fn default_font_family(&self) -> Option<GString>

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

§Returns

The default font family used to display content that does not specify a font.

source

pub fn default_font_size(&self) -> u32

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

§Returns

The default font size, in pixels.

source

pub fn default_monospace_font_size(&self) -> u32

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

§Returns

Default monospace font size, in pixels.

source

pub fn is_disable_web_security(&self) -> bool

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

§Returns

true If web security support is disabled or false otherwise.

source

pub fn draws_compositing_indicators(&self) -> bool

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

§Returns

true If compositing borders are drawn or false otherwise.

source

pub fn enables_2d_canvas_acceleration(&self) -> bool

Available on crate feature v2_46 only.

Get the #WebKitSettings:enable-2d-canvas-acceleration property.

§Returns

true if 2D canvas acceleration is enabled or false otherwise.

source

pub fn enables_back_forward_navigation_gestures(&self) -> bool

Get the #WebKitSettings:enable-back-forward-navigation-gestures property.

§Returns

true if horizontal swipe gesture will trigger back-forward navigaiton or false otherwise.

source

pub fn enables_caret_browsing(&self) -> bool

Get the #WebKitSettings:enable-caret-browsing property.

§Returns

true If caret browsing is enabled or false otherwise.

source

pub fn enables_developer_extras(&self) -> bool

Get the #WebKitSettings:enable-developer-extras property.

§Returns

true If developer extras is enabled or false otherwise.

source

pub fn enables_dns_prefetching(&self) -> bool

Get the #WebKitSettings:enable-dns-prefetching property.

§Returns

true If DNS prefetching is enabled or false otherwise.

source

pub fn enables_encrypted_media(&self) -> bool

Get the #WebKitSettings:enable-encrypted-media property.

§Returns

true if EncryptedMedia support is enabled or false otherwise.

source

pub fn enables_fullscreen(&self) -> bool

Get the #WebKitSettings:enable-fullscreen property.

§Returns

true If fullscreen support is enabled or false otherwise.

source

pub fn enables_html5_database(&self) -> bool

Get the #WebKitSettings:enable-html5-database property.

§Returns

true if IndexedDB support is enabled or false otherwise.

source

pub fn enables_html5_local_storage(&self) -> bool

Get the #WebKitSettings:enable-html5-local-storage property.

§Returns

true If HTML5 local storage support is enabled or false otherwise.

Get the #WebKitSettings:enable-hyperlink-auditing property.

§Returns

true If hyper link auditing is enabled or false otherwise.

source

pub fn enables_javascript(&self) -> bool

Get the #WebKitSettings:enable-javascript property.

§Returns

true If JavaScript is enabled or false otherwise.

source

pub fn enables_javascript_markup(&self) -> bool

Get the #WebKitSettings:enable-javascript-markup property.

§Returns

true if JavaScript markup is enabled or false otherwise.

source

pub fn enables_media(&self) -> bool

Get the #WebKitSettings:enable-media property.

§Returns

true if media support is enabled or false otherwise.

source

pub fn enables_media_capabilities(&self) -> bool

Get the #WebKitSettings:enable-media-capabilities property.

§Returns

true if MediaCapabilities support is enabled or false otherwise.

source

pub fn enables_media_stream(&self) -> bool

Get the #WebKitSettings:enable-media-stream property.

§Returns

true If mediastream support is enabled or false otherwise.

source

pub fn enables_mediasource(&self) -> bool

Get the #WebKitSettings:enable-mediasource property.

§Returns

true If MediaSource support is enabled or false otherwise.

source

pub fn enables_mock_capture_devices(&self) -> bool

Get the #WebKitSettings:enable-mock-capture-devices property.

§Returns

true If mock capture devices is enabled or false otherwise.

source

pub fn enables_offline_web_application_cache(&self) -> bool

👎Deprecated: Since 2.44

Get the #WebKitSettings:enable-offline-web-application-cache property.

§Deprecated since 2.44
§Returns

false.

source

pub fn enables_page_cache(&self) -> bool

Get the #WebKitSettings:enable-page-cache property.

§Returns

true if page cache enabled or false otherwise.

source

pub fn enables_resizable_text_areas(&self) -> bool

Get the #WebKitSettings:enable-resizable-text-areas property.

§Returns

true If text areas can be resized or false otherwise.

source

pub fn enables_site_specific_quirks(&self) -> bool

Get the #WebKitSettings:enable-site-specific-quirks property.

§Returns

true if site specific quirks are enabled or false otherwise.

source

pub fn enables_smooth_scrolling(&self) -> bool

Get the #WebKitSettings:enable-smooth-scrolling property.

§Returns

true if smooth scrolling is enabled or false otherwise.

source

pub fn enables_spatial_navigation(&self) -> bool

Get the #WebKitSettings:enable-spatial-navigation property.

§Returns

true If HTML5 spatial navigation support is enabled or false otherwise.

Get the #WebKitSettings:enable-tabs-to-links property.

§Returns

true If tabs to link is enabled or false otherwise.

source

pub fn enables_webaudio(&self) -> bool

Get the #WebKitSettings:enable-webaudio property.

§Returns

true If webaudio support is enabled or false otherwise.

source

pub fn enables_webgl(&self) -> bool

Get the #WebKitSettings:enable-webgl property.

§Returns

true If WebGL support is enabled or false otherwise.

source

pub fn enables_webrtc(&self) -> bool

Get the enable-webrtc property.

§Returns

true If WebRTC support is enabled or false otherwise.

source

pub fn enables_write_console_messages_to_stdout(&self) -> bool

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

§Returns

true if writing console messages to stdout is enabled or false otherwise.

source

pub fn fantasy_font_family(&self) -> Option<GString>

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

§Returns

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

source

pub fn is_feature_enabled(&self, feature: &Feature) -> bool

Available on crate feature v2_42 only.

Gets whether a feature is enabled.

§feature

the feature to toggle.

§Returns

Whether the feature is enabled.

source

pub fn hardware_acceleration_policy(&self) -> HardwareAccelerationPolicy

Get the #WebKitSettings:hardware-acceleration-policy property.

§Returns

a #WebKitHardwareAccelerationPolicy

source

pub fn is_javascript_can_access_clipboard(&self) -> bool

Get the #WebKitSettings:javascript-can-access-clipboard property.

§Returns

true If javascript-can-access-clipboard is enabled or false otherwise.

source

pub fn is_javascript_can_open_windows_automatically(&self) -> bool

Get the #WebKitSettings:javascript-can-open-windows-automatically property.

§Returns

true If JavaScript can open window automatically or false otherwise.

source

pub fn is_load_icons_ignoring_image_load_setting(&self) -> bool

👎Deprecated: Since 2.42

Setting no longer supported. This function returns false.

§Deprecated since 2.42
§Returns

false

source

pub fn media_content_types_requiring_hardware_support(&self) -> Option<GString>

Gets the #WebKitSettings:media-content-types-requiring-hardware-support property.

§Returns

Media content types requiring hardware support, or None.

source

pub fn is_media_playback_allows_inline(&self) -> bool

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.

source

pub fn is_media_playback_requires_user_gesture(&self) -> bool

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.

source

pub fn minimum_font_size(&self) -> u32

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

§Returns

Minimum font size, in pixels.

source

pub fn monospace_font_family(&self) -> Option<GString>

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

§Returns

Default font family used to display content marked with monospace font.

source

pub fn pictograph_font_family(&self) -> Option<GString>

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

§Returns

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

source

pub fn is_print_backgrounds(&self) -> bool

Get the #WebKitSettings:print-backgrounds property.

§Returns

true If background images should be printed or false otherwise.

source

pub fn sans_serif_font_family(&self) -> Option<GString>

Gets the #WebKitSettings:sans-serif-font-family property.

§Returns

The default font family used to display content marked with sans-serif font.

source

pub fn serif_font_family(&self) -> Option<GString>

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

§Returns

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

source

pub fn user_agent(&self) -> Option<GString>

Get the #WebKitSettings:user-agent property.

§Returns

The current value of the user-agent property.

source

pub fn is_zoom_text_only(&self) -> bool

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.

source

pub fn set_allow_file_access_from_file_urls(&self, allowed: bool)

Set the #WebKitSettings:allow-file-access-from-file-urls property.

§allowed

Value to be set

source

pub fn set_allow_modal_dialogs(&self, allowed: bool)

Set the #WebKitSettings:allow-modal-dialogs property.

§allowed

Value to be set

source

pub fn set_allow_top_navigation_to_data_urls(&self, allowed: bool)

Set the #WebKitSettings:allow-top-navigation-to-data-urls property.

§allowed

Value to be set

source

pub fn set_allow_universal_access_from_file_urls(&self, allowed: bool)

Set the #WebKitSettings:allow-universal-access-from-file-urls property.

§allowed

Value to be set

source

pub fn set_auto_load_images(&self, enabled: bool)

Set the #WebKitSettings:auto-load-images property.

§enabled

Value to be set

source

pub fn set_cursive_font_family(&self, cursive_font_family: &str)

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

§cursive_font_family

the new default cursive font family

source

pub fn set_default_charset(&self, default_charset: &str)

Set the #WebKitSettings:default-charset property.

§default_charset

default charset to be set

source

pub fn set_default_font_family(&self, default_font_family: &str)

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

§default_font_family

the new default font family

source

pub fn set_default_font_size(&self, font_size: u32)

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

§font_size

default font size to be set in pixels

source

pub fn set_default_monospace_font_size(&self, font_size: u32)

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

§font_size

default monospace font size to be set in pixels

source

pub fn set_disable_web_security(&self, disabled: bool)

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

§disabled

Value to be set

source

pub fn set_draw_compositing_indicators(&self, enabled: bool)

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

§enabled

Value to be set

source

pub fn set_enable_2d_canvas_acceleration(&self, enabled: bool)

Available on crate feature v2_46 only.

Set the #WebKitSettings:enable-2d-canvas-acceleration property.

§enabled

Value to be set

source

pub fn set_enable_back_forward_navigation_gestures(&self, enabled: bool)

Set the #WebKitSettings:enable-back-forward-navigation-gestures property.

§enabled

value to be set

source

pub fn set_enable_caret_browsing(&self, enabled: bool)

Set the #WebKitSettings:enable-caret-browsing property.

§enabled

Value to be set

source

pub fn set_enable_developer_extras(&self, enabled: bool)

Set the #WebKitSettings:enable-developer-extras property.

§enabled

Value to be set

source

pub fn set_enable_dns_prefetching(&self, enabled: bool)

Set the #WebKitSettings:enable-dns-prefetching property.

§enabled

Value to be set

source

pub fn set_enable_encrypted_media(&self, enabled: bool)

Set the #WebKitSettings:enable-encrypted-media property.

§enabled

Value to be set

source

pub fn set_enable_fullscreen(&self, enabled: bool)

Set the #WebKitSettings:enable-fullscreen property.

§enabled

Value to be set

source

pub fn set_enable_html5_database(&self, enabled: bool)

Set the #WebKitSettings:enable-html5-database property.

§enabled

Value to be set

source

pub fn set_enable_html5_local_storage(&self, enabled: bool)

Set the #WebKitSettings:enable-html5-local-storage property.

§enabled

Value to be set

Set the #WebKitSettings:enable-hyperlink-auditing property.

§enabled

Value to be set

source

pub fn set_enable_javascript(&self, enabled: bool)

Set the #WebKitSettings:enable-javascript property.

§enabled

Value to be set

source

pub fn set_enable_javascript_markup(&self, enabled: bool)

Set the #WebKitSettings:enable-javascript-markup property.

§enabled

Value to be set

source

pub fn set_enable_media(&self, enabled: bool)

Set the #WebKitSettings:enable-media property.

§enabled

Value to be set

source

pub fn set_enable_media_capabilities(&self, enabled: bool)

Set the #WebKitSettings:enable-media-capabilities property.

§enabled

Value to be set

source

pub fn set_enable_media_stream(&self, enabled: bool)

Set the #WebKitSettings:enable-media-stream property.

§enabled

Value to be set

source

pub fn set_enable_mediasource(&self, enabled: bool)

Set the #WebKitSettings:enable-mediasource property.

§enabled

Value to be set

source

pub fn set_enable_mock_capture_devices(&self, enabled: bool)

Set the #WebKitSettings:enable-mock-capture-devices property.

§enabled

Value to be set

source

pub fn set_enable_offline_web_application_cache(&self, enabled: bool)

👎Deprecated: Since 2.44

Setting no longer supported. This function does nothing.

§Deprecated since 2.44
§enabled

Value to be set

source

pub fn set_enable_page_cache(&self, enabled: bool)

Set the #WebKitSettings:enable-page-cache property.

§enabled

Value to be set

source

pub fn set_enable_resizable_text_areas(&self, enabled: bool)

Set the #WebKitSettings:enable-resizable-text-areas property.

§enabled

Value to be set

source

pub fn set_enable_site_specific_quirks(&self, enabled: bool)

Set the #WebKitSettings:enable-site-specific-quirks property.

§enabled

Value to be set

source

pub fn set_enable_smooth_scrolling(&self, enabled: bool)

Set the #WebKitSettings:enable-smooth-scrolling property.

§enabled

Value to be set

source

pub fn set_enable_spatial_navigation(&self, enabled: bool)

Set the #WebKitSettings:enable-spatial-navigation property.

§enabled

Value to be set

Set the #WebKitSettings:enable-tabs-to-links property.

§enabled

Value to be set

source

pub fn set_enable_webaudio(&self, enabled: bool)

Set the #WebKitSettings:enable-webaudio property.

§enabled

Value to be set

source

pub fn set_enable_webgl(&self, enabled: bool)

Set the #WebKitSettings:enable-webgl property.

§enabled

Value to be set

source

pub fn set_enable_webrtc(&self, enabled: bool)

Set the enable-webrtc property.

Setting this property to true implies the media-stream web-setting will also be enabled.

§enabled

Value to be set

source

pub fn set_enable_write_console_messages_to_stdout(&self, enabled: bool)

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

§enabled

Value to be set

source

pub fn set_fantasy_font_family(&self, fantasy_font_family: &str)

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

§fantasy_font_family

the new default fantasy font family

source

pub fn set_feature_enabled(&self, feature: &Feature, enabled: bool)

Available on crate feature v2_42 only.

Enables or disables a feature.

The current status of the feature can be determined with [Settings::get_feature_enabled][crate::Settings::get_feature_enabled]. To reset a feature to its initial status, pass the value returned by [Feature::get_default_value][crate::Feature::get_default_value] as the @enabled parameter.

§feature

the feature to toggle.

§enabled

whether the feature will be enabled.

source

pub fn set_hardware_acceleration_policy( &self, policy: HardwareAccelerationPolicy, )

Set the #WebKitSettings:hardware-acceleration-policy property.

§policy

a #WebKitHardwareAccelerationPolicy

source

pub fn set_javascript_can_access_clipboard(&self, enabled: bool)

Set the #WebKitSettings:javascript-can-access-clipboard property.

§enabled

Value to be set

source

pub fn set_javascript_can_open_windows_automatically(&self, enabled: bool)

Set the #WebKitSettings:javascript-can-open-windows-automatically property.

§enabled

Value to be set

source

pub fn set_load_icons_ignoring_image_load_setting(&self, enabled: bool)

👎Deprecated: Since 2.42

Setting no longer supported. This function does nothing.

§Deprecated since 2.42
§enabled

Value to be set

source

pub fn set_media_content_types_requiring_hardware_support( &self, content_types: Option<&str>, )

Set the #WebKitSettings:media-content-types-requiring-hardware-support property.

§content_types

list of media content types requiring hardware support split by semicolons (:) or None to use the default value.

source

pub fn set_media_playback_allows_inline(&self, enabled: bool)

Set the #WebKitSettings:media-playback-allows-inline property.

§enabled

Value to be set

source

pub fn set_media_playback_requires_user_gesture(&self, enabled: bool)

Set the #WebKitSettings:media-playback-requires-user-gesture property.

§enabled

Value to be set

source

pub fn set_minimum_font_size(&self, font_size: u32)

Set the #WebKitSettings:minimum-font-size property.

§font_size

minimum font size to be set in pixels

source

pub fn set_monospace_font_family(&self, monospace_font_family: &str)

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

§monospace_font_family

the new default monospace font family

source

pub fn set_pictograph_font_family(&self, pictograph_font_family: &str)

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

§pictograph_font_family

the new default pictograph font family

source

pub fn set_print_backgrounds(&self, print_backgrounds: bool)

Set the #WebKitSettings:print-backgrounds property.

Value to be set

source

pub fn set_sans_serif_font_family(&self, sans_serif_font_family: &str)

Set the #WebKitSettings:sans-serif-font-family property.

§sans_serif_font_family

the new default sans-serif font family

source

pub fn set_serif_font_family(&self, serif_font_family: &str)

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

§serif_font_family

the new default serif font family

source

pub fn set_user_agent(&self, user_agent: Option<&str>)

Set the #WebKitSettings:user-agent property.

§user_agent

The new custom user agent string or None to use the default user agent

source

pub fn set_user_agent_with_application_details( &self, application_name: Option<&str>, application_version: Option<&str>, )

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.

§application_name

The application name used for the user agent or None to use the default user agent.

§application_version

The application version for the user agent or None to user the default version.

source

pub fn set_zoom_text_only(&self, zoom_text_only: bool)

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

§zoom_text_only

Value to be set

source

pub fn font_size_to_pixels(points: u32) -> u32

Convert @points 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 of #WebKitSettings.

§points

the font size in points to convert to pixels

§Returns

the equivalent font size in pixels.

source

pub fn font_size_to_points(pixels: u32) -> u32

Convert @pixels 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 of #WebKitSettings.

§pixels

the font size in pixels to convert to points

§Returns

the equivalent font size in points.

source

pub fn all_features() -> Option<FeatureList>

Available on crate feature v2_42 only.

Gets the list of all available WebKit features.

Features can be toggled with set_feature_enabled(), and their current state determined with is_feature_enabled().

Note that most applications should use get_development_features() and get_experimental_features() instead.

§Returns

List of all features.

source

pub fn development_features() -> Option<FeatureList>

Available on crate feature v2_42 only.

Gets the list of available development WebKit features.

The returned features are a subset of those returned by get_all_features(), 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.

source

pub fn experimental_features() -> Option<FeatureList>

Available on crate feature v2_42 only.

Gets the list of available experimental WebKit features.

The returned features are a subset of those returned by get_all_features(), and includes those which certain applications may want to expose to end users; see FeatureStatus for more details.

§Returns

List of experimental features.

source

pub fn connect_allow_file_access_from_file_urls_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

source

pub fn connect_allow_modal_dialogs_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

source

pub fn connect_allow_top_navigation_to_data_urls_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

source

pub fn connect_allow_universal_access_from_file_urls_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

source

pub fn connect_auto_load_images_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

source

pub fn connect_cursive_font_family_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

source

pub fn connect_default_charset_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

source

pub fn connect_default_font_family_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

source

pub fn connect_default_font_size_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

source

pub fn connect_default_monospace_font_size_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

source

pub fn connect_disable_web_security_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

source

pub fn connect_draw_compositing_indicators_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

source

pub fn connect_enable_2d_canvas_acceleration_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Available on crate feature v2_46 only.
source

pub fn connect_enable_back_forward_navigation_gestures_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

source

pub fn connect_enable_caret_browsing_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

source

pub fn connect_enable_developer_extras_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

source

pub fn connect_enable_dns_prefetching_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

source

pub fn connect_enable_encrypted_media_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

source

pub fn connect_enable_fullscreen_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

source

pub fn connect_enable_html5_database_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

source

pub fn connect_enable_html5_local_storage_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

source

pub fn connect_enable_javascript_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

source

pub fn connect_enable_javascript_markup_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

source

pub fn connect_enable_media_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

source

pub fn connect_enable_media_capabilities_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

source

pub fn connect_enable_media_stream_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

source

pub fn connect_enable_mediasource_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

source

pub fn connect_enable_mock_capture_devices_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

source

pub fn connect_enable_offline_web_application_cache_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

👎Deprecated: Since 2.44
source

pub fn connect_enable_page_cache_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

source

pub fn connect_enable_resizable_text_areas_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

source

pub fn connect_enable_site_specific_quirks_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

source

pub fn connect_enable_smooth_scrolling_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

source

pub fn connect_enable_spatial_navigation_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

source

pub fn connect_enable_webaudio_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

source

pub fn connect_enable_webgl_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

source

pub fn connect_enable_webrtc_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

source

pub fn connect_enable_write_console_messages_to_stdout_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

source

pub fn connect_fantasy_font_family_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

source

pub fn connect_hardware_acceleration_policy_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

source

pub fn connect_javascript_can_access_clipboard_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

source

pub fn connect_javascript_can_open_windows_automatically_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

source

pub fn connect_load_icons_ignoring_image_load_setting_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

👎Deprecated: Since 2.42
source

pub fn connect_media_content_types_requiring_hardware_support_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

source

pub fn connect_media_playback_allows_inline_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

source

pub fn connect_media_playback_requires_user_gesture_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

source

pub fn connect_minimum_font_size_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

source

pub fn connect_monospace_font_family_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

source

pub fn connect_pictograph_font_family_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

source

pub fn connect_print_backgrounds_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

source

pub fn connect_sans_serif_font_family_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

source

pub fn connect_serif_font_family_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

source

pub fn connect_user_agent_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

source

pub fn connect_zoom_text_only_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Trait Implementations§

source§

impl Clone for Settings

source§

fn clone(&self) -> Self

Makes a clone of this shared reference.

This increments the strong reference count of the object. Dropping the object will decrement it again.

1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Settings

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Settings

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl HasParamSpec for Settings

§

type ParamSpec = ParamSpecObject

§

type SetValue = Settings

Preferred value to be used as setter for the associated ParamSpec.
§

type BuilderFn = fn(_: &str) -> ParamSpecObjectBuilder<'_, Settings>

source§

fn param_spec_builder() -> Self::BuilderFn

source§

impl Hash for Settings

source§

fn hash<H>(&self, state: &mut H)
where H: Hasher,

Hashes the memory address of this object.

1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Ord for Settings

source§

fn cmp(&self, other: &Self) -> Ordering

Comparison for two GObjects.

Compares the memory addresses of the provided objects.

1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl ParentClassIs for Settings

source§

impl<OT: ObjectType> PartialEq<OT> for Settings

source§

fn eq(&self, other: &OT) -> bool

Equality for two GObjects.

Two GObjects are equal if their memory addresses are equal.

1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<OT: ObjectType> PartialOrd<OT> for Settings

source§

fn partial_cmp(&self, other: &OT) -> Option<Ordering>

Partial comparison for two GObjects.

Compares the memory addresses of the provided objects.

1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl StaticType for Settings

source§

fn static_type() -> Type

Returns the type identifier of Self.
source§

impl Eq for Settings

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> Cast for T
where T: ObjectType,

source§

fn upcast<T>(self) -> T
where T: ObjectType, Self: IsA<T>,

Upcasts an object to a superclass or interface T. Read more
source§

fn upcast_ref<T>(&self) -> &T
where T: ObjectType, Self: IsA<T>,

Upcasts an object to a reference of its superclass or interface T. Read more
source§

fn downcast<T>(self) -> Result<T, Self>
where T: ObjectType, Self: MayDowncastTo<T>,

Tries to downcast to a subclass or interface implementor T. Read more
source§

fn downcast_ref<T>(&self) -> Option<&T>
where T: ObjectType, Self: MayDowncastTo<T>,

Tries to downcast to a reference of its subclass or interface implementor T. Read more
source§

fn dynamic_cast<T>(self) -> Result<T, Self>
where T: ObjectType,

Tries to cast to an object of type T. This handles upcasting, downcasting and casting between interface and interface implementors. All checks are performed at runtime, while upcast will do many checks at compile-time already. downcast will perform the same checks at runtime as dynamic_cast, but will also ensure some amount of compile-time safety. Read more
source§

fn dynamic_cast_ref<T>(&self) -> Option<&T>
where T: ObjectType,

Tries to cast to reference to an object of type T. This handles upcasting, downcasting and casting between interface and interface implementors. All checks are performed at runtime, while downcast and upcast will do many checks at compile-time already. Read more
source§

unsafe fn unsafe_cast<T>(self) -> T
where T: ObjectType,

Casts to T unconditionally. Read more
source§

unsafe fn unsafe_cast_ref<T>(&self) -> &T
where T: ObjectType,

Casts to &T unconditionally. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

default unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for T

source§

unsafe fn from_glib_none_num_as_vec(ptr: *const GList, num: usize) -> Vec<T>

source§

unsafe fn from_glib_container_num_as_vec(_: *const GList, _: usize) -> Vec<T>

source§

unsafe fn from_glib_full_num_as_vec(_: *const GList, _: usize) -> Vec<T>

source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for T

source§

unsafe fn from_glib_none_num_as_vec(ptr: *const GPtrArray, num: usize) -> Vec<T>

source§

unsafe fn from_glib_container_num_as_vec( _: *const GPtrArray, _: usize, ) -> Vec<T>

source§

unsafe fn from_glib_full_num_as_vec(_: *const GPtrArray, _: usize) -> Vec<T>

source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for T

source§

unsafe fn from_glib_none_num_as_vec(ptr: *const GSList, num: usize) -> Vec<T>

source§

unsafe fn from_glib_container_num_as_vec(_: *const GSList, _: usize) -> Vec<T>

source§

unsafe fn from_glib_full_num_as_vec(_: *const GSList, _: usize) -> Vec<T>

source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for T

source§

unsafe fn from_glib_none_num_as_vec(ptr: *mut GList, num: usize) -> Vec<T>

source§

unsafe fn from_glib_container_num_as_vec(ptr: *mut GList, num: usize) -> Vec<T>

source§

unsafe fn from_glib_full_num_as_vec(ptr: *mut GList, num: usize) -> Vec<T>

source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for T

source§

unsafe fn from_glib_none_num_as_vec(ptr: *mut GPtrArray, num: usize) -> Vec<T>

source§

unsafe fn from_glib_container_num_as_vec( ptr: *mut GPtrArray, num: usize, ) -> Vec<T>

source§

unsafe fn from_glib_full_num_as_vec(ptr: *mut GPtrArray, num: usize) -> Vec<T>

source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for T

source§

unsafe fn from_glib_none_num_as_vec(ptr: *mut GSList, num: usize) -> Vec<T>

source§

unsafe fn from_glib_container_num_as_vec(ptr: *mut GSList, num: usize) -> Vec<T>

source§

unsafe fn from_glib_full_num_as_vec(ptr: *mut GSList, num: usize) -> Vec<T>

source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for T

source§

unsafe fn from_glib_none_as_vec(ptr: *const GList) -> Vec<T>

source§

unsafe fn from_glib_container_as_vec(_: *const GList) -> Vec<T>

source§

unsafe fn from_glib_full_as_vec(_: *const GList) -> Vec<T>

source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for T

source§

unsafe fn from_glib_none_as_vec(ptr: *const GPtrArray) -> Vec<T>

source§

unsafe fn from_glib_container_as_vec(_: *const GPtrArray) -> Vec<T>

source§

unsafe fn from_glib_full_as_vec(_: *const GPtrArray) -> Vec<T>

source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for T

source§

unsafe fn from_glib_none_as_vec(ptr: *const GSList) -> Vec<T>

source§

unsafe fn from_glib_container_as_vec(_: *const GSList) -> Vec<T>

source§

unsafe fn from_glib_full_as_vec(_: *const GSList) -> Vec<T>

source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for T

source§

unsafe fn from_glib_none_as_vec(ptr: *mut GList) -> Vec<T>

source§

unsafe fn from_glib_container_as_vec(ptr: *mut GList) -> Vec<T>

source§

unsafe fn from_glib_full_as_vec(ptr: *mut GList) -> Vec<T>

source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for T

source§

unsafe fn from_glib_none_as_vec(ptr: *mut GPtrArray) -> Vec<T>

source§

unsafe fn from_glib_container_as_vec(ptr: *mut GPtrArray) -> Vec<T>

source§

unsafe fn from_glib_full_as_vec(ptr: *mut GPtrArray) -> Vec<T>

source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for T

source§

unsafe fn from_glib_none_as_vec(ptr: *mut GSList) -> Vec<T>

source§

unsafe fn from_glib_container_as_vec(ptr: *mut GSList) -> Vec<T>

source§

unsafe fn from_glib_full_as_vec(ptr: *mut GSList) -> Vec<T>

source§

impl<O> GObjectPropertyExpressionExt for O
where O: IsA<Object>,

source§

fn property_expression(&self, property_name: &str) -> PropertyExpression

Create an expression looking up an object’s property.
source§

fn property_expression_weak(&self, property_name: &str) -> PropertyExpression

Create an expression looking up an object’s property with a weak reference.
source§

fn this_expression(property_name: &str) -> PropertyExpression

Create an expression looking up a property in the bound this object.
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoClosureReturnValue for T
where T: Into<Value>,

source§

impl<U> IsSubclassableExt for U

source§

impl<T> ObjectExt for T
where T: ObjectType,

source§

fn is<U>(&self) -> bool
where U: StaticType,

Returns true if the object is an instance of (can be cast to) T.
source§

fn type_(&self) -> Type

Returns the type of the object.
source§

fn object_class(&self) -> &Class<Object>

Returns the ObjectClass of the object. Read more
source§

fn class(&self) -> &Class<T>
where T: IsClass,

Returns the class of the object.
source§

fn class_of<U>(&self) -> Option<&Class<U>>
where U: IsClass,

Returns the class of the object in the given type T. Read more
source§

fn interface<U>(&self) -> Option<InterfaceRef<'_, U>>
where U: IsInterface,

Returns the interface T of the object. Read more
source§

fn set_property(&self, property_name: &str, value: impl Into<Value>)

Sets the property property_name of the object to value value. Read more
source§

fn set_property_from_value(&self, property_name: &str, value: &Value)

Sets the property property_name of the object to value value. Read more
source§

fn set_properties(&self, property_values: &[(&str, &dyn ToValue)])

Sets multiple properties of the object at once. Read more
source§

fn set_properties_from_value(&self, property_values: &[(&str, Value)])

Sets multiple properties of the object at once. Read more
source§

fn property<V>(&self, property_name: &str) -> V
where V: for<'b> FromValue<'b> + 'static,

Gets the property property_name of the object and cast it to the type V. Read more
source§

fn property_value(&self, property_name: &str) -> Value

Gets the property property_name of the object. Read more
source§

fn has_property(&self, property_name: &str, type_: Option<Type>) -> bool

Check if the object has a property property_name of the given type_. Read more
source§

fn property_type(&self, property_name: &str) -> Option<Type>

Get the type of the property property_name of this object. Read more
source§

fn find_property(&self, property_name: &str) -> Option<ParamSpec>

Get the ParamSpec of the property property_name of this object.
source§

fn list_properties(&self) -> PtrSlice<ParamSpec>

Return all ParamSpec of the properties of this object.
source§

fn freeze_notify(&self) -> PropertyNotificationFreezeGuard

Freeze all property notifications until the return guard object is dropped. Read more
source§

unsafe fn set_qdata<QD>(&self, key: Quark, value: QD)
where QD: 'static,

Set arbitrary data on this object with the given key. Read more
source§

unsafe fn qdata<QD>(&self, key: Quark) -> Option<NonNull<QD>>
where QD: 'static,

Return previously set arbitrary data of this object with the given key. Read more
source§

unsafe fn steal_qdata<QD>(&self, key: Quark) -> Option<QD>
where QD: 'static,

Retrieve previously set arbitrary data of this object with the given key. Read more
source§

unsafe fn set_data<QD>(&self, key: &str, value: QD)
where QD: 'static,

Set arbitrary data on this object with the given key. Read more
source§

unsafe fn data<QD>(&self, key: &str) -> Option<NonNull<QD>>
where QD: 'static,

Return previously set arbitrary data of this object with the given key. Read more
source§

unsafe fn steal_data<QD>(&self, key: &str) -> Option<QD>
where QD: 'static,

Retrieve previously set arbitrary data of this object with the given key. Read more
source§

fn block_signal(&self, handler_id: &SignalHandlerId)

Block a given signal handler. Read more
source§

fn unblock_signal(&self, handler_id: &SignalHandlerId)

Unblock a given signal handler.
source§

fn stop_signal_emission(&self, signal_id: SignalId, detail: Option<Quark>)

Stop emission of the currently emitted signal.
source§

fn stop_signal_emission_by_name(&self, signal_name: &str)

Stop emission of the currently emitted signal by the (possibly detailed) signal name.
source§

fn connect<F>( &self, signal_name: &str, after: bool, callback: F, ) -> SignalHandlerId
where F: Fn(&[Value]) -> Option<Value> + Send + Sync + 'static,

Connect to the signal signal_name on this object. Read more
source§

fn connect_id<F>( &self, signal_id: SignalId, details: Option<Quark>, after: bool, callback: F, ) -> SignalHandlerId
where F: Fn(&[Value]) -> Option<Value> + Send + Sync + 'static,

Connect to the signal signal_id on this object. Read more
source§

fn connect_local<F>( &self, signal_name: &str, after: bool, callback: F, ) -> SignalHandlerId
where F: Fn(&[Value]) -> Option<Value> + 'static,

Connect to the signal signal_name on this object. Read more
source§

fn connect_local_id<F>( &self, signal_id: SignalId, details: Option<Quark>, after: bool, callback: F, ) -> SignalHandlerId
where F: Fn(&[Value]) -> Option<Value> + 'static,

Connect to the signal signal_id on this object. Read more
source§

unsafe fn connect_unsafe<F>( &self, signal_name: &str, after: bool, callback: F, ) -> SignalHandlerId
where F: Fn(&[Value]) -> Option<Value>,

Connect to the signal signal_name on this object. Read more
source§

unsafe fn connect_unsafe_id<F>( &self, signal_id: SignalId, details: Option<Quark>, after: bool, callback: F, ) -> SignalHandlerId
where F: Fn(&[Value]) -> Option<Value>,

Connect to the signal signal_id on this object. Read more
source§

fn connect_closure( &self, signal_name: &str, after: bool, closure: RustClosure, ) -> SignalHandlerId

Connect a closure to the signal signal_name on this object. Read more
source§

fn connect_closure_id( &self, signal_id: SignalId, details: Option<Quark>, after: bool, closure: RustClosure, ) -> SignalHandlerId

Connect a closure to the signal signal_id on this object. Read more
source§

fn watch_closure(&self, closure: &impl AsRef<Closure>)

Limits the lifetime of closure to the lifetime of the object. When the object’s reference count drops to zero, the closure will be invalidated. An invalidated closure will ignore any calls to invoke_with_values, or invoke when using Rust closures.
source§

fn emit<R>(&self, signal_id: SignalId, args: &[&dyn ToValue]) -> R

Emit signal by signal id. Read more
source§

fn emit_with_values(&self, signal_id: SignalId, args: &[Value]) -> Option<Value>

Same as Self::emit but takes Value for the arguments.
source§

fn emit_by_name<R>(&self, signal_name: &str, args: &[&dyn ToValue]) -> R

Emit signal by its name. Read more
source§

fn emit_by_name_with_values( &self, signal_name: &str, args: &[Value], ) -> Option<Value>

Emit signal by its name. Read more
source§

fn emit_by_name_with_details<R>( &self, signal_name: &str, details: Quark, args: &[&dyn ToValue], ) -> R

Emit signal by its name with details. Read more
source§

fn emit_by_name_with_details_and_values( &self, signal_name: &str, details: Quark, args: &[Value], ) -> Option<Value>

Emit signal by its name with details. Read more
source§

fn emit_with_details<R>( &self, signal_id: SignalId, details: Quark, args: &[&dyn ToValue], ) -> R

Emit signal by signal id with details. Read more
source§

fn emit_with_details_and_values( &self, signal_id: SignalId, details: Quark, args: &[Value], ) -> Option<Value>

Emit signal by signal id with details. Read more
source§

fn disconnect(&self, handler_id: SignalHandlerId)

Disconnect a previously connected signal handler.
source§

fn connect_notify<F>(&self, name: Option<&str>, f: F) -> SignalHandlerId
where F: Fn(&T, &ParamSpec) + Send + Sync + 'static,

Connect to the notify signal of the object. Read more
source§

fn connect_notify_local<F>(&self, name: Option<&str>, f: F) -> SignalHandlerId
where F: Fn(&T, &ParamSpec) + 'static,

Connect to the notify signal of the object. Read more
source§

unsafe fn connect_notify_unsafe<F>( &self, name: Option<&str>, f: F, ) -> SignalHandlerId
where F: Fn(&T, &ParamSpec),

Connect to the notify signal of the object. Read more
source§

fn notify(&self, property_name: &str)

Notify that the given property has changed its value. Read more
source§

fn notify_by_pspec(&self, pspec: &ParamSpec)

Notify that the given property has changed its value. Read more
source§

fn downgrade(&self) -> WeakRef<T>

Downgrade this object to a weak reference.
source§

fn add_weak_ref_notify<F>(&self, f: F) -> WeakRefNotify<T>
where F: FnOnce() + Send + 'static,

Add a callback to be notified when the Object is disposed.
source§

fn add_weak_ref_notify_local<F>(&self, f: F) -> WeakRefNotify<T>
where F: FnOnce() + 'static,

Add a callback to be notified when the Object is disposed. Read more
source§

fn bind_property<'a, 'f, 't, O>( &'a self, source_property: &'a str, target: &'a O, target_property: &'a str, ) -> BindingBuilder<'a, 'f, 't>
where O: ObjectType,

Bind property source_property on this object to the target_property on the target object. Read more
source§

fn ref_count(&self) -> u32

Returns the strong reference count of this object.
source§

unsafe fn run_dispose(&self)

Runs the dispose mechanism of the object. Read more
source§

impl<T> Property for T
where T: HasParamSpec,

§

type Value = T

source§

impl<T> PropertyGet for T
where T: HasParamSpec,

§

type Value = T

source§

fn get<R, F>(&self, f: F) -> R
where F: Fn(&<T as PropertyGet>::Value) -> R,

source§

impl<T> StaticTypeExt for T
where T: StaticType,

source§

fn ensure_type()

Ensures that the type has been registered with the type system.
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> TransparentType for T

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T> TryFromClosureReturnValue for T
where T: for<'a> FromValue<'a> + StaticType + 'static,

source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<'a, T, C, E> FromValueOptional<'a> for T
where T: FromValue<'a, Checker = C>, C: ValueTypeChecker<Error = ValueTypeMismatchOrNoneError<E>>, E: Error + Send + 'static,

source§

impl<Super, Sub> MayDowncastTo<Sub> for Super
where Super: IsA<Super>, Sub: IsA<Super>,