Skip to main content

webkit6/auto/
settings.rs

1// This file was generated by gir (https://github.com/gtk-rs/gir)
2// from gir-files (https://github.com/gtk-rs/gir-files)
3// from webkit-gir-files
4// DO NOT EDIT
5#![allow(deprecated)]
6
7#[cfg(feature = "v2_42")]
8#[cfg_attr(docsrs, doc(cfg(feature = "v2_42")))]
9use crate::{Feature, FeatureList};
10use crate::{HardwareAccelerationPolicy, ffi};
11use glib::{
12    prelude::*,
13    signal::{SignalHandlerId, connect_raw},
14    translate::*,
15};
16use std::boxed::Box as Box_;
17
18glib::wrapper! {
19    /// Control the behaviour of a [`WebView`][crate::WebView].
20    ///
21    /// [`Settings`][crate::Settings] can be applied to a [`WebView`][crate::WebView] to control text charset,
22    /// color, font sizes, printing mode, script support, loading of images and various
23    /// other things on a [`WebView`][crate::WebView]. After creation, a [`Settings`][crate::Settings] object
24    /// contains default settings.
25    ///
26    /// **⚠️ The following code is in c ⚠️**
27    ///
28    /// ```c
29    /// // Disable JavaScript
30    /// WebKitSettings *settings = webkit_web_view_group_get_settings (my_view_group);
31    /// webkit_settings_set_enable_javascript (settings, FALSE);
32    /// ```
33    ///
34    /// ## Properties
35    ///
36    ///
37    /// #### `allow-file-access-from-file-urls`
38    ///  Whether file access is allowed from file URLs. By default, when
39    /// something is loaded in a [`WebView`][crate::WebView] using a file URI, cross
40    /// origin requests to other file resources are not allowed. This
41    /// setting allows you to change that behaviour, so that it would be
42    /// possible to do a XMLHttpRequest of a local file, for example.
43    ///
44    /// Readable | Writeable | Construct
45    ///
46    ///
47    /// #### `allow-modal-dialogs`
48    ///  Determine whether it's allowed to create and run modal dialogs
49    /// from a [`WebView`][crate::WebView] through JavaScript with
50    /// `<function>`window.showModalDialog`</function>`. If it's set to
51    /// [`false`], the associated [`WebView`][crate::WebView] won't be able to create
52    /// new modal dialogs, so not even the [`create`][struct@crate::WebView#create]
53    /// signal will be emitted.
54    ///
55    /// Readable | Writeable | Construct
56    ///
57    ///
58    /// #### `allow-top-navigation-to-data-urls`
59    ///  Whether or not the top frame is allowed to navigate to data URLs. It is disabled by default
60    /// due to the risk it poses when loading untrusted URLs, with data URLs being used in scamming
61    /// and phishing attacks. In contrast, a scenario where it could be enabled could be an app that
62    /// embeds a WebView and you have control of the pages being show instead of a generic browser.
63    ///
64    /// Readable | Writeable | Construct
65    ///
66    ///
67    /// #### `allow-universal-access-from-file-urls`
68    ///  Whether or not JavaScript running in the context of a file scheme URL
69    /// should be allowed to access content from any origin. By default, when
70    /// something is loaded in a [`WebView`][crate::WebView] using a file scheme URL,
71    /// access to the local file system and arbitrary local storage is not
72    /// allowed. This setting allows you to change that behaviour, so that
73    /// it would be possible to use local storage, for example.
74    ///
75    /// Readable | Writeable | Construct
76    ///
77    ///
78    /// #### `auto-load-images`
79    ///  Determines whether images should be automatically loaded or not.
80    /// On devices where network bandwidth is of concern, it might be
81    /// useful to turn this property off.
82    ///
83    /// Readable | Writeable | Construct
84    ///
85    ///
86    /// #### `cursive-font-family`
87    ///  The font family used as the default for content using a cursive font.
88    ///
89    /// Readable | Writeable | Construct
90    ///
91    ///
92    /// #### `default-charset`
93    ///  The default text charset used when interpreting content with an unspecified charset.
94    ///
95    /// Readable | Writeable | Construct
96    ///
97    ///
98    /// #### `default-font-family`
99    ///  The font family to use as the default for content that does not specify a font.
100    ///
101    /// Readable | Writeable | Construct
102    ///
103    ///
104    /// #### `default-font-size`
105    ///  The default font size in pixels to use for content displayed if
106    /// no font size is specified.
107    ///
108    /// Readable | Writeable | Construct
109    ///
110    ///
111    /// #### `default-monospace-font-size`
112    ///  The default font size in pixels to use for content displayed in
113    /// monospace font if no font size is specified.
114    ///
115    /// Readable | Writeable | Construct
116    ///
117    ///
118    /// #### `disable-web-security`
119    ///  Enable or disable support for Web Security on pages.
120    ///
121    /// This setting disables the same-origin policy, allowing every website full control over
122    /// all other websites. This is for use in special environments where you wish to disable
123    /// all security and allow websites to hack each other. It is impossible to use this setting
124    /// securely.
125    ///
126    /// Readable | Writeable | Construct
127    ///
128    ///
129    /// #### `draw-compositing-indicators`
130    ///  Whether to draw compositing borders and repaint counters on layers drawn
131    /// with accelerated compositing. This is useful for debugging issues related
132    /// to web content that is composited with the GPU.
133    ///
134    /// Readable | Writeable | Construct
135    ///
136    ///
137    /// #### `enable-2d-canvas-acceleration`
138    ///  Enable or disable 2D canvas acceleration.
139    /// If this setting is enabled, the 2D canvas will be accelerated even if Skia CPU
140    /// is used for rendering. However, the canvas can be unaccelerated even when this setting
141    /// is enabled, for other reasons like its size or when willReadFrequently property is used.
142    ///
143    /// Readable | Writeable | Construct
144    ///
145    ///
146    /// #### `enable-back-forward-navigation-gestures`
147    ///  Enable or disable horizontal swipe gesture for back-forward navigation.
148    ///
149    /// Readable | Writeable | Construct
150    ///
151    ///
152    /// #### `enable-caret-browsing`
153    ///  Whether to enable accessibility enhanced keyboard navigation.
154    ///
155    /// Readable | Writeable | Construct
156    ///
157    ///
158    /// #### `enable-developer-extras`
159    ///  Determines whether or not developer tools, such as the Web Inspector, are enabled.
160    ///
161    /// Readable | Writeable | Construct
162    ///
163    ///
164    /// #### `enable-dns-prefetching`
165    ///  Determines whether or not to prefetch domain names. DNS prefetching attempts
166    /// to resolve domain names before a user tries to follow a link.
167    ///
168    /// Readable | Writeable | Construct
169    ///
170    ///
171    /// #### `enable-encrypted-media`
172    ///  Enable or disable support for Encrypted Media API on pages.
173    /// EncryptedMedia is an experimental JavaScript API for playing encrypted media in HTML.
174    /// This property will only work as intended if the EncryptedMedia feature is enabled at build time
175    /// with the ENABLE_ENCRYPTED_MEDIA flag.
176    ///
177    /// See https://www.w3.org/TR/encrypted-media/
178    ///
179    /// Readable | Writeable | Construct
180    ///
181    ///
182    /// #### `enable-fullscreen`
183    ///  Whether to enable the Javascript Fullscreen API. The API
184    /// allows any HTML element to request fullscreen display. See also
185    /// the current draft of the spec:
186    /// http://www.w3.org/TR/fullscreen/
187    ///
188    /// Readable | Writeable | Construct
189    ///
190    ///
191    /// #### `enable-html5-database`
192    ///  Whether to enable HTML5 client-side SQL database support (IndexedDB).
193    ///
194    /// Readable | Writeable | Construct
195    ///
196    ///
197    /// #### `enable-html5-local-storage`
198    ///  Whether to enable HTML5 local storage support. Local storage provides
199    /// simple synchronous storage access.
200    ///
201    /// HTML5 local storage specification is available at
202    /// http://dev.w3.org/html5/webstorage/.
203    ///
204    /// Readable | Writeable | Construct
205    ///
206    ///
207    /// #### `enable-hyperlink-auditing`
208    ///  Determines whether or not hyperlink auditing is enabled.
209    ///
210    /// The hyperlink auditing specification is available at
211    /// http://www.whatwg.org/specs/web-apps/current-work/multipage/links.html`hyperlink`-auditing.
212    ///
213    /// Readable | Writeable | Construct
214    ///
215    ///
216    /// #### `enable-javascript`
217    ///  Determines whether or not JavaScript executes within a page.
218    ///
219    /// Readable | Writeable | Construct
220    ///
221    ///
222    /// #### `enable-javascript-markup`
223    ///  Determines whether or not JavaScript markup is allowed in document. When this setting is disabled,
224    /// all JavaScript-related elements and attributes are removed from the document during parsing. Note that
225    /// executing JavaScript is still allowed if [`enable-javascript`][struct@crate::Settings#enable-javascript] is [`true`].
226    ///
227    /// Readable | Writeable | Construct
228    ///
229    ///
230    /// #### `enable-media`
231    ///  Enable or disable support for media playback on pages. This setting is enabled by
232    /// default. Disabling it means ``<audio>``, ``<track>`` and ``<video>`` elements will have
233    /// playback support disabled.
234    ///
235    /// Readable | Writeable | Construct
236    ///
237    ///
238    /// #### `enable-media-capabilities`
239    ///  Enable or disable support for MediaCapabilities on pages. This
240    /// specification intends to provide APIs to allow websites to make an optimal
241    /// decision when picking media content for the user. The APIs will expose
242    /// information about the decoding and encoding capabilities for a given format
243    /// but also output capabilities to find the best match based on the device’s
244    /// display.
245    ///
246    /// See also https://wicg.github.io/media-capabilities/
247    ///
248    /// Readable | Writeable | Construct
249    ///
250    ///
251    /// #### `enable-media-stream`
252    ///  Enable or disable support for MediaStream on pages. MediaStream
253    /// is an experimental proposal for allowing web pages to access
254    /// audio and video devices for capture.
255    ///
256    /// See also http://dev.w3.org/2011/webrtc/editor/getusermedia.html
257    ///
258    /// Readable | Writeable | Construct
259    ///
260    ///
261    /// #### `enable-mediasource`
262    ///  Enable or disable support for MediaSource on pages. MediaSource
263    /// extends HTMLMediaElement to allow JavaScript to generate media
264    /// streams for playback.
265    ///
266    /// See also http://www.w3.org/TR/media-source/
267    ///
268    /// Readable | Writeable | Construct
269    ///
270    ///
271    /// #### `enable-mock-capture-devices`
272    ///  Enable or disable the Mock Capture Devices. Those are fake
273    /// Microphone and Camera devices to be used as MediaStream
274    /// sources.
275    ///
276    /// Readable | Writeable | Construct
277    ///
278    ///
279    /// #### `enable-offline-web-application-cache`
280    ///  Unsupported setting. This property does nothing.
281    ///
282    /// Readable | Writeable | Construct
283    ///
284    ///
285    /// #### `enable-page-cache`
286    ///  Enable or disable the page cache. Disabling the page cache is
287    /// generally only useful for special circumstances like low-memory
288    /// scenarios or special purpose applications like static HTML
289    /// viewers. This setting only controls the Page Cache, this cache
290    /// is different than the disk-based or memory-based traditional
291    /// resource caches, its point is to make going back and forth
292    /// between pages much faster. For details about the different types
293    /// of caches and their purposes see:
294    /// http://webkit.org/blog/427/webkit-page-cache-i-the-basics/
295    ///
296    /// Readable | Writeable | Construct
297    ///
298    ///
299    /// #### `enable-resizable-text-areas`
300    ///  Determines whether or not text areas can be resized.
301    ///
302    /// Readable | Writeable | Construct
303    ///
304    ///
305    /// #### `enable-site-specific-quirks`
306    ///  Whether to turn on site-specific quirks. Turning this on will
307    /// tell WebKit to use some site-specific workarounds for
308    /// better web compatibility. For example, older versions of
309    /// MediaWiki will incorrectly send to WebKit a CSS file with KHTML
310    /// workarounds. By turning on site-specific quirks, WebKit will
311    /// special-case this and other cases to make some specific sites work.
312    ///
313    /// Readable | Writeable | Construct
314    ///
315    ///
316    /// #### `enable-smooth-scrolling`
317    ///  Enable or disable smooth scrolling.
318    ///
319    /// Readable | Writeable | Construct
320    ///
321    ///
322    /// #### `enable-spatial-navigation`
323    ///  Whether to enable Spatial Navigation. This feature consists in the ability
324    /// to navigate between focusable elements in a Web page, such as hyperlinks
325    /// and form controls, by using Left, Right, Up and Down arrow keys.
326    /// For example, if an user presses the Right key, heuristics determine whether
327    /// there is an element they might be trying to reach towards the right, and if
328    /// there are multiple elements, which element they probably wants.
329    ///
330    /// Readable | Writeable | Construct
331    ///
332    ///
333    /// #### `enable-tabs-to-links`
334    ///  Determines whether the tab key cycles through the elements on the page.
335    /// When this setting is enabled, users will be able to focus the next element
336    /// in the page by pressing the tab key. If the selected element is editable,
337    /// then pressing tab key will insert the tab character.
338    ///
339    /// Readable | Writeable | Construct
340    ///
341    ///
342    /// #### `enable-webaudio`
343    ///  Enable or disable support for WebAudio on pages. WebAudio is an
344    /// API for processing and synthesizing audio in web applications
345    ///
346    /// See also https://webaudio.github.io/web-audio-api
347    ///
348    /// Readable | Writeable | Construct
349    ///
350    ///
351    /// #### `enable-webgl`
352    ///  Enable or disable support for WebGL on pages. WebGL enables web
353    /// content to use an API based on OpenGL ES 2.0.
354    ///
355    /// Readable | Writeable | Construct
356    ///
357    ///
358    /// #### `enable-webrtc`
359    ///  Enable WebRTC support for loaded pages.
360    ///
361    /// Enabling this setting implies that [property`Settings`]
362    /// will be enabled as well.
363    ///
364    /// See also https://www.w3.org/TR/webrtc/
365    ///
366    /// Readable | Writeable | Construct
367    ///
368    ///
369    /// #### `enable-write-console-messages-to-stdout`
370    ///  Enable or disable writing console messages to stdout. These are messages
371    /// sent to the console with console.log and related methods.
372    ///
373    /// Readable | Writeable | Construct
374    ///
375    ///
376    /// #### `fantasy-font-family`
377    ///  The font family used as the default for content using a fantasy font.
378    ///
379    /// Readable | Writeable | Construct
380    ///
381    ///
382    /// #### `hardware-acceleration-policy`
383    ///  The [`HardwareAccelerationPolicy`][crate::HardwareAccelerationPolicy] to decide how to enable and disable
384    /// hardware acceleration. Disabling hardware acceleration might
385    /// cause some websites to not render correctly or consume more CPU.
386    ///
387    /// Note that changing this setting might not be possible if hardware acceleration is not
388    /// supported by the hardware or the system. In that case, you can get the value to know the
389    /// actual policy being used, but changing the setting will not have any effect.
390    ///
391    /// Readable | Writeable | Construct
392    ///
393    ///
394    /// #### `javascript-can-access-clipboard`
395    ///  Whether JavaScript can access the clipboard. The default value is [`false`]. If
396    /// set to [`true`], document.execCommand() allows cut, copy and paste commands.
397    ///
398    /// Readable | Writeable | Construct
399    ///
400    ///
401    /// #### `javascript-can-open-windows-automatically`
402    ///  Whether JavaScript can open popup windows automatically without user
403    /// intervention.
404    ///
405    /// Readable | Writeable | Construct
406    ///
407    ///
408    /// #### `load-icons-ignoring-image-load-setting`
409    ///  Unsupported setting. This property does nothing.
410    ///
411    /// Readable | Writeable | Construct
412    ///
413    ///
414    /// #### `math-font-family`
415    ///  The font family used as the default for content using a math font.
416    ///
417    /// Readable | Writeable | Construct
418    ///
419    ///
420    /// #### `media-content-types-requiring-hardware-support`
421    ///  List of media content types requiring hardware support, split by semicolons (:).
422    /// For example: 'video/webm; codecs="vp*":video/mp4; codecs="avc*":video/&ast; codecs="av1*"'.
423    ///
424    /// Readable | Writeable | Construct
425    ///
426    ///
427    /// #### `media-playback-allows-inline`
428    ///  Whether media playback is full-screen only or inline playback is allowed.
429    /// This is [`true`] by default, so media playback can be inline. Setting it to
430    /// [`false`] allows specifying that media playback should be always fullscreen.
431    ///
432    /// Readable | Writeable | Construct
433    ///
434    ///
435    /// #### `media-playback-requires-user-gesture`
436    ///  Whether a user gesture (such as clicking the play button)
437    /// would be required to start media playback or load media. This is off
438    /// by default, so media playback could start automatically.
439    /// Setting it on requires a gesture by the user to start playback, or to
440    /// load the media.
441    ///
442    /// Readable | Writeable | Construct
443    ///
444    ///
445    /// #### `minimum-font-size`
446    ///  The minimum font size in pixels used to display text. This setting
447    /// controls the absolute smallest size. Values other than 0 can
448    /// potentially break page layouts.
449    ///
450    /// Readable | Writeable | Construct
451    ///
452    ///
453    /// #### `monospace-font-family`
454    ///  The font family used as the default for content using a monospace font.
455    ///
456    /// Readable | Writeable | Construct
457    ///
458    ///
459    /// #### `pictograph-font-family`
460    ///  The font family used as the default for content using a pictograph font.
461    ///
462    /// Readable | Writeable | Construct
463    ///
464    ///
465    /// #### `print-backgrounds`
466    ///  Whether background images should be drawn during printing.
467    ///
468    /// Readable | Writeable | Construct
469    ///
470    ///
471    /// #### `sans-serif-font-family`
472    ///  The font family used as the default for content using a sans-serif font.
473    ///
474    /// Readable | Writeable | Construct
475    ///
476    ///
477    /// #### `serif-font-family`
478    ///  The font family used as the default for content using a serif font.
479    ///
480    /// Readable | Writeable | Construct
481    ///
482    ///
483    /// #### `user-agent`
484    ///  The user-agent string used by WebKit. Unusual user-agent strings may cause web
485    /// content to render incorrectly or fail to run, as many web pages are written to
486    /// parse the user-agent strings of only the most popular browsers. Therefore, it's
487    /// typically better to not completely override the standard user-agent, but to use
488    /// [`Settings::set_user_agent_with_application_details()`][crate::Settings::set_user_agent_with_application_details()] instead.
489    ///
490    /// If this property is set to the empty string or [`None`], it will revert to the standard
491    /// user-agent.
492    ///
493    /// Readable | Writeable | Construct
494    ///
495    ///
496    /// #### `webrtc-udp-ports-range`
497    ///  Allow customization of the WebRTC UDP ports range.
498    ///
499    /// In some constrained environments where a firewall blocks UDP network traffic excepted on a
500    /// specific port range, this settings can be used to give hints to the WebRTC backend regarding
501    /// which ports to allocate. The format is min-port:max-port, so for instance 20000:30000. The
502    /// default empty string value means the OS will use no hints from the WebRTC backend. Using 0
503    /// for one of the values is allowed and means the value is unspecified.
504    ///
505    /// Readable | Writeable | Construct
506    ///
507    ///
508    /// #### `zoom-text-only`
509    ///  Whether [`zoom-level`][struct@crate::WebView#zoom-level] affects only the
510    /// text of the page or all the contents. Other contents containing text
511    /// like form controls will be also affected by zoom factor when
512    /// this property is enabled.
513    ///
514    /// Readable | Writeable | Construct
515    #[doc(alias = "WebKitSettings")]
516    pub struct Settings(Object<ffi::WebKitSettings, ffi::WebKitSettingsClass>);
517
518    match fn {
519        type_ => || ffi::webkit_settings_get_type(),
520    }
521}
522
523impl Settings {
524    /// Creates a new [`Settings`][crate::Settings] instance with default values.
525    ///
526    /// It must be manually attached to a [`WebView`][crate::WebView].
527    /// See also `webkit_settings_new_with_settings()`.
528    ///
529    /// # Returns
530    ///
531    /// a new [`Settings`][crate::Settings] instance.
532    #[doc(alias = "webkit_settings_new")]
533    pub fn new() -> Settings {
534        assert_initialized_main_thread!();
535        unsafe { from_glib_full(ffi::webkit_settings_new()) }
536    }
537
538    //#[doc(alias = "webkit_settings_new_with_settings")]
539    //#[doc(alias = "new_with_settings")]
540    //pub fn with_settings(first_setting_name: &str, : /*Unknown conversion*//*Unimplemented*/Basic: VarArgs) -> Settings {
541    //    unsafe { TODO: call ffi:webkit_settings_new_with_settings() }
542    //}
543
544    // rustdoc-stripper-ignore-next
545    /// Creates a new builder-pattern struct instance to construct [`Settings`] objects.
546    ///
547    /// This method returns an instance of [`SettingsBuilder`](crate::builders::SettingsBuilder) which can be used to create [`Settings`] objects.
548    pub fn builder() -> SettingsBuilder {
549        SettingsBuilder::new()
550    }
551
552    /// Reads the contents of the given `group_name` from the given `key_file` and apply the value of
553    /// each key/value to the corresponding property on the `self`.
554    ///
555    /// Value types have to match with the corresponding setting property type and the group keys have to
556    /// match existing setting property names. If those conditions are not met, the function will return
557    /// [`false`].
558    ///
559    /// Supported value types are strings (unquoted), booleans (0, 1, true, false) and unsigned integers.
560    /// ## `key_file`
561    /// a [`glib::KeyFile`][crate::glib::KeyFile]
562    /// ## `group_name`
563    /// Name of the group to read from `key_file`
564    ///
565    /// # Returns
566    ///
567    /// [`true`] if the settings were correctly applied or [`false`] on error.
568    #[cfg(feature = "v2_46")]
569    #[cfg_attr(docsrs, doc(cfg(feature = "v2_46")))]
570    #[doc(alias = "webkit_settings_apply_from_key_file")]
571    pub fn apply_from_key_file(
572        &self,
573        key_file: &glib::KeyFile,
574        group_name: &str,
575    ) -> Result<(), glib::Error> {
576        unsafe {
577            let mut error = std::ptr::null_mut();
578            let is_ok = ffi::webkit_settings_apply_from_key_file(
579                self.to_glib_none().0,
580                key_file.to_glib_none().0,
581                group_name.to_glib_none().0,
582                &mut error,
583            );
584            debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
585            if error.is_null() {
586                Ok(())
587            } else {
588                Err(from_glib_full(error))
589            }
590        }
591    }
592
593    /// Get the [`allow-file-access-from-file-urls`][struct@crate::Settings#allow-file-access-from-file-urls] property.
594    ///
595    /// # Returns
596    ///
597    /// [`true`] If file access from file URLs is allowed or [`false`] otherwise.
598    #[doc(alias = "webkit_settings_get_allow_file_access_from_file_urls")]
599    #[doc(alias = "get_allow_file_access_from_file_urls")]
600    #[doc(alias = "allow-file-access-from-file-urls")]
601    pub fn allows_file_access_from_file_urls(&self) -> bool {
602        unsafe {
603            from_glib(ffi::webkit_settings_get_allow_file_access_from_file_urls(
604                self.to_glib_none().0,
605            ))
606        }
607    }
608
609    /// Get the [`allow-modal-dialogs`][struct@crate::Settings#allow-modal-dialogs] property.
610    ///
611    /// # Returns
612    ///
613    /// [`true`] if it's allowed to create and run modal dialogs or [`false`] otherwise.
614    #[doc(alias = "webkit_settings_get_allow_modal_dialogs")]
615    #[doc(alias = "get_allow_modal_dialogs")]
616    #[doc(alias = "allow-modal-dialogs")]
617    pub fn allows_modal_dialogs(&self) -> bool {
618        unsafe {
619            from_glib(ffi::webkit_settings_get_allow_modal_dialogs(
620                self.to_glib_none().0,
621            ))
622        }
623    }
624
625    /// Get the [`allow-top-navigation-to-data-urls`][struct@crate::Settings#allow-top-navigation-to-data-urls] property.
626    ///
627    /// # Returns
628    ///
629    /// [`true`] If navigation to data URLs from the top frame is allowed or [`false`]\
630    /// otherwise.
631    #[doc(alias = "webkit_settings_get_allow_top_navigation_to_data_urls")]
632    #[doc(alias = "get_allow_top_navigation_to_data_urls")]
633    #[doc(alias = "allow-top-navigation-to-data-urls")]
634    pub fn allows_top_navigation_to_data_urls(&self) -> bool {
635        unsafe {
636            from_glib(ffi::webkit_settings_get_allow_top_navigation_to_data_urls(
637                self.to_glib_none().0,
638            ))
639        }
640    }
641
642    /// Get the [`allow-universal-access-from-file-urls`][struct@crate::Settings#allow-universal-access-from-file-urls] property.
643    ///
644    /// # Returns
645    ///
646    /// [`true`] If universal access from file URLs is allowed or [`false`] otherwise.
647    #[doc(alias = "webkit_settings_get_allow_universal_access_from_file_urls")]
648    #[doc(alias = "get_allow_universal_access_from_file_urls")]
649    #[doc(alias = "allow-universal-access-from-file-urls")]
650    pub fn allows_universal_access_from_file_urls(&self) -> bool {
651        unsafe {
652            from_glib(
653                ffi::webkit_settings_get_allow_universal_access_from_file_urls(
654                    self.to_glib_none().0,
655                ),
656            )
657        }
658    }
659
660    /// Get the [`auto-load-images`][struct@crate::Settings#auto-load-images] property.
661    ///
662    /// # Returns
663    ///
664    /// [`true`] If auto loading of images is enabled or [`false`] otherwise.
665    #[doc(alias = "webkit_settings_get_auto_load_images")]
666    #[doc(alias = "get_auto_load_images")]
667    #[doc(alias = "auto-load-images")]
668    pub fn is_auto_load_images(&self) -> bool {
669        unsafe {
670            from_glib(ffi::webkit_settings_get_auto_load_images(
671                self.to_glib_none().0,
672            ))
673        }
674    }
675
676    /// Gets the [`cursive-font-family`][struct@crate::Settings#cursive-font-family] property.
677    ///
678    /// # Returns
679    ///
680    /// The default font family used to display content marked with cursive font.
681    #[doc(alias = "webkit_settings_get_cursive_font_family")]
682    #[doc(alias = "get_cursive_font_family")]
683    #[doc(alias = "cursive-font-family")]
684    pub fn cursive_font_family(&self) -> Option<glib::GString> {
685        unsafe {
686            from_glib_none(ffi::webkit_settings_get_cursive_font_family(
687                self.to_glib_none().0,
688            ))
689        }
690    }
691
692    /// Gets the [`default-charset`][struct@crate::Settings#default-charset] property.
693    ///
694    /// # Returns
695    ///
696    /// Default charset.
697    #[doc(alias = "webkit_settings_get_default_charset")]
698    #[doc(alias = "get_default_charset")]
699    #[doc(alias = "default-charset")]
700    pub fn default_charset(&self) -> Option<glib::GString> {
701        unsafe {
702            from_glib_none(ffi::webkit_settings_get_default_charset(
703                self.to_glib_none().0,
704            ))
705        }
706    }
707
708    /// Gets the [`default-font-family`][struct@crate::Settings#default-font-family] property.
709    ///
710    /// # Returns
711    ///
712    /// The default font family used to display content that does not specify a font.
713    #[doc(alias = "webkit_settings_get_default_font_family")]
714    #[doc(alias = "get_default_font_family")]
715    #[doc(alias = "default-font-family")]
716    pub fn default_font_family(&self) -> Option<glib::GString> {
717        unsafe {
718            from_glib_none(ffi::webkit_settings_get_default_font_family(
719                self.to_glib_none().0,
720            ))
721        }
722    }
723
724    /// Gets the [`default-font-size`][struct@crate::Settings#default-font-size] property.
725    ///
726    /// # Returns
727    ///
728    /// The default font size, in pixels.
729    #[doc(alias = "webkit_settings_get_default_font_size")]
730    #[doc(alias = "get_default_font_size")]
731    #[doc(alias = "default-font-size")]
732    pub fn default_font_size(&self) -> u32 {
733        unsafe { ffi::webkit_settings_get_default_font_size(self.to_glib_none().0) }
734    }
735
736    /// Gets the [`default-monospace-font-size`][struct@crate::Settings#default-monospace-font-size] property.
737    ///
738    /// # Returns
739    ///
740    /// Default monospace font size, in pixels.
741    #[doc(alias = "webkit_settings_get_default_monospace_font_size")]
742    #[doc(alias = "get_default_monospace_font_size")]
743    #[doc(alias = "default-monospace-font-size")]
744    pub fn default_monospace_font_size(&self) -> u32 {
745        unsafe { ffi::webkit_settings_get_default_monospace_font_size(self.to_glib_none().0) }
746    }
747
748    /// Get the [`disable-web-security`][struct@crate::Settings#disable-web-security] property.
749    ///
750    /// # Returns
751    ///
752    /// [`true`] If web security support is disabled or [`false`] otherwise.
753    #[doc(alias = "webkit_settings_get_disable_web_security")]
754    #[doc(alias = "get_disable_web_security")]
755    #[doc(alias = "disable-web-security")]
756    pub fn is_disable_web_security(&self) -> bool {
757        unsafe {
758            from_glib(ffi::webkit_settings_get_disable_web_security(
759                self.to_glib_none().0,
760            ))
761        }
762    }
763
764    /// Get the [`draw-compositing-indicators`][struct@crate::Settings#draw-compositing-indicators] property.
765    ///
766    /// # Returns
767    ///
768    /// [`true`] If compositing borders are drawn or [`false`] otherwise.
769    #[doc(alias = "webkit_settings_get_draw_compositing_indicators")]
770    #[doc(alias = "get_draw_compositing_indicators")]
771    #[doc(alias = "draw-compositing-indicators")]
772    pub fn draws_compositing_indicators(&self) -> bool {
773        unsafe {
774            from_glib(ffi::webkit_settings_get_draw_compositing_indicators(
775                self.to_glib_none().0,
776            ))
777        }
778    }
779
780    /// Get the [`enable-2d-canvas-acceleration`][struct@crate::Settings#enable-2d-canvas-acceleration] property.
781    ///
782    /// # Returns
783    ///
784    /// [`true`] if 2D canvas acceleration is enabled or [`false`] otherwise.
785    #[cfg(feature = "v2_46")]
786    #[cfg_attr(docsrs, doc(cfg(feature = "v2_46")))]
787    #[doc(alias = "webkit_settings_get_enable_2d_canvas_acceleration")]
788    #[doc(alias = "get_enable_2d_canvas_acceleration")]
789    #[doc(alias = "enable-2d-canvas-acceleration")]
790    pub fn enables_2d_canvas_acceleration(&self) -> bool {
791        unsafe {
792            from_glib(ffi::webkit_settings_get_enable_2d_canvas_acceleration(
793                self.to_glib_none().0,
794            ))
795        }
796    }
797
798    /// Get the [`enable-back-forward-navigation-gestures`][struct@crate::Settings#enable-back-forward-navigation-gestures] property.
799    ///
800    /// # Returns
801    ///
802    /// [`true`] if horizontal swipe gesture will trigger back-forward navigaiton or [`false`] otherwise.
803    #[doc(alias = "webkit_settings_get_enable_back_forward_navigation_gestures")]
804    #[doc(alias = "get_enable_back_forward_navigation_gestures")]
805    #[doc(alias = "enable-back-forward-navigation-gestures")]
806    pub fn enables_back_forward_navigation_gestures(&self) -> bool {
807        unsafe {
808            from_glib(
809                ffi::webkit_settings_get_enable_back_forward_navigation_gestures(
810                    self.to_glib_none().0,
811                ),
812            )
813        }
814    }
815
816    /// Get the [`enable-caret-browsing`][struct@crate::Settings#enable-caret-browsing] property.
817    ///
818    /// # Returns
819    ///
820    /// [`true`] If caret browsing is enabled or [`false`] otherwise.
821    #[doc(alias = "webkit_settings_get_enable_caret_browsing")]
822    #[doc(alias = "get_enable_caret_browsing")]
823    #[doc(alias = "enable-caret-browsing")]
824    pub fn enables_caret_browsing(&self) -> bool {
825        unsafe {
826            from_glib(ffi::webkit_settings_get_enable_caret_browsing(
827                self.to_glib_none().0,
828            ))
829        }
830    }
831
832    /// Get the [`enable-developer-extras`][struct@crate::Settings#enable-developer-extras] property.
833    ///
834    /// # Returns
835    ///
836    /// [`true`] If developer extras is enabled or [`false`] otherwise.
837    #[doc(alias = "webkit_settings_get_enable_developer_extras")]
838    #[doc(alias = "get_enable_developer_extras")]
839    #[doc(alias = "enable-developer-extras")]
840    pub fn enables_developer_extras(&self) -> bool {
841        unsafe {
842            from_glib(ffi::webkit_settings_get_enable_developer_extras(
843                self.to_glib_none().0,
844            ))
845        }
846    }
847
848    /// Get the [`enable-dns-prefetching`][struct@crate::Settings#enable-dns-prefetching] property.
849    ///
850    /// # Deprecated since 2.48
851    ///
852    ///
853    /// # Returns
854    ///
855    /// [`true`] If DNS prefetching is enabled or [`false`] otherwise.
856    #[cfg_attr(feature = "v2_48", deprecated = "Since 2.48")]
857    #[allow(deprecated)]
858    #[doc(alias = "webkit_settings_get_enable_dns_prefetching")]
859    #[doc(alias = "get_enable_dns_prefetching")]
860    #[doc(alias = "enable-dns-prefetching")]
861    pub fn enables_dns_prefetching(&self) -> bool {
862        unsafe {
863            from_glib(ffi::webkit_settings_get_enable_dns_prefetching(
864                self.to_glib_none().0,
865            ))
866        }
867    }
868
869    /// Get the [`enable-encrypted-media`][struct@crate::Settings#enable-encrypted-media] property.
870    ///
871    /// # Returns
872    ///
873    /// [`true`] if EncryptedMedia support is enabled or [`false`] otherwise.
874    #[doc(alias = "webkit_settings_get_enable_encrypted_media")]
875    #[doc(alias = "get_enable_encrypted_media")]
876    #[doc(alias = "enable-encrypted-media")]
877    pub fn enables_encrypted_media(&self) -> bool {
878        unsafe {
879            from_glib(ffi::webkit_settings_get_enable_encrypted_media(
880                self.to_glib_none().0,
881            ))
882        }
883    }
884
885    /// Get the [`enable-fullscreen`][struct@crate::Settings#enable-fullscreen] property.
886    ///
887    /// # Returns
888    ///
889    /// [`true`] If fullscreen support is enabled or [`false`] otherwise.
890    #[doc(alias = "webkit_settings_get_enable_fullscreen")]
891    #[doc(alias = "get_enable_fullscreen")]
892    #[doc(alias = "enable-fullscreen")]
893    pub fn enables_fullscreen(&self) -> bool {
894        unsafe {
895            from_glib(ffi::webkit_settings_get_enable_fullscreen(
896                self.to_glib_none().0,
897            ))
898        }
899    }
900
901    /// Get the [`enable-html5-database`][struct@crate::Settings#enable-html5-database] property.
902    ///
903    /// # Returns
904    ///
905    /// [`true`] if IndexedDB support is enabled or [`false`] otherwise.
906    #[doc(alias = "webkit_settings_get_enable_html5_database")]
907    #[doc(alias = "get_enable_html5_database")]
908    #[doc(alias = "enable-html5-database")]
909    pub fn enables_html5_database(&self) -> bool {
910        unsafe {
911            from_glib(ffi::webkit_settings_get_enable_html5_database(
912                self.to_glib_none().0,
913            ))
914        }
915    }
916
917    /// Get the [`enable-html5-local-storage`][struct@crate::Settings#enable-html5-local-storage] property.
918    ///
919    /// # Returns
920    ///
921    /// [`true`] If HTML5 local storage support is enabled or [`false`] otherwise.
922    #[doc(alias = "webkit_settings_get_enable_html5_local_storage")]
923    #[doc(alias = "get_enable_html5_local_storage")]
924    #[doc(alias = "enable-html5-local-storage")]
925    pub fn enables_html5_local_storage(&self) -> bool {
926        unsafe {
927            from_glib(ffi::webkit_settings_get_enable_html5_local_storage(
928                self.to_glib_none().0,
929            ))
930        }
931    }
932
933    /// Get the [`enable-hyperlink-auditing`][struct@crate::Settings#enable-hyperlink-auditing] property.
934    ///
935    /// # Deprecated since 2.50
936    ///
937    ///
938    /// # Returns
939    ///
940    /// [`true`] If hyper link auditing is enabled or [`false`] otherwise.
941    #[cfg_attr(feature = "v2_50", deprecated = "Since 2.50")]
942    #[allow(deprecated)]
943    #[doc(alias = "webkit_settings_get_enable_hyperlink_auditing")]
944    #[doc(alias = "get_enable_hyperlink_auditing")]
945    #[doc(alias = "enable-hyperlink-auditing")]
946    pub fn enables_hyperlink_auditing(&self) -> bool {
947        unsafe {
948            from_glib(ffi::webkit_settings_get_enable_hyperlink_auditing(
949                self.to_glib_none().0,
950            ))
951        }
952    }
953
954    /// Get the [`enable-javascript`][struct@crate::Settings#enable-javascript] property.
955    ///
956    /// # Returns
957    ///
958    /// [`true`] If JavaScript is enabled or [`false`] otherwise.
959    #[doc(alias = "webkit_settings_get_enable_javascript")]
960    #[doc(alias = "get_enable_javascript")]
961    #[doc(alias = "enable-javascript")]
962    pub fn enables_javascript(&self) -> bool {
963        unsafe {
964            from_glib(ffi::webkit_settings_get_enable_javascript(
965                self.to_glib_none().0,
966            ))
967        }
968    }
969
970    /// Get the [`enable-javascript-markup`][struct@crate::Settings#enable-javascript-markup] property.
971    ///
972    /// # Returns
973    ///
974    /// [`true`] if JavaScript markup is enabled or [`false`] otherwise.
975    #[doc(alias = "webkit_settings_get_enable_javascript_markup")]
976    #[doc(alias = "get_enable_javascript_markup")]
977    #[doc(alias = "enable-javascript-markup")]
978    pub fn enables_javascript_markup(&self) -> bool {
979        unsafe {
980            from_glib(ffi::webkit_settings_get_enable_javascript_markup(
981                self.to_glib_none().0,
982            ))
983        }
984    }
985
986    /// Get the [`enable-media`][struct@crate::Settings#enable-media] property.
987    ///
988    /// # Returns
989    ///
990    /// [`true`] if media support is enabled or [`false`] otherwise.
991    #[doc(alias = "webkit_settings_get_enable_media")]
992    #[doc(alias = "get_enable_media")]
993    #[doc(alias = "enable-media")]
994    pub fn enables_media(&self) -> bool {
995        unsafe { from_glib(ffi::webkit_settings_get_enable_media(self.to_glib_none().0)) }
996    }
997
998    /// Get the [`enable-media-capabilities`][struct@crate::Settings#enable-media-capabilities] property.
999    ///
1000    /// # Returns
1001    ///
1002    /// [`true`] if MediaCapabilities support is enabled or [`false`] otherwise.
1003    #[doc(alias = "webkit_settings_get_enable_media_capabilities")]
1004    #[doc(alias = "get_enable_media_capabilities")]
1005    #[doc(alias = "enable-media-capabilities")]
1006    pub fn enables_media_capabilities(&self) -> bool {
1007        unsafe {
1008            from_glib(ffi::webkit_settings_get_enable_media_capabilities(
1009                self.to_glib_none().0,
1010            ))
1011        }
1012    }
1013
1014    /// Get the [`enable-media-stream`][struct@crate::Settings#enable-media-stream] property.
1015    ///
1016    /// # Returns
1017    ///
1018    /// [`true`] If mediastream support is enabled or [`false`] otherwise.
1019    #[doc(alias = "webkit_settings_get_enable_media_stream")]
1020    #[doc(alias = "get_enable_media_stream")]
1021    #[doc(alias = "enable-media-stream")]
1022    pub fn enables_media_stream(&self) -> bool {
1023        unsafe {
1024            from_glib(ffi::webkit_settings_get_enable_media_stream(
1025                self.to_glib_none().0,
1026            ))
1027        }
1028    }
1029
1030    /// Get the [`enable-mediasource`][struct@crate::Settings#enable-mediasource] property.
1031    ///
1032    /// # Returns
1033    ///
1034    /// [`true`] If MediaSource support is enabled or [`false`] otherwise.
1035    #[doc(alias = "webkit_settings_get_enable_mediasource")]
1036    #[doc(alias = "get_enable_mediasource")]
1037    #[doc(alias = "enable-mediasource")]
1038    pub fn enables_mediasource(&self) -> bool {
1039        unsafe {
1040            from_glib(ffi::webkit_settings_get_enable_mediasource(
1041                self.to_glib_none().0,
1042            ))
1043        }
1044    }
1045
1046    /// Get the [`enable-mock-capture-devices`][struct@crate::Settings#enable-mock-capture-devices] property.
1047    ///
1048    /// # Returns
1049    ///
1050    /// [`true`] If mock capture devices is enabled or [`false`] otherwise.
1051    #[doc(alias = "webkit_settings_get_enable_mock_capture_devices")]
1052    #[doc(alias = "get_enable_mock_capture_devices")]
1053    #[doc(alias = "enable-mock-capture-devices")]
1054    pub fn enables_mock_capture_devices(&self) -> bool {
1055        unsafe {
1056            from_glib(ffi::webkit_settings_get_enable_mock_capture_devices(
1057                self.to_glib_none().0,
1058            ))
1059        }
1060    }
1061
1062    /// Get the [`enable-offline-web-application-cache`][struct@crate::Settings#enable-offline-web-application-cache] property.
1063    ///
1064    /// # Deprecated since 2.44
1065    ///
1066    ///
1067    /// # Returns
1068    ///
1069    /// [`false`].
1070    #[cfg_attr(feature = "v2_44", deprecated = "Since 2.44")]
1071    #[allow(deprecated)]
1072    #[doc(alias = "webkit_settings_get_enable_offline_web_application_cache")]
1073    #[doc(alias = "get_enable_offline_web_application_cache")]
1074    #[doc(alias = "enable-offline-web-application-cache")]
1075    pub fn enables_offline_web_application_cache(&self) -> bool {
1076        unsafe {
1077            from_glib(
1078                ffi::webkit_settings_get_enable_offline_web_application_cache(
1079                    self.to_glib_none().0,
1080                ),
1081            )
1082        }
1083    }
1084
1085    /// Get the [`enable-page-cache`][struct@crate::Settings#enable-page-cache] property.
1086    ///
1087    /// # Returns
1088    ///
1089    /// [`true`] if page cache enabled or [`false`] otherwise.
1090    #[doc(alias = "webkit_settings_get_enable_page_cache")]
1091    #[doc(alias = "get_enable_page_cache")]
1092    #[doc(alias = "enable-page-cache")]
1093    pub fn enables_page_cache(&self) -> bool {
1094        unsafe {
1095            from_glib(ffi::webkit_settings_get_enable_page_cache(
1096                self.to_glib_none().0,
1097            ))
1098        }
1099    }
1100
1101    /// Get the [`enable-resizable-text-areas`][struct@crate::Settings#enable-resizable-text-areas] property.
1102    ///
1103    /// # Returns
1104    ///
1105    /// [`true`] If text areas can be resized or [`false`] otherwise.
1106    #[doc(alias = "webkit_settings_get_enable_resizable_text_areas")]
1107    #[doc(alias = "get_enable_resizable_text_areas")]
1108    #[doc(alias = "enable-resizable-text-areas")]
1109    pub fn enables_resizable_text_areas(&self) -> bool {
1110        unsafe {
1111            from_glib(ffi::webkit_settings_get_enable_resizable_text_areas(
1112                self.to_glib_none().0,
1113            ))
1114        }
1115    }
1116
1117    /// Get the [`enable-site-specific-quirks`][struct@crate::Settings#enable-site-specific-quirks] property.
1118    ///
1119    /// # Returns
1120    ///
1121    /// [`true`] if site specific quirks are enabled or [`false`] otherwise.
1122    #[doc(alias = "webkit_settings_get_enable_site_specific_quirks")]
1123    #[doc(alias = "get_enable_site_specific_quirks")]
1124    #[doc(alias = "enable-site-specific-quirks")]
1125    pub fn enables_site_specific_quirks(&self) -> bool {
1126        unsafe {
1127            from_glib(ffi::webkit_settings_get_enable_site_specific_quirks(
1128                self.to_glib_none().0,
1129            ))
1130        }
1131    }
1132
1133    /// Get the [`enable-smooth-scrolling`][struct@crate::Settings#enable-smooth-scrolling] property.
1134    ///
1135    /// # Returns
1136    ///
1137    /// [`true`] if smooth scrolling is enabled or [`false`] otherwise.
1138    #[doc(alias = "webkit_settings_get_enable_smooth_scrolling")]
1139    #[doc(alias = "get_enable_smooth_scrolling")]
1140    #[doc(alias = "enable-smooth-scrolling")]
1141    pub fn enables_smooth_scrolling(&self) -> bool {
1142        unsafe {
1143            from_glib(ffi::webkit_settings_get_enable_smooth_scrolling(
1144                self.to_glib_none().0,
1145            ))
1146        }
1147    }
1148
1149    /// Get the [`enable-spatial-navigation`][struct@crate::Settings#enable-spatial-navigation] property.
1150    ///
1151    /// # Returns
1152    ///
1153    /// [`true`] If HTML5 spatial navigation support is enabled or [`false`] otherwise.
1154    #[doc(alias = "webkit_settings_get_enable_spatial_navigation")]
1155    #[doc(alias = "get_enable_spatial_navigation")]
1156    #[doc(alias = "enable-spatial-navigation")]
1157    pub fn enables_spatial_navigation(&self) -> bool {
1158        unsafe {
1159            from_glib(ffi::webkit_settings_get_enable_spatial_navigation(
1160                self.to_glib_none().0,
1161            ))
1162        }
1163    }
1164
1165    /// Get the [`enable-tabs-to-links`][struct@crate::Settings#enable-tabs-to-links] property.
1166    ///
1167    /// # Returns
1168    ///
1169    /// [`true`] If tabs to link is enabled or [`false`] otherwise.
1170    #[doc(alias = "webkit_settings_get_enable_tabs_to_links")]
1171    #[doc(alias = "get_enable_tabs_to_links")]
1172    #[doc(alias = "enable-tabs-to-links")]
1173    pub fn enables_tabs_to_links(&self) -> bool {
1174        unsafe {
1175            from_glib(ffi::webkit_settings_get_enable_tabs_to_links(
1176                self.to_glib_none().0,
1177            ))
1178        }
1179    }
1180
1181    /// Get the [`enable-webaudio`][struct@crate::Settings#enable-webaudio] property.
1182    ///
1183    /// # Returns
1184    ///
1185    /// [`true`] If webaudio support is enabled or [`false`] otherwise.
1186    #[doc(alias = "webkit_settings_get_enable_webaudio")]
1187    #[doc(alias = "get_enable_webaudio")]
1188    #[doc(alias = "enable-webaudio")]
1189    pub fn enables_webaudio(&self) -> bool {
1190        unsafe {
1191            from_glib(ffi::webkit_settings_get_enable_webaudio(
1192                self.to_glib_none().0,
1193            ))
1194        }
1195    }
1196
1197    /// Get the [`enable-webgl`][struct@crate::Settings#enable-webgl] property.
1198    ///
1199    /// # Returns
1200    ///
1201    /// [`true`] If WebGL support is enabled or [`false`] otherwise.
1202    #[doc(alias = "webkit_settings_get_enable_webgl")]
1203    #[doc(alias = "get_enable_webgl")]
1204    #[doc(alias = "enable-webgl")]
1205    pub fn enables_webgl(&self) -> bool {
1206        unsafe { from_glib(ffi::webkit_settings_get_enable_webgl(self.to_glib_none().0)) }
1207    }
1208
1209    /// Get the [property`Settings`] property.
1210    ///
1211    /// # Returns
1212    ///
1213    /// [`true`] If WebRTC support is enabled or [`false`] otherwise.
1214    #[doc(alias = "webkit_settings_get_enable_webrtc")]
1215    #[doc(alias = "get_enable_webrtc")]
1216    #[doc(alias = "enable-webrtc")]
1217    pub fn enables_webrtc(&self) -> bool {
1218        unsafe {
1219            from_glib(ffi::webkit_settings_get_enable_webrtc(
1220                self.to_glib_none().0,
1221            ))
1222        }
1223    }
1224
1225    /// Get the [`enable-write-console-messages-to-stdout`][struct@crate::Settings#enable-write-console-messages-to-stdout] property.
1226    ///
1227    /// # Returns
1228    ///
1229    /// [`true`] if writing console messages to stdout is enabled or [`false`]
1230    /// otherwise.
1231    #[doc(alias = "webkit_settings_get_enable_write_console_messages_to_stdout")]
1232    #[doc(alias = "get_enable_write_console_messages_to_stdout")]
1233    #[doc(alias = "enable-write-console-messages-to-stdout")]
1234    pub fn enables_write_console_messages_to_stdout(&self) -> bool {
1235        unsafe {
1236            from_glib(
1237                ffi::webkit_settings_get_enable_write_console_messages_to_stdout(
1238                    self.to_glib_none().0,
1239                ),
1240            )
1241        }
1242    }
1243
1244    /// Gets the [`fantasy-font-family`][struct@crate::Settings#fantasy-font-family] property.
1245    ///
1246    /// # Returns
1247    ///
1248    /// The default font family used to display content marked with fantasy font.
1249    #[doc(alias = "webkit_settings_get_fantasy_font_family")]
1250    #[doc(alias = "get_fantasy_font_family")]
1251    #[doc(alias = "fantasy-font-family")]
1252    pub fn fantasy_font_family(&self) -> Option<glib::GString> {
1253        unsafe {
1254            from_glib_none(ffi::webkit_settings_get_fantasy_font_family(
1255                self.to_glib_none().0,
1256            ))
1257        }
1258    }
1259
1260    /// Gets whether a feature is enabled.
1261    /// ## `feature`
1262    /// the feature to toggle.
1263    ///
1264    /// # Returns
1265    ///
1266    /// Whether the feature is enabled.
1267    #[cfg(feature = "v2_42")]
1268    #[cfg_attr(docsrs, doc(cfg(feature = "v2_42")))]
1269    #[doc(alias = "webkit_settings_get_feature_enabled")]
1270    #[doc(alias = "get_feature_enabled")]
1271    pub fn is_feature_enabled(&self, feature: &Feature) -> bool {
1272        unsafe {
1273            from_glib(ffi::webkit_settings_get_feature_enabled(
1274                self.to_glib_none().0,
1275                feature.to_glib_none().0,
1276            ))
1277        }
1278    }
1279
1280    /// Get the [`hardware-acceleration-policy`][struct@crate::Settings#hardware-acceleration-policy] property.
1281    ///
1282    /// # Returns
1283    ///
1284    /// a [`HardwareAccelerationPolicy`][crate::HardwareAccelerationPolicy]
1285    #[doc(alias = "webkit_settings_get_hardware_acceleration_policy")]
1286    #[doc(alias = "get_hardware_acceleration_policy")]
1287    #[doc(alias = "hardware-acceleration-policy")]
1288    pub fn hardware_acceleration_policy(&self) -> HardwareAccelerationPolicy {
1289        unsafe {
1290            from_glib(ffi::webkit_settings_get_hardware_acceleration_policy(
1291                self.to_glib_none().0,
1292            ))
1293        }
1294    }
1295
1296    /// Get the [`javascript-can-access-clipboard`][struct@crate::Settings#javascript-can-access-clipboard] property.
1297    ///
1298    /// # Returns
1299    ///
1300    /// [`true`] If javascript-can-access-clipboard is enabled or [`false`] otherwise.
1301    #[doc(alias = "webkit_settings_get_javascript_can_access_clipboard")]
1302    #[doc(alias = "get_javascript_can_access_clipboard")]
1303    #[doc(alias = "javascript-can-access-clipboard")]
1304    pub fn is_javascript_can_access_clipboard(&self) -> bool {
1305        unsafe {
1306            from_glib(ffi::webkit_settings_get_javascript_can_access_clipboard(
1307                self.to_glib_none().0,
1308            ))
1309        }
1310    }
1311
1312    /// Get the [`javascript-can-open-windows-automatically`][struct@crate::Settings#javascript-can-open-windows-automatically] property.
1313    ///
1314    /// # Returns
1315    ///
1316    /// [`true`] If JavaScript can open window automatically or [`false`] otherwise.
1317    #[doc(alias = "webkit_settings_get_javascript_can_open_windows_automatically")]
1318    #[doc(alias = "get_javascript_can_open_windows_automatically")]
1319    #[doc(alias = "javascript-can-open-windows-automatically")]
1320    pub fn is_javascript_can_open_windows_automatically(&self) -> bool {
1321        unsafe {
1322            from_glib(
1323                ffi::webkit_settings_get_javascript_can_open_windows_automatically(
1324                    self.to_glib_none().0,
1325                ),
1326            )
1327        }
1328    }
1329
1330    /// Setting no longer supported. This function returns [`false`].
1331    ///
1332    /// # Deprecated since 2.42
1333    ///
1334    ///
1335    /// # Returns
1336    ///
1337    /// [`false`]
1338    #[cfg_attr(feature = "v2_42", deprecated = "Since 2.42")]
1339    #[allow(deprecated)]
1340    #[doc(alias = "webkit_settings_get_load_icons_ignoring_image_load_setting")]
1341    #[doc(alias = "get_load_icons_ignoring_image_load_setting")]
1342    #[doc(alias = "load-icons-ignoring-image-load-setting")]
1343    pub fn is_load_icons_ignoring_image_load_setting(&self) -> bool {
1344        unsafe {
1345            from_glib(
1346                ffi::webkit_settings_get_load_icons_ignoring_image_load_setting(
1347                    self.to_glib_none().0,
1348                ),
1349            )
1350        }
1351    }
1352
1353    /// Gets the [`math-font-family`][struct@crate::Settings#math-font-family] property.
1354    ///
1355    /// # Returns
1356    ///
1357    /// The default font family used to display content marked with math font.
1358    ///
1359    /// Since 2.52
1360    #[doc(alias = "webkit_settings_get_math_font_family")]
1361    #[doc(alias = "get_math_font_family")]
1362    #[doc(alias = "math-font-family")]
1363    pub fn math_font_family(&self) -> Option<glib::GString> {
1364        unsafe {
1365            from_glib_none(ffi::webkit_settings_get_math_font_family(
1366                self.to_glib_none().0,
1367            ))
1368        }
1369    }
1370
1371    /// Gets the [`media-content-types-requiring-hardware-support`][struct@crate::Settings#media-content-types-requiring-hardware-support] property.
1372    ///
1373    /// # Returns
1374    ///
1375    /// Media content types requiring hardware support, or [`None`].
1376    #[doc(alias = "webkit_settings_get_media_content_types_requiring_hardware_support")]
1377    #[doc(alias = "get_media_content_types_requiring_hardware_support")]
1378    #[doc(alias = "media-content-types-requiring-hardware-support")]
1379    pub fn media_content_types_requiring_hardware_support(&self) -> Option<glib::GString> {
1380        unsafe {
1381            from_glib_none(
1382                ffi::webkit_settings_get_media_content_types_requiring_hardware_support(
1383                    self.to_glib_none().0,
1384                ),
1385            )
1386        }
1387    }
1388
1389    /// Get the [`media-playback-allows-inline`][struct@crate::Settings#media-playback-allows-inline] property.
1390    ///
1391    /// # Returns
1392    ///
1393    /// [`true`] If inline playback is allowed for media
1394    ///  or [`false`] if only fullscreen playback is allowed.
1395    #[doc(alias = "webkit_settings_get_media_playback_allows_inline")]
1396    #[doc(alias = "get_media_playback_allows_inline")]
1397    #[doc(alias = "media-playback-allows-inline")]
1398    pub fn is_media_playback_allows_inline(&self) -> bool {
1399        unsafe {
1400            from_glib(ffi::webkit_settings_get_media_playback_allows_inline(
1401                self.to_glib_none().0,
1402            ))
1403        }
1404    }
1405
1406    /// Get the [`media-playback-requires-user-gesture`][struct@crate::Settings#media-playback-requires-user-gesture] property.
1407    ///
1408    /// # Returns
1409    ///
1410    /// [`true`] If an user gesture is needed to play or load media
1411    ///  or [`false`] if no user gesture is needed.
1412    #[doc(alias = "webkit_settings_get_media_playback_requires_user_gesture")]
1413    #[doc(alias = "get_media_playback_requires_user_gesture")]
1414    #[doc(alias = "media-playback-requires-user-gesture")]
1415    pub fn is_media_playback_requires_user_gesture(&self) -> bool {
1416        unsafe {
1417            from_glib(
1418                ffi::webkit_settings_get_media_playback_requires_user_gesture(
1419                    self.to_glib_none().0,
1420                ),
1421            )
1422        }
1423    }
1424
1425    /// Gets the [`minimum-font-size`][struct@crate::Settings#minimum-font-size] property.
1426    ///
1427    /// # Returns
1428    ///
1429    /// Minimum font size, in pixels.
1430    #[doc(alias = "webkit_settings_get_minimum_font_size")]
1431    #[doc(alias = "get_minimum_font_size")]
1432    #[doc(alias = "minimum-font-size")]
1433    pub fn minimum_font_size(&self) -> u32 {
1434        unsafe { ffi::webkit_settings_get_minimum_font_size(self.to_glib_none().0) }
1435    }
1436
1437    /// Gets the [`monospace-font-family`][struct@crate::Settings#monospace-font-family] property.
1438    ///
1439    /// # Returns
1440    ///
1441    /// Default font family used to display content marked with monospace font.
1442    #[doc(alias = "webkit_settings_get_monospace_font_family")]
1443    #[doc(alias = "get_monospace_font_family")]
1444    #[doc(alias = "monospace-font-family")]
1445    pub fn monospace_font_family(&self) -> Option<glib::GString> {
1446        unsafe {
1447            from_glib_none(ffi::webkit_settings_get_monospace_font_family(
1448                self.to_glib_none().0,
1449            ))
1450        }
1451    }
1452
1453    /// Gets the [`pictograph-font-family`][struct@crate::Settings#pictograph-font-family] property.
1454    ///
1455    /// # Returns
1456    ///
1457    /// The default font family used to display content marked with pictograph font.
1458    #[doc(alias = "webkit_settings_get_pictograph_font_family")]
1459    #[doc(alias = "get_pictograph_font_family")]
1460    #[doc(alias = "pictograph-font-family")]
1461    pub fn pictograph_font_family(&self) -> Option<glib::GString> {
1462        unsafe {
1463            from_glib_none(ffi::webkit_settings_get_pictograph_font_family(
1464                self.to_glib_none().0,
1465            ))
1466        }
1467    }
1468
1469    /// Get the [`print-backgrounds`][struct@crate::Settings#print-backgrounds] property.
1470    ///
1471    /// # Returns
1472    ///
1473    /// [`true`] If background images should be printed or [`false`] otherwise.
1474    #[doc(alias = "webkit_settings_get_print_backgrounds")]
1475    #[doc(alias = "get_print_backgrounds")]
1476    #[doc(alias = "print-backgrounds")]
1477    pub fn is_print_backgrounds(&self) -> bool {
1478        unsafe {
1479            from_glib(ffi::webkit_settings_get_print_backgrounds(
1480                self.to_glib_none().0,
1481            ))
1482        }
1483    }
1484
1485    /// Gets the [`sans-serif-font-family`][struct@crate::Settings#sans-serif-font-family] property.
1486    ///
1487    /// # Returns
1488    ///
1489    /// The default font family used to display content marked with sans-serif font.
1490    #[doc(alias = "webkit_settings_get_sans_serif_font_family")]
1491    #[doc(alias = "get_sans_serif_font_family")]
1492    #[doc(alias = "sans-serif-font-family")]
1493    pub fn sans_serif_font_family(&self) -> Option<glib::GString> {
1494        unsafe {
1495            from_glib_none(ffi::webkit_settings_get_sans_serif_font_family(
1496                self.to_glib_none().0,
1497            ))
1498        }
1499    }
1500
1501    /// Gets the [`serif-font-family`][struct@crate::Settings#serif-font-family] property.
1502    ///
1503    /// # Returns
1504    ///
1505    /// The default font family used to display content marked with serif font.
1506    #[doc(alias = "webkit_settings_get_serif_font_family")]
1507    #[doc(alias = "get_serif_font_family")]
1508    #[doc(alias = "serif-font-family")]
1509    pub fn serif_font_family(&self) -> Option<glib::GString> {
1510        unsafe {
1511            from_glib_none(ffi::webkit_settings_get_serif_font_family(
1512                self.to_glib_none().0,
1513            ))
1514        }
1515    }
1516
1517    /// Get the [`user-agent`][struct@crate::Settings#user-agent] property.
1518    ///
1519    /// # Returns
1520    ///
1521    /// The current value of the user-agent property.
1522    #[doc(alias = "webkit_settings_get_user_agent")]
1523    #[doc(alias = "get_user_agent")]
1524    #[doc(alias = "user-agent")]
1525    pub fn user_agent(&self) -> Option<glib::GString> {
1526        unsafe { from_glib_none(ffi::webkit_settings_get_user_agent(self.to_glib_none().0)) }
1527    }
1528
1529    /// Get the [property`Settings`] property.
1530    ///
1531    /// # Returns
1532    ///
1533    /// The WebRTC UDP ports range, or [`None`] if un-set.
1534    #[cfg(feature = "v2_48")]
1535    #[cfg_attr(docsrs, doc(cfg(feature = "v2_48")))]
1536    #[doc(alias = "webkit_settings_get_webrtc_udp_ports_range")]
1537    #[doc(alias = "get_webrtc_udp_ports_range")]
1538    #[doc(alias = "webrtc-udp-ports-range")]
1539    pub fn webrtc_udp_ports_range(&self) -> Option<glib::GString> {
1540        unsafe {
1541            from_glib_none(ffi::webkit_settings_get_webrtc_udp_ports_range(
1542                self.to_glib_none().0,
1543            ))
1544        }
1545    }
1546
1547    /// Get the [`zoom-text-only`][struct@crate::Settings#zoom-text-only] property.
1548    ///
1549    /// # Returns
1550    ///
1551    /// [`true`] If zoom level of the view should only affect the text
1552    ///  or [`false`] if all view contents should be scaled.
1553    #[doc(alias = "webkit_settings_get_zoom_text_only")]
1554    #[doc(alias = "get_zoom_text_only")]
1555    #[doc(alias = "zoom-text-only")]
1556    pub fn is_zoom_text_only(&self) -> bool {
1557        unsafe {
1558            from_glib(ffi::webkit_settings_get_zoom_text_only(
1559                self.to_glib_none().0,
1560            ))
1561        }
1562    }
1563
1564    /// Set the [`allow-file-access-from-file-urls`][struct@crate::Settings#allow-file-access-from-file-urls] property.
1565    /// ## `allowed`
1566    /// Value to be set
1567    #[doc(alias = "webkit_settings_set_allow_file_access_from_file_urls")]
1568    #[doc(alias = "allow-file-access-from-file-urls")]
1569    pub fn set_allow_file_access_from_file_urls(&self, allowed: bool) {
1570        unsafe {
1571            ffi::webkit_settings_set_allow_file_access_from_file_urls(
1572                self.to_glib_none().0,
1573                allowed.into_glib(),
1574            );
1575        }
1576    }
1577
1578    /// Set the [`allow-modal-dialogs`][struct@crate::Settings#allow-modal-dialogs] property.
1579    /// ## `allowed`
1580    /// Value to be set
1581    #[doc(alias = "webkit_settings_set_allow_modal_dialogs")]
1582    #[doc(alias = "allow-modal-dialogs")]
1583    pub fn set_allow_modal_dialogs(&self, allowed: bool) {
1584        unsafe {
1585            ffi::webkit_settings_set_allow_modal_dialogs(
1586                self.to_glib_none().0,
1587                allowed.into_glib(),
1588            );
1589        }
1590    }
1591
1592    /// Set the [`allow-top-navigation-to-data-urls`][struct@crate::Settings#allow-top-navigation-to-data-urls] property.
1593    /// ## `allowed`
1594    /// Value to be set
1595    #[doc(alias = "webkit_settings_set_allow_top_navigation_to_data_urls")]
1596    #[doc(alias = "allow-top-navigation-to-data-urls")]
1597    pub fn set_allow_top_navigation_to_data_urls(&self, allowed: bool) {
1598        unsafe {
1599            ffi::webkit_settings_set_allow_top_navigation_to_data_urls(
1600                self.to_glib_none().0,
1601                allowed.into_glib(),
1602            );
1603        }
1604    }
1605
1606    /// Set the [`allow-universal-access-from-file-urls`][struct@crate::Settings#allow-universal-access-from-file-urls] property.
1607    /// ## `allowed`
1608    /// Value to be set
1609    #[doc(alias = "webkit_settings_set_allow_universal_access_from_file_urls")]
1610    #[doc(alias = "allow-universal-access-from-file-urls")]
1611    pub fn set_allow_universal_access_from_file_urls(&self, allowed: bool) {
1612        unsafe {
1613            ffi::webkit_settings_set_allow_universal_access_from_file_urls(
1614                self.to_glib_none().0,
1615                allowed.into_glib(),
1616            );
1617        }
1618    }
1619
1620    /// Set the [`auto-load-images`][struct@crate::Settings#auto-load-images] property.
1621    /// ## `enabled`
1622    /// Value to be set
1623    #[doc(alias = "webkit_settings_set_auto_load_images")]
1624    #[doc(alias = "auto-load-images")]
1625    pub fn set_auto_load_images(&self, enabled: bool) {
1626        unsafe {
1627            ffi::webkit_settings_set_auto_load_images(self.to_glib_none().0, enabled.into_glib());
1628        }
1629    }
1630
1631    /// Set the [`cursive-font-family`][struct@crate::Settings#cursive-font-family] property.
1632    /// ## `cursive_font_family`
1633    /// the new default cursive font family
1634    #[doc(alias = "webkit_settings_set_cursive_font_family")]
1635    #[doc(alias = "cursive-font-family")]
1636    pub fn set_cursive_font_family(&self, cursive_font_family: &str) {
1637        unsafe {
1638            ffi::webkit_settings_set_cursive_font_family(
1639                self.to_glib_none().0,
1640                cursive_font_family.to_glib_none().0,
1641            );
1642        }
1643    }
1644
1645    /// Set the [`default-charset`][struct@crate::Settings#default-charset] property.
1646    /// ## `default_charset`
1647    /// default charset to be set
1648    #[doc(alias = "webkit_settings_set_default_charset")]
1649    #[doc(alias = "default-charset")]
1650    pub fn set_default_charset(&self, default_charset: &str) {
1651        unsafe {
1652            ffi::webkit_settings_set_default_charset(
1653                self.to_glib_none().0,
1654                default_charset.to_glib_none().0,
1655            );
1656        }
1657    }
1658
1659    /// Set the [`default-font-family`][struct@crate::Settings#default-font-family] property.
1660    /// ## `default_font_family`
1661    /// the new default font family
1662    #[doc(alias = "webkit_settings_set_default_font_family")]
1663    #[doc(alias = "default-font-family")]
1664    pub fn set_default_font_family(&self, default_font_family: &str) {
1665        unsafe {
1666            ffi::webkit_settings_set_default_font_family(
1667                self.to_glib_none().0,
1668                default_font_family.to_glib_none().0,
1669            );
1670        }
1671    }
1672
1673    /// Set the [`default-font-size`][struct@crate::Settings#default-font-size] property.
1674    /// ## `font_size`
1675    /// default font size to be set in pixels
1676    #[doc(alias = "webkit_settings_set_default_font_size")]
1677    #[doc(alias = "default-font-size")]
1678    pub fn set_default_font_size(&self, font_size: u32) {
1679        unsafe {
1680            ffi::webkit_settings_set_default_font_size(self.to_glib_none().0, font_size);
1681        }
1682    }
1683
1684    /// Set the [`default-monospace-font-size`][struct@crate::Settings#default-monospace-font-size] property.
1685    /// ## `font_size`
1686    /// default monospace font size to be set in pixels
1687    #[doc(alias = "webkit_settings_set_default_monospace_font_size")]
1688    #[doc(alias = "default-monospace-font-size")]
1689    pub fn set_default_monospace_font_size(&self, font_size: u32) {
1690        unsafe {
1691            ffi::webkit_settings_set_default_monospace_font_size(self.to_glib_none().0, font_size);
1692        }
1693    }
1694
1695    /// Set the [`disable-web-security`][struct@crate::Settings#disable-web-security] property.
1696    /// ## `disabled`
1697    /// Value to be set
1698    #[doc(alias = "webkit_settings_set_disable_web_security")]
1699    #[doc(alias = "disable-web-security")]
1700    pub fn set_disable_web_security(&self, disabled: bool) {
1701        unsafe {
1702            ffi::webkit_settings_set_disable_web_security(
1703                self.to_glib_none().0,
1704                disabled.into_glib(),
1705            );
1706        }
1707    }
1708
1709    /// Set the [`draw-compositing-indicators`][struct@crate::Settings#draw-compositing-indicators] property.
1710    /// ## `enabled`
1711    /// Value to be set
1712    #[doc(alias = "webkit_settings_set_draw_compositing_indicators")]
1713    #[doc(alias = "draw-compositing-indicators")]
1714    pub fn set_draw_compositing_indicators(&self, enabled: bool) {
1715        unsafe {
1716            ffi::webkit_settings_set_draw_compositing_indicators(
1717                self.to_glib_none().0,
1718                enabled.into_glib(),
1719            );
1720        }
1721    }
1722
1723    /// Set the [`enable-2d-canvas-acceleration`][struct@crate::Settings#enable-2d-canvas-acceleration] property.
1724    /// ## `enabled`
1725    /// Value to be set
1726    #[cfg(feature = "v2_46")]
1727    #[cfg_attr(docsrs, doc(cfg(feature = "v2_46")))]
1728    #[doc(alias = "webkit_settings_set_enable_2d_canvas_acceleration")]
1729    #[doc(alias = "enable-2d-canvas-acceleration")]
1730    pub fn set_enable_2d_canvas_acceleration(&self, enabled: bool) {
1731        unsafe {
1732            ffi::webkit_settings_set_enable_2d_canvas_acceleration(
1733                self.to_glib_none().0,
1734                enabled.into_glib(),
1735            );
1736        }
1737    }
1738
1739    /// Set the [`enable-back-forward-navigation-gestures`][struct@crate::Settings#enable-back-forward-navigation-gestures] property.
1740    /// ## `enabled`
1741    /// value to be set
1742    #[doc(alias = "webkit_settings_set_enable_back_forward_navigation_gestures")]
1743    #[doc(alias = "enable-back-forward-navigation-gestures")]
1744    pub fn set_enable_back_forward_navigation_gestures(&self, enabled: bool) {
1745        unsafe {
1746            ffi::webkit_settings_set_enable_back_forward_navigation_gestures(
1747                self.to_glib_none().0,
1748                enabled.into_glib(),
1749            );
1750        }
1751    }
1752
1753    /// Set the [`enable-caret-browsing`][struct@crate::Settings#enable-caret-browsing] property.
1754    /// ## `enabled`
1755    /// Value to be set
1756    #[doc(alias = "webkit_settings_set_enable_caret_browsing")]
1757    #[doc(alias = "enable-caret-browsing")]
1758    pub fn set_enable_caret_browsing(&self, enabled: bool) {
1759        unsafe {
1760            ffi::webkit_settings_set_enable_caret_browsing(
1761                self.to_glib_none().0,
1762                enabled.into_glib(),
1763            );
1764        }
1765    }
1766
1767    /// Set the [`enable-developer-extras`][struct@crate::Settings#enable-developer-extras] property.
1768    /// ## `enabled`
1769    /// Value to be set
1770    #[doc(alias = "webkit_settings_set_enable_developer_extras")]
1771    #[doc(alias = "enable-developer-extras")]
1772    pub fn set_enable_developer_extras(&self, enabled: bool) {
1773        unsafe {
1774            ffi::webkit_settings_set_enable_developer_extras(
1775                self.to_glib_none().0,
1776                enabled.into_glib(),
1777            );
1778        }
1779    }
1780
1781    /// Set the [`enable-dns-prefetching`][struct@crate::Settings#enable-dns-prefetching] property.
1782    ///
1783    /// # Deprecated since 2.48
1784    ///
1785    /// ## `enabled`
1786    /// Value to be set
1787    #[cfg_attr(feature = "v2_48", deprecated = "Since 2.48")]
1788    #[allow(deprecated)]
1789    #[doc(alias = "webkit_settings_set_enable_dns_prefetching")]
1790    #[doc(alias = "enable-dns-prefetching")]
1791    pub fn set_enable_dns_prefetching(&self, enabled: bool) {
1792        unsafe {
1793            ffi::webkit_settings_set_enable_dns_prefetching(
1794                self.to_glib_none().0,
1795                enabled.into_glib(),
1796            );
1797        }
1798    }
1799
1800    /// Set the [`enable-encrypted-media`][struct@crate::Settings#enable-encrypted-media] property.
1801    /// ## `enabled`
1802    /// Value to be set
1803    #[doc(alias = "webkit_settings_set_enable_encrypted_media")]
1804    #[doc(alias = "enable-encrypted-media")]
1805    pub fn set_enable_encrypted_media(&self, enabled: bool) {
1806        unsafe {
1807            ffi::webkit_settings_set_enable_encrypted_media(
1808                self.to_glib_none().0,
1809                enabled.into_glib(),
1810            );
1811        }
1812    }
1813
1814    /// Set the [`enable-fullscreen`][struct@crate::Settings#enable-fullscreen] property.
1815    /// ## `enabled`
1816    /// Value to be set
1817    #[doc(alias = "webkit_settings_set_enable_fullscreen")]
1818    #[doc(alias = "enable-fullscreen")]
1819    pub fn set_enable_fullscreen(&self, enabled: bool) {
1820        unsafe {
1821            ffi::webkit_settings_set_enable_fullscreen(self.to_glib_none().0, enabled.into_glib());
1822        }
1823    }
1824
1825    /// Set the [`enable-html5-database`][struct@crate::Settings#enable-html5-database] property.
1826    /// ## `enabled`
1827    /// Value to be set
1828    #[doc(alias = "webkit_settings_set_enable_html5_database")]
1829    #[doc(alias = "enable-html5-database")]
1830    pub fn set_enable_html5_database(&self, enabled: bool) {
1831        unsafe {
1832            ffi::webkit_settings_set_enable_html5_database(
1833                self.to_glib_none().0,
1834                enabled.into_glib(),
1835            );
1836        }
1837    }
1838
1839    /// Set the [`enable-html5-local-storage`][struct@crate::Settings#enable-html5-local-storage] property.
1840    /// ## `enabled`
1841    /// Value to be set
1842    #[doc(alias = "webkit_settings_set_enable_html5_local_storage")]
1843    #[doc(alias = "enable-html5-local-storage")]
1844    pub fn set_enable_html5_local_storage(&self, enabled: bool) {
1845        unsafe {
1846            ffi::webkit_settings_set_enable_html5_local_storage(
1847                self.to_glib_none().0,
1848                enabled.into_glib(),
1849            );
1850        }
1851    }
1852
1853    /// Set the [`enable-hyperlink-auditing`][struct@crate::Settings#enable-hyperlink-auditing] property.
1854    ///
1855    /// # Deprecated since 2.50
1856    ///
1857    /// ## `enabled`
1858    /// Value to be set
1859    #[cfg_attr(feature = "v2_50", deprecated = "Since 2.50")]
1860    #[allow(deprecated)]
1861    #[doc(alias = "webkit_settings_set_enable_hyperlink_auditing")]
1862    #[doc(alias = "enable-hyperlink-auditing")]
1863    pub fn set_enable_hyperlink_auditing(&self, enabled: bool) {
1864        unsafe {
1865            ffi::webkit_settings_set_enable_hyperlink_auditing(
1866                self.to_glib_none().0,
1867                enabled.into_glib(),
1868            );
1869        }
1870    }
1871
1872    /// Set the [`enable-javascript`][struct@crate::Settings#enable-javascript] property.
1873    /// ## `enabled`
1874    /// Value to be set
1875    #[doc(alias = "webkit_settings_set_enable_javascript")]
1876    #[doc(alias = "enable-javascript")]
1877    pub fn set_enable_javascript(&self, enabled: bool) {
1878        unsafe {
1879            ffi::webkit_settings_set_enable_javascript(self.to_glib_none().0, enabled.into_glib());
1880        }
1881    }
1882
1883    /// Set the [`enable-javascript-markup`][struct@crate::Settings#enable-javascript-markup] property.
1884    /// ## `enabled`
1885    /// Value to be set
1886    #[doc(alias = "webkit_settings_set_enable_javascript_markup")]
1887    #[doc(alias = "enable-javascript-markup")]
1888    pub fn set_enable_javascript_markup(&self, enabled: bool) {
1889        unsafe {
1890            ffi::webkit_settings_set_enable_javascript_markup(
1891                self.to_glib_none().0,
1892                enabled.into_glib(),
1893            );
1894        }
1895    }
1896
1897    /// Set the [`enable-media`][struct@crate::Settings#enable-media] property.
1898    /// ## `enabled`
1899    /// Value to be set
1900    #[doc(alias = "webkit_settings_set_enable_media")]
1901    #[doc(alias = "enable-media")]
1902    pub fn set_enable_media(&self, enabled: bool) {
1903        unsafe {
1904            ffi::webkit_settings_set_enable_media(self.to_glib_none().0, enabled.into_glib());
1905        }
1906    }
1907
1908    /// Set the [`enable-media-capabilities`][struct@crate::Settings#enable-media-capabilities] property.
1909    /// ## `enabled`
1910    /// Value to be set
1911    #[doc(alias = "webkit_settings_set_enable_media_capabilities")]
1912    #[doc(alias = "enable-media-capabilities")]
1913    pub fn set_enable_media_capabilities(&self, enabled: bool) {
1914        unsafe {
1915            ffi::webkit_settings_set_enable_media_capabilities(
1916                self.to_glib_none().0,
1917                enabled.into_glib(),
1918            );
1919        }
1920    }
1921
1922    /// Set the [`enable-media-stream`][struct@crate::Settings#enable-media-stream] property.
1923    /// ## `enabled`
1924    /// Value to be set
1925    #[doc(alias = "webkit_settings_set_enable_media_stream")]
1926    #[doc(alias = "enable-media-stream")]
1927    pub fn set_enable_media_stream(&self, enabled: bool) {
1928        unsafe {
1929            ffi::webkit_settings_set_enable_media_stream(
1930                self.to_glib_none().0,
1931                enabled.into_glib(),
1932            );
1933        }
1934    }
1935
1936    /// Set the [`enable-mediasource`][struct@crate::Settings#enable-mediasource] property.
1937    /// ## `enabled`
1938    /// Value to be set
1939    #[doc(alias = "webkit_settings_set_enable_mediasource")]
1940    #[doc(alias = "enable-mediasource")]
1941    pub fn set_enable_mediasource(&self, enabled: bool) {
1942        unsafe {
1943            ffi::webkit_settings_set_enable_mediasource(self.to_glib_none().0, enabled.into_glib());
1944        }
1945    }
1946
1947    /// Set the [`enable-mock-capture-devices`][struct@crate::Settings#enable-mock-capture-devices] property.
1948    /// ## `enabled`
1949    /// Value to be set
1950    #[doc(alias = "webkit_settings_set_enable_mock_capture_devices")]
1951    #[doc(alias = "enable-mock-capture-devices")]
1952    pub fn set_enable_mock_capture_devices(&self, enabled: bool) {
1953        unsafe {
1954            ffi::webkit_settings_set_enable_mock_capture_devices(
1955                self.to_glib_none().0,
1956                enabled.into_glib(),
1957            );
1958        }
1959    }
1960
1961    /// Setting no longer supported. This function does nothing.
1962    ///
1963    /// # Deprecated since 2.44
1964    ///
1965    /// ## `enabled`
1966    /// Value to be set
1967    #[cfg_attr(feature = "v2_44", deprecated = "Since 2.44")]
1968    #[allow(deprecated)]
1969    #[doc(alias = "webkit_settings_set_enable_offline_web_application_cache")]
1970    #[doc(alias = "enable-offline-web-application-cache")]
1971    pub fn set_enable_offline_web_application_cache(&self, enabled: bool) {
1972        unsafe {
1973            ffi::webkit_settings_set_enable_offline_web_application_cache(
1974                self.to_glib_none().0,
1975                enabled.into_glib(),
1976            );
1977        }
1978    }
1979
1980    /// Set the [`enable-page-cache`][struct@crate::Settings#enable-page-cache] property.
1981    /// ## `enabled`
1982    /// Value to be set
1983    #[doc(alias = "webkit_settings_set_enable_page_cache")]
1984    #[doc(alias = "enable-page-cache")]
1985    pub fn set_enable_page_cache(&self, enabled: bool) {
1986        unsafe {
1987            ffi::webkit_settings_set_enable_page_cache(self.to_glib_none().0, enabled.into_glib());
1988        }
1989    }
1990
1991    /// Set the [`enable-resizable-text-areas`][struct@crate::Settings#enable-resizable-text-areas] property.
1992    /// ## `enabled`
1993    /// Value to be set
1994    #[doc(alias = "webkit_settings_set_enable_resizable_text_areas")]
1995    #[doc(alias = "enable-resizable-text-areas")]
1996    pub fn set_enable_resizable_text_areas(&self, enabled: bool) {
1997        unsafe {
1998            ffi::webkit_settings_set_enable_resizable_text_areas(
1999                self.to_glib_none().0,
2000                enabled.into_glib(),
2001            );
2002        }
2003    }
2004
2005    /// Set the [`enable-site-specific-quirks`][struct@crate::Settings#enable-site-specific-quirks] property.
2006    /// ## `enabled`
2007    /// Value to be set
2008    #[doc(alias = "webkit_settings_set_enable_site_specific_quirks")]
2009    #[doc(alias = "enable-site-specific-quirks")]
2010    pub fn set_enable_site_specific_quirks(&self, enabled: bool) {
2011        unsafe {
2012            ffi::webkit_settings_set_enable_site_specific_quirks(
2013                self.to_glib_none().0,
2014                enabled.into_glib(),
2015            );
2016        }
2017    }
2018
2019    /// Set the [`enable-smooth-scrolling`][struct@crate::Settings#enable-smooth-scrolling] property.
2020    /// ## `enabled`
2021    /// Value to be set
2022    #[doc(alias = "webkit_settings_set_enable_smooth_scrolling")]
2023    #[doc(alias = "enable-smooth-scrolling")]
2024    pub fn set_enable_smooth_scrolling(&self, enabled: bool) {
2025        unsafe {
2026            ffi::webkit_settings_set_enable_smooth_scrolling(
2027                self.to_glib_none().0,
2028                enabled.into_glib(),
2029            );
2030        }
2031    }
2032
2033    /// Set the [`enable-spatial-navigation`][struct@crate::Settings#enable-spatial-navigation] property.
2034    /// ## `enabled`
2035    /// Value to be set
2036    #[doc(alias = "webkit_settings_set_enable_spatial_navigation")]
2037    #[doc(alias = "enable-spatial-navigation")]
2038    pub fn set_enable_spatial_navigation(&self, enabled: bool) {
2039        unsafe {
2040            ffi::webkit_settings_set_enable_spatial_navigation(
2041                self.to_glib_none().0,
2042                enabled.into_glib(),
2043            );
2044        }
2045    }
2046
2047    /// Set the [`enable-tabs-to-links`][struct@crate::Settings#enable-tabs-to-links] property.
2048    /// ## `enabled`
2049    /// Value to be set
2050    #[doc(alias = "webkit_settings_set_enable_tabs_to_links")]
2051    #[doc(alias = "enable-tabs-to-links")]
2052    pub fn set_enable_tabs_to_links(&self, enabled: bool) {
2053        unsafe {
2054            ffi::webkit_settings_set_enable_tabs_to_links(
2055                self.to_glib_none().0,
2056                enabled.into_glib(),
2057            );
2058        }
2059    }
2060
2061    /// Set the [`enable-webaudio`][struct@crate::Settings#enable-webaudio] property.
2062    /// ## `enabled`
2063    /// Value to be set
2064    #[doc(alias = "webkit_settings_set_enable_webaudio")]
2065    #[doc(alias = "enable-webaudio")]
2066    pub fn set_enable_webaudio(&self, enabled: bool) {
2067        unsafe {
2068            ffi::webkit_settings_set_enable_webaudio(self.to_glib_none().0, enabled.into_glib());
2069        }
2070    }
2071
2072    /// Set the [`enable-webgl`][struct@crate::Settings#enable-webgl] property.
2073    /// ## `enabled`
2074    /// Value to be set
2075    #[doc(alias = "webkit_settings_set_enable_webgl")]
2076    #[doc(alias = "enable-webgl")]
2077    pub fn set_enable_webgl(&self, enabled: bool) {
2078        unsafe {
2079            ffi::webkit_settings_set_enable_webgl(self.to_glib_none().0, enabled.into_glib());
2080        }
2081    }
2082
2083    /// Set the [property`Settings`] property.
2084    ///
2085    /// Setting this property to [`true`] implies the media-stream web-setting will also be enabled.
2086    /// ## `enabled`
2087    /// Value to be set
2088    #[doc(alias = "webkit_settings_set_enable_webrtc")]
2089    #[doc(alias = "enable-webrtc")]
2090    pub fn set_enable_webrtc(&self, enabled: bool) {
2091        unsafe {
2092            ffi::webkit_settings_set_enable_webrtc(self.to_glib_none().0, enabled.into_glib());
2093        }
2094    }
2095
2096    /// Set the [`enable-write-console-messages-to-stdout`][struct@crate::Settings#enable-write-console-messages-to-stdout] property.
2097    /// ## `enabled`
2098    /// Value to be set
2099    #[doc(alias = "webkit_settings_set_enable_write_console_messages_to_stdout")]
2100    #[doc(alias = "enable-write-console-messages-to-stdout")]
2101    pub fn set_enable_write_console_messages_to_stdout(&self, enabled: bool) {
2102        unsafe {
2103            ffi::webkit_settings_set_enable_write_console_messages_to_stdout(
2104                self.to_glib_none().0,
2105                enabled.into_glib(),
2106            );
2107        }
2108    }
2109
2110    /// Set the [`fantasy-font-family`][struct@crate::Settings#fantasy-font-family] property.
2111    /// ## `fantasy_font_family`
2112    /// the new default fantasy font family
2113    #[doc(alias = "webkit_settings_set_fantasy_font_family")]
2114    #[doc(alias = "fantasy-font-family")]
2115    pub fn set_fantasy_font_family(&self, fantasy_font_family: &str) {
2116        unsafe {
2117            ffi::webkit_settings_set_fantasy_font_family(
2118                self.to_glib_none().0,
2119                fantasy_font_family.to_glib_none().0,
2120            );
2121        }
2122    }
2123
2124    /// Enables or disables a feature.
2125    ///
2126    /// The current status of the feature can be determined with
2127    /// [id[`is_feature_enabled()`][Self::is_feature_enabled()]]. To reset a feature to its
2128    /// initial status, pass the value returned by
2129    /// [id[`Feature::is_default_value()`][crate::Feature::is_default_value()]] as the `enabled` parameter.
2130    /// ## `feature`
2131    /// the feature to toggle.
2132    /// ## `enabled`
2133    /// whether the feature will be enabled.
2134    #[cfg(feature = "v2_42")]
2135    #[cfg_attr(docsrs, doc(cfg(feature = "v2_42")))]
2136    #[doc(alias = "webkit_settings_set_feature_enabled")]
2137    pub fn set_feature_enabled(&self, feature: &Feature, enabled: bool) {
2138        unsafe {
2139            ffi::webkit_settings_set_feature_enabled(
2140                self.to_glib_none().0,
2141                feature.to_glib_none().0,
2142                enabled.into_glib(),
2143            );
2144        }
2145    }
2146
2147    /// Set the [`hardware-acceleration-policy`][struct@crate::Settings#hardware-acceleration-policy] property.
2148    /// ## `policy`
2149    /// a [`HardwareAccelerationPolicy`][crate::HardwareAccelerationPolicy]
2150    #[doc(alias = "webkit_settings_set_hardware_acceleration_policy")]
2151    #[doc(alias = "hardware-acceleration-policy")]
2152    pub fn set_hardware_acceleration_policy(&self, policy: HardwareAccelerationPolicy) {
2153        unsafe {
2154            ffi::webkit_settings_set_hardware_acceleration_policy(
2155                self.to_glib_none().0,
2156                policy.into_glib(),
2157            );
2158        }
2159    }
2160
2161    /// Set the [`javascript-can-access-clipboard`][struct@crate::Settings#javascript-can-access-clipboard] property.
2162    /// ## `enabled`
2163    /// Value to be set
2164    #[doc(alias = "webkit_settings_set_javascript_can_access_clipboard")]
2165    #[doc(alias = "javascript-can-access-clipboard")]
2166    pub fn set_javascript_can_access_clipboard(&self, enabled: bool) {
2167        unsafe {
2168            ffi::webkit_settings_set_javascript_can_access_clipboard(
2169                self.to_glib_none().0,
2170                enabled.into_glib(),
2171            );
2172        }
2173    }
2174
2175    /// Set the [`javascript-can-open-windows-automatically`][struct@crate::Settings#javascript-can-open-windows-automatically] property.
2176    /// ## `enabled`
2177    /// Value to be set
2178    #[doc(alias = "webkit_settings_set_javascript_can_open_windows_automatically")]
2179    #[doc(alias = "javascript-can-open-windows-automatically")]
2180    pub fn set_javascript_can_open_windows_automatically(&self, enabled: bool) {
2181        unsafe {
2182            ffi::webkit_settings_set_javascript_can_open_windows_automatically(
2183                self.to_glib_none().0,
2184                enabled.into_glib(),
2185            );
2186        }
2187    }
2188
2189    /// Setting no longer supported. This function does nothing.
2190    ///
2191    /// # Deprecated since 2.42
2192    ///
2193    /// ## `enabled`
2194    /// Value to be set
2195    #[cfg_attr(feature = "v2_42", deprecated = "Since 2.42")]
2196    #[allow(deprecated)]
2197    #[doc(alias = "webkit_settings_set_load_icons_ignoring_image_load_setting")]
2198    #[doc(alias = "load-icons-ignoring-image-load-setting")]
2199    pub fn set_load_icons_ignoring_image_load_setting(&self, enabled: bool) {
2200        unsafe {
2201            ffi::webkit_settings_set_load_icons_ignoring_image_load_setting(
2202                self.to_glib_none().0,
2203                enabled.into_glib(),
2204            );
2205        }
2206    }
2207
2208    /// Set the [`math-font-family`][struct@crate::Settings#math-font-family] property.
2209    ///
2210    /// Since 2.52
2211    /// ## `math_font_family`
2212    /// the new default math font family
2213    #[doc(alias = "webkit_settings_set_math_font_family")]
2214    #[doc(alias = "math-font-family")]
2215    pub fn set_math_font_family(&self, math_font_family: Option<&str>) {
2216        unsafe {
2217            ffi::webkit_settings_set_math_font_family(
2218                self.to_glib_none().0,
2219                math_font_family.to_glib_none().0,
2220            );
2221        }
2222    }
2223
2224    /// Set the [`media-content-types-requiring-hardware-support`][struct@crate::Settings#media-content-types-requiring-hardware-support] property.
2225    /// ## `content_types`
2226    /// list of media content types requiring hardware support split by semicolons (:) or [`None`] to use the default value.
2227    #[doc(alias = "webkit_settings_set_media_content_types_requiring_hardware_support")]
2228    #[doc(alias = "media-content-types-requiring-hardware-support")]
2229    pub fn set_media_content_types_requiring_hardware_support(&self, content_types: Option<&str>) {
2230        unsafe {
2231            ffi::webkit_settings_set_media_content_types_requiring_hardware_support(
2232                self.to_glib_none().0,
2233                content_types.to_glib_none().0,
2234            );
2235        }
2236    }
2237
2238    /// Set the [`media-playback-allows-inline`][struct@crate::Settings#media-playback-allows-inline] property.
2239    /// ## `enabled`
2240    /// Value to be set
2241    #[doc(alias = "webkit_settings_set_media_playback_allows_inline")]
2242    #[doc(alias = "media-playback-allows-inline")]
2243    pub fn set_media_playback_allows_inline(&self, enabled: bool) {
2244        unsafe {
2245            ffi::webkit_settings_set_media_playback_allows_inline(
2246                self.to_glib_none().0,
2247                enabled.into_glib(),
2248            );
2249        }
2250    }
2251
2252    /// Set the [`media-playback-requires-user-gesture`][struct@crate::Settings#media-playback-requires-user-gesture] property.
2253    /// ## `enabled`
2254    /// Value to be set
2255    #[doc(alias = "webkit_settings_set_media_playback_requires_user_gesture")]
2256    #[doc(alias = "media-playback-requires-user-gesture")]
2257    pub fn set_media_playback_requires_user_gesture(&self, enabled: bool) {
2258        unsafe {
2259            ffi::webkit_settings_set_media_playback_requires_user_gesture(
2260                self.to_glib_none().0,
2261                enabled.into_glib(),
2262            );
2263        }
2264    }
2265
2266    /// Set the [`minimum-font-size`][struct@crate::Settings#minimum-font-size] property.
2267    /// ## `font_size`
2268    /// minimum font size to be set in pixels
2269    #[doc(alias = "webkit_settings_set_minimum_font_size")]
2270    #[doc(alias = "minimum-font-size")]
2271    pub fn set_minimum_font_size(&self, font_size: u32) {
2272        unsafe {
2273            ffi::webkit_settings_set_minimum_font_size(self.to_glib_none().0, font_size);
2274        }
2275    }
2276
2277    /// Set the [`monospace-font-family`][struct@crate::Settings#monospace-font-family] property.
2278    /// ## `monospace_font_family`
2279    /// the new default monospace font family
2280    #[doc(alias = "webkit_settings_set_monospace_font_family")]
2281    #[doc(alias = "monospace-font-family")]
2282    pub fn set_monospace_font_family(&self, monospace_font_family: &str) {
2283        unsafe {
2284            ffi::webkit_settings_set_monospace_font_family(
2285                self.to_glib_none().0,
2286                monospace_font_family.to_glib_none().0,
2287            );
2288        }
2289    }
2290
2291    /// Set the [`pictograph-font-family`][struct@crate::Settings#pictograph-font-family] property.
2292    /// ## `pictograph_font_family`
2293    /// the new default pictograph font family
2294    #[doc(alias = "webkit_settings_set_pictograph_font_family")]
2295    #[doc(alias = "pictograph-font-family")]
2296    pub fn set_pictograph_font_family(&self, pictograph_font_family: &str) {
2297        unsafe {
2298            ffi::webkit_settings_set_pictograph_font_family(
2299                self.to_glib_none().0,
2300                pictograph_font_family.to_glib_none().0,
2301            );
2302        }
2303    }
2304
2305    /// Set the [`print-backgrounds`][struct@crate::Settings#print-backgrounds] property.
2306    /// ## `print_backgrounds`
2307    /// Value to be set
2308    #[doc(alias = "webkit_settings_set_print_backgrounds")]
2309    #[doc(alias = "print-backgrounds")]
2310    pub fn set_print_backgrounds(&self, print_backgrounds: bool) {
2311        unsafe {
2312            ffi::webkit_settings_set_print_backgrounds(
2313                self.to_glib_none().0,
2314                print_backgrounds.into_glib(),
2315            );
2316        }
2317    }
2318
2319    /// Set the [`sans-serif-font-family`][struct@crate::Settings#sans-serif-font-family] property.
2320    /// ## `sans_serif_font_family`
2321    /// the new default sans-serif font family
2322    #[doc(alias = "webkit_settings_set_sans_serif_font_family")]
2323    #[doc(alias = "sans-serif-font-family")]
2324    pub fn set_sans_serif_font_family(&self, sans_serif_font_family: &str) {
2325        unsafe {
2326            ffi::webkit_settings_set_sans_serif_font_family(
2327                self.to_glib_none().0,
2328                sans_serif_font_family.to_glib_none().0,
2329            );
2330        }
2331    }
2332
2333    /// Set the [`serif-font-family`][struct@crate::Settings#serif-font-family] property.
2334    /// ## `serif_font_family`
2335    /// the new default serif font family
2336    #[doc(alias = "webkit_settings_set_serif_font_family")]
2337    #[doc(alias = "serif-font-family")]
2338    pub fn set_serif_font_family(&self, serif_font_family: &str) {
2339        unsafe {
2340            ffi::webkit_settings_set_serif_font_family(
2341                self.to_glib_none().0,
2342                serif_font_family.to_glib_none().0,
2343            );
2344        }
2345    }
2346
2347    /// Set the [`user-agent`][struct@crate::Settings#user-agent] property.
2348    /// ## `user_agent`
2349    /// The new custom user agent string or [`None`] to use the default user agent
2350    #[doc(alias = "webkit_settings_set_user_agent")]
2351    #[doc(alias = "user-agent")]
2352    pub fn set_user_agent(&self, user_agent: Option<&str>) {
2353        unsafe {
2354            ffi::webkit_settings_set_user_agent(self.to_glib_none().0, user_agent.to_glib_none().0);
2355        }
2356    }
2357
2358    /// Set the [`user-agent`][struct@crate::Settings#user-agent] property by appending the application details.
2359    ///
2360    /// Set the [`user-agent`][struct@crate::Settings#user-agent] property by appending the application details to the default user
2361    /// agent. If no application name or version is given, the default user agent used will be used. If only
2362    /// the version is given, the default engine version is used with the given application name.
2363    /// ## `application_name`
2364    /// The application name used for the user agent or [`None`] to use the default user agent.
2365    /// ## `application_version`
2366    /// The application version for the user agent or [`None`] to user the default version.
2367    #[doc(alias = "webkit_settings_set_user_agent_with_application_details")]
2368    pub fn set_user_agent_with_application_details(
2369        &self,
2370        application_name: Option<&str>,
2371        application_version: Option<&str>,
2372    ) {
2373        unsafe {
2374            ffi::webkit_settings_set_user_agent_with_application_details(
2375                self.to_glib_none().0,
2376                application_name.to_glib_none().0,
2377                application_version.to_glib_none().0,
2378            );
2379        }
2380    }
2381
2382    /// Set the [property`Settings`] property.
2383    /// ## `udp_port_range`
2384    /// Value to be set
2385    #[cfg(feature = "v2_48")]
2386    #[cfg_attr(docsrs, doc(cfg(feature = "v2_48")))]
2387    #[doc(alias = "webkit_settings_set_webrtc_udp_ports_range")]
2388    #[doc(alias = "webrtc-udp-ports-range")]
2389    pub fn set_webrtc_udp_ports_range(&self, udp_port_range: &str) {
2390        unsafe {
2391            ffi::webkit_settings_set_webrtc_udp_ports_range(
2392                self.to_glib_none().0,
2393                udp_port_range.to_glib_none().0,
2394            );
2395        }
2396    }
2397
2398    /// Set the [`zoom-text-only`][struct@crate::Settings#zoom-text-only] property.
2399    /// ## `zoom_text_only`
2400    /// Value to be set
2401    #[doc(alias = "webkit_settings_set_zoom_text_only")]
2402    #[doc(alias = "zoom-text-only")]
2403    pub fn set_zoom_text_only(&self, zoom_text_only: bool) {
2404        unsafe {
2405            ffi::webkit_settings_set_zoom_text_only(
2406                self.to_glib_none().0,
2407                zoom_text_only.into_glib(),
2408            );
2409        }
2410    }
2411
2412    /// Convert `points` to the equivalent value in pixels.
2413    ///
2414    /// Applications can use this function to convert font size values
2415    /// in points to font size values in pixels when setting the font size properties
2416    /// of [`Settings`][crate::Settings].
2417    /// ## `points`
2418    /// the font size in points to convert to pixels
2419    ///
2420    /// # Returns
2421    ///
2422    /// the equivalent font size in pixels.
2423    #[doc(alias = "webkit_settings_font_size_to_pixels")]
2424    pub fn font_size_to_pixels(points: u32) -> u32 {
2425        assert_initialized_main_thread!();
2426        unsafe { ffi::webkit_settings_font_size_to_pixels(points) }
2427    }
2428
2429    /// Convert `pixels` to the equivalent value in points.
2430    ///
2431    /// Applications can use this function to convert font size values
2432    /// in pixels to font size values in points when getting the font size properties
2433    /// of [`Settings`][crate::Settings].
2434    /// ## `pixels`
2435    /// the font size in pixels to convert to points
2436    ///
2437    /// # Returns
2438    ///
2439    /// the equivalent font size in points.
2440    #[doc(alias = "webkit_settings_font_size_to_points")]
2441    pub fn font_size_to_points(pixels: u32) -> u32 {
2442        assert_initialized_main_thread!();
2443        unsafe { ffi::webkit_settings_font_size_to_points(pixels) }
2444    }
2445
2446    /// Gets the list of all available WebKit features.
2447    ///
2448    /// Features can be toggled with [method`Settings`],
2449    /// and their current state determined with
2450    /// [method`Settings`].
2451    ///
2452    /// Note that most applications should use
2453    /// [func`Settings`] and
2454    /// [func`Settings`] instead.
2455    ///
2456    /// # Returns
2457    ///
2458    /// List of all features.
2459    #[cfg(feature = "v2_42")]
2460    #[cfg_attr(docsrs, doc(cfg(feature = "v2_42")))]
2461    #[doc(alias = "webkit_settings_get_all_features")]
2462    #[doc(alias = "get_all_features")]
2463    pub fn all_features() -> Option<FeatureList> {
2464        assert_initialized_main_thread!();
2465        unsafe { from_glib_full(ffi::webkit_settings_get_all_features()) }
2466    }
2467
2468    /// Gets the list of available development WebKit features.
2469    ///
2470    /// The returned features are a subset of those returned by
2471    /// [func`Settings`], and includes those which
2472    /// web and WebKit developers might find useful, but in general should
2473    /// *not* be exposed to end users; see [enum`FeatureStatus`] for
2474    /// more details.
2475    ///
2476    /// # Returns
2477    ///
2478    /// List of development features.
2479    #[cfg(feature = "v2_42")]
2480    #[cfg_attr(docsrs, doc(cfg(feature = "v2_42")))]
2481    #[doc(alias = "webkit_settings_get_development_features")]
2482    #[doc(alias = "get_development_features")]
2483    pub fn development_features() -> Option<FeatureList> {
2484        assert_initialized_main_thread!();
2485        unsafe { from_glib_full(ffi::webkit_settings_get_development_features()) }
2486    }
2487
2488    /// Gets the list of available experimental WebKit features.
2489    ///
2490    /// The returned features are a subset of those returned by
2491    /// [func`Settings`], and includes those which
2492    /// certain applications may want to expose to end users; see
2493    /// [enum`FeatureStatus`] for more details.
2494    ///
2495    /// # Returns
2496    ///
2497    /// List of experimental features.
2498    #[cfg(feature = "v2_42")]
2499    #[cfg_attr(docsrs, doc(cfg(feature = "v2_42")))]
2500    #[doc(alias = "webkit_settings_get_experimental_features")]
2501    #[doc(alias = "get_experimental_features")]
2502    pub fn experimental_features() -> Option<FeatureList> {
2503        assert_initialized_main_thread!();
2504        unsafe { from_glib_full(ffi::webkit_settings_get_experimental_features()) }
2505    }
2506
2507    #[doc(alias = "allow-file-access-from-file-urls")]
2508    pub fn connect_allow_file_access_from_file_urls_notify<F: Fn(&Self) + 'static>(
2509        &self,
2510        f: F,
2511    ) -> SignalHandlerId {
2512        unsafe extern "C" fn notify_allow_file_access_from_file_urls_trampoline<
2513            F: Fn(&Settings) + 'static,
2514        >(
2515            this: *mut ffi::WebKitSettings,
2516            _param_spec: glib::ffi::gpointer,
2517            f: glib::ffi::gpointer,
2518        ) {
2519            unsafe {
2520                let f: &F = &*(f as *const F);
2521                f(&from_glib_borrow(this))
2522            }
2523        }
2524        unsafe {
2525            let f: Box_<F> = Box_::new(f);
2526            connect_raw(
2527                self.as_ptr() as *mut _,
2528                c"notify::allow-file-access-from-file-urls".as_ptr(),
2529                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2530                    notify_allow_file_access_from_file_urls_trampoline::<F> as *const (),
2531                )),
2532                Box_::into_raw(f),
2533            )
2534        }
2535    }
2536
2537    #[doc(alias = "allow-modal-dialogs")]
2538    pub fn connect_allow_modal_dialogs_notify<F: Fn(&Self) + 'static>(
2539        &self,
2540        f: F,
2541    ) -> SignalHandlerId {
2542        unsafe extern "C" fn notify_allow_modal_dialogs_trampoline<F: Fn(&Settings) + 'static>(
2543            this: *mut ffi::WebKitSettings,
2544            _param_spec: glib::ffi::gpointer,
2545            f: glib::ffi::gpointer,
2546        ) {
2547            unsafe {
2548                let f: &F = &*(f as *const F);
2549                f(&from_glib_borrow(this))
2550            }
2551        }
2552        unsafe {
2553            let f: Box_<F> = Box_::new(f);
2554            connect_raw(
2555                self.as_ptr() as *mut _,
2556                c"notify::allow-modal-dialogs".as_ptr(),
2557                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2558                    notify_allow_modal_dialogs_trampoline::<F> as *const (),
2559                )),
2560                Box_::into_raw(f),
2561            )
2562        }
2563    }
2564
2565    #[doc(alias = "allow-top-navigation-to-data-urls")]
2566    pub fn connect_allow_top_navigation_to_data_urls_notify<F: Fn(&Self) + 'static>(
2567        &self,
2568        f: F,
2569    ) -> SignalHandlerId {
2570        unsafe extern "C" fn notify_allow_top_navigation_to_data_urls_trampoline<
2571            F: Fn(&Settings) + 'static,
2572        >(
2573            this: *mut ffi::WebKitSettings,
2574            _param_spec: glib::ffi::gpointer,
2575            f: glib::ffi::gpointer,
2576        ) {
2577            unsafe {
2578                let f: &F = &*(f as *const F);
2579                f(&from_glib_borrow(this))
2580            }
2581        }
2582        unsafe {
2583            let f: Box_<F> = Box_::new(f);
2584            connect_raw(
2585                self.as_ptr() as *mut _,
2586                c"notify::allow-top-navigation-to-data-urls".as_ptr(),
2587                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2588                    notify_allow_top_navigation_to_data_urls_trampoline::<F> as *const (),
2589                )),
2590                Box_::into_raw(f),
2591            )
2592        }
2593    }
2594
2595    #[doc(alias = "allow-universal-access-from-file-urls")]
2596    pub fn connect_allow_universal_access_from_file_urls_notify<F: Fn(&Self) + 'static>(
2597        &self,
2598        f: F,
2599    ) -> SignalHandlerId {
2600        unsafe extern "C" fn notify_allow_universal_access_from_file_urls_trampoline<
2601            F: Fn(&Settings) + 'static,
2602        >(
2603            this: *mut ffi::WebKitSettings,
2604            _param_spec: glib::ffi::gpointer,
2605            f: glib::ffi::gpointer,
2606        ) {
2607            unsafe {
2608                let f: &F = &*(f as *const F);
2609                f(&from_glib_borrow(this))
2610            }
2611        }
2612        unsafe {
2613            let f: Box_<F> = Box_::new(f);
2614            connect_raw(
2615                self.as_ptr() as *mut _,
2616                c"notify::allow-universal-access-from-file-urls".as_ptr(),
2617                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2618                    notify_allow_universal_access_from_file_urls_trampoline::<F> as *const (),
2619                )),
2620                Box_::into_raw(f),
2621            )
2622        }
2623    }
2624
2625    #[doc(alias = "auto-load-images")]
2626    pub fn connect_auto_load_images_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2627        unsafe extern "C" fn notify_auto_load_images_trampoline<F: Fn(&Settings) + 'static>(
2628            this: *mut ffi::WebKitSettings,
2629            _param_spec: glib::ffi::gpointer,
2630            f: glib::ffi::gpointer,
2631        ) {
2632            unsafe {
2633                let f: &F = &*(f as *const F);
2634                f(&from_glib_borrow(this))
2635            }
2636        }
2637        unsafe {
2638            let f: Box_<F> = Box_::new(f);
2639            connect_raw(
2640                self.as_ptr() as *mut _,
2641                c"notify::auto-load-images".as_ptr(),
2642                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2643                    notify_auto_load_images_trampoline::<F> as *const (),
2644                )),
2645                Box_::into_raw(f),
2646            )
2647        }
2648    }
2649
2650    #[doc(alias = "cursive-font-family")]
2651    pub fn connect_cursive_font_family_notify<F: Fn(&Self) + 'static>(
2652        &self,
2653        f: F,
2654    ) -> SignalHandlerId {
2655        unsafe extern "C" fn notify_cursive_font_family_trampoline<F: Fn(&Settings) + 'static>(
2656            this: *mut ffi::WebKitSettings,
2657            _param_spec: glib::ffi::gpointer,
2658            f: glib::ffi::gpointer,
2659        ) {
2660            unsafe {
2661                let f: &F = &*(f as *const F);
2662                f(&from_glib_borrow(this))
2663            }
2664        }
2665        unsafe {
2666            let f: Box_<F> = Box_::new(f);
2667            connect_raw(
2668                self.as_ptr() as *mut _,
2669                c"notify::cursive-font-family".as_ptr(),
2670                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2671                    notify_cursive_font_family_trampoline::<F> as *const (),
2672                )),
2673                Box_::into_raw(f),
2674            )
2675        }
2676    }
2677
2678    #[doc(alias = "default-charset")]
2679    pub fn connect_default_charset_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2680        unsafe extern "C" fn notify_default_charset_trampoline<F: Fn(&Settings) + 'static>(
2681            this: *mut ffi::WebKitSettings,
2682            _param_spec: glib::ffi::gpointer,
2683            f: glib::ffi::gpointer,
2684        ) {
2685            unsafe {
2686                let f: &F = &*(f as *const F);
2687                f(&from_glib_borrow(this))
2688            }
2689        }
2690        unsafe {
2691            let f: Box_<F> = Box_::new(f);
2692            connect_raw(
2693                self.as_ptr() as *mut _,
2694                c"notify::default-charset".as_ptr(),
2695                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2696                    notify_default_charset_trampoline::<F> as *const (),
2697                )),
2698                Box_::into_raw(f),
2699            )
2700        }
2701    }
2702
2703    #[doc(alias = "default-font-family")]
2704    pub fn connect_default_font_family_notify<F: Fn(&Self) + 'static>(
2705        &self,
2706        f: F,
2707    ) -> SignalHandlerId {
2708        unsafe extern "C" fn notify_default_font_family_trampoline<F: Fn(&Settings) + 'static>(
2709            this: *mut ffi::WebKitSettings,
2710            _param_spec: glib::ffi::gpointer,
2711            f: glib::ffi::gpointer,
2712        ) {
2713            unsafe {
2714                let f: &F = &*(f as *const F);
2715                f(&from_glib_borrow(this))
2716            }
2717        }
2718        unsafe {
2719            let f: Box_<F> = Box_::new(f);
2720            connect_raw(
2721                self.as_ptr() as *mut _,
2722                c"notify::default-font-family".as_ptr(),
2723                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2724                    notify_default_font_family_trampoline::<F> as *const (),
2725                )),
2726                Box_::into_raw(f),
2727            )
2728        }
2729    }
2730
2731    #[doc(alias = "default-font-size")]
2732    pub fn connect_default_font_size_notify<F: Fn(&Self) + 'static>(
2733        &self,
2734        f: F,
2735    ) -> SignalHandlerId {
2736        unsafe extern "C" fn notify_default_font_size_trampoline<F: Fn(&Settings) + 'static>(
2737            this: *mut ffi::WebKitSettings,
2738            _param_spec: glib::ffi::gpointer,
2739            f: glib::ffi::gpointer,
2740        ) {
2741            unsafe {
2742                let f: &F = &*(f as *const F);
2743                f(&from_glib_borrow(this))
2744            }
2745        }
2746        unsafe {
2747            let f: Box_<F> = Box_::new(f);
2748            connect_raw(
2749                self.as_ptr() as *mut _,
2750                c"notify::default-font-size".as_ptr(),
2751                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2752                    notify_default_font_size_trampoline::<F> as *const (),
2753                )),
2754                Box_::into_raw(f),
2755            )
2756        }
2757    }
2758
2759    #[doc(alias = "default-monospace-font-size")]
2760    pub fn connect_default_monospace_font_size_notify<F: Fn(&Self) + 'static>(
2761        &self,
2762        f: F,
2763    ) -> SignalHandlerId {
2764        unsafe extern "C" fn notify_default_monospace_font_size_trampoline<
2765            F: Fn(&Settings) + 'static,
2766        >(
2767            this: *mut ffi::WebKitSettings,
2768            _param_spec: glib::ffi::gpointer,
2769            f: glib::ffi::gpointer,
2770        ) {
2771            unsafe {
2772                let f: &F = &*(f as *const F);
2773                f(&from_glib_borrow(this))
2774            }
2775        }
2776        unsafe {
2777            let f: Box_<F> = Box_::new(f);
2778            connect_raw(
2779                self.as_ptr() as *mut _,
2780                c"notify::default-monospace-font-size".as_ptr(),
2781                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2782                    notify_default_monospace_font_size_trampoline::<F> as *const (),
2783                )),
2784                Box_::into_raw(f),
2785            )
2786        }
2787    }
2788
2789    #[doc(alias = "disable-web-security")]
2790    pub fn connect_disable_web_security_notify<F: Fn(&Self) + 'static>(
2791        &self,
2792        f: F,
2793    ) -> SignalHandlerId {
2794        unsafe extern "C" fn notify_disable_web_security_trampoline<F: Fn(&Settings) + 'static>(
2795            this: *mut ffi::WebKitSettings,
2796            _param_spec: glib::ffi::gpointer,
2797            f: glib::ffi::gpointer,
2798        ) {
2799            unsafe {
2800                let f: &F = &*(f as *const F);
2801                f(&from_glib_borrow(this))
2802            }
2803        }
2804        unsafe {
2805            let f: Box_<F> = Box_::new(f);
2806            connect_raw(
2807                self.as_ptr() as *mut _,
2808                c"notify::disable-web-security".as_ptr(),
2809                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2810                    notify_disable_web_security_trampoline::<F> as *const (),
2811                )),
2812                Box_::into_raw(f),
2813            )
2814        }
2815    }
2816
2817    #[doc(alias = "draw-compositing-indicators")]
2818    pub fn connect_draw_compositing_indicators_notify<F: Fn(&Self) + 'static>(
2819        &self,
2820        f: F,
2821    ) -> SignalHandlerId {
2822        unsafe extern "C" fn notify_draw_compositing_indicators_trampoline<
2823            F: Fn(&Settings) + 'static,
2824        >(
2825            this: *mut ffi::WebKitSettings,
2826            _param_spec: glib::ffi::gpointer,
2827            f: glib::ffi::gpointer,
2828        ) {
2829            unsafe {
2830                let f: &F = &*(f as *const F);
2831                f(&from_glib_borrow(this))
2832            }
2833        }
2834        unsafe {
2835            let f: Box_<F> = Box_::new(f);
2836            connect_raw(
2837                self.as_ptr() as *mut _,
2838                c"notify::draw-compositing-indicators".as_ptr(),
2839                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2840                    notify_draw_compositing_indicators_trampoline::<F> as *const (),
2841                )),
2842                Box_::into_raw(f),
2843            )
2844        }
2845    }
2846
2847    #[cfg(feature = "v2_46")]
2848    #[cfg_attr(docsrs, doc(cfg(feature = "v2_46")))]
2849    #[doc(alias = "enable-2d-canvas-acceleration")]
2850    pub fn connect_enable_2d_canvas_acceleration_notify<F: Fn(&Self) + 'static>(
2851        &self,
2852        f: F,
2853    ) -> SignalHandlerId {
2854        unsafe extern "C" fn notify_enable_2d_canvas_acceleration_trampoline<
2855            F: Fn(&Settings) + 'static,
2856        >(
2857            this: *mut ffi::WebKitSettings,
2858            _param_spec: glib::ffi::gpointer,
2859            f: glib::ffi::gpointer,
2860        ) {
2861            unsafe {
2862                let f: &F = &*(f as *const F);
2863                f(&from_glib_borrow(this))
2864            }
2865        }
2866        unsafe {
2867            let f: Box_<F> = Box_::new(f);
2868            connect_raw(
2869                self.as_ptr() as *mut _,
2870                c"notify::enable-2d-canvas-acceleration".as_ptr(),
2871                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2872                    notify_enable_2d_canvas_acceleration_trampoline::<F> as *const (),
2873                )),
2874                Box_::into_raw(f),
2875            )
2876        }
2877    }
2878
2879    #[doc(alias = "enable-back-forward-navigation-gestures")]
2880    pub fn connect_enable_back_forward_navigation_gestures_notify<F: Fn(&Self) + 'static>(
2881        &self,
2882        f: F,
2883    ) -> SignalHandlerId {
2884        unsafe extern "C" fn notify_enable_back_forward_navigation_gestures_trampoline<
2885            F: Fn(&Settings) + 'static,
2886        >(
2887            this: *mut ffi::WebKitSettings,
2888            _param_spec: glib::ffi::gpointer,
2889            f: glib::ffi::gpointer,
2890        ) {
2891            unsafe {
2892                let f: &F = &*(f as *const F);
2893                f(&from_glib_borrow(this))
2894            }
2895        }
2896        unsafe {
2897            let f: Box_<F> = Box_::new(f);
2898            connect_raw(
2899                self.as_ptr() as *mut _,
2900                c"notify::enable-back-forward-navigation-gestures".as_ptr(),
2901                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2902                    notify_enable_back_forward_navigation_gestures_trampoline::<F> as *const (),
2903                )),
2904                Box_::into_raw(f),
2905            )
2906        }
2907    }
2908
2909    #[doc(alias = "enable-caret-browsing")]
2910    pub fn connect_enable_caret_browsing_notify<F: Fn(&Self) + 'static>(
2911        &self,
2912        f: F,
2913    ) -> SignalHandlerId {
2914        unsafe extern "C" fn notify_enable_caret_browsing_trampoline<F: Fn(&Settings) + 'static>(
2915            this: *mut ffi::WebKitSettings,
2916            _param_spec: glib::ffi::gpointer,
2917            f: glib::ffi::gpointer,
2918        ) {
2919            unsafe {
2920                let f: &F = &*(f as *const F);
2921                f(&from_glib_borrow(this))
2922            }
2923        }
2924        unsafe {
2925            let f: Box_<F> = Box_::new(f);
2926            connect_raw(
2927                self.as_ptr() as *mut _,
2928                c"notify::enable-caret-browsing".as_ptr(),
2929                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2930                    notify_enable_caret_browsing_trampoline::<F> as *const (),
2931                )),
2932                Box_::into_raw(f),
2933            )
2934        }
2935    }
2936
2937    #[doc(alias = "enable-developer-extras")]
2938    pub fn connect_enable_developer_extras_notify<F: Fn(&Self) + 'static>(
2939        &self,
2940        f: F,
2941    ) -> SignalHandlerId {
2942        unsafe extern "C" fn notify_enable_developer_extras_trampoline<
2943            F: Fn(&Settings) + 'static,
2944        >(
2945            this: *mut ffi::WebKitSettings,
2946            _param_spec: glib::ffi::gpointer,
2947            f: glib::ffi::gpointer,
2948        ) {
2949            unsafe {
2950                let f: &F = &*(f as *const F);
2951                f(&from_glib_borrow(this))
2952            }
2953        }
2954        unsafe {
2955            let f: Box_<F> = Box_::new(f);
2956            connect_raw(
2957                self.as_ptr() as *mut _,
2958                c"notify::enable-developer-extras".as_ptr(),
2959                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2960                    notify_enable_developer_extras_trampoline::<F> as *const (),
2961                )),
2962                Box_::into_raw(f),
2963            )
2964        }
2965    }
2966
2967    #[cfg_attr(feature = "v2_48", deprecated = "Since 2.48")]
2968    #[doc(alias = "enable-dns-prefetching")]
2969    pub fn connect_enable_dns_prefetching_notify<F: Fn(&Self) + 'static>(
2970        &self,
2971        f: F,
2972    ) -> SignalHandlerId {
2973        unsafe extern "C" fn notify_enable_dns_prefetching_trampoline<
2974            F: Fn(&Settings) + 'static,
2975        >(
2976            this: *mut ffi::WebKitSettings,
2977            _param_spec: glib::ffi::gpointer,
2978            f: glib::ffi::gpointer,
2979        ) {
2980            unsafe {
2981                let f: &F = &*(f as *const F);
2982                f(&from_glib_borrow(this))
2983            }
2984        }
2985        unsafe {
2986            let f: Box_<F> = Box_::new(f);
2987            connect_raw(
2988                self.as_ptr() as *mut _,
2989                c"notify::enable-dns-prefetching".as_ptr(),
2990                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2991                    notify_enable_dns_prefetching_trampoline::<F> as *const (),
2992                )),
2993                Box_::into_raw(f),
2994            )
2995        }
2996    }
2997
2998    #[doc(alias = "enable-encrypted-media")]
2999    pub fn connect_enable_encrypted_media_notify<F: Fn(&Self) + 'static>(
3000        &self,
3001        f: F,
3002    ) -> SignalHandlerId {
3003        unsafe extern "C" fn notify_enable_encrypted_media_trampoline<
3004            F: Fn(&Settings) + 'static,
3005        >(
3006            this: *mut ffi::WebKitSettings,
3007            _param_spec: glib::ffi::gpointer,
3008            f: glib::ffi::gpointer,
3009        ) {
3010            unsafe {
3011                let f: &F = &*(f as *const F);
3012                f(&from_glib_borrow(this))
3013            }
3014        }
3015        unsafe {
3016            let f: Box_<F> = Box_::new(f);
3017            connect_raw(
3018                self.as_ptr() as *mut _,
3019                c"notify::enable-encrypted-media".as_ptr(),
3020                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3021                    notify_enable_encrypted_media_trampoline::<F> as *const (),
3022                )),
3023                Box_::into_raw(f),
3024            )
3025        }
3026    }
3027
3028    #[doc(alias = "enable-fullscreen")]
3029    pub fn connect_enable_fullscreen_notify<F: Fn(&Self) + 'static>(
3030        &self,
3031        f: F,
3032    ) -> SignalHandlerId {
3033        unsafe extern "C" fn notify_enable_fullscreen_trampoline<F: Fn(&Settings) + 'static>(
3034            this: *mut ffi::WebKitSettings,
3035            _param_spec: glib::ffi::gpointer,
3036            f: glib::ffi::gpointer,
3037        ) {
3038            unsafe {
3039                let f: &F = &*(f as *const F);
3040                f(&from_glib_borrow(this))
3041            }
3042        }
3043        unsafe {
3044            let f: Box_<F> = Box_::new(f);
3045            connect_raw(
3046                self.as_ptr() as *mut _,
3047                c"notify::enable-fullscreen".as_ptr(),
3048                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3049                    notify_enable_fullscreen_trampoline::<F> as *const (),
3050                )),
3051                Box_::into_raw(f),
3052            )
3053        }
3054    }
3055
3056    #[doc(alias = "enable-html5-database")]
3057    pub fn connect_enable_html5_database_notify<F: Fn(&Self) + 'static>(
3058        &self,
3059        f: F,
3060    ) -> SignalHandlerId {
3061        unsafe extern "C" fn notify_enable_html5_database_trampoline<F: Fn(&Settings) + 'static>(
3062            this: *mut ffi::WebKitSettings,
3063            _param_spec: glib::ffi::gpointer,
3064            f: glib::ffi::gpointer,
3065        ) {
3066            unsafe {
3067                let f: &F = &*(f as *const F);
3068                f(&from_glib_borrow(this))
3069            }
3070        }
3071        unsafe {
3072            let f: Box_<F> = Box_::new(f);
3073            connect_raw(
3074                self.as_ptr() as *mut _,
3075                c"notify::enable-html5-database".as_ptr(),
3076                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3077                    notify_enable_html5_database_trampoline::<F> as *const (),
3078                )),
3079                Box_::into_raw(f),
3080            )
3081        }
3082    }
3083
3084    #[doc(alias = "enable-html5-local-storage")]
3085    pub fn connect_enable_html5_local_storage_notify<F: Fn(&Self) + 'static>(
3086        &self,
3087        f: F,
3088    ) -> SignalHandlerId {
3089        unsafe extern "C" fn notify_enable_html5_local_storage_trampoline<
3090            F: Fn(&Settings) + 'static,
3091        >(
3092            this: *mut ffi::WebKitSettings,
3093            _param_spec: glib::ffi::gpointer,
3094            f: glib::ffi::gpointer,
3095        ) {
3096            unsafe {
3097                let f: &F = &*(f as *const F);
3098                f(&from_glib_borrow(this))
3099            }
3100        }
3101        unsafe {
3102            let f: Box_<F> = Box_::new(f);
3103            connect_raw(
3104                self.as_ptr() as *mut _,
3105                c"notify::enable-html5-local-storage".as_ptr(),
3106                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3107                    notify_enable_html5_local_storage_trampoline::<F> as *const (),
3108                )),
3109                Box_::into_raw(f),
3110            )
3111        }
3112    }
3113
3114    #[cfg_attr(feature = "v2_50", deprecated = "Since 2.50")]
3115    #[doc(alias = "enable-hyperlink-auditing")]
3116    pub fn connect_enable_hyperlink_auditing_notify<F: Fn(&Self) + 'static>(
3117        &self,
3118        f: F,
3119    ) -> SignalHandlerId {
3120        unsafe extern "C" fn notify_enable_hyperlink_auditing_trampoline<
3121            F: Fn(&Settings) + 'static,
3122        >(
3123            this: *mut ffi::WebKitSettings,
3124            _param_spec: glib::ffi::gpointer,
3125            f: glib::ffi::gpointer,
3126        ) {
3127            unsafe {
3128                let f: &F = &*(f as *const F);
3129                f(&from_glib_borrow(this))
3130            }
3131        }
3132        unsafe {
3133            let f: Box_<F> = Box_::new(f);
3134            connect_raw(
3135                self.as_ptr() as *mut _,
3136                c"notify::enable-hyperlink-auditing".as_ptr(),
3137                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3138                    notify_enable_hyperlink_auditing_trampoline::<F> as *const (),
3139                )),
3140                Box_::into_raw(f),
3141            )
3142        }
3143    }
3144
3145    #[doc(alias = "enable-javascript")]
3146    pub fn connect_enable_javascript_notify<F: Fn(&Self) + 'static>(
3147        &self,
3148        f: F,
3149    ) -> SignalHandlerId {
3150        unsafe extern "C" fn notify_enable_javascript_trampoline<F: Fn(&Settings) + 'static>(
3151            this: *mut ffi::WebKitSettings,
3152            _param_spec: glib::ffi::gpointer,
3153            f: glib::ffi::gpointer,
3154        ) {
3155            unsafe {
3156                let f: &F = &*(f as *const F);
3157                f(&from_glib_borrow(this))
3158            }
3159        }
3160        unsafe {
3161            let f: Box_<F> = Box_::new(f);
3162            connect_raw(
3163                self.as_ptr() as *mut _,
3164                c"notify::enable-javascript".as_ptr(),
3165                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3166                    notify_enable_javascript_trampoline::<F> as *const (),
3167                )),
3168                Box_::into_raw(f),
3169            )
3170        }
3171    }
3172
3173    #[doc(alias = "enable-javascript-markup")]
3174    pub fn connect_enable_javascript_markup_notify<F: Fn(&Self) + 'static>(
3175        &self,
3176        f: F,
3177    ) -> SignalHandlerId {
3178        unsafe extern "C" fn notify_enable_javascript_markup_trampoline<
3179            F: Fn(&Settings) + 'static,
3180        >(
3181            this: *mut ffi::WebKitSettings,
3182            _param_spec: glib::ffi::gpointer,
3183            f: glib::ffi::gpointer,
3184        ) {
3185            unsafe {
3186                let f: &F = &*(f as *const F);
3187                f(&from_glib_borrow(this))
3188            }
3189        }
3190        unsafe {
3191            let f: Box_<F> = Box_::new(f);
3192            connect_raw(
3193                self.as_ptr() as *mut _,
3194                c"notify::enable-javascript-markup".as_ptr(),
3195                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3196                    notify_enable_javascript_markup_trampoline::<F> as *const (),
3197                )),
3198                Box_::into_raw(f),
3199            )
3200        }
3201    }
3202
3203    #[doc(alias = "enable-media")]
3204    pub fn connect_enable_media_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3205        unsafe extern "C" fn notify_enable_media_trampoline<F: Fn(&Settings) + 'static>(
3206            this: *mut ffi::WebKitSettings,
3207            _param_spec: glib::ffi::gpointer,
3208            f: glib::ffi::gpointer,
3209        ) {
3210            unsafe {
3211                let f: &F = &*(f as *const F);
3212                f(&from_glib_borrow(this))
3213            }
3214        }
3215        unsafe {
3216            let f: Box_<F> = Box_::new(f);
3217            connect_raw(
3218                self.as_ptr() as *mut _,
3219                c"notify::enable-media".as_ptr(),
3220                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3221                    notify_enable_media_trampoline::<F> as *const (),
3222                )),
3223                Box_::into_raw(f),
3224            )
3225        }
3226    }
3227
3228    #[doc(alias = "enable-media-capabilities")]
3229    pub fn connect_enable_media_capabilities_notify<F: Fn(&Self) + 'static>(
3230        &self,
3231        f: F,
3232    ) -> SignalHandlerId {
3233        unsafe extern "C" fn notify_enable_media_capabilities_trampoline<
3234            F: Fn(&Settings) + 'static,
3235        >(
3236            this: *mut ffi::WebKitSettings,
3237            _param_spec: glib::ffi::gpointer,
3238            f: glib::ffi::gpointer,
3239        ) {
3240            unsafe {
3241                let f: &F = &*(f as *const F);
3242                f(&from_glib_borrow(this))
3243            }
3244        }
3245        unsafe {
3246            let f: Box_<F> = Box_::new(f);
3247            connect_raw(
3248                self.as_ptr() as *mut _,
3249                c"notify::enable-media-capabilities".as_ptr(),
3250                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3251                    notify_enable_media_capabilities_trampoline::<F> as *const (),
3252                )),
3253                Box_::into_raw(f),
3254            )
3255        }
3256    }
3257
3258    #[doc(alias = "enable-media-stream")]
3259    pub fn connect_enable_media_stream_notify<F: Fn(&Self) + 'static>(
3260        &self,
3261        f: F,
3262    ) -> SignalHandlerId {
3263        unsafe extern "C" fn notify_enable_media_stream_trampoline<F: Fn(&Settings) + 'static>(
3264            this: *mut ffi::WebKitSettings,
3265            _param_spec: glib::ffi::gpointer,
3266            f: glib::ffi::gpointer,
3267        ) {
3268            unsafe {
3269                let f: &F = &*(f as *const F);
3270                f(&from_glib_borrow(this))
3271            }
3272        }
3273        unsafe {
3274            let f: Box_<F> = Box_::new(f);
3275            connect_raw(
3276                self.as_ptr() as *mut _,
3277                c"notify::enable-media-stream".as_ptr(),
3278                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3279                    notify_enable_media_stream_trampoline::<F> as *const (),
3280                )),
3281                Box_::into_raw(f),
3282            )
3283        }
3284    }
3285
3286    #[doc(alias = "enable-mediasource")]
3287    pub fn connect_enable_mediasource_notify<F: Fn(&Self) + 'static>(
3288        &self,
3289        f: F,
3290    ) -> SignalHandlerId {
3291        unsafe extern "C" fn notify_enable_mediasource_trampoline<F: Fn(&Settings) + 'static>(
3292            this: *mut ffi::WebKitSettings,
3293            _param_spec: glib::ffi::gpointer,
3294            f: glib::ffi::gpointer,
3295        ) {
3296            unsafe {
3297                let f: &F = &*(f as *const F);
3298                f(&from_glib_borrow(this))
3299            }
3300        }
3301        unsafe {
3302            let f: Box_<F> = Box_::new(f);
3303            connect_raw(
3304                self.as_ptr() as *mut _,
3305                c"notify::enable-mediasource".as_ptr(),
3306                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3307                    notify_enable_mediasource_trampoline::<F> as *const (),
3308                )),
3309                Box_::into_raw(f),
3310            )
3311        }
3312    }
3313
3314    #[doc(alias = "enable-mock-capture-devices")]
3315    pub fn connect_enable_mock_capture_devices_notify<F: Fn(&Self) + 'static>(
3316        &self,
3317        f: F,
3318    ) -> SignalHandlerId {
3319        unsafe extern "C" fn notify_enable_mock_capture_devices_trampoline<
3320            F: Fn(&Settings) + 'static,
3321        >(
3322            this: *mut ffi::WebKitSettings,
3323            _param_spec: glib::ffi::gpointer,
3324            f: glib::ffi::gpointer,
3325        ) {
3326            unsafe {
3327                let f: &F = &*(f as *const F);
3328                f(&from_glib_borrow(this))
3329            }
3330        }
3331        unsafe {
3332            let f: Box_<F> = Box_::new(f);
3333            connect_raw(
3334                self.as_ptr() as *mut _,
3335                c"notify::enable-mock-capture-devices".as_ptr(),
3336                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3337                    notify_enable_mock_capture_devices_trampoline::<F> as *const (),
3338                )),
3339                Box_::into_raw(f),
3340            )
3341        }
3342    }
3343
3344    #[cfg_attr(feature = "v2_44", deprecated = "Since 2.44")]
3345    #[doc(alias = "enable-offline-web-application-cache")]
3346    pub fn connect_enable_offline_web_application_cache_notify<F: Fn(&Self) + 'static>(
3347        &self,
3348        f: F,
3349    ) -> SignalHandlerId {
3350        unsafe extern "C" fn notify_enable_offline_web_application_cache_trampoline<
3351            F: Fn(&Settings) + 'static,
3352        >(
3353            this: *mut ffi::WebKitSettings,
3354            _param_spec: glib::ffi::gpointer,
3355            f: glib::ffi::gpointer,
3356        ) {
3357            unsafe {
3358                let f: &F = &*(f as *const F);
3359                f(&from_glib_borrow(this))
3360            }
3361        }
3362        unsafe {
3363            let f: Box_<F> = Box_::new(f);
3364            connect_raw(
3365                self.as_ptr() as *mut _,
3366                c"notify::enable-offline-web-application-cache".as_ptr(),
3367                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3368                    notify_enable_offline_web_application_cache_trampoline::<F> as *const (),
3369                )),
3370                Box_::into_raw(f),
3371            )
3372        }
3373    }
3374
3375    #[doc(alias = "enable-page-cache")]
3376    pub fn connect_enable_page_cache_notify<F: Fn(&Self) + 'static>(
3377        &self,
3378        f: F,
3379    ) -> SignalHandlerId {
3380        unsafe extern "C" fn notify_enable_page_cache_trampoline<F: Fn(&Settings) + 'static>(
3381            this: *mut ffi::WebKitSettings,
3382            _param_spec: glib::ffi::gpointer,
3383            f: glib::ffi::gpointer,
3384        ) {
3385            unsafe {
3386                let f: &F = &*(f as *const F);
3387                f(&from_glib_borrow(this))
3388            }
3389        }
3390        unsafe {
3391            let f: Box_<F> = Box_::new(f);
3392            connect_raw(
3393                self.as_ptr() as *mut _,
3394                c"notify::enable-page-cache".as_ptr(),
3395                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3396                    notify_enable_page_cache_trampoline::<F> as *const (),
3397                )),
3398                Box_::into_raw(f),
3399            )
3400        }
3401    }
3402
3403    #[doc(alias = "enable-resizable-text-areas")]
3404    pub fn connect_enable_resizable_text_areas_notify<F: Fn(&Self) + 'static>(
3405        &self,
3406        f: F,
3407    ) -> SignalHandlerId {
3408        unsafe extern "C" fn notify_enable_resizable_text_areas_trampoline<
3409            F: Fn(&Settings) + 'static,
3410        >(
3411            this: *mut ffi::WebKitSettings,
3412            _param_spec: glib::ffi::gpointer,
3413            f: glib::ffi::gpointer,
3414        ) {
3415            unsafe {
3416                let f: &F = &*(f as *const F);
3417                f(&from_glib_borrow(this))
3418            }
3419        }
3420        unsafe {
3421            let f: Box_<F> = Box_::new(f);
3422            connect_raw(
3423                self.as_ptr() as *mut _,
3424                c"notify::enable-resizable-text-areas".as_ptr(),
3425                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3426                    notify_enable_resizable_text_areas_trampoline::<F> as *const (),
3427                )),
3428                Box_::into_raw(f),
3429            )
3430        }
3431    }
3432
3433    #[doc(alias = "enable-site-specific-quirks")]
3434    pub fn connect_enable_site_specific_quirks_notify<F: Fn(&Self) + 'static>(
3435        &self,
3436        f: F,
3437    ) -> SignalHandlerId {
3438        unsafe extern "C" fn notify_enable_site_specific_quirks_trampoline<
3439            F: Fn(&Settings) + 'static,
3440        >(
3441            this: *mut ffi::WebKitSettings,
3442            _param_spec: glib::ffi::gpointer,
3443            f: glib::ffi::gpointer,
3444        ) {
3445            unsafe {
3446                let f: &F = &*(f as *const F);
3447                f(&from_glib_borrow(this))
3448            }
3449        }
3450        unsafe {
3451            let f: Box_<F> = Box_::new(f);
3452            connect_raw(
3453                self.as_ptr() as *mut _,
3454                c"notify::enable-site-specific-quirks".as_ptr(),
3455                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3456                    notify_enable_site_specific_quirks_trampoline::<F> as *const (),
3457                )),
3458                Box_::into_raw(f),
3459            )
3460        }
3461    }
3462
3463    #[doc(alias = "enable-smooth-scrolling")]
3464    pub fn connect_enable_smooth_scrolling_notify<F: Fn(&Self) + 'static>(
3465        &self,
3466        f: F,
3467    ) -> SignalHandlerId {
3468        unsafe extern "C" fn notify_enable_smooth_scrolling_trampoline<
3469            F: Fn(&Settings) + 'static,
3470        >(
3471            this: *mut ffi::WebKitSettings,
3472            _param_spec: glib::ffi::gpointer,
3473            f: glib::ffi::gpointer,
3474        ) {
3475            unsafe {
3476                let f: &F = &*(f as *const F);
3477                f(&from_glib_borrow(this))
3478            }
3479        }
3480        unsafe {
3481            let f: Box_<F> = Box_::new(f);
3482            connect_raw(
3483                self.as_ptr() as *mut _,
3484                c"notify::enable-smooth-scrolling".as_ptr(),
3485                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3486                    notify_enable_smooth_scrolling_trampoline::<F> as *const (),
3487                )),
3488                Box_::into_raw(f),
3489            )
3490        }
3491    }
3492
3493    #[doc(alias = "enable-spatial-navigation")]
3494    pub fn connect_enable_spatial_navigation_notify<F: Fn(&Self) + 'static>(
3495        &self,
3496        f: F,
3497    ) -> SignalHandlerId {
3498        unsafe extern "C" fn notify_enable_spatial_navigation_trampoline<
3499            F: Fn(&Settings) + 'static,
3500        >(
3501            this: *mut ffi::WebKitSettings,
3502            _param_spec: glib::ffi::gpointer,
3503            f: glib::ffi::gpointer,
3504        ) {
3505            unsafe {
3506                let f: &F = &*(f as *const F);
3507                f(&from_glib_borrow(this))
3508            }
3509        }
3510        unsafe {
3511            let f: Box_<F> = Box_::new(f);
3512            connect_raw(
3513                self.as_ptr() as *mut _,
3514                c"notify::enable-spatial-navigation".as_ptr(),
3515                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3516                    notify_enable_spatial_navigation_trampoline::<F> as *const (),
3517                )),
3518                Box_::into_raw(f),
3519            )
3520        }
3521    }
3522
3523    #[doc(alias = "enable-tabs-to-links")]
3524    pub fn connect_enable_tabs_to_links_notify<F: Fn(&Self) + 'static>(
3525        &self,
3526        f: F,
3527    ) -> SignalHandlerId {
3528        unsafe extern "C" fn notify_enable_tabs_to_links_trampoline<F: Fn(&Settings) + 'static>(
3529            this: *mut ffi::WebKitSettings,
3530            _param_spec: glib::ffi::gpointer,
3531            f: glib::ffi::gpointer,
3532        ) {
3533            unsafe {
3534                let f: &F = &*(f as *const F);
3535                f(&from_glib_borrow(this))
3536            }
3537        }
3538        unsafe {
3539            let f: Box_<F> = Box_::new(f);
3540            connect_raw(
3541                self.as_ptr() as *mut _,
3542                c"notify::enable-tabs-to-links".as_ptr(),
3543                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3544                    notify_enable_tabs_to_links_trampoline::<F> as *const (),
3545                )),
3546                Box_::into_raw(f),
3547            )
3548        }
3549    }
3550
3551    #[doc(alias = "enable-webaudio")]
3552    pub fn connect_enable_webaudio_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3553        unsafe extern "C" fn notify_enable_webaudio_trampoline<F: Fn(&Settings) + 'static>(
3554            this: *mut ffi::WebKitSettings,
3555            _param_spec: glib::ffi::gpointer,
3556            f: glib::ffi::gpointer,
3557        ) {
3558            unsafe {
3559                let f: &F = &*(f as *const F);
3560                f(&from_glib_borrow(this))
3561            }
3562        }
3563        unsafe {
3564            let f: Box_<F> = Box_::new(f);
3565            connect_raw(
3566                self.as_ptr() as *mut _,
3567                c"notify::enable-webaudio".as_ptr(),
3568                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3569                    notify_enable_webaudio_trampoline::<F> as *const (),
3570                )),
3571                Box_::into_raw(f),
3572            )
3573        }
3574    }
3575
3576    #[doc(alias = "enable-webgl")]
3577    pub fn connect_enable_webgl_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3578        unsafe extern "C" fn notify_enable_webgl_trampoline<F: Fn(&Settings) + 'static>(
3579            this: *mut ffi::WebKitSettings,
3580            _param_spec: glib::ffi::gpointer,
3581            f: glib::ffi::gpointer,
3582        ) {
3583            unsafe {
3584                let f: &F = &*(f as *const F);
3585                f(&from_glib_borrow(this))
3586            }
3587        }
3588        unsafe {
3589            let f: Box_<F> = Box_::new(f);
3590            connect_raw(
3591                self.as_ptr() as *mut _,
3592                c"notify::enable-webgl".as_ptr(),
3593                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3594                    notify_enable_webgl_trampoline::<F> as *const (),
3595                )),
3596                Box_::into_raw(f),
3597            )
3598        }
3599    }
3600
3601    #[doc(alias = "enable-webrtc")]
3602    pub fn connect_enable_webrtc_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3603        unsafe extern "C" fn notify_enable_webrtc_trampoline<F: Fn(&Settings) + 'static>(
3604            this: *mut ffi::WebKitSettings,
3605            _param_spec: glib::ffi::gpointer,
3606            f: glib::ffi::gpointer,
3607        ) {
3608            unsafe {
3609                let f: &F = &*(f as *const F);
3610                f(&from_glib_borrow(this))
3611            }
3612        }
3613        unsafe {
3614            let f: Box_<F> = Box_::new(f);
3615            connect_raw(
3616                self.as_ptr() as *mut _,
3617                c"notify::enable-webrtc".as_ptr(),
3618                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3619                    notify_enable_webrtc_trampoline::<F> as *const (),
3620                )),
3621                Box_::into_raw(f),
3622            )
3623        }
3624    }
3625
3626    #[doc(alias = "enable-write-console-messages-to-stdout")]
3627    pub fn connect_enable_write_console_messages_to_stdout_notify<F: Fn(&Self) + 'static>(
3628        &self,
3629        f: F,
3630    ) -> SignalHandlerId {
3631        unsafe extern "C" fn notify_enable_write_console_messages_to_stdout_trampoline<
3632            F: Fn(&Settings) + 'static,
3633        >(
3634            this: *mut ffi::WebKitSettings,
3635            _param_spec: glib::ffi::gpointer,
3636            f: glib::ffi::gpointer,
3637        ) {
3638            unsafe {
3639                let f: &F = &*(f as *const F);
3640                f(&from_glib_borrow(this))
3641            }
3642        }
3643        unsafe {
3644            let f: Box_<F> = Box_::new(f);
3645            connect_raw(
3646                self.as_ptr() as *mut _,
3647                c"notify::enable-write-console-messages-to-stdout".as_ptr(),
3648                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3649                    notify_enable_write_console_messages_to_stdout_trampoline::<F> as *const (),
3650                )),
3651                Box_::into_raw(f),
3652            )
3653        }
3654    }
3655
3656    #[doc(alias = "fantasy-font-family")]
3657    pub fn connect_fantasy_font_family_notify<F: Fn(&Self) + 'static>(
3658        &self,
3659        f: F,
3660    ) -> SignalHandlerId {
3661        unsafe extern "C" fn notify_fantasy_font_family_trampoline<F: Fn(&Settings) + 'static>(
3662            this: *mut ffi::WebKitSettings,
3663            _param_spec: glib::ffi::gpointer,
3664            f: glib::ffi::gpointer,
3665        ) {
3666            unsafe {
3667                let f: &F = &*(f as *const F);
3668                f(&from_glib_borrow(this))
3669            }
3670        }
3671        unsafe {
3672            let f: Box_<F> = Box_::new(f);
3673            connect_raw(
3674                self.as_ptr() as *mut _,
3675                c"notify::fantasy-font-family".as_ptr(),
3676                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3677                    notify_fantasy_font_family_trampoline::<F> as *const (),
3678                )),
3679                Box_::into_raw(f),
3680            )
3681        }
3682    }
3683
3684    #[doc(alias = "hardware-acceleration-policy")]
3685    pub fn connect_hardware_acceleration_policy_notify<F: Fn(&Self) + 'static>(
3686        &self,
3687        f: F,
3688    ) -> SignalHandlerId {
3689        unsafe extern "C" fn notify_hardware_acceleration_policy_trampoline<
3690            F: Fn(&Settings) + 'static,
3691        >(
3692            this: *mut ffi::WebKitSettings,
3693            _param_spec: glib::ffi::gpointer,
3694            f: glib::ffi::gpointer,
3695        ) {
3696            unsafe {
3697                let f: &F = &*(f as *const F);
3698                f(&from_glib_borrow(this))
3699            }
3700        }
3701        unsafe {
3702            let f: Box_<F> = Box_::new(f);
3703            connect_raw(
3704                self.as_ptr() as *mut _,
3705                c"notify::hardware-acceleration-policy".as_ptr(),
3706                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3707                    notify_hardware_acceleration_policy_trampoline::<F> as *const (),
3708                )),
3709                Box_::into_raw(f),
3710            )
3711        }
3712    }
3713
3714    #[doc(alias = "javascript-can-access-clipboard")]
3715    pub fn connect_javascript_can_access_clipboard_notify<F: Fn(&Self) + 'static>(
3716        &self,
3717        f: F,
3718    ) -> SignalHandlerId {
3719        unsafe extern "C" fn notify_javascript_can_access_clipboard_trampoline<
3720            F: Fn(&Settings) + 'static,
3721        >(
3722            this: *mut ffi::WebKitSettings,
3723            _param_spec: glib::ffi::gpointer,
3724            f: glib::ffi::gpointer,
3725        ) {
3726            unsafe {
3727                let f: &F = &*(f as *const F);
3728                f(&from_glib_borrow(this))
3729            }
3730        }
3731        unsafe {
3732            let f: Box_<F> = Box_::new(f);
3733            connect_raw(
3734                self.as_ptr() as *mut _,
3735                c"notify::javascript-can-access-clipboard".as_ptr(),
3736                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3737                    notify_javascript_can_access_clipboard_trampoline::<F> as *const (),
3738                )),
3739                Box_::into_raw(f),
3740            )
3741        }
3742    }
3743
3744    #[doc(alias = "javascript-can-open-windows-automatically")]
3745    pub fn connect_javascript_can_open_windows_automatically_notify<F: Fn(&Self) + 'static>(
3746        &self,
3747        f: F,
3748    ) -> SignalHandlerId {
3749        unsafe extern "C" fn notify_javascript_can_open_windows_automatically_trampoline<
3750            F: Fn(&Settings) + 'static,
3751        >(
3752            this: *mut ffi::WebKitSettings,
3753            _param_spec: glib::ffi::gpointer,
3754            f: glib::ffi::gpointer,
3755        ) {
3756            unsafe {
3757                let f: &F = &*(f as *const F);
3758                f(&from_glib_borrow(this))
3759            }
3760        }
3761        unsafe {
3762            let f: Box_<F> = Box_::new(f);
3763            connect_raw(
3764                self.as_ptr() as *mut _,
3765                c"notify::javascript-can-open-windows-automatically".as_ptr(),
3766                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3767                    notify_javascript_can_open_windows_automatically_trampoline::<F> as *const (),
3768                )),
3769                Box_::into_raw(f),
3770            )
3771        }
3772    }
3773
3774    #[cfg_attr(feature = "v2_42", deprecated = "Since 2.42")]
3775    #[doc(alias = "load-icons-ignoring-image-load-setting")]
3776    pub fn connect_load_icons_ignoring_image_load_setting_notify<F: Fn(&Self) + 'static>(
3777        &self,
3778        f: F,
3779    ) -> SignalHandlerId {
3780        unsafe extern "C" fn notify_load_icons_ignoring_image_load_setting_trampoline<
3781            F: Fn(&Settings) + 'static,
3782        >(
3783            this: *mut ffi::WebKitSettings,
3784            _param_spec: glib::ffi::gpointer,
3785            f: glib::ffi::gpointer,
3786        ) {
3787            unsafe {
3788                let f: &F = &*(f as *const F);
3789                f(&from_glib_borrow(this))
3790            }
3791        }
3792        unsafe {
3793            let f: Box_<F> = Box_::new(f);
3794            connect_raw(
3795                self.as_ptr() as *mut _,
3796                c"notify::load-icons-ignoring-image-load-setting".as_ptr(),
3797                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3798                    notify_load_icons_ignoring_image_load_setting_trampoline::<F> as *const (),
3799                )),
3800                Box_::into_raw(f),
3801            )
3802        }
3803    }
3804
3805    #[cfg(feature = "v2_52")]
3806    #[cfg_attr(docsrs, doc(cfg(feature = "v2_52")))]
3807    #[doc(alias = "math-font-family")]
3808    pub fn connect_math_font_family_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3809        unsafe extern "C" fn notify_math_font_family_trampoline<F: Fn(&Settings) + 'static>(
3810            this: *mut ffi::WebKitSettings,
3811            _param_spec: glib::ffi::gpointer,
3812            f: glib::ffi::gpointer,
3813        ) {
3814            unsafe {
3815                let f: &F = &*(f as *const F);
3816                f(&from_glib_borrow(this))
3817            }
3818        }
3819        unsafe {
3820            let f: Box_<F> = Box_::new(f);
3821            connect_raw(
3822                self.as_ptr() as *mut _,
3823                c"notify::math-font-family".as_ptr(),
3824                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3825                    notify_math_font_family_trampoline::<F> as *const (),
3826                )),
3827                Box_::into_raw(f),
3828            )
3829        }
3830    }
3831
3832    #[doc(alias = "media-content-types-requiring-hardware-support")]
3833    pub fn connect_media_content_types_requiring_hardware_support_notify<F: Fn(&Self) + 'static>(
3834        &self,
3835        f: F,
3836    ) -> SignalHandlerId {
3837        unsafe extern "C" fn notify_media_content_types_requiring_hardware_support_trampoline<
3838            F: Fn(&Settings) + 'static,
3839        >(
3840            this: *mut ffi::WebKitSettings,
3841            _param_spec: glib::ffi::gpointer,
3842            f: glib::ffi::gpointer,
3843        ) {
3844            unsafe {
3845                let f: &F = &*(f as *const F);
3846                f(&from_glib_borrow(this))
3847            }
3848        }
3849        unsafe {
3850            let f: Box_<F> = Box_::new(f);
3851            connect_raw(
3852                self.as_ptr() as *mut _,
3853                c"notify::media-content-types-requiring-hardware-support".as_ptr(),
3854                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3855                    notify_media_content_types_requiring_hardware_support_trampoline::<F>
3856                        as *const (),
3857                )),
3858                Box_::into_raw(f),
3859            )
3860        }
3861    }
3862
3863    #[doc(alias = "media-playback-allows-inline")]
3864    pub fn connect_media_playback_allows_inline_notify<F: Fn(&Self) + 'static>(
3865        &self,
3866        f: F,
3867    ) -> SignalHandlerId {
3868        unsafe extern "C" fn notify_media_playback_allows_inline_trampoline<
3869            F: Fn(&Settings) + 'static,
3870        >(
3871            this: *mut ffi::WebKitSettings,
3872            _param_spec: glib::ffi::gpointer,
3873            f: glib::ffi::gpointer,
3874        ) {
3875            unsafe {
3876                let f: &F = &*(f as *const F);
3877                f(&from_glib_borrow(this))
3878            }
3879        }
3880        unsafe {
3881            let f: Box_<F> = Box_::new(f);
3882            connect_raw(
3883                self.as_ptr() as *mut _,
3884                c"notify::media-playback-allows-inline".as_ptr(),
3885                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3886                    notify_media_playback_allows_inline_trampoline::<F> as *const (),
3887                )),
3888                Box_::into_raw(f),
3889            )
3890        }
3891    }
3892
3893    #[doc(alias = "media-playback-requires-user-gesture")]
3894    pub fn connect_media_playback_requires_user_gesture_notify<F: Fn(&Self) + 'static>(
3895        &self,
3896        f: F,
3897    ) -> SignalHandlerId {
3898        unsafe extern "C" fn notify_media_playback_requires_user_gesture_trampoline<
3899            F: Fn(&Settings) + 'static,
3900        >(
3901            this: *mut ffi::WebKitSettings,
3902            _param_spec: glib::ffi::gpointer,
3903            f: glib::ffi::gpointer,
3904        ) {
3905            unsafe {
3906                let f: &F = &*(f as *const F);
3907                f(&from_glib_borrow(this))
3908            }
3909        }
3910        unsafe {
3911            let f: Box_<F> = Box_::new(f);
3912            connect_raw(
3913                self.as_ptr() as *mut _,
3914                c"notify::media-playback-requires-user-gesture".as_ptr(),
3915                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3916                    notify_media_playback_requires_user_gesture_trampoline::<F> as *const (),
3917                )),
3918                Box_::into_raw(f),
3919            )
3920        }
3921    }
3922
3923    #[doc(alias = "minimum-font-size")]
3924    pub fn connect_minimum_font_size_notify<F: Fn(&Self) + 'static>(
3925        &self,
3926        f: F,
3927    ) -> SignalHandlerId {
3928        unsafe extern "C" fn notify_minimum_font_size_trampoline<F: Fn(&Settings) + 'static>(
3929            this: *mut ffi::WebKitSettings,
3930            _param_spec: glib::ffi::gpointer,
3931            f: glib::ffi::gpointer,
3932        ) {
3933            unsafe {
3934                let f: &F = &*(f as *const F);
3935                f(&from_glib_borrow(this))
3936            }
3937        }
3938        unsafe {
3939            let f: Box_<F> = Box_::new(f);
3940            connect_raw(
3941                self.as_ptr() as *mut _,
3942                c"notify::minimum-font-size".as_ptr(),
3943                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3944                    notify_minimum_font_size_trampoline::<F> as *const (),
3945                )),
3946                Box_::into_raw(f),
3947            )
3948        }
3949    }
3950
3951    #[doc(alias = "monospace-font-family")]
3952    pub fn connect_monospace_font_family_notify<F: Fn(&Self) + 'static>(
3953        &self,
3954        f: F,
3955    ) -> SignalHandlerId {
3956        unsafe extern "C" fn notify_monospace_font_family_trampoline<F: Fn(&Settings) + 'static>(
3957            this: *mut ffi::WebKitSettings,
3958            _param_spec: glib::ffi::gpointer,
3959            f: glib::ffi::gpointer,
3960        ) {
3961            unsafe {
3962                let f: &F = &*(f as *const F);
3963                f(&from_glib_borrow(this))
3964            }
3965        }
3966        unsafe {
3967            let f: Box_<F> = Box_::new(f);
3968            connect_raw(
3969                self.as_ptr() as *mut _,
3970                c"notify::monospace-font-family".as_ptr(),
3971                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3972                    notify_monospace_font_family_trampoline::<F> as *const (),
3973                )),
3974                Box_::into_raw(f),
3975            )
3976        }
3977    }
3978
3979    #[doc(alias = "pictograph-font-family")]
3980    pub fn connect_pictograph_font_family_notify<F: Fn(&Self) + 'static>(
3981        &self,
3982        f: F,
3983    ) -> SignalHandlerId {
3984        unsafe extern "C" fn notify_pictograph_font_family_trampoline<
3985            F: Fn(&Settings) + 'static,
3986        >(
3987            this: *mut ffi::WebKitSettings,
3988            _param_spec: glib::ffi::gpointer,
3989            f: glib::ffi::gpointer,
3990        ) {
3991            unsafe {
3992                let f: &F = &*(f as *const F);
3993                f(&from_glib_borrow(this))
3994            }
3995        }
3996        unsafe {
3997            let f: Box_<F> = Box_::new(f);
3998            connect_raw(
3999                self.as_ptr() as *mut _,
4000                c"notify::pictograph-font-family".as_ptr(),
4001                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4002                    notify_pictograph_font_family_trampoline::<F> as *const (),
4003                )),
4004                Box_::into_raw(f),
4005            )
4006        }
4007    }
4008
4009    #[doc(alias = "print-backgrounds")]
4010    pub fn connect_print_backgrounds_notify<F: Fn(&Self) + 'static>(
4011        &self,
4012        f: F,
4013    ) -> SignalHandlerId {
4014        unsafe extern "C" fn notify_print_backgrounds_trampoline<F: Fn(&Settings) + 'static>(
4015            this: *mut ffi::WebKitSettings,
4016            _param_spec: glib::ffi::gpointer,
4017            f: glib::ffi::gpointer,
4018        ) {
4019            unsafe {
4020                let f: &F = &*(f as *const F);
4021                f(&from_glib_borrow(this))
4022            }
4023        }
4024        unsafe {
4025            let f: Box_<F> = Box_::new(f);
4026            connect_raw(
4027                self.as_ptr() as *mut _,
4028                c"notify::print-backgrounds".as_ptr(),
4029                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4030                    notify_print_backgrounds_trampoline::<F> as *const (),
4031                )),
4032                Box_::into_raw(f),
4033            )
4034        }
4035    }
4036
4037    #[doc(alias = "sans-serif-font-family")]
4038    pub fn connect_sans_serif_font_family_notify<F: Fn(&Self) + 'static>(
4039        &self,
4040        f: F,
4041    ) -> SignalHandlerId {
4042        unsafe extern "C" fn notify_sans_serif_font_family_trampoline<
4043            F: Fn(&Settings) + 'static,
4044        >(
4045            this: *mut ffi::WebKitSettings,
4046            _param_spec: glib::ffi::gpointer,
4047            f: glib::ffi::gpointer,
4048        ) {
4049            unsafe {
4050                let f: &F = &*(f as *const F);
4051                f(&from_glib_borrow(this))
4052            }
4053        }
4054        unsafe {
4055            let f: Box_<F> = Box_::new(f);
4056            connect_raw(
4057                self.as_ptr() as *mut _,
4058                c"notify::sans-serif-font-family".as_ptr(),
4059                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4060                    notify_sans_serif_font_family_trampoline::<F> as *const (),
4061                )),
4062                Box_::into_raw(f),
4063            )
4064        }
4065    }
4066
4067    #[doc(alias = "serif-font-family")]
4068    pub fn connect_serif_font_family_notify<F: Fn(&Self) + 'static>(
4069        &self,
4070        f: F,
4071    ) -> SignalHandlerId {
4072        unsafe extern "C" fn notify_serif_font_family_trampoline<F: Fn(&Settings) + 'static>(
4073            this: *mut ffi::WebKitSettings,
4074            _param_spec: glib::ffi::gpointer,
4075            f: glib::ffi::gpointer,
4076        ) {
4077            unsafe {
4078                let f: &F = &*(f as *const F);
4079                f(&from_glib_borrow(this))
4080            }
4081        }
4082        unsafe {
4083            let f: Box_<F> = Box_::new(f);
4084            connect_raw(
4085                self.as_ptr() as *mut _,
4086                c"notify::serif-font-family".as_ptr(),
4087                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4088                    notify_serif_font_family_trampoline::<F> as *const (),
4089                )),
4090                Box_::into_raw(f),
4091            )
4092        }
4093    }
4094
4095    #[doc(alias = "user-agent")]
4096    pub fn connect_user_agent_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4097        unsafe extern "C" fn notify_user_agent_trampoline<F: Fn(&Settings) + 'static>(
4098            this: *mut ffi::WebKitSettings,
4099            _param_spec: glib::ffi::gpointer,
4100            f: glib::ffi::gpointer,
4101        ) {
4102            unsafe {
4103                let f: &F = &*(f as *const F);
4104                f(&from_glib_borrow(this))
4105            }
4106        }
4107        unsafe {
4108            let f: Box_<F> = Box_::new(f);
4109            connect_raw(
4110                self.as_ptr() as *mut _,
4111                c"notify::user-agent".as_ptr(),
4112                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4113                    notify_user_agent_trampoline::<F> as *const (),
4114                )),
4115                Box_::into_raw(f),
4116            )
4117        }
4118    }
4119
4120    #[cfg(feature = "v2_48")]
4121    #[cfg_attr(docsrs, doc(cfg(feature = "v2_48")))]
4122    #[doc(alias = "webrtc-udp-ports-range")]
4123    pub fn connect_webrtc_udp_ports_range_notify<F: Fn(&Self) + 'static>(
4124        &self,
4125        f: F,
4126    ) -> SignalHandlerId {
4127        unsafe extern "C" fn notify_webrtc_udp_ports_range_trampoline<
4128            F: Fn(&Settings) + 'static,
4129        >(
4130            this: *mut ffi::WebKitSettings,
4131            _param_spec: glib::ffi::gpointer,
4132            f: glib::ffi::gpointer,
4133        ) {
4134            unsafe {
4135                let f: &F = &*(f as *const F);
4136                f(&from_glib_borrow(this))
4137            }
4138        }
4139        unsafe {
4140            let f: Box_<F> = Box_::new(f);
4141            connect_raw(
4142                self.as_ptr() as *mut _,
4143                c"notify::webrtc-udp-ports-range".as_ptr(),
4144                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4145                    notify_webrtc_udp_ports_range_trampoline::<F> as *const (),
4146                )),
4147                Box_::into_raw(f),
4148            )
4149        }
4150    }
4151
4152    #[doc(alias = "zoom-text-only")]
4153    pub fn connect_zoom_text_only_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4154        unsafe extern "C" fn notify_zoom_text_only_trampoline<F: Fn(&Settings) + 'static>(
4155            this: *mut ffi::WebKitSettings,
4156            _param_spec: glib::ffi::gpointer,
4157            f: glib::ffi::gpointer,
4158        ) {
4159            unsafe {
4160                let f: &F = &*(f as *const F);
4161                f(&from_glib_borrow(this))
4162            }
4163        }
4164        unsafe {
4165            let f: Box_<F> = Box_::new(f);
4166            connect_raw(
4167                self.as_ptr() as *mut _,
4168                c"notify::zoom-text-only".as_ptr(),
4169                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4170                    notify_zoom_text_only_trampoline::<F> as *const (),
4171                )),
4172                Box_::into_raw(f),
4173            )
4174        }
4175    }
4176}
4177
4178impl Default for Settings {
4179    fn default() -> Self {
4180        Self::new()
4181    }
4182}
4183
4184// rustdoc-stripper-ignore-next
4185/// A [builder-pattern] type to construct [`Settings`] objects.
4186///
4187/// [builder-pattern]: https://doc.rust-lang.org/1.0.0/style/ownership/builders.html
4188#[must_use = "The builder must be built to be used"]
4189pub struct SettingsBuilder {
4190    builder: glib::object::ObjectBuilder<'static, Settings>,
4191}
4192
4193impl SettingsBuilder {
4194    fn new() -> Self {
4195        Self {
4196            builder: glib::object::Object::builder(),
4197        }
4198    }
4199
4200    /// Whether file access is allowed from file URLs. By default, when
4201    /// something is loaded in a [`WebView`][crate::WebView] using a file URI, cross
4202    /// origin requests to other file resources are not allowed. This
4203    /// setting allows you to change that behaviour, so that it would be
4204    /// possible to do a XMLHttpRequest of a local file, for example.
4205    pub fn allow_file_access_from_file_urls(self, allow_file_access_from_file_urls: bool) -> Self {
4206        Self {
4207            builder: self.builder.property(
4208                "allow-file-access-from-file-urls",
4209                allow_file_access_from_file_urls,
4210            ),
4211        }
4212    }
4213
4214    /// Determine whether it's allowed to create and run modal dialogs
4215    /// from a [`WebView`][crate::WebView] through JavaScript with
4216    /// `<function>`window.showModalDialog`</function>`. If it's set to
4217    /// [`false`], the associated [`WebView`][crate::WebView] won't be able to create
4218    /// new modal dialogs, so not even the [`create`][struct@crate::WebView#create]
4219    /// signal will be emitted.
4220    pub fn allow_modal_dialogs(self, allow_modal_dialogs: bool) -> Self {
4221        Self {
4222            builder: self
4223                .builder
4224                .property("allow-modal-dialogs", allow_modal_dialogs),
4225        }
4226    }
4227
4228    /// Whether or not the top frame is allowed to navigate to data URLs. It is disabled by default
4229    /// due to the risk it poses when loading untrusted URLs, with data URLs being used in scamming
4230    /// and phishing attacks. In contrast, a scenario where it could be enabled could be an app that
4231    /// embeds a WebView and you have control of the pages being show instead of a generic browser.
4232    pub fn allow_top_navigation_to_data_urls(
4233        self,
4234        allow_top_navigation_to_data_urls: bool,
4235    ) -> Self {
4236        Self {
4237            builder: self.builder.property(
4238                "allow-top-navigation-to-data-urls",
4239                allow_top_navigation_to_data_urls,
4240            ),
4241        }
4242    }
4243
4244    /// Whether or not JavaScript running in the context of a file scheme URL
4245    /// should be allowed to access content from any origin. By default, when
4246    /// something is loaded in a [`WebView`][crate::WebView] using a file scheme URL,
4247    /// access to the local file system and arbitrary local storage is not
4248    /// allowed. This setting allows you to change that behaviour, so that
4249    /// it would be possible to use local storage, for example.
4250    pub fn allow_universal_access_from_file_urls(
4251        self,
4252        allow_universal_access_from_file_urls: bool,
4253    ) -> Self {
4254        Self {
4255            builder: self.builder.property(
4256                "allow-universal-access-from-file-urls",
4257                allow_universal_access_from_file_urls,
4258            ),
4259        }
4260    }
4261
4262    /// Determines whether images should be automatically loaded or not.
4263    /// On devices where network bandwidth is of concern, it might be
4264    /// useful to turn this property off.
4265    pub fn auto_load_images(self, auto_load_images: bool) -> Self {
4266        Self {
4267            builder: self.builder.property("auto-load-images", auto_load_images),
4268        }
4269    }
4270
4271    /// The font family used as the default for content using a cursive font.
4272    pub fn cursive_font_family(self, cursive_font_family: impl Into<glib::GString>) -> Self {
4273        Self {
4274            builder: self
4275                .builder
4276                .property("cursive-font-family", cursive_font_family.into()),
4277        }
4278    }
4279
4280    /// The default text charset used when interpreting content with an unspecified charset.
4281    pub fn default_charset(self, default_charset: impl Into<glib::GString>) -> Self {
4282        Self {
4283            builder: self
4284                .builder
4285                .property("default-charset", default_charset.into()),
4286        }
4287    }
4288
4289    /// The font family to use as the default for content that does not specify a font.
4290    pub fn default_font_family(self, default_font_family: impl Into<glib::GString>) -> Self {
4291        Self {
4292            builder: self
4293                .builder
4294                .property("default-font-family", default_font_family.into()),
4295        }
4296    }
4297
4298    /// The default font size in pixels to use for content displayed if
4299    /// no font size is specified.
4300    pub fn default_font_size(self, default_font_size: u32) -> Self {
4301        Self {
4302            builder: self
4303                .builder
4304                .property("default-font-size", default_font_size),
4305        }
4306    }
4307
4308    /// The default font size in pixels to use for content displayed in
4309    /// monospace font if no font size is specified.
4310    pub fn default_monospace_font_size(self, default_monospace_font_size: u32) -> Self {
4311        Self {
4312            builder: self
4313                .builder
4314                .property("default-monospace-font-size", default_monospace_font_size),
4315        }
4316    }
4317
4318    /// Enable or disable support for Web Security on pages.
4319    ///
4320    /// This setting disables the same-origin policy, allowing every website full control over
4321    /// all other websites. This is for use in special environments where you wish to disable
4322    /// all security and allow websites to hack each other. It is impossible to use this setting
4323    /// securely.
4324    pub fn disable_web_security(self, disable_web_security: bool) -> Self {
4325        Self {
4326            builder: self
4327                .builder
4328                .property("disable-web-security", disable_web_security),
4329        }
4330    }
4331
4332    /// Whether to draw compositing borders and repaint counters on layers drawn
4333    /// with accelerated compositing. This is useful for debugging issues related
4334    /// to web content that is composited with the GPU.
4335    pub fn draw_compositing_indicators(self, draw_compositing_indicators: bool) -> Self {
4336        Self {
4337            builder: self
4338                .builder
4339                .property("draw-compositing-indicators", draw_compositing_indicators),
4340        }
4341    }
4342
4343    /// Enable or disable 2D canvas acceleration.
4344    /// If this setting is enabled, the 2D canvas will be accelerated even if Skia CPU
4345    /// is used for rendering. However, the canvas can be unaccelerated even when this setting
4346    /// is enabled, for other reasons like its size or when willReadFrequently property is used.
4347    #[cfg(feature = "v2_46")]
4348    #[cfg_attr(docsrs, doc(cfg(feature = "v2_46")))]
4349    pub fn enable_2d_canvas_acceleration(self, enable_2d_canvas_acceleration: bool) -> Self {
4350        Self {
4351            builder: self.builder.property(
4352                "enable-2d-canvas-acceleration",
4353                enable_2d_canvas_acceleration,
4354            ),
4355        }
4356    }
4357
4358    /// Enable or disable horizontal swipe gesture for back-forward navigation.
4359    pub fn enable_back_forward_navigation_gestures(
4360        self,
4361        enable_back_forward_navigation_gestures: bool,
4362    ) -> Self {
4363        Self {
4364            builder: self.builder.property(
4365                "enable-back-forward-navigation-gestures",
4366                enable_back_forward_navigation_gestures,
4367            ),
4368        }
4369    }
4370
4371    /// Whether to enable accessibility enhanced keyboard navigation.
4372    pub fn enable_caret_browsing(self, enable_caret_browsing: bool) -> Self {
4373        Self {
4374            builder: self
4375                .builder
4376                .property("enable-caret-browsing", enable_caret_browsing),
4377        }
4378    }
4379
4380    /// Determines whether or not developer tools, such as the Web Inspector, are enabled.
4381    pub fn enable_developer_extras(self, enable_developer_extras: bool) -> Self {
4382        Self {
4383            builder: self
4384                .builder
4385                .property("enable-developer-extras", enable_developer_extras),
4386        }
4387    }
4388
4389    /// Determines whether or not to prefetch domain names. DNS prefetching attempts
4390    /// to resolve domain names before a user tries to follow a link.
4391    #[cfg_attr(feature = "v2_48", deprecated = "Since 2.48")]
4392    pub fn enable_dns_prefetching(self, enable_dns_prefetching: bool) -> Self {
4393        Self {
4394            builder: self
4395                .builder
4396                .property("enable-dns-prefetching", enable_dns_prefetching),
4397        }
4398    }
4399
4400    /// Enable or disable support for Encrypted Media API on pages.
4401    /// EncryptedMedia is an experimental JavaScript API for playing encrypted media in HTML.
4402    /// This property will only work as intended if the EncryptedMedia feature is enabled at build time
4403    /// with the ENABLE_ENCRYPTED_MEDIA flag.
4404    ///
4405    /// See https://www.w3.org/TR/encrypted-media/
4406    pub fn enable_encrypted_media(self, enable_encrypted_media: bool) -> Self {
4407        Self {
4408            builder: self
4409                .builder
4410                .property("enable-encrypted-media", enable_encrypted_media),
4411        }
4412    }
4413
4414    /// Whether to enable the Javascript Fullscreen API. The API
4415    /// allows any HTML element to request fullscreen display. See also
4416    /// the current draft of the spec:
4417    /// http://www.w3.org/TR/fullscreen/
4418    pub fn enable_fullscreen(self, enable_fullscreen: bool) -> Self {
4419        Self {
4420            builder: self
4421                .builder
4422                .property("enable-fullscreen", enable_fullscreen),
4423        }
4424    }
4425
4426    /// Whether to enable HTML5 client-side SQL database support (IndexedDB).
4427    pub fn enable_html5_database(self, enable_html5_database: bool) -> Self {
4428        Self {
4429            builder: self
4430                .builder
4431                .property("enable-html5-database", enable_html5_database),
4432        }
4433    }
4434
4435    /// Whether to enable HTML5 local storage support. Local storage provides
4436    /// simple synchronous storage access.
4437    ///
4438    /// HTML5 local storage specification is available at
4439    /// http://dev.w3.org/html5/webstorage/.
4440    pub fn enable_html5_local_storage(self, enable_html5_local_storage: bool) -> Self {
4441        Self {
4442            builder: self
4443                .builder
4444                .property("enable-html5-local-storage", enable_html5_local_storage),
4445        }
4446    }
4447
4448    /// Determines whether or not hyperlink auditing is enabled.
4449    ///
4450    /// The hyperlink auditing specification is available at
4451    /// http://www.whatwg.org/specs/web-apps/current-work/multipage/links.html`hyperlink`-auditing.
4452    #[cfg_attr(feature = "v2_50", deprecated = "Since 2.50")]
4453    pub fn enable_hyperlink_auditing(self, enable_hyperlink_auditing: bool) -> Self {
4454        Self {
4455            builder: self
4456                .builder
4457                .property("enable-hyperlink-auditing", enable_hyperlink_auditing),
4458        }
4459    }
4460
4461    /// Determines whether or not JavaScript executes within a page.
4462    pub fn enable_javascript(self, enable_javascript: bool) -> Self {
4463        Self {
4464            builder: self
4465                .builder
4466                .property("enable-javascript", enable_javascript),
4467        }
4468    }
4469
4470    /// Determines whether or not JavaScript markup is allowed in document. When this setting is disabled,
4471    /// all JavaScript-related elements and attributes are removed from the document during parsing. Note that
4472    /// executing JavaScript is still allowed if [`enable-javascript`][struct@crate::Settings#enable-javascript] is [`true`].
4473    pub fn enable_javascript_markup(self, enable_javascript_markup: bool) -> Self {
4474        Self {
4475            builder: self
4476                .builder
4477                .property("enable-javascript-markup", enable_javascript_markup),
4478        }
4479    }
4480
4481    /// Enable or disable support for media playback on pages. This setting is enabled by
4482    /// default. Disabling it means ``<audio>``, ``<track>`` and ``<video>`` elements will have
4483    /// playback support disabled.
4484    pub fn enable_media(self, enable_media: bool) -> Self {
4485        Self {
4486            builder: self.builder.property("enable-media", enable_media),
4487        }
4488    }
4489
4490    /// Enable or disable support for MediaCapabilities on pages. This
4491    /// specification intends to provide APIs to allow websites to make an optimal
4492    /// decision when picking media content for the user. The APIs will expose
4493    /// information about the decoding and encoding capabilities for a given format
4494    /// but also output capabilities to find the best match based on the device’s
4495    /// display.
4496    ///
4497    /// See also https://wicg.github.io/media-capabilities/
4498    pub fn enable_media_capabilities(self, enable_media_capabilities: bool) -> Self {
4499        Self {
4500            builder: self
4501                .builder
4502                .property("enable-media-capabilities", enable_media_capabilities),
4503        }
4504    }
4505
4506    /// Enable or disable support for MediaStream on pages. MediaStream
4507    /// is an experimental proposal for allowing web pages to access
4508    /// audio and video devices for capture.
4509    ///
4510    /// See also http://dev.w3.org/2011/webrtc/editor/getusermedia.html
4511    pub fn enable_media_stream(self, enable_media_stream: bool) -> Self {
4512        Self {
4513            builder: self
4514                .builder
4515                .property("enable-media-stream", enable_media_stream),
4516        }
4517    }
4518
4519    /// Enable or disable support for MediaSource on pages. MediaSource
4520    /// extends HTMLMediaElement to allow JavaScript to generate media
4521    /// streams for playback.
4522    ///
4523    /// See also http://www.w3.org/TR/media-source/
4524    pub fn enable_mediasource(self, enable_mediasource: bool) -> Self {
4525        Self {
4526            builder: self
4527                .builder
4528                .property("enable-mediasource", enable_mediasource),
4529        }
4530    }
4531
4532    /// Enable or disable the Mock Capture Devices. Those are fake
4533    /// Microphone and Camera devices to be used as MediaStream
4534    /// sources.
4535    pub fn enable_mock_capture_devices(self, enable_mock_capture_devices: bool) -> Self {
4536        Self {
4537            builder: self
4538                .builder
4539                .property("enable-mock-capture-devices", enable_mock_capture_devices),
4540        }
4541    }
4542
4543    /// Unsupported setting. This property does nothing.
4544    #[cfg_attr(feature = "v2_44", deprecated = "Since 2.44")]
4545    pub fn enable_offline_web_application_cache(
4546        self,
4547        enable_offline_web_application_cache: bool,
4548    ) -> Self {
4549        Self {
4550            builder: self.builder.property(
4551                "enable-offline-web-application-cache",
4552                enable_offline_web_application_cache,
4553            ),
4554        }
4555    }
4556
4557    /// Enable or disable the page cache. Disabling the page cache is
4558    /// generally only useful for special circumstances like low-memory
4559    /// scenarios or special purpose applications like static HTML
4560    /// viewers. This setting only controls the Page Cache, this cache
4561    /// is different than the disk-based or memory-based traditional
4562    /// resource caches, its point is to make going back and forth
4563    /// between pages much faster. For details about the different types
4564    /// of caches and their purposes see:
4565    /// http://webkit.org/blog/427/webkit-page-cache-i-the-basics/
4566    pub fn enable_page_cache(self, enable_page_cache: bool) -> Self {
4567        Self {
4568            builder: self
4569                .builder
4570                .property("enable-page-cache", enable_page_cache),
4571        }
4572    }
4573
4574    /// Determines whether or not text areas can be resized.
4575    pub fn enable_resizable_text_areas(self, enable_resizable_text_areas: bool) -> Self {
4576        Self {
4577            builder: self
4578                .builder
4579                .property("enable-resizable-text-areas", enable_resizable_text_areas),
4580        }
4581    }
4582
4583    /// Whether to turn on site-specific quirks. Turning this on will
4584    /// tell WebKit to use some site-specific workarounds for
4585    /// better web compatibility. For example, older versions of
4586    /// MediaWiki will incorrectly send to WebKit a CSS file with KHTML
4587    /// workarounds. By turning on site-specific quirks, WebKit will
4588    /// special-case this and other cases to make some specific sites work.
4589    pub fn enable_site_specific_quirks(self, enable_site_specific_quirks: bool) -> Self {
4590        Self {
4591            builder: self
4592                .builder
4593                .property("enable-site-specific-quirks", enable_site_specific_quirks),
4594        }
4595    }
4596
4597    /// Enable or disable smooth scrolling.
4598    pub fn enable_smooth_scrolling(self, enable_smooth_scrolling: bool) -> Self {
4599        Self {
4600            builder: self
4601                .builder
4602                .property("enable-smooth-scrolling", enable_smooth_scrolling),
4603        }
4604    }
4605
4606    /// Whether to enable Spatial Navigation. This feature consists in the ability
4607    /// to navigate between focusable elements in a Web page, such as hyperlinks
4608    /// and form controls, by using Left, Right, Up and Down arrow keys.
4609    /// For example, if an user presses the Right key, heuristics determine whether
4610    /// there is an element they might be trying to reach towards the right, and if
4611    /// there are multiple elements, which element they probably wants.
4612    pub fn enable_spatial_navigation(self, enable_spatial_navigation: bool) -> Self {
4613        Self {
4614            builder: self
4615                .builder
4616                .property("enable-spatial-navigation", enable_spatial_navigation),
4617        }
4618    }
4619
4620    /// Determines whether the tab key cycles through the elements on the page.
4621    /// When this setting is enabled, users will be able to focus the next element
4622    /// in the page by pressing the tab key. If the selected element is editable,
4623    /// then pressing tab key will insert the tab character.
4624    pub fn enable_tabs_to_links(self, enable_tabs_to_links: bool) -> Self {
4625        Self {
4626            builder: self
4627                .builder
4628                .property("enable-tabs-to-links", enable_tabs_to_links),
4629        }
4630    }
4631
4632    /// Enable or disable support for WebAudio on pages. WebAudio is an
4633    /// API for processing and synthesizing audio in web applications
4634    ///
4635    /// See also https://webaudio.github.io/web-audio-api
4636    pub fn enable_webaudio(self, enable_webaudio: bool) -> Self {
4637        Self {
4638            builder: self.builder.property("enable-webaudio", enable_webaudio),
4639        }
4640    }
4641
4642    /// Enable or disable support for WebGL on pages. WebGL enables web
4643    /// content to use an API based on OpenGL ES 2.0.
4644    pub fn enable_webgl(self, enable_webgl: bool) -> Self {
4645        Self {
4646            builder: self.builder.property("enable-webgl", enable_webgl),
4647        }
4648    }
4649
4650    /// Enable WebRTC support for loaded pages.
4651    ///
4652    /// Enabling this setting implies that [property`Settings`]
4653    /// will be enabled as well.
4654    ///
4655    /// See also https://www.w3.org/TR/webrtc/
4656    pub fn enable_webrtc(self, enable_webrtc: bool) -> Self {
4657        Self {
4658            builder: self.builder.property("enable-webrtc", enable_webrtc),
4659        }
4660    }
4661
4662    /// Enable or disable writing console messages to stdout. These are messages
4663    /// sent to the console with console.log and related methods.
4664    pub fn enable_write_console_messages_to_stdout(
4665        self,
4666        enable_write_console_messages_to_stdout: bool,
4667    ) -> Self {
4668        Self {
4669            builder: self.builder.property(
4670                "enable-write-console-messages-to-stdout",
4671                enable_write_console_messages_to_stdout,
4672            ),
4673        }
4674    }
4675
4676    /// The font family used as the default for content using a fantasy font.
4677    pub fn fantasy_font_family(self, fantasy_font_family: impl Into<glib::GString>) -> Self {
4678        Self {
4679            builder: self
4680                .builder
4681                .property("fantasy-font-family", fantasy_font_family.into()),
4682        }
4683    }
4684
4685    /// The [`HardwareAccelerationPolicy`][crate::HardwareAccelerationPolicy] to decide how to enable and disable
4686    /// hardware acceleration. Disabling hardware acceleration might
4687    /// cause some websites to not render correctly or consume more CPU.
4688    ///
4689    /// Note that changing this setting might not be possible if hardware acceleration is not
4690    /// supported by the hardware or the system. In that case, you can get the value to know the
4691    /// actual policy being used, but changing the setting will not have any effect.
4692    pub fn hardware_acceleration_policy(
4693        self,
4694        hardware_acceleration_policy: HardwareAccelerationPolicy,
4695    ) -> Self {
4696        Self {
4697            builder: self
4698                .builder
4699                .property("hardware-acceleration-policy", hardware_acceleration_policy),
4700        }
4701    }
4702
4703    /// Whether JavaScript can access the clipboard. The default value is [`false`]. If
4704    /// set to [`true`], document.execCommand() allows cut, copy and paste commands.
4705    pub fn javascript_can_access_clipboard(self, javascript_can_access_clipboard: bool) -> Self {
4706        Self {
4707            builder: self.builder.property(
4708                "javascript-can-access-clipboard",
4709                javascript_can_access_clipboard,
4710            ),
4711        }
4712    }
4713
4714    /// Whether JavaScript can open popup windows automatically without user
4715    /// intervention.
4716    pub fn javascript_can_open_windows_automatically(
4717        self,
4718        javascript_can_open_windows_automatically: bool,
4719    ) -> Self {
4720        Self {
4721            builder: self.builder.property(
4722                "javascript-can-open-windows-automatically",
4723                javascript_can_open_windows_automatically,
4724            ),
4725        }
4726    }
4727
4728    /// Unsupported setting. This property does nothing.
4729    #[cfg_attr(feature = "v2_42", deprecated = "Since 2.42")]
4730    pub fn load_icons_ignoring_image_load_setting(
4731        self,
4732        load_icons_ignoring_image_load_setting: bool,
4733    ) -> Self {
4734        Self {
4735            builder: self.builder.property(
4736                "load-icons-ignoring-image-load-setting",
4737                load_icons_ignoring_image_load_setting,
4738            ),
4739        }
4740    }
4741
4742    /// The font family used as the default for content using a math font.
4743    #[cfg(feature = "v2_52")]
4744    #[cfg_attr(docsrs, doc(cfg(feature = "v2_52")))]
4745    pub fn math_font_family(self, math_font_family: impl Into<glib::GString>) -> Self {
4746        Self {
4747            builder: self
4748                .builder
4749                .property("math-font-family", math_font_family.into()),
4750        }
4751    }
4752
4753    /// List of media content types requiring hardware support, split by semicolons (:).
4754    /// For example: 'video/webm; codecs="vp*":video/mp4; codecs="avc*":video/&ast; codecs="av1*"'.
4755    pub fn media_content_types_requiring_hardware_support(
4756        self,
4757        media_content_types_requiring_hardware_support: impl Into<glib::GString>,
4758    ) -> Self {
4759        Self {
4760            builder: self.builder.property(
4761                "media-content-types-requiring-hardware-support",
4762                media_content_types_requiring_hardware_support.into(),
4763            ),
4764        }
4765    }
4766
4767    /// Whether media playback is full-screen only or inline playback is allowed.
4768    /// This is [`true`] by default, so media playback can be inline. Setting it to
4769    /// [`false`] allows specifying that media playback should be always fullscreen.
4770    pub fn media_playback_allows_inline(self, media_playback_allows_inline: bool) -> Self {
4771        Self {
4772            builder: self
4773                .builder
4774                .property("media-playback-allows-inline", media_playback_allows_inline),
4775        }
4776    }
4777
4778    /// Whether a user gesture (such as clicking the play button)
4779    /// would be required to start media playback or load media. This is off
4780    /// by default, so media playback could start automatically.
4781    /// Setting it on requires a gesture by the user to start playback, or to
4782    /// load the media.
4783    pub fn media_playback_requires_user_gesture(
4784        self,
4785        media_playback_requires_user_gesture: bool,
4786    ) -> Self {
4787        Self {
4788            builder: self.builder.property(
4789                "media-playback-requires-user-gesture",
4790                media_playback_requires_user_gesture,
4791            ),
4792        }
4793    }
4794
4795    /// The minimum font size in pixels used to display text. This setting
4796    /// controls the absolute smallest size. Values other than 0 can
4797    /// potentially break page layouts.
4798    pub fn minimum_font_size(self, minimum_font_size: u32) -> Self {
4799        Self {
4800            builder: self
4801                .builder
4802                .property("minimum-font-size", minimum_font_size),
4803        }
4804    }
4805
4806    /// The font family used as the default for content using a monospace font.
4807    pub fn monospace_font_family(self, monospace_font_family: impl Into<glib::GString>) -> Self {
4808        Self {
4809            builder: self
4810                .builder
4811                .property("monospace-font-family", monospace_font_family.into()),
4812        }
4813    }
4814
4815    /// The font family used as the default for content using a pictograph font.
4816    pub fn pictograph_font_family(self, pictograph_font_family: impl Into<glib::GString>) -> Self {
4817        Self {
4818            builder: self
4819                .builder
4820                .property("pictograph-font-family", pictograph_font_family.into()),
4821        }
4822    }
4823
4824    /// Whether background images should be drawn during printing.
4825    pub fn print_backgrounds(self, print_backgrounds: bool) -> Self {
4826        Self {
4827            builder: self
4828                .builder
4829                .property("print-backgrounds", print_backgrounds),
4830        }
4831    }
4832
4833    /// The font family used as the default for content using a sans-serif font.
4834    pub fn sans_serif_font_family(self, sans_serif_font_family: impl Into<glib::GString>) -> Self {
4835        Self {
4836            builder: self
4837                .builder
4838                .property("sans-serif-font-family", sans_serif_font_family.into()),
4839        }
4840    }
4841
4842    /// The font family used as the default for content using a serif font.
4843    pub fn serif_font_family(self, serif_font_family: impl Into<glib::GString>) -> Self {
4844        Self {
4845            builder: self
4846                .builder
4847                .property("serif-font-family", serif_font_family.into()),
4848        }
4849    }
4850
4851    /// The user-agent string used by WebKit. Unusual user-agent strings may cause web
4852    /// content to render incorrectly or fail to run, as many web pages are written to
4853    /// parse the user-agent strings of only the most popular browsers. Therefore, it's
4854    /// typically better to not completely override the standard user-agent, but to use
4855    /// [`Settings::set_user_agent_with_application_details()`][crate::Settings::set_user_agent_with_application_details()] instead.
4856    ///
4857    /// If this property is set to the empty string or [`None`], it will revert to the standard
4858    /// user-agent.
4859    pub fn user_agent(self, user_agent: impl Into<glib::GString>) -> Self {
4860        Self {
4861            builder: self.builder.property("user-agent", user_agent.into()),
4862        }
4863    }
4864
4865    /// Allow customization of the WebRTC UDP ports range.
4866    ///
4867    /// In some constrained environments where a firewall blocks UDP network traffic excepted on a
4868    /// specific port range, this settings can be used to give hints to the WebRTC backend regarding
4869    /// which ports to allocate. The format is min-port:max-port, so for instance 20000:30000. The
4870    /// default empty string value means the OS will use no hints from the WebRTC backend. Using 0
4871    /// for one of the values is allowed and means the value is unspecified.
4872    #[cfg(feature = "v2_48")]
4873    #[cfg_attr(docsrs, doc(cfg(feature = "v2_48")))]
4874    pub fn webrtc_udp_ports_range(self, webrtc_udp_ports_range: impl Into<glib::GString>) -> Self {
4875        Self {
4876            builder: self
4877                .builder
4878                .property("webrtc-udp-ports-range", webrtc_udp_ports_range.into()),
4879        }
4880    }
4881
4882    /// Whether [`zoom-level`][struct@crate::WebView#zoom-level] affects only the
4883    /// text of the page or all the contents. Other contents containing text
4884    /// like form controls will be also affected by zoom factor when
4885    /// this property is enabled.
4886    pub fn zoom_text_only(self, zoom_text_only: bool) -> Self {
4887        Self {
4888            builder: self.builder.property("zoom-text-only", zoom_text_only),
4889        }
4890    }
4891
4892    // rustdoc-stripper-ignore-next
4893    /// Build the [`Settings`].
4894    #[must_use = "Building the object from the builder is usually expensive and is not expected to have side effects"]
4895    pub fn build(self) -> Settings {
4896        assert_initialized_main_thread!();
4897        self.builder.build()
4898    }
4899}