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