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