libadwaita/auto/
about_dialog.rs

1// This file was generated by gir (https://github.com/gtk-rs/gir)
2// from
3// from gir-files (https://github.com/gtk-rs/gir-files.git)
4// DO NOT EDIT
5
6use crate::{ffi, Dialog, DialogPresentationMode};
7use glib::{
8    object::ObjectType as _,
9    prelude::*,
10    signal::{connect_raw, SignalHandlerId},
11    translate::*,
12};
13use std::boxed::Box as Box_;
14
15glib::wrapper! {
16    #[doc(alias = "AdwAboutDialog")]
17    pub struct AboutDialog(Object<ffi::AdwAboutDialog, ffi::AdwAboutDialogClass>) @extends Dialog, gtk::Widget, @implements gtk::Accessible, gtk::Buildable, gtk::ConstraintTarget, gtk::ShortcutManager;
18
19    match fn {
20        type_ => || ffi::adw_about_dialog_get_type(),
21    }
22}
23
24impl AboutDialog {
25    #[doc(alias = "adw_about_dialog_new")]
26    pub fn new() -> AboutDialog {
27        assert_initialized_main_thread!();
28        unsafe { Dialog::from_glib_none(ffi::adw_about_dialog_new()).unsafe_cast() }
29    }
30
31    #[cfg(not(target_env = "msvc"))]
32    #[cfg_attr(docsrs, doc(cfg(not(target_env = "msvc"))))]
33    #[doc(alias = "adw_about_dialog_new_from_appdata")]
34    #[doc(alias = "new_from_appdata")]
35    pub fn from_appdata(resource_path: &str, release_notes_version: Option<&str>) -> AboutDialog {
36        assert_initialized_main_thread!();
37        unsafe {
38            Dialog::from_glib_none(ffi::adw_about_dialog_new_from_appdata(
39                resource_path.to_glib_none().0,
40                release_notes_version.to_glib_none().0,
41            ))
42            .unsafe_cast()
43        }
44    }
45
46    // rustdoc-stripper-ignore-next
47    /// Creates a new builder-pattern struct instance to construct [`AboutDialog`] objects.
48    ///
49    /// This method returns an instance of [`AboutDialogBuilder`](crate::builders::AboutDialogBuilder) which can be used to create [`AboutDialog`] objects.
50    pub fn builder() -> AboutDialogBuilder {
51        AboutDialogBuilder::new()
52    }
53
54    #[doc(alias = "adw_about_dialog_add_acknowledgement_section")]
55    pub fn add_acknowledgement_section(&self, name: Option<&str>, people: &[&str]) {
56        unsafe {
57            ffi::adw_about_dialog_add_acknowledgement_section(
58                self.to_glib_none().0,
59                name.to_glib_none().0,
60                people.to_glib_none().0,
61            );
62        }
63    }
64
65    #[doc(alias = "adw_about_dialog_add_credit_section")]
66    pub fn add_credit_section(&self, name: Option<&str>, people: &[&str]) {
67        unsafe {
68            ffi::adw_about_dialog_add_credit_section(
69                self.to_glib_none().0,
70                name.to_glib_none().0,
71                people.to_glib_none().0,
72            );
73        }
74    }
75
76    #[doc(alias = "adw_about_dialog_add_legal_section")]
77    pub fn add_legal_section(
78        &self,
79        title: &str,
80        copyright: Option<&str>,
81        license_type: gtk::License,
82        license: Option<&str>,
83    ) {
84        unsafe {
85            ffi::adw_about_dialog_add_legal_section(
86                self.to_glib_none().0,
87                title.to_glib_none().0,
88                copyright.to_glib_none().0,
89                license_type.into_glib(),
90                license.to_glib_none().0,
91            );
92        }
93    }
94
95    #[doc(alias = "adw_about_dialog_add_link")]
96    pub fn add_link(&self, title: &str, url: &str) {
97        unsafe {
98            ffi::adw_about_dialog_add_link(
99                self.to_glib_none().0,
100                title.to_glib_none().0,
101                url.to_glib_none().0,
102            );
103        }
104    }
105
106    #[cfg(feature = "v1_7")]
107    #[cfg_attr(docsrs, doc(cfg(feature = "v1_7")))]
108    #[doc(alias = "adw_about_dialog_add_other_app")]
109    pub fn add_other_app(&self, appid: &str, name: &str, summary: &str) {
110        unsafe {
111            ffi::adw_about_dialog_add_other_app(
112                self.to_glib_none().0,
113                appid.to_glib_none().0,
114                name.to_glib_none().0,
115                summary.to_glib_none().0,
116            );
117        }
118    }
119
120    #[doc(alias = "adw_about_dialog_get_application_icon")]
121    #[doc(alias = "get_application_icon")]
122    #[doc(alias = "application-icon")]
123    pub fn application_icon(&self) -> glib::GString {
124        unsafe {
125            from_glib_none(ffi::adw_about_dialog_get_application_icon(
126                self.to_glib_none().0,
127            ))
128        }
129    }
130
131    #[doc(alias = "adw_about_dialog_get_application_name")]
132    #[doc(alias = "get_application_name")]
133    #[doc(alias = "application-name")]
134    pub fn application_name(&self) -> glib::GString {
135        unsafe {
136            from_glib_none(ffi::adw_about_dialog_get_application_name(
137                self.to_glib_none().0,
138            ))
139        }
140    }
141
142    #[doc(alias = "adw_about_dialog_get_artists")]
143    #[doc(alias = "get_artists")]
144    pub fn artists(&self) -> Vec<glib::GString> {
145        unsafe {
146            FromGlibPtrContainer::from_glib_none(ffi::adw_about_dialog_get_artists(
147                self.to_glib_none().0,
148            ))
149        }
150    }
151
152    #[doc(alias = "adw_about_dialog_get_comments")]
153    #[doc(alias = "get_comments")]
154    pub fn comments(&self) -> glib::GString {
155        unsafe { from_glib_none(ffi::adw_about_dialog_get_comments(self.to_glib_none().0)) }
156    }
157
158    #[doc(alias = "adw_about_dialog_get_copyright")]
159    #[doc(alias = "get_copyright")]
160    pub fn copyright(&self) -> glib::GString {
161        unsafe { from_glib_none(ffi::adw_about_dialog_get_copyright(self.to_glib_none().0)) }
162    }
163
164    #[doc(alias = "adw_about_dialog_get_debug_info")]
165    #[doc(alias = "get_debug_info")]
166    #[doc(alias = "debug-info")]
167    pub fn debug_info(&self) -> glib::GString {
168        unsafe { from_glib_none(ffi::adw_about_dialog_get_debug_info(self.to_glib_none().0)) }
169    }
170
171    #[doc(alias = "adw_about_dialog_get_debug_info_filename")]
172    #[doc(alias = "get_debug_info_filename")]
173    #[doc(alias = "debug-info-filename")]
174    pub fn debug_info_filename(&self) -> glib::GString {
175        unsafe {
176            from_glib_none(ffi::adw_about_dialog_get_debug_info_filename(
177                self.to_glib_none().0,
178            ))
179        }
180    }
181
182    #[doc(alias = "adw_about_dialog_get_designers")]
183    #[doc(alias = "get_designers")]
184    pub fn designers(&self) -> Vec<glib::GString> {
185        unsafe {
186            FromGlibPtrContainer::from_glib_none(ffi::adw_about_dialog_get_designers(
187                self.to_glib_none().0,
188            ))
189        }
190    }
191
192    #[doc(alias = "adw_about_dialog_get_developer_name")]
193    #[doc(alias = "get_developer_name")]
194    #[doc(alias = "developer-name")]
195    pub fn developer_name(&self) -> glib::GString {
196        unsafe {
197            from_glib_none(ffi::adw_about_dialog_get_developer_name(
198                self.to_glib_none().0,
199            ))
200        }
201    }
202
203    #[doc(alias = "adw_about_dialog_get_developers")]
204    #[doc(alias = "get_developers")]
205    pub fn developers(&self) -> Vec<glib::GString> {
206        unsafe {
207            FromGlibPtrContainer::from_glib_none(ffi::adw_about_dialog_get_developers(
208                self.to_glib_none().0,
209            ))
210        }
211    }
212
213    #[doc(alias = "adw_about_dialog_get_documenters")]
214    #[doc(alias = "get_documenters")]
215    pub fn documenters(&self) -> Vec<glib::GString> {
216        unsafe {
217            FromGlibPtrContainer::from_glib_none(ffi::adw_about_dialog_get_documenters(
218                self.to_glib_none().0,
219            ))
220        }
221    }
222
223    #[doc(alias = "adw_about_dialog_get_issue_url")]
224    #[doc(alias = "get_issue_url")]
225    #[doc(alias = "issue-url")]
226    pub fn issue_url(&self) -> glib::GString {
227        unsafe { from_glib_none(ffi::adw_about_dialog_get_issue_url(self.to_glib_none().0)) }
228    }
229
230    #[doc(alias = "adw_about_dialog_get_license")]
231    #[doc(alias = "get_license")]
232    pub fn license(&self) -> glib::GString {
233        unsafe { from_glib_none(ffi::adw_about_dialog_get_license(self.to_glib_none().0)) }
234    }
235
236    #[doc(alias = "adw_about_dialog_get_license_type")]
237    #[doc(alias = "get_license_type")]
238    #[doc(alias = "license-type")]
239    pub fn license_type(&self) -> gtk::License {
240        unsafe {
241            from_glib(ffi::adw_about_dialog_get_license_type(
242                self.to_glib_none().0,
243            ))
244        }
245    }
246
247    #[doc(alias = "adw_about_dialog_get_release_notes")]
248    #[doc(alias = "get_release_notes")]
249    #[doc(alias = "release-notes")]
250    pub fn release_notes(&self) -> glib::GString {
251        unsafe {
252            from_glib_none(ffi::adw_about_dialog_get_release_notes(
253                self.to_glib_none().0,
254            ))
255        }
256    }
257
258    #[doc(alias = "adw_about_dialog_get_release_notes_version")]
259    #[doc(alias = "get_release_notes_version")]
260    #[doc(alias = "release-notes-version")]
261    pub fn release_notes_version(&self) -> glib::GString {
262        unsafe {
263            from_glib_none(ffi::adw_about_dialog_get_release_notes_version(
264                self.to_glib_none().0,
265            ))
266        }
267    }
268
269    #[doc(alias = "adw_about_dialog_get_support_url")]
270    #[doc(alias = "get_support_url")]
271    #[doc(alias = "support-url")]
272    pub fn support_url(&self) -> glib::GString {
273        unsafe { from_glib_none(ffi::adw_about_dialog_get_support_url(self.to_glib_none().0)) }
274    }
275
276    #[doc(alias = "adw_about_dialog_get_translator_credits")]
277    #[doc(alias = "get_translator_credits")]
278    #[doc(alias = "translator-credits")]
279    pub fn translator_credits(&self) -> glib::GString {
280        unsafe {
281            from_glib_none(ffi::adw_about_dialog_get_translator_credits(
282                self.to_glib_none().0,
283            ))
284        }
285    }
286
287    #[doc(alias = "adw_about_dialog_get_version")]
288    #[doc(alias = "get_version")]
289    pub fn version(&self) -> glib::GString {
290        unsafe { from_glib_none(ffi::adw_about_dialog_get_version(self.to_glib_none().0)) }
291    }
292
293    #[doc(alias = "adw_about_dialog_get_website")]
294    #[doc(alias = "get_website")]
295    pub fn website(&self) -> glib::GString {
296        unsafe { from_glib_none(ffi::adw_about_dialog_get_website(self.to_glib_none().0)) }
297    }
298
299    #[doc(alias = "adw_about_dialog_set_application_icon")]
300    #[doc(alias = "application-icon")]
301    pub fn set_application_icon(&self, application_icon: &str) {
302        unsafe {
303            ffi::adw_about_dialog_set_application_icon(
304                self.to_glib_none().0,
305                application_icon.to_glib_none().0,
306            );
307        }
308    }
309
310    #[doc(alias = "adw_about_dialog_set_application_name")]
311    #[doc(alias = "application-name")]
312    pub fn set_application_name(&self, application_name: &str) {
313        unsafe {
314            ffi::adw_about_dialog_set_application_name(
315                self.to_glib_none().0,
316                application_name.to_glib_none().0,
317            );
318        }
319    }
320
321    #[doc(alias = "adw_about_dialog_set_artists")]
322    #[doc(alias = "artists")]
323    pub fn set_artists(&self, artists: &[&str]) {
324        unsafe {
325            ffi::adw_about_dialog_set_artists(self.to_glib_none().0, artists.to_glib_none().0);
326        }
327    }
328
329    #[doc(alias = "adw_about_dialog_set_comments")]
330    #[doc(alias = "comments")]
331    pub fn set_comments(&self, comments: &str) {
332        unsafe {
333            ffi::adw_about_dialog_set_comments(self.to_glib_none().0, comments.to_glib_none().0);
334        }
335    }
336
337    #[doc(alias = "adw_about_dialog_set_copyright")]
338    #[doc(alias = "copyright")]
339    pub fn set_copyright(&self, copyright: &str) {
340        unsafe {
341            ffi::adw_about_dialog_set_copyright(self.to_glib_none().0, copyright.to_glib_none().0);
342        }
343    }
344
345    #[doc(alias = "adw_about_dialog_set_debug_info")]
346    #[doc(alias = "debug-info")]
347    pub fn set_debug_info(&self, debug_info: &str) {
348        unsafe {
349            ffi::adw_about_dialog_set_debug_info(
350                self.to_glib_none().0,
351                debug_info.to_glib_none().0,
352            );
353        }
354    }
355
356    #[doc(alias = "adw_about_dialog_set_debug_info_filename")]
357    #[doc(alias = "debug-info-filename")]
358    pub fn set_debug_info_filename(&self, filename: &str) {
359        unsafe {
360            ffi::adw_about_dialog_set_debug_info_filename(
361                self.to_glib_none().0,
362                filename.to_glib_none().0,
363            );
364        }
365    }
366
367    #[doc(alias = "adw_about_dialog_set_designers")]
368    #[doc(alias = "designers")]
369    pub fn set_designers(&self, designers: &[&str]) {
370        unsafe {
371            ffi::adw_about_dialog_set_designers(self.to_glib_none().0, designers.to_glib_none().0);
372        }
373    }
374
375    #[doc(alias = "adw_about_dialog_set_developer_name")]
376    #[doc(alias = "developer-name")]
377    pub fn set_developer_name(&self, developer_name: &str) {
378        unsafe {
379            ffi::adw_about_dialog_set_developer_name(
380                self.to_glib_none().0,
381                developer_name.to_glib_none().0,
382            );
383        }
384    }
385
386    #[doc(alias = "adw_about_dialog_set_developers")]
387    #[doc(alias = "developers")]
388    pub fn set_developers(&self, developers: &[&str]) {
389        unsafe {
390            ffi::adw_about_dialog_set_developers(
391                self.to_glib_none().0,
392                developers.to_glib_none().0,
393            );
394        }
395    }
396
397    #[doc(alias = "adw_about_dialog_set_documenters")]
398    #[doc(alias = "documenters")]
399    pub fn set_documenters(&self, documenters: &[&str]) {
400        unsafe {
401            ffi::adw_about_dialog_set_documenters(
402                self.to_glib_none().0,
403                documenters.to_glib_none().0,
404            );
405        }
406    }
407
408    #[doc(alias = "adw_about_dialog_set_issue_url")]
409    #[doc(alias = "issue-url")]
410    pub fn set_issue_url(&self, issue_url: &str) {
411        unsafe {
412            ffi::adw_about_dialog_set_issue_url(self.to_glib_none().0, issue_url.to_glib_none().0);
413        }
414    }
415
416    #[doc(alias = "adw_about_dialog_set_license")]
417    #[doc(alias = "license")]
418    pub fn set_license(&self, license: &str) {
419        unsafe {
420            ffi::adw_about_dialog_set_license(self.to_glib_none().0, license.to_glib_none().0);
421        }
422    }
423
424    #[doc(alias = "adw_about_dialog_set_license_type")]
425    #[doc(alias = "license-type")]
426    pub fn set_license_type(&self, license_type: gtk::License) {
427        unsafe {
428            ffi::adw_about_dialog_set_license_type(self.to_glib_none().0, license_type.into_glib());
429        }
430    }
431
432    #[doc(alias = "adw_about_dialog_set_release_notes")]
433    #[doc(alias = "release-notes")]
434    pub fn set_release_notes(&self, release_notes: &str) {
435        unsafe {
436            ffi::adw_about_dialog_set_release_notes(
437                self.to_glib_none().0,
438                release_notes.to_glib_none().0,
439            );
440        }
441    }
442
443    #[doc(alias = "adw_about_dialog_set_release_notes_version")]
444    #[doc(alias = "release-notes-version")]
445    pub fn set_release_notes_version(&self, version: &str) {
446        unsafe {
447            ffi::adw_about_dialog_set_release_notes_version(
448                self.to_glib_none().0,
449                version.to_glib_none().0,
450            );
451        }
452    }
453
454    #[doc(alias = "adw_about_dialog_set_support_url")]
455    #[doc(alias = "support-url")]
456    pub fn set_support_url(&self, support_url: &str) {
457        unsafe {
458            ffi::adw_about_dialog_set_support_url(
459                self.to_glib_none().0,
460                support_url.to_glib_none().0,
461            );
462        }
463    }
464
465    #[doc(alias = "adw_about_dialog_set_translator_credits")]
466    #[doc(alias = "translator-credits")]
467    pub fn set_translator_credits(&self, translator_credits: &str) {
468        unsafe {
469            ffi::adw_about_dialog_set_translator_credits(
470                self.to_glib_none().0,
471                translator_credits.to_glib_none().0,
472            );
473        }
474    }
475
476    #[doc(alias = "adw_about_dialog_set_version")]
477    #[doc(alias = "version")]
478    pub fn set_version(&self, version: &str) {
479        unsafe {
480            ffi::adw_about_dialog_set_version(self.to_glib_none().0, version.to_glib_none().0);
481        }
482    }
483
484    #[doc(alias = "adw_about_dialog_set_website")]
485    #[doc(alias = "website")]
486    pub fn set_website(&self, website: &str) {
487        unsafe {
488            ffi::adw_about_dialog_set_website(self.to_glib_none().0, website.to_glib_none().0);
489        }
490    }
491
492    #[cfg(feature = "v1_5")]
493    #[cfg_attr(docsrs, doc(cfg(feature = "v1_5")))]
494    #[doc(alias = "activate-link")]
495    pub fn connect_activate_link<F: Fn(&Self, &str) -> bool + 'static>(
496        &self,
497        f: F,
498    ) -> SignalHandlerId {
499        unsafe extern "C" fn activate_link_trampoline<
500            F: Fn(&AboutDialog, &str) -> bool + 'static,
501        >(
502            this: *mut ffi::AdwAboutDialog,
503            uri: *mut std::ffi::c_char,
504            f: glib::ffi::gpointer,
505        ) -> glib::ffi::gboolean {
506            let f: &F = &*(f as *const F);
507            f(
508                &from_glib_borrow(this),
509                &glib::GString::from_glib_borrow(uri),
510            )
511            .into_glib()
512        }
513        unsafe {
514            let f: Box_<F> = Box_::new(f);
515            connect_raw(
516                self.as_ptr() as *mut _,
517                c"activate-link".as_ptr() as *const _,
518                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
519                    activate_link_trampoline::<F> as *const (),
520                )),
521                Box_::into_raw(f),
522            )
523        }
524    }
525
526    #[cfg(feature = "v1_5")]
527    #[cfg_attr(docsrs, doc(cfg(feature = "v1_5")))]
528    #[doc(alias = "application-icon")]
529    pub fn connect_application_icon_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
530        unsafe extern "C" fn notify_application_icon_trampoline<F: Fn(&AboutDialog) + 'static>(
531            this: *mut ffi::AdwAboutDialog,
532            _param_spec: glib::ffi::gpointer,
533            f: glib::ffi::gpointer,
534        ) {
535            let f: &F = &*(f as *const F);
536            f(&from_glib_borrow(this))
537        }
538        unsafe {
539            let f: Box_<F> = Box_::new(f);
540            connect_raw(
541                self.as_ptr() as *mut _,
542                c"notify::application-icon".as_ptr() as *const _,
543                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
544                    notify_application_icon_trampoline::<F> as *const (),
545                )),
546                Box_::into_raw(f),
547            )
548        }
549    }
550
551    #[cfg(feature = "v1_5")]
552    #[cfg_attr(docsrs, doc(cfg(feature = "v1_5")))]
553    #[doc(alias = "application-name")]
554    pub fn connect_application_name_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
555        unsafe extern "C" fn notify_application_name_trampoline<F: Fn(&AboutDialog) + 'static>(
556            this: *mut ffi::AdwAboutDialog,
557            _param_spec: glib::ffi::gpointer,
558            f: glib::ffi::gpointer,
559        ) {
560            let f: &F = &*(f as *const F);
561            f(&from_glib_borrow(this))
562        }
563        unsafe {
564            let f: Box_<F> = Box_::new(f);
565            connect_raw(
566                self.as_ptr() as *mut _,
567                c"notify::application-name".as_ptr() as *const _,
568                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
569                    notify_application_name_trampoline::<F> as *const (),
570                )),
571                Box_::into_raw(f),
572            )
573        }
574    }
575
576    #[cfg(feature = "v1_5")]
577    #[cfg_attr(docsrs, doc(cfg(feature = "v1_5")))]
578    #[doc(alias = "artists")]
579    pub fn connect_artists_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
580        unsafe extern "C" fn notify_artists_trampoline<F: Fn(&AboutDialog) + 'static>(
581            this: *mut ffi::AdwAboutDialog,
582            _param_spec: glib::ffi::gpointer,
583            f: glib::ffi::gpointer,
584        ) {
585            let f: &F = &*(f as *const F);
586            f(&from_glib_borrow(this))
587        }
588        unsafe {
589            let f: Box_<F> = Box_::new(f);
590            connect_raw(
591                self.as_ptr() as *mut _,
592                c"notify::artists".as_ptr() as *const _,
593                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
594                    notify_artists_trampoline::<F> as *const (),
595                )),
596                Box_::into_raw(f),
597            )
598        }
599    }
600
601    #[cfg(feature = "v1_5")]
602    #[cfg_attr(docsrs, doc(cfg(feature = "v1_5")))]
603    #[doc(alias = "comments")]
604    pub fn connect_comments_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
605        unsafe extern "C" fn notify_comments_trampoline<F: Fn(&AboutDialog) + 'static>(
606            this: *mut ffi::AdwAboutDialog,
607            _param_spec: glib::ffi::gpointer,
608            f: glib::ffi::gpointer,
609        ) {
610            let f: &F = &*(f as *const F);
611            f(&from_glib_borrow(this))
612        }
613        unsafe {
614            let f: Box_<F> = Box_::new(f);
615            connect_raw(
616                self.as_ptr() as *mut _,
617                c"notify::comments".as_ptr() as *const _,
618                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
619                    notify_comments_trampoline::<F> as *const (),
620                )),
621                Box_::into_raw(f),
622            )
623        }
624    }
625
626    #[cfg(feature = "v1_5")]
627    #[cfg_attr(docsrs, doc(cfg(feature = "v1_5")))]
628    #[doc(alias = "copyright")]
629    pub fn connect_copyright_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
630        unsafe extern "C" fn notify_copyright_trampoline<F: Fn(&AboutDialog) + 'static>(
631            this: *mut ffi::AdwAboutDialog,
632            _param_spec: glib::ffi::gpointer,
633            f: glib::ffi::gpointer,
634        ) {
635            let f: &F = &*(f as *const F);
636            f(&from_glib_borrow(this))
637        }
638        unsafe {
639            let f: Box_<F> = Box_::new(f);
640            connect_raw(
641                self.as_ptr() as *mut _,
642                c"notify::copyright".as_ptr() as *const _,
643                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
644                    notify_copyright_trampoline::<F> as *const (),
645                )),
646                Box_::into_raw(f),
647            )
648        }
649    }
650
651    #[cfg(feature = "v1_5")]
652    #[cfg_attr(docsrs, doc(cfg(feature = "v1_5")))]
653    #[doc(alias = "debug-info")]
654    pub fn connect_debug_info_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
655        unsafe extern "C" fn notify_debug_info_trampoline<F: Fn(&AboutDialog) + 'static>(
656            this: *mut ffi::AdwAboutDialog,
657            _param_spec: glib::ffi::gpointer,
658            f: glib::ffi::gpointer,
659        ) {
660            let f: &F = &*(f as *const F);
661            f(&from_glib_borrow(this))
662        }
663        unsafe {
664            let f: Box_<F> = Box_::new(f);
665            connect_raw(
666                self.as_ptr() as *mut _,
667                c"notify::debug-info".as_ptr() as *const _,
668                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
669                    notify_debug_info_trampoline::<F> as *const (),
670                )),
671                Box_::into_raw(f),
672            )
673        }
674    }
675
676    #[cfg(feature = "v1_5")]
677    #[cfg_attr(docsrs, doc(cfg(feature = "v1_5")))]
678    #[doc(alias = "debug-info-filename")]
679    pub fn connect_debug_info_filename_notify<F: Fn(&Self) + 'static>(
680        &self,
681        f: F,
682    ) -> SignalHandlerId {
683        unsafe extern "C" fn notify_debug_info_filename_trampoline<
684            F: Fn(&AboutDialog) + 'static,
685        >(
686            this: *mut ffi::AdwAboutDialog,
687            _param_spec: glib::ffi::gpointer,
688            f: glib::ffi::gpointer,
689        ) {
690            let f: &F = &*(f as *const F);
691            f(&from_glib_borrow(this))
692        }
693        unsafe {
694            let f: Box_<F> = Box_::new(f);
695            connect_raw(
696                self.as_ptr() as *mut _,
697                c"notify::debug-info-filename".as_ptr() as *const _,
698                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
699                    notify_debug_info_filename_trampoline::<F> as *const (),
700                )),
701                Box_::into_raw(f),
702            )
703        }
704    }
705
706    #[cfg(feature = "v1_5")]
707    #[cfg_attr(docsrs, doc(cfg(feature = "v1_5")))]
708    #[doc(alias = "designers")]
709    pub fn connect_designers_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
710        unsafe extern "C" fn notify_designers_trampoline<F: Fn(&AboutDialog) + 'static>(
711            this: *mut ffi::AdwAboutDialog,
712            _param_spec: glib::ffi::gpointer,
713            f: glib::ffi::gpointer,
714        ) {
715            let f: &F = &*(f as *const F);
716            f(&from_glib_borrow(this))
717        }
718        unsafe {
719            let f: Box_<F> = Box_::new(f);
720            connect_raw(
721                self.as_ptr() as *mut _,
722                c"notify::designers".as_ptr() as *const _,
723                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
724                    notify_designers_trampoline::<F> as *const (),
725                )),
726                Box_::into_raw(f),
727            )
728        }
729    }
730
731    #[cfg(feature = "v1_5")]
732    #[cfg_attr(docsrs, doc(cfg(feature = "v1_5")))]
733    #[doc(alias = "developer-name")]
734    pub fn connect_developer_name_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
735        unsafe extern "C" fn notify_developer_name_trampoline<F: Fn(&AboutDialog) + 'static>(
736            this: *mut ffi::AdwAboutDialog,
737            _param_spec: glib::ffi::gpointer,
738            f: glib::ffi::gpointer,
739        ) {
740            let f: &F = &*(f as *const F);
741            f(&from_glib_borrow(this))
742        }
743        unsafe {
744            let f: Box_<F> = Box_::new(f);
745            connect_raw(
746                self.as_ptr() as *mut _,
747                c"notify::developer-name".as_ptr() as *const _,
748                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
749                    notify_developer_name_trampoline::<F> as *const (),
750                )),
751                Box_::into_raw(f),
752            )
753        }
754    }
755
756    #[cfg(feature = "v1_5")]
757    #[cfg_attr(docsrs, doc(cfg(feature = "v1_5")))]
758    #[doc(alias = "developers")]
759    pub fn connect_developers_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
760        unsafe extern "C" fn notify_developers_trampoline<F: Fn(&AboutDialog) + 'static>(
761            this: *mut ffi::AdwAboutDialog,
762            _param_spec: glib::ffi::gpointer,
763            f: glib::ffi::gpointer,
764        ) {
765            let f: &F = &*(f as *const F);
766            f(&from_glib_borrow(this))
767        }
768        unsafe {
769            let f: Box_<F> = Box_::new(f);
770            connect_raw(
771                self.as_ptr() as *mut _,
772                c"notify::developers".as_ptr() as *const _,
773                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
774                    notify_developers_trampoline::<F> as *const (),
775                )),
776                Box_::into_raw(f),
777            )
778        }
779    }
780
781    #[cfg(feature = "v1_5")]
782    #[cfg_attr(docsrs, doc(cfg(feature = "v1_5")))]
783    #[doc(alias = "documenters")]
784    pub fn connect_documenters_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
785        unsafe extern "C" fn notify_documenters_trampoline<F: Fn(&AboutDialog) + 'static>(
786            this: *mut ffi::AdwAboutDialog,
787            _param_spec: glib::ffi::gpointer,
788            f: glib::ffi::gpointer,
789        ) {
790            let f: &F = &*(f as *const F);
791            f(&from_glib_borrow(this))
792        }
793        unsafe {
794            let f: Box_<F> = Box_::new(f);
795            connect_raw(
796                self.as_ptr() as *mut _,
797                c"notify::documenters".as_ptr() as *const _,
798                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
799                    notify_documenters_trampoline::<F> as *const (),
800                )),
801                Box_::into_raw(f),
802            )
803        }
804    }
805
806    #[cfg(feature = "v1_5")]
807    #[cfg_attr(docsrs, doc(cfg(feature = "v1_5")))]
808    #[doc(alias = "issue-url")]
809    pub fn connect_issue_url_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
810        unsafe extern "C" fn notify_issue_url_trampoline<F: Fn(&AboutDialog) + 'static>(
811            this: *mut ffi::AdwAboutDialog,
812            _param_spec: glib::ffi::gpointer,
813            f: glib::ffi::gpointer,
814        ) {
815            let f: &F = &*(f as *const F);
816            f(&from_glib_borrow(this))
817        }
818        unsafe {
819            let f: Box_<F> = Box_::new(f);
820            connect_raw(
821                self.as_ptr() as *mut _,
822                c"notify::issue-url".as_ptr() as *const _,
823                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
824                    notify_issue_url_trampoline::<F> as *const (),
825                )),
826                Box_::into_raw(f),
827            )
828        }
829    }
830
831    #[cfg(feature = "v1_5")]
832    #[cfg_attr(docsrs, doc(cfg(feature = "v1_5")))]
833    #[doc(alias = "license")]
834    pub fn connect_license_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
835        unsafe extern "C" fn notify_license_trampoline<F: Fn(&AboutDialog) + 'static>(
836            this: *mut ffi::AdwAboutDialog,
837            _param_spec: glib::ffi::gpointer,
838            f: glib::ffi::gpointer,
839        ) {
840            let f: &F = &*(f as *const F);
841            f(&from_glib_borrow(this))
842        }
843        unsafe {
844            let f: Box_<F> = Box_::new(f);
845            connect_raw(
846                self.as_ptr() as *mut _,
847                c"notify::license".as_ptr() as *const _,
848                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
849                    notify_license_trampoline::<F> as *const (),
850                )),
851                Box_::into_raw(f),
852            )
853        }
854    }
855
856    #[cfg(feature = "v1_5")]
857    #[cfg_attr(docsrs, doc(cfg(feature = "v1_5")))]
858    #[doc(alias = "license-type")]
859    pub fn connect_license_type_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
860        unsafe extern "C" fn notify_license_type_trampoline<F: Fn(&AboutDialog) + 'static>(
861            this: *mut ffi::AdwAboutDialog,
862            _param_spec: glib::ffi::gpointer,
863            f: glib::ffi::gpointer,
864        ) {
865            let f: &F = &*(f as *const F);
866            f(&from_glib_borrow(this))
867        }
868        unsafe {
869            let f: Box_<F> = Box_::new(f);
870            connect_raw(
871                self.as_ptr() as *mut _,
872                c"notify::license-type".as_ptr() as *const _,
873                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
874                    notify_license_type_trampoline::<F> as *const (),
875                )),
876                Box_::into_raw(f),
877            )
878        }
879    }
880
881    #[cfg(feature = "v1_5")]
882    #[cfg_attr(docsrs, doc(cfg(feature = "v1_5")))]
883    #[doc(alias = "release-notes")]
884    pub fn connect_release_notes_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
885        unsafe extern "C" fn notify_release_notes_trampoline<F: Fn(&AboutDialog) + 'static>(
886            this: *mut ffi::AdwAboutDialog,
887            _param_spec: glib::ffi::gpointer,
888            f: glib::ffi::gpointer,
889        ) {
890            let f: &F = &*(f as *const F);
891            f(&from_glib_borrow(this))
892        }
893        unsafe {
894            let f: Box_<F> = Box_::new(f);
895            connect_raw(
896                self.as_ptr() as *mut _,
897                c"notify::release-notes".as_ptr() as *const _,
898                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
899                    notify_release_notes_trampoline::<F> as *const (),
900                )),
901                Box_::into_raw(f),
902            )
903        }
904    }
905
906    #[cfg(feature = "v1_5")]
907    #[cfg_attr(docsrs, doc(cfg(feature = "v1_5")))]
908    #[doc(alias = "release-notes-version")]
909    pub fn connect_release_notes_version_notify<F: Fn(&Self) + 'static>(
910        &self,
911        f: F,
912    ) -> SignalHandlerId {
913        unsafe extern "C" fn notify_release_notes_version_trampoline<
914            F: Fn(&AboutDialog) + 'static,
915        >(
916            this: *mut ffi::AdwAboutDialog,
917            _param_spec: glib::ffi::gpointer,
918            f: glib::ffi::gpointer,
919        ) {
920            let f: &F = &*(f as *const F);
921            f(&from_glib_borrow(this))
922        }
923        unsafe {
924            let f: Box_<F> = Box_::new(f);
925            connect_raw(
926                self.as_ptr() as *mut _,
927                c"notify::release-notes-version".as_ptr() as *const _,
928                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
929                    notify_release_notes_version_trampoline::<F> as *const (),
930                )),
931                Box_::into_raw(f),
932            )
933        }
934    }
935
936    #[cfg(feature = "v1_5")]
937    #[cfg_attr(docsrs, doc(cfg(feature = "v1_5")))]
938    #[doc(alias = "support-url")]
939    pub fn connect_support_url_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
940        unsafe extern "C" fn notify_support_url_trampoline<F: Fn(&AboutDialog) + 'static>(
941            this: *mut ffi::AdwAboutDialog,
942            _param_spec: glib::ffi::gpointer,
943            f: glib::ffi::gpointer,
944        ) {
945            let f: &F = &*(f as *const F);
946            f(&from_glib_borrow(this))
947        }
948        unsafe {
949            let f: Box_<F> = Box_::new(f);
950            connect_raw(
951                self.as_ptr() as *mut _,
952                c"notify::support-url".as_ptr() as *const _,
953                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
954                    notify_support_url_trampoline::<F> as *const (),
955                )),
956                Box_::into_raw(f),
957            )
958        }
959    }
960
961    #[cfg(feature = "v1_5")]
962    #[cfg_attr(docsrs, doc(cfg(feature = "v1_5")))]
963    #[doc(alias = "translator-credits")]
964    pub fn connect_translator_credits_notify<F: Fn(&Self) + 'static>(
965        &self,
966        f: F,
967    ) -> SignalHandlerId {
968        unsafe extern "C" fn notify_translator_credits_trampoline<F: Fn(&AboutDialog) + 'static>(
969            this: *mut ffi::AdwAboutDialog,
970            _param_spec: glib::ffi::gpointer,
971            f: glib::ffi::gpointer,
972        ) {
973            let f: &F = &*(f as *const F);
974            f(&from_glib_borrow(this))
975        }
976        unsafe {
977            let f: Box_<F> = Box_::new(f);
978            connect_raw(
979                self.as_ptr() as *mut _,
980                c"notify::translator-credits".as_ptr() as *const _,
981                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
982                    notify_translator_credits_trampoline::<F> as *const (),
983                )),
984                Box_::into_raw(f),
985            )
986        }
987    }
988
989    #[cfg(feature = "v1_5")]
990    #[cfg_attr(docsrs, doc(cfg(feature = "v1_5")))]
991    #[doc(alias = "version")]
992    pub fn connect_version_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
993        unsafe extern "C" fn notify_version_trampoline<F: Fn(&AboutDialog) + 'static>(
994            this: *mut ffi::AdwAboutDialog,
995            _param_spec: glib::ffi::gpointer,
996            f: glib::ffi::gpointer,
997        ) {
998            let f: &F = &*(f as *const F);
999            f(&from_glib_borrow(this))
1000        }
1001        unsafe {
1002            let f: Box_<F> = Box_::new(f);
1003            connect_raw(
1004                self.as_ptr() as *mut _,
1005                c"notify::version".as_ptr() as *const _,
1006                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1007                    notify_version_trampoline::<F> as *const (),
1008                )),
1009                Box_::into_raw(f),
1010            )
1011        }
1012    }
1013
1014    #[cfg(feature = "v1_5")]
1015    #[cfg_attr(docsrs, doc(cfg(feature = "v1_5")))]
1016    #[doc(alias = "website")]
1017    pub fn connect_website_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1018        unsafe extern "C" fn notify_website_trampoline<F: Fn(&AboutDialog) + 'static>(
1019            this: *mut ffi::AdwAboutDialog,
1020            _param_spec: glib::ffi::gpointer,
1021            f: glib::ffi::gpointer,
1022        ) {
1023            let f: &F = &*(f as *const F);
1024            f(&from_glib_borrow(this))
1025        }
1026        unsafe {
1027            let f: Box_<F> = Box_::new(f);
1028            connect_raw(
1029                self.as_ptr() as *mut _,
1030                c"notify::website".as_ptr() as *const _,
1031                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1032                    notify_website_trampoline::<F> as *const (),
1033                )),
1034                Box_::into_raw(f),
1035            )
1036        }
1037    }
1038}
1039
1040#[cfg(feature = "v1_5")]
1041#[cfg_attr(docsrs, doc(cfg(feature = "v1_5")))]
1042impl Default for AboutDialog {
1043    fn default() -> Self {
1044        Self::new()
1045    }
1046}
1047
1048// rustdoc-stripper-ignore-next
1049/// A [builder-pattern] type to construct [`AboutDialog`] objects.
1050///
1051/// [builder-pattern]: https://doc.rust-lang.org/1.0.0/style/ownership/builders.html
1052#[must_use = "The builder must be built to be used"]
1053pub struct AboutDialogBuilder {
1054    builder: glib::object::ObjectBuilder<'static, AboutDialog>,
1055}
1056
1057impl AboutDialogBuilder {
1058    fn new() -> Self {
1059        Self {
1060            builder: glib::object::Object::builder(),
1061        }
1062    }
1063
1064    #[cfg(feature = "v1_5")]
1065    #[cfg_attr(docsrs, doc(cfg(feature = "v1_5")))]
1066    pub fn application_icon(self, application_icon: impl Into<glib::GString>) -> Self {
1067        Self {
1068            builder: self
1069                .builder
1070                .property("application-icon", application_icon.into()),
1071        }
1072    }
1073
1074    #[cfg(feature = "v1_5")]
1075    #[cfg_attr(docsrs, doc(cfg(feature = "v1_5")))]
1076    pub fn application_name(self, application_name: impl Into<glib::GString>) -> Self {
1077        Self {
1078            builder: self
1079                .builder
1080                .property("application-name", application_name.into()),
1081        }
1082    }
1083
1084    #[cfg(feature = "v1_5")]
1085    #[cfg_attr(docsrs, doc(cfg(feature = "v1_5")))]
1086    pub fn artists(self, artists: impl Into<glib::StrV>) -> Self {
1087        Self {
1088            builder: self.builder.property("artists", artists.into()),
1089        }
1090    }
1091
1092    #[cfg(feature = "v1_5")]
1093    #[cfg_attr(docsrs, doc(cfg(feature = "v1_5")))]
1094    pub fn comments(self, comments: impl Into<glib::GString>) -> Self {
1095        Self {
1096            builder: self.builder.property("comments", comments.into()),
1097        }
1098    }
1099
1100    #[cfg(feature = "v1_5")]
1101    #[cfg_attr(docsrs, doc(cfg(feature = "v1_5")))]
1102    pub fn copyright(self, copyright: impl Into<glib::GString>) -> Self {
1103        Self {
1104            builder: self.builder.property("copyright", copyright.into()),
1105        }
1106    }
1107
1108    #[cfg(feature = "v1_5")]
1109    #[cfg_attr(docsrs, doc(cfg(feature = "v1_5")))]
1110    pub fn debug_info(self, debug_info: impl Into<glib::GString>) -> Self {
1111        Self {
1112            builder: self.builder.property("debug-info", debug_info.into()),
1113        }
1114    }
1115
1116    #[cfg(feature = "v1_5")]
1117    #[cfg_attr(docsrs, doc(cfg(feature = "v1_5")))]
1118    pub fn debug_info_filename(self, debug_info_filename: impl Into<glib::GString>) -> Self {
1119        Self {
1120            builder: self
1121                .builder
1122                .property("debug-info-filename", debug_info_filename.into()),
1123        }
1124    }
1125
1126    #[cfg(feature = "v1_5")]
1127    #[cfg_attr(docsrs, doc(cfg(feature = "v1_5")))]
1128    pub fn designers(self, designers: impl Into<glib::StrV>) -> Self {
1129        Self {
1130            builder: self.builder.property("designers", designers.into()),
1131        }
1132    }
1133
1134    #[cfg(feature = "v1_5")]
1135    #[cfg_attr(docsrs, doc(cfg(feature = "v1_5")))]
1136    pub fn developer_name(self, developer_name: impl Into<glib::GString>) -> Self {
1137        Self {
1138            builder: self
1139                .builder
1140                .property("developer-name", developer_name.into()),
1141        }
1142    }
1143
1144    #[cfg(feature = "v1_5")]
1145    #[cfg_attr(docsrs, doc(cfg(feature = "v1_5")))]
1146    pub fn developers(self, developers: impl Into<glib::StrV>) -> Self {
1147        Self {
1148            builder: self.builder.property("developers", developers.into()),
1149        }
1150    }
1151
1152    #[cfg(feature = "v1_5")]
1153    #[cfg_attr(docsrs, doc(cfg(feature = "v1_5")))]
1154    pub fn documenters(self, documenters: impl Into<glib::StrV>) -> Self {
1155        Self {
1156            builder: self.builder.property("documenters", documenters.into()),
1157        }
1158    }
1159
1160    #[cfg(feature = "v1_5")]
1161    #[cfg_attr(docsrs, doc(cfg(feature = "v1_5")))]
1162    pub fn issue_url(self, issue_url: impl Into<glib::GString>) -> Self {
1163        Self {
1164            builder: self.builder.property("issue-url", issue_url.into()),
1165        }
1166    }
1167
1168    #[cfg(feature = "v1_5")]
1169    #[cfg_attr(docsrs, doc(cfg(feature = "v1_5")))]
1170    pub fn license(self, license: impl Into<glib::GString>) -> Self {
1171        Self {
1172            builder: self.builder.property("license", license.into()),
1173        }
1174    }
1175
1176    #[cfg(feature = "v1_5")]
1177    #[cfg_attr(docsrs, doc(cfg(feature = "v1_5")))]
1178    pub fn license_type(self, license_type: gtk::License) -> Self {
1179        Self {
1180            builder: self.builder.property("license-type", license_type),
1181        }
1182    }
1183
1184    #[cfg(feature = "v1_5")]
1185    #[cfg_attr(docsrs, doc(cfg(feature = "v1_5")))]
1186    pub fn release_notes(self, release_notes: impl Into<glib::GString>) -> Self {
1187        Self {
1188            builder: self.builder.property("release-notes", release_notes.into()),
1189        }
1190    }
1191
1192    #[cfg(feature = "v1_5")]
1193    #[cfg_attr(docsrs, doc(cfg(feature = "v1_5")))]
1194    pub fn release_notes_version(self, release_notes_version: impl Into<glib::GString>) -> Self {
1195        Self {
1196            builder: self
1197                .builder
1198                .property("release-notes-version", release_notes_version.into()),
1199        }
1200    }
1201
1202    #[cfg(feature = "v1_5")]
1203    #[cfg_attr(docsrs, doc(cfg(feature = "v1_5")))]
1204    pub fn support_url(self, support_url: impl Into<glib::GString>) -> Self {
1205        Self {
1206            builder: self.builder.property("support-url", support_url.into()),
1207        }
1208    }
1209
1210    #[cfg(feature = "v1_5")]
1211    #[cfg_attr(docsrs, doc(cfg(feature = "v1_5")))]
1212    pub fn translator_credits(self, translator_credits: impl Into<glib::GString>) -> Self {
1213        Self {
1214            builder: self
1215                .builder
1216                .property("translator-credits", translator_credits.into()),
1217        }
1218    }
1219
1220    #[cfg(feature = "v1_5")]
1221    #[cfg_attr(docsrs, doc(cfg(feature = "v1_5")))]
1222    pub fn version(self, version: impl Into<glib::GString>) -> Self {
1223        Self {
1224            builder: self.builder.property("version", version.into()),
1225        }
1226    }
1227
1228    #[cfg(feature = "v1_5")]
1229    #[cfg_attr(docsrs, doc(cfg(feature = "v1_5")))]
1230    pub fn website(self, website: impl Into<glib::GString>) -> Self {
1231        Self {
1232            builder: self.builder.property("website", website.into()),
1233        }
1234    }
1235
1236    #[cfg(feature = "v1_5")]
1237    #[cfg_attr(docsrs, doc(cfg(feature = "v1_5")))]
1238    pub fn can_close(self, can_close: bool) -> Self {
1239        Self {
1240            builder: self.builder.property("can-close", can_close),
1241        }
1242    }
1243
1244    #[cfg(feature = "v1_5")]
1245    #[cfg_attr(docsrs, doc(cfg(feature = "v1_5")))]
1246    pub fn child(self, child: &impl IsA<gtk::Widget>) -> Self {
1247        Self {
1248            builder: self.builder.property("child", child.clone().upcast()),
1249        }
1250    }
1251
1252    #[cfg(feature = "v1_5")]
1253    #[cfg_attr(docsrs, doc(cfg(feature = "v1_5")))]
1254    pub fn content_height(self, content_height: i32) -> Self {
1255        Self {
1256            builder: self.builder.property("content-height", content_height),
1257        }
1258    }
1259
1260    #[cfg(feature = "v1_5")]
1261    #[cfg_attr(docsrs, doc(cfg(feature = "v1_5")))]
1262    pub fn content_width(self, content_width: i32) -> Self {
1263        Self {
1264            builder: self.builder.property("content-width", content_width),
1265        }
1266    }
1267
1268    #[cfg(feature = "v1_5")]
1269    #[cfg_attr(docsrs, doc(cfg(feature = "v1_5")))]
1270    pub fn default_widget(self, default_widget: &impl IsA<gtk::Widget>) -> Self {
1271        Self {
1272            builder: self
1273                .builder
1274                .property("default-widget", default_widget.clone().upcast()),
1275        }
1276    }
1277
1278    #[cfg(feature = "v1_5")]
1279    #[cfg_attr(docsrs, doc(cfg(feature = "v1_5")))]
1280    pub fn focus_widget(self, focus_widget: &impl IsA<gtk::Widget>) -> Self {
1281        Self {
1282            builder: self
1283                .builder
1284                .property("focus-widget", focus_widget.clone().upcast()),
1285        }
1286    }
1287
1288    #[cfg(feature = "v1_5")]
1289    #[cfg_attr(docsrs, doc(cfg(feature = "v1_5")))]
1290    pub fn follows_content_size(self, follows_content_size: bool) -> Self {
1291        Self {
1292            builder: self
1293                .builder
1294                .property("follows-content-size", follows_content_size),
1295        }
1296    }
1297
1298    #[cfg(feature = "v1_5")]
1299    #[cfg_attr(docsrs, doc(cfg(feature = "v1_5")))]
1300    pub fn presentation_mode(self, presentation_mode: DialogPresentationMode) -> Self {
1301        Self {
1302            builder: self
1303                .builder
1304                .property("presentation-mode", presentation_mode),
1305        }
1306    }
1307
1308    #[cfg(feature = "v1_5")]
1309    #[cfg_attr(docsrs, doc(cfg(feature = "v1_5")))]
1310    pub fn title(self, title: impl Into<glib::GString>) -> Self {
1311        Self {
1312            builder: self.builder.property("title", title.into()),
1313        }
1314    }
1315
1316    pub fn can_focus(self, can_focus: bool) -> Self {
1317        Self {
1318            builder: self.builder.property("can-focus", can_focus),
1319        }
1320    }
1321
1322    pub fn can_target(self, can_target: bool) -> Self {
1323        Self {
1324            builder: self.builder.property("can-target", can_target),
1325        }
1326    }
1327
1328    pub fn css_classes(self, css_classes: impl Into<glib::StrV>) -> Self {
1329        Self {
1330            builder: self.builder.property("css-classes", css_classes.into()),
1331        }
1332    }
1333
1334    pub fn css_name(self, css_name: impl Into<glib::GString>) -> Self {
1335        Self {
1336            builder: self.builder.property("css-name", css_name.into()),
1337        }
1338    }
1339
1340    pub fn cursor(self, cursor: &gdk::Cursor) -> Self {
1341        Self {
1342            builder: self.builder.property("cursor", cursor.clone()),
1343        }
1344    }
1345
1346    pub fn focus_on_click(self, focus_on_click: bool) -> Self {
1347        Self {
1348            builder: self.builder.property("focus-on-click", focus_on_click),
1349        }
1350    }
1351
1352    pub fn focusable(self, focusable: bool) -> Self {
1353        Self {
1354            builder: self.builder.property("focusable", focusable),
1355        }
1356    }
1357
1358    pub fn halign(self, halign: gtk::Align) -> Self {
1359        Self {
1360            builder: self.builder.property("halign", halign),
1361        }
1362    }
1363
1364    pub fn has_tooltip(self, has_tooltip: bool) -> Self {
1365        Self {
1366            builder: self.builder.property("has-tooltip", has_tooltip),
1367        }
1368    }
1369
1370    pub fn height_request(self, height_request: i32) -> Self {
1371        Self {
1372            builder: self.builder.property("height-request", height_request),
1373        }
1374    }
1375
1376    pub fn hexpand(self, hexpand: bool) -> Self {
1377        Self {
1378            builder: self.builder.property("hexpand", hexpand),
1379        }
1380    }
1381
1382    pub fn hexpand_set(self, hexpand_set: bool) -> Self {
1383        Self {
1384            builder: self.builder.property("hexpand-set", hexpand_set),
1385        }
1386    }
1387
1388    pub fn layout_manager(self, layout_manager: &impl IsA<gtk::LayoutManager>) -> Self {
1389        Self {
1390            builder: self
1391                .builder
1392                .property("layout-manager", layout_manager.clone().upcast()),
1393        }
1394    }
1395
1396    #[cfg(feature = "gtk_v4_18")]
1397    #[cfg_attr(docsrs, doc(cfg(feature = "gtk_v4_18")))]
1398    pub fn limit_events(self, limit_events: bool) -> Self {
1399        Self {
1400            builder: self.builder.property("limit-events", limit_events),
1401        }
1402    }
1403
1404    pub fn margin_bottom(self, margin_bottom: i32) -> Self {
1405        Self {
1406            builder: self.builder.property("margin-bottom", margin_bottom),
1407        }
1408    }
1409
1410    pub fn margin_end(self, margin_end: i32) -> Self {
1411        Self {
1412            builder: self.builder.property("margin-end", margin_end),
1413        }
1414    }
1415
1416    pub fn margin_start(self, margin_start: i32) -> Self {
1417        Self {
1418            builder: self.builder.property("margin-start", margin_start),
1419        }
1420    }
1421
1422    pub fn margin_top(self, margin_top: i32) -> Self {
1423        Self {
1424            builder: self.builder.property("margin-top", margin_top),
1425        }
1426    }
1427
1428    pub fn name(self, name: impl Into<glib::GString>) -> Self {
1429        Self {
1430            builder: self.builder.property("name", name.into()),
1431        }
1432    }
1433
1434    pub fn opacity(self, opacity: f64) -> Self {
1435        Self {
1436            builder: self.builder.property("opacity", opacity),
1437        }
1438    }
1439
1440    pub fn overflow(self, overflow: gtk::Overflow) -> Self {
1441        Self {
1442            builder: self.builder.property("overflow", overflow),
1443        }
1444    }
1445
1446    pub fn receives_default(self, receives_default: bool) -> Self {
1447        Self {
1448            builder: self.builder.property("receives-default", receives_default),
1449        }
1450    }
1451
1452    pub fn sensitive(self, sensitive: bool) -> Self {
1453        Self {
1454            builder: self.builder.property("sensitive", sensitive),
1455        }
1456    }
1457
1458    pub fn tooltip_markup(self, tooltip_markup: impl Into<glib::GString>) -> Self {
1459        Self {
1460            builder: self
1461                .builder
1462                .property("tooltip-markup", tooltip_markup.into()),
1463        }
1464    }
1465
1466    pub fn tooltip_text(self, tooltip_text: impl Into<glib::GString>) -> Self {
1467        Self {
1468            builder: self.builder.property("tooltip-text", tooltip_text.into()),
1469        }
1470    }
1471
1472    pub fn valign(self, valign: gtk::Align) -> Self {
1473        Self {
1474            builder: self.builder.property("valign", valign),
1475        }
1476    }
1477
1478    pub fn vexpand(self, vexpand: bool) -> Self {
1479        Self {
1480            builder: self.builder.property("vexpand", vexpand),
1481        }
1482    }
1483
1484    pub fn vexpand_set(self, vexpand_set: bool) -> Self {
1485        Self {
1486            builder: self.builder.property("vexpand-set", vexpand_set),
1487        }
1488    }
1489
1490    pub fn visible(self, visible: bool) -> Self {
1491        Self {
1492            builder: self.builder.property("visible", visible),
1493        }
1494    }
1495
1496    pub fn width_request(self, width_request: i32) -> Self {
1497        Self {
1498            builder: self.builder.property("width-request", width_request),
1499        }
1500    }
1501
1502    pub fn accessible_role(self, accessible_role: gtk::AccessibleRole) -> Self {
1503        Self {
1504            builder: self.builder.property("accessible-role", accessible_role),
1505        }
1506    }
1507
1508    // rustdoc-stripper-ignore-next
1509    /// Build the [`AboutDialog`].
1510    #[must_use = "Building the object from the builder is usually expensive and is not expected to have side effects"]
1511    pub fn build(self) -> AboutDialog {
1512        assert_initialized_main_thread!();
1513        self.builder.build()
1514    }
1515}