1use crate::{StyleProvider, ffi};
6use glib::{
7 prelude::*,
8 signal::{SignalHandlerId, connect_raw},
9 translate::*,
10};
11use std::boxed::Box as Box_;
12
13glib::wrapper! {
14 #[doc(alias = "GtkSettings")]
678 pub struct Settings(Object<ffi::GtkSettings, ffi::GtkSettingsClass>) @implements StyleProvider;
679
680 match fn {
681 type_ => || ffi::gtk_settings_get_type(),
682 }
683}
684
685impl Settings {
686 pub const NONE: Option<&'static Settings> = None;
687
688 pub fn builder() -> SettingsBuilder {
693 SettingsBuilder::new()
694 }
695
696 #[doc(alias = "gtk_settings_get_default")]
704 #[doc(alias = "get_default")]
705 #[allow(clippy::should_implement_trait)]
706 pub fn default() -> Option<Settings> {
707 assert_initialized_main_thread!();
708 unsafe { from_glib_none(ffi::gtk_settings_get_default()) }
709 }
710
711 #[doc(alias = "gtk_settings_get_for_screen")]
719 #[doc(alias = "get_for_screen")]
720 pub fn for_screen(screen: &gdk::Screen) -> Option<Settings> {
721 assert_initialized_main_thread!();
722 unsafe { from_glib_none(ffi::gtk_settings_get_for_screen(screen.to_glib_none().0)) }
723 }
724}
725
726#[must_use = "The builder must be built to be used"]
731pub struct SettingsBuilder {
732 builder: glib::object::ObjectBuilder<'static, Settings>,
733}
734
735impl SettingsBuilder {
736 fn new() -> Self {
737 Self {
738 builder: glib::object::Object::builder(),
739 }
740 }
741
742 pub fn gtk_alternative_button_order(self, gtk_alternative_button_order: bool) -> Self {
743 Self {
744 builder: self
745 .builder
746 .property("gtk-alternative-button-order", gtk_alternative_button_order),
747 }
748 }
749
750 pub fn gtk_alternative_sort_arrows(self, gtk_alternative_sort_arrows: bool) -> Self {
754 Self {
755 builder: self
756 .builder
757 .property("gtk-alternative-sort-arrows", gtk_alternative_sort_arrows),
758 }
759 }
760
761 pub fn gtk_application_prefer_dark_theme(
773 self,
774 gtk_application_prefer_dark_theme: bool,
775 ) -> Self {
776 Self {
777 builder: self.builder.property(
778 "gtk-application-prefer-dark-theme",
779 gtk_application_prefer_dark_theme,
780 ),
781 }
782 }
783
784 #[cfg(feature = "v3_24")]
785 #[cfg_attr(docsrs, doc(cfg(feature = "v3_24")))]
786 pub fn gtk_cursor_aspect_ratio(self, gtk_cursor_aspect_ratio: f32) -> Self {
787 Self {
788 builder: self
789 .builder
790 .property("gtk-cursor-aspect-ratio", gtk_cursor_aspect_ratio),
791 }
792 }
793
794 pub fn gtk_cursor_blink(self, gtk_cursor_blink: bool) -> Self {
799 Self {
800 builder: self.builder.property("gtk-cursor-blink", gtk_cursor_blink),
801 }
802 }
803
804 pub fn gtk_cursor_blink_time(self, gtk_cursor_blink_time: i32) -> Self {
805 Self {
806 builder: self
807 .builder
808 .property("gtk-cursor-blink-time", gtk_cursor_blink_time),
809 }
810 }
811
812 pub fn gtk_cursor_blink_timeout(self, gtk_cursor_blink_timeout: i32) -> Self {
818 Self {
819 builder: self
820 .builder
821 .property("gtk-cursor-blink-timeout", gtk_cursor_blink_timeout),
822 }
823 }
824
825 pub fn gtk_cursor_theme_name(self, gtk_cursor_theme_name: impl Into<glib::GString>) -> Self {
826 Self {
827 builder: self
828 .builder
829 .property("gtk-cursor-theme-name", gtk_cursor_theme_name.into()),
830 }
831 }
832
833 pub fn gtk_cursor_theme_size(self, gtk_cursor_theme_size: i32) -> Self {
834 Self {
835 builder: self
836 .builder
837 .property("gtk-cursor-theme-size", gtk_cursor_theme_size),
838 }
839 }
840
841 pub fn gtk_decoration_layout(self, gtk_decoration_layout: impl Into<glib::GString>) -> Self {
862 Self {
863 builder: self
864 .builder
865 .property("gtk-decoration-layout", gtk_decoration_layout.into()),
866 }
867 }
868
869 pub fn gtk_dialogs_use_header(self, gtk_dialogs_use_header: bool) -> Self {
876 Self {
877 builder: self
878 .builder
879 .property("gtk-dialogs-use-header", gtk_dialogs_use_header),
880 }
881 }
882
883 pub fn gtk_dnd_drag_threshold(self, gtk_dnd_drag_threshold: i32) -> Self {
884 Self {
885 builder: self
886 .builder
887 .property("gtk-dnd-drag-threshold", gtk_dnd_drag_threshold),
888 }
889 }
890
891 pub fn gtk_double_click_distance(self, gtk_double_click_distance: i32) -> Self {
892 Self {
893 builder: self
894 .builder
895 .property("gtk-double-click-distance", gtk_double_click_distance),
896 }
897 }
898
899 pub fn gtk_double_click_time(self, gtk_double_click_time: i32) -> Self {
900 Self {
901 builder: self
902 .builder
903 .property("gtk-double-click-time", gtk_double_click_time),
904 }
905 }
906
907 pub fn gtk_enable_accels(self, gtk_enable_accels: bool) -> Self {
910 Self {
911 builder: self
912 .builder
913 .property("gtk-enable-accels", gtk_enable_accels),
914 }
915 }
916
917 pub fn gtk_enable_animations(self, gtk_enable_animations: bool) -> Self {
918 Self {
919 builder: self
920 .builder
921 .property("gtk-enable-animations", gtk_enable_animations),
922 }
923 }
924
925 pub fn gtk_enable_event_sounds(self, gtk_enable_event_sounds: bool) -> Self {
933 Self {
934 builder: self
935 .builder
936 .property("gtk-enable-event-sounds", gtk_enable_event_sounds),
937 }
938 }
939
940 pub fn gtk_enable_input_feedback_sounds(self, gtk_enable_input_feedback_sounds: bool) -> Self {
948 Self {
949 builder: self.builder.property(
950 "gtk-enable-input-feedback-sounds",
951 gtk_enable_input_feedback_sounds,
952 ),
953 }
954 }
955
956 pub fn gtk_enable_primary_paste(self, gtk_enable_primary_paste: bool) -> Self {
959 Self {
960 builder: self
961 .builder
962 .property("gtk-enable-primary-paste", gtk_enable_primary_paste),
963 }
964 }
965
966 pub fn gtk_entry_password_hint_timeout(self, gtk_entry_password_hint_timeout: u32) -> Self {
970 Self {
971 builder: self.builder.property(
972 "gtk-entry-password-hint-timeout",
973 gtk_entry_password_hint_timeout,
974 ),
975 }
976 }
977
978 pub fn gtk_entry_select_on_focus(self, gtk_entry_select_on_focus: bool) -> Self {
979 Self {
980 builder: self
981 .builder
982 .property("gtk-entry-select-on-focus", gtk_entry_select_on_focus),
983 }
984 }
985
986 pub fn gtk_error_bell(self, gtk_error_bell: bool) -> Self {
992 Self {
993 builder: self.builder.property("gtk-error-bell", gtk_error_bell),
994 }
995 }
996
997 pub fn gtk_font_name(self, gtk_font_name: impl Into<glib::GString>) -> Self {
999 Self {
1000 builder: self.builder.property("gtk-font-name", gtk_font_name.into()),
1001 }
1002 }
1003
1004 pub fn gtk_fontconfig_timestamp(self, gtk_fontconfig_timestamp: u32) -> Self {
1005 Self {
1006 builder: self
1007 .builder
1008 .property("gtk-fontconfig-timestamp", gtk_fontconfig_timestamp),
1009 }
1010 }
1011
1012 pub fn gtk_icon_theme_name(self, gtk_icon_theme_name: impl Into<glib::GString>) -> Self {
1013 Self {
1014 builder: self
1015 .builder
1016 .property("gtk-icon-theme-name", gtk_icon_theme_name.into()),
1017 }
1018 }
1019
1020 pub fn gtk_im_module(self, gtk_im_module: impl Into<glib::GString>) -> Self {
1028 Self {
1029 builder: self.builder.property("gtk-im-module", gtk_im_module.into()),
1030 }
1031 }
1032
1033 pub fn gtk_key_theme_name(self, gtk_key_theme_name: impl Into<glib::GString>) -> Self {
1034 Self {
1035 builder: self
1036 .builder
1037 .property("gtk-key-theme-name", gtk_key_theme_name.into()),
1038 }
1039 }
1040
1041 pub fn gtk_keynav_use_caret(self, gtk_keynav_use_caret: bool) -> Self {
1045 Self {
1046 builder: self
1047 .builder
1048 .property("gtk-keynav-use-caret", gtk_keynav_use_caret),
1049 }
1050 }
1051
1052 pub fn gtk_label_select_on_focus(self, gtk_label_select_on_focus: bool) -> Self {
1053 Self {
1054 builder: self
1055 .builder
1056 .property("gtk-label-select-on-focus", gtk_label_select_on_focus),
1057 }
1058 }
1059
1060 pub fn gtk_long_press_time(self, gtk_long_press_time: u32) -> Self {
1062 Self {
1063 builder: self
1064 .builder
1065 .property("gtk-long-press-time", gtk_long_press_time),
1066 }
1067 }
1068
1069 pub fn gtk_modules(self, gtk_modules: impl Into<glib::GString>) -> Self {
1070 Self {
1071 builder: self.builder.property("gtk-modules", gtk_modules.into()),
1072 }
1073 }
1074
1075 #[cfg(feature = "v3_24_9")]
1079 #[cfg_attr(docsrs, doc(cfg(feature = "v3_24_9")))]
1080 pub fn gtk_overlay_scrolling(self, gtk_overlay_scrolling: bool) -> Self {
1081 Self {
1082 builder: self
1083 .builder
1084 .property("gtk-overlay-scrolling", gtk_overlay_scrolling),
1085 }
1086 }
1087
1088 pub fn gtk_primary_button_warps_slider(self, gtk_primary_button_warps_slider: bool) -> Self {
1097 Self {
1098 builder: self.builder.property(
1099 "gtk-primary-button-warps-slider",
1100 gtk_primary_button_warps_slider,
1101 ),
1102 }
1103 }
1104
1105 pub fn gtk_print_backends(self, gtk_print_backends: impl Into<glib::GString>) -> Self {
1109 Self {
1110 builder: self
1111 .builder
1112 .property("gtk-print-backends", gtk_print_backends.into()),
1113 }
1114 }
1115
1116 pub fn gtk_print_preview_command(
1126 self,
1127 gtk_print_preview_command: impl Into<glib::GString>,
1128 ) -> Self {
1129 Self {
1130 builder: self.builder.property(
1131 "gtk-print-preview-command",
1132 gtk_print_preview_command.into(),
1133 ),
1134 }
1135 }
1136
1137 pub fn gtk_recent_files_enabled(self, gtk_recent_files_enabled: bool) -> Self {
1140 Self {
1141 builder: self
1142 .builder
1143 .property("gtk-recent-files-enabled", gtk_recent_files_enabled),
1144 }
1145 }
1146
1147 pub fn gtk_recent_files_max_age(self, gtk_recent_files_max_age: i32) -> Self {
1152 Self {
1153 builder: self
1154 .builder
1155 .property("gtk-recent-files-max-age", gtk_recent_files_max_age),
1156 }
1157 }
1158
1159 pub fn gtk_shell_shows_app_menu(self, gtk_shell_shows_app_menu: bool) -> Self {
1160 Self {
1161 builder: self
1162 .builder
1163 .property("gtk-shell-shows-app-menu", gtk_shell_shows_app_menu),
1164 }
1165 }
1166
1167 pub fn gtk_shell_shows_desktop(self, gtk_shell_shows_desktop: bool) -> Self {
1168 Self {
1169 builder: self
1170 .builder
1171 .property("gtk-shell-shows-desktop", gtk_shell_shows_desktop),
1172 }
1173 }
1174
1175 pub fn gtk_shell_shows_menubar(self, gtk_shell_shows_menubar: bool) -> Self {
1176 Self {
1177 builder: self
1178 .builder
1179 .property("gtk-shell-shows-menubar", gtk_shell_shows_menubar),
1180 }
1181 }
1182
1183 pub fn gtk_sound_theme_name(self, gtk_sound_theme_name: impl Into<glib::GString>) -> Self {
1191 Self {
1192 builder: self
1193 .builder
1194 .property("gtk-sound-theme-name", gtk_sound_theme_name.into()),
1195 }
1196 }
1197
1198 pub fn gtk_split_cursor(self, gtk_split_cursor: bool) -> Self {
1199 Self {
1200 builder: self.builder.property("gtk-split-cursor", gtk_split_cursor),
1201 }
1202 }
1203
1204 pub fn gtk_theme_name(self, gtk_theme_name: impl Into<glib::GString>) -> Self {
1205 Self {
1206 builder: self
1207 .builder
1208 .property("gtk-theme-name", gtk_theme_name.into()),
1209 }
1210 }
1211
1212 pub fn gtk_titlebar_double_click(
1218 self,
1219 gtk_titlebar_double_click: impl Into<glib::GString>,
1220 ) -> Self {
1221 Self {
1222 builder: self.builder.property(
1223 "gtk-titlebar-double-click",
1224 gtk_titlebar_double_click.into(),
1225 ),
1226 }
1227 }
1228
1229 pub fn gtk_titlebar_middle_click(
1235 self,
1236 gtk_titlebar_middle_click: impl Into<glib::GString>,
1237 ) -> Self {
1238 Self {
1239 builder: self.builder.property(
1240 "gtk-titlebar-middle-click",
1241 gtk_titlebar_middle_click.into(),
1242 ),
1243 }
1244 }
1245
1246 pub fn gtk_titlebar_right_click(
1252 self,
1253 gtk_titlebar_right_click: impl Into<glib::GString>,
1254 ) -> Self {
1255 Self {
1256 builder: self
1257 .builder
1258 .property("gtk-titlebar-right-click", gtk_titlebar_right_click.into()),
1259 }
1260 }
1261
1262 pub fn gtk_xft_antialias(self, gtk_xft_antialias: i32) -> Self {
1263 Self {
1264 builder: self
1265 .builder
1266 .property("gtk-xft-antialias", gtk_xft_antialias),
1267 }
1268 }
1269
1270 pub fn gtk_xft_dpi(self, gtk_xft_dpi: i32) -> Self {
1271 Self {
1272 builder: self.builder.property("gtk-xft-dpi", gtk_xft_dpi),
1273 }
1274 }
1275
1276 pub fn gtk_xft_hinting(self, gtk_xft_hinting: i32) -> Self {
1277 Self {
1278 builder: self.builder.property("gtk-xft-hinting", gtk_xft_hinting),
1279 }
1280 }
1281
1282 pub fn gtk_xft_hintstyle(self, gtk_xft_hintstyle: impl Into<glib::GString>) -> Self {
1283 Self {
1284 builder: self
1285 .builder
1286 .property("gtk-xft-hintstyle", gtk_xft_hintstyle.into()),
1287 }
1288 }
1289
1290 pub fn gtk_xft_rgba(self, gtk_xft_rgba: impl Into<glib::GString>) -> Self {
1291 Self {
1292 builder: self.builder.property("gtk-xft-rgba", gtk_xft_rgba.into()),
1293 }
1294 }
1295
1296 #[must_use = "Building the object from the builder is usually expensive and is not expected to have side effects"]
1299 pub fn build(self) -> Settings {
1300 assert_initialized_main_thread!();
1301 self.builder.build()
1302 }
1303}
1304
1305pub trait GtkSettingsExt: IsA<Settings> + 'static {
1311 #[doc(alias = "gtk_settings_reset_property")]
1318 fn reset_property(&self, name: &str) {
1319 unsafe {
1320 ffi::gtk_settings_reset_property(self.as_ref().to_glib_none().0, name.to_glib_none().0);
1321 }
1322 }
1323
1324 #[doc(alias = "gtk-alternative-button-order")]
1325 fn is_gtk_alternative_button_order(&self) -> bool {
1326 ObjectExt::property(self.as_ref(), "gtk-alternative-button-order")
1327 }
1328
1329 #[doc(alias = "gtk-alternative-button-order")]
1330 fn set_gtk_alternative_button_order(&self, gtk_alternative_button_order: bool) {
1331 ObjectExt::set_property(
1332 self.as_ref(),
1333 "gtk-alternative-button-order",
1334 gtk_alternative_button_order,
1335 )
1336 }
1337
1338 #[doc(alias = "gtk-alternative-sort-arrows")]
1342 fn is_gtk_alternative_sort_arrows(&self) -> bool {
1343 ObjectExt::property(self.as_ref(), "gtk-alternative-sort-arrows")
1344 }
1345
1346 #[doc(alias = "gtk-alternative-sort-arrows")]
1350 fn set_gtk_alternative_sort_arrows(&self, gtk_alternative_sort_arrows: bool) {
1351 ObjectExt::set_property(
1352 self.as_ref(),
1353 "gtk-alternative-sort-arrows",
1354 gtk_alternative_sort_arrows,
1355 )
1356 }
1357
1358 #[doc(alias = "gtk-application-prefer-dark-theme")]
1370 fn is_gtk_application_prefer_dark_theme(&self) -> bool {
1371 ObjectExt::property(self.as_ref(), "gtk-application-prefer-dark-theme")
1372 }
1373
1374 #[doc(alias = "gtk-application-prefer-dark-theme")]
1386 fn set_gtk_application_prefer_dark_theme(&self, gtk_application_prefer_dark_theme: bool) {
1387 ObjectExt::set_property(
1388 self.as_ref(),
1389 "gtk-application-prefer-dark-theme",
1390 gtk_application_prefer_dark_theme,
1391 )
1392 }
1393
1394 #[cfg(feature = "v3_24")]
1395 #[cfg_attr(docsrs, doc(cfg(feature = "v3_24")))]
1396 #[doc(alias = "gtk-cursor-aspect-ratio")]
1397 fn gtk_cursor_aspect_ratio(&self) -> f32 {
1398 ObjectExt::property(self.as_ref(), "gtk-cursor-aspect-ratio")
1399 }
1400
1401 #[cfg(feature = "v3_24")]
1402 #[cfg_attr(docsrs, doc(cfg(feature = "v3_24")))]
1403 #[doc(alias = "gtk-cursor-aspect-ratio")]
1404 fn set_gtk_cursor_aspect_ratio(&self, gtk_cursor_aspect_ratio: f32) {
1405 ObjectExt::set_property(
1406 self.as_ref(),
1407 "gtk-cursor-aspect-ratio",
1408 gtk_cursor_aspect_ratio,
1409 )
1410 }
1411
1412 #[doc(alias = "gtk-cursor-blink")]
1417 fn is_gtk_cursor_blink(&self) -> bool {
1418 ObjectExt::property(self.as_ref(), "gtk-cursor-blink")
1419 }
1420
1421 #[doc(alias = "gtk-cursor-blink")]
1426 fn set_gtk_cursor_blink(&self, gtk_cursor_blink: bool) {
1427 ObjectExt::set_property(self.as_ref(), "gtk-cursor-blink", gtk_cursor_blink)
1428 }
1429
1430 #[doc(alias = "gtk-cursor-blink-time")]
1431 fn gtk_cursor_blink_time(&self) -> i32 {
1432 ObjectExt::property(self.as_ref(), "gtk-cursor-blink-time")
1433 }
1434
1435 #[doc(alias = "gtk-cursor-blink-time")]
1436 fn set_gtk_cursor_blink_time(&self, gtk_cursor_blink_time: i32) {
1437 ObjectExt::set_property(
1438 self.as_ref(),
1439 "gtk-cursor-blink-time",
1440 gtk_cursor_blink_time,
1441 )
1442 }
1443
1444 #[doc(alias = "gtk-cursor-blink-timeout")]
1450 fn gtk_cursor_blink_timeout(&self) -> i32 {
1451 ObjectExt::property(self.as_ref(), "gtk-cursor-blink-timeout")
1452 }
1453
1454 #[doc(alias = "gtk-cursor-blink-timeout")]
1460 fn set_gtk_cursor_blink_timeout(&self, gtk_cursor_blink_timeout: i32) {
1461 ObjectExt::set_property(
1462 self.as_ref(),
1463 "gtk-cursor-blink-timeout",
1464 gtk_cursor_blink_timeout,
1465 )
1466 }
1467
1468 #[doc(alias = "gtk-cursor-theme-name")]
1469 fn gtk_cursor_theme_name(&self) -> Option<glib::GString> {
1470 ObjectExt::property(self.as_ref(), "gtk-cursor-theme-name")
1471 }
1472
1473 #[doc(alias = "gtk-cursor-theme-name")]
1474 fn set_gtk_cursor_theme_name(&self, gtk_cursor_theme_name: Option<&str>) {
1475 ObjectExt::set_property(
1476 self.as_ref(),
1477 "gtk-cursor-theme-name",
1478 gtk_cursor_theme_name,
1479 )
1480 }
1481
1482 #[doc(alias = "gtk-cursor-theme-size")]
1483 fn gtk_cursor_theme_size(&self) -> i32 {
1484 ObjectExt::property(self.as_ref(), "gtk-cursor-theme-size")
1485 }
1486
1487 #[doc(alias = "gtk-cursor-theme-size")]
1488 fn set_gtk_cursor_theme_size(&self, gtk_cursor_theme_size: i32) {
1489 ObjectExt::set_property(
1490 self.as_ref(),
1491 "gtk-cursor-theme-size",
1492 gtk_cursor_theme_size,
1493 )
1494 }
1495
1496 #[doc(alias = "gtk-decoration-layout")]
1517 fn gtk_decoration_layout(&self) -> Option<glib::GString> {
1518 ObjectExt::property(self.as_ref(), "gtk-decoration-layout")
1519 }
1520
1521 #[doc(alias = "gtk-decoration-layout")]
1542 fn set_gtk_decoration_layout(&self, gtk_decoration_layout: Option<&str>) {
1543 ObjectExt::set_property(
1544 self.as_ref(),
1545 "gtk-decoration-layout",
1546 gtk_decoration_layout,
1547 )
1548 }
1549
1550 #[doc(alias = "gtk-dialogs-use-header")]
1557 fn is_gtk_dialogs_use_header(&self) -> bool {
1558 ObjectExt::property(self.as_ref(), "gtk-dialogs-use-header")
1559 }
1560
1561 #[doc(alias = "gtk-dialogs-use-header")]
1568 fn set_gtk_dialogs_use_header(&self, gtk_dialogs_use_header: bool) {
1569 ObjectExt::set_property(
1570 self.as_ref(),
1571 "gtk-dialogs-use-header",
1572 gtk_dialogs_use_header,
1573 )
1574 }
1575
1576 #[doc(alias = "gtk-dnd-drag-threshold")]
1577 fn gtk_dnd_drag_threshold(&self) -> i32 {
1578 ObjectExt::property(self.as_ref(), "gtk-dnd-drag-threshold")
1579 }
1580
1581 #[doc(alias = "gtk-dnd-drag-threshold")]
1582 fn set_gtk_dnd_drag_threshold(&self, gtk_dnd_drag_threshold: i32) {
1583 ObjectExt::set_property(
1584 self.as_ref(),
1585 "gtk-dnd-drag-threshold",
1586 gtk_dnd_drag_threshold,
1587 )
1588 }
1589
1590 #[doc(alias = "gtk-double-click-distance")]
1591 fn gtk_double_click_distance(&self) -> i32 {
1592 ObjectExt::property(self.as_ref(), "gtk-double-click-distance")
1593 }
1594
1595 #[doc(alias = "gtk-double-click-distance")]
1596 fn set_gtk_double_click_distance(&self, gtk_double_click_distance: i32) {
1597 ObjectExt::set_property(
1598 self.as_ref(),
1599 "gtk-double-click-distance",
1600 gtk_double_click_distance,
1601 )
1602 }
1603
1604 #[doc(alias = "gtk-double-click-time")]
1605 fn gtk_double_click_time(&self) -> i32 {
1606 ObjectExt::property(self.as_ref(), "gtk-double-click-time")
1607 }
1608
1609 #[doc(alias = "gtk-double-click-time")]
1610 fn set_gtk_double_click_time(&self, gtk_double_click_time: i32) {
1611 ObjectExt::set_property(
1612 self.as_ref(),
1613 "gtk-double-click-time",
1614 gtk_double_click_time,
1615 )
1616 }
1617
1618 #[doc(alias = "gtk-enable-accels")]
1621 fn is_gtk_enable_accels(&self) -> bool {
1622 ObjectExt::property(self.as_ref(), "gtk-enable-accels")
1623 }
1624
1625 #[doc(alias = "gtk-enable-accels")]
1628 fn set_gtk_enable_accels(&self, gtk_enable_accels: bool) {
1629 ObjectExt::set_property(self.as_ref(), "gtk-enable-accels", gtk_enable_accels)
1630 }
1631
1632 #[doc(alias = "gtk-enable-animations")]
1633 fn is_gtk_enable_animations(&self) -> bool {
1634 ObjectExt::property(self.as_ref(), "gtk-enable-animations")
1635 }
1636
1637 #[doc(alias = "gtk-enable-animations")]
1638 fn set_gtk_enable_animations(&self, gtk_enable_animations: bool) {
1639 ObjectExt::set_property(
1640 self.as_ref(),
1641 "gtk-enable-animations",
1642 gtk_enable_animations,
1643 )
1644 }
1645
1646 #[doc(alias = "gtk-enable-event-sounds")]
1654 fn is_gtk_enable_event_sounds(&self) -> bool {
1655 ObjectExt::property(self.as_ref(), "gtk-enable-event-sounds")
1656 }
1657
1658 #[doc(alias = "gtk-enable-event-sounds")]
1666 fn set_gtk_enable_event_sounds(&self, gtk_enable_event_sounds: bool) {
1667 ObjectExt::set_property(
1668 self.as_ref(),
1669 "gtk-enable-event-sounds",
1670 gtk_enable_event_sounds,
1671 )
1672 }
1673
1674 #[doc(alias = "gtk-enable-input-feedback-sounds")]
1682 fn is_gtk_enable_input_feedback_sounds(&self) -> bool {
1683 ObjectExt::property(self.as_ref(), "gtk-enable-input-feedback-sounds")
1684 }
1685
1686 #[doc(alias = "gtk-enable-input-feedback-sounds")]
1694 fn set_gtk_enable_input_feedback_sounds(&self, gtk_enable_input_feedback_sounds: bool) {
1695 ObjectExt::set_property(
1696 self.as_ref(),
1697 "gtk-enable-input-feedback-sounds",
1698 gtk_enable_input_feedback_sounds,
1699 )
1700 }
1701
1702 #[doc(alias = "gtk-enable-primary-paste")]
1705 fn is_gtk_enable_primary_paste(&self) -> bool {
1706 ObjectExt::property(self.as_ref(), "gtk-enable-primary-paste")
1707 }
1708
1709 #[doc(alias = "gtk-enable-primary-paste")]
1712 fn set_gtk_enable_primary_paste(&self, gtk_enable_primary_paste: bool) {
1713 ObjectExt::set_property(
1714 self.as_ref(),
1715 "gtk-enable-primary-paste",
1716 gtk_enable_primary_paste,
1717 )
1718 }
1719
1720 #[doc(alias = "gtk-entry-password-hint-timeout")]
1724 fn gtk_entry_password_hint_timeout(&self) -> u32 {
1725 ObjectExt::property(self.as_ref(), "gtk-entry-password-hint-timeout")
1726 }
1727
1728 #[doc(alias = "gtk-entry-password-hint-timeout")]
1732 fn set_gtk_entry_password_hint_timeout(&self, gtk_entry_password_hint_timeout: u32) {
1733 ObjectExt::set_property(
1734 self.as_ref(),
1735 "gtk-entry-password-hint-timeout",
1736 gtk_entry_password_hint_timeout,
1737 )
1738 }
1739
1740 #[doc(alias = "gtk-entry-select-on-focus")]
1741 fn is_gtk_entry_select_on_focus(&self) -> bool {
1742 ObjectExt::property(self.as_ref(), "gtk-entry-select-on-focus")
1743 }
1744
1745 #[doc(alias = "gtk-entry-select-on-focus")]
1746 fn set_gtk_entry_select_on_focus(&self, gtk_entry_select_on_focus: bool) {
1747 ObjectExt::set_property(
1748 self.as_ref(),
1749 "gtk-entry-select-on-focus",
1750 gtk_entry_select_on_focus,
1751 )
1752 }
1753
1754 #[doc(alias = "gtk-error-bell")]
1760 fn is_gtk_error_bell(&self) -> bool {
1761 ObjectExt::property(self.as_ref(), "gtk-error-bell")
1762 }
1763
1764 #[doc(alias = "gtk-error-bell")]
1770 fn set_gtk_error_bell(&self, gtk_error_bell: bool) {
1771 ObjectExt::set_property(self.as_ref(), "gtk-error-bell", gtk_error_bell)
1772 }
1773
1774 #[doc(alias = "gtk-font-name")]
1776 fn gtk_font_name(&self) -> Option<glib::GString> {
1777 ObjectExt::property(self.as_ref(), "gtk-font-name")
1778 }
1779
1780 #[doc(alias = "gtk-font-name")]
1782 fn set_gtk_font_name(&self, gtk_font_name: Option<&str>) {
1783 ObjectExt::set_property(self.as_ref(), "gtk-font-name", gtk_font_name)
1784 }
1785
1786 #[doc(alias = "gtk-fontconfig-timestamp")]
1787 fn gtk_fontconfig_timestamp(&self) -> u32 {
1788 ObjectExt::property(self.as_ref(), "gtk-fontconfig-timestamp")
1789 }
1790
1791 #[doc(alias = "gtk-fontconfig-timestamp")]
1792 fn set_gtk_fontconfig_timestamp(&self, gtk_fontconfig_timestamp: u32) {
1793 ObjectExt::set_property(
1794 self.as_ref(),
1795 "gtk-fontconfig-timestamp",
1796 gtk_fontconfig_timestamp,
1797 )
1798 }
1799
1800 #[doc(alias = "gtk-icon-theme-name")]
1801 fn gtk_icon_theme_name(&self) -> Option<glib::GString> {
1802 ObjectExt::property(self.as_ref(), "gtk-icon-theme-name")
1803 }
1804
1805 #[doc(alias = "gtk-icon-theme-name")]
1806 fn set_gtk_icon_theme_name(&self, gtk_icon_theme_name: Option<&str>) {
1807 ObjectExt::set_property(self.as_ref(), "gtk-icon-theme-name", gtk_icon_theme_name)
1808 }
1809
1810 #[doc(alias = "gtk-im-module")]
1818 fn gtk_im_module(&self) -> Option<glib::GString> {
1819 ObjectExt::property(self.as_ref(), "gtk-im-module")
1820 }
1821
1822 #[doc(alias = "gtk-im-module")]
1830 fn set_gtk_im_module(&self, gtk_im_module: Option<&str>) {
1831 ObjectExt::set_property(self.as_ref(), "gtk-im-module", gtk_im_module)
1832 }
1833
1834 #[doc(alias = "gtk-key-theme-name")]
1835 fn gtk_key_theme_name(&self) -> Option<glib::GString> {
1836 ObjectExt::property(self.as_ref(), "gtk-key-theme-name")
1837 }
1838
1839 #[doc(alias = "gtk-key-theme-name")]
1840 fn set_gtk_key_theme_name(&self, gtk_key_theme_name: Option<&str>) {
1841 ObjectExt::set_property(self.as_ref(), "gtk-key-theme-name", gtk_key_theme_name)
1842 }
1843
1844 #[doc(alias = "gtk-keynav-use-caret")]
1848 fn is_gtk_keynav_use_caret(&self) -> bool {
1849 ObjectExt::property(self.as_ref(), "gtk-keynav-use-caret")
1850 }
1851
1852 #[doc(alias = "gtk-keynav-use-caret")]
1856 fn set_gtk_keynav_use_caret(&self, gtk_keynav_use_caret: bool) {
1857 ObjectExt::set_property(self.as_ref(), "gtk-keynav-use-caret", gtk_keynav_use_caret)
1858 }
1859
1860 #[doc(alias = "gtk-label-select-on-focus")]
1861 fn is_gtk_label_select_on_focus(&self) -> bool {
1862 ObjectExt::property(self.as_ref(), "gtk-label-select-on-focus")
1863 }
1864
1865 #[doc(alias = "gtk-label-select-on-focus")]
1866 fn set_gtk_label_select_on_focus(&self, gtk_label_select_on_focus: bool) {
1867 ObjectExt::set_property(
1868 self.as_ref(),
1869 "gtk-label-select-on-focus",
1870 gtk_label_select_on_focus,
1871 )
1872 }
1873
1874 #[doc(alias = "gtk-long-press-time")]
1876 fn gtk_long_press_time(&self) -> u32 {
1877 ObjectExt::property(self.as_ref(), "gtk-long-press-time")
1878 }
1879
1880 #[doc(alias = "gtk-long-press-time")]
1882 fn set_gtk_long_press_time(&self, gtk_long_press_time: u32) {
1883 ObjectExt::set_property(self.as_ref(), "gtk-long-press-time", gtk_long_press_time)
1884 }
1885
1886 #[doc(alias = "gtk-modules")]
1887 fn gtk_modules(&self) -> Option<glib::GString> {
1888 ObjectExt::property(self.as_ref(), "gtk-modules")
1889 }
1890
1891 #[doc(alias = "gtk-modules")]
1892 fn set_gtk_modules(&self, gtk_modules: Option<&str>) {
1893 ObjectExt::set_property(self.as_ref(), "gtk-modules", gtk_modules)
1894 }
1895
1896 #[cfg(feature = "v3_24_9")]
1900 #[cfg_attr(docsrs, doc(cfg(feature = "v3_24_9")))]
1901 #[doc(alias = "gtk-overlay-scrolling")]
1902 fn is_gtk_overlay_scrolling(&self) -> bool {
1903 ObjectExt::property(self.as_ref(), "gtk-overlay-scrolling")
1904 }
1905
1906 #[cfg(feature = "v3_24_9")]
1910 #[cfg_attr(docsrs, doc(cfg(feature = "v3_24_9")))]
1911 #[doc(alias = "gtk-overlay-scrolling")]
1912 fn set_gtk_overlay_scrolling(&self, gtk_overlay_scrolling: bool) {
1913 ObjectExt::set_property(
1914 self.as_ref(),
1915 "gtk-overlay-scrolling",
1916 gtk_overlay_scrolling,
1917 )
1918 }
1919
1920 #[doc(alias = "gtk-primary-button-warps-slider")]
1929 fn is_gtk_primary_button_warps_slider(&self) -> bool {
1930 ObjectExt::property(self.as_ref(), "gtk-primary-button-warps-slider")
1931 }
1932
1933 #[doc(alias = "gtk-primary-button-warps-slider")]
1942 fn set_gtk_primary_button_warps_slider(&self, gtk_primary_button_warps_slider: bool) {
1943 ObjectExt::set_property(
1944 self.as_ref(),
1945 "gtk-primary-button-warps-slider",
1946 gtk_primary_button_warps_slider,
1947 )
1948 }
1949
1950 #[doc(alias = "gtk-print-backends")]
1954 fn gtk_print_backends(&self) -> Option<glib::GString> {
1955 ObjectExt::property(self.as_ref(), "gtk-print-backends")
1956 }
1957
1958 #[doc(alias = "gtk-print-backends")]
1962 fn set_gtk_print_backends(&self, gtk_print_backends: Option<&str>) {
1963 ObjectExt::set_property(self.as_ref(), "gtk-print-backends", gtk_print_backends)
1964 }
1965
1966 #[doc(alias = "gtk-print-preview-command")]
1976 fn gtk_print_preview_command(&self) -> Option<glib::GString> {
1977 ObjectExt::property(self.as_ref(), "gtk-print-preview-command")
1978 }
1979
1980 #[doc(alias = "gtk-print-preview-command")]
1990 fn set_gtk_print_preview_command(&self, gtk_print_preview_command: Option<&str>) {
1991 ObjectExt::set_property(
1992 self.as_ref(),
1993 "gtk-print-preview-command",
1994 gtk_print_preview_command,
1995 )
1996 }
1997
1998 #[doc(alias = "gtk-recent-files-enabled")]
2001 fn is_gtk_recent_files_enabled(&self) -> bool {
2002 ObjectExt::property(self.as_ref(), "gtk-recent-files-enabled")
2003 }
2004
2005 #[doc(alias = "gtk-recent-files-enabled")]
2008 fn set_gtk_recent_files_enabled(&self, gtk_recent_files_enabled: bool) {
2009 ObjectExt::set_property(
2010 self.as_ref(),
2011 "gtk-recent-files-enabled",
2012 gtk_recent_files_enabled,
2013 )
2014 }
2015
2016 #[doc(alias = "gtk-recent-files-max-age")]
2021 fn gtk_recent_files_max_age(&self) -> i32 {
2022 ObjectExt::property(self.as_ref(), "gtk-recent-files-max-age")
2023 }
2024
2025 #[doc(alias = "gtk-recent-files-max-age")]
2030 fn set_gtk_recent_files_max_age(&self, gtk_recent_files_max_age: i32) {
2031 ObjectExt::set_property(
2032 self.as_ref(),
2033 "gtk-recent-files-max-age",
2034 gtk_recent_files_max_age,
2035 )
2036 }
2037
2038 #[doc(alias = "gtk-shell-shows-app-menu")]
2039 fn is_gtk_shell_shows_app_menu(&self) -> bool {
2040 ObjectExt::property(self.as_ref(), "gtk-shell-shows-app-menu")
2041 }
2042
2043 #[doc(alias = "gtk-shell-shows-app-menu")]
2044 fn set_gtk_shell_shows_app_menu(&self, gtk_shell_shows_app_menu: bool) {
2045 ObjectExt::set_property(
2046 self.as_ref(),
2047 "gtk-shell-shows-app-menu",
2048 gtk_shell_shows_app_menu,
2049 )
2050 }
2051
2052 #[doc(alias = "gtk-shell-shows-desktop")]
2053 fn is_gtk_shell_shows_desktop(&self) -> bool {
2054 ObjectExt::property(self.as_ref(), "gtk-shell-shows-desktop")
2055 }
2056
2057 #[doc(alias = "gtk-shell-shows-desktop")]
2058 fn set_gtk_shell_shows_desktop(&self, gtk_shell_shows_desktop: bool) {
2059 ObjectExt::set_property(
2060 self.as_ref(),
2061 "gtk-shell-shows-desktop",
2062 gtk_shell_shows_desktop,
2063 )
2064 }
2065
2066 #[doc(alias = "gtk-shell-shows-menubar")]
2067 fn is_gtk_shell_shows_menubar(&self) -> bool {
2068 ObjectExt::property(self.as_ref(), "gtk-shell-shows-menubar")
2069 }
2070
2071 #[doc(alias = "gtk-shell-shows-menubar")]
2072 fn set_gtk_shell_shows_menubar(&self, gtk_shell_shows_menubar: bool) {
2073 ObjectExt::set_property(
2074 self.as_ref(),
2075 "gtk-shell-shows-menubar",
2076 gtk_shell_shows_menubar,
2077 )
2078 }
2079
2080 #[doc(alias = "gtk-sound-theme-name")]
2088 fn gtk_sound_theme_name(&self) -> Option<glib::GString> {
2089 ObjectExt::property(self.as_ref(), "gtk-sound-theme-name")
2090 }
2091
2092 #[doc(alias = "gtk-sound-theme-name")]
2100 fn set_gtk_sound_theme_name(&self, gtk_sound_theme_name: Option<&str>) {
2101 ObjectExt::set_property(self.as_ref(), "gtk-sound-theme-name", gtk_sound_theme_name)
2102 }
2103
2104 #[doc(alias = "gtk-split-cursor")]
2105 fn is_gtk_split_cursor(&self) -> bool {
2106 ObjectExt::property(self.as_ref(), "gtk-split-cursor")
2107 }
2108
2109 #[doc(alias = "gtk-split-cursor")]
2110 fn set_gtk_split_cursor(&self, gtk_split_cursor: bool) {
2111 ObjectExt::set_property(self.as_ref(), "gtk-split-cursor", gtk_split_cursor)
2112 }
2113
2114 #[doc(alias = "gtk-theme-name")]
2115 fn gtk_theme_name(&self) -> Option<glib::GString> {
2116 ObjectExt::property(self.as_ref(), "gtk-theme-name")
2117 }
2118
2119 #[doc(alias = "gtk-theme-name")]
2120 fn set_gtk_theme_name(&self, gtk_theme_name: Option<&str>) {
2121 ObjectExt::set_property(self.as_ref(), "gtk-theme-name", gtk_theme_name)
2122 }
2123
2124 #[doc(alias = "gtk-titlebar-double-click")]
2130 fn gtk_titlebar_double_click(&self) -> Option<glib::GString> {
2131 ObjectExt::property(self.as_ref(), "gtk-titlebar-double-click")
2132 }
2133
2134 #[doc(alias = "gtk-titlebar-double-click")]
2140 fn set_gtk_titlebar_double_click(&self, gtk_titlebar_double_click: Option<&str>) {
2141 ObjectExt::set_property(
2142 self.as_ref(),
2143 "gtk-titlebar-double-click",
2144 gtk_titlebar_double_click,
2145 )
2146 }
2147
2148 #[doc(alias = "gtk-titlebar-middle-click")]
2154 fn gtk_titlebar_middle_click(&self) -> Option<glib::GString> {
2155 ObjectExt::property(self.as_ref(), "gtk-titlebar-middle-click")
2156 }
2157
2158 #[doc(alias = "gtk-titlebar-middle-click")]
2164 fn set_gtk_titlebar_middle_click(&self, gtk_titlebar_middle_click: Option<&str>) {
2165 ObjectExt::set_property(
2166 self.as_ref(),
2167 "gtk-titlebar-middle-click",
2168 gtk_titlebar_middle_click,
2169 )
2170 }
2171
2172 #[doc(alias = "gtk-titlebar-right-click")]
2178 fn gtk_titlebar_right_click(&self) -> Option<glib::GString> {
2179 ObjectExt::property(self.as_ref(), "gtk-titlebar-right-click")
2180 }
2181
2182 #[doc(alias = "gtk-titlebar-right-click")]
2188 fn set_gtk_titlebar_right_click(&self, gtk_titlebar_right_click: Option<&str>) {
2189 ObjectExt::set_property(
2190 self.as_ref(),
2191 "gtk-titlebar-right-click",
2192 gtk_titlebar_right_click,
2193 )
2194 }
2195
2196 #[doc(alias = "gtk-xft-antialias")]
2197 fn gtk_xft_antialias(&self) -> i32 {
2198 ObjectExt::property(self.as_ref(), "gtk-xft-antialias")
2199 }
2200
2201 #[doc(alias = "gtk-xft-antialias")]
2202 fn set_gtk_xft_antialias(&self, gtk_xft_antialias: i32) {
2203 ObjectExt::set_property(self.as_ref(), "gtk-xft-antialias", gtk_xft_antialias)
2204 }
2205
2206 #[doc(alias = "gtk-xft-dpi")]
2207 fn gtk_xft_dpi(&self) -> i32 {
2208 ObjectExt::property(self.as_ref(), "gtk-xft-dpi")
2209 }
2210
2211 #[doc(alias = "gtk-xft-dpi")]
2212 fn set_gtk_xft_dpi(&self, gtk_xft_dpi: i32) {
2213 ObjectExt::set_property(self.as_ref(), "gtk-xft-dpi", gtk_xft_dpi)
2214 }
2215
2216 #[doc(alias = "gtk-xft-hinting")]
2217 fn gtk_xft_hinting(&self) -> i32 {
2218 ObjectExt::property(self.as_ref(), "gtk-xft-hinting")
2219 }
2220
2221 #[doc(alias = "gtk-xft-hinting")]
2222 fn set_gtk_xft_hinting(&self, gtk_xft_hinting: i32) {
2223 ObjectExt::set_property(self.as_ref(), "gtk-xft-hinting", gtk_xft_hinting)
2224 }
2225
2226 #[doc(alias = "gtk-xft-hintstyle")]
2227 fn gtk_xft_hintstyle(&self) -> Option<glib::GString> {
2228 ObjectExt::property(self.as_ref(), "gtk-xft-hintstyle")
2229 }
2230
2231 #[doc(alias = "gtk-xft-hintstyle")]
2232 fn set_gtk_xft_hintstyle(&self, gtk_xft_hintstyle: Option<&str>) {
2233 ObjectExt::set_property(self.as_ref(), "gtk-xft-hintstyle", gtk_xft_hintstyle)
2234 }
2235
2236 #[doc(alias = "gtk-xft-rgba")]
2237 fn gtk_xft_rgba(&self) -> Option<glib::GString> {
2238 ObjectExt::property(self.as_ref(), "gtk-xft-rgba")
2239 }
2240
2241 #[doc(alias = "gtk-xft-rgba")]
2242 fn set_gtk_xft_rgba(&self, gtk_xft_rgba: Option<&str>) {
2243 ObjectExt::set_property(self.as_ref(), "gtk-xft-rgba", gtk_xft_rgba)
2244 }
2245
2246 #[doc(alias = "gtk-alternative-button-order")]
2247 fn connect_gtk_alternative_button_order_notify<F: Fn(&Self) + 'static>(
2248 &self,
2249 f: F,
2250 ) -> SignalHandlerId {
2251 unsafe extern "C" fn notify_gtk_alternative_button_order_trampoline<
2252 P: IsA<Settings>,
2253 F: Fn(&P) + 'static,
2254 >(
2255 this: *mut ffi::GtkSettings,
2256 _param_spec: glib::ffi::gpointer,
2257 f: glib::ffi::gpointer,
2258 ) {
2259 unsafe {
2260 let f: &F = &*(f as *const F);
2261 f(Settings::from_glib_borrow(this).unsafe_cast_ref())
2262 }
2263 }
2264 unsafe {
2265 let f: Box_<F> = Box_::new(f);
2266 connect_raw(
2267 self.as_ptr() as *mut _,
2268 c"notify::gtk-alternative-button-order".as_ptr(),
2269 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2270 notify_gtk_alternative_button_order_trampoline::<Self, F> as *const (),
2271 )),
2272 Box_::into_raw(f),
2273 )
2274 }
2275 }
2276
2277 #[doc(alias = "gtk-alternative-sort-arrows")]
2278 fn connect_gtk_alternative_sort_arrows_notify<F: Fn(&Self) + 'static>(
2279 &self,
2280 f: F,
2281 ) -> SignalHandlerId {
2282 unsafe extern "C" fn notify_gtk_alternative_sort_arrows_trampoline<
2283 P: IsA<Settings>,
2284 F: Fn(&P) + 'static,
2285 >(
2286 this: *mut ffi::GtkSettings,
2287 _param_spec: glib::ffi::gpointer,
2288 f: glib::ffi::gpointer,
2289 ) {
2290 unsafe {
2291 let f: &F = &*(f as *const F);
2292 f(Settings::from_glib_borrow(this).unsafe_cast_ref())
2293 }
2294 }
2295 unsafe {
2296 let f: Box_<F> = Box_::new(f);
2297 connect_raw(
2298 self.as_ptr() as *mut _,
2299 c"notify::gtk-alternative-sort-arrows".as_ptr(),
2300 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2301 notify_gtk_alternative_sort_arrows_trampoline::<Self, F> as *const (),
2302 )),
2303 Box_::into_raw(f),
2304 )
2305 }
2306 }
2307
2308 #[doc(alias = "gtk-application-prefer-dark-theme")]
2309 fn connect_gtk_application_prefer_dark_theme_notify<F: Fn(&Self) + 'static>(
2310 &self,
2311 f: F,
2312 ) -> SignalHandlerId {
2313 unsafe extern "C" fn notify_gtk_application_prefer_dark_theme_trampoline<
2314 P: IsA<Settings>,
2315 F: Fn(&P) + 'static,
2316 >(
2317 this: *mut ffi::GtkSettings,
2318 _param_spec: glib::ffi::gpointer,
2319 f: glib::ffi::gpointer,
2320 ) {
2321 unsafe {
2322 let f: &F = &*(f as *const F);
2323 f(Settings::from_glib_borrow(this).unsafe_cast_ref())
2324 }
2325 }
2326 unsafe {
2327 let f: Box_<F> = Box_::new(f);
2328 connect_raw(
2329 self.as_ptr() as *mut _,
2330 c"notify::gtk-application-prefer-dark-theme".as_ptr(),
2331 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2332 notify_gtk_application_prefer_dark_theme_trampoline::<Self, F> as *const (),
2333 )),
2334 Box_::into_raw(f),
2335 )
2336 }
2337 }
2338
2339 #[cfg(feature = "v3_24")]
2340 #[cfg_attr(docsrs, doc(cfg(feature = "v3_24")))]
2341 #[doc(alias = "gtk-cursor-aspect-ratio")]
2342 fn connect_gtk_cursor_aspect_ratio_notify<F: Fn(&Self) + 'static>(
2343 &self,
2344 f: F,
2345 ) -> SignalHandlerId {
2346 unsafe extern "C" fn notify_gtk_cursor_aspect_ratio_trampoline<
2347 P: IsA<Settings>,
2348 F: Fn(&P) + 'static,
2349 >(
2350 this: *mut ffi::GtkSettings,
2351 _param_spec: glib::ffi::gpointer,
2352 f: glib::ffi::gpointer,
2353 ) {
2354 unsafe {
2355 let f: &F = &*(f as *const F);
2356 f(Settings::from_glib_borrow(this).unsafe_cast_ref())
2357 }
2358 }
2359 unsafe {
2360 let f: Box_<F> = Box_::new(f);
2361 connect_raw(
2362 self.as_ptr() as *mut _,
2363 c"notify::gtk-cursor-aspect-ratio".as_ptr(),
2364 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2365 notify_gtk_cursor_aspect_ratio_trampoline::<Self, F> as *const (),
2366 )),
2367 Box_::into_raw(f),
2368 )
2369 }
2370 }
2371
2372 #[doc(alias = "gtk-cursor-blink")]
2373 fn connect_gtk_cursor_blink_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2374 unsafe extern "C" fn notify_gtk_cursor_blink_trampoline<
2375 P: IsA<Settings>,
2376 F: Fn(&P) + 'static,
2377 >(
2378 this: *mut ffi::GtkSettings,
2379 _param_spec: glib::ffi::gpointer,
2380 f: glib::ffi::gpointer,
2381 ) {
2382 unsafe {
2383 let f: &F = &*(f as *const F);
2384 f(Settings::from_glib_borrow(this).unsafe_cast_ref())
2385 }
2386 }
2387 unsafe {
2388 let f: Box_<F> = Box_::new(f);
2389 connect_raw(
2390 self.as_ptr() as *mut _,
2391 c"notify::gtk-cursor-blink".as_ptr(),
2392 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2393 notify_gtk_cursor_blink_trampoline::<Self, F> as *const (),
2394 )),
2395 Box_::into_raw(f),
2396 )
2397 }
2398 }
2399
2400 #[doc(alias = "gtk-cursor-blink-time")]
2401 fn connect_gtk_cursor_blink_time_notify<F: Fn(&Self) + 'static>(
2402 &self,
2403 f: F,
2404 ) -> SignalHandlerId {
2405 unsafe extern "C" fn notify_gtk_cursor_blink_time_trampoline<
2406 P: IsA<Settings>,
2407 F: Fn(&P) + 'static,
2408 >(
2409 this: *mut ffi::GtkSettings,
2410 _param_spec: glib::ffi::gpointer,
2411 f: glib::ffi::gpointer,
2412 ) {
2413 unsafe {
2414 let f: &F = &*(f as *const F);
2415 f(Settings::from_glib_borrow(this).unsafe_cast_ref())
2416 }
2417 }
2418 unsafe {
2419 let f: Box_<F> = Box_::new(f);
2420 connect_raw(
2421 self.as_ptr() as *mut _,
2422 c"notify::gtk-cursor-blink-time".as_ptr(),
2423 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2424 notify_gtk_cursor_blink_time_trampoline::<Self, F> as *const (),
2425 )),
2426 Box_::into_raw(f),
2427 )
2428 }
2429 }
2430
2431 #[doc(alias = "gtk-cursor-blink-timeout")]
2432 fn connect_gtk_cursor_blink_timeout_notify<F: Fn(&Self) + 'static>(
2433 &self,
2434 f: F,
2435 ) -> SignalHandlerId {
2436 unsafe extern "C" fn notify_gtk_cursor_blink_timeout_trampoline<
2437 P: IsA<Settings>,
2438 F: Fn(&P) + 'static,
2439 >(
2440 this: *mut ffi::GtkSettings,
2441 _param_spec: glib::ffi::gpointer,
2442 f: glib::ffi::gpointer,
2443 ) {
2444 unsafe {
2445 let f: &F = &*(f as *const F);
2446 f(Settings::from_glib_borrow(this).unsafe_cast_ref())
2447 }
2448 }
2449 unsafe {
2450 let f: Box_<F> = Box_::new(f);
2451 connect_raw(
2452 self.as_ptr() as *mut _,
2453 c"notify::gtk-cursor-blink-timeout".as_ptr(),
2454 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2455 notify_gtk_cursor_blink_timeout_trampoline::<Self, F> as *const (),
2456 )),
2457 Box_::into_raw(f),
2458 )
2459 }
2460 }
2461
2462 #[doc(alias = "gtk-cursor-theme-name")]
2463 fn connect_gtk_cursor_theme_name_notify<F: Fn(&Self) + 'static>(
2464 &self,
2465 f: F,
2466 ) -> SignalHandlerId {
2467 unsafe extern "C" fn notify_gtk_cursor_theme_name_trampoline<
2468 P: IsA<Settings>,
2469 F: Fn(&P) + 'static,
2470 >(
2471 this: *mut ffi::GtkSettings,
2472 _param_spec: glib::ffi::gpointer,
2473 f: glib::ffi::gpointer,
2474 ) {
2475 unsafe {
2476 let f: &F = &*(f as *const F);
2477 f(Settings::from_glib_borrow(this).unsafe_cast_ref())
2478 }
2479 }
2480 unsafe {
2481 let f: Box_<F> = Box_::new(f);
2482 connect_raw(
2483 self.as_ptr() as *mut _,
2484 c"notify::gtk-cursor-theme-name".as_ptr(),
2485 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2486 notify_gtk_cursor_theme_name_trampoline::<Self, F> as *const (),
2487 )),
2488 Box_::into_raw(f),
2489 )
2490 }
2491 }
2492
2493 #[doc(alias = "gtk-cursor-theme-size")]
2494 fn connect_gtk_cursor_theme_size_notify<F: Fn(&Self) + 'static>(
2495 &self,
2496 f: F,
2497 ) -> SignalHandlerId {
2498 unsafe extern "C" fn notify_gtk_cursor_theme_size_trampoline<
2499 P: IsA<Settings>,
2500 F: Fn(&P) + 'static,
2501 >(
2502 this: *mut ffi::GtkSettings,
2503 _param_spec: glib::ffi::gpointer,
2504 f: glib::ffi::gpointer,
2505 ) {
2506 unsafe {
2507 let f: &F = &*(f as *const F);
2508 f(Settings::from_glib_borrow(this).unsafe_cast_ref())
2509 }
2510 }
2511 unsafe {
2512 let f: Box_<F> = Box_::new(f);
2513 connect_raw(
2514 self.as_ptr() as *mut _,
2515 c"notify::gtk-cursor-theme-size".as_ptr(),
2516 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2517 notify_gtk_cursor_theme_size_trampoline::<Self, F> as *const (),
2518 )),
2519 Box_::into_raw(f),
2520 )
2521 }
2522 }
2523
2524 #[doc(alias = "gtk-decoration-layout")]
2525 fn connect_gtk_decoration_layout_notify<F: Fn(&Self) + 'static>(
2526 &self,
2527 f: F,
2528 ) -> SignalHandlerId {
2529 unsafe extern "C" fn notify_gtk_decoration_layout_trampoline<
2530 P: IsA<Settings>,
2531 F: Fn(&P) + 'static,
2532 >(
2533 this: *mut ffi::GtkSettings,
2534 _param_spec: glib::ffi::gpointer,
2535 f: glib::ffi::gpointer,
2536 ) {
2537 unsafe {
2538 let f: &F = &*(f as *const F);
2539 f(Settings::from_glib_borrow(this).unsafe_cast_ref())
2540 }
2541 }
2542 unsafe {
2543 let f: Box_<F> = Box_::new(f);
2544 connect_raw(
2545 self.as_ptr() as *mut _,
2546 c"notify::gtk-decoration-layout".as_ptr(),
2547 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2548 notify_gtk_decoration_layout_trampoline::<Self, F> as *const (),
2549 )),
2550 Box_::into_raw(f),
2551 )
2552 }
2553 }
2554
2555 #[doc(alias = "gtk-dialogs-use-header")]
2556 fn connect_gtk_dialogs_use_header_notify<F: Fn(&Self) + 'static>(
2557 &self,
2558 f: F,
2559 ) -> SignalHandlerId {
2560 unsafe extern "C" fn notify_gtk_dialogs_use_header_trampoline<
2561 P: IsA<Settings>,
2562 F: Fn(&P) + 'static,
2563 >(
2564 this: *mut ffi::GtkSettings,
2565 _param_spec: glib::ffi::gpointer,
2566 f: glib::ffi::gpointer,
2567 ) {
2568 unsafe {
2569 let f: &F = &*(f as *const F);
2570 f(Settings::from_glib_borrow(this).unsafe_cast_ref())
2571 }
2572 }
2573 unsafe {
2574 let f: Box_<F> = Box_::new(f);
2575 connect_raw(
2576 self.as_ptr() as *mut _,
2577 c"notify::gtk-dialogs-use-header".as_ptr(),
2578 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2579 notify_gtk_dialogs_use_header_trampoline::<Self, F> as *const (),
2580 )),
2581 Box_::into_raw(f),
2582 )
2583 }
2584 }
2585
2586 #[doc(alias = "gtk-dnd-drag-threshold")]
2587 fn connect_gtk_dnd_drag_threshold_notify<F: Fn(&Self) + 'static>(
2588 &self,
2589 f: F,
2590 ) -> SignalHandlerId {
2591 unsafe extern "C" fn notify_gtk_dnd_drag_threshold_trampoline<
2592 P: IsA<Settings>,
2593 F: Fn(&P) + '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(Settings::from_glib_borrow(this).unsafe_cast_ref())
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-dnd-drag-threshold".as_ptr(),
2609 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2610 notify_gtk_dnd_drag_threshold_trampoline::<Self, F> as *const (),
2611 )),
2612 Box_::into_raw(f),
2613 )
2614 }
2615 }
2616
2617 #[doc(alias = "gtk-double-click-distance")]
2618 fn connect_gtk_double_click_distance_notify<F: Fn(&Self) + 'static>(
2619 &self,
2620 f: F,
2621 ) -> SignalHandlerId {
2622 unsafe extern "C" fn notify_gtk_double_click_distance_trampoline<
2623 P: IsA<Settings>,
2624 F: Fn(&P) + 'static,
2625 >(
2626 this: *mut ffi::GtkSettings,
2627 _param_spec: glib::ffi::gpointer,
2628 f: glib::ffi::gpointer,
2629 ) {
2630 unsafe {
2631 let f: &F = &*(f as *const F);
2632 f(Settings::from_glib_borrow(this).unsafe_cast_ref())
2633 }
2634 }
2635 unsafe {
2636 let f: Box_<F> = Box_::new(f);
2637 connect_raw(
2638 self.as_ptr() as *mut _,
2639 c"notify::gtk-double-click-distance".as_ptr(),
2640 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2641 notify_gtk_double_click_distance_trampoline::<Self, F> as *const (),
2642 )),
2643 Box_::into_raw(f),
2644 )
2645 }
2646 }
2647
2648 #[doc(alias = "gtk-double-click-time")]
2649 fn connect_gtk_double_click_time_notify<F: Fn(&Self) + 'static>(
2650 &self,
2651 f: F,
2652 ) -> SignalHandlerId {
2653 unsafe extern "C" fn notify_gtk_double_click_time_trampoline<
2654 P: IsA<Settings>,
2655 F: Fn(&P) + 'static,
2656 >(
2657 this: *mut ffi::GtkSettings,
2658 _param_spec: glib::ffi::gpointer,
2659 f: glib::ffi::gpointer,
2660 ) {
2661 unsafe {
2662 let f: &F = &*(f as *const F);
2663 f(Settings::from_glib_borrow(this).unsafe_cast_ref())
2664 }
2665 }
2666 unsafe {
2667 let f: Box_<F> = Box_::new(f);
2668 connect_raw(
2669 self.as_ptr() as *mut _,
2670 c"notify::gtk-double-click-time".as_ptr(),
2671 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2672 notify_gtk_double_click_time_trampoline::<Self, F> as *const (),
2673 )),
2674 Box_::into_raw(f),
2675 )
2676 }
2677 }
2678
2679 #[doc(alias = "gtk-enable-accels")]
2680 fn connect_gtk_enable_accels_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2681 unsafe extern "C" fn notify_gtk_enable_accels_trampoline<
2682 P: IsA<Settings>,
2683 F: Fn(&P) + 'static,
2684 >(
2685 this: *mut ffi::GtkSettings,
2686 _param_spec: glib::ffi::gpointer,
2687 f: glib::ffi::gpointer,
2688 ) {
2689 unsafe {
2690 let f: &F = &*(f as *const F);
2691 f(Settings::from_glib_borrow(this).unsafe_cast_ref())
2692 }
2693 }
2694 unsafe {
2695 let f: Box_<F> = Box_::new(f);
2696 connect_raw(
2697 self.as_ptr() as *mut _,
2698 c"notify::gtk-enable-accels".as_ptr(),
2699 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2700 notify_gtk_enable_accels_trampoline::<Self, F> as *const (),
2701 )),
2702 Box_::into_raw(f),
2703 )
2704 }
2705 }
2706
2707 #[doc(alias = "gtk-enable-animations")]
2708 fn connect_gtk_enable_animations_notify<F: Fn(&Self) + 'static>(
2709 &self,
2710 f: F,
2711 ) -> SignalHandlerId {
2712 unsafe extern "C" fn notify_gtk_enable_animations_trampoline<
2713 P: IsA<Settings>,
2714 F: Fn(&P) + 'static,
2715 >(
2716 this: *mut ffi::GtkSettings,
2717 _param_spec: glib::ffi::gpointer,
2718 f: glib::ffi::gpointer,
2719 ) {
2720 unsafe {
2721 let f: &F = &*(f as *const F);
2722 f(Settings::from_glib_borrow(this).unsafe_cast_ref())
2723 }
2724 }
2725 unsafe {
2726 let f: Box_<F> = Box_::new(f);
2727 connect_raw(
2728 self.as_ptr() as *mut _,
2729 c"notify::gtk-enable-animations".as_ptr(),
2730 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2731 notify_gtk_enable_animations_trampoline::<Self, F> as *const (),
2732 )),
2733 Box_::into_raw(f),
2734 )
2735 }
2736 }
2737
2738 #[doc(alias = "gtk-enable-event-sounds")]
2739 fn connect_gtk_enable_event_sounds_notify<F: Fn(&Self) + 'static>(
2740 &self,
2741 f: F,
2742 ) -> SignalHandlerId {
2743 unsafe extern "C" fn notify_gtk_enable_event_sounds_trampoline<
2744 P: IsA<Settings>,
2745 F: Fn(&P) + 'static,
2746 >(
2747 this: *mut ffi::GtkSettings,
2748 _param_spec: glib::ffi::gpointer,
2749 f: glib::ffi::gpointer,
2750 ) {
2751 unsafe {
2752 let f: &F = &*(f as *const F);
2753 f(Settings::from_glib_borrow(this).unsafe_cast_ref())
2754 }
2755 }
2756 unsafe {
2757 let f: Box_<F> = Box_::new(f);
2758 connect_raw(
2759 self.as_ptr() as *mut _,
2760 c"notify::gtk-enable-event-sounds".as_ptr(),
2761 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2762 notify_gtk_enable_event_sounds_trampoline::<Self, F> as *const (),
2763 )),
2764 Box_::into_raw(f),
2765 )
2766 }
2767 }
2768
2769 #[doc(alias = "gtk-enable-input-feedback-sounds")]
2770 fn connect_gtk_enable_input_feedback_sounds_notify<F: Fn(&Self) + 'static>(
2771 &self,
2772 f: F,
2773 ) -> SignalHandlerId {
2774 unsafe extern "C" fn notify_gtk_enable_input_feedback_sounds_trampoline<
2775 P: IsA<Settings>,
2776 F: Fn(&P) + 'static,
2777 >(
2778 this: *mut ffi::GtkSettings,
2779 _param_spec: glib::ffi::gpointer,
2780 f: glib::ffi::gpointer,
2781 ) {
2782 unsafe {
2783 let f: &F = &*(f as *const F);
2784 f(Settings::from_glib_borrow(this).unsafe_cast_ref())
2785 }
2786 }
2787 unsafe {
2788 let f: Box_<F> = Box_::new(f);
2789 connect_raw(
2790 self.as_ptr() as *mut _,
2791 c"notify::gtk-enable-input-feedback-sounds".as_ptr(),
2792 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2793 notify_gtk_enable_input_feedback_sounds_trampoline::<Self, F> as *const (),
2794 )),
2795 Box_::into_raw(f),
2796 )
2797 }
2798 }
2799
2800 #[doc(alias = "gtk-enable-primary-paste")]
2801 fn connect_gtk_enable_primary_paste_notify<F: Fn(&Self) + 'static>(
2802 &self,
2803 f: F,
2804 ) -> SignalHandlerId {
2805 unsafe extern "C" fn notify_gtk_enable_primary_paste_trampoline<
2806 P: IsA<Settings>,
2807 F: Fn(&P) + 'static,
2808 >(
2809 this: *mut ffi::GtkSettings,
2810 _param_spec: glib::ffi::gpointer,
2811 f: glib::ffi::gpointer,
2812 ) {
2813 unsafe {
2814 let f: &F = &*(f as *const F);
2815 f(Settings::from_glib_borrow(this).unsafe_cast_ref())
2816 }
2817 }
2818 unsafe {
2819 let f: Box_<F> = Box_::new(f);
2820 connect_raw(
2821 self.as_ptr() as *mut _,
2822 c"notify::gtk-enable-primary-paste".as_ptr(),
2823 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2824 notify_gtk_enable_primary_paste_trampoline::<Self, F> as *const (),
2825 )),
2826 Box_::into_raw(f),
2827 )
2828 }
2829 }
2830
2831 #[doc(alias = "gtk-entry-password-hint-timeout")]
2832 fn connect_gtk_entry_password_hint_timeout_notify<F: Fn(&Self) + 'static>(
2833 &self,
2834 f: F,
2835 ) -> SignalHandlerId {
2836 unsafe extern "C" fn notify_gtk_entry_password_hint_timeout_trampoline<
2837 P: IsA<Settings>,
2838 F: Fn(&P) + 'static,
2839 >(
2840 this: *mut ffi::GtkSettings,
2841 _param_spec: glib::ffi::gpointer,
2842 f: glib::ffi::gpointer,
2843 ) {
2844 unsafe {
2845 let f: &F = &*(f as *const F);
2846 f(Settings::from_glib_borrow(this).unsafe_cast_ref())
2847 }
2848 }
2849 unsafe {
2850 let f: Box_<F> = Box_::new(f);
2851 connect_raw(
2852 self.as_ptr() as *mut _,
2853 c"notify::gtk-entry-password-hint-timeout".as_ptr(),
2854 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2855 notify_gtk_entry_password_hint_timeout_trampoline::<Self, F> as *const (),
2856 )),
2857 Box_::into_raw(f),
2858 )
2859 }
2860 }
2861
2862 #[doc(alias = "gtk-entry-select-on-focus")]
2863 fn connect_gtk_entry_select_on_focus_notify<F: Fn(&Self) + 'static>(
2864 &self,
2865 f: F,
2866 ) -> SignalHandlerId {
2867 unsafe extern "C" fn notify_gtk_entry_select_on_focus_trampoline<
2868 P: IsA<Settings>,
2869 F: Fn(&P) + 'static,
2870 >(
2871 this: *mut ffi::GtkSettings,
2872 _param_spec: glib::ffi::gpointer,
2873 f: glib::ffi::gpointer,
2874 ) {
2875 unsafe {
2876 let f: &F = &*(f as *const F);
2877 f(Settings::from_glib_borrow(this).unsafe_cast_ref())
2878 }
2879 }
2880 unsafe {
2881 let f: Box_<F> = Box_::new(f);
2882 connect_raw(
2883 self.as_ptr() as *mut _,
2884 c"notify::gtk-entry-select-on-focus".as_ptr(),
2885 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2886 notify_gtk_entry_select_on_focus_trampoline::<Self, F> as *const (),
2887 )),
2888 Box_::into_raw(f),
2889 )
2890 }
2891 }
2892
2893 #[doc(alias = "gtk-error-bell")]
2894 fn connect_gtk_error_bell_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2895 unsafe extern "C" fn notify_gtk_error_bell_trampoline<
2896 P: IsA<Settings>,
2897 F: Fn(&P) + 'static,
2898 >(
2899 this: *mut ffi::GtkSettings,
2900 _param_spec: glib::ffi::gpointer,
2901 f: glib::ffi::gpointer,
2902 ) {
2903 unsafe {
2904 let f: &F = &*(f as *const F);
2905 f(Settings::from_glib_borrow(this).unsafe_cast_ref())
2906 }
2907 }
2908 unsafe {
2909 let f: Box_<F> = Box_::new(f);
2910 connect_raw(
2911 self.as_ptr() as *mut _,
2912 c"notify::gtk-error-bell".as_ptr(),
2913 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2914 notify_gtk_error_bell_trampoline::<Self, F> as *const (),
2915 )),
2916 Box_::into_raw(f),
2917 )
2918 }
2919 }
2920
2921 #[doc(alias = "gtk-font-name")]
2922 fn connect_gtk_font_name_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2923 unsafe extern "C" fn notify_gtk_font_name_trampoline<
2924 P: IsA<Settings>,
2925 F: Fn(&P) + 'static,
2926 >(
2927 this: *mut ffi::GtkSettings,
2928 _param_spec: glib::ffi::gpointer,
2929 f: glib::ffi::gpointer,
2930 ) {
2931 unsafe {
2932 let f: &F = &*(f as *const F);
2933 f(Settings::from_glib_borrow(this).unsafe_cast_ref())
2934 }
2935 }
2936 unsafe {
2937 let f: Box_<F> = Box_::new(f);
2938 connect_raw(
2939 self.as_ptr() as *mut _,
2940 c"notify::gtk-font-name".as_ptr(),
2941 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2942 notify_gtk_font_name_trampoline::<Self, F> as *const (),
2943 )),
2944 Box_::into_raw(f),
2945 )
2946 }
2947 }
2948
2949 #[doc(alias = "gtk-fontconfig-timestamp")]
2950 fn connect_gtk_fontconfig_timestamp_notify<F: Fn(&Self) + 'static>(
2951 &self,
2952 f: F,
2953 ) -> SignalHandlerId {
2954 unsafe extern "C" fn notify_gtk_fontconfig_timestamp_trampoline<
2955 P: IsA<Settings>,
2956 F: Fn(&P) + 'static,
2957 >(
2958 this: *mut ffi::GtkSettings,
2959 _param_spec: glib::ffi::gpointer,
2960 f: glib::ffi::gpointer,
2961 ) {
2962 unsafe {
2963 let f: &F = &*(f as *const F);
2964 f(Settings::from_glib_borrow(this).unsafe_cast_ref())
2965 }
2966 }
2967 unsafe {
2968 let f: Box_<F> = Box_::new(f);
2969 connect_raw(
2970 self.as_ptr() as *mut _,
2971 c"notify::gtk-fontconfig-timestamp".as_ptr(),
2972 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2973 notify_gtk_fontconfig_timestamp_trampoline::<Self, F> as *const (),
2974 )),
2975 Box_::into_raw(f),
2976 )
2977 }
2978 }
2979
2980 #[doc(alias = "gtk-icon-theme-name")]
2981 fn connect_gtk_icon_theme_name_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2982 unsafe extern "C" fn notify_gtk_icon_theme_name_trampoline<
2983 P: IsA<Settings>,
2984 F: Fn(&P) + 'static,
2985 >(
2986 this: *mut ffi::GtkSettings,
2987 _param_spec: glib::ffi::gpointer,
2988 f: glib::ffi::gpointer,
2989 ) {
2990 unsafe {
2991 let f: &F = &*(f as *const F);
2992 f(Settings::from_glib_borrow(this).unsafe_cast_ref())
2993 }
2994 }
2995 unsafe {
2996 let f: Box_<F> = Box_::new(f);
2997 connect_raw(
2998 self.as_ptr() as *mut _,
2999 c"notify::gtk-icon-theme-name".as_ptr(),
3000 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3001 notify_gtk_icon_theme_name_trampoline::<Self, F> as *const (),
3002 )),
3003 Box_::into_raw(f),
3004 )
3005 }
3006 }
3007
3008 #[doc(alias = "gtk-im-module")]
3009 fn connect_gtk_im_module_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3010 unsafe extern "C" fn notify_gtk_im_module_trampoline<
3011 P: IsA<Settings>,
3012 F: Fn(&P) + '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(Settings::from_glib_borrow(this).unsafe_cast_ref())
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-im-module".as_ptr(),
3028 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3029 notify_gtk_im_module_trampoline::<Self, F> as *const (),
3030 )),
3031 Box_::into_raw(f),
3032 )
3033 }
3034 }
3035
3036 #[doc(alias = "gtk-key-theme-name")]
3037 fn connect_gtk_key_theme_name_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3038 unsafe extern "C" fn notify_gtk_key_theme_name_trampoline<
3039 P: IsA<Settings>,
3040 F: Fn(&P) + 'static,
3041 >(
3042 this: *mut ffi::GtkSettings,
3043 _param_spec: glib::ffi::gpointer,
3044 f: glib::ffi::gpointer,
3045 ) {
3046 unsafe {
3047 let f: &F = &*(f as *const F);
3048 f(Settings::from_glib_borrow(this).unsafe_cast_ref())
3049 }
3050 }
3051 unsafe {
3052 let f: Box_<F> = Box_::new(f);
3053 connect_raw(
3054 self.as_ptr() as *mut _,
3055 c"notify::gtk-key-theme-name".as_ptr(),
3056 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3057 notify_gtk_key_theme_name_trampoline::<Self, F> as *const (),
3058 )),
3059 Box_::into_raw(f),
3060 )
3061 }
3062 }
3063
3064 #[doc(alias = "gtk-keynav-use-caret")]
3065 fn connect_gtk_keynav_use_caret_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3066 unsafe extern "C" fn notify_gtk_keynav_use_caret_trampoline<
3067 P: IsA<Settings>,
3068 F: Fn(&P) + 'static,
3069 >(
3070 this: *mut ffi::GtkSettings,
3071 _param_spec: glib::ffi::gpointer,
3072 f: glib::ffi::gpointer,
3073 ) {
3074 unsafe {
3075 let f: &F = &*(f as *const F);
3076 f(Settings::from_glib_borrow(this).unsafe_cast_ref())
3077 }
3078 }
3079 unsafe {
3080 let f: Box_<F> = Box_::new(f);
3081 connect_raw(
3082 self.as_ptr() as *mut _,
3083 c"notify::gtk-keynav-use-caret".as_ptr(),
3084 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3085 notify_gtk_keynav_use_caret_trampoline::<Self, F> as *const (),
3086 )),
3087 Box_::into_raw(f),
3088 )
3089 }
3090 }
3091
3092 #[doc(alias = "gtk-label-select-on-focus")]
3093 fn connect_gtk_label_select_on_focus_notify<F: Fn(&Self) + 'static>(
3094 &self,
3095 f: F,
3096 ) -> SignalHandlerId {
3097 unsafe extern "C" fn notify_gtk_label_select_on_focus_trampoline<
3098 P: IsA<Settings>,
3099 F: Fn(&P) + 'static,
3100 >(
3101 this: *mut ffi::GtkSettings,
3102 _param_spec: glib::ffi::gpointer,
3103 f: glib::ffi::gpointer,
3104 ) {
3105 unsafe {
3106 let f: &F = &*(f as *const F);
3107 f(Settings::from_glib_borrow(this).unsafe_cast_ref())
3108 }
3109 }
3110 unsafe {
3111 let f: Box_<F> = Box_::new(f);
3112 connect_raw(
3113 self.as_ptr() as *mut _,
3114 c"notify::gtk-label-select-on-focus".as_ptr(),
3115 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3116 notify_gtk_label_select_on_focus_trampoline::<Self, F> as *const (),
3117 )),
3118 Box_::into_raw(f),
3119 )
3120 }
3121 }
3122
3123 #[doc(alias = "gtk-long-press-time")]
3124 fn connect_gtk_long_press_time_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3125 unsafe extern "C" fn notify_gtk_long_press_time_trampoline<
3126 P: IsA<Settings>,
3127 F: Fn(&P) + 'static,
3128 >(
3129 this: *mut ffi::GtkSettings,
3130 _param_spec: glib::ffi::gpointer,
3131 f: glib::ffi::gpointer,
3132 ) {
3133 unsafe {
3134 let f: &F = &*(f as *const F);
3135 f(Settings::from_glib_borrow(this).unsafe_cast_ref())
3136 }
3137 }
3138 unsafe {
3139 let f: Box_<F> = Box_::new(f);
3140 connect_raw(
3141 self.as_ptr() as *mut _,
3142 c"notify::gtk-long-press-time".as_ptr(),
3143 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3144 notify_gtk_long_press_time_trampoline::<Self, F> as *const (),
3145 )),
3146 Box_::into_raw(f),
3147 )
3148 }
3149 }
3150
3151 #[doc(alias = "gtk-modules")]
3152 fn connect_gtk_modules_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3153 unsafe extern "C" fn notify_gtk_modules_trampoline<
3154 P: IsA<Settings>,
3155 F: Fn(&P) + 'static,
3156 >(
3157 this: *mut ffi::GtkSettings,
3158 _param_spec: glib::ffi::gpointer,
3159 f: glib::ffi::gpointer,
3160 ) {
3161 unsafe {
3162 let f: &F = &*(f as *const F);
3163 f(Settings::from_glib_borrow(this).unsafe_cast_ref())
3164 }
3165 }
3166 unsafe {
3167 let f: Box_<F> = Box_::new(f);
3168 connect_raw(
3169 self.as_ptr() as *mut _,
3170 c"notify::gtk-modules".as_ptr(),
3171 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3172 notify_gtk_modules_trampoline::<Self, F> as *const (),
3173 )),
3174 Box_::into_raw(f),
3175 )
3176 }
3177 }
3178
3179 #[cfg(feature = "v3_24_9")]
3180 #[cfg_attr(docsrs, doc(cfg(feature = "v3_24_9")))]
3181 #[doc(alias = "gtk-overlay-scrolling")]
3182 fn connect_gtk_overlay_scrolling_notify<F: Fn(&Self) + 'static>(
3183 &self,
3184 f: F,
3185 ) -> SignalHandlerId {
3186 unsafe extern "C" fn notify_gtk_overlay_scrolling_trampoline<
3187 P: IsA<Settings>,
3188 F: Fn(&P) + 'static,
3189 >(
3190 this: *mut ffi::GtkSettings,
3191 _param_spec: glib::ffi::gpointer,
3192 f: glib::ffi::gpointer,
3193 ) {
3194 unsafe {
3195 let f: &F = &*(f as *const F);
3196 f(Settings::from_glib_borrow(this).unsafe_cast_ref())
3197 }
3198 }
3199 unsafe {
3200 let f: Box_<F> = Box_::new(f);
3201 connect_raw(
3202 self.as_ptr() as *mut _,
3203 c"notify::gtk-overlay-scrolling".as_ptr(),
3204 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3205 notify_gtk_overlay_scrolling_trampoline::<Self, F> as *const (),
3206 )),
3207 Box_::into_raw(f),
3208 )
3209 }
3210 }
3211
3212 #[doc(alias = "gtk-primary-button-warps-slider")]
3213 fn connect_gtk_primary_button_warps_slider_notify<F: Fn(&Self) + 'static>(
3214 &self,
3215 f: F,
3216 ) -> SignalHandlerId {
3217 unsafe extern "C" fn notify_gtk_primary_button_warps_slider_trampoline<
3218 P: IsA<Settings>,
3219 F: Fn(&P) + 'static,
3220 >(
3221 this: *mut ffi::GtkSettings,
3222 _param_spec: glib::ffi::gpointer,
3223 f: glib::ffi::gpointer,
3224 ) {
3225 unsafe {
3226 let f: &F = &*(f as *const F);
3227 f(Settings::from_glib_borrow(this).unsafe_cast_ref())
3228 }
3229 }
3230 unsafe {
3231 let f: Box_<F> = Box_::new(f);
3232 connect_raw(
3233 self.as_ptr() as *mut _,
3234 c"notify::gtk-primary-button-warps-slider".as_ptr(),
3235 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3236 notify_gtk_primary_button_warps_slider_trampoline::<Self, F> as *const (),
3237 )),
3238 Box_::into_raw(f),
3239 )
3240 }
3241 }
3242
3243 #[doc(alias = "gtk-print-backends")]
3244 fn connect_gtk_print_backends_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3245 unsafe extern "C" fn notify_gtk_print_backends_trampoline<
3246 P: IsA<Settings>,
3247 F: Fn(&P) + 'static,
3248 >(
3249 this: *mut ffi::GtkSettings,
3250 _param_spec: glib::ffi::gpointer,
3251 f: glib::ffi::gpointer,
3252 ) {
3253 unsafe {
3254 let f: &F = &*(f as *const F);
3255 f(Settings::from_glib_borrow(this).unsafe_cast_ref())
3256 }
3257 }
3258 unsafe {
3259 let f: Box_<F> = Box_::new(f);
3260 connect_raw(
3261 self.as_ptr() as *mut _,
3262 c"notify::gtk-print-backends".as_ptr(),
3263 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3264 notify_gtk_print_backends_trampoline::<Self, F> as *const (),
3265 )),
3266 Box_::into_raw(f),
3267 )
3268 }
3269 }
3270
3271 #[doc(alias = "gtk-print-preview-command")]
3272 fn connect_gtk_print_preview_command_notify<F: Fn(&Self) + 'static>(
3273 &self,
3274 f: F,
3275 ) -> SignalHandlerId {
3276 unsafe extern "C" fn notify_gtk_print_preview_command_trampoline<
3277 P: IsA<Settings>,
3278 F: Fn(&P) + 'static,
3279 >(
3280 this: *mut ffi::GtkSettings,
3281 _param_spec: glib::ffi::gpointer,
3282 f: glib::ffi::gpointer,
3283 ) {
3284 unsafe {
3285 let f: &F = &*(f as *const F);
3286 f(Settings::from_glib_borrow(this).unsafe_cast_ref())
3287 }
3288 }
3289 unsafe {
3290 let f: Box_<F> = Box_::new(f);
3291 connect_raw(
3292 self.as_ptr() as *mut _,
3293 c"notify::gtk-print-preview-command".as_ptr(),
3294 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3295 notify_gtk_print_preview_command_trampoline::<Self, F> as *const (),
3296 )),
3297 Box_::into_raw(f),
3298 )
3299 }
3300 }
3301
3302 #[doc(alias = "gtk-recent-files-enabled")]
3303 fn connect_gtk_recent_files_enabled_notify<F: Fn(&Self) + 'static>(
3304 &self,
3305 f: F,
3306 ) -> SignalHandlerId {
3307 unsafe extern "C" fn notify_gtk_recent_files_enabled_trampoline<
3308 P: IsA<Settings>,
3309 F: Fn(&P) + 'static,
3310 >(
3311 this: *mut ffi::GtkSettings,
3312 _param_spec: glib::ffi::gpointer,
3313 f: glib::ffi::gpointer,
3314 ) {
3315 unsafe {
3316 let f: &F = &*(f as *const F);
3317 f(Settings::from_glib_borrow(this).unsafe_cast_ref())
3318 }
3319 }
3320 unsafe {
3321 let f: Box_<F> = Box_::new(f);
3322 connect_raw(
3323 self.as_ptr() as *mut _,
3324 c"notify::gtk-recent-files-enabled".as_ptr(),
3325 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3326 notify_gtk_recent_files_enabled_trampoline::<Self, F> as *const (),
3327 )),
3328 Box_::into_raw(f),
3329 )
3330 }
3331 }
3332
3333 #[doc(alias = "gtk-recent-files-max-age")]
3334 fn connect_gtk_recent_files_max_age_notify<F: Fn(&Self) + 'static>(
3335 &self,
3336 f: F,
3337 ) -> SignalHandlerId {
3338 unsafe extern "C" fn notify_gtk_recent_files_max_age_trampoline<
3339 P: IsA<Settings>,
3340 F: Fn(&P) + 'static,
3341 >(
3342 this: *mut ffi::GtkSettings,
3343 _param_spec: glib::ffi::gpointer,
3344 f: glib::ffi::gpointer,
3345 ) {
3346 unsafe {
3347 let f: &F = &*(f as *const F);
3348 f(Settings::from_glib_borrow(this).unsafe_cast_ref())
3349 }
3350 }
3351 unsafe {
3352 let f: Box_<F> = Box_::new(f);
3353 connect_raw(
3354 self.as_ptr() as *mut _,
3355 c"notify::gtk-recent-files-max-age".as_ptr(),
3356 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3357 notify_gtk_recent_files_max_age_trampoline::<Self, F> as *const (),
3358 )),
3359 Box_::into_raw(f),
3360 )
3361 }
3362 }
3363
3364 #[doc(alias = "gtk-shell-shows-app-menu")]
3365 fn connect_gtk_shell_shows_app_menu_notify<F: Fn(&Self) + 'static>(
3366 &self,
3367 f: F,
3368 ) -> SignalHandlerId {
3369 unsafe extern "C" fn notify_gtk_shell_shows_app_menu_trampoline<
3370 P: IsA<Settings>,
3371 F: Fn(&P) + 'static,
3372 >(
3373 this: *mut ffi::GtkSettings,
3374 _param_spec: glib::ffi::gpointer,
3375 f: glib::ffi::gpointer,
3376 ) {
3377 unsafe {
3378 let f: &F = &*(f as *const F);
3379 f(Settings::from_glib_borrow(this).unsafe_cast_ref())
3380 }
3381 }
3382 unsafe {
3383 let f: Box_<F> = Box_::new(f);
3384 connect_raw(
3385 self.as_ptr() as *mut _,
3386 c"notify::gtk-shell-shows-app-menu".as_ptr(),
3387 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3388 notify_gtk_shell_shows_app_menu_trampoline::<Self, F> as *const (),
3389 )),
3390 Box_::into_raw(f),
3391 )
3392 }
3393 }
3394
3395 #[doc(alias = "gtk-shell-shows-desktop")]
3396 fn connect_gtk_shell_shows_desktop_notify<F: Fn(&Self) + 'static>(
3397 &self,
3398 f: F,
3399 ) -> SignalHandlerId {
3400 unsafe extern "C" fn notify_gtk_shell_shows_desktop_trampoline<
3401 P: IsA<Settings>,
3402 F: Fn(&P) + 'static,
3403 >(
3404 this: *mut ffi::GtkSettings,
3405 _param_spec: glib::ffi::gpointer,
3406 f: glib::ffi::gpointer,
3407 ) {
3408 unsafe {
3409 let f: &F = &*(f as *const F);
3410 f(Settings::from_glib_borrow(this).unsafe_cast_ref())
3411 }
3412 }
3413 unsafe {
3414 let f: Box_<F> = Box_::new(f);
3415 connect_raw(
3416 self.as_ptr() as *mut _,
3417 c"notify::gtk-shell-shows-desktop".as_ptr(),
3418 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3419 notify_gtk_shell_shows_desktop_trampoline::<Self, F> as *const (),
3420 )),
3421 Box_::into_raw(f),
3422 )
3423 }
3424 }
3425
3426 #[doc(alias = "gtk-shell-shows-menubar")]
3427 fn connect_gtk_shell_shows_menubar_notify<F: Fn(&Self) + 'static>(
3428 &self,
3429 f: F,
3430 ) -> SignalHandlerId {
3431 unsafe extern "C" fn notify_gtk_shell_shows_menubar_trampoline<
3432 P: IsA<Settings>,
3433 F: Fn(&P) + 'static,
3434 >(
3435 this: *mut ffi::GtkSettings,
3436 _param_spec: glib::ffi::gpointer,
3437 f: glib::ffi::gpointer,
3438 ) {
3439 unsafe {
3440 let f: &F = &*(f as *const F);
3441 f(Settings::from_glib_borrow(this).unsafe_cast_ref())
3442 }
3443 }
3444 unsafe {
3445 let f: Box_<F> = Box_::new(f);
3446 connect_raw(
3447 self.as_ptr() as *mut _,
3448 c"notify::gtk-shell-shows-menubar".as_ptr(),
3449 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3450 notify_gtk_shell_shows_menubar_trampoline::<Self, F> as *const (),
3451 )),
3452 Box_::into_raw(f),
3453 )
3454 }
3455 }
3456
3457 #[doc(alias = "gtk-sound-theme-name")]
3458 fn connect_gtk_sound_theme_name_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3459 unsafe extern "C" fn notify_gtk_sound_theme_name_trampoline<
3460 P: IsA<Settings>,
3461 F: Fn(&P) + 'static,
3462 >(
3463 this: *mut ffi::GtkSettings,
3464 _param_spec: glib::ffi::gpointer,
3465 f: glib::ffi::gpointer,
3466 ) {
3467 unsafe {
3468 let f: &F = &*(f as *const F);
3469 f(Settings::from_glib_borrow(this).unsafe_cast_ref())
3470 }
3471 }
3472 unsafe {
3473 let f: Box_<F> = Box_::new(f);
3474 connect_raw(
3475 self.as_ptr() as *mut _,
3476 c"notify::gtk-sound-theme-name".as_ptr(),
3477 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3478 notify_gtk_sound_theme_name_trampoline::<Self, F> as *const (),
3479 )),
3480 Box_::into_raw(f),
3481 )
3482 }
3483 }
3484
3485 #[doc(alias = "gtk-split-cursor")]
3486 fn connect_gtk_split_cursor_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3487 unsafe extern "C" fn notify_gtk_split_cursor_trampoline<
3488 P: IsA<Settings>,
3489 F: Fn(&P) + 'static,
3490 >(
3491 this: *mut ffi::GtkSettings,
3492 _param_spec: glib::ffi::gpointer,
3493 f: glib::ffi::gpointer,
3494 ) {
3495 unsafe {
3496 let f: &F = &*(f as *const F);
3497 f(Settings::from_glib_borrow(this).unsafe_cast_ref())
3498 }
3499 }
3500 unsafe {
3501 let f: Box_<F> = Box_::new(f);
3502 connect_raw(
3503 self.as_ptr() as *mut _,
3504 c"notify::gtk-split-cursor".as_ptr(),
3505 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3506 notify_gtk_split_cursor_trampoline::<Self, F> as *const (),
3507 )),
3508 Box_::into_raw(f),
3509 )
3510 }
3511 }
3512
3513 #[doc(alias = "gtk-theme-name")]
3514 fn connect_gtk_theme_name_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3515 unsafe extern "C" fn notify_gtk_theme_name_trampoline<
3516 P: IsA<Settings>,
3517 F: Fn(&P) + 'static,
3518 >(
3519 this: *mut ffi::GtkSettings,
3520 _param_spec: glib::ffi::gpointer,
3521 f: glib::ffi::gpointer,
3522 ) {
3523 unsafe {
3524 let f: &F = &*(f as *const F);
3525 f(Settings::from_glib_borrow(this).unsafe_cast_ref())
3526 }
3527 }
3528 unsafe {
3529 let f: Box_<F> = Box_::new(f);
3530 connect_raw(
3531 self.as_ptr() as *mut _,
3532 c"notify::gtk-theme-name".as_ptr(),
3533 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3534 notify_gtk_theme_name_trampoline::<Self, F> as *const (),
3535 )),
3536 Box_::into_raw(f),
3537 )
3538 }
3539 }
3540
3541 #[doc(alias = "gtk-titlebar-double-click")]
3542 fn connect_gtk_titlebar_double_click_notify<F: Fn(&Self) + 'static>(
3543 &self,
3544 f: F,
3545 ) -> SignalHandlerId {
3546 unsafe extern "C" fn notify_gtk_titlebar_double_click_trampoline<
3547 P: IsA<Settings>,
3548 F: Fn(&P) + 'static,
3549 >(
3550 this: *mut ffi::GtkSettings,
3551 _param_spec: glib::ffi::gpointer,
3552 f: glib::ffi::gpointer,
3553 ) {
3554 unsafe {
3555 let f: &F = &*(f as *const F);
3556 f(Settings::from_glib_borrow(this).unsafe_cast_ref())
3557 }
3558 }
3559 unsafe {
3560 let f: Box_<F> = Box_::new(f);
3561 connect_raw(
3562 self.as_ptr() as *mut _,
3563 c"notify::gtk-titlebar-double-click".as_ptr(),
3564 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3565 notify_gtk_titlebar_double_click_trampoline::<Self, F> as *const (),
3566 )),
3567 Box_::into_raw(f),
3568 )
3569 }
3570 }
3571
3572 #[doc(alias = "gtk-titlebar-middle-click")]
3573 fn connect_gtk_titlebar_middle_click_notify<F: Fn(&Self) + 'static>(
3574 &self,
3575 f: F,
3576 ) -> SignalHandlerId {
3577 unsafe extern "C" fn notify_gtk_titlebar_middle_click_trampoline<
3578 P: IsA<Settings>,
3579 F: Fn(&P) + 'static,
3580 >(
3581 this: *mut ffi::GtkSettings,
3582 _param_spec: glib::ffi::gpointer,
3583 f: glib::ffi::gpointer,
3584 ) {
3585 unsafe {
3586 let f: &F = &*(f as *const F);
3587 f(Settings::from_glib_borrow(this).unsafe_cast_ref())
3588 }
3589 }
3590 unsafe {
3591 let f: Box_<F> = Box_::new(f);
3592 connect_raw(
3593 self.as_ptr() as *mut _,
3594 c"notify::gtk-titlebar-middle-click".as_ptr(),
3595 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3596 notify_gtk_titlebar_middle_click_trampoline::<Self, F> as *const (),
3597 )),
3598 Box_::into_raw(f),
3599 )
3600 }
3601 }
3602
3603 #[doc(alias = "gtk-titlebar-right-click")]
3604 fn connect_gtk_titlebar_right_click_notify<F: Fn(&Self) + 'static>(
3605 &self,
3606 f: F,
3607 ) -> SignalHandlerId {
3608 unsafe extern "C" fn notify_gtk_titlebar_right_click_trampoline<
3609 P: IsA<Settings>,
3610 F: Fn(&P) + 'static,
3611 >(
3612 this: *mut ffi::GtkSettings,
3613 _param_spec: glib::ffi::gpointer,
3614 f: glib::ffi::gpointer,
3615 ) {
3616 unsafe {
3617 let f: &F = &*(f as *const F);
3618 f(Settings::from_glib_borrow(this).unsafe_cast_ref())
3619 }
3620 }
3621 unsafe {
3622 let f: Box_<F> = Box_::new(f);
3623 connect_raw(
3624 self.as_ptr() as *mut _,
3625 c"notify::gtk-titlebar-right-click".as_ptr(),
3626 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3627 notify_gtk_titlebar_right_click_trampoline::<Self, F> as *const (),
3628 )),
3629 Box_::into_raw(f),
3630 )
3631 }
3632 }
3633
3634 #[doc(alias = "gtk-xft-antialias")]
3635 fn connect_gtk_xft_antialias_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3636 unsafe extern "C" fn notify_gtk_xft_antialias_trampoline<
3637 P: IsA<Settings>,
3638 F: Fn(&P) + 'static,
3639 >(
3640 this: *mut ffi::GtkSettings,
3641 _param_spec: glib::ffi::gpointer,
3642 f: glib::ffi::gpointer,
3643 ) {
3644 unsafe {
3645 let f: &F = &*(f as *const F);
3646 f(Settings::from_glib_borrow(this).unsafe_cast_ref())
3647 }
3648 }
3649 unsafe {
3650 let f: Box_<F> = Box_::new(f);
3651 connect_raw(
3652 self.as_ptr() as *mut _,
3653 c"notify::gtk-xft-antialias".as_ptr(),
3654 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3655 notify_gtk_xft_antialias_trampoline::<Self, F> as *const (),
3656 )),
3657 Box_::into_raw(f),
3658 )
3659 }
3660 }
3661
3662 #[doc(alias = "gtk-xft-dpi")]
3663 fn connect_gtk_xft_dpi_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3664 unsafe extern "C" fn notify_gtk_xft_dpi_trampoline<
3665 P: IsA<Settings>,
3666 F: Fn(&P) + 'static,
3667 >(
3668 this: *mut ffi::GtkSettings,
3669 _param_spec: glib::ffi::gpointer,
3670 f: glib::ffi::gpointer,
3671 ) {
3672 unsafe {
3673 let f: &F = &*(f as *const F);
3674 f(Settings::from_glib_borrow(this).unsafe_cast_ref())
3675 }
3676 }
3677 unsafe {
3678 let f: Box_<F> = Box_::new(f);
3679 connect_raw(
3680 self.as_ptr() as *mut _,
3681 c"notify::gtk-xft-dpi".as_ptr(),
3682 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3683 notify_gtk_xft_dpi_trampoline::<Self, F> as *const (),
3684 )),
3685 Box_::into_raw(f),
3686 )
3687 }
3688 }
3689
3690 #[doc(alias = "gtk-xft-hinting")]
3691 fn connect_gtk_xft_hinting_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3692 unsafe extern "C" fn notify_gtk_xft_hinting_trampoline<
3693 P: IsA<Settings>,
3694 F: Fn(&P) + 'static,
3695 >(
3696 this: *mut ffi::GtkSettings,
3697 _param_spec: glib::ffi::gpointer,
3698 f: glib::ffi::gpointer,
3699 ) {
3700 unsafe {
3701 let f: &F = &*(f as *const F);
3702 f(Settings::from_glib_borrow(this).unsafe_cast_ref())
3703 }
3704 }
3705 unsafe {
3706 let f: Box_<F> = Box_::new(f);
3707 connect_raw(
3708 self.as_ptr() as *mut _,
3709 c"notify::gtk-xft-hinting".as_ptr(),
3710 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3711 notify_gtk_xft_hinting_trampoline::<Self, F> as *const (),
3712 )),
3713 Box_::into_raw(f),
3714 )
3715 }
3716 }
3717
3718 #[doc(alias = "gtk-xft-hintstyle")]
3719 fn connect_gtk_xft_hintstyle_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3720 unsafe extern "C" fn notify_gtk_xft_hintstyle_trampoline<
3721 P: IsA<Settings>,
3722 F: Fn(&P) + 'static,
3723 >(
3724 this: *mut ffi::GtkSettings,
3725 _param_spec: glib::ffi::gpointer,
3726 f: glib::ffi::gpointer,
3727 ) {
3728 unsafe {
3729 let f: &F = &*(f as *const F);
3730 f(Settings::from_glib_borrow(this).unsafe_cast_ref())
3731 }
3732 }
3733 unsafe {
3734 let f: Box_<F> = Box_::new(f);
3735 connect_raw(
3736 self.as_ptr() as *mut _,
3737 c"notify::gtk-xft-hintstyle".as_ptr(),
3738 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3739 notify_gtk_xft_hintstyle_trampoline::<Self, F> as *const (),
3740 )),
3741 Box_::into_raw(f),
3742 )
3743 }
3744 }
3745
3746 #[doc(alias = "gtk-xft-rgba")]
3747 fn connect_gtk_xft_rgba_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3748 unsafe extern "C" fn notify_gtk_xft_rgba_trampoline<
3749 P: IsA<Settings>,
3750 F: Fn(&P) + 'static,
3751 >(
3752 this: *mut ffi::GtkSettings,
3753 _param_spec: glib::ffi::gpointer,
3754 f: glib::ffi::gpointer,
3755 ) {
3756 unsafe {
3757 let f: &F = &*(f as *const F);
3758 f(Settings::from_glib_borrow(this).unsafe_cast_ref())
3759 }
3760 }
3761 unsafe {
3762 let f: Box_<F> = Box_::new(f);
3763 connect_raw(
3764 self.as_ptr() as *mut _,
3765 c"notify::gtk-xft-rgba".as_ptr(),
3766 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3767 notify_gtk_xft_rgba_trampoline::<Self, F> as *const (),
3768 )),
3769 Box_::into_raw(f),
3770 )
3771 }
3772 }
3773}
3774
3775impl<O: IsA<Settings>> GtkSettingsExt for O {}