1#[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 #[doc(alias = "GtkSettings")]
579 pub struct Settings(Object<ffi::GtkSettings>) @implements StyleProvider;
580
581 match fn {
582 type_ => || ffi::gtk_settings_get_type(),
583 }
584}
585
586impl Settings {
587 pub fn builder() -> SettingsBuilder {
592 SettingsBuilder::new()
593 }
594
595 #[doc(alias = "gtk_settings_reset_property")]
603 pub fn reset_property(&self, name: &str) {
604 unsafe {
605 ffi::gtk_settings_reset_property(self.to_glib_none().0, name.to_glib_none().0);
606 }
607 }
608
609 #[doc(alias = "gtk-alternative-button-order")]
611 pub fn is_gtk_alternative_button_order(&self) -> bool {
612 ObjectExt::property(self, "gtk-alternative-button-order")
613 }
614
615 #[doc(alias = "gtk-alternative-button-order")]
617 pub fn set_gtk_alternative_button_order(&self, gtk_alternative_button_order: bool) {
618 ObjectExt::set_property(
619 self,
620 "gtk-alternative-button-order",
621 gtk_alternative_button_order,
622 )
623 }
624
625 #[doc(alias = "gtk-alternative-sort-arrows")]
631 pub fn is_gtk_alternative_sort_arrows(&self) -> bool {
632 ObjectExt::property(self, "gtk-alternative-sort-arrows")
633 }
634
635 #[doc(alias = "gtk-alternative-sort-arrows")]
641 pub fn set_gtk_alternative_sort_arrows(&self, gtk_alternative_sort_arrows: bool) {
642 ObjectExt::set_property(
643 self,
644 "gtk-alternative-sort-arrows",
645 gtk_alternative_sort_arrows,
646 )
647 }
648
649 #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")]
668 #[doc(alias = "gtk-application-prefer-dark-theme")]
669 pub fn is_gtk_application_prefer_dark_theme(&self) -> bool {
670 ObjectExt::property(self, "gtk-application-prefer-dark-theme")
671 }
672
673 #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")]
692 #[doc(alias = "gtk-application-prefer-dark-theme")]
693 pub fn set_gtk_application_prefer_dark_theme(&self, gtk_application_prefer_dark_theme: bool) {
694 ObjectExt::set_property(
695 self,
696 "gtk-application-prefer-dark-theme",
697 gtk_application_prefer_dark_theme,
698 )
699 }
700
701 #[doc(alias = "gtk-cursor-aspect-ratio")]
703 pub fn gtk_cursor_aspect_ratio(&self) -> f64 {
704 ObjectExt::property(self, "gtk-cursor-aspect-ratio")
705 }
706
707 #[doc(alias = "gtk-cursor-aspect-ratio")]
709 pub fn set_gtk_cursor_aspect_ratio(&self, gtk_cursor_aspect_ratio: f64) {
710 ObjectExt::set_property(self, "gtk-cursor-aspect-ratio", gtk_cursor_aspect_ratio)
711 }
712
713 #[doc(alias = "gtk-cursor-blink")]
718 pub fn is_gtk_cursor_blink(&self) -> bool {
719 ObjectExt::property(self, "gtk-cursor-blink")
720 }
721
722 #[doc(alias = "gtk-cursor-blink")]
727 pub fn set_gtk_cursor_blink(&self, gtk_cursor_blink: bool) {
728 ObjectExt::set_property(self, "gtk-cursor-blink", gtk_cursor_blink)
729 }
730
731 #[doc(alias = "gtk-cursor-blink-time")]
733 pub fn gtk_cursor_blink_time(&self) -> i32 {
734 ObjectExt::property(self, "gtk-cursor-blink-time")
735 }
736
737 #[doc(alias = "gtk-cursor-blink-time")]
739 pub fn set_gtk_cursor_blink_time(&self, gtk_cursor_blink_time: i32) {
740 ObjectExt::set_property(self, "gtk-cursor-blink-time", gtk_cursor_blink_time)
741 }
742
743 #[doc(alias = "gtk-cursor-blink-timeout")]
750 pub fn gtk_cursor_blink_timeout(&self) -> i32 {
751 ObjectExt::property(self, "gtk-cursor-blink-timeout")
752 }
753
754 #[doc(alias = "gtk-cursor-blink-timeout")]
761 pub fn set_gtk_cursor_blink_timeout(&self, gtk_cursor_blink_timeout: i32) {
762 ObjectExt::set_property(self, "gtk-cursor-blink-timeout", gtk_cursor_blink_timeout)
763 }
764
765 #[doc(alias = "gtk-cursor-theme-name")]
769 pub fn gtk_cursor_theme_name(&self) -> Option<glib::GString> {
770 ObjectExt::property(self, "gtk-cursor-theme-name")
771 }
772
773 #[doc(alias = "gtk-cursor-theme-name")]
777 pub fn set_gtk_cursor_theme_name(&self, gtk_cursor_theme_name: Option<&str>) {
778 ObjectExt::set_property(self, "gtk-cursor-theme-name", gtk_cursor_theme_name)
779 }
780
781 #[doc(alias = "gtk-cursor-theme-size")]
785 pub fn gtk_cursor_theme_size(&self) -> i32 {
786 ObjectExt::property(self, "gtk-cursor-theme-size")
787 }
788
789 #[doc(alias = "gtk-cursor-theme-size")]
793 pub fn set_gtk_cursor_theme_size(&self, gtk_cursor_theme_size: i32) {
794 ObjectExt::set_property(self, "gtk-cursor-theme-size", gtk_cursor_theme_size)
795 }
796
797 #[doc(alias = "gtk-decoration-layout")]
818 pub fn gtk_decoration_layout(&self) -> Option<glib::GString> {
819 ObjectExt::property(self, "gtk-decoration-layout")
820 }
821
822 #[doc(alias = "gtk-decoration-layout")]
843 pub fn set_gtk_decoration_layout(&self, gtk_decoration_layout: Option<&str>) {
844 ObjectExt::set_property(self, "gtk-decoration-layout", gtk_decoration_layout)
845 }
846
847 #[doc(alias = "gtk-dialogs-use-header")]
854 pub fn is_gtk_dialogs_use_header(&self) -> bool {
855 ObjectExt::property(self, "gtk-dialogs-use-header")
856 }
857
858 #[doc(alias = "gtk-dialogs-use-header")]
865 pub fn set_gtk_dialogs_use_header(&self, gtk_dialogs_use_header: bool) {
866 ObjectExt::set_property(self, "gtk-dialogs-use-header", gtk_dialogs_use_header)
867 }
868
869 #[doc(alias = "gtk-dnd-drag-threshold")]
871 pub fn gtk_dnd_drag_threshold(&self) -> i32 {
872 ObjectExt::property(self, "gtk-dnd-drag-threshold")
873 }
874
875 #[doc(alias = "gtk-dnd-drag-threshold")]
877 pub fn set_gtk_dnd_drag_threshold(&self, gtk_dnd_drag_threshold: i32) {
878 ObjectExt::set_property(self, "gtk-dnd-drag-threshold", gtk_dnd_drag_threshold)
879 }
880
881 #[doc(alias = "gtk-double-click-distance")]
884 pub fn gtk_double_click_distance(&self) -> i32 {
885 ObjectExt::property(self, "gtk-double-click-distance")
886 }
887
888 #[doc(alias = "gtk-double-click-distance")]
891 pub fn set_gtk_double_click_distance(&self, gtk_double_click_distance: i32) {
892 ObjectExt::set_property(self, "gtk-double-click-distance", gtk_double_click_distance)
893 }
894
895 #[doc(alias = "gtk-double-click-time")]
898 pub fn gtk_double_click_time(&self) -> i32 {
899 ObjectExt::property(self, "gtk-double-click-time")
900 }
901
902 #[doc(alias = "gtk-double-click-time")]
905 pub fn set_gtk_double_click_time(&self, gtk_double_click_time: i32) {
906 ObjectExt::set_property(self, "gtk-double-click-time", gtk_double_click_time)
907 }
908
909 #[doc(alias = "gtk-enable-accels")]
912 pub fn is_gtk_enable_accels(&self) -> bool {
913 ObjectExt::property(self, "gtk-enable-accels")
914 }
915
916 #[doc(alias = "gtk-enable-accels")]
919 pub fn set_gtk_enable_accels(&self, gtk_enable_accels: bool) {
920 ObjectExt::set_property(self, "gtk-enable-accels", gtk_enable_accels)
921 }
922
923 #[doc(alias = "gtk-enable-animations")]
925 pub fn is_gtk_enable_animations(&self) -> bool {
926 ObjectExt::property(self, "gtk-enable-animations")
927 }
928
929 #[doc(alias = "gtk-enable-animations")]
931 pub fn set_gtk_enable_animations(&self, gtk_enable_animations: bool) {
932 ObjectExt::set_property(self, "gtk-enable-animations", gtk_enable_animations)
933 }
934
935 #[doc(alias = "gtk-enable-event-sounds")]
943 pub fn is_gtk_enable_event_sounds(&self) -> bool {
944 ObjectExt::property(self, "gtk-enable-event-sounds")
945 }
946
947 #[doc(alias = "gtk-enable-event-sounds")]
955 pub fn set_gtk_enable_event_sounds(&self, gtk_enable_event_sounds: bool) {
956 ObjectExt::set_property(self, "gtk-enable-event-sounds", gtk_enable_event_sounds)
957 }
958
959 #[doc(alias = "gtk-enable-input-feedback-sounds")]
967 pub fn is_gtk_enable_input_feedback_sounds(&self) -> bool {
968 ObjectExt::property(self, "gtk-enable-input-feedback-sounds")
969 }
970
971 #[doc(alias = "gtk-enable-input-feedback-sounds")]
979 pub fn set_gtk_enable_input_feedback_sounds(&self, gtk_enable_input_feedback_sounds: bool) {
980 ObjectExt::set_property(
981 self,
982 "gtk-enable-input-feedback-sounds",
983 gtk_enable_input_feedback_sounds,
984 )
985 }
986
987 #[doc(alias = "gtk-enable-primary-paste")]
990 pub fn is_gtk_enable_primary_paste(&self) -> bool {
991 ObjectExt::property(self, "gtk-enable-primary-paste")
992 }
993
994 #[doc(alias = "gtk-enable-primary-paste")]
997 pub fn set_gtk_enable_primary_paste(&self, gtk_enable_primary_paste: bool) {
998 ObjectExt::set_property(self, "gtk-enable-primary-paste", gtk_enable_primary_paste)
999 }
1000
1001 #[doc(alias = "gtk-entry-password-hint-timeout")]
1007 pub fn gtk_entry_password_hint_timeout(&self) -> u32 {
1008 ObjectExt::property(self, "gtk-entry-password-hint-timeout")
1009 }
1010
1011 #[doc(alias = "gtk-entry-password-hint-timeout")]
1017 pub fn set_gtk_entry_password_hint_timeout(&self, gtk_entry_password_hint_timeout: u32) {
1018 ObjectExt::set_property(
1019 self,
1020 "gtk-entry-password-hint-timeout",
1021 gtk_entry_password_hint_timeout,
1022 )
1023 }
1024
1025 #[doc(alias = "gtk-entry-select-on-focus")]
1027 pub fn is_gtk_entry_select_on_focus(&self) -> bool {
1028 ObjectExt::property(self, "gtk-entry-select-on-focus")
1029 }
1030
1031 #[doc(alias = "gtk-entry-select-on-focus")]
1033 pub fn set_gtk_entry_select_on_focus(&self, gtk_entry_select_on_focus: bool) {
1034 ObjectExt::set_property(self, "gtk-entry-select-on-focus", gtk_entry_select_on_focus)
1035 }
1036
1037 #[doc(alias = "gtk-error-bell")]
1044 pub fn is_gtk_error_bell(&self) -> bool {
1045 ObjectExt::property(self, "gtk-error-bell")
1046 }
1047
1048 #[doc(alias = "gtk-error-bell")]
1055 pub fn set_gtk_error_bell(&self, gtk_error_bell: bool) {
1056 ObjectExt::set_property(self, "gtk-error-bell", gtk_error_bell)
1057 }
1058
1059 #[doc(alias = "gtk-font-name")]
1063 pub fn gtk_font_name(&self) -> Option<glib::GString> {
1064 ObjectExt::property(self, "gtk-font-name")
1065 }
1066
1067 #[doc(alias = "gtk-font-name")]
1071 pub fn set_gtk_font_name(&self, gtk_font_name: Option<&str>) {
1072 ObjectExt::set_property(self, "gtk-font-name", gtk_font_name)
1073 }
1074
1075 #[cfg(feature = "v4_16")]
1086 #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))]
1087 #[doc(alias = "gtk-font-rendering")]
1088 pub fn gtk_font_rendering(&self) -> FontRendering {
1089 ObjectExt::property(self, "gtk-font-rendering")
1090 }
1091
1092 #[cfg(feature = "v4_16")]
1103 #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))]
1104 #[doc(alias = "gtk-font-rendering")]
1105 pub fn set_gtk_font_rendering(&self, gtk_font_rendering: FontRendering) {
1106 ObjectExt::set_property(self, "gtk-font-rendering", gtk_font_rendering)
1107 }
1108
1109 #[doc(alias = "gtk-fontconfig-timestamp")]
1111 pub fn gtk_fontconfig_timestamp(&self) -> u32 {
1112 ObjectExt::property(self, "gtk-fontconfig-timestamp")
1113 }
1114
1115 #[doc(alias = "gtk-fontconfig-timestamp")]
1117 pub fn set_gtk_fontconfig_timestamp(&self, gtk_fontconfig_timestamp: u32) {
1118 ObjectExt::set_property(self, "gtk-fontconfig-timestamp", gtk_fontconfig_timestamp)
1119 }
1120
1121 #[cfg(feature = "v4_6")]
1126 #[cfg_attr(docsrs, doc(cfg(feature = "v4_6")))]
1127 #[doc(alias = "gtk-hint-font-metrics")]
1128 pub fn is_gtk_hint_font_metrics(&self) -> bool {
1129 ObjectExt::property(self, "gtk-hint-font-metrics")
1130 }
1131
1132 #[cfg(feature = "v4_6")]
1137 #[cfg_attr(docsrs, doc(cfg(feature = "v4_6")))]
1138 #[doc(alias = "gtk-hint-font-metrics")]
1139 pub fn set_gtk_hint_font_metrics(&self, gtk_hint_font_metrics: bool) {
1140 ObjectExt::set_property(self, "gtk-hint-font-metrics", gtk_hint_font_metrics)
1141 }
1142
1143 #[doc(alias = "gtk-icon-theme-name")]
1148 pub fn gtk_icon_theme_name(&self) -> Option<glib::GString> {
1149 ObjectExt::property(self, "gtk-icon-theme-name")
1150 }
1151
1152 #[doc(alias = "gtk-icon-theme-name")]
1157 pub fn set_gtk_icon_theme_name(&self, gtk_icon_theme_name: Option<&str>) {
1158 ObjectExt::set_property(self, "gtk-icon-theme-name", gtk_icon_theme_name)
1159 }
1160
1161 #[doc(alias = "gtk-im-module")]
1170 pub fn gtk_im_module(&self) -> Option<glib::GString> {
1171 ObjectExt::property(self, "gtk-im-module")
1172 }
1173
1174 #[doc(alias = "gtk-im-module")]
1183 pub fn set_gtk_im_module(&self, gtk_im_module: Option<&str>) {
1184 ObjectExt::set_property(self, "gtk-im-module", gtk_im_module)
1185 }
1186
1187 #[cfg(feature = "v4_20")]
1194 #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))]
1195 #[doc(alias = "gtk-interface-color-scheme")]
1196 pub fn gtk_interface_color_scheme(&self) -> InterfaceColorScheme {
1197 ObjectExt::property(self, "gtk-interface-color-scheme")
1198 }
1199
1200 #[cfg(feature = "v4_20")]
1207 #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))]
1208 #[doc(alias = "gtk-interface-color-scheme")]
1209 pub fn set_gtk_interface_color_scheme(&self, gtk_interface_color_scheme: InterfaceColorScheme) {
1210 ObjectExt::set_property(
1211 self,
1212 "gtk-interface-color-scheme",
1213 gtk_interface_color_scheme,
1214 )
1215 }
1216
1217 #[cfg(feature = "v4_20")]
1224 #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))]
1225 #[doc(alias = "gtk-interface-contrast")]
1226 pub fn gtk_interface_contrast(&self) -> InterfaceContrast {
1227 ObjectExt::property(self, "gtk-interface-contrast")
1228 }
1229
1230 #[cfg(feature = "v4_20")]
1237 #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))]
1238 #[doc(alias = "gtk-interface-contrast")]
1239 pub fn set_gtk_interface_contrast(&self, gtk_interface_contrast: InterfaceContrast) {
1240 ObjectExt::set_property(self, "gtk-interface-contrast", gtk_interface_contrast)
1241 }
1242
1243 #[cfg(feature = "v4_22")]
1250 #[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))]
1251 #[doc(alias = "gtk-interface-reduced-motion")]
1252 pub fn gtk_interface_reduced_motion(&self) -> ReducedMotion {
1253 ObjectExt::property(self, "gtk-interface-reduced-motion")
1254 }
1255
1256 #[cfg(feature = "v4_22")]
1263 #[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))]
1264 #[doc(alias = "gtk-interface-reduced-motion")]
1265 pub fn set_gtk_interface_reduced_motion(&self, gtk_interface_reduced_motion: ReducedMotion) {
1266 ObjectExt::set_property(
1267 self,
1268 "gtk-interface-reduced-motion",
1269 gtk_interface_reduced_motion,
1270 )
1271 }
1272
1273 #[doc(alias = "gtk-keynav-use-caret")]
1278 pub fn is_gtk_keynav_use_caret(&self) -> bool {
1279 ObjectExt::property(self, "gtk-keynav-use-caret")
1280 }
1281
1282 #[doc(alias = "gtk-keynav-use-caret")]
1287 pub fn set_gtk_keynav_use_caret(&self, gtk_keynav_use_caret: bool) {
1288 ObjectExt::set_property(self, "gtk-keynav-use-caret", gtk_keynav_use_caret)
1289 }
1290
1291 #[doc(alias = "gtk-label-select-on-focus")]
1294 pub fn is_gtk_label_select_on_focus(&self) -> bool {
1295 ObjectExt::property(self, "gtk-label-select-on-focus")
1296 }
1297
1298 #[doc(alias = "gtk-label-select-on-focus")]
1301 pub fn set_gtk_label_select_on_focus(&self, gtk_label_select_on_focus: bool) {
1302 ObjectExt::set_property(self, "gtk-label-select-on-focus", gtk_label_select_on_focus)
1303 }
1304
1305 #[doc(alias = "gtk-long-press-time")]
1309 pub fn gtk_long_press_time(&self) -> u32 {
1310 ObjectExt::property(self, "gtk-long-press-time")
1311 }
1312
1313 #[doc(alias = "gtk-long-press-time")]
1317 pub fn set_gtk_long_press_time(&self, gtk_long_press_time: u32) {
1318 ObjectExt::set_property(self, "gtk-long-press-time", gtk_long_press_time)
1319 }
1320
1321 #[doc(alias = "gtk-overlay-scrolling")]
1326 pub fn is_gtk_overlay_scrolling(&self) -> bool {
1327 ObjectExt::property(self, "gtk-overlay-scrolling")
1328 }
1329
1330 #[doc(alias = "gtk-overlay-scrolling")]
1335 pub fn set_gtk_overlay_scrolling(&self, gtk_overlay_scrolling: bool) {
1336 ObjectExt::set_property(self, "gtk-overlay-scrolling", gtk_overlay_scrolling)
1337 }
1338
1339 #[doc(alias = "gtk-primary-button-warps-slider")]
1345 pub fn is_gtk_primary_button_warps_slider(&self) -> bool {
1346 ObjectExt::property(self, "gtk-primary-button-warps-slider")
1347 }
1348
1349 #[doc(alias = "gtk-primary-button-warps-slider")]
1355 pub fn set_gtk_primary_button_warps_slider(&self, gtk_primary_button_warps_slider: bool) {
1356 ObjectExt::set_property(
1357 self,
1358 "gtk-primary-button-warps-slider",
1359 gtk_primary_button_warps_slider,
1360 )
1361 }
1362
1363 #[doc(alias = "gtk-print-backends")]
1369 pub fn gtk_print_backends(&self) -> Option<glib::GString> {
1370 ObjectExt::property(self, "gtk-print-backends")
1371 }
1372
1373 #[doc(alias = "gtk-print-backends")]
1379 pub fn set_gtk_print_backends(&self, gtk_print_backends: Option<&str>) {
1380 ObjectExt::set_property(self, "gtk-print-backends", gtk_print_backends)
1381 }
1382
1383 #[doc(alias = "gtk-print-preview-command")]
1394 pub fn gtk_print_preview_command(&self) -> Option<glib::GString> {
1395 ObjectExt::property(self, "gtk-print-preview-command")
1396 }
1397
1398 #[doc(alias = "gtk-print-preview-command")]
1409 pub fn set_gtk_print_preview_command(&self, gtk_print_preview_command: Option<&str>) {
1410 ObjectExt::set_property(self, "gtk-print-preview-command", gtk_print_preview_command)
1411 }
1412
1413 #[doc(alias = "gtk-recent-files-enabled")]
1418 pub fn is_gtk_recent_files_enabled(&self) -> bool {
1419 ObjectExt::property(self, "gtk-recent-files-enabled")
1420 }
1421
1422 #[doc(alias = "gtk-recent-files-enabled")]
1427 pub fn set_gtk_recent_files_enabled(&self, gtk_recent_files_enabled: bool) {
1428 ObjectExt::set_property(self, "gtk-recent-files-enabled", gtk_recent_files_enabled)
1429 }
1430
1431 #[doc(alias = "gtk-recent-files-max-age")]
1438 pub fn gtk_recent_files_max_age(&self) -> i32 {
1439 ObjectExt::property(self, "gtk-recent-files-max-age")
1440 }
1441
1442 #[doc(alias = "gtk-recent-files-max-age")]
1449 pub fn set_gtk_recent_files_max_age(&self, gtk_recent_files_max_age: i32) {
1450 ObjectExt::set_property(self, "gtk-recent-files-max-age", gtk_recent_files_max_age)
1451 }
1452
1453 #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")]
1460 #[doc(alias = "gtk-shell-shows-app-menu")]
1461 pub fn is_gtk_shell_shows_app_menu(&self) -> bool {
1462 ObjectExt::property(self, "gtk-shell-shows-app-menu")
1463 }
1464
1465 #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")]
1472 #[doc(alias = "gtk-shell-shows-app-menu")]
1473 pub fn set_gtk_shell_shows_app_menu(&self, gtk_shell_shows_app_menu: bool) {
1474 ObjectExt::set_property(self, "gtk-shell-shows-app-menu", gtk_shell_shows_app_menu)
1475 }
1476
1477 #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")]
1484 #[doc(alias = "gtk-shell-shows-desktop")]
1485 pub fn is_gtk_shell_shows_desktop(&self) -> bool {
1486 ObjectExt::property(self, "gtk-shell-shows-desktop")
1487 }
1488
1489 #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")]
1496 #[doc(alias = "gtk-shell-shows-desktop")]
1497 pub fn set_gtk_shell_shows_desktop(&self, gtk_shell_shows_desktop: bool) {
1498 ObjectExt::set_property(self, "gtk-shell-shows-desktop", gtk_shell_shows_desktop)
1499 }
1500
1501 #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")]
1508 #[doc(alias = "gtk-shell-shows-menubar")]
1509 pub fn is_gtk_shell_shows_menubar(&self) -> bool {
1510 ObjectExt::property(self, "gtk-shell-shows-menubar")
1511 }
1512
1513 #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")]
1520 #[doc(alias = "gtk-shell-shows-menubar")]
1521 pub fn set_gtk_shell_shows_menubar(&self, gtk_shell_shows_menubar: bool) {
1522 ObjectExt::set_property(self, "gtk-shell-shows-menubar", gtk_shell_shows_menubar)
1523 }
1524
1525 #[cfg(feature = "v4_14")]
1527 #[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
1528 #[doc(alias = "gtk-show-status-shapes")]
1529 pub fn is_gtk_show_status_shapes(&self) -> bool {
1530 ObjectExt::property(self, "gtk-show-status-shapes")
1531 }
1532
1533 #[cfg(feature = "v4_14")]
1535 #[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
1536 #[doc(alias = "gtk-show-status-shapes")]
1537 pub fn set_gtk_show_status_shapes(&self, gtk_show_status_shapes: bool) {
1538 ObjectExt::set_property(self, "gtk-show-status-shapes", gtk_show_status_shapes)
1539 }
1540
1541 #[doc(alias = "gtk-sound-theme-name")]
1549 pub fn gtk_sound_theme_name(&self) -> Option<glib::GString> {
1550 ObjectExt::property(self, "gtk-sound-theme-name")
1551 }
1552
1553 #[doc(alias = "gtk-sound-theme-name")]
1561 pub fn set_gtk_sound_theme_name(&self, gtk_sound_theme_name: Option<&str>) {
1562 ObjectExt::set_property(self, "gtk-sound-theme-name", gtk_sound_theme_name)
1563 }
1564
1565 #[doc(alias = "gtk-split-cursor")]
1568 pub fn is_gtk_split_cursor(&self) -> bool {
1569 ObjectExt::property(self, "gtk-split-cursor")
1570 }
1571
1572 #[doc(alias = "gtk-split-cursor")]
1575 pub fn set_gtk_split_cursor(&self, gtk_split_cursor: bool) {
1576 ObjectExt::set_property(self, "gtk-split-cursor", gtk_split_cursor)
1577 }
1578
1579 #[doc(alias = "gtk-theme-name")]
1584 pub fn gtk_theme_name(&self) -> Option<glib::GString> {
1585 ObjectExt::property(self, "gtk-theme-name")
1586 }
1587
1588 #[doc(alias = "gtk-theme-name")]
1593 pub fn set_gtk_theme_name(&self, gtk_theme_name: Option<&str>) {
1594 ObjectExt::set_property(self, "gtk-theme-name", gtk_theme_name)
1595 }
1596
1597 #[doc(alias = "gtk-titlebar-double-click")]
1603 pub fn gtk_titlebar_double_click(&self) -> Option<glib::GString> {
1604 ObjectExt::property(self, "gtk-titlebar-double-click")
1605 }
1606
1607 #[doc(alias = "gtk-titlebar-double-click")]
1613 pub fn set_gtk_titlebar_double_click(&self, gtk_titlebar_double_click: Option<&str>) {
1614 ObjectExt::set_property(self, "gtk-titlebar-double-click", gtk_titlebar_double_click)
1615 }
1616
1617 #[doc(alias = "gtk-titlebar-middle-click")]
1623 pub fn gtk_titlebar_middle_click(&self) -> Option<glib::GString> {
1624 ObjectExt::property(self, "gtk-titlebar-middle-click")
1625 }
1626
1627 #[doc(alias = "gtk-titlebar-middle-click")]
1633 pub fn set_gtk_titlebar_middle_click(&self, gtk_titlebar_middle_click: Option<&str>) {
1634 ObjectExt::set_property(self, "gtk-titlebar-middle-click", gtk_titlebar_middle_click)
1635 }
1636
1637 #[doc(alias = "gtk-titlebar-right-click")]
1643 pub fn gtk_titlebar_right_click(&self) -> Option<glib::GString> {
1644 ObjectExt::property(self, "gtk-titlebar-right-click")
1645 }
1646
1647 #[doc(alias = "gtk-titlebar-right-click")]
1653 pub fn set_gtk_titlebar_right_click(&self, gtk_titlebar_right_click: Option<&str>) {
1654 ObjectExt::set_property(self, "gtk-titlebar-right-click", gtk_titlebar_right_click)
1655 }
1656
1657 #[doc(alias = "gtk-xft-antialias")]
1661 pub fn gtk_xft_antialias(&self) -> i32 {
1662 ObjectExt::property(self, "gtk-xft-antialias")
1663 }
1664
1665 #[doc(alias = "gtk-xft-antialias")]
1669 pub fn set_gtk_xft_antialias(&self, gtk_xft_antialias: i32) {
1670 ObjectExt::set_property(self, "gtk-xft-antialias", gtk_xft_antialias)
1671 }
1672
1673 #[doc(alias = "gtk-xft-dpi")]
1677 pub fn gtk_xft_dpi(&self) -> i32 {
1678 ObjectExt::property(self, "gtk-xft-dpi")
1679 }
1680
1681 #[doc(alias = "gtk-xft-dpi")]
1685 pub fn set_gtk_xft_dpi(&self, gtk_xft_dpi: i32) {
1686 ObjectExt::set_property(self, "gtk-xft-dpi", gtk_xft_dpi)
1687 }
1688
1689 #[doc(alias = "gtk-xft-hinting")]
1693 pub fn gtk_xft_hinting(&self) -> i32 {
1694 ObjectExt::property(self, "gtk-xft-hinting")
1695 }
1696
1697 #[doc(alias = "gtk-xft-hinting")]
1701 pub fn set_gtk_xft_hinting(&self, gtk_xft_hinting: i32) {
1702 ObjectExt::set_property(self, "gtk-xft-hinting", gtk_xft_hinting)
1703 }
1704
1705 #[doc(alias = "gtk-xft-hintstyle")]
1710 pub fn gtk_xft_hintstyle(&self) -> Option<glib::GString> {
1711 ObjectExt::property(self, "gtk-xft-hintstyle")
1712 }
1713
1714 #[doc(alias = "gtk-xft-hintstyle")]
1719 pub fn set_gtk_xft_hintstyle(&self, gtk_xft_hintstyle: Option<&str>) {
1720 ObjectExt::set_property(self, "gtk-xft-hintstyle", gtk_xft_hintstyle)
1721 }
1722
1723 #[doc(alias = "gtk-xft-rgba")]
1730 pub fn gtk_xft_rgba(&self) -> Option<glib::GString> {
1731 ObjectExt::property(self, "gtk-xft-rgba")
1732 }
1733
1734 #[doc(alias = "gtk-xft-rgba")]
1741 pub fn set_gtk_xft_rgba(&self, gtk_xft_rgba: Option<&str>) {
1742 ObjectExt::set_property(self, "gtk-xft-rgba", gtk_xft_rgba)
1743 }
1744
1745 #[doc(alias = "gtk_settings_get_default")]
1755 #[doc(alias = "get_default")]
1756 #[allow(clippy::should_implement_trait)]
1757 pub fn default() -> Option<Settings> {
1758 assert_initialized_main_thread!();
1759 unsafe { from_glib_none(ffi::gtk_settings_get_default()) }
1760 }
1761
1762 #[doc(alias = "gtk_settings_get_for_display")]
1770 #[doc(alias = "get_for_display")]
1771 pub fn for_display(display: &impl IsA<gdk::Display>) -> Settings {
1772 assert_initialized_main_thread!();
1773 unsafe {
1774 from_glib_none(ffi::gtk_settings_get_for_display(
1775 display.as_ref().to_glib_none().0,
1776 ))
1777 }
1778 }
1779
1780 #[doc(alias = "gtk-alternative-button-order")]
1781 pub fn connect_gtk_alternative_button_order_notify<F: Fn(&Self) + 'static>(
1782 &self,
1783 f: F,
1784 ) -> SignalHandlerId {
1785 unsafe extern "C" fn notify_gtk_alternative_button_order_trampoline<
1786 F: Fn(&Settings) + 'static,
1787 >(
1788 this: *mut ffi::GtkSettings,
1789 _param_spec: glib::ffi::gpointer,
1790 f: glib::ffi::gpointer,
1791 ) {
1792 unsafe {
1793 let f: &F = &*(f as *const F);
1794 f(&from_glib_borrow(this))
1795 }
1796 }
1797 unsafe {
1798 let f: Box_<F> = Box_::new(f);
1799 connect_raw(
1800 self.as_ptr() as *mut _,
1801 c"notify::gtk-alternative-button-order".as_ptr(),
1802 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1803 notify_gtk_alternative_button_order_trampoline::<F> as *const (),
1804 )),
1805 Box_::into_raw(f),
1806 )
1807 }
1808 }
1809
1810 #[doc(alias = "gtk-alternative-sort-arrows")]
1811 pub fn connect_gtk_alternative_sort_arrows_notify<F: Fn(&Self) + 'static>(
1812 &self,
1813 f: F,
1814 ) -> SignalHandlerId {
1815 unsafe extern "C" fn notify_gtk_alternative_sort_arrows_trampoline<
1816 F: Fn(&Settings) + 'static,
1817 >(
1818 this: *mut ffi::GtkSettings,
1819 _param_spec: glib::ffi::gpointer,
1820 f: glib::ffi::gpointer,
1821 ) {
1822 unsafe {
1823 let f: &F = &*(f as *const F);
1824 f(&from_glib_borrow(this))
1825 }
1826 }
1827 unsafe {
1828 let f: Box_<F> = Box_::new(f);
1829 connect_raw(
1830 self.as_ptr() as *mut _,
1831 c"notify::gtk-alternative-sort-arrows".as_ptr(),
1832 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1833 notify_gtk_alternative_sort_arrows_trampoline::<F> as *const (),
1834 )),
1835 Box_::into_raw(f),
1836 )
1837 }
1838 }
1839
1840 #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")]
1841 #[doc(alias = "gtk-application-prefer-dark-theme")]
1842 pub fn connect_gtk_application_prefer_dark_theme_notify<F: Fn(&Self) + 'static>(
1843 &self,
1844 f: F,
1845 ) -> SignalHandlerId {
1846 unsafe extern "C" fn notify_gtk_application_prefer_dark_theme_trampoline<
1847 F: Fn(&Settings) + 'static,
1848 >(
1849 this: *mut ffi::GtkSettings,
1850 _param_spec: glib::ffi::gpointer,
1851 f: glib::ffi::gpointer,
1852 ) {
1853 unsafe {
1854 let f: &F = &*(f as *const F);
1855 f(&from_glib_borrow(this))
1856 }
1857 }
1858 unsafe {
1859 let f: Box_<F> = Box_::new(f);
1860 connect_raw(
1861 self.as_ptr() as *mut _,
1862 c"notify::gtk-application-prefer-dark-theme".as_ptr(),
1863 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1864 notify_gtk_application_prefer_dark_theme_trampoline::<F> as *const (),
1865 )),
1866 Box_::into_raw(f),
1867 )
1868 }
1869 }
1870
1871 #[doc(alias = "gtk-cursor-aspect-ratio")]
1872 pub fn connect_gtk_cursor_aspect_ratio_notify<F: Fn(&Self) + 'static>(
1873 &self,
1874 f: F,
1875 ) -> SignalHandlerId {
1876 unsafe extern "C" fn notify_gtk_cursor_aspect_ratio_trampoline<
1877 F: Fn(&Settings) + 'static,
1878 >(
1879 this: *mut ffi::GtkSettings,
1880 _param_spec: glib::ffi::gpointer,
1881 f: glib::ffi::gpointer,
1882 ) {
1883 unsafe {
1884 let f: &F = &*(f as *const F);
1885 f(&from_glib_borrow(this))
1886 }
1887 }
1888 unsafe {
1889 let f: Box_<F> = Box_::new(f);
1890 connect_raw(
1891 self.as_ptr() as *mut _,
1892 c"notify::gtk-cursor-aspect-ratio".as_ptr(),
1893 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1894 notify_gtk_cursor_aspect_ratio_trampoline::<F> as *const (),
1895 )),
1896 Box_::into_raw(f),
1897 )
1898 }
1899 }
1900
1901 #[doc(alias = "gtk-cursor-blink")]
1902 pub fn connect_gtk_cursor_blink_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1903 unsafe extern "C" fn notify_gtk_cursor_blink_trampoline<F: Fn(&Settings) + 'static>(
1904 this: *mut ffi::GtkSettings,
1905 _param_spec: glib::ffi::gpointer,
1906 f: glib::ffi::gpointer,
1907 ) {
1908 unsafe {
1909 let f: &F = &*(f as *const F);
1910 f(&from_glib_borrow(this))
1911 }
1912 }
1913 unsafe {
1914 let f: Box_<F> = Box_::new(f);
1915 connect_raw(
1916 self.as_ptr() as *mut _,
1917 c"notify::gtk-cursor-blink".as_ptr(),
1918 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1919 notify_gtk_cursor_blink_trampoline::<F> as *const (),
1920 )),
1921 Box_::into_raw(f),
1922 )
1923 }
1924 }
1925
1926 #[doc(alias = "gtk-cursor-blink-time")]
1927 pub fn connect_gtk_cursor_blink_time_notify<F: Fn(&Self) + 'static>(
1928 &self,
1929 f: F,
1930 ) -> SignalHandlerId {
1931 unsafe extern "C" fn notify_gtk_cursor_blink_time_trampoline<F: Fn(&Settings) + 'static>(
1932 this: *mut ffi::GtkSettings,
1933 _param_spec: glib::ffi::gpointer,
1934 f: glib::ffi::gpointer,
1935 ) {
1936 unsafe {
1937 let f: &F = &*(f as *const F);
1938 f(&from_glib_borrow(this))
1939 }
1940 }
1941 unsafe {
1942 let f: Box_<F> = Box_::new(f);
1943 connect_raw(
1944 self.as_ptr() as *mut _,
1945 c"notify::gtk-cursor-blink-time".as_ptr(),
1946 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1947 notify_gtk_cursor_blink_time_trampoline::<F> as *const (),
1948 )),
1949 Box_::into_raw(f),
1950 )
1951 }
1952 }
1953
1954 #[doc(alias = "gtk-cursor-blink-timeout")]
1955 pub fn connect_gtk_cursor_blink_timeout_notify<F: Fn(&Self) + 'static>(
1956 &self,
1957 f: F,
1958 ) -> SignalHandlerId {
1959 unsafe extern "C" fn notify_gtk_cursor_blink_timeout_trampoline<
1960 F: Fn(&Settings) + 'static,
1961 >(
1962 this: *mut ffi::GtkSettings,
1963 _param_spec: glib::ffi::gpointer,
1964 f: glib::ffi::gpointer,
1965 ) {
1966 unsafe {
1967 let f: &F = &*(f as *const F);
1968 f(&from_glib_borrow(this))
1969 }
1970 }
1971 unsafe {
1972 let f: Box_<F> = Box_::new(f);
1973 connect_raw(
1974 self.as_ptr() as *mut _,
1975 c"notify::gtk-cursor-blink-timeout".as_ptr(),
1976 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1977 notify_gtk_cursor_blink_timeout_trampoline::<F> as *const (),
1978 )),
1979 Box_::into_raw(f),
1980 )
1981 }
1982 }
1983
1984 #[doc(alias = "gtk-cursor-theme-name")]
1985 pub fn connect_gtk_cursor_theme_name_notify<F: Fn(&Self) + 'static>(
1986 &self,
1987 f: F,
1988 ) -> SignalHandlerId {
1989 unsafe extern "C" fn notify_gtk_cursor_theme_name_trampoline<F: Fn(&Settings) + 'static>(
1990 this: *mut ffi::GtkSettings,
1991 _param_spec: glib::ffi::gpointer,
1992 f: glib::ffi::gpointer,
1993 ) {
1994 unsafe {
1995 let f: &F = &*(f as *const F);
1996 f(&from_glib_borrow(this))
1997 }
1998 }
1999 unsafe {
2000 let f: Box_<F> = Box_::new(f);
2001 connect_raw(
2002 self.as_ptr() as *mut _,
2003 c"notify::gtk-cursor-theme-name".as_ptr(),
2004 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2005 notify_gtk_cursor_theme_name_trampoline::<F> as *const (),
2006 )),
2007 Box_::into_raw(f),
2008 )
2009 }
2010 }
2011
2012 #[doc(alias = "gtk-cursor-theme-size")]
2013 pub fn connect_gtk_cursor_theme_size_notify<F: Fn(&Self) + 'static>(
2014 &self,
2015 f: F,
2016 ) -> SignalHandlerId {
2017 unsafe extern "C" fn notify_gtk_cursor_theme_size_trampoline<F: Fn(&Settings) + 'static>(
2018 this: *mut ffi::GtkSettings,
2019 _param_spec: glib::ffi::gpointer,
2020 f: glib::ffi::gpointer,
2021 ) {
2022 unsafe {
2023 let f: &F = &*(f as *const F);
2024 f(&from_glib_borrow(this))
2025 }
2026 }
2027 unsafe {
2028 let f: Box_<F> = Box_::new(f);
2029 connect_raw(
2030 self.as_ptr() as *mut _,
2031 c"notify::gtk-cursor-theme-size".as_ptr(),
2032 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2033 notify_gtk_cursor_theme_size_trampoline::<F> as *const (),
2034 )),
2035 Box_::into_raw(f),
2036 )
2037 }
2038 }
2039
2040 #[doc(alias = "gtk-decoration-layout")]
2041 pub fn connect_gtk_decoration_layout_notify<F: Fn(&Self) + 'static>(
2042 &self,
2043 f: F,
2044 ) -> SignalHandlerId {
2045 unsafe extern "C" fn notify_gtk_decoration_layout_trampoline<F: Fn(&Settings) + 'static>(
2046 this: *mut ffi::GtkSettings,
2047 _param_spec: glib::ffi::gpointer,
2048 f: glib::ffi::gpointer,
2049 ) {
2050 unsafe {
2051 let f: &F = &*(f as *const F);
2052 f(&from_glib_borrow(this))
2053 }
2054 }
2055 unsafe {
2056 let f: Box_<F> = Box_::new(f);
2057 connect_raw(
2058 self.as_ptr() as *mut _,
2059 c"notify::gtk-decoration-layout".as_ptr(),
2060 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2061 notify_gtk_decoration_layout_trampoline::<F> as *const (),
2062 )),
2063 Box_::into_raw(f),
2064 )
2065 }
2066 }
2067
2068 #[doc(alias = "gtk-dialogs-use-header")]
2069 pub fn connect_gtk_dialogs_use_header_notify<F: Fn(&Self) + 'static>(
2070 &self,
2071 f: F,
2072 ) -> SignalHandlerId {
2073 unsafe extern "C" fn notify_gtk_dialogs_use_header_trampoline<
2074 F: Fn(&Settings) + 'static,
2075 >(
2076 this: *mut ffi::GtkSettings,
2077 _param_spec: glib::ffi::gpointer,
2078 f: glib::ffi::gpointer,
2079 ) {
2080 unsafe {
2081 let f: &F = &*(f as *const F);
2082 f(&from_glib_borrow(this))
2083 }
2084 }
2085 unsafe {
2086 let f: Box_<F> = Box_::new(f);
2087 connect_raw(
2088 self.as_ptr() as *mut _,
2089 c"notify::gtk-dialogs-use-header".as_ptr(),
2090 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2091 notify_gtk_dialogs_use_header_trampoline::<F> as *const (),
2092 )),
2093 Box_::into_raw(f),
2094 )
2095 }
2096 }
2097
2098 #[doc(alias = "gtk-dnd-drag-threshold")]
2099 pub fn connect_gtk_dnd_drag_threshold_notify<F: Fn(&Self) + 'static>(
2100 &self,
2101 f: F,
2102 ) -> SignalHandlerId {
2103 unsafe extern "C" fn notify_gtk_dnd_drag_threshold_trampoline<
2104 F: Fn(&Settings) + 'static,
2105 >(
2106 this: *mut ffi::GtkSettings,
2107 _param_spec: glib::ffi::gpointer,
2108 f: glib::ffi::gpointer,
2109 ) {
2110 unsafe {
2111 let f: &F = &*(f as *const F);
2112 f(&from_glib_borrow(this))
2113 }
2114 }
2115 unsafe {
2116 let f: Box_<F> = Box_::new(f);
2117 connect_raw(
2118 self.as_ptr() as *mut _,
2119 c"notify::gtk-dnd-drag-threshold".as_ptr(),
2120 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2121 notify_gtk_dnd_drag_threshold_trampoline::<F> as *const (),
2122 )),
2123 Box_::into_raw(f),
2124 )
2125 }
2126 }
2127
2128 #[doc(alias = "gtk-double-click-distance")]
2129 pub fn connect_gtk_double_click_distance_notify<F: Fn(&Self) + 'static>(
2130 &self,
2131 f: F,
2132 ) -> SignalHandlerId {
2133 unsafe extern "C" fn notify_gtk_double_click_distance_trampoline<
2134 F: Fn(&Settings) + 'static,
2135 >(
2136 this: *mut ffi::GtkSettings,
2137 _param_spec: glib::ffi::gpointer,
2138 f: glib::ffi::gpointer,
2139 ) {
2140 unsafe {
2141 let f: &F = &*(f as *const F);
2142 f(&from_glib_borrow(this))
2143 }
2144 }
2145 unsafe {
2146 let f: Box_<F> = Box_::new(f);
2147 connect_raw(
2148 self.as_ptr() as *mut _,
2149 c"notify::gtk-double-click-distance".as_ptr(),
2150 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2151 notify_gtk_double_click_distance_trampoline::<F> as *const (),
2152 )),
2153 Box_::into_raw(f),
2154 )
2155 }
2156 }
2157
2158 #[doc(alias = "gtk-double-click-time")]
2159 pub fn connect_gtk_double_click_time_notify<F: Fn(&Self) + 'static>(
2160 &self,
2161 f: F,
2162 ) -> SignalHandlerId {
2163 unsafe extern "C" fn notify_gtk_double_click_time_trampoline<F: Fn(&Settings) + 'static>(
2164 this: *mut ffi::GtkSettings,
2165 _param_spec: glib::ffi::gpointer,
2166 f: glib::ffi::gpointer,
2167 ) {
2168 unsafe {
2169 let f: &F = &*(f as *const F);
2170 f(&from_glib_borrow(this))
2171 }
2172 }
2173 unsafe {
2174 let f: Box_<F> = Box_::new(f);
2175 connect_raw(
2176 self.as_ptr() as *mut _,
2177 c"notify::gtk-double-click-time".as_ptr(),
2178 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2179 notify_gtk_double_click_time_trampoline::<F> as *const (),
2180 )),
2181 Box_::into_raw(f),
2182 )
2183 }
2184 }
2185
2186 #[doc(alias = "gtk-enable-accels")]
2187 pub fn connect_gtk_enable_accels_notify<F: Fn(&Self) + 'static>(
2188 &self,
2189 f: F,
2190 ) -> SignalHandlerId {
2191 unsafe extern "C" fn notify_gtk_enable_accels_trampoline<F: Fn(&Settings) + 'static>(
2192 this: *mut ffi::GtkSettings,
2193 _param_spec: glib::ffi::gpointer,
2194 f: glib::ffi::gpointer,
2195 ) {
2196 unsafe {
2197 let f: &F = &*(f as *const F);
2198 f(&from_glib_borrow(this))
2199 }
2200 }
2201 unsafe {
2202 let f: Box_<F> = Box_::new(f);
2203 connect_raw(
2204 self.as_ptr() as *mut _,
2205 c"notify::gtk-enable-accels".as_ptr(),
2206 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2207 notify_gtk_enable_accels_trampoline::<F> as *const (),
2208 )),
2209 Box_::into_raw(f),
2210 )
2211 }
2212 }
2213
2214 #[doc(alias = "gtk-enable-animations")]
2215 pub fn connect_gtk_enable_animations_notify<F: Fn(&Self) + 'static>(
2216 &self,
2217 f: F,
2218 ) -> SignalHandlerId {
2219 unsafe extern "C" fn notify_gtk_enable_animations_trampoline<F: Fn(&Settings) + 'static>(
2220 this: *mut ffi::GtkSettings,
2221 _param_spec: glib::ffi::gpointer,
2222 f: glib::ffi::gpointer,
2223 ) {
2224 unsafe {
2225 let f: &F = &*(f as *const F);
2226 f(&from_glib_borrow(this))
2227 }
2228 }
2229 unsafe {
2230 let f: Box_<F> = Box_::new(f);
2231 connect_raw(
2232 self.as_ptr() as *mut _,
2233 c"notify::gtk-enable-animations".as_ptr(),
2234 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2235 notify_gtk_enable_animations_trampoline::<F> as *const (),
2236 )),
2237 Box_::into_raw(f),
2238 )
2239 }
2240 }
2241
2242 #[doc(alias = "gtk-enable-event-sounds")]
2243 pub fn connect_gtk_enable_event_sounds_notify<F: Fn(&Self) + 'static>(
2244 &self,
2245 f: F,
2246 ) -> SignalHandlerId {
2247 unsafe extern "C" fn notify_gtk_enable_event_sounds_trampoline<
2248 F: Fn(&Settings) + 'static,
2249 >(
2250 this: *mut ffi::GtkSettings,
2251 _param_spec: glib::ffi::gpointer,
2252 f: glib::ffi::gpointer,
2253 ) {
2254 unsafe {
2255 let f: &F = &*(f as *const F);
2256 f(&from_glib_borrow(this))
2257 }
2258 }
2259 unsafe {
2260 let f: Box_<F> = Box_::new(f);
2261 connect_raw(
2262 self.as_ptr() as *mut _,
2263 c"notify::gtk-enable-event-sounds".as_ptr(),
2264 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2265 notify_gtk_enable_event_sounds_trampoline::<F> as *const (),
2266 )),
2267 Box_::into_raw(f),
2268 )
2269 }
2270 }
2271
2272 #[doc(alias = "gtk-enable-input-feedback-sounds")]
2273 pub fn connect_gtk_enable_input_feedback_sounds_notify<F: Fn(&Self) + 'static>(
2274 &self,
2275 f: F,
2276 ) -> SignalHandlerId {
2277 unsafe extern "C" fn notify_gtk_enable_input_feedback_sounds_trampoline<
2278 F: Fn(&Settings) + 'static,
2279 >(
2280 this: *mut ffi::GtkSettings,
2281 _param_spec: glib::ffi::gpointer,
2282 f: glib::ffi::gpointer,
2283 ) {
2284 unsafe {
2285 let f: &F = &*(f as *const F);
2286 f(&from_glib_borrow(this))
2287 }
2288 }
2289 unsafe {
2290 let f: Box_<F> = Box_::new(f);
2291 connect_raw(
2292 self.as_ptr() as *mut _,
2293 c"notify::gtk-enable-input-feedback-sounds".as_ptr(),
2294 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2295 notify_gtk_enable_input_feedback_sounds_trampoline::<F> as *const (),
2296 )),
2297 Box_::into_raw(f),
2298 )
2299 }
2300 }
2301
2302 #[doc(alias = "gtk-enable-primary-paste")]
2303 pub fn connect_gtk_enable_primary_paste_notify<F: Fn(&Self) + 'static>(
2304 &self,
2305 f: F,
2306 ) -> SignalHandlerId {
2307 unsafe extern "C" fn notify_gtk_enable_primary_paste_trampoline<
2308 F: Fn(&Settings) + 'static,
2309 >(
2310 this: *mut ffi::GtkSettings,
2311 _param_spec: glib::ffi::gpointer,
2312 f: glib::ffi::gpointer,
2313 ) {
2314 unsafe {
2315 let f: &F = &*(f as *const F);
2316 f(&from_glib_borrow(this))
2317 }
2318 }
2319 unsafe {
2320 let f: Box_<F> = Box_::new(f);
2321 connect_raw(
2322 self.as_ptr() as *mut _,
2323 c"notify::gtk-enable-primary-paste".as_ptr(),
2324 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2325 notify_gtk_enable_primary_paste_trampoline::<F> as *const (),
2326 )),
2327 Box_::into_raw(f),
2328 )
2329 }
2330 }
2331
2332 #[doc(alias = "gtk-entry-password-hint-timeout")]
2333 pub fn connect_gtk_entry_password_hint_timeout_notify<F: Fn(&Self) + 'static>(
2334 &self,
2335 f: F,
2336 ) -> SignalHandlerId {
2337 unsafe extern "C" fn notify_gtk_entry_password_hint_timeout_trampoline<
2338 F: Fn(&Settings) + 'static,
2339 >(
2340 this: *mut ffi::GtkSettings,
2341 _param_spec: glib::ffi::gpointer,
2342 f: glib::ffi::gpointer,
2343 ) {
2344 unsafe {
2345 let f: &F = &*(f as *const F);
2346 f(&from_glib_borrow(this))
2347 }
2348 }
2349 unsafe {
2350 let f: Box_<F> = Box_::new(f);
2351 connect_raw(
2352 self.as_ptr() as *mut _,
2353 c"notify::gtk-entry-password-hint-timeout".as_ptr(),
2354 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2355 notify_gtk_entry_password_hint_timeout_trampoline::<F> as *const (),
2356 )),
2357 Box_::into_raw(f),
2358 )
2359 }
2360 }
2361
2362 #[doc(alias = "gtk-entry-select-on-focus")]
2363 pub fn connect_gtk_entry_select_on_focus_notify<F: Fn(&Self) + 'static>(
2364 &self,
2365 f: F,
2366 ) -> SignalHandlerId {
2367 unsafe extern "C" fn notify_gtk_entry_select_on_focus_trampoline<
2368 F: Fn(&Settings) + 'static,
2369 >(
2370 this: *mut ffi::GtkSettings,
2371 _param_spec: glib::ffi::gpointer,
2372 f: glib::ffi::gpointer,
2373 ) {
2374 unsafe {
2375 let f: &F = &*(f as *const F);
2376 f(&from_glib_borrow(this))
2377 }
2378 }
2379 unsafe {
2380 let f: Box_<F> = Box_::new(f);
2381 connect_raw(
2382 self.as_ptr() as *mut _,
2383 c"notify::gtk-entry-select-on-focus".as_ptr(),
2384 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2385 notify_gtk_entry_select_on_focus_trampoline::<F> as *const (),
2386 )),
2387 Box_::into_raw(f),
2388 )
2389 }
2390 }
2391
2392 #[doc(alias = "gtk-error-bell")]
2393 pub fn connect_gtk_error_bell_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2394 unsafe extern "C" fn notify_gtk_error_bell_trampoline<F: Fn(&Settings) + 'static>(
2395 this: *mut ffi::GtkSettings,
2396 _param_spec: glib::ffi::gpointer,
2397 f: glib::ffi::gpointer,
2398 ) {
2399 unsafe {
2400 let f: &F = &*(f as *const F);
2401 f(&from_glib_borrow(this))
2402 }
2403 }
2404 unsafe {
2405 let f: Box_<F> = Box_::new(f);
2406 connect_raw(
2407 self.as_ptr() as *mut _,
2408 c"notify::gtk-error-bell".as_ptr(),
2409 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2410 notify_gtk_error_bell_trampoline::<F> as *const (),
2411 )),
2412 Box_::into_raw(f),
2413 )
2414 }
2415 }
2416
2417 #[doc(alias = "gtk-font-name")]
2418 pub fn connect_gtk_font_name_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2419 unsafe extern "C" fn notify_gtk_font_name_trampoline<F: Fn(&Settings) + 'static>(
2420 this: *mut ffi::GtkSettings,
2421 _param_spec: glib::ffi::gpointer,
2422 f: glib::ffi::gpointer,
2423 ) {
2424 unsafe {
2425 let f: &F = &*(f as *const F);
2426 f(&from_glib_borrow(this))
2427 }
2428 }
2429 unsafe {
2430 let f: Box_<F> = Box_::new(f);
2431 connect_raw(
2432 self.as_ptr() as *mut _,
2433 c"notify::gtk-font-name".as_ptr(),
2434 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2435 notify_gtk_font_name_trampoline::<F> as *const (),
2436 )),
2437 Box_::into_raw(f),
2438 )
2439 }
2440 }
2441
2442 #[cfg(feature = "v4_16")]
2443 #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))]
2444 #[doc(alias = "gtk-font-rendering")]
2445 pub fn connect_gtk_font_rendering_notify<F: Fn(&Self) + 'static>(
2446 &self,
2447 f: F,
2448 ) -> SignalHandlerId {
2449 unsafe extern "C" fn notify_gtk_font_rendering_trampoline<F: Fn(&Settings) + 'static>(
2450 this: *mut ffi::GtkSettings,
2451 _param_spec: glib::ffi::gpointer,
2452 f: glib::ffi::gpointer,
2453 ) {
2454 unsafe {
2455 let f: &F = &*(f as *const F);
2456 f(&from_glib_borrow(this))
2457 }
2458 }
2459 unsafe {
2460 let f: Box_<F> = Box_::new(f);
2461 connect_raw(
2462 self.as_ptr() as *mut _,
2463 c"notify::gtk-font-rendering".as_ptr(),
2464 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2465 notify_gtk_font_rendering_trampoline::<F> as *const (),
2466 )),
2467 Box_::into_raw(f),
2468 )
2469 }
2470 }
2471
2472 #[doc(alias = "gtk-fontconfig-timestamp")]
2473 pub fn connect_gtk_fontconfig_timestamp_notify<F: Fn(&Self) + 'static>(
2474 &self,
2475 f: F,
2476 ) -> SignalHandlerId {
2477 unsafe extern "C" fn notify_gtk_fontconfig_timestamp_trampoline<
2478 F: Fn(&Settings) + 'static,
2479 >(
2480 this: *mut ffi::GtkSettings,
2481 _param_spec: glib::ffi::gpointer,
2482 f: glib::ffi::gpointer,
2483 ) {
2484 unsafe {
2485 let f: &F = &*(f as *const F);
2486 f(&from_glib_borrow(this))
2487 }
2488 }
2489 unsafe {
2490 let f: Box_<F> = Box_::new(f);
2491 connect_raw(
2492 self.as_ptr() as *mut _,
2493 c"notify::gtk-fontconfig-timestamp".as_ptr(),
2494 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2495 notify_gtk_fontconfig_timestamp_trampoline::<F> as *const (),
2496 )),
2497 Box_::into_raw(f),
2498 )
2499 }
2500 }
2501
2502 #[cfg(feature = "v4_6")]
2503 #[cfg_attr(docsrs, doc(cfg(feature = "v4_6")))]
2504 #[doc(alias = "gtk-hint-font-metrics")]
2505 pub fn connect_gtk_hint_font_metrics_notify<F: Fn(&Self) + 'static>(
2506 &self,
2507 f: F,
2508 ) -> SignalHandlerId {
2509 unsafe extern "C" fn notify_gtk_hint_font_metrics_trampoline<F: Fn(&Settings) + 'static>(
2510 this: *mut ffi::GtkSettings,
2511 _param_spec: glib::ffi::gpointer,
2512 f: glib::ffi::gpointer,
2513 ) {
2514 unsafe {
2515 let f: &F = &*(f as *const F);
2516 f(&from_glib_borrow(this))
2517 }
2518 }
2519 unsafe {
2520 let f: Box_<F> = Box_::new(f);
2521 connect_raw(
2522 self.as_ptr() as *mut _,
2523 c"notify::gtk-hint-font-metrics".as_ptr(),
2524 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2525 notify_gtk_hint_font_metrics_trampoline::<F> as *const (),
2526 )),
2527 Box_::into_raw(f),
2528 )
2529 }
2530 }
2531
2532 #[doc(alias = "gtk-icon-theme-name")]
2533 pub fn connect_gtk_icon_theme_name_notify<F: Fn(&Self) + 'static>(
2534 &self,
2535 f: F,
2536 ) -> SignalHandlerId {
2537 unsafe extern "C" fn notify_gtk_icon_theme_name_trampoline<F: Fn(&Settings) + 'static>(
2538 this: *mut ffi::GtkSettings,
2539 _param_spec: glib::ffi::gpointer,
2540 f: glib::ffi::gpointer,
2541 ) {
2542 unsafe {
2543 let f: &F = &*(f as *const F);
2544 f(&from_glib_borrow(this))
2545 }
2546 }
2547 unsafe {
2548 let f: Box_<F> = Box_::new(f);
2549 connect_raw(
2550 self.as_ptr() as *mut _,
2551 c"notify::gtk-icon-theme-name".as_ptr(),
2552 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2553 notify_gtk_icon_theme_name_trampoline::<F> as *const (),
2554 )),
2555 Box_::into_raw(f),
2556 )
2557 }
2558 }
2559
2560 #[doc(alias = "gtk-im-module")]
2561 pub fn connect_gtk_im_module_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2562 unsafe extern "C" fn notify_gtk_im_module_trampoline<F: Fn(&Settings) + 'static>(
2563 this: *mut ffi::GtkSettings,
2564 _param_spec: glib::ffi::gpointer,
2565 f: glib::ffi::gpointer,
2566 ) {
2567 unsafe {
2568 let f: &F = &*(f as *const F);
2569 f(&from_glib_borrow(this))
2570 }
2571 }
2572 unsafe {
2573 let f: Box_<F> = Box_::new(f);
2574 connect_raw(
2575 self.as_ptr() as *mut _,
2576 c"notify::gtk-im-module".as_ptr(),
2577 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2578 notify_gtk_im_module_trampoline::<F> as *const (),
2579 )),
2580 Box_::into_raw(f),
2581 )
2582 }
2583 }
2584
2585 #[cfg(feature = "v4_20")]
2586 #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))]
2587 #[doc(alias = "gtk-interface-color-scheme")]
2588 pub fn connect_gtk_interface_color_scheme_notify<F: Fn(&Self) + 'static>(
2589 &self,
2590 f: F,
2591 ) -> SignalHandlerId {
2592 unsafe extern "C" fn notify_gtk_interface_color_scheme_trampoline<
2593 F: Fn(&Settings) + 'static,
2594 >(
2595 this: *mut ffi::GtkSettings,
2596 _param_spec: glib::ffi::gpointer,
2597 f: glib::ffi::gpointer,
2598 ) {
2599 unsafe {
2600 let f: &F = &*(f as *const F);
2601 f(&from_glib_borrow(this))
2602 }
2603 }
2604 unsafe {
2605 let f: Box_<F> = Box_::new(f);
2606 connect_raw(
2607 self.as_ptr() as *mut _,
2608 c"notify::gtk-interface-color-scheme".as_ptr(),
2609 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2610 notify_gtk_interface_color_scheme_trampoline::<F> as *const (),
2611 )),
2612 Box_::into_raw(f),
2613 )
2614 }
2615 }
2616
2617 #[cfg(feature = "v4_20")]
2618 #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))]
2619 #[doc(alias = "gtk-interface-contrast")]
2620 pub fn connect_gtk_interface_contrast_notify<F: Fn(&Self) + 'static>(
2621 &self,
2622 f: F,
2623 ) -> SignalHandlerId {
2624 unsafe extern "C" fn notify_gtk_interface_contrast_trampoline<
2625 F: Fn(&Settings) + 'static,
2626 >(
2627 this: *mut ffi::GtkSettings,
2628 _param_spec: glib::ffi::gpointer,
2629 f: glib::ffi::gpointer,
2630 ) {
2631 unsafe {
2632 let f: &F = &*(f as *const F);
2633 f(&from_glib_borrow(this))
2634 }
2635 }
2636 unsafe {
2637 let f: Box_<F> = Box_::new(f);
2638 connect_raw(
2639 self.as_ptr() as *mut _,
2640 c"notify::gtk-interface-contrast".as_ptr(),
2641 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2642 notify_gtk_interface_contrast_trampoline::<F> as *const (),
2643 )),
2644 Box_::into_raw(f),
2645 )
2646 }
2647 }
2648
2649 #[cfg(feature = "v4_22")]
2650 #[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))]
2651 #[doc(alias = "gtk-interface-reduced-motion")]
2652 pub fn connect_gtk_interface_reduced_motion_notify<F: Fn(&Self) + 'static>(
2653 &self,
2654 f: F,
2655 ) -> SignalHandlerId {
2656 unsafe extern "C" fn notify_gtk_interface_reduced_motion_trampoline<
2657 F: Fn(&Settings) + 'static,
2658 >(
2659 this: *mut ffi::GtkSettings,
2660 _param_spec: glib::ffi::gpointer,
2661 f: glib::ffi::gpointer,
2662 ) {
2663 unsafe {
2664 let f: &F = &*(f as *const F);
2665 f(&from_glib_borrow(this))
2666 }
2667 }
2668 unsafe {
2669 let f: Box_<F> = Box_::new(f);
2670 connect_raw(
2671 self.as_ptr() as *mut _,
2672 c"notify::gtk-interface-reduced-motion".as_ptr(),
2673 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2674 notify_gtk_interface_reduced_motion_trampoline::<F> as *const (),
2675 )),
2676 Box_::into_raw(f),
2677 )
2678 }
2679 }
2680
2681 #[doc(alias = "gtk-keynav-use-caret")]
2682 pub fn connect_gtk_keynav_use_caret_notify<F: Fn(&Self) + 'static>(
2683 &self,
2684 f: F,
2685 ) -> SignalHandlerId {
2686 unsafe extern "C" fn notify_gtk_keynav_use_caret_trampoline<F: Fn(&Settings) + 'static>(
2687 this: *mut ffi::GtkSettings,
2688 _param_spec: glib::ffi::gpointer,
2689 f: glib::ffi::gpointer,
2690 ) {
2691 unsafe {
2692 let f: &F = &*(f as *const F);
2693 f(&from_glib_borrow(this))
2694 }
2695 }
2696 unsafe {
2697 let f: Box_<F> = Box_::new(f);
2698 connect_raw(
2699 self.as_ptr() as *mut _,
2700 c"notify::gtk-keynav-use-caret".as_ptr(),
2701 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2702 notify_gtk_keynav_use_caret_trampoline::<F> as *const (),
2703 )),
2704 Box_::into_raw(f),
2705 )
2706 }
2707 }
2708
2709 #[doc(alias = "gtk-label-select-on-focus")]
2710 pub fn connect_gtk_label_select_on_focus_notify<F: Fn(&Self) + 'static>(
2711 &self,
2712 f: F,
2713 ) -> SignalHandlerId {
2714 unsafe extern "C" fn notify_gtk_label_select_on_focus_trampoline<
2715 F: Fn(&Settings) + 'static,
2716 >(
2717 this: *mut ffi::GtkSettings,
2718 _param_spec: glib::ffi::gpointer,
2719 f: glib::ffi::gpointer,
2720 ) {
2721 unsafe {
2722 let f: &F = &*(f as *const F);
2723 f(&from_glib_borrow(this))
2724 }
2725 }
2726 unsafe {
2727 let f: Box_<F> = Box_::new(f);
2728 connect_raw(
2729 self.as_ptr() as *mut _,
2730 c"notify::gtk-label-select-on-focus".as_ptr(),
2731 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2732 notify_gtk_label_select_on_focus_trampoline::<F> as *const (),
2733 )),
2734 Box_::into_raw(f),
2735 )
2736 }
2737 }
2738
2739 #[doc(alias = "gtk-long-press-time")]
2740 pub fn connect_gtk_long_press_time_notify<F: Fn(&Self) + 'static>(
2741 &self,
2742 f: F,
2743 ) -> SignalHandlerId {
2744 unsafe extern "C" fn notify_gtk_long_press_time_trampoline<F: Fn(&Settings) + 'static>(
2745 this: *mut ffi::GtkSettings,
2746 _param_spec: glib::ffi::gpointer,
2747 f: glib::ffi::gpointer,
2748 ) {
2749 unsafe {
2750 let f: &F = &*(f as *const F);
2751 f(&from_glib_borrow(this))
2752 }
2753 }
2754 unsafe {
2755 let f: Box_<F> = Box_::new(f);
2756 connect_raw(
2757 self.as_ptr() as *mut _,
2758 c"notify::gtk-long-press-time".as_ptr(),
2759 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2760 notify_gtk_long_press_time_trampoline::<F> as *const (),
2761 )),
2762 Box_::into_raw(f),
2763 )
2764 }
2765 }
2766
2767 #[doc(alias = "gtk-overlay-scrolling")]
2768 pub fn connect_gtk_overlay_scrolling_notify<F: Fn(&Self) + 'static>(
2769 &self,
2770 f: F,
2771 ) -> SignalHandlerId {
2772 unsafe extern "C" fn notify_gtk_overlay_scrolling_trampoline<F: Fn(&Settings) + 'static>(
2773 this: *mut ffi::GtkSettings,
2774 _param_spec: glib::ffi::gpointer,
2775 f: glib::ffi::gpointer,
2776 ) {
2777 unsafe {
2778 let f: &F = &*(f as *const F);
2779 f(&from_glib_borrow(this))
2780 }
2781 }
2782 unsafe {
2783 let f: Box_<F> = Box_::new(f);
2784 connect_raw(
2785 self.as_ptr() as *mut _,
2786 c"notify::gtk-overlay-scrolling".as_ptr(),
2787 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2788 notify_gtk_overlay_scrolling_trampoline::<F> as *const (),
2789 )),
2790 Box_::into_raw(f),
2791 )
2792 }
2793 }
2794
2795 #[doc(alias = "gtk-primary-button-warps-slider")]
2796 pub fn connect_gtk_primary_button_warps_slider_notify<F: Fn(&Self) + 'static>(
2797 &self,
2798 f: F,
2799 ) -> SignalHandlerId {
2800 unsafe extern "C" fn notify_gtk_primary_button_warps_slider_trampoline<
2801 F: Fn(&Settings) + 'static,
2802 >(
2803 this: *mut ffi::GtkSettings,
2804 _param_spec: glib::ffi::gpointer,
2805 f: glib::ffi::gpointer,
2806 ) {
2807 unsafe {
2808 let f: &F = &*(f as *const F);
2809 f(&from_glib_borrow(this))
2810 }
2811 }
2812 unsafe {
2813 let f: Box_<F> = Box_::new(f);
2814 connect_raw(
2815 self.as_ptr() as *mut _,
2816 c"notify::gtk-primary-button-warps-slider".as_ptr(),
2817 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2818 notify_gtk_primary_button_warps_slider_trampoline::<F> as *const (),
2819 )),
2820 Box_::into_raw(f),
2821 )
2822 }
2823 }
2824
2825 #[doc(alias = "gtk-print-backends")]
2826 pub fn connect_gtk_print_backends_notify<F: Fn(&Self) + 'static>(
2827 &self,
2828 f: F,
2829 ) -> SignalHandlerId {
2830 unsafe extern "C" fn notify_gtk_print_backends_trampoline<F: Fn(&Settings) + 'static>(
2831 this: *mut ffi::GtkSettings,
2832 _param_spec: glib::ffi::gpointer,
2833 f: glib::ffi::gpointer,
2834 ) {
2835 unsafe {
2836 let f: &F = &*(f as *const F);
2837 f(&from_glib_borrow(this))
2838 }
2839 }
2840 unsafe {
2841 let f: Box_<F> = Box_::new(f);
2842 connect_raw(
2843 self.as_ptr() as *mut _,
2844 c"notify::gtk-print-backends".as_ptr(),
2845 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2846 notify_gtk_print_backends_trampoline::<F> as *const (),
2847 )),
2848 Box_::into_raw(f),
2849 )
2850 }
2851 }
2852
2853 #[doc(alias = "gtk-print-preview-command")]
2854 pub fn connect_gtk_print_preview_command_notify<F: Fn(&Self) + 'static>(
2855 &self,
2856 f: F,
2857 ) -> SignalHandlerId {
2858 unsafe extern "C" fn notify_gtk_print_preview_command_trampoline<
2859 F: Fn(&Settings) + 'static,
2860 >(
2861 this: *mut ffi::GtkSettings,
2862 _param_spec: glib::ffi::gpointer,
2863 f: glib::ffi::gpointer,
2864 ) {
2865 unsafe {
2866 let f: &F = &*(f as *const F);
2867 f(&from_glib_borrow(this))
2868 }
2869 }
2870 unsafe {
2871 let f: Box_<F> = Box_::new(f);
2872 connect_raw(
2873 self.as_ptr() as *mut _,
2874 c"notify::gtk-print-preview-command".as_ptr(),
2875 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2876 notify_gtk_print_preview_command_trampoline::<F> as *const (),
2877 )),
2878 Box_::into_raw(f),
2879 )
2880 }
2881 }
2882
2883 #[doc(alias = "gtk-recent-files-enabled")]
2884 pub fn connect_gtk_recent_files_enabled_notify<F: Fn(&Self) + 'static>(
2885 &self,
2886 f: F,
2887 ) -> SignalHandlerId {
2888 unsafe extern "C" fn notify_gtk_recent_files_enabled_trampoline<
2889 F: Fn(&Settings) + 'static,
2890 >(
2891 this: *mut ffi::GtkSettings,
2892 _param_spec: glib::ffi::gpointer,
2893 f: glib::ffi::gpointer,
2894 ) {
2895 unsafe {
2896 let f: &F = &*(f as *const F);
2897 f(&from_glib_borrow(this))
2898 }
2899 }
2900 unsafe {
2901 let f: Box_<F> = Box_::new(f);
2902 connect_raw(
2903 self.as_ptr() as *mut _,
2904 c"notify::gtk-recent-files-enabled".as_ptr(),
2905 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2906 notify_gtk_recent_files_enabled_trampoline::<F> as *const (),
2907 )),
2908 Box_::into_raw(f),
2909 )
2910 }
2911 }
2912
2913 #[doc(alias = "gtk-recent-files-max-age")]
2914 pub fn connect_gtk_recent_files_max_age_notify<F: Fn(&Self) + 'static>(
2915 &self,
2916 f: F,
2917 ) -> SignalHandlerId {
2918 unsafe extern "C" fn notify_gtk_recent_files_max_age_trampoline<
2919 F: Fn(&Settings) + 'static,
2920 >(
2921 this: *mut ffi::GtkSettings,
2922 _param_spec: glib::ffi::gpointer,
2923 f: glib::ffi::gpointer,
2924 ) {
2925 unsafe {
2926 let f: &F = &*(f as *const F);
2927 f(&from_glib_borrow(this))
2928 }
2929 }
2930 unsafe {
2931 let f: Box_<F> = Box_::new(f);
2932 connect_raw(
2933 self.as_ptr() as *mut _,
2934 c"notify::gtk-recent-files-max-age".as_ptr(),
2935 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2936 notify_gtk_recent_files_max_age_trampoline::<F> as *const (),
2937 )),
2938 Box_::into_raw(f),
2939 )
2940 }
2941 }
2942
2943 #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")]
2944 #[doc(alias = "gtk-shell-shows-app-menu")]
2945 pub fn connect_gtk_shell_shows_app_menu_notify<F: Fn(&Self) + 'static>(
2946 &self,
2947 f: F,
2948 ) -> SignalHandlerId {
2949 unsafe extern "C" fn notify_gtk_shell_shows_app_menu_trampoline<
2950 F: Fn(&Settings) + 'static,
2951 >(
2952 this: *mut ffi::GtkSettings,
2953 _param_spec: glib::ffi::gpointer,
2954 f: glib::ffi::gpointer,
2955 ) {
2956 unsafe {
2957 let f: &F = &*(f as *const F);
2958 f(&from_glib_borrow(this))
2959 }
2960 }
2961 unsafe {
2962 let f: Box_<F> = Box_::new(f);
2963 connect_raw(
2964 self.as_ptr() as *mut _,
2965 c"notify::gtk-shell-shows-app-menu".as_ptr(),
2966 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2967 notify_gtk_shell_shows_app_menu_trampoline::<F> as *const (),
2968 )),
2969 Box_::into_raw(f),
2970 )
2971 }
2972 }
2973
2974 #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")]
2975 #[doc(alias = "gtk-shell-shows-desktop")]
2976 pub fn connect_gtk_shell_shows_desktop_notify<F: Fn(&Self) + 'static>(
2977 &self,
2978 f: F,
2979 ) -> SignalHandlerId {
2980 unsafe extern "C" fn notify_gtk_shell_shows_desktop_trampoline<
2981 F: Fn(&Settings) + 'static,
2982 >(
2983 this: *mut ffi::GtkSettings,
2984 _param_spec: glib::ffi::gpointer,
2985 f: glib::ffi::gpointer,
2986 ) {
2987 unsafe {
2988 let f: &F = &*(f as *const F);
2989 f(&from_glib_borrow(this))
2990 }
2991 }
2992 unsafe {
2993 let f: Box_<F> = Box_::new(f);
2994 connect_raw(
2995 self.as_ptr() as *mut _,
2996 c"notify::gtk-shell-shows-desktop".as_ptr(),
2997 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2998 notify_gtk_shell_shows_desktop_trampoline::<F> as *const (),
2999 )),
3000 Box_::into_raw(f),
3001 )
3002 }
3003 }
3004
3005 #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")]
3006 #[doc(alias = "gtk-shell-shows-menubar")]
3007 pub fn connect_gtk_shell_shows_menubar_notify<F: Fn(&Self) + 'static>(
3008 &self,
3009 f: F,
3010 ) -> SignalHandlerId {
3011 unsafe extern "C" fn notify_gtk_shell_shows_menubar_trampoline<
3012 F: Fn(&Settings) + 'static,
3013 >(
3014 this: *mut ffi::GtkSettings,
3015 _param_spec: glib::ffi::gpointer,
3016 f: glib::ffi::gpointer,
3017 ) {
3018 unsafe {
3019 let f: &F = &*(f as *const F);
3020 f(&from_glib_borrow(this))
3021 }
3022 }
3023 unsafe {
3024 let f: Box_<F> = Box_::new(f);
3025 connect_raw(
3026 self.as_ptr() as *mut _,
3027 c"notify::gtk-shell-shows-menubar".as_ptr(),
3028 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3029 notify_gtk_shell_shows_menubar_trampoline::<F> as *const (),
3030 )),
3031 Box_::into_raw(f),
3032 )
3033 }
3034 }
3035
3036 #[cfg(feature = "v4_14")]
3037 #[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
3038 #[doc(alias = "gtk-show-status-shapes")]
3039 pub fn connect_gtk_show_status_shapes_notify<F: Fn(&Self) + 'static>(
3040 &self,
3041 f: F,
3042 ) -> SignalHandlerId {
3043 unsafe extern "C" fn notify_gtk_show_status_shapes_trampoline<
3044 F: Fn(&Settings) + 'static,
3045 >(
3046 this: *mut ffi::GtkSettings,
3047 _param_spec: glib::ffi::gpointer,
3048 f: glib::ffi::gpointer,
3049 ) {
3050 unsafe {
3051 let f: &F = &*(f as *const F);
3052 f(&from_glib_borrow(this))
3053 }
3054 }
3055 unsafe {
3056 let f: Box_<F> = Box_::new(f);
3057 connect_raw(
3058 self.as_ptr() as *mut _,
3059 c"notify::gtk-show-status-shapes".as_ptr(),
3060 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3061 notify_gtk_show_status_shapes_trampoline::<F> as *const (),
3062 )),
3063 Box_::into_raw(f),
3064 )
3065 }
3066 }
3067
3068 #[doc(alias = "gtk-sound-theme-name")]
3069 pub fn connect_gtk_sound_theme_name_notify<F: Fn(&Self) + 'static>(
3070 &self,
3071 f: F,
3072 ) -> SignalHandlerId {
3073 unsafe extern "C" fn notify_gtk_sound_theme_name_trampoline<F: Fn(&Settings) + 'static>(
3074 this: *mut ffi::GtkSettings,
3075 _param_spec: glib::ffi::gpointer,
3076 f: glib::ffi::gpointer,
3077 ) {
3078 unsafe {
3079 let f: &F = &*(f as *const F);
3080 f(&from_glib_borrow(this))
3081 }
3082 }
3083 unsafe {
3084 let f: Box_<F> = Box_::new(f);
3085 connect_raw(
3086 self.as_ptr() as *mut _,
3087 c"notify::gtk-sound-theme-name".as_ptr(),
3088 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3089 notify_gtk_sound_theme_name_trampoline::<F> as *const (),
3090 )),
3091 Box_::into_raw(f),
3092 )
3093 }
3094 }
3095
3096 #[doc(alias = "gtk-split-cursor")]
3097 pub fn connect_gtk_split_cursor_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3098 unsafe extern "C" fn notify_gtk_split_cursor_trampoline<F: Fn(&Settings) + 'static>(
3099 this: *mut ffi::GtkSettings,
3100 _param_spec: glib::ffi::gpointer,
3101 f: glib::ffi::gpointer,
3102 ) {
3103 unsafe {
3104 let f: &F = &*(f as *const F);
3105 f(&from_glib_borrow(this))
3106 }
3107 }
3108 unsafe {
3109 let f: Box_<F> = Box_::new(f);
3110 connect_raw(
3111 self.as_ptr() as *mut _,
3112 c"notify::gtk-split-cursor".as_ptr(),
3113 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3114 notify_gtk_split_cursor_trampoline::<F> as *const (),
3115 )),
3116 Box_::into_raw(f),
3117 )
3118 }
3119 }
3120
3121 #[doc(alias = "gtk-theme-name")]
3122 pub fn connect_gtk_theme_name_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3123 unsafe extern "C" fn notify_gtk_theme_name_trampoline<F: Fn(&Settings) + 'static>(
3124 this: *mut ffi::GtkSettings,
3125 _param_spec: glib::ffi::gpointer,
3126 f: glib::ffi::gpointer,
3127 ) {
3128 unsafe {
3129 let f: &F = &*(f as *const F);
3130 f(&from_glib_borrow(this))
3131 }
3132 }
3133 unsafe {
3134 let f: Box_<F> = Box_::new(f);
3135 connect_raw(
3136 self.as_ptr() as *mut _,
3137 c"notify::gtk-theme-name".as_ptr(),
3138 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3139 notify_gtk_theme_name_trampoline::<F> as *const (),
3140 )),
3141 Box_::into_raw(f),
3142 )
3143 }
3144 }
3145
3146 #[doc(alias = "gtk-titlebar-double-click")]
3147 pub fn connect_gtk_titlebar_double_click_notify<F: Fn(&Self) + 'static>(
3148 &self,
3149 f: F,
3150 ) -> SignalHandlerId {
3151 unsafe extern "C" fn notify_gtk_titlebar_double_click_trampoline<
3152 F: Fn(&Settings) + 'static,
3153 >(
3154 this: *mut ffi::GtkSettings,
3155 _param_spec: glib::ffi::gpointer,
3156 f: glib::ffi::gpointer,
3157 ) {
3158 unsafe {
3159 let f: &F = &*(f as *const F);
3160 f(&from_glib_borrow(this))
3161 }
3162 }
3163 unsafe {
3164 let f: Box_<F> = Box_::new(f);
3165 connect_raw(
3166 self.as_ptr() as *mut _,
3167 c"notify::gtk-titlebar-double-click".as_ptr(),
3168 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3169 notify_gtk_titlebar_double_click_trampoline::<F> as *const (),
3170 )),
3171 Box_::into_raw(f),
3172 )
3173 }
3174 }
3175
3176 #[doc(alias = "gtk-titlebar-middle-click")]
3177 pub fn connect_gtk_titlebar_middle_click_notify<F: Fn(&Self) + 'static>(
3178 &self,
3179 f: F,
3180 ) -> SignalHandlerId {
3181 unsafe extern "C" fn notify_gtk_titlebar_middle_click_trampoline<
3182 F: Fn(&Settings) + 'static,
3183 >(
3184 this: *mut ffi::GtkSettings,
3185 _param_spec: glib::ffi::gpointer,
3186 f: glib::ffi::gpointer,
3187 ) {
3188 unsafe {
3189 let f: &F = &*(f as *const F);
3190 f(&from_glib_borrow(this))
3191 }
3192 }
3193 unsafe {
3194 let f: Box_<F> = Box_::new(f);
3195 connect_raw(
3196 self.as_ptr() as *mut _,
3197 c"notify::gtk-titlebar-middle-click".as_ptr(),
3198 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3199 notify_gtk_titlebar_middle_click_trampoline::<F> as *const (),
3200 )),
3201 Box_::into_raw(f),
3202 )
3203 }
3204 }
3205
3206 #[doc(alias = "gtk-titlebar-right-click")]
3207 pub fn connect_gtk_titlebar_right_click_notify<F: Fn(&Self) + 'static>(
3208 &self,
3209 f: F,
3210 ) -> SignalHandlerId {
3211 unsafe extern "C" fn notify_gtk_titlebar_right_click_trampoline<
3212 F: Fn(&Settings) + 'static,
3213 >(
3214 this: *mut ffi::GtkSettings,
3215 _param_spec: glib::ffi::gpointer,
3216 f: glib::ffi::gpointer,
3217 ) {
3218 unsafe {
3219 let f: &F = &*(f as *const F);
3220 f(&from_glib_borrow(this))
3221 }
3222 }
3223 unsafe {
3224 let f: Box_<F> = Box_::new(f);
3225 connect_raw(
3226 self.as_ptr() as *mut _,
3227 c"notify::gtk-titlebar-right-click".as_ptr(),
3228 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3229 notify_gtk_titlebar_right_click_trampoline::<F> as *const (),
3230 )),
3231 Box_::into_raw(f),
3232 )
3233 }
3234 }
3235
3236 #[doc(alias = "gtk-xft-antialias")]
3237 pub fn connect_gtk_xft_antialias_notify<F: Fn(&Self) + 'static>(
3238 &self,
3239 f: F,
3240 ) -> SignalHandlerId {
3241 unsafe extern "C" fn notify_gtk_xft_antialias_trampoline<F: Fn(&Settings) + 'static>(
3242 this: *mut ffi::GtkSettings,
3243 _param_spec: glib::ffi::gpointer,
3244 f: glib::ffi::gpointer,
3245 ) {
3246 unsafe {
3247 let f: &F = &*(f as *const F);
3248 f(&from_glib_borrow(this))
3249 }
3250 }
3251 unsafe {
3252 let f: Box_<F> = Box_::new(f);
3253 connect_raw(
3254 self.as_ptr() as *mut _,
3255 c"notify::gtk-xft-antialias".as_ptr(),
3256 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3257 notify_gtk_xft_antialias_trampoline::<F> as *const (),
3258 )),
3259 Box_::into_raw(f),
3260 )
3261 }
3262 }
3263
3264 #[doc(alias = "gtk-xft-dpi")]
3265 pub fn connect_gtk_xft_dpi_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3266 unsafe extern "C" fn notify_gtk_xft_dpi_trampoline<F: Fn(&Settings) + 'static>(
3267 this: *mut ffi::GtkSettings,
3268 _param_spec: glib::ffi::gpointer,
3269 f: glib::ffi::gpointer,
3270 ) {
3271 unsafe {
3272 let f: &F = &*(f as *const F);
3273 f(&from_glib_borrow(this))
3274 }
3275 }
3276 unsafe {
3277 let f: Box_<F> = Box_::new(f);
3278 connect_raw(
3279 self.as_ptr() as *mut _,
3280 c"notify::gtk-xft-dpi".as_ptr(),
3281 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3282 notify_gtk_xft_dpi_trampoline::<F> as *const (),
3283 )),
3284 Box_::into_raw(f),
3285 )
3286 }
3287 }
3288
3289 #[doc(alias = "gtk-xft-hinting")]
3290 pub fn connect_gtk_xft_hinting_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3291 unsafe extern "C" fn notify_gtk_xft_hinting_trampoline<F: Fn(&Settings) + 'static>(
3292 this: *mut ffi::GtkSettings,
3293 _param_spec: glib::ffi::gpointer,
3294 f: glib::ffi::gpointer,
3295 ) {
3296 unsafe {
3297 let f: &F = &*(f as *const F);
3298 f(&from_glib_borrow(this))
3299 }
3300 }
3301 unsafe {
3302 let f: Box_<F> = Box_::new(f);
3303 connect_raw(
3304 self.as_ptr() as *mut _,
3305 c"notify::gtk-xft-hinting".as_ptr(),
3306 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3307 notify_gtk_xft_hinting_trampoline::<F> as *const (),
3308 )),
3309 Box_::into_raw(f),
3310 )
3311 }
3312 }
3313
3314 #[doc(alias = "gtk-xft-hintstyle")]
3315 pub fn connect_gtk_xft_hintstyle_notify<F: Fn(&Self) + 'static>(
3316 &self,
3317 f: F,
3318 ) -> SignalHandlerId {
3319 unsafe extern "C" fn notify_gtk_xft_hintstyle_trampoline<F: Fn(&Settings) + 'static>(
3320 this: *mut ffi::GtkSettings,
3321 _param_spec: glib::ffi::gpointer,
3322 f: glib::ffi::gpointer,
3323 ) {
3324 unsafe {
3325 let f: &F = &*(f as *const F);
3326 f(&from_glib_borrow(this))
3327 }
3328 }
3329 unsafe {
3330 let f: Box_<F> = Box_::new(f);
3331 connect_raw(
3332 self.as_ptr() as *mut _,
3333 c"notify::gtk-xft-hintstyle".as_ptr(),
3334 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3335 notify_gtk_xft_hintstyle_trampoline::<F> as *const (),
3336 )),
3337 Box_::into_raw(f),
3338 )
3339 }
3340 }
3341
3342 #[doc(alias = "gtk-xft-rgba")]
3343 pub fn connect_gtk_xft_rgba_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3344 unsafe extern "C" fn notify_gtk_xft_rgba_trampoline<F: Fn(&Settings) + 'static>(
3345 this: *mut ffi::GtkSettings,
3346 _param_spec: glib::ffi::gpointer,
3347 f: glib::ffi::gpointer,
3348 ) {
3349 unsafe {
3350 let f: &F = &*(f as *const F);
3351 f(&from_glib_borrow(this))
3352 }
3353 }
3354 unsafe {
3355 let f: Box_<F> = Box_::new(f);
3356 connect_raw(
3357 self.as_ptr() as *mut _,
3358 c"notify::gtk-xft-rgba".as_ptr(),
3359 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3360 notify_gtk_xft_rgba_trampoline::<F> as *const (),
3361 )),
3362 Box_::into_raw(f),
3363 )
3364 }
3365 }
3366}
3367
3368#[must_use = "The builder must be built to be used"]
3373pub struct SettingsBuilder {
3374 builder: glib::object::ObjectBuilder<'static, Settings>,
3375}
3376
3377impl SettingsBuilder {
3378 fn new() -> Self {
3379 Self {
3380 builder: glib::object::Object::builder(),
3381 }
3382 }
3383
3384 pub fn gtk_alternative_button_order(self, gtk_alternative_button_order: bool) -> Self {
3386 Self {
3387 builder: self
3388 .builder
3389 .property("gtk-alternative-button-order", gtk_alternative_button_order),
3390 }
3391 }
3392
3393 pub fn gtk_alternative_sort_arrows(self, gtk_alternative_sort_arrows: bool) -> Self {
3399 Self {
3400 builder: self
3401 .builder
3402 .property("gtk-alternative-sort-arrows", gtk_alternative_sort_arrows),
3403 }
3404 }
3405
3406 #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")]
3422 pub fn gtk_application_prefer_dark_theme(
3423 self,
3424 gtk_application_prefer_dark_theme: bool,
3425 ) -> Self {
3426 Self {
3427 builder: self.builder.property(
3428 "gtk-application-prefer-dark-theme",
3429 gtk_application_prefer_dark_theme,
3430 ),
3431 }
3432 }
3433
3434 pub fn gtk_cursor_aspect_ratio(self, gtk_cursor_aspect_ratio: f64) -> Self {
3436 Self {
3437 builder: self
3438 .builder
3439 .property("gtk-cursor-aspect-ratio", gtk_cursor_aspect_ratio),
3440 }
3441 }
3442
3443 pub fn gtk_cursor_blink(self, gtk_cursor_blink: bool) -> Self {
3448 Self {
3449 builder: self.builder.property("gtk-cursor-blink", gtk_cursor_blink),
3450 }
3451 }
3452
3453 pub fn gtk_cursor_blink_time(self, gtk_cursor_blink_time: i32) -> Self {
3455 Self {
3456 builder: self
3457 .builder
3458 .property("gtk-cursor-blink-time", gtk_cursor_blink_time),
3459 }
3460 }
3461
3462 pub fn gtk_cursor_blink_timeout(self, gtk_cursor_blink_timeout: i32) -> Self {
3469 Self {
3470 builder: self
3471 .builder
3472 .property("gtk-cursor-blink-timeout", gtk_cursor_blink_timeout),
3473 }
3474 }
3475
3476 pub fn gtk_cursor_theme_name(self, gtk_cursor_theme_name: impl Into<glib::GString>) -> Self {
3480 Self {
3481 builder: self
3482 .builder
3483 .property("gtk-cursor-theme-name", gtk_cursor_theme_name.into()),
3484 }
3485 }
3486
3487 pub fn gtk_cursor_theme_size(self, gtk_cursor_theme_size: i32) -> Self {
3491 Self {
3492 builder: self
3493 .builder
3494 .property("gtk-cursor-theme-size", gtk_cursor_theme_size),
3495 }
3496 }
3497
3498 pub fn gtk_decoration_layout(self, gtk_decoration_layout: impl Into<glib::GString>) -> Self {
3519 Self {
3520 builder: self
3521 .builder
3522 .property("gtk-decoration-layout", gtk_decoration_layout.into()),
3523 }
3524 }
3525
3526 pub fn gtk_dialogs_use_header(self, gtk_dialogs_use_header: bool) -> Self {
3533 Self {
3534 builder: self
3535 .builder
3536 .property("gtk-dialogs-use-header", gtk_dialogs_use_header),
3537 }
3538 }
3539
3540 pub fn gtk_dnd_drag_threshold(self, gtk_dnd_drag_threshold: i32) -> Self {
3542 Self {
3543 builder: self
3544 .builder
3545 .property("gtk-dnd-drag-threshold", gtk_dnd_drag_threshold),
3546 }
3547 }
3548
3549 pub fn gtk_double_click_distance(self, gtk_double_click_distance: i32) -> Self {
3552 Self {
3553 builder: self
3554 .builder
3555 .property("gtk-double-click-distance", gtk_double_click_distance),
3556 }
3557 }
3558
3559 pub fn gtk_double_click_time(self, gtk_double_click_time: i32) -> Self {
3562 Self {
3563 builder: self
3564 .builder
3565 .property("gtk-double-click-time", gtk_double_click_time),
3566 }
3567 }
3568
3569 pub fn gtk_enable_accels(self, gtk_enable_accels: bool) -> Self {
3572 Self {
3573 builder: self
3574 .builder
3575 .property("gtk-enable-accels", gtk_enable_accels),
3576 }
3577 }
3578
3579 pub fn gtk_enable_animations(self, gtk_enable_animations: bool) -> Self {
3581 Self {
3582 builder: self
3583 .builder
3584 .property("gtk-enable-animations", gtk_enable_animations),
3585 }
3586 }
3587
3588 pub fn gtk_enable_event_sounds(self, gtk_enable_event_sounds: bool) -> Self {
3596 Self {
3597 builder: self
3598 .builder
3599 .property("gtk-enable-event-sounds", gtk_enable_event_sounds),
3600 }
3601 }
3602
3603 pub fn gtk_enable_input_feedback_sounds(self, gtk_enable_input_feedback_sounds: bool) -> Self {
3611 Self {
3612 builder: self.builder.property(
3613 "gtk-enable-input-feedback-sounds",
3614 gtk_enable_input_feedback_sounds,
3615 ),
3616 }
3617 }
3618
3619 pub fn gtk_enable_primary_paste(self, gtk_enable_primary_paste: bool) -> Self {
3622 Self {
3623 builder: self
3624 .builder
3625 .property("gtk-enable-primary-paste", gtk_enable_primary_paste),
3626 }
3627 }
3628
3629 pub fn gtk_entry_password_hint_timeout(self, gtk_entry_password_hint_timeout: u32) -> Self {
3635 Self {
3636 builder: self.builder.property(
3637 "gtk-entry-password-hint-timeout",
3638 gtk_entry_password_hint_timeout,
3639 ),
3640 }
3641 }
3642
3643 pub fn gtk_entry_select_on_focus(self, gtk_entry_select_on_focus: bool) -> Self {
3645 Self {
3646 builder: self
3647 .builder
3648 .property("gtk-entry-select-on-focus", gtk_entry_select_on_focus),
3649 }
3650 }
3651
3652 pub fn gtk_error_bell(self, gtk_error_bell: bool) -> Self {
3659 Self {
3660 builder: self.builder.property("gtk-error-bell", gtk_error_bell),
3661 }
3662 }
3663
3664 pub fn gtk_font_name(self, gtk_font_name: impl Into<glib::GString>) -> Self {
3668 Self {
3669 builder: self.builder.property("gtk-font-name", gtk_font_name.into()),
3670 }
3671 }
3672
3673 #[cfg(feature = "v4_16")]
3684 #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))]
3685 pub fn gtk_font_rendering(self, gtk_font_rendering: FontRendering) -> Self {
3686 Self {
3687 builder: self
3688 .builder
3689 .property("gtk-font-rendering", gtk_font_rendering),
3690 }
3691 }
3692
3693 pub fn gtk_fontconfig_timestamp(self, gtk_fontconfig_timestamp: u32) -> Self {
3695 Self {
3696 builder: self
3697 .builder
3698 .property("gtk-fontconfig-timestamp", gtk_fontconfig_timestamp),
3699 }
3700 }
3701
3702 #[cfg(feature = "v4_6")]
3707 #[cfg_attr(docsrs, doc(cfg(feature = "v4_6")))]
3708 pub fn gtk_hint_font_metrics(self, gtk_hint_font_metrics: bool) -> Self {
3709 Self {
3710 builder: self
3711 .builder
3712 .property("gtk-hint-font-metrics", gtk_hint_font_metrics),
3713 }
3714 }
3715
3716 pub fn gtk_icon_theme_name(self, gtk_icon_theme_name: impl Into<glib::GString>) -> Self {
3721 Self {
3722 builder: self
3723 .builder
3724 .property("gtk-icon-theme-name", gtk_icon_theme_name.into()),
3725 }
3726 }
3727
3728 pub fn gtk_im_module(self, gtk_im_module: impl Into<glib::GString>) -> Self {
3737 Self {
3738 builder: self.builder.property("gtk-im-module", gtk_im_module.into()),
3739 }
3740 }
3741
3742 #[cfg(feature = "v4_20")]
3749 #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))]
3750 pub fn gtk_interface_color_scheme(
3751 self,
3752 gtk_interface_color_scheme: InterfaceColorScheme,
3753 ) -> Self {
3754 Self {
3755 builder: self
3756 .builder
3757 .property("gtk-interface-color-scheme", gtk_interface_color_scheme),
3758 }
3759 }
3760
3761 #[cfg(feature = "v4_20")]
3768 #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))]
3769 pub fn gtk_interface_contrast(self, gtk_interface_contrast: InterfaceContrast) -> Self {
3770 Self {
3771 builder: self
3772 .builder
3773 .property("gtk-interface-contrast", gtk_interface_contrast),
3774 }
3775 }
3776
3777 #[cfg(feature = "v4_22")]
3784 #[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))]
3785 pub fn gtk_interface_reduced_motion(self, gtk_interface_reduced_motion: ReducedMotion) -> Self {
3786 Self {
3787 builder: self
3788 .builder
3789 .property("gtk-interface-reduced-motion", gtk_interface_reduced_motion),
3790 }
3791 }
3792
3793 pub fn gtk_keynav_use_caret(self, gtk_keynav_use_caret: bool) -> Self {
3798 Self {
3799 builder: self
3800 .builder
3801 .property("gtk-keynav-use-caret", gtk_keynav_use_caret),
3802 }
3803 }
3804
3805 pub fn gtk_label_select_on_focus(self, gtk_label_select_on_focus: bool) -> Self {
3808 Self {
3809 builder: self
3810 .builder
3811 .property("gtk-label-select-on-focus", gtk_label_select_on_focus),
3812 }
3813 }
3814
3815 pub fn gtk_long_press_time(self, gtk_long_press_time: u32) -> Self {
3819 Self {
3820 builder: self
3821 .builder
3822 .property("gtk-long-press-time", gtk_long_press_time),
3823 }
3824 }
3825
3826 pub fn gtk_overlay_scrolling(self, gtk_overlay_scrolling: bool) -> Self {
3831 Self {
3832 builder: self
3833 .builder
3834 .property("gtk-overlay-scrolling", gtk_overlay_scrolling),
3835 }
3836 }
3837
3838 pub fn gtk_primary_button_warps_slider(self, gtk_primary_button_warps_slider: bool) -> Self {
3844 Self {
3845 builder: self.builder.property(
3846 "gtk-primary-button-warps-slider",
3847 gtk_primary_button_warps_slider,
3848 ),
3849 }
3850 }
3851
3852 pub fn gtk_print_backends(self, gtk_print_backends: impl Into<glib::GString>) -> Self {
3858 Self {
3859 builder: self
3860 .builder
3861 .property("gtk-print-backends", gtk_print_backends.into()),
3862 }
3863 }
3864
3865 pub fn gtk_print_preview_command(
3876 self,
3877 gtk_print_preview_command: impl Into<glib::GString>,
3878 ) -> Self {
3879 Self {
3880 builder: self.builder.property(
3881 "gtk-print-preview-command",
3882 gtk_print_preview_command.into(),
3883 ),
3884 }
3885 }
3886
3887 pub fn gtk_recent_files_enabled(self, gtk_recent_files_enabled: bool) -> Self {
3892 Self {
3893 builder: self
3894 .builder
3895 .property("gtk-recent-files-enabled", gtk_recent_files_enabled),
3896 }
3897 }
3898
3899 pub fn gtk_recent_files_max_age(self, gtk_recent_files_max_age: i32) -> Self {
3906 Self {
3907 builder: self
3908 .builder
3909 .property("gtk-recent-files-max-age", gtk_recent_files_max_age),
3910 }
3911 }
3912
3913 #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")]
3917 pub fn gtk_shell_shows_app_menu(self, gtk_shell_shows_app_menu: bool) -> Self {
3918 Self {
3919 builder: self
3920 .builder
3921 .property("gtk-shell-shows-app-menu", gtk_shell_shows_app_menu),
3922 }
3923 }
3924
3925 #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")]
3929 pub fn gtk_shell_shows_desktop(self, gtk_shell_shows_desktop: bool) -> Self {
3930 Self {
3931 builder: self
3932 .builder
3933 .property("gtk-shell-shows-desktop", gtk_shell_shows_desktop),
3934 }
3935 }
3936
3937 #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")]
3941 pub fn gtk_shell_shows_menubar(self, gtk_shell_shows_menubar: bool) -> Self {
3942 Self {
3943 builder: self
3944 .builder
3945 .property("gtk-shell-shows-menubar", gtk_shell_shows_menubar),
3946 }
3947 }
3948
3949 #[cfg(feature = "v4_14")]
3951 #[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
3952 pub fn gtk_show_status_shapes(self, gtk_show_status_shapes: bool) -> Self {
3953 Self {
3954 builder: self
3955 .builder
3956 .property("gtk-show-status-shapes", gtk_show_status_shapes),
3957 }
3958 }
3959
3960 pub fn gtk_sound_theme_name(self, gtk_sound_theme_name: impl Into<glib::GString>) -> Self {
3968 Self {
3969 builder: self
3970 .builder
3971 .property("gtk-sound-theme-name", gtk_sound_theme_name.into()),
3972 }
3973 }
3974
3975 pub fn gtk_split_cursor(self, gtk_split_cursor: bool) -> Self {
3978 Self {
3979 builder: self.builder.property("gtk-split-cursor", gtk_split_cursor),
3980 }
3981 }
3982
3983 pub fn gtk_theme_name(self, gtk_theme_name: impl Into<glib::GString>) -> Self {
3988 Self {
3989 builder: self
3990 .builder
3991 .property("gtk-theme-name", gtk_theme_name.into()),
3992 }
3993 }
3994
3995 pub fn gtk_titlebar_double_click(
4001 self,
4002 gtk_titlebar_double_click: impl Into<glib::GString>,
4003 ) -> Self {
4004 Self {
4005 builder: self.builder.property(
4006 "gtk-titlebar-double-click",
4007 gtk_titlebar_double_click.into(),
4008 ),
4009 }
4010 }
4011
4012 pub fn gtk_titlebar_middle_click(
4018 self,
4019 gtk_titlebar_middle_click: impl Into<glib::GString>,
4020 ) -> Self {
4021 Self {
4022 builder: self.builder.property(
4023 "gtk-titlebar-middle-click",
4024 gtk_titlebar_middle_click.into(),
4025 ),
4026 }
4027 }
4028
4029 pub fn gtk_titlebar_right_click(
4035 self,
4036 gtk_titlebar_right_click: impl Into<glib::GString>,
4037 ) -> Self {
4038 Self {
4039 builder: self
4040 .builder
4041 .property("gtk-titlebar-right-click", gtk_titlebar_right_click.into()),
4042 }
4043 }
4044
4045 pub fn gtk_xft_antialias(self, gtk_xft_antialias: i32) -> Self {
4049 Self {
4050 builder: self
4051 .builder
4052 .property("gtk-xft-antialias", gtk_xft_antialias),
4053 }
4054 }
4055
4056 pub fn gtk_xft_dpi(self, gtk_xft_dpi: i32) -> Self {
4060 Self {
4061 builder: self.builder.property("gtk-xft-dpi", gtk_xft_dpi),
4062 }
4063 }
4064
4065 pub fn gtk_xft_hinting(self, gtk_xft_hinting: i32) -> Self {
4069 Self {
4070 builder: self.builder.property("gtk-xft-hinting", gtk_xft_hinting),
4071 }
4072 }
4073
4074 pub fn gtk_xft_hintstyle(self, gtk_xft_hintstyle: impl Into<glib::GString>) -> Self {
4079 Self {
4080 builder: self
4081 .builder
4082 .property("gtk-xft-hintstyle", gtk_xft_hintstyle.into()),
4083 }
4084 }
4085
4086 pub fn gtk_xft_rgba(self, gtk_xft_rgba: impl Into<glib::GString>) -> Self {
4093 Self {
4094 builder: self.builder.property("gtk-xft-rgba", gtk_xft_rgba.into()),
4095 }
4096 }
4097
4098 #[must_use = "Building the object from the builder is usually expensive and is not expected to have side effects"]
4101 pub fn build(self) -> Settings {
4102 assert_initialized_main_thread!();
4103 self.builder.build()
4104 }
4105}