gtk/auto/
accel_label.rs

1// This file was generated by gir (https://github.com/gtk-rs/gir)
2// from gir-files (https://github.com/gtk-rs/gir-files)
3// DO NOT EDIT
4
5use gdk;
6use glib;
7use glib::object::Cast;
8use glib::object::IsA;
9use glib::signal::connect_raw;
10use glib::signal::SignalHandlerId;
11use glib::translate::*;
12use glib::StaticType;
13use glib::ToValue;
14use glib::Value;
15use glib_sys;
16use gobject_sys;
17use gtk_sys;
18use pango;
19use std::boxed::Box as Box_;
20use std::fmt;
21use std::mem;
22use std::mem::transmute;
23use Align;
24use Buildable;
25use Container;
26use Justification;
27use Label;
28use Misc;
29use Widget;
30
31glib_wrapper! {
32    pub struct AccelLabel(Object<gtk_sys::GtkAccelLabel, gtk_sys::GtkAccelLabelClass, AccelLabelClass>) @extends Label, Misc, Widget, @implements Buildable;
33
34    match fn {
35        get_type => || gtk_sys::gtk_accel_label_get_type(),
36    }
37}
38
39impl AccelLabel {
40    pub fn new(string: &str) -> AccelLabel {
41        assert_initialized_main_thread!();
42        unsafe {
43            Widget::from_glib_none(gtk_sys::gtk_accel_label_new(string.to_glib_none().0))
44                .unsafe_cast()
45        }
46    }
47}
48
49pub struct AccelLabelBuilder {
50    accel_closure: Option<glib::Closure>,
51    accel_widget: Option<Widget>,
52    angle: Option<f64>,
53    attributes: Option<pango::AttrList>,
54    ellipsize: Option<pango::EllipsizeMode>,
55    justify: Option<Justification>,
56    label: Option<String>,
57    lines: Option<i32>,
58    max_width_chars: Option<i32>,
59    mnemonic_widget: Option<Widget>,
60    pattern: Option<String>,
61    selectable: Option<bool>,
62    single_line_mode: Option<bool>,
63    track_visited_links: Option<bool>,
64    use_markup: Option<bool>,
65    use_underline: Option<bool>,
66    width_chars: Option<i32>,
67    wrap: Option<bool>,
68    wrap_mode: Option<pango::WrapMode>,
69    #[cfg(any(feature = "v3_16", feature = "dox"))]
70    xalign: Option<f32>,
71    #[cfg(any(feature = "v3_16", feature = "dox"))]
72    yalign: Option<f32>,
73    app_paintable: Option<bool>,
74    can_default: Option<bool>,
75    can_focus: Option<bool>,
76    events: Option<gdk::EventMask>,
77    expand: Option<bool>,
78    #[cfg(any(feature = "v3_20", feature = "dox"))]
79    focus_on_click: Option<bool>,
80    halign: Option<Align>,
81    has_default: Option<bool>,
82    has_focus: Option<bool>,
83    has_tooltip: Option<bool>,
84    height_request: Option<i32>,
85    hexpand: Option<bool>,
86    hexpand_set: Option<bool>,
87    is_focus: Option<bool>,
88    margin: Option<i32>,
89    margin_bottom: Option<i32>,
90    margin_end: Option<i32>,
91    margin_start: Option<i32>,
92    margin_top: Option<i32>,
93    name: Option<String>,
94    no_show_all: Option<bool>,
95    opacity: Option<f64>,
96    parent: Option<Container>,
97    receives_default: Option<bool>,
98    sensitive: Option<bool>,
99    //style: /*Unknown type*/,
100    tooltip_markup: Option<String>,
101    tooltip_text: Option<String>,
102    valign: Option<Align>,
103    vexpand: Option<bool>,
104    vexpand_set: Option<bool>,
105    visible: Option<bool>,
106    width_request: Option<i32>,
107}
108
109impl AccelLabelBuilder {
110    pub fn new() -> Self {
111        Self {
112            accel_closure: None,
113            accel_widget: None,
114            angle: None,
115            attributes: None,
116            ellipsize: None,
117            justify: None,
118            label: None,
119            lines: None,
120            max_width_chars: None,
121            mnemonic_widget: None,
122            pattern: None,
123            selectable: None,
124            single_line_mode: None,
125            track_visited_links: None,
126            use_markup: None,
127            use_underline: None,
128            width_chars: None,
129            wrap: None,
130            wrap_mode: None,
131            #[cfg(any(feature = "v3_16", feature = "dox"))]
132            xalign: None,
133            #[cfg(any(feature = "v3_16", feature = "dox"))]
134            yalign: None,
135            app_paintable: None,
136            can_default: None,
137            can_focus: None,
138            events: None,
139            expand: None,
140            #[cfg(any(feature = "v3_20", feature = "dox"))]
141            focus_on_click: None,
142            halign: None,
143            has_default: None,
144            has_focus: None,
145            has_tooltip: None,
146            height_request: None,
147            hexpand: None,
148            hexpand_set: None,
149            is_focus: None,
150            margin: None,
151            margin_bottom: None,
152            margin_end: None,
153            margin_start: None,
154            margin_top: None,
155            name: None,
156            no_show_all: None,
157            opacity: None,
158            parent: None,
159            receives_default: None,
160            sensitive: None,
161            tooltip_markup: None,
162            tooltip_text: None,
163            valign: None,
164            vexpand: None,
165            vexpand_set: None,
166            visible: None,
167            width_request: None,
168        }
169    }
170
171    pub fn build(self) -> AccelLabel {
172        let mut properties: Vec<(&str, &dyn ToValue)> = vec![];
173        if let Some(ref accel_closure) = self.accel_closure {
174            properties.push(("accel-closure", accel_closure));
175        }
176        if let Some(ref accel_widget) = self.accel_widget {
177            properties.push(("accel-widget", accel_widget));
178        }
179        if let Some(ref angle) = self.angle {
180            properties.push(("angle", angle));
181        }
182        if let Some(ref attributes) = self.attributes {
183            properties.push(("attributes", attributes));
184        }
185        if let Some(ref ellipsize) = self.ellipsize {
186            properties.push(("ellipsize", ellipsize));
187        }
188        if let Some(ref justify) = self.justify {
189            properties.push(("justify", justify));
190        }
191        if let Some(ref label) = self.label {
192            properties.push(("label", label));
193        }
194        if let Some(ref lines) = self.lines {
195            properties.push(("lines", lines));
196        }
197        if let Some(ref max_width_chars) = self.max_width_chars {
198            properties.push(("max-width-chars", max_width_chars));
199        }
200        if let Some(ref mnemonic_widget) = self.mnemonic_widget {
201            properties.push(("mnemonic-widget", mnemonic_widget));
202        }
203        if let Some(ref pattern) = self.pattern {
204            properties.push(("pattern", pattern));
205        }
206        if let Some(ref selectable) = self.selectable {
207            properties.push(("selectable", selectable));
208        }
209        if let Some(ref single_line_mode) = self.single_line_mode {
210            properties.push(("single-line-mode", single_line_mode));
211        }
212        if let Some(ref track_visited_links) = self.track_visited_links {
213            properties.push(("track-visited-links", track_visited_links));
214        }
215        if let Some(ref use_markup) = self.use_markup {
216            properties.push(("use-markup", use_markup));
217        }
218        if let Some(ref use_underline) = self.use_underline {
219            properties.push(("use-underline", use_underline));
220        }
221        if let Some(ref width_chars) = self.width_chars {
222            properties.push(("width-chars", width_chars));
223        }
224        if let Some(ref wrap) = self.wrap {
225            properties.push(("wrap", wrap));
226        }
227        if let Some(ref wrap_mode) = self.wrap_mode {
228            properties.push(("wrap-mode", wrap_mode));
229        }
230        #[cfg(any(feature = "v3_16", feature = "dox"))]
231        {
232            if let Some(ref xalign) = self.xalign {
233                properties.push(("xalign", xalign));
234            }
235        }
236        #[cfg(any(feature = "v3_16", feature = "dox"))]
237        {
238            if let Some(ref yalign) = self.yalign {
239                properties.push(("yalign", yalign));
240            }
241        }
242        if let Some(ref app_paintable) = self.app_paintable {
243            properties.push(("app-paintable", app_paintable));
244        }
245        if let Some(ref can_default) = self.can_default {
246            properties.push(("can-default", can_default));
247        }
248        if let Some(ref can_focus) = self.can_focus {
249            properties.push(("can-focus", can_focus));
250        }
251        if let Some(ref events) = self.events {
252            properties.push(("events", events));
253        }
254        if let Some(ref expand) = self.expand {
255            properties.push(("expand", expand));
256        }
257        #[cfg(any(feature = "v3_20", feature = "dox"))]
258        {
259            if let Some(ref focus_on_click) = self.focus_on_click {
260                properties.push(("focus-on-click", focus_on_click));
261            }
262        }
263        if let Some(ref halign) = self.halign {
264            properties.push(("halign", halign));
265        }
266        if let Some(ref has_default) = self.has_default {
267            properties.push(("has-default", has_default));
268        }
269        if let Some(ref has_focus) = self.has_focus {
270            properties.push(("has-focus", has_focus));
271        }
272        if let Some(ref has_tooltip) = self.has_tooltip {
273            properties.push(("has-tooltip", has_tooltip));
274        }
275        if let Some(ref height_request) = self.height_request {
276            properties.push(("height-request", height_request));
277        }
278        if let Some(ref hexpand) = self.hexpand {
279            properties.push(("hexpand", hexpand));
280        }
281        if let Some(ref hexpand_set) = self.hexpand_set {
282            properties.push(("hexpand-set", hexpand_set));
283        }
284        if let Some(ref is_focus) = self.is_focus {
285            properties.push(("is-focus", is_focus));
286        }
287        if let Some(ref margin) = self.margin {
288            properties.push(("margin", margin));
289        }
290        if let Some(ref margin_bottom) = self.margin_bottom {
291            properties.push(("margin-bottom", margin_bottom));
292        }
293        if let Some(ref margin_end) = self.margin_end {
294            properties.push(("margin-end", margin_end));
295        }
296        if let Some(ref margin_start) = self.margin_start {
297            properties.push(("margin-start", margin_start));
298        }
299        if let Some(ref margin_top) = self.margin_top {
300            properties.push(("margin-top", margin_top));
301        }
302        if let Some(ref name) = self.name {
303            properties.push(("name", name));
304        }
305        if let Some(ref no_show_all) = self.no_show_all {
306            properties.push(("no-show-all", no_show_all));
307        }
308        if let Some(ref opacity) = self.opacity {
309            properties.push(("opacity", opacity));
310        }
311        if let Some(ref parent) = self.parent {
312            properties.push(("parent", parent));
313        }
314        if let Some(ref receives_default) = self.receives_default {
315            properties.push(("receives-default", receives_default));
316        }
317        if let Some(ref sensitive) = self.sensitive {
318            properties.push(("sensitive", sensitive));
319        }
320        if let Some(ref tooltip_markup) = self.tooltip_markup {
321            properties.push(("tooltip-markup", tooltip_markup));
322        }
323        if let Some(ref tooltip_text) = self.tooltip_text {
324            properties.push(("tooltip-text", tooltip_text));
325        }
326        if let Some(ref valign) = self.valign {
327            properties.push(("valign", valign));
328        }
329        if let Some(ref vexpand) = self.vexpand {
330            properties.push(("vexpand", vexpand));
331        }
332        if let Some(ref vexpand_set) = self.vexpand_set {
333            properties.push(("vexpand-set", vexpand_set));
334        }
335        if let Some(ref visible) = self.visible {
336            properties.push(("visible", visible));
337        }
338        if let Some(ref width_request) = self.width_request {
339            properties.push(("width-request", width_request));
340        }
341        glib::Object::new(AccelLabel::static_type(), &properties)
342            .expect("object new")
343            .downcast()
344            .expect("downcast")
345    }
346
347    pub fn accel_closure(mut self, accel_closure: &glib::Closure) -> Self {
348        self.accel_closure = Some(accel_closure.clone());
349        self
350    }
351
352    pub fn accel_widget(mut self, accel_widget: &Widget) -> Self {
353        self.accel_widget = Some(accel_widget.clone());
354        self
355    }
356
357    pub fn angle(mut self, angle: f64) -> Self {
358        self.angle = Some(angle);
359        self
360    }
361
362    pub fn attributes(mut self, attributes: &pango::AttrList) -> Self {
363        self.attributes = Some(attributes.clone());
364        self
365    }
366
367    pub fn ellipsize(mut self, ellipsize: pango::EllipsizeMode) -> Self {
368        self.ellipsize = Some(ellipsize);
369        self
370    }
371
372    pub fn justify(mut self, justify: Justification) -> Self {
373        self.justify = Some(justify);
374        self
375    }
376
377    pub fn label(mut self, label: &str) -> Self {
378        self.label = Some(label.to_string());
379        self
380    }
381
382    pub fn lines(mut self, lines: i32) -> Self {
383        self.lines = Some(lines);
384        self
385    }
386
387    pub fn max_width_chars(mut self, max_width_chars: i32) -> Self {
388        self.max_width_chars = Some(max_width_chars);
389        self
390    }
391
392    pub fn mnemonic_widget(mut self, mnemonic_widget: &Widget) -> Self {
393        self.mnemonic_widget = Some(mnemonic_widget.clone());
394        self
395    }
396
397    pub fn pattern(mut self, pattern: &str) -> Self {
398        self.pattern = Some(pattern.to_string());
399        self
400    }
401
402    pub fn selectable(mut self, selectable: bool) -> Self {
403        self.selectable = Some(selectable);
404        self
405    }
406
407    pub fn single_line_mode(mut self, single_line_mode: bool) -> Self {
408        self.single_line_mode = Some(single_line_mode);
409        self
410    }
411
412    pub fn track_visited_links(mut self, track_visited_links: bool) -> Self {
413        self.track_visited_links = Some(track_visited_links);
414        self
415    }
416
417    pub fn use_markup(mut self, use_markup: bool) -> Self {
418        self.use_markup = Some(use_markup);
419        self
420    }
421
422    pub fn use_underline(mut self, use_underline: bool) -> Self {
423        self.use_underline = Some(use_underline);
424        self
425    }
426
427    pub fn width_chars(mut self, width_chars: i32) -> Self {
428        self.width_chars = Some(width_chars);
429        self
430    }
431
432    pub fn wrap(mut self, wrap: bool) -> Self {
433        self.wrap = Some(wrap);
434        self
435    }
436
437    pub fn wrap_mode(mut self, wrap_mode: pango::WrapMode) -> Self {
438        self.wrap_mode = Some(wrap_mode);
439        self
440    }
441
442    #[cfg(any(feature = "v3_16", feature = "dox"))]
443    pub fn xalign(mut self, xalign: f32) -> Self {
444        self.xalign = Some(xalign);
445        self
446    }
447
448    #[cfg(any(feature = "v3_16", feature = "dox"))]
449    pub fn yalign(mut self, yalign: f32) -> Self {
450        self.yalign = Some(yalign);
451        self
452    }
453
454    pub fn app_paintable(mut self, app_paintable: bool) -> Self {
455        self.app_paintable = Some(app_paintable);
456        self
457    }
458
459    pub fn can_default(mut self, can_default: bool) -> Self {
460        self.can_default = Some(can_default);
461        self
462    }
463
464    pub fn can_focus(mut self, can_focus: bool) -> Self {
465        self.can_focus = Some(can_focus);
466        self
467    }
468
469    pub fn events(mut self, events: gdk::EventMask) -> Self {
470        self.events = Some(events);
471        self
472    }
473
474    pub fn expand(mut self, expand: bool) -> Self {
475        self.expand = Some(expand);
476        self
477    }
478
479    #[cfg(any(feature = "v3_20", feature = "dox"))]
480    pub fn focus_on_click(mut self, focus_on_click: bool) -> Self {
481        self.focus_on_click = Some(focus_on_click);
482        self
483    }
484
485    pub fn halign(mut self, halign: Align) -> Self {
486        self.halign = Some(halign);
487        self
488    }
489
490    pub fn has_default(mut self, has_default: bool) -> Self {
491        self.has_default = Some(has_default);
492        self
493    }
494
495    pub fn has_focus(mut self, has_focus: bool) -> Self {
496        self.has_focus = Some(has_focus);
497        self
498    }
499
500    pub fn has_tooltip(mut self, has_tooltip: bool) -> Self {
501        self.has_tooltip = Some(has_tooltip);
502        self
503    }
504
505    pub fn height_request(mut self, height_request: i32) -> Self {
506        self.height_request = Some(height_request);
507        self
508    }
509
510    pub fn hexpand(mut self, hexpand: bool) -> Self {
511        self.hexpand = Some(hexpand);
512        self
513    }
514
515    pub fn hexpand_set(mut self, hexpand_set: bool) -> Self {
516        self.hexpand_set = Some(hexpand_set);
517        self
518    }
519
520    pub fn is_focus(mut self, is_focus: bool) -> Self {
521        self.is_focus = Some(is_focus);
522        self
523    }
524
525    pub fn margin(mut self, margin: i32) -> Self {
526        self.margin = Some(margin);
527        self
528    }
529
530    pub fn margin_bottom(mut self, margin_bottom: i32) -> Self {
531        self.margin_bottom = Some(margin_bottom);
532        self
533    }
534
535    pub fn margin_end(mut self, margin_end: i32) -> Self {
536        self.margin_end = Some(margin_end);
537        self
538    }
539
540    pub fn margin_start(mut self, margin_start: i32) -> Self {
541        self.margin_start = Some(margin_start);
542        self
543    }
544
545    pub fn margin_top(mut self, margin_top: i32) -> Self {
546        self.margin_top = Some(margin_top);
547        self
548    }
549
550    pub fn name(mut self, name: &str) -> Self {
551        self.name = Some(name.to_string());
552        self
553    }
554
555    pub fn no_show_all(mut self, no_show_all: bool) -> Self {
556        self.no_show_all = Some(no_show_all);
557        self
558    }
559
560    pub fn opacity(mut self, opacity: f64) -> Self {
561        self.opacity = Some(opacity);
562        self
563    }
564
565    pub fn parent(mut self, parent: &Container) -> Self {
566        self.parent = Some(parent.clone());
567        self
568    }
569
570    pub fn receives_default(mut self, receives_default: bool) -> Self {
571        self.receives_default = Some(receives_default);
572        self
573    }
574
575    pub fn sensitive(mut self, sensitive: bool) -> Self {
576        self.sensitive = Some(sensitive);
577        self
578    }
579
580    pub fn tooltip_markup(mut self, tooltip_markup: &str) -> Self {
581        self.tooltip_markup = Some(tooltip_markup.to_string());
582        self
583    }
584
585    pub fn tooltip_text(mut self, tooltip_text: &str) -> Self {
586        self.tooltip_text = Some(tooltip_text.to_string());
587        self
588    }
589
590    pub fn valign(mut self, valign: Align) -> Self {
591        self.valign = Some(valign);
592        self
593    }
594
595    pub fn vexpand(mut self, vexpand: bool) -> Self {
596        self.vexpand = Some(vexpand);
597        self
598    }
599
600    pub fn vexpand_set(mut self, vexpand_set: bool) -> Self {
601        self.vexpand_set = Some(vexpand_set);
602        self
603    }
604
605    pub fn visible(mut self, visible: bool) -> Self {
606        self.visible = Some(visible);
607        self
608    }
609
610    pub fn width_request(mut self, width_request: i32) -> Self {
611        self.width_request = Some(width_request);
612        self
613    }
614}
615
616pub const NONE_ACCEL_LABEL: Option<&AccelLabel> = None;
617
618pub trait AccelLabelExt: 'static {
619    fn get_accel(&self) -> (u32, gdk::ModifierType);
620
621    fn get_accel_widget(&self) -> Option<Widget>;
622
623    fn get_accel_width(&self) -> u32;
624
625    fn refetch(&self) -> bool;
626
627    fn set_accel(&self, accelerator_key: u32, accelerator_mods: gdk::ModifierType);
628
629    fn set_accel_closure(&self, accel_closure: Option<&glib::Closure>);
630
631    fn set_accel_widget<P: IsA<Widget>>(&self, accel_widget: Option<&P>);
632
633    fn get_property_accel_closure(&self) -> Option<glib::Closure>;
634
635    fn connect_property_accel_closure_notify<F: Fn(&Self) + 'static>(
636        &self,
637        f: F,
638    ) -> SignalHandlerId;
639
640    fn connect_property_accel_widget_notify<F: Fn(&Self) + 'static>(&self, f: F)
641        -> SignalHandlerId;
642}
643
644impl<O: IsA<AccelLabel>> AccelLabelExt for O {
645    fn get_accel(&self) -> (u32, gdk::ModifierType) {
646        unsafe {
647            let mut accelerator_key = mem::uninitialized();
648            let mut accelerator_mods = mem::uninitialized();
649            gtk_sys::gtk_accel_label_get_accel(
650                self.as_ref().to_glib_none().0,
651                &mut accelerator_key,
652                &mut accelerator_mods,
653            );
654            (accelerator_key, from_glib(accelerator_mods))
655        }
656    }
657
658    fn get_accel_widget(&self) -> Option<Widget> {
659        unsafe {
660            from_glib_none(gtk_sys::gtk_accel_label_get_accel_widget(
661                self.as_ref().to_glib_none().0,
662            ))
663        }
664    }
665
666    fn get_accel_width(&self) -> u32 {
667        unsafe { gtk_sys::gtk_accel_label_get_accel_width(self.as_ref().to_glib_none().0) }
668    }
669
670    fn refetch(&self) -> bool {
671        unsafe {
672            from_glib(gtk_sys::gtk_accel_label_refetch(
673                self.as_ref().to_glib_none().0,
674            ))
675        }
676    }
677
678    fn set_accel(&self, accelerator_key: u32, accelerator_mods: gdk::ModifierType) {
679        unsafe {
680            gtk_sys::gtk_accel_label_set_accel(
681                self.as_ref().to_glib_none().0,
682                accelerator_key,
683                accelerator_mods.to_glib(),
684            );
685        }
686    }
687
688    fn set_accel_closure(&self, accel_closure: Option<&glib::Closure>) {
689        unsafe {
690            gtk_sys::gtk_accel_label_set_accel_closure(
691                self.as_ref().to_glib_none().0,
692                accel_closure.to_glib_none().0,
693            );
694        }
695    }
696
697    fn set_accel_widget<P: IsA<Widget>>(&self, accel_widget: Option<&P>) {
698        unsafe {
699            gtk_sys::gtk_accel_label_set_accel_widget(
700                self.as_ref().to_glib_none().0,
701                accel_widget.map(|p| p.as_ref()).to_glib_none().0,
702            );
703        }
704    }
705
706    fn get_property_accel_closure(&self) -> Option<glib::Closure> {
707        unsafe {
708            let mut value = Value::from_type(<glib::Closure as StaticType>::static_type());
709            gobject_sys::g_object_get_property(
710                self.to_glib_none().0 as *mut gobject_sys::GObject,
711                b"accel-closure\0".as_ptr() as *const _,
712                value.to_glib_none_mut().0,
713            );
714            value.get()
715        }
716    }
717
718    fn connect_property_accel_closure_notify<F: Fn(&Self) + 'static>(
719        &self,
720        f: F,
721    ) -> SignalHandlerId {
722        unsafe extern "C" fn notify_accel_closure_trampoline<P, F: Fn(&P) + 'static>(
723            this: *mut gtk_sys::GtkAccelLabel,
724            _param_spec: glib_sys::gpointer,
725            f: glib_sys::gpointer,
726        ) where
727            P: IsA<AccelLabel>,
728        {
729            let f: &F = &*(f as *const F);
730            f(&AccelLabel::from_glib_borrow(this).unsafe_cast())
731        }
732        unsafe {
733            let f: Box_<F> = Box_::new(f);
734            connect_raw(
735                self.as_ptr() as *mut _,
736                b"notify::accel-closure\0".as_ptr() as *const _,
737                Some(transmute(
738                    notify_accel_closure_trampoline::<Self, F> as usize,
739                )),
740                Box_::into_raw(f),
741            )
742        }
743    }
744
745    fn connect_property_accel_widget_notify<F: Fn(&Self) + 'static>(
746        &self,
747        f: F,
748    ) -> SignalHandlerId {
749        unsafe extern "C" fn notify_accel_widget_trampoline<P, F: Fn(&P) + 'static>(
750            this: *mut gtk_sys::GtkAccelLabel,
751            _param_spec: glib_sys::gpointer,
752            f: glib_sys::gpointer,
753        ) where
754            P: IsA<AccelLabel>,
755        {
756            let f: &F = &*(f as *const F);
757            f(&AccelLabel::from_glib_borrow(this).unsafe_cast())
758        }
759        unsafe {
760            let f: Box_<F> = Box_::new(f);
761            connect_raw(
762                self.as_ptr() as *mut _,
763                b"notify::accel-widget\0".as_ptr() as *const _,
764                Some(transmute(
765                    notify_accel_widget_trampoline::<Self, F> as usize,
766                )),
767                Box_::into_raw(f),
768            )
769        }
770    }
771}
772
773impl fmt::Display for AccelLabel {
774    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
775        write!(f, "AccelLabel")
776    }
777}