1#![allow(deprecated)]
6
7#[cfg(feature = "v2_42")]
8#[cfg_attr(docsrs, doc(cfg(feature = "v2_42")))]
9use crate::{Feature, FeatureList};
10use crate::{HardwareAccelerationPolicy, ffi};
11use glib::{
12 prelude::*,
13 signal::{SignalHandlerId, connect_raw},
14 translate::*,
15};
16use std::boxed::Box as Box_;
17
18glib::wrapper! {
19 #[doc(alias = "WebKitSettings")]
516 pub struct Settings(Object<ffi::WebKitSettings, ffi::WebKitSettingsClass>);
517
518 match fn {
519 type_ => || ffi::webkit_settings_get_type(),
520 }
521}
522
523impl Settings {
524 #[doc(alias = "webkit_settings_new")]
533 pub fn new() -> Settings {
534 assert_initialized_main_thread!();
535 unsafe { from_glib_full(ffi::webkit_settings_new()) }
536 }
537
538 pub fn builder() -> SettingsBuilder {
549 SettingsBuilder::new()
550 }
551
552 #[cfg(feature = "v2_46")]
569 #[cfg_attr(docsrs, doc(cfg(feature = "v2_46")))]
570 #[doc(alias = "webkit_settings_apply_from_key_file")]
571 pub fn apply_from_key_file(
572 &self,
573 key_file: &glib::KeyFile,
574 group_name: &str,
575 ) -> Result<(), glib::Error> {
576 unsafe {
577 let mut error = std::ptr::null_mut();
578 let is_ok = ffi::webkit_settings_apply_from_key_file(
579 self.to_glib_none().0,
580 key_file.to_glib_none().0,
581 group_name.to_glib_none().0,
582 &mut error,
583 );
584 debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
585 if error.is_null() {
586 Ok(())
587 } else {
588 Err(from_glib_full(error))
589 }
590 }
591 }
592
593 #[doc(alias = "webkit_settings_get_allow_file_access_from_file_urls")]
599 #[doc(alias = "get_allow_file_access_from_file_urls")]
600 #[doc(alias = "allow-file-access-from-file-urls")]
601 pub fn allows_file_access_from_file_urls(&self) -> bool {
602 unsafe {
603 from_glib(ffi::webkit_settings_get_allow_file_access_from_file_urls(
604 self.to_glib_none().0,
605 ))
606 }
607 }
608
609 #[doc(alias = "webkit_settings_get_allow_modal_dialogs")]
615 #[doc(alias = "get_allow_modal_dialogs")]
616 #[doc(alias = "allow-modal-dialogs")]
617 pub fn allows_modal_dialogs(&self) -> bool {
618 unsafe {
619 from_glib(ffi::webkit_settings_get_allow_modal_dialogs(
620 self.to_glib_none().0,
621 ))
622 }
623 }
624
625 #[doc(alias = "webkit_settings_get_allow_top_navigation_to_data_urls")]
632 #[doc(alias = "get_allow_top_navigation_to_data_urls")]
633 #[doc(alias = "allow-top-navigation-to-data-urls")]
634 pub fn allows_top_navigation_to_data_urls(&self) -> bool {
635 unsafe {
636 from_glib(ffi::webkit_settings_get_allow_top_navigation_to_data_urls(
637 self.to_glib_none().0,
638 ))
639 }
640 }
641
642 #[doc(alias = "webkit_settings_get_allow_universal_access_from_file_urls")]
648 #[doc(alias = "get_allow_universal_access_from_file_urls")]
649 #[doc(alias = "allow-universal-access-from-file-urls")]
650 pub fn allows_universal_access_from_file_urls(&self) -> bool {
651 unsafe {
652 from_glib(
653 ffi::webkit_settings_get_allow_universal_access_from_file_urls(
654 self.to_glib_none().0,
655 ),
656 )
657 }
658 }
659
660 #[doc(alias = "webkit_settings_get_auto_load_images")]
666 #[doc(alias = "get_auto_load_images")]
667 #[doc(alias = "auto-load-images")]
668 pub fn is_auto_load_images(&self) -> bool {
669 unsafe {
670 from_glib(ffi::webkit_settings_get_auto_load_images(
671 self.to_glib_none().0,
672 ))
673 }
674 }
675
676 #[doc(alias = "webkit_settings_get_cursive_font_family")]
682 #[doc(alias = "get_cursive_font_family")]
683 #[doc(alias = "cursive-font-family")]
684 pub fn cursive_font_family(&self) -> Option<glib::GString> {
685 unsafe {
686 from_glib_none(ffi::webkit_settings_get_cursive_font_family(
687 self.to_glib_none().0,
688 ))
689 }
690 }
691
692 #[doc(alias = "webkit_settings_get_default_charset")]
698 #[doc(alias = "get_default_charset")]
699 #[doc(alias = "default-charset")]
700 pub fn default_charset(&self) -> Option<glib::GString> {
701 unsafe {
702 from_glib_none(ffi::webkit_settings_get_default_charset(
703 self.to_glib_none().0,
704 ))
705 }
706 }
707
708 #[doc(alias = "webkit_settings_get_default_font_family")]
714 #[doc(alias = "get_default_font_family")]
715 #[doc(alias = "default-font-family")]
716 pub fn default_font_family(&self) -> Option<glib::GString> {
717 unsafe {
718 from_glib_none(ffi::webkit_settings_get_default_font_family(
719 self.to_glib_none().0,
720 ))
721 }
722 }
723
724 #[doc(alias = "webkit_settings_get_default_font_size")]
730 #[doc(alias = "get_default_font_size")]
731 #[doc(alias = "default-font-size")]
732 pub fn default_font_size(&self) -> u32 {
733 unsafe { ffi::webkit_settings_get_default_font_size(self.to_glib_none().0) }
734 }
735
736 #[doc(alias = "webkit_settings_get_default_monospace_font_size")]
742 #[doc(alias = "get_default_monospace_font_size")]
743 #[doc(alias = "default-monospace-font-size")]
744 pub fn default_monospace_font_size(&self) -> u32 {
745 unsafe { ffi::webkit_settings_get_default_monospace_font_size(self.to_glib_none().0) }
746 }
747
748 #[doc(alias = "webkit_settings_get_disable_web_security")]
754 #[doc(alias = "get_disable_web_security")]
755 #[doc(alias = "disable-web-security")]
756 pub fn is_disable_web_security(&self) -> bool {
757 unsafe {
758 from_glib(ffi::webkit_settings_get_disable_web_security(
759 self.to_glib_none().0,
760 ))
761 }
762 }
763
764 #[doc(alias = "webkit_settings_get_draw_compositing_indicators")]
770 #[doc(alias = "get_draw_compositing_indicators")]
771 #[doc(alias = "draw-compositing-indicators")]
772 pub fn draws_compositing_indicators(&self) -> bool {
773 unsafe {
774 from_glib(ffi::webkit_settings_get_draw_compositing_indicators(
775 self.to_glib_none().0,
776 ))
777 }
778 }
779
780 #[cfg(feature = "v2_46")]
786 #[cfg_attr(docsrs, doc(cfg(feature = "v2_46")))]
787 #[doc(alias = "webkit_settings_get_enable_2d_canvas_acceleration")]
788 #[doc(alias = "get_enable_2d_canvas_acceleration")]
789 #[doc(alias = "enable-2d-canvas-acceleration")]
790 pub fn enables_2d_canvas_acceleration(&self) -> bool {
791 unsafe {
792 from_glib(ffi::webkit_settings_get_enable_2d_canvas_acceleration(
793 self.to_glib_none().0,
794 ))
795 }
796 }
797
798 #[doc(alias = "webkit_settings_get_enable_back_forward_navigation_gestures")]
804 #[doc(alias = "get_enable_back_forward_navigation_gestures")]
805 #[doc(alias = "enable-back-forward-navigation-gestures")]
806 pub fn enables_back_forward_navigation_gestures(&self) -> bool {
807 unsafe {
808 from_glib(
809 ffi::webkit_settings_get_enable_back_forward_navigation_gestures(
810 self.to_glib_none().0,
811 ),
812 )
813 }
814 }
815
816 #[doc(alias = "webkit_settings_get_enable_caret_browsing")]
822 #[doc(alias = "get_enable_caret_browsing")]
823 #[doc(alias = "enable-caret-browsing")]
824 pub fn enables_caret_browsing(&self) -> bool {
825 unsafe {
826 from_glib(ffi::webkit_settings_get_enable_caret_browsing(
827 self.to_glib_none().0,
828 ))
829 }
830 }
831
832 #[doc(alias = "webkit_settings_get_enable_developer_extras")]
838 #[doc(alias = "get_enable_developer_extras")]
839 #[doc(alias = "enable-developer-extras")]
840 pub fn enables_developer_extras(&self) -> bool {
841 unsafe {
842 from_glib(ffi::webkit_settings_get_enable_developer_extras(
843 self.to_glib_none().0,
844 ))
845 }
846 }
847
848 #[cfg_attr(feature = "v2_48", deprecated = "Since 2.48")]
857 #[allow(deprecated)]
858 #[doc(alias = "webkit_settings_get_enable_dns_prefetching")]
859 #[doc(alias = "get_enable_dns_prefetching")]
860 #[doc(alias = "enable-dns-prefetching")]
861 pub fn enables_dns_prefetching(&self) -> bool {
862 unsafe {
863 from_glib(ffi::webkit_settings_get_enable_dns_prefetching(
864 self.to_glib_none().0,
865 ))
866 }
867 }
868
869 #[doc(alias = "webkit_settings_get_enable_encrypted_media")]
875 #[doc(alias = "get_enable_encrypted_media")]
876 #[doc(alias = "enable-encrypted-media")]
877 pub fn enables_encrypted_media(&self) -> bool {
878 unsafe {
879 from_glib(ffi::webkit_settings_get_enable_encrypted_media(
880 self.to_glib_none().0,
881 ))
882 }
883 }
884
885 #[doc(alias = "webkit_settings_get_enable_fullscreen")]
891 #[doc(alias = "get_enable_fullscreen")]
892 #[doc(alias = "enable-fullscreen")]
893 pub fn enables_fullscreen(&self) -> bool {
894 unsafe {
895 from_glib(ffi::webkit_settings_get_enable_fullscreen(
896 self.to_glib_none().0,
897 ))
898 }
899 }
900
901 #[doc(alias = "webkit_settings_get_enable_html5_database")]
907 #[doc(alias = "get_enable_html5_database")]
908 #[doc(alias = "enable-html5-database")]
909 pub fn enables_html5_database(&self) -> bool {
910 unsafe {
911 from_glib(ffi::webkit_settings_get_enable_html5_database(
912 self.to_glib_none().0,
913 ))
914 }
915 }
916
917 #[doc(alias = "webkit_settings_get_enable_html5_local_storage")]
923 #[doc(alias = "get_enable_html5_local_storage")]
924 #[doc(alias = "enable-html5-local-storage")]
925 pub fn enables_html5_local_storage(&self) -> bool {
926 unsafe {
927 from_glib(ffi::webkit_settings_get_enable_html5_local_storage(
928 self.to_glib_none().0,
929 ))
930 }
931 }
932
933 #[cfg_attr(feature = "v2_50", deprecated = "Since 2.50")]
942 #[allow(deprecated)]
943 #[doc(alias = "webkit_settings_get_enable_hyperlink_auditing")]
944 #[doc(alias = "get_enable_hyperlink_auditing")]
945 #[doc(alias = "enable-hyperlink-auditing")]
946 pub fn enables_hyperlink_auditing(&self) -> bool {
947 unsafe {
948 from_glib(ffi::webkit_settings_get_enable_hyperlink_auditing(
949 self.to_glib_none().0,
950 ))
951 }
952 }
953
954 #[doc(alias = "webkit_settings_get_enable_javascript")]
960 #[doc(alias = "get_enable_javascript")]
961 #[doc(alias = "enable-javascript")]
962 pub fn enables_javascript(&self) -> bool {
963 unsafe {
964 from_glib(ffi::webkit_settings_get_enable_javascript(
965 self.to_glib_none().0,
966 ))
967 }
968 }
969
970 #[doc(alias = "webkit_settings_get_enable_javascript_markup")]
976 #[doc(alias = "get_enable_javascript_markup")]
977 #[doc(alias = "enable-javascript-markup")]
978 pub fn enables_javascript_markup(&self) -> bool {
979 unsafe {
980 from_glib(ffi::webkit_settings_get_enable_javascript_markup(
981 self.to_glib_none().0,
982 ))
983 }
984 }
985
986 #[doc(alias = "webkit_settings_get_enable_media")]
992 #[doc(alias = "get_enable_media")]
993 #[doc(alias = "enable-media")]
994 pub fn enables_media(&self) -> bool {
995 unsafe { from_glib(ffi::webkit_settings_get_enable_media(self.to_glib_none().0)) }
996 }
997
998 #[doc(alias = "webkit_settings_get_enable_media_capabilities")]
1004 #[doc(alias = "get_enable_media_capabilities")]
1005 #[doc(alias = "enable-media-capabilities")]
1006 pub fn enables_media_capabilities(&self) -> bool {
1007 unsafe {
1008 from_glib(ffi::webkit_settings_get_enable_media_capabilities(
1009 self.to_glib_none().0,
1010 ))
1011 }
1012 }
1013
1014 #[doc(alias = "webkit_settings_get_enable_media_stream")]
1020 #[doc(alias = "get_enable_media_stream")]
1021 #[doc(alias = "enable-media-stream")]
1022 pub fn enables_media_stream(&self) -> bool {
1023 unsafe {
1024 from_glib(ffi::webkit_settings_get_enable_media_stream(
1025 self.to_glib_none().0,
1026 ))
1027 }
1028 }
1029
1030 #[doc(alias = "webkit_settings_get_enable_mediasource")]
1036 #[doc(alias = "get_enable_mediasource")]
1037 #[doc(alias = "enable-mediasource")]
1038 pub fn enables_mediasource(&self) -> bool {
1039 unsafe {
1040 from_glib(ffi::webkit_settings_get_enable_mediasource(
1041 self.to_glib_none().0,
1042 ))
1043 }
1044 }
1045
1046 #[doc(alias = "webkit_settings_get_enable_mock_capture_devices")]
1052 #[doc(alias = "get_enable_mock_capture_devices")]
1053 #[doc(alias = "enable-mock-capture-devices")]
1054 pub fn enables_mock_capture_devices(&self) -> bool {
1055 unsafe {
1056 from_glib(ffi::webkit_settings_get_enable_mock_capture_devices(
1057 self.to_glib_none().0,
1058 ))
1059 }
1060 }
1061
1062 #[cfg_attr(feature = "v2_44", deprecated = "Since 2.44")]
1071 #[allow(deprecated)]
1072 #[doc(alias = "webkit_settings_get_enable_offline_web_application_cache")]
1073 #[doc(alias = "get_enable_offline_web_application_cache")]
1074 #[doc(alias = "enable-offline-web-application-cache")]
1075 pub fn enables_offline_web_application_cache(&self) -> bool {
1076 unsafe {
1077 from_glib(
1078 ffi::webkit_settings_get_enable_offline_web_application_cache(
1079 self.to_glib_none().0,
1080 ),
1081 )
1082 }
1083 }
1084
1085 #[doc(alias = "webkit_settings_get_enable_page_cache")]
1091 #[doc(alias = "get_enable_page_cache")]
1092 #[doc(alias = "enable-page-cache")]
1093 pub fn enables_page_cache(&self) -> bool {
1094 unsafe {
1095 from_glib(ffi::webkit_settings_get_enable_page_cache(
1096 self.to_glib_none().0,
1097 ))
1098 }
1099 }
1100
1101 #[doc(alias = "webkit_settings_get_enable_resizable_text_areas")]
1107 #[doc(alias = "get_enable_resizable_text_areas")]
1108 #[doc(alias = "enable-resizable-text-areas")]
1109 pub fn enables_resizable_text_areas(&self) -> bool {
1110 unsafe {
1111 from_glib(ffi::webkit_settings_get_enable_resizable_text_areas(
1112 self.to_glib_none().0,
1113 ))
1114 }
1115 }
1116
1117 #[doc(alias = "webkit_settings_get_enable_site_specific_quirks")]
1123 #[doc(alias = "get_enable_site_specific_quirks")]
1124 #[doc(alias = "enable-site-specific-quirks")]
1125 pub fn enables_site_specific_quirks(&self) -> bool {
1126 unsafe {
1127 from_glib(ffi::webkit_settings_get_enable_site_specific_quirks(
1128 self.to_glib_none().0,
1129 ))
1130 }
1131 }
1132
1133 #[doc(alias = "webkit_settings_get_enable_smooth_scrolling")]
1139 #[doc(alias = "get_enable_smooth_scrolling")]
1140 #[doc(alias = "enable-smooth-scrolling")]
1141 pub fn enables_smooth_scrolling(&self) -> bool {
1142 unsafe {
1143 from_glib(ffi::webkit_settings_get_enable_smooth_scrolling(
1144 self.to_glib_none().0,
1145 ))
1146 }
1147 }
1148
1149 #[doc(alias = "webkit_settings_get_enable_spatial_navigation")]
1155 #[doc(alias = "get_enable_spatial_navigation")]
1156 #[doc(alias = "enable-spatial-navigation")]
1157 pub fn enables_spatial_navigation(&self) -> bool {
1158 unsafe {
1159 from_glib(ffi::webkit_settings_get_enable_spatial_navigation(
1160 self.to_glib_none().0,
1161 ))
1162 }
1163 }
1164
1165 #[doc(alias = "webkit_settings_get_enable_tabs_to_links")]
1171 #[doc(alias = "get_enable_tabs_to_links")]
1172 #[doc(alias = "enable-tabs-to-links")]
1173 pub fn enables_tabs_to_links(&self) -> bool {
1174 unsafe {
1175 from_glib(ffi::webkit_settings_get_enable_tabs_to_links(
1176 self.to_glib_none().0,
1177 ))
1178 }
1179 }
1180
1181 #[doc(alias = "webkit_settings_get_enable_webaudio")]
1187 #[doc(alias = "get_enable_webaudio")]
1188 #[doc(alias = "enable-webaudio")]
1189 pub fn enables_webaudio(&self) -> bool {
1190 unsafe {
1191 from_glib(ffi::webkit_settings_get_enable_webaudio(
1192 self.to_glib_none().0,
1193 ))
1194 }
1195 }
1196
1197 #[doc(alias = "webkit_settings_get_enable_webgl")]
1203 #[doc(alias = "get_enable_webgl")]
1204 #[doc(alias = "enable-webgl")]
1205 pub fn enables_webgl(&self) -> bool {
1206 unsafe { from_glib(ffi::webkit_settings_get_enable_webgl(self.to_glib_none().0)) }
1207 }
1208
1209 #[doc(alias = "webkit_settings_get_enable_webrtc")]
1215 #[doc(alias = "get_enable_webrtc")]
1216 #[doc(alias = "enable-webrtc")]
1217 pub fn enables_webrtc(&self) -> bool {
1218 unsafe {
1219 from_glib(ffi::webkit_settings_get_enable_webrtc(
1220 self.to_glib_none().0,
1221 ))
1222 }
1223 }
1224
1225 #[doc(alias = "webkit_settings_get_enable_write_console_messages_to_stdout")]
1232 #[doc(alias = "get_enable_write_console_messages_to_stdout")]
1233 #[doc(alias = "enable-write-console-messages-to-stdout")]
1234 pub fn enables_write_console_messages_to_stdout(&self) -> bool {
1235 unsafe {
1236 from_glib(
1237 ffi::webkit_settings_get_enable_write_console_messages_to_stdout(
1238 self.to_glib_none().0,
1239 ),
1240 )
1241 }
1242 }
1243
1244 #[doc(alias = "webkit_settings_get_fantasy_font_family")]
1250 #[doc(alias = "get_fantasy_font_family")]
1251 #[doc(alias = "fantasy-font-family")]
1252 pub fn fantasy_font_family(&self) -> Option<glib::GString> {
1253 unsafe {
1254 from_glib_none(ffi::webkit_settings_get_fantasy_font_family(
1255 self.to_glib_none().0,
1256 ))
1257 }
1258 }
1259
1260 #[cfg(feature = "v2_42")]
1268 #[cfg_attr(docsrs, doc(cfg(feature = "v2_42")))]
1269 #[doc(alias = "webkit_settings_get_feature_enabled")]
1270 #[doc(alias = "get_feature_enabled")]
1271 pub fn is_feature_enabled(&self, feature: &Feature) -> bool {
1272 unsafe {
1273 from_glib(ffi::webkit_settings_get_feature_enabled(
1274 self.to_glib_none().0,
1275 feature.to_glib_none().0,
1276 ))
1277 }
1278 }
1279
1280 #[doc(alias = "webkit_settings_get_hardware_acceleration_policy")]
1286 #[doc(alias = "get_hardware_acceleration_policy")]
1287 #[doc(alias = "hardware-acceleration-policy")]
1288 pub fn hardware_acceleration_policy(&self) -> HardwareAccelerationPolicy {
1289 unsafe {
1290 from_glib(ffi::webkit_settings_get_hardware_acceleration_policy(
1291 self.to_glib_none().0,
1292 ))
1293 }
1294 }
1295
1296 #[doc(alias = "webkit_settings_get_javascript_can_access_clipboard")]
1302 #[doc(alias = "get_javascript_can_access_clipboard")]
1303 #[doc(alias = "javascript-can-access-clipboard")]
1304 pub fn is_javascript_can_access_clipboard(&self) -> bool {
1305 unsafe {
1306 from_glib(ffi::webkit_settings_get_javascript_can_access_clipboard(
1307 self.to_glib_none().0,
1308 ))
1309 }
1310 }
1311
1312 #[doc(alias = "webkit_settings_get_javascript_can_open_windows_automatically")]
1318 #[doc(alias = "get_javascript_can_open_windows_automatically")]
1319 #[doc(alias = "javascript-can-open-windows-automatically")]
1320 pub fn is_javascript_can_open_windows_automatically(&self) -> bool {
1321 unsafe {
1322 from_glib(
1323 ffi::webkit_settings_get_javascript_can_open_windows_automatically(
1324 self.to_glib_none().0,
1325 ),
1326 )
1327 }
1328 }
1329
1330 #[cfg_attr(feature = "v2_42", deprecated = "Since 2.42")]
1339 #[allow(deprecated)]
1340 #[doc(alias = "webkit_settings_get_load_icons_ignoring_image_load_setting")]
1341 #[doc(alias = "get_load_icons_ignoring_image_load_setting")]
1342 #[doc(alias = "load-icons-ignoring-image-load-setting")]
1343 pub fn is_load_icons_ignoring_image_load_setting(&self) -> bool {
1344 unsafe {
1345 from_glib(
1346 ffi::webkit_settings_get_load_icons_ignoring_image_load_setting(
1347 self.to_glib_none().0,
1348 ),
1349 )
1350 }
1351 }
1352
1353 #[doc(alias = "webkit_settings_get_math_font_family")]
1361 #[doc(alias = "get_math_font_family")]
1362 #[doc(alias = "math-font-family")]
1363 pub fn math_font_family(&self) -> Option<glib::GString> {
1364 unsafe {
1365 from_glib_none(ffi::webkit_settings_get_math_font_family(
1366 self.to_glib_none().0,
1367 ))
1368 }
1369 }
1370
1371 #[doc(alias = "webkit_settings_get_media_content_types_requiring_hardware_support")]
1377 #[doc(alias = "get_media_content_types_requiring_hardware_support")]
1378 #[doc(alias = "media-content-types-requiring-hardware-support")]
1379 pub fn media_content_types_requiring_hardware_support(&self) -> Option<glib::GString> {
1380 unsafe {
1381 from_glib_none(
1382 ffi::webkit_settings_get_media_content_types_requiring_hardware_support(
1383 self.to_glib_none().0,
1384 ),
1385 )
1386 }
1387 }
1388
1389 #[doc(alias = "webkit_settings_get_media_playback_allows_inline")]
1396 #[doc(alias = "get_media_playback_allows_inline")]
1397 #[doc(alias = "media-playback-allows-inline")]
1398 pub fn is_media_playback_allows_inline(&self) -> bool {
1399 unsafe {
1400 from_glib(ffi::webkit_settings_get_media_playback_allows_inline(
1401 self.to_glib_none().0,
1402 ))
1403 }
1404 }
1405
1406 #[doc(alias = "webkit_settings_get_media_playback_requires_user_gesture")]
1413 #[doc(alias = "get_media_playback_requires_user_gesture")]
1414 #[doc(alias = "media-playback-requires-user-gesture")]
1415 pub fn is_media_playback_requires_user_gesture(&self) -> bool {
1416 unsafe {
1417 from_glib(
1418 ffi::webkit_settings_get_media_playback_requires_user_gesture(
1419 self.to_glib_none().0,
1420 ),
1421 )
1422 }
1423 }
1424
1425 #[doc(alias = "webkit_settings_get_minimum_font_size")]
1431 #[doc(alias = "get_minimum_font_size")]
1432 #[doc(alias = "minimum-font-size")]
1433 pub fn minimum_font_size(&self) -> u32 {
1434 unsafe { ffi::webkit_settings_get_minimum_font_size(self.to_glib_none().0) }
1435 }
1436
1437 #[doc(alias = "webkit_settings_get_monospace_font_family")]
1443 #[doc(alias = "get_monospace_font_family")]
1444 #[doc(alias = "monospace-font-family")]
1445 pub fn monospace_font_family(&self) -> Option<glib::GString> {
1446 unsafe {
1447 from_glib_none(ffi::webkit_settings_get_monospace_font_family(
1448 self.to_glib_none().0,
1449 ))
1450 }
1451 }
1452
1453 #[doc(alias = "webkit_settings_get_pictograph_font_family")]
1459 #[doc(alias = "get_pictograph_font_family")]
1460 #[doc(alias = "pictograph-font-family")]
1461 pub fn pictograph_font_family(&self) -> Option<glib::GString> {
1462 unsafe {
1463 from_glib_none(ffi::webkit_settings_get_pictograph_font_family(
1464 self.to_glib_none().0,
1465 ))
1466 }
1467 }
1468
1469 #[doc(alias = "webkit_settings_get_print_backgrounds")]
1475 #[doc(alias = "get_print_backgrounds")]
1476 #[doc(alias = "print-backgrounds")]
1477 pub fn is_print_backgrounds(&self) -> bool {
1478 unsafe {
1479 from_glib(ffi::webkit_settings_get_print_backgrounds(
1480 self.to_glib_none().0,
1481 ))
1482 }
1483 }
1484
1485 #[doc(alias = "webkit_settings_get_sans_serif_font_family")]
1491 #[doc(alias = "get_sans_serif_font_family")]
1492 #[doc(alias = "sans-serif-font-family")]
1493 pub fn sans_serif_font_family(&self) -> Option<glib::GString> {
1494 unsafe {
1495 from_glib_none(ffi::webkit_settings_get_sans_serif_font_family(
1496 self.to_glib_none().0,
1497 ))
1498 }
1499 }
1500
1501 #[doc(alias = "webkit_settings_get_serif_font_family")]
1507 #[doc(alias = "get_serif_font_family")]
1508 #[doc(alias = "serif-font-family")]
1509 pub fn serif_font_family(&self) -> Option<glib::GString> {
1510 unsafe {
1511 from_glib_none(ffi::webkit_settings_get_serif_font_family(
1512 self.to_glib_none().0,
1513 ))
1514 }
1515 }
1516
1517 #[doc(alias = "webkit_settings_get_user_agent")]
1523 #[doc(alias = "get_user_agent")]
1524 #[doc(alias = "user-agent")]
1525 pub fn user_agent(&self) -> Option<glib::GString> {
1526 unsafe { from_glib_none(ffi::webkit_settings_get_user_agent(self.to_glib_none().0)) }
1527 }
1528
1529 #[cfg(feature = "v2_48")]
1535 #[cfg_attr(docsrs, doc(cfg(feature = "v2_48")))]
1536 #[doc(alias = "webkit_settings_get_webrtc_udp_ports_range")]
1537 #[doc(alias = "get_webrtc_udp_ports_range")]
1538 #[doc(alias = "webrtc-udp-ports-range")]
1539 pub fn webrtc_udp_ports_range(&self) -> Option<glib::GString> {
1540 unsafe {
1541 from_glib_none(ffi::webkit_settings_get_webrtc_udp_ports_range(
1542 self.to_glib_none().0,
1543 ))
1544 }
1545 }
1546
1547 #[doc(alias = "webkit_settings_get_zoom_text_only")]
1554 #[doc(alias = "get_zoom_text_only")]
1555 #[doc(alias = "zoom-text-only")]
1556 pub fn is_zoom_text_only(&self) -> bool {
1557 unsafe {
1558 from_glib(ffi::webkit_settings_get_zoom_text_only(
1559 self.to_glib_none().0,
1560 ))
1561 }
1562 }
1563
1564 #[doc(alias = "webkit_settings_set_allow_file_access_from_file_urls")]
1568 #[doc(alias = "allow-file-access-from-file-urls")]
1569 pub fn set_allow_file_access_from_file_urls(&self, allowed: bool) {
1570 unsafe {
1571 ffi::webkit_settings_set_allow_file_access_from_file_urls(
1572 self.to_glib_none().0,
1573 allowed.into_glib(),
1574 );
1575 }
1576 }
1577
1578 #[doc(alias = "webkit_settings_set_allow_modal_dialogs")]
1582 #[doc(alias = "allow-modal-dialogs")]
1583 pub fn set_allow_modal_dialogs(&self, allowed: bool) {
1584 unsafe {
1585 ffi::webkit_settings_set_allow_modal_dialogs(
1586 self.to_glib_none().0,
1587 allowed.into_glib(),
1588 );
1589 }
1590 }
1591
1592 #[doc(alias = "webkit_settings_set_allow_top_navigation_to_data_urls")]
1596 #[doc(alias = "allow-top-navigation-to-data-urls")]
1597 pub fn set_allow_top_navigation_to_data_urls(&self, allowed: bool) {
1598 unsafe {
1599 ffi::webkit_settings_set_allow_top_navigation_to_data_urls(
1600 self.to_glib_none().0,
1601 allowed.into_glib(),
1602 );
1603 }
1604 }
1605
1606 #[doc(alias = "webkit_settings_set_allow_universal_access_from_file_urls")]
1610 #[doc(alias = "allow-universal-access-from-file-urls")]
1611 pub fn set_allow_universal_access_from_file_urls(&self, allowed: bool) {
1612 unsafe {
1613 ffi::webkit_settings_set_allow_universal_access_from_file_urls(
1614 self.to_glib_none().0,
1615 allowed.into_glib(),
1616 );
1617 }
1618 }
1619
1620 #[doc(alias = "webkit_settings_set_auto_load_images")]
1624 #[doc(alias = "auto-load-images")]
1625 pub fn set_auto_load_images(&self, enabled: bool) {
1626 unsafe {
1627 ffi::webkit_settings_set_auto_load_images(self.to_glib_none().0, enabled.into_glib());
1628 }
1629 }
1630
1631 #[doc(alias = "webkit_settings_set_cursive_font_family")]
1635 #[doc(alias = "cursive-font-family")]
1636 pub fn set_cursive_font_family(&self, cursive_font_family: &str) {
1637 unsafe {
1638 ffi::webkit_settings_set_cursive_font_family(
1639 self.to_glib_none().0,
1640 cursive_font_family.to_glib_none().0,
1641 );
1642 }
1643 }
1644
1645 #[doc(alias = "webkit_settings_set_default_charset")]
1649 #[doc(alias = "default-charset")]
1650 pub fn set_default_charset(&self, default_charset: &str) {
1651 unsafe {
1652 ffi::webkit_settings_set_default_charset(
1653 self.to_glib_none().0,
1654 default_charset.to_glib_none().0,
1655 );
1656 }
1657 }
1658
1659 #[doc(alias = "webkit_settings_set_default_font_family")]
1663 #[doc(alias = "default-font-family")]
1664 pub fn set_default_font_family(&self, default_font_family: &str) {
1665 unsafe {
1666 ffi::webkit_settings_set_default_font_family(
1667 self.to_glib_none().0,
1668 default_font_family.to_glib_none().0,
1669 );
1670 }
1671 }
1672
1673 #[doc(alias = "webkit_settings_set_default_font_size")]
1677 #[doc(alias = "default-font-size")]
1678 pub fn set_default_font_size(&self, font_size: u32) {
1679 unsafe {
1680 ffi::webkit_settings_set_default_font_size(self.to_glib_none().0, font_size);
1681 }
1682 }
1683
1684 #[doc(alias = "webkit_settings_set_default_monospace_font_size")]
1688 #[doc(alias = "default-monospace-font-size")]
1689 pub fn set_default_monospace_font_size(&self, font_size: u32) {
1690 unsafe {
1691 ffi::webkit_settings_set_default_monospace_font_size(self.to_glib_none().0, font_size);
1692 }
1693 }
1694
1695 #[doc(alias = "webkit_settings_set_disable_web_security")]
1699 #[doc(alias = "disable-web-security")]
1700 pub fn set_disable_web_security(&self, disabled: bool) {
1701 unsafe {
1702 ffi::webkit_settings_set_disable_web_security(
1703 self.to_glib_none().0,
1704 disabled.into_glib(),
1705 );
1706 }
1707 }
1708
1709 #[doc(alias = "webkit_settings_set_draw_compositing_indicators")]
1713 #[doc(alias = "draw-compositing-indicators")]
1714 pub fn set_draw_compositing_indicators(&self, enabled: bool) {
1715 unsafe {
1716 ffi::webkit_settings_set_draw_compositing_indicators(
1717 self.to_glib_none().0,
1718 enabled.into_glib(),
1719 );
1720 }
1721 }
1722
1723 #[cfg(feature = "v2_46")]
1727 #[cfg_attr(docsrs, doc(cfg(feature = "v2_46")))]
1728 #[doc(alias = "webkit_settings_set_enable_2d_canvas_acceleration")]
1729 #[doc(alias = "enable-2d-canvas-acceleration")]
1730 pub fn set_enable_2d_canvas_acceleration(&self, enabled: bool) {
1731 unsafe {
1732 ffi::webkit_settings_set_enable_2d_canvas_acceleration(
1733 self.to_glib_none().0,
1734 enabled.into_glib(),
1735 );
1736 }
1737 }
1738
1739 #[doc(alias = "webkit_settings_set_enable_back_forward_navigation_gestures")]
1743 #[doc(alias = "enable-back-forward-navigation-gestures")]
1744 pub fn set_enable_back_forward_navigation_gestures(&self, enabled: bool) {
1745 unsafe {
1746 ffi::webkit_settings_set_enable_back_forward_navigation_gestures(
1747 self.to_glib_none().0,
1748 enabled.into_glib(),
1749 );
1750 }
1751 }
1752
1753 #[doc(alias = "webkit_settings_set_enable_caret_browsing")]
1757 #[doc(alias = "enable-caret-browsing")]
1758 pub fn set_enable_caret_browsing(&self, enabled: bool) {
1759 unsafe {
1760 ffi::webkit_settings_set_enable_caret_browsing(
1761 self.to_glib_none().0,
1762 enabled.into_glib(),
1763 );
1764 }
1765 }
1766
1767 #[doc(alias = "webkit_settings_set_enable_developer_extras")]
1771 #[doc(alias = "enable-developer-extras")]
1772 pub fn set_enable_developer_extras(&self, enabled: bool) {
1773 unsafe {
1774 ffi::webkit_settings_set_enable_developer_extras(
1775 self.to_glib_none().0,
1776 enabled.into_glib(),
1777 );
1778 }
1779 }
1780
1781 #[cfg_attr(feature = "v2_48", deprecated = "Since 2.48")]
1788 #[allow(deprecated)]
1789 #[doc(alias = "webkit_settings_set_enable_dns_prefetching")]
1790 #[doc(alias = "enable-dns-prefetching")]
1791 pub fn set_enable_dns_prefetching(&self, enabled: bool) {
1792 unsafe {
1793 ffi::webkit_settings_set_enable_dns_prefetching(
1794 self.to_glib_none().0,
1795 enabled.into_glib(),
1796 );
1797 }
1798 }
1799
1800 #[doc(alias = "webkit_settings_set_enable_encrypted_media")]
1804 #[doc(alias = "enable-encrypted-media")]
1805 pub fn set_enable_encrypted_media(&self, enabled: bool) {
1806 unsafe {
1807 ffi::webkit_settings_set_enable_encrypted_media(
1808 self.to_glib_none().0,
1809 enabled.into_glib(),
1810 );
1811 }
1812 }
1813
1814 #[doc(alias = "webkit_settings_set_enable_fullscreen")]
1818 #[doc(alias = "enable-fullscreen")]
1819 pub fn set_enable_fullscreen(&self, enabled: bool) {
1820 unsafe {
1821 ffi::webkit_settings_set_enable_fullscreen(self.to_glib_none().0, enabled.into_glib());
1822 }
1823 }
1824
1825 #[doc(alias = "webkit_settings_set_enable_html5_database")]
1829 #[doc(alias = "enable-html5-database")]
1830 pub fn set_enable_html5_database(&self, enabled: bool) {
1831 unsafe {
1832 ffi::webkit_settings_set_enable_html5_database(
1833 self.to_glib_none().0,
1834 enabled.into_glib(),
1835 );
1836 }
1837 }
1838
1839 #[doc(alias = "webkit_settings_set_enable_html5_local_storage")]
1843 #[doc(alias = "enable-html5-local-storage")]
1844 pub fn set_enable_html5_local_storage(&self, enabled: bool) {
1845 unsafe {
1846 ffi::webkit_settings_set_enable_html5_local_storage(
1847 self.to_glib_none().0,
1848 enabled.into_glib(),
1849 );
1850 }
1851 }
1852
1853 #[cfg_attr(feature = "v2_50", deprecated = "Since 2.50")]
1860 #[allow(deprecated)]
1861 #[doc(alias = "webkit_settings_set_enable_hyperlink_auditing")]
1862 #[doc(alias = "enable-hyperlink-auditing")]
1863 pub fn set_enable_hyperlink_auditing(&self, enabled: bool) {
1864 unsafe {
1865 ffi::webkit_settings_set_enable_hyperlink_auditing(
1866 self.to_glib_none().0,
1867 enabled.into_glib(),
1868 );
1869 }
1870 }
1871
1872 #[doc(alias = "webkit_settings_set_enable_javascript")]
1876 #[doc(alias = "enable-javascript")]
1877 pub fn set_enable_javascript(&self, enabled: bool) {
1878 unsafe {
1879 ffi::webkit_settings_set_enable_javascript(self.to_glib_none().0, enabled.into_glib());
1880 }
1881 }
1882
1883 #[doc(alias = "webkit_settings_set_enable_javascript_markup")]
1887 #[doc(alias = "enable-javascript-markup")]
1888 pub fn set_enable_javascript_markup(&self, enabled: bool) {
1889 unsafe {
1890 ffi::webkit_settings_set_enable_javascript_markup(
1891 self.to_glib_none().0,
1892 enabled.into_glib(),
1893 );
1894 }
1895 }
1896
1897 #[doc(alias = "webkit_settings_set_enable_media")]
1901 #[doc(alias = "enable-media")]
1902 pub fn set_enable_media(&self, enabled: bool) {
1903 unsafe {
1904 ffi::webkit_settings_set_enable_media(self.to_glib_none().0, enabled.into_glib());
1905 }
1906 }
1907
1908 #[doc(alias = "webkit_settings_set_enable_media_capabilities")]
1912 #[doc(alias = "enable-media-capabilities")]
1913 pub fn set_enable_media_capabilities(&self, enabled: bool) {
1914 unsafe {
1915 ffi::webkit_settings_set_enable_media_capabilities(
1916 self.to_glib_none().0,
1917 enabled.into_glib(),
1918 );
1919 }
1920 }
1921
1922 #[doc(alias = "webkit_settings_set_enable_media_stream")]
1926 #[doc(alias = "enable-media-stream")]
1927 pub fn set_enable_media_stream(&self, enabled: bool) {
1928 unsafe {
1929 ffi::webkit_settings_set_enable_media_stream(
1930 self.to_glib_none().0,
1931 enabled.into_glib(),
1932 );
1933 }
1934 }
1935
1936 #[doc(alias = "webkit_settings_set_enable_mediasource")]
1940 #[doc(alias = "enable-mediasource")]
1941 pub fn set_enable_mediasource(&self, enabled: bool) {
1942 unsafe {
1943 ffi::webkit_settings_set_enable_mediasource(self.to_glib_none().0, enabled.into_glib());
1944 }
1945 }
1946
1947 #[doc(alias = "webkit_settings_set_enable_mock_capture_devices")]
1951 #[doc(alias = "enable-mock-capture-devices")]
1952 pub fn set_enable_mock_capture_devices(&self, enabled: bool) {
1953 unsafe {
1954 ffi::webkit_settings_set_enable_mock_capture_devices(
1955 self.to_glib_none().0,
1956 enabled.into_glib(),
1957 );
1958 }
1959 }
1960
1961 #[cfg_attr(feature = "v2_44", deprecated = "Since 2.44")]
1968 #[allow(deprecated)]
1969 #[doc(alias = "webkit_settings_set_enable_offline_web_application_cache")]
1970 #[doc(alias = "enable-offline-web-application-cache")]
1971 pub fn set_enable_offline_web_application_cache(&self, enabled: bool) {
1972 unsafe {
1973 ffi::webkit_settings_set_enable_offline_web_application_cache(
1974 self.to_glib_none().0,
1975 enabled.into_glib(),
1976 );
1977 }
1978 }
1979
1980 #[doc(alias = "webkit_settings_set_enable_page_cache")]
1984 #[doc(alias = "enable-page-cache")]
1985 pub fn set_enable_page_cache(&self, enabled: bool) {
1986 unsafe {
1987 ffi::webkit_settings_set_enable_page_cache(self.to_glib_none().0, enabled.into_glib());
1988 }
1989 }
1990
1991 #[doc(alias = "webkit_settings_set_enable_resizable_text_areas")]
1995 #[doc(alias = "enable-resizable-text-areas")]
1996 pub fn set_enable_resizable_text_areas(&self, enabled: bool) {
1997 unsafe {
1998 ffi::webkit_settings_set_enable_resizable_text_areas(
1999 self.to_glib_none().0,
2000 enabled.into_glib(),
2001 );
2002 }
2003 }
2004
2005 #[doc(alias = "webkit_settings_set_enable_site_specific_quirks")]
2009 #[doc(alias = "enable-site-specific-quirks")]
2010 pub fn set_enable_site_specific_quirks(&self, enabled: bool) {
2011 unsafe {
2012 ffi::webkit_settings_set_enable_site_specific_quirks(
2013 self.to_glib_none().0,
2014 enabled.into_glib(),
2015 );
2016 }
2017 }
2018
2019 #[doc(alias = "webkit_settings_set_enable_smooth_scrolling")]
2023 #[doc(alias = "enable-smooth-scrolling")]
2024 pub fn set_enable_smooth_scrolling(&self, enabled: bool) {
2025 unsafe {
2026 ffi::webkit_settings_set_enable_smooth_scrolling(
2027 self.to_glib_none().0,
2028 enabled.into_glib(),
2029 );
2030 }
2031 }
2032
2033 #[doc(alias = "webkit_settings_set_enable_spatial_navigation")]
2037 #[doc(alias = "enable-spatial-navigation")]
2038 pub fn set_enable_spatial_navigation(&self, enabled: bool) {
2039 unsafe {
2040 ffi::webkit_settings_set_enable_spatial_navigation(
2041 self.to_glib_none().0,
2042 enabled.into_glib(),
2043 );
2044 }
2045 }
2046
2047 #[doc(alias = "webkit_settings_set_enable_tabs_to_links")]
2051 #[doc(alias = "enable-tabs-to-links")]
2052 pub fn set_enable_tabs_to_links(&self, enabled: bool) {
2053 unsafe {
2054 ffi::webkit_settings_set_enable_tabs_to_links(
2055 self.to_glib_none().0,
2056 enabled.into_glib(),
2057 );
2058 }
2059 }
2060
2061 #[doc(alias = "webkit_settings_set_enable_webaudio")]
2065 #[doc(alias = "enable-webaudio")]
2066 pub fn set_enable_webaudio(&self, enabled: bool) {
2067 unsafe {
2068 ffi::webkit_settings_set_enable_webaudio(self.to_glib_none().0, enabled.into_glib());
2069 }
2070 }
2071
2072 #[doc(alias = "webkit_settings_set_enable_webgl")]
2076 #[doc(alias = "enable-webgl")]
2077 pub fn set_enable_webgl(&self, enabled: bool) {
2078 unsafe {
2079 ffi::webkit_settings_set_enable_webgl(self.to_glib_none().0, enabled.into_glib());
2080 }
2081 }
2082
2083 #[doc(alias = "webkit_settings_set_enable_webrtc")]
2089 #[doc(alias = "enable-webrtc")]
2090 pub fn set_enable_webrtc(&self, enabled: bool) {
2091 unsafe {
2092 ffi::webkit_settings_set_enable_webrtc(self.to_glib_none().0, enabled.into_glib());
2093 }
2094 }
2095
2096 #[doc(alias = "webkit_settings_set_enable_write_console_messages_to_stdout")]
2100 #[doc(alias = "enable-write-console-messages-to-stdout")]
2101 pub fn set_enable_write_console_messages_to_stdout(&self, enabled: bool) {
2102 unsafe {
2103 ffi::webkit_settings_set_enable_write_console_messages_to_stdout(
2104 self.to_glib_none().0,
2105 enabled.into_glib(),
2106 );
2107 }
2108 }
2109
2110 #[doc(alias = "webkit_settings_set_fantasy_font_family")]
2114 #[doc(alias = "fantasy-font-family")]
2115 pub fn set_fantasy_font_family(&self, fantasy_font_family: &str) {
2116 unsafe {
2117 ffi::webkit_settings_set_fantasy_font_family(
2118 self.to_glib_none().0,
2119 fantasy_font_family.to_glib_none().0,
2120 );
2121 }
2122 }
2123
2124 #[cfg(feature = "v2_42")]
2135 #[cfg_attr(docsrs, doc(cfg(feature = "v2_42")))]
2136 #[doc(alias = "webkit_settings_set_feature_enabled")]
2137 pub fn set_feature_enabled(&self, feature: &Feature, enabled: bool) {
2138 unsafe {
2139 ffi::webkit_settings_set_feature_enabled(
2140 self.to_glib_none().0,
2141 feature.to_glib_none().0,
2142 enabled.into_glib(),
2143 );
2144 }
2145 }
2146
2147 #[doc(alias = "webkit_settings_set_hardware_acceleration_policy")]
2151 #[doc(alias = "hardware-acceleration-policy")]
2152 pub fn set_hardware_acceleration_policy(&self, policy: HardwareAccelerationPolicy) {
2153 unsafe {
2154 ffi::webkit_settings_set_hardware_acceleration_policy(
2155 self.to_glib_none().0,
2156 policy.into_glib(),
2157 );
2158 }
2159 }
2160
2161 #[doc(alias = "webkit_settings_set_javascript_can_access_clipboard")]
2165 #[doc(alias = "javascript-can-access-clipboard")]
2166 pub fn set_javascript_can_access_clipboard(&self, enabled: bool) {
2167 unsafe {
2168 ffi::webkit_settings_set_javascript_can_access_clipboard(
2169 self.to_glib_none().0,
2170 enabled.into_glib(),
2171 );
2172 }
2173 }
2174
2175 #[doc(alias = "webkit_settings_set_javascript_can_open_windows_automatically")]
2179 #[doc(alias = "javascript-can-open-windows-automatically")]
2180 pub fn set_javascript_can_open_windows_automatically(&self, enabled: bool) {
2181 unsafe {
2182 ffi::webkit_settings_set_javascript_can_open_windows_automatically(
2183 self.to_glib_none().0,
2184 enabled.into_glib(),
2185 );
2186 }
2187 }
2188
2189 #[cfg_attr(feature = "v2_42", deprecated = "Since 2.42")]
2196 #[allow(deprecated)]
2197 #[doc(alias = "webkit_settings_set_load_icons_ignoring_image_load_setting")]
2198 #[doc(alias = "load-icons-ignoring-image-load-setting")]
2199 pub fn set_load_icons_ignoring_image_load_setting(&self, enabled: bool) {
2200 unsafe {
2201 ffi::webkit_settings_set_load_icons_ignoring_image_load_setting(
2202 self.to_glib_none().0,
2203 enabled.into_glib(),
2204 );
2205 }
2206 }
2207
2208 #[doc(alias = "webkit_settings_set_math_font_family")]
2214 #[doc(alias = "math-font-family")]
2215 pub fn set_math_font_family(&self, math_font_family: Option<&str>) {
2216 unsafe {
2217 ffi::webkit_settings_set_math_font_family(
2218 self.to_glib_none().0,
2219 math_font_family.to_glib_none().0,
2220 );
2221 }
2222 }
2223
2224 #[doc(alias = "webkit_settings_set_media_content_types_requiring_hardware_support")]
2228 #[doc(alias = "media-content-types-requiring-hardware-support")]
2229 pub fn set_media_content_types_requiring_hardware_support(&self, content_types: Option<&str>) {
2230 unsafe {
2231 ffi::webkit_settings_set_media_content_types_requiring_hardware_support(
2232 self.to_glib_none().0,
2233 content_types.to_glib_none().0,
2234 );
2235 }
2236 }
2237
2238 #[doc(alias = "webkit_settings_set_media_playback_allows_inline")]
2242 #[doc(alias = "media-playback-allows-inline")]
2243 pub fn set_media_playback_allows_inline(&self, enabled: bool) {
2244 unsafe {
2245 ffi::webkit_settings_set_media_playback_allows_inline(
2246 self.to_glib_none().0,
2247 enabled.into_glib(),
2248 );
2249 }
2250 }
2251
2252 #[doc(alias = "webkit_settings_set_media_playback_requires_user_gesture")]
2256 #[doc(alias = "media-playback-requires-user-gesture")]
2257 pub fn set_media_playback_requires_user_gesture(&self, enabled: bool) {
2258 unsafe {
2259 ffi::webkit_settings_set_media_playback_requires_user_gesture(
2260 self.to_glib_none().0,
2261 enabled.into_glib(),
2262 );
2263 }
2264 }
2265
2266 #[doc(alias = "webkit_settings_set_minimum_font_size")]
2270 #[doc(alias = "minimum-font-size")]
2271 pub fn set_minimum_font_size(&self, font_size: u32) {
2272 unsafe {
2273 ffi::webkit_settings_set_minimum_font_size(self.to_glib_none().0, font_size);
2274 }
2275 }
2276
2277 #[doc(alias = "webkit_settings_set_monospace_font_family")]
2281 #[doc(alias = "monospace-font-family")]
2282 pub fn set_monospace_font_family(&self, monospace_font_family: &str) {
2283 unsafe {
2284 ffi::webkit_settings_set_monospace_font_family(
2285 self.to_glib_none().0,
2286 monospace_font_family.to_glib_none().0,
2287 );
2288 }
2289 }
2290
2291 #[doc(alias = "webkit_settings_set_pictograph_font_family")]
2295 #[doc(alias = "pictograph-font-family")]
2296 pub fn set_pictograph_font_family(&self, pictograph_font_family: &str) {
2297 unsafe {
2298 ffi::webkit_settings_set_pictograph_font_family(
2299 self.to_glib_none().0,
2300 pictograph_font_family.to_glib_none().0,
2301 );
2302 }
2303 }
2304
2305 #[doc(alias = "webkit_settings_set_print_backgrounds")]
2309 #[doc(alias = "print-backgrounds")]
2310 pub fn set_print_backgrounds(&self, print_backgrounds: bool) {
2311 unsafe {
2312 ffi::webkit_settings_set_print_backgrounds(
2313 self.to_glib_none().0,
2314 print_backgrounds.into_glib(),
2315 );
2316 }
2317 }
2318
2319 #[doc(alias = "webkit_settings_set_sans_serif_font_family")]
2323 #[doc(alias = "sans-serif-font-family")]
2324 pub fn set_sans_serif_font_family(&self, sans_serif_font_family: &str) {
2325 unsafe {
2326 ffi::webkit_settings_set_sans_serif_font_family(
2327 self.to_glib_none().0,
2328 sans_serif_font_family.to_glib_none().0,
2329 );
2330 }
2331 }
2332
2333 #[doc(alias = "webkit_settings_set_serif_font_family")]
2337 #[doc(alias = "serif-font-family")]
2338 pub fn set_serif_font_family(&self, serif_font_family: &str) {
2339 unsafe {
2340 ffi::webkit_settings_set_serif_font_family(
2341 self.to_glib_none().0,
2342 serif_font_family.to_glib_none().0,
2343 );
2344 }
2345 }
2346
2347 #[doc(alias = "webkit_settings_set_user_agent")]
2351 #[doc(alias = "user-agent")]
2352 pub fn set_user_agent(&self, user_agent: Option<&str>) {
2353 unsafe {
2354 ffi::webkit_settings_set_user_agent(self.to_glib_none().0, user_agent.to_glib_none().0);
2355 }
2356 }
2357
2358 #[doc(alias = "webkit_settings_set_user_agent_with_application_details")]
2368 pub fn set_user_agent_with_application_details(
2369 &self,
2370 application_name: Option<&str>,
2371 application_version: Option<&str>,
2372 ) {
2373 unsafe {
2374 ffi::webkit_settings_set_user_agent_with_application_details(
2375 self.to_glib_none().0,
2376 application_name.to_glib_none().0,
2377 application_version.to_glib_none().0,
2378 );
2379 }
2380 }
2381
2382 #[cfg(feature = "v2_48")]
2386 #[cfg_attr(docsrs, doc(cfg(feature = "v2_48")))]
2387 #[doc(alias = "webkit_settings_set_webrtc_udp_ports_range")]
2388 #[doc(alias = "webrtc-udp-ports-range")]
2389 pub fn set_webrtc_udp_ports_range(&self, udp_port_range: &str) {
2390 unsafe {
2391 ffi::webkit_settings_set_webrtc_udp_ports_range(
2392 self.to_glib_none().0,
2393 udp_port_range.to_glib_none().0,
2394 );
2395 }
2396 }
2397
2398 #[doc(alias = "webkit_settings_set_zoom_text_only")]
2402 #[doc(alias = "zoom-text-only")]
2403 pub fn set_zoom_text_only(&self, zoom_text_only: bool) {
2404 unsafe {
2405 ffi::webkit_settings_set_zoom_text_only(
2406 self.to_glib_none().0,
2407 zoom_text_only.into_glib(),
2408 );
2409 }
2410 }
2411
2412 #[doc(alias = "webkit_settings_font_size_to_pixels")]
2424 pub fn font_size_to_pixels(points: u32) -> u32 {
2425 assert_initialized_main_thread!();
2426 unsafe { ffi::webkit_settings_font_size_to_pixels(points) }
2427 }
2428
2429 #[doc(alias = "webkit_settings_font_size_to_points")]
2441 pub fn font_size_to_points(pixels: u32) -> u32 {
2442 assert_initialized_main_thread!();
2443 unsafe { ffi::webkit_settings_font_size_to_points(pixels) }
2444 }
2445
2446 #[cfg(feature = "v2_42")]
2460 #[cfg_attr(docsrs, doc(cfg(feature = "v2_42")))]
2461 #[doc(alias = "webkit_settings_get_all_features")]
2462 #[doc(alias = "get_all_features")]
2463 pub fn all_features() -> Option<FeatureList> {
2464 assert_initialized_main_thread!();
2465 unsafe { from_glib_full(ffi::webkit_settings_get_all_features()) }
2466 }
2467
2468 #[cfg(feature = "v2_42")]
2480 #[cfg_attr(docsrs, doc(cfg(feature = "v2_42")))]
2481 #[doc(alias = "webkit_settings_get_development_features")]
2482 #[doc(alias = "get_development_features")]
2483 pub fn development_features() -> Option<FeatureList> {
2484 assert_initialized_main_thread!();
2485 unsafe { from_glib_full(ffi::webkit_settings_get_development_features()) }
2486 }
2487
2488 #[cfg(feature = "v2_42")]
2499 #[cfg_attr(docsrs, doc(cfg(feature = "v2_42")))]
2500 #[doc(alias = "webkit_settings_get_experimental_features")]
2501 #[doc(alias = "get_experimental_features")]
2502 pub fn experimental_features() -> Option<FeatureList> {
2503 assert_initialized_main_thread!();
2504 unsafe { from_glib_full(ffi::webkit_settings_get_experimental_features()) }
2505 }
2506
2507 #[doc(alias = "allow-file-access-from-file-urls")]
2508 pub fn connect_allow_file_access_from_file_urls_notify<F: Fn(&Self) + 'static>(
2509 &self,
2510 f: F,
2511 ) -> SignalHandlerId {
2512 unsafe extern "C" fn notify_allow_file_access_from_file_urls_trampoline<
2513 F: Fn(&Settings) + 'static,
2514 >(
2515 this: *mut ffi::WebKitSettings,
2516 _param_spec: glib::ffi::gpointer,
2517 f: glib::ffi::gpointer,
2518 ) {
2519 unsafe {
2520 let f: &F = &*(f as *const F);
2521 f(&from_glib_borrow(this))
2522 }
2523 }
2524 unsafe {
2525 let f: Box_<F> = Box_::new(f);
2526 connect_raw(
2527 self.as_ptr() as *mut _,
2528 c"notify::allow-file-access-from-file-urls".as_ptr(),
2529 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2530 notify_allow_file_access_from_file_urls_trampoline::<F> as *const (),
2531 )),
2532 Box_::into_raw(f),
2533 )
2534 }
2535 }
2536
2537 #[doc(alias = "allow-modal-dialogs")]
2538 pub fn connect_allow_modal_dialogs_notify<F: Fn(&Self) + 'static>(
2539 &self,
2540 f: F,
2541 ) -> SignalHandlerId {
2542 unsafe extern "C" fn notify_allow_modal_dialogs_trampoline<F: Fn(&Settings) + 'static>(
2543 this: *mut ffi::WebKitSettings,
2544 _param_spec: glib::ffi::gpointer,
2545 f: glib::ffi::gpointer,
2546 ) {
2547 unsafe {
2548 let f: &F = &*(f as *const F);
2549 f(&from_glib_borrow(this))
2550 }
2551 }
2552 unsafe {
2553 let f: Box_<F> = Box_::new(f);
2554 connect_raw(
2555 self.as_ptr() as *mut _,
2556 c"notify::allow-modal-dialogs".as_ptr(),
2557 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2558 notify_allow_modal_dialogs_trampoline::<F> as *const (),
2559 )),
2560 Box_::into_raw(f),
2561 )
2562 }
2563 }
2564
2565 #[doc(alias = "allow-top-navigation-to-data-urls")]
2566 pub fn connect_allow_top_navigation_to_data_urls_notify<F: Fn(&Self) + 'static>(
2567 &self,
2568 f: F,
2569 ) -> SignalHandlerId {
2570 unsafe extern "C" fn notify_allow_top_navigation_to_data_urls_trampoline<
2571 F: Fn(&Settings) + 'static,
2572 >(
2573 this: *mut ffi::WebKitSettings,
2574 _param_spec: glib::ffi::gpointer,
2575 f: glib::ffi::gpointer,
2576 ) {
2577 unsafe {
2578 let f: &F = &*(f as *const F);
2579 f(&from_glib_borrow(this))
2580 }
2581 }
2582 unsafe {
2583 let f: Box_<F> = Box_::new(f);
2584 connect_raw(
2585 self.as_ptr() as *mut _,
2586 c"notify::allow-top-navigation-to-data-urls".as_ptr(),
2587 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2588 notify_allow_top_navigation_to_data_urls_trampoline::<F> as *const (),
2589 )),
2590 Box_::into_raw(f),
2591 )
2592 }
2593 }
2594
2595 #[doc(alias = "allow-universal-access-from-file-urls")]
2596 pub fn connect_allow_universal_access_from_file_urls_notify<F: Fn(&Self) + 'static>(
2597 &self,
2598 f: F,
2599 ) -> SignalHandlerId {
2600 unsafe extern "C" fn notify_allow_universal_access_from_file_urls_trampoline<
2601 F: Fn(&Settings) + 'static,
2602 >(
2603 this: *mut ffi::WebKitSettings,
2604 _param_spec: glib::ffi::gpointer,
2605 f: glib::ffi::gpointer,
2606 ) {
2607 unsafe {
2608 let f: &F = &*(f as *const F);
2609 f(&from_glib_borrow(this))
2610 }
2611 }
2612 unsafe {
2613 let f: Box_<F> = Box_::new(f);
2614 connect_raw(
2615 self.as_ptr() as *mut _,
2616 c"notify::allow-universal-access-from-file-urls".as_ptr(),
2617 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2618 notify_allow_universal_access_from_file_urls_trampoline::<F> as *const (),
2619 )),
2620 Box_::into_raw(f),
2621 )
2622 }
2623 }
2624
2625 #[doc(alias = "auto-load-images")]
2626 pub fn connect_auto_load_images_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2627 unsafe extern "C" fn notify_auto_load_images_trampoline<F: Fn(&Settings) + 'static>(
2628 this: *mut ffi::WebKitSettings,
2629 _param_spec: glib::ffi::gpointer,
2630 f: glib::ffi::gpointer,
2631 ) {
2632 unsafe {
2633 let f: &F = &*(f as *const F);
2634 f(&from_glib_borrow(this))
2635 }
2636 }
2637 unsafe {
2638 let f: Box_<F> = Box_::new(f);
2639 connect_raw(
2640 self.as_ptr() as *mut _,
2641 c"notify::auto-load-images".as_ptr(),
2642 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2643 notify_auto_load_images_trampoline::<F> as *const (),
2644 )),
2645 Box_::into_raw(f),
2646 )
2647 }
2648 }
2649
2650 #[doc(alias = "cursive-font-family")]
2651 pub fn connect_cursive_font_family_notify<F: Fn(&Self) + 'static>(
2652 &self,
2653 f: F,
2654 ) -> SignalHandlerId {
2655 unsafe extern "C" fn notify_cursive_font_family_trampoline<F: Fn(&Settings) + 'static>(
2656 this: *mut ffi::WebKitSettings,
2657 _param_spec: glib::ffi::gpointer,
2658 f: glib::ffi::gpointer,
2659 ) {
2660 unsafe {
2661 let f: &F = &*(f as *const F);
2662 f(&from_glib_borrow(this))
2663 }
2664 }
2665 unsafe {
2666 let f: Box_<F> = Box_::new(f);
2667 connect_raw(
2668 self.as_ptr() as *mut _,
2669 c"notify::cursive-font-family".as_ptr(),
2670 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2671 notify_cursive_font_family_trampoline::<F> as *const (),
2672 )),
2673 Box_::into_raw(f),
2674 )
2675 }
2676 }
2677
2678 #[doc(alias = "default-charset")]
2679 pub fn connect_default_charset_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2680 unsafe extern "C" fn notify_default_charset_trampoline<F: Fn(&Settings) + 'static>(
2681 this: *mut ffi::WebKitSettings,
2682 _param_spec: glib::ffi::gpointer,
2683 f: glib::ffi::gpointer,
2684 ) {
2685 unsafe {
2686 let f: &F = &*(f as *const F);
2687 f(&from_glib_borrow(this))
2688 }
2689 }
2690 unsafe {
2691 let f: Box_<F> = Box_::new(f);
2692 connect_raw(
2693 self.as_ptr() as *mut _,
2694 c"notify::default-charset".as_ptr(),
2695 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2696 notify_default_charset_trampoline::<F> as *const (),
2697 )),
2698 Box_::into_raw(f),
2699 )
2700 }
2701 }
2702
2703 #[doc(alias = "default-font-family")]
2704 pub fn connect_default_font_family_notify<F: Fn(&Self) + 'static>(
2705 &self,
2706 f: F,
2707 ) -> SignalHandlerId {
2708 unsafe extern "C" fn notify_default_font_family_trampoline<F: Fn(&Settings) + 'static>(
2709 this: *mut ffi::WebKitSettings,
2710 _param_spec: glib::ffi::gpointer,
2711 f: glib::ffi::gpointer,
2712 ) {
2713 unsafe {
2714 let f: &F = &*(f as *const F);
2715 f(&from_glib_borrow(this))
2716 }
2717 }
2718 unsafe {
2719 let f: Box_<F> = Box_::new(f);
2720 connect_raw(
2721 self.as_ptr() as *mut _,
2722 c"notify::default-font-family".as_ptr(),
2723 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2724 notify_default_font_family_trampoline::<F> as *const (),
2725 )),
2726 Box_::into_raw(f),
2727 )
2728 }
2729 }
2730
2731 #[doc(alias = "default-font-size")]
2732 pub fn connect_default_font_size_notify<F: Fn(&Self) + 'static>(
2733 &self,
2734 f: F,
2735 ) -> SignalHandlerId {
2736 unsafe extern "C" fn notify_default_font_size_trampoline<F: Fn(&Settings) + 'static>(
2737 this: *mut ffi::WebKitSettings,
2738 _param_spec: glib::ffi::gpointer,
2739 f: glib::ffi::gpointer,
2740 ) {
2741 unsafe {
2742 let f: &F = &*(f as *const F);
2743 f(&from_glib_borrow(this))
2744 }
2745 }
2746 unsafe {
2747 let f: Box_<F> = Box_::new(f);
2748 connect_raw(
2749 self.as_ptr() as *mut _,
2750 c"notify::default-font-size".as_ptr(),
2751 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2752 notify_default_font_size_trampoline::<F> as *const (),
2753 )),
2754 Box_::into_raw(f),
2755 )
2756 }
2757 }
2758
2759 #[doc(alias = "default-monospace-font-size")]
2760 pub fn connect_default_monospace_font_size_notify<F: Fn(&Self) + 'static>(
2761 &self,
2762 f: F,
2763 ) -> SignalHandlerId {
2764 unsafe extern "C" fn notify_default_monospace_font_size_trampoline<
2765 F: Fn(&Settings) + 'static,
2766 >(
2767 this: *mut ffi::WebKitSettings,
2768 _param_spec: glib::ffi::gpointer,
2769 f: glib::ffi::gpointer,
2770 ) {
2771 unsafe {
2772 let f: &F = &*(f as *const F);
2773 f(&from_glib_borrow(this))
2774 }
2775 }
2776 unsafe {
2777 let f: Box_<F> = Box_::new(f);
2778 connect_raw(
2779 self.as_ptr() as *mut _,
2780 c"notify::default-monospace-font-size".as_ptr(),
2781 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2782 notify_default_monospace_font_size_trampoline::<F> as *const (),
2783 )),
2784 Box_::into_raw(f),
2785 )
2786 }
2787 }
2788
2789 #[doc(alias = "disable-web-security")]
2790 pub fn connect_disable_web_security_notify<F: Fn(&Self) + 'static>(
2791 &self,
2792 f: F,
2793 ) -> SignalHandlerId {
2794 unsafe extern "C" fn notify_disable_web_security_trampoline<F: Fn(&Settings) + 'static>(
2795 this: *mut ffi::WebKitSettings,
2796 _param_spec: glib::ffi::gpointer,
2797 f: glib::ffi::gpointer,
2798 ) {
2799 unsafe {
2800 let f: &F = &*(f as *const F);
2801 f(&from_glib_borrow(this))
2802 }
2803 }
2804 unsafe {
2805 let f: Box_<F> = Box_::new(f);
2806 connect_raw(
2807 self.as_ptr() as *mut _,
2808 c"notify::disable-web-security".as_ptr(),
2809 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2810 notify_disable_web_security_trampoline::<F> as *const (),
2811 )),
2812 Box_::into_raw(f),
2813 )
2814 }
2815 }
2816
2817 #[doc(alias = "draw-compositing-indicators")]
2818 pub fn connect_draw_compositing_indicators_notify<F: Fn(&Self) + 'static>(
2819 &self,
2820 f: F,
2821 ) -> SignalHandlerId {
2822 unsafe extern "C" fn notify_draw_compositing_indicators_trampoline<
2823 F: Fn(&Settings) + 'static,
2824 >(
2825 this: *mut ffi::WebKitSettings,
2826 _param_spec: glib::ffi::gpointer,
2827 f: glib::ffi::gpointer,
2828 ) {
2829 unsafe {
2830 let f: &F = &*(f as *const F);
2831 f(&from_glib_borrow(this))
2832 }
2833 }
2834 unsafe {
2835 let f: Box_<F> = Box_::new(f);
2836 connect_raw(
2837 self.as_ptr() as *mut _,
2838 c"notify::draw-compositing-indicators".as_ptr(),
2839 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2840 notify_draw_compositing_indicators_trampoline::<F> as *const (),
2841 )),
2842 Box_::into_raw(f),
2843 )
2844 }
2845 }
2846
2847 #[cfg(feature = "v2_46")]
2848 #[cfg_attr(docsrs, doc(cfg(feature = "v2_46")))]
2849 #[doc(alias = "enable-2d-canvas-acceleration")]
2850 pub fn connect_enable_2d_canvas_acceleration_notify<F: Fn(&Self) + 'static>(
2851 &self,
2852 f: F,
2853 ) -> SignalHandlerId {
2854 unsafe extern "C" fn notify_enable_2d_canvas_acceleration_trampoline<
2855 F: Fn(&Settings) + 'static,
2856 >(
2857 this: *mut ffi::WebKitSettings,
2858 _param_spec: glib::ffi::gpointer,
2859 f: glib::ffi::gpointer,
2860 ) {
2861 unsafe {
2862 let f: &F = &*(f as *const F);
2863 f(&from_glib_borrow(this))
2864 }
2865 }
2866 unsafe {
2867 let f: Box_<F> = Box_::new(f);
2868 connect_raw(
2869 self.as_ptr() as *mut _,
2870 c"notify::enable-2d-canvas-acceleration".as_ptr(),
2871 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2872 notify_enable_2d_canvas_acceleration_trampoline::<F> as *const (),
2873 )),
2874 Box_::into_raw(f),
2875 )
2876 }
2877 }
2878
2879 #[doc(alias = "enable-back-forward-navigation-gestures")]
2880 pub fn connect_enable_back_forward_navigation_gestures_notify<F: Fn(&Self) + 'static>(
2881 &self,
2882 f: F,
2883 ) -> SignalHandlerId {
2884 unsafe extern "C" fn notify_enable_back_forward_navigation_gestures_trampoline<
2885 F: Fn(&Settings) + 'static,
2886 >(
2887 this: *mut ffi::WebKitSettings,
2888 _param_spec: glib::ffi::gpointer,
2889 f: glib::ffi::gpointer,
2890 ) {
2891 unsafe {
2892 let f: &F = &*(f as *const F);
2893 f(&from_glib_borrow(this))
2894 }
2895 }
2896 unsafe {
2897 let f: Box_<F> = Box_::new(f);
2898 connect_raw(
2899 self.as_ptr() as *mut _,
2900 c"notify::enable-back-forward-navigation-gestures".as_ptr(),
2901 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2902 notify_enable_back_forward_navigation_gestures_trampoline::<F> as *const (),
2903 )),
2904 Box_::into_raw(f),
2905 )
2906 }
2907 }
2908
2909 #[doc(alias = "enable-caret-browsing")]
2910 pub fn connect_enable_caret_browsing_notify<F: Fn(&Self) + 'static>(
2911 &self,
2912 f: F,
2913 ) -> SignalHandlerId {
2914 unsafe extern "C" fn notify_enable_caret_browsing_trampoline<F: Fn(&Settings) + 'static>(
2915 this: *mut ffi::WebKitSettings,
2916 _param_spec: glib::ffi::gpointer,
2917 f: glib::ffi::gpointer,
2918 ) {
2919 unsafe {
2920 let f: &F = &*(f as *const F);
2921 f(&from_glib_borrow(this))
2922 }
2923 }
2924 unsafe {
2925 let f: Box_<F> = Box_::new(f);
2926 connect_raw(
2927 self.as_ptr() as *mut _,
2928 c"notify::enable-caret-browsing".as_ptr(),
2929 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2930 notify_enable_caret_browsing_trampoline::<F> as *const (),
2931 )),
2932 Box_::into_raw(f),
2933 )
2934 }
2935 }
2936
2937 #[doc(alias = "enable-developer-extras")]
2938 pub fn connect_enable_developer_extras_notify<F: Fn(&Self) + 'static>(
2939 &self,
2940 f: F,
2941 ) -> SignalHandlerId {
2942 unsafe extern "C" fn notify_enable_developer_extras_trampoline<
2943 F: Fn(&Settings) + 'static,
2944 >(
2945 this: *mut ffi::WebKitSettings,
2946 _param_spec: glib::ffi::gpointer,
2947 f: glib::ffi::gpointer,
2948 ) {
2949 unsafe {
2950 let f: &F = &*(f as *const F);
2951 f(&from_glib_borrow(this))
2952 }
2953 }
2954 unsafe {
2955 let f: Box_<F> = Box_::new(f);
2956 connect_raw(
2957 self.as_ptr() as *mut _,
2958 c"notify::enable-developer-extras".as_ptr(),
2959 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2960 notify_enable_developer_extras_trampoline::<F> as *const (),
2961 )),
2962 Box_::into_raw(f),
2963 )
2964 }
2965 }
2966
2967 #[cfg_attr(feature = "v2_48", deprecated = "Since 2.48")]
2968 #[doc(alias = "enable-dns-prefetching")]
2969 pub fn connect_enable_dns_prefetching_notify<F: Fn(&Self) + 'static>(
2970 &self,
2971 f: F,
2972 ) -> SignalHandlerId {
2973 unsafe extern "C" fn notify_enable_dns_prefetching_trampoline<
2974 F: Fn(&Settings) + 'static,
2975 >(
2976 this: *mut ffi::WebKitSettings,
2977 _param_spec: glib::ffi::gpointer,
2978 f: glib::ffi::gpointer,
2979 ) {
2980 unsafe {
2981 let f: &F = &*(f as *const F);
2982 f(&from_glib_borrow(this))
2983 }
2984 }
2985 unsafe {
2986 let f: Box_<F> = Box_::new(f);
2987 connect_raw(
2988 self.as_ptr() as *mut _,
2989 c"notify::enable-dns-prefetching".as_ptr(),
2990 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2991 notify_enable_dns_prefetching_trampoline::<F> as *const (),
2992 )),
2993 Box_::into_raw(f),
2994 )
2995 }
2996 }
2997
2998 #[doc(alias = "enable-encrypted-media")]
2999 pub fn connect_enable_encrypted_media_notify<F: Fn(&Self) + 'static>(
3000 &self,
3001 f: F,
3002 ) -> SignalHandlerId {
3003 unsafe extern "C" fn notify_enable_encrypted_media_trampoline<
3004 F: Fn(&Settings) + 'static,
3005 >(
3006 this: *mut ffi::WebKitSettings,
3007 _param_spec: glib::ffi::gpointer,
3008 f: glib::ffi::gpointer,
3009 ) {
3010 unsafe {
3011 let f: &F = &*(f as *const F);
3012 f(&from_glib_borrow(this))
3013 }
3014 }
3015 unsafe {
3016 let f: Box_<F> = Box_::new(f);
3017 connect_raw(
3018 self.as_ptr() as *mut _,
3019 c"notify::enable-encrypted-media".as_ptr(),
3020 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3021 notify_enable_encrypted_media_trampoline::<F> as *const (),
3022 )),
3023 Box_::into_raw(f),
3024 )
3025 }
3026 }
3027
3028 #[doc(alias = "enable-fullscreen")]
3029 pub fn connect_enable_fullscreen_notify<F: Fn(&Self) + 'static>(
3030 &self,
3031 f: F,
3032 ) -> SignalHandlerId {
3033 unsafe extern "C" fn notify_enable_fullscreen_trampoline<F: Fn(&Settings) + 'static>(
3034 this: *mut ffi::WebKitSettings,
3035 _param_spec: glib::ffi::gpointer,
3036 f: glib::ffi::gpointer,
3037 ) {
3038 unsafe {
3039 let f: &F = &*(f as *const F);
3040 f(&from_glib_borrow(this))
3041 }
3042 }
3043 unsafe {
3044 let f: Box_<F> = Box_::new(f);
3045 connect_raw(
3046 self.as_ptr() as *mut _,
3047 c"notify::enable-fullscreen".as_ptr(),
3048 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3049 notify_enable_fullscreen_trampoline::<F> as *const (),
3050 )),
3051 Box_::into_raw(f),
3052 )
3053 }
3054 }
3055
3056 #[doc(alias = "enable-html5-database")]
3057 pub fn connect_enable_html5_database_notify<F: Fn(&Self) + 'static>(
3058 &self,
3059 f: F,
3060 ) -> SignalHandlerId {
3061 unsafe extern "C" fn notify_enable_html5_database_trampoline<F: Fn(&Settings) + 'static>(
3062 this: *mut ffi::WebKitSettings,
3063 _param_spec: glib::ffi::gpointer,
3064 f: glib::ffi::gpointer,
3065 ) {
3066 unsafe {
3067 let f: &F = &*(f as *const F);
3068 f(&from_glib_borrow(this))
3069 }
3070 }
3071 unsafe {
3072 let f: Box_<F> = Box_::new(f);
3073 connect_raw(
3074 self.as_ptr() as *mut _,
3075 c"notify::enable-html5-database".as_ptr(),
3076 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3077 notify_enable_html5_database_trampoline::<F> as *const (),
3078 )),
3079 Box_::into_raw(f),
3080 )
3081 }
3082 }
3083
3084 #[doc(alias = "enable-html5-local-storage")]
3085 pub fn connect_enable_html5_local_storage_notify<F: Fn(&Self) + 'static>(
3086 &self,
3087 f: F,
3088 ) -> SignalHandlerId {
3089 unsafe extern "C" fn notify_enable_html5_local_storage_trampoline<
3090 F: Fn(&Settings) + 'static,
3091 >(
3092 this: *mut ffi::WebKitSettings,
3093 _param_spec: glib::ffi::gpointer,
3094 f: glib::ffi::gpointer,
3095 ) {
3096 unsafe {
3097 let f: &F = &*(f as *const F);
3098 f(&from_glib_borrow(this))
3099 }
3100 }
3101 unsafe {
3102 let f: Box_<F> = Box_::new(f);
3103 connect_raw(
3104 self.as_ptr() as *mut _,
3105 c"notify::enable-html5-local-storage".as_ptr(),
3106 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3107 notify_enable_html5_local_storage_trampoline::<F> as *const (),
3108 )),
3109 Box_::into_raw(f),
3110 )
3111 }
3112 }
3113
3114 #[cfg_attr(feature = "v2_50", deprecated = "Since 2.50")]
3115 #[doc(alias = "enable-hyperlink-auditing")]
3116 pub fn connect_enable_hyperlink_auditing_notify<F: Fn(&Self) + 'static>(
3117 &self,
3118 f: F,
3119 ) -> SignalHandlerId {
3120 unsafe extern "C" fn notify_enable_hyperlink_auditing_trampoline<
3121 F: Fn(&Settings) + 'static,
3122 >(
3123 this: *mut ffi::WebKitSettings,
3124 _param_spec: glib::ffi::gpointer,
3125 f: glib::ffi::gpointer,
3126 ) {
3127 unsafe {
3128 let f: &F = &*(f as *const F);
3129 f(&from_glib_borrow(this))
3130 }
3131 }
3132 unsafe {
3133 let f: Box_<F> = Box_::new(f);
3134 connect_raw(
3135 self.as_ptr() as *mut _,
3136 c"notify::enable-hyperlink-auditing".as_ptr(),
3137 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3138 notify_enable_hyperlink_auditing_trampoline::<F> as *const (),
3139 )),
3140 Box_::into_raw(f),
3141 )
3142 }
3143 }
3144
3145 #[doc(alias = "enable-javascript")]
3146 pub fn connect_enable_javascript_notify<F: Fn(&Self) + 'static>(
3147 &self,
3148 f: F,
3149 ) -> SignalHandlerId {
3150 unsafe extern "C" fn notify_enable_javascript_trampoline<F: Fn(&Settings) + 'static>(
3151 this: *mut ffi::WebKitSettings,
3152 _param_spec: glib::ffi::gpointer,
3153 f: glib::ffi::gpointer,
3154 ) {
3155 unsafe {
3156 let f: &F = &*(f as *const F);
3157 f(&from_glib_borrow(this))
3158 }
3159 }
3160 unsafe {
3161 let f: Box_<F> = Box_::new(f);
3162 connect_raw(
3163 self.as_ptr() as *mut _,
3164 c"notify::enable-javascript".as_ptr(),
3165 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3166 notify_enable_javascript_trampoline::<F> as *const (),
3167 )),
3168 Box_::into_raw(f),
3169 )
3170 }
3171 }
3172
3173 #[doc(alias = "enable-javascript-markup")]
3174 pub fn connect_enable_javascript_markup_notify<F: Fn(&Self) + 'static>(
3175 &self,
3176 f: F,
3177 ) -> SignalHandlerId {
3178 unsafe extern "C" fn notify_enable_javascript_markup_trampoline<
3179 F: Fn(&Settings) + 'static,
3180 >(
3181 this: *mut ffi::WebKitSettings,
3182 _param_spec: glib::ffi::gpointer,
3183 f: glib::ffi::gpointer,
3184 ) {
3185 unsafe {
3186 let f: &F = &*(f as *const F);
3187 f(&from_glib_borrow(this))
3188 }
3189 }
3190 unsafe {
3191 let f: Box_<F> = Box_::new(f);
3192 connect_raw(
3193 self.as_ptr() as *mut _,
3194 c"notify::enable-javascript-markup".as_ptr(),
3195 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3196 notify_enable_javascript_markup_trampoline::<F> as *const (),
3197 )),
3198 Box_::into_raw(f),
3199 )
3200 }
3201 }
3202
3203 #[doc(alias = "enable-media")]
3204 pub fn connect_enable_media_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3205 unsafe extern "C" fn notify_enable_media_trampoline<F: Fn(&Settings) + 'static>(
3206 this: *mut ffi::WebKitSettings,
3207 _param_spec: glib::ffi::gpointer,
3208 f: glib::ffi::gpointer,
3209 ) {
3210 unsafe {
3211 let f: &F = &*(f as *const F);
3212 f(&from_glib_borrow(this))
3213 }
3214 }
3215 unsafe {
3216 let f: Box_<F> = Box_::new(f);
3217 connect_raw(
3218 self.as_ptr() as *mut _,
3219 c"notify::enable-media".as_ptr(),
3220 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3221 notify_enable_media_trampoline::<F> as *const (),
3222 )),
3223 Box_::into_raw(f),
3224 )
3225 }
3226 }
3227
3228 #[doc(alias = "enable-media-capabilities")]
3229 pub fn connect_enable_media_capabilities_notify<F: Fn(&Self) + 'static>(
3230 &self,
3231 f: F,
3232 ) -> SignalHandlerId {
3233 unsafe extern "C" fn notify_enable_media_capabilities_trampoline<
3234 F: Fn(&Settings) + 'static,
3235 >(
3236 this: *mut ffi::WebKitSettings,
3237 _param_spec: glib::ffi::gpointer,
3238 f: glib::ffi::gpointer,
3239 ) {
3240 unsafe {
3241 let f: &F = &*(f as *const F);
3242 f(&from_glib_borrow(this))
3243 }
3244 }
3245 unsafe {
3246 let f: Box_<F> = Box_::new(f);
3247 connect_raw(
3248 self.as_ptr() as *mut _,
3249 c"notify::enable-media-capabilities".as_ptr(),
3250 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3251 notify_enable_media_capabilities_trampoline::<F> as *const (),
3252 )),
3253 Box_::into_raw(f),
3254 )
3255 }
3256 }
3257
3258 #[doc(alias = "enable-media-stream")]
3259 pub fn connect_enable_media_stream_notify<F: Fn(&Self) + 'static>(
3260 &self,
3261 f: F,
3262 ) -> SignalHandlerId {
3263 unsafe extern "C" fn notify_enable_media_stream_trampoline<F: Fn(&Settings) + 'static>(
3264 this: *mut ffi::WebKitSettings,
3265 _param_spec: glib::ffi::gpointer,
3266 f: glib::ffi::gpointer,
3267 ) {
3268 unsafe {
3269 let f: &F = &*(f as *const F);
3270 f(&from_glib_borrow(this))
3271 }
3272 }
3273 unsafe {
3274 let f: Box_<F> = Box_::new(f);
3275 connect_raw(
3276 self.as_ptr() as *mut _,
3277 c"notify::enable-media-stream".as_ptr(),
3278 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3279 notify_enable_media_stream_trampoline::<F> as *const (),
3280 )),
3281 Box_::into_raw(f),
3282 )
3283 }
3284 }
3285
3286 #[doc(alias = "enable-mediasource")]
3287 pub fn connect_enable_mediasource_notify<F: Fn(&Self) + 'static>(
3288 &self,
3289 f: F,
3290 ) -> SignalHandlerId {
3291 unsafe extern "C" fn notify_enable_mediasource_trampoline<F: Fn(&Settings) + 'static>(
3292 this: *mut ffi::WebKitSettings,
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::enable-mediasource".as_ptr(),
3306 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3307 notify_enable_mediasource_trampoline::<F> as *const (),
3308 )),
3309 Box_::into_raw(f),
3310 )
3311 }
3312 }
3313
3314 #[doc(alias = "enable-mock-capture-devices")]
3315 pub fn connect_enable_mock_capture_devices_notify<F: Fn(&Self) + 'static>(
3316 &self,
3317 f: F,
3318 ) -> SignalHandlerId {
3319 unsafe extern "C" fn notify_enable_mock_capture_devices_trampoline<
3320 F: Fn(&Settings) + 'static,
3321 >(
3322 this: *mut ffi::WebKitSettings,
3323 _param_spec: glib::ffi::gpointer,
3324 f: glib::ffi::gpointer,
3325 ) {
3326 unsafe {
3327 let f: &F = &*(f as *const F);
3328 f(&from_glib_borrow(this))
3329 }
3330 }
3331 unsafe {
3332 let f: Box_<F> = Box_::new(f);
3333 connect_raw(
3334 self.as_ptr() as *mut _,
3335 c"notify::enable-mock-capture-devices".as_ptr(),
3336 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3337 notify_enable_mock_capture_devices_trampoline::<F> as *const (),
3338 )),
3339 Box_::into_raw(f),
3340 )
3341 }
3342 }
3343
3344 #[cfg_attr(feature = "v2_44", deprecated = "Since 2.44")]
3345 #[doc(alias = "enable-offline-web-application-cache")]
3346 pub fn connect_enable_offline_web_application_cache_notify<F: Fn(&Self) + 'static>(
3347 &self,
3348 f: F,
3349 ) -> SignalHandlerId {
3350 unsafe extern "C" fn notify_enable_offline_web_application_cache_trampoline<
3351 F: Fn(&Settings) + 'static,
3352 >(
3353 this: *mut ffi::WebKitSettings,
3354 _param_spec: glib::ffi::gpointer,
3355 f: glib::ffi::gpointer,
3356 ) {
3357 unsafe {
3358 let f: &F = &*(f as *const F);
3359 f(&from_glib_borrow(this))
3360 }
3361 }
3362 unsafe {
3363 let f: Box_<F> = Box_::new(f);
3364 connect_raw(
3365 self.as_ptr() as *mut _,
3366 c"notify::enable-offline-web-application-cache".as_ptr(),
3367 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3368 notify_enable_offline_web_application_cache_trampoline::<F> as *const (),
3369 )),
3370 Box_::into_raw(f),
3371 )
3372 }
3373 }
3374
3375 #[doc(alias = "enable-page-cache")]
3376 pub fn connect_enable_page_cache_notify<F: Fn(&Self) + 'static>(
3377 &self,
3378 f: F,
3379 ) -> SignalHandlerId {
3380 unsafe extern "C" fn notify_enable_page_cache_trampoline<F: Fn(&Settings) + 'static>(
3381 this: *mut ffi::WebKitSettings,
3382 _param_spec: glib::ffi::gpointer,
3383 f: glib::ffi::gpointer,
3384 ) {
3385 unsafe {
3386 let f: &F = &*(f as *const F);
3387 f(&from_glib_borrow(this))
3388 }
3389 }
3390 unsafe {
3391 let f: Box_<F> = Box_::new(f);
3392 connect_raw(
3393 self.as_ptr() as *mut _,
3394 c"notify::enable-page-cache".as_ptr(),
3395 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3396 notify_enable_page_cache_trampoline::<F> as *const (),
3397 )),
3398 Box_::into_raw(f),
3399 )
3400 }
3401 }
3402
3403 #[doc(alias = "enable-resizable-text-areas")]
3404 pub fn connect_enable_resizable_text_areas_notify<F: Fn(&Self) + 'static>(
3405 &self,
3406 f: F,
3407 ) -> SignalHandlerId {
3408 unsafe extern "C" fn notify_enable_resizable_text_areas_trampoline<
3409 F: Fn(&Settings) + 'static,
3410 >(
3411 this: *mut ffi::WebKitSettings,
3412 _param_spec: glib::ffi::gpointer,
3413 f: glib::ffi::gpointer,
3414 ) {
3415 unsafe {
3416 let f: &F = &*(f as *const F);
3417 f(&from_glib_borrow(this))
3418 }
3419 }
3420 unsafe {
3421 let f: Box_<F> = Box_::new(f);
3422 connect_raw(
3423 self.as_ptr() as *mut _,
3424 c"notify::enable-resizable-text-areas".as_ptr(),
3425 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3426 notify_enable_resizable_text_areas_trampoline::<F> as *const (),
3427 )),
3428 Box_::into_raw(f),
3429 )
3430 }
3431 }
3432
3433 #[doc(alias = "enable-site-specific-quirks")]
3434 pub fn connect_enable_site_specific_quirks_notify<F: Fn(&Self) + 'static>(
3435 &self,
3436 f: F,
3437 ) -> SignalHandlerId {
3438 unsafe extern "C" fn notify_enable_site_specific_quirks_trampoline<
3439 F: Fn(&Settings) + 'static,
3440 >(
3441 this: *mut ffi::WebKitSettings,
3442 _param_spec: glib::ffi::gpointer,
3443 f: glib::ffi::gpointer,
3444 ) {
3445 unsafe {
3446 let f: &F = &*(f as *const F);
3447 f(&from_glib_borrow(this))
3448 }
3449 }
3450 unsafe {
3451 let f: Box_<F> = Box_::new(f);
3452 connect_raw(
3453 self.as_ptr() as *mut _,
3454 c"notify::enable-site-specific-quirks".as_ptr(),
3455 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3456 notify_enable_site_specific_quirks_trampoline::<F> as *const (),
3457 )),
3458 Box_::into_raw(f),
3459 )
3460 }
3461 }
3462
3463 #[doc(alias = "enable-smooth-scrolling")]
3464 pub fn connect_enable_smooth_scrolling_notify<F: Fn(&Self) + 'static>(
3465 &self,
3466 f: F,
3467 ) -> SignalHandlerId {
3468 unsafe extern "C" fn notify_enable_smooth_scrolling_trampoline<
3469 F: Fn(&Settings) + 'static,
3470 >(
3471 this: *mut ffi::WebKitSettings,
3472 _param_spec: glib::ffi::gpointer,
3473 f: glib::ffi::gpointer,
3474 ) {
3475 unsafe {
3476 let f: &F = &*(f as *const F);
3477 f(&from_glib_borrow(this))
3478 }
3479 }
3480 unsafe {
3481 let f: Box_<F> = Box_::new(f);
3482 connect_raw(
3483 self.as_ptr() as *mut _,
3484 c"notify::enable-smooth-scrolling".as_ptr(),
3485 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3486 notify_enable_smooth_scrolling_trampoline::<F> as *const (),
3487 )),
3488 Box_::into_raw(f),
3489 )
3490 }
3491 }
3492
3493 #[doc(alias = "enable-spatial-navigation")]
3494 pub fn connect_enable_spatial_navigation_notify<F: Fn(&Self) + 'static>(
3495 &self,
3496 f: F,
3497 ) -> SignalHandlerId {
3498 unsafe extern "C" fn notify_enable_spatial_navigation_trampoline<
3499 F: Fn(&Settings) + 'static,
3500 >(
3501 this: *mut ffi::WebKitSettings,
3502 _param_spec: glib::ffi::gpointer,
3503 f: glib::ffi::gpointer,
3504 ) {
3505 unsafe {
3506 let f: &F = &*(f as *const F);
3507 f(&from_glib_borrow(this))
3508 }
3509 }
3510 unsafe {
3511 let f: Box_<F> = Box_::new(f);
3512 connect_raw(
3513 self.as_ptr() as *mut _,
3514 c"notify::enable-spatial-navigation".as_ptr(),
3515 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3516 notify_enable_spatial_navigation_trampoline::<F> as *const (),
3517 )),
3518 Box_::into_raw(f),
3519 )
3520 }
3521 }
3522
3523 #[doc(alias = "enable-tabs-to-links")]
3524 pub fn connect_enable_tabs_to_links_notify<F: Fn(&Self) + 'static>(
3525 &self,
3526 f: F,
3527 ) -> SignalHandlerId {
3528 unsafe extern "C" fn notify_enable_tabs_to_links_trampoline<F: Fn(&Settings) + 'static>(
3529 this: *mut ffi::WebKitSettings,
3530 _param_spec: glib::ffi::gpointer,
3531 f: glib::ffi::gpointer,
3532 ) {
3533 unsafe {
3534 let f: &F = &*(f as *const F);
3535 f(&from_glib_borrow(this))
3536 }
3537 }
3538 unsafe {
3539 let f: Box_<F> = Box_::new(f);
3540 connect_raw(
3541 self.as_ptr() as *mut _,
3542 c"notify::enable-tabs-to-links".as_ptr(),
3543 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3544 notify_enable_tabs_to_links_trampoline::<F> as *const (),
3545 )),
3546 Box_::into_raw(f),
3547 )
3548 }
3549 }
3550
3551 #[doc(alias = "enable-webaudio")]
3552 pub fn connect_enable_webaudio_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3553 unsafe extern "C" fn notify_enable_webaudio_trampoline<F: Fn(&Settings) + 'static>(
3554 this: *mut ffi::WebKitSettings,
3555 _param_spec: glib::ffi::gpointer,
3556 f: glib::ffi::gpointer,
3557 ) {
3558 unsafe {
3559 let f: &F = &*(f as *const F);
3560 f(&from_glib_borrow(this))
3561 }
3562 }
3563 unsafe {
3564 let f: Box_<F> = Box_::new(f);
3565 connect_raw(
3566 self.as_ptr() as *mut _,
3567 c"notify::enable-webaudio".as_ptr(),
3568 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3569 notify_enable_webaudio_trampoline::<F> as *const (),
3570 )),
3571 Box_::into_raw(f),
3572 )
3573 }
3574 }
3575
3576 #[doc(alias = "enable-webgl")]
3577 pub fn connect_enable_webgl_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3578 unsafe extern "C" fn notify_enable_webgl_trampoline<F: Fn(&Settings) + 'static>(
3579 this: *mut ffi::WebKitSettings,
3580 _param_spec: glib::ffi::gpointer,
3581 f: glib::ffi::gpointer,
3582 ) {
3583 unsafe {
3584 let f: &F = &*(f as *const F);
3585 f(&from_glib_borrow(this))
3586 }
3587 }
3588 unsafe {
3589 let f: Box_<F> = Box_::new(f);
3590 connect_raw(
3591 self.as_ptr() as *mut _,
3592 c"notify::enable-webgl".as_ptr(),
3593 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3594 notify_enable_webgl_trampoline::<F> as *const (),
3595 )),
3596 Box_::into_raw(f),
3597 )
3598 }
3599 }
3600
3601 #[doc(alias = "enable-webrtc")]
3602 pub fn connect_enable_webrtc_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3603 unsafe extern "C" fn notify_enable_webrtc_trampoline<F: Fn(&Settings) + 'static>(
3604 this: *mut ffi::WebKitSettings,
3605 _param_spec: glib::ffi::gpointer,
3606 f: glib::ffi::gpointer,
3607 ) {
3608 unsafe {
3609 let f: &F = &*(f as *const F);
3610 f(&from_glib_borrow(this))
3611 }
3612 }
3613 unsafe {
3614 let f: Box_<F> = Box_::new(f);
3615 connect_raw(
3616 self.as_ptr() as *mut _,
3617 c"notify::enable-webrtc".as_ptr(),
3618 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3619 notify_enable_webrtc_trampoline::<F> as *const (),
3620 )),
3621 Box_::into_raw(f),
3622 )
3623 }
3624 }
3625
3626 #[doc(alias = "enable-write-console-messages-to-stdout")]
3627 pub fn connect_enable_write_console_messages_to_stdout_notify<F: Fn(&Self) + 'static>(
3628 &self,
3629 f: F,
3630 ) -> SignalHandlerId {
3631 unsafe extern "C" fn notify_enable_write_console_messages_to_stdout_trampoline<
3632 F: Fn(&Settings) + 'static,
3633 >(
3634 this: *mut ffi::WebKitSettings,
3635 _param_spec: glib::ffi::gpointer,
3636 f: glib::ffi::gpointer,
3637 ) {
3638 unsafe {
3639 let f: &F = &*(f as *const F);
3640 f(&from_glib_borrow(this))
3641 }
3642 }
3643 unsafe {
3644 let f: Box_<F> = Box_::new(f);
3645 connect_raw(
3646 self.as_ptr() as *mut _,
3647 c"notify::enable-write-console-messages-to-stdout".as_ptr(),
3648 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3649 notify_enable_write_console_messages_to_stdout_trampoline::<F> as *const (),
3650 )),
3651 Box_::into_raw(f),
3652 )
3653 }
3654 }
3655
3656 #[doc(alias = "fantasy-font-family")]
3657 pub fn connect_fantasy_font_family_notify<F: Fn(&Self) + 'static>(
3658 &self,
3659 f: F,
3660 ) -> SignalHandlerId {
3661 unsafe extern "C" fn notify_fantasy_font_family_trampoline<F: Fn(&Settings) + 'static>(
3662 this: *mut ffi::WebKitSettings,
3663 _param_spec: glib::ffi::gpointer,
3664 f: glib::ffi::gpointer,
3665 ) {
3666 unsafe {
3667 let f: &F = &*(f as *const F);
3668 f(&from_glib_borrow(this))
3669 }
3670 }
3671 unsafe {
3672 let f: Box_<F> = Box_::new(f);
3673 connect_raw(
3674 self.as_ptr() as *mut _,
3675 c"notify::fantasy-font-family".as_ptr(),
3676 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3677 notify_fantasy_font_family_trampoline::<F> as *const (),
3678 )),
3679 Box_::into_raw(f),
3680 )
3681 }
3682 }
3683
3684 #[doc(alias = "hardware-acceleration-policy")]
3685 pub fn connect_hardware_acceleration_policy_notify<F: Fn(&Self) + 'static>(
3686 &self,
3687 f: F,
3688 ) -> SignalHandlerId {
3689 unsafe extern "C" fn notify_hardware_acceleration_policy_trampoline<
3690 F: Fn(&Settings) + 'static,
3691 >(
3692 this: *mut ffi::WebKitSettings,
3693 _param_spec: glib::ffi::gpointer,
3694 f: glib::ffi::gpointer,
3695 ) {
3696 unsafe {
3697 let f: &F = &*(f as *const F);
3698 f(&from_glib_borrow(this))
3699 }
3700 }
3701 unsafe {
3702 let f: Box_<F> = Box_::new(f);
3703 connect_raw(
3704 self.as_ptr() as *mut _,
3705 c"notify::hardware-acceleration-policy".as_ptr(),
3706 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3707 notify_hardware_acceleration_policy_trampoline::<F> as *const (),
3708 )),
3709 Box_::into_raw(f),
3710 )
3711 }
3712 }
3713
3714 #[doc(alias = "javascript-can-access-clipboard")]
3715 pub fn connect_javascript_can_access_clipboard_notify<F: Fn(&Self) + 'static>(
3716 &self,
3717 f: F,
3718 ) -> SignalHandlerId {
3719 unsafe extern "C" fn notify_javascript_can_access_clipboard_trampoline<
3720 F: Fn(&Settings) + 'static,
3721 >(
3722 this: *mut ffi::WebKitSettings,
3723 _param_spec: glib::ffi::gpointer,
3724 f: glib::ffi::gpointer,
3725 ) {
3726 unsafe {
3727 let f: &F = &*(f as *const F);
3728 f(&from_glib_borrow(this))
3729 }
3730 }
3731 unsafe {
3732 let f: Box_<F> = Box_::new(f);
3733 connect_raw(
3734 self.as_ptr() as *mut _,
3735 c"notify::javascript-can-access-clipboard".as_ptr(),
3736 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3737 notify_javascript_can_access_clipboard_trampoline::<F> as *const (),
3738 )),
3739 Box_::into_raw(f),
3740 )
3741 }
3742 }
3743
3744 #[doc(alias = "javascript-can-open-windows-automatically")]
3745 pub fn connect_javascript_can_open_windows_automatically_notify<F: Fn(&Self) + 'static>(
3746 &self,
3747 f: F,
3748 ) -> SignalHandlerId {
3749 unsafe extern "C" fn notify_javascript_can_open_windows_automatically_trampoline<
3750 F: Fn(&Settings) + 'static,
3751 >(
3752 this: *mut ffi::WebKitSettings,
3753 _param_spec: glib::ffi::gpointer,
3754 f: glib::ffi::gpointer,
3755 ) {
3756 unsafe {
3757 let f: &F = &*(f as *const F);
3758 f(&from_glib_borrow(this))
3759 }
3760 }
3761 unsafe {
3762 let f: Box_<F> = Box_::new(f);
3763 connect_raw(
3764 self.as_ptr() as *mut _,
3765 c"notify::javascript-can-open-windows-automatically".as_ptr(),
3766 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3767 notify_javascript_can_open_windows_automatically_trampoline::<F> as *const (),
3768 )),
3769 Box_::into_raw(f),
3770 )
3771 }
3772 }
3773
3774 #[cfg_attr(feature = "v2_42", deprecated = "Since 2.42")]
3775 #[doc(alias = "load-icons-ignoring-image-load-setting")]
3776 pub fn connect_load_icons_ignoring_image_load_setting_notify<F: Fn(&Self) + 'static>(
3777 &self,
3778 f: F,
3779 ) -> SignalHandlerId {
3780 unsafe extern "C" fn notify_load_icons_ignoring_image_load_setting_trampoline<
3781 F: Fn(&Settings) + 'static,
3782 >(
3783 this: *mut ffi::WebKitSettings,
3784 _param_spec: glib::ffi::gpointer,
3785 f: glib::ffi::gpointer,
3786 ) {
3787 unsafe {
3788 let f: &F = &*(f as *const F);
3789 f(&from_glib_borrow(this))
3790 }
3791 }
3792 unsafe {
3793 let f: Box_<F> = Box_::new(f);
3794 connect_raw(
3795 self.as_ptr() as *mut _,
3796 c"notify::load-icons-ignoring-image-load-setting".as_ptr(),
3797 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3798 notify_load_icons_ignoring_image_load_setting_trampoline::<F> as *const (),
3799 )),
3800 Box_::into_raw(f),
3801 )
3802 }
3803 }
3804
3805 #[cfg(feature = "v2_52")]
3806 #[cfg_attr(docsrs, doc(cfg(feature = "v2_52")))]
3807 #[doc(alias = "math-font-family")]
3808 pub fn connect_math_font_family_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3809 unsafe extern "C" fn notify_math_font_family_trampoline<F: Fn(&Settings) + 'static>(
3810 this: *mut ffi::WebKitSettings,
3811 _param_spec: glib::ffi::gpointer,
3812 f: glib::ffi::gpointer,
3813 ) {
3814 unsafe {
3815 let f: &F = &*(f as *const F);
3816 f(&from_glib_borrow(this))
3817 }
3818 }
3819 unsafe {
3820 let f: Box_<F> = Box_::new(f);
3821 connect_raw(
3822 self.as_ptr() as *mut _,
3823 c"notify::math-font-family".as_ptr(),
3824 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3825 notify_math_font_family_trampoline::<F> as *const (),
3826 )),
3827 Box_::into_raw(f),
3828 )
3829 }
3830 }
3831
3832 #[doc(alias = "media-content-types-requiring-hardware-support")]
3833 pub fn connect_media_content_types_requiring_hardware_support_notify<F: Fn(&Self) + 'static>(
3834 &self,
3835 f: F,
3836 ) -> SignalHandlerId {
3837 unsafe extern "C" fn notify_media_content_types_requiring_hardware_support_trampoline<
3838 F: Fn(&Settings) + 'static,
3839 >(
3840 this: *mut ffi::WebKitSettings,
3841 _param_spec: glib::ffi::gpointer,
3842 f: glib::ffi::gpointer,
3843 ) {
3844 unsafe {
3845 let f: &F = &*(f as *const F);
3846 f(&from_glib_borrow(this))
3847 }
3848 }
3849 unsafe {
3850 let f: Box_<F> = Box_::new(f);
3851 connect_raw(
3852 self.as_ptr() as *mut _,
3853 c"notify::media-content-types-requiring-hardware-support".as_ptr(),
3854 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3855 notify_media_content_types_requiring_hardware_support_trampoline::<F>
3856 as *const (),
3857 )),
3858 Box_::into_raw(f),
3859 )
3860 }
3861 }
3862
3863 #[doc(alias = "media-playback-allows-inline")]
3864 pub fn connect_media_playback_allows_inline_notify<F: Fn(&Self) + 'static>(
3865 &self,
3866 f: F,
3867 ) -> SignalHandlerId {
3868 unsafe extern "C" fn notify_media_playback_allows_inline_trampoline<
3869 F: Fn(&Settings) + 'static,
3870 >(
3871 this: *mut ffi::WebKitSettings,
3872 _param_spec: glib::ffi::gpointer,
3873 f: glib::ffi::gpointer,
3874 ) {
3875 unsafe {
3876 let f: &F = &*(f as *const F);
3877 f(&from_glib_borrow(this))
3878 }
3879 }
3880 unsafe {
3881 let f: Box_<F> = Box_::new(f);
3882 connect_raw(
3883 self.as_ptr() as *mut _,
3884 c"notify::media-playback-allows-inline".as_ptr(),
3885 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3886 notify_media_playback_allows_inline_trampoline::<F> as *const (),
3887 )),
3888 Box_::into_raw(f),
3889 )
3890 }
3891 }
3892
3893 #[doc(alias = "media-playback-requires-user-gesture")]
3894 pub fn connect_media_playback_requires_user_gesture_notify<F: Fn(&Self) + 'static>(
3895 &self,
3896 f: F,
3897 ) -> SignalHandlerId {
3898 unsafe extern "C" fn notify_media_playback_requires_user_gesture_trampoline<
3899 F: Fn(&Settings) + 'static,
3900 >(
3901 this: *mut ffi::WebKitSettings,
3902 _param_spec: glib::ffi::gpointer,
3903 f: glib::ffi::gpointer,
3904 ) {
3905 unsafe {
3906 let f: &F = &*(f as *const F);
3907 f(&from_glib_borrow(this))
3908 }
3909 }
3910 unsafe {
3911 let f: Box_<F> = Box_::new(f);
3912 connect_raw(
3913 self.as_ptr() as *mut _,
3914 c"notify::media-playback-requires-user-gesture".as_ptr(),
3915 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3916 notify_media_playback_requires_user_gesture_trampoline::<F> as *const (),
3917 )),
3918 Box_::into_raw(f),
3919 )
3920 }
3921 }
3922
3923 #[doc(alias = "minimum-font-size")]
3924 pub fn connect_minimum_font_size_notify<F: Fn(&Self) + 'static>(
3925 &self,
3926 f: F,
3927 ) -> SignalHandlerId {
3928 unsafe extern "C" fn notify_minimum_font_size_trampoline<F: Fn(&Settings) + 'static>(
3929 this: *mut ffi::WebKitSettings,
3930 _param_spec: glib::ffi::gpointer,
3931 f: glib::ffi::gpointer,
3932 ) {
3933 unsafe {
3934 let f: &F = &*(f as *const F);
3935 f(&from_glib_borrow(this))
3936 }
3937 }
3938 unsafe {
3939 let f: Box_<F> = Box_::new(f);
3940 connect_raw(
3941 self.as_ptr() as *mut _,
3942 c"notify::minimum-font-size".as_ptr(),
3943 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3944 notify_minimum_font_size_trampoline::<F> as *const (),
3945 )),
3946 Box_::into_raw(f),
3947 )
3948 }
3949 }
3950
3951 #[doc(alias = "monospace-font-family")]
3952 pub fn connect_monospace_font_family_notify<F: Fn(&Self) + 'static>(
3953 &self,
3954 f: F,
3955 ) -> SignalHandlerId {
3956 unsafe extern "C" fn notify_monospace_font_family_trampoline<F: Fn(&Settings) + 'static>(
3957 this: *mut ffi::WebKitSettings,
3958 _param_spec: glib::ffi::gpointer,
3959 f: glib::ffi::gpointer,
3960 ) {
3961 unsafe {
3962 let f: &F = &*(f as *const F);
3963 f(&from_glib_borrow(this))
3964 }
3965 }
3966 unsafe {
3967 let f: Box_<F> = Box_::new(f);
3968 connect_raw(
3969 self.as_ptr() as *mut _,
3970 c"notify::monospace-font-family".as_ptr(),
3971 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3972 notify_monospace_font_family_trampoline::<F> as *const (),
3973 )),
3974 Box_::into_raw(f),
3975 )
3976 }
3977 }
3978
3979 #[doc(alias = "pictograph-font-family")]
3980 pub fn connect_pictograph_font_family_notify<F: Fn(&Self) + 'static>(
3981 &self,
3982 f: F,
3983 ) -> SignalHandlerId {
3984 unsafe extern "C" fn notify_pictograph_font_family_trampoline<
3985 F: Fn(&Settings) + 'static,
3986 >(
3987 this: *mut ffi::WebKitSettings,
3988 _param_spec: glib::ffi::gpointer,
3989 f: glib::ffi::gpointer,
3990 ) {
3991 unsafe {
3992 let f: &F = &*(f as *const F);
3993 f(&from_glib_borrow(this))
3994 }
3995 }
3996 unsafe {
3997 let f: Box_<F> = Box_::new(f);
3998 connect_raw(
3999 self.as_ptr() as *mut _,
4000 c"notify::pictograph-font-family".as_ptr(),
4001 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4002 notify_pictograph_font_family_trampoline::<F> as *const (),
4003 )),
4004 Box_::into_raw(f),
4005 )
4006 }
4007 }
4008
4009 #[doc(alias = "print-backgrounds")]
4010 pub fn connect_print_backgrounds_notify<F: Fn(&Self) + 'static>(
4011 &self,
4012 f: F,
4013 ) -> SignalHandlerId {
4014 unsafe extern "C" fn notify_print_backgrounds_trampoline<F: Fn(&Settings) + 'static>(
4015 this: *mut ffi::WebKitSettings,
4016 _param_spec: glib::ffi::gpointer,
4017 f: glib::ffi::gpointer,
4018 ) {
4019 unsafe {
4020 let f: &F = &*(f as *const F);
4021 f(&from_glib_borrow(this))
4022 }
4023 }
4024 unsafe {
4025 let f: Box_<F> = Box_::new(f);
4026 connect_raw(
4027 self.as_ptr() as *mut _,
4028 c"notify::print-backgrounds".as_ptr(),
4029 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4030 notify_print_backgrounds_trampoline::<F> as *const (),
4031 )),
4032 Box_::into_raw(f),
4033 )
4034 }
4035 }
4036
4037 #[doc(alias = "sans-serif-font-family")]
4038 pub fn connect_sans_serif_font_family_notify<F: Fn(&Self) + 'static>(
4039 &self,
4040 f: F,
4041 ) -> SignalHandlerId {
4042 unsafe extern "C" fn notify_sans_serif_font_family_trampoline<
4043 F: Fn(&Settings) + 'static,
4044 >(
4045 this: *mut ffi::WebKitSettings,
4046 _param_spec: glib::ffi::gpointer,
4047 f: glib::ffi::gpointer,
4048 ) {
4049 unsafe {
4050 let f: &F = &*(f as *const F);
4051 f(&from_glib_borrow(this))
4052 }
4053 }
4054 unsafe {
4055 let f: Box_<F> = Box_::new(f);
4056 connect_raw(
4057 self.as_ptr() as *mut _,
4058 c"notify::sans-serif-font-family".as_ptr(),
4059 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4060 notify_sans_serif_font_family_trampoline::<F> as *const (),
4061 )),
4062 Box_::into_raw(f),
4063 )
4064 }
4065 }
4066
4067 #[doc(alias = "serif-font-family")]
4068 pub fn connect_serif_font_family_notify<F: Fn(&Self) + 'static>(
4069 &self,
4070 f: F,
4071 ) -> SignalHandlerId {
4072 unsafe extern "C" fn notify_serif_font_family_trampoline<F: Fn(&Settings) + 'static>(
4073 this: *mut ffi::WebKitSettings,
4074 _param_spec: glib::ffi::gpointer,
4075 f: glib::ffi::gpointer,
4076 ) {
4077 unsafe {
4078 let f: &F = &*(f as *const F);
4079 f(&from_glib_borrow(this))
4080 }
4081 }
4082 unsafe {
4083 let f: Box_<F> = Box_::new(f);
4084 connect_raw(
4085 self.as_ptr() as *mut _,
4086 c"notify::serif-font-family".as_ptr(),
4087 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4088 notify_serif_font_family_trampoline::<F> as *const (),
4089 )),
4090 Box_::into_raw(f),
4091 )
4092 }
4093 }
4094
4095 #[doc(alias = "user-agent")]
4096 pub fn connect_user_agent_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4097 unsafe extern "C" fn notify_user_agent_trampoline<F: Fn(&Settings) + 'static>(
4098 this: *mut ffi::WebKitSettings,
4099 _param_spec: glib::ffi::gpointer,
4100 f: glib::ffi::gpointer,
4101 ) {
4102 unsafe {
4103 let f: &F = &*(f as *const F);
4104 f(&from_glib_borrow(this))
4105 }
4106 }
4107 unsafe {
4108 let f: Box_<F> = Box_::new(f);
4109 connect_raw(
4110 self.as_ptr() as *mut _,
4111 c"notify::user-agent".as_ptr(),
4112 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4113 notify_user_agent_trampoline::<F> as *const (),
4114 )),
4115 Box_::into_raw(f),
4116 )
4117 }
4118 }
4119
4120 #[cfg(feature = "v2_48")]
4121 #[cfg_attr(docsrs, doc(cfg(feature = "v2_48")))]
4122 #[doc(alias = "webrtc-udp-ports-range")]
4123 pub fn connect_webrtc_udp_ports_range_notify<F: Fn(&Self) + 'static>(
4124 &self,
4125 f: F,
4126 ) -> SignalHandlerId {
4127 unsafe extern "C" fn notify_webrtc_udp_ports_range_trampoline<
4128 F: Fn(&Settings) + 'static,
4129 >(
4130 this: *mut ffi::WebKitSettings,
4131 _param_spec: glib::ffi::gpointer,
4132 f: glib::ffi::gpointer,
4133 ) {
4134 unsafe {
4135 let f: &F = &*(f as *const F);
4136 f(&from_glib_borrow(this))
4137 }
4138 }
4139 unsafe {
4140 let f: Box_<F> = Box_::new(f);
4141 connect_raw(
4142 self.as_ptr() as *mut _,
4143 c"notify::webrtc-udp-ports-range".as_ptr(),
4144 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4145 notify_webrtc_udp_ports_range_trampoline::<F> as *const (),
4146 )),
4147 Box_::into_raw(f),
4148 )
4149 }
4150 }
4151
4152 #[doc(alias = "zoom-text-only")]
4153 pub fn connect_zoom_text_only_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4154 unsafe extern "C" fn notify_zoom_text_only_trampoline<F: Fn(&Settings) + 'static>(
4155 this: *mut ffi::WebKitSettings,
4156 _param_spec: glib::ffi::gpointer,
4157 f: glib::ffi::gpointer,
4158 ) {
4159 unsafe {
4160 let f: &F = &*(f as *const F);
4161 f(&from_glib_borrow(this))
4162 }
4163 }
4164 unsafe {
4165 let f: Box_<F> = Box_::new(f);
4166 connect_raw(
4167 self.as_ptr() as *mut _,
4168 c"notify::zoom-text-only".as_ptr(),
4169 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4170 notify_zoom_text_only_trampoline::<F> as *const (),
4171 )),
4172 Box_::into_raw(f),
4173 )
4174 }
4175 }
4176}
4177
4178impl Default for Settings {
4179 fn default() -> Self {
4180 Self::new()
4181 }
4182}
4183
4184#[must_use = "The builder must be built to be used"]
4189pub struct SettingsBuilder {
4190 builder: glib::object::ObjectBuilder<'static, Settings>,
4191}
4192
4193impl SettingsBuilder {
4194 fn new() -> Self {
4195 Self {
4196 builder: glib::object::Object::builder(),
4197 }
4198 }
4199
4200 pub fn allow_file_access_from_file_urls(self, allow_file_access_from_file_urls: bool) -> Self {
4206 Self {
4207 builder: self.builder.property(
4208 "allow-file-access-from-file-urls",
4209 allow_file_access_from_file_urls,
4210 ),
4211 }
4212 }
4213
4214 pub fn allow_modal_dialogs(self, allow_modal_dialogs: bool) -> Self {
4221 Self {
4222 builder: self
4223 .builder
4224 .property("allow-modal-dialogs", allow_modal_dialogs),
4225 }
4226 }
4227
4228 pub fn allow_top_navigation_to_data_urls(
4233 self,
4234 allow_top_navigation_to_data_urls: bool,
4235 ) -> Self {
4236 Self {
4237 builder: self.builder.property(
4238 "allow-top-navigation-to-data-urls",
4239 allow_top_navigation_to_data_urls,
4240 ),
4241 }
4242 }
4243
4244 pub fn allow_universal_access_from_file_urls(
4251 self,
4252 allow_universal_access_from_file_urls: bool,
4253 ) -> Self {
4254 Self {
4255 builder: self.builder.property(
4256 "allow-universal-access-from-file-urls",
4257 allow_universal_access_from_file_urls,
4258 ),
4259 }
4260 }
4261
4262 pub fn auto_load_images(self, auto_load_images: bool) -> Self {
4266 Self {
4267 builder: self.builder.property("auto-load-images", auto_load_images),
4268 }
4269 }
4270
4271 pub fn cursive_font_family(self, cursive_font_family: impl Into<glib::GString>) -> Self {
4273 Self {
4274 builder: self
4275 .builder
4276 .property("cursive-font-family", cursive_font_family.into()),
4277 }
4278 }
4279
4280 pub fn default_charset(self, default_charset: impl Into<glib::GString>) -> Self {
4282 Self {
4283 builder: self
4284 .builder
4285 .property("default-charset", default_charset.into()),
4286 }
4287 }
4288
4289 pub fn default_font_family(self, default_font_family: impl Into<glib::GString>) -> Self {
4291 Self {
4292 builder: self
4293 .builder
4294 .property("default-font-family", default_font_family.into()),
4295 }
4296 }
4297
4298 pub fn default_font_size(self, default_font_size: u32) -> Self {
4301 Self {
4302 builder: self
4303 .builder
4304 .property("default-font-size", default_font_size),
4305 }
4306 }
4307
4308 pub fn default_monospace_font_size(self, default_monospace_font_size: u32) -> Self {
4311 Self {
4312 builder: self
4313 .builder
4314 .property("default-monospace-font-size", default_monospace_font_size),
4315 }
4316 }
4317
4318 pub fn disable_web_security(self, disable_web_security: bool) -> Self {
4325 Self {
4326 builder: self
4327 .builder
4328 .property("disable-web-security", disable_web_security),
4329 }
4330 }
4331
4332 pub fn draw_compositing_indicators(self, draw_compositing_indicators: bool) -> Self {
4336 Self {
4337 builder: self
4338 .builder
4339 .property("draw-compositing-indicators", draw_compositing_indicators),
4340 }
4341 }
4342
4343 #[cfg(feature = "v2_46")]
4348 #[cfg_attr(docsrs, doc(cfg(feature = "v2_46")))]
4349 pub fn enable_2d_canvas_acceleration(self, enable_2d_canvas_acceleration: bool) -> Self {
4350 Self {
4351 builder: self.builder.property(
4352 "enable-2d-canvas-acceleration",
4353 enable_2d_canvas_acceleration,
4354 ),
4355 }
4356 }
4357
4358 pub fn enable_back_forward_navigation_gestures(
4360 self,
4361 enable_back_forward_navigation_gestures: bool,
4362 ) -> Self {
4363 Self {
4364 builder: self.builder.property(
4365 "enable-back-forward-navigation-gestures",
4366 enable_back_forward_navigation_gestures,
4367 ),
4368 }
4369 }
4370
4371 pub fn enable_caret_browsing(self, enable_caret_browsing: bool) -> Self {
4373 Self {
4374 builder: self
4375 .builder
4376 .property("enable-caret-browsing", enable_caret_browsing),
4377 }
4378 }
4379
4380 pub fn enable_developer_extras(self, enable_developer_extras: bool) -> Self {
4382 Self {
4383 builder: self
4384 .builder
4385 .property("enable-developer-extras", enable_developer_extras),
4386 }
4387 }
4388
4389 #[cfg_attr(feature = "v2_48", deprecated = "Since 2.48")]
4392 pub fn enable_dns_prefetching(self, enable_dns_prefetching: bool) -> Self {
4393 Self {
4394 builder: self
4395 .builder
4396 .property("enable-dns-prefetching", enable_dns_prefetching),
4397 }
4398 }
4399
4400 pub fn enable_encrypted_media(self, enable_encrypted_media: bool) -> Self {
4407 Self {
4408 builder: self
4409 .builder
4410 .property("enable-encrypted-media", enable_encrypted_media),
4411 }
4412 }
4413
4414 pub fn enable_fullscreen(self, enable_fullscreen: bool) -> Self {
4419 Self {
4420 builder: self
4421 .builder
4422 .property("enable-fullscreen", enable_fullscreen),
4423 }
4424 }
4425
4426 pub fn enable_html5_database(self, enable_html5_database: bool) -> Self {
4428 Self {
4429 builder: self
4430 .builder
4431 .property("enable-html5-database", enable_html5_database),
4432 }
4433 }
4434
4435 pub fn enable_html5_local_storage(self, enable_html5_local_storage: bool) -> Self {
4441 Self {
4442 builder: self
4443 .builder
4444 .property("enable-html5-local-storage", enable_html5_local_storage),
4445 }
4446 }
4447
4448 #[cfg_attr(feature = "v2_50", deprecated = "Since 2.50")]
4453 pub fn enable_hyperlink_auditing(self, enable_hyperlink_auditing: bool) -> Self {
4454 Self {
4455 builder: self
4456 .builder
4457 .property("enable-hyperlink-auditing", enable_hyperlink_auditing),
4458 }
4459 }
4460
4461 pub fn enable_javascript(self, enable_javascript: bool) -> Self {
4463 Self {
4464 builder: self
4465 .builder
4466 .property("enable-javascript", enable_javascript),
4467 }
4468 }
4469
4470 pub fn enable_javascript_markup(self, enable_javascript_markup: bool) -> Self {
4474 Self {
4475 builder: self
4476 .builder
4477 .property("enable-javascript-markup", enable_javascript_markup),
4478 }
4479 }
4480
4481 pub fn enable_media(self, enable_media: bool) -> Self {
4485 Self {
4486 builder: self.builder.property("enable-media", enable_media),
4487 }
4488 }
4489
4490 pub fn enable_media_capabilities(self, enable_media_capabilities: bool) -> Self {
4499 Self {
4500 builder: self
4501 .builder
4502 .property("enable-media-capabilities", enable_media_capabilities),
4503 }
4504 }
4505
4506 pub fn enable_media_stream(self, enable_media_stream: bool) -> Self {
4512 Self {
4513 builder: self
4514 .builder
4515 .property("enable-media-stream", enable_media_stream),
4516 }
4517 }
4518
4519 pub fn enable_mediasource(self, enable_mediasource: bool) -> Self {
4525 Self {
4526 builder: self
4527 .builder
4528 .property("enable-mediasource", enable_mediasource),
4529 }
4530 }
4531
4532 pub fn enable_mock_capture_devices(self, enable_mock_capture_devices: bool) -> Self {
4536 Self {
4537 builder: self
4538 .builder
4539 .property("enable-mock-capture-devices", enable_mock_capture_devices),
4540 }
4541 }
4542
4543 #[cfg_attr(feature = "v2_44", deprecated = "Since 2.44")]
4545 pub fn enable_offline_web_application_cache(
4546 self,
4547 enable_offline_web_application_cache: bool,
4548 ) -> Self {
4549 Self {
4550 builder: self.builder.property(
4551 "enable-offline-web-application-cache",
4552 enable_offline_web_application_cache,
4553 ),
4554 }
4555 }
4556
4557 pub fn enable_page_cache(self, enable_page_cache: bool) -> Self {
4567 Self {
4568 builder: self
4569 .builder
4570 .property("enable-page-cache", enable_page_cache),
4571 }
4572 }
4573
4574 pub fn enable_resizable_text_areas(self, enable_resizable_text_areas: bool) -> Self {
4576 Self {
4577 builder: self
4578 .builder
4579 .property("enable-resizable-text-areas", enable_resizable_text_areas),
4580 }
4581 }
4582
4583 pub fn enable_site_specific_quirks(self, enable_site_specific_quirks: bool) -> Self {
4590 Self {
4591 builder: self
4592 .builder
4593 .property("enable-site-specific-quirks", enable_site_specific_quirks),
4594 }
4595 }
4596
4597 pub fn enable_smooth_scrolling(self, enable_smooth_scrolling: bool) -> Self {
4599 Self {
4600 builder: self
4601 .builder
4602 .property("enable-smooth-scrolling", enable_smooth_scrolling),
4603 }
4604 }
4605
4606 pub fn enable_spatial_navigation(self, enable_spatial_navigation: bool) -> Self {
4613 Self {
4614 builder: self
4615 .builder
4616 .property("enable-spatial-navigation", enable_spatial_navigation),
4617 }
4618 }
4619
4620 pub fn enable_tabs_to_links(self, enable_tabs_to_links: bool) -> Self {
4625 Self {
4626 builder: self
4627 .builder
4628 .property("enable-tabs-to-links", enable_tabs_to_links),
4629 }
4630 }
4631
4632 pub fn enable_webaudio(self, enable_webaudio: bool) -> Self {
4637 Self {
4638 builder: self.builder.property("enable-webaudio", enable_webaudio),
4639 }
4640 }
4641
4642 pub fn enable_webgl(self, enable_webgl: bool) -> Self {
4645 Self {
4646 builder: self.builder.property("enable-webgl", enable_webgl),
4647 }
4648 }
4649
4650 pub fn enable_webrtc(self, enable_webrtc: bool) -> Self {
4657 Self {
4658 builder: self.builder.property("enable-webrtc", enable_webrtc),
4659 }
4660 }
4661
4662 pub fn enable_write_console_messages_to_stdout(
4665 self,
4666 enable_write_console_messages_to_stdout: bool,
4667 ) -> Self {
4668 Self {
4669 builder: self.builder.property(
4670 "enable-write-console-messages-to-stdout",
4671 enable_write_console_messages_to_stdout,
4672 ),
4673 }
4674 }
4675
4676 pub fn fantasy_font_family(self, fantasy_font_family: impl Into<glib::GString>) -> Self {
4678 Self {
4679 builder: self
4680 .builder
4681 .property("fantasy-font-family", fantasy_font_family.into()),
4682 }
4683 }
4684
4685 pub fn hardware_acceleration_policy(
4693 self,
4694 hardware_acceleration_policy: HardwareAccelerationPolicy,
4695 ) -> Self {
4696 Self {
4697 builder: self
4698 .builder
4699 .property("hardware-acceleration-policy", hardware_acceleration_policy),
4700 }
4701 }
4702
4703 pub fn javascript_can_access_clipboard(self, javascript_can_access_clipboard: bool) -> Self {
4706 Self {
4707 builder: self.builder.property(
4708 "javascript-can-access-clipboard",
4709 javascript_can_access_clipboard,
4710 ),
4711 }
4712 }
4713
4714 pub fn javascript_can_open_windows_automatically(
4717 self,
4718 javascript_can_open_windows_automatically: bool,
4719 ) -> Self {
4720 Self {
4721 builder: self.builder.property(
4722 "javascript-can-open-windows-automatically",
4723 javascript_can_open_windows_automatically,
4724 ),
4725 }
4726 }
4727
4728 #[cfg_attr(feature = "v2_42", deprecated = "Since 2.42")]
4730 pub fn load_icons_ignoring_image_load_setting(
4731 self,
4732 load_icons_ignoring_image_load_setting: bool,
4733 ) -> Self {
4734 Self {
4735 builder: self.builder.property(
4736 "load-icons-ignoring-image-load-setting",
4737 load_icons_ignoring_image_load_setting,
4738 ),
4739 }
4740 }
4741
4742 #[cfg(feature = "v2_52")]
4744 #[cfg_attr(docsrs, doc(cfg(feature = "v2_52")))]
4745 pub fn math_font_family(self, math_font_family: impl Into<glib::GString>) -> Self {
4746 Self {
4747 builder: self
4748 .builder
4749 .property("math-font-family", math_font_family.into()),
4750 }
4751 }
4752
4753 pub fn media_content_types_requiring_hardware_support(
4756 self,
4757 media_content_types_requiring_hardware_support: impl Into<glib::GString>,
4758 ) -> Self {
4759 Self {
4760 builder: self.builder.property(
4761 "media-content-types-requiring-hardware-support",
4762 media_content_types_requiring_hardware_support.into(),
4763 ),
4764 }
4765 }
4766
4767 pub fn media_playback_allows_inline(self, media_playback_allows_inline: bool) -> Self {
4771 Self {
4772 builder: self
4773 .builder
4774 .property("media-playback-allows-inline", media_playback_allows_inline),
4775 }
4776 }
4777
4778 pub fn media_playback_requires_user_gesture(
4784 self,
4785 media_playback_requires_user_gesture: bool,
4786 ) -> Self {
4787 Self {
4788 builder: self.builder.property(
4789 "media-playback-requires-user-gesture",
4790 media_playback_requires_user_gesture,
4791 ),
4792 }
4793 }
4794
4795 pub fn minimum_font_size(self, minimum_font_size: u32) -> Self {
4799 Self {
4800 builder: self
4801 .builder
4802 .property("minimum-font-size", minimum_font_size),
4803 }
4804 }
4805
4806 pub fn monospace_font_family(self, monospace_font_family: impl Into<glib::GString>) -> Self {
4808 Self {
4809 builder: self
4810 .builder
4811 .property("monospace-font-family", monospace_font_family.into()),
4812 }
4813 }
4814
4815 pub fn pictograph_font_family(self, pictograph_font_family: impl Into<glib::GString>) -> Self {
4817 Self {
4818 builder: self
4819 .builder
4820 .property("pictograph-font-family", pictograph_font_family.into()),
4821 }
4822 }
4823
4824 pub fn print_backgrounds(self, print_backgrounds: bool) -> Self {
4826 Self {
4827 builder: self
4828 .builder
4829 .property("print-backgrounds", print_backgrounds),
4830 }
4831 }
4832
4833 pub fn sans_serif_font_family(self, sans_serif_font_family: impl Into<glib::GString>) -> Self {
4835 Self {
4836 builder: self
4837 .builder
4838 .property("sans-serif-font-family", sans_serif_font_family.into()),
4839 }
4840 }
4841
4842 pub fn serif_font_family(self, serif_font_family: impl Into<glib::GString>) -> Self {
4844 Self {
4845 builder: self
4846 .builder
4847 .property("serif-font-family", serif_font_family.into()),
4848 }
4849 }
4850
4851 pub fn user_agent(self, user_agent: impl Into<glib::GString>) -> Self {
4860 Self {
4861 builder: self.builder.property("user-agent", user_agent.into()),
4862 }
4863 }
4864
4865 #[cfg(feature = "v2_48")]
4873 #[cfg_attr(docsrs, doc(cfg(feature = "v2_48")))]
4874 pub fn webrtc_udp_ports_range(self, webrtc_udp_ports_range: impl Into<glib::GString>) -> Self {
4875 Self {
4876 builder: self
4877 .builder
4878 .property("webrtc-udp-ports-range", webrtc_udp_ports_range.into()),
4879 }
4880 }
4881
4882 pub fn zoom_text_only(self, zoom_text_only: bool) -> Self {
4887 Self {
4888 builder: self.builder.property("zoom-text-only", zoom_text_only),
4889 }
4890 }
4891
4892 #[must_use = "Building the object from the builder is usually expensive and is not expected to have side effects"]
4895 pub fn build(self) -> Settings {
4896 assert_initialized_main_thread!();
4897 self.builder.build()
4898 }
4899}