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