Skip to main content

gtk4/auto/
settings.rs

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