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