1 // This file was generated by gir (https://github.com/gtk-rs/gir)
2 // from gir-files (https://github.com/gtk-rs/gir-files)
3 // DO NOT EDIT
4 
5 use gdk;
6 use gdk_pixbuf;
7 use glib::object::Cast;
8 use glib::object::IsA;
9 use glib::signal::connect_raw;
10 use glib::signal::SignalHandlerId;
11 use glib::translate::*;
12 use glib::GString;
13 use glib::StaticType;
14 use glib::ToValue;
15 use glib_sys;
16 use gtk_sys;
17 use libc;
18 use std::boxed::Box as Box_;
19 use std::fmt;
20 use std::mem::transmute;
21 use Align;
22 use Application;
23 use Bin;
24 use Buildable;
25 use Container;
26 use Dialog;
27 use License;
28 use ResizeMode;
29 use Widget;
30 use Window;
31 use WindowPosition;
32 use WindowType;
33 
34 glib_wrapper! {
35     pub struct AboutDialog(Object<gtk_sys::GtkAboutDialog, gtk_sys::GtkAboutDialogClass, AboutDialogClass>) @extends Dialog, Window, Bin, Container, Widget, @implements Buildable;
36 
37     match fn {
38         get_type => || gtk_sys::gtk_about_dialog_get_type(),
39     }
40 }
41 
42 impl AboutDialog {
new() -> AboutDialog43     pub fn new() -> AboutDialog {
44         assert_initialized_main_thread!();
45         unsafe { Widget::from_glib_none(gtk_sys::gtk_about_dialog_new()).unsafe_cast() }
46     }
47 }
48 
49 impl Default for AboutDialog {
default() -> Self50     fn default() -> Self {
51         Self::new()
52     }
53 }
54 
55 #[derive(Clone, Default)]
56 pub struct AboutDialogBuilder {
57     artists: Option<Vec<String>>,
58     authors: Option<Vec<String>>,
59     comments: Option<String>,
60     copyright: Option<String>,
61     documenters: Option<Vec<String>>,
62     license: Option<String>,
63     license_type: Option<License>,
64     logo: Option<gdk_pixbuf::Pixbuf>,
65     logo_icon_name: Option<String>,
66     program_name: Option<String>,
67     translator_credits: Option<String>,
68     version: Option<String>,
69     website: Option<String>,
70     website_label: Option<String>,
71     wrap_license: Option<bool>,
72     use_header_bar: Option<i32>,
73     accept_focus: Option<bool>,
74     application: Option<Application>,
75     attached_to: Option<Widget>,
76     decorated: Option<bool>,
77     default_height: Option<i32>,
78     default_width: Option<i32>,
79     deletable: Option<bool>,
80     destroy_with_parent: Option<bool>,
81     focus_on_map: Option<bool>,
82     focus_visible: Option<bool>,
83     gravity: Option<gdk::Gravity>,
84     hide_titlebar_when_maximized: Option<bool>,
85     icon: Option<gdk_pixbuf::Pixbuf>,
86     icon_name: Option<String>,
87     mnemonics_visible: Option<bool>,
88     modal: Option<bool>,
89     resizable: Option<bool>,
90     role: Option<String>,
91     screen: Option<gdk::Screen>,
92     skip_pager_hint: Option<bool>,
93     skip_taskbar_hint: Option<bool>,
94     startup_id: Option<String>,
95     title: Option<String>,
96     transient_for: Option<Window>,
97     type_: Option<WindowType>,
98     type_hint: Option<gdk::WindowTypeHint>,
99     urgency_hint: Option<bool>,
100     window_position: Option<WindowPosition>,
101     border_width: Option<u32>,
102     child: Option<Widget>,
103     resize_mode: Option<ResizeMode>,
104     app_paintable: Option<bool>,
105     can_default: Option<bool>,
106     can_focus: Option<bool>,
107     events: Option<gdk::EventMask>,
108     expand: Option<bool>,
109     #[cfg(any(feature = "v3_20", feature = "dox"))]
110     focus_on_click: Option<bool>,
111     halign: Option<Align>,
112     has_default: Option<bool>,
113     has_focus: Option<bool>,
114     has_tooltip: Option<bool>,
115     height_request: Option<i32>,
116     hexpand: Option<bool>,
117     hexpand_set: Option<bool>,
118     is_focus: Option<bool>,
119     margin: Option<i32>,
120     margin_bottom: Option<i32>,
121     margin_end: Option<i32>,
122     margin_start: Option<i32>,
123     margin_top: Option<i32>,
124     name: Option<String>,
125     no_show_all: Option<bool>,
126     opacity: Option<f64>,
127     parent: Option<Container>,
128     receives_default: Option<bool>,
129     sensitive: Option<bool>,
130     tooltip_markup: Option<String>,
131     tooltip_text: Option<String>,
132     valign: Option<Align>,
133     vexpand: Option<bool>,
134     vexpand_set: Option<bool>,
135     visible: Option<bool>,
136     width_request: Option<i32>,
137 }
138 
139 impl AboutDialogBuilder {
new() -> Self140     pub fn new() -> Self {
141         Self::default()
142     }
143 
build(self) -> AboutDialog144     pub fn build(self) -> AboutDialog {
145         let mut properties: Vec<(&str, &dyn ToValue)> = vec![];
146         if let Some(ref artists) = self.artists {
147             properties.push(("artists", artists));
148         }
149         if let Some(ref authors) = self.authors {
150             properties.push(("authors", authors));
151         }
152         if let Some(ref comments) = self.comments {
153             properties.push(("comments", comments));
154         }
155         if let Some(ref copyright) = self.copyright {
156             properties.push(("copyright", copyright));
157         }
158         if let Some(ref documenters) = self.documenters {
159             properties.push(("documenters", documenters));
160         }
161         if let Some(ref license) = self.license {
162             properties.push(("license", license));
163         }
164         if let Some(ref license_type) = self.license_type {
165             properties.push(("license-type", license_type));
166         }
167         if let Some(ref logo) = self.logo {
168             properties.push(("logo", logo));
169         }
170         if let Some(ref logo_icon_name) = self.logo_icon_name {
171             properties.push(("logo-icon-name", logo_icon_name));
172         }
173         if let Some(ref program_name) = self.program_name {
174             properties.push(("program-name", program_name));
175         }
176         if let Some(ref translator_credits) = self.translator_credits {
177             properties.push(("translator-credits", translator_credits));
178         }
179         if let Some(ref version) = self.version {
180             properties.push(("version", version));
181         }
182         if let Some(ref website) = self.website {
183             properties.push(("website", website));
184         }
185         if let Some(ref website_label) = self.website_label {
186             properties.push(("website-label", website_label));
187         }
188         if let Some(ref wrap_license) = self.wrap_license {
189             properties.push(("wrap-license", wrap_license));
190         }
191         if let Some(ref use_header_bar) = self.use_header_bar {
192             properties.push(("use-header-bar", use_header_bar));
193         }
194         if let Some(ref accept_focus) = self.accept_focus {
195             properties.push(("accept-focus", accept_focus));
196         }
197         if let Some(ref application) = self.application {
198             properties.push(("application", application));
199         }
200         if let Some(ref attached_to) = self.attached_to {
201             properties.push(("attached-to", attached_to));
202         }
203         if let Some(ref decorated) = self.decorated {
204             properties.push(("decorated", decorated));
205         }
206         if let Some(ref default_height) = self.default_height {
207             properties.push(("default-height", default_height));
208         }
209         if let Some(ref default_width) = self.default_width {
210             properties.push(("default-width", default_width));
211         }
212         if let Some(ref deletable) = self.deletable {
213             properties.push(("deletable", deletable));
214         }
215         if let Some(ref destroy_with_parent) = self.destroy_with_parent {
216             properties.push(("destroy-with-parent", destroy_with_parent));
217         }
218         if let Some(ref focus_on_map) = self.focus_on_map {
219             properties.push(("focus-on-map", focus_on_map));
220         }
221         if let Some(ref focus_visible) = self.focus_visible {
222             properties.push(("focus-visible", focus_visible));
223         }
224         if let Some(ref gravity) = self.gravity {
225             properties.push(("gravity", gravity));
226         }
227         if let Some(ref hide_titlebar_when_maximized) = self.hide_titlebar_when_maximized {
228             properties.push(("hide-titlebar-when-maximized", hide_titlebar_when_maximized));
229         }
230         if let Some(ref icon) = self.icon {
231             properties.push(("icon", icon));
232         }
233         if let Some(ref icon_name) = self.icon_name {
234             properties.push(("icon-name", icon_name));
235         }
236         if let Some(ref mnemonics_visible) = self.mnemonics_visible {
237             properties.push(("mnemonics-visible", mnemonics_visible));
238         }
239         if let Some(ref modal) = self.modal {
240             properties.push(("modal", modal));
241         }
242         if let Some(ref resizable) = self.resizable {
243             properties.push(("resizable", resizable));
244         }
245         if let Some(ref role) = self.role {
246             properties.push(("role", role));
247         }
248         if let Some(ref screen) = self.screen {
249             properties.push(("screen", screen));
250         }
251         if let Some(ref skip_pager_hint) = self.skip_pager_hint {
252             properties.push(("skip-pager-hint", skip_pager_hint));
253         }
254         if let Some(ref skip_taskbar_hint) = self.skip_taskbar_hint {
255             properties.push(("skip-taskbar-hint", skip_taskbar_hint));
256         }
257         if let Some(ref startup_id) = self.startup_id {
258             properties.push(("startup-id", startup_id));
259         }
260         if let Some(ref title) = self.title {
261             properties.push(("title", title));
262         }
263         if let Some(ref transient_for) = self.transient_for {
264             properties.push(("transient-for", transient_for));
265         }
266         if let Some(ref type_) = self.type_ {
267             properties.push(("type", type_));
268         }
269         if let Some(ref type_hint) = self.type_hint {
270             properties.push(("type-hint", type_hint));
271         }
272         if let Some(ref urgency_hint) = self.urgency_hint {
273             properties.push(("urgency-hint", urgency_hint));
274         }
275         if let Some(ref window_position) = self.window_position {
276             properties.push(("window-position", window_position));
277         }
278         if let Some(ref border_width) = self.border_width {
279             properties.push(("border-width", border_width));
280         }
281         if let Some(ref child) = self.child {
282             properties.push(("child", child));
283         }
284         if let Some(ref resize_mode) = self.resize_mode {
285             properties.push(("resize-mode", resize_mode));
286         }
287         if let Some(ref app_paintable) = self.app_paintable {
288             properties.push(("app-paintable", app_paintable));
289         }
290         if let Some(ref can_default) = self.can_default {
291             properties.push(("can-default", can_default));
292         }
293         if let Some(ref can_focus) = self.can_focus {
294             properties.push(("can-focus", can_focus));
295         }
296         if let Some(ref events) = self.events {
297             properties.push(("events", events));
298         }
299         if let Some(ref expand) = self.expand {
300             properties.push(("expand", expand));
301         }
302         #[cfg(any(feature = "v3_20", feature = "dox"))]
303         {
304             if let Some(ref focus_on_click) = self.focus_on_click {
305                 properties.push(("focus-on-click", focus_on_click));
306             }
307         }
308         if let Some(ref halign) = self.halign {
309             properties.push(("halign", halign));
310         }
311         if let Some(ref has_default) = self.has_default {
312             properties.push(("has-default", has_default));
313         }
314         if let Some(ref has_focus) = self.has_focus {
315             properties.push(("has-focus", has_focus));
316         }
317         if let Some(ref has_tooltip) = self.has_tooltip {
318             properties.push(("has-tooltip", has_tooltip));
319         }
320         if let Some(ref height_request) = self.height_request {
321             properties.push(("height-request", height_request));
322         }
323         if let Some(ref hexpand) = self.hexpand {
324             properties.push(("hexpand", hexpand));
325         }
326         if let Some(ref hexpand_set) = self.hexpand_set {
327             properties.push(("hexpand-set", hexpand_set));
328         }
329         if let Some(ref is_focus) = self.is_focus {
330             properties.push(("is-focus", is_focus));
331         }
332         if let Some(ref margin) = self.margin {
333             properties.push(("margin", margin));
334         }
335         if let Some(ref margin_bottom) = self.margin_bottom {
336             properties.push(("margin-bottom", margin_bottom));
337         }
338         if let Some(ref margin_end) = self.margin_end {
339             properties.push(("margin-end", margin_end));
340         }
341         if let Some(ref margin_start) = self.margin_start {
342             properties.push(("margin-start", margin_start));
343         }
344         if let Some(ref margin_top) = self.margin_top {
345             properties.push(("margin-top", margin_top));
346         }
347         if let Some(ref name) = self.name {
348             properties.push(("name", name));
349         }
350         if let Some(ref no_show_all) = self.no_show_all {
351             properties.push(("no-show-all", no_show_all));
352         }
353         if let Some(ref opacity) = self.opacity {
354             properties.push(("opacity", opacity));
355         }
356         if let Some(ref parent) = self.parent {
357             properties.push(("parent", parent));
358         }
359         if let Some(ref receives_default) = self.receives_default {
360             properties.push(("receives-default", receives_default));
361         }
362         if let Some(ref sensitive) = self.sensitive {
363             properties.push(("sensitive", sensitive));
364         }
365         if let Some(ref tooltip_markup) = self.tooltip_markup {
366             properties.push(("tooltip-markup", tooltip_markup));
367         }
368         if let Some(ref tooltip_text) = self.tooltip_text {
369             properties.push(("tooltip-text", tooltip_text));
370         }
371         if let Some(ref valign) = self.valign {
372             properties.push(("valign", valign));
373         }
374         if let Some(ref vexpand) = self.vexpand {
375             properties.push(("vexpand", vexpand));
376         }
377         if let Some(ref vexpand_set) = self.vexpand_set {
378             properties.push(("vexpand-set", vexpand_set));
379         }
380         if let Some(ref visible) = self.visible {
381             properties.push(("visible", visible));
382         }
383         if let Some(ref width_request) = self.width_request {
384             properties.push(("width-request", width_request));
385         }
386         glib::Object::new(AboutDialog::static_type(), &properties)
387             .expect("object new")
388             .downcast()
389             .expect("downcast")
390     }
391 
artists(mut self, artists: Vec<String>) -> Self392     pub fn artists(mut self, artists: Vec<String>) -> Self {
393         self.artists = Some(artists);
394         self
395     }
396 
authors(mut self, authors: Vec<String>) -> Self397     pub fn authors(mut self, authors: Vec<String>) -> Self {
398         self.authors = Some(authors);
399         self
400     }
401 
comments(mut self, comments: &str) -> Self402     pub fn comments(mut self, comments: &str) -> Self {
403         self.comments = Some(comments.to_string());
404         self
405     }
406 
copyright(mut self, copyright: &str) -> Self407     pub fn copyright(mut self, copyright: &str) -> Self {
408         self.copyright = Some(copyright.to_string());
409         self
410     }
411 
documenters(mut self, documenters: Vec<String>) -> Self412     pub fn documenters(mut self, documenters: Vec<String>) -> Self {
413         self.documenters = Some(documenters);
414         self
415     }
416 
license(mut self, license: &str) -> Self417     pub fn license(mut self, license: &str) -> Self {
418         self.license = Some(license.to_string());
419         self
420     }
421 
license_type(mut self, license_type: License) -> Self422     pub fn license_type(mut self, license_type: License) -> Self {
423         self.license_type = Some(license_type);
424         self
425     }
426 
logo(mut self, logo: &gdk_pixbuf::Pixbuf) -> Self427     pub fn logo(mut self, logo: &gdk_pixbuf::Pixbuf) -> Self {
428         self.logo = Some(logo.clone());
429         self
430     }
431 
logo_icon_name(mut self, logo_icon_name: &str) -> Self432     pub fn logo_icon_name(mut self, logo_icon_name: &str) -> Self {
433         self.logo_icon_name = Some(logo_icon_name.to_string());
434         self
435     }
436 
program_name(mut self, program_name: &str) -> Self437     pub fn program_name(mut self, program_name: &str) -> Self {
438         self.program_name = Some(program_name.to_string());
439         self
440     }
441 
translator_credits(mut self, translator_credits: &str) -> Self442     pub fn translator_credits(mut self, translator_credits: &str) -> Self {
443         self.translator_credits = Some(translator_credits.to_string());
444         self
445     }
446 
version(mut self, version: &str) -> Self447     pub fn version(mut self, version: &str) -> Self {
448         self.version = Some(version.to_string());
449         self
450     }
451 
website(mut self, website: &str) -> Self452     pub fn website(mut self, website: &str) -> Self {
453         self.website = Some(website.to_string());
454         self
455     }
456 
website_label(mut self, website_label: &str) -> Self457     pub fn website_label(mut self, website_label: &str) -> Self {
458         self.website_label = Some(website_label.to_string());
459         self
460     }
461 
wrap_license(mut self, wrap_license: bool) -> Self462     pub fn wrap_license(mut self, wrap_license: bool) -> Self {
463         self.wrap_license = Some(wrap_license);
464         self
465     }
466 
use_header_bar(mut self, use_header_bar: i32) -> Self467     pub fn use_header_bar(mut self, use_header_bar: i32) -> Self {
468         self.use_header_bar = Some(use_header_bar);
469         self
470     }
471 
accept_focus(mut self, accept_focus: bool) -> Self472     pub fn accept_focus(mut self, accept_focus: bool) -> Self {
473         self.accept_focus = Some(accept_focus);
474         self
475     }
476 
application<P: IsA<Application>>(mut self, application: &P) -> Self477     pub fn application<P: IsA<Application>>(mut self, application: &P) -> Self {
478         self.application = Some(application.clone().upcast());
479         self
480     }
481 
attached_to<P: IsA<Widget>>(mut self, attached_to: &P) -> Self482     pub fn attached_to<P: IsA<Widget>>(mut self, attached_to: &P) -> Self {
483         self.attached_to = Some(attached_to.clone().upcast());
484         self
485     }
486 
decorated(mut self, decorated: bool) -> Self487     pub fn decorated(mut self, decorated: bool) -> Self {
488         self.decorated = Some(decorated);
489         self
490     }
491 
default_height(mut self, default_height: i32) -> Self492     pub fn default_height(mut self, default_height: i32) -> Self {
493         self.default_height = Some(default_height);
494         self
495     }
496 
default_width(mut self, default_width: i32) -> Self497     pub fn default_width(mut self, default_width: i32) -> Self {
498         self.default_width = Some(default_width);
499         self
500     }
501 
deletable(mut self, deletable: bool) -> Self502     pub fn deletable(mut self, deletable: bool) -> Self {
503         self.deletable = Some(deletable);
504         self
505     }
506 
destroy_with_parent(mut self, destroy_with_parent: bool) -> Self507     pub fn destroy_with_parent(mut self, destroy_with_parent: bool) -> Self {
508         self.destroy_with_parent = Some(destroy_with_parent);
509         self
510     }
511 
focus_on_map(mut self, focus_on_map: bool) -> Self512     pub fn focus_on_map(mut self, focus_on_map: bool) -> Self {
513         self.focus_on_map = Some(focus_on_map);
514         self
515     }
516 
focus_visible(mut self, focus_visible: bool) -> Self517     pub fn focus_visible(mut self, focus_visible: bool) -> Self {
518         self.focus_visible = Some(focus_visible);
519         self
520     }
521 
gravity(mut self, gravity: gdk::Gravity) -> Self522     pub fn gravity(mut self, gravity: gdk::Gravity) -> Self {
523         self.gravity = Some(gravity);
524         self
525     }
526 
hide_titlebar_when_maximized(mut self, hide_titlebar_when_maximized: bool) -> Self527     pub fn hide_titlebar_when_maximized(mut self, hide_titlebar_when_maximized: bool) -> Self {
528         self.hide_titlebar_when_maximized = Some(hide_titlebar_when_maximized);
529         self
530     }
531 
icon(mut self, icon: &gdk_pixbuf::Pixbuf) -> Self532     pub fn icon(mut self, icon: &gdk_pixbuf::Pixbuf) -> Self {
533         self.icon = Some(icon.clone());
534         self
535     }
536 
icon_name(mut self, icon_name: &str) -> Self537     pub fn icon_name(mut self, icon_name: &str) -> Self {
538         self.icon_name = Some(icon_name.to_string());
539         self
540     }
541 
mnemonics_visible(mut self, mnemonics_visible: bool) -> Self542     pub fn mnemonics_visible(mut self, mnemonics_visible: bool) -> Self {
543         self.mnemonics_visible = Some(mnemonics_visible);
544         self
545     }
546 
modal(mut self, modal: bool) -> Self547     pub fn modal(mut self, modal: bool) -> Self {
548         self.modal = Some(modal);
549         self
550     }
551 
resizable(mut self, resizable: bool) -> Self552     pub fn resizable(mut self, resizable: bool) -> Self {
553         self.resizable = Some(resizable);
554         self
555     }
556 
role(mut self, role: &str) -> Self557     pub fn role(mut self, role: &str) -> Self {
558         self.role = Some(role.to_string());
559         self
560     }
561 
screen(mut self, screen: &gdk::Screen) -> Self562     pub fn screen(mut self, screen: &gdk::Screen) -> Self {
563         self.screen = Some(screen.clone());
564         self
565     }
566 
skip_pager_hint(mut self, skip_pager_hint: bool) -> Self567     pub fn skip_pager_hint(mut self, skip_pager_hint: bool) -> Self {
568         self.skip_pager_hint = Some(skip_pager_hint);
569         self
570     }
571 
skip_taskbar_hint(mut self, skip_taskbar_hint: bool) -> Self572     pub fn skip_taskbar_hint(mut self, skip_taskbar_hint: bool) -> Self {
573         self.skip_taskbar_hint = Some(skip_taskbar_hint);
574         self
575     }
576 
startup_id(mut self, startup_id: &str) -> Self577     pub fn startup_id(mut self, startup_id: &str) -> Self {
578         self.startup_id = Some(startup_id.to_string());
579         self
580     }
581 
title(mut self, title: &str) -> Self582     pub fn title(mut self, title: &str) -> Self {
583         self.title = Some(title.to_string());
584         self
585     }
586 
transient_for<P: IsA<Window>>(mut self, transient_for: &P) -> Self587     pub fn transient_for<P: IsA<Window>>(mut self, transient_for: &P) -> Self {
588         self.transient_for = Some(transient_for.clone().upcast());
589         self
590     }
591 
type_(mut self, type_: WindowType) -> Self592     pub fn type_(mut self, type_: WindowType) -> Self {
593         self.type_ = Some(type_);
594         self
595     }
596 
type_hint(mut self, type_hint: gdk::WindowTypeHint) -> Self597     pub fn type_hint(mut self, type_hint: gdk::WindowTypeHint) -> Self {
598         self.type_hint = Some(type_hint);
599         self
600     }
601 
urgency_hint(mut self, urgency_hint: bool) -> Self602     pub fn urgency_hint(mut self, urgency_hint: bool) -> Self {
603         self.urgency_hint = Some(urgency_hint);
604         self
605     }
606 
window_position(mut self, window_position: WindowPosition) -> Self607     pub fn window_position(mut self, window_position: WindowPosition) -> Self {
608         self.window_position = Some(window_position);
609         self
610     }
611 
border_width(mut self, border_width: u32) -> Self612     pub fn border_width(mut self, border_width: u32) -> Self {
613         self.border_width = Some(border_width);
614         self
615     }
616 
child<P: IsA<Widget>>(mut self, child: &P) -> Self617     pub fn child<P: IsA<Widget>>(mut self, child: &P) -> Self {
618         self.child = Some(child.clone().upcast());
619         self
620     }
621 
resize_mode(mut self, resize_mode: ResizeMode) -> Self622     pub fn resize_mode(mut self, resize_mode: ResizeMode) -> Self {
623         self.resize_mode = Some(resize_mode);
624         self
625     }
626 
app_paintable(mut self, app_paintable: bool) -> Self627     pub fn app_paintable(mut self, app_paintable: bool) -> Self {
628         self.app_paintable = Some(app_paintable);
629         self
630     }
631 
can_default(mut self, can_default: bool) -> Self632     pub fn can_default(mut self, can_default: bool) -> Self {
633         self.can_default = Some(can_default);
634         self
635     }
636 
can_focus(mut self, can_focus: bool) -> Self637     pub fn can_focus(mut self, can_focus: bool) -> Self {
638         self.can_focus = Some(can_focus);
639         self
640     }
641 
events(mut self, events: gdk::EventMask) -> Self642     pub fn events(mut self, events: gdk::EventMask) -> Self {
643         self.events = Some(events);
644         self
645     }
646 
expand(mut self, expand: bool) -> Self647     pub fn expand(mut self, expand: bool) -> Self {
648         self.expand = Some(expand);
649         self
650     }
651 
652     #[cfg(any(feature = "v3_20", feature = "dox"))]
focus_on_click(mut self, focus_on_click: bool) -> Self653     pub fn focus_on_click(mut self, focus_on_click: bool) -> Self {
654         self.focus_on_click = Some(focus_on_click);
655         self
656     }
657 
halign(mut self, halign: Align) -> Self658     pub fn halign(mut self, halign: Align) -> Self {
659         self.halign = Some(halign);
660         self
661     }
662 
has_default(mut self, has_default: bool) -> Self663     pub fn has_default(mut self, has_default: bool) -> Self {
664         self.has_default = Some(has_default);
665         self
666     }
667 
has_focus(mut self, has_focus: bool) -> Self668     pub fn has_focus(mut self, has_focus: bool) -> Self {
669         self.has_focus = Some(has_focus);
670         self
671     }
672 
has_tooltip(mut self, has_tooltip: bool) -> Self673     pub fn has_tooltip(mut self, has_tooltip: bool) -> Self {
674         self.has_tooltip = Some(has_tooltip);
675         self
676     }
677 
height_request(mut self, height_request: i32) -> Self678     pub fn height_request(mut self, height_request: i32) -> Self {
679         self.height_request = Some(height_request);
680         self
681     }
682 
hexpand(mut self, hexpand: bool) -> Self683     pub fn hexpand(mut self, hexpand: bool) -> Self {
684         self.hexpand = Some(hexpand);
685         self
686     }
687 
hexpand_set(mut self, hexpand_set: bool) -> Self688     pub fn hexpand_set(mut self, hexpand_set: bool) -> Self {
689         self.hexpand_set = Some(hexpand_set);
690         self
691     }
692 
is_focus(mut self, is_focus: bool) -> Self693     pub fn is_focus(mut self, is_focus: bool) -> Self {
694         self.is_focus = Some(is_focus);
695         self
696     }
697 
margin(mut self, margin: i32) -> Self698     pub fn margin(mut self, margin: i32) -> Self {
699         self.margin = Some(margin);
700         self
701     }
702 
margin_bottom(mut self, margin_bottom: i32) -> Self703     pub fn margin_bottom(mut self, margin_bottom: i32) -> Self {
704         self.margin_bottom = Some(margin_bottom);
705         self
706     }
707 
margin_end(mut self, margin_end: i32) -> Self708     pub fn margin_end(mut self, margin_end: i32) -> Self {
709         self.margin_end = Some(margin_end);
710         self
711     }
712 
margin_start(mut self, margin_start: i32) -> Self713     pub fn margin_start(mut self, margin_start: i32) -> Self {
714         self.margin_start = Some(margin_start);
715         self
716     }
717 
margin_top(mut self, margin_top: i32) -> Self718     pub fn margin_top(mut self, margin_top: i32) -> Self {
719         self.margin_top = Some(margin_top);
720         self
721     }
722 
name(mut self, name: &str) -> Self723     pub fn name(mut self, name: &str) -> Self {
724         self.name = Some(name.to_string());
725         self
726     }
727 
no_show_all(mut self, no_show_all: bool) -> Self728     pub fn no_show_all(mut self, no_show_all: bool) -> Self {
729         self.no_show_all = Some(no_show_all);
730         self
731     }
732 
opacity(mut self, opacity: f64) -> Self733     pub fn opacity(mut self, opacity: f64) -> Self {
734         self.opacity = Some(opacity);
735         self
736     }
737 
parent<P: IsA<Container>>(mut self, parent: &P) -> Self738     pub fn parent<P: IsA<Container>>(mut self, parent: &P) -> Self {
739         self.parent = Some(parent.clone().upcast());
740         self
741     }
742 
receives_default(mut self, receives_default: bool) -> Self743     pub fn receives_default(mut self, receives_default: bool) -> Self {
744         self.receives_default = Some(receives_default);
745         self
746     }
747 
sensitive(mut self, sensitive: bool) -> Self748     pub fn sensitive(mut self, sensitive: bool) -> Self {
749         self.sensitive = Some(sensitive);
750         self
751     }
752 
tooltip_markup(mut self, tooltip_markup: &str) -> Self753     pub fn tooltip_markup(mut self, tooltip_markup: &str) -> Self {
754         self.tooltip_markup = Some(tooltip_markup.to_string());
755         self
756     }
757 
tooltip_text(mut self, tooltip_text: &str) -> Self758     pub fn tooltip_text(mut self, tooltip_text: &str) -> Self {
759         self.tooltip_text = Some(tooltip_text.to_string());
760         self
761     }
762 
valign(mut self, valign: Align) -> Self763     pub fn valign(mut self, valign: Align) -> Self {
764         self.valign = Some(valign);
765         self
766     }
767 
vexpand(mut self, vexpand: bool) -> Self768     pub fn vexpand(mut self, vexpand: bool) -> Self {
769         self.vexpand = Some(vexpand);
770         self
771     }
772 
vexpand_set(mut self, vexpand_set: bool) -> Self773     pub fn vexpand_set(mut self, vexpand_set: bool) -> Self {
774         self.vexpand_set = Some(vexpand_set);
775         self
776     }
777 
visible(mut self, visible: bool) -> Self778     pub fn visible(mut self, visible: bool) -> Self {
779         self.visible = Some(visible);
780         self
781     }
782 
width_request(mut self, width_request: i32) -> Self783     pub fn width_request(mut self, width_request: i32) -> Self {
784         self.width_request = Some(width_request);
785         self
786     }
787 }
788 
789 pub const NONE_ABOUT_DIALOG: Option<&AboutDialog> = None;
790 
791 pub trait AboutDialogExt: 'static {
add_credit_section(&self, section_name: &str, people: &[&str])792     fn add_credit_section(&self, section_name: &str, people: &[&str]);
793 
get_artists(&self) -> Vec<GString>794     fn get_artists(&self) -> Vec<GString>;
795 
get_authors(&self) -> Vec<GString>796     fn get_authors(&self) -> Vec<GString>;
797 
get_comments(&self) -> Option<GString>798     fn get_comments(&self) -> Option<GString>;
799 
get_copyright(&self) -> Option<GString>800     fn get_copyright(&self) -> Option<GString>;
801 
get_documenters(&self) -> Vec<GString>802     fn get_documenters(&self) -> Vec<GString>;
803 
get_license(&self) -> Option<GString>804     fn get_license(&self) -> Option<GString>;
805 
get_license_type(&self) -> License806     fn get_license_type(&self) -> License;
807 
get_logo(&self) -> Option<gdk_pixbuf::Pixbuf>808     fn get_logo(&self) -> Option<gdk_pixbuf::Pixbuf>;
809 
get_logo_icon_name(&self) -> Option<GString>810     fn get_logo_icon_name(&self) -> Option<GString>;
811 
get_program_name(&self) -> Option<GString>812     fn get_program_name(&self) -> Option<GString>;
813 
get_translator_credits(&self) -> Option<GString>814     fn get_translator_credits(&self) -> Option<GString>;
815 
get_version(&self) -> Option<GString>816     fn get_version(&self) -> Option<GString>;
817 
get_website(&self) -> Option<GString>818     fn get_website(&self) -> Option<GString>;
819 
get_website_label(&self) -> Option<GString>820     fn get_website_label(&self) -> Option<GString>;
821 
get_wrap_license(&self) -> bool822     fn get_wrap_license(&self) -> bool;
823 
set_artists(&self, artists: &[&str])824     fn set_artists(&self, artists: &[&str]);
825 
set_authors(&self, authors: &[&str])826     fn set_authors(&self, authors: &[&str]);
827 
set_comments(&self, comments: Option<&str>)828     fn set_comments(&self, comments: Option<&str>);
829 
set_copyright(&self, copyright: Option<&str>)830     fn set_copyright(&self, copyright: Option<&str>);
831 
set_documenters(&self, documenters: &[&str])832     fn set_documenters(&self, documenters: &[&str]);
833 
set_license(&self, license: Option<&str>)834     fn set_license(&self, license: Option<&str>);
835 
set_license_type(&self, license_type: License)836     fn set_license_type(&self, license_type: License);
837 
set_logo(&self, logo: Option<&gdk_pixbuf::Pixbuf>)838     fn set_logo(&self, logo: Option<&gdk_pixbuf::Pixbuf>);
839 
set_logo_icon_name(&self, icon_name: Option<&str>)840     fn set_logo_icon_name(&self, icon_name: Option<&str>);
841 
set_program_name(&self, name: &str)842     fn set_program_name(&self, name: &str);
843 
set_translator_credits(&self, translator_credits: Option<&str>)844     fn set_translator_credits(&self, translator_credits: Option<&str>);
845 
set_version(&self, version: Option<&str>)846     fn set_version(&self, version: Option<&str>);
847 
set_website(&self, website: Option<&str>)848     fn set_website(&self, website: Option<&str>);
849 
set_website_label(&self, website_label: Option<&str>)850     fn set_website_label(&self, website_label: Option<&str>);
851 
set_wrap_license(&self, wrap_license: bool)852     fn set_wrap_license(&self, wrap_license: bool);
853 
connect_activate_link<F: Fn(&Self, &str) -> glib::signal::Inhibit + 'static>( &self, f: F, ) -> SignalHandlerId854     fn connect_activate_link<F: Fn(&Self, &str) -> glib::signal::Inhibit + 'static>(
855         &self,
856         f: F,
857     ) -> SignalHandlerId;
858 
connect_property_artists_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId859     fn connect_property_artists_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
860 
connect_property_authors_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId861     fn connect_property_authors_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
862 
connect_property_comments_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId863     fn connect_property_comments_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
864 
connect_property_copyright_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId865     fn connect_property_copyright_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
866 
connect_property_documenters_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId867     fn connect_property_documenters_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
868 
connect_property_license_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId869     fn connect_property_license_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
870 
connect_property_license_type_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId871     fn connect_property_license_type_notify<F: Fn(&Self) + 'static>(&self, f: F)
872         -> SignalHandlerId;
873 
connect_property_logo_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId874     fn connect_property_logo_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
875 
connect_property_logo_icon_name_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId876     fn connect_property_logo_icon_name_notify<F: Fn(&Self) + 'static>(
877         &self,
878         f: F,
879     ) -> SignalHandlerId;
880 
connect_property_program_name_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId881     fn connect_property_program_name_notify<F: Fn(&Self) + 'static>(&self, f: F)
882         -> SignalHandlerId;
883 
connect_property_translator_credits_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId884     fn connect_property_translator_credits_notify<F: Fn(&Self) + 'static>(
885         &self,
886         f: F,
887     ) -> SignalHandlerId;
888 
connect_property_version_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId889     fn connect_property_version_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
890 
connect_property_website_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId891     fn connect_property_website_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
892 
connect_property_website_label_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId893     fn connect_property_website_label_notify<F: Fn(&Self) + 'static>(
894         &self,
895         f: F,
896     ) -> SignalHandlerId;
897 
connect_property_wrap_license_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId898     fn connect_property_wrap_license_notify<F: Fn(&Self) + 'static>(&self, f: F)
899         -> SignalHandlerId;
900 }
901 
902 impl<O: IsA<AboutDialog>> AboutDialogExt for O {
add_credit_section(&self, section_name: &str, people: &[&str])903     fn add_credit_section(&self, section_name: &str, people: &[&str]) {
904         unsafe {
905             gtk_sys::gtk_about_dialog_add_credit_section(
906                 self.as_ref().to_glib_none().0,
907                 section_name.to_glib_none().0,
908                 people.to_glib_none().0,
909             );
910         }
911     }
912 
get_artists(&self) -> Vec<GString>913     fn get_artists(&self) -> Vec<GString> {
914         unsafe {
915             FromGlibPtrContainer::from_glib_none(gtk_sys::gtk_about_dialog_get_artists(
916                 self.as_ref().to_glib_none().0,
917             ))
918         }
919     }
920 
get_authors(&self) -> Vec<GString>921     fn get_authors(&self) -> Vec<GString> {
922         unsafe {
923             FromGlibPtrContainer::from_glib_none(gtk_sys::gtk_about_dialog_get_authors(
924                 self.as_ref().to_glib_none().0,
925             ))
926         }
927     }
928 
get_comments(&self) -> Option<GString>929     fn get_comments(&self) -> Option<GString> {
930         unsafe {
931             from_glib_none(gtk_sys::gtk_about_dialog_get_comments(
932                 self.as_ref().to_glib_none().0,
933             ))
934         }
935     }
936 
get_copyright(&self) -> Option<GString>937     fn get_copyright(&self) -> Option<GString> {
938         unsafe {
939             from_glib_none(gtk_sys::gtk_about_dialog_get_copyright(
940                 self.as_ref().to_glib_none().0,
941             ))
942         }
943     }
944 
get_documenters(&self) -> Vec<GString>945     fn get_documenters(&self) -> Vec<GString> {
946         unsafe {
947             FromGlibPtrContainer::from_glib_none(gtk_sys::gtk_about_dialog_get_documenters(
948                 self.as_ref().to_glib_none().0,
949             ))
950         }
951     }
952 
get_license(&self) -> Option<GString>953     fn get_license(&self) -> Option<GString> {
954         unsafe {
955             from_glib_none(gtk_sys::gtk_about_dialog_get_license(
956                 self.as_ref().to_glib_none().0,
957             ))
958         }
959     }
960 
get_license_type(&self) -> License961     fn get_license_type(&self) -> License {
962         unsafe {
963             from_glib(gtk_sys::gtk_about_dialog_get_license_type(
964                 self.as_ref().to_glib_none().0,
965             ))
966         }
967     }
968 
get_logo(&self) -> Option<gdk_pixbuf::Pixbuf>969     fn get_logo(&self) -> Option<gdk_pixbuf::Pixbuf> {
970         unsafe {
971             from_glib_none(gtk_sys::gtk_about_dialog_get_logo(
972                 self.as_ref().to_glib_none().0,
973             ))
974         }
975     }
976 
get_logo_icon_name(&self) -> Option<GString>977     fn get_logo_icon_name(&self) -> Option<GString> {
978         unsafe {
979             from_glib_none(gtk_sys::gtk_about_dialog_get_logo_icon_name(
980                 self.as_ref().to_glib_none().0,
981             ))
982         }
983     }
984 
get_program_name(&self) -> Option<GString>985     fn get_program_name(&self) -> Option<GString> {
986         unsafe {
987             from_glib_none(gtk_sys::gtk_about_dialog_get_program_name(
988                 self.as_ref().to_glib_none().0,
989             ))
990         }
991     }
992 
get_translator_credits(&self) -> Option<GString>993     fn get_translator_credits(&self) -> Option<GString> {
994         unsafe {
995             from_glib_none(gtk_sys::gtk_about_dialog_get_translator_credits(
996                 self.as_ref().to_glib_none().0,
997             ))
998         }
999     }
1000 
get_version(&self) -> Option<GString>1001     fn get_version(&self) -> Option<GString> {
1002         unsafe {
1003             from_glib_none(gtk_sys::gtk_about_dialog_get_version(
1004                 self.as_ref().to_glib_none().0,
1005             ))
1006         }
1007     }
1008 
get_website(&self) -> Option<GString>1009     fn get_website(&self) -> Option<GString> {
1010         unsafe {
1011             from_glib_none(gtk_sys::gtk_about_dialog_get_website(
1012                 self.as_ref().to_glib_none().0,
1013             ))
1014         }
1015     }
1016 
get_website_label(&self) -> Option<GString>1017     fn get_website_label(&self) -> Option<GString> {
1018         unsafe {
1019             from_glib_none(gtk_sys::gtk_about_dialog_get_website_label(
1020                 self.as_ref().to_glib_none().0,
1021             ))
1022         }
1023     }
1024 
get_wrap_license(&self) -> bool1025     fn get_wrap_license(&self) -> bool {
1026         unsafe {
1027             from_glib(gtk_sys::gtk_about_dialog_get_wrap_license(
1028                 self.as_ref().to_glib_none().0,
1029             ))
1030         }
1031     }
1032 
set_artists(&self, artists: &[&str])1033     fn set_artists(&self, artists: &[&str]) {
1034         unsafe {
1035             gtk_sys::gtk_about_dialog_set_artists(
1036                 self.as_ref().to_glib_none().0,
1037                 artists.to_glib_none().0,
1038             );
1039         }
1040     }
1041 
set_authors(&self, authors: &[&str])1042     fn set_authors(&self, authors: &[&str]) {
1043         unsafe {
1044             gtk_sys::gtk_about_dialog_set_authors(
1045                 self.as_ref().to_glib_none().0,
1046                 authors.to_glib_none().0,
1047             );
1048         }
1049     }
1050 
set_comments(&self, comments: Option<&str>)1051     fn set_comments(&self, comments: Option<&str>) {
1052         unsafe {
1053             gtk_sys::gtk_about_dialog_set_comments(
1054                 self.as_ref().to_glib_none().0,
1055                 comments.to_glib_none().0,
1056             );
1057         }
1058     }
1059 
set_copyright(&self, copyright: Option<&str>)1060     fn set_copyright(&self, copyright: Option<&str>) {
1061         unsafe {
1062             gtk_sys::gtk_about_dialog_set_copyright(
1063                 self.as_ref().to_glib_none().0,
1064                 copyright.to_glib_none().0,
1065             );
1066         }
1067     }
1068 
set_documenters(&self, documenters: &[&str])1069     fn set_documenters(&self, documenters: &[&str]) {
1070         unsafe {
1071             gtk_sys::gtk_about_dialog_set_documenters(
1072                 self.as_ref().to_glib_none().0,
1073                 documenters.to_glib_none().0,
1074             );
1075         }
1076     }
1077 
set_license(&self, license: Option<&str>)1078     fn set_license(&self, license: Option<&str>) {
1079         unsafe {
1080             gtk_sys::gtk_about_dialog_set_license(
1081                 self.as_ref().to_glib_none().0,
1082                 license.to_glib_none().0,
1083             );
1084         }
1085     }
1086 
set_license_type(&self, license_type: License)1087     fn set_license_type(&self, license_type: License) {
1088         unsafe {
1089             gtk_sys::gtk_about_dialog_set_license_type(
1090                 self.as_ref().to_glib_none().0,
1091                 license_type.to_glib(),
1092             );
1093         }
1094     }
1095 
set_logo(&self, logo: Option<&gdk_pixbuf::Pixbuf>)1096     fn set_logo(&self, logo: Option<&gdk_pixbuf::Pixbuf>) {
1097         unsafe {
1098             gtk_sys::gtk_about_dialog_set_logo(
1099                 self.as_ref().to_glib_none().0,
1100                 logo.to_glib_none().0,
1101             );
1102         }
1103     }
1104 
set_logo_icon_name(&self, icon_name: Option<&str>)1105     fn set_logo_icon_name(&self, icon_name: Option<&str>) {
1106         unsafe {
1107             gtk_sys::gtk_about_dialog_set_logo_icon_name(
1108                 self.as_ref().to_glib_none().0,
1109                 icon_name.to_glib_none().0,
1110             );
1111         }
1112     }
1113 
set_program_name(&self, name: &str)1114     fn set_program_name(&self, name: &str) {
1115         unsafe {
1116             gtk_sys::gtk_about_dialog_set_program_name(
1117                 self.as_ref().to_glib_none().0,
1118                 name.to_glib_none().0,
1119             );
1120         }
1121     }
1122 
set_translator_credits(&self, translator_credits: Option<&str>)1123     fn set_translator_credits(&self, translator_credits: Option<&str>) {
1124         unsafe {
1125             gtk_sys::gtk_about_dialog_set_translator_credits(
1126                 self.as_ref().to_glib_none().0,
1127                 translator_credits.to_glib_none().0,
1128             );
1129         }
1130     }
1131 
set_version(&self, version: Option<&str>)1132     fn set_version(&self, version: Option<&str>) {
1133         unsafe {
1134             gtk_sys::gtk_about_dialog_set_version(
1135                 self.as_ref().to_glib_none().0,
1136                 version.to_glib_none().0,
1137             );
1138         }
1139     }
1140 
set_website(&self, website: Option<&str>)1141     fn set_website(&self, website: Option<&str>) {
1142         unsafe {
1143             gtk_sys::gtk_about_dialog_set_website(
1144                 self.as_ref().to_glib_none().0,
1145                 website.to_glib_none().0,
1146             );
1147         }
1148     }
1149 
set_website_label(&self, website_label: Option<&str>)1150     fn set_website_label(&self, website_label: Option<&str>) {
1151         unsafe {
1152             gtk_sys::gtk_about_dialog_set_website_label(
1153                 self.as_ref().to_glib_none().0,
1154                 website_label.to_glib_none().0,
1155             );
1156         }
1157     }
1158 
set_wrap_license(&self, wrap_license: bool)1159     fn set_wrap_license(&self, wrap_license: bool) {
1160         unsafe {
1161             gtk_sys::gtk_about_dialog_set_wrap_license(
1162                 self.as_ref().to_glib_none().0,
1163                 wrap_license.to_glib(),
1164             );
1165         }
1166     }
1167 
connect_activate_link<F: Fn(&Self, &str) -> glib::signal::Inhibit + 'static>( &self, f: F, ) -> SignalHandlerId1168     fn connect_activate_link<F: Fn(&Self, &str) -> glib::signal::Inhibit + 'static>(
1169         &self,
1170         f: F,
1171     ) -> SignalHandlerId {
1172         unsafe extern "C" fn activate_link_trampoline<
1173             P,
1174             F: Fn(&P, &str) -> glib::signal::Inhibit + 'static,
1175         >(
1176             this: *mut gtk_sys::GtkAboutDialog,
1177             uri: *mut libc::c_char,
1178             f: glib_sys::gpointer,
1179         ) -> glib_sys::gboolean
1180         where
1181             P: IsA<AboutDialog>,
1182         {
1183             let f: &F = &*(f as *const F);
1184             f(
1185                 &AboutDialog::from_glib_borrow(this).unsafe_cast(),
1186                 &GString::from_glib_borrow(uri),
1187             )
1188             .to_glib()
1189         }
1190         unsafe {
1191             let f: Box_<F> = Box_::new(f);
1192             connect_raw(
1193                 self.as_ptr() as *mut _,
1194                 b"activate-link\0".as_ptr() as *const _,
1195                 Some(transmute(activate_link_trampoline::<Self, F> as usize)),
1196                 Box_::into_raw(f),
1197             )
1198         }
1199     }
1200 
connect_property_artists_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId1201     fn connect_property_artists_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1202         unsafe extern "C" fn notify_artists_trampoline<P, F: Fn(&P) + 'static>(
1203             this: *mut gtk_sys::GtkAboutDialog,
1204             _param_spec: glib_sys::gpointer,
1205             f: glib_sys::gpointer,
1206         ) where
1207             P: IsA<AboutDialog>,
1208         {
1209             let f: &F = &*(f as *const F);
1210             f(&AboutDialog::from_glib_borrow(this).unsafe_cast())
1211         }
1212         unsafe {
1213             let f: Box_<F> = Box_::new(f);
1214             connect_raw(
1215                 self.as_ptr() as *mut _,
1216                 b"notify::artists\0".as_ptr() as *const _,
1217                 Some(transmute(notify_artists_trampoline::<Self, F> as usize)),
1218                 Box_::into_raw(f),
1219             )
1220         }
1221     }
1222 
connect_property_authors_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId1223     fn connect_property_authors_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1224         unsafe extern "C" fn notify_authors_trampoline<P, F: Fn(&P) + 'static>(
1225             this: *mut gtk_sys::GtkAboutDialog,
1226             _param_spec: glib_sys::gpointer,
1227             f: glib_sys::gpointer,
1228         ) where
1229             P: IsA<AboutDialog>,
1230         {
1231             let f: &F = &*(f as *const F);
1232             f(&AboutDialog::from_glib_borrow(this).unsafe_cast())
1233         }
1234         unsafe {
1235             let f: Box_<F> = Box_::new(f);
1236             connect_raw(
1237                 self.as_ptr() as *mut _,
1238                 b"notify::authors\0".as_ptr() as *const _,
1239                 Some(transmute(notify_authors_trampoline::<Self, F> as usize)),
1240                 Box_::into_raw(f),
1241             )
1242         }
1243     }
1244 
connect_property_comments_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId1245     fn connect_property_comments_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1246         unsafe extern "C" fn notify_comments_trampoline<P, F: Fn(&P) + 'static>(
1247             this: *mut gtk_sys::GtkAboutDialog,
1248             _param_spec: glib_sys::gpointer,
1249             f: glib_sys::gpointer,
1250         ) where
1251             P: IsA<AboutDialog>,
1252         {
1253             let f: &F = &*(f as *const F);
1254             f(&AboutDialog::from_glib_borrow(this).unsafe_cast())
1255         }
1256         unsafe {
1257             let f: Box_<F> = Box_::new(f);
1258             connect_raw(
1259                 self.as_ptr() as *mut _,
1260                 b"notify::comments\0".as_ptr() as *const _,
1261                 Some(transmute(notify_comments_trampoline::<Self, F> as usize)),
1262                 Box_::into_raw(f),
1263             )
1264         }
1265     }
1266 
connect_property_copyright_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId1267     fn connect_property_copyright_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1268         unsafe extern "C" fn notify_copyright_trampoline<P, F: Fn(&P) + 'static>(
1269             this: *mut gtk_sys::GtkAboutDialog,
1270             _param_spec: glib_sys::gpointer,
1271             f: glib_sys::gpointer,
1272         ) where
1273             P: IsA<AboutDialog>,
1274         {
1275             let f: &F = &*(f as *const F);
1276             f(&AboutDialog::from_glib_borrow(this).unsafe_cast())
1277         }
1278         unsafe {
1279             let f: Box_<F> = Box_::new(f);
1280             connect_raw(
1281                 self.as_ptr() as *mut _,
1282                 b"notify::copyright\0".as_ptr() as *const _,
1283                 Some(transmute(notify_copyright_trampoline::<Self, F> as usize)),
1284                 Box_::into_raw(f),
1285             )
1286         }
1287     }
1288 
connect_property_documenters_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId1289     fn connect_property_documenters_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1290         unsafe extern "C" fn notify_documenters_trampoline<P, F: Fn(&P) + 'static>(
1291             this: *mut gtk_sys::GtkAboutDialog,
1292             _param_spec: glib_sys::gpointer,
1293             f: glib_sys::gpointer,
1294         ) where
1295             P: IsA<AboutDialog>,
1296         {
1297             let f: &F = &*(f as *const F);
1298             f(&AboutDialog::from_glib_borrow(this).unsafe_cast())
1299         }
1300         unsafe {
1301             let f: Box_<F> = Box_::new(f);
1302             connect_raw(
1303                 self.as_ptr() as *mut _,
1304                 b"notify::documenters\0".as_ptr() as *const _,
1305                 Some(transmute(notify_documenters_trampoline::<Self, F> as usize)),
1306                 Box_::into_raw(f),
1307             )
1308         }
1309     }
1310 
connect_property_license_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId1311     fn connect_property_license_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1312         unsafe extern "C" fn notify_license_trampoline<P, F: Fn(&P) + 'static>(
1313             this: *mut gtk_sys::GtkAboutDialog,
1314             _param_spec: glib_sys::gpointer,
1315             f: glib_sys::gpointer,
1316         ) where
1317             P: IsA<AboutDialog>,
1318         {
1319             let f: &F = &*(f as *const F);
1320             f(&AboutDialog::from_glib_borrow(this).unsafe_cast())
1321         }
1322         unsafe {
1323             let f: Box_<F> = Box_::new(f);
1324             connect_raw(
1325                 self.as_ptr() as *mut _,
1326                 b"notify::license\0".as_ptr() as *const _,
1327                 Some(transmute(notify_license_trampoline::<Self, F> as usize)),
1328                 Box_::into_raw(f),
1329             )
1330         }
1331     }
1332 
connect_property_license_type_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId1333     fn connect_property_license_type_notify<F: Fn(&Self) + 'static>(
1334         &self,
1335         f: F,
1336     ) -> SignalHandlerId {
1337         unsafe extern "C" fn notify_license_type_trampoline<P, F: Fn(&P) + 'static>(
1338             this: *mut gtk_sys::GtkAboutDialog,
1339             _param_spec: glib_sys::gpointer,
1340             f: glib_sys::gpointer,
1341         ) where
1342             P: IsA<AboutDialog>,
1343         {
1344             let f: &F = &*(f as *const F);
1345             f(&AboutDialog::from_glib_borrow(this).unsafe_cast())
1346         }
1347         unsafe {
1348             let f: Box_<F> = Box_::new(f);
1349             connect_raw(
1350                 self.as_ptr() as *mut _,
1351                 b"notify::license-type\0".as_ptr() as *const _,
1352                 Some(transmute(
1353                     notify_license_type_trampoline::<Self, F> as usize,
1354                 )),
1355                 Box_::into_raw(f),
1356             )
1357         }
1358     }
1359 
connect_property_logo_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId1360     fn connect_property_logo_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1361         unsafe extern "C" fn notify_logo_trampoline<P, F: Fn(&P) + 'static>(
1362             this: *mut gtk_sys::GtkAboutDialog,
1363             _param_spec: glib_sys::gpointer,
1364             f: glib_sys::gpointer,
1365         ) where
1366             P: IsA<AboutDialog>,
1367         {
1368             let f: &F = &*(f as *const F);
1369             f(&AboutDialog::from_glib_borrow(this).unsafe_cast())
1370         }
1371         unsafe {
1372             let f: Box_<F> = Box_::new(f);
1373             connect_raw(
1374                 self.as_ptr() as *mut _,
1375                 b"notify::logo\0".as_ptr() as *const _,
1376                 Some(transmute(notify_logo_trampoline::<Self, F> as usize)),
1377                 Box_::into_raw(f),
1378             )
1379         }
1380     }
1381 
connect_property_logo_icon_name_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId1382     fn connect_property_logo_icon_name_notify<F: Fn(&Self) + 'static>(
1383         &self,
1384         f: F,
1385     ) -> SignalHandlerId {
1386         unsafe extern "C" fn notify_logo_icon_name_trampoline<P, F: Fn(&P) + 'static>(
1387             this: *mut gtk_sys::GtkAboutDialog,
1388             _param_spec: glib_sys::gpointer,
1389             f: glib_sys::gpointer,
1390         ) where
1391             P: IsA<AboutDialog>,
1392         {
1393             let f: &F = &*(f as *const F);
1394             f(&AboutDialog::from_glib_borrow(this).unsafe_cast())
1395         }
1396         unsafe {
1397             let f: Box_<F> = Box_::new(f);
1398             connect_raw(
1399                 self.as_ptr() as *mut _,
1400                 b"notify::logo-icon-name\0".as_ptr() as *const _,
1401                 Some(transmute(
1402                     notify_logo_icon_name_trampoline::<Self, F> as usize,
1403                 )),
1404                 Box_::into_raw(f),
1405             )
1406         }
1407     }
1408 
connect_property_program_name_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId1409     fn connect_property_program_name_notify<F: Fn(&Self) + 'static>(
1410         &self,
1411         f: F,
1412     ) -> SignalHandlerId {
1413         unsafe extern "C" fn notify_program_name_trampoline<P, F: Fn(&P) + 'static>(
1414             this: *mut gtk_sys::GtkAboutDialog,
1415             _param_spec: glib_sys::gpointer,
1416             f: glib_sys::gpointer,
1417         ) where
1418             P: IsA<AboutDialog>,
1419         {
1420             let f: &F = &*(f as *const F);
1421             f(&AboutDialog::from_glib_borrow(this).unsafe_cast())
1422         }
1423         unsafe {
1424             let f: Box_<F> = Box_::new(f);
1425             connect_raw(
1426                 self.as_ptr() as *mut _,
1427                 b"notify::program-name\0".as_ptr() as *const _,
1428                 Some(transmute(
1429                     notify_program_name_trampoline::<Self, F> as usize,
1430                 )),
1431                 Box_::into_raw(f),
1432             )
1433         }
1434     }
1435 
connect_property_translator_credits_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId1436     fn connect_property_translator_credits_notify<F: Fn(&Self) + 'static>(
1437         &self,
1438         f: F,
1439     ) -> SignalHandlerId {
1440         unsafe extern "C" fn notify_translator_credits_trampoline<P, F: Fn(&P) + 'static>(
1441             this: *mut gtk_sys::GtkAboutDialog,
1442             _param_spec: glib_sys::gpointer,
1443             f: glib_sys::gpointer,
1444         ) where
1445             P: IsA<AboutDialog>,
1446         {
1447             let f: &F = &*(f as *const F);
1448             f(&AboutDialog::from_glib_borrow(this).unsafe_cast())
1449         }
1450         unsafe {
1451             let f: Box_<F> = Box_::new(f);
1452             connect_raw(
1453                 self.as_ptr() as *mut _,
1454                 b"notify::translator-credits\0".as_ptr() as *const _,
1455                 Some(transmute(
1456                     notify_translator_credits_trampoline::<Self, F> as usize,
1457                 )),
1458                 Box_::into_raw(f),
1459             )
1460         }
1461     }
1462 
connect_property_version_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId1463     fn connect_property_version_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1464         unsafe extern "C" fn notify_version_trampoline<P, F: Fn(&P) + 'static>(
1465             this: *mut gtk_sys::GtkAboutDialog,
1466             _param_spec: glib_sys::gpointer,
1467             f: glib_sys::gpointer,
1468         ) where
1469             P: IsA<AboutDialog>,
1470         {
1471             let f: &F = &*(f as *const F);
1472             f(&AboutDialog::from_glib_borrow(this).unsafe_cast())
1473         }
1474         unsafe {
1475             let f: Box_<F> = Box_::new(f);
1476             connect_raw(
1477                 self.as_ptr() as *mut _,
1478                 b"notify::version\0".as_ptr() as *const _,
1479                 Some(transmute(notify_version_trampoline::<Self, F> as usize)),
1480                 Box_::into_raw(f),
1481             )
1482         }
1483     }
1484 
connect_property_website_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId1485     fn connect_property_website_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1486         unsafe extern "C" fn notify_website_trampoline<P, F: Fn(&P) + 'static>(
1487             this: *mut gtk_sys::GtkAboutDialog,
1488             _param_spec: glib_sys::gpointer,
1489             f: glib_sys::gpointer,
1490         ) where
1491             P: IsA<AboutDialog>,
1492         {
1493             let f: &F = &*(f as *const F);
1494             f(&AboutDialog::from_glib_borrow(this).unsafe_cast())
1495         }
1496         unsafe {
1497             let f: Box_<F> = Box_::new(f);
1498             connect_raw(
1499                 self.as_ptr() as *mut _,
1500                 b"notify::website\0".as_ptr() as *const _,
1501                 Some(transmute(notify_website_trampoline::<Self, F> as usize)),
1502                 Box_::into_raw(f),
1503             )
1504         }
1505     }
1506 
connect_property_website_label_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId1507     fn connect_property_website_label_notify<F: Fn(&Self) + 'static>(
1508         &self,
1509         f: F,
1510     ) -> SignalHandlerId {
1511         unsafe extern "C" fn notify_website_label_trampoline<P, F: Fn(&P) + 'static>(
1512             this: *mut gtk_sys::GtkAboutDialog,
1513             _param_spec: glib_sys::gpointer,
1514             f: glib_sys::gpointer,
1515         ) where
1516             P: IsA<AboutDialog>,
1517         {
1518             let f: &F = &*(f as *const F);
1519             f(&AboutDialog::from_glib_borrow(this).unsafe_cast())
1520         }
1521         unsafe {
1522             let f: Box_<F> = Box_::new(f);
1523             connect_raw(
1524                 self.as_ptr() as *mut _,
1525                 b"notify::website-label\0".as_ptr() as *const _,
1526                 Some(transmute(
1527                     notify_website_label_trampoline::<Self, F> as usize,
1528                 )),
1529                 Box_::into_raw(f),
1530             )
1531         }
1532     }
1533 
connect_property_wrap_license_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId1534     fn connect_property_wrap_license_notify<F: Fn(&Self) + 'static>(
1535         &self,
1536         f: F,
1537     ) -> SignalHandlerId {
1538         unsafe extern "C" fn notify_wrap_license_trampoline<P, F: Fn(&P) + 'static>(
1539             this: *mut gtk_sys::GtkAboutDialog,
1540             _param_spec: glib_sys::gpointer,
1541             f: glib_sys::gpointer,
1542         ) where
1543             P: IsA<AboutDialog>,
1544         {
1545             let f: &F = &*(f as *const F);
1546             f(&AboutDialog::from_glib_borrow(this).unsafe_cast())
1547         }
1548         unsafe {
1549             let f: Box_<F> = Box_::new(f);
1550             connect_raw(
1551                 self.as_ptr() as *mut _,
1552                 b"notify::wrap-license\0".as_ptr() as *const _,
1553                 Some(transmute(
1554                     notify_wrap_license_trampoline::<Self, F> as usize,
1555                 )),
1556                 Box_::into_raw(f),
1557             )
1558         }
1559     }
1560 }
1561 
1562 impl fmt::Display for AboutDialog {
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result1563     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1564         write!(f, "AboutDialog")
1565     }
1566 }
1567