Skip to main content

gtk4/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// DO NOT EDIT
4
5#[cfg(feature = "v4_16")]
6#[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))]
7use crate::FontRendering;
8#[cfg(feature = "v4_22")]
9#[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))]
10use crate::ReducedMotion;
11#[cfg(feature = "v4_20")]
12#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))]
13use crate::{InterfaceColorScheme, InterfaceContrast};
14use crate::{StyleProvider, ffi};
15use glib::{
16    prelude::*,
17    signal::{SignalHandlerId, connect_raw},
18    translate::*,
19};
20use std::boxed::Box as Box_;
21
22glib::wrapper! {
23    /// Provides a mechanism to share global settings between applications.
24    ///
25    /// GTK relies on the platform-specific API for getting desktop-wide
26    /// settings.
27    ///
28    /// On Wayland, the settings are obtained via a settings portal that
29    /// is part of the Linux desktop APIs for application.
30    ///
31    /// On the X window system, this sharing is realized by an
32    /// [XSettings](http://www.freedesktop.org/wiki/Specifications/xsettings-spec)
33    /// manager.
34    ///
35    /// On macOS, the settings are obtained from `NSUserDefaults`.
36    ///
37    /// In the absence of these sharing mechanisms, GTK reads default values for
38    /// settings from `settings.ini` files in `/etc/gtk-4.0`, `$XDG_CONFIG_DIRS/gtk-4.0`
39    /// and `$XDG_CONFIG_HOME/gtk-4.0`. These files must be valid key files (see
40    /// `GKeyFile`), and have a section called Settings. Themes can also provide
41    /// default values for settings by installing a `settings.ini` file
42    /// next to their `gtk.css` file.
43    ///
44    /// Applications can override system-wide settings by setting the property
45    /// of the [`Settings`][crate::Settings] object with g_object_set(). This should be restricted
46    /// to special cases though; [`Settings`][crate::Settings] are not meant as an application
47    /// configuration facility.
48    ///
49    /// There is one [`Settings`][crate::Settings] instance per display. It can be obtained with
50    /// [`for_display()`][Self::for_display()], but in many cases, it is more
51    /// convenient to use [`WidgetExt::settings()`][crate::prelude::WidgetExt::settings()].
52    ///
53    /// ## Properties
54    ///
55    ///
56    /// #### `gtk-alternative-button-order`
57    ///  Whether buttons in dialogs should use the alternative button order.
58    ///
59    /// Readable | Writable
60    ///
61    ///
62    /// #### `gtk-alternative-sort-arrows`
63    ///  Controls the direction of the sort indicators in sorted list and tree
64    /// views.
65    ///
66    /// By default an arrow pointing down means the column is sorted
67    /// in ascending order. When set to [`true`], this order will be inverted.
68    ///
69    /// Readable | Writable
70    ///
71    ///
72    /// #### `gtk-application-prefer-dark-theme`
73    ///  Whether the application prefers to use a dark theme.
74    ///
75    /// If a GTK theme includes a dark variant, it will be used
76    /// instead of the configured theme.
77    ///
78    /// Some applications benefit from minimizing the amount of light
79    /// pollution that interferes with the content. Good candidates for
80    /// dark themes are photo and video editors that make the actual
81    /// content get all the attention and minimize the distraction of
82    /// the chrome.
83    ///
84    /// Dark themes should not be used for documents, where large spaces
85    /// are white/light and the dark chrome creates too much contrast
86    /// (web browser, text editor...).
87    ///
88    /// Readable | Writable
89    ///
90    ///
91    /// #### `gtk-cursor-aspect-ratio`
92    ///  The aspect ratio of the text caret.
93    ///
94    /// Readable | Writable
95    ///
96    ///
97    /// #### `gtk-cursor-blink`
98    ///  Whether the cursor should blink.
99    ///
100    /// Also see the [`gtk-cursor-blink-timeout`][struct@crate::Settings#gtk-cursor-blink-timeout] setting,
101    /// which allows more flexible control over cursor blinking.
102    ///
103    /// Readable | Writable
104    ///
105    ///
106    /// #### `gtk-cursor-blink-time`
107    ///  Length of the cursor blink cycle, in milliseconds.
108    ///
109    /// Readable | Writable
110    ///
111    ///
112    /// #### `gtk-cursor-blink-timeout`
113    ///  Time after which the cursor stops blinking, in seconds.
114    ///
115    /// The timer is reset after each user interaction.
116    ///
117    /// Setting this to zero has the same effect as setting
118    /// [`gtk-cursor-blink`][struct@crate::Settings#gtk-cursor-blink] to [`false`].
119    ///
120    /// Readable | Writable
121    ///
122    ///
123    /// #### `gtk-cursor-theme-name`
124    ///  Name of the cursor theme to use.
125    ///
126    /// Use [`None`] to use the default theme.
127    ///
128    /// Readable | Writable
129    ///
130    ///
131    /// #### `gtk-cursor-theme-size`
132    ///  The size to use for cursors.
133    ///
134    /// 0 means to use the default size.
135    ///
136    /// Readable | Writable
137    ///
138    ///
139    /// #### `gtk-decoration-layout`
140    ///  Determines which buttons should be put in the
141    /// titlebar of client-side decorated windows, and whether they
142    /// should be placed on the left or right.
143    ///
144    /// The format of the string is button names, separated by commas.
145    /// A colon separates the buttons that should appear on the left
146    /// from those on the right. Recognized button names are minimize,
147    /// maximize, close, icon (the window icon) and menu (a menu button
148    /// for the fallback app menu).
149    ///
150    /// For example, "menu:minimize,maximize,close" specifies a menu
151    /// on the left, and minimize, maximize and close buttons on the right.
152    ///
153    /// Note that buttons will only be shown when they are meaningful.
154    /// E.g. a menu button only appears when the desktop shell does not
155    /// show the app menu, and a close button only appears on a window
156    /// that can be closed.
157    ///
158    /// Also note that the setting can be overridden with the
159    /// [`decoration-layout`][struct@crate::HeaderBar#decoration-layout] property.
160    ///
161    /// Readable | Writable
162    ///
163    ///
164    /// #### `gtk-dialogs-use-header`
165    ///  Whether builtin GTK dialogs such as the file chooser, the
166    /// color chooser or the font chooser will use a header bar at
167    /// the top to show action widgets, or an action area at the bottom.
168    ///
169    /// This setting does not affect custom dialogs using [`Dialog`][crate::Dialog]
170    /// directly, or message dialogs.
171    ///
172    /// Readable | Writable
173    ///
174    ///
175    /// #### `gtk-dnd-drag-threshold`
176    ///  The number of pixels the cursor can move before dragging.
177    ///
178    /// Readable | Writable
179    ///
180    ///
181    /// #### `gtk-double-click-distance`
182    ///  The maximum distance allowed between two clicks for them to be considered
183    /// a double click, in pixels.
184    ///
185    /// Readable | Writable
186    ///
187    ///
188    /// #### `gtk-double-click-time`
189    ///  The maximum time to allow between two clicks for them to be considered
190    /// a double click, in milliseconds.
191    ///
192    /// Readable | Writable
193    ///
194    ///
195    /// #### `gtk-enable-accels`
196    ///  Whether menu items should have visible accelerators which can be
197    /// activated.
198    ///
199    /// Readable | Writable
200    ///
201    ///
202    /// #### `gtk-enable-animations`
203    ///  Whether to enable toolkit-wide animations.
204    ///
205    /// Readable | Writable
206    ///
207    ///
208    /// #### `gtk-enable-event-sounds`
209    ///  Whether to play any event sounds at all.
210    ///
211    /// See the [Sound Theme Specifications](http://www.freedesktop.org/wiki/Specifications/sound-theme-spec)
212    /// for more information on event sounds and sound themes.
213    ///
214    /// GTK itself does not support event sounds, you have to use a loadable
215    /// module like the one that comes with libcanberra.
216    ///
217    /// Readable | Writable
218    ///
219    ///
220    /// #### `gtk-enable-input-feedback-sounds`
221    ///  Whether to play event sounds as feedback to user input.
222    ///
223    /// See the [Sound Theme Specifications](http://www.freedesktop.org/wiki/Specifications/sound-theme-spec)
224    /// for more information on event sounds and sound themes.
225    ///
226    /// GTK itself does not support event sounds, you have to use a loadable
227    /// module like the one that comes with libcanberra.
228    ///
229    /// Readable | Writable
230    ///
231    ///
232    /// #### `gtk-enable-primary-paste`
233    ///  Whether a middle click on a mouse should paste the
234    /// 'PRIMARY' clipboard content at the cursor location.
235    ///
236    /// Readable | Writable
237    ///
238    ///
239    /// #### `gtk-entry-password-hint-timeout`
240    ///  How long to show the last input character in hidden
241    /// entries.
242    ///
243    /// This value is in milliseconds. 0 disables showing the
244    /// last char. 600 is a good value for enabling it.
245    ///
246    /// Readable | Writable
247    ///
248    ///
249    /// #### `gtk-entry-select-on-focus`
250    ///  Whether to select the contents of an entry when it is focused.
251    ///
252    /// Readable | Writable
253    ///
254    ///
255    /// #### `gtk-error-bell`
256    ///  When [`true`], keyboard navigation and other input-related errors
257    /// will cause a beep.
258    ///
259    /// Since the error bell is implemented using gdk_surface_beep(), the
260    /// windowing system may offer ways to configure the error bell in many
261    /// ways, such as flashing the window or similar visual effects.
262    ///
263    /// Readable | Writable
264    ///
265    ///
266    /// #### `gtk-font-name`
267    ///  The default font to use.
268    ///
269    /// GTK uses the family name and size from this string.
270    ///
271    /// Readable | Writable
272    ///
273    ///
274    /// #### `gtk-font-rendering`
275    ///  How GTK font rendering is set up.
276    ///
277    /// When set to [enum@Gtk.FontRendering.MANUAL], GTK respects the low-level
278    /// font-related settings ([`gtk-hint-font-metrics`][struct@crate::Settings#gtk-hint-font-metrics],
279    /// [`gtk-xft-antialias`][struct@crate::Settings#gtk-xft-antialias], [`gtk-xft-hinting`][struct@crate::Settings#gtk-xft-hinting],
280    /// [`gtk-xft-hintstyle`][struct@crate::Settings#gtk-xft-hintstyle] and [`gtk-xft-rgba`][struct@crate::Settings#gtk-xft-rgba])
281    /// as much as practical.
282    ///
283    /// When set to [enum@Gtk.FontRendering.AUTOMATIC], GTK will consider factors such
284    /// as screen resolution and scale in deciding how to render fonts.
285    ///
286    /// Readable | Writable
287    ///
288    ///
289    /// #### `gtk-fontconfig-timestamp`
290    ///  Timestamp of the current fontconfig configuration.
291    ///
292    /// Readable | Writable
293    ///
294    ///
295    /// #### `gtk-hint-font-metrics`
296    ///  Whether hinting should be applied to font metrics.
297    ///
298    /// Note that this also turns off subpixel positioning of glyphs,
299    /// since it conflicts with metrics hinting.
300    ///
301    /// Readable | Writable
302    ///
303    ///
304    /// #### `gtk-icon-theme-name`
305    ///  Name of the icon theme to use.
306    ///
307    /// See [`IconTheme`][crate::IconTheme] for details about how
308    /// GTK handles icon themes.
309    ///
310    /// Readable | Writable
311    ///
312    ///
313    /// #### `gtk-im-module`
314    ///  Which IM (input method) module should be used by default.
315    ///
316    /// This is the input method that will be used if the user has not
317    /// explicitly chosen another input method from the IM context menu.
318    /// This also can be a colon-separated list of input methods, which GTK
319    /// will try in turn until it finds one available on the system.
320    ///
321    /// See [`IMContext`][crate::IMContext].
322    ///
323    /// Readable | Writable
324    ///
325    ///
326    /// #### `gtk-interface-color-scheme`
327    ///  The color scheme used for rendering the user interface.
328    ///
329    /// This setting communicates the system-wide preference.
330    /// The color scheme that is actually used when applying CSS
331    /// styles can be set with the [`prefers-color-scheme`][struct@crate::CssProvider#prefers-color-scheme]
332    /// property.
333    ///
334    /// Readable | Writable
335    ///
336    ///
337    /// #### `gtk-interface-contrast`
338    ///  The level of contrast to use for the user interface.
339    ///
340    /// This setting communicates the system-wide preference.
341    /// The contrast level that is actually used when applying CSS
342    /// styles can be set with the [`prefers-contrast`][struct@crate::CssProvider#prefers-contrast]
343    /// property.
344    ///
345    /// Readable | Writable
346    ///
347    ///
348    /// #### `gtk-interface-reduced-motion`
349    ///  Whether animations should be reduced to essential motions.
350    ///
351    /// This setting communicates the system-wide preference.
352    /// The motion level that is actually used when applying CSS
353    /// styles can be set with the [`prefers-reduced-motion`][struct@crate::CssProvider#prefers-reduced-motion]
354    /// property.
355    ///
356    /// Readable | Writable
357    ///
358    ///
359    /// #### `gtk-keynav-use-caret`
360    ///  Whether GTK should make sure that text can be navigated with
361    /// a caret, even if it is not editable.
362    ///
363    /// This is useful when using a screen reader.
364    ///
365    /// Readable | Writable
366    ///
367    ///
368    /// #### `gtk-label-select-on-focus`
369    ///  Whether to select the contents of a selectable
370    /// label when it is focused.
371    ///
372    /// Readable | Writable
373    ///
374    ///
375    /// #### `gtk-long-press-time`
376    ///  .
377    ///
378    /// See [`GestureLongPress`][crate::GestureLongPress].
379    ///
380    /// Readable | Writable
381    ///
382    ///
383    /// #### `gtk-overlay-scrolling`
384    ///  Whether scrolled windows may use overlaid scrolling indicators.
385    ///
386    /// If this is set to [`false`], scrolled windows will have permanent
387    /// scrollbars.
388    ///
389    /// Readable | Writable
390    ///
391    ///
392    /// #### `gtk-primary-button-warps-slider`
393    ///  s page-size towards the point clicked.
394    ///
395    /// Whichever action you choose for the primary button, the other action will
396    /// be available by holding Shift and primary-clicking, or clicking the middle
397    /// mouse button.
398    ///
399    /// Readable | Writable
400    ///
401    ///
402    /// #### `gtk-print-backends`
403    ///  A comma-separated list of print backends to use in the print
404    /// dialog.
405    ///
406    /// Available print backends depend on the GTK installation,
407    /// and may include "file", "cups", "lpr" or "papi".
408    ///
409    /// Readable | Writable
410    ///
411    ///
412    /// #### `gtk-print-preview-command`
413    ///  A command to run for displaying the print preview.
414    ///
415    /// The command should contain a ``f`` placeholder, which will get
416    /// replaced by the path to the pdf file. The command may also
417    /// contain a ``s`` placeholder, which will get replaced by the
418    /// path to a file containing the print settings in the format
419    /// produced by [`PrintSettings::to_file()`][crate::PrintSettings::to_file()].
420    ///
421    /// The preview application is responsible for removing the pdf
422    /// file and the print settings file when it is done.
423    ///
424    /// Readable | Writable
425    ///
426    ///
427    /// #### `gtk-recent-files-enabled`
428    ///  Whether GTK should keep track of items inside the recently used
429    /// resources list.
430    ///
431    /// If set to [`false`], the list will always be empty.
432    ///
433    /// Readable | Writable
434    ///
435    ///
436    /// #### `gtk-recent-files-max-age`
437    ///  The maximum age, in days, of the items inside the recently used
438    /// resources list.
439    ///
440    /// Items older than this setting will be excised from the list.
441    /// If set to 0, the list will always be empty; if set to -1, no
442    /// item will be removed.
443    ///
444    /// Readable | Writable
445    ///
446    ///
447    /// #### `gtk-shell-shows-app-menu`
448    ///  Set to [`true`] if the desktop environment is displaying
449    /// the app menu, [`false`] if the app should display it itself.
450    ///
451    /// Readable | Writable
452    ///
453    ///
454    /// #### `gtk-shell-shows-desktop`
455    ///  Set to [`true`] if the desktop environment is displaying
456    /// the desktop folder, [`false`] if not.
457    ///
458    /// Readable | Writable
459    ///
460    ///
461    /// #### `gtk-shell-shows-menubar`
462    ///  Set to [`true`] if the desktop environment is displaying
463    /// the menubar, [`false`] if the app should display it itself.
464    ///
465    /// Readable | Writable
466    ///
467    ///
468    /// #### `gtk-show-status-shapes`
469    ///  When [`true`], widgets like switches include shapes to indicate their on/off state.
470    ///
471    /// Readable | Writable
472    ///
473    ///
474    /// #### `gtk-sound-theme-name`
475    ///  The XDG sound theme to use for event sounds.
476    ///
477    /// See the [Sound Theme Specifications](http://www.freedesktop.org/wiki/Specifications/sound-theme-spec)
478    /// for more information on event sounds and sound themes.
479    ///
480    /// GTK itself does not support event sounds, you have to use
481    /// a loadable module like the one that comes with libcanberra.
482    ///
483    /// Readable | Writable
484    ///
485    ///
486    /// #### `gtk-split-cursor`
487    ///  Whether two cursors should be displayed for mixed left-to-right and
488    /// right-to-left text.
489    ///
490    /// Readable | Writable
491    ///
492    ///
493    /// #### `gtk-theme-name`
494    ///  Name of the theme to load.
495    ///
496    /// See [`CssProvider`][crate::CssProvider] for details about how
497    /// GTK finds the CSS stylesheet for a theme.
498    ///
499    /// Readable | Writable
500    ///
501    ///
502    /// #### `gtk-titlebar-double-click`
503    ///  Determines the action to take when a double-click
504    /// occurs on the titlebar of client-side decorated windows.
505    ///
506    /// Recognized actions are minimize, toggle-maximize, menu, lower
507    /// or none.
508    ///
509    /// Readable | Writable
510    ///
511    ///
512    /// #### `gtk-titlebar-middle-click`
513    ///  Determines the action to take when a middle-click
514    /// occurs on the titlebar of client-side decorated windows.
515    ///
516    /// Recognized actions are minimize, toggle-maximize, menu, lower
517    /// or none.
518    ///
519    /// Readable | Writable
520    ///
521    ///
522    /// #### `gtk-titlebar-right-click`
523    ///  Determines the action to take when a right-click
524    /// occurs on the titlebar of client-side decorated windows.
525    ///
526    /// Recognized actions are minimize, toggle-maximize, menu, lower
527    /// or none.
528    ///
529    /// Readable | Writable
530    ///
531    ///
532    /// #### `gtk-xft-antialias`
533    ///  Whether to antialias fonts.
534    ///
535    /// The values are 0 for no, 1 for yes, or -1 for the system default.
536    ///
537    /// Readable | Writable
538    ///
539    ///
540    /// #### `gtk-xft-dpi`
541    ///  The font resolution, in 1024 * dots/inch.
542    ///
543    /// -1 to use the default value.
544    ///
545    /// Readable | Writable
546    ///
547    ///
548    /// #### `gtk-xft-hinting`
549    ///  Whether to enable font hinting.
550    ///
551    /// The values are 0 for no, 1 for yes, or -1 for the system default.
552    ///
553    /// Readable | Writable
554    ///
555    ///
556    /// #### `gtk-xft-hintstyle`
557    ///  What degree of font hinting to use.
558    ///
559    /// The possible vaues are hintnone, hintslight,
560    /// hintmedium, hintfull.
561    ///
562    /// Readable | Writable
563    ///
564    ///
565    /// #### `gtk-xft-rgba`
566    ///  The type of subpixel antialiasing to use.
567    ///
568    /// The possible values are none, rgb, bgr, vrgb, vbgr.
569    ///
570    /// Note that GSK does not support subpixel antialiasing, and this
571    /// setting has no effect on font rendering in GTK.
572    ///
573    /// Readable | Writable
574    ///
575    /// # Implements
576    ///
577    /// [`trait@glib::ObjectExt`], [`StyleProviderExt`][trait@crate::prelude::StyleProviderExt]
578    #[doc(alias = "GtkSettings")]
579    pub struct Settings(Object<ffi::GtkSettings>) @implements StyleProvider;
580
581    match fn {
582        type_ => || ffi::gtk_settings_get_type(),
583    }
584}
585
586impl Settings {
587    // rustdoc-stripper-ignore-next
588    /// Creates a new builder-pattern struct instance to construct [`Settings`] objects.
589    ///
590    /// This method returns an instance of [`SettingsBuilder`](crate::builders::SettingsBuilder) which can be used to create [`Settings`] objects.
591    pub fn builder() -> SettingsBuilder {
592        SettingsBuilder::new()
593    }
594
595    /// Undoes the effect of calling g_object_set() to install an
596    /// application-specific value for a setting.
597    ///
598    /// After this call, the setting will again follow the session-wide
599    /// value for this setting.
600    /// ## `name`
601    /// the name of the setting to reset
602    #[doc(alias = "gtk_settings_reset_property")]
603    pub fn reset_property(&self, name: &str) {
604        unsafe {
605            ffi::gtk_settings_reset_property(self.to_glib_none().0, name.to_glib_none().0);
606        }
607    }
608
609    /// Whether buttons in dialogs should use the alternative button order.
610    #[doc(alias = "gtk-alternative-button-order")]
611    pub fn is_gtk_alternative_button_order(&self) -> bool {
612        ObjectExt::property(self, "gtk-alternative-button-order")
613    }
614
615    /// Whether buttons in dialogs should use the alternative button order.
616    #[doc(alias = "gtk-alternative-button-order")]
617    pub fn set_gtk_alternative_button_order(&self, gtk_alternative_button_order: bool) {
618        ObjectExt::set_property(
619            self,
620            "gtk-alternative-button-order",
621            gtk_alternative_button_order,
622        )
623    }
624
625    /// Controls the direction of the sort indicators in sorted list and tree
626    /// views.
627    ///
628    /// By default an arrow pointing down means the column is sorted
629    /// in ascending order. When set to [`true`], this order will be inverted.
630    #[doc(alias = "gtk-alternative-sort-arrows")]
631    pub fn is_gtk_alternative_sort_arrows(&self) -> bool {
632        ObjectExt::property(self, "gtk-alternative-sort-arrows")
633    }
634
635    /// Controls the direction of the sort indicators in sorted list and tree
636    /// views.
637    ///
638    /// By default an arrow pointing down means the column is sorted
639    /// in ascending order. When set to [`true`], this order will be inverted.
640    #[doc(alias = "gtk-alternative-sort-arrows")]
641    pub fn set_gtk_alternative_sort_arrows(&self, gtk_alternative_sort_arrows: bool) {
642        ObjectExt::set_property(
643            self,
644            "gtk-alternative-sort-arrows",
645            gtk_alternative_sort_arrows,
646        )
647    }
648
649    /// Whether the application prefers to use a dark theme.
650    ///
651    /// If a GTK theme includes a dark variant, it will be used
652    /// instead of the configured theme.
653    ///
654    /// Some applications benefit from minimizing the amount of light
655    /// pollution that interferes with the content. Good candidates for
656    /// dark themes are photo and video editors that make the actual
657    /// content get all the attention and minimize the distraction of
658    /// the chrome.
659    ///
660    /// Dark themes should not be used for documents, where large spaces
661    /// are white/light and the dark chrome creates too much contrast
662    /// (web browser, text editor...).
663    ///
664    /// # Deprecated since 4.20
665    ///
666    /// Use [`CssProvider`][crate::CssProvider] properties instead
667    #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")]
668    #[doc(alias = "gtk-application-prefer-dark-theme")]
669    pub fn is_gtk_application_prefer_dark_theme(&self) -> bool {
670        ObjectExt::property(self, "gtk-application-prefer-dark-theme")
671    }
672
673    /// Whether the application prefers to use a dark theme.
674    ///
675    /// If a GTK theme includes a dark variant, it will be used
676    /// instead of the configured theme.
677    ///
678    /// Some applications benefit from minimizing the amount of light
679    /// pollution that interferes with the content. Good candidates for
680    /// dark themes are photo and video editors that make the actual
681    /// content get all the attention and minimize the distraction of
682    /// the chrome.
683    ///
684    /// Dark themes should not be used for documents, where large spaces
685    /// are white/light and the dark chrome creates too much contrast
686    /// (web browser, text editor...).
687    ///
688    /// # Deprecated since 4.20
689    ///
690    /// Use [`CssProvider`][crate::CssProvider] properties instead
691    #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")]
692    #[doc(alias = "gtk-application-prefer-dark-theme")]
693    pub fn set_gtk_application_prefer_dark_theme(&self, gtk_application_prefer_dark_theme: bool) {
694        ObjectExt::set_property(
695            self,
696            "gtk-application-prefer-dark-theme",
697            gtk_application_prefer_dark_theme,
698        )
699    }
700
701    /// The aspect ratio of the text caret.
702    #[doc(alias = "gtk-cursor-aspect-ratio")]
703    pub fn gtk_cursor_aspect_ratio(&self) -> f64 {
704        ObjectExt::property(self, "gtk-cursor-aspect-ratio")
705    }
706
707    /// The aspect ratio of the text caret.
708    #[doc(alias = "gtk-cursor-aspect-ratio")]
709    pub fn set_gtk_cursor_aspect_ratio(&self, gtk_cursor_aspect_ratio: f64) {
710        ObjectExt::set_property(self, "gtk-cursor-aspect-ratio", gtk_cursor_aspect_ratio)
711    }
712
713    /// Whether the cursor should blink.
714    ///
715    /// Also see the [`gtk-cursor-blink-timeout`][struct@crate::Settings#gtk-cursor-blink-timeout] setting,
716    /// which allows more flexible control over cursor blinking.
717    #[doc(alias = "gtk-cursor-blink")]
718    pub fn is_gtk_cursor_blink(&self) -> bool {
719        ObjectExt::property(self, "gtk-cursor-blink")
720    }
721
722    /// Whether the cursor should blink.
723    ///
724    /// Also see the [`gtk-cursor-blink-timeout`][struct@crate::Settings#gtk-cursor-blink-timeout] setting,
725    /// which allows more flexible control over cursor blinking.
726    #[doc(alias = "gtk-cursor-blink")]
727    pub fn set_gtk_cursor_blink(&self, gtk_cursor_blink: bool) {
728        ObjectExt::set_property(self, "gtk-cursor-blink", gtk_cursor_blink)
729    }
730
731    /// Length of the cursor blink cycle, in milliseconds.
732    #[doc(alias = "gtk-cursor-blink-time")]
733    pub fn gtk_cursor_blink_time(&self) -> i32 {
734        ObjectExt::property(self, "gtk-cursor-blink-time")
735    }
736
737    /// Length of the cursor blink cycle, in milliseconds.
738    #[doc(alias = "gtk-cursor-blink-time")]
739    pub fn set_gtk_cursor_blink_time(&self, gtk_cursor_blink_time: i32) {
740        ObjectExt::set_property(self, "gtk-cursor-blink-time", gtk_cursor_blink_time)
741    }
742
743    /// Time after which the cursor stops blinking, in seconds.
744    ///
745    /// The timer is reset after each user interaction.
746    ///
747    /// Setting this to zero has the same effect as setting
748    /// [`gtk-cursor-blink`][struct@crate::Settings#gtk-cursor-blink] to [`false`].
749    #[doc(alias = "gtk-cursor-blink-timeout")]
750    pub fn gtk_cursor_blink_timeout(&self) -> i32 {
751        ObjectExt::property(self, "gtk-cursor-blink-timeout")
752    }
753
754    /// Time after which the cursor stops blinking, in seconds.
755    ///
756    /// The timer is reset after each user interaction.
757    ///
758    /// Setting this to zero has the same effect as setting
759    /// [`gtk-cursor-blink`][struct@crate::Settings#gtk-cursor-blink] to [`false`].
760    #[doc(alias = "gtk-cursor-blink-timeout")]
761    pub fn set_gtk_cursor_blink_timeout(&self, gtk_cursor_blink_timeout: i32) {
762        ObjectExt::set_property(self, "gtk-cursor-blink-timeout", gtk_cursor_blink_timeout)
763    }
764
765    /// Name of the cursor theme to use.
766    ///
767    /// Use [`None`] to use the default theme.
768    #[doc(alias = "gtk-cursor-theme-name")]
769    pub fn gtk_cursor_theme_name(&self) -> Option<glib::GString> {
770        ObjectExt::property(self, "gtk-cursor-theme-name")
771    }
772
773    /// Name of the cursor theme to use.
774    ///
775    /// Use [`None`] to use the default theme.
776    #[doc(alias = "gtk-cursor-theme-name")]
777    pub fn set_gtk_cursor_theme_name(&self, gtk_cursor_theme_name: Option<&str>) {
778        ObjectExt::set_property(self, "gtk-cursor-theme-name", gtk_cursor_theme_name)
779    }
780
781    /// The size to use for cursors.
782    ///
783    /// 0 means to use the default size.
784    #[doc(alias = "gtk-cursor-theme-size")]
785    pub fn gtk_cursor_theme_size(&self) -> i32 {
786        ObjectExt::property(self, "gtk-cursor-theme-size")
787    }
788
789    /// The size to use for cursors.
790    ///
791    /// 0 means to use the default size.
792    #[doc(alias = "gtk-cursor-theme-size")]
793    pub fn set_gtk_cursor_theme_size(&self, gtk_cursor_theme_size: i32) {
794        ObjectExt::set_property(self, "gtk-cursor-theme-size", gtk_cursor_theme_size)
795    }
796
797    /// Determines which buttons should be put in the
798    /// titlebar of client-side decorated windows, and whether they
799    /// should be placed on the left or right.
800    ///
801    /// The format of the string is button names, separated by commas.
802    /// A colon separates the buttons that should appear on the left
803    /// from those on the right. Recognized button names are minimize,
804    /// maximize, close, icon (the window icon) and menu (a menu button
805    /// for the fallback app menu).
806    ///
807    /// For example, "menu:minimize,maximize,close" specifies a menu
808    /// on the left, and minimize, maximize and close buttons on the right.
809    ///
810    /// Note that buttons will only be shown when they are meaningful.
811    /// E.g. a menu button only appears when the desktop shell does not
812    /// show the app menu, and a close button only appears on a window
813    /// that can be closed.
814    ///
815    /// Also note that the setting can be overridden with the
816    /// [`decoration-layout`][struct@crate::HeaderBar#decoration-layout] property.
817    #[doc(alias = "gtk-decoration-layout")]
818    pub fn gtk_decoration_layout(&self) -> Option<glib::GString> {
819        ObjectExt::property(self, "gtk-decoration-layout")
820    }
821
822    /// Determines which buttons should be put in the
823    /// titlebar of client-side decorated windows, and whether they
824    /// should be placed on the left or right.
825    ///
826    /// The format of the string is button names, separated by commas.
827    /// A colon separates the buttons that should appear on the left
828    /// from those on the right. Recognized button names are minimize,
829    /// maximize, close, icon (the window icon) and menu (a menu button
830    /// for the fallback app menu).
831    ///
832    /// For example, "menu:minimize,maximize,close" specifies a menu
833    /// on the left, and minimize, maximize and close buttons on the right.
834    ///
835    /// Note that buttons will only be shown when they are meaningful.
836    /// E.g. a menu button only appears when the desktop shell does not
837    /// show the app menu, and a close button only appears on a window
838    /// that can be closed.
839    ///
840    /// Also note that the setting can be overridden with the
841    /// [`decoration-layout`][struct@crate::HeaderBar#decoration-layout] property.
842    #[doc(alias = "gtk-decoration-layout")]
843    pub fn set_gtk_decoration_layout(&self, gtk_decoration_layout: Option<&str>) {
844        ObjectExt::set_property(self, "gtk-decoration-layout", gtk_decoration_layout)
845    }
846
847    /// Whether builtin GTK dialogs such as the file chooser, the
848    /// color chooser or the font chooser will use a header bar at
849    /// the top to show action widgets, or an action area at the bottom.
850    ///
851    /// This setting does not affect custom dialogs using [`Dialog`][crate::Dialog]
852    /// directly, or message dialogs.
853    #[doc(alias = "gtk-dialogs-use-header")]
854    pub fn is_gtk_dialogs_use_header(&self) -> bool {
855        ObjectExt::property(self, "gtk-dialogs-use-header")
856    }
857
858    /// Whether builtin GTK dialogs such as the file chooser, the
859    /// color chooser or the font chooser will use a header bar at
860    /// the top to show action widgets, or an action area at the bottom.
861    ///
862    /// This setting does not affect custom dialogs using [`Dialog`][crate::Dialog]
863    /// directly, or message dialogs.
864    #[doc(alias = "gtk-dialogs-use-header")]
865    pub fn set_gtk_dialogs_use_header(&self, gtk_dialogs_use_header: bool) {
866        ObjectExt::set_property(self, "gtk-dialogs-use-header", gtk_dialogs_use_header)
867    }
868
869    /// The number of pixels the cursor can move before dragging.
870    #[doc(alias = "gtk-dnd-drag-threshold")]
871    pub fn gtk_dnd_drag_threshold(&self) -> i32 {
872        ObjectExt::property(self, "gtk-dnd-drag-threshold")
873    }
874
875    /// The number of pixels the cursor can move before dragging.
876    #[doc(alias = "gtk-dnd-drag-threshold")]
877    pub fn set_gtk_dnd_drag_threshold(&self, gtk_dnd_drag_threshold: i32) {
878        ObjectExt::set_property(self, "gtk-dnd-drag-threshold", gtk_dnd_drag_threshold)
879    }
880
881    /// The maximum distance allowed between two clicks for them to be considered
882    /// a double click, in pixels.
883    #[doc(alias = "gtk-double-click-distance")]
884    pub fn gtk_double_click_distance(&self) -> i32 {
885        ObjectExt::property(self, "gtk-double-click-distance")
886    }
887
888    /// The maximum distance allowed between two clicks for them to be considered
889    /// a double click, in pixels.
890    #[doc(alias = "gtk-double-click-distance")]
891    pub fn set_gtk_double_click_distance(&self, gtk_double_click_distance: i32) {
892        ObjectExt::set_property(self, "gtk-double-click-distance", gtk_double_click_distance)
893    }
894
895    /// The maximum time to allow between two clicks for them to be considered
896    /// a double click, in milliseconds.
897    #[doc(alias = "gtk-double-click-time")]
898    pub fn gtk_double_click_time(&self) -> i32 {
899        ObjectExt::property(self, "gtk-double-click-time")
900    }
901
902    /// The maximum time to allow between two clicks for them to be considered
903    /// a double click, in milliseconds.
904    #[doc(alias = "gtk-double-click-time")]
905    pub fn set_gtk_double_click_time(&self, gtk_double_click_time: i32) {
906        ObjectExt::set_property(self, "gtk-double-click-time", gtk_double_click_time)
907    }
908
909    /// Whether menu items should have visible accelerators which can be
910    /// activated.
911    #[doc(alias = "gtk-enable-accels")]
912    pub fn is_gtk_enable_accels(&self) -> bool {
913        ObjectExt::property(self, "gtk-enable-accels")
914    }
915
916    /// Whether menu items should have visible accelerators which can be
917    /// activated.
918    #[doc(alias = "gtk-enable-accels")]
919    pub fn set_gtk_enable_accels(&self, gtk_enable_accels: bool) {
920        ObjectExt::set_property(self, "gtk-enable-accels", gtk_enable_accels)
921    }
922
923    /// Whether to enable toolkit-wide animations.
924    #[doc(alias = "gtk-enable-animations")]
925    pub fn is_gtk_enable_animations(&self) -> bool {
926        ObjectExt::property(self, "gtk-enable-animations")
927    }
928
929    /// Whether to enable toolkit-wide animations.
930    #[doc(alias = "gtk-enable-animations")]
931    pub fn set_gtk_enable_animations(&self, gtk_enable_animations: bool) {
932        ObjectExt::set_property(self, "gtk-enable-animations", gtk_enable_animations)
933    }
934
935    /// Whether to play any event sounds at all.
936    ///
937    /// See the [Sound Theme Specifications](http://www.freedesktop.org/wiki/Specifications/sound-theme-spec)
938    /// for more information on event sounds and sound themes.
939    ///
940    /// GTK itself does not support event sounds, you have to use a loadable
941    /// module like the one that comes with libcanberra.
942    #[doc(alias = "gtk-enable-event-sounds")]
943    pub fn is_gtk_enable_event_sounds(&self) -> bool {
944        ObjectExt::property(self, "gtk-enable-event-sounds")
945    }
946
947    /// Whether to play any event sounds at all.
948    ///
949    /// See the [Sound Theme Specifications](http://www.freedesktop.org/wiki/Specifications/sound-theme-spec)
950    /// for more information on event sounds and sound themes.
951    ///
952    /// GTK itself does not support event sounds, you have to use a loadable
953    /// module like the one that comes with libcanberra.
954    #[doc(alias = "gtk-enable-event-sounds")]
955    pub fn set_gtk_enable_event_sounds(&self, gtk_enable_event_sounds: bool) {
956        ObjectExt::set_property(self, "gtk-enable-event-sounds", gtk_enable_event_sounds)
957    }
958
959    /// Whether to play event sounds as feedback to user input.
960    ///
961    /// See the [Sound Theme Specifications](http://www.freedesktop.org/wiki/Specifications/sound-theme-spec)
962    /// for more information on event sounds and sound themes.
963    ///
964    /// GTK itself does not support event sounds, you have to use a loadable
965    /// module like the one that comes with libcanberra.
966    #[doc(alias = "gtk-enable-input-feedback-sounds")]
967    pub fn is_gtk_enable_input_feedback_sounds(&self) -> bool {
968        ObjectExt::property(self, "gtk-enable-input-feedback-sounds")
969    }
970
971    /// Whether to play event sounds as feedback to user input.
972    ///
973    /// See the [Sound Theme Specifications](http://www.freedesktop.org/wiki/Specifications/sound-theme-spec)
974    /// for more information on event sounds and sound themes.
975    ///
976    /// GTK itself does not support event sounds, you have to use a loadable
977    /// module like the one that comes with libcanberra.
978    #[doc(alias = "gtk-enable-input-feedback-sounds")]
979    pub fn set_gtk_enable_input_feedback_sounds(&self, gtk_enable_input_feedback_sounds: bool) {
980        ObjectExt::set_property(
981            self,
982            "gtk-enable-input-feedback-sounds",
983            gtk_enable_input_feedback_sounds,
984        )
985    }
986
987    /// Whether a middle click on a mouse should paste the
988    /// 'PRIMARY' clipboard content at the cursor location.
989    #[doc(alias = "gtk-enable-primary-paste")]
990    pub fn is_gtk_enable_primary_paste(&self) -> bool {
991        ObjectExt::property(self, "gtk-enable-primary-paste")
992    }
993
994    /// Whether a middle click on a mouse should paste the
995    /// 'PRIMARY' clipboard content at the cursor location.
996    #[doc(alias = "gtk-enable-primary-paste")]
997    pub fn set_gtk_enable_primary_paste(&self, gtk_enable_primary_paste: bool) {
998        ObjectExt::set_property(self, "gtk-enable-primary-paste", gtk_enable_primary_paste)
999    }
1000
1001    /// How long to show the last input character in hidden
1002    /// entries.
1003    ///
1004    /// This value is in milliseconds. 0 disables showing the
1005    /// last char. 600 is a good value for enabling it.
1006    #[doc(alias = "gtk-entry-password-hint-timeout")]
1007    pub fn gtk_entry_password_hint_timeout(&self) -> u32 {
1008        ObjectExt::property(self, "gtk-entry-password-hint-timeout")
1009    }
1010
1011    /// How long to show the last input character in hidden
1012    /// entries.
1013    ///
1014    /// This value is in milliseconds. 0 disables showing the
1015    /// last char. 600 is a good value for enabling it.
1016    #[doc(alias = "gtk-entry-password-hint-timeout")]
1017    pub fn set_gtk_entry_password_hint_timeout(&self, gtk_entry_password_hint_timeout: u32) {
1018        ObjectExt::set_property(
1019            self,
1020            "gtk-entry-password-hint-timeout",
1021            gtk_entry_password_hint_timeout,
1022        )
1023    }
1024
1025    /// Whether to select the contents of an entry when it is focused.
1026    #[doc(alias = "gtk-entry-select-on-focus")]
1027    pub fn is_gtk_entry_select_on_focus(&self) -> bool {
1028        ObjectExt::property(self, "gtk-entry-select-on-focus")
1029    }
1030
1031    /// Whether to select the contents of an entry when it is focused.
1032    #[doc(alias = "gtk-entry-select-on-focus")]
1033    pub fn set_gtk_entry_select_on_focus(&self, gtk_entry_select_on_focus: bool) {
1034        ObjectExt::set_property(self, "gtk-entry-select-on-focus", gtk_entry_select_on_focus)
1035    }
1036
1037    /// When [`true`], keyboard navigation and other input-related errors
1038    /// will cause a beep.
1039    ///
1040    /// Since the error bell is implemented using gdk_surface_beep(), the
1041    /// windowing system may offer ways to configure the error bell in many
1042    /// ways, such as flashing the window or similar visual effects.
1043    #[doc(alias = "gtk-error-bell")]
1044    pub fn is_gtk_error_bell(&self) -> bool {
1045        ObjectExt::property(self, "gtk-error-bell")
1046    }
1047
1048    /// When [`true`], keyboard navigation and other input-related errors
1049    /// will cause a beep.
1050    ///
1051    /// Since the error bell is implemented using gdk_surface_beep(), the
1052    /// windowing system may offer ways to configure the error bell in many
1053    /// ways, such as flashing the window or similar visual effects.
1054    #[doc(alias = "gtk-error-bell")]
1055    pub fn set_gtk_error_bell(&self, gtk_error_bell: bool) {
1056        ObjectExt::set_property(self, "gtk-error-bell", gtk_error_bell)
1057    }
1058
1059    /// The default font to use.
1060    ///
1061    /// GTK uses the family name and size from this string.
1062    #[doc(alias = "gtk-font-name")]
1063    pub fn gtk_font_name(&self) -> Option<glib::GString> {
1064        ObjectExt::property(self, "gtk-font-name")
1065    }
1066
1067    /// The default font to use.
1068    ///
1069    /// GTK uses the family name and size from this string.
1070    #[doc(alias = "gtk-font-name")]
1071    pub fn set_gtk_font_name(&self, gtk_font_name: Option<&str>) {
1072        ObjectExt::set_property(self, "gtk-font-name", gtk_font_name)
1073    }
1074
1075    /// How GTK font rendering is set up.
1076    ///
1077    /// When set to [enum@Gtk.FontRendering.MANUAL], GTK respects the low-level
1078    /// font-related settings ([`gtk-hint-font-metrics`][struct@crate::Settings#gtk-hint-font-metrics],
1079    /// [`gtk-xft-antialias`][struct@crate::Settings#gtk-xft-antialias], [`gtk-xft-hinting`][struct@crate::Settings#gtk-xft-hinting],
1080    /// [`gtk-xft-hintstyle`][struct@crate::Settings#gtk-xft-hintstyle] and [`gtk-xft-rgba`][struct@crate::Settings#gtk-xft-rgba])
1081    /// as much as practical.
1082    ///
1083    /// When set to [enum@Gtk.FontRendering.AUTOMATIC], GTK will consider factors such
1084    /// as screen resolution and scale in deciding how to render fonts.
1085    #[cfg(feature = "v4_16")]
1086    #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))]
1087    #[doc(alias = "gtk-font-rendering")]
1088    pub fn gtk_font_rendering(&self) -> FontRendering {
1089        ObjectExt::property(self, "gtk-font-rendering")
1090    }
1091
1092    /// How GTK font rendering is set up.
1093    ///
1094    /// When set to [enum@Gtk.FontRendering.MANUAL], GTK respects the low-level
1095    /// font-related settings ([`gtk-hint-font-metrics`][struct@crate::Settings#gtk-hint-font-metrics],
1096    /// [`gtk-xft-antialias`][struct@crate::Settings#gtk-xft-antialias], [`gtk-xft-hinting`][struct@crate::Settings#gtk-xft-hinting],
1097    /// [`gtk-xft-hintstyle`][struct@crate::Settings#gtk-xft-hintstyle] and [`gtk-xft-rgba`][struct@crate::Settings#gtk-xft-rgba])
1098    /// as much as practical.
1099    ///
1100    /// When set to [enum@Gtk.FontRendering.AUTOMATIC], GTK will consider factors such
1101    /// as screen resolution and scale in deciding how to render fonts.
1102    #[cfg(feature = "v4_16")]
1103    #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))]
1104    #[doc(alias = "gtk-font-rendering")]
1105    pub fn set_gtk_font_rendering(&self, gtk_font_rendering: FontRendering) {
1106        ObjectExt::set_property(self, "gtk-font-rendering", gtk_font_rendering)
1107    }
1108
1109    /// Timestamp of the current fontconfig configuration.
1110    #[doc(alias = "gtk-fontconfig-timestamp")]
1111    pub fn gtk_fontconfig_timestamp(&self) -> u32 {
1112        ObjectExt::property(self, "gtk-fontconfig-timestamp")
1113    }
1114
1115    /// Timestamp of the current fontconfig configuration.
1116    #[doc(alias = "gtk-fontconfig-timestamp")]
1117    pub fn set_gtk_fontconfig_timestamp(&self, gtk_fontconfig_timestamp: u32) {
1118        ObjectExt::set_property(self, "gtk-fontconfig-timestamp", gtk_fontconfig_timestamp)
1119    }
1120
1121    /// Whether hinting should be applied to font metrics.
1122    ///
1123    /// Note that this also turns off subpixel positioning of glyphs,
1124    /// since it conflicts with metrics hinting.
1125    #[cfg(feature = "v4_6")]
1126    #[cfg_attr(docsrs, doc(cfg(feature = "v4_6")))]
1127    #[doc(alias = "gtk-hint-font-metrics")]
1128    pub fn is_gtk_hint_font_metrics(&self) -> bool {
1129        ObjectExt::property(self, "gtk-hint-font-metrics")
1130    }
1131
1132    /// Whether hinting should be applied to font metrics.
1133    ///
1134    /// Note that this also turns off subpixel positioning of glyphs,
1135    /// since it conflicts with metrics hinting.
1136    #[cfg(feature = "v4_6")]
1137    #[cfg_attr(docsrs, doc(cfg(feature = "v4_6")))]
1138    #[doc(alias = "gtk-hint-font-metrics")]
1139    pub fn set_gtk_hint_font_metrics(&self, gtk_hint_font_metrics: bool) {
1140        ObjectExt::set_property(self, "gtk-hint-font-metrics", gtk_hint_font_metrics)
1141    }
1142
1143    /// Name of the icon theme to use.
1144    ///
1145    /// See [`IconTheme`][crate::IconTheme] for details about how
1146    /// GTK handles icon themes.
1147    #[doc(alias = "gtk-icon-theme-name")]
1148    pub fn gtk_icon_theme_name(&self) -> Option<glib::GString> {
1149        ObjectExt::property(self, "gtk-icon-theme-name")
1150    }
1151
1152    /// Name of the icon theme to use.
1153    ///
1154    /// See [`IconTheme`][crate::IconTheme] for details about how
1155    /// GTK handles icon themes.
1156    #[doc(alias = "gtk-icon-theme-name")]
1157    pub fn set_gtk_icon_theme_name(&self, gtk_icon_theme_name: Option<&str>) {
1158        ObjectExt::set_property(self, "gtk-icon-theme-name", gtk_icon_theme_name)
1159    }
1160
1161    /// Which IM (input method) module should be used by default.
1162    ///
1163    /// This is the input method that will be used if the user has not
1164    /// explicitly chosen another input method from the IM context menu.
1165    /// This also can be a colon-separated list of input methods, which GTK
1166    /// will try in turn until it finds one available on the system.
1167    ///
1168    /// See [`IMContext`][crate::IMContext].
1169    #[doc(alias = "gtk-im-module")]
1170    pub fn gtk_im_module(&self) -> Option<glib::GString> {
1171        ObjectExt::property(self, "gtk-im-module")
1172    }
1173
1174    /// Which IM (input method) module should be used by default.
1175    ///
1176    /// This is the input method that will be used if the user has not
1177    /// explicitly chosen another input method from the IM context menu.
1178    /// This also can be a colon-separated list of input methods, which GTK
1179    /// will try in turn until it finds one available on the system.
1180    ///
1181    /// See [`IMContext`][crate::IMContext].
1182    #[doc(alias = "gtk-im-module")]
1183    pub fn set_gtk_im_module(&self, gtk_im_module: Option<&str>) {
1184        ObjectExt::set_property(self, "gtk-im-module", gtk_im_module)
1185    }
1186
1187    /// The color scheme used for rendering the user interface.
1188    ///
1189    /// This setting communicates the system-wide preference.
1190    /// The color scheme that is actually used when applying CSS
1191    /// styles can be set with the [`prefers-color-scheme`][struct@crate::CssProvider#prefers-color-scheme]
1192    /// property.
1193    #[cfg(feature = "v4_20")]
1194    #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))]
1195    #[doc(alias = "gtk-interface-color-scheme")]
1196    pub fn gtk_interface_color_scheme(&self) -> InterfaceColorScheme {
1197        ObjectExt::property(self, "gtk-interface-color-scheme")
1198    }
1199
1200    /// The color scheme used for rendering the user interface.
1201    ///
1202    /// This setting communicates the system-wide preference.
1203    /// The color scheme that is actually used when applying CSS
1204    /// styles can be set with the [`prefers-color-scheme`][struct@crate::CssProvider#prefers-color-scheme]
1205    /// property.
1206    #[cfg(feature = "v4_20")]
1207    #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))]
1208    #[doc(alias = "gtk-interface-color-scheme")]
1209    pub fn set_gtk_interface_color_scheme(&self, gtk_interface_color_scheme: InterfaceColorScheme) {
1210        ObjectExt::set_property(
1211            self,
1212            "gtk-interface-color-scheme",
1213            gtk_interface_color_scheme,
1214        )
1215    }
1216
1217    /// The level of contrast to use for the user interface.
1218    ///
1219    /// This setting communicates the system-wide preference.
1220    /// The contrast level that is actually used when applying CSS
1221    /// styles can be set with the [`prefers-contrast`][struct@crate::CssProvider#prefers-contrast]
1222    /// property.
1223    #[cfg(feature = "v4_20")]
1224    #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))]
1225    #[doc(alias = "gtk-interface-contrast")]
1226    pub fn gtk_interface_contrast(&self) -> InterfaceContrast {
1227        ObjectExt::property(self, "gtk-interface-contrast")
1228    }
1229
1230    /// The level of contrast to use for the user interface.
1231    ///
1232    /// This setting communicates the system-wide preference.
1233    /// The contrast level that is actually used when applying CSS
1234    /// styles can be set with the [`prefers-contrast`][struct@crate::CssProvider#prefers-contrast]
1235    /// property.
1236    #[cfg(feature = "v4_20")]
1237    #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))]
1238    #[doc(alias = "gtk-interface-contrast")]
1239    pub fn set_gtk_interface_contrast(&self, gtk_interface_contrast: InterfaceContrast) {
1240        ObjectExt::set_property(self, "gtk-interface-contrast", gtk_interface_contrast)
1241    }
1242
1243    /// Whether animations should be reduced to essential motions.
1244    ///
1245    /// This setting communicates the system-wide preference.
1246    /// The motion level that is actually used when applying CSS
1247    /// styles can be set with the [`prefers-reduced-motion`][struct@crate::CssProvider#prefers-reduced-motion]
1248    /// property.
1249    #[cfg(feature = "v4_22")]
1250    #[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))]
1251    #[doc(alias = "gtk-interface-reduced-motion")]
1252    pub fn gtk_interface_reduced_motion(&self) -> ReducedMotion {
1253        ObjectExt::property(self, "gtk-interface-reduced-motion")
1254    }
1255
1256    /// Whether animations should be reduced to essential motions.
1257    ///
1258    /// This setting communicates the system-wide preference.
1259    /// The motion level that is actually used when applying CSS
1260    /// styles can be set with the [`prefers-reduced-motion`][struct@crate::CssProvider#prefers-reduced-motion]
1261    /// property.
1262    #[cfg(feature = "v4_22")]
1263    #[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))]
1264    #[doc(alias = "gtk-interface-reduced-motion")]
1265    pub fn set_gtk_interface_reduced_motion(&self, gtk_interface_reduced_motion: ReducedMotion) {
1266        ObjectExt::set_property(
1267            self,
1268            "gtk-interface-reduced-motion",
1269            gtk_interface_reduced_motion,
1270        )
1271    }
1272
1273    /// Whether GTK should make sure that text can be navigated with
1274    /// a caret, even if it is not editable.
1275    ///
1276    /// This is useful when using a screen reader.
1277    #[doc(alias = "gtk-keynav-use-caret")]
1278    pub fn is_gtk_keynav_use_caret(&self) -> bool {
1279        ObjectExt::property(self, "gtk-keynav-use-caret")
1280    }
1281
1282    /// Whether GTK should make sure that text can be navigated with
1283    /// a caret, even if it is not editable.
1284    ///
1285    /// This is useful when using a screen reader.
1286    #[doc(alias = "gtk-keynav-use-caret")]
1287    pub fn set_gtk_keynav_use_caret(&self, gtk_keynav_use_caret: bool) {
1288        ObjectExt::set_property(self, "gtk-keynav-use-caret", gtk_keynav_use_caret)
1289    }
1290
1291    /// Whether to select the contents of a selectable
1292    /// label when it is focused.
1293    #[doc(alias = "gtk-label-select-on-focus")]
1294    pub fn is_gtk_label_select_on_focus(&self) -> bool {
1295        ObjectExt::property(self, "gtk-label-select-on-focus")
1296    }
1297
1298    /// Whether to select the contents of a selectable
1299    /// label when it is focused.
1300    #[doc(alias = "gtk-label-select-on-focus")]
1301    pub fn set_gtk_label_select_on_focus(&self, gtk_label_select_on_focus: bool) {
1302        ObjectExt::set_property(self, "gtk-label-select-on-focus", gtk_label_select_on_focus)
1303    }
1304
1305    /// .
1306    ///
1307    /// See [`GestureLongPress`][crate::GestureLongPress].
1308    #[doc(alias = "gtk-long-press-time")]
1309    pub fn gtk_long_press_time(&self) -> u32 {
1310        ObjectExt::property(self, "gtk-long-press-time")
1311    }
1312
1313    /// .
1314    ///
1315    /// See [`GestureLongPress`][crate::GestureLongPress].
1316    #[doc(alias = "gtk-long-press-time")]
1317    pub fn set_gtk_long_press_time(&self, gtk_long_press_time: u32) {
1318        ObjectExt::set_property(self, "gtk-long-press-time", gtk_long_press_time)
1319    }
1320
1321    /// Whether scrolled windows may use overlaid scrolling indicators.
1322    ///
1323    /// If this is set to [`false`], scrolled windows will have permanent
1324    /// scrollbars.
1325    #[doc(alias = "gtk-overlay-scrolling")]
1326    pub fn is_gtk_overlay_scrolling(&self) -> bool {
1327        ObjectExt::property(self, "gtk-overlay-scrolling")
1328    }
1329
1330    /// Whether scrolled windows may use overlaid scrolling indicators.
1331    ///
1332    /// If this is set to [`false`], scrolled windows will have permanent
1333    /// scrollbars.
1334    #[doc(alias = "gtk-overlay-scrolling")]
1335    pub fn set_gtk_overlay_scrolling(&self, gtk_overlay_scrolling: bool) {
1336        ObjectExt::set_property(self, "gtk-overlay-scrolling", gtk_overlay_scrolling)
1337    }
1338
1339    /// s page-size towards the point clicked.
1340    ///
1341    /// Whichever action you choose for the primary button, the other action will
1342    /// be available by holding Shift and primary-clicking, or clicking the middle
1343    /// mouse button.
1344    #[doc(alias = "gtk-primary-button-warps-slider")]
1345    pub fn is_gtk_primary_button_warps_slider(&self) -> bool {
1346        ObjectExt::property(self, "gtk-primary-button-warps-slider")
1347    }
1348
1349    /// s page-size towards the point clicked.
1350    ///
1351    /// Whichever action you choose for the primary button, the other action will
1352    /// be available by holding Shift and primary-clicking, or clicking the middle
1353    /// mouse button.
1354    #[doc(alias = "gtk-primary-button-warps-slider")]
1355    pub fn set_gtk_primary_button_warps_slider(&self, gtk_primary_button_warps_slider: bool) {
1356        ObjectExt::set_property(
1357            self,
1358            "gtk-primary-button-warps-slider",
1359            gtk_primary_button_warps_slider,
1360        )
1361    }
1362
1363    /// A comma-separated list of print backends to use in the print
1364    /// dialog.
1365    ///
1366    /// Available print backends depend on the GTK installation,
1367    /// and may include "file", "cups", "lpr" or "papi".
1368    #[doc(alias = "gtk-print-backends")]
1369    pub fn gtk_print_backends(&self) -> Option<glib::GString> {
1370        ObjectExt::property(self, "gtk-print-backends")
1371    }
1372
1373    /// A comma-separated list of print backends to use in the print
1374    /// dialog.
1375    ///
1376    /// Available print backends depend on the GTK installation,
1377    /// and may include "file", "cups", "lpr" or "papi".
1378    #[doc(alias = "gtk-print-backends")]
1379    pub fn set_gtk_print_backends(&self, gtk_print_backends: Option<&str>) {
1380        ObjectExt::set_property(self, "gtk-print-backends", gtk_print_backends)
1381    }
1382
1383    /// A command to run for displaying the print preview.
1384    ///
1385    /// The command should contain a ``f`` placeholder, which will get
1386    /// replaced by the path to the pdf file. The command may also
1387    /// contain a ``s`` placeholder, which will get replaced by the
1388    /// path to a file containing the print settings in the format
1389    /// produced by [`PrintSettings::to_file()`][crate::PrintSettings::to_file()].
1390    ///
1391    /// The preview application is responsible for removing the pdf
1392    /// file and the print settings file when it is done.
1393    #[doc(alias = "gtk-print-preview-command")]
1394    pub fn gtk_print_preview_command(&self) -> Option<glib::GString> {
1395        ObjectExt::property(self, "gtk-print-preview-command")
1396    }
1397
1398    /// A command to run for displaying the print preview.
1399    ///
1400    /// The command should contain a ``f`` placeholder, which will get
1401    /// replaced by the path to the pdf file. The command may also
1402    /// contain a ``s`` placeholder, which will get replaced by the
1403    /// path to a file containing the print settings in the format
1404    /// produced by [`PrintSettings::to_file()`][crate::PrintSettings::to_file()].
1405    ///
1406    /// The preview application is responsible for removing the pdf
1407    /// file and the print settings file when it is done.
1408    #[doc(alias = "gtk-print-preview-command")]
1409    pub fn set_gtk_print_preview_command(&self, gtk_print_preview_command: Option<&str>) {
1410        ObjectExt::set_property(self, "gtk-print-preview-command", gtk_print_preview_command)
1411    }
1412
1413    /// Whether GTK should keep track of items inside the recently used
1414    /// resources list.
1415    ///
1416    /// If set to [`false`], the list will always be empty.
1417    #[doc(alias = "gtk-recent-files-enabled")]
1418    pub fn is_gtk_recent_files_enabled(&self) -> bool {
1419        ObjectExt::property(self, "gtk-recent-files-enabled")
1420    }
1421
1422    /// Whether GTK should keep track of items inside the recently used
1423    /// resources list.
1424    ///
1425    /// If set to [`false`], the list will always be empty.
1426    #[doc(alias = "gtk-recent-files-enabled")]
1427    pub fn set_gtk_recent_files_enabled(&self, gtk_recent_files_enabled: bool) {
1428        ObjectExt::set_property(self, "gtk-recent-files-enabled", gtk_recent_files_enabled)
1429    }
1430
1431    /// The maximum age, in days, of the items inside the recently used
1432    /// resources list.
1433    ///
1434    /// Items older than this setting will be excised from the list.
1435    /// If set to 0, the list will always be empty; if set to -1, no
1436    /// item will be removed.
1437    #[doc(alias = "gtk-recent-files-max-age")]
1438    pub fn gtk_recent_files_max_age(&self) -> i32 {
1439        ObjectExt::property(self, "gtk-recent-files-max-age")
1440    }
1441
1442    /// The maximum age, in days, of the items inside the recently used
1443    /// resources list.
1444    ///
1445    /// Items older than this setting will be excised from the list.
1446    /// If set to 0, the list will always be empty; if set to -1, no
1447    /// item will be removed.
1448    #[doc(alias = "gtk-recent-files-max-age")]
1449    pub fn set_gtk_recent_files_max_age(&self, gtk_recent_files_max_age: i32) {
1450        ObjectExt::set_property(self, "gtk-recent-files-max-age", gtk_recent_files_max_age)
1451    }
1452
1453    /// Set to [`true`] if the desktop environment is displaying
1454    /// the app menu, [`false`] if the app should display it itself.
1455    ///
1456    /// # Deprecated since 4.20
1457    ///
1458    /// This setting is not relevant anymore
1459    #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")]
1460    #[doc(alias = "gtk-shell-shows-app-menu")]
1461    pub fn is_gtk_shell_shows_app_menu(&self) -> bool {
1462        ObjectExt::property(self, "gtk-shell-shows-app-menu")
1463    }
1464
1465    /// Set to [`true`] if the desktop environment is displaying
1466    /// the app menu, [`false`] if the app should display it itself.
1467    ///
1468    /// # Deprecated since 4.20
1469    ///
1470    /// This setting is not relevant anymore
1471    #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")]
1472    #[doc(alias = "gtk-shell-shows-app-menu")]
1473    pub fn set_gtk_shell_shows_app_menu(&self, gtk_shell_shows_app_menu: bool) {
1474        ObjectExt::set_property(self, "gtk-shell-shows-app-menu", gtk_shell_shows_app_menu)
1475    }
1476
1477    /// Set to [`true`] if the desktop environment is displaying
1478    /// the desktop folder, [`false`] if not.
1479    ///
1480    /// # Deprecated since 4.20
1481    ///
1482    /// This setting is not relevant anymore
1483    #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")]
1484    #[doc(alias = "gtk-shell-shows-desktop")]
1485    pub fn is_gtk_shell_shows_desktop(&self) -> bool {
1486        ObjectExt::property(self, "gtk-shell-shows-desktop")
1487    }
1488
1489    /// Set to [`true`] if the desktop environment is displaying
1490    /// the desktop folder, [`false`] if not.
1491    ///
1492    /// # Deprecated since 4.20
1493    ///
1494    /// This setting is not relevant anymore
1495    #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")]
1496    #[doc(alias = "gtk-shell-shows-desktop")]
1497    pub fn set_gtk_shell_shows_desktop(&self, gtk_shell_shows_desktop: bool) {
1498        ObjectExt::set_property(self, "gtk-shell-shows-desktop", gtk_shell_shows_desktop)
1499    }
1500
1501    /// Set to [`true`] if the desktop environment is displaying
1502    /// the menubar, [`false`] if the app should display it itself.
1503    ///
1504    /// # Deprecated since 4.20
1505    ///
1506    /// This setting is not relevant anymore
1507    #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")]
1508    #[doc(alias = "gtk-shell-shows-menubar")]
1509    pub fn is_gtk_shell_shows_menubar(&self) -> bool {
1510        ObjectExt::property(self, "gtk-shell-shows-menubar")
1511    }
1512
1513    /// Set to [`true`] if the desktop environment is displaying
1514    /// the menubar, [`false`] if the app should display it itself.
1515    ///
1516    /// # Deprecated since 4.20
1517    ///
1518    /// This setting is not relevant anymore
1519    #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")]
1520    #[doc(alias = "gtk-shell-shows-menubar")]
1521    pub fn set_gtk_shell_shows_menubar(&self, gtk_shell_shows_menubar: bool) {
1522        ObjectExt::set_property(self, "gtk-shell-shows-menubar", gtk_shell_shows_menubar)
1523    }
1524
1525    /// When [`true`], widgets like switches include shapes to indicate their on/off state.
1526    #[cfg(feature = "v4_14")]
1527    #[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
1528    #[doc(alias = "gtk-show-status-shapes")]
1529    pub fn is_gtk_show_status_shapes(&self) -> bool {
1530        ObjectExt::property(self, "gtk-show-status-shapes")
1531    }
1532
1533    /// When [`true`], widgets like switches include shapes to indicate their on/off state.
1534    #[cfg(feature = "v4_14")]
1535    #[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
1536    #[doc(alias = "gtk-show-status-shapes")]
1537    pub fn set_gtk_show_status_shapes(&self, gtk_show_status_shapes: bool) {
1538        ObjectExt::set_property(self, "gtk-show-status-shapes", gtk_show_status_shapes)
1539    }
1540
1541    /// The XDG sound theme to use for event sounds.
1542    ///
1543    /// See the [Sound Theme Specifications](http://www.freedesktop.org/wiki/Specifications/sound-theme-spec)
1544    /// for more information on event sounds and sound themes.
1545    ///
1546    /// GTK itself does not support event sounds, you have to use
1547    /// a loadable module like the one that comes with libcanberra.
1548    #[doc(alias = "gtk-sound-theme-name")]
1549    pub fn gtk_sound_theme_name(&self) -> Option<glib::GString> {
1550        ObjectExt::property(self, "gtk-sound-theme-name")
1551    }
1552
1553    /// The XDG sound theme to use for event sounds.
1554    ///
1555    /// See the [Sound Theme Specifications](http://www.freedesktop.org/wiki/Specifications/sound-theme-spec)
1556    /// for more information on event sounds and sound themes.
1557    ///
1558    /// GTK itself does not support event sounds, you have to use
1559    /// a loadable module like the one that comes with libcanberra.
1560    #[doc(alias = "gtk-sound-theme-name")]
1561    pub fn set_gtk_sound_theme_name(&self, gtk_sound_theme_name: Option<&str>) {
1562        ObjectExt::set_property(self, "gtk-sound-theme-name", gtk_sound_theme_name)
1563    }
1564
1565    /// Whether two cursors should be displayed for mixed left-to-right and
1566    /// right-to-left text.
1567    #[doc(alias = "gtk-split-cursor")]
1568    pub fn is_gtk_split_cursor(&self) -> bool {
1569        ObjectExt::property(self, "gtk-split-cursor")
1570    }
1571
1572    /// Whether two cursors should be displayed for mixed left-to-right and
1573    /// right-to-left text.
1574    #[doc(alias = "gtk-split-cursor")]
1575    pub fn set_gtk_split_cursor(&self, gtk_split_cursor: bool) {
1576        ObjectExt::set_property(self, "gtk-split-cursor", gtk_split_cursor)
1577    }
1578
1579    /// Name of the theme to load.
1580    ///
1581    /// See [`CssProvider`][crate::CssProvider] for details about how
1582    /// GTK finds the CSS stylesheet for a theme.
1583    #[doc(alias = "gtk-theme-name")]
1584    pub fn gtk_theme_name(&self) -> Option<glib::GString> {
1585        ObjectExt::property(self, "gtk-theme-name")
1586    }
1587
1588    /// Name of the theme to load.
1589    ///
1590    /// See [`CssProvider`][crate::CssProvider] for details about how
1591    /// GTK finds the CSS stylesheet for a theme.
1592    #[doc(alias = "gtk-theme-name")]
1593    pub fn set_gtk_theme_name(&self, gtk_theme_name: Option<&str>) {
1594        ObjectExt::set_property(self, "gtk-theme-name", gtk_theme_name)
1595    }
1596
1597    /// Determines the action to take when a double-click
1598    /// occurs on the titlebar of client-side decorated windows.
1599    ///
1600    /// Recognized actions are minimize, toggle-maximize, menu, lower
1601    /// or none.
1602    #[doc(alias = "gtk-titlebar-double-click")]
1603    pub fn gtk_titlebar_double_click(&self) -> Option<glib::GString> {
1604        ObjectExt::property(self, "gtk-titlebar-double-click")
1605    }
1606
1607    /// Determines the action to take when a double-click
1608    /// occurs on the titlebar of client-side decorated windows.
1609    ///
1610    /// Recognized actions are minimize, toggle-maximize, menu, lower
1611    /// or none.
1612    #[doc(alias = "gtk-titlebar-double-click")]
1613    pub fn set_gtk_titlebar_double_click(&self, gtk_titlebar_double_click: Option<&str>) {
1614        ObjectExt::set_property(self, "gtk-titlebar-double-click", gtk_titlebar_double_click)
1615    }
1616
1617    /// Determines the action to take when a middle-click
1618    /// occurs on the titlebar of client-side decorated windows.
1619    ///
1620    /// Recognized actions are minimize, toggle-maximize, menu, lower
1621    /// or none.
1622    #[doc(alias = "gtk-titlebar-middle-click")]
1623    pub fn gtk_titlebar_middle_click(&self) -> Option<glib::GString> {
1624        ObjectExt::property(self, "gtk-titlebar-middle-click")
1625    }
1626
1627    /// Determines the action to take when a middle-click
1628    /// occurs on the titlebar of client-side decorated windows.
1629    ///
1630    /// Recognized actions are minimize, toggle-maximize, menu, lower
1631    /// or none.
1632    #[doc(alias = "gtk-titlebar-middle-click")]
1633    pub fn set_gtk_titlebar_middle_click(&self, gtk_titlebar_middle_click: Option<&str>) {
1634        ObjectExt::set_property(self, "gtk-titlebar-middle-click", gtk_titlebar_middle_click)
1635    }
1636
1637    /// Determines the action to take when a right-click
1638    /// occurs on the titlebar of client-side decorated windows.
1639    ///
1640    /// Recognized actions are minimize, toggle-maximize, menu, lower
1641    /// or none.
1642    #[doc(alias = "gtk-titlebar-right-click")]
1643    pub fn gtk_titlebar_right_click(&self) -> Option<glib::GString> {
1644        ObjectExt::property(self, "gtk-titlebar-right-click")
1645    }
1646
1647    /// Determines the action to take when a right-click
1648    /// occurs on the titlebar of client-side decorated windows.
1649    ///
1650    /// Recognized actions are minimize, toggle-maximize, menu, lower
1651    /// or none.
1652    #[doc(alias = "gtk-titlebar-right-click")]
1653    pub fn set_gtk_titlebar_right_click(&self, gtk_titlebar_right_click: Option<&str>) {
1654        ObjectExt::set_property(self, "gtk-titlebar-right-click", gtk_titlebar_right_click)
1655    }
1656
1657    /// Whether to antialias fonts.
1658    ///
1659    /// The values are 0 for no, 1 for yes, or -1 for the system default.
1660    #[doc(alias = "gtk-xft-antialias")]
1661    pub fn gtk_xft_antialias(&self) -> i32 {
1662        ObjectExt::property(self, "gtk-xft-antialias")
1663    }
1664
1665    /// Whether to antialias fonts.
1666    ///
1667    /// The values are 0 for no, 1 for yes, or -1 for the system default.
1668    #[doc(alias = "gtk-xft-antialias")]
1669    pub fn set_gtk_xft_antialias(&self, gtk_xft_antialias: i32) {
1670        ObjectExt::set_property(self, "gtk-xft-antialias", gtk_xft_antialias)
1671    }
1672
1673    /// The font resolution, in 1024 * dots/inch.
1674    ///
1675    /// -1 to use the default value.
1676    #[doc(alias = "gtk-xft-dpi")]
1677    pub fn gtk_xft_dpi(&self) -> i32 {
1678        ObjectExt::property(self, "gtk-xft-dpi")
1679    }
1680
1681    /// The font resolution, in 1024 * dots/inch.
1682    ///
1683    /// -1 to use the default value.
1684    #[doc(alias = "gtk-xft-dpi")]
1685    pub fn set_gtk_xft_dpi(&self, gtk_xft_dpi: i32) {
1686        ObjectExt::set_property(self, "gtk-xft-dpi", gtk_xft_dpi)
1687    }
1688
1689    /// Whether to enable font hinting.
1690    ///
1691    /// The values are 0 for no, 1 for yes, or -1 for the system default.
1692    #[doc(alias = "gtk-xft-hinting")]
1693    pub fn gtk_xft_hinting(&self) -> i32 {
1694        ObjectExt::property(self, "gtk-xft-hinting")
1695    }
1696
1697    /// Whether to enable font hinting.
1698    ///
1699    /// The values are 0 for no, 1 for yes, or -1 for the system default.
1700    #[doc(alias = "gtk-xft-hinting")]
1701    pub fn set_gtk_xft_hinting(&self, gtk_xft_hinting: i32) {
1702        ObjectExt::set_property(self, "gtk-xft-hinting", gtk_xft_hinting)
1703    }
1704
1705    /// What degree of font hinting to use.
1706    ///
1707    /// The possible vaues are hintnone, hintslight,
1708    /// hintmedium, hintfull.
1709    #[doc(alias = "gtk-xft-hintstyle")]
1710    pub fn gtk_xft_hintstyle(&self) -> Option<glib::GString> {
1711        ObjectExt::property(self, "gtk-xft-hintstyle")
1712    }
1713
1714    /// What degree of font hinting to use.
1715    ///
1716    /// The possible vaues are hintnone, hintslight,
1717    /// hintmedium, hintfull.
1718    #[doc(alias = "gtk-xft-hintstyle")]
1719    pub fn set_gtk_xft_hintstyle(&self, gtk_xft_hintstyle: Option<&str>) {
1720        ObjectExt::set_property(self, "gtk-xft-hintstyle", gtk_xft_hintstyle)
1721    }
1722
1723    /// The type of subpixel antialiasing to use.
1724    ///
1725    /// The possible values are none, rgb, bgr, vrgb, vbgr.
1726    ///
1727    /// Note that GSK does not support subpixel antialiasing, and this
1728    /// setting has no effect on font rendering in GTK.
1729    #[doc(alias = "gtk-xft-rgba")]
1730    pub fn gtk_xft_rgba(&self) -> Option<glib::GString> {
1731        ObjectExt::property(self, "gtk-xft-rgba")
1732    }
1733
1734    /// The type of subpixel antialiasing to use.
1735    ///
1736    /// The possible values are none, rgb, bgr, vrgb, vbgr.
1737    ///
1738    /// Note that GSK does not support subpixel antialiasing, and this
1739    /// setting has no effect on font rendering in GTK.
1740    #[doc(alias = "gtk-xft-rgba")]
1741    pub fn set_gtk_xft_rgba(&self, gtk_xft_rgba: Option<&str>) {
1742        ObjectExt::set_property(self, "gtk-xft-rgba", gtk_xft_rgba)
1743    }
1744
1745    /// Gets the [`Settings`][crate::Settings] object for the default display, creating
1746    /// it if necessary.
1747    ///
1748    /// See [`for_display()`][Self::for_display()].
1749    ///
1750    /// # Returns
1751    ///
1752    /// a [`Settings`][crate::Settings] object. If there is
1753    ///   no default display, then returns [`None`].
1754    #[doc(alias = "gtk_settings_get_default")]
1755    #[doc(alias = "get_default")]
1756    #[allow(clippy::should_implement_trait)]
1757    pub fn default() -> Option<Settings> {
1758        assert_initialized_main_thread!();
1759        unsafe { from_glib_none(ffi::gtk_settings_get_default()) }
1760    }
1761
1762    /// Gets the [`Settings`][crate::Settings] object for @display, creating it if necessary.
1763    /// ## `display`
1764    /// a [`gdk::Display`][crate::gdk::Display]
1765    ///
1766    /// # Returns
1767    ///
1768    /// a [`Settings`][crate::Settings] object
1769    #[doc(alias = "gtk_settings_get_for_display")]
1770    #[doc(alias = "get_for_display")]
1771    pub fn for_display(display: &impl IsA<gdk::Display>) -> Settings {
1772        assert_initialized_main_thread!();
1773        unsafe {
1774            from_glib_none(ffi::gtk_settings_get_for_display(
1775                display.as_ref().to_glib_none().0,
1776            ))
1777        }
1778    }
1779
1780    #[doc(alias = "gtk-alternative-button-order")]
1781    pub fn connect_gtk_alternative_button_order_notify<F: Fn(&Self) + 'static>(
1782        &self,
1783        f: F,
1784    ) -> SignalHandlerId {
1785        unsafe extern "C" fn notify_gtk_alternative_button_order_trampoline<
1786            F: Fn(&Settings) + 'static,
1787        >(
1788            this: *mut ffi::GtkSettings,
1789            _param_spec: glib::ffi::gpointer,
1790            f: glib::ffi::gpointer,
1791        ) {
1792            unsafe {
1793                let f: &F = &*(f as *const F);
1794                f(&from_glib_borrow(this))
1795            }
1796        }
1797        unsafe {
1798            let f: Box_<F> = Box_::new(f);
1799            connect_raw(
1800                self.as_ptr() as *mut _,
1801                c"notify::gtk-alternative-button-order".as_ptr(),
1802                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1803                    notify_gtk_alternative_button_order_trampoline::<F> as *const (),
1804                )),
1805                Box_::into_raw(f),
1806            )
1807        }
1808    }
1809
1810    #[doc(alias = "gtk-alternative-sort-arrows")]
1811    pub fn connect_gtk_alternative_sort_arrows_notify<F: Fn(&Self) + 'static>(
1812        &self,
1813        f: F,
1814    ) -> SignalHandlerId {
1815        unsafe extern "C" fn notify_gtk_alternative_sort_arrows_trampoline<
1816            F: Fn(&Settings) + 'static,
1817        >(
1818            this: *mut ffi::GtkSettings,
1819            _param_spec: glib::ffi::gpointer,
1820            f: glib::ffi::gpointer,
1821        ) {
1822            unsafe {
1823                let f: &F = &*(f as *const F);
1824                f(&from_glib_borrow(this))
1825            }
1826        }
1827        unsafe {
1828            let f: Box_<F> = Box_::new(f);
1829            connect_raw(
1830                self.as_ptr() as *mut _,
1831                c"notify::gtk-alternative-sort-arrows".as_ptr(),
1832                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1833                    notify_gtk_alternative_sort_arrows_trampoline::<F> as *const (),
1834                )),
1835                Box_::into_raw(f),
1836            )
1837        }
1838    }
1839
1840    #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")]
1841    #[doc(alias = "gtk-application-prefer-dark-theme")]
1842    pub fn connect_gtk_application_prefer_dark_theme_notify<F: Fn(&Self) + 'static>(
1843        &self,
1844        f: F,
1845    ) -> SignalHandlerId {
1846        unsafe extern "C" fn notify_gtk_application_prefer_dark_theme_trampoline<
1847            F: Fn(&Settings) + 'static,
1848        >(
1849            this: *mut ffi::GtkSettings,
1850            _param_spec: glib::ffi::gpointer,
1851            f: glib::ffi::gpointer,
1852        ) {
1853            unsafe {
1854                let f: &F = &*(f as *const F);
1855                f(&from_glib_borrow(this))
1856            }
1857        }
1858        unsafe {
1859            let f: Box_<F> = Box_::new(f);
1860            connect_raw(
1861                self.as_ptr() as *mut _,
1862                c"notify::gtk-application-prefer-dark-theme".as_ptr(),
1863                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1864                    notify_gtk_application_prefer_dark_theme_trampoline::<F> as *const (),
1865                )),
1866                Box_::into_raw(f),
1867            )
1868        }
1869    }
1870
1871    #[doc(alias = "gtk-cursor-aspect-ratio")]
1872    pub fn connect_gtk_cursor_aspect_ratio_notify<F: Fn(&Self) + 'static>(
1873        &self,
1874        f: F,
1875    ) -> SignalHandlerId {
1876        unsafe extern "C" fn notify_gtk_cursor_aspect_ratio_trampoline<
1877            F: Fn(&Settings) + 'static,
1878        >(
1879            this: *mut ffi::GtkSettings,
1880            _param_spec: glib::ffi::gpointer,
1881            f: glib::ffi::gpointer,
1882        ) {
1883            unsafe {
1884                let f: &F = &*(f as *const F);
1885                f(&from_glib_borrow(this))
1886            }
1887        }
1888        unsafe {
1889            let f: Box_<F> = Box_::new(f);
1890            connect_raw(
1891                self.as_ptr() as *mut _,
1892                c"notify::gtk-cursor-aspect-ratio".as_ptr(),
1893                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1894                    notify_gtk_cursor_aspect_ratio_trampoline::<F> as *const (),
1895                )),
1896                Box_::into_raw(f),
1897            )
1898        }
1899    }
1900
1901    #[doc(alias = "gtk-cursor-blink")]
1902    pub fn connect_gtk_cursor_blink_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1903        unsafe extern "C" fn notify_gtk_cursor_blink_trampoline<F: Fn(&Settings) + 'static>(
1904            this: *mut ffi::GtkSettings,
1905            _param_spec: glib::ffi::gpointer,
1906            f: glib::ffi::gpointer,
1907        ) {
1908            unsafe {
1909                let f: &F = &*(f as *const F);
1910                f(&from_glib_borrow(this))
1911            }
1912        }
1913        unsafe {
1914            let f: Box_<F> = Box_::new(f);
1915            connect_raw(
1916                self.as_ptr() as *mut _,
1917                c"notify::gtk-cursor-blink".as_ptr(),
1918                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1919                    notify_gtk_cursor_blink_trampoline::<F> as *const (),
1920                )),
1921                Box_::into_raw(f),
1922            )
1923        }
1924    }
1925
1926    #[doc(alias = "gtk-cursor-blink-time")]
1927    pub fn connect_gtk_cursor_blink_time_notify<F: Fn(&Self) + 'static>(
1928        &self,
1929        f: F,
1930    ) -> SignalHandlerId {
1931        unsafe extern "C" fn notify_gtk_cursor_blink_time_trampoline<F: Fn(&Settings) + 'static>(
1932            this: *mut ffi::GtkSettings,
1933            _param_spec: glib::ffi::gpointer,
1934            f: glib::ffi::gpointer,
1935        ) {
1936            unsafe {
1937                let f: &F = &*(f as *const F);
1938                f(&from_glib_borrow(this))
1939            }
1940        }
1941        unsafe {
1942            let f: Box_<F> = Box_::new(f);
1943            connect_raw(
1944                self.as_ptr() as *mut _,
1945                c"notify::gtk-cursor-blink-time".as_ptr(),
1946                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1947                    notify_gtk_cursor_blink_time_trampoline::<F> as *const (),
1948                )),
1949                Box_::into_raw(f),
1950            )
1951        }
1952    }
1953
1954    #[doc(alias = "gtk-cursor-blink-timeout")]
1955    pub fn connect_gtk_cursor_blink_timeout_notify<F: Fn(&Self) + 'static>(
1956        &self,
1957        f: F,
1958    ) -> SignalHandlerId {
1959        unsafe extern "C" fn notify_gtk_cursor_blink_timeout_trampoline<
1960            F: Fn(&Settings) + 'static,
1961        >(
1962            this: *mut ffi::GtkSettings,
1963            _param_spec: glib::ffi::gpointer,
1964            f: glib::ffi::gpointer,
1965        ) {
1966            unsafe {
1967                let f: &F = &*(f as *const F);
1968                f(&from_glib_borrow(this))
1969            }
1970        }
1971        unsafe {
1972            let f: Box_<F> = Box_::new(f);
1973            connect_raw(
1974                self.as_ptr() as *mut _,
1975                c"notify::gtk-cursor-blink-timeout".as_ptr(),
1976                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1977                    notify_gtk_cursor_blink_timeout_trampoline::<F> as *const (),
1978                )),
1979                Box_::into_raw(f),
1980            )
1981        }
1982    }
1983
1984    #[doc(alias = "gtk-cursor-theme-name")]
1985    pub fn connect_gtk_cursor_theme_name_notify<F: Fn(&Self) + 'static>(
1986        &self,
1987        f: F,
1988    ) -> SignalHandlerId {
1989        unsafe extern "C" fn notify_gtk_cursor_theme_name_trampoline<F: Fn(&Settings) + 'static>(
1990            this: *mut ffi::GtkSettings,
1991            _param_spec: glib::ffi::gpointer,
1992            f: glib::ffi::gpointer,
1993        ) {
1994            unsafe {
1995                let f: &F = &*(f as *const F);
1996                f(&from_glib_borrow(this))
1997            }
1998        }
1999        unsafe {
2000            let f: Box_<F> = Box_::new(f);
2001            connect_raw(
2002                self.as_ptr() as *mut _,
2003                c"notify::gtk-cursor-theme-name".as_ptr(),
2004                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2005                    notify_gtk_cursor_theme_name_trampoline::<F> as *const (),
2006                )),
2007                Box_::into_raw(f),
2008            )
2009        }
2010    }
2011
2012    #[doc(alias = "gtk-cursor-theme-size")]
2013    pub fn connect_gtk_cursor_theme_size_notify<F: Fn(&Self) + 'static>(
2014        &self,
2015        f: F,
2016    ) -> SignalHandlerId {
2017        unsafe extern "C" fn notify_gtk_cursor_theme_size_trampoline<F: Fn(&Settings) + 'static>(
2018            this: *mut ffi::GtkSettings,
2019            _param_spec: glib::ffi::gpointer,
2020            f: glib::ffi::gpointer,
2021        ) {
2022            unsafe {
2023                let f: &F = &*(f as *const F);
2024                f(&from_glib_borrow(this))
2025            }
2026        }
2027        unsafe {
2028            let f: Box_<F> = Box_::new(f);
2029            connect_raw(
2030                self.as_ptr() as *mut _,
2031                c"notify::gtk-cursor-theme-size".as_ptr(),
2032                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2033                    notify_gtk_cursor_theme_size_trampoline::<F> as *const (),
2034                )),
2035                Box_::into_raw(f),
2036            )
2037        }
2038    }
2039
2040    #[doc(alias = "gtk-decoration-layout")]
2041    pub fn connect_gtk_decoration_layout_notify<F: Fn(&Self) + 'static>(
2042        &self,
2043        f: F,
2044    ) -> SignalHandlerId {
2045        unsafe extern "C" fn notify_gtk_decoration_layout_trampoline<F: Fn(&Settings) + 'static>(
2046            this: *mut ffi::GtkSettings,
2047            _param_spec: glib::ffi::gpointer,
2048            f: glib::ffi::gpointer,
2049        ) {
2050            unsafe {
2051                let f: &F = &*(f as *const F);
2052                f(&from_glib_borrow(this))
2053            }
2054        }
2055        unsafe {
2056            let f: Box_<F> = Box_::new(f);
2057            connect_raw(
2058                self.as_ptr() as *mut _,
2059                c"notify::gtk-decoration-layout".as_ptr(),
2060                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2061                    notify_gtk_decoration_layout_trampoline::<F> as *const (),
2062                )),
2063                Box_::into_raw(f),
2064            )
2065        }
2066    }
2067
2068    #[doc(alias = "gtk-dialogs-use-header")]
2069    pub fn connect_gtk_dialogs_use_header_notify<F: Fn(&Self) + 'static>(
2070        &self,
2071        f: F,
2072    ) -> SignalHandlerId {
2073        unsafe extern "C" fn notify_gtk_dialogs_use_header_trampoline<
2074            F: Fn(&Settings) + 'static,
2075        >(
2076            this: *mut ffi::GtkSettings,
2077            _param_spec: glib::ffi::gpointer,
2078            f: glib::ffi::gpointer,
2079        ) {
2080            unsafe {
2081                let f: &F = &*(f as *const F);
2082                f(&from_glib_borrow(this))
2083            }
2084        }
2085        unsafe {
2086            let f: Box_<F> = Box_::new(f);
2087            connect_raw(
2088                self.as_ptr() as *mut _,
2089                c"notify::gtk-dialogs-use-header".as_ptr(),
2090                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2091                    notify_gtk_dialogs_use_header_trampoline::<F> as *const (),
2092                )),
2093                Box_::into_raw(f),
2094            )
2095        }
2096    }
2097
2098    #[doc(alias = "gtk-dnd-drag-threshold")]
2099    pub fn connect_gtk_dnd_drag_threshold_notify<F: Fn(&Self) + 'static>(
2100        &self,
2101        f: F,
2102    ) -> SignalHandlerId {
2103        unsafe extern "C" fn notify_gtk_dnd_drag_threshold_trampoline<
2104            F: Fn(&Settings) + 'static,
2105        >(
2106            this: *mut ffi::GtkSettings,
2107            _param_spec: glib::ffi::gpointer,
2108            f: glib::ffi::gpointer,
2109        ) {
2110            unsafe {
2111                let f: &F = &*(f as *const F);
2112                f(&from_glib_borrow(this))
2113            }
2114        }
2115        unsafe {
2116            let f: Box_<F> = Box_::new(f);
2117            connect_raw(
2118                self.as_ptr() as *mut _,
2119                c"notify::gtk-dnd-drag-threshold".as_ptr(),
2120                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2121                    notify_gtk_dnd_drag_threshold_trampoline::<F> as *const (),
2122                )),
2123                Box_::into_raw(f),
2124            )
2125        }
2126    }
2127
2128    #[doc(alias = "gtk-double-click-distance")]
2129    pub fn connect_gtk_double_click_distance_notify<F: Fn(&Self) + 'static>(
2130        &self,
2131        f: F,
2132    ) -> SignalHandlerId {
2133        unsafe extern "C" fn notify_gtk_double_click_distance_trampoline<
2134            F: Fn(&Settings) + 'static,
2135        >(
2136            this: *mut ffi::GtkSettings,
2137            _param_spec: glib::ffi::gpointer,
2138            f: glib::ffi::gpointer,
2139        ) {
2140            unsafe {
2141                let f: &F = &*(f as *const F);
2142                f(&from_glib_borrow(this))
2143            }
2144        }
2145        unsafe {
2146            let f: Box_<F> = Box_::new(f);
2147            connect_raw(
2148                self.as_ptr() as *mut _,
2149                c"notify::gtk-double-click-distance".as_ptr(),
2150                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2151                    notify_gtk_double_click_distance_trampoline::<F> as *const (),
2152                )),
2153                Box_::into_raw(f),
2154            )
2155        }
2156    }
2157
2158    #[doc(alias = "gtk-double-click-time")]
2159    pub fn connect_gtk_double_click_time_notify<F: Fn(&Self) + 'static>(
2160        &self,
2161        f: F,
2162    ) -> SignalHandlerId {
2163        unsafe extern "C" fn notify_gtk_double_click_time_trampoline<F: Fn(&Settings) + 'static>(
2164            this: *mut ffi::GtkSettings,
2165            _param_spec: glib::ffi::gpointer,
2166            f: glib::ffi::gpointer,
2167        ) {
2168            unsafe {
2169                let f: &F = &*(f as *const F);
2170                f(&from_glib_borrow(this))
2171            }
2172        }
2173        unsafe {
2174            let f: Box_<F> = Box_::new(f);
2175            connect_raw(
2176                self.as_ptr() as *mut _,
2177                c"notify::gtk-double-click-time".as_ptr(),
2178                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2179                    notify_gtk_double_click_time_trampoline::<F> as *const (),
2180                )),
2181                Box_::into_raw(f),
2182            )
2183        }
2184    }
2185
2186    #[doc(alias = "gtk-enable-accels")]
2187    pub fn connect_gtk_enable_accels_notify<F: Fn(&Self) + 'static>(
2188        &self,
2189        f: F,
2190    ) -> SignalHandlerId {
2191        unsafe extern "C" fn notify_gtk_enable_accels_trampoline<F: Fn(&Settings) + 'static>(
2192            this: *mut ffi::GtkSettings,
2193            _param_spec: glib::ffi::gpointer,
2194            f: glib::ffi::gpointer,
2195        ) {
2196            unsafe {
2197                let f: &F = &*(f as *const F);
2198                f(&from_glib_borrow(this))
2199            }
2200        }
2201        unsafe {
2202            let f: Box_<F> = Box_::new(f);
2203            connect_raw(
2204                self.as_ptr() as *mut _,
2205                c"notify::gtk-enable-accels".as_ptr(),
2206                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2207                    notify_gtk_enable_accels_trampoline::<F> as *const (),
2208                )),
2209                Box_::into_raw(f),
2210            )
2211        }
2212    }
2213
2214    #[doc(alias = "gtk-enable-animations")]
2215    pub fn connect_gtk_enable_animations_notify<F: Fn(&Self) + 'static>(
2216        &self,
2217        f: F,
2218    ) -> SignalHandlerId {
2219        unsafe extern "C" fn notify_gtk_enable_animations_trampoline<F: Fn(&Settings) + 'static>(
2220            this: *mut ffi::GtkSettings,
2221            _param_spec: glib::ffi::gpointer,
2222            f: glib::ffi::gpointer,
2223        ) {
2224            unsafe {
2225                let f: &F = &*(f as *const F);
2226                f(&from_glib_borrow(this))
2227            }
2228        }
2229        unsafe {
2230            let f: Box_<F> = Box_::new(f);
2231            connect_raw(
2232                self.as_ptr() as *mut _,
2233                c"notify::gtk-enable-animations".as_ptr(),
2234                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2235                    notify_gtk_enable_animations_trampoline::<F> as *const (),
2236                )),
2237                Box_::into_raw(f),
2238            )
2239        }
2240    }
2241
2242    #[doc(alias = "gtk-enable-event-sounds")]
2243    pub fn connect_gtk_enable_event_sounds_notify<F: Fn(&Self) + 'static>(
2244        &self,
2245        f: F,
2246    ) -> SignalHandlerId {
2247        unsafe extern "C" fn notify_gtk_enable_event_sounds_trampoline<
2248            F: Fn(&Settings) + 'static,
2249        >(
2250            this: *mut ffi::GtkSettings,
2251            _param_spec: glib::ffi::gpointer,
2252            f: glib::ffi::gpointer,
2253        ) {
2254            unsafe {
2255                let f: &F = &*(f as *const F);
2256                f(&from_glib_borrow(this))
2257            }
2258        }
2259        unsafe {
2260            let f: Box_<F> = Box_::new(f);
2261            connect_raw(
2262                self.as_ptr() as *mut _,
2263                c"notify::gtk-enable-event-sounds".as_ptr(),
2264                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2265                    notify_gtk_enable_event_sounds_trampoline::<F> as *const (),
2266                )),
2267                Box_::into_raw(f),
2268            )
2269        }
2270    }
2271
2272    #[doc(alias = "gtk-enable-input-feedback-sounds")]
2273    pub fn connect_gtk_enable_input_feedback_sounds_notify<F: Fn(&Self) + 'static>(
2274        &self,
2275        f: F,
2276    ) -> SignalHandlerId {
2277        unsafe extern "C" fn notify_gtk_enable_input_feedback_sounds_trampoline<
2278            F: Fn(&Settings) + 'static,
2279        >(
2280            this: *mut ffi::GtkSettings,
2281            _param_spec: glib::ffi::gpointer,
2282            f: glib::ffi::gpointer,
2283        ) {
2284            unsafe {
2285                let f: &F = &*(f as *const F);
2286                f(&from_glib_borrow(this))
2287            }
2288        }
2289        unsafe {
2290            let f: Box_<F> = Box_::new(f);
2291            connect_raw(
2292                self.as_ptr() as *mut _,
2293                c"notify::gtk-enable-input-feedback-sounds".as_ptr(),
2294                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2295                    notify_gtk_enable_input_feedback_sounds_trampoline::<F> as *const (),
2296                )),
2297                Box_::into_raw(f),
2298            )
2299        }
2300    }
2301
2302    #[doc(alias = "gtk-enable-primary-paste")]
2303    pub fn connect_gtk_enable_primary_paste_notify<F: Fn(&Self) + 'static>(
2304        &self,
2305        f: F,
2306    ) -> SignalHandlerId {
2307        unsafe extern "C" fn notify_gtk_enable_primary_paste_trampoline<
2308            F: Fn(&Settings) + 'static,
2309        >(
2310            this: *mut ffi::GtkSettings,
2311            _param_spec: glib::ffi::gpointer,
2312            f: glib::ffi::gpointer,
2313        ) {
2314            unsafe {
2315                let f: &F = &*(f as *const F);
2316                f(&from_glib_borrow(this))
2317            }
2318        }
2319        unsafe {
2320            let f: Box_<F> = Box_::new(f);
2321            connect_raw(
2322                self.as_ptr() as *mut _,
2323                c"notify::gtk-enable-primary-paste".as_ptr(),
2324                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2325                    notify_gtk_enable_primary_paste_trampoline::<F> as *const (),
2326                )),
2327                Box_::into_raw(f),
2328            )
2329        }
2330    }
2331
2332    #[doc(alias = "gtk-entry-password-hint-timeout")]
2333    pub fn connect_gtk_entry_password_hint_timeout_notify<F: Fn(&Self) + 'static>(
2334        &self,
2335        f: F,
2336    ) -> SignalHandlerId {
2337        unsafe extern "C" fn notify_gtk_entry_password_hint_timeout_trampoline<
2338            F: Fn(&Settings) + 'static,
2339        >(
2340            this: *mut ffi::GtkSettings,
2341            _param_spec: glib::ffi::gpointer,
2342            f: glib::ffi::gpointer,
2343        ) {
2344            unsafe {
2345                let f: &F = &*(f as *const F);
2346                f(&from_glib_borrow(this))
2347            }
2348        }
2349        unsafe {
2350            let f: Box_<F> = Box_::new(f);
2351            connect_raw(
2352                self.as_ptr() as *mut _,
2353                c"notify::gtk-entry-password-hint-timeout".as_ptr(),
2354                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2355                    notify_gtk_entry_password_hint_timeout_trampoline::<F> as *const (),
2356                )),
2357                Box_::into_raw(f),
2358            )
2359        }
2360    }
2361
2362    #[doc(alias = "gtk-entry-select-on-focus")]
2363    pub fn connect_gtk_entry_select_on_focus_notify<F: Fn(&Self) + 'static>(
2364        &self,
2365        f: F,
2366    ) -> SignalHandlerId {
2367        unsafe extern "C" fn notify_gtk_entry_select_on_focus_trampoline<
2368            F: Fn(&Settings) + 'static,
2369        >(
2370            this: *mut ffi::GtkSettings,
2371            _param_spec: glib::ffi::gpointer,
2372            f: glib::ffi::gpointer,
2373        ) {
2374            unsafe {
2375                let f: &F = &*(f as *const F);
2376                f(&from_glib_borrow(this))
2377            }
2378        }
2379        unsafe {
2380            let f: Box_<F> = Box_::new(f);
2381            connect_raw(
2382                self.as_ptr() as *mut _,
2383                c"notify::gtk-entry-select-on-focus".as_ptr(),
2384                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2385                    notify_gtk_entry_select_on_focus_trampoline::<F> as *const (),
2386                )),
2387                Box_::into_raw(f),
2388            )
2389        }
2390    }
2391
2392    #[doc(alias = "gtk-error-bell")]
2393    pub fn connect_gtk_error_bell_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2394        unsafe extern "C" fn notify_gtk_error_bell_trampoline<F: Fn(&Settings) + 'static>(
2395            this: *mut ffi::GtkSettings,
2396            _param_spec: glib::ffi::gpointer,
2397            f: glib::ffi::gpointer,
2398        ) {
2399            unsafe {
2400                let f: &F = &*(f as *const F);
2401                f(&from_glib_borrow(this))
2402            }
2403        }
2404        unsafe {
2405            let f: Box_<F> = Box_::new(f);
2406            connect_raw(
2407                self.as_ptr() as *mut _,
2408                c"notify::gtk-error-bell".as_ptr(),
2409                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2410                    notify_gtk_error_bell_trampoline::<F> as *const (),
2411                )),
2412                Box_::into_raw(f),
2413            )
2414        }
2415    }
2416
2417    #[doc(alias = "gtk-font-name")]
2418    pub fn connect_gtk_font_name_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2419        unsafe extern "C" fn notify_gtk_font_name_trampoline<F: Fn(&Settings) + 'static>(
2420            this: *mut ffi::GtkSettings,
2421            _param_spec: glib::ffi::gpointer,
2422            f: glib::ffi::gpointer,
2423        ) {
2424            unsafe {
2425                let f: &F = &*(f as *const F);
2426                f(&from_glib_borrow(this))
2427            }
2428        }
2429        unsafe {
2430            let f: Box_<F> = Box_::new(f);
2431            connect_raw(
2432                self.as_ptr() as *mut _,
2433                c"notify::gtk-font-name".as_ptr(),
2434                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2435                    notify_gtk_font_name_trampoline::<F> as *const (),
2436                )),
2437                Box_::into_raw(f),
2438            )
2439        }
2440    }
2441
2442    #[cfg(feature = "v4_16")]
2443    #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))]
2444    #[doc(alias = "gtk-font-rendering")]
2445    pub fn connect_gtk_font_rendering_notify<F: Fn(&Self) + 'static>(
2446        &self,
2447        f: F,
2448    ) -> SignalHandlerId {
2449        unsafe extern "C" fn notify_gtk_font_rendering_trampoline<F: Fn(&Settings) + 'static>(
2450            this: *mut ffi::GtkSettings,
2451            _param_spec: glib::ffi::gpointer,
2452            f: glib::ffi::gpointer,
2453        ) {
2454            unsafe {
2455                let f: &F = &*(f as *const F);
2456                f(&from_glib_borrow(this))
2457            }
2458        }
2459        unsafe {
2460            let f: Box_<F> = Box_::new(f);
2461            connect_raw(
2462                self.as_ptr() as *mut _,
2463                c"notify::gtk-font-rendering".as_ptr(),
2464                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2465                    notify_gtk_font_rendering_trampoline::<F> as *const (),
2466                )),
2467                Box_::into_raw(f),
2468            )
2469        }
2470    }
2471
2472    #[doc(alias = "gtk-fontconfig-timestamp")]
2473    pub fn connect_gtk_fontconfig_timestamp_notify<F: Fn(&Self) + 'static>(
2474        &self,
2475        f: F,
2476    ) -> SignalHandlerId {
2477        unsafe extern "C" fn notify_gtk_fontconfig_timestamp_trampoline<
2478            F: Fn(&Settings) + 'static,
2479        >(
2480            this: *mut ffi::GtkSettings,
2481            _param_spec: glib::ffi::gpointer,
2482            f: glib::ffi::gpointer,
2483        ) {
2484            unsafe {
2485                let f: &F = &*(f as *const F);
2486                f(&from_glib_borrow(this))
2487            }
2488        }
2489        unsafe {
2490            let f: Box_<F> = Box_::new(f);
2491            connect_raw(
2492                self.as_ptr() as *mut _,
2493                c"notify::gtk-fontconfig-timestamp".as_ptr(),
2494                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2495                    notify_gtk_fontconfig_timestamp_trampoline::<F> as *const (),
2496                )),
2497                Box_::into_raw(f),
2498            )
2499        }
2500    }
2501
2502    #[cfg(feature = "v4_6")]
2503    #[cfg_attr(docsrs, doc(cfg(feature = "v4_6")))]
2504    #[doc(alias = "gtk-hint-font-metrics")]
2505    pub fn connect_gtk_hint_font_metrics_notify<F: Fn(&Self) + 'static>(
2506        &self,
2507        f: F,
2508    ) -> SignalHandlerId {
2509        unsafe extern "C" fn notify_gtk_hint_font_metrics_trampoline<F: Fn(&Settings) + 'static>(
2510            this: *mut ffi::GtkSettings,
2511            _param_spec: glib::ffi::gpointer,
2512            f: glib::ffi::gpointer,
2513        ) {
2514            unsafe {
2515                let f: &F = &*(f as *const F);
2516                f(&from_glib_borrow(this))
2517            }
2518        }
2519        unsafe {
2520            let f: Box_<F> = Box_::new(f);
2521            connect_raw(
2522                self.as_ptr() as *mut _,
2523                c"notify::gtk-hint-font-metrics".as_ptr(),
2524                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2525                    notify_gtk_hint_font_metrics_trampoline::<F> as *const (),
2526                )),
2527                Box_::into_raw(f),
2528            )
2529        }
2530    }
2531
2532    #[doc(alias = "gtk-icon-theme-name")]
2533    pub fn connect_gtk_icon_theme_name_notify<F: Fn(&Self) + 'static>(
2534        &self,
2535        f: F,
2536    ) -> SignalHandlerId {
2537        unsafe extern "C" fn notify_gtk_icon_theme_name_trampoline<F: Fn(&Settings) + 'static>(
2538            this: *mut ffi::GtkSettings,
2539            _param_spec: glib::ffi::gpointer,
2540            f: glib::ffi::gpointer,
2541        ) {
2542            unsafe {
2543                let f: &F = &*(f as *const F);
2544                f(&from_glib_borrow(this))
2545            }
2546        }
2547        unsafe {
2548            let f: Box_<F> = Box_::new(f);
2549            connect_raw(
2550                self.as_ptr() as *mut _,
2551                c"notify::gtk-icon-theme-name".as_ptr(),
2552                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2553                    notify_gtk_icon_theme_name_trampoline::<F> as *const (),
2554                )),
2555                Box_::into_raw(f),
2556            )
2557        }
2558    }
2559
2560    #[doc(alias = "gtk-im-module")]
2561    pub fn connect_gtk_im_module_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2562        unsafe extern "C" fn notify_gtk_im_module_trampoline<F: Fn(&Settings) + 'static>(
2563            this: *mut ffi::GtkSettings,
2564            _param_spec: glib::ffi::gpointer,
2565            f: glib::ffi::gpointer,
2566        ) {
2567            unsafe {
2568                let f: &F = &*(f as *const F);
2569                f(&from_glib_borrow(this))
2570            }
2571        }
2572        unsafe {
2573            let f: Box_<F> = Box_::new(f);
2574            connect_raw(
2575                self.as_ptr() as *mut _,
2576                c"notify::gtk-im-module".as_ptr(),
2577                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2578                    notify_gtk_im_module_trampoline::<F> as *const (),
2579                )),
2580                Box_::into_raw(f),
2581            )
2582        }
2583    }
2584
2585    #[cfg(feature = "v4_20")]
2586    #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))]
2587    #[doc(alias = "gtk-interface-color-scheme")]
2588    pub fn connect_gtk_interface_color_scheme_notify<F: Fn(&Self) + 'static>(
2589        &self,
2590        f: F,
2591    ) -> SignalHandlerId {
2592        unsafe extern "C" fn notify_gtk_interface_color_scheme_trampoline<
2593            F: Fn(&Settings) + 'static,
2594        >(
2595            this: *mut ffi::GtkSettings,
2596            _param_spec: glib::ffi::gpointer,
2597            f: glib::ffi::gpointer,
2598        ) {
2599            unsafe {
2600                let f: &F = &*(f as *const F);
2601                f(&from_glib_borrow(this))
2602            }
2603        }
2604        unsafe {
2605            let f: Box_<F> = Box_::new(f);
2606            connect_raw(
2607                self.as_ptr() as *mut _,
2608                c"notify::gtk-interface-color-scheme".as_ptr(),
2609                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2610                    notify_gtk_interface_color_scheme_trampoline::<F> as *const (),
2611                )),
2612                Box_::into_raw(f),
2613            )
2614        }
2615    }
2616
2617    #[cfg(feature = "v4_20")]
2618    #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))]
2619    #[doc(alias = "gtk-interface-contrast")]
2620    pub fn connect_gtk_interface_contrast_notify<F: Fn(&Self) + 'static>(
2621        &self,
2622        f: F,
2623    ) -> SignalHandlerId {
2624        unsafe extern "C" fn notify_gtk_interface_contrast_trampoline<
2625            F: Fn(&Settings) + 'static,
2626        >(
2627            this: *mut ffi::GtkSettings,
2628            _param_spec: glib::ffi::gpointer,
2629            f: glib::ffi::gpointer,
2630        ) {
2631            unsafe {
2632                let f: &F = &*(f as *const F);
2633                f(&from_glib_borrow(this))
2634            }
2635        }
2636        unsafe {
2637            let f: Box_<F> = Box_::new(f);
2638            connect_raw(
2639                self.as_ptr() as *mut _,
2640                c"notify::gtk-interface-contrast".as_ptr(),
2641                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2642                    notify_gtk_interface_contrast_trampoline::<F> as *const (),
2643                )),
2644                Box_::into_raw(f),
2645            )
2646        }
2647    }
2648
2649    #[cfg(feature = "v4_22")]
2650    #[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))]
2651    #[doc(alias = "gtk-interface-reduced-motion")]
2652    pub fn connect_gtk_interface_reduced_motion_notify<F: Fn(&Self) + 'static>(
2653        &self,
2654        f: F,
2655    ) -> SignalHandlerId {
2656        unsafe extern "C" fn notify_gtk_interface_reduced_motion_trampoline<
2657            F: Fn(&Settings) + 'static,
2658        >(
2659            this: *mut ffi::GtkSettings,
2660            _param_spec: glib::ffi::gpointer,
2661            f: glib::ffi::gpointer,
2662        ) {
2663            unsafe {
2664                let f: &F = &*(f as *const F);
2665                f(&from_glib_borrow(this))
2666            }
2667        }
2668        unsafe {
2669            let f: Box_<F> = Box_::new(f);
2670            connect_raw(
2671                self.as_ptr() as *mut _,
2672                c"notify::gtk-interface-reduced-motion".as_ptr(),
2673                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2674                    notify_gtk_interface_reduced_motion_trampoline::<F> as *const (),
2675                )),
2676                Box_::into_raw(f),
2677            )
2678        }
2679    }
2680
2681    #[doc(alias = "gtk-keynav-use-caret")]
2682    pub fn connect_gtk_keynav_use_caret_notify<F: Fn(&Self) + 'static>(
2683        &self,
2684        f: F,
2685    ) -> SignalHandlerId {
2686        unsafe extern "C" fn notify_gtk_keynav_use_caret_trampoline<F: Fn(&Settings) + 'static>(
2687            this: *mut ffi::GtkSettings,
2688            _param_spec: glib::ffi::gpointer,
2689            f: glib::ffi::gpointer,
2690        ) {
2691            unsafe {
2692                let f: &F = &*(f as *const F);
2693                f(&from_glib_borrow(this))
2694            }
2695        }
2696        unsafe {
2697            let f: Box_<F> = Box_::new(f);
2698            connect_raw(
2699                self.as_ptr() as *mut _,
2700                c"notify::gtk-keynav-use-caret".as_ptr(),
2701                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2702                    notify_gtk_keynav_use_caret_trampoline::<F> as *const (),
2703                )),
2704                Box_::into_raw(f),
2705            )
2706        }
2707    }
2708
2709    #[doc(alias = "gtk-label-select-on-focus")]
2710    pub fn connect_gtk_label_select_on_focus_notify<F: Fn(&Self) + 'static>(
2711        &self,
2712        f: F,
2713    ) -> SignalHandlerId {
2714        unsafe extern "C" fn notify_gtk_label_select_on_focus_trampoline<
2715            F: Fn(&Settings) + 'static,
2716        >(
2717            this: *mut ffi::GtkSettings,
2718            _param_spec: glib::ffi::gpointer,
2719            f: glib::ffi::gpointer,
2720        ) {
2721            unsafe {
2722                let f: &F = &*(f as *const F);
2723                f(&from_glib_borrow(this))
2724            }
2725        }
2726        unsafe {
2727            let f: Box_<F> = Box_::new(f);
2728            connect_raw(
2729                self.as_ptr() as *mut _,
2730                c"notify::gtk-label-select-on-focus".as_ptr(),
2731                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2732                    notify_gtk_label_select_on_focus_trampoline::<F> as *const (),
2733                )),
2734                Box_::into_raw(f),
2735            )
2736        }
2737    }
2738
2739    #[doc(alias = "gtk-long-press-time")]
2740    pub fn connect_gtk_long_press_time_notify<F: Fn(&Self) + 'static>(
2741        &self,
2742        f: F,
2743    ) -> SignalHandlerId {
2744        unsafe extern "C" fn notify_gtk_long_press_time_trampoline<F: Fn(&Settings) + 'static>(
2745            this: *mut ffi::GtkSettings,
2746            _param_spec: glib::ffi::gpointer,
2747            f: glib::ffi::gpointer,
2748        ) {
2749            unsafe {
2750                let f: &F = &*(f as *const F);
2751                f(&from_glib_borrow(this))
2752            }
2753        }
2754        unsafe {
2755            let f: Box_<F> = Box_::new(f);
2756            connect_raw(
2757                self.as_ptr() as *mut _,
2758                c"notify::gtk-long-press-time".as_ptr(),
2759                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2760                    notify_gtk_long_press_time_trampoline::<F> as *const (),
2761                )),
2762                Box_::into_raw(f),
2763            )
2764        }
2765    }
2766
2767    #[doc(alias = "gtk-overlay-scrolling")]
2768    pub fn connect_gtk_overlay_scrolling_notify<F: Fn(&Self) + 'static>(
2769        &self,
2770        f: F,
2771    ) -> SignalHandlerId {
2772        unsafe extern "C" fn notify_gtk_overlay_scrolling_trampoline<F: Fn(&Settings) + 'static>(
2773            this: *mut ffi::GtkSettings,
2774            _param_spec: glib::ffi::gpointer,
2775            f: glib::ffi::gpointer,
2776        ) {
2777            unsafe {
2778                let f: &F = &*(f as *const F);
2779                f(&from_glib_borrow(this))
2780            }
2781        }
2782        unsafe {
2783            let f: Box_<F> = Box_::new(f);
2784            connect_raw(
2785                self.as_ptr() as *mut _,
2786                c"notify::gtk-overlay-scrolling".as_ptr(),
2787                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2788                    notify_gtk_overlay_scrolling_trampoline::<F> as *const (),
2789                )),
2790                Box_::into_raw(f),
2791            )
2792        }
2793    }
2794
2795    #[doc(alias = "gtk-primary-button-warps-slider")]
2796    pub fn connect_gtk_primary_button_warps_slider_notify<F: Fn(&Self) + 'static>(
2797        &self,
2798        f: F,
2799    ) -> SignalHandlerId {
2800        unsafe extern "C" fn notify_gtk_primary_button_warps_slider_trampoline<
2801            F: Fn(&Settings) + 'static,
2802        >(
2803            this: *mut ffi::GtkSettings,
2804            _param_spec: glib::ffi::gpointer,
2805            f: glib::ffi::gpointer,
2806        ) {
2807            unsafe {
2808                let f: &F = &*(f as *const F);
2809                f(&from_glib_borrow(this))
2810            }
2811        }
2812        unsafe {
2813            let f: Box_<F> = Box_::new(f);
2814            connect_raw(
2815                self.as_ptr() as *mut _,
2816                c"notify::gtk-primary-button-warps-slider".as_ptr(),
2817                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2818                    notify_gtk_primary_button_warps_slider_trampoline::<F> as *const (),
2819                )),
2820                Box_::into_raw(f),
2821            )
2822        }
2823    }
2824
2825    #[doc(alias = "gtk-print-backends")]
2826    pub fn connect_gtk_print_backends_notify<F: Fn(&Self) + 'static>(
2827        &self,
2828        f: F,
2829    ) -> SignalHandlerId {
2830        unsafe extern "C" fn notify_gtk_print_backends_trampoline<F: Fn(&Settings) + 'static>(
2831            this: *mut ffi::GtkSettings,
2832            _param_spec: glib::ffi::gpointer,
2833            f: glib::ffi::gpointer,
2834        ) {
2835            unsafe {
2836                let f: &F = &*(f as *const F);
2837                f(&from_glib_borrow(this))
2838            }
2839        }
2840        unsafe {
2841            let f: Box_<F> = Box_::new(f);
2842            connect_raw(
2843                self.as_ptr() as *mut _,
2844                c"notify::gtk-print-backends".as_ptr(),
2845                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2846                    notify_gtk_print_backends_trampoline::<F> as *const (),
2847                )),
2848                Box_::into_raw(f),
2849            )
2850        }
2851    }
2852
2853    #[doc(alias = "gtk-print-preview-command")]
2854    pub fn connect_gtk_print_preview_command_notify<F: Fn(&Self) + 'static>(
2855        &self,
2856        f: F,
2857    ) -> SignalHandlerId {
2858        unsafe extern "C" fn notify_gtk_print_preview_command_trampoline<
2859            F: Fn(&Settings) + 'static,
2860        >(
2861            this: *mut ffi::GtkSettings,
2862            _param_spec: glib::ffi::gpointer,
2863            f: glib::ffi::gpointer,
2864        ) {
2865            unsafe {
2866                let f: &F = &*(f as *const F);
2867                f(&from_glib_borrow(this))
2868            }
2869        }
2870        unsafe {
2871            let f: Box_<F> = Box_::new(f);
2872            connect_raw(
2873                self.as_ptr() as *mut _,
2874                c"notify::gtk-print-preview-command".as_ptr(),
2875                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2876                    notify_gtk_print_preview_command_trampoline::<F> as *const (),
2877                )),
2878                Box_::into_raw(f),
2879            )
2880        }
2881    }
2882
2883    #[doc(alias = "gtk-recent-files-enabled")]
2884    pub fn connect_gtk_recent_files_enabled_notify<F: Fn(&Self) + 'static>(
2885        &self,
2886        f: F,
2887    ) -> SignalHandlerId {
2888        unsafe extern "C" fn notify_gtk_recent_files_enabled_trampoline<
2889            F: Fn(&Settings) + 'static,
2890        >(
2891            this: *mut ffi::GtkSettings,
2892            _param_spec: glib::ffi::gpointer,
2893            f: glib::ffi::gpointer,
2894        ) {
2895            unsafe {
2896                let f: &F = &*(f as *const F);
2897                f(&from_glib_borrow(this))
2898            }
2899        }
2900        unsafe {
2901            let f: Box_<F> = Box_::new(f);
2902            connect_raw(
2903                self.as_ptr() as *mut _,
2904                c"notify::gtk-recent-files-enabled".as_ptr(),
2905                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2906                    notify_gtk_recent_files_enabled_trampoline::<F> as *const (),
2907                )),
2908                Box_::into_raw(f),
2909            )
2910        }
2911    }
2912
2913    #[doc(alias = "gtk-recent-files-max-age")]
2914    pub fn connect_gtk_recent_files_max_age_notify<F: Fn(&Self) + 'static>(
2915        &self,
2916        f: F,
2917    ) -> SignalHandlerId {
2918        unsafe extern "C" fn notify_gtk_recent_files_max_age_trampoline<
2919            F: Fn(&Settings) + 'static,
2920        >(
2921            this: *mut ffi::GtkSettings,
2922            _param_spec: glib::ffi::gpointer,
2923            f: glib::ffi::gpointer,
2924        ) {
2925            unsafe {
2926                let f: &F = &*(f as *const F);
2927                f(&from_glib_borrow(this))
2928            }
2929        }
2930        unsafe {
2931            let f: Box_<F> = Box_::new(f);
2932            connect_raw(
2933                self.as_ptr() as *mut _,
2934                c"notify::gtk-recent-files-max-age".as_ptr(),
2935                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2936                    notify_gtk_recent_files_max_age_trampoline::<F> as *const (),
2937                )),
2938                Box_::into_raw(f),
2939            )
2940        }
2941    }
2942
2943    #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")]
2944    #[doc(alias = "gtk-shell-shows-app-menu")]
2945    pub fn connect_gtk_shell_shows_app_menu_notify<F: Fn(&Self) + 'static>(
2946        &self,
2947        f: F,
2948    ) -> SignalHandlerId {
2949        unsafe extern "C" fn notify_gtk_shell_shows_app_menu_trampoline<
2950            F: Fn(&Settings) + 'static,
2951        >(
2952            this: *mut ffi::GtkSettings,
2953            _param_spec: glib::ffi::gpointer,
2954            f: glib::ffi::gpointer,
2955        ) {
2956            unsafe {
2957                let f: &F = &*(f as *const F);
2958                f(&from_glib_borrow(this))
2959            }
2960        }
2961        unsafe {
2962            let f: Box_<F> = Box_::new(f);
2963            connect_raw(
2964                self.as_ptr() as *mut _,
2965                c"notify::gtk-shell-shows-app-menu".as_ptr(),
2966                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2967                    notify_gtk_shell_shows_app_menu_trampoline::<F> as *const (),
2968                )),
2969                Box_::into_raw(f),
2970            )
2971        }
2972    }
2973
2974    #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")]
2975    #[doc(alias = "gtk-shell-shows-desktop")]
2976    pub fn connect_gtk_shell_shows_desktop_notify<F: Fn(&Self) + 'static>(
2977        &self,
2978        f: F,
2979    ) -> SignalHandlerId {
2980        unsafe extern "C" fn notify_gtk_shell_shows_desktop_trampoline<
2981            F: Fn(&Settings) + 'static,
2982        >(
2983            this: *mut ffi::GtkSettings,
2984            _param_spec: glib::ffi::gpointer,
2985            f: glib::ffi::gpointer,
2986        ) {
2987            unsafe {
2988                let f: &F = &*(f as *const F);
2989                f(&from_glib_borrow(this))
2990            }
2991        }
2992        unsafe {
2993            let f: Box_<F> = Box_::new(f);
2994            connect_raw(
2995                self.as_ptr() as *mut _,
2996                c"notify::gtk-shell-shows-desktop".as_ptr(),
2997                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2998                    notify_gtk_shell_shows_desktop_trampoline::<F> as *const (),
2999                )),
3000                Box_::into_raw(f),
3001            )
3002        }
3003    }
3004
3005    #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")]
3006    #[doc(alias = "gtk-shell-shows-menubar")]
3007    pub fn connect_gtk_shell_shows_menubar_notify<F: Fn(&Self) + 'static>(
3008        &self,
3009        f: F,
3010    ) -> SignalHandlerId {
3011        unsafe extern "C" fn notify_gtk_shell_shows_menubar_trampoline<
3012            F: Fn(&Settings) + 'static,
3013        >(
3014            this: *mut ffi::GtkSettings,
3015            _param_spec: glib::ffi::gpointer,
3016            f: glib::ffi::gpointer,
3017        ) {
3018            unsafe {
3019                let f: &F = &*(f as *const F);
3020                f(&from_glib_borrow(this))
3021            }
3022        }
3023        unsafe {
3024            let f: Box_<F> = Box_::new(f);
3025            connect_raw(
3026                self.as_ptr() as *mut _,
3027                c"notify::gtk-shell-shows-menubar".as_ptr(),
3028                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3029                    notify_gtk_shell_shows_menubar_trampoline::<F> as *const (),
3030                )),
3031                Box_::into_raw(f),
3032            )
3033        }
3034    }
3035
3036    #[cfg(feature = "v4_14")]
3037    #[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
3038    #[doc(alias = "gtk-show-status-shapes")]
3039    pub fn connect_gtk_show_status_shapes_notify<F: Fn(&Self) + 'static>(
3040        &self,
3041        f: F,
3042    ) -> SignalHandlerId {
3043        unsafe extern "C" fn notify_gtk_show_status_shapes_trampoline<
3044            F: Fn(&Settings) + 'static,
3045        >(
3046            this: *mut ffi::GtkSettings,
3047            _param_spec: glib::ffi::gpointer,
3048            f: glib::ffi::gpointer,
3049        ) {
3050            unsafe {
3051                let f: &F = &*(f as *const F);
3052                f(&from_glib_borrow(this))
3053            }
3054        }
3055        unsafe {
3056            let f: Box_<F> = Box_::new(f);
3057            connect_raw(
3058                self.as_ptr() as *mut _,
3059                c"notify::gtk-show-status-shapes".as_ptr(),
3060                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3061                    notify_gtk_show_status_shapes_trampoline::<F> as *const (),
3062                )),
3063                Box_::into_raw(f),
3064            )
3065        }
3066    }
3067
3068    #[doc(alias = "gtk-sound-theme-name")]
3069    pub fn connect_gtk_sound_theme_name_notify<F: Fn(&Self) + 'static>(
3070        &self,
3071        f: F,
3072    ) -> SignalHandlerId {
3073        unsafe extern "C" fn notify_gtk_sound_theme_name_trampoline<F: Fn(&Settings) + 'static>(
3074            this: *mut ffi::GtkSettings,
3075            _param_spec: glib::ffi::gpointer,
3076            f: glib::ffi::gpointer,
3077        ) {
3078            unsafe {
3079                let f: &F = &*(f as *const F);
3080                f(&from_glib_borrow(this))
3081            }
3082        }
3083        unsafe {
3084            let f: Box_<F> = Box_::new(f);
3085            connect_raw(
3086                self.as_ptr() as *mut _,
3087                c"notify::gtk-sound-theme-name".as_ptr(),
3088                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3089                    notify_gtk_sound_theme_name_trampoline::<F> as *const (),
3090                )),
3091                Box_::into_raw(f),
3092            )
3093        }
3094    }
3095
3096    #[doc(alias = "gtk-split-cursor")]
3097    pub fn connect_gtk_split_cursor_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3098        unsafe extern "C" fn notify_gtk_split_cursor_trampoline<F: Fn(&Settings) + 'static>(
3099            this: *mut ffi::GtkSettings,
3100            _param_spec: glib::ffi::gpointer,
3101            f: glib::ffi::gpointer,
3102        ) {
3103            unsafe {
3104                let f: &F = &*(f as *const F);
3105                f(&from_glib_borrow(this))
3106            }
3107        }
3108        unsafe {
3109            let f: Box_<F> = Box_::new(f);
3110            connect_raw(
3111                self.as_ptr() as *mut _,
3112                c"notify::gtk-split-cursor".as_ptr(),
3113                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3114                    notify_gtk_split_cursor_trampoline::<F> as *const (),
3115                )),
3116                Box_::into_raw(f),
3117            )
3118        }
3119    }
3120
3121    #[doc(alias = "gtk-theme-name")]
3122    pub fn connect_gtk_theme_name_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3123        unsafe extern "C" fn notify_gtk_theme_name_trampoline<F: Fn(&Settings) + 'static>(
3124            this: *mut ffi::GtkSettings,
3125            _param_spec: glib::ffi::gpointer,
3126            f: glib::ffi::gpointer,
3127        ) {
3128            unsafe {
3129                let f: &F = &*(f as *const F);
3130                f(&from_glib_borrow(this))
3131            }
3132        }
3133        unsafe {
3134            let f: Box_<F> = Box_::new(f);
3135            connect_raw(
3136                self.as_ptr() as *mut _,
3137                c"notify::gtk-theme-name".as_ptr(),
3138                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3139                    notify_gtk_theme_name_trampoline::<F> as *const (),
3140                )),
3141                Box_::into_raw(f),
3142            )
3143        }
3144    }
3145
3146    #[doc(alias = "gtk-titlebar-double-click")]
3147    pub fn connect_gtk_titlebar_double_click_notify<F: Fn(&Self) + 'static>(
3148        &self,
3149        f: F,
3150    ) -> SignalHandlerId {
3151        unsafe extern "C" fn notify_gtk_titlebar_double_click_trampoline<
3152            F: Fn(&Settings) + 'static,
3153        >(
3154            this: *mut ffi::GtkSettings,
3155            _param_spec: glib::ffi::gpointer,
3156            f: glib::ffi::gpointer,
3157        ) {
3158            unsafe {
3159                let f: &F = &*(f as *const F);
3160                f(&from_glib_borrow(this))
3161            }
3162        }
3163        unsafe {
3164            let f: Box_<F> = Box_::new(f);
3165            connect_raw(
3166                self.as_ptr() as *mut _,
3167                c"notify::gtk-titlebar-double-click".as_ptr(),
3168                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3169                    notify_gtk_titlebar_double_click_trampoline::<F> as *const (),
3170                )),
3171                Box_::into_raw(f),
3172            )
3173        }
3174    }
3175
3176    #[doc(alias = "gtk-titlebar-middle-click")]
3177    pub fn connect_gtk_titlebar_middle_click_notify<F: Fn(&Self) + 'static>(
3178        &self,
3179        f: F,
3180    ) -> SignalHandlerId {
3181        unsafe extern "C" fn notify_gtk_titlebar_middle_click_trampoline<
3182            F: Fn(&Settings) + 'static,
3183        >(
3184            this: *mut ffi::GtkSettings,
3185            _param_spec: glib::ffi::gpointer,
3186            f: glib::ffi::gpointer,
3187        ) {
3188            unsafe {
3189                let f: &F = &*(f as *const F);
3190                f(&from_glib_borrow(this))
3191            }
3192        }
3193        unsafe {
3194            let f: Box_<F> = Box_::new(f);
3195            connect_raw(
3196                self.as_ptr() as *mut _,
3197                c"notify::gtk-titlebar-middle-click".as_ptr(),
3198                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3199                    notify_gtk_titlebar_middle_click_trampoline::<F> as *const (),
3200                )),
3201                Box_::into_raw(f),
3202            )
3203        }
3204    }
3205
3206    #[doc(alias = "gtk-titlebar-right-click")]
3207    pub fn connect_gtk_titlebar_right_click_notify<F: Fn(&Self) + 'static>(
3208        &self,
3209        f: F,
3210    ) -> SignalHandlerId {
3211        unsafe extern "C" fn notify_gtk_titlebar_right_click_trampoline<
3212            F: Fn(&Settings) + 'static,
3213        >(
3214            this: *mut ffi::GtkSettings,
3215            _param_spec: glib::ffi::gpointer,
3216            f: glib::ffi::gpointer,
3217        ) {
3218            unsafe {
3219                let f: &F = &*(f as *const F);
3220                f(&from_glib_borrow(this))
3221            }
3222        }
3223        unsafe {
3224            let f: Box_<F> = Box_::new(f);
3225            connect_raw(
3226                self.as_ptr() as *mut _,
3227                c"notify::gtk-titlebar-right-click".as_ptr(),
3228                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3229                    notify_gtk_titlebar_right_click_trampoline::<F> as *const (),
3230                )),
3231                Box_::into_raw(f),
3232            )
3233        }
3234    }
3235
3236    #[doc(alias = "gtk-xft-antialias")]
3237    pub fn connect_gtk_xft_antialias_notify<F: Fn(&Self) + 'static>(
3238        &self,
3239        f: F,
3240    ) -> SignalHandlerId {
3241        unsafe extern "C" fn notify_gtk_xft_antialias_trampoline<F: Fn(&Settings) + 'static>(
3242            this: *mut ffi::GtkSettings,
3243            _param_spec: glib::ffi::gpointer,
3244            f: glib::ffi::gpointer,
3245        ) {
3246            unsafe {
3247                let f: &F = &*(f as *const F);
3248                f(&from_glib_borrow(this))
3249            }
3250        }
3251        unsafe {
3252            let f: Box_<F> = Box_::new(f);
3253            connect_raw(
3254                self.as_ptr() as *mut _,
3255                c"notify::gtk-xft-antialias".as_ptr(),
3256                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3257                    notify_gtk_xft_antialias_trampoline::<F> as *const (),
3258                )),
3259                Box_::into_raw(f),
3260            )
3261        }
3262    }
3263
3264    #[doc(alias = "gtk-xft-dpi")]
3265    pub fn connect_gtk_xft_dpi_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3266        unsafe extern "C" fn notify_gtk_xft_dpi_trampoline<F: Fn(&Settings) + 'static>(
3267            this: *mut ffi::GtkSettings,
3268            _param_spec: glib::ffi::gpointer,
3269            f: glib::ffi::gpointer,
3270        ) {
3271            unsafe {
3272                let f: &F = &*(f as *const F);
3273                f(&from_glib_borrow(this))
3274            }
3275        }
3276        unsafe {
3277            let f: Box_<F> = Box_::new(f);
3278            connect_raw(
3279                self.as_ptr() as *mut _,
3280                c"notify::gtk-xft-dpi".as_ptr(),
3281                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3282                    notify_gtk_xft_dpi_trampoline::<F> as *const (),
3283                )),
3284                Box_::into_raw(f),
3285            )
3286        }
3287    }
3288
3289    #[doc(alias = "gtk-xft-hinting")]
3290    pub fn connect_gtk_xft_hinting_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3291        unsafe extern "C" fn notify_gtk_xft_hinting_trampoline<F: Fn(&Settings) + 'static>(
3292            this: *mut ffi::GtkSettings,
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::gtk-xft-hinting".as_ptr(),
3306                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3307                    notify_gtk_xft_hinting_trampoline::<F> as *const (),
3308                )),
3309                Box_::into_raw(f),
3310            )
3311        }
3312    }
3313
3314    #[doc(alias = "gtk-xft-hintstyle")]
3315    pub fn connect_gtk_xft_hintstyle_notify<F: Fn(&Self) + 'static>(
3316        &self,
3317        f: F,
3318    ) -> SignalHandlerId {
3319        unsafe extern "C" fn notify_gtk_xft_hintstyle_trampoline<F: Fn(&Settings) + 'static>(
3320            this: *mut ffi::GtkSettings,
3321            _param_spec: glib::ffi::gpointer,
3322            f: glib::ffi::gpointer,
3323        ) {
3324            unsafe {
3325                let f: &F = &*(f as *const F);
3326                f(&from_glib_borrow(this))
3327            }
3328        }
3329        unsafe {
3330            let f: Box_<F> = Box_::new(f);
3331            connect_raw(
3332                self.as_ptr() as *mut _,
3333                c"notify::gtk-xft-hintstyle".as_ptr(),
3334                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3335                    notify_gtk_xft_hintstyle_trampoline::<F> as *const (),
3336                )),
3337                Box_::into_raw(f),
3338            )
3339        }
3340    }
3341
3342    #[doc(alias = "gtk-xft-rgba")]
3343    pub fn connect_gtk_xft_rgba_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3344        unsafe extern "C" fn notify_gtk_xft_rgba_trampoline<F: Fn(&Settings) + 'static>(
3345            this: *mut ffi::GtkSettings,
3346            _param_spec: glib::ffi::gpointer,
3347            f: glib::ffi::gpointer,
3348        ) {
3349            unsafe {
3350                let f: &F = &*(f as *const F);
3351                f(&from_glib_borrow(this))
3352            }
3353        }
3354        unsafe {
3355            let f: Box_<F> = Box_::new(f);
3356            connect_raw(
3357                self.as_ptr() as *mut _,
3358                c"notify::gtk-xft-rgba".as_ptr(),
3359                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3360                    notify_gtk_xft_rgba_trampoline::<F> as *const (),
3361                )),
3362                Box_::into_raw(f),
3363            )
3364        }
3365    }
3366}
3367
3368// rustdoc-stripper-ignore-next
3369/// A [builder-pattern] type to construct [`Settings`] objects.
3370///
3371/// [builder-pattern]: https://doc.rust-lang.org/1.0.0/style/ownership/builders.html
3372#[must_use = "The builder must be built to be used"]
3373pub struct SettingsBuilder {
3374    builder: glib::object::ObjectBuilder<'static, Settings>,
3375}
3376
3377impl SettingsBuilder {
3378    fn new() -> Self {
3379        Self {
3380            builder: glib::object::Object::builder(),
3381        }
3382    }
3383
3384    /// Whether buttons in dialogs should use the alternative button order.
3385    pub fn gtk_alternative_button_order(self, gtk_alternative_button_order: bool) -> Self {
3386        Self {
3387            builder: self
3388                .builder
3389                .property("gtk-alternative-button-order", gtk_alternative_button_order),
3390        }
3391    }
3392
3393    /// Controls the direction of the sort indicators in sorted list and tree
3394    /// views.
3395    ///
3396    /// By default an arrow pointing down means the column is sorted
3397    /// in ascending order. When set to [`true`], this order will be inverted.
3398    pub fn gtk_alternative_sort_arrows(self, gtk_alternative_sort_arrows: bool) -> Self {
3399        Self {
3400            builder: self
3401                .builder
3402                .property("gtk-alternative-sort-arrows", gtk_alternative_sort_arrows),
3403        }
3404    }
3405
3406    /// Whether the application prefers to use a dark theme.
3407    ///
3408    /// If a GTK theme includes a dark variant, it will be used
3409    /// instead of the configured theme.
3410    ///
3411    /// Some applications benefit from minimizing the amount of light
3412    /// pollution that interferes with the content. Good candidates for
3413    /// dark themes are photo and video editors that make the actual
3414    /// content get all the attention and minimize the distraction of
3415    /// the chrome.
3416    ///
3417    /// Dark themes should not be used for documents, where large spaces
3418    /// are white/light and the dark chrome creates too much contrast
3419    /// (web browser, text editor...).
3420    /// Use [`CssProvider`][crate::CssProvider] properties instead
3421    #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")]
3422    pub fn gtk_application_prefer_dark_theme(
3423        self,
3424        gtk_application_prefer_dark_theme: bool,
3425    ) -> Self {
3426        Self {
3427            builder: self.builder.property(
3428                "gtk-application-prefer-dark-theme",
3429                gtk_application_prefer_dark_theme,
3430            ),
3431        }
3432    }
3433
3434    /// The aspect ratio of the text caret.
3435    pub fn gtk_cursor_aspect_ratio(self, gtk_cursor_aspect_ratio: f64) -> Self {
3436        Self {
3437            builder: self
3438                .builder
3439                .property("gtk-cursor-aspect-ratio", gtk_cursor_aspect_ratio),
3440        }
3441    }
3442
3443    /// Whether the cursor should blink.
3444    ///
3445    /// Also see the [`gtk-cursor-blink-timeout`][struct@crate::Settings#gtk-cursor-blink-timeout] setting,
3446    /// which allows more flexible control over cursor blinking.
3447    pub fn gtk_cursor_blink(self, gtk_cursor_blink: bool) -> Self {
3448        Self {
3449            builder: self.builder.property("gtk-cursor-blink", gtk_cursor_blink),
3450        }
3451    }
3452
3453    /// Length of the cursor blink cycle, in milliseconds.
3454    pub fn gtk_cursor_blink_time(self, gtk_cursor_blink_time: i32) -> Self {
3455        Self {
3456            builder: self
3457                .builder
3458                .property("gtk-cursor-blink-time", gtk_cursor_blink_time),
3459        }
3460    }
3461
3462    /// Time after which the cursor stops blinking, in seconds.
3463    ///
3464    /// The timer is reset after each user interaction.
3465    ///
3466    /// Setting this to zero has the same effect as setting
3467    /// [`gtk-cursor-blink`][struct@crate::Settings#gtk-cursor-blink] to [`false`].
3468    pub fn gtk_cursor_blink_timeout(self, gtk_cursor_blink_timeout: i32) -> Self {
3469        Self {
3470            builder: self
3471                .builder
3472                .property("gtk-cursor-blink-timeout", gtk_cursor_blink_timeout),
3473        }
3474    }
3475
3476    /// Name of the cursor theme to use.
3477    ///
3478    /// Use [`None`] to use the default theme.
3479    pub fn gtk_cursor_theme_name(self, gtk_cursor_theme_name: impl Into<glib::GString>) -> Self {
3480        Self {
3481            builder: self
3482                .builder
3483                .property("gtk-cursor-theme-name", gtk_cursor_theme_name.into()),
3484        }
3485    }
3486
3487    /// The size to use for cursors.
3488    ///
3489    /// 0 means to use the default size.
3490    pub fn gtk_cursor_theme_size(self, gtk_cursor_theme_size: i32) -> Self {
3491        Self {
3492            builder: self
3493                .builder
3494                .property("gtk-cursor-theme-size", gtk_cursor_theme_size),
3495        }
3496    }
3497
3498    /// Determines which buttons should be put in the
3499    /// titlebar of client-side decorated windows, and whether they
3500    /// should be placed on the left or right.
3501    ///
3502    /// The format of the string is button names, separated by commas.
3503    /// A colon separates the buttons that should appear on the left
3504    /// from those on the right. Recognized button names are minimize,
3505    /// maximize, close, icon (the window icon) and menu (a menu button
3506    /// for the fallback app menu).
3507    ///
3508    /// For example, "menu:minimize,maximize,close" specifies a menu
3509    /// on the left, and minimize, maximize and close buttons on the right.
3510    ///
3511    /// Note that buttons will only be shown when they are meaningful.
3512    /// E.g. a menu button only appears when the desktop shell does not
3513    /// show the app menu, and a close button only appears on a window
3514    /// that can be closed.
3515    ///
3516    /// Also note that the setting can be overridden with the
3517    /// [`decoration-layout`][struct@crate::HeaderBar#decoration-layout] property.
3518    pub fn gtk_decoration_layout(self, gtk_decoration_layout: impl Into<glib::GString>) -> Self {
3519        Self {
3520            builder: self
3521                .builder
3522                .property("gtk-decoration-layout", gtk_decoration_layout.into()),
3523        }
3524    }
3525
3526    /// Whether builtin GTK dialogs such as the file chooser, the
3527    /// color chooser or the font chooser will use a header bar at
3528    /// the top to show action widgets, or an action area at the bottom.
3529    ///
3530    /// This setting does not affect custom dialogs using [`Dialog`][crate::Dialog]
3531    /// directly, or message dialogs.
3532    pub fn gtk_dialogs_use_header(self, gtk_dialogs_use_header: bool) -> Self {
3533        Self {
3534            builder: self
3535                .builder
3536                .property("gtk-dialogs-use-header", gtk_dialogs_use_header),
3537        }
3538    }
3539
3540    /// The number of pixels the cursor can move before dragging.
3541    pub fn gtk_dnd_drag_threshold(self, gtk_dnd_drag_threshold: i32) -> Self {
3542        Self {
3543            builder: self
3544                .builder
3545                .property("gtk-dnd-drag-threshold", gtk_dnd_drag_threshold),
3546        }
3547    }
3548
3549    /// The maximum distance allowed between two clicks for them to be considered
3550    /// a double click, in pixels.
3551    pub fn gtk_double_click_distance(self, gtk_double_click_distance: i32) -> Self {
3552        Self {
3553            builder: self
3554                .builder
3555                .property("gtk-double-click-distance", gtk_double_click_distance),
3556        }
3557    }
3558
3559    /// The maximum time to allow between two clicks for them to be considered
3560    /// a double click, in milliseconds.
3561    pub fn gtk_double_click_time(self, gtk_double_click_time: i32) -> Self {
3562        Self {
3563            builder: self
3564                .builder
3565                .property("gtk-double-click-time", gtk_double_click_time),
3566        }
3567    }
3568
3569    /// Whether menu items should have visible accelerators which can be
3570    /// activated.
3571    pub fn gtk_enable_accels(self, gtk_enable_accels: bool) -> Self {
3572        Self {
3573            builder: self
3574                .builder
3575                .property("gtk-enable-accels", gtk_enable_accels),
3576        }
3577    }
3578
3579    /// Whether to enable toolkit-wide animations.
3580    pub fn gtk_enable_animations(self, gtk_enable_animations: bool) -> Self {
3581        Self {
3582            builder: self
3583                .builder
3584                .property("gtk-enable-animations", gtk_enable_animations),
3585        }
3586    }
3587
3588    /// Whether to play any event sounds at all.
3589    ///
3590    /// See the [Sound Theme Specifications](http://www.freedesktop.org/wiki/Specifications/sound-theme-spec)
3591    /// for more information on event sounds and sound themes.
3592    ///
3593    /// GTK itself does not support event sounds, you have to use a loadable
3594    /// module like the one that comes with libcanberra.
3595    pub fn gtk_enable_event_sounds(self, gtk_enable_event_sounds: bool) -> Self {
3596        Self {
3597            builder: self
3598                .builder
3599                .property("gtk-enable-event-sounds", gtk_enable_event_sounds),
3600        }
3601    }
3602
3603    /// Whether to play event sounds as feedback to user input.
3604    ///
3605    /// See the [Sound Theme Specifications](http://www.freedesktop.org/wiki/Specifications/sound-theme-spec)
3606    /// for more information on event sounds and sound themes.
3607    ///
3608    /// GTK itself does not support event sounds, you have to use a loadable
3609    /// module like the one that comes with libcanberra.
3610    pub fn gtk_enable_input_feedback_sounds(self, gtk_enable_input_feedback_sounds: bool) -> Self {
3611        Self {
3612            builder: self.builder.property(
3613                "gtk-enable-input-feedback-sounds",
3614                gtk_enable_input_feedback_sounds,
3615            ),
3616        }
3617    }
3618
3619    /// Whether a middle click on a mouse should paste the
3620    /// 'PRIMARY' clipboard content at the cursor location.
3621    pub fn gtk_enable_primary_paste(self, gtk_enable_primary_paste: bool) -> Self {
3622        Self {
3623            builder: self
3624                .builder
3625                .property("gtk-enable-primary-paste", gtk_enable_primary_paste),
3626        }
3627    }
3628
3629    /// How long to show the last input character in hidden
3630    /// entries.
3631    ///
3632    /// This value is in milliseconds. 0 disables showing the
3633    /// last char. 600 is a good value for enabling it.
3634    pub fn gtk_entry_password_hint_timeout(self, gtk_entry_password_hint_timeout: u32) -> Self {
3635        Self {
3636            builder: self.builder.property(
3637                "gtk-entry-password-hint-timeout",
3638                gtk_entry_password_hint_timeout,
3639            ),
3640        }
3641    }
3642
3643    /// Whether to select the contents of an entry when it is focused.
3644    pub fn gtk_entry_select_on_focus(self, gtk_entry_select_on_focus: bool) -> Self {
3645        Self {
3646            builder: self
3647                .builder
3648                .property("gtk-entry-select-on-focus", gtk_entry_select_on_focus),
3649        }
3650    }
3651
3652    /// When [`true`], keyboard navigation and other input-related errors
3653    /// will cause a beep.
3654    ///
3655    /// Since the error bell is implemented using gdk_surface_beep(), the
3656    /// windowing system may offer ways to configure the error bell in many
3657    /// ways, such as flashing the window or similar visual effects.
3658    pub fn gtk_error_bell(self, gtk_error_bell: bool) -> Self {
3659        Self {
3660            builder: self.builder.property("gtk-error-bell", gtk_error_bell),
3661        }
3662    }
3663
3664    /// The default font to use.
3665    ///
3666    /// GTK uses the family name and size from this string.
3667    pub fn gtk_font_name(self, gtk_font_name: impl Into<glib::GString>) -> Self {
3668        Self {
3669            builder: self.builder.property("gtk-font-name", gtk_font_name.into()),
3670        }
3671    }
3672
3673    /// How GTK font rendering is set up.
3674    ///
3675    /// When set to [enum@Gtk.FontRendering.MANUAL], GTK respects the low-level
3676    /// font-related settings ([`gtk-hint-font-metrics`][struct@crate::Settings#gtk-hint-font-metrics],
3677    /// [`gtk-xft-antialias`][struct@crate::Settings#gtk-xft-antialias], [`gtk-xft-hinting`][struct@crate::Settings#gtk-xft-hinting],
3678    /// [`gtk-xft-hintstyle`][struct@crate::Settings#gtk-xft-hintstyle] and [`gtk-xft-rgba`][struct@crate::Settings#gtk-xft-rgba])
3679    /// as much as practical.
3680    ///
3681    /// When set to [enum@Gtk.FontRendering.AUTOMATIC], GTK will consider factors such
3682    /// as screen resolution and scale in deciding how to render fonts.
3683    #[cfg(feature = "v4_16")]
3684    #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))]
3685    pub fn gtk_font_rendering(self, gtk_font_rendering: FontRendering) -> Self {
3686        Self {
3687            builder: self
3688                .builder
3689                .property("gtk-font-rendering", gtk_font_rendering),
3690        }
3691    }
3692
3693    /// Timestamp of the current fontconfig configuration.
3694    pub fn gtk_fontconfig_timestamp(self, gtk_fontconfig_timestamp: u32) -> Self {
3695        Self {
3696            builder: self
3697                .builder
3698                .property("gtk-fontconfig-timestamp", gtk_fontconfig_timestamp),
3699        }
3700    }
3701
3702    /// Whether hinting should be applied to font metrics.
3703    ///
3704    /// Note that this also turns off subpixel positioning of glyphs,
3705    /// since it conflicts with metrics hinting.
3706    #[cfg(feature = "v4_6")]
3707    #[cfg_attr(docsrs, doc(cfg(feature = "v4_6")))]
3708    pub fn gtk_hint_font_metrics(self, gtk_hint_font_metrics: bool) -> Self {
3709        Self {
3710            builder: self
3711                .builder
3712                .property("gtk-hint-font-metrics", gtk_hint_font_metrics),
3713        }
3714    }
3715
3716    /// Name of the icon theme to use.
3717    ///
3718    /// See [`IconTheme`][crate::IconTheme] for details about how
3719    /// GTK handles icon themes.
3720    pub fn gtk_icon_theme_name(self, gtk_icon_theme_name: impl Into<glib::GString>) -> Self {
3721        Self {
3722            builder: self
3723                .builder
3724                .property("gtk-icon-theme-name", gtk_icon_theme_name.into()),
3725        }
3726    }
3727
3728    /// Which IM (input method) module should be used by default.
3729    ///
3730    /// This is the input method that will be used if the user has not
3731    /// explicitly chosen another input method from the IM context menu.
3732    /// This also can be a colon-separated list of input methods, which GTK
3733    /// will try in turn until it finds one available on the system.
3734    ///
3735    /// See [`IMContext`][crate::IMContext].
3736    pub fn gtk_im_module(self, gtk_im_module: impl Into<glib::GString>) -> Self {
3737        Self {
3738            builder: self.builder.property("gtk-im-module", gtk_im_module.into()),
3739        }
3740    }
3741
3742    /// The color scheme used for rendering the user interface.
3743    ///
3744    /// This setting communicates the system-wide preference.
3745    /// The color scheme that is actually used when applying CSS
3746    /// styles can be set with the [`prefers-color-scheme`][struct@crate::CssProvider#prefers-color-scheme]
3747    /// property.
3748    #[cfg(feature = "v4_20")]
3749    #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))]
3750    pub fn gtk_interface_color_scheme(
3751        self,
3752        gtk_interface_color_scheme: InterfaceColorScheme,
3753    ) -> Self {
3754        Self {
3755            builder: self
3756                .builder
3757                .property("gtk-interface-color-scheme", gtk_interface_color_scheme),
3758        }
3759    }
3760
3761    /// The level of contrast to use for the user interface.
3762    ///
3763    /// This setting communicates the system-wide preference.
3764    /// The contrast level that is actually used when applying CSS
3765    /// styles can be set with the [`prefers-contrast`][struct@crate::CssProvider#prefers-contrast]
3766    /// property.
3767    #[cfg(feature = "v4_20")]
3768    #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))]
3769    pub fn gtk_interface_contrast(self, gtk_interface_contrast: InterfaceContrast) -> Self {
3770        Self {
3771            builder: self
3772                .builder
3773                .property("gtk-interface-contrast", gtk_interface_contrast),
3774        }
3775    }
3776
3777    /// Whether animations should be reduced to essential motions.
3778    ///
3779    /// This setting communicates the system-wide preference.
3780    /// The motion level that is actually used when applying CSS
3781    /// styles can be set with the [`prefers-reduced-motion`][struct@crate::CssProvider#prefers-reduced-motion]
3782    /// property.
3783    #[cfg(feature = "v4_22")]
3784    #[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))]
3785    pub fn gtk_interface_reduced_motion(self, gtk_interface_reduced_motion: ReducedMotion) -> Self {
3786        Self {
3787            builder: self
3788                .builder
3789                .property("gtk-interface-reduced-motion", gtk_interface_reduced_motion),
3790        }
3791    }
3792
3793    /// Whether GTK should make sure that text can be navigated with
3794    /// a caret, even if it is not editable.
3795    ///
3796    /// This is useful when using a screen reader.
3797    pub fn gtk_keynav_use_caret(self, gtk_keynav_use_caret: bool) -> Self {
3798        Self {
3799            builder: self
3800                .builder
3801                .property("gtk-keynav-use-caret", gtk_keynav_use_caret),
3802        }
3803    }
3804
3805    /// Whether to select the contents of a selectable
3806    /// label when it is focused.
3807    pub fn gtk_label_select_on_focus(self, gtk_label_select_on_focus: bool) -> Self {
3808        Self {
3809            builder: self
3810                .builder
3811                .property("gtk-label-select-on-focus", gtk_label_select_on_focus),
3812        }
3813    }
3814
3815    /// .
3816    ///
3817    /// See [`GestureLongPress`][crate::GestureLongPress].
3818    pub fn gtk_long_press_time(self, gtk_long_press_time: u32) -> Self {
3819        Self {
3820            builder: self
3821                .builder
3822                .property("gtk-long-press-time", gtk_long_press_time),
3823        }
3824    }
3825
3826    /// Whether scrolled windows may use overlaid scrolling indicators.
3827    ///
3828    /// If this is set to [`false`], scrolled windows will have permanent
3829    /// scrollbars.
3830    pub fn gtk_overlay_scrolling(self, gtk_overlay_scrolling: bool) -> Self {
3831        Self {
3832            builder: self
3833                .builder
3834                .property("gtk-overlay-scrolling", gtk_overlay_scrolling),
3835        }
3836    }
3837
3838    /// s page-size towards the point clicked.
3839    ///
3840    /// Whichever action you choose for the primary button, the other action will
3841    /// be available by holding Shift and primary-clicking, or clicking the middle
3842    /// mouse button.
3843    pub fn gtk_primary_button_warps_slider(self, gtk_primary_button_warps_slider: bool) -> Self {
3844        Self {
3845            builder: self.builder.property(
3846                "gtk-primary-button-warps-slider",
3847                gtk_primary_button_warps_slider,
3848            ),
3849        }
3850    }
3851
3852    /// A comma-separated list of print backends to use in the print
3853    /// dialog.
3854    ///
3855    /// Available print backends depend on the GTK installation,
3856    /// and may include "file", "cups", "lpr" or "papi".
3857    pub fn gtk_print_backends(self, gtk_print_backends: impl Into<glib::GString>) -> Self {
3858        Self {
3859            builder: self
3860                .builder
3861                .property("gtk-print-backends", gtk_print_backends.into()),
3862        }
3863    }
3864
3865    /// A command to run for displaying the print preview.
3866    ///
3867    /// The command should contain a ``f`` placeholder, which will get
3868    /// replaced by the path to the pdf file. The command may also
3869    /// contain a ``s`` placeholder, which will get replaced by the
3870    /// path to a file containing the print settings in the format
3871    /// produced by [`PrintSettings::to_file()`][crate::PrintSettings::to_file()].
3872    ///
3873    /// The preview application is responsible for removing the pdf
3874    /// file and the print settings file when it is done.
3875    pub fn gtk_print_preview_command(
3876        self,
3877        gtk_print_preview_command: impl Into<glib::GString>,
3878    ) -> Self {
3879        Self {
3880            builder: self.builder.property(
3881                "gtk-print-preview-command",
3882                gtk_print_preview_command.into(),
3883            ),
3884        }
3885    }
3886
3887    /// Whether GTK should keep track of items inside the recently used
3888    /// resources list.
3889    ///
3890    /// If set to [`false`], the list will always be empty.
3891    pub fn gtk_recent_files_enabled(self, gtk_recent_files_enabled: bool) -> Self {
3892        Self {
3893            builder: self
3894                .builder
3895                .property("gtk-recent-files-enabled", gtk_recent_files_enabled),
3896        }
3897    }
3898
3899    /// The maximum age, in days, of the items inside the recently used
3900    /// resources list.
3901    ///
3902    /// Items older than this setting will be excised from the list.
3903    /// If set to 0, the list will always be empty; if set to -1, no
3904    /// item will be removed.
3905    pub fn gtk_recent_files_max_age(self, gtk_recent_files_max_age: i32) -> Self {
3906        Self {
3907            builder: self
3908                .builder
3909                .property("gtk-recent-files-max-age", gtk_recent_files_max_age),
3910        }
3911    }
3912
3913    /// Set to [`true`] if the desktop environment is displaying
3914    /// the app menu, [`false`] if the app should display it itself.
3915    /// This setting is not relevant anymore
3916    #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")]
3917    pub fn gtk_shell_shows_app_menu(self, gtk_shell_shows_app_menu: bool) -> Self {
3918        Self {
3919            builder: self
3920                .builder
3921                .property("gtk-shell-shows-app-menu", gtk_shell_shows_app_menu),
3922        }
3923    }
3924
3925    /// Set to [`true`] if the desktop environment is displaying
3926    /// the desktop folder, [`false`] if not.
3927    /// This setting is not relevant anymore
3928    #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")]
3929    pub fn gtk_shell_shows_desktop(self, gtk_shell_shows_desktop: bool) -> Self {
3930        Self {
3931            builder: self
3932                .builder
3933                .property("gtk-shell-shows-desktop", gtk_shell_shows_desktop),
3934        }
3935    }
3936
3937    /// Set to [`true`] if the desktop environment is displaying
3938    /// the menubar, [`false`] if the app should display it itself.
3939    /// This setting is not relevant anymore
3940    #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")]
3941    pub fn gtk_shell_shows_menubar(self, gtk_shell_shows_menubar: bool) -> Self {
3942        Self {
3943            builder: self
3944                .builder
3945                .property("gtk-shell-shows-menubar", gtk_shell_shows_menubar),
3946        }
3947    }
3948
3949    /// When [`true`], widgets like switches include shapes to indicate their on/off state.
3950    #[cfg(feature = "v4_14")]
3951    #[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
3952    pub fn gtk_show_status_shapes(self, gtk_show_status_shapes: bool) -> Self {
3953        Self {
3954            builder: self
3955                .builder
3956                .property("gtk-show-status-shapes", gtk_show_status_shapes),
3957        }
3958    }
3959
3960    /// The XDG sound theme to use for event sounds.
3961    ///
3962    /// See the [Sound Theme Specifications](http://www.freedesktop.org/wiki/Specifications/sound-theme-spec)
3963    /// for more information on event sounds and sound themes.
3964    ///
3965    /// GTK itself does not support event sounds, you have to use
3966    /// a loadable module like the one that comes with libcanberra.
3967    pub fn gtk_sound_theme_name(self, gtk_sound_theme_name: impl Into<glib::GString>) -> Self {
3968        Self {
3969            builder: self
3970                .builder
3971                .property("gtk-sound-theme-name", gtk_sound_theme_name.into()),
3972        }
3973    }
3974
3975    /// Whether two cursors should be displayed for mixed left-to-right and
3976    /// right-to-left text.
3977    pub fn gtk_split_cursor(self, gtk_split_cursor: bool) -> Self {
3978        Self {
3979            builder: self.builder.property("gtk-split-cursor", gtk_split_cursor),
3980        }
3981    }
3982
3983    /// Name of the theme to load.
3984    ///
3985    /// See [`CssProvider`][crate::CssProvider] for details about how
3986    /// GTK finds the CSS stylesheet for a theme.
3987    pub fn gtk_theme_name(self, gtk_theme_name: impl Into<glib::GString>) -> Self {
3988        Self {
3989            builder: self
3990                .builder
3991                .property("gtk-theme-name", gtk_theme_name.into()),
3992        }
3993    }
3994
3995    /// Determines the action to take when a double-click
3996    /// occurs on the titlebar of client-side decorated windows.
3997    ///
3998    /// Recognized actions are minimize, toggle-maximize, menu, lower
3999    /// or none.
4000    pub fn gtk_titlebar_double_click(
4001        self,
4002        gtk_titlebar_double_click: impl Into<glib::GString>,
4003    ) -> Self {
4004        Self {
4005            builder: self.builder.property(
4006                "gtk-titlebar-double-click",
4007                gtk_titlebar_double_click.into(),
4008            ),
4009        }
4010    }
4011
4012    /// Determines the action to take when a middle-click
4013    /// occurs on the titlebar of client-side decorated windows.
4014    ///
4015    /// Recognized actions are minimize, toggle-maximize, menu, lower
4016    /// or none.
4017    pub fn gtk_titlebar_middle_click(
4018        self,
4019        gtk_titlebar_middle_click: impl Into<glib::GString>,
4020    ) -> Self {
4021        Self {
4022            builder: self.builder.property(
4023                "gtk-titlebar-middle-click",
4024                gtk_titlebar_middle_click.into(),
4025            ),
4026        }
4027    }
4028
4029    /// Determines the action to take when a right-click
4030    /// occurs on the titlebar of client-side decorated windows.
4031    ///
4032    /// Recognized actions are minimize, toggle-maximize, menu, lower
4033    /// or none.
4034    pub fn gtk_titlebar_right_click(
4035        self,
4036        gtk_titlebar_right_click: impl Into<glib::GString>,
4037    ) -> Self {
4038        Self {
4039            builder: self
4040                .builder
4041                .property("gtk-titlebar-right-click", gtk_titlebar_right_click.into()),
4042        }
4043    }
4044
4045    /// Whether to antialias fonts.
4046    ///
4047    /// The values are 0 for no, 1 for yes, or -1 for the system default.
4048    pub fn gtk_xft_antialias(self, gtk_xft_antialias: i32) -> Self {
4049        Self {
4050            builder: self
4051                .builder
4052                .property("gtk-xft-antialias", gtk_xft_antialias),
4053        }
4054    }
4055
4056    /// The font resolution, in 1024 * dots/inch.
4057    ///
4058    /// -1 to use the default value.
4059    pub fn gtk_xft_dpi(self, gtk_xft_dpi: i32) -> Self {
4060        Self {
4061            builder: self.builder.property("gtk-xft-dpi", gtk_xft_dpi),
4062        }
4063    }
4064
4065    /// Whether to enable font hinting.
4066    ///
4067    /// The values are 0 for no, 1 for yes, or -1 for the system default.
4068    pub fn gtk_xft_hinting(self, gtk_xft_hinting: i32) -> Self {
4069        Self {
4070            builder: self.builder.property("gtk-xft-hinting", gtk_xft_hinting),
4071        }
4072    }
4073
4074    /// What degree of font hinting to use.
4075    ///
4076    /// The possible vaues are hintnone, hintslight,
4077    /// hintmedium, hintfull.
4078    pub fn gtk_xft_hintstyle(self, gtk_xft_hintstyle: impl Into<glib::GString>) -> Self {
4079        Self {
4080            builder: self
4081                .builder
4082                .property("gtk-xft-hintstyle", gtk_xft_hintstyle.into()),
4083        }
4084    }
4085
4086    /// The type of subpixel antialiasing to use.
4087    ///
4088    /// The possible values are none, rgb, bgr, vrgb, vbgr.
4089    ///
4090    /// Note that GSK does not support subpixel antialiasing, and this
4091    /// setting has no effect on font rendering in GTK.
4092    pub fn gtk_xft_rgba(self, gtk_xft_rgba: impl Into<glib::GString>) -> Self {
4093        Self {
4094            builder: self.builder.property("gtk-xft-rgba", gtk_xft_rgba.into()),
4095        }
4096    }
4097
4098    // rustdoc-stripper-ignore-next
4099    /// Build the [`Settings`].
4100    #[must_use = "Building the object from the builder is usually expensive and is not expected to have side effects"]
4101    pub fn build(self) -> Settings {
4102        assert_initialized_main_thread!();
4103        self.builder.build()
4104    }
4105}