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 crate::Align;
6 use crate::Buildable;
7 use crate::Container;
8 use crate::ResizeMode;
9 use crate::StackTransitionType;
10 use crate::Widget;
11 use glib::object::Cast;
12 use glib::object::IsA;
13 use glib::signal::connect_raw;
14 use glib::signal::SignalHandlerId;
15 use glib::translate::*;
16 use glib::StaticType;
17 use glib::ToValue;
18 use std::boxed::Box as Box_;
19 use std::fmt;
20 use std::mem::transmute;
21 
22 glib::wrapper! {
23     #[doc(alias = "GtkStack")]
24     pub struct Stack(Object<ffi::GtkStack, ffi::GtkStackClass>) @extends Container, Widget, @implements Buildable;
25 
26     match fn {
27         type_ => || ffi::gtk_stack_get_type(),
28     }
29 }
30 
31 impl Stack {
32     #[doc(alias = "gtk_stack_new")]
new() -> Stack33     pub fn new() -> Stack {
34         assert_initialized_main_thread!();
35         unsafe { Widget::from_glib_none(ffi::gtk_stack_new()).unsafe_cast() }
36     }
37 
38     // rustdoc-stripper-ignore-next
39     /// Creates a new builder-pattern struct instance to construct [`Stack`] objects.
40     ///
41     /// This method returns an instance of [`StackBuilder`] which can be used to create [`Stack`] objects.
builder() -> StackBuilder42     pub fn builder() -> StackBuilder {
43         StackBuilder::default()
44     }
45 }
46 
47 impl Default for Stack {
default() -> Self48     fn default() -> Self {
49         Self::new()
50     }
51 }
52 
53 #[derive(Clone, Default)]
54 // rustdoc-stripper-ignore-next
55 /// A [builder-pattern] type to construct [`Stack`] objects.
56 ///
57 /// [builder-pattern]: https://doc.rust-lang.org/1.0.0/style/ownership/builders.html
58 pub struct StackBuilder {
59     hhomogeneous: Option<bool>,
60     homogeneous: Option<bool>,
61     interpolate_size: Option<bool>,
62     transition_duration: Option<u32>,
63     transition_type: Option<StackTransitionType>,
64     vhomogeneous: Option<bool>,
65     visible_child: Option<Widget>,
66     visible_child_name: Option<String>,
67     border_width: Option<u32>,
68     child: Option<Widget>,
69     resize_mode: Option<ResizeMode>,
70     app_paintable: Option<bool>,
71     can_default: Option<bool>,
72     can_focus: Option<bool>,
73     events: Option<gdk::EventMask>,
74     expand: Option<bool>,
75     #[cfg(any(feature = "v3_20", feature = "dox"))]
76     #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))]
77     focus_on_click: Option<bool>,
78     halign: Option<Align>,
79     has_default: Option<bool>,
80     has_focus: Option<bool>,
81     has_tooltip: Option<bool>,
82     height_request: Option<i32>,
83     hexpand: Option<bool>,
84     hexpand_set: Option<bool>,
85     is_focus: Option<bool>,
86     margin: Option<i32>,
87     margin_bottom: Option<i32>,
88     margin_end: Option<i32>,
89     margin_start: Option<i32>,
90     margin_top: Option<i32>,
91     name: Option<String>,
92     no_show_all: Option<bool>,
93     opacity: Option<f64>,
94     parent: Option<Container>,
95     receives_default: Option<bool>,
96     sensitive: Option<bool>,
97     tooltip_markup: Option<String>,
98     tooltip_text: Option<String>,
99     valign: Option<Align>,
100     vexpand: Option<bool>,
101     vexpand_set: Option<bool>,
102     visible: Option<bool>,
103     width_request: Option<i32>,
104 }
105 
106 impl StackBuilder {
107     // rustdoc-stripper-ignore-next
108     /// Create a new [`StackBuilder`].
new() -> Self109     pub fn new() -> Self {
110         Self::default()
111     }
112 
113     // rustdoc-stripper-ignore-next
114     /// Build the [`Stack`].
build(self) -> Stack115     pub fn build(self) -> Stack {
116         let mut properties: Vec<(&str, &dyn ToValue)> = vec![];
117         if let Some(ref hhomogeneous) = self.hhomogeneous {
118             properties.push(("hhomogeneous", hhomogeneous));
119         }
120         if let Some(ref homogeneous) = self.homogeneous {
121             properties.push(("homogeneous", homogeneous));
122         }
123         if let Some(ref interpolate_size) = self.interpolate_size {
124             properties.push(("interpolate-size", interpolate_size));
125         }
126         if let Some(ref transition_duration) = self.transition_duration {
127             properties.push(("transition-duration", transition_duration));
128         }
129         if let Some(ref transition_type) = self.transition_type {
130             properties.push(("transition-type", transition_type));
131         }
132         if let Some(ref vhomogeneous) = self.vhomogeneous {
133             properties.push(("vhomogeneous", vhomogeneous));
134         }
135         if let Some(ref visible_child) = self.visible_child {
136             properties.push(("visible-child", visible_child));
137         }
138         if let Some(ref visible_child_name) = self.visible_child_name {
139             properties.push(("visible-child-name", visible_child_name));
140         }
141         if let Some(ref border_width) = self.border_width {
142             properties.push(("border-width", border_width));
143         }
144         if let Some(ref child) = self.child {
145             properties.push(("child", child));
146         }
147         if let Some(ref resize_mode) = self.resize_mode {
148             properties.push(("resize-mode", resize_mode));
149         }
150         if let Some(ref app_paintable) = self.app_paintable {
151             properties.push(("app-paintable", app_paintable));
152         }
153         if let Some(ref can_default) = self.can_default {
154             properties.push(("can-default", can_default));
155         }
156         if let Some(ref can_focus) = self.can_focus {
157             properties.push(("can-focus", can_focus));
158         }
159         if let Some(ref events) = self.events {
160             properties.push(("events", events));
161         }
162         if let Some(ref expand) = self.expand {
163             properties.push(("expand", expand));
164         }
165         #[cfg(any(feature = "v3_20", feature = "dox"))]
166         if let Some(ref focus_on_click) = self.focus_on_click {
167             properties.push(("focus-on-click", focus_on_click));
168         }
169         if let Some(ref halign) = self.halign {
170             properties.push(("halign", halign));
171         }
172         if let Some(ref has_default) = self.has_default {
173             properties.push(("has-default", has_default));
174         }
175         if let Some(ref has_focus) = self.has_focus {
176             properties.push(("has-focus", has_focus));
177         }
178         if let Some(ref has_tooltip) = self.has_tooltip {
179             properties.push(("has-tooltip", has_tooltip));
180         }
181         if let Some(ref height_request) = self.height_request {
182             properties.push(("height-request", height_request));
183         }
184         if let Some(ref hexpand) = self.hexpand {
185             properties.push(("hexpand", hexpand));
186         }
187         if let Some(ref hexpand_set) = self.hexpand_set {
188             properties.push(("hexpand-set", hexpand_set));
189         }
190         if let Some(ref is_focus) = self.is_focus {
191             properties.push(("is-focus", is_focus));
192         }
193         if let Some(ref margin) = self.margin {
194             properties.push(("margin", margin));
195         }
196         if let Some(ref margin_bottom) = self.margin_bottom {
197             properties.push(("margin-bottom", margin_bottom));
198         }
199         if let Some(ref margin_end) = self.margin_end {
200             properties.push(("margin-end", margin_end));
201         }
202         if let Some(ref margin_start) = self.margin_start {
203             properties.push(("margin-start", margin_start));
204         }
205         if let Some(ref margin_top) = self.margin_top {
206             properties.push(("margin-top", margin_top));
207         }
208         if let Some(ref name) = self.name {
209             properties.push(("name", name));
210         }
211         if let Some(ref no_show_all) = self.no_show_all {
212             properties.push(("no-show-all", no_show_all));
213         }
214         if let Some(ref opacity) = self.opacity {
215             properties.push(("opacity", opacity));
216         }
217         if let Some(ref parent) = self.parent {
218             properties.push(("parent", parent));
219         }
220         if let Some(ref receives_default) = self.receives_default {
221             properties.push(("receives-default", receives_default));
222         }
223         if let Some(ref sensitive) = self.sensitive {
224             properties.push(("sensitive", sensitive));
225         }
226         if let Some(ref tooltip_markup) = self.tooltip_markup {
227             properties.push(("tooltip-markup", tooltip_markup));
228         }
229         if let Some(ref tooltip_text) = self.tooltip_text {
230             properties.push(("tooltip-text", tooltip_text));
231         }
232         if let Some(ref valign) = self.valign {
233             properties.push(("valign", valign));
234         }
235         if let Some(ref vexpand) = self.vexpand {
236             properties.push(("vexpand", vexpand));
237         }
238         if let Some(ref vexpand_set) = self.vexpand_set {
239             properties.push(("vexpand-set", vexpand_set));
240         }
241         if let Some(ref visible) = self.visible {
242             properties.push(("visible", visible));
243         }
244         if let Some(ref width_request) = self.width_request {
245             properties.push(("width-request", width_request));
246         }
247         glib::Object::new::<Stack>(&properties).expect("Failed to create an instance of Stack")
248     }
249 
hhomogeneous(mut self, hhomogeneous: bool) -> Self250     pub fn hhomogeneous(mut self, hhomogeneous: bool) -> Self {
251         self.hhomogeneous = Some(hhomogeneous);
252         self
253     }
254 
homogeneous(mut self, homogeneous: bool) -> Self255     pub fn homogeneous(mut self, homogeneous: bool) -> Self {
256         self.homogeneous = Some(homogeneous);
257         self
258     }
259 
interpolate_size(mut self, interpolate_size: bool) -> Self260     pub fn interpolate_size(mut self, interpolate_size: bool) -> Self {
261         self.interpolate_size = Some(interpolate_size);
262         self
263     }
264 
transition_duration(mut self, transition_duration: u32) -> Self265     pub fn transition_duration(mut self, transition_duration: u32) -> Self {
266         self.transition_duration = Some(transition_duration);
267         self
268     }
269 
transition_type(mut self, transition_type: StackTransitionType) -> Self270     pub fn transition_type(mut self, transition_type: StackTransitionType) -> Self {
271         self.transition_type = Some(transition_type);
272         self
273     }
274 
vhomogeneous(mut self, vhomogeneous: bool) -> Self275     pub fn vhomogeneous(mut self, vhomogeneous: bool) -> Self {
276         self.vhomogeneous = Some(vhomogeneous);
277         self
278     }
279 
visible_child<P: IsA<Widget>>(mut self, visible_child: &P) -> Self280     pub fn visible_child<P: IsA<Widget>>(mut self, visible_child: &P) -> Self {
281         self.visible_child = Some(visible_child.clone().upcast());
282         self
283     }
284 
visible_child_name(mut self, visible_child_name: &str) -> Self285     pub fn visible_child_name(mut self, visible_child_name: &str) -> Self {
286         self.visible_child_name = Some(visible_child_name.to_string());
287         self
288     }
289 
border_width(mut self, border_width: u32) -> Self290     pub fn border_width(mut self, border_width: u32) -> Self {
291         self.border_width = Some(border_width);
292         self
293     }
294 
child<P: IsA<Widget>>(mut self, child: &P) -> Self295     pub fn child<P: IsA<Widget>>(mut self, child: &P) -> Self {
296         self.child = Some(child.clone().upcast());
297         self
298     }
299 
resize_mode(mut self, resize_mode: ResizeMode) -> Self300     pub fn resize_mode(mut self, resize_mode: ResizeMode) -> Self {
301         self.resize_mode = Some(resize_mode);
302         self
303     }
304 
app_paintable(mut self, app_paintable: bool) -> Self305     pub fn app_paintable(mut self, app_paintable: bool) -> Self {
306         self.app_paintable = Some(app_paintable);
307         self
308     }
309 
can_default(mut self, can_default: bool) -> Self310     pub fn can_default(mut self, can_default: bool) -> Self {
311         self.can_default = Some(can_default);
312         self
313     }
314 
can_focus(mut self, can_focus: bool) -> Self315     pub fn can_focus(mut self, can_focus: bool) -> Self {
316         self.can_focus = Some(can_focus);
317         self
318     }
319 
events(mut self, events: gdk::EventMask) -> Self320     pub fn events(mut self, events: gdk::EventMask) -> Self {
321         self.events = Some(events);
322         self
323     }
324 
expand(mut self, expand: bool) -> Self325     pub fn expand(mut self, expand: bool) -> Self {
326         self.expand = Some(expand);
327         self
328     }
329 
330     #[cfg(any(feature = "v3_20", feature = "dox"))]
331     #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))]
focus_on_click(mut self, focus_on_click: bool) -> Self332     pub fn focus_on_click(mut self, focus_on_click: bool) -> Self {
333         self.focus_on_click = Some(focus_on_click);
334         self
335     }
336 
halign(mut self, halign: Align) -> Self337     pub fn halign(mut self, halign: Align) -> Self {
338         self.halign = Some(halign);
339         self
340     }
341 
has_default(mut self, has_default: bool) -> Self342     pub fn has_default(mut self, has_default: bool) -> Self {
343         self.has_default = Some(has_default);
344         self
345     }
346 
has_focus(mut self, has_focus: bool) -> Self347     pub fn has_focus(mut self, has_focus: bool) -> Self {
348         self.has_focus = Some(has_focus);
349         self
350     }
351 
has_tooltip(mut self, has_tooltip: bool) -> Self352     pub fn has_tooltip(mut self, has_tooltip: bool) -> Self {
353         self.has_tooltip = Some(has_tooltip);
354         self
355     }
356 
height_request(mut self, height_request: i32) -> Self357     pub fn height_request(mut self, height_request: i32) -> Self {
358         self.height_request = Some(height_request);
359         self
360     }
361 
hexpand(mut self, hexpand: bool) -> Self362     pub fn hexpand(mut self, hexpand: bool) -> Self {
363         self.hexpand = Some(hexpand);
364         self
365     }
366 
hexpand_set(mut self, hexpand_set: bool) -> Self367     pub fn hexpand_set(mut self, hexpand_set: bool) -> Self {
368         self.hexpand_set = Some(hexpand_set);
369         self
370     }
371 
is_focus(mut self, is_focus: bool) -> Self372     pub fn is_focus(mut self, is_focus: bool) -> Self {
373         self.is_focus = Some(is_focus);
374         self
375     }
376 
margin(mut self, margin: i32) -> Self377     pub fn margin(mut self, margin: i32) -> Self {
378         self.margin = Some(margin);
379         self
380     }
381 
margin_bottom(mut self, margin_bottom: i32) -> Self382     pub fn margin_bottom(mut self, margin_bottom: i32) -> Self {
383         self.margin_bottom = Some(margin_bottom);
384         self
385     }
386 
margin_end(mut self, margin_end: i32) -> Self387     pub fn margin_end(mut self, margin_end: i32) -> Self {
388         self.margin_end = Some(margin_end);
389         self
390     }
391 
margin_start(mut self, margin_start: i32) -> Self392     pub fn margin_start(mut self, margin_start: i32) -> Self {
393         self.margin_start = Some(margin_start);
394         self
395     }
396 
margin_top(mut self, margin_top: i32) -> Self397     pub fn margin_top(mut self, margin_top: i32) -> Self {
398         self.margin_top = Some(margin_top);
399         self
400     }
401 
name(mut self, name: &str) -> Self402     pub fn name(mut self, name: &str) -> Self {
403         self.name = Some(name.to_string());
404         self
405     }
406 
no_show_all(mut self, no_show_all: bool) -> Self407     pub fn no_show_all(mut self, no_show_all: bool) -> Self {
408         self.no_show_all = Some(no_show_all);
409         self
410     }
411 
opacity(mut self, opacity: f64) -> Self412     pub fn opacity(mut self, opacity: f64) -> Self {
413         self.opacity = Some(opacity);
414         self
415     }
416 
parent<P: IsA<Container>>(mut self, parent: &P) -> Self417     pub fn parent<P: IsA<Container>>(mut self, parent: &P) -> Self {
418         self.parent = Some(parent.clone().upcast());
419         self
420     }
421 
receives_default(mut self, receives_default: bool) -> Self422     pub fn receives_default(mut self, receives_default: bool) -> Self {
423         self.receives_default = Some(receives_default);
424         self
425     }
426 
sensitive(mut self, sensitive: bool) -> Self427     pub fn sensitive(mut self, sensitive: bool) -> Self {
428         self.sensitive = Some(sensitive);
429         self
430     }
431 
tooltip_markup(mut self, tooltip_markup: &str) -> Self432     pub fn tooltip_markup(mut self, tooltip_markup: &str) -> Self {
433         self.tooltip_markup = Some(tooltip_markup.to_string());
434         self
435     }
436 
tooltip_text(mut self, tooltip_text: &str) -> Self437     pub fn tooltip_text(mut self, tooltip_text: &str) -> Self {
438         self.tooltip_text = Some(tooltip_text.to_string());
439         self
440     }
441 
valign(mut self, valign: Align) -> Self442     pub fn valign(mut self, valign: Align) -> Self {
443         self.valign = Some(valign);
444         self
445     }
446 
vexpand(mut self, vexpand: bool) -> Self447     pub fn vexpand(mut self, vexpand: bool) -> Self {
448         self.vexpand = Some(vexpand);
449         self
450     }
451 
vexpand_set(mut self, vexpand_set: bool) -> Self452     pub fn vexpand_set(mut self, vexpand_set: bool) -> Self {
453         self.vexpand_set = Some(vexpand_set);
454         self
455     }
456 
visible(mut self, visible: bool) -> Self457     pub fn visible(mut self, visible: bool) -> Self {
458         self.visible = Some(visible);
459         self
460     }
461 
width_request(mut self, width_request: i32) -> Self462     pub fn width_request(mut self, width_request: i32) -> Self {
463         self.width_request = Some(width_request);
464         self
465     }
466 }
467 
468 pub const NONE_STACK: Option<&Stack> = None;
469 
470 pub trait StackExt: 'static {
471     #[doc(alias = "gtk_stack_add_named")]
add_named<P: IsA<Widget>>(&self, child: &P, name: &str)472     fn add_named<P: IsA<Widget>>(&self, child: &P, name: &str);
473 
474     #[doc(alias = "gtk_stack_add_titled")]
add_titled<P: IsA<Widget>>(&self, child: &P, name: &str, title: &str)475     fn add_titled<P: IsA<Widget>>(&self, child: &P, name: &str, title: &str);
476 
477     #[doc(alias = "gtk_stack_get_child_by_name")]
478     #[doc(alias = "get_child_by_name")]
child_by_name(&self, name: &str) -> Option<Widget>479     fn child_by_name(&self, name: &str) -> Option<Widget>;
480 
481     #[doc(alias = "gtk_stack_get_hhomogeneous")]
482     #[doc(alias = "get_hhomogeneous")]
is_hhomogeneous(&self) -> bool483     fn is_hhomogeneous(&self) -> bool;
484 
485     #[doc(alias = "gtk_stack_get_homogeneous")]
486     #[doc(alias = "get_homogeneous")]
is_homogeneous(&self) -> bool487     fn is_homogeneous(&self) -> bool;
488 
489     #[doc(alias = "gtk_stack_get_interpolate_size")]
490     #[doc(alias = "get_interpolate_size")]
interpolates_size(&self) -> bool491     fn interpolates_size(&self) -> bool;
492 
493     #[doc(alias = "gtk_stack_get_transition_duration")]
494     #[doc(alias = "get_transition_duration")]
transition_duration(&self) -> u32495     fn transition_duration(&self) -> u32;
496 
497     #[doc(alias = "gtk_stack_get_transition_running")]
498     #[doc(alias = "get_transition_running")]
is_transition_running(&self) -> bool499     fn is_transition_running(&self) -> bool;
500 
501     #[doc(alias = "gtk_stack_get_transition_type")]
502     #[doc(alias = "get_transition_type")]
transition_type(&self) -> StackTransitionType503     fn transition_type(&self) -> StackTransitionType;
504 
505     #[doc(alias = "gtk_stack_get_vhomogeneous")]
506     #[doc(alias = "get_vhomogeneous")]
is_vhomogeneous(&self) -> bool507     fn is_vhomogeneous(&self) -> bool;
508 
509     #[doc(alias = "gtk_stack_get_visible_child")]
510     #[doc(alias = "get_visible_child")]
visible_child(&self) -> Option<Widget>511     fn visible_child(&self) -> Option<Widget>;
512 
513     #[doc(alias = "gtk_stack_get_visible_child_name")]
514     #[doc(alias = "get_visible_child_name")]
visible_child_name(&self) -> Option<glib::GString>515     fn visible_child_name(&self) -> Option<glib::GString>;
516 
517     #[doc(alias = "gtk_stack_set_hhomogeneous")]
set_hhomogeneous(&self, hhomogeneous: bool)518     fn set_hhomogeneous(&self, hhomogeneous: bool);
519 
520     #[doc(alias = "gtk_stack_set_homogeneous")]
set_homogeneous(&self, homogeneous: bool)521     fn set_homogeneous(&self, homogeneous: bool);
522 
523     #[doc(alias = "gtk_stack_set_interpolate_size")]
set_interpolate_size(&self, interpolate_size: bool)524     fn set_interpolate_size(&self, interpolate_size: bool);
525 
526     #[doc(alias = "gtk_stack_set_transition_duration")]
set_transition_duration(&self, duration: u32)527     fn set_transition_duration(&self, duration: u32);
528 
529     #[doc(alias = "gtk_stack_set_transition_type")]
set_transition_type(&self, transition: StackTransitionType)530     fn set_transition_type(&self, transition: StackTransitionType);
531 
532     #[doc(alias = "gtk_stack_set_vhomogeneous")]
set_vhomogeneous(&self, vhomogeneous: bool)533     fn set_vhomogeneous(&self, vhomogeneous: bool);
534 
535     #[doc(alias = "gtk_stack_set_visible_child")]
set_visible_child<P: IsA<Widget>>(&self, child: &P)536     fn set_visible_child<P: IsA<Widget>>(&self, child: &P);
537 
538     #[doc(alias = "gtk_stack_set_visible_child_full")]
set_visible_child_full(&self, name: &str, transition: StackTransitionType)539     fn set_visible_child_full(&self, name: &str, transition: StackTransitionType);
540 
541     #[doc(alias = "gtk_stack_set_visible_child_name")]
set_visible_child_name(&self, name: &str)542     fn set_visible_child_name(&self, name: &str);
543 
544     #[doc(alias = "child.icon-name")]
child_icon_name<T: IsA<Widget>>(&self, item: &T) -> Option<glib::GString>545     fn child_icon_name<T: IsA<Widget>>(&self, item: &T) -> Option<glib::GString>;
546 
547     #[doc(alias = "child.icon-name")]
set_child_icon_name<T: IsA<Widget>>(&self, item: &T, icon_name: Option<&str>)548     fn set_child_icon_name<T: IsA<Widget>>(&self, item: &T, icon_name: Option<&str>);
549 
child_name<T: IsA<Widget>>(&self, item: &T) -> Option<glib::GString>550     fn child_name<T: IsA<Widget>>(&self, item: &T) -> Option<glib::GString>;
551 
set_child_name<T: IsA<Widget>>(&self, item: &T, name: Option<&str>)552     fn set_child_name<T: IsA<Widget>>(&self, item: &T, name: Option<&str>);
553 
554     #[doc(alias = "child.needs-attention")]
child_needs_attention<T: IsA<Widget>>(&self, item: &T) -> bool555     fn child_needs_attention<T: IsA<Widget>>(&self, item: &T) -> bool;
556 
557     #[doc(alias = "child.needs-attention")]
set_child_needs_attention<T: IsA<Widget>>(&self, item: &T, needs_attention: bool)558     fn set_child_needs_attention<T: IsA<Widget>>(&self, item: &T, needs_attention: bool);
559 
child_position<T: IsA<Widget>>(&self, item: &T) -> i32560     fn child_position<T: IsA<Widget>>(&self, item: &T) -> i32;
561 
set_child_position<T: IsA<Widget>>(&self, item: &T, position: i32)562     fn set_child_position<T: IsA<Widget>>(&self, item: &T, position: i32);
563 
child_title<T: IsA<Widget>>(&self, item: &T) -> Option<glib::GString>564     fn child_title<T: IsA<Widget>>(&self, item: &T) -> Option<glib::GString>;
565 
set_child_title<T: IsA<Widget>>(&self, item: &T, title: Option<&str>)566     fn set_child_title<T: IsA<Widget>>(&self, item: &T, title: Option<&str>);
567 
568     #[doc(alias = "hhomogeneous")]
connect_hhomogeneous_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId569     fn connect_hhomogeneous_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
570 
571     #[doc(alias = "homogeneous")]
connect_homogeneous_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId572     fn connect_homogeneous_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
573 
574     #[doc(alias = "interpolate-size")]
connect_interpolate_size_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId575     fn connect_interpolate_size_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
576 
577     #[doc(alias = "transition-duration")]
connect_transition_duration_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId578     fn connect_transition_duration_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
579 
580     #[doc(alias = "transition-running")]
connect_transition_running_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId581     fn connect_transition_running_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
582 
583     #[doc(alias = "transition-type")]
connect_transition_type_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId584     fn connect_transition_type_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
585 
586     #[doc(alias = "vhomogeneous")]
connect_vhomogeneous_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId587     fn connect_vhomogeneous_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
588 
589     #[doc(alias = "visible-child")]
connect_visible_child_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId590     fn connect_visible_child_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
591 
592     #[doc(alias = "visible-child-name")]
connect_visible_child_name_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId593     fn connect_visible_child_name_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
594 }
595 
596 impl<O: IsA<Stack>> StackExt for O {
add_named<P: IsA<Widget>>(&self, child: &P, name: &str)597     fn add_named<P: IsA<Widget>>(&self, child: &P, name: &str) {
598         unsafe {
599             ffi::gtk_stack_add_named(
600                 self.as_ref().to_glib_none().0,
601                 child.as_ref().to_glib_none().0,
602                 name.to_glib_none().0,
603             );
604         }
605     }
606 
add_titled<P: IsA<Widget>>(&self, child: &P, name: &str, title: &str)607     fn add_titled<P: IsA<Widget>>(&self, child: &P, name: &str, title: &str) {
608         unsafe {
609             ffi::gtk_stack_add_titled(
610                 self.as_ref().to_glib_none().0,
611                 child.as_ref().to_glib_none().0,
612                 name.to_glib_none().0,
613                 title.to_glib_none().0,
614             );
615         }
616     }
617 
child_by_name(&self, name: &str) -> Option<Widget>618     fn child_by_name(&self, name: &str) -> Option<Widget> {
619         unsafe {
620             from_glib_none(ffi::gtk_stack_get_child_by_name(
621                 self.as_ref().to_glib_none().0,
622                 name.to_glib_none().0,
623             ))
624         }
625     }
626 
is_hhomogeneous(&self) -> bool627     fn is_hhomogeneous(&self) -> bool {
628         unsafe {
629             from_glib(ffi::gtk_stack_get_hhomogeneous(
630                 self.as_ref().to_glib_none().0,
631             ))
632         }
633     }
634 
is_homogeneous(&self) -> bool635     fn is_homogeneous(&self) -> bool {
636         unsafe {
637             from_glib(ffi::gtk_stack_get_homogeneous(
638                 self.as_ref().to_glib_none().0,
639             ))
640         }
641     }
642 
interpolates_size(&self) -> bool643     fn interpolates_size(&self) -> bool {
644         unsafe {
645             from_glib(ffi::gtk_stack_get_interpolate_size(
646                 self.as_ref().to_glib_none().0,
647             ))
648         }
649     }
650 
transition_duration(&self) -> u32651     fn transition_duration(&self) -> u32 {
652         unsafe { ffi::gtk_stack_get_transition_duration(self.as_ref().to_glib_none().0) }
653     }
654 
is_transition_running(&self) -> bool655     fn is_transition_running(&self) -> bool {
656         unsafe {
657             from_glib(ffi::gtk_stack_get_transition_running(
658                 self.as_ref().to_glib_none().0,
659             ))
660         }
661     }
662 
transition_type(&self) -> StackTransitionType663     fn transition_type(&self) -> StackTransitionType {
664         unsafe {
665             from_glib(ffi::gtk_stack_get_transition_type(
666                 self.as_ref().to_glib_none().0,
667             ))
668         }
669     }
670 
is_vhomogeneous(&self) -> bool671     fn is_vhomogeneous(&self) -> bool {
672         unsafe {
673             from_glib(ffi::gtk_stack_get_vhomogeneous(
674                 self.as_ref().to_glib_none().0,
675             ))
676         }
677     }
678 
visible_child(&self) -> Option<Widget>679     fn visible_child(&self) -> Option<Widget> {
680         unsafe {
681             from_glib_none(ffi::gtk_stack_get_visible_child(
682                 self.as_ref().to_glib_none().0,
683             ))
684         }
685     }
686 
visible_child_name(&self) -> Option<glib::GString>687     fn visible_child_name(&self) -> Option<glib::GString> {
688         unsafe {
689             from_glib_none(ffi::gtk_stack_get_visible_child_name(
690                 self.as_ref().to_glib_none().0,
691             ))
692         }
693     }
694 
set_hhomogeneous(&self, hhomogeneous: bool)695     fn set_hhomogeneous(&self, hhomogeneous: bool) {
696         unsafe {
697             ffi::gtk_stack_set_hhomogeneous(
698                 self.as_ref().to_glib_none().0,
699                 hhomogeneous.into_glib(),
700             );
701         }
702     }
703 
set_homogeneous(&self, homogeneous: bool)704     fn set_homogeneous(&self, homogeneous: bool) {
705         unsafe {
706             ffi::gtk_stack_set_homogeneous(self.as_ref().to_glib_none().0, homogeneous.into_glib());
707         }
708     }
709 
set_interpolate_size(&self, interpolate_size: bool)710     fn set_interpolate_size(&self, interpolate_size: bool) {
711         unsafe {
712             ffi::gtk_stack_set_interpolate_size(
713                 self.as_ref().to_glib_none().0,
714                 interpolate_size.into_glib(),
715             );
716         }
717     }
718 
set_transition_duration(&self, duration: u32)719     fn set_transition_duration(&self, duration: u32) {
720         unsafe {
721             ffi::gtk_stack_set_transition_duration(self.as_ref().to_glib_none().0, duration);
722         }
723     }
724 
set_transition_type(&self, transition: StackTransitionType)725     fn set_transition_type(&self, transition: StackTransitionType) {
726         unsafe {
727             ffi::gtk_stack_set_transition_type(
728                 self.as_ref().to_glib_none().0,
729                 transition.into_glib(),
730             );
731         }
732     }
733 
set_vhomogeneous(&self, vhomogeneous: bool)734     fn set_vhomogeneous(&self, vhomogeneous: bool) {
735         unsafe {
736             ffi::gtk_stack_set_vhomogeneous(
737                 self.as_ref().to_glib_none().0,
738                 vhomogeneous.into_glib(),
739             );
740         }
741     }
742 
set_visible_child<P: IsA<Widget>>(&self, child: &P)743     fn set_visible_child<P: IsA<Widget>>(&self, child: &P) {
744         unsafe {
745             ffi::gtk_stack_set_visible_child(
746                 self.as_ref().to_glib_none().0,
747                 child.as_ref().to_glib_none().0,
748             );
749         }
750     }
751 
set_visible_child_full(&self, name: &str, transition: StackTransitionType)752     fn set_visible_child_full(&self, name: &str, transition: StackTransitionType) {
753         unsafe {
754             ffi::gtk_stack_set_visible_child_full(
755                 self.as_ref().to_glib_none().0,
756                 name.to_glib_none().0,
757                 transition.into_glib(),
758             );
759         }
760     }
761 
set_visible_child_name(&self, name: &str)762     fn set_visible_child_name(&self, name: &str) {
763         unsafe {
764             ffi::gtk_stack_set_visible_child_name(
765                 self.as_ref().to_glib_none().0,
766                 name.to_glib_none().0,
767             );
768         }
769     }
770 
child_icon_name<T: IsA<Widget>>(&self, item: &T) -> Option<glib::GString>771     fn child_icon_name<T: IsA<Widget>>(&self, item: &T) -> Option<glib::GString> {
772         unsafe {
773             let mut value = glib::Value::from_type(<glib::GString as StaticType>::static_type());
774             crate::ffi::gtk_container_child_get_property(
775                 self.to_glib_none().0 as *mut crate::ffi::GtkContainer,
776                 item.to_glib_none().0 as *mut _,
777                 b"icon-name\0".as_ptr() as *const _,
778                 value.to_glib_none_mut().0,
779             );
780             value
781                 .get()
782                 .expect("Return Value for property `icon-name` getter")
783         }
784     }
785 
set_child_icon_name<T: IsA<Widget>>(&self, item: &T, icon_name: Option<&str>)786     fn set_child_icon_name<T: IsA<Widget>>(&self, item: &T, icon_name: Option<&str>) {
787         unsafe {
788             crate::ffi::gtk_container_child_set_property(
789                 self.to_glib_none().0 as *mut crate::ffi::GtkContainer,
790                 item.to_glib_none().0 as *mut _,
791                 b"icon-name\0".as_ptr() as *const _,
792                 icon_name.to_value().to_glib_none().0,
793             );
794         }
795     }
796 
child_name<T: IsA<Widget>>(&self, item: &T) -> Option<glib::GString>797     fn child_name<T: IsA<Widget>>(&self, item: &T) -> Option<glib::GString> {
798         unsafe {
799             let mut value = glib::Value::from_type(<glib::GString as StaticType>::static_type());
800             crate::ffi::gtk_container_child_get_property(
801                 self.to_glib_none().0 as *mut crate::ffi::GtkContainer,
802                 item.to_glib_none().0 as *mut _,
803                 b"name\0".as_ptr() as *const _,
804                 value.to_glib_none_mut().0,
805             );
806             value
807                 .get()
808                 .expect("Return Value for property `name` getter")
809         }
810     }
811 
set_child_name<T: IsA<Widget>>(&self, item: &T, name: Option<&str>)812     fn set_child_name<T: IsA<Widget>>(&self, item: &T, name: Option<&str>) {
813         unsafe {
814             crate::ffi::gtk_container_child_set_property(
815                 self.to_glib_none().0 as *mut crate::ffi::GtkContainer,
816                 item.to_glib_none().0 as *mut _,
817                 b"name\0".as_ptr() as *const _,
818                 name.to_value().to_glib_none().0,
819             );
820         }
821     }
822 
child_needs_attention<T: IsA<Widget>>(&self, item: &T) -> bool823     fn child_needs_attention<T: IsA<Widget>>(&self, item: &T) -> bool {
824         unsafe {
825             let mut value = glib::Value::from_type(<bool as StaticType>::static_type());
826             crate::ffi::gtk_container_child_get_property(
827                 self.to_glib_none().0 as *mut crate::ffi::GtkContainer,
828                 item.to_glib_none().0 as *mut _,
829                 b"needs-attention\0".as_ptr() as *const _,
830                 value.to_glib_none_mut().0,
831             );
832             value
833                 .get()
834                 .expect("Return Value for property `needs-attention` getter")
835         }
836     }
837 
set_child_needs_attention<T: IsA<Widget>>(&self, item: &T, needs_attention: bool)838     fn set_child_needs_attention<T: IsA<Widget>>(&self, item: &T, needs_attention: bool) {
839         unsafe {
840             crate::ffi::gtk_container_child_set_property(
841                 self.to_glib_none().0 as *mut crate::ffi::GtkContainer,
842                 item.to_glib_none().0 as *mut _,
843                 b"needs-attention\0".as_ptr() as *const _,
844                 needs_attention.to_value().to_glib_none().0,
845             );
846         }
847     }
848 
child_position<T: IsA<Widget>>(&self, item: &T) -> i32849     fn child_position<T: IsA<Widget>>(&self, item: &T) -> i32 {
850         unsafe {
851             let mut value = glib::Value::from_type(<i32 as StaticType>::static_type());
852             crate::ffi::gtk_container_child_get_property(
853                 self.to_glib_none().0 as *mut crate::ffi::GtkContainer,
854                 item.to_glib_none().0 as *mut _,
855                 b"position\0".as_ptr() as *const _,
856                 value.to_glib_none_mut().0,
857             );
858             value
859                 .get()
860                 .expect("Return Value for property `position` getter")
861         }
862     }
863 
set_child_position<T: IsA<Widget>>(&self, item: &T, position: i32)864     fn set_child_position<T: IsA<Widget>>(&self, item: &T, position: i32) {
865         unsafe {
866             crate::ffi::gtk_container_child_set_property(
867                 self.to_glib_none().0 as *mut crate::ffi::GtkContainer,
868                 item.to_glib_none().0 as *mut _,
869                 b"position\0".as_ptr() as *const _,
870                 position.to_value().to_glib_none().0,
871             );
872         }
873     }
874 
child_title<T: IsA<Widget>>(&self, item: &T) -> Option<glib::GString>875     fn child_title<T: IsA<Widget>>(&self, item: &T) -> Option<glib::GString> {
876         unsafe {
877             let mut value = glib::Value::from_type(<glib::GString as StaticType>::static_type());
878             crate::ffi::gtk_container_child_get_property(
879                 self.to_glib_none().0 as *mut crate::ffi::GtkContainer,
880                 item.to_glib_none().0 as *mut _,
881                 b"title\0".as_ptr() as *const _,
882                 value.to_glib_none_mut().0,
883             );
884             value
885                 .get()
886                 .expect("Return Value for property `title` getter")
887         }
888     }
889 
set_child_title<T: IsA<Widget>>(&self, item: &T, title: Option<&str>)890     fn set_child_title<T: IsA<Widget>>(&self, item: &T, title: Option<&str>) {
891         unsafe {
892             crate::ffi::gtk_container_child_set_property(
893                 self.to_glib_none().0 as *mut crate::ffi::GtkContainer,
894                 item.to_glib_none().0 as *mut _,
895                 b"title\0".as_ptr() as *const _,
896                 title.to_value().to_glib_none().0,
897             );
898         }
899     }
900 
connect_hhomogeneous_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId901     fn connect_hhomogeneous_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
902         unsafe extern "C" fn notify_hhomogeneous_trampoline<P: IsA<Stack>, F: Fn(&P) + 'static>(
903             this: *mut ffi::GtkStack,
904             _param_spec: glib::ffi::gpointer,
905             f: glib::ffi::gpointer,
906         ) {
907             let f: &F = &*(f as *const F);
908             f(Stack::from_glib_borrow(this).unsafe_cast_ref())
909         }
910         unsafe {
911             let f: Box_<F> = Box_::new(f);
912             connect_raw(
913                 self.as_ptr() as *mut _,
914                 b"notify::hhomogeneous\0".as_ptr() as *const _,
915                 Some(transmute::<_, unsafe extern "C" fn()>(
916                     notify_hhomogeneous_trampoline::<Self, F> as *const (),
917                 )),
918                 Box_::into_raw(f),
919             )
920         }
921     }
922 
connect_homogeneous_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId923     fn connect_homogeneous_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
924         unsafe extern "C" fn notify_homogeneous_trampoline<P: IsA<Stack>, F: Fn(&P) + 'static>(
925             this: *mut ffi::GtkStack,
926             _param_spec: glib::ffi::gpointer,
927             f: glib::ffi::gpointer,
928         ) {
929             let f: &F = &*(f as *const F);
930             f(Stack::from_glib_borrow(this).unsafe_cast_ref())
931         }
932         unsafe {
933             let f: Box_<F> = Box_::new(f);
934             connect_raw(
935                 self.as_ptr() as *mut _,
936                 b"notify::homogeneous\0".as_ptr() as *const _,
937                 Some(transmute::<_, unsafe extern "C" fn()>(
938                     notify_homogeneous_trampoline::<Self, F> as *const (),
939                 )),
940                 Box_::into_raw(f),
941             )
942         }
943     }
944 
connect_interpolate_size_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId945     fn connect_interpolate_size_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
946         unsafe extern "C" fn notify_interpolate_size_trampoline<
947             P: IsA<Stack>,
948             F: Fn(&P) + 'static,
949         >(
950             this: *mut ffi::GtkStack,
951             _param_spec: glib::ffi::gpointer,
952             f: glib::ffi::gpointer,
953         ) {
954             let f: &F = &*(f as *const F);
955             f(Stack::from_glib_borrow(this).unsafe_cast_ref())
956         }
957         unsafe {
958             let f: Box_<F> = Box_::new(f);
959             connect_raw(
960                 self.as_ptr() as *mut _,
961                 b"notify::interpolate-size\0".as_ptr() as *const _,
962                 Some(transmute::<_, unsafe extern "C" fn()>(
963                     notify_interpolate_size_trampoline::<Self, F> as *const (),
964                 )),
965                 Box_::into_raw(f),
966             )
967         }
968     }
969 
connect_transition_duration_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId970     fn connect_transition_duration_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
971         unsafe extern "C" fn notify_transition_duration_trampoline<
972             P: IsA<Stack>,
973             F: Fn(&P) + 'static,
974         >(
975             this: *mut ffi::GtkStack,
976             _param_spec: glib::ffi::gpointer,
977             f: glib::ffi::gpointer,
978         ) {
979             let f: &F = &*(f as *const F);
980             f(Stack::from_glib_borrow(this).unsafe_cast_ref())
981         }
982         unsafe {
983             let f: Box_<F> = Box_::new(f);
984             connect_raw(
985                 self.as_ptr() as *mut _,
986                 b"notify::transition-duration\0".as_ptr() as *const _,
987                 Some(transmute::<_, unsafe extern "C" fn()>(
988                     notify_transition_duration_trampoline::<Self, F> as *const (),
989                 )),
990                 Box_::into_raw(f),
991             )
992         }
993     }
994 
connect_transition_running_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId995     fn connect_transition_running_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
996         unsafe extern "C" fn notify_transition_running_trampoline<
997             P: IsA<Stack>,
998             F: Fn(&P) + 'static,
999         >(
1000             this: *mut ffi::GtkStack,
1001             _param_spec: glib::ffi::gpointer,
1002             f: glib::ffi::gpointer,
1003         ) {
1004             let f: &F = &*(f as *const F);
1005             f(Stack::from_glib_borrow(this).unsafe_cast_ref())
1006         }
1007         unsafe {
1008             let f: Box_<F> = Box_::new(f);
1009             connect_raw(
1010                 self.as_ptr() as *mut _,
1011                 b"notify::transition-running\0".as_ptr() as *const _,
1012                 Some(transmute::<_, unsafe extern "C" fn()>(
1013                     notify_transition_running_trampoline::<Self, F> as *const (),
1014                 )),
1015                 Box_::into_raw(f),
1016             )
1017         }
1018     }
1019 
connect_transition_type_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId1020     fn connect_transition_type_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1021         unsafe extern "C" fn notify_transition_type_trampoline<
1022             P: IsA<Stack>,
1023             F: Fn(&P) + 'static,
1024         >(
1025             this: *mut ffi::GtkStack,
1026             _param_spec: glib::ffi::gpointer,
1027             f: glib::ffi::gpointer,
1028         ) {
1029             let f: &F = &*(f as *const F);
1030             f(Stack::from_glib_borrow(this).unsafe_cast_ref())
1031         }
1032         unsafe {
1033             let f: Box_<F> = Box_::new(f);
1034             connect_raw(
1035                 self.as_ptr() as *mut _,
1036                 b"notify::transition-type\0".as_ptr() as *const _,
1037                 Some(transmute::<_, unsafe extern "C" fn()>(
1038                     notify_transition_type_trampoline::<Self, F> as *const (),
1039                 )),
1040                 Box_::into_raw(f),
1041             )
1042         }
1043     }
1044 
connect_vhomogeneous_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId1045     fn connect_vhomogeneous_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1046         unsafe extern "C" fn notify_vhomogeneous_trampoline<P: IsA<Stack>, F: Fn(&P) + 'static>(
1047             this: *mut ffi::GtkStack,
1048             _param_spec: glib::ffi::gpointer,
1049             f: glib::ffi::gpointer,
1050         ) {
1051             let f: &F = &*(f as *const F);
1052             f(Stack::from_glib_borrow(this).unsafe_cast_ref())
1053         }
1054         unsafe {
1055             let f: Box_<F> = Box_::new(f);
1056             connect_raw(
1057                 self.as_ptr() as *mut _,
1058                 b"notify::vhomogeneous\0".as_ptr() as *const _,
1059                 Some(transmute::<_, unsafe extern "C" fn()>(
1060                     notify_vhomogeneous_trampoline::<Self, F> as *const (),
1061                 )),
1062                 Box_::into_raw(f),
1063             )
1064         }
1065     }
1066 
connect_visible_child_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId1067     fn connect_visible_child_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1068         unsafe extern "C" fn notify_visible_child_trampoline<P: IsA<Stack>, F: Fn(&P) + 'static>(
1069             this: *mut ffi::GtkStack,
1070             _param_spec: glib::ffi::gpointer,
1071             f: glib::ffi::gpointer,
1072         ) {
1073             let f: &F = &*(f as *const F);
1074             f(Stack::from_glib_borrow(this).unsafe_cast_ref())
1075         }
1076         unsafe {
1077             let f: Box_<F> = Box_::new(f);
1078             connect_raw(
1079                 self.as_ptr() as *mut _,
1080                 b"notify::visible-child\0".as_ptr() as *const _,
1081                 Some(transmute::<_, unsafe extern "C" fn()>(
1082                     notify_visible_child_trampoline::<Self, F> as *const (),
1083                 )),
1084                 Box_::into_raw(f),
1085             )
1086         }
1087     }
1088 
connect_visible_child_name_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId1089     fn connect_visible_child_name_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1090         unsafe extern "C" fn notify_visible_child_name_trampoline<
1091             P: IsA<Stack>,
1092             F: Fn(&P) + 'static,
1093         >(
1094             this: *mut ffi::GtkStack,
1095             _param_spec: glib::ffi::gpointer,
1096             f: glib::ffi::gpointer,
1097         ) {
1098             let f: &F = &*(f as *const F);
1099             f(Stack::from_glib_borrow(this).unsafe_cast_ref())
1100         }
1101         unsafe {
1102             let f: Box_<F> = Box_::new(f);
1103             connect_raw(
1104                 self.as_ptr() as *mut _,
1105                 b"notify::visible-child-name\0".as_ptr() as *const _,
1106                 Some(transmute::<_, unsafe extern "C" fn()>(
1107                     notify_visible_child_name_trampoline::<Self, F> as *const (),
1108                 )),
1109                 Box_::into_raw(f),
1110             )
1111         }
1112     }
1113 }
1114 
1115 impl fmt::Display for Stack {
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result1116     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1117         f.write_str("Stack")
1118     }
1119 }
1120