gtk4/auto/
about_dialog.rs

1// This file was generated by gir (https://github.com/gtk-rs/gir)
2// from gir-files (https://github.com/gtk-rs/gir-files)
3// DO NOT EDIT
4
5use crate::{
6    ffi, Accessible, AccessibleRole, Align, Application, Buildable, ConstraintTarget,
7    LayoutManager, License, Native, Overflow, Root, ShortcutManager, Widget, Window,
8};
9use glib::{
10    object::ObjectType as _,
11    prelude::*,
12    signal::{connect_raw, SignalHandlerId},
13    translate::*,
14};
15use std::boxed::Box as Box_;
16
17glib::wrapper! {
18    /// A simple way to display information about a program.
19    ///
20    /// The shown information includes the programs' logo, name, copyright,
21    /// website and license. It is also possible to give credits to the authors,
22    /// documenters, translators and artists who have worked on the program.
23    ///
24    /// An about dialog is typically opened when the user selects the `About`
25    /// option from the `Help` menu. All parts of the dialog are optional.
26    ///
27    /// ![An example GtkAboutDialog](aboutdialog.png)
28    ///
29    /// About dialogs often contain links and email addresses. [`AboutDialog`][crate::AboutDialog]
30    /// displays these as clickable links. By default, it calls [`FileLauncher::launch()`][crate::FileLauncher::launch()]
31    /// when a user clicks one. The behaviour can be overridden with the
32    /// [`activate-link`][struct@crate::AboutDialog#activate-link] signal.
33    ///
34    /// To specify a person with an email address, use a string like
35    /// `Edgar Allan Poe <edgar@poe.com>`. To specify a website with a title,
36    /// use a string like `GTK team https://www.gtk.org`.
37    ///
38    /// To make constructing an about dialog as convenient as possible, you can
39    /// use the function [`show_about_dialog()`][crate::show_about_dialog()] which constructs and shows
40    /// a dialog and keeps it around so that it can be shown again.
41    ///
42    /// Note that GTK sets a default title of `_("About `s`")` on the dialog
43    /// window (where ``s`` is replaced by the name of the application, but in
44    /// order to ensure proper translation of the title, applications should
45    /// set the title property explicitly when constructing an about dialog,
46    /// as shown in the following example:
47    ///
48    /// **⚠️ The following code is in c ⚠️**
49    ///
50    /// ```c
51    /// GFile *logo_file = g_file_new_for_path ("./logo.png");
52    /// GdkTexture *example_logo = gdk_texture_new_from_file (logo_file, NULL);
53    /// g_object_unref (logo_file);
54    ///
55    /// gtk_show_about_dialog (NULL,
56    ///                        "program-name", "ExampleCode",
57    ///                        "logo", example_logo,
58    ///                        "title", _("About ExampleCode"),
59    ///                        NULL);
60    /// ```
61    ///
62    /// ## Shortcuts and Gestures
63    ///
64    /// [`AboutDialog`][crate::AboutDialog] supports the following keyboard shortcuts:
65    ///
66    /// - <kbd>Escape</kbd> closes the window.
67    ///
68    /// ## CSS nodes
69    ///
70    /// [`AboutDialog`][crate::AboutDialog] has a single CSS node with the name `window` and style
71    /// class `.aboutdialog`.
72    ///
73    /// ## Properties
74    ///
75    ///
76    /// #### `artists`
77    ///  The people who contributed artwork to the program.
78    ///
79    /// Each string may contain email addresses and URLs, which will be displayed
80    /// as links.
81    ///
82    /// Readable | Writeable
83    ///
84    ///
85    /// #### `authors`
86    ///  The authors of the program.
87    ///
88    /// Each string may contain email addresses and URLs, which will be displayed
89    /// as links, see the introduction for more details.
90    ///
91    /// Readable | Writeable
92    ///
93    ///
94    /// #### `comments`
95    ///  Comments about the program.
96    ///
97    /// This string is displayed in a label in the main dialog, thus it
98    /// should be a short explanation of the main purpose of the program,
99    /// not a detailed list of features.
100    ///
101    /// Readable | Writeable
102    ///
103    ///
104    /// #### `copyright`
105    ///  Copyright information for the program.
106    ///
107    /// Readable | Writeable
108    ///
109    ///
110    /// #### `documenters`
111    ///  The people documenting the program.
112    ///
113    /// Each string may contain email addresses and URLs, which will be displayed
114    /// as links, see the introduction for more details.
115    ///
116    /// Readable | Writeable
117    ///
118    ///
119    /// #### `license`
120    ///  The license of the program, as free-form text.
121    ///
122    /// This string is displayed in a text view in a secondary dialog, therefore
123    /// it is fine to use a long multi-paragraph text. Note that the text is only
124    /// wrapped in the text view if the "wrap-license" property is set to `TRUE`;
125    /// otherwise the text itself must contain the intended linebreaks.
126    ///
127    /// When setting this property to a non-`NULL` value, the
128    /// [`license-type`][struct@crate::AboutDialog#license-type] property is set to
129    /// [enum@Gtk.License.custom] as a side effect.
130    ///
131    /// The text may contain links in this format `<http://www.some.place/>`
132    /// and email references in the form `<mail-to@some.body>`, and these will
133    /// be converted into clickable links.
134    ///
135    /// Readable | Writeable
136    ///
137    ///
138    /// #### `license-type`
139    ///  The license of the program.
140    ///
141    /// The [`AboutDialog`][crate::AboutDialog] will automatically fill out a standard disclaimer
142    /// and link the user to the appropriate online resource for the license
143    /// text.
144    ///
145    /// If [enum@Gtk.License.unknown] is used, the link used will be the same
146    /// specified in the [`website`][struct@crate::AboutDialog#website] property.
147    ///
148    /// If [enum@Gtk.License.custom] is used, the current contents of the
149    /// [`license`][struct@crate::AboutDialog#license] property are used.
150    ///
151    /// For any other [`License`][crate::License] value, the contents of the
152    /// [`license`][struct@crate::AboutDialog#license] property are also set by
153    /// this property as a side effect.
154    ///
155    /// Readable | Writeable
156    ///
157    ///
158    /// #### `logo`
159    ///  A logo for the about box.
160    ///
161    /// If it is `NULL`, the default window icon set with
162    /// [`Window::set_default_icon_name()`][crate::Window::set_default_icon_name()] will be used.
163    ///
164    /// Readable | Writeable
165    ///
166    ///
167    /// #### `logo-icon-name`
168    ///  A named icon to use as the logo for the about box.
169    ///
170    /// This property overrides the [`logo`][struct@crate::AboutDialog#logo] property.
171    ///
172    /// Readable | Writeable
173    ///
174    ///
175    /// #### `program-name`
176    ///  The name of the program.
177    ///
178    /// If this is not set, it defaults to the value returned by
179    /// `get_application_name()`.
180    ///
181    /// Readable | Writeable
182    ///
183    ///
184    /// #### `system-information`
185    ///  Information about the system on which the program is running.
186    ///
187    /// This information is displayed in a separate page, therefore it is fine
188    /// to use a long multi-paragraph text. Note that the text should contain
189    /// the intended linebreaks.
190    ///
191    /// The text may contain links in this format `<http://www.some.place/>`
192    /// and email references in the form `<mail-to@some.body>`, and these will
193    /// be converted into clickable links.
194    ///
195    /// Readable | Writeable
196    ///
197    ///
198    /// #### `translator-credits`
199    ///  Credits to the translators.
200    ///
201    /// This string should be marked as translatable.
202    ///
203    /// The string may contain email addresses and URLs, which will be displayed
204    /// as links, see the introduction for more details.
205    ///
206    /// Readable | Writeable
207    ///
208    ///
209    /// #### `version`
210    ///  The version of the program.
211    ///
212    /// Readable | Writeable
213    ///
214    ///
215    /// #### `website`
216    ///  The URL for the link to the website of the program.
217    ///
218    /// This should be a string starting with `http://` or `https://`.
219    ///
220    /// Readable | Writeable
221    ///
222    ///
223    /// #### `website-label`
224    ///  The label for the link to the website of the program.
225    ///
226    /// Readable | Writeable
227    ///
228    ///
229    /// #### `wrap-license`
230    ///  Whether to wrap the text in the license dialog.
231    ///
232    /// Readable | Writeable
233    /// <details><summary><h4>Window</h4></summary>
234    ///
235    ///
236    /// #### `application`
237    ///  The [`Application`][crate::Application] associated with the window.
238    ///
239    /// The application will be kept alive for at least as long as it
240    /// has any windows associated with it (see g_application_hold()
241    /// for a way to keep it alive without windows).
242    ///
243    /// Normally, the connection between the application and the window
244    /// will remain until the window is destroyed, but you can explicitly
245    /// remove it by setting the this property to `NULL`.
246    ///
247    /// Readable | Writeable
248    ///
249    ///
250    /// #### `child`
251    ///  The child widget.
252    ///
253    /// Readable | Writeable
254    ///
255    ///
256    /// #### `decorated`
257    ///  Whether the window should have a frame (also known as *decorations*).
258    ///
259    /// Readable | Writeable
260    ///
261    ///
262    /// #### `default-height`
263    ///  The default height of the window.
264    ///
265    /// Readable | Writeable
266    ///
267    ///
268    /// #### `default-widget`
269    ///  The default widget.
270    ///
271    /// Readable | Writeable
272    ///
273    ///
274    /// #### `default-width`
275    ///  The default width of the window.
276    ///
277    /// Readable | Writeable
278    ///
279    ///
280    /// #### `deletable`
281    ///  Whether the window frame should have a close button.
282    ///
283    /// Readable | Writeable
284    ///
285    ///
286    /// #### `destroy-with-parent`
287    ///  If this window should be destroyed when the parent is destroyed.
288    ///
289    /// Readable | Writeable
290    ///
291    ///
292    /// #### `display`
293    ///  The display that will display this window.
294    ///
295    /// Readable | Writeable
296    ///
297    ///
298    /// #### `focus-visible`
299    ///  Whether 'focus rectangles' are currently visible in this window.
300    ///
301    /// This property is maintained by GTK based on user input
302    /// and should not be set by applications.
303    ///
304    /// Readable | Writeable
305    ///
306    ///
307    /// #### `focus-widget`
308    ///  The focus widget.
309    ///
310    /// Readable | Writeable
311    ///
312    ///
313    /// #### `fullscreened`
314    ///  Whether the window is fullscreen.
315    ///
316    /// Setting this property is the equivalent of calling
317    /// [`GtkWindowExt::fullscreen()`][crate::prelude::GtkWindowExt::fullscreen()] or [`GtkWindowExt::unfullscreen()`][crate::prelude::GtkWindowExt::unfullscreen()];
318    /// either operation is asynchronous, which means you will need to
319    /// connect to the ::notify signal in order to know whether the
320    /// operation was successful.
321    ///
322    /// Readable | Writeable | Construct
323    ///
324    ///
325    /// #### `handle-menubar-accel`
326    ///  Whether the window frame should handle <kbd>F10</kbd> for activating
327    /// menubars.
328    ///
329    /// Readable | Writeable
330    ///
331    ///
332    /// #### `hide-on-close`
333    ///  If this window should be hidden when the users clicks the close button.
334    ///
335    /// Readable | Writeable
336    ///
337    ///
338    /// #### `icon-name`
339    ///  Specifies the name of the themed icon to use as the window icon.
340    ///
341    /// See [`IconTheme`][crate::IconTheme] for more details.
342    ///
343    /// Readable | Writeable
344    ///
345    ///
346    /// #### `is-active`
347    ///  Whether the toplevel is the currently active window.
348    ///
349    /// Readable
350    ///
351    ///
352    /// #### `maximized`
353    ///  Whether the window is maximized.
354    ///
355    /// Setting this property is the equivalent of calling
356    /// [`GtkWindowExt::maximize()`][crate::prelude::GtkWindowExt::maximize()] or [`GtkWindowExt::unmaximize()`][crate::prelude::GtkWindowExt::unmaximize()];
357    /// either operation is asynchronous, which means you will need to
358    /// connect to the ::notify signal in order to know whether the
359    /// operation was successful.
360    ///
361    /// Readable | Writeable | Construct
362    ///
363    ///
364    /// #### `mnemonics-visible`
365    ///  Whether mnemonics are currently visible in this window.
366    ///
367    /// This property is maintained by GTK based on user input,
368    /// and should not be set by applications.
369    ///
370    /// Readable | Writeable
371    ///
372    ///
373    /// #### `modal`
374    ///  If true, the window is modal.
375    ///
376    /// Readable | Writeable
377    ///
378    ///
379    /// #### `resizable`
380    ///  If true, users can resize the window.
381    ///
382    /// Readable | Writeable
383    ///
384    ///
385    /// #### `startup-id`
386    ///  A write-only property for setting window's startup notification identifier.
387    ///
388    /// Writeable
389    ///
390    ///
391    /// #### `suspended`
392    ///  Whether the window is suspended.
393    ///
394    /// See [`GtkWindowExt::is_suspended()`][crate::prelude::GtkWindowExt::is_suspended()] for details about what suspended means.
395    ///
396    /// Readable
397    ///
398    ///
399    /// #### `title`
400    ///  The title of the window.
401    ///
402    /// Readable | Writeable
403    ///
404    ///
405    /// #### `titlebar`
406    ///  The titlebar widget.
407    ///
408    /// Readable | Writeable
409    ///
410    ///
411    /// #### `transient-for`
412    ///  The transient parent of the window.
413    ///
414    /// Readable | Writeable | Construct
415    /// </details>
416    /// <details><summary><h4>Widget</h4></summary>
417    ///
418    ///
419    /// #### `can-focus`
420    ///  Whether the widget or any of its descendents can accept
421    /// the input focus.
422    ///
423    /// This property is meant to be set by widget implementations,
424    /// typically in their instance init function.
425    ///
426    /// Readable | Writeable
427    ///
428    ///
429    /// #### `can-target`
430    ///  Whether the widget can receive pointer events.
431    ///
432    /// Readable | Writeable
433    ///
434    ///
435    /// #### `css-classes`
436    ///  A list of css classes applied to this widget.
437    ///
438    /// Readable | Writeable
439    ///
440    ///
441    /// #### `css-name`
442    ///  The name of this widget in the CSS tree.
443    ///
444    /// This property is meant to be set by widget implementations,
445    /// typically in their instance init function.
446    ///
447    /// Readable | Writeable | Construct Only
448    ///
449    ///
450    /// #### `cursor`
451    ///  The cursor used by @widget.
452    ///
453    /// Readable | Writeable
454    ///
455    ///
456    /// #### `focus-on-click`
457    ///  Whether the widget should grab focus when it is clicked with the mouse.
458    ///
459    /// This property is only relevant for widgets that can take focus.
460    ///
461    /// Readable | Writeable
462    ///
463    ///
464    /// #### `focusable`
465    ///  Whether this widget itself will accept the input focus.
466    ///
467    /// Readable | Writeable
468    ///
469    ///
470    /// #### `halign`
471    ///  How to distribute horizontal space if widget gets extra space.
472    ///
473    /// Readable | Writeable
474    ///
475    ///
476    /// #### `has-default`
477    ///  Whether the widget is the default widget.
478    ///
479    /// Readable
480    ///
481    ///
482    /// #### `has-focus`
483    ///  Whether the widget has the input focus.
484    ///
485    /// Readable
486    ///
487    ///
488    /// #### `has-tooltip`
489    ///  Enables or disables the emission of the [`query-tooltip`][struct@crate::Widget#query-tooltip]
490    /// signal on @widget.
491    ///
492    /// A true value indicates that @widget can have a tooltip, in this case
493    /// the widget will be queried using [`query-tooltip`][struct@crate::Widget#query-tooltip] to
494    /// determine whether it will provide a tooltip or not.
495    ///
496    /// Readable | Writeable
497    ///
498    ///
499    /// #### `height-request`
500    ///  Overrides for height request of the widget.
501    ///
502    /// If this is -1, the natural request will be used.
503    ///
504    /// Readable | Writeable
505    ///
506    ///
507    /// #### `hexpand`
508    ///  Whether to expand horizontally.
509    ///
510    /// Readable | Writeable
511    ///
512    ///
513    /// #### `hexpand-set`
514    ///  Whether to use the `hexpand` property.
515    ///
516    /// Readable | Writeable
517    ///
518    ///
519    /// #### `layout-manager`
520    ///  The [`LayoutManager`][crate::LayoutManager] instance to use to compute
521    /// the preferred size of the widget, and allocate its children.
522    ///
523    /// This property is meant to be set by widget implementations,
524    /// typically in their instance init function.
525    ///
526    /// Readable | Writeable
527    ///
528    ///
529    /// #### `limit-events`
530    ///  Makes this widget act like a modal dialog, with respect to
531    /// event delivery.
532    ///
533    /// Global event controllers will not handle events with targets
534    /// inside the widget, unless they are set up to ignore propagation
535    /// limits. See [`EventControllerExt::set_propagation_limit()`][crate::prelude::EventControllerExt::set_propagation_limit()].
536    ///
537    /// Readable | Writeable
538    ///
539    ///
540    /// #### `margin-bottom`
541    ///  Margin on bottom side of widget.
542    ///
543    /// This property adds margin outside of the widget's normal size
544    /// request, the margin will be added in addition to the size from
545    /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
546    ///
547    /// Readable | Writeable
548    ///
549    ///
550    /// #### `margin-end`
551    ///  Margin on end of widget, horizontally.
552    ///
553    /// This property supports left-to-right and right-to-left text
554    /// directions.
555    ///
556    /// This property adds margin outside of the widget's normal size
557    /// request, the margin will be added in addition to the size from
558    /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
559    ///
560    /// Readable | Writeable
561    ///
562    ///
563    /// #### `margin-start`
564    ///  Margin on start of widget, horizontally.
565    ///
566    /// This property supports left-to-right and right-to-left text
567    /// directions.
568    ///
569    /// This property adds margin outside of the widget's normal size
570    /// request, the margin will be added in addition to the size from
571    /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
572    ///
573    /// Readable | Writeable
574    ///
575    ///
576    /// #### `margin-top`
577    ///  Margin on top side of widget.
578    ///
579    /// This property adds margin outside of the widget's normal size
580    /// request, the margin will be added in addition to the size from
581    /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
582    ///
583    /// Readable | Writeable
584    ///
585    ///
586    /// #### `name`
587    ///  The name of the widget.
588    ///
589    /// Readable | Writeable
590    ///
591    ///
592    /// #### `opacity`
593    ///  The requested opacity of the widget.
594    ///
595    /// Readable | Writeable
596    ///
597    ///
598    /// #### `overflow`
599    ///  How content outside the widget's content area is treated.
600    ///
601    /// This property is meant to be set by widget implementations,
602    /// typically in their instance init function.
603    ///
604    /// Readable | Writeable
605    ///
606    ///
607    /// #### `parent`
608    ///  The parent widget of this widget.
609    ///
610    /// Readable
611    ///
612    ///
613    /// #### `receives-default`
614    ///  Whether the widget will receive the default action when it is focused.
615    ///
616    /// Readable | Writeable
617    ///
618    ///
619    /// #### `root`
620    ///  The [`Root`][crate::Root] widget of the widget tree containing this widget.
621    ///
622    /// This will be `NULL` if the widget is not contained in a root widget.
623    ///
624    /// Readable
625    ///
626    ///
627    /// #### `scale-factor`
628    ///  The scale factor of the widget.
629    ///
630    /// Readable
631    ///
632    ///
633    /// #### `sensitive`
634    ///  Whether the widget responds to input.
635    ///
636    /// Readable | Writeable
637    ///
638    ///
639    /// #### `tooltip-markup`
640    ///  Sets the text of tooltip to be the given string, which is marked up
641    /// with Pango markup.
642    ///
643    /// Also see [`Tooltip::set_markup()`][crate::Tooltip::set_markup()].
644    ///
645    /// This is a convenience property which will take care of getting the
646    /// tooltip shown if the given string is not `NULL`:
647    /// [`has-tooltip`][struct@crate::Widget#has-tooltip] will automatically be set to true
648    /// and there will be taken care of [`query-tooltip`][struct@crate::Widget#query-tooltip] in
649    /// the default signal handler.
650    ///
651    /// Note that if both [`tooltip-text`][struct@crate::Widget#tooltip-text] and
652    /// [`tooltip-markup`][struct@crate::Widget#tooltip-markup] are set, the last one wins.
653    ///
654    /// Readable | Writeable
655    ///
656    ///
657    /// #### `tooltip-text`
658    ///  Sets the text of tooltip to be the given string.
659    ///
660    /// Also see [`Tooltip::set_text()`][crate::Tooltip::set_text()].
661    ///
662    /// This is a convenience property which will take care of getting the
663    /// tooltip shown if the given string is not `NULL`:
664    /// [`has-tooltip`][struct@crate::Widget#has-tooltip] will automatically be set to true
665    /// and there will be taken care of [`query-tooltip`][struct@crate::Widget#query-tooltip] in
666    /// the default signal handler.
667    ///
668    /// Note that if both [`tooltip-text`][struct@crate::Widget#tooltip-text] and
669    /// [`tooltip-markup`][struct@crate::Widget#tooltip-markup] are set, the last one wins.
670    ///
671    /// Readable | Writeable
672    ///
673    ///
674    /// #### `valign`
675    ///  How to distribute vertical space if widget gets extra space.
676    ///
677    /// Readable | Writeable
678    ///
679    ///
680    /// #### `vexpand`
681    ///  Whether to expand vertically.
682    ///
683    /// Readable | Writeable
684    ///
685    ///
686    /// #### `vexpand-set`
687    ///  Whether to use the `vexpand` property.
688    ///
689    /// Readable | Writeable
690    ///
691    ///
692    /// #### `visible`
693    ///  Whether the widget is visible.
694    ///
695    /// Readable | Writeable
696    ///
697    ///
698    /// #### `width-request`
699    ///  Overrides for width request of the widget.
700    ///
701    /// If this is -1, the natural request will be used.
702    ///
703    /// Readable | Writeable
704    /// </details>
705    /// <details><summary><h4>Accessible</h4></summary>
706    ///
707    ///
708    /// #### `accessible-role`
709    ///  The accessible role of the given [`Accessible`][crate::Accessible] implementation.
710    ///
711    /// The accessible role cannot be changed once set.
712    ///
713    /// Readable | Writeable
714    /// </details>
715    ///
716    /// ## Signals
717    ///
718    ///
719    /// #### `activate-link`
720    ///  Emitted every time a URL is activated.
721    ///
722    /// Applications may connect to it to override the default behaviour,
723    /// which is to call [`FileLauncher::launch()`][crate::FileLauncher::launch()].
724    ///
725    ///
726    /// <details><summary><h4>Window</h4></summary>
727    ///
728    ///
729    /// #### `activate-default`
730    ///  Emitted when the user activates the default widget.
731    ///
732    /// This is a [keybinding signal](class.SignalAction.html).
733    ///
734    /// The keybindings for this signal are all forms of the <kbd>Enter</kbd> key.
735    ///
736    /// Action
737    ///
738    ///
739    /// #### `activate-focus`
740    ///  Emitted when the user activates the currently focused
741    /// widget of @window.
742    ///
743    /// This is a [keybinding signal](class.SignalAction.html).
744    ///
745    /// The default binding for this signal is <kbd>␣</kbd>.
746    ///
747    /// Action
748    ///
749    ///
750    /// #### `close-request`
751    ///  Emitted when the user clicks on the close button of the window.
752    ///
753    ///
754    ///
755    ///
756    /// #### `enable-debugging`
757    ///  Emitted when the user enables or disables interactive debugging.
758    ///
759    /// When @toggle is true, interactive debugging is toggled on or off,
760    /// when it is false, the debugger will be pointed at the widget
761    /// under the pointer.
762    ///
763    /// This is a [keybinding signal](class.SignalAction.html).
764    ///
765    /// The default bindings for this signal are
766    /// <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>I</kbd> and
767    /// <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>D</kbd>.
768    ///
769    /// Action
770    ///
771    ///
772    /// #### `keys-changed`
773    ///  Emitted when the set of accelerators or mnemonics that
774    /// are associated with the window changes.
775    ///
776    ///
777    /// </details>
778    /// <details><summary><h4>Widget</h4></summary>
779    ///
780    ///
781    /// #### `destroy`
782    ///  Signals that all holders of a reference to the widget should release
783    /// the reference that they hold.
784    ///
785    /// May result in finalization of the widget if all references are released.
786    ///
787    /// This signal is not suitable for saving widget state.
788    ///
789    ///
790    ///
791    ///
792    /// #### `direction-changed`
793    ///  Emitted when the text direction of a widget changes.
794    ///
795    ///
796    ///
797    ///
798    /// #### `hide`
799    ///  Emitted when @widget is hidden.
800    ///
801    ///
802    ///
803    ///
804    /// #### `keynav-failed`
805    ///  Emitted if keyboard navigation fails.
806    ///
807    /// See [`WidgetExt::keynav_failed()`][crate::prelude::WidgetExt::keynav_failed()] for details.
808    ///
809    ///
810    ///
811    ///
812    /// #### `map`
813    ///  Emitted when @widget is going to be mapped.
814    ///
815    /// A widget is mapped when the widget is visible (which is controlled with
816    /// [`visible`][struct@crate::Widget#visible]) and all its parents up to the toplevel widget
817    /// are also visible.
818    ///
819    /// The `::map` signal can be used to determine whether a widget will be drawn,
820    /// for instance it can resume an animation that was stopped during the
821    /// emission of [`unmap`][struct@crate::Widget#unmap].
822    ///
823    ///
824    ///
825    ///
826    /// #### `mnemonic-activate`
827    ///  Emitted when a widget is activated via a mnemonic.
828    ///
829    /// The default handler for this signal activates @widget if @group_cycling
830    /// is false, or just makes @widget grab focus if @group_cycling is true.
831    ///
832    ///
833    ///
834    ///
835    /// #### `move-focus`
836    ///  Emitted when the focus is moved.
837    ///
838    /// The `::move-focus` signal is a [keybinding signal](class.SignalAction.html).
839    ///
840    /// The default bindings for this signal are <kbd>Tab</kbd> to move forward,
841    /// and <kbd>Shift</kbd>+<kbd>Tab</kbd> to move backward.
842    ///
843    /// Action
844    ///
845    ///
846    /// #### `query-tooltip`
847    ///  Emitted when the widget’s tooltip is about to be shown.
848    ///
849    /// This happens when the [`has-tooltip`][struct@crate::Widget#has-tooltip] property
850    /// is true and the hover timeout has expired with the cursor hovering
851    /// above @widget; or emitted when @widget got focus in keyboard mode.
852    ///
853    /// Using the given coordinates, the signal handler should determine
854    /// whether a tooltip should be shown for @widget. If this is the case
855    /// true should be returned, false otherwise. Note that if @keyboard_mode
856    /// is true, the values of @x and @y are undefined and should not be used.
857    ///
858    /// The signal handler is free to manipulate @tooltip with the therefore
859    /// destined function calls.
860    ///
861    ///
862    ///
863    ///
864    /// #### `realize`
865    ///  Emitted when @widget is associated with a [`gdk::Surface`][crate::gdk::Surface].
866    ///
867    /// This means that [`WidgetExt::realize()`][crate::prelude::WidgetExt::realize()] has been called
868    /// or the widget has been mapped (that is, it is going to be drawn).
869    ///
870    ///
871    ///
872    ///
873    /// #### `show`
874    ///  Emitted when @widget is shown.
875    ///
876    ///
877    ///
878    ///
879    /// #### `state-flags-changed`
880    ///  Emitted when the widget state changes.
881    ///
882    /// See [`WidgetExt::state_flags()`][crate::prelude::WidgetExt::state_flags()].
883    ///
884    ///
885    ///
886    ///
887    /// #### `unmap`
888    ///  Emitted when @widget is going to be unmapped.
889    ///
890    /// A widget is unmapped when either it or any of its parents up to the
891    /// toplevel widget have been set as hidden.
892    ///
893    /// As `::unmap` indicates that a widget will not be shown any longer,
894    /// it can be used to, for example, stop an animation on the widget.
895    ///
896    ///
897    ///
898    ///
899    /// #### `unrealize`
900    ///  Emitted when the [`gdk::Surface`][crate::gdk::Surface] associated with @widget is destroyed.
901    ///
902    /// This means that [`WidgetExt::unrealize()`][crate::prelude::WidgetExt::unrealize()] has been called
903    /// or the widget has been unmapped (that is, it is going to be hidden).
904    ///
905    ///
906    /// </details>
907    ///
908    /// # Implements
909    ///
910    /// [`GtkWindowExt`][trait@crate::prelude::GtkWindowExt], [`WidgetExt`][trait@crate::prelude::WidgetExt], [`trait@glib::ObjectExt`], [`AccessibleExt`][trait@crate::prelude::AccessibleExt], [`BuildableExt`][trait@crate::prelude::BuildableExt], [`ConstraintTargetExt`][trait@crate::prelude::ConstraintTargetExt], [`NativeExt`][trait@crate::prelude::NativeExt], [`RootExt`][trait@crate::prelude::RootExt], [`ShortcutManagerExt`][trait@crate::prelude::ShortcutManagerExt], [`WidgetExtManual`][trait@crate::prelude::WidgetExtManual], [`AccessibleExtManual`][trait@crate::prelude::AccessibleExtManual]
911    #[doc(alias = "GtkAboutDialog")]
912    pub struct AboutDialog(Object<ffi::GtkAboutDialog>) @extends Window, Widget, @implements Accessible, Buildable, ConstraintTarget, Native, Root, ShortcutManager;
913
914    match fn {
915        type_ => || ffi::gtk_about_dialog_get_type(),
916    }
917}
918
919impl AboutDialog {
920    /// Creates a new [`AboutDialog`][crate::AboutDialog].
921    ///
922    /// # Returns
923    ///
924    /// a newly created [`AboutDialog`][crate::AboutDialog]
925    #[doc(alias = "gtk_about_dialog_new")]
926    pub fn new() -> AboutDialog {
927        assert_initialized_main_thread!();
928        unsafe { Widget::from_glib_none(ffi::gtk_about_dialog_new()).unsafe_cast() }
929    }
930
931    // rustdoc-stripper-ignore-next
932    /// Creates a new builder-pattern struct instance to construct [`AboutDialog`] objects.
933    ///
934    /// This method returns an instance of [`AboutDialogBuilder`](crate::builders::AboutDialogBuilder) which can be used to create [`AboutDialog`] objects.
935    pub fn builder() -> AboutDialogBuilder {
936        AboutDialogBuilder::new()
937    }
938
939    /// Creates a new section in the "Credits" page.
940    /// ## `section_name`
941    /// The name of the section
942    /// ## `people`
943    /// the people who belong to that section
944    #[doc(alias = "gtk_about_dialog_add_credit_section")]
945    pub fn add_credit_section(&self, section_name: &str, people: &[&str]) {
946        unsafe {
947            ffi::gtk_about_dialog_add_credit_section(
948                self.to_glib_none().0,
949                section_name.to_glib_none().0,
950                people.to_glib_none().0,
951            );
952        }
953    }
954
955    /// Returns the names of the artists which are displayed
956    /// in the credits page.
957    ///
958    /// # Returns
959    ///
960    /// A
961    ///   `NULL`-terminated string array containing the artists
962    #[doc(alias = "gtk_about_dialog_get_artists")]
963    #[doc(alias = "get_artists")]
964    pub fn artists(&self) -> Vec<glib::GString> {
965        unsafe {
966            FromGlibPtrContainer::from_glib_none(ffi::gtk_about_dialog_get_artists(
967                self.to_glib_none().0,
968            ))
969        }
970    }
971
972    /// Returns the names of the authors which are displayed
973    /// in the credits page.
974    ///
975    /// # Returns
976    ///
977    /// A
978    ///   `NULL`-terminated string array containing the authors
979    #[doc(alias = "gtk_about_dialog_get_authors")]
980    #[doc(alias = "get_authors")]
981    pub fn authors(&self) -> Vec<glib::GString> {
982        unsafe {
983            FromGlibPtrContainer::from_glib_none(ffi::gtk_about_dialog_get_authors(
984                self.to_glib_none().0,
985            ))
986        }
987    }
988
989    /// Returns the comments string.
990    ///
991    /// # Returns
992    ///
993    /// The comments
994    #[doc(alias = "gtk_about_dialog_get_comments")]
995    #[doc(alias = "get_comments")]
996    pub fn comments(&self) -> Option<glib::GString> {
997        unsafe { from_glib_none(ffi::gtk_about_dialog_get_comments(self.to_glib_none().0)) }
998    }
999
1000    /// Returns the copyright string.
1001    ///
1002    /// # Returns
1003    ///
1004    /// The copyright string
1005    #[doc(alias = "gtk_about_dialog_get_copyright")]
1006    #[doc(alias = "get_copyright")]
1007    pub fn copyright(&self) -> Option<glib::GString> {
1008        unsafe { from_glib_none(ffi::gtk_about_dialog_get_copyright(self.to_glib_none().0)) }
1009    }
1010
1011    /// Returns the name of the documenters which are displayed
1012    /// in the credits page.
1013    ///
1014    /// # Returns
1015    ///
1016    /// A
1017    ///   `NULL`-terminated string array containing the documenters
1018    #[doc(alias = "gtk_about_dialog_get_documenters")]
1019    #[doc(alias = "get_documenters")]
1020    pub fn documenters(&self) -> Vec<glib::GString> {
1021        unsafe {
1022            FromGlibPtrContainer::from_glib_none(ffi::gtk_about_dialog_get_documenters(
1023                self.to_glib_none().0,
1024            ))
1025        }
1026    }
1027
1028    /// Returns the license information.
1029    ///
1030    /// # Returns
1031    ///
1032    /// The license information
1033    #[doc(alias = "gtk_about_dialog_get_license")]
1034    #[doc(alias = "get_license")]
1035    pub fn license(&self) -> Option<glib::GString> {
1036        unsafe { from_glib_none(ffi::gtk_about_dialog_get_license(self.to_glib_none().0)) }
1037    }
1038
1039    /// Retrieves the license type.
1040    ///
1041    /// # Returns
1042    ///
1043    /// a [`License`][crate::License] value
1044    #[doc(alias = "gtk_about_dialog_get_license_type")]
1045    #[doc(alias = "get_license_type")]
1046    #[doc(alias = "license-type")]
1047    pub fn license_type(&self) -> License {
1048        unsafe {
1049            from_glib(ffi::gtk_about_dialog_get_license_type(
1050                self.to_glib_none().0,
1051            ))
1052        }
1053    }
1054
1055    /// Returns the paintable displayed as logo in the about dialog.
1056    ///
1057    /// # Returns
1058    ///
1059    /// the paintable displayed as
1060    ///   logo or `NULL` if the logo is unset or has been set via
1061    ///   [`set_logo_icon_name()`][Self::set_logo_icon_name()]
1062    #[doc(alias = "gtk_about_dialog_get_logo")]
1063    #[doc(alias = "get_logo")]
1064    pub fn logo(&self) -> Option<gdk::Paintable> {
1065        unsafe { from_glib_none(ffi::gtk_about_dialog_get_logo(self.to_glib_none().0)) }
1066    }
1067
1068    /// Returns the icon name displayed as logo in the about dialog.
1069    ///
1070    /// # Returns
1071    ///
1072    /// the icon name displayed as logo,
1073    ///   or `NULL` if the logo has been set via [`set_logo()`][Self::set_logo()]
1074    #[doc(alias = "gtk_about_dialog_get_logo_icon_name")]
1075    #[doc(alias = "get_logo_icon_name")]
1076    #[doc(alias = "logo-icon-name")]
1077    pub fn logo_icon_name(&self) -> Option<glib::GString> {
1078        unsafe {
1079            from_glib_none(ffi::gtk_about_dialog_get_logo_icon_name(
1080                self.to_glib_none().0,
1081            ))
1082        }
1083    }
1084
1085    /// Returns the program name displayed in the about dialog.
1086    ///
1087    /// # Returns
1088    ///
1089    /// the program name
1090    #[doc(alias = "gtk_about_dialog_get_program_name")]
1091    #[doc(alias = "get_program_name")]
1092    #[doc(alias = "program-name")]
1093    pub fn program_name(&self) -> Option<glib::GString> {
1094        unsafe {
1095            from_glib_none(ffi::gtk_about_dialog_get_program_name(
1096                self.to_glib_none().0,
1097            ))
1098        }
1099    }
1100
1101    /// Returns the system information that is shown in the about dialog.
1102    ///
1103    /// # Returns
1104    ///
1105    /// the system information
1106    #[doc(alias = "gtk_about_dialog_get_system_information")]
1107    #[doc(alias = "get_system_information")]
1108    #[doc(alias = "system-information")]
1109    pub fn system_information(&self) -> Option<glib::GString> {
1110        unsafe {
1111            from_glib_none(ffi::gtk_about_dialog_get_system_information(
1112                self.to_glib_none().0,
1113            ))
1114        }
1115    }
1116
1117    /// Returns the translator credits string which is displayed
1118    /// in the credits page.
1119    ///
1120    /// # Returns
1121    ///
1122    /// The translator credits string
1123    #[doc(alias = "gtk_about_dialog_get_translator_credits")]
1124    #[doc(alias = "get_translator_credits")]
1125    #[doc(alias = "translator-credits")]
1126    pub fn translator_credits(&self) -> Option<glib::GString> {
1127        unsafe {
1128            from_glib_none(ffi::gtk_about_dialog_get_translator_credits(
1129                self.to_glib_none().0,
1130            ))
1131        }
1132    }
1133
1134    /// Returns the version string.
1135    ///
1136    /// # Returns
1137    ///
1138    /// The version string
1139    #[doc(alias = "gtk_about_dialog_get_version")]
1140    #[doc(alias = "get_version")]
1141    pub fn version(&self) -> Option<glib::GString> {
1142        unsafe { from_glib_none(ffi::gtk_about_dialog_get_version(self.to_glib_none().0)) }
1143    }
1144
1145    /// Returns the website URL.
1146    ///
1147    /// # Returns
1148    ///
1149    /// The website URL
1150    #[doc(alias = "gtk_about_dialog_get_website")]
1151    #[doc(alias = "get_website")]
1152    pub fn website(&self) -> Option<glib::GString> {
1153        unsafe { from_glib_none(ffi::gtk_about_dialog_get_website(self.to_glib_none().0)) }
1154    }
1155
1156    /// Returns the label used for the website link.
1157    ///
1158    /// # Returns
1159    ///
1160    /// The label used for the website link
1161    #[doc(alias = "gtk_about_dialog_get_website_label")]
1162    #[doc(alias = "get_website_label")]
1163    #[doc(alias = "website-label")]
1164    pub fn website_label(&self) -> Option<glib::GString> {
1165        unsafe {
1166            from_glib_none(ffi::gtk_about_dialog_get_website_label(
1167                self.to_glib_none().0,
1168            ))
1169        }
1170    }
1171
1172    /// Returns whether the license text in the about dialog is
1173    /// automatically wrapped.
1174    ///
1175    /// # Returns
1176    ///
1177    /// `TRUE` if the license text is wrapped
1178    #[doc(alias = "gtk_about_dialog_get_wrap_license")]
1179    #[doc(alias = "get_wrap_license")]
1180    #[doc(alias = "wrap-license")]
1181    pub fn wraps_license(&self) -> bool {
1182        unsafe {
1183            from_glib(ffi::gtk_about_dialog_get_wrap_license(
1184                self.to_glib_none().0,
1185            ))
1186        }
1187    }
1188
1189    /// Sets the names of the artists to be displayed
1190    /// in the "Credits" page.
1191    /// ## `artists`
1192    /// the authors of the artwork
1193    ///   of the application
1194    #[doc(alias = "gtk_about_dialog_set_artists")]
1195    #[doc(alias = "artists")]
1196    pub fn set_artists(&self, artists: &[&str]) {
1197        unsafe {
1198            ffi::gtk_about_dialog_set_artists(self.to_glib_none().0, artists.to_glib_none().0);
1199        }
1200    }
1201
1202    /// Sets the names of the authors which are displayed
1203    /// in the "Credits" page of the about dialog.
1204    /// ## `authors`
1205    /// the authors of the application
1206    #[doc(alias = "gtk_about_dialog_set_authors")]
1207    #[doc(alias = "authors")]
1208    pub fn set_authors(&self, authors: &[&str]) {
1209        unsafe {
1210            ffi::gtk_about_dialog_set_authors(self.to_glib_none().0, authors.to_glib_none().0);
1211        }
1212    }
1213
1214    /// Sets the comments string to display in the about dialog.
1215    ///
1216    /// This should be a short string of one or two lines.
1217    /// ## `comments`
1218    /// a comments string
1219    #[doc(alias = "gtk_about_dialog_set_comments")]
1220    #[doc(alias = "comments")]
1221    pub fn set_comments(&self, comments: Option<&str>) {
1222        unsafe {
1223            ffi::gtk_about_dialog_set_comments(self.to_glib_none().0, comments.to_glib_none().0);
1224        }
1225    }
1226
1227    /// Sets the copyright string to display in the about dialog.
1228    ///
1229    /// This should be a short string of one or two lines.
1230    /// ## `copyright`
1231    /// the copyright string
1232    #[doc(alias = "gtk_about_dialog_set_copyright")]
1233    #[doc(alias = "copyright")]
1234    pub fn set_copyright(&self, copyright: Option<&str>) {
1235        unsafe {
1236            ffi::gtk_about_dialog_set_copyright(self.to_glib_none().0, copyright.to_glib_none().0);
1237        }
1238    }
1239
1240    /// Sets the names of the documenters which are displayed
1241    /// in the "Credits" page.
1242    /// ## `documenters`
1243    /// the authors of the documentation
1244    ///   of the application
1245    #[doc(alias = "gtk_about_dialog_set_documenters")]
1246    #[doc(alias = "documenters")]
1247    pub fn set_documenters(&self, documenters: &[&str]) {
1248        unsafe {
1249            ffi::gtk_about_dialog_set_documenters(
1250                self.to_glib_none().0,
1251                documenters.to_glib_none().0,
1252            );
1253        }
1254    }
1255
1256    /// Sets the license information to be displayed in the
1257    /// about dialog.
1258    ///
1259    /// If `license` is `NULL`, the license page is hidden.
1260    /// ## `license`
1261    /// the license information
1262    #[doc(alias = "gtk_about_dialog_set_license")]
1263    #[doc(alias = "license")]
1264    pub fn set_license(&self, license: Option<&str>) {
1265        unsafe {
1266            ffi::gtk_about_dialog_set_license(self.to_glib_none().0, license.to_glib_none().0);
1267        }
1268    }
1269
1270    /// Sets the license of the application showing the about dialog
1271    /// from a list of known licenses.
1272    ///
1273    /// This function overrides the license set using
1274    /// [`set_license()`][Self::set_license()].
1275    /// ## `license_type`
1276    /// the type of license
1277    #[doc(alias = "gtk_about_dialog_set_license_type")]
1278    #[doc(alias = "license-type")]
1279    pub fn set_license_type(&self, license_type: License) {
1280        unsafe {
1281            ffi::gtk_about_dialog_set_license_type(self.to_glib_none().0, license_type.into_glib());
1282        }
1283    }
1284
1285    /// Sets the logo in the about dialog.
1286    /// ## `logo`
1287    /// a [`gdk::Paintable`][crate::gdk::Paintable]
1288    #[doc(alias = "gtk_about_dialog_set_logo")]
1289    #[doc(alias = "logo")]
1290    pub fn set_logo(&self, logo: Option<&impl IsA<gdk::Paintable>>) {
1291        unsafe {
1292            ffi::gtk_about_dialog_set_logo(
1293                self.to_glib_none().0,
1294                logo.map(|p| p.as_ref()).to_glib_none().0,
1295            );
1296        }
1297    }
1298
1299    /// Sets the icon name to be displayed as logo in the about dialog.
1300    /// ## `icon_name`
1301    /// an icon name
1302    #[doc(alias = "gtk_about_dialog_set_logo_icon_name")]
1303    #[doc(alias = "logo-icon-name")]
1304    pub fn set_logo_icon_name(&self, icon_name: Option<&str>) {
1305        unsafe {
1306            ffi::gtk_about_dialog_set_logo_icon_name(
1307                self.to_glib_none().0,
1308                icon_name.to_glib_none().0,
1309            );
1310        }
1311    }
1312
1313    /// Sets the name to display in the about dialog.
1314    ///
1315    /// If `name` is not set, the string returned
1316    /// by `g_get_application_name()` is used.
1317    /// ## `name`
1318    /// the program name
1319    #[doc(alias = "gtk_about_dialog_set_program_name")]
1320    #[doc(alias = "program-name")]
1321    pub fn set_program_name(&self, name: Option<&str>) {
1322        unsafe {
1323            ffi::gtk_about_dialog_set_program_name(self.to_glib_none().0, name.to_glib_none().0);
1324        }
1325    }
1326
1327    /// Sets the system information to be displayed in the about
1328    /// dialog.
1329    ///
1330    /// If `system_information` is `NULL`, the system information
1331    /// page is hidden.
1332    ///
1333    /// See [`system-information`][struct@crate::AboutDialog#system-information].
1334    /// ## `system_information`
1335    /// system information
1336    #[doc(alias = "gtk_about_dialog_set_system_information")]
1337    #[doc(alias = "system-information")]
1338    pub fn set_system_information(&self, system_information: Option<&str>) {
1339        unsafe {
1340            ffi::gtk_about_dialog_set_system_information(
1341                self.to_glib_none().0,
1342                system_information.to_glib_none().0,
1343            );
1344        }
1345    }
1346
1347    /// Sets the translator credits string which is displayed in
1348    /// the credits page.
1349    ///
1350    /// The intended use for this string is to display the translator
1351    /// of the language which is currently used in the user interface.
1352    /// Using `gettext()`, a simple way to achieve that is to mark the
1353    /// string for translation:
1354    ///
1355    /// **⚠️ The following code is in c ⚠️**
1356    ///
1357    /// ```c
1358    /// GtkWidget *about = gtk_about_dialog_new ();
1359    ///  gtk_about_dialog_set_translator_credits (GTK_ABOUT_DIALOG (about),
1360    ///                                           _("translator-credits"));
1361    /// ```
1362    ///
1363    /// It is a good idea to use the customary `msgid` “translator-credits”
1364    /// for this purpose, since translators will already know the purpose of
1365    /// that `msgid`, and since [`AboutDialog`][crate::AboutDialog] will detect if “translator-credits”
1366    /// is untranslated and omit translator credits.
1367    /// ## `translator_credits`
1368    /// the translator credits
1369    #[doc(alias = "gtk_about_dialog_set_translator_credits")]
1370    #[doc(alias = "translator-credits")]
1371    pub fn set_translator_credits(&self, translator_credits: Option<&str>) {
1372        unsafe {
1373            ffi::gtk_about_dialog_set_translator_credits(
1374                self.to_glib_none().0,
1375                translator_credits.to_glib_none().0,
1376            );
1377        }
1378    }
1379
1380    /// Sets the version string to display in the about dialog.
1381    /// ## `version`
1382    /// the version string
1383    #[doc(alias = "gtk_about_dialog_set_version")]
1384    #[doc(alias = "version")]
1385    pub fn set_version(&self, version: Option<&str>) {
1386        unsafe {
1387            ffi::gtk_about_dialog_set_version(self.to_glib_none().0, version.to_glib_none().0);
1388        }
1389    }
1390
1391    /// Sets the URL to use for the website link.
1392    /// ## `website`
1393    /// a URL string starting with `http://`
1394    #[doc(alias = "gtk_about_dialog_set_website")]
1395    #[doc(alias = "website")]
1396    pub fn set_website(&self, website: Option<&str>) {
1397        unsafe {
1398            ffi::gtk_about_dialog_set_website(self.to_glib_none().0, website.to_glib_none().0);
1399        }
1400    }
1401
1402    /// Sets the label to be used for the website link.
1403    /// ## `website_label`
1404    /// the label used for the website link
1405    #[doc(alias = "gtk_about_dialog_set_website_label")]
1406    #[doc(alias = "website-label")]
1407    pub fn set_website_label(&self, website_label: &str) {
1408        unsafe {
1409            ffi::gtk_about_dialog_set_website_label(
1410                self.to_glib_none().0,
1411                website_label.to_glib_none().0,
1412            );
1413        }
1414    }
1415
1416    /// Sets whether the license text in the about dialog should be
1417    /// automatically wrapped.
1418    /// ## `wrap_license`
1419    /// whether to wrap the license
1420    #[doc(alias = "gtk_about_dialog_set_wrap_license")]
1421    #[doc(alias = "wrap-license")]
1422    pub fn set_wrap_license(&self, wrap_license: bool) {
1423        unsafe {
1424            ffi::gtk_about_dialog_set_wrap_license(self.to_glib_none().0, wrap_license.into_glib());
1425        }
1426    }
1427
1428    /// Emitted every time a URL is activated.
1429    ///
1430    /// Applications may connect to it to override the default behaviour,
1431    /// which is to call [`FileLauncher::launch()`][crate::FileLauncher::launch()].
1432    /// ## `uri`
1433    /// the URI that is activated
1434    ///
1435    /// # Returns
1436    ///
1437    /// `TRUE` if the link has been activated
1438    #[doc(alias = "activate-link")]
1439    pub fn connect_activate_link<F: Fn(&Self, &str) -> glib::Propagation + 'static>(
1440        &self,
1441        f: F,
1442    ) -> SignalHandlerId {
1443        unsafe extern "C" fn activate_link_trampoline<
1444            F: Fn(&AboutDialog, &str) -> glib::Propagation + 'static,
1445        >(
1446            this: *mut ffi::GtkAboutDialog,
1447            uri: *mut std::ffi::c_char,
1448            f: glib::ffi::gpointer,
1449        ) -> glib::ffi::gboolean {
1450            let f: &F = &*(f as *const F);
1451            f(
1452                &from_glib_borrow(this),
1453                &glib::GString::from_glib_borrow(uri),
1454            )
1455            .into_glib()
1456        }
1457        unsafe {
1458            let f: Box_<F> = Box_::new(f);
1459            connect_raw(
1460                self.as_ptr() as *mut _,
1461                b"activate-link\0".as_ptr() as *const _,
1462                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1463                    activate_link_trampoline::<F> as *const (),
1464                )),
1465                Box_::into_raw(f),
1466            )
1467        }
1468    }
1469
1470    #[doc(alias = "artists")]
1471    pub fn connect_artists_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1472        unsafe extern "C" fn notify_artists_trampoline<F: Fn(&AboutDialog) + 'static>(
1473            this: *mut ffi::GtkAboutDialog,
1474            _param_spec: glib::ffi::gpointer,
1475            f: glib::ffi::gpointer,
1476        ) {
1477            let f: &F = &*(f as *const F);
1478            f(&from_glib_borrow(this))
1479        }
1480        unsafe {
1481            let f: Box_<F> = Box_::new(f);
1482            connect_raw(
1483                self.as_ptr() as *mut _,
1484                b"notify::artists\0".as_ptr() as *const _,
1485                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1486                    notify_artists_trampoline::<F> as *const (),
1487                )),
1488                Box_::into_raw(f),
1489            )
1490        }
1491    }
1492
1493    #[doc(alias = "authors")]
1494    pub fn connect_authors_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1495        unsafe extern "C" fn notify_authors_trampoline<F: Fn(&AboutDialog) + 'static>(
1496            this: *mut ffi::GtkAboutDialog,
1497            _param_spec: glib::ffi::gpointer,
1498            f: glib::ffi::gpointer,
1499        ) {
1500            let f: &F = &*(f as *const F);
1501            f(&from_glib_borrow(this))
1502        }
1503        unsafe {
1504            let f: Box_<F> = Box_::new(f);
1505            connect_raw(
1506                self.as_ptr() as *mut _,
1507                b"notify::authors\0".as_ptr() as *const _,
1508                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1509                    notify_authors_trampoline::<F> as *const (),
1510                )),
1511                Box_::into_raw(f),
1512            )
1513        }
1514    }
1515
1516    #[doc(alias = "comments")]
1517    pub fn connect_comments_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1518        unsafe extern "C" fn notify_comments_trampoline<F: Fn(&AboutDialog) + 'static>(
1519            this: *mut ffi::GtkAboutDialog,
1520            _param_spec: glib::ffi::gpointer,
1521            f: glib::ffi::gpointer,
1522        ) {
1523            let f: &F = &*(f as *const F);
1524            f(&from_glib_borrow(this))
1525        }
1526        unsafe {
1527            let f: Box_<F> = Box_::new(f);
1528            connect_raw(
1529                self.as_ptr() as *mut _,
1530                b"notify::comments\0".as_ptr() as *const _,
1531                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1532                    notify_comments_trampoline::<F> as *const (),
1533                )),
1534                Box_::into_raw(f),
1535            )
1536        }
1537    }
1538
1539    #[doc(alias = "copyright")]
1540    pub fn connect_copyright_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1541        unsafe extern "C" fn notify_copyright_trampoline<F: Fn(&AboutDialog) + 'static>(
1542            this: *mut ffi::GtkAboutDialog,
1543            _param_spec: glib::ffi::gpointer,
1544            f: glib::ffi::gpointer,
1545        ) {
1546            let f: &F = &*(f as *const F);
1547            f(&from_glib_borrow(this))
1548        }
1549        unsafe {
1550            let f: Box_<F> = Box_::new(f);
1551            connect_raw(
1552                self.as_ptr() as *mut _,
1553                b"notify::copyright\0".as_ptr() as *const _,
1554                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1555                    notify_copyright_trampoline::<F> as *const (),
1556                )),
1557                Box_::into_raw(f),
1558            )
1559        }
1560    }
1561
1562    #[doc(alias = "documenters")]
1563    pub fn connect_documenters_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1564        unsafe extern "C" fn notify_documenters_trampoline<F: Fn(&AboutDialog) + 'static>(
1565            this: *mut ffi::GtkAboutDialog,
1566            _param_spec: glib::ffi::gpointer,
1567            f: glib::ffi::gpointer,
1568        ) {
1569            let f: &F = &*(f as *const F);
1570            f(&from_glib_borrow(this))
1571        }
1572        unsafe {
1573            let f: Box_<F> = Box_::new(f);
1574            connect_raw(
1575                self.as_ptr() as *mut _,
1576                b"notify::documenters\0".as_ptr() as *const _,
1577                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1578                    notify_documenters_trampoline::<F> as *const (),
1579                )),
1580                Box_::into_raw(f),
1581            )
1582        }
1583    }
1584
1585    #[doc(alias = "license")]
1586    pub fn connect_license_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1587        unsafe extern "C" fn notify_license_trampoline<F: Fn(&AboutDialog) + 'static>(
1588            this: *mut ffi::GtkAboutDialog,
1589            _param_spec: glib::ffi::gpointer,
1590            f: glib::ffi::gpointer,
1591        ) {
1592            let f: &F = &*(f as *const F);
1593            f(&from_glib_borrow(this))
1594        }
1595        unsafe {
1596            let f: Box_<F> = Box_::new(f);
1597            connect_raw(
1598                self.as_ptr() as *mut _,
1599                b"notify::license\0".as_ptr() as *const _,
1600                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1601                    notify_license_trampoline::<F> as *const (),
1602                )),
1603                Box_::into_raw(f),
1604            )
1605        }
1606    }
1607
1608    #[doc(alias = "license-type")]
1609    pub fn connect_license_type_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1610        unsafe extern "C" fn notify_license_type_trampoline<F: Fn(&AboutDialog) + 'static>(
1611            this: *mut ffi::GtkAboutDialog,
1612            _param_spec: glib::ffi::gpointer,
1613            f: glib::ffi::gpointer,
1614        ) {
1615            let f: &F = &*(f as *const F);
1616            f(&from_glib_borrow(this))
1617        }
1618        unsafe {
1619            let f: Box_<F> = Box_::new(f);
1620            connect_raw(
1621                self.as_ptr() as *mut _,
1622                b"notify::license-type\0".as_ptr() as *const _,
1623                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1624                    notify_license_type_trampoline::<F> as *const (),
1625                )),
1626                Box_::into_raw(f),
1627            )
1628        }
1629    }
1630
1631    #[doc(alias = "logo")]
1632    pub fn connect_logo_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1633        unsafe extern "C" fn notify_logo_trampoline<F: Fn(&AboutDialog) + 'static>(
1634            this: *mut ffi::GtkAboutDialog,
1635            _param_spec: glib::ffi::gpointer,
1636            f: glib::ffi::gpointer,
1637        ) {
1638            let f: &F = &*(f as *const F);
1639            f(&from_glib_borrow(this))
1640        }
1641        unsafe {
1642            let f: Box_<F> = Box_::new(f);
1643            connect_raw(
1644                self.as_ptr() as *mut _,
1645                b"notify::logo\0".as_ptr() as *const _,
1646                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1647                    notify_logo_trampoline::<F> as *const (),
1648                )),
1649                Box_::into_raw(f),
1650            )
1651        }
1652    }
1653
1654    #[doc(alias = "logo-icon-name")]
1655    pub fn connect_logo_icon_name_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1656        unsafe extern "C" fn notify_logo_icon_name_trampoline<F: Fn(&AboutDialog) + 'static>(
1657            this: *mut ffi::GtkAboutDialog,
1658            _param_spec: glib::ffi::gpointer,
1659            f: glib::ffi::gpointer,
1660        ) {
1661            let f: &F = &*(f as *const F);
1662            f(&from_glib_borrow(this))
1663        }
1664        unsafe {
1665            let f: Box_<F> = Box_::new(f);
1666            connect_raw(
1667                self.as_ptr() as *mut _,
1668                b"notify::logo-icon-name\0".as_ptr() as *const _,
1669                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1670                    notify_logo_icon_name_trampoline::<F> as *const (),
1671                )),
1672                Box_::into_raw(f),
1673            )
1674        }
1675    }
1676
1677    #[doc(alias = "program-name")]
1678    pub fn connect_program_name_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1679        unsafe extern "C" fn notify_program_name_trampoline<F: Fn(&AboutDialog) + 'static>(
1680            this: *mut ffi::GtkAboutDialog,
1681            _param_spec: glib::ffi::gpointer,
1682            f: glib::ffi::gpointer,
1683        ) {
1684            let f: &F = &*(f as *const F);
1685            f(&from_glib_borrow(this))
1686        }
1687        unsafe {
1688            let f: Box_<F> = Box_::new(f);
1689            connect_raw(
1690                self.as_ptr() as *mut _,
1691                b"notify::program-name\0".as_ptr() as *const _,
1692                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1693                    notify_program_name_trampoline::<F> as *const (),
1694                )),
1695                Box_::into_raw(f),
1696            )
1697        }
1698    }
1699
1700    #[doc(alias = "system-information")]
1701    pub fn connect_system_information_notify<F: Fn(&Self) + 'static>(
1702        &self,
1703        f: F,
1704    ) -> SignalHandlerId {
1705        unsafe extern "C" fn notify_system_information_trampoline<F: Fn(&AboutDialog) + 'static>(
1706            this: *mut ffi::GtkAboutDialog,
1707            _param_spec: glib::ffi::gpointer,
1708            f: glib::ffi::gpointer,
1709        ) {
1710            let f: &F = &*(f as *const F);
1711            f(&from_glib_borrow(this))
1712        }
1713        unsafe {
1714            let f: Box_<F> = Box_::new(f);
1715            connect_raw(
1716                self.as_ptr() as *mut _,
1717                b"notify::system-information\0".as_ptr() as *const _,
1718                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1719                    notify_system_information_trampoline::<F> as *const (),
1720                )),
1721                Box_::into_raw(f),
1722            )
1723        }
1724    }
1725
1726    #[doc(alias = "translator-credits")]
1727    pub fn connect_translator_credits_notify<F: Fn(&Self) + 'static>(
1728        &self,
1729        f: F,
1730    ) -> SignalHandlerId {
1731        unsafe extern "C" fn notify_translator_credits_trampoline<F: Fn(&AboutDialog) + 'static>(
1732            this: *mut ffi::GtkAboutDialog,
1733            _param_spec: glib::ffi::gpointer,
1734            f: glib::ffi::gpointer,
1735        ) {
1736            let f: &F = &*(f as *const F);
1737            f(&from_glib_borrow(this))
1738        }
1739        unsafe {
1740            let f: Box_<F> = Box_::new(f);
1741            connect_raw(
1742                self.as_ptr() as *mut _,
1743                b"notify::translator-credits\0".as_ptr() as *const _,
1744                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1745                    notify_translator_credits_trampoline::<F> as *const (),
1746                )),
1747                Box_::into_raw(f),
1748            )
1749        }
1750    }
1751
1752    #[doc(alias = "version")]
1753    pub fn connect_version_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1754        unsafe extern "C" fn notify_version_trampoline<F: Fn(&AboutDialog) + 'static>(
1755            this: *mut ffi::GtkAboutDialog,
1756            _param_spec: glib::ffi::gpointer,
1757            f: glib::ffi::gpointer,
1758        ) {
1759            let f: &F = &*(f as *const F);
1760            f(&from_glib_borrow(this))
1761        }
1762        unsafe {
1763            let f: Box_<F> = Box_::new(f);
1764            connect_raw(
1765                self.as_ptr() as *mut _,
1766                b"notify::version\0".as_ptr() as *const _,
1767                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1768                    notify_version_trampoline::<F> as *const (),
1769                )),
1770                Box_::into_raw(f),
1771            )
1772        }
1773    }
1774
1775    #[doc(alias = "website")]
1776    pub fn connect_website_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1777        unsafe extern "C" fn notify_website_trampoline<F: Fn(&AboutDialog) + 'static>(
1778            this: *mut ffi::GtkAboutDialog,
1779            _param_spec: glib::ffi::gpointer,
1780            f: glib::ffi::gpointer,
1781        ) {
1782            let f: &F = &*(f as *const F);
1783            f(&from_glib_borrow(this))
1784        }
1785        unsafe {
1786            let f: Box_<F> = Box_::new(f);
1787            connect_raw(
1788                self.as_ptr() as *mut _,
1789                b"notify::website\0".as_ptr() as *const _,
1790                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1791                    notify_website_trampoline::<F> as *const (),
1792                )),
1793                Box_::into_raw(f),
1794            )
1795        }
1796    }
1797
1798    #[doc(alias = "website-label")]
1799    pub fn connect_website_label_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1800        unsafe extern "C" fn notify_website_label_trampoline<F: Fn(&AboutDialog) + 'static>(
1801            this: *mut ffi::GtkAboutDialog,
1802            _param_spec: glib::ffi::gpointer,
1803            f: glib::ffi::gpointer,
1804        ) {
1805            let f: &F = &*(f as *const F);
1806            f(&from_glib_borrow(this))
1807        }
1808        unsafe {
1809            let f: Box_<F> = Box_::new(f);
1810            connect_raw(
1811                self.as_ptr() as *mut _,
1812                b"notify::website-label\0".as_ptr() as *const _,
1813                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1814                    notify_website_label_trampoline::<F> as *const (),
1815                )),
1816                Box_::into_raw(f),
1817            )
1818        }
1819    }
1820
1821    #[doc(alias = "wrap-license")]
1822    pub fn connect_wrap_license_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1823        unsafe extern "C" fn notify_wrap_license_trampoline<F: Fn(&AboutDialog) + 'static>(
1824            this: *mut ffi::GtkAboutDialog,
1825            _param_spec: glib::ffi::gpointer,
1826            f: glib::ffi::gpointer,
1827        ) {
1828            let f: &F = &*(f as *const F);
1829            f(&from_glib_borrow(this))
1830        }
1831        unsafe {
1832            let f: Box_<F> = Box_::new(f);
1833            connect_raw(
1834                self.as_ptr() as *mut _,
1835                b"notify::wrap-license\0".as_ptr() as *const _,
1836                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1837                    notify_wrap_license_trampoline::<F> as *const (),
1838                )),
1839                Box_::into_raw(f),
1840            )
1841        }
1842    }
1843}
1844
1845impl Default for AboutDialog {
1846    fn default() -> Self {
1847        Self::new()
1848    }
1849}
1850
1851// rustdoc-stripper-ignore-next
1852/// A [builder-pattern] type to construct [`AboutDialog`] objects.
1853///
1854/// [builder-pattern]: https://doc.rust-lang.org/1.0.0/style/ownership/builders.html
1855#[must_use = "The builder must be built to be used"]
1856pub struct AboutDialogBuilder {
1857    builder: glib::object::ObjectBuilder<'static, AboutDialog>,
1858}
1859
1860impl AboutDialogBuilder {
1861    fn new() -> Self {
1862        Self {
1863            builder: glib::object::Object::builder(),
1864        }
1865    }
1866
1867    /// The people who contributed artwork to the program.
1868    ///
1869    /// Each string may contain email addresses and URLs, which will be displayed
1870    /// as links.
1871    pub fn artists(self, artists: impl Into<glib::StrV>) -> Self {
1872        Self {
1873            builder: self.builder.property("artists", artists.into()),
1874        }
1875    }
1876
1877    /// The authors of the program.
1878    ///
1879    /// Each string may contain email addresses and URLs, which will be displayed
1880    /// as links, see the introduction for more details.
1881    pub fn authors(self, authors: impl Into<glib::StrV>) -> Self {
1882        Self {
1883            builder: self.builder.property("authors", authors.into()),
1884        }
1885    }
1886
1887    /// Comments about the program.
1888    ///
1889    /// This string is displayed in a label in the main dialog, thus it
1890    /// should be a short explanation of the main purpose of the program,
1891    /// not a detailed list of features.
1892    pub fn comments(self, comments: impl Into<glib::GString>) -> Self {
1893        Self {
1894            builder: self.builder.property("comments", comments.into()),
1895        }
1896    }
1897
1898    /// Copyright information for the program.
1899    pub fn copyright(self, copyright: impl Into<glib::GString>) -> Self {
1900        Self {
1901            builder: self.builder.property("copyright", copyright.into()),
1902        }
1903    }
1904
1905    /// The people documenting the program.
1906    ///
1907    /// Each string may contain email addresses and URLs, which will be displayed
1908    /// as links, see the introduction for more details.
1909    pub fn documenters(self, documenters: impl Into<glib::StrV>) -> Self {
1910        Self {
1911            builder: self.builder.property("documenters", documenters.into()),
1912        }
1913    }
1914
1915    /// The license of the program, as free-form text.
1916    ///
1917    /// This string is displayed in a text view in a secondary dialog, therefore
1918    /// it is fine to use a long multi-paragraph text. Note that the text is only
1919    /// wrapped in the text view if the "wrap-license" property is set to `TRUE`;
1920    /// otherwise the text itself must contain the intended linebreaks.
1921    ///
1922    /// When setting this property to a non-`NULL` value, the
1923    /// [`license-type`][struct@crate::AboutDialog#license-type] property is set to
1924    /// [enum@Gtk.License.custom] as a side effect.
1925    ///
1926    /// The text may contain links in this format `<http://www.some.place/>`
1927    /// and email references in the form `<mail-to@some.body>`, and these will
1928    /// be converted into clickable links.
1929    pub fn license(self, license: impl Into<glib::GString>) -> Self {
1930        Self {
1931            builder: self.builder.property("license", license.into()),
1932        }
1933    }
1934
1935    /// The license of the program.
1936    ///
1937    /// The [`AboutDialog`][crate::AboutDialog] will automatically fill out a standard disclaimer
1938    /// and link the user to the appropriate online resource for the license
1939    /// text.
1940    ///
1941    /// If [enum@Gtk.License.unknown] is used, the link used will be the same
1942    /// specified in the [`website`][struct@crate::AboutDialog#website] property.
1943    ///
1944    /// If [enum@Gtk.License.custom] is used, the current contents of the
1945    /// [`license`][struct@crate::AboutDialog#license] property are used.
1946    ///
1947    /// For any other [`License`][crate::License] value, the contents of the
1948    /// [`license`][struct@crate::AboutDialog#license] property are also set by
1949    /// this property as a side effect.
1950    pub fn license_type(self, license_type: License) -> Self {
1951        Self {
1952            builder: self.builder.property("license-type", license_type),
1953        }
1954    }
1955
1956    /// A logo for the about box.
1957    ///
1958    /// If it is `NULL`, the default window icon set with
1959    /// [`Window::set_default_icon_name()`][crate::Window::set_default_icon_name()] will be used.
1960    pub fn logo(self, logo: &impl IsA<gdk::Paintable>) -> Self {
1961        Self {
1962            builder: self.builder.property("logo", logo.clone().upcast()),
1963        }
1964    }
1965
1966    /// A named icon to use as the logo for the about box.
1967    ///
1968    /// This property overrides the [`logo`][struct@crate::AboutDialog#logo] property.
1969    pub fn logo_icon_name(self, logo_icon_name: impl Into<glib::GString>) -> Self {
1970        Self {
1971            builder: self
1972                .builder
1973                .property("logo-icon-name", logo_icon_name.into()),
1974        }
1975    }
1976
1977    /// The name of the program.
1978    ///
1979    /// If this is not set, it defaults to the value returned by
1980    /// `get_application_name()`.
1981    pub fn program_name(self, program_name: impl Into<glib::GString>) -> Self {
1982        Self {
1983            builder: self.builder.property("program-name", program_name.into()),
1984        }
1985    }
1986
1987    /// Information about the system on which the program is running.
1988    ///
1989    /// This information is displayed in a separate page, therefore it is fine
1990    /// to use a long multi-paragraph text. Note that the text should contain
1991    /// the intended linebreaks.
1992    ///
1993    /// The text may contain links in this format `<http://www.some.place/>`
1994    /// and email references in the form `<mail-to@some.body>`, and these will
1995    /// be converted into clickable links.
1996    pub fn system_information(self, system_information: impl Into<glib::GString>) -> Self {
1997        Self {
1998            builder: self
1999                .builder
2000                .property("system-information", system_information.into()),
2001        }
2002    }
2003
2004    /// Credits to the translators.
2005    ///
2006    /// This string should be marked as translatable.
2007    ///
2008    /// The string may contain email addresses and URLs, which will be displayed
2009    /// as links, see the introduction for more details.
2010    pub fn translator_credits(self, translator_credits: impl Into<glib::GString>) -> Self {
2011        Self {
2012            builder: self
2013                .builder
2014                .property("translator-credits", translator_credits.into()),
2015        }
2016    }
2017
2018    /// The version of the program.
2019    pub fn version(self, version: impl Into<glib::GString>) -> Self {
2020        Self {
2021            builder: self.builder.property("version", version.into()),
2022        }
2023    }
2024
2025    /// The URL for the link to the website of the program.
2026    ///
2027    /// This should be a string starting with `http://` or `https://`.
2028    pub fn website(self, website: impl Into<glib::GString>) -> Self {
2029        Self {
2030            builder: self.builder.property("website", website.into()),
2031        }
2032    }
2033
2034    /// The label for the link to the website of the program.
2035    pub fn website_label(self, website_label: impl Into<glib::GString>) -> Self {
2036        Self {
2037            builder: self.builder.property("website-label", website_label.into()),
2038        }
2039    }
2040
2041    /// Whether to wrap the text in the license dialog.
2042    pub fn wrap_license(self, wrap_license: bool) -> Self {
2043        Self {
2044            builder: self.builder.property("wrap-license", wrap_license),
2045        }
2046    }
2047
2048    /// The [`Application`][crate::Application] associated with the window.
2049    ///
2050    /// The application will be kept alive for at least as long as it
2051    /// has any windows associated with it (see g_application_hold()
2052    /// for a way to keep it alive without windows).
2053    ///
2054    /// Normally, the connection between the application and the window
2055    /// will remain until the window is destroyed, but you can explicitly
2056    /// remove it by setting the this property to `NULL`.
2057    pub fn application(self, application: &impl IsA<Application>) -> Self {
2058        Self {
2059            builder: self
2060                .builder
2061                .property("application", application.clone().upcast()),
2062        }
2063    }
2064
2065    /// The child widget.
2066    pub fn child(self, child: &impl IsA<Widget>) -> Self {
2067        Self {
2068            builder: self.builder.property("child", child.clone().upcast()),
2069        }
2070    }
2071
2072    /// Whether the window should have a frame (also known as *decorations*).
2073    pub fn decorated(self, decorated: bool) -> Self {
2074        Self {
2075            builder: self.builder.property("decorated", decorated),
2076        }
2077    }
2078
2079    /// The default height of the window.
2080    pub fn default_height(self, default_height: i32) -> Self {
2081        Self {
2082            builder: self.builder.property("default-height", default_height),
2083        }
2084    }
2085
2086    /// The default widget.
2087    pub fn default_widget(self, default_widget: &impl IsA<Widget>) -> Self {
2088        Self {
2089            builder: self
2090                .builder
2091                .property("default-widget", default_widget.clone().upcast()),
2092        }
2093    }
2094
2095    /// The default width of the window.
2096    pub fn default_width(self, default_width: i32) -> Self {
2097        Self {
2098            builder: self.builder.property("default-width", default_width),
2099        }
2100    }
2101
2102    /// Whether the window frame should have a close button.
2103    pub fn deletable(self, deletable: bool) -> Self {
2104        Self {
2105            builder: self.builder.property("deletable", deletable),
2106        }
2107    }
2108
2109    /// If this window should be destroyed when the parent is destroyed.
2110    pub fn destroy_with_parent(self, destroy_with_parent: bool) -> Self {
2111        Self {
2112            builder: self
2113                .builder
2114                .property("destroy-with-parent", destroy_with_parent),
2115        }
2116    }
2117
2118    /// The display that will display this window.
2119    pub fn display(self, display: &impl IsA<gdk::Display>) -> Self {
2120        Self {
2121            builder: self.builder.property("display", display.clone().upcast()),
2122        }
2123    }
2124
2125    /// Whether 'focus rectangles' are currently visible in this window.
2126    ///
2127    /// This property is maintained by GTK based on user input
2128    /// and should not be set by applications.
2129    pub fn focus_visible(self, focus_visible: bool) -> Self {
2130        Self {
2131            builder: self.builder.property("focus-visible", focus_visible),
2132        }
2133    }
2134
2135    /// The focus widget.
2136    pub fn focus_widget(self, focus_widget: &impl IsA<Widget>) -> Self {
2137        Self {
2138            builder: self
2139                .builder
2140                .property("focus-widget", focus_widget.clone().upcast()),
2141        }
2142    }
2143
2144    /// Whether the window is fullscreen.
2145    ///
2146    /// Setting this property is the equivalent of calling
2147    /// [`GtkWindowExt::fullscreen()`][crate::prelude::GtkWindowExt::fullscreen()] or [`GtkWindowExt::unfullscreen()`][crate::prelude::GtkWindowExt::unfullscreen()];
2148    /// either operation is asynchronous, which means you will need to
2149    /// connect to the ::notify signal in order to know whether the
2150    /// operation was successful.
2151    pub fn fullscreened(self, fullscreened: bool) -> Self {
2152        Self {
2153            builder: self.builder.property("fullscreened", fullscreened),
2154        }
2155    }
2156
2157    /// Whether the window frame should handle <kbd>F10</kbd> for activating
2158    /// menubars.
2159    #[cfg(feature = "v4_2")]
2160    #[cfg_attr(docsrs, doc(cfg(feature = "v4_2")))]
2161    pub fn handle_menubar_accel(self, handle_menubar_accel: bool) -> Self {
2162        Self {
2163            builder: self
2164                .builder
2165                .property("handle-menubar-accel", handle_menubar_accel),
2166        }
2167    }
2168
2169    /// If this window should be hidden when the users clicks the close button.
2170    pub fn hide_on_close(self, hide_on_close: bool) -> Self {
2171        Self {
2172            builder: self.builder.property("hide-on-close", hide_on_close),
2173        }
2174    }
2175
2176    /// Specifies the name of the themed icon to use as the window icon.
2177    ///
2178    /// See [`IconTheme`][crate::IconTheme] for more details.
2179    pub fn icon_name(self, icon_name: impl Into<glib::GString>) -> Self {
2180        Self {
2181            builder: self.builder.property("icon-name", icon_name.into()),
2182        }
2183    }
2184
2185    /// Whether the window is maximized.
2186    ///
2187    /// Setting this property is the equivalent of calling
2188    /// [`GtkWindowExt::maximize()`][crate::prelude::GtkWindowExt::maximize()] or [`GtkWindowExt::unmaximize()`][crate::prelude::GtkWindowExt::unmaximize()];
2189    /// either operation is asynchronous, which means you will need to
2190    /// connect to the ::notify signal in order to know whether the
2191    /// operation was successful.
2192    pub fn maximized(self, maximized: bool) -> Self {
2193        Self {
2194            builder: self.builder.property("maximized", maximized),
2195        }
2196    }
2197
2198    /// Whether mnemonics are currently visible in this window.
2199    ///
2200    /// This property is maintained by GTK based on user input,
2201    /// and should not be set by applications.
2202    pub fn mnemonics_visible(self, mnemonics_visible: bool) -> Self {
2203        Self {
2204            builder: self
2205                .builder
2206                .property("mnemonics-visible", mnemonics_visible),
2207        }
2208    }
2209
2210    /// If true, the window is modal.
2211    pub fn modal(self, modal: bool) -> Self {
2212        Self {
2213            builder: self.builder.property("modal", modal),
2214        }
2215    }
2216
2217    /// If true, users can resize the window.
2218    pub fn resizable(self, resizable: bool) -> Self {
2219        Self {
2220            builder: self.builder.property("resizable", resizable),
2221        }
2222    }
2223
2224    /// A write-only property for setting window's startup notification identifier.
2225    pub fn startup_id(self, startup_id: impl Into<glib::GString>) -> Self {
2226        Self {
2227            builder: self.builder.property("startup-id", startup_id.into()),
2228        }
2229    }
2230
2231    /// The title of the window.
2232    pub fn title(self, title: impl Into<glib::GString>) -> Self {
2233        Self {
2234            builder: self.builder.property("title", title.into()),
2235        }
2236    }
2237
2238    /// The titlebar widget.
2239    #[cfg(feature = "v4_6")]
2240    #[cfg_attr(docsrs, doc(cfg(feature = "v4_6")))]
2241    pub fn titlebar(self, titlebar: &impl IsA<Widget>) -> Self {
2242        Self {
2243            builder: self.builder.property("titlebar", titlebar.clone().upcast()),
2244        }
2245    }
2246
2247    /// The transient parent of the window.
2248    pub fn transient_for(self, transient_for: &impl IsA<Window>) -> Self {
2249        Self {
2250            builder: self
2251                .builder
2252                .property("transient-for", transient_for.clone().upcast()),
2253        }
2254    }
2255
2256    /// Whether the widget or any of its descendents can accept
2257    /// the input focus.
2258    ///
2259    /// This property is meant to be set by widget implementations,
2260    /// typically in their instance init function.
2261    pub fn can_focus(self, can_focus: bool) -> Self {
2262        Self {
2263            builder: self.builder.property("can-focus", can_focus),
2264        }
2265    }
2266
2267    /// Whether the widget can receive pointer events.
2268    pub fn can_target(self, can_target: bool) -> Self {
2269        Self {
2270            builder: self.builder.property("can-target", can_target),
2271        }
2272    }
2273
2274    /// A list of css classes applied to this widget.
2275    pub fn css_classes(self, css_classes: impl Into<glib::StrV>) -> Self {
2276        Self {
2277            builder: self.builder.property("css-classes", css_classes.into()),
2278        }
2279    }
2280
2281    /// The name of this widget in the CSS tree.
2282    ///
2283    /// This property is meant to be set by widget implementations,
2284    /// typically in their instance init function.
2285    pub fn css_name(self, css_name: impl Into<glib::GString>) -> Self {
2286        Self {
2287            builder: self.builder.property("css-name", css_name.into()),
2288        }
2289    }
2290
2291    /// The cursor used by @widget.
2292    pub fn cursor(self, cursor: &gdk::Cursor) -> Self {
2293        Self {
2294            builder: self.builder.property("cursor", cursor.clone()),
2295        }
2296    }
2297
2298    /// Whether the widget should grab focus when it is clicked with the mouse.
2299    ///
2300    /// This property is only relevant for widgets that can take focus.
2301    pub fn focus_on_click(self, focus_on_click: bool) -> Self {
2302        Self {
2303            builder: self.builder.property("focus-on-click", focus_on_click),
2304        }
2305    }
2306
2307    /// Whether this widget itself will accept the input focus.
2308    pub fn focusable(self, focusable: bool) -> Self {
2309        Self {
2310            builder: self.builder.property("focusable", focusable),
2311        }
2312    }
2313
2314    /// How to distribute horizontal space if widget gets extra space.
2315    pub fn halign(self, halign: Align) -> Self {
2316        Self {
2317            builder: self.builder.property("halign", halign),
2318        }
2319    }
2320
2321    /// Enables or disables the emission of the [`query-tooltip`][struct@crate::Widget#query-tooltip]
2322    /// signal on @widget.
2323    ///
2324    /// A true value indicates that @widget can have a tooltip, in this case
2325    /// the widget will be queried using [`query-tooltip`][struct@crate::Widget#query-tooltip] to
2326    /// determine whether it will provide a tooltip or not.
2327    pub fn has_tooltip(self, has_tooltip: bool) -> Self {
2328        Self {
2329            builder: self.builder.property("has-tooltip", has_tooltip),
2330        }
2331    }
2332
2333    /// Overrides for height request of the widget.
2334    ///
2335    /// If this is -1, the natural request will be used.
2336    pub fn height_request(self, height_request: i32) -> Self {
2337        Self {
2338            builder: self.builder.property("height-request", height_request),
2339        }
2340    }
2341
2342    /// Whether to expand horizontally.
2343    pub fn hexpand(self, hexpand: bool) -> Self {
2344        Self {
2345            builder: self.builder.property("hexpand", hexpand),
2346        }
2347    }
2348
2349    /// Whether to use the `hexpand` property.
2350    pub fn hexpand_set(self, hexpand_set: bool) -> Self {
2351        Self {
2352            builder: self.builder.property("hexpand-set", hexpand_set),
2353        }
2354    }
2355
2356    /// The [`LayoutManager`][crate::LayoutManager] instance to use to compute
2357    /// the preferred size of the widget, and allocate its children.
2358    ///
2359    /// This property is meant to be set by widget implementations,
2360    /// typically in their instance init function.
2361    pub fn layout_manager(self, layout_manager: &impl IsA<LayoutManager>) -> Self {
2362        Self {
2363            builder: self
2364                .builder
2365                .property("layout-manager", layout_manager.clone().upcast()),
2366        }
2367    }
2368
2369    /// Makes this widget act like a modal dialog, with respect to
2370    /// event delivery.
2371    ///
2372    /// Global event controllers will not handle events with targets
2373    /// inside the widget, unless they are set up to ignore propagation
2374    /// limits. See [`EventControllerExt::set_propagation_limit()`][crate::prelude::EventControllerExt::set_propagation_limit()].
2375    #[cfg(feature = "v4_18")]
2376    #[cfg_attr(docsrs, doc(cfg(feature = "v4_18")))]
2377    pub fn limit_events(self, limit_events: bool) -> Self {
2378        Self {
2379            builder: self.builder.property("limit-events", limit_events),
2380        }
2381    }
2382
2383    /// Margin on bottom side of widget.
2384    ///
2385    /// This property adds margin outside of the widget's normal size
2386    /// request, the margin will be added in addition to the size from
2387    /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
2388    pub fn margin_bottom(self, margin_bottom: i32) -> Self {
2389        Self {
2390            builder: self.builder.property("margin-bottom", margin_bottom),
2391        }
2392    }
2393
2394    /// Margin on end of widget, horizontally.
2395    ///
2396    /// This property supports left-to-right and right-to-left text
2397    /// directions.
2398    ///
2399    /// This property adds margin outside of the widget's normal size
2400    /// request, the margin will be added in addition to the size from
2401    /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
2402    pub fn margin_end(self, margin_end: i32) -> Self {
2403        Self {
2404            builder: self.builder.property("margin-end", margin_end),
2405        }
2406    }
2407
2408    /// Margin on start of widget, horizontally.
2409    ///
2410    /// This property supports left-to-right and right-to-left text
2411    /// directions.
2412    ///
2413    /// This property adds margin outside of the widget's normal size
2414    /// request, the margin will be added in addition to the size from
2415    /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
2416    pub fn margin_start(self, margin_start: i32) -> Self {
2417        Self {
2418            builder: self.builder.property("margin-start", margin_start),
2419        }
2420    }
2421
2422    /// Margin on top side of widget.
2423    ///
2424    /// This property adds margin outside of the widget's normal size
2425    /// request, the margin will be added in addition to the size from
2426    /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
2427    pub fn margin_top(self, margin_top: i32) -> Self {
2428        Self {
2429            builder: self.builder.property("margin-top", margin_top),
2430        }
2431    }
2432
2433    /// The name of the widget.
2434    pub fn name(self, name: impl Into<glib::GString>) -> Self {
2435        Self {
2436            builder: self.builder.property("name", name.into()),
2437        }
2438    }
2439
2440    /// The requested opacity of the widget.
2441    pub fn opacity(self, opacity: f64) -> Self {
2442        Self {
2443            builder: self.builder.property("opacity", opacity),
2444        }
2445    }
2446
2447    /// How content outside the widget's content area is treated.
2448    ///
2449    /// This property is meant to be set by widget implementations,
2450    /// typically in their instance init function.
2451    pub fn overflow(self, overflow: Overflow) -> Self {
2452        Self {
2453            builder: self.builder.property("overflow", overflow),
2454        }
2455    }
2456
2457    /// Whether the widget will receive the default action when it is focused.
2458    pub fn receives_default(self, receives_default: bool) -> Self {
2459        Self {
2460            builder: self.builder.property("receives-default", receives_default),
2461        }
2462    }
2463
2464    /// Whether the widget responds to input.
2465    pub fn sensitive(self, sensitive: bool) -> Self {
2466        Self {
2467            builder: self.builder.property("sensitive", sensitive),
2468        }
2469    }
2470
2471    /// Sets the text of tooltip to be the given string, which is marked up
2472    /// with Pango markup.
2473    ///
2474    /// Also see [`Tooltip::set_markup()`][crate::Tooltip::set_markup()].
2475    ///
2476    /// This is a convenience property which will take care of getting the
2477    /// tooltip shown if the given string is not `NULL`:
2478    /// [`has-tooltip`][struct@crate::Widget#has-tooltip] will automatically be set to true
2479    /// and there will be taken care of [`query-tooltip`][struct@crate::Widget#query-tooltip] in
2480    /// the default signal handler.
2481    ///
2482    /// Note that if both [`tooltip-text`][struct@crate::Widget#tooltip-text] and
2483    /// [`tooltip-markup`][struct@crate::Widget#tooltip-markup] are set, the last one wins.
2484    pub fn tooltip_markup(self, tooltip_markup: impl Into<glib::GString>) -> Self {
2485        Self {
2486            builder: self
2487                .builder
2488                .property("tooltip-markup", tooltip_markup.into()),
2489        }
2490    }
2491
2492    /// Sets the text of tooltip to be the given string.
2493    ///
2494    /// Also see [`Tooltip::set_text()`][crate::Tooltip::set_text()].
2495    ///
2496    /// This is a convenience property which will take care of getting the
2497    /// tooltip shown if the given string is not `NULL`:
2498    /// [`has-tooltip`][struct@crate::Widget#has-tooltip] will automatically be set to true
2499    /// and there will be taken care of [`query-tooltip`][struct@crate::Widget#query-tooltip] in
2500    /// the default signal handler.
2501    ///
2502    /// Note that if both [`tooltip-text`][struct@crate::Widget#tooltip-text] and
2503    /// [`tooltip-markup`][struct@crate::Widget#tooltip-markup] are set, the last one wins.
2504    pub fn tooltip_text(self, tooltip_text: impl Into<glib::GString>) -> Self {
2505        Self {
2506            builder: self.builder.property("tooltip-text", tooltip_text.into()),
2507        }
2508    }
2509
2510    /// How to distribute vertical space if widget gets extra space.
2511    pub fn valign(self, valign: Align) -> Self {
2512        Self {
2513            builder: self.builder.property("valign", valign),
2514        }
2515    }
2516
2517    /// Whether to expand vertically.
2518    pub fn vexpand(self, vexpand: bool) -> Self {
2519        Self {
2520            builder: self.builder.property("vexpand", vexpand),
2521        }
2522    }
2523
2524    /// Whether to use the `vexpand` property.
2525    pub fn vexpand_set(self, vexpand_set: bool) -> Self {
2526        Self {
2527            builder: self.builder.property("vexpand-set", vexpand_set),
2528        }
2529    }
2530
2531    /// Whether the widget is visible.
2532    pub fn visible(self, visible: bool) -> Self {
2533        Self {
2534            builder: self.builder.property("visible", visible),
2535        }
2536    }
2537
2538    /// Overrides for width request of the widget.
2539    ///
2540    /// If this is -1, the natural request will be used.
2541    pub fn width_request(self, width_request: i32) -> Self {
2542        Self {
2543            builder: self.builder.property("width-request", width_request),
2544        }
2545    }
2546
2547    /// The accessible role of the given [`Accessible`][crate::Accessible] implementation.
2548    ///
2549    /// The accessible role cannot be changed once set.
2550    pub fn accessible_role(self, accessible_role: AccessibleRole) -> Self {
2551        Self {
2552            builder: self.builder.property("accessible-role", accessible_role),
2553        }
2554    }
2555
2556    // rustdoc-stripper-ignore-next
2557    /// Build the [`AboutDialog`].
2558    #[must_use = "Building the object from the builder is usually expensive and is not expected to have side effects"]
2559    pub fn build(self) -> AboutDialog {
2560        assert_initialized_main_thread!();
2561        self.builder.build()
2562    }
2563}