Skip to main content

gtk/auto/
about_dialog.rs

1// This file was generated by gir (https://github.com/gtk-rs/gir)
2// from gir-files (https://github.com/gtk-rs/gir-files)
3// DO NOT EDIT
4
5use crate::{
6    Align, Application, Bin, Buildable, Container, Dialog, License, ResizeMode, Widget, Window,
7    WindowPosition, WindowType, ffi,
8};
9use glib::{
10    object::ObjectType as _,
11    prelude::*,
12    signal::{SignalHandlerId, connect_raw},
13    translate::*,
14};
15use std::boxed::Box as Box_;
16
17glib::wrapper! {
18    ///
19    /// GdkPixbuf *example_logo = gdk_pixbuf_new_from_file ("./logo.png", NULL);
20    /// gtk_show_about_dialog (NULL,
21    ///  "program-name", "ExampleCode",
22    ///  "logo", example_logo,
23    ///  "title", _("About ExampleCode"),
24    ///  NULL);
25    /// ]|
26    ///
27    /// It is also possible to show a [`AboutDialog`][crate::AboutDialog] like any other [`Dialog`][crate::Dialog],
28    /// e.g. using [`DialogExt::run()`][crate::prelude::DialogExt::run()]. In this case, you might need to know that
29    /// the “Close” button returns the [`ResponseType::Cancel`][crate::ResponseType::Cancel] response id.
30    ///
31    /// ## Properties
32    ///
33    ///
34    /// #### `artists`
35    ///  The people who contributed artwork to the program, as a [`None`]-terminated
36    /// array of strings. Each string may contain email addresses and URLs, which
37    /// will be displayed as links, see the introduction for more details.
38    ///
39    /// Readable | Writable
40    ///
41    ///
42    /// #### `authors`
43    ///  The authors of the program, as a [`None`]-terminated array of strings.
44    /// Each string may contain email addresses and URLs, which will be displayed
45    /// as links, see the introduction for more details.
46    ///
47    /// Readable | Writable
48    ///
49    ///
50    /// #### `comments`
51    ///  Comments about the program. This string is displayed in a label
52    /// in the main dialog, thus it should be a short explanation of
53    /// the main purpose of the program, not a detailed list of features.
54    ///
55    /// Readable | Writable
56    ///
57    ///
58    /// #### `copyright`
59    ///  Copyright information for the program.
60    ///
61    /// Readable | Writable
62    ///
63    ///
64    /// #### `documenters`
65    ///  The people documenting the program, as a [`None`]-terminated array of strings.
66    /// Each string may contain email addresses and URLs, which will be displayed
67    /// as links, see the introduction for more details.
68    ///
69    /// Readable | Writable
70    ///
71    ///
72    /// #### `license`
73    ///  The license of the program. This string is displayed in a
74    /// text view in a secondary dialog, therefore it is fine to use
75    /// a long multi-paragraph text. Note that the text is only wrapped
76    /// in the text view if the "wrap-license" property is set to [`true`];
77    /// otherwise the text itself must contain the intended linebreaks.
78    /// When setting this property to a non-[`None`] value, the
79    /// [`license-type`][struct@crate::AboutDialog#license-type] property is set to [`License::Custom`][crate::License::Custom]
80    /// as a side effect.
81    ///
82    /// Readable | Writable
83    ///
84    ///
85    /// #### `license-type`
86    ///  The license of the program, as a value of the [`License`][crate::License] enumeration.
87    ///
88    /// The [`AboutDialog`][crate::AboutDialog] will automatically fill out a standard disclaimer
89    /// and link the user to the appropriate online resource for the license
90    /// text.
91    ///
92    /// If [`License::Unknown`][crate::License::Unknown] is used, the link used will be the same
93    /// specified in the [`website`][struct@crate::AboutDialog#website] property.
94    ///
95    /// If [`License::Custom`][crate::License::Custom] is used, the current contents of the
96    /// [`license`][struct@crate::AboutDialog#license] property are used.
97    ///
98    /// For any other [`License`][crate::License] value, the contents of the
99    /// [`license`][struct@crate::AboutDialog#license] property are also set by this property as
100    /// a side effect.
101    ///
102    /// Readable | Writable
103    ///
104    ///
105    /// #### `logo`
106    ///  A logo for the about box. If it is [`None`], the default window icon
107    /// set with [`Window::set_default_icon()`][crate::Window::set_default_icon()] will be used.
108    ///
109    /// Readable | Writable
110    ///
111    ///
112    /// #### `logo-icon-name`
113    ///  A named icon to use as the logo for the about box. This property
114    /// overrides the [`logo`][struct@crate::AboutDialog#logo] property.
115    ///
116    /// Readable | Writable
117    ///
118    ///
119    /// #### `program-name`
120    ///  The name of the program.
121    /// If this is not set, it defaults to `g_get_application_name()`.
122    ///
123    /// Readable | Writable
124    ///
125    ///
126    /// #### `translator-credits`
127    ///  Credits to the translators. This string should be marked as translatable.
128    /// The string may contain email addresses and URLs, which will be displayed
129    /// as links, see the introduction for more details.
130    ///
131    /// Readable | Writable
132    ///
133    ///
134    /// #### `version`
135    ///  The version of the program.
136    ///
137    /// Readable | Writable
138    ///
139    ///
140    /// #### `website`
141    ///  The URL for the link to the website of the program.
142    /// This should be a string starting with "http://.
143    ///
144    /// Readable | Writable
145    ///
146    ///
147    /// #### `website-label`
148    ///  The label for the link to the website of the program.
149    ///
150    /// Readable | Writable
151    ///
152    ///
153    /// #### `wrap-license`
154    ///  Whether to wrap the text in the license dialog.
155    ///
156    /// Readable | Writable
157    /// <details><summary><h4>Dialog</h4></summary>
158    ///
159    ///
160    /// #### `use-header-bar`
161    ///  [`true`] if the dialog uses a [`HeaderBar`][crate::HeaderBar] for action buttons
162    /// instead of the action-area.
163    ///
164    /// For technical reasons, this property is declared as an integer
165    /// property, but you should only set it to [`true`] or [`false`].
166    ///
167    /// Readable | Writable | Construct Only
168    /// </details>
169    /// <details><summary><h4>Window</h4></summary>
170    ///
171    ///
172    /// #### `accept-focus`
173    ///  Whether the window should receive the input focus.
174    ///
175    /// Readable | Writable
176    ///
177    ///
178    /// #### `application`
179    ///  The [`Application`][crate::Application] associated with the window.
180    ///
181    /// The application will be kept alive for at least as long as it
182    /// has any windows associated with it (see [`ApplicationExtManual::hold()`][crate::gio::prelude::ApplicationExtManual::hold()]
183    /// for a way to keep it alive without windows).
184    ///
185    /// Normally, the connection between the application and the window
186    /// will remain until the window is destroyed, but you can explicitly
187    /// remove it by setting the :application property to [`None`].
188    ///
189    /// Readable | Writable
190    ///
191    ///
192    /// #### `attached-to`
193    ///  The widget to which this window is attached.
194    /// See [`GtkWindowExt::set_attached_to()`][crate::prelude::GtkWindowExt::set_attached_to()].
195    ///
196    /// Examples of places where specifying this relation is useful are
197    /// for instance a [`Menu`][crate::Menu] created by a [`ComboBox`][crate::ComboBox], a completion
198    /// popup window created by [`Entry`][crate::Entry] or a typeahead search entry
199    /// created by [`TreeView`][crate::TreeView].
200    ///
201    /// Readable | Writable | Construct
202    ///
203    ///
204    /// #### `decorated`
205    ///  Whether the window should be decorated by the window manager.
206    ///
207    /// Readable | Writable
208    ///
209    ///
210    /// #### `default-height`
211    ///  Readable | Writable
212    ///
213    ///
214    /// #### `default-width`
215    ///  Readable | Writable
216    ///
217    ///
218    /// #### `deletable`
219    ///  Whether the window frame should have a close button.
220    ///
221    /// Readable | Writable
222    ///
223    ///
224    /// #### `destroy-with-parent`
225    ///  Readable | Writable
226    ///
227    ///
228    /// #### `focus-on-map`
229    ///  Whether the window should receive the input focus when mapped.
230    ///
231    /// Readable | Writable
232    ///
233    ///
234    /// #### `focus-visible`
235    ///  Whether 'focus rectangles' are currently visible in this window.
236    ///
237    /// This property is maintained by GTK+ based on user input
238    /// and should not be set by applications.
239    ///
240    /// Readable | Writable
241    ///
242    ///
243    /// #### `gravity`
244    ///  The window gravity of the window. See [`GtkWindowExt::move_()`][crate::prelude::GtkWindowExt::move_()] and [`gdk::Gravity`][crate::gdk::Gravity] for
245    /// more details about window gravity.
246    ///
247    /// Readable | Writable
248    ///
249    ///
250    /// #### `has-resize-grip`
251    ///  Whether the window has a corner resize grip.
252    ///
253    /// Note that the resize grip is only shown if the window is
254    /// actually resizable and not maximized. Use
255    /// [`resize-grip-visible`][struct@crate::Window#resize-grip-visible] to find out if the resize
256    /// grip is currently shown.
257    ///
258    /// Readable | Writable
259    ///
260    ///
261    /// #### `has-toplevel-focus`
262    ///  Readable
263    ///
264    ///
265    /// #### `hide-titlebar-when-maximized`
266    ///  Whether the titlebar should be hidden during maximization.
267    ///
268    /// Readable | Writable
269    ///
270    ///
271    /// #### `icon`
272    ///  Readable | Writable
273    ///
274    ///
275    /// #### `icon-name`
276    ///  The :icon-name property specifies the name of the themed icon to
277    /// use as the window icon. See [`IconTheme`][crate::IconTheme] for more details.
278    ///
279    /// Readable | Writable
280    ///
281    ///
282    /// #### `is-active`
283    ///  Readable
284    ///
285    ///
286    /// #### `is-maximized`
287    ///  Readable
288    ///
289    ///
290    /// #### `mnemonics-visible`
291    ///  Whether mnemonics are currently visible in this window.
292    ///
293    /// This property is maintained by GTK+ based on user input,
294    /// and should not be set by applications.
295    ///
296    /// Readable | Writable
297    ///
298    ///
299    /// #### `modal`
300    ///  Readable | Writable
301    ///
302    ///
303    /// #### `resizable`
304    ///  Readable | Writable
305    ///
306    ///
307    /// #### `resize-grip-visible`
308    ///  Whether a corner resize grip is currently shown.
309    ///
310    /// Readable
311    ///
312    ///
313    /// #### `role`
314    ///  Readable | Writable
315    ///
316    ///
317    /// #### `screen`
318    ///  Readable | Writable
319    ///
320    ///
321    /// #### `skip-pager-hint`
322    ///  Readable | Writable
323    ///
324    ///
325    /// #### `skip-taskbar-hint`
326    ///  Readable | Writable
327    ///
328    ///
329    /// #### `startup-id`
330    ///  The :startup-id is a write-only property for setting window's
331    /// startup notification identifier. See [`GtkWindowExt::set_startup_id()`][crate::prelude::GtkWindowExt::set_startup_id()]
332    /// for more details.
333    ///
334    /// Writable
335    ///
336    ///
337    /// #### `title`
338    ///  Readable | Writable
339    ///
340    ///
341    /// #### `transient-for`
342    ///  The transient parent of the window. See [`GtkWindowExt::set_transient_for()`][crate::prelude::GtkWindowExt::set_transient_for()] for
343    /// more details about transient windows.
344    ///
345    /// Readable | Writable | Construct
346    ///
347    ///
348    /// #### `type`
349    ///  Readable | Writable | Construct Only
350    ///
351    ///
352    /// #### `type-hint`
353    ///  Readable | Writable
354    ///
355    ///
356    /// #### `urgency-hint`
357    ///  Readable | Writable
358    ///
359    ///
360    /// #### `window-position`
361    ///  Readable | Writable
362    /// </details>
363    /// <details><summary><h4>Container</h4></summary>
364    ///
365    ///
366    /// #### `border-width`
367    ///  Readable | Writable
368    ///
369    ///
370    /// #### `child`
371    ///  Writable
372    ///
373    ///
374    /// #### `resize-mode`
375    ///  Readable | Writable
376    /// </details>
377    /// <details><summary><h4>Widget</h4></summary>
378    ///
379    ///
380    /// #### `app-paintable`
381    ///  Readable | Writable
382    ///
383    ///
384    /// #### `can-default`
385    ///  Readable | Writable
386    ///
387    ///
388    /// #### `can-focus`
389    ///  Readable | Writable
390    ///
391    ///
392    /// #### `composite-child`
393    ///  Readable
394    ///
395    ///
396    /// #### `double-buffered`
397    ///  Whether the widget is double buffered.
398    ///
399    /// Readable | Writable
400    ///
401    ///
402    /// #### `events`
403    ///  Readable | Writable
404    ///
405    ///
406    /// #### `expand`
407    ///  Whether to expand in both directions. Setting this sets both [`hexpand`][struct@crate::Widget#hexpand] and [`vexpand`][struct@crate::Widget#vexpand]
408    ///
409    /// Readable | Writable
410    ///
411    ///
412    /// #### `focus-on-click`
413    ///  Whether the widget should grab focus when it is clicked with the mouse.
414    ///
415    /// This property is only relevant for widgets that can take focus.
416    ///
417    /// Before 3.20, several widgets (GtkButton, GtkFileChooserButton,
418    /// GtkComboBox) implemented this property individually.
419    ///
420    /// Readable | Writable
421    ///
422    ///
423    /// #### `halign`
424    ///  How to distribute horizontal space if widget gets extra space, see [`Align`][crate::Align]
425    ///
426    /// Readable | Writable
427    ///
428    ///
429    /// #### `has-default`
430    ///  Readable | Writable
431    ///
432    ///
433    /// #### `has-focus`
434    ///  Readable | Writable
435    ///
436    ///
437    /// #### `has-tooltip`
438    ///  Enables or disables the emission of [`query-tooltip`][struct@crate::Widget#query-tooltip] on `widget`.
439    /// A value of [`true`] indicates that `widget` can have a tooltip, in this case
440    /// the widget will be queried using [`query-tooltip`][struct@crate::Widget#query-tooltip] to determine
441    /// whether it will provide a tooltip or not.
442    ///
443    /// Note that setting this property to [`true`] for the first time will change
444    /// the event masks of the GdkWindows of this widget to include leave-notify
445    /// and motion-notify events. This cannot and will not be undone when the
446    /// property is set to [`false`] again.
447    ///
448    /// Readable | Writable
449    ///
450    ///
451    /// #### `height-request`
452    ///  Readable | Writable
453    ///
454    ///
455    /// #### `hexpand`
456    ///  Whether to expand horizontally. See [`WidgetExt::set_hexpand()`][crate::prelude::WidgetExt::set_hexpand()].
457    ///
458    /// Readable | Writable
459    ///
460    ///
461    /// #### `hexpand-set`
462    ///  Whether to use the [`hexpand`][struct@crate::Widget#hexpand] property. See [`WidgetExt::is_hexpand_set()`][crate::prelude::WidgetExt::is_hexpand_set()].
463    ///
464    /// Readable | Writable
465    ///
466    ///
467    /// #### `is-focus`
468    ///  Readable | Writable
469    ///
470    ///
471    /// #### `margin`
472    ///  Sets all four sides' margin at once. If read, returns max
473    /// margin on any side.
474    ///
475    /// Readable | Writable
476    ///
477    ///
478    /// #### `margin-bottom`
479    ///  Margin on bottom side of widget.
480    ///
481    /// This property adds margin outside of the widget's normal size
482    /// request, the margin will be added in addition to the size from
483    /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
484    ///
485    /// Readable | Writable
486    ///
487    ///
488    /// #### `margin-end`
489    ///  Margin on end of widget, horizontally. This property supports
490    /// left-to-right and right-to-left text directions.
491    ///
492    /// This property adds margin outside of the widget's normal size
493    /// request, the margin will be added in addition to the size from
494    /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
495    ///
496    /// Readable | Writable
497    ///
498    ///
499    /// #### `margin-left`
500    ///  Margin on left side of widget.
501    ///
502    /// This property adds margin outside of the widget's normal size
503    /// request, the margin will be added in addition to the size from
504    /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
505    ///
506    /// Readable | Writable
507    ///
508    ///
509    /// #### `margin-right`
510    ///  Margin on right side of widget.
511    ///
512    /// This property adds margin outside of the widget's normal size
513    /// request, the margin will be added in addition to the size from
514    /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
515    ///
516    /// Readable | Writable
517    ///
518    ///
519    /// #### `margin-start`
520    ///  Margin on start of widget, horizontally. This property supports
521    /// left-to-right and right-to-left text directions.
522    ///
523    /// This property adds margin outside of the widget's normal size
524    /// request, the margin will be added in addition to the size from
525    /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
526    ///
527    /// Readable | Writable
528    ///
529    ///
530    /// #### `margin-top`
531    ///  Margin on top side of widget.
532    ///
533    /// This property adds margin outside of the widget's normal size
534    /// request, the margin will be added in addition to the size from
535    /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
536    ///
537    /// Readable | Writable
538    ///
539    ///
540    /// #### `name`
541    ///  Readable | Writable
542    ///
543    ///
544    /// #### `no-show-all`
545    ///  Readable | Writable
546    ///
547    ///
548    /// #### `opacity`
549    ///  The requested opacity of the widget. See [`WidgetExt::set_opacity()`][crate::prelude::WidgetExt::set_opacity()] for
550    /// more details about window opacity.
551    ///
552    /// Before 3.8 this was only available in GtkWindow
553    ///
554    /// Readable | Writable
555    ///
556    ///
557    /// #### `parent`
558    ///  Readable | Writable
559    ///
560    ///
561    /// #### `receives-default`
562    ///  Readable | Writable
563    ///
564    ///
565    /// #### `scale-factor`
566    ///  The scale factor of the widget. See [`WidgetExt::scale_factor()`][crate::prelude::WidgetExt::scale_factor()] for
567    /// more details about widget scaling.
568    ///
569    /// Readable
570    ///
571    ///
572    /// #### `sensitive`
573    ///  Readable | Writable
574    ///
575    ///
576    /// #### `style`
577    ///  The style of the widget, which contains information about how it will look (colors, etc).
578    ///
579    /// Readable | Writable
580    ///
581    ///
582    /// #### `tooltip-markup`
583    ///  Sets the text of tooltip to be the given string, which is marked up
584    /// with the [Pango text markup language][PangoMarkupFormat].
585    /// Also see [`Tooltip::set_markup()`][crate::Tooltip::set_markup()].
586    ///
587    /// This is a convenience property which will take care of getting the
588    /// tooltip shown if the given string is not [`None`]: [`has-tooltip`][struct@crate::Widget#has-tooltip]
589    /// will automatically be set to [`true`] and there will be taken care of
590    /// [`query-tooltip`][struct@crate::Widget#query-tooltip] in the default signal handler.
591    ///
592    /// Note that if both [`tooltip-text`][struct@crate::Widget#tooltip-text] and [`tooltip-markup`][struct@crate::Widget#tooltip-markup]
593    /// are set, the last one wins.
594    ///
595    /// Readable | Writable
596    ///
597    ///
598    /// #### `tooltip-text`
599    ///  Sets the text of tooltip to be the given string.
600    ///
601    /// Also see [`Tooltip::set_text()`][crate::Tooltip::set_text()].
602    ///
603    /// This is a convenience property which will take care of getting the
604    /// tooltip shown if the given string is not [`None`]: [`has-tooltip`][struct@crate::Widget#has-tooltip]
605    /// will automatically be set to [`true`] and there will be taken care of
606    /// [`query-tooltip`][struct@crate::Widget#query-tooltip] in the default signal handler.
607    ///
608    /// Note that if both [`tooltip-text`][struct@crate::Widget#tooltip-text] and [`tooltip-markup`][struct@crate::Widget#tooltip-markup]
609    /// are set, the last one wins.
610    ///
611    /// Readable | Writable
612    ///
613    ///
614    /// #### `valign`
615    ///  How to distribute vertical space if widget gets extra space, see [`Align`][crate::Align]
616    ///
617    /// Readable | Writable
618    ///
619    ///
620    /// #### `vexpand`
621    ///  Whether to expand vertically. See [`WidgetExt::set_vexpand()`][crate::prelude::WidgetExt::set_vexpand()].
622    ///
623    /// Readable | Writable
624    ///
625    ///
626    /// #### `vexpand-set`
627    ///  Whether to use the [`vexpand`][struct@crate::Widget#vexpand] property. See [`WidgetExt::is_vexpand_set()`][crate::prelude::WidgetExt::is_vexpand_set()].
628    ///
629    /// Readable | Writable
630    ///
631    ///
632    /// #### `visible`
633    ///  Readable | Writable
634    ///
635    ///
636    /// #### `width-request`
637    ///  Readable | Writable
638    ///
639    ///
640    /// #### `window`
641    ///  The widget's window if it is realized, [`None`] otherwise.
642    ///
643    /// Readable
644    /// </details>
645    ///
646    /// ## Signals
647    ///
648    ///
649    /// #### `activate-link`
650    ///  The signal which gets emitted to activate a URI.
651    /// Applications may connect to it to override the default behaviour,
652    /// which is to call [`show_uri_on_window()`][crate::show_uri_on_window()].
653    ///
654    ///
655    /// <details><summary><h4>Dialog</h4></summary>
656    ///
657    ///
658    /// #### `close`
659    ///  The ::close signal is a
660    /// [keybinding signal][GtkBindingSignal]
661    /// which gets emitted when the user uses a keybinding to close
662    /// the dialog.
663    ///
664    /// The default binding for this signal is the Escape key.
665    ///
666    /// Action
667    ///
668    ///
669    /// #### `response`
670    ///  Emitted when an action widget is clicked, the dialog receives a
671    /// delete event, or the application programmer calls [`DialogExt::response()`][crate::prelude::DialogExt::response()].
672    /// On a delete event, the response ID is [`ResponseType::DeleteEvent`][crate::ResponseType::DeleteEvent].
673    /// Otherwise, it depends on which action widget was clicked.
674    ///
675    ///
676    /// </details>
677    /// <details><summary><h4>Window</h4></summary>
678    ///
679    ///
680    /// #### `activate-default`
681    ///  The ::activate-default signal is a
682    /// [keybinding signal][GtkBindingSignal]
683    /// which gets emitted when the user activates the default widget
684    /// of `window`.
685    ///
686    /// Action
687    ///
688    ///
689    /// #### `activate-focus`
690    ///  The ::activate-focus signal is a
691    /// [keybinding signal][GtkBindingSignal]
692    /// which gets emitted when the user activates the currently
693    /// focused widget of `window`.
694    ///
695    /// Action
696    ///
697    ///
698    /// #### `enable-debugging`
699    ///  The ::enable-debugging signal is a [keybinding signal][GtkBindingSignal]
700    /// which gets emitted when the user enables or disables interactive
701    /// debugging. When `toggle` is [`true`], interactive debugging is toggled
702    /// on or off, when it is [`false`], the debugger will be pointed at the
703    /// widget under the pointer.
704    ///
705    /// The default bindings for this signal are Ctrl-Shift-I
706    /// and Ctrl-Shift-D.
707    ///
708    /// Action
709    ///
710    ///
711    /// #### `keys-changed`
712    ///  The ::keys-changed signal gets emitted when the set of accelerators
713    /// or mnemonics that are associated with `window` changes.
714    ///
715    ///
716    ///
717    ///
718    /// #### `set-focus`
719    ///  This signal is emitted whenever the currently focused widget in
720    /// this window changes.
721    ///
722    ///
723    /// </details>
724    /// <details><summary><h4>Container</h4></summary>
725    ///
726    ///
727    /// #### `add`
728    ///
729    ///
730    ///
731    /// #### `check-resize`
732    ///
733    ///
734    ///
735    /// #### `remove`
736    ///
737    ///
738    ///
739    /// #### `set-focus-child`
740    ///
741    /// </details>
742    /// <details><summary><h4>Widget</h4></summary>
743    ///
744    ///
745    /// #### `accel-closures-changed`
746    ///
747    ///
748    ///
749    /// #### `button-press-event`
750    ///  The ::button-press-event signal will be emitted when a button
751    /// (typically from a mouse) is pressed.
752    ///
753    /// To receive this signal, the [`gdk::Window`][crate::gdk::Window] associated to the
754    /// widget needs to enable the [`gdk::EventMask::BUTTON_PRESS_MASK`][crate::gdk::EventMask::BUTTON_PRESS_MASK] mask.
755    ///
756    /// This signal will be sent to the grab widget if there is one.
757    ///
758    ///
759    ///
760    ///
761    /// #### `button-release-event`
762    ///  The ::button-release-event signal will be emitted when a button
763    /// (typically from a mouse) is released.
764    ///
765    /// To receive this signal, the [`gdk::Window`][crate::gdk::Window] associated to the
766    /// widget needs to enable the [`gdk::EventMask::BUTTON_RELEASE_MASK`][crate::gdk::EventMask::BUTTON_RELEASE_MASK] mask.
767    ///
768    /// This signal will be sent to the grab widget if there is one.
769    ///
770    ///
771    ///
772    ///
773    /// #### `can-activate-accel`
774    ///  Determines whether an accelerator that activates the signal
775    /// identified by `signal_id` can currently be activated.
776    /// This signal is present to allow applications and derived
777    /// widgets to override the default [`Widget`][crate::Widget] handling
778    /// for determining whether an accelerator can be activated.
779    ///
780    ///
781    ///
782    ///
783    /// #### `child-notify`
784    ///  The ::child-notify signal is emitted for each
785    /// [child property][child-properties] that has
786    /// changed on an object. The signal's detail holds the property name.
787    ///
788    /// Detailed
789    ///
790    ///
791    /// #### `composited-changed`
792    ///  The ::composited-changed signal is emitted when the composited
793    /// status of `widgets` screen changes.
794    /// See [`Screen::is_composited()`][crate::gdk::Screen::is_composited()].
795    ///
796    /// Action
797    ///
798    ///
799    /// #### `configure-event`
800    ///  The ::configure-event signal will be emitted when the size, position or
801    /// stacking of the `widget`'s window has changed.
802    ///
803    /// To receive this signal, the [`gdk::Window`][crate::gdk::Window] associated to the widget needs
804    /// to enable the [`gdk::EventMask::STRUCTURE_MASK`][crate::gdk::EventMask::STRUCTURE_MASK] mask. GDK will enable this mask
805    /// automatically for all new windows.
806    ///
807    ///
808    ///
809    ///
810    /// #### `damage-event`
811    ///  Emitted when a redirected window belonging to `widget` gets drawn into.
812    /// The region/area members of the event shows what area of the redirected
813    /// drawable was drawn into.
814    ///
815    ///
816    ///
817    ///
818    /// #### `delete-event`
819    ///  The ::delete-event signal is emitted if a user requests that
820    /// a toplevel window is closed. The default handler for this signal
821    /// destroys the window. Connecting [`WidgetExtManual::hide_on_delete()`][crate::prelude::WidgetExtManual::hide_on_delete()] to
822    /// this signal will cause the window to be hidden instead, so that
823    /// it can later be shown again without reconstructing it.
824    ///
825    ///
826    ///
827    ///
828    /// #### `destroy`
829    ///  Signals that all holders of a reference to the widget should release
830    /// the reference that they hold. May result in finalization of the widget
831    /// if all references are released.
832    ///
833    /// This signal is not suitable for saving widget state.
834    ///
835    ///
836    ///
837    ///
838    /// #### `destroy-event`
839    ///  The ::destroy-event signal is emitted when a [`gdk::Window`][crate::gdk::Window] is destroyed.
840    /// You rarely get this signal, because most widgets disconnect themselves
841    /// from their window before they destroy it, so no widget owns the
842    /// window at destroy time.
843    ///
844    /// To receive this signal, the [`gdk::Window`][crate::gdk::Window] associated to the widget needs
845    /// to enable the [`gdk::EventMask::STRUCTURE_MASK`][crate::gdk::EventMask::STRUCTURE_MASK] mask. GDK will enable this mask
846    /// automatically for all new windows.
847    ///
848    ///
849    ///
850    ///
851    /// #### `direction-changed`
852    ///  The ::direction-changed signal is emitted when the text direction
853    /// of a widget changes.
854    ///
855    ///
856    ///
857    ///
858    /// #### `drag-begin`
859    ///  The ::drag-begin signal is emitted on the drag source when a drag is
860    /// started. A typical reason to connect to this signal is to set up a
861    /// custom drag icon with e.g. [`WidgetExt::drag_source_set_icon_pixbuf()`][crate::prelude::WidgetExt::drag_source_set_icon_pixbuf()].
862    ///
863    /// Note that some widgets set up a drag icon in the default handler of
864    /// this signal, so you may have to use `g_signal_connect_after()` to
865    /// override what the default handler did.
866    ///
867    ///
868    ///
869    ///
870    /// #### `drag-data-delete`
871    ///  The ::drag-data-delete signal is emitted on the drag source when a drag
872    /// with the action [`gdk::DragAction::MOVE`][crate::gdk::DragAction::MOVE] is successfully completed. The signal
873    /// handler is responsible for deleting the data that has been dropped. What
874    /// "delete" means depends on the context of the drag operation.
875    ///
876    ///
877    ///
878    ///
879    /// #### `drag-data-get`
880    ///  The ::drag-data-get signal is emitted on the drag source when the drop
881    /// site requests the data which is dragged. It is the responsibility of
882    /// the signal handler to fill `data` with the data in the format which
883    /// is indicated by `info`. See [`SelectionData::set()`][crate::SelectionData::set()] and
884    /// [`SelectionData::set_text()`][crate::SelectionData::set_text()].
885    ///
886    ///
887    ///
888    ///
889    /// #### `drag-data-received`
890    ///  format == 8))
891    ///  {
892    ///  GdkDragAction action;
893    ///
894    ///  // handle data here
895    ///
896    ///  action = gdk_drag_context_get_selected_action (context);
897    ///  if (action == GDK_ACTION_ASK)
898    ///  {
899    ///  GtkWidget *dialog;
900    ///  gint response;
901    ///
902    ///  dialog = gtk_message_dialog_new (NULL,
903    ///  GTK_DIALOG_MODAL |
904    ///  GTK_DIALOG_DESTROY_WITH_PARENT,
905    ///  GTK_MESSAGE_INFO,
906    ///  GTK_BUTTONS_YES_NO,
907    ///  "Move the data ?\n");
908    ///  response = gtk_dialog_run (GTK_DIALOG (dialog));
909    ///  gtk_widget_destroy (dialog);
910    ///
911    ///  if (response == GTK_RESPONSE_YES)
912    ///  action = GDK_ACTION_MOVE;
913    ///  else
914    ///  action = GDK_ACTION_COPY;
915    ///  }
916    ///
917    ///  gtk_drag_finish (context, TRUE, action == GDK_ACTION_MOVE, time);
918    ///  }
919    ///  else
920    ///  gtk_drag_finish (context, FALSE, FALSE, time);
921    ///  }
922    /// ]|
923    ///
924    ///
925    ///
926    ///
927    /// #### `drag-drop`
928    ///  The ::drag-drop signal is emitted on the drop site when the user drops
929    /// the data onto the widget. The signal handler must determine whether
930    /// the cursor position is in a drop zone or not. If it is not in a drop
931    /// zone, it returns [`false`] and no further processing is necessary.
932    /// Otherwise, the handler returns [`true`]. In this case, the handler must
933    /// ensure that `gtk_drag_finish()` is called to let the source know that
934    /// the drop is done. The call to `gtk_drag_finish()` can be done either
935    /// directly or in a [`drag-data-received`][struct@crate::Widget#drag-data-received] handler which gets
936    /// triggered by calling [`WidgetExt::drag_get_data()`][crate::prelude::WidgetExt::drag_get_data()] to receive the data for one
937    /// or more of the supported targets.
938    ///
939    ///
940    ///
941    ///
942    /// #### `drag-end`
943    ///  The ::drag-end signal is emitted on the drag source when a drag is
944    /// finished. A typical reason to connect to this signal is to undo
945    /// things done in [`drag-begin`][struct@crate::Widget#drag-begin].
946    ///
947    ///
948    ///
949    ///
950    /// #### `drag-failed`
951    ///  The ::drag-failed signal is emitted on the drag source when a drag has
952    /// failed. The signal handler may hook custom code to handle a failed DnD
953    /// operation based on the type of error, it returns [`true`] is the failure has
954    /// been already handled (not showing the default "drag operation failed"
955    /// animation), otherwise it returns [`false`].
956    ///
957    ///
958    ///
959    ///
960    /// #### `drag-leave`
961    ///  The ::drag-leave signal is emitted on the drop site when the cursor
962    /// leaves the widget. A typical reason to connect to this signal is to
963    /// undo things done in [`drag-motion`][struct@crate::Widget#drag-motion], e.g. undo highlighting
964    /// with [`WidgetExt::drag_unhighlight()`][crate::prelude::WidgetExt::drag_unhighlight()].
965    ///
966    ///
967    /// Likewise, the [`drag-leave`][struct@crate::Widget#drag-leave] signal is also emitted before the
968    /// ::drag-drop signal, for instance to allow cleaning up of a preview item
969    /// created in the [`drag-motion`][struct@crate::Widget#drag-motion] signal handler.
970    ///
971    ///
972    ///
973    ///
974    /// #### `drag-motion`
975    ///  suggested_action,
976    ///  time);
977    ///  }
978    ///  else
979    ///  {
980    ///  // accept the drop
981    ///  }
982    /// }
983    /// ]|
984    ///
985    ///
986    ///
987    ///
988    /// #### `draw`
989    ///  This signal is emitted when a widget is supposed to render itself.
990    /// The `widget`'s top left corner must be painted at the origin of
991    /// the passed in context and be sized to the values returned by
992    /// [`WidgetExt::allocated_width()`][crate::prelude::WidgetExt::allocated_width()] and
993    /// [`WidgetExt::allocated_height()`][crate::prelude::WidgetExt::allocated_height()].
994    ///
995    /// Signal handlers connected to this signal can modify the cairo
996    /// context passed as `cr` in any way they like and don't need to
997    /// restore it. The signal emission takes care of calling `cairo_save()`
998    /// before and `cairo_restore()` after invoking the handler.
999    ///
1000    /// The signal handler will get a `cr` with a clip region already set to the
1001    /// widget's dirty region, i.e. to the area that needs repainting. Complicated
1002    /// widgets that want to avoid redrawing themselves completely can get the full
1003    /// extents of the clip region with `gdk_cairo_get_clip_rectangle()`, or they can
1004    /// get a finer-grained representation of the dirty region with
1005    /// `cairo_copy_clip_rectangle_list()`.
1006    ///
1007    ///
1008    ///
1009    ///
1010    /// #### `enter-notify-event`
1011    ///  The ::enter-notify-event will be emitted when the pointer enters
1012    /// the `widget`'s window.
1013    ///
1014    /// To receive this signal, the [`gdk::Window`][crate::gdk::Window] associated to the widget needs
1015    /// to enable the [`gdk::EventMask::ENTER_NOTIFY_MASK`][crate::gdk::EventMask::ENTER_NOTIFY_MASK] mask.
1016    ///
1017    /// This signal will be sent to the grab widget if there is one.
1018    ///
1019    ///
1020    ///
1021    ///
1022    /// #### `event`
1023    ///  The GTK+ main loop will emit three signals for each GDK event delivered
1024    /// to a widget: one generic ::event signal, another, more specific,
1025    /// signal that matches the type of event delivered (e.g.
1026    /// [`key-press-event`][struct@crate::Widget#key-press-event]) and finally a generic
1027    /// [`event-after`][struct@crate::Widget#event-after] signal.
1028    ///
1029    ///
1030    ///
1031    ///
1032    /// #### `event-after`
1033    ///  After the emission of the [`event`][struct@crate::Widget#event] signal and (optionally)
1034    /// the second more specific signal, ::event-after will be emitted
1035    /// regardless of the previous two signals handlers return values.
1036    ///
1037    ///
1038    ///
1039    ///
1040    /// #### `focus`
1041    ///
1042    ///
1043    ///
1044    /// #### `focus-in-event`
1045    ///  The ::focus-in-event signal will be emitted when the keyboard focus
1046    /// enters the `widget`'s window.
1047    ///
1048    /// To receive this signal, the [`gdk::Window`][crate::gdk::Window] associated to the widget needs
1049    /// to enable the [`gdk::EventMask::FOCUS_CHANGE_MASK`][crate::gdk::EventMask::FOCUS_CHANGE_MASK] mask.
1050    ///
1051    ///
1052    ///
1053    ///
1054    /// #### `focus-out-event`
1055    ///  The ::focus-out-event signal will be emitted when the keyboard focus
1056    /// leaves the `widget`'s window.
1057    ///
1058    /// To receive this signal, the [`gdk::Window`][crate::gdk::Window] associated to the widget needs
1059    /// to enable the [`gdk::EventMask::FOCUS_CHANGE_MASK`][crate::gdk::EventMask::FOCUS_CHANGE_MASK] mask.
1060    ///
1061    ///
1062    ///
1063    ///
1064    /// #### `grab-broken-event`
1065    ///  Emitted when a pointer or keyboard grab on a window belonging
1066    /// to `widget` gets broken.
1067    ///
1068    /// On X11, this happens when the grab window becomes unviewable
1069    /// (i.e. it or one of its ancestors is unmapped), or if the same
1070    /// application grabs the pointer or keyboard again.
1071    ///
1072    ///
1073    ///
1074    ///
1075    /// #### `grab-focus`
1076    ///  Action
1077    ///
1078    ///
1079    /// #### `grab-notify`
1080    ///  The ::grab-notify signal is emitted when a widget becomes
1081    /// shadowed by a GTK+ grab (not a pointer or keyboard grab) on
1082    /// another widget, or when it becomes unshadowed due to a grab
1083    /// being removed.
1084    ///
1085    /// A widget is shadowed by a [`WidgetExt::grab_add()`][crate::prelude::WidgetExt::grab_add()] when the topmost
1086    /// grab widget in the grab stack of its window group is not
1087    /// its ancestor.
1088    ///
1089    ///
1090    ///
1091    ///
1092    /// #### `hide`
1093    ///  The ::hide signal is emitted when `widget` is hidden, for example with
1094    /// [`WidgetExt::hide()`][crate::prelude::WidgetExt::hide()].
1095    ///
1096    ///
1097    ///
1098    ///
1099    /// #### `hierarchy-changed`
1100    ///  The ::hierarchy-changed signal is emitted when the
1101    /// anchored state of a widget changes. A widget is
1102    /// “anchored” when its toplevel
1103    /// ancestor is a [`Window`][crate::Window]. This signal is emitted when
1104    /// a widget changes from un-anchored to anchored or vice-versa.
1105    ///
1106    ///
1107    ///
1108    ///
1109    /// #### `key-press-event`
1110    ///  The ::key-press-event signal is emitted when a key is pressed. The signal
1111    /// emission will reoccur at the key-repeat rate when the key is kept pressed.
1112    ///
1113    /// To receive this signal, the [`gdk::Window`][crate::gdk::Window] associated to the widget needs
1114    /// to enable the [`gdk::EventMask::KEY_PRESS_MASK`][crate::gdk::EventMask::KEY_PRESS_MASK] mask.
1115    ///
1116    /// This signal will be sent to the grab widget if there is one.
1117    ///
1118    ///
1119    ///
1120    ///
1121    /// #### `key-release-event`
1122    ///  The ::key-release-event signal is emitted when a key is released.
1123    ///
1124    /// To receive this signal, the [`gdk::Window`][crate::gdk::Window] associated to the widget needs
1125    /// to enable the [`gdk::EventMask::KEY_RELEASE_MASK`][crate::gdk::EventMask::KEY_RELEASE_MASK] mask.
1126    ///
1127    /// This signal will be sent to the grab widget if there is one.
1128    ///
1129    ///
1130    ///
1131    ///
1132    /// #### `keynav-failed`
1133    ///  Gets emitted if keyboard navigation fails.
1134    /// See [`WidgetExt::keynav_failed()`][crate::prelude::WidgetExt::keynav_failed()] for details.
1135    ///
1136    ///
1137    ///
1138    ///
1139    /// #### `leave-notify-event`
1140    ///  The ::leave-notify-event will be emitted when the pointer leaves
1141    /// the `widget`'s window.
1142    ///
1143    /// To receive this signal, the [`gdk::Window`][crate::gdk::Window] associated to the widget needs
1144    /// to enable the [`gdk::EventMask::LEAVE_NOTIFY_MASK`][crate::gdk::EventMask::LEAVE_NOTIFY_MASK] mask.
1145    ///
1146    /// This signal will be sent to the grab widget if there is one.
1147    ///
1148    ///
1149    ///
1150    ///
1151    /// #### `map`
1152    ///  The ::map signal is emitted when `widget` is going to be mapped, that is
1153    /// when the widget is visible (which is controlled with
1154    /// [`WidgetExt::set_visible()`][crate::prelude::WidgetExt::set_visible()]) and all its parents up to the toplevel widget
1155    /// are also visible. Once the map has occurred, [`map-event`][struct@crate::Widget#map-event] will
1156    /// be emitted.
1157    ///
1158    /// The ::map signal can be used to determine whether a widget will be drawn,
1159    /// for instance it can resume an animation that was stopped during the
1160    /// emission of [`unmap`][struct@crate::Widget#unmap].
1161    ///
1162    ///
1163    ///
1164    ///
1165    /// #### `map-event`
1166    ///  The ::map-event signal will be emitted when the `widget`'s window is
1167    /// mapped. A window is mapped when it becomes visible on the screen.
1168    ///
1169    /// To receive this signal, the [`gdk::Window`][crate::gdk::Window] associated to the widget needs
1170    /// to enable the [`gdk::EventMask::STRUCTURE_MASK`][crate::gdk::EventMask::STRUCTURE_MASK] mask. GDK will enable this mask
1171    /// automatically for all new windows.
1172    ///
1173    ///
1174    ///
1175    ///
1176    /// #### `mnemonic-activate`
1177    ///  The default handler for this signal activates `widget` if `group_cycling`
1178    /// is [`false`], or just makes `widget` grab focus if `group_cycling` is [`true`].
1179    ///
1180    ///
1181    ///
1182    ///
1183    /// #### `motion-notify-event`
1184    ///  The ::motion-notify-event signal is emitted when the pointer moves
1185    /// over the widget's [`gdk::Window`][crate::gdk::Window].
1186    ///
1187    /// To receive this signal, the [`gdk::Window`][crate::gdk::Window] associated to the widget
1188    /// needs to enable the [`gdk::EventMask::POINTER_MOTION_MASK`][crate::gdk::EventMask::POINTER_MOTION_MASK] mask.
1189    ///
1190    /// This signal will be sent to the grab widget if there is one.
1191    ///
1192    ///
1193    ///
1194    ///
1195    /// #### `move-focus`
1196    ///  Action
1197    ///
1198    ///
1199    /// #### `parent-set`
1200    ///  The ::parent-set signal is emitted when a new parent
1201    /// has been set on a widget.
1202    ///
1203    ///
1204    ///
1205    ///
1206    /// #### `popup-menu`
1207    ///  This signal gets emitted whenever a widget should pop up a context
1208    /// menu. This usually happens through the standard key binding mechanism;
1209    /// by pressing a certain key while a widget is focused, the user can cause
1210    /// the widget to pop up a menu. For example, the [`Entry`][crate::Entry] widget creates
1211    /// a menu with clipboard commands. See the
1212    /// [Popup Menu Migration Checklist][checklist-popup-menu]
1213    /// for an example of how to use this signal.
1214    ///
1215    /// Action
1216    ///
1217    ///
1218    /// #### `property-notify-event`
1219    ///  The ::property-notify-event signal will be emitted when a property on
1220    /// the `widget`'s window has been changed or deleted.
1221    ///
1222    /// To receive this signal, the [`gdk::Window`][crate::gdk::Window] associated to the widget needs
1223    /// to enable the [`gdk::EventMask::PROPERTY_CHANGE_MASK`][crate::gdk::EventMask::PROPERTY_CHANGE_MASK] mask.
1224    ///
1225    ///
1226    ///
1227    ///
1228    /// #### `proximity-in-event`
1229    ///  To receive this signal the [`gdk::Window`][crate::gdk::Window] associated to the widget needs
1230    /// to enable the [`gdk::EventMask::PROXIMITY_IN_MASK`][crate::gdk::EventMask::PROXIMITY_IN_MASK] mask.
1231    ///
1232    /// This signal will be sent to the grab widget if there is one.
1233    ///
1234    ///
1235    ///
1236    ///
1237    /// #### `proximity-out-event`
1238    ///  To receive this signal the [`gdk::Window`][crate::gdk::Window] associated to the widget needs
1239    /// to enable the [`gdk::EventMask::PROXIMITY_OUT_MASK`][crate::gdk::EventMask::PROXIMITY_OUT_MASK] mask.
1240    ///
1241    /// This signal will be sent to the grab widget if there is one.
1242    ///
1243    ///
1244    ///
1245    ///
1246    /// #### `query-tooltip`
1247    ///  Emitted when [`has-tooltip`][struct@crate::Widget#has-tooltip] is [`true`] and the hover timeout
1248    /// has expired with the cursor hovering "above" `widget`; or emitted when `widget` got
1249    /// focus in keyboard mode.
1250    ///
1251    /// Using the given coordinates, the signal handler should determine
1252    /// whether a tooltip should be shown for `widget`. If this is the case
1253    /// [`true`] should be returned, [`false`] otherwise. Note that if
1254    /// `keyboard_mode` is [`true`], the values of `x` and `y` are undefined and
1255    /// should not be used.
1256    ///
1257    /// The signal handler is free to manipulate `tooltip` with the therefore
1258    /// destined function calls.
1259    ///
1260    ///
1261    ///
1262    ///
1263    /// #### `realize`
1264    ///  The ::realize signal is emitted when `widget` is associated with a
1265    /// [`gdk::Window`][crate::gdk::Window], which means that [`WidgetExt::realize()`][crate::prelude::WidgetExt::realize()] has been called or the
1266    /// widget has been mapped (that is, it is going to be drawn).
1267    ///
1268    ///
1269    ///
1270    ///
1271    /// #### `screen-changed`
1272    ///  The ::screen-changed signal gets emitted when the
1273    /// screen of a widget has changed.
1274    ///
1275    ///
1276    ///
1277    ///
1278    /// #### `scroll-event`
1279    ///  The ::scroll-event signal is emitted when a button in the 4 to 7
1280    /// range is pressed. Wheel mice are usually configured to generate
1281    /// button press events for buttons 4 and 5 when the wheel is turned.
1282    ///
1283    /// To receive this signal, the [`gdk::Window`][crate::gdk::Window] associated to the widget needs
1284    /// to enable the [`gdk::EventMask::SCROLL_MASK`][crate::gdk::EventMask::SCROLL_MASK] mask.
1285    ///
1286    /// This signal will be sent to the grab widget if there is one.
1287    ///
1288    ///
1289    ///
1290    ///
1291    /// #### `selection-clear-event`
1292    ///  The ::selection-clear-event signal will be emitted when the
1293    /// the `widget`'s window has lost ownership of a selection.
1294    ///
1295    ///
1296    ///
1297    ///
1298    /// #### `selection-get`
1299    ///
1300    ///
1301    ///
1302    /// #### `selection-notify-event`
1303    ///
1304    ///
1305    ///
1306    /// #### `selection-received`
1307    ///
1308    ///
1309    ///
1310    /// #### `selection-request-event`
1311    ///  The ::selection-request-event signal will be emitted when
1312    /// another client requests ownership of the selection owned by
1313    /// the `widget`'s window.
1314    ///
1315    ///
1316    ///
1317    ///
1318    /// #### `show`
1319    ///  The ::show signal is emitted when `widget` is shown, for example with
1320    /// [`WidgetExt::show()`][crate::prelude::WidgetExt::show()].
1321    ///
1322    ///
1323    ///
1324    ///
1325    /// #### `show-help`
1326    ///  Action
1327    ///
1328    ///
1329    /// #### `size-allocate`
1330    ///
1331    ///
1332    ///
1333    /// #### `state-changed`
1334    ///  The ::state-changed signal is emitted when the widget state changes.
1335    /// See `gtk_widget_get_state()`.
1336    ///
1337    ///
1338    ///
1339    ///
1340    /// #### `state-flags-changed`
1341    ///  The ::state-flags-changed signal is emitted when the widget state
1342    /// changes, see [`WidgetExt::state_flags()`][crate::prelude::WidgetExt::state_flags()].
1343    ///
1344    ///
1345    ///
1346    ///
1347    /// #### `style-set`
1348    ///  The ::style-set signal is emitted when a new style has been set
1349    /// on a widget. Note that style-modifying functions like
1350    /// `gtk_widget_modify_base()` also cause this signal to be emitted.
1351    ///
1352    /// Note that this signal is emitted for changes to the deprecated
1353    /// `GtkStyle`. To track changes to the [`StyleContext`][crate::StyleContext] associated
1354    /// with a widget, use the [`style-updated`][struct@crate::Widget#style-updated] signal.
1355    ///
1356    ///
1357    ///
1358    ///
1359    /// #### `style-updated`
1360    ///  The ::style-updated signal is a convenience signal that is emitted when the
1361    /// [`changed`][struct@crate::StyleContext#changed] signal is emitted on the `widget`'s associated
1362    /// [`StyleContext`][crate::StyleContext] as returned by [`WidgetExt::style_context()`][crate::prelude::WidgetExt::style_context()].
1363    ///
1364    /// Note that style-modifying functions like `gtk_widget_override_color()` also
1365    /// cause this signal to be emitted.
1366    ///
1367    ///
1368    ///
1369    ///
1370    /// #### `touch-event`
1371    ///
1372    ///
1373    ///
1374    /// #### `unmap`
1375    ///  The ::unmap signal is emitted when `widget` is going to be unmapped, which
1376    /// means that either it or any of its parents up to the toplevel widget have
1377    /// been set as hidden.
1378    ///
1379    /// As ::unmap indicates that a widget will not be shown any longer, it can be
1380    /// used to, for example, stop an animation on the widget.
1381    ///
1382    ///
1383    ///
1384    ///
1385    /// #### `unmap-event`
1386    ///  The ::unmap-event signal will be emitted when the `widget`'s window is
1387    /// unmapped. A window is unmapped when it becomes invisible on the screen.
1388    ///
1389    /// To receive this signal, the [`gdk::Window`][crate::gdk::Window] associated to the widget needs
1390    /// to enable the [`gdk::EventMask::STRUCTURE_MASK`][crate::gdk::EventMask::STRUCTURE_MASK] mask. GDK will enable this mask
1391    /// automatically for all new windows.
1392    ///
1393    ///
1394    ///
1395    ///
1396    /// #### `unrealize`
1397    ///  The ::unrealize signal is emitted when the [`gdk::Window`][crate::gdk::Window] associated with
1398    /// `widget` is destroyed, which means that [`WidgetExt::unrealize()`][crate::prelude::WidgetExt::unrealize()] has been
1399    /// called or the widget has been unmapped (that is, it is going to be
1400    /// hidden).
1401    ///
1402    ///
1403    ///
1404    ///
1405    /// #### `visibility-notify-event`
1406    ///  The ::visibility-notify-event will be emitted when the `widget`'s
1407    /// window is obscured or unobscured.
1408    ///
1409    /// To receive this signal the [`gdk::Window`][crate::gdk::Window] associated to the widget needs
1410    /// to enable the [`gdk::EventMask::VISIBILITY_NOTIFY_MASK`][crate::gdk::EventMask::VISIBILITY_NOTIFY_MASK] mask.
1411    ///
1412    ///
1413    ///
1414    ///
1415    /// #### `window-state-event`
1416    ///  The ::window-state-event will be emitted when the state of the
1417    /// toplevel window associated to the `widget` changes.
1418    ///
1419    /// To receive this signal the [`gdk::Window`][crate::gdk::Window] associated to the widget
1420    /// needs to enable the [`gdk::EventMask::STRUCTURE_MASK`][crate::gdk::EventMask::STRUCTURE_MASK] mask. GDK will enable
1421    /// this mask automatically for all new windows.
1422    ///
1423    ///
1424    /// </details>
1425    ///
1426    /// # Implements
1427    ///
1428    /// [`AboutDialogExt`][trait@crate::prelude::AboutDialogExt], [`DialogExt`][trait@crate::prelude::DialogExt], [`GtkWindowExt`][trait@crate::prelude::GtkWindowExt], [`BinExt`][trait@crate::prelude::BinExt], [`ContainerExt`][trait@crate::prelude::ContainerExt], [`WidgetExt`][trait@crate::prelude::WidgetExt], [`trait@glib::ObjectExt`], [`BuildableExt`][trait@crate::prelude::BuildableExt], [`DialogExtManual`][trait@crate::prelude::DialogExtManual], [`GtkWindowExtManual`][trait@crate::prelude::GtkWindowExtManual], [`ContainerExtManual`][trait@crate::prelude::ContainerExtManual], [`WidgetExtManual`][trait@crate::prelude::WidgetExtManual], [`BuildableExtManual`][trait@crate::prelude::BuildableExtManual]
1429    #[doc(alias = "GtkAboutDialog")]
1430    pub struct AboutDialog(Object<ffi::GtkAboutDialog, ffi::GtkAboutDialogClass>) @extends Dialog, Window, Bin, Container, Widget, @implements Buildable;
1431
1432    match fn {
1433        type_ => || ffi::gtk_about_dialog_get_type(),
1434    }
1435}
1436
1437impl AboutDialog {
1438    pub const NONE: Option<&'static AboutDialog> = None;
1439
1440    /// Creates a new [`AboutDialog`][crate::AboutDialog].
1441    ///
1442    /// # Returns
1443    ///
1444    /// a newly created [`AboutDialog`][crate::AboutDialog]
1445    #[doc(alias = "gtk_about_dialog_new")]
1446    pub fn new() -> AboutDialog {
1447        assert_initialized_main_thread!();
1448        unsafe { Widget::from_glib_none(ffi::gtk_about_dialog_new()).unsafe_cast() }
1449    }
1450
1451    // rustdoc-stripper-ignore-next
1452    /// Creates a new builder-pattern struct instance to construct [`AboutDialog`] objects.
1453    ///
1454    /// This method returns an instance of [`AboutDialogBuilder`](crate::builders::AboutDialogBuilder) which can be used to create [`AboutDialog`] objects.
1455    pub fn builder() -> AboutDialogBuilder {
1456        AboutDialogBuilder::new()
1457    }
1458}
1459
1460impl Default for AboutDialog {
1461    fn default() -> Self {
1462        Self::new()
1463    }
1464}
1465
1466// rustdoc-stripper-ignore-next
1467/// A [builder-pattern] type to construct [`AboutDialog`] objects.
1468///
1469/// [builder-pattern]: https://doc.rust-lang.org/1.0.0/style/ownership/builders.html
1470#[must_use = "The builder must be built to be used"]
1471pub struct AboutDialogBuilder {
1472    builder: glib::object::ObjectBuilder<'static, AboutDialog>,
1473}
1474
1475impl AboutDialogBuilder {
1476    fn new() -> Self {
1477        Self {
1478            builder: glib::object::Object::builder(),
1479        }
1480    }
1481
1482    /// The people who contributed artwork to the program, as a [`None`]-terminated
1483    /// array of strings. Each string may contain email addresses and URLs, which
1484    /// will be displayed as links, see the introduction for more details.
1485    pub fn artists(self, artists: impl Into<glib::StrV>) -> Self {
1486        Self {
1487            builder: self.builder.property("artists", artists.into()),
1488        }
1489    }
1490
1491    /// The authors of the program, as a [`None`]-terminated array of strings.
1492    /// Each string may contain email addresses and URLs, which will be displayed
1493    /// as links, see the introduction for more details.
1494    pub fn authors(self, authors: impl Into<glib::StrV>) -> Self {
1495        Self {
1496            builder: self.builder.property("authors", authors.into()),
1497        }
1498    }
1499
1500    /// Comments about the program. This string is displayed in a label
1501    /// in the main dialog, thus it should be a short explanation of
1502    /// the main purpose of the program, not a detailed list of features.
1503    pub fn comments(self, comments: impl Into<glib::GString>) -> Self {
1504        Self {
1505            builder: self.builder.property("comments", comments.into()),
1506        }
1507    }
1508
1509    /// Copyright information for the program.
1510    pub fn copyright(self, copyright: impl Into<glib::GString>) -> Self {
1511        Self {
1512            builder: self.builder.property("copyright", copyright.into()),
1513        }
1514    }
1515
1516    /// The people documenting the program, as a [`None`]-terminated array of strings.
1517    /// Each string may contain email addresses and URLs, which will be displayed
1518    /// as links, see the introduction for more details.
1519    pub fn documenters(self, documenters: impl Into<glib::StrV>) -> Self {
1520        Self {
1521            builder: self.builder.property("documenters", documenters.into()),
1522        }
1523    }
1524
1525    /// The license of the program. This string is displayed in a
1526    /// text view in a secondary dialog, therefore it is fine to use
1527    /// a long multi-paragraph text. Note that the text is only wrapped
1528    /// in the text view if the "wrap-license" property is set to [`true`];
1529    /// otherwise the text itself must contain the intended linebreaks.
1530    /// When setting this property to a non-[`None`] value, the
1531    /// [`license-type`][struct@crate::AboutDialog#license-type] property is set to [`License::Custom`][crate::License::Custom]
1532    /// as a side effect.
1533    pub fn license(self, license: impl Into<glib::GString>) -> Self {
1534        Self {
1535            builder: self.builder.property("license", license.into()),
1536        }
1537    }
1538
1539    /// The license of the program, as a value of the [`License`][crate::License] enumeration.
1540    ///
1541    /// The [`AboutDialog`][crate::AboutDialog] will automatically fill out a standard disclaimer
1542    /// and link the user to the appropriate online resource for the license
1543    /// text.
1544    ///
1545    /// If [`License::Unknown`][crate::License::Unknown] is used, the link used will be the same
1546    /// specified in the [`website`][struct@crate::AboutDialog#website] property.
1547    ///
1548    /// If [`License::Custom`][crate::License::Custom] is used, the current contents of the
1549    /// [`license`][struct@crate::AboutDialog#license] property are used.
1550    ///
1551    /// For any other [`License`][crate::License] value, the contents of the
1552    /// [`license`][struct@crate::AboutDialog#license] property are also set by this property as
1553    /// a side effect.
1554    pub fn license_type(self, license_type: License) -> Self {
1555        Self {
1556            builder: self.builder.property("license-type", license_type),
1557        }
1558    }
1559
1560    /// A logo for the about box. If it is [`None`], the default window icon
1561    /// set with [`Window::set_default_icon()`][crate::Window::set_default_icon()] will be used.
1562    pub fn logo(self, logo: &gdk_pixbuf::Pixbuf) -> Self {
1563        Self {
1564            builder: self.builder.property("logo", logo.clone()),
1565        }
1566    }
1567
1568    /// A named icon to use as the logo for the about box. This property
1569    /// overrides the [`logo`][struct@crate::AboutDialog#logo] property.
1570    pub fn logo_icon_name(self, logo_icon_name: impl Into<glib::GString>) -> Self {
1571        Self {
1572            builder: self
1573                .builder
1574                .property("logo-icon-name", logo_icon_name.into()),
1575        }
1576    }
1577
1578    /// The name of the program.
1579    /// If this is not set, it defaults to `g_get_application_name()`.
1580    pub fn program_name(self, program_name: impl Into<glib::GString>) -> Self {
1581        Self {
1582            builder: self.builder.property("program-name", program_name.into()),
1583        }
1584    }
1585
1586    /// Credits to the translators. This string should be marked as translatable.
1587    /// The string may contain email addresses and URLs, which will be displayed
1588    /// as links, see the introduction for more details.
1589    pub fn translator_credits(self, translator_credits: impl Into<glib::GString>) -> Self {
1590        Self {
1591            builder: self
1592                .builder
1593                .property("translator-credits", translator_credits.into()),
1594        }
1595    }
1596
1597    /// The version of the program.
1598    pub fn version(self, version: impl Into<glib::GString>) -> Self {
1599        Self {
1600            builder: self.builder.property("version", version.into()),
1601        }
1602    }
1603
1604    /// The URL for the link to the website of the program.
1605    /// This should be a string starting with "http://.
1606    pub fn website(self, website: impl Into<glib::GString>) -> Self {
1607        Self {
1608            builder: self.builder.property("website", website.into()),
1609        }
1610    }
1611
1612    /// The label for the link to the website of the program.
1613    pub fn website_label(self, website_label: impl Into<glib::GString>) -> Self {
1614        Self {
1615            builder: self.builder.property("website-label", website_label.into()),
1616        }
1617    }
1618
1619    /// Whether to wrap the text in the license dialog.
1620    pub fn wrap_license(self, wrap_license: bool) -> Self {
1621        Self {
1622            builder: self.builder.property("wrap-license", wrap_license),
1623        }
1624    }
1625
1626    /// [`true`] if the dialog uses a [`HeaderBar`][crate::HeaderBar] for action buttons
1627    /// instead of the action-area.
1628    ///
1629    /// For technical reasons, this property is declared as an integer
1630    /// property, but you should only set it to [`true`] or [`false`].
1631    pub fn use_header_bar(self, use_header_bar: i32) -> Self {
1632        Self {
1633            builder: self.builder.property("use-header-bar", use_header_bar),
1634        }
1635    }
1636
1637    /// Whether the window should receive the input focus.
1638    pub fn accept_focus(self, accept_focus: bool) -> Self {
1639        Self {
1640            builder: self.builder.property("accept-focus", accept_focus),
1641        }
1642    }
1643
1644    /// The [`Application`][crate::Application] associated with the window.
1645    ///
1646    /// The application will be kept alive for at least as long as it
1647    /// has any windows associated with it (see [`ApplicationExtManual::hold()`][crate::gio::prelude::ApplicationExtManual::hold()]
1648    /// for a way to keep it alive without windows).
1649    ///
1650    /// Normally, the connection between the application and the window
1651    /// will remain until the window is destroyed, but you can explicitly
1652    /// remove it by setting the :application property to [`None`].
1653    pub fn application(self, application: &impl IsA<Application>) -> Self {
1654        Self {
1655            builder: self
1656                .builder
1657                .property("application", application.clone().upcast()),
1658        }
1659    }
1660
1661    /// The widget to which this window is attached.
1662    /// See [`GtkWindowExt::set_attached_to()`][crate::prelude::GtkWindowExt::set_attached_to()].
1663    ///
1664    /// Examples of places where specifying this relation is useful are
1665    /// for instance a [`Menu`][crate::Menu] created by a [`ComboBox`][crate::ComboBox], a completion
1666    /// popup window created by [`Entry`][crate::Entry] or a typeahead search entry
1667    /// created by [`TreeView`][crate::TreeView].
1668    pub fn attached_to(self, attached_to: &impl IsA<Widget>) -> Self {
1669        Self {
1670            builder: self
1671                .builder
1672                .property("attached-to", attached_to.clone().upcast()),
1673        }
1674    }
1675
1676    /// Whether the window should be decorated by the window manager.
1677    pub fn decorated(self, decorated: bool) -> Self {
1678        Self {
1679            builder: self.builder.property("decorated", decorated),
1680        }
1681    }
1682
1683    pub fn default_height(self, default_height: i32) -> Self {
1684        Self {
1685            builder: self.builder.property("default-height", default_height),
1686        }
1687    }
1688
1689    pub fn default_width(self, default_width: i32) -> Self {
1690        Self {
1691            builder: self.builder.property("default-width", default_width),
1692        }
1693    }
1694
1695    /// Whether the window frame should have a close button.
1696    pub fn deletable(self, deletable: bool) -> Self {
1697        Self {
1698            builder: self.builder.property("deletable", deletable),
1699        }
1700    }
1701
1702    pub fn destroy_with_parent(self, destroy_with_parent: bool) -> Self {
1703        Self {
1704            builder: self
1705                .builder
1706                .property("destroy-with-parent", destroy_with_parent),
1707        }
1708    }
1709
1710    /// Whether the window should receive the input focus when mapped.
1711    pub fn focus_on_map(self, focus_on_map: bool) -> Self {
1712        Self {
1713            builder: self.builder.property("focus-on-map", focus_on_map),
1714        }
1715    }
1716
1717    /// Whether 'focus rectangles' are currently visible in this window.
1718    ///
1719    /// This property is maintained by GTK+ based on user input
1720    /// and should not be set by applications.
1721    pub fn focus_visible(self, focus_visible: bool) -> Self {
1722        Self {
1723            builder: self.builder.property("focus-visible", focus_visible),
1724        }
1725    }
1726
1727    /// The window gravity of the window. See [`GtkWindowExt::move_()`][crate::prelude::GtkWindowExt::move_()] and [`gdk::Gravity`][crate::gdk::Gravity] for
1728    /// more details about window gravity.
1729    pub fn gravity(self, gravity: gdk::Gravity) -> Self {
1730        Self {
1731            builder: self.builder.property("gravity", gravity),
1732        }
1733    }
1734
1735    /// Whether the titlebar should be hidden during maximization.
1736    pub fn hide_titlebar_when_maximized(self, hide_titlebar_when_maximized: bool) -> Self {
1737        Self {
1738            builder: self
1739                .builder
1740                .property("hide-titlebar-when-maximized", hide_titlebar_when_maximized),
1741        }
1742    }
1743
1744    pub fn icon(self, icon: &gdk_pixbuf::Pixbuf) -> Self {
1745        Self {
1746            builder: self.builder.property("icon", icon.clone()),
1747        }
1748    }
1749
1750    /// The :icon-name property specifies the name of the themed icon to
1751    /// use as the window icon. See [`IconTheme`][crate::IconTheme] for more details.
1752    pub fn icon_name(self, icon_name: impl Into<glib::GString>) -> Self {
1753        Self {
1754            builder: self.builder.property("icon-name", icon_name.into()),
1755        }
1756    }
1757
1758    /// Whether mnemonics are currently visible in this window.
1759    ///
1760    /// This property is maintained by GTK+ based on user input,
1761    /// and should not be set by applications.
1762    pub fn mnemonics_visible(self, mnemonics_visible: bool) -> Self {
1763        Self {
1764            builder: self
1765                .builder
1766                .property("mnemonics-visible", mnemonics_visible),
1767        }
1768    }
1769
1770    pub fn modal(self, modal: bool) -> Self {
1771        Self {
1772            builder: self.builder.property("modal", modal),
1773        }
1774    }
1775
1776    pub fn resizable(self, resizable: bool) -> Self {
1777        Self {
1778            builder: self.builder.property("resizable", resizable),
1779        }
1780    }
1781
1782    pub fn role(self, role: impl Into<glib::GString>) -> Self {
1783        Self {
1784            builder: self.builder.property("role", role.into()),
1785        }
1786    }
1787
1788    pub fn screen(self, screen: &gdk::Screen) -> Self {
1789        Self {
1790            builder: self.builder.property("screen", screen.clone()),
1791        }
1792    }
1793
1794    pub fn skip_pager_hint(self, skip_pager_hint: bool) -> Self {
1795        Self {
1796            builder: self.builder.property("skip-pager-hint", skip_pager_hint),
1797        }
1798    }
1799
1800    pub fn skip_taskbar_hint(self, skip_taskbar_hint: bool) -> Self {
1801        Self {
1802            builder: self
1803                .builder
1804                .property("skip-taskbar-hint", skip_taskbar_hint),
1805        }
1806    }
1807
1808    /// The :startup-id is a write-only property for setting window's
1809    /// startup notification identifier. See [`GtkWindowExt::set_startup_id()`][crate::prelude::GtkWindowExt::set_startup_id()]
1810    /// for more details.
1811    pub fn startup_id(self, startup_id: impl Into<glib::GString>) -> Self {
1812        Self {
1813            builder: self.builder.property("startup-id", startup_id.into()),
1814        }
1815    }
1816
1817    pub fn title(self, title: impl Into<glib::GString>) -> Self {
1818        Self {
1819            builder: self.builder.property("title", title.into()),
1820        }
1821    }
1822
1823    /// The transient parent of the window. See [`GtkWindowExt::set_transient_for()`][crate::prelude::GtkWindowExt::set_transient_for()] for
1824    /// more details about transient windows.
1825    pub fn transient_for(self, transient_for: &impl IsA<Window>) -> Self {
1826        Self {
1827            builder: self
1828                .builder
1829                .property("transient-for", transient_for.clone().upcast()),
1830        }
1831    }
1832
1833    pub fn type_(self, type_: WindowType) -> Self {
1834        Self {
1835            builder: self.builder.property("type", type_),
1836        }
1837    }
1838
1839    pub fn type_hint(self, type_hint: gdk::WindowTypeHint) -> Self {
1840        Self {
1841            builder: self.builder.property("type-hint", type_hint),
1842        }
1843    }
1844
1845    pub fn urgency_hint(self, urgency_hint: bool) -> Self {
1846        Self {
1847            builder: self.builder.property("urgency-hint", urgency_hint),
1848        }
1849    }
1850
1851    pub fn window_position(self, window_position: WindowPosition) -> Self {
1852        Self {
1853            builder: self.builder.property("window-position", window_position),
1854        }
1855    }
1856
1857    pub fn border_width(self, border_width: u32) -> Self {
1858        Self {
1859            builder: self.builder.property("border-width", border_width),
1860        }
1861    }
1862
1863    pub fn child(self, child: &impl IsA<Widget>) -> Self {
1864        Self {
1865            builder: self.builder.property("child", child.clone().upcast()),
1866        }
1867    }
1868
1869    pub fn resize_mode(self, resize_mode: ResizeMode) -> Self {
1870        Self {
1871            builder: self.builder.property("resize-mode", resize_mode),
1872        }
1873    }
1874
1875    pub fn app_paintable(self, app_paintable: bool) -> Self {
1876        Self {
1877            builder: self.builder.property("app-paintable", app_paintable),
1878        }
1879    }
1880
1881    pub fn can_default(self, can_default: bool) -> Self {
1882        Self {
1883            builder: self.builder.property("can-default", can_default),
1884        }
1885    }
1886
1887    pub fn can_focus(self, can_focus: bool) -> Self {
1888        Self {
1889            builder: self.builder.property("can-focus", can_focus),
1890        }
1891    }
1892
1893    pub fn events(self, events: gdk::EventMask) -> Self {
1894        Self {
1895            builder: self.builder.property("events", events),
1896        }
1897    }
1898
1899    /// Whether to expand in both directions. Setting this sets both [`hexpand`][struct@crate::Widget#hexpand] and [`vexpand`][struct@crate::Widget#vexpand]
1900    pub fn expand(self, expand: bool) -> Self {
1901        Self {
1902            builder: self.builder.property("expand", expand),
1903        }
1904    }
1905
1906    /// Whether the widget should grab focus when it is clicked with the mouse.
1907    ///
1908    /// This property is only relevant for widgets that can take focus.
1909    ///
1910    /// Before 3.20, several widgets (GtkButton, GtkFileChooserButton,
1911    /// GtkComboBox) implemented this property individually.
1912    pub fn focus_on_click(self, focus_on_click: bool) -> Self {
1913        Self {
1914            builder: self.builder.property("focus-on-click", focus_on_click),
1915        }
1916    }
1917
1918    /// How to distribute horizontal space if widget gets extra space, see [`Align`][crate::Align]
1919    pub fn halign(self, halign: Align) -> Self {
1920        Self {
1921            builder: self.builder.property("halign", halign),
1922        }
1923    }
1924
1925    pub fn has_default(self, has_default: bool) -> Self {
1926        Self {
1927            builder: self.builder.property("has-default", has_default),
1928        }
1929    }
1930
1931    pub fn has_focus(self, has_focus: bool) -> Self {
1932        Self {
1933            builder: self.builder.property("has-focus", has_focus),
1934        }
1935    }
1936
1937    /// Enables or disables the emission of [`query-tooltip`][struct@crate::Widget#query-tooltip] on `widget`.
1938    /// A value of [`true`] indicates that `widget` can have a tooltip, in this case
1939    /// the widget will be queried using [`query-tooltip`][struct@crate::Widget#query-tooltip] to determine
1940    /// whether it will provide a tooltip or not.
1941    ///
1942    /// Note that setting this property to [`true`] for the first time will change
1943    /// the event masks of the GdkWindows of this widget to include leave-notify
1944    /// and motion-notify events. This cannot and will not be undone when the
1945    /// property is set to [`false`] again.
1946    pub fn has_tooltip(self, has_tooltip: bool) -> Self {
1947        Self {
1948            builder: self.builder.property("has-tooltip", has_tooltip),
1949        }
1950    }
1951
1952    pub fn height_request(self, height_request: i32) -> Self {
1953        Self {
1954            builder: self.builder.property("height-request", height_request),
1955        }
1956    }
1957
1958    /// Whether to expand horizontally. See [`WidgetExt::set_hexpand()`][crate::prelude::WidgetExt::set_hexpand()].
1959    pub fn hexpand(self, hexpand: bool) -> Self {
1960        Self {
1961            builder: self.builder.property("hexpand", hexpand),
1962        }
1963    }
1964
1965    /// Whether to use the [`hexpand`][struct@crate::Widget#hexpand] property. See [`WidgetExt::is_hexpand_set()`][crate::prelude::WidgetExt::is_hexpand_set()].
1966    pub fn hexpand_set(self, hexpand_set: bool) -> Self {
1967        Self {
1968            builder: self.builder.property("hexpand-set", hexpand_set),
1969        }
1970    }
1971
1972    pub fn is_focus(self, is_focus: bool) -> Self {
1973        Self {
1974            builder: self.builder.property("is-focus", is_focus),
1975        }
1976    }
1977
1978    /// Sets all four sides' margin at once. If read, returns max
1979    /// margin on any side.
1980    pub fn margin(self, margin: i32) -> Self {
1981        Self {
1982            builder: self.builder.property("margin", margin),
1983        }
1984    }
1985
1986    /// Margin on bottom side of widget.
1987    ///
1988    /// This property adds margin outside of the widget's normal size
1989    /// request, the margin will be added in addition to the size from
1990    /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
1991    pub fn margin_bottom(self, margin_bottom: i32) -> Self {
1992        Self {
1993            builder: self.builder.property("margin-bottom", margin_bottom),
1994        }
1995    }
1996
1997    /// Margin on end of widget, horizontally. This property supports
1998    /// left-to-right and right-to-left text directions.
1999    ///
2000    /// This property adds margin outside of the widget's normal size
2001    /// request, the margin will be added in addition to the size from
2002    /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
2003    pub fn margin_end(self, margin_end: i32) -> Self {
2004        Self {
2005            builder: self.builder.property("margin-end", margin_end),
2006        }
2007    }
2008
2009    /// Margin on start of widget, horizontally. This property supports
2010    /// left-to-right and right-to-left text directions.
2011    ///
2012    /// This property adds margin outside of the widget's normal size
2013    /// request, the margin will be added in addition to the size from
2014    /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
2015    pub fn margin_start(self, margin_start: i32) -> Self {
2016        Self {
2017            builder: self.builder.property("margin-start", margin_start),
2018        }
2019    }
2020
2021    /// Margin on top side of widget.
2022    ///
2023    /// This property adds margin outside of the widget's normal size
2024    /// request, the margin will be added in addition to the size from
2025    /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
2026    pub fn margin_top(self, margin_top: i32) -> Self {
2027        Self {
2028            builder: self.builder.property("margin-top", margin_top),
2029        }
2030    }
2031
2032    pub fn name(self, name: impl Into<glib::GString>) -> Self {
2033        Self {
2034            builder: self.builder.property("name", name.into()),
2035        }
2036    }
2037
2038    pub fn no_show_all(self, no_show_all: bool) -> Self {
2039        Self {
2040            builder: self.builder.property("no-show-all", no_show_all),
2041        }
2042    }
2043
2044    /// The requested opacity of the widget. See [`WidgetExt::set_opacity()`][crate::prelude::WidgetExt::set_opacity()] for
2045    /// more details about window opacity.
2046    ///
2047    /// Before 3.8 this was only available in GtkWindow
2048    pub fn opacity(self, opacity: f64) -> Self {
2049        Self {
2050            builder: self.builder.property("opacity", opacity),
2051        }
2052    }
2053
2054    pub fn parent(self, parent: &impl IsA<Container>) -> Self {
2055        Self {
2056            builder: self.builder.property("parent", parent.clone().upcast()),
2057        }
2058    }
2059
2060    pub fn receives_default(self, receives_default: bool) -> Self {
2061        Self {
2062            builder: self.builder.property("receives-default", receives_default),
2063        }
2064    }
2065
2066    pub fn sensitive(self, sensitive: bool) -> Self {
2067        Self {
2068            builder: self.builder.property("sensitive", sensitive),
2069        }
2070    }
2071
2072    /// Sets the text of tooltip to be the given string, which is marked up
2073    /// with the [Pango text markup language][PangoMarkupFormat].
2074    /// Also see [`Tooltip::set_markup()`][crate::Tooltip::set_markup()].
2075    ///
2076    /// This is a convenience property which will take care of getting the
2077    /// tooltip shown if the given string is not [`None`]: [`has-tooltip`][struct@crate::Widget#has-tooltip]
2078    /// will automatically be set to [`true`] and there will be taken care of
2079    /// [`query-tooltip`][struct@crate::Widget#query-tooltip] in the default signal handler.
2080    ///
2081    /// Note that if both [`tooltip-text`][struct@crate::Widget#tooltip-text] and [`tooltip-markup`][struct@crate::Widget#tooltip-markup]
2082    /// are set, the last one wins.
2083    pub fn tooltip_markup(self, tooltip_markup: impl Into<glib::GString>) -> Self {
2084        Self {
2085            builder: self
2086                .builder
2087                .property("tooltip-markup", tooltip_markup.into()),
2088        }
2089    }
2090
2091    /// Sets the text of tooltip to be the given string.
2092    ///
2093    /// Also see [`Tooltip::set_text()`][crate::Tooltip::set_text()].
2094    ///
2095    /// This is a convenience property which will take care of getting the
2096    /// tooltip shown if the given string is not [`None`]: [`has-tooltip`][struct@crate::Widget#has-tooltip]
2097    /// will automatically be set to [`true`] and there will be taken care of
2098    /// [`query-tooltip`][struct@crate::Widget#query-tooltip] in the default signal handler.
2099    ///
2100    /// Note that if both [`tooltip-text`][struct@crate::Widget#tooltip-text] and [`tooltip-markup`][struct@crate::Widget#tooltip-markup]
2101    /// are set, the last one wins.
2102    pub fn tooltip_text(self, tooltip_text: impl Into<glib::GString>) -> Self {
2103        Self {
2104            builder: self.builder.property("tooltip-text", tooltip_text.into()),
2105        }
2106    }
2107
2108    /// How to distribute vertical space if widget gets extra space, see [`Align`][crate::Align]
2109    pub fn valign(self, valign: Align) -> Self {
2110        Self {
2111            builder: self.builder.property("valign", valign),
2112        }
2113    }
2114
2115    /// Whether to expand vertically. See [`WidgetExt::set_vexpand()`][crate::prelude::WidgetExt::set_vexpand()].
2116    pub fn vexpand(self, vexpand: bool) -> Self {
2117        Self {
2118            builder: self.builder.property("vexpand", vexpand),
2119        }
2120    }
2121
2122    /// Whether to use the [`vexpand`][struct@crate::Widget#vexpand] property. See [`WidgetExt::is_vexpand_set()`][crate::prelude::WidgetExt::is_vexpand_set()].
2123    pub fn vexpand_set(self, vexpand_set: bool) -> Self {
2124        Self {
2125            builder: self.builder.property("vexpand-set", vexpand_set),
2126        }
2127    }
2128
2129    pub fn visible(self, visible: bool) -> Self {
2130        Self {
2131            builder: self.builder.property("visible", visible),
2132        }
2133    }
2134
2135    pub fn width_request(self, width_request: i32) -> Self {
2136        Self {
2137            builder: self.builder.property("width-request", width_request),
2138        }
2139    }
2140
2141    // rustdoc-stripper-ignore-next
2142    /// Build the [`AboutDialog`].
2143    #[must_use = "Building the object from the builder is usually expensive and is not expected to have side effects"]
2144    pub fn build(self) -> AboutDialog {
2145        assert_initialized_main_thread!();
2146        self.builder.build()
2147    }
2148}
2149
2150/// Trait containing all [`struct@AboutDialog`] methods.
2151///
2152/// # Implementors
2153///
2154/// [`AboutDialog`][struct@crate::AboutDialog]
2155pub trait AboutDialogExt: IsA<AboutDialog> + 'static {
2156    /// Creates a new section in the Credits page.
2157    /// ## `section_name`
2158    /// The name of the section
2159    /// ## `people`
2160    /// The people who belong to that section
2161    #[doc(alias = "gtk_about_dialog_add_credit_section")]
2162    fn add_credit_section(&self, section_name: &str, people: &[&str]) {
2163        unsafe {
2164            ffi::gtk_about_dialog_add_credit_section(
2165                self.as_ref().to_glib_none().0,
2166                section_name.to_glib_none().0,
2167                people.to_glib_none().0,
2168            );
2169        }
2170    }
2171
2172    /// Returns the string which are displayed in the artists tab
2173    /// of the secondary credits dialog.
2174    ///
2175    /// # Returns
2176    ///
2177    /// A
2178    ///  [`None`]-terminated string array containing the artists. The array is
2179    ///  owned by the about dialog and must not be modified.
2180    #[doc(alias = "gtk_about_dialog_get_artists")]
2181    #[doc(alias = "get_artists")]
2182    fn artists(&self) -> Vec<glib::GString> {
2183        unsafe {
2184            FromGlibPtrContainer::from_glib_none(ffi::gtk_about_dialog_get_artists(
2185                self.as_ref().to_glib_none().0,
2186            ))
2187        }
2188    }
2189
2190    /// Returns the string which are displayed in the authors tab
2191    /// of the secondary credits dialog.
2192    ///
2193    /// # Returns
2194    ///
2195    /// A
2196    ///  [`None`]-terminated string array containing the authors. The array is
2197    ///  owned by the about dialog and must not be modified.
2198    #[doc(alias = "gtk_about_dialog_get_authors")]
2199    #[doc(alias = "get_authors")]
2200    fn authors(&self) -> Vec<glib::GString> {
2201        unsafe {
2202            FromGlibPtrContainer::from_glib_none(ffi::gtk_about_dialog_get_authors(
2203                self.as_ref().to_glib_none().0,
2204            ))
2205        }
2206    }
2207
2208    /// Returns the comments string.
2209    ///
2210    /// # Returns
2211    ///
2212    /// The comments. The string is owned by the about
2213    ///  dialog and must not be modified.
2214    #[doc(alias = "gtk_about_dialog_get_comments")]
2215    #[doc(alias = "get_comments")]
2216    fn comments(&self) -> Option<glib::GString> {
2217        unsafe {
2218            from_glib_none(ffi::gtk_about_dialog_get_comments(
2219                self.as_ref().to_glib_none().0,
2220            ))
2221        }
2222    }
2223
2224    /// Returns the copyright string.
2225    ///
2226    /// # Returns
2227    ///
2228    /// The copyright string. The string is owned by the about
2229    ///  dialog and must not be modified.
2230    #[doc(alias = "gtk_about_dialog_get_copyright")]
2231    #[doc(alias = "get_copyright")]
2232    fn copyright(&self) -> Option<glib::GString> {
2233        unsafe {
2234            from_glib_none(ffi::gtk_about_dialog_get_copyright(
2235                self.as_ref().to_glib_none().0,
2236            ))
2237        }
2238    }
2239
2240    /// Returns the string which are displayed in the documenters
2241    /// tab of the secondary credits dialog.
2242    ///
2243    /// # Returns
2244    ///
2245    /// A
2246    ///  [`None`]-terminated string array containing the documenters. The
2247    ///  array is owned by the about dialog and must not be modified.
2248    #[doc(alias = "gtk_about_dialog_get_documenters")]
2249    #[doc(alias = "get_documenters")]
2250    fn documenters(&self) -> Vec<glib::GString> {
2251        unsafe {
2252            FromGlibPtrContainer::from_glib_none(ffi::gtk_about_dialog_get_documenters(
2253                self.as_ref().to_glib_none().0,
2254            ))
2255        }
2256    }
2257
2258    /// Returns the license information.
2259    ///
2260    /// # Returns
2261    ///
2262    /// The license information. The string is owned by the about
2263    ///  dialog and must not be modified.
2264    #[doc(alias = "gtk_about_dialog_get_license")]
2265    #[doc(alias = "get_license")]
2266    fn license(&self) -> Option<glib::GString> {
2267        unsafe {
2268            from_glib_none(ffi::gtk_about_dialog_get_license(
2269                self.as_ref().to_glib_none().0,
2270            ))
2271        }
2272    }
2273
2274    /// Retrieves the license set using [`set_license_type()`][Self::set_license_type()]
2275    ///
2276    /// # Returns
2277    ///
2278    /// a [`License`][crate::License] value
2279    #[doc(alias = "gtk_about_dialog_get_license_type")]
2280    #[doc(alias = "get_license_type")]
2281    #[doc(alias = "license-type")]
2282    fn license_type(&self) -> License {
2283        unsafe {
2284            from_glib(ffi::gtk_about_dialog_get_license_type(
2285                self.as_ref().to_glib_none().0,
2286            ))
2287        }
2288    }
2289
2290    /// Returns the pixbuf displayed as logo in the about dialog.
2291    ///
2292    /// # Returns
2293    ///
2294    /// the pixbuf displayed as logo. The
2295    ///  pixbuf is owned by the about dialog. If you want to keep a
2296    ///  reference to it, you have to call `g_object_ref()` on it.
2297    #[doc(alias = "gtk_about_dialog_get_logo")]
2298    #[doc(alias = "get_logo")]
2299    fn logo(&self) -> Option<gdk_pixbuf::Pixbuf> {
2300        unsafe {
2301            from_glib_none(ffi::gtk_about_dialog_get_logo(
2302                self.as_ref().to_glib_none().0,
2303            ))
2304        }
2305    }
2306
2307    /// Returns the icon name displayed as logo in the about dialog.
2308    ///
2309    /// # Returns
2310    ///
2311    /// the icon name displayed as logo. The string is
2312    ///  owned by the dialog. If you want to keep a reference
2313    ///  to it, you have to call `g_strdup()` on it.
2314    #[doc(alias = "gtk_about_dialog_get_logo_icon_name")]
2315    #[doc(alias = "get_logo_icon_name")]
2316    #[doc(alias = "logo-icon-name")]
2317    fn logo_icon_name(&self) -> Option<glib::GString> {
2318        unsafe {
2319            from_glib_none(ffi::gtk_about_dialog_get_logo_icon_name(
2320                self.as_ref().to_glib_none().0,
2321            ))
2322        }
2323    }
2324
2325    /// Returns the program name displayed in the about dialog.
2326    ///
2327    /// # Returns
2328    ///
2329    /// The program name. The string is owned by the about
2330    ///  dialog and must not be modified.
2331    #[doc(alias = "gtk_about_dialog_get_program_name")]
2332    #[doc(alias = "get_program_name")]
2333    #[doc(alias = "program-name")]
2334    fn program_name(&self) -> Option<glib::GString> {
2335        unsafe {
2336            from_glib_none(ffi::gtk_about_dialog_get_program_name(
2337                self.as_ref().to_glib_none().0,
2338            ))
2339        }
2340    }
2341
2342    /// Returns the translator credits string which is displayed
2343    /// in the translators tab of the secondary credits dialog.
2344    ///
2345    /// # Returns
2346    ///
2347    /// The translator credits string. The string is
2348    ///  owned by the about dialog and must not be modified.
2349    #[doc(alias = "gtk_about_dialog_get_translator_credits")]
2350    #[doc(alias = "get_translator_credits")]
2351    #[doc(alias = "translator-credits")]
2352    fn translator_credits(&self) -> Option<glib::GString> {
2353        unsafe {
2354            from_glib_none(ffi::gtk_about_dialog_get_translator_credits(
2355                self.as_ref().to_glib_none().0,
2356            ))
2357        }
2358    }
2359
2360    /// Returns the version string.
2361    ///
2362    /// # Returns
2363    ///
2364    /// The version string. The string is owned by the about
2365    ///  dialog and must not be modified.
2366    #[doc(alias = "gtk_about_dialog_get_version")]
2367    #[doc(alias = "get_version")]
2368    fn version(&self) -> Option<glib::GString> {
2369        unsafe {
2370            from_glib_none(ffi::gtk_about_dialog_get_version(
2371                self.as_ref().to_glib_none().0,
2372            ))
2373        }
2374    }
2375
2376    /// Returns the website URL.
2377    ///
2378    /// # Returns
2379    ///
2380    /// The website URL. The string is owned by the about
2381    ///  dialog and must not be modified.
2382    #[doc(alias = "gtk_about_dialog_get_website")]
2383    #[doc(alias = "get_website")]
2384    fn website(&self) -> Option<glib::GString> {
2385        unsafe {
2386            from_glib_none(ffi::gtk_about_dialog_get_website(
2387                self.as_ref().to_glib_none().0,
2388            ))
2389        }
2390    }
2391
2392    /// Returns the label used for the website link.
2393    ///
2394    /// # Returns
2395    ///
2396    /// The label used for the website link. The string is
2397    ///  owned by the about dialog and must not be modified.
2398    #[doc(alias = "gtk_about_dialog_get_website_label")]
2399    #[doc(alias = "get_website_label")]
2400    #[doc(alias = "website-label")]
2401    fn website_label(&self) -> Option<glib::GString> {
2402        unsafe {
2403            from_glib_none(ffi::gtk_about_dialog_get_website_label(
2404                self.as_ref().to_glib_none().0,
2405            ))
2406        }
2407    }
2408
2409    /// Returns whether the license text in `self` is
2410    /// automatically wrapped.
2411    ///
2412    /// # Returns
2413    ///
2414    /// [`true`] if the license text is wrapped
2415    #[doc(alias = "gtk_about_dialog_get_wrap_license")]
2416    #[doc(alias = "get_wrap_license")]
2417    #[doc(alias = "wrap-license")]
2418    fn wraps_license(&self) -> bool {
2419        unsafe {
2420            from_glib(ffi::gtk_about_dialog_get_wrap_license(
2421                self.as_ref().to_glib_none().0,
2422            ))
2423        }
2424    }
2425
2426    /// Sets the strings which are displayed in the artists tab
2427    /// of the secondary credits dialog.
2428    /// ## `artists`
2429    /// a [`None`]-terminated array of strings
2430    #[doc(alias = "gtk_about_dialog_set_artists")]
2431    #[doc(alias = "artists")]
2432    fn set_artists(&self, artists: &[&str]) {
2433        unsafe {
2434            ffi::gtk_about_dialog_set_artists(
2435                self.as_ref().to_glib_none().0,
2436                artists.to_glib_none().0,
2437            );
2438        }
2439    }
2440
2441    /// Sets the strings which are displayed in the authors tab
2442    /// of the secondary credits dialog.
2443    /// ## `authors`
2444    /// a [`None`]-terminated array of strings
2445    #[doc(alias = "gtk_about_dialog_set_authors")]
2446    #[doc(alias = "authors")]
2447    fn set_authors(&self, authors: &[&str]) {
2448        unsafe {
2449            ffi::gtk_about_dialog_set_authors(
2450                self.as_ref().to_glib_none().0,
2451                authors.to_glib_none().0,
2452            );
2453        }
2454    }
2455
2456    /// Sets the comments string to display in the about dialog.
2457    /// This should be a short string of one or two lines.
2458    /// ## `comments`
2459    /// a comments string
2460    #[doc(alias = "gtk_about_dialog_set_comments")]
2461    #[doc(alias = "comments")]
2462    fn set_comments(&self, comments: Option<&str>) {
2463        unsafe {
2464            ffi::gtk_about_dialog_set_comments(
2465                self.as_ref().to_glib_none().0,
2466                comments.to_glib_none().0,
2467            );
2468        }
2469    }
2470
2471    /// Sets the copyright string to display in the about dialog.
2472    /// This should be a short string of one or two lines.
2473    /// ## `copyright`
2474    /// the copyright string
2475    #[doc(alias = "gtk_about_dialog_set_copyright")]
2476    #[doc(alias = "copyright")]
2477    fn set_copyright(&self, copyright: Option<&str>) {
2478        unsafe {
2479            ffi::gtk_about_dialog_set_copyright(
2480                self.as_ref().to_glib_none().0,
2481                copyright.to_glib_none().0,
2482            );
2483        }
2484    }
2485
2486    /// Sets the strings which are displayed in the documenters tab
2487    /// of the secondary credits dialog.
2488    /// ## `documenters`
2489    /// a [`None`]-terminated array of strings
2490    #[doc(alias = "gtk_about_dialog_set_documenters")]
2491    #[doc(alias = "documenters")]
2492    fn set_documenters(&self, documenters: &[&str]) {
2493        unsafe {
2494            ffi::gtk_about_dialog_set_documenters(
2495                self.as_ref().to_glib_none().0,
2496                documenters.to_glib_none().0,
2497            );
2498        }
2499    }
2500
2501    /// Sets the license information to be displayed in the secondary
2502    /// license dialog. If `license` is [`None`], the license button is
2503    /// hidden.
2504    /// ## `license`
2505    /// the license information or [`None`]
2506    #[doc(alias = "gtk_about_dialog_set_license")]
2507    #[doc(alias = "license")]
2508    fn set_license(&self, license: Option<&str>) {
2509        unsafe {
2510            ffi::gtk_about_dialog_set_license(
2511                self.as_ref().to_glib_none().0,
2512                license.to_glib_none().0,
2513            );
2514        }
2515    }
2516
2517    /// Sets the license of the application showing the `self` dialog from a
2518    /// list of known licenses.
2519    ///
2520    /// This function overrides the license set using
2521    /// [`set_license()`][Self::set_license()].
2522    /// ## `license_type`
2523    /// the type of license
2524    #[doc(alias = "gtk_about_dialog_set_license_type")]
2525    #[doc(alias = "license-type")]
2526    fn set_license_type(&self, license_type: License) {
2527        unsafe {
2528            ffi::gtk_about_dialog_set_license_type(
2529                self.as_ref().to_glib_none().0,
2530                license_type.into_glib(),
2531            );
2532        }
2533    }
2534
2535    /// Sets the pixbuf to be displayed as logo in the about dialog.
2536    /// If it is [`None`], the default window icon set with
2537    /// [`Window::set_default_icon()`][crate::Window::set_default_icon()] will be used.
2538    /// ## `logo`
2539    /// a [`gdk_pixbuf::Pixbuf`][crate::gdk_pixbuf::Pixbuf], or [`None`]
2540    #[doc(alias = "gtk_about_dialog_set_logo")]
2541    #[doc(alias = "logo")]
2542    fn set_logo(&self, logo: Option<&gdk_pixbuf::Pixbuf>) {
2543        unsafe {
2544            ffi::gtk_about_dialog_set_logo(self.as_ref().to_glib_none().0, logo.to_glib_none().0);
2545        }
2546    }
2547
2548    /// Sets the pixbuf to be displayed as logo in the about dialog.
2549    /// If it is [`None`], the default window icon set with
2550    /// [`Window::set_default_icon()`][crate::Window::set_default_icon()] will be used.
2551    /// ## `icon_name`
2552    /// an icon name, or [`None`]
2553    #[doc(alias = "gtk_about_dialog_set_logo_icon_name")]
2554    #[doc(alias = "logo-icon-name")]
2555    fn set_logo_icon_name(&self, icon_name: Option<&str>) {
2556        unsafe {
2557            ffi::gtk_about_dialog_set_logo_icon_name(
2558                self.as_ref().to_glib_none().0,
2559                icon_name.to_glib_none().0,
2560            );
2561        }
2562    }
2563
2564    /// Sets the name to display in the about dialog.
2565    /// If this is not set, it defaults to `g_get_application_name()`.
2566    /// ## `name`
2567    /// the program name
2568    #[doc(alias = "gtk_about_dialog_set_program_name")]
2569    #[doc(alias = "program-name")]
2570    fn set_program_name(&self, name: &str) {
2571        unsafe {
2572            ffi::gtk_about_dialog_set_program_name(
2573                self.as_ref().to_glib_none().0,
2574                name.to_glib_none().0,
2575            );
2576        }
2577    }
2578
2579    ///
2580    /// GtkWidget *about = gtk_about_dialog_new ();
2581    /// gtk_about_dialog_set_translator_credits (GTK_ABOUT_DIALOG (about),
2582    ///  _("translator-credits"));
2583    /// ]|
2584    /// It is a good idea to use the customary msgid “translator-credits” for this
2585    /// purpose, since translators will already know the purpose of that msgid, and
2586    /// since [`AboutDialog`][crate::AboutDialog] will detect if “translator-credits” is untranslated
2587    /// and hide the tab.
2588    /// ## `translator_credits`
2589    /// the translator credits
2590    #[doc(alias = "gtk_about_dialog_set_translator_credits")]
2591    #[doc(alias = "translator-credits")]
2592    fn set_translator_credits(&self, translator_credits: Option<&str>) {
2593        unsafe {
2594            ffi::gtk_about_dialog_set_translator_credits(
2595                self.as_ref().to_glib_none().0,
2596                translator_credits.to_glib_none().0,
2597            );
2598        }
2599    }
2600
2601    /// Sets the version string to display in the about dialog.
2602    /// ## `version`
2603    /// the version string
2604    #[doc(alias = "gtk_about_dialog_set_version")]
2605    #[doc(alias = "version")]
2606    fn set_version(&self, version: Option<&str>) {
2607        unsafe {
2608            ffi::gtk_about_dialog_set_version(
2609                self.as_ref().to_glib_none().0,
2610                version.to_glib_none().0,
2611            );
2612        }
2613    }
2614
2615    /// Sets the URL to use for the website link.
2616    /// ## `website`
2617    /// a URL string starting with "http://"
2618    #[doc(alias = "gtk_about_dialog_set_website")]
2619    #[doc(alias = "website")]
2620    fn set_website(&self, website: Option<&str>) {
2621        unsafe {
2622            ffi::gtk_about_dialog_set_website(
2623                self.as_ref().to_glib_none().0,
2624                website.to_glib_none().0,
2625            );
2626        }
2627    }
2628
2629    /// Sets the label to be used for the website link.
2630    /// ## `website_label`
2631    /// the label used for the website link
2632    #[doc(alias = "gtk_about_dialog_set_website_label")]
2633    #[doc(alias = "website-label")]
2634    fn set_website_label(&self, website_label: Option<&str>) {
2635        unsafe {
2636            ffi::gtk_about_dialog_set_website_label(
2637                self.as_ref().to_glib_none().0,
2638                website_label.to_glib_none().0,
2639            );
2640        }
2641    }
2642
2643    /// Sets whether the license text in `self` is
2644    /// automatically wrapped.
2645    /// ## `wrap_license`
2646    /// whether to wrap the license
2647    #[doc(alias = "gtk_about_dialog_set_wrap_license")]
2648    #[doc(alias = "wrap-license")]
2649    fn set_wrap_license(&self, wrap_license: bool) {
2650        unsafe {
2651            ffi::gtk_about_dialog_set_wrap_license(
2652                self.as_ref().to_glib_none().0,
2653                wrap_license.into_glib(),
2654            );
2655        }
2656    }
2657
2658    /// The signal which gets emitted to activate a URI.
2659    /// Applications may connect to it to override the default behaviour,
2660    /// which is to call [`show_uri_on_window()`][crate::show_uri_on_window()].
2661    /// ## `uri`
2662    /// the URI that is activated
2663    ///
2664    /// # Returns
2665    ///
2666    /// [`true`] if the link has been activated
2667    #[doc(alias = "activate-link")]
2668    fn connect_activate_link<F: Fn(&Self, &str) -> glib::Propagation + 'static>(
2669        &self,
2670        f: F,
2671    ) -> SignalHandlerId {
2672        unsafe extern "C" fn activate_link_trampoline<
2673            P: IsA<AboutDialog>,
2674            F: Fn(&P, &str) -> glib::Propagation + 'static,
2675        >(
2676            this: *mut ffi::GtkAboutDialog,
2677            uri: *mut std::ffi::c_char,
2678            f: glib::ffi::gpointer,
2679        ) -> glib::ffi::gboolean {
2680            unsafe {
2681                let f: &F = &*(f as *const F);
2682                f(
2683                    AboutDialog::from_glib_borrow(this).unsafe_cast_ref(),
2684                    &glib::GString::from_glib_borrow(uri),
2685                )
2686                .into_glib()
2687            }
2688        }
2689        unsafe {
2690            let f: Box_<F> = Box_::new(f);
2691            connect_raw(
2692                self.as_ptr() as *mut _,
2693                c"activate-link".as_ptr(),
2694                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2695                    activate_link_trampoline::<Self, F> as *const (),
2696                )),
2697                Box_::into_raw(f),
2698            )
2699        }
2700    }
2701
2702    #[doc(alias = "artists")]
2703    fn connect_artists_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2704        unsafe extern "C" fn notify_artists_trampoline<P: IsA<AboutDialog>, F: Fn(&P) + 'static>(
2705            this: *mut ffi::GtkAboutDialog,
2706            _param_spec: glib::ffi::gpointer,
2707            f: glib::ffi::gpointer,
2708        ) {
2709            unsafe {
2710                let f: &F = &*(f as *const F);
2711                f(AboutDialog::from_glib_borrow(this).unsafe_cast_ref())
2712            }
2713        }
2714        unsafe {
2715            let f: Box_<F> = Box_::new(f);
2716            connect_raw(
2717                self.as_ptr() as *mut _,
2718                c"notify::artists".as_ptr(),
2719                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2720                    notify_artists_trampoline::<Self, F> as *const (),
2721                )),
2722                Box_::into_raw(f),
2723            )
2724        }
2725    }
2726
2727    #[doc(alias = "authors")]
2728    fn connect_authors_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2729        unsafe extern "C" fn notify_authors_trampoline<P: IsA<AboutDialog>, F: Fn(&P) + 'static>(
2730            this: *mut ffi::GtkAboutDialog,
2731            _param_spec: glib::ffi::gpointer,
2732            f: glib::ffi::gpointer,
2733        ) {
2734            unsafe {
2735                let f: &F = &*(f as *const F);
2736                f(AboutDialog::from_glib_borrow(this).unsafe_cast_ref())
2737            }
2738        }
2739        unsafe {
2740            let f: Box_<F> = Box_::new(f);
2741            connect_raw(
2742                self.as_ptr() as *mut _,
2743                c"notify::authors".as_ptr(),
2744                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2745                    notify_authors_trampoline::<Self, F> as *const (),
2746                )),
2747                Box_::into_raw(f),
2748            )
2749        }
2750    }
2751
2752    #[doc(alias = "comments")]
2753    fn connect_comments_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2754        unsafe extern "C" fn notify_comments_trampoline<
2755            P: IsA<AboutDialog>,
2756            F: Fn(&P) + 'static,
2757        >(
2758            this: *mut ffi::GtkAboutDialog,
2759            _param_spec: glib::ffi::gpointer,
2760            f: glib::ffi::gpointer,
2761        ) {
2762            unsafe {
2763                let f: &F = &*(f as *const F);
2764                f(AboutDialog::from_glib_borrow(this).unsafe_cast_ref())
2765            }
2766        }
2767        unsafe {
2768            let f: Box_<F> = Box_::new(f);
2769            connect_raw(
2770                self.as_ptr() as *mut _,
2771                c"notify::comments".as_ptr(),
2772                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2773                    notify_comments_trampoline::<Self, F> as *const (),
2774                )),
2775                Box_::into_raw(f),
2776            )
2777        }
2778    }
2779
2780    #[doc(alias = "copyright")]
2781    fn connect_copyright_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2782        unsafe extern "C" fn notify_copyright_trampoline<
2783            P: IsA<AboutDialog>,
2784            F: Fn(&P) + 'static,
2785        >(
2786            this: *mut ffi::GtkAboutDialog,
2787            _param_spec: glib::ffi::gpointer,
2788            f: glib::ffi::gpointer,
2789        ) {
2790            unsafe {
2791                let f: &F = &*(f as *const F);
2792                f(AboutDialog::from_glib_borrow(this).unsafe_cast_ref())
2793            }
2794        }
2795        unsafe {
2796            let f: Box_<F> = Box_::new(f);
2797            connect_raw(
2798                self.as_ptr() as *mut _,
2799                c"notify::copyright".as_ptr(),
2800                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2801                    notify_copyright_trampoline::<Self, F> as *const (),
2802                )),
2803                Box_::into_raw(f),
2804            )
2805        }
2806    }
2807
2808    #[doc(alias = "documenters")]
2809    fn connect_documenters_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2810        unsafe extern "C" fn notify_documenters_trampoline<
2811            P: IsA<AboutDialog>,
2812            F: Fn(&P) + 'static,
2813        >(
2814            this: *mut ffi::GtkAboutDialog,
2815            _param_spec: glib::ffi::gpointer,
2816            f: glib::ffi::gpointer,
2817        ) {
2818            unsafe {
2819                let f: &F = &*(f as *const F);
2820                f(AboutDialog::from_glib_borrow(this).unsafe_cast_ref())
2821            }
2822        }
2823        unsafe {
2824            let f: Box_<F> = Box_::new(f);
2825            connect_raw(
2826                self.as_ptr() as *mut _,
2827                c"notify::documenters".as_ptr(),
2828                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2829                    notify_documenters_trampoline::<Self, F> as *const (),
2830                )),
2831                Box_::into_raw(f),
2832            )
2833        }
2834    }
2835
2836    #[doc(alias = "license")]
2837    fn connect_license_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2838        unsafe extern "C" fn notify_license_trampoline<P: IsA<AboutDialog>, F: Fn(&P) + 'static>(
2839            this: *mut ffi::GtkAboutDialog,
2840            _param_spec: glib::ffi::gpointer,
2841            f: glib::ffi::gpointer,
2842        ) {
2843            unsafe {
2844                let f: &F = &*(f as *const F);
2845                f(AboutDialog::from_glib_borrow(this).unsafe_cast_ref())
2846            }
2847        }
2848        unsafe {
2849            let f: Box_<F> = Box_::new(f);
2850            connect_raw(
2851                self.as_ptr() as *mut _,
2852                c"notify::license".as_ptr(),
2853                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2854                    notify_license_trampoline::<Self, F> as *const (),
2855                )),
2856                Box_::into_raw(f),
2857            )
2858        }
2859    }
2860
2861    #[doc(alias = "license-type")]
2862    fn connect_license_type_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2863        unsafe extern "C" fn notify_license_type_trampoline<
2864            P: IsA<AboutDialog>,
2865            F: Fn(&P) + 'static,
2866        >(
2867            this: *mut ffi::GtkAboutDialog,
2868            _param_spec: glib::ffi::gpointer,
2869            f: glib::ffi::gpointer,
2870        ) {
2871            unsafe {
2872                let f: &F = &*(f as *const F);
2873                f(AboutDialog::from_glib_borrow(this).unsafe_cast_ref())
2874            }
2875        }
2876        unsafe {
2877            let f: Box_<F> = Box_::new(f);
2878            connect_raw(
2879                self.as_ptr() as *mut _,
2880                c"notify::license-type".as_ptr(),
2881                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2882                    notify_license_type_trampoline::<Self, F> as *const (),
2883                )),
2884                Box_::into_raw(f),
2885            )
2886        }
2887    }
2888
2889    #[doc(alias = "logo")]
2890    fn connect_logo_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2891        unsafe extern "C" fn notify_logo_trampoline<P: IsA<AboutDialog>, F: Fn(&P) + 'static>(
2892            this: *mut ffi::GtkAboutDialog,
2893            _param_spec: glib::ffi::gpointer,
2894            f: glib::ffi::gpointer,
2895        ) {
2896            unsafe {
2897                let f: &F = &*(f as *const F);
2898                f(AboutDialog::from_glib_borrow(this).unsafe_cast_ref())
2899            }
2900        }
2901        unsafe {
2902            let f: Box_<F> = Box_::new(f);
2903            connect_raw(
2904                self.as_ptr() as *mut _,
2905                c"notify::logo".as_ptr(),
2906                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2907                    notify_logo_trampoline::<Self, F> as *const (),
2908                )),
2909                Box_::into_raw(f),
2910            )
2911        }
2912    }
2913
2914    #[doc(alias = "logo-icon-name")]
2915    fn connect_logo_icon_name_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2916        unsafe extern "C" fn notify_logo_icon_name_trampoline<
2917            P: IsA<AboutDialog>,
2918            F: Fn(&P) + 'static,
2919        >(
2920            this: *mut ffi::GtkAboutDialog,
2921            _param_spec: glib::ffi::gpointer,
2922            f: glib::ffi::gpointer,
2923        ) {
2924            unsafe {
2925                let f: &F = &*(f as *const F);
2926                f(AboutDialog::from_glib_borrow(this).unsafe_cast_ref())
2927            }
2928        }
2929        unsafe {
2930            let f: Box_<F> = Box_::new(f);
2931            connect_raw(
2932                self.as_ptr() as *mut _,
2933                c"notify::logo-icon-name".as_ptr(),
2934                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2935                    notify_logo_icon_name_trampoline::<Self, F> as *const (),
2936                )),
2937                Box_::into_raw(f),
2938            )
2939        }
2940    }
2941
2942    #[doc(alias = "program-name")]
2943    fn connect_program_name_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2944        unsafe extern "C" fn notify_program_name_trampoline<
2945            P: IsA<AboutDialog>,
2946            F: Fn(&P) + 'static,
2947        >(
2948            this: *mut ffi::GtkAboutDialog,
2949            _param_spec: glib::ffi::gpointer,
2950            f: glib::ffi::gpointer,
2951        ) {
2952            unsafe {
2953                let f: &F = &*(f as *const F);
2954                f(AboutDialog::from_glib_borrow(this).unsafe_cast_ref())
2955            }
2956        }
2957        unsafe {
2958            let f: Box_<F> = Box_::new(f);
2959            connect_raw(
2960                self.as_ptr() as *mut _,
2961                c"notify::program-name".as_ptr(),
2962                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2963                    notify_program_name_trampoline::<Self, F> as *const (),
2964                )),
2965                Box_::into_raw(f),
2966            )
2967        }
2968    }
2969
2970    #[doc(alias = "translator-credits")]
2971    fn connect_translator_credits_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2972        unsafe extern "C" fn notify_translator_credits_trampoline<
2973            P: IsA<AboutDialog>,
2974            F: Fn(&P) + 'static,
2975        >(
2976            this: *mut ffi::GtkAboutDialog,
2977            _param_spec: glib::ffi::gpointer,
2978            f: glib::ffi::gpointer,
2979        ) {
2980            unsafe {
2981                let f: &F = &*(f as *const F);
2982                f(AboutDialog::from_glib_borrow(this).unsafe_cast_ref())
2983            }
2984        }
2985        unsafe {
2986            let f: Box_<F> = Box_::new(f);
2987            connect_raw(
2988                self.as_ptr() as *mut _,
2989                c"notify::translator-credits".as_ptr(),
2990                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2991                    notify_translator_credits_trampoline::<Self, F> as *const (),
2992                )),
2993                Box_::into_raw(f),
2994            )
2995        }
2996    }
2997
2998    #[doc(alias = "version")]
2999    fn connect_version_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3000        unsafe extern "C" fn notify_version_trampoline<P: IsA<AboutDialog>, F: Fn(&P) + 'static>(
3001            this: *mut ffi::GtkAboutDialog,
3002            _param_spec: glib::ffi::gpointer,
3003            f: glib::ffi::gpointer,
3004        ) {
3005            unsafe {
3006                let f: &F = &*(f as *const F);
3007                f(AboutDialog::from_glib_borrow(this).unsafe_cast_ref())
3008            }
3009        }
3010        unsafe {
3011            let f: Box_<F> = Box_::new(f);
3012            connect_raw(
3013                self.as_ptr() as *mut _,
3014                c"notify::version".as_ptr(),
3015                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3016                    notify_version_trampoline::<Self, F> as *const (),
3017                )),
3018                Box_::into_raw(f),
3019            )
3020        }
3021    }
3022
3023    #[doc(alias = "website")]
3024    fn connect_website_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3025        unsafe extern "C" fn notify_website_trampoline<P: IsA<AboutDialog>, F: Fn(&P) + 'static>(
3026            this: *mut ffi::GtkAboutDialog,
3027            _param_spec: glib::ffi::gpointer,
3028            f: glib::ffi::gpointer,
3029        ) {
3030            unsafe {
3031                let f: &F = &*(f as *const F);
3032                f(AboutDialog::from_glib_borrow(this).unsafe_cast_ref())
3033            }
3034        }
3035        unsafe {
3036            let f: Box_<F> = Box_::new(f);
3037            connect_raw(
3038                self.as_ptr() as *mut _,
3039                c"notify::website".as_ptr(),
3040                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3041                    notify_website_trampoline::<Self, F> as *const (),
3042                )),
3043                Box_::into_raw(f),
3044            )
3045        }
3046    }
3047
3048    #[doc(alias = "website-label")]
3049    fn connect_website_label_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3050        unsafe extern "C" fn notify_website_label_trampoline<
3051            P: IsA<AboutDialog>,
3052            F: Fn(&P) + 'static,
3053        >(
3054            this: *mut ffi::GtkAboutDialog,
3055            _param_spec: glib::ffi::gpointer,
3056            f: glib::ffi::gpointer,
3057        ) {
3058            unsafe {
3059                let f: &F = &*(f as *const F);
3060                f(AboutDialog::from_glib_borrow(this).unsafe_cast_ref())
3061            }
3062        }
3063        unsafe {
3064            let f: Box_<F> = Box_::new(f);
3065            connect_raw(
3066                self.as_ptr() as *mut _,
3067                c"notify::website-label".as_ptr(),
3068                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3069                    notify_website_label_trampoline::<Self, F> as *const (),
3070                )),
3071                Box_::into_raw(f),
3072            )
3073        }
3074    }
3075
3076    #[doc(alias = "wrap-license")]
3077    fn connect_wrap_license_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3078        unsafe extern "C" fn notify_wrap_license_trampoline<
3079            P: IsA<AboutDialog>,
3080            F: Fn(&P) + 'static,
3081        >(
3082            this: *mut ffi::GtkAboutDialog,
3083            _param_spec: glib::ffi::gpointer,
3084            f: glib::ffi::gpointer,
3085        ) {
3086            unsafe {
3087                let f: &F = &*(f as *const F);
3088                f(AboutDialog::from_glib_borrow(this).unsafe_cast_ref())
3089            }
3090        }
3091        unsafe {
3092            let f: Box_<F> = Box_::new(f);
3093            connect_raw(
3094                self.as_ptr() as *mut _,
3095                c"notify::wrap-license".as_ptr(),
3096                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3097                    notify_wrap_license_trampoline::<Self, F> as *const (),
3098                )),
3099                Box_::into_raw(f),
3100            )
3101        }
3102    }
3103}
3104
3105impl<O: IsA<AboutDialog>> AboutDialogExt for O {}