1#[cfg(feature = "v4_16")]
6#[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))]
7use crate::FontRendering;
8#[cfg(feature = "v4_22")]
9#[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))]
10use crate::ReducedMotion;
11#[cfg(feature = "v4_20")]
12#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))]
13use crate::{InterfaceColorScheme, InterfaceContrast};
14use crate::{StyleProvider, ffi};
15use glib::{
16 prelude::*,
17 signal::{SignalHandlerId, connect_raw},
18 translate::*,
19};
20use std::boxed::Box as Box_;
21
22glib::wrapper! {
23 #[doc(alias = "GtkSettings")]
24 pub struct Settings(Object<ffi::GtkSettings>) @implements StyleProvider;
25
26 match fn {
27 type_ => || ffi::gtk_settings_get_type(),
28 }
29}
30
31impl Settings {
32 pub fn builder() -> SettingsBuilder {
37 SettingsBuilder::new()
38 }
39
40 #[doc(alias = "gtk_settings_reset_property")]
41 pub fn reset_property(&self, name: &str) {
42 unsafe {
43 ffi::gtk_settings_reset_property(self.to_glib_none().0, name.to_glib_none().0);
44 }
45 }
46
47 #[doc(alias = "gtk-alternative-button-order")]
48 pub fn is_gtk_alternative_button_order(&self) -> bool {
49 ObjectExt::property(self, "gtk-alternative-button-order")
50 }
51
52 #[doc(alias = "gtk-alternative-button-order")]
53 pub fn set_gtk_alternative_button_order(&self, gtk_alternative_button_order: bool) {
54 ObjectExt::set_property(
55 self,
56 "gtk-alternative-button-order",
57 gtk_alternative_button_order,
58 )
59 }
60
61 #[doc(alias = "gtk-alternative-sort-arrows")]
62 pub fn is_gtk_alternative_sort_arrows(&self) -> bool {
63 ObjectExt::property(self, "gtk-alternative-sort-arrows")
64 }
65
66 #[doc(alias = "gtk-alternative-sort-arrows")]
67 pub fn set_gtk_alternative_sort_arrows(&self, gtk_alternative_sort_arrows: bool) {
68 ObjectExt::set_property(
69 self,
70 "gtk-alternative-sort-arrows",
71 gtk_alternative_sort_arrows,
72 )
73 }
74
75 #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")]
76 #[doc(alias = "gtk-application-prefer-dark-theme")]
77 pub fn is_gtk_application_prefer_dark_theme(&self) -> bool {
78 ObjectExt::property(self, "gtk-application-prefer-dark-theme")
79 }
80
81 #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")]
82 #[doc(alias = "gtk-application-prefer-dark-theme")]
83 pub fn set_gtk_application_prefer_dark_theme(&self, gtk_application_prefer_dark_theme: bool) {
84 ObjectExt::set_property(
85 self,
86 "gtk-application-prefer-dark-theme",
87 gtk_application_prefer_dark_theme,
88 )
89 }
90
91 #[doc(alias = "gtk-cursor-aspect-ratio")]
92 pub fn gtk_cursor_aspect_ratio(&self) -> f64 {
93 ObjectExt::property(self, "gtk-cursor-aspect-ratio")
94 }
95
96 #[doc(alias = "gtk-cursor-aspect-ratio")]
97 pub fn set_gtk_cursor_aspect_ratio(&self, gtk_cursor_aspect_ratio: f64) {
98 ObjectExt::set_property(self, "gtk-cursor-aspect-ratio", gtk_cursor_aspect_ratio)
99 }
100
101 #[doc(alias = "gtk-cursor-blink")]
102 pub fn is_gtk_cursor_blink(&self) -> bool {
103 ObjectExt::property(self, "gtk-cursor-blink")
104 }
105
106 #[doc(alias = "gtk-cursor-blink")]
107 pub fn set_gtk_cursor_blink(&self, gtk_cursor_blink: bool) {
108 ObjectExt::set_property(self, "gtk-cursor-blink", gtk_cursor_blink)
109 }
110
111 #[doc(alias = "gtk-cursor-blink-time")]
112 pub fn gtk_cursor_blink_time(&self) -> i32 {
113 ObjectExt::property(self, "gtk-cursor-blink-time")
114 }
115
116 #[doc(alias = "gtk-cursor-blink-time")]
117 pub fn set_gtk_cursor_blink_time(&self, gtk_cursor_blink_time: i32) {
118 ObjectExt::set_property(self, "gtk-cursor-blink-time", gtk_cursor_blink_time)
119 }
120
121 #[doc(alias = "gtk-cursor-blink-timeout")]
122 pub fn gtk_cursor_blink_timeout(&self) -> i32 {
123 ObjectExt::property(self, "gtk-cursor-blink-timeout")
124 }
125
126 #[doc(alias = "gtk-cursor-blink-timeout")]
127 pub fn set_gtk_cursor_blink_timeout(&self, gtk_cursor_blink_timeout: i32) {
128 ObjectExt::set_property(self, "gtk-cursor-blink-timeout", gtk_cursor_blink_timeout)
129 }
130
131 #[doc(alias = "gtk-cursor-theme-name")]
132 pub fn gtk_cursor_theme_name(&self) -> Option<glib::GString> {
133 ObjectExt::property(self, "gtk-cursor-theme-name")
134 }
135
136 #[doc(alias = "gtk-cursor-theme-name")]
137 pub fn set_gtk_cursor_theme_name(&self, gtk_cursor_theme_name: Option<&str>) {
138 ObjectExt::set_property(self, "gtk-cursor-theme-name", gtk_cursor_theme_name)
139 }
140
141 #[doc(alias = "gtk-cursor-theme-size")]
142 pub fn gtk_cursor_theme_size(&self) -> i32 {
143 ObjectExt::property(self, "gtk-cursor-theme-size")
144 }
145
146 #[doc(alias = "gtk-cursor-theme-size")]
147 pub fn set_gtk_cursor_theme_size(&self, gtk_cursor_theme_size: i32) {
148 ObjectExt::set_property(self, "gtk-cursor-theme-size", gtk_cursor_theme_size)
149 }
150
151 #[doc(alias = "gtk-decoration-layout")]
152 pub fn gtk_decoration_layout(&self) -> Option<glib::GString> {
153 ObjectExt::property(self, "gtk-decoration-layout")
154 }
155
156 #[doc(alias = "gtk-decoration-layout")]
157 pub fn set_gtk_decoration_layout(&self, gtk_decoration_layout: Option<&str>) {
158 ObjectExt::set_property(self, "gtk-decoration-layout", gtk_decoration_layout)
159 }
160
161 #[doc(alias = "gtk-dialogs-use-header")]
162 pub fn is_gtk_dialogs_use_header(&self) -> bool {
163 ObjectExt::property(self, "gtk-dialogs-use-header")
164 }
165
166 #[doc(alias = "gtk-dialogs-use-header")]
167 pub fn set_gtk_dialogs_use_header(&self, gtk_dialogs_use_header: bool) {
168 ObjectExt::set_property(self, "gtk-dialogs-use-header", gtk_dialogs_use_header)
169 }
170
171 #[doc(alias = "gtk-dnd-drag-threshold")]
172 pub fn gtk_dnd_drag_threshold(&self) -> i32 {
173 ObjectExt::property(self, "gtk-dnd-drag-threshold")
174 }
175
176 #[doc(alias = "gtk-dnd-drag-threshold")]
177 pub fn set_gtk_dnd_drag_threshold(&self, gtk_dnd_drag_threshold: i32) {
178 ObjectExt::set_property(self, "gtk-dnd-drag-threshold", gtk_dnd_drag_threshold)
179 }
180
181 #[doc(alias = "gtk-double-click-distance")]
182 pub fn gtk_double_click_distance(&self) -> i32 {
183 ObjectExt::property(self, "gtk-double-click-distance")
184 }
185
186 #[doc(alias = "gtk-double-click-distance")]
187 pub fn set_gtk_double_click_distance(&self, gtk_double_click_distance: i32) {
188 ObjectExt::set_property(self, "gtk-double-click-distance", gtk_double_click_distance)
189 }
190
191 #[doc(alias = "gtk-double-click-time")]
192 pub fn gtk_double_click_time(&self) -> i32 {
193 ObjectExt::property(self, "gtk-double-click-time")
194 }
195
196 #[doc(alias = "gtk-double-click-time")]
197 pub fn set_gtk_double_click_time(&self, gtk_double_click_time: i32) {
198 ObjectExt::set_property(self, "gtk-double-click-time", gtk_double_click_time)
199 }
200
201 #[doc(alias = "gtk-enable-accels")]
202 pub fn is_gtk_enable_accels(&self) -> bool {
203 ObjectExt::property(self, "gtk-enable-accels")
204 }
205
206 #[doc(alias = "gtk-enable-accels")]
207 pub fn set_gtk_enable_accels(&self, gtk_enable_accels: bool) {
208 ObjectExt::set_property(self, "gtk-enable-accels", gtk_enable_accels)
209 }
210
211 #[doc(alias = "gtk-enable-animations")]
212 pub fn is_gtk_enable_animations(&self) -> bool {
213 ObjectExt::property(self, "gtk-enable-animations")
214 }
215
216 #[doc(alias = "gtk-enable-animations")]
217 pub fn set_gtk_enable_animations(&self, gtk_enable_animations: bool) {
218 ObjectExt::set_property(self, "gtk-enable-animations", gtk_enable_animations)
219 }
220
221 #[doc(alias = "gtk-enable-event-sounds")]
222 pub fn is_gtk_enable_event_sounds(&self) -> bool {
223 ObjectExt::property(self, "gtk-enable-event-sounds")
224 }
225
226 #[doc(alias = "gtk-enable-event-sounds")]
227 pub fn set_gtk_enable_event_sounds(&self, gtk_enable_event_sounds: bool) {
228 ObjectExt::set_property(self, "gtk-enable-event-sounds", gtk_enable_event_sounds)
229 }
230
231 #[doc(alias = "gtk-enable-input-feedback-sounds")]
232 pub fn is_gtk_enable_input_feedback_sounds(&self) -> bool {
233 ObjectExt::property(self, "gtk-enable-input-feedback-sounds")
234 }
235
236 #[doc(alias = "gtk-enable-input-feedback-sounds")]
237 pub fn set_gtk_enable_input_feedback_sounds(&self, gtk_enable_input_feedback_sounds: bool) {
238 ObjectExt::set_property(
239 self,
240 "gtk-enable-input-feedback-sounds",
241 gtk_enable_input_feedback_sounds,
242 )
243 }
244
245 #[doc(alias = "gtk-enable-primary-paste")]
246 pub fn is_gtk_enable_primary_paste(&self) -> bool {
247 ObjectExt::property(self, "gtk-enable-primary-paste")
248 }
249
250 #[doc(alias = "gtk-enable-primary-paste")]
251 pub fn set_gtk_enable_primary_paste(&self, gtk_enable_primary_paste: bool) {
252 ObjectExt::set_property(self, "gtk-enable-primary-paste", gtk_enable_primary_paste)
253 }
254
255 #[doc(alias = "gtk-entry-password-hint-timeout")]
256 pub fn gtk_entry_password_hint_timeout(&self) -> u32 {
257 ObjectExt::property(self, "gtk-entry-password-hint-timeout")
258 }
259
260 #[doc(alias = "gtk-entry-password-hint-timeout")]
261 pub fn set_gtk_entry_password_hint_timeout(&self, gtk_entry_password_hint_timeout: u32) {
262 ObjectExt::set_property(
263 self,
264 "gtk-entry-password-hint-timeout",
265 gtk_entry_password_hint_timeout,
266 )
267 }
268
269 #[doc(alias = "gtk-entry-select-on-focus")]
270 pub fn is_gtk_entry_select_on_focus(&self) -> bool {
271 ObjectExt::property(self, "gtk-entry-select-on-focus")
272 }
273
274 #[doc(alias = "gtk-entry-select-on-focus")]
275 pub fn set_gtk_entry_select_on_focus(&self, gtk_entry_select_on_focus: bool) {
276 ObjectExt::set_property(self, "gtk-entry-select-on-focus", gtk_entry_select_on_focus)
277 }
278
279 #[doc(alias = "gtk-error-bell")]
280 pub fn is_gtk_error_bell(&self) -> bool {
281 ObjectExt::property(self, "gtk-error-bell")
282 }
283
284 #[doc(alias = "gtk-error-bell")]
285 pub fn set_gtk_error_bell(&self, gtk_error_bell: bool) {
286 ObjectExt::set_property(self, "gtk-error-bell", gtk_error_bell)
287 }
288
289 #[doc(alias = "gtk-font-name")]
290 pub fn gtk_font_name(&self) -> Option<glib::GString> {
291 ObjectExt::property(self, "gtk-font-name")
292 }
293
294 #[doc(alias = "gtk-font-name")]
295 pub fn set_gtk_font_name(&self, gtk_font_name: Option<&str>) {
296 ObjectExt::set_property(self, "gtk-font-name", gtk_font_name)
297 }
298
299 #[cfg(feature = "v4_16")]
300 #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))]
301 #[doc(alias = "gtk-font-rendering")]
302 pub fn gtk_font_rendering(&self) -> FontRendering {
303 ObjectExt::property(self, "gtk-font-rendering")
304 }
305
306 #[cfg(feature = "v4_16")]
307 #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))]
308 #[doc(alias = "gtk-font-rendering")]
309 pub fn set_gtk_font_rendering(&self, gtk_font_rendering: FontRendering) {
310 ObjectExt::set_property(self, "gtk-font-rendering", gtk_font_rendering)
311 }
312
313 #[doc(alias = "gtk-fontconfig-timestamp")]
314 pub fn gtk_fontconfig_timestamp(&self) -> u32 {
315 ObjectExt::property(self, "gtk-fontconfig-timestamp")
316 }
317
318 #[doc(alias = "gtk-fontconfig-timestamp")]
319 pub fn set_gtk_fontconfig_timestamp(&self, gtk_fontconfig_timestamp: u32) {
320 ObjectExt::set_property(self, "gtk-fontconfig-timestamp", gtk_fontconfig_timestamp)
321 }
322
323 #[cfg(feature = "v4_6")]
324 #[cfg_attr(docsrs, doc(cfg(feature = "v4_6")))]
325 #[doc(alias = "gtk-hint-font-metrics")]
326 pub fn is_gtk_hint_font_metrics(&self) -> bool {
327 ObjectExt::property(self, "gtk-hint-font-metrics")
328 }
329
330 #[cfg(feature = "v4_6")]
331 #[cfg_attr(docsrs, doc(cfg(feature = "v4_6")))]
332 #[doc(alias = "gtk-hint-font-metrics")]
333 pub fn set_gtk_hint_font_metrics(&self, gtk_hint_font_metrics: bool) {
334 ObjectExt::set_property(self, "gtk-hint-font-metrics", gtk_hint_font_metrics)
335 }
336
337 #[doc(alias = "gtk-icon-theme-name")]
338 pub fn gtk_icon_theme_name(&self) -> Option<glib::GString> {
339 ObjectExt::property(self, "gtk-icon-theme-name")
340 }
341
342 #[doc(alias = "gtk-icon-theme-name")]
343 pub fn set_gtk_icon_theme_name(&self, gtk_icon_theme_name: Option<&str>) {
344 ObjectExt::set_property(self, "gtk-icon-theme-name", gtk_icon_theme_name)
345 }
346
347 #[doc(alias = "gtk-im-module")]
348 pub fn gtk_im_module(&self) -> Option<glib::GString> {
349 ObjectExt::property(self, "gtk-im-module")
350 }
351
352 #[doc(alias = "gtk-im-module")]
353 pub fn set_gtk_im_module(&self, gtk_im_module: Option<&str>) {
354 ObjectExt::set_property(self, "gtk-im-module", gtk_im_module)
355 }
356
357 #[cfg(feature = "v4_20")]
358 #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))]
359 #[doc(alias = "gtk-interface-color-scheme")]
360 pub fn gtk_interface_color_scheme(&self) -> InterfaceColorScheme {
361 ObjectExt::property(self, "gtk-interface-color-scheme")
362 }
363
364 #[cfg(feature = "v4_20")]
365 #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))]
366 #[doc(alias = "gtk-interface-color-scheme")]
367 pub fn set_gtk_interface_color_scheme(&self, gtk_interface_color_scheme: InterfaceColorScheme) {
368 ObjectExt::set_property(
369 self,
370 "gtk-interface-color-scheme",
371 gtk_interface_color_scheme,
372 )
373 }
374
375 #[cfg(feature = "v4_20")]
376 #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))]
377 #[doc(alias = "gtk-interface-contrast")]
378 pub fn gtk_interface_contrast(&self) -> InterfaceContrast {
379 ObjectExt::property(self, "gtk-interface-contrast")
380 }
381
382 #[cfg(feature = "v4_20")]
383 #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))]
384 #[doc(alias = "gtk-interface-contrast")]
385 pub fn set_gtk_interface_contrast(&self, gtk_interface_contrast: InterfaceContrast) {
386 ObjectExt::set_property(self, "gtk-interface-contrast", gtk_interface_contrast)
387 }
388
389 #[cfg(feature = "v4_22")]
390 #[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))]
391 #[doc(alias = "gtk-interface-reduced-motion")]
392 pub fn gtk_interface_reduced_motion(&self) -> ReducedMotion {
393 ObjectExt::property(self, "gtk-interface-reduced-motion")
394 }
395
396 #[cfg(feature = "v4_22")]
397 #[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))]
398 #[doc(alias = "gtk-interface-reduced-motion")]
399 pub fn set_gtk_interface_reduced_motion(&self, gtk_interface_reduced_motion: ReducedMotion) {
400 ObjectExt::set_property(
401 self,
402 "gtk-interface-reduced-motion",
403 gtk_interface_reduced_motion,
404 )
405 }
406
407 #[doc(alias = "gtk-keynav-use-caret")]
408 pub fn is_gtk_keynav_use_caret(&self) -> bool {
409 ObjectExt::property(self, "gtk-keynav-use-caret")
410 }
411
412 #[doc(alias = "gtk-keynav-use-caret")]
413 pub fn set_gtk_keynav_use_caret(&self, gtk_keynav_use_caret: bool) {
414 ObjectExt::set_property(self, "gtk-keynav-use-caret", gtk_keynav_use_caret)
415 }
416
417 #[doc(alias = "gtk-label-select-on-focus")]
418 pub fn is_gtk_label_select_on_focus(&self) -> bool {
419 ObjectExt::property(self, "gtk-label-select-on-focus")
420 }
421
422 #[doc(alias = "gtk-label-select-on-focus")]
423 pub fn set_gtk_label_select_on_focus(&self, gtk_label_select_on_focus: bool) {
424 ObjectExt::set_property(self, "gtk-label-select-on-focus", gtk_label_select_on_focus)
425 }
426
427 #[doc(alias = "gtk-long-press-time")]
428 pub fn gtk_long_press_time(&self) -> u32 {
429 ObjectExt::property(self, "gtk-long-press-time")
430 }
431
432 #[doc(alias = "gtk-long-press-time")]
433 pub fn set_gtk_long_press_time(&self, gtk_long_press_time: u32) {
434 ObjectExt::set_property(self, "gtk-long-press-time", gtk_long_press_time)
435 }
436
437 #[doc(alias = "gtk-overlay-scrolling")]
438 pub fn is_gtk_overlay_scrolling(&self) -> bool {
439 ObjectExt::property(self, "gtk-overlay-scrolling")
440 }
441
442 #[doc(alias = "gtk-overlay-scrolling")]
443 pub fn set_gtk_overlay_scrolling(&self, gtk_overlay_scrolling: bool) {
444 ObjectExt::set_property(self, "gtk-overlay-scrolling", gtk_overlay_scrolling)
445 }
446
447 #[doc(alias = "gtk-primary-button-warps-slider")]
448 pub fn is_gtk_primary_button_warps_slider(&self) -> bool {
449 ObjectExt::property(self, "gtk-primary-button-warps-slider")
450 }
451
452 #[doc(alias = "gtk-primary-button-warps-slider")]
453 pub fn set_gtk_primary_button_warps_slider(&self, gtk_primary_button_warps_slider: bool) {
454 ObjectExt::set_property(
455 self,
456 "gtk-primary-button-warps-slider",
457 gtk_primary_button_warps_slider,
458 )
459 }
460
461 #[doc(alias = "gtk-print-backends")]
462 pub fn gtk_print_backends(&self) -> Option<glib::GString> {
463 ObjectExt::property(self, "gtk-print-backends")
464 }
465
466 #[doc(alias = "gtk-print-backends")]
467 pub fn set_gtk_print_backends(&self, gtk_print_backends: Option<&str>) {
468 ObjectExt::set_property(self, "gtk-print-backends", gtk_print_backends)
469 }
470
471 #[doc(alias = "gtk-print-preview-command")]
472 pub fn gtk_print_preview_command(&self) -> Option<glib::GString> {
473 ObjectExt::property(self, "gtk-print-preview-command")
474 }
475
476 #[doc(alias = "gtk-print-preview-command")]
477 pub fn set_gtk_print_preview_command(&self, gtk_print_preview_command: Option<&str>) {
478 ObjectExt::set_property(self, "gtk-print-preview-command", gtk_print_preview_command)
479 }
480
481 #[doc(alias = "gtk-recent-files-enabled")]
482 pub fn is_gtk_recent_files_enabled(&self) -> bool {
483 ObjectExt::property(self, "gtk-recent-files-enabled")
484 }
485
486 #[doc(alias = "gtk-recent-files-enabled")]
487 pub fn set_gtk_recent_files_enabled(&self, gtk_recent_files_enabled: bool) {
488 ObjectExt::set_property(self, "gtk-recent-files-enabled", gtk_recent_files_enabled)
489 }
490
491 #[doc(alias = "gtk-recent-files-max-age")]
492 pub fn gtk_recent_files_max_age(&self) -> i32 {
493 ObjectExt::property(self, "gtk-recent-files-max-age")
494 }
495
496 #[doc(alias = "gtk-recent-files-max-age")]
497 pub fn set_gtk_recent_files_max_age(&self, gtk_recent_files_max_age: i32) {
498 ObjectExt::set_property(self, "gtk-recent-files-max-age", gtk_recent_files_max_age)
499 }
500
501 #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")]
502 #[doc(alias = "gtk-shell-shows-app-menu")]
503 pub fn is_gtk_shell_shows_app_menu(&self) -> bool {
504 ObjectExt::property(self, "gtk-shell-shows-app-menu")
505 }
506
507 #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")]
508 #[doc(alias = "gtk-shell-shows-app-menu")]
509 pub fn set_gtk_shell_shows_app_menu(&self, gtk_shell_shows_app_menu: bool) {
510 ObjectExt::set_property(self, "gtk-shell-shows-app-menu", gtk_shell_shows_app_menu)
511 }
512
513 #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")]
514 #[doc(alias = "gtk-shell-shows-desktop")]
515 pub fn is_gtk_shell_shows_desktop(&self) -> bool {
516 ObjectExt::property(self, "gtk-shell-shows-desktop")
517 }
518
519 #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")]
520 #[doc(alias = "gtk-shell-shows-desktop")]
521 pub fn set_gtk_shell_shows_desktop(&self, gtk_shell_shows_desktop: bool) {
522 ObjectExt::set_property(self, "gtk-shell-shows-desktop", gtk_shell_shows_desktop)
523 }
524
525 #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")]
526 #[doc(alias = "gtk-shell-shows-menubar")]
527 pub fn is_gtk_shell_shows_menubar(&self) -> bool {
528 ObjectExt::property(self, "gtk-shell-shows-menubar")
529 }
530
531 #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")]
532 #[doc(alias = "gtk-shell-shows-menubar")]
533 pub fn set_gtk_shell_shows_menubar(&self, gtk_shell_shows_menubar: bool) {
534 ObjectExt::set_property(self, "gtk-shell-shows-menubar", gtk_shell_shows_menubar)
535 }
536
537 #[cfg(feature = "v4_14")]
538 #[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
539 #[doc(alias = "gtk-show-status-shapes")]
540 pub fn is_gtk_show_status_shapes(&self) -> bool {
541 ObjectExt::property(self, "gtk-show-status-shapes")
542 }
543
544 #[cfg(feature = "v4_14")]
545 #[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
546 #[doc(alias = "gtk-show-status-shapes")]
547 pub fn set_gtk_show_status_shapes(&self, gtk_show_status_shapes: bool) {
548 ObjectExt::set_property(self, "gtk-show-status-shapes", gtk_show_status_shapes)
549 }
550
551 #[doc(alias = "gtk-sound-theme-name")]
552 pub fn gtk_sound_theme_name(&self) -> Option<glib::GString> {
553 ObjectExt::property(self, "gtk-sound-theme-name")
554 }
555
556 #[doc(alias = "gtk-sound-theme-name")]
557 pub fn set_gtk_sound_theme_name(&self, gtk_sound_theme_name: Option<&str>) {
558 ObjectExt::set_property(self, "gtk-sound-theme-name", gtk_sound_theme_name)
559 }
560
561 #[doc(alias = "gtk-split-cursor")]
562 pub fn is_gtk_split_cursor(&self) -> bool {
563 ObjectExt::property(self, "gtk-split-cursor")
564 }
565
566 #[doc(alias = "gtk-split-cursor")]
567 pub fn set_gtk_split_cursor(&self, gtk_split_cursor: bool) {
568 ObjectExt::set_property(self, "gtk-split-cursor", gtk_split_cursor)
569 }
570
571 #[doc(alias = "gtk-theme-name")]
572 pub fn gtk_theme_name(&self) -> Option<glib::GString> {
573 ObjectExt::property(self, "gtk-theme-name")
574 }
575
576 #[doc(alias = "gtk-theme-name")]
577 pub fn set_gtk_theme_name(&self, gtk_theme_name: Option<&str>) {
578 ObjectExt::set_property(self, "gtk-theme-name", gtk_theme_name)
579 }
580
581 #[doc(alias = "gtk-titlebar-double-click")]
582 pub fn gtk_titlebar_double_click(&self) -> Option<glib::GString> {
583 ObjectExt::property(self, "gtk-titlebar-double-click")
584 }
585
586 #[doc(alias = "gtk-titlebar-double-click")]
587 pub fn set_gtk_titlebar_double_click(&self, gtk_titlebar_double_click: Option<&str>) {
588 ObjectExt::set_property(self, "gtk-titlebar-double-click", gtk_titlebar_double_click)
589 }
590
591 #[doc(alias = "gtk-titlebar-middle-click")]
592 pub fn gtk_titlebar_middle_click(&self) -> Option<glib::GString> {
593 ObjectExt::property(self, "gtk-titlebar-middle-click")
594 }
595
596 #[doc(alias = "gtk-titlebar-middle-click")]
597 pub fn set_gtk_titlebar_middle_click(&self, gtk_titlebar_middle_click: Option<&str>) {
598 ObjectExt::set_property(self, "gtk-titlebar-middle-click", gtk_titlebar_middle_click)
599 }
600
601 #[doc(alias = "gtk-titlebar-right-click")]
602 pub fn gtk_titlebar_right_click(&self) -> Option<glib::GString> {
603 ObjectExt::property(self, "gtk-titlebar-right-click")
604 }
605
606 #[doc(alias = "gtk-titlebar-right-click")]
607 pub fn set_gtk_titlebar_right_click(&self, gtk_titlebar_right_click: Option<&str>) {
608 ObjectExt::set_property(self, "gtk-titlebar-right-click", gtk_titlebar_right_click)
609 }
610
611 #[doc(alias = "gtk-xft-antialias")]
612 pub fn gtk_xft_antialias(&self) -> i32 {
613 ObjectExt::property(self, "gtk-xft-antialias")
614 }
615
616 #[doc(alias = "gtk-xft-antialias")]
617 pub fn set_gtk_xft_antialias(&self, gtk_xft_antialias: i32) {
618 ObjectExt::set_property(self, "gtk-xft-antialias", gtk_xft_antialias)
619 }
620
621 #[doc(alias = "gtk-xft-dpi")]
622 pub fn gtk_xft_dpi(&self) -> i32 {
623 ObjectExt::property(self, "gtk-xft-dpi")
624 }
625
626 #[doc(alias = "gtk-xft-dpi")]
627 pub fn set_gtk_xft_dpi(&self, gtk_xft_dpi: i32) {
628 ObjectExt::set_property(self, "gtk-xft-dpi", gtk_xft_dpi)
629 }
630
631 #[doc(alias = "gtk-xft-hinting")]
632 pub fn gtk_xft_hinting(&self) -> i32 {
633 ObjectExt::property(self, "gtk-xft-hinting")
634 }
635
636 #[doc(alias = "gtk-xft-hinting")]
637 pub fn set_gtk_xft_hinting(&self, gtk_xft_hinting: i32) {
638 ObjectExt::set_property(self, "gtk-xft-hinting", gtk_xft_hinting)
639 }
640
641 #[doc(alias = "gtk-xft-hintstyle")]
642 pub fn gtk_xft_hintstyle(&self) -> Option<glib::GString> {
643 ObjectExt::property(self, "gtk-xft-hintstyle")
644 }
645
646 #[doc(alias = "gtk-xft-hintstyle")]
647 pub fn set_gtk_xft_hintstyle(&self, gtk_xft_hintstyle: Option<&str>) {
648 ObjectExt::set_property(self, "gtk-xft-hintstyle", gtk_xft_hintstyle)
649 }
650
651 #[doc(alias = "gtk-xft-rgba")]
652 pub fn gtk_xft_rgba(&self) -> Option<glib::GString> {
653 ObjectExt::property(self, "gtk-xft-rgba")
654 }
655
656 #[doc(alias = "gtk-xft-rgba")]
657 pub fn set_gtk_xft_rgba(&self, gtk_xft_rgba: Option<&str>) {
658 ObjectExt::set_property(self, "gtk-xft-rgba", gtk_xft_rgba)
659 }
660
661 #[doc(alias = "gtk_settings_get_default")]
662 #[doc(alias = "get_default")]
663 #[allow(clippy::should_implement_trait)]
664 pub fn default() -> Option<Settings> {
665 assert_initialized_main_thread!();
666 unsafe { from_glib_none(ffi::gtk_settings_get_default()) }
667 }
668
669 #[doc(alias = "gtk_settings_get_for_display")]
670 #[doc(alias = "get_for_display")]
671 pub fn for_display(display: &impl IsA<gdk::Display>) -> Settings {
672 assert_initialized_main_thread!();
673 unsafe {
674 from_glib_none(ffi::gtk_settings_get_for_display(
675 display.as_ref().to_glib_none().0,
676 ))
677 }
678 }
679
680 #[doc(alias = "gtk-alternative-button-order")]
681 pub fn connect_gtk_alternative_button_order_notify<F: Fn(&Self) + 'static>(
682 &self,
683 f: F,
684 ) -> SignalHandlerId {
685 unsafe extern "C" fn notify_gtk_alternative_button_order_trampoline<
686 F: Fn(&Settings) + 'static,
687 >(
688 this: *mut ffi::GtkSettings,
689 _param_spec: glib::ffi::gpointer,
690 f: glib::ffi::gpointer,
691 ) {
692 unsafe {
693 let f: &F = &*(f as *const F);
694 f(&from_glib_borrow(this))
695 }
696 }
697 unsafe {
698 let f: Box_<F> = Box_::new(f);
699 connect_raw(
700 self.as_ptr() as *mut _,
701 c"notify::gtk-alternative-button-order".as_ptr() as *const _,
702 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
703 notify_gtk_alternative_button_order_trampoline::<F> as *const (),
704 )),
705 Box_::into_raw(f),
706 )
707 }
708 }
709
710 #[doc(alias = "gtk-alternative-sort-arrows")]
711 pub fn connect_gtk_alternative_sort_arrows_notify<F: Fn(&Self) + 'static>(
712 &self,
713 f: F,
714 ) -> SignalHandlerId {
715 unsafe extern "C" fn notify_gtk_alternative_sort_arrows_trampoline<
716 F: Fn(&Settings) + 'static,
717 >(
718 this: *mut ffi::GtkSettings,
719 _param_spec: glib::ffi::gpointer,
720 f: glib::ffi::gpointer,
721 ) {
722 unsafe {
723 let f: &F = &*(f as *const F);
724 f(&from_glib_borrow(this))
725 }
726 }
727 unsafe {
728 let f: Box_<F> = Box_::new(f);
729 connect_raw(
730 self.as_ptr() as *mut _,
731 c"notify::gtk-alternative-sort-arrows".as_ptr() as *const _,
732 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
733 notify_gtk_alternative_sort_arrows_trampoline::<F> as *const (),
734 )),
735 Box_::into_raw(f),
736 )
737 }
738 }
739
740 #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")]
741 #[doc(alias = "gtk-application-prefer-dark-theme")]
742 pub fn connect_gtk_application_prefer_dark_theme_notify<F: Fn(&Self) + 'static>(
743 &self,
744 f: F,
745 ) -> SignalHandlerId {
746 unsafe extern "C" fn notify_gtk_application_prefer_dark_theme_trampoline<
747 F: Fn(&Settings) + 'static,
748 >(
749 this: *mut ffi::GtkSettings,
750 _param_spec: glib::ffi::gpointer,
751 f: glib::ffi::gpointer,
752 ) {
753 unsafe {
754 let f: &F = &*(f as *const F);
755 f(&from_glib_borrow(this))
756 }
757 }
758 unsafe {
759 let f: Box_<F> = Box_::new(f);
760 connect_raw(
761 self.as_ptr() as *mut _,
762 c"notify::gtk-application-prefer-dark-theme".as_ptr() as *const _,
763 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
764 notify_gtk_application_prefer_dark_theme_trampoline::<F> as *const (),
765 )),
766 Box_::into_raw(f),
767 )
768 }
769 }
770
771 #[doc(alias = "gtk-cursor-aspect-ratio")]
772 pub fn connect_gtk_cursor_aspect_ratio_notify<F: Fn(&Self) + 'static>(
773 &self,
774 f: F,
775 ) -> SignalHandlerId {
776 unsafe extern "C" fn notify_gtk_cursor_aspect_ratio_trampoline<
777 F: Fn(&Settings) + 'static,
778 >(
779 this: *mut ffi::GtkSettings,
780 _param_spec: glib::ffi::gpointer,
781 f: glib::ffi::gpointer,
782 ) {
783 unsafe {
784 let f: &F = &*(f as *const F);
785 f(&from_glib_borrow(this))
786 }
787 }
788 unsafe {
789 let f: Box_<F> = Box_::new(f);
790 connect_raw(
791 self.as_ptr() as *mut _,
792 c"notify::gtk-cursor-aspect-ratio".as_ptr() as *const _,
793 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
794 notify_gtk_cursor_aspect_ratio_trampoline::<F> as *const (),
795 )),
796 Box_::into_raw(f),
797 )
798 }
799 }
800
801 #[doc(alias = "gtk-cursor-blink")]
802 pub fn connect_gtk_cursor_blink_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
803 unsafe extern "C" fn notify_gtk_cursor_blink_trampoline<F: Fn(&Settings) + 'static>(
804 this: *mut ffi::GtkSettings,
805 _param_spec: glib::ffi::gpointer,
806 f: glib::ffi::gpointer,
807 ) {
808 unsafe {
809 let f: &F = &*(f as *const F);
810 f(&from_glib_borrow(this))
811 }
812 }
813 unsafe {
814 let f: Box_<F> = Box_::new(f);
815 connect_raw(
816 self.as_ptr() as *mut _,
817 c"notify::gtk-cursor-blink".as_ptr() as *const _,
818 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
819 notify_gtk_cursor_blink_trampoline::<F> as *const (),
820 )),
821 Box_::into_raw(f),
822 )
823 }
824 }
825
826 #[doc(alias = "gtk-cursor-blink-time")]
827 pub fn connect_gtk_cursor_blink_time_notify<F: Fn(&Self) + 'static>(
828 &self,
829 f: F,
830 ) -> SignalHandlerId {
831 unsafe extern "C" fn notify_gtk_cursor_blink_time_trampoline<F: Fn(&Settings) + 'static>(
832 this: *mut ffi::GtkSettings,
833 _param_spec: glib::ffi::gpointer,
834 f: glib::ffi::gpointer,
835 ) {
836 unsafe {
837 let f: &F = &*(f as *const F);
838 f(&from_glib_borrow(this))
839 }
840 }
841 unsafe {
842 let f: Box_<F> = Box_::new(f);
843 connect_raw(
844 self.as_ptr() as *mut _,
845 c"notify::gtk-cursor-blink-time".as_ptr() as *const _,
846 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
847 notify_gtk_cursor_blink_time_trampoline::<F> as *const (),
848 )),
849 Box_::into_raw(f),
850 )
851 }
852 }
853
854 #[doc(alias = "gtk-cursor-blink-timeout")]
855 pub fn connect_gtk_cursor_blink_timeout_notify<F: Fn(&Self) + 'static>(
856 &self,
857 f: F,
858 ) -> SignalHandlerId {
859 unsafe extern "C" fn notify_gtk_cursor_blink_timeout_trampoline<
860 F: Fn(&Settings) + 'static,
861 >(
862 this: *mut ffi::GtkSettings,
863 _param_spec: glib::ffi::gpointer,
864 f: glib::ffi::gpointer,
865 ) {
866 unsafe {
867 let f: &F = &*(f as *const F);
868 f(&from_glib_borrow(this))
869 }
870 }
871 unsafe {
872 let f: Box_<F> = Box_::new(f);
873 connect_raw(
874 self.as_ptr() as *mut _,
875 c"notify::gtk-cursor-blink-timeout".as_ptr() as *const _,
876 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
877 notify_gtk_cursor_blink_timeout_trampoline::<F> as *const (),
878 )),
879 Box_::into_raw(f),
880 )
881 }
882 }
883
884 #[doc(alias = "gtk-cursor-theme-name")]
885 pub fn connect_gtk_cursor_theme_name_notify<F: Fn(&Self) + 'static>(
886 &self,
887 f: F,
888 ) -> SignalHandlerId {
889 unsafe extern "C" fn notify_gtk_cursor_theme_name_trampoline<F: Fn(&Settings) + 'static>(
890 this: *mut ffi::GtkSettings,
891 _param_spec: glib::ffi::gpointer,
892 f: glib::ffi::gpointer,
893 ) {
894 unsafe {
895 let f: &F = &*(f as *const F);
896 f(&from_glib_borrow(this))
897 }
898 }
899 unsafe {
900 let f: Box_<F> = Box_::new(f);
901 connect_raw(
902 self.as_ptr() as *mut _,
903 c"notify::gtk-cursor-theme-name".as_ptr() as *const _,
904 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
905 notify_gtk_cursor_theme_name_trampoline::<F> as *const (),
906 )),
907 Box_::into_raw(f),
908 )
909 }
910 }
911
912 #[doc(alias = "gtk-cursor-theme-size")]
913 pub fn connect_gtk_cursor_theme_size_notify<F: Fn(&Self) + 'static>(
914 &self,
915 f: F,
916 ) -> SignalHandlerId {
917 unsafe extern "C" fn notify_gtk_cursor_theme_size_trampoline<F: Fn(&Settings) + 'static>(
918 this: *mut ffi::GtkSettings,
919 _param_spec: glib::ffi::gpointer,
920 f: glib::ffi::gpointer,
921 ) {
922 unsafe {
923 let f: &F = &*(f as *const F);
924 f(&from_glib_borrow(this))
925 }
926 }
927 unsafe {
928 let f: Box_<F> = Box_::new(f);
929 connect_raw(
930 self.as_ptr() as *mut _,
931 c"notify::gtk-cursor-theme-size".as_ptr() as *const _,
932 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
933 notify_gtk_cursor_theme_size_trampoline::<F> as *const (),
934 )),
935 Box_::into_raw(f),
936 )
937 }
938 }
939
940 #[doc(alias = "gtk-decoration-layout")]
941 pub fn connect_gtk_decoration_layout_notify<F: Fn(&Self) + 'static>(
942 &self,
943 f: F,
944 ) -> SignalHandlerId {
945 unsafe extern "C" fn notify_gtk_decoration_layout_trampoline<F: Fn(&Settings) + 'static>(
946 this: *mut ffi::GtkSettings,
947 _param_spec: glib::ffi::gpointer,
948 f: glib::ffi::gpointer,
949 ) {
950 unsafe {
951 let f: &F = &*(f as *const F);
952 f(&from_glib_borrow(this))
953 }
954 }
955 unsafe {
956 let f: Box_<F> = Box_::new(f);
957 connect_raw(
958 self.as_ptr() as *mut _,
959 c"notify::gtk-decoration-layout".as_ptr() as *const _,
960 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
961 notify_gtk_decoration_layout_trampoline::<F> as *const (),
962 )),
963 Box_::into_raw(f),
964 )
965 }
966 }
967
968 #[doc(alias = "gtk-dialogs-use-header")]
969 pub fn connect_gtk_dialogs_use_header_notify<F: Fn(&Self) + 'static>(
970 &self,
971 f: F,
972 ) -> SignalHandlerId {
973 unsafe extern "C" fn notify_gtk_dialogs_use_header_trampoline<
974 F: Fn(&Settings) + 'static,
975 >(
976 this: *mut ffi::GtkSettings,
977 _param_spec: glib::ffi::gpointer,
978 f: glib::ffi::gpointer,
979 ) {
980 unsafe {
981 let f: &F = &*(f as *const F);
982 f(&from_glib_borrow(this))
983 }
984 }
985 unsafe {
986 let f: Box_<F> = Box_::new(f);
987 connect_raw(
988 self.as_ptr() as *mut _,
989 c"notify::gtk-dialogs-use-header".as_ptr() as *const _,
990 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
991 notify_gtk_dialogs_use_header_trampoline::<F> as *const (),
992 )),
993 Box_::into_raw(f),
994 )
995 }
996 }
997
998 #[doc(alias = "gtk-dnd-drag-threshold")]
999 pub fn connect_gtk_dnd_drag_threshold_notify<F: Fn(&Self) + 'static>(
1000 &self,
1001 f: F,
1002 ) -> SignalHandlerId {
1003 unsafe extern "C" fn notify_gtk_dnd_drag_threshold_trampoline<
1004 F: Fn(&Settings) + 'static,
1005 >(
1006 this: *mut ffi::GtkSettings,
1007 _param_spec: glib::ffi::gpointer,
1008 f: glib::ffi::gpointer,
1009 ) {
1010 unsafe {
1011 let f: &F = &*(f as *const F);
1012 f(&from_glib_borrow(this))
1013 }
1014 }
1015 unsafe {
1016 let f: Box_<F> = Box_::new(f);
1017 connect_raw(
1018 self.as_ptr() as *mut _,
1019 c"notify::gtk-dnd-drag-threshold".as_ptr() as *const _,
1020 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1021 notify_gtk_dnd_drag_threshold_trampoline::<F> as *const (),
1022 )),
1023 Box_::into_raw(f),
1024 )
1025 }
1026 }
1027
1028 #[doc(alias = "gtk-double-click-distance")]
1029 pub fn connect_gtk_double_click_distance_notify<F: Fn(&Self) + 'static>(
1030 &self,
1031 f: F,
1032 ) -> SignalHandlerId {
1033 unsafe extern "C" fn notify_gtk_double_click_distance_trampoline<
1034 F: Fn(&Settings) + 'static,
1035 >(
1036 this: *mut ffi::GtkSettings,
1037 _param_spec: glib::ffi::gpointer,
1038 f: glib::ffi::gpointer,
1039 ) {
1040 unsafe {
1041 let f: &F = &*(f as *const F);
1042 f(&from_glib_borrow(this))
1043 }
1044 }
1045 unsafe {
1046 let f: Box_<F> = Box_::new(f);
1047 connect_raw(
1048 self.as_ptr() as *mut _,
1049 c"notify::gtk-double-click-distance".as_ptr() as *const _,
1050 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1051 notify_gtk_double_click_distance_trampoline::<F> as *const (),
1052 )),
1053 Box_::into_raw(f),
1054 )
1055 }
1056 }
1057
1058 #[doc(alias = "gtk-double-click-time")]
1059 pub fn connect_gtk_double_click_time_notify<F: Fn(&Self) + 'static>(
1060 &self,
1061 f: F,
1062 ) -> SignalHandlerId {
1063 unsafe extern "C" fn notify_gtk_double_click_time_trampoline<F: Fn(&Settings) + 'static>(
1064 this: *mut ffi::GtkSettings,
1065 _param_spec: glib::ffi::gpointer,
1066 f: glib::ffi::gpointer,
1067 ) {
1068 unsafe {
1069 let f: &F = &*(f as *const F);
1070 f(&from_glib_borrow(this))
1071 }
1072 }
1073 unsafe {
1074 let f: Box_<F> = Box_::new(f);
1075 connect_raw(
1076 self.as_ptr() as *mut _,
1077 c"notify::gtk-double-click-time".as_ptr() as *const _,
1078 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1079 notify_gtk_double_click_time_trampoline::<F> as *const (),
1080 )),
1081 Box_::into_raw(f),
1082 )
1083 }
1084 }
1085
1086 #[doc(alias = "gtk-enable-accels")]
1087 pub fn connect_gtk_enable_accels_notify<F: Fn(&Self) + 'static>(
1088 &self,
1089 f: F,
1090 ) -> SignalHandlerId {
1091 unsafe extern "C" fn notify_gtk_enable_accels_trampoline<F: Fn(&Settings) + 'static>(
1092 this: *mut ffi::GtkSettings,
1093 _param_spec: glib::ffi::gpointer,
1094 f: glib::ffi::gpointer,
1095 ) {
1096 unsafe {
1097 let f: &F = &*(f as *const F);
1098 f(&from_glib_borrow(this))
1099 }
1100 }
1101 unsafe {
1102 let f: Box_<F> = Box_::new(f);
1103 connect_raw(
1104 self.as_ptr() as *mut _,
1105 c"notify::gtk-enable-accels".as_ptr() as *const _,
1106 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1107 notify_gtk_enable_accels_trampoline::<F> as *const (),
1108 )),
1109 Box_::into_raw(f),
1110 )
1111 }
1112 }
1113
1114 #[doc(alias = "gtk-enable-animations")]
1115 pub fn connect_gtk_enable_animations_notify<F: Fn(&Self) + 'static>(
1116 &self,
1117 f: F,
1118 ) -> SignalHandlerId {
1119 unsafe extern "C" fn notify_gtk_enable_animations_trampoline<F: Fn(&Settings) + 'static>(
1120 this: *mut ffi::GtkSettings,
1121 _param_spec: glib::ffi::gpointer,
1122 f: glib::ffi::gpointer,
1123 ) {
1124 unsafe {
1125 let f: &F = &*(f as *const F);
1126 f(&from_glib_borrow(this))
1127 }
1128 }
1129 unsafe {
1130 let f: Box_<F> = Box_::new(f);
1131 connect_raw(
1132 self.as_ptr() as *mut _,
1133 c"notify::gtk-enable-animations".as_ptr() as *const _,
1134 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1135 notify_gtk_enable_animations_trampoline::<F> as *const (),
1136 )),
1137 Box_::into_raw(f),
1138 )
1139 }
1140 }
1141
1142 #[doc(alias = "gtk-enable-event-sounds")]
1143 pub fn connect_gtk_enable_event_sounds_notify<F: Fn(&Self) + 'static>(
1144 &self,
1145 f: F,
1146 ) -> SignalHandlerId {
1147 unsafe extern "C" fn notify_gtk_enable_event_sounds_trampoline<
1148 F: Fn(&Settings) + 'static,
1149 >(
1150 this: *mut ffi::GtkSettings,
1151 _param_spec: glib::ffi::gpointer,
1152 f: glib::ffi::gpointer,
1153 ) {
1154 unsafe {
1155 let f: &F = &*(f as *const F);
1156 f(&from_glib_borrow(this))
1157 }
1158 }
1159 unsafe {
1160 let f: Box_<F> = Box_::new(f);
1161 connect_raw(
1162 self.as_ptr() as *mut _,
1163 c"notify::gtk-enable-event-sounds".as_ptr() as *const _,
1164 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1165 notify_gtk_enable_event_sounds_trampoline::<F> as *const (),
1166 )),
1167 Box_::into_raw(f),
1168 )
1169 }
1170 }
1171
1172 #[doc(alias = "gtk-enable-input-feedback-sounds")]
1173 pub fn connect_gtk_enable_input_feedback_sounds_notify<F: Fn(&Self) + 'static>(
1174 &self,
1175 f: F,
1176 ) -> SignalHandlerId {
1177 unsafe extern "C" fn notify_gtk_enable_input_feedback_sounds_trampoline<
1178 F: Fn(&Settings) + 'static,
1179 >(
1180 this: *mut ffi::GtkSettings,
1181 _param_spec: glib::ffi::gpointer,
1182 f: glib::ffi::gpointer,
1183 ) {
1184 unsafe {
1185 let f: &F = &*(f as *const F);
1186 f(&from_glib_borrow(this))
1187 }
1188 }
1189 unsafe {
1190 let f: Box_<F> = Box_::new(f);
1191 connect_raw(
1192 self.as_ptr() as *mut _,
1193 c"notify::gtk-enable-input-feedback-sounds".as_ptr() as *const _,
1194 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1195 notify_gtk_enable_input_feedback_sounds_trampoline::<F> as *const (),
1196 )),
1197 Box_::into_raw(f),
1198 )
1199 }
1200 }
1201
1202 #[doc(alias = "gtk-enable-primary-paste")]
1203 pub fn connect_gtk_enable_primary_paste_notify<F: Fn(&Self) + 'static>(
1204 &self,
1205 f: F,
1206 ) -> SignalHandlerId {
1207 unsafe extern "C" fn notify_gtk_enable_primary_paste_trampoline<
1208 F: Fn(&Settings) + 'static,
1209 >(
1210 this: *mut ffi::GtkSettings,
1211 _param_spec: glib::ffi::gpointer,
1212 f: glib::ffi::gpointer,
1213 ) {
1214 unsafe {
1215 let f: &F = &*(f as *const F);
1216 f(&from_glib_borrow(this))
1217 }
1218 }
1219 unsafe {
1220 let f: Box_<F> = Box_::new(f);
1221 connect_raw(
1222 self.as_ptr() as *mut _,
1223 c"notify::gtk-enable-primary-paste".as_ptr() as *const _,
1224 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1225 notify_gtk_enable_primary_paste_trampoline::<F> as *const (),
1226 )),
1227 Box_::into_raw(f),
1228 )
1229 }
1230 }
1231
1232 #[doc(alias = "gtk-entry-password-hint-timeout")]
1233 pub fn connect_gtk_entry_password_hint_timeout_notify<F: Fn(&Self) + 'static>(
1234 &self,
1235 f: F,
1236 ) -> SignalHandlerId {
1237 unsafe extern "C" fn notify_gtk_entry_password_hint_timeout_trampoline<
1238 F: Fn(&Settings) + 'static,
1239 >(
1240 this: *mut ffi::GtkSettings,
1241 _param_spec: glib::ffi::gpointer,
1242 f: glib::ffi::gpointer,
1243 ) {
1244 unsafe {
1245 let f: &F = &*(f as *const F);
1246 f(&from_glib_borrow(this))
1247 }
1248 }
1249 unsafe {
1250 let f: Box_<F> = Box_::new(f);
1251 connect_raw(
1252 self.as_ptr() as *mut _,
1253 c"notify::gtk-entry-password-hint-timeout".as_ptr() as *const _,
1254 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1255 notify_gtk_entry_password_hint_timeout_trampoline::<F> as *const (),
1256 )),
1257 Box_::into_raw(f),
1258 )
1259 }
1260 }
1261
1262 #[doc(alias = "gtk-entry-select-on-focus")]
1263 pub fn connect_gtk_entry_select_on_focus_notify<F: Fn(&Self) + 'static>(
1264 &self,
1265 f: F,
1266 ) -> SignalHandlerId {
1267 unsafe extern "C" fn notify_gtk_entry_select_on_focus_trampoline<
1268 F: Fn(&Settings) + 'static,
1269 >(
1270 this: *mut ffi::GtkSettings,
1271 _param_spec: glib::ffi::gpointer,
1272 f: glib::ffi::gpointer,
1273 ) {
1274 unsafe {
1275 let f: &F = &*(f as *const F);
1276 f(&from_glib_borrow(this))
1277 }
1278 }
1279 unsafe {
1280 let f: Box_<F> = Box_::new(f);
1281 connect_raw(
1282 self.as_ptr() as *mut _,
1283 c"notify::gtk-entry-select-on-focus".as_ptr() as *const _,
1284 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1285 notify_gtk_entry_select_on_focus_trampoline::<F> as *const (),
1286 )),
1287 Box_::into_raw(f),
1288 )
1289 }
1290 }
1291
1292 #[doc(alias = "gtk-error-bell")]
1293 pub fn connect_gtk_error_bell_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1294 unsafe extern "C" fn notify_gtk_error_bell_trampoline<F: Fn(&Settings) + 'static>(
1295 this: *mut ffi::GtkSettings,
1296 _param_spec: glib::ffi::gpointer,
1297 f: glib::ffi::gpointer,
1298 ) {
1299 unsafe {
1300 let f: &F = &*(f as *const F);
1301 f(&from_glib_borrow(this))
1302 }
1303 }
1304 unsafe {
1305 let f: Box_<F> = Box_::new(f);
1306 connect_raw(
1307 self.as_ptr() as *mut _,
1308 c"notify::gtk-error-bell".as_ptr() as *const _,
1309 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1310 notify_gtk_error_bell_trampoline::<F> as *const (),
1311 )),
1312 Box_::into_raw(f),
1313 )
1314 }
1315 }
1316
1317 #[doc(alias = "gtk-font-name")]
1318 pub fn connect_gtk_font_name_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1319 unsafe extern "C" fn notify_gtk_font_name_trampoline<F: Fn(&Settings) + 'static>(
1320 this: *mut ffi::GtkSettings,
1321 _param_spec: glib::ffi::gpointer,
1322 f: glib::ffi::gpointer,
1323 ) {
1324 unsafe {
1325 let f: &F = &*(f as *const F);
1326 f(&from_glib_borrow(this))
1327 }
1328 }
1329 unsafe {
1330 let f: Box_<F> = Box_::new(f);
1331 connect_raw(
1332 self.as_ptr() as *mut _,
1333 c"notify::gtk-font-name".as_ptr() as *const _,
1334 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1335 notify_gtk_font_name_trampoline::<F> as *const (),
1336 )),
1337 Box_::into_raw(f),
1338 )
1339 }
1340 }
1341
1342 #[cfg(feature = "v4_16")]
1343 #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))]
1344 #[doc(alias = "gtk-font-rendering")]
1345 pub fn connect_gtk_font_rendering_notify<F: Fn(&Self) + 'static>(
1346 &self,
1347 f: F,
1348 ) -> SignalHandlerId {
1349 unsafe extern "C" fn notify_gtk_font_rendering_trampoline<F: Fn(&Settings) + 'static>(
1350 this: *mut ffi::GtkSettings,
1351 _param_spec: glib::ffi::gpointer,
1352 f: glib::ffi::gpointer,
1353 ) {
1354 unsafe {
1355 let f: &F = &*(f as *const F);
1356 f(&from_glib_borrow(this))
1357 }
1358 }
1359 unsafe {
1360 let f: Box_<F> = Box_::new(f);
1361 connect_raw(
1362 self.as_ptr() as *mut _,
1363 c"notify::gtk-font-rendering".as_ptr() as *const _,
1364 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1365 notify_gtk_font_rendering_trampoline::<F> as *const (),
1366 )),
1367 Box_::into_raw(f),
1368 )
1369 }
1370 }
1371
1372 #[doc(alias = "gtk-fontconfig-timestamp")]
1373 pub fn connect_gtk_fontconfig_timestamp_notify<F: Fn(&Self) + 'static>(
1374 &self,
1375 f: F,
1376 ) -> SignalHandlerId {
1377 unsafe extern "C" fn notify_gtk_fontconfig_timestamp_trampoline<
1378 F: Fn(&Settings) + 'static,
1379 >(
1380 this: *mut ffi::GtkSettings,
1381 _param_spec: glib::ffi::gpointer,
1382 f: glib::ffi::gpointer,
1383 ) {
1384 unsafe {
1385 let f: &F = &*(f as *const F);
1386 f(&from_glib_borrow(this))
1387 }
1388 }
1389 unsafe {
1390 let f: Box_<F> = Box_::new(f);
1391 connect_raw(
1392 self.as_ptr() as *mut _,
1393 c"notify::gtk-fontconfig-timestamp".as_ptr() as *const _,
1394 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1395 notify_gtk_fontconfig_timestamp_trampoline::<F> as *const (),
1396 )),
1397 Box_::into_raw(f),
1398 )
1399 }
1400 }
1401
1402 #[cfg(feature = "v4_6")]
1403 #[cfg_attr(docsrs, doc(cfg(feature = "v4_6")))]
1404 #[doc(alias = "gtk-hint-font-metrics")]
1405 pub fn connect_gtk_hint_font_metrics_notify<F: Fn(&Self) + 'static>(
1406 &self,
1407 f: F,
1408 ) -> SignalHandlerId {
1409 unsafe extern "C" fn notify_gtk_hint_font_metrics_trampoline<F: Fn(&Settings) + 'static>(
1410 this: *mut ffi::GtkSettings,
1411 _param_spec: glib::ffi::gpointer,
1412 f: glib::ffi::gpointer,
1413 ) {
1414 unsafe {
1415 let f: &F = &*(f as *const F);
1416 f(&from_glib_borrow(this))
1417 }
1418 }
1419 unsafe {
1420 let f: Box_<F> = Box_::new(f);
1421 connect_raw(
1422 self.as_ptr() as *mut _,
1423 c"notify::gtk-hint-font-metrics".as_ptr() as *const _,
1424 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1425 notify_gtk_hint_font_metrics_trampoline::<F> as *const (),
1426 )),
1427 Box_::into_raw(f),
1428 )
1429 }
1430 }
1431
1432 #[doc(alias = "gtk-icon-theme-name")]
1433 pub fn connect_gtk_icon_theme_name_notify<F: Fn(&Self) + 'static>(
1434 &self,
1435 f: F,
1436 ) -> SignalHandlerId {
1437 unsafe extern "C" fn notify_gtk_icon_theme_name_trampoline<F: Fn(&Settings) + 'static>(
1438 this: *mut ffi::GtkSettings,
1439 _param_spec: glib::ffi::gpointer,
1440 f: glib::ffi::gpointer,
1441 ) {
1442 unsafe {
1443 let f: &F = &*(f as *const F);
1444 f(&from_glib_borrow(this))
1445 }
1446 }
1447 unsafe {
1448 let f: Box_<F> = Box_::new(f);
1449 connect_raw(
1450 self.as_ptr() as *mut _,
1451 c"notify::gtk-icon-theme-name".as_ptr() as *const _,
1452 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1453 notify_gtk_icon_theme_name_trampoline::<F> as *const (),
1454 )),
1455 Box_::into_raw(f),
1456 )
1457 }
1458 }
1459
1460 #[doc(alias = "gtk-im-module")]
1461 pub fn connect_gtk_im_module_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1462 unsafe extern "C" fn notify_gtk_im_module_trampoline<F: Fn(&Settings) + 'static>(
1463 this: *mut ffi::GtkSettings,
1464 _param_spec: glib::ffi::gpointer,
1465 f: glib::ffi::gpointer,
1466 ) {
1467 unsafe {
1468 let f: &F = &*(f as *const F);
1469 f(&from_glib_borrow(this))
1470 }
1471 }
1472 unsafe {
1473 let f: Box_<F> = Box_::new(f);
1474 connect_raw(
1475 self.as_ptr() as *mut _,
1476 c"notify::gtk-im-module".as_ptr() as *const _,
1477 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1478 notify_gtk_im_module_trampoline::<F> as *const (),
1479 )),
1480 Box_::into_raw(f),
1481 )
1482 }
1483 }
1484
1485 #[cfg(feature = "v4_20")]
1486 #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))]
1487 #[doc(alias = "gtk-interface-color-scheme")]
1488 pub fn connect_gtk_interface_color_scheme_notify<F: Fn(&Self) + 'static>(
1489 &self,
1490 f: F,
1491 ) -> SignalHandlerId {
1492 unsafe extern "C" fn notify_gtk_interface_color_scheme_trampoline<
1493 F: Fn(&Settings) + 'static,
1494 >(
1495 this: *mut ffi::GtkSettings,
1496 _param_spec: glib::ffi::gpointer,
1497 f: glib::ffi::gpointer,
1498 ) {
1499 unsafe {
1500 let f: &F = &*(f as *const F);
1501 f(&from_glib_borrow(this))
1502 }
1503 }
1504 unsafe {
1505 let f: Box_<F> = Box_::new(f);
1506 connect_raw(
1507 self.as_ptr() as *mut _,
1508 c"notify::gtk-interface-color-scheme".as_ptr() as *const _,
1509 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1510 notify_gtk_interface_color_scheme_trampoline::<F> as *const (),
1511 )),
1512 Box_::into_raw(f),
1513 )
1514 }
1515 }
1516
1517 #[cfg(feature = "v4_20")]
1518 #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))]
1519 #[doc(alias = "gtk-interface-contrast")]
1520 pub fn connect_gtk_interface_contrast_notify<F: Fn(&Self) + 'static>(
1521 &self,
1522 f: F,
1523 ) -> SignalHandlerId {
1524 unsafe extern "C" fn notify_gtk_interface_contrast_trampoline<
1525 F: Fn(&Settings) + 'static,
1526 >(
1527 this: *mut ffi::GtkSettings,
1528 _param_spec: glib::ffi::gpointer,
1529 f: glib::ffi::gpointer,
1530 ) {
1531 unsafe {
1532 let f: &F = &*(f as *const F);
1533 f(&from_glib_borrow(this))
1534 }
1535 }
1536 unsafe {
1537 let f: Box_<F> = Box_::new(f);
1538 connect_raw(
1539 self.as_ptr() as *mut _,
1540 c"notify::gtk-interface-contrast".as_ptr() as *const _,
1541 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1542 notify_gtk_interface_contrast_trampoline::<F> as *const (),
1543 )),
1544 Box_::into_raw(f),
1545 )
1546 }
1547 }
1548
1549 #[cfg(feature = "v4_22")]
1550 #[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))]
1551 #[doc(alias = "gtk-interface-reduced-motion")]
1552 pub fn connect_gtk_interface_reduced_motion_notify<F: Fn(&Self) + 'static>(
1553 &self,
1554 f: F,
1555 ) -> SignalHandlerId {
1556 unsafe extern "C" fn notify_gtk_interface_reduced_motion_trampoline<
1557 F: Fn(&Settings) + 'static,
1558 >(
1559 this: *mut ffi::GtkSettings,
1560 _param_spec: glib::ffi::gpointer,
1561 f: glib::ffi::gpointer,
1562 ) {
1563 unsafe {
1564 let f: &F = &*(f as *const F);
1565 f(&from_glib_borrow(this))
1566 }
1567 }
1568 unsafe {
1569 let f: Box_<F> = Box_::new(f);
1570 connect_raw(
1571 self.as_ptr() as *mut _,
1572 c"notify::gtk-interface-reduced-motion".as_ptr() as *const _,
1573 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1574 notify_gtk_interface_reduced_motion_trampoline::<F> as *const (),
1575 )),
1576 Box_::into_raw(f),
1577 )
1578 }
1579 }
1580
1581 #[doc(alias = "gtk-keynav-use-caret")]
1582 pub fn connect_gtk_keynav_use_caret_notify<F: Fn(&Self) + 'static>(
1583 &self,
1584 f: F,
1585 ) -> SignalHandlerId {
1586 unsafe extern "C" fn notify_gtk_keynav_use_caret_trampoline<F: Fn(&Settings) + 'static>(
1587 this: *mut ffi::GtkSettings,
1588 _param_spec: glib::ffi::gpointer,
1589 f: glib::ffi::gpointer,
1590 ) {
1591 unsafe {
1592 let f: &F = &*(f as *const F);
1593 f(&from_glib_borrow(this))
1594 }
1595 }
1596 unsafe {
1597 let f: Box_<F> = Box_::new(f);
1598 connect_raw(
1599 self.as_ptr() as *mut _,
1600 c"notify::gtk-keynav-use-caret".as_ptr() as *const _,
1601 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1602 notify_gtk_keynav_use_caret_trampoline::<F> as *const (),
1603 )),
1604 Box_::into_raw(f),
1605 )
1606 }
1607 }
1608
1609 #[doc(alias = "gtk-label-select-on-focus")]
1610 pub fn connect_gtk_label_select_on_focus_notify<F: Fn(&Self) + 'static>(
1611 &self,
1612 f: F,
1613 ) -> SignalHandlerId {
1614 unsafe extern "C" fn notify_gtk_label_select_on_focus_trampoline<
1615 F: Fn(&Settings) + 'static,
1616 >(
1617 this: *mut ffi::GtkSettings,
1618 _param_spec: glib::ffi::gpointer,
1619 f: glib::ffi::gpointer,
1620 ) {
1621 unsafe {
1622 let f: &F = &*(f as *const F);
1623 f(&from_glib_borrow(this))
1624 }
1625 }
1626 unsafe {
1627 let f: Box_<F> = Box_::new(f);
1628 connect_raw(
1629 self.as_ptr() as *mut _,
1630 c"notify::gtk-label-select-on-focus".as_ptr() as *const _,
1631 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1632 notify_gtk_label_select_on_focus_trampoline::<F> as *const (),
1633 )),
1634 Box_::into_raw(f),
1635 )
1636 }
1637 }
1638
1639 #[doc(alias = "gtk-long-press-time")]
1640 pub fn connect_gtk_long_press_time_notify<F: Fn(&Self) + 'static>(
1641 &self,
1642 f: F,
1643 ) -> SignalHandlerId {
1644 unsafe extern "C" fn notify_gtk_long_press_time_trampoline<F: Fn(&Settings) + 'static>(
1645 this: *mut ffi::GtkSettings,
1646 _param_spec: glib::ffi::gpointer,
1647 f: glib::ffi::gpointer,
1648 ) {
1649 unsafe {
1650 let f: &F = &*(f as *const F);
1651 f(&from_glib_borrow(this))
1652 }
1653 }
1654 unsafe {
1655 let f: Box_<F> = Box_::new(f);
1656 connect_raw(
1657 self.as_ptr() as *mut _,
1658 c"notify::gtk-long-press-time".as_ptr() as *const _,
1659 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1660 notify_gtk_long_press_time_trampoline::<F> as *const (),
1661 )),
1662 Box_::into_raw(f),
1663 )
1664 }
1665 }
1666
1667 #[doc(alias = "gtk-overlay-scrolling")]
1668 pub fn connect_gtk_overlay_scrolling_notify<F: Fn(&Self) + 'static>(
1669 &self,
1670 f: F,
1671 ) -> SignalHandlerId {
1672 unsafe extern "C" fn notify_gtk_overlay_scrolling_trampoline<F: Fn(&Settings) + 'static>(
1673 this: *mut ffi::GtkSettings,
1674 _param_spec: glib::ffi::gpointer,
1675 f: glib::ffi::gpointer,
1676 ) {
1677 unsafe {
1678 let f: &F = &*(f as *const F);
1679 f(&from_glib_borrow(this))
1680 }
1681 }
1682 unsafe {
1683 let f: Box_<F> = Box_::new(f);
1684 connect_raw(
1685 self.as_ptr() as *mut _,
1686 c"notify::gtk-overlay-scrolling".as_ptr() as *const _,
1687 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1688 notify_gtk_overlay_scrolling_trampoline::<F> as *const (),
1689 )),
1690 Box_::into_raw(f),
1691 )
1692 }
1693 }
1694
1695 #[doc(alias = "gtk-primary-button-warps-slider")]
1696 pub fn connect_gtk_primary_button_warps_slider_notify<F: Fn(&Self) + 'static>(
1697 &self,
1698 f: F,
1699 ) -> SignalHandlerId {
1700 unsafe extern "C" fn notify_gtk_primary_button_warps_slider_trampoline<
1701 F: Fn(&Settings) + 'static,
1702 >(
1703 this: *mut ffi::GtkSettings,
1704 _param_spec: glib::ffi::gpointer,
1705 f: glib::ffi::gpointer,
1706 ) {
1707 unsafe {
1708 let f: &F = &*(f as *const F);
1709 f(&from_glib_borrow(this))
1710 }
1711 }
1712 unsafe {
1713 let f: Box_<F> = Box_::new(f);
1714 connect_raw(
1715 self.as_ptr() as *mut _,
1716 c"notify::gtk-primary-button-warps-slider".as_ptr() as *const _,
1717 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1718 notify_gtk_primary_button_warps_slider_trampoline::<F> as *const (),
1719 )),
1720 Box_::into_raw(f),
1721 )
1722 }
1723 }
1724
1725 #[doc(alias = "gtk-print-backends")]
1726 pub fn connect_gtk_print_backends_notify<F: Fn(&Self) + 'static>(
1727 &self,
1728 f: F,
1729 ) -> SignalHandlerId {
1730 unsafe extern "C" fn notify_gtk_print_backends_trampoline<F: Fn(&Settings) + 'static>(
1731 this: *mut ffi::GtkSettings,
1732 _param_spec: glib::ffi::gpointer,
1733 f: glib::ffi::gpointer,
1734 ) {
1735 unsafe {
1736 let f: &F = &*(f as *const F);
1737 f(&from_glib_borrow(this))
1738 }
1739 }
1740 unsafe {
1741 let f: Box_<F> = Box_::new(f);
1742 connect_raw(
1743 self.as_ptr() as *mut _,
1744 c"notify::gtk-print-backends".as_ptr() as *const _,
1745 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1746 notify_gtk_print_backends_trampoline::<F> as *const (),
1747 )),
1748 Box_::into_raw(f),
1749 )
1750 }
1751 }
1752
1753 #[doc(alias = "gtk-print-preview-command")]
1754 pub fn connect_gtk_print_preview_command_notify<F: Fn(&Self) + 'static>(
1755 &self,
1756 f: F,
1757 ) -> SignalHandlerId {
1758 unsafe extern "C" fn notify_gtk_print_preview_command_trampoline<
1759 F: Fn(&Settings) + 'static,
1760 >(
1761 this: *mut ffi::GtkSettings,
1762 _param_spec: glib::ffi::gpointer,
1763 f: glib::ffi::gpointer,
1764 ) {
1765 unsafe {
1766 let f: &F = &*(f as *const F);
1767 f(&from_glib_borrow(this))
1768 }
1769 }
1770 unsafe {
1771 let f: Box_<F> = Box_::new(f);
1772 connect_raw(
1773 self.as_ptr() as *mut _,
1774 c"notify::gtk-print-preview-command".as_ptr() as *const _,
1775 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1776 notify_gtk_print_preview_command_trampoline::<F> as *const (),
1777 )),
1778 Box_::into_raw(f),
1779 )
1780 }
1781 }
1782
1783 #[doc(alias = "gtk-recent-files-enabled")]
1784 pub fn connect_gtk_recent_files_enabled_notify<F: Fn(&Self) + 'static>(
1785 &self,
1786 f: F,
1787 ) -> SignalHandlerId {
1788 unsafe extern "C" fn notify_gtk_recent_files_enabled_trampoline<
1789 F: Fn(&Settings) + 'static,
1790 >(
1791 this: *mut ffi::GtkSettings,
1792 _param_spec: glib::ffi::gpointer,
1793 f: glib::ffi::gpointer,
1794 ) {
1795 unsafe {
1796 let f: &F = &*(f as *const F);
1797 f(&from_glib_borrow(this))
1798 }
1799 }
1800 unsafe {
1801 let f: Box_<F> = Box_::new(f);
1802 connect_raw(
1803 self.as_ptr() as *mut _,
1804 c"notify::gtk-recent-files-enabled".as_ptr() as *const _,
1805 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1806 notify_gtk_recent_files_enabled_trampoline::<F> as *const (),
1807 )),
1808 Box_::into_raw(f),
1809 )
1810 }
1811 }
1812
1813 #[doc(alias = "gtk-recent-files-max-age")]
1814 pub fn connect_gtk_recent_files_max_age_notify<F: Fn(&Self) + 'static>(
1815 &self,
1816 f: F,
1817 ) -> SignalHandlerId {
1818 unsafe extern "C" fn notify_gtk_recent_files_max_age_trampoline<
1819 F: Fn(&Settings) + 'static,
1820 >(
1821 this: *mut ffi::GtkSettings,
1822 _param_spec: glib::ffi::gpointer,
1823 f: glib::ffi::gpointer,
1824 ) {
1825 unsafe {
1826 let f: &F = &*(f as *const F);
1827 f(&from_glib_borrow(this))
1828 }
1829 }
1830 unsafe {
1831 let f: Box_<F> = Box_::new(f);
1832 connect_raw(
1833 self.as_ptr() as *mut _,
1834 c"notify::gtk-recent-files-max-age".as_ptr() as *const _,
1835 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1836 notify_gtk_recent_files_max_age_trampoline::<F> as *const (),
1837 )),
1838 Box_::into_raw(f),
1839 )
1840 }
1841 }
1842
1843 #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")]
1844 #[doc(alias = "gtk-shell-shows-app-menu")]
1845 pub fn connect_gtk_shell_shows_app_menu_notify<F: Fn(&Self) + 'static>(
1846 &self,
1847 f: F,
1848 ) -> SignalHandlerId {
1849 unsafe extern "C" fn notify_gtk_shell_shows_app_menu_trampoline<
1850 F: Fn(&Settings) + 'static,
1851 >(
1852 this: *mut ffi::GtkSettings,
1853 _param_spec: glib::ffi::gpointer,
1854 f: glib::ffi::gpointer,
1855 ) {
1856 unsafe {
1857 let f: &F = &*(f as *const F);
1858 f(&from_glib_borrow(this))
1859 }
1860 }
1861 unsafe {
1862 let f: Box_<F> = Box_::new(f);
1863 connect_raw(
1864 self.as_ptr() as *mut _,
1865 c"notify::gtk-shell-shows-app-menu".as_ptr() as *const _,
1866 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1867 notify_gtk_shell_shows_app_menu_trampoline::<F> as *const (),
1868 )),
1869 Box_::into_raw(f),
1870 )
1871 }
1872 }
1873
1874 #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")]
1875 #[doc(alias = "gtk-shell-shows-desktop")]
1876 pub fn connect_gtk_shell_shows_desktop_notify<F: Fn(&Self) + 'static>(
1877 &self,
1878 f: F,
1879 ) -> SignalHandlerId {
1880 unsafe extern "C" fn notify_gtk_shell_shows_desktop_trampoline<
1881 F: Fn(&Settings) + 'static,
1882 >(
1883 this: *mut ffi::GtkSettings,
1884 _param_spec: glib::ffi::gpointer,
1885 f: glib::ffi::gpointer,
1886 ) {
1887 unsafe {
1888 let f: &F = &*(f as *const F);
1889 f(&from_glib_borrow(this))
1890 }
1891 }
1892 unsafe {
1893 let f: Box_<F> = Box_::new(f);
1894 connect_raw(
1895 self.as_ptr() as *mut _,
1896 c"notify::gtk-shell-shows-desktop".as_ptr() as *const _,
1897 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1898 notify_gtk_shell_shows_desktop_trampoline::<F> as *const (),
1899 )),
1900 Box_::into_raw(f),
1901 )
1902 }
1903 }
1904
1905 #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")]
1906 #[doc(alias = "gtk-shell-shows-menubar")]
1907 pub fn connect_gtk_shell_shows_menubar_notify<F: Fn(&Self) + 'static>(
1908 &self,
1909 f: F,
1910 ) -> SignalHandlerId {
1911 unsafe extern "C" fn notify_gtk_shell_shows_menubar_trampoline<
1912 F: Fn(&Settings) + 'static,
1913 >(
1914 this: *mut ffi::GtkSettings,
1915 _param_spec: glib::ffi::gpointer,
1916 f: glib::ffi::gpointer,
1917 ) {
1918 unsafe {
1919 let f: &F = &*(f as *const F);
1920 f(&from_glib_borrow(this))
1921 }
1922 }
1923 unsafe {
1924 let f: Box_<F> = Box_::new(f);
1925 connect_raw(
1926 self.as_ptr() as *mut _,
1927 c"notify::gtk-shell-shows-menubar".as_ptr() as *const _,
1928 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1929 notify_gtk_shell_shows_menubar_trampoline::<F> as *const (),
1930 )),
1931 Box_::into_raw(f),
1932 )
1933 }
1934 }
1935
1936 #[cfg(feature = "v4_14")]
1937 #[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
1938 #[doc(alias = "gtk-show-status-shapes")]
1939 pub fn connect_gtk_show_status_shapes_notify<F: Fn(&Self) + 'static>(
1940 &self,
1941 f: F,
1942 ) -> SignalHandlerId {
1943 unsafe extern "C" fn notify_gtk_show_status_shapes_trampoline<
1944 F: Fn(&Settings) + 'static,
1945 >(
1946 this: *mut ffi::GtkSettings,
1947 _param_spec: glib::ffi::gpointer,
1948 f: glib::ffi::gpointer,
1949 ) {
1950 unsafe {
1951 let f: &F = &*(f as *const F);
1952 f(&from_glib_borrow(this))
1953 }
1954 }
1955 unsafe {
1956 let f: Box_<F> = Box_::new(f);
1957 connect_raw(
1958 self.as_ptr() as *mut _,
1959 c"notify::gtk-show-status-shapes".as_ptr() as *const _,
1960 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1961 notify_gtk_show_status_shapes_trampoline::<F> as *const (),
1962 )),
1963 Box_::into_raw(f),
1964 )
1965 }
1966 }
1967
1968 #[doc(alias = "gtk-sound-theme-name")]
1969 pub fn connect_gtk_sound_theme_name_notify<F: Fn(&Self) + 'static>(
1970 &self,
1971 f: F,
1972 ) -> SignalHandlerId {
1973 unsafe extern "C" fn notify_gtk_sound_theme_name_trampoline<F: Fn(&Settings) + 'static>(
1974 this: *mut ffi::GtkSettings,
1975 _param_spec: glib::ffi::gpointer,
1976 f: glib::ffi::gpointer,
1977 ) {
1978 unsafe {
1979 let f: &F = &*(f as *const F);
1980 f(&from_glib_borrow(this))
1981 }
1982 }
1983 unsafe {
1984 let f: Box_<F> = Box_::new(f);
1985 connect_raw(
1986 self.as_ptr() as *mut _,
1987 c"notify::gtk-sound-theme-name".as_ptr() as *const _,
1988 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1989 notify_gtk_sound_theme_name_trampoline::<F> as *const (),
1990 )),
1991 Box_::into_raw(f),
1992 )
1993 }
1994 }
1995
1996 #[doc(alias = "gtk-split-cursor")]
1997 pub fn connect_gtk_split_cursor_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1998 unsafe extern "C" fn notify_gtk_split_cursor_trampoline<F: Fn(&Settings) + 'static>(
1999 this: *mut ffi::GtkSettings,
2000 _param_spec: glib::ffi::gpointer,
2001 f: glib::ffi::gpointer,
2002 ) {
2003 unsafe {
2004 let f: &F = &*(f as *const F);
2005 f(&from_glib_borrow(this))
2006 }
2007 }
2008 unsafe {
2009 let f: Box_<F> = Box_::new(f);
2010 connect_raw(
2011 self.as_ptr() as *mut _,
2012 c"notify::gtk-split-cursor".as_ptr() as *const _,
2013 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2014 notify_gtk_split_cursor_trampoline::<F> as *const (),
2015 )),
2016 Box_::into_raw(f),
2017 )
2018 }
2019 }
2020
2021 #[doc(alias = "gtk-theme-name")]
2022 pub fn connect_gtk_theme_name_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2023 unsafe extern "C" fn notify_gtk_theme_name_trampoline<F: Fn(&Settings) + 'static>(
2024 this: *mut ffi::GtkSettings,
2025 _param_spec: glib::ffi::gpointer,
2026 f: glib::ffi::gpointer,
2027 ) {
2028 unsafe {
2029 let f: &F = &*(f as *const F);
2030 f(&from_glib_borrow(this))
2031 }
2032 }
2033 unsafe {
2034 let f: Box_<F> = Box_::new(f);
2035 connect_raw(
2036 self.as_ptr() as *mut _,
2037 c"notify::gtk-theme-name".as_ptr() as *const _,
2038 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2039 notify_gtk_theme_name_trampoline::<F> as *const (),
2040 )),
2041 Box_::into_raw(f),
2042 )
2043 }
2044 }
2045
2046 #[doc(alias = "gtk-titlebar-double-click")]
2047 pub fn connect_gtk_titlebar_double_click_notify<F: Fn(&Self) + 'static>(
2048 &self,
2049 f: F,
2050 ) -> SignalHandlerId {
2051 unsafe extern "C" fn notify_gtk_titlebar_double_click_trampoline<
2052 F: Fn(&Settings) + 'static,
2053 >(
2054 this: *mut ffi::GtkSettings,
2055 _param_spec: glib::ffi::gpointer,
2056 f: glib::ffi::gpointer,
2057 ) {
2058 unsafe {
2059 let f: &F = &*(f as *const F);
2060 f(&from_glib_borrow(this))
2061 }
2062 }
2063 unsafe {
2064 let f: Box_<F> = Box_::new(f);
2065 connect_raw(
2066 self.as_ptr() as *mut _,
2067 c"notify::gtk-titlebar-double-click".as_ptr() as *const _,
2068 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2069 notify_gtk_titlebar_double_click_trampoline::<F> as *const (),
2070 )),
2071 Box_::into_raw(f),
2072 )
2073 }
2074 }
2075
2076 #[doc(alias = "gtk-titlebar-middle-click")]
2077 pub fn connect_gtk_titlebar_middle_click_notify<F: Fn(&Self) + 'static>(
2078 &self,
2079 f: F,
2080 ) -> SignalHandlerId {
2081 unsafe extern "C" fn notify_gtk_titlebar_middle_click_trampoline<
2082 F: Fn(&Settings) + 'static,
2083 >(
2084 this: *mut ffi::GtkSettings,
2085 _param_spec: glib::ffi::gpointer,
2086 f: glib::ffi::gpointer,
2087 ) {
2088 unsafe {
2089 let f: &F = &*(f as *const F);
2090 f(&from_glib_borrow(this))
2091 }
2092 }
2093 unsafe {
2094 let f: Box_<F> = Box_::new(f);
2095 connect_raw(
2096 self.as_ptr() as *mut _,
2097 c"notify::gtk-titlebar-middle-click".as_ptr() as *const _,
2098 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2099 notify_gtk_titlebar_middle_click_trampoline::<F> as *const (),
2100 )),
2101 Box_::into_raw(f),
2102 )
2103 }
2104 }
2105
2106 #[doc(alias = "gtk-titlebar-right-click")]
2107 pub fn connect_gtk_titlebar_right_click_notify<F: Fn(&Self) + 'static>(
2108 &self,
2109 f: F,
2110 ) -> SignalHandlerId {
2111 unsafe extern "C" fn notify_gtk_titlebar_right_click_trampoline<
2112 F: Fn(&Settings) + 'static,
2113 >(
2114 this: *mut ffi::GtkSettings,
2115 _param_spec: glib::ffi::gpointer,
2116 f: glib::ffi::gpointer,
2117 ) {
2118 unsafe {
2119 let f: &F = &*(f as *const F);
2120 f(&from_glib_borrow(this))
2121 }
2122 }
2123 unsafe {
2124 let f: Box_<F> = Box_::new(f);
2125 connect_raw(
2126 self.as_ptr() as *mut _,
2127 c"notify::gtk-titlebar-right-click".as_ptr() as *const _,
2128 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2129 notify_gtk_titlebar_right_click_trampoline::<F> as *const (),
2130 )),
2131 Box_::into_raw(f),
2132 )
2133 }
2134 }
2135
2136 #[doc(alias = "gtk-xft-antialias")]
2137 pub fn connect_gtk_xft_antialias_notify<F: Fn(&Self) + 'static>(
2138 &self,
2139 f: F,
2140 ) -> SignalHandlerId {
2141 unsafe extern "C" fn notify_gtk_xft_antialias_trampoline<F: Fn(&Settings) + 'static>(
2142 this: *mut ffi::GtkSettings,
2143 _param_spec: glib::ffi::gpointer,
2144 f: glib::ffi::gpointer,
2145 ) {
2146 unsafe {
2147 let f: &F = &*(f as *const F);
2148 f(&from_glib_borrow(this))
2149 }
2150 }
2151 unsafe {
2152 let f: Box_<F> = Box_::new(f);
2153 connect_raw(
2154 self.as_ptr() as *mut _,
2155 c"notify::gtk-xft-antialias".as_ptr() as *const _,
2156 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2157 notify_gtk_xft_antialias_trampoline::<F> as *const (),
2158 )),
2159 Box_::into_raw(f),
2160 )
2161 }
2162 }
2163
2164 #[doc(alias = "gtk-xft-dpi")]
2165 pub fn connect_gtk_xft_dpi_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2166 unsafe extern "C" fn notify_gtk_xft_dpi_trampoline<F: Fn(&Settings) + 'static>(
2167 this: *mut ffi::GtkSettings,
2168 _param_spec: glib::ffi::gpointer,
2169 f: glib::ffi::gpointer,
2170 ) {
2171 unsafe {
2172 let f: &F = &*(f as *const F);
2173 f(&from_glib_borrow(this))
2174 }
2175 }
2176 unsafe {
2177 let f: Box_<F> = Box_::new(f);
2178 connect_raw(
2179 self.as_ptr() as *mut _,
2180 c"notify::gtk-xft-dpi".as_ptr() as *const _,
2181 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2182 notify_gtk_xft_dpi_trampoline::<F> as *const (),
2183 )),
2184 Box_::into_raw(f),
2185 )
2186 }
2187 }
2188
2189 #[doc(alias = "gtk-xft-hinting")]
2190 pub fn connect_gtk_xft_hinting_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2191 unsafe extern "C" fn notify_gtk_xft_hinting_trampoline<F: Fn(&Settings) + 'static>(
2192 this: *mut ffi::GtkSettings,
2193 _param_spec: glib::ffi::gpointer,
2194 f: glib::ffi::gpointer,
2195 ) {
2196 unsafe {
2197 let f: &F = &*(f as *const F);
2198 f(&from_glib_borrow(this))
2199 }
2200 }
2201 unsafe {
2202 let f: Box_<F> = Box_::new(f);
2203 connect_raw(
2204 self.as_ptr() as *mut _,
2205 c"notify::gtk-xft-hinting".as_ptr() as *const _,
2206 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2207 notify_gtk_xft_hinting_trampoline::<F> as *const (),
2208 )),
2209 Box_::into_raw(f),
2210 )
2211 }
2212 }
2213
2214 #[doc(alias = "gtk-xft-hintstyle")]
2215 pub fn connect_gtk_xft_hintstyle_notify<F: Fn(&Self) + 'static>(
2216 &self,
2217 f: F,
2218 ) -> SignalHandlerId {
2219 unsafe extern "C" fn notify_gtk_xft_hintstyle_trampoline<F: Fn(&Settings) + 'static>(
2220 this: *mut ffi::GtkSettings,
2221 _param_spec: glib::ffi::gpointer,
2222 f: glib::ffi::gpointer,
2223 ) {
2224 unsafe {
2225 let f: &F = &*(f as *const F);
2226 f(&from_glib_borrow(this))
2227 }
2228 }
2229 unsafe {
2230 let f: Box_<F> = Box_::new(f);
2231 connect_raw(
2232 self.as_ptr() as *mut _,
2233 c"notify::gtk-xft-hintstyle".as_ptr() as *const _,
2234 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2235 notify_gtk_xft_hintstyle_trampoline::<F> as *const (),
2236 )),
2237 Box_::into_raw(f),
2238 )
2239 }
2240 }
2241
2242 #[doc(alias = "gtk-xft-rgba")]
2243 pub fn connect_gtk_xft_rgba_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2244 unsafe extern "C" fn notify_gtk_xft_rgba_trampoline<F: Fn(&Settings) + 'static>(
2245 this: *mut ffi::GtkSettings,
2246 _param_spec: glib::ffi::gpointer,
2247 f: glib::ffi::gpointer,
2248 ) {
2249 unsafe {
2250 let f: &F = &*(f as *const F);
2251 f(&from_glib_borrow(this))
2252 }
2253 }
2254 unsafe {
2255 let f: Box_<F> = Box_::new(f);
2256 connect_raw(
2257 self.as_ptr() as *mut _,
2258 c"notify::gtk-xft-rgba".as_ptr() as *const _,
2259 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2260 notify_gtk_xft_rgba_trampoline::<F> as *const (),
2261 )),
2262 Box_::into_raw(f),
2263 )
2264 }
2265 }
2266}
2267
2268#[must_use = "The builder must be built to be used"]
2273pub struct SettingsBuilder {
2274 builder: glib::object::ObjectBuilder<'static, Settings>,
2275}
2276
2277impl SettingsBuilder {
2278 fn new() -> Self {
2279 Self {
2280 builder: glib::object::Object::builder(),
2281 }
2282 }
2283
2284 pub fn gtk_alternative_button_order(self, gtk_alternative_button_order: bool) -> Self {
2285 Self {
2286 builder: self
2287 .builder
2288 .property("gtk-alternative-button-order", gtk_alternative_button_order),
2289 }
2290 }
2291
2292 pub fn gtk_alternative_sort_arrows(self, gtk_alternative_sort_arrows: bool) -> Self {
2293 Self {
2294 builder: self
2295 .builder
2296 .property("gtk-alternative-sort-arrows", gtk_alternative_sort_arrows),
2297 }
2298 }
2299
2300 #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")]
2301 pub fn gtk_application_prefer_dark_theme(
2302 self,
2303 gtk_application_prefer_dark_theme: bool,
2304 ) -> Self {
2305 Self {
2306 builder: self.builder.property(
2307 "gtk-application-prefer-dark-theme",
2308 gtk_application_prefer_dark_theme,
2309 ),
2310 }
2311 }
2312
2313 pub fn gtk_cursor_aspect_ratio(self, gtk_cursor_aspect_ratio: f64) -> Self {
2314 Self {
2315 builder: self
2316 .builder
2317 .property("gtk-cursor-aspect-ratio", gtk_cursor_aspect_ratio),
2318 }
2319 }
2320
2321 pub fn gtk_cursor_blink(self, gtk_cursor_blink: bool) -> Self {
2322 Self {
2323 builder: self.builder.property("gtk-cursor-blink", gtk_cursor_blink),
2324 }
2325 }
2326
2327 pub fn gtk_cursor_blink_time(self, gtk_cursor_blink_time: i32) -> Self {
2328 Self {
2329 builder: self
2330 .builder
2331 .property("gtk-cursor-blink-time", gtk_cursor_blink_time),
2332 }
2333 }
2334
2335 pub fn gtk_cursor_blink_timeout(self, gtk_cursor_blink_timeout: i32) -> Self {
2336 Self {
2337 builder: self
2338 .builder
2339 .property("gtk-cursor-blink-timeout", gtk_cursor_blink_timeout),
2340 }
2341 }
2342
2343 pub fn gtk_cursor_theme_name(self, gtk_cursor_theme_name: impl Into<glib::GString>) -> Self {
2344 Self {
2345 builder: self
2346 .builder
2347 .property("gtk-cursor-theme-name", gtk_cursor_theme_name.into()),
2348 }
2349 }
2350
2351 pub fn gtk_cursor_theme_size(self, gtk_cursor_theme_size: i32) -> Self {
2352 Self {
2353 builder: self
2354 .builder
2355 .property("gtk-cursor-theme-size", gtk_cursor_theme_size),
2356 }
2357 }
2358
2359 pub fn gtk_decoration_layout(self, gtk_decoration_layout: impl Into<glib::GString>) -> Self {
2360 Self {
2361 builder: self
2362 .builder
2363 .property("gtk-decoration-layout", gtk_decoration_layout.into()),
2364 }
2365 }
2366
2367 pub fn gtk_dialogs_use_header(self, gtk_dialogs_use_header: bool) -> Self {
2368 Self {
2369 builder: self
2370 .builder
2371 .property("gtk-dialogs-use-header", gtk_dialogs_use_header),
2372 }
2373 }
2374
2375 pub fn gtk_dnd_drag_threshold(self, gtk_dnd_drag_threshold: i32) -> Self {
2376 Self {
2377 builder: self
2378 .builder
2379 .property("gtk-dnd-drag-threshold", gtk_dnd_drag_threshold),
2380 }
2381 }
2382
2383 pub fn gtk_double_click_distance(self, gtk_double_click_distance: i32) -> Self {
2384 Self {
2385 builder: self
2386 .builder
2387 .property("gtk-double-click-distance", gtk_double_click_distance),
2388 }
2389 }
2390
2391 pub fn gtk_double_click_time(self, gtk_double_click_time: i32) -> Self {
2392 Self {
2393 builder: self
2394 .builder
2395 .property("gtk-double-click-time", gtk_double_click_time),
2396 }
2397 }
2398
2399 pub fn gtk_enable_accels(self, gtk_enable_accels: bool) -> Self {
2400 Self {
2401 builder: self
2402 .builder
2403 .property("gtk-enable-accels", gtk_enable_accels),
2404 }
2405 }
2406
2407 pub fn gtk_enable_animations(self, gtk_enable_animations: bool) -> Self {
2408 Self {
2409 builder: self
2410 .builder
2411 .property("gtk-enable-animations", gtk_enable_animations),
2412 }
2413 }
2414
2415 pub fn gtk_enable_event_sounds(self, gtk_enable_event_sounds: bool) -> Self {
2416 Self {
2417 builder: self
2418 .builder
2419 .property("gtk-enable-event-sounds", gtk_enable_event_sounds),
2420 }
2421 }
2422
2423 pub fn gtk_enable_input_feedback_sounds(self, gtk_enable_input_feedback_sounds: bool) -> Self {
2424 Self {
2425 builder: self.builder.property(
2426 "gtk-enable-input-feedback-sounds",
2427 gtk_enable_input_feedback_sounds,
2428 ),
2429 }
2430 }
2431
2432 pub fn gtk_enable_primary_paste(self, gtk_enable_primary_paste: bool) -> Self {
2433 Self {
2434 builder: self
2435 .builder
2436 .property("gtk-enable-primary-paste", gtk_enable_primary_paste),
2437 }
2438 }
2439
2440 pub fn gtk_entry_password_hint_timeout(self, gtk_entry_password_hint_timeout: u32) -> Self {
2441 Self {
2442 builder: self.builder.property(
2443 "gtk-entry-password-hint-timeout",
2444 gtk_entry_password_hint_timeout,
2445 ),
2446 }
2447 }
2448
2449 pub fn gtk_entry_select_on_focus(self, gtk_entry_select_on_focus: bool) -> Self {
2450 Self {
2451 builder: self
2452 .builder
2453 .property("gtk-entry-select-on-focus", gtk_entry_select_on_focus),
2454 }
2455 }
2456
2457 pub fn gtk_error_bell(self, gtk_error_bell: bool) -> Self {
2458 Self {
2459 builder: self.builder.property("gtk-error-bell", gtk_error_bell),
2460 }
2461 }
2462
2463 pub fn gtk_font_name(self, gtk_font_name: impl Into<glib::GString>) -> Self {
2464 Self {
2465 builder: self.builder.property("gtk-font-name", gtk_font_name.into()),
2466 }
2467 }
2468
2469 #[cfg(feature = "v4_16")]
2470 #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))]
2471 pub fn gtk_font_rendering(self, gtk_font_rendering: FontRendering) -> Self {
2472 Self {
2473 builder: self
2474 .builder
2475 .property("gtk-font-rendering", gtk_font_rendering),
2476 }
2477 }
2478
2479 pub fn gtk_fontconfig_timestamp(self, gtk_fontconfig_timestamp: u32) -> Self {
2480 Self {
2481 builder: self
2482 .builder
2483 .property("gtk-fontconfig-timestamp", gtk_fontconfig_timestamp),
2484 }
2485 }
2486
2487 #[cfg(feature = "v4_6")]
2488 #[cfg_attr(docsrs, doc(cfg(feature = "v4_6")))]
2489 pub fn gtk_hint_font_metrics(self, gtk_hint_font_metrics: bool) -> Self {
2490 Self {
2491 builder: self
2492 .builder
2493 .property("gtk-hint-font-metrics", gtk_hint_font_metrics),
2494 }
2495 }
2496
2497 pub fn gtk_icon_theme_name(self, gtk_icon_theme_name: impl Into<glib::GString>) -> Self {
2498 Self {
2499 builder: self
2500 .builder
2501 .property("gtk-icon-theme-name", gtk_icon_theme_name.into()),
2502 }
2503 }
2504
2505 pub fn gtk_im_module(self, gtk_im_module: impl Into<glib::GString>) -> Self {
2506 Self {
2507 builder: self.builder.property("gtk-im-module", gtk_im_module.into()),
2508 }
2509 }
2510
2511 #[cfg(feature = "v4_20")]
2512 #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))]
2513 pub fn gtk_interface_color_scheme(
2514 self,
2515 gtk_interface_color_scheme: InterfaceColorScheme,
2516 ) -> Self {
2517 Self {
2518 builder: self
2519 .builder
2520 .property("gtk-interface-color-scheme", gtk_interface_color_scheme),
2521 }
2522 }
2523
2524 #[cfg(feature = "v4_20")]
2525 #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))]
2526 pub fn gtk_interface_contrast(self, gtk_interface_contrast: InterfaceContrast) -> Self {
2527 Self {
2528 builder: self
2529 .builder
2530 .property("gtk-interface-contrast", gtk_interface_contrast),
2531 }
2532 }
2533
2534 #[cfg(feature = "v4_22")]
2535 #[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))]
2536 pub fn gtk_interface_reduced_motion(self, gtk_interface_reduced_motion: ReducedMotion) -> Self {
2537 Self {
2538 builder: self
2539 .builder
2540 .property("gtk-interface-reduced-motion", gtk_interface_reduced_motion),
2541 }
2542 }
2543
2544 pub fn gtk_keynav_use_caret(self, gtk_keynav_use_caret: bool) -> Self {
2545 Self {
2546 builder: self
2547 .builder
2548 .property("gtk-keynav-use-caret", gtk_keynav_use_caret),
2549 }
2550 }
2551
2552 pub fn gtk_label_select_on_focus(self, gtk_label_select_on_focus: bool) -> Self {
2553 Self {
2554 builder: self
2555 .builder
2556 .property("gtk-label-select-on-focus", gtk_label_select_on_focus),
2557 }
2558 }
2559
2560 pub fn gtk_long_press_time(self, gtk_long_press_time: u32) -> Self {
2561 Self {
2562 builder: self
2563 .builder
2564 .property("gtk-long-press-time", gtk_long_press_time),
2565 }
2566 }
2567
2568 pub fn gtk_overlay_scrolling(self, gtk_overlay_scrolling: bool) -> Self {
2569 Self {
2570 builder: self
2571 .builder
2572 .property("gtk-overlay-scrolling", gtk_overlay_scrolling),
2573 }
2574 }
2575
2576 pub fn gtk_primary_button_warps_slider(self, gtk_primary_button_warps_slider: bool) -> Self {
2577 Self {
2578 builder: self.builder.property(
2579 "gtk-primary-button-warps-slider",
2580 gtk_primary_button_warps_slider,
2581 ),
2582 }
2583 }
2584
2585 pub fn gtk_print_backends(self, gtk_print_backends: impl Into<glib::GString>) -> Self {
2586 Self {
2587 builder: self
2588 .builder
2589 .property("gtk-print-backends", gtk_print_backends.into()),
2590 }
2591 }
2592
2593 pub fn gtk_print_preview_command(
2594 self,
2595 gtk_print_preview_command: impl Into<glib::GString>,
2596 ) -> Self {
2597 Self {
2598 builder: self.builder.property(
2599 "gtk-print-preview-command",
2600 gtk_print_preview_command.into(),
2601 ),
2602 }
2603 }
2604
2605 pub fn gtk_recent_files_enabled(self, gtk_recent_files_enabled: bool) -> Self {
2606 Self {
2607 builder: self
2608 .builder
2609 .property("gtk-recent-files-enabled", gtk_recent_files_enabled),
2610 }
2611 }
2612
2613 pub fn gtk_recent_files_max_age(self, gtk_recent_files_max_age: i32) -> Self {
2614 Self {
2615 builder: self
2616 .builder
2617 .property("gtk-recent-files-max-age", gtk_recent_files_max_age),
2618 }
2619 }
2620
2621 #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")]
2622 pub fn gtk_shell_shows_app_menu(self, gtk_shell_shows_app_menu: bool) -> Self {
2623 Self {
2624 builder: self
2625 .builder
2626 .property("gtk-shell-shows-app-menu", gtk_shell_shows_app_menu),
2627 }
2628 }
2629
2630 #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")]
2631 pub fn gtk_shell_shows_desktop(self, gtk_shell_shows_desktop: bool) -> Self {
2632 Self {
2633 builder: self
2634 .builder
2635 .property("gtk-shell-shows-desktop", gtk_shell_shows_desktop),
2636 }
2637 }
2638
2639 #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")]
2640 pub fn gtk_shell_shows_menubar(self, gtk_shell_shows_menubar: bool) -> Self {
2641 Self {
2642 builder: self
2643 .builder
2644 .property("gtk-shell-shows-menubar", gtk_shell_shows_menubar),
2645 }
2646 }
2647
2648 #[cfg(feature = "v4_14")]
2649 #[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))]
2650 pub fn gtk_show_status_shapes(self, gtk_show_status_shapes: bool) -> Self {
2651 Self {
2652 builder: self
2653 .builder
2654 .property("gtk-show-status-shapes", gtk_show_status_shapes),
2655 }
2656 }
2657
2658 pub fn gtk_sound_theme_name(self, gtk_sound_theme_name: impl Into<glib::GString>) -> Self {
2659 Self {
2660 builder: self
2661 .builder
2662 .property("gtk-sound-theme-name", gtk_sound_theme_name.into()),
2663 }
2664 }
2665
2666 pub fn gtk_split_cursor(self, gtk_split_cursor: bool) -> Self {
2667 Self {
2668 builder: self.builder.property("gtk-split-cursor", gtk_split_cursor),
2669 }
2670 }
2671
2672 pub fn gtk_theme_name(self, gtk_theme_name: impl Into<glib::GString>) -> Self {
2673 Self {
2674 builder: self
2675 .builder
2676 .property("gtk-theme-name", gtk_theme_name.into()),
2677 }
2678 }
2679
2680 pub fn gtk_titlebar_double_click(
2681 self,
2682 gtk_titlebar_double_click: impl Into<glib::GString>,
2683 ) -> Self {
2684 Self {
2685 builder: self.builder.property(
2686 "gtk-titlebar-double-click",
2687 gtk_titlebar_double_click.into(),
2688 ),
2689 }
2690 }
2691
2692 pub fn gtk_titlebar_middle_click(
2693 self,
2694 gtk_titlebar_middle_click: impl Into<glib::GString>,
2695 ) -> Self {
2696 Self {
2697 builder: self.builder.property(
2698 "gtk-titlebar-middle-click",
2699 gtk_titlebar_middle_click.into(),
2700 ),
2701 }
2702 }
2703
2704 pub fn gtk_titlebar_right_click(
2705 self,
2706 gtk_titlebar_right_click: impl Into<glib::GString>,
2707 ) -> Self {
2708 Self {
2709 builder: self
2710 .builder
2711 .property("gtk-titlebar-right-click", gtk_titlebar_right_click.into()),
2712 }
2713 }
2714
2715 pub fn gtk_xft_antialias(self, gtk_xft_antialias: i32) -> Self {
2716 Self {
2717 builder: self
2718 .builder
2719 .property("gtk-xft-antialias", gtk_xft_antialias),
2720 }
2721 }
2722
2723 pub fn gtk_xft_dpi(self, gtk_xft_dpi: i32) -> Self {
2724 Self {
2725 builder: self.builder.property("gtk-xft-dpi", gtk_xft_dpi),
2726 }
2727 }
2728
2729 pub fn gtk_xft_hinting(self, gtk_xft_hinting: i32) -> Self {
2730 Self {
2731 builder: self.builder.property("gtk-xft-hinting", gtk_xft_hinting),
2732 }
2733 }
2734
2735 pub fn gtk_xft_hintstyle(self, gtk_xft_hintstyle: impl Into<glib::GString>) -> Self {
2736 Self {
2737 builder: self
2738 .builder
2739 .property("gtk-xft-hintstyle", gtk_xft_hintstyle.into()),
2740 }
2741 }
2742
2743 pub fn gtk_xft_rgba(self, gtk_xft_rgba: impl Into<glib::GString>) -> Self {
2744 Self {
2745 builder: self.builder.property("gtk-xft-rgba", gtk_xft_rgba.into()),
2746 }
2747 }
2748
2749 #[must_use = "Building the object from the builder is usually expensive and is not expected to have side effects"]
2752 pub fn build(self) -> Settings {
2753 assert_initialized_main_thread!();
2754 self.builder.build()
2755 }
2756}