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