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::Bin;
7 use crate::Buildable;
8 use crate::Container;
9 use crate::ResizeMode;
10 use crate::RevealerTransitionType;
11 use crate::Widget;
12 use glib::object::Cast;
13 use glib::object::IsA;
14 use glib::signal::connect_raw;
15 use glib::signal::SignalHandlerId;
16 use glib::translate::*;
17 use glib::StaticType;
18 use glib::ToValue;
19 use std::boxed::Box as Box_;
20 use std::fmt;
21 use std::mem::transmute;
22 
23 glib::wrapper! {
24     #[doc(alias = "GtkRevealer")]
25     pub struct Revealer(Object<ffi::GtkRevealer, ffi::GtkRevealerClass>) @extends Bin, Container, Widget, @implements Buildable;
26 
27     match fn {
28         type_ => || ffi::gtk_revealer_get_type(),
29     }
30 }
31 
32 impl Revealer {
33     #[doc(alias = "gtk_revealer_new")]
new() -> Revealer34     pub fn new() -> Revealer {
35         assert_initialized_main_thread!();
36         unsafe { Widget::from_glib_none(ffi::gtk_revealer_new()).unsafe_cast() }
37     }
38 
39     // rustdoc-stripper-ignore-next
40     /// Creates a new builder-pattern struct instance to construct [`Revealer`] objects.
41     ///
42     /// This method returns an instance of [`RevealerBuilder`] which can be used to create [`Revealer`] objects.
builder() -> RevealerBuilder43     pub fn builder() -> RevealerBuilder {
44         RevealerBuilder::default()
45     }
46 }
47 
48 impl Default for Revealer {
default() -> Self49     fn default() -> Self {
50         Self::new()
51     }
52 }
53 
54 #[derive(Clone, Default)]
55 // rustdoc-stripper-ignore-next
56 /// A [builder-pattern] type to construct [`Revealer`] objects.
57 ///
58 /// [builder-pattern]: https://doc.rust-lang.org/1.0.0/style/ownership/builders.html
59 pub struct RevealerBuilder {
60     reveal_child: Option<bool>,
61     transition_duration: Option<u32>,
62     transition_type: Option<RevealerTransitionType>,
63     border_width: Option<u32>,
64     child: Option<Widget>,
65     resize_mode: Option<ResizeMode>,
66     app_paintable: Option<bool>,
67     can_default: Option<bool>,
68     can_focus: Option<bool>,
69     events: Option<gdk::EventMask>,
70     expand: Option<bool>,
71     #[cfg(any(feature = "v3_20", feature = "dox"))]
72     #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))]
73     focus_on_click: Option<bool>,
74     halign: Option<Align>,
75     has_default: Option<bool>,
76     has_focus: Option<bool>,
77     has_tooltip: Option<bool>,
78     height_request: Option<i32>,
79     hexpand: Option<bool>,
80     hexpand_set: Option<bool>,
81     is_focus: Option<bool>,
82     margin: Option<i32>,
83     margin_bottom: Option<i32>,
84     margin_end: Option<i32>,
85     margin_start: Option<i32>,
86     margin_top: Option<i32>,
87     name: Option<String>,
88     no_show_all: Option<bool>,
89     opacity: Option<f64>,
90     parent: Option<Container>,
91     receives_default: Option<bool>,
92     sensitive: Option<bool>,
93     tooltip_markup: Option<String>,
94     tooltip_text: Option<String>,
95     valign: Option<Align>,
96     vexpand: Option<bool>,
97     vexpand_set: Option<bool>,
98     visible: Option<bool>,
99     width_request: Option<i32>,
100 }
101 
102 impl RevealerBuilder {
103     // rustdoc-stripper-ignore-next
104     /// Create a new [`RevealerBuilder`].
new() -> Self105     pub fn new() -> Self {
106         Self::default()
107     }
108 
109     // rustdoc-stripper-ignore-next
110     /// Build the [`Revealer`].
build(self) -> Revealer111     pub fn build(self) -> Revealer {
112         let mut properties: Vec<(&str, &dyn ToValue)> = vec![];
113         if let Some(ref reveal_child) = self.reveal_child {
114             properties.push(("reveal-child", reveal_child));
115         }
116         if let Some(ref transition_duration) = self.transition_duration {
117             properties.push(("transition-duration", transition_duration));
118         }
119         if let Some(ref transition_type) = self.transition_type {
120             properties.push(("transition-type", transition_type));
121         }
122         if let Some(ref border_width) = self.border_width {
123             properties.push(("border-width", border_width));
124         }
125         if let Some(ref child) = self.child {
126             properties.push(("child", child));
127         }
128         if let Some(ref resize_mode) = self.resize_mode {
129             properties.push(("resize-mode", resize_mode));
130         }
131         if let Some(ref app_paintable) = self.app_paintable {
132             properties.push(("app-paintable", app_paintable));
133         }
134         if let Some(ref can_default) = self.can_default {
135             properties.push(("can-default", can_default));
136         }
137         if let Some(ref can_focus) = self.can_focus {
138             properties.push(("can-focus", can_focus));
139         }
140         if let Some(ref events) = self.events {
141             properties.push(("events", events));
142         }
143         if let Some(ref expand) = self.expand {
144             properties.push(("expand", expand));
145         }
146         #[cfg(any(feature = "v3_20", feature = "dox"))]
147         if let Some(ref focus_on_click) = self.focus_on_click {
148             properties.push(("focus-on-click", focus_on_click));
149         }
150         if let Some(ref halign) = self.halign {
151             properties.push(("halign", halign));
152         }
153         if let Some(ref has_default) = self.has_default {
154             properties.push(("has-default", has_default));
155         }
156         if let Some(ref has_focus) = self.has_focus {
157             properties.push(("has-focus", has_focus));
158         }
159         if let Some(ref has_tooltip) = self.has_tooltip {
160             properties.push(("has-tooltip", has_tooltip));
161         }
162         if let Some(ref height_request) = self.height_request {
163             properties.push(("height-request", height_request));
164         }
165         if let Some(ref hexpand) = self.hexpand {
166             properties.push(("hexpand", hexpand));
167         }
168         if let Some(ref hexpand_set) = self.hexpand_set {
169             properties.push(("hexpand-set", hexpand_set));
170         }
171         if let Some(ref is_focus) = self.is_focus {
172             properties.push(("is-focus", is_focus));
173         }
174         if let Some(ref margin) = self.margin {
175             properties.push(("margin", margin));
176         }
177         if let Some(ref margin_bottom) = self.margin_bottom {
178             properties.push(("margin-bottom", margin_bottom));
179         }
180         if let Some(ref margin_end) = self.margin_end {
181             properties.push(("margin-end", margin_end));
182         }
183         if let Some(ref margin_start) = self.margin_start {
184             properties.push(("margin-start", margin_start));
185         }
186         if let Some(ref margin_top) = self.margin_top {
187             properties.push(("margin-top", margin_top));
188         }
189         if let Some(ref name) = self.name {
190             properties.push(("name", name));
191         }
192         if let Some(ref no_show_all) = self.no_show_all {
193             properties.push(("no-show-all", no_show_all));
194         }
195         if let Some(ref opacity) = self.opacity {
196             properties.push(("opacity", opacity));
197         }
198         if let Some(ref parent) = self.parent {
199             properties.push(("parent", parent));
200         }
201         if let Some(ref receives_default) = self.receives_default {
202             properties.push(("receives-default", receives_default));
203         }
204         if let Some(ref sensitive) = self.sensitive {
205             properties.push(("sensitive", sensitive));
206         }
207         if let Some(ref tooltip_markup) = self.tooltip_markup {
208             properties.push(("tooltip-markup", tooltip_markup));
209         }
210         if let Some(ref tooltip_text) = self.tooltip_text {
211             properties.push(("tooltip-text", tooltip_text));
212         }
213         if let Some(ref valign) = self.valign {
214             properties.push(("valign", valign));
215         }
216         if let Some(ref vexpand) = self.vexpand {
217             properties.push(("vexpand", vexpand));
218         }
219         if let Some(ref vexpand_set) = self.vexpand_set {
220             properties.push(("vexpand-set", vexpand_set));
221         }
222         if let Some(ref visible) = self.visible {
223             properties.push(("visible", visible));
224         }
225         if let Some(ref width_request) = self.width_request {
226             properties.push(("width-request", width_request));
227         }
228         glib::Object::new::<Revealer>(&properties)
229             .expect("Failed to create an instance of Revealer")
230     }
231 
reveal_child(mut self, reveal_child: bool) -> Self232     pub fn reveal_child(mut self, reveal_child: bool) -> Self {
233         self.reveal_child = Some(reveal_child);
234         self
235     }
236 
transition_duration(mut self, transition_duration: u32) -> Self237     pub fn transition_duration(mut self, transition_duration: u32) -> Self {
238         self.transition_duration = Some(transition_duration);
239         self
240     }
241 
transition_type(mut self, transition_type: RevealerTransitionType) -> Self242     pub fn transition_type(mut self, transition_type: RevealerTransitionType) -> Self {
243         self.transition_type = Some(transition_type);
244         self
245     }
246 
border_width(mut self, border_width: u32) -> Self247     pub fn border_width(mut self, border_width: u32) -> Self {
248         self.border_width = Some(border_width);
249         self
250     }
251 
child<P: IsA<Widget>>(mut self, child: &P) -> Self252     pub fn child<P: IsA<Widget>>(mut self, child: &P) -> Self {
253         self.child = Some(child.clone().upcast());
254         self
255     }
256 
resize_mode(mut self, resize_mode: ResizeMode) -> Self257     pub fn resize_mode(mut self, resize_mode: ResizeMode) -> Self {
258         self.resize_mode = Some(resize_mode);
259         self
260     }
261 
app_paintable(mut self, app_paintable: bool) -> Self262     pub fn app_paintable(mut self, app_paintable: bool) -> Self {
263         self.app_paintable = Some(app_paintable);
264         self
265     }
266 
can_default(mut self, can_default: bool) -> Self267     pub fn can_default(mut self, can_default: bool) -> Self {
268         self.can_default = Some(can_default);
269         self
270     }
271 
can_focus(mut self, can_focus: bool) -> Self272     pub fn can_focus(mut self, can_focus: bool) -> Self {
273         self.can_focus = Some(can_focus);
274         self
275     }
276 
events(mut self, events: gdk::EventMask) -> Self277     pub fn events(mut self, events: gdk::EventMask) -> Self {
278         self.events = Some(events);
279         self
280     }
281 
expand(mut self, expand: bool) -> Self282     pub fn expand(mut self, expand: bool) -> Self {
283         self.expand = Some(expand);
284         self
285     }
286 
287     #[cfg(any(feature = "v3_20", feature = "dox"))]
288     #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))]
focus_on_click(mut self, focus_on_click: bool) -> Self289     pub fn focus_on_click(mut self, focus_on_click: bool) -> Self {
290         self.focus_on_click = Some(focus_on_click);
291         self
292     }
293 
halign(mut self, halign: Align) -> Self294     pub fn halign(mut self, halign: Align) -> Self {
295         self.halign = Some(halign);
296         self
297     }
298 
has_default(mut self, has_default: bool) -> Self299     pub fn has_default(mut self, has_default: bool) -> Self {
300         self.has_default = Some(has_default);
301         self
302     }
303 
has_focus(mut self, has_focus: bool) -> Self304     pub fn has_focus(mut self, has_focus: bool) -> Self {
305         self.has_focus = Some(has_focus);
306         self
307     }
308 
has_tooltip(mut self, has_tooltip: bool) -> Self309     pub fn has_tooltip(mut self, has_tooltip: bool) -> Self {
310         self.has_tooltip = Some(has_tooltip);
311         self
312     }
313 
height_request(mut self, height_request: i32) -> Self314     pub fn height_request(mut self, height_request: i32) -> Self {
315         self.height_request = Some(height_request);
316         self
317     }
318 
hexpand(mut self, hexpand: bool) -> Self319     pub fn hexpand(mut self, hexpand: bool) -> Self {
320         self.hexpand = Some(hexpand);
321         self
322     }
323 
hexpand_set(mut self, hexpand_set: bool) -> Self324     pub fn hexpand_set(mut self, hexpand_set: bool) -> Self {
325         self.hexpand_set = Some(hexpand_set);
326         self
327     }
328 
is_focus(mut self, is_focus: bool) -> Self329     pub fn is_focus(mut self, is_focus: bool) -> Self {
330         self.is_focus = Some(is_focus);
331         self
332     }
333 
margin(mut self, margin: i32) -> Self334     pub fn margin(mut self, margin: i32) -> Self {
335         self.margin = Some(margin);
336         self
337     }
338 
margin_bottom(mut self, margin_bottom: i32) -> Self339     pub fn margin_bottom(mut self, margin_bottom: i32) -> Self {
340         self.margin_bottom = Some(margin_bottom);
341         self
342     }
343 
margin_end(mut self, margin_end: i32) -> Self344     pub fn margin_end(mut self, margin_end: i32) -> Self {
345         self.margin_end = Some(margin_end);
346         self
347     }
348 
margin_start(mut self, margin_start: i32) -> Self349     pub fn margin_start(mut self, margin_start: i32) -> Self {
350         self.margin_start = Some(margin_start);
351         self
352     }
353 
margin_top(mut self, margin_top: i32) -> Self354     pub fn margin_top(mut self, margin_top: i32) -> Self {
355         self.margin_top = Some(margin_top);
356         self
357     }
358 
name(mut self, name: &str) -> Self359     pub fn name(mut self, name: &str) -> Self {
360         self.name = Some(name.to_string());
361         self
362     }
363 
no_show_all(mut self, no_show_all: bool) -> Self364     pub fn no_show_all(mut self, no_show_all: bool) -> Self {
365         self.no_show_all = Some(no_show_all);
366         self
367     }
368 
opacity(mut self, opacity: f64) -> Self369     pub fn opacity(mut self, opacity: f64) -> Self {
370         self.opacity = Some(opacity);
371         self
372     }
373 
parent<P: IsA<Container>>(mut self, parent: &P) -> Self374     pub fn parent<P: IsA<Container>>(mut self, parent: &P) -> Self {
375         self.parent = Some(parent.clone().upcast());
376         self
377     }
378 
receives_default(mut self, receives_default: bool) -> Self379     pub fn receives_default(mut self, receives_default: bool) -> Self {
380         self.receives_default = Some(receives_default);
381         self
382     }
383 
sensitive(mut self, sensitive: bool) -> Self384     pub fn sensitive(mut self, sensitive: bool) -> Self {
385         self.sensitive = Some(sensitive);
386         self
387     }
388 
tooltip_markup(mut self, tooltip_markup: &str) -> Self389     pub fn tooltip_markup(mut self, tooltip_markup: &str) -> Self {
390         self.tooltip_markup = Some(tooltip_markup.to_string());
391         self
392     }
393 
tooltip_text(mut self, tooltip_text: &str) -> Self394     pub fn tooltip_text(mut self, tooltip_text: &str) -> Self {
395         self.tooltip_text = Some(tooltip_text.to_string());
396         self
397     }
398 
valign(mut self, valign: Align) -> Self399     pub fn valign(mut self, valign: Align) -> Self {
400         self.valign = Some(valign);
401         self
402     }
403 
vexpand(mut self, vexpand: bool) -> Self404     pub fn vexpand(mut self, vexpand: bool) -> Self {
405         self.vexpand = Some(vexpand);
406         self
407     }
408 
vexpand_set(mut self, vexpand_set: bool) -> Self409     pub fn vexpand_set(mut self, vexpand_set: bool) -> Self {
410         self.vexpand_set = Some(vexpand_set);
411         self
412     }
413 
visible(mut self, visible: bool) -> Self414     pub fn visible(mut self, visible: bool) -> Self {
415         self.visible = Some(visible);
416         self
417     }
418 
width_request(mut self, width_request: i32) -> Self419     pub fn width_request(mut self, width_request: i32) -> Self {
420         self.width_request = Some(width_request);
421         self
422     }
423 }
424 
425 pub const NONE_REVEALER: Option<&Revealer> = None;
426 
427 pub trait RevealerExt: 'static {
428     #[doc(alias = "gtk_revealer_get_child_revealed")]
429     #[doc(alias = "get_child_revealed")]
is_child_revealed(&self) -> bool430     fn is_child_revealed(&self) -> bool;
431 
432     #[doc(alias = "gtk_revealer_get_reveal_child")]
433     #[doc(alias = "get_reveal_child")]
reveals_child(&self) -> bool434     fn reveals_child(&self) -> bool;
435 
436     #[doc(alias = "gtk_revealer_get_transition_duration")]
437     #[doc(alias = "get_transition_duration")]
transition_duration(&self) -> u32438     fn transition_duration(&self) -> u32;
439 
440     #[doc(alias = "gtk_revealer_get_transition_type")]
441     #[doc(alias = "get_transition_type")]
transition_type(&self) -> RevealerTransitionType442     fn transition_type(&self) -> RevealerTransitionType;
443 
444     #[doc(alias = "gtk_revealer_set_reveal_child")]
set_reveal_child(&self, reveal_child: bool)445     fn set_reveal_child(&self, reveal_child: bool);
446 
447     #[doc(alias = "gtk_revealer_set_transition_duration")]
set_transition_duration(&self, duration: u32)448     fn set_transition_duration(&self, duration: u32);
449 
450     #[doc(alias = "gtk_revealer_set_transition_type")]
set_transition_type(&self, transition: RevealerTransitionType)451     fn set_transition_type(&self, transition: RevealerTransitionType);
452 
453     #[doc(alias = "child-revealed")]
connect_child_revealed_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId454     fn connect_child_revealed_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
455 
456     #[doc(alias = "reveal-child")]
connect_reveal_child_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId457     fn connect_reveal_child_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
458 
459     #[doc(alias = "transition-duration")]
connect_transition_duration_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId460     fn connect_transition_duration_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
461 
462     #[doc(alias = "transition-type")]
connect_transition_type_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId463     fn connect_transition_type_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
464 }
465 
466 impl<O: IsA<Revealer>> RevealerExt for O {
is_child_revealed(&self) -> bool467     fn is_child_revealed(&self) -> bool {
468         unsafe {
469             from_glib(ffi::gtk_revealer_get_child_revealed(
470                 self.as_ref().to_glib_none().0,
471             ))
472         }
473     }
474 
reveals_child(&self) -> bool475     fn reveals_child(&self) -> bool {
476         unsafe {
477             from_glib(ffi::gtk_revealer_get_reveal_child(
478                 self.as_ref().to_glib_none().0,
479             ))
480         }
481     }
482 
transition_duration(&self) -> u32483     fn transition_duration(&self) -> u32 {
484         unsafe { ffi::gtk_revealer_get_transition_duration(self.as_ref().to_glib_none().0) }
485     }
486 
transition_type(&self) -> RevealerTransitionType487     fn transition_type(&self) -> RevealerTransitionType {
488         unsafe {
489             from_glib(ffi::gtk_revealer_get_transition_type(
490                 self.as_ref().to_glib_none().0,
491             ))
492         }
493     }
494 
set_reveal_child(&self, reveal_child: bool)495     fn set_reveal_child(&self, reveal_child: bool) {
496         unsafe {
497             ffi::gtk_revealer_set_reveal_child(
498                 self.as_ref().to_glib_none().0,
499                 reveal_child.into_glib(),
500             );
501         }
502     }
503 
set_transition_duration(&self, duration: u32)504     fn set_transition_duration(&self, duration: u32) {
505         unsafe {
506             ffi::gtk_revealer_set_transition_duration(self.as_ref().to_glib_none().0, duration);
507         }
508     }
509 
set_transition_type(&self, transition: RevealerTransitionType)510     fn set_transition_type(&self, transition: RevealerTransitionType) {
511         unsafe {
512             ffi::gtk_revealer_set_transition_type(
513                 self.as_ref().to_glib_none().0,
514                 transition.into_glib(),
515             );
516         }
517     }
518 
connect_child_revealed_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId519     fn connect_child_revealed_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
520         unsafe extern "C" fn notify_child_revealed_trampoline<
521             P: IsA<Revealer>,
522             F: Fn(&P) + 'static,
523         >(
524             this: *mut ffi::GtkRevealer,
525             _param_spec: glib::ffi::gpointer,
526             f: glib::ffi::gpointer,
527         ) {
528             let f: &F = &*(f as *const F);
529             f(Revealer::from_glib_borrow(this).unsafe_cast_ref())
530         }
531         unsafe {
532             let f: Box_<F> = Box_::new(f);
533             connect_raw(
534                 self.as_ptr() as *mut _,
535                 b"notify::child-revealed\0".as_ptr() as *const _,
536                 Some(transmute::<_, unsafe extern "C" fn()>(
537                     notify_child_revealed_trampoline::<Self, F> as *const (),
538                 )),
539                 Box_::into_raw(f),
540             )
541         }
542     }
543 
connect_reveal_child_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId544     fn connect_reveal_child_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
545         unsafe extern "C" fn notify_reveal_child_trampoline<
546             P: IsA<Revealer>,
547             F: Fn(&P) + 'static,
548         >(
549             this: *mut ffi::GtkRevealer,
550             _param_spec: glib::ffi::gpointer,
551             f: glib::ffi::gpointer,
552         ) {
553             let f: &F = &*(f as *const F);
554             f(Revealer::from_glib_borrow(this).unsafe_cast_ref())
555         }
556         unsafe {
557             let f: Box_<F> = Box_::new(f);
558             connect_raw(
559                 self.as_ptr() as *mut _,
560                 b"notify::reveal-child\0".as_ptr() as *const _,
561                 Some(transmute::<_, unsafe extern "C" fn()>(
562                     notify_reveal_child_trampoline::<Self, F> as *const (),
563                 )),
564                 Box_::into_raw(f),
565             )
566         }
567     }
568 
connect_transition_duration_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId569     fn connect_transition_duration_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
570         unsafe extern "C" fn notify_transition_duration_trampoline<
571             P: IsA<Revealer>,
572             F: Fn(&P) + 'static,
573         >(
574             this: *mut ffi::GtkRevealer,
575             _param_spec: glib::ffi::gpointer,
576             f: glib::ffi::gpointer,
577         ) {
578             let f: &F = &*(f as *const F);
579             f(Revealer::from_glib_borrow(this).unsafe_cast_ref())
580         }
581         unsafe {
582             let f: Box_<F> = Box_::new(f);
583             connect_raw(
584                 self.as_ptr() as *mut _,
585                 b"notify::transition-duration\0".as_ptr() as *const _,
586                 Some(transmute::<_, unsafe extern "C" fn()>(
587                     notify_transition_duration_trampoline::<Self, F> as *const (),
588                 )),
589                 Box_::into_raw(f),
590             )
591         }
592     }
593 
connect_transition_type_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId594     fn connect_transition_type_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
595         unsafe extern "C" fn notify_transition_type_trampoline<
596             P: IsA<Revealer>,
597             F: Fn(&P) + 'static,
598         >(
599             this: *mut ffi::GtkRevealer,
600             _param_spec: glib::ffi::gpointer,
601             f: glib::ffi::gpointer,
602         ) {
603             let f: &F = &*(f as *const F);
604             f(Revealer::from_glib_borrow(this).unsafe_cast_ref())
605         }
606         unsafe {
607             let f: Box_<F> = Box_::new(f);
608             connect_raw(
609                 self.as_ptr() as *mut _,
610                 b"notify::transition-type\0".as_ptr() as *const _,
611                 Some(transmute::<_, unsafe extern "C" fn()>(
612                     notify_transition_type_trampoline::<Self, F> as *const (),
613                 )),
614                 Box_::into_raw(f),
615             )
616         }
617     }
618 }
619 
620 impl fmt::Display for Revealer {
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result621     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
622         f.write_str("Revealer")
623     }
624 }
625