gtk/auto/
widget.rs

1// This file was generated by gir (https://github.com/gtk-rs/gir)
2// from gir-files (https://github.com/gtk-rs/gir-files)
3// DO NOT EDIT
4
5use crate::{
6    AccelFlags, AccelGroup, Align, Allocation, Buildable, Clipboard, DirectionType, DragResult,
7    Orientation, Requisition, SelectionData, Settings, SizeRequestMode, StateFlags, StyleContext,
8    TargetList, TextDirection, Tooltip, WidgetHelpType, WidgetPath, Window,
9};
10use glib::{
11    prelude::*,
12    signal::{connect_raw, SignalHandlerId},
13    translate::*,
14};
15use std::{boxed::Box as Box_, fmt, mem, mem::transmute};
16
17glib::wrapper! {
18    #[doc(alias = "GtkWidget")]
19    pub struct Widget(Object<ffi::GtkWidget, ffi::GtkWidgetClass>) @implements Buildable;
20
21    match fn {
22        type_ => || ffi::gtk_widget_get_type(),
23    }
24}
25
26impl Widget {
27    pub const NONE: Option<&'static Widget> = None;
28
29    //#[doc(alias = "gtk_widget_new")]
30    //pub fn new(type_: glib::types::Type, first_property_name: &str, : /*Unknown conversion*//*Unimplemented*/Basic: VarArgs) -> Widget {
31    //    unsafe { TODO: call ffi:gtk_widget_new() }
32    //}
33
34    #[doc(alias = "gtk_widget_get_default_direction")]
35    #[doc(alias = "get_default_direction")]
36    pub fn default_direction() -> TextDirection {
37        assert_initialized_main_thread!();
38        unsafe { from_glib(ffi::gtk_widget_get_default_direction()) }
39    }
40
41    #[doc(alias = "gtk_widget_set_default_direction")]
42    pub fn set_default_direction(dir: TextDirection) {
43        assert_initialized_main_thread!();
44        unsafe {
45            ffi::gtk_widget_set_default_direction(dir.into_glib());
46        }
47    }
48}
49
50impl fmt::Display for Widget {
51    #[inline]
52    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
53        f.write_str(&WidgetExt::widget_name(self))
54    }
55}
56
57mod sealed {
58    pub trait Sealed {}
59    impl<T: super::IsA<super::Widget>> Sealed for T {}
60}
61
62pub trait WidgetExt: IsA<Widget> + sealed::Sealed + 'static {
63    #[doc(alias = "gtk_widget_activate")]
64    fn activate(&self) -> bool {
65        unsafe { from_glib(ffi::gtk_widget_activate(self.as_ref().to_glib_none().0)) }
66    }
67
68    #[doc(alias = "gtk_widget_add_accelerator")]
69    fn add_accelerator(
70        &self,
71        accel_signal: &str,
72        accel_group: &impl IsA<AccelGroup>,
73        accel_key: u32,
74        accel_mods: gdk::ModifierType,
75        accel_flags: AccelFlags,
76    ) {
77        unsafe {
78            ffi::gtk_widget_add_accelerator(
79                self.as_ref().to_glib_none().0,
80                accel_signal.to_glib_none().0,
81                accel_group.as_ref().to_glib_none().0,
82                accel_key,
83                accel_mods.into_glib(),
84                accel_flags.into_glib(),
85            );
86        }
87    }
88
89    #[doc(alias = "gtk_widget_add_device_events")]
90    fn add_device_events(&self, device: &gdk::Device, events: gdk::EventMask) {
91        unsafe {
92            ffi::gtk_widget_add_device_events(
93                self.as_ref().to_glib_none().0,
94                device.to_glib_none().0,
95                events.into_glib(),
96            );
97        }
98    }
99
100    #[doc(alias = "gtk_widget_add_mnemonic_label")]
101    fn add_mnemonic_label(&self, label: &impl IsA<Widget>) {
102        unsafe {
103            ffi::gtk_widget_add_mnemonic_label(
104                self.as_ref().to_glib_none().0,
105                label.as_ref().to_glib_none().0,
106            );
107        }
108    }
109
110    #[doc(alias = "gtk_widget_can_activate_accel")]
111    fn can_activate_accel(&self, signal_id: u32) -> bool {
112        unsafe {
113            from_glib(ffi::gtk_widget_can_activate_accel(
114                self.as_ref().to_glib_none().0,
115                signal_id,
116            ))
117        }
118    }
119
120    #[doc(alias = "gtk_widget_child_focus")]
121    fn child_focus(&self, direction: DirectionType) -> bool {
122        unsafe {
123            from_glib(ffi::gtk_widget_child_focus(
124                self.as_ref().to_glib_none().0,
125                direction.into_glib(),
126            ))
127        }
128    }
129
130    #[doc(alias = "gtk_widget_child_notify")]
131    fn child_notify(&self, child_property: &str) {
132        unsafe {
133            ffi::gtk_widget_child_notify(
134                self.as_ref().to_glib_none().0,
135                child_property.to_glib_none().0,
136            );
137        }
138    }
139
140    #[doc(alias = "gtk_widget_compute_expand")]
141    fn compute_expand(&self, orientation: Orientation) -> bool {
142        unsafe {
143            from_glib(ffi::gtk_widget_compute_expand(
144                self.as_ref().to_glib_none().0,
145                orientation.into_glib(),
146            ))
147        }
148    }
149
150    #[doc(alias = "gtk_widget_create_pango_context")]
151    fn create_pango_context(&self) -> pango::Context {
152        unsafe {
153            from_glib_full(ffi::gtk_widget_create_pango_context(
154                self.as_ref().to_glib_none().0,
155            ))
156        }
157    }
158
159    #[doc(alias = "gtk_widget_create_pango_layout")]
160    fn create_pango_layout(&self, text: Option<&str>) -> pango::Layout {
161        unsafe {
162            from_glib_full(ffi::gtk_widget_create_pango_layout(
163                self.as_ref().to_glib_none().0,
164                text.to_glib_none().0,
165            ))
166        }
167    }
168
169    //#[doc(alias = "gtk_widget_destroyed")]
170    //fn destroyed(&self, widget_pointer: impl IsA<Widget>) {
171    //    unsafe { TODO: call ffi:gtk_widget_destroyed() }
172    //}
173
174    #[doc(alias = "gtk_widget_device_is_shadowed")]
175    fn device_is_shadowed(&self, device: &gdk::Device) -> bool {
176        unsafe {
177            from_glib(ffi::gtk_widget_device_is_shadowed(
178                self.as_ref().to_glib_none().0,
179                device.to_glib_none().0,
180            ))
181        }
182    }
183
184    #[doc(alias = "gtk_drag_begin_with_coordinates")]
185    fn drag_begin_with_coordinates(
186        &self,
187        targets: &TargetList,
188        actions: gdk::DragAction,
189        button: i32,
190        event: Option<&gdk::Event>,
191        x: i32,
192        y: i32,
193    ) -> Option<gdk::DragContext> {
194        unsafe {
195            from_glib_none(ffi::gtk_drag_begin_with_coordinates(
196                self.as_ref().to_glib_none().0,
197                targets.to_glib_none().0,
198                actions.into_glib(),
199                button,
200                mut_override(event.to_glib_none().0),
201                x,
202                y,
203            ))
204        }
205    }
206
207    #[doc(alias = "gtk_drag_check_threshold")]
208    fn drag_check_threshold(
209        &self,
210        start_x: i32,
211        start_y: i32,
212        current_x: i32,
213        current_y: i32,
214    ) -> bool {
215        unsafe {
216            from_glib(ffi::gtk_drag_check_threshold(
217                self.as_ref().to_glib_none().0,
218                start_x,
219                start_y,
220                current_x,
221                current_y,
222            ))
223        }
224    }
225
226    #[doc(alias = "gtk_drag_dest_add_image_targets")]
227    fn drag_dest_add_image_targets(&self) {
228        unsafe {
229            ffi::gtk_drag_dest_add_image_targets(self.as_ref().to_glib_none().0);
230        }
231    }
232
233    #[doc(alias = "gtk_drag_dest_add_text_targets")]
234    fn drag_dest_add_text_targets(&self) {
235        unsafe {
236            ffi::gtk_drag_dest_add_text_targets(self.as_ref().to_glib_none().0);
237        }
238    }
239
240    #[doc(alias = "gtk_drag_dest_add_uri_targets")]
241    fn drag_dest_add_uri_targets(&self) {
242        unsafe {
243            ffi::gtk_drag_dest_add_uri_targets(self.as_ref().to_glib_none().0);
244        }
245    }
246
247    #[doc(alias = "gtk_drag_dest_find_target")]
248    fn drag_dest_find_target(
249        &self,
250        context: &gdk::DragContext,
251        target_list: Option<&TargetList>,
252    ) -> Option<gdk::Atom> {
253        unsafe {
254            from_glib_none(ffi::gtk_drag_dest_find_target(
255                self.as_ref().to_glib_none().0,
256                context.to_glib_none().0,
257                target_list.to_glib_none().0,
258            ))
259        }
260    }
261
262    #[doc(alias = "gtk_drag_dest_get_target_list")]
263    fn drag_dest_get_target_list(&self) -> Option<TargetList> {
264        unsafe {
265            from_glib_none(ffi::gtk_drag_dest_get_target_list(
266                self.as_ref().to_glib_none().0,
267            ))
268        }
269    }
270
271    #[doc(alias = "gtk_drag_dest_get_track_motion")]
272    fn drag_dest_get_track_motion(&self) -> bool {
273        unsafe {
274            from_glib(ffi::gtk_drag_dest_get_track_motion(
275                self.as_ref().to_glib_none().0,
276            ))
277        }
278    }
279
280    #[doc(alias = "gtk_drag_dest_set_target_list")]
281    fn drag_dest_set_target_list(&self, target_list: Option<&TargetList>) {
282        unsafe {
283            ffi::gtk_drag_dest_set_target_list(
284                self.as_ref().to_glib_none().0,
285                target_list.to_glib_none().0,
286            );
287        }
288    }
289
290    #[doc(alias = "gtk_drag_dest_set_track_motion")]
291    fn drag_dest_set_track_motion(&self, track_motion: bool) {
292        unsafe {
293            ffi::gtk_drag_dest_set_track_motion(
294                self.as_ref().to_glib_none().0,
295                track_motion.into_glib(),
296            );
297        }
298    }
299
300    #[doc(alias = "gtk_drag_dest_unset")]
301    fn drag_dest_unset(&self) {
302        unsafe {
303            ffi::gtk_drag_dest_unset(self.as_ref().to_glib_none().0);
304        }
305    }
306
307    #[doc(alias = "gtk_drag_get_data")]
308    fn drag_get_data(&self, context: &gdk::DragContext, target: &gdk::Atom, time_: u32) {
309        unsafe {
310            ffi::gtk_drag_get_data(
311                self.as_ref().to_glib_none().0,
312                context.to_glib_none().0,
313                target.to_glib_none().0,
314                time_,
315            );
316        }
317    }
318
319    #[doc(alias = "gtk_drag_highlight")]
320    fn drag_highlight(&self) {
321        unsafe {
322            ffi::gtk_drag_highlight(self.as_ref().to_glib_none().0);
323        }
324    }
325
326    #[doc(alias = "gtk_drag_source_add_image_targets")]
327    fn drag_source_add_image_targets(&self) {
328        unsafe {
329            ffi::gtk_drag_source_add_image_targets(self.as_ref().to_glib_none().0);
330        }
331    }
332
333    #[doc(alias = "gtk_drag_source_add_text_targets")]
334    fn drag_source_add_text_targets(&self) {
335        unsafe {
336            ffi::gtk_drag_source_add_text_targets(self.as_ref().to_glib_none().0);
337        }
338    }
339
340    #[doc(alias = "gtk_drag_source_add_uri_targets")]
341    fn drag_source_add_uri_targets(&self) {
342        unsafe {
343            ffi::gtk_drag_source_add_uri_targets(self.as_ref().to_glib_none().0);
344        }
345    }
346
347    #[doc(alias = "gtk_drag_source_get_target_list")]
348    fn drag_source_get_target_list(&self) -> Option<TargetList> {
349        unsafe {
350            from_glib_none(ffi::gtk_drag_source_get_target_list(
351                self.as_ref().to_glib_none().0,
352            ))
353        }
354    }
355
356    #[doc(alias = "gtk_drag_source_set_icon_gicon")]
357    fn drag_source_set_icon_gicon(&self, icon: &impl IsA<gio::Icon>) {
358        unsafe {
359            ffi::gtk_drag_source_set_icon_gicon(
360                self.as_ref().to_glib_none().0,
361                icon.as_ref().to_glib_none().0,
362            );
363        }
364    }
365
366    #[doc(alias = "gtk_drag_source_set_icon_name")]
367    fn drag_source_set_icon_name(&self, icon_name: &str) {
368        unsafe {
369            ffi::gtk_drag_source_set_icon_name(
370                self.as_ref().to_glib_none().0,
371                icon_name.to_glib_none().0,
372            );
373        }
374    }
375
376    #[doc(alias = "gtk_drag_source_set_icon_pixbuf")]
377    fn drag_source_set_icon_pixbuf(&self, pixbuf: &gdk_pixbuf::Pixbuf) {
378        unsafe {
379            ffi::gtk_drag_source_set_icon_pixbuf(
380                self.as_ref().to_glib_none().0,
381                pixbuf.to_glib_none().0,
382            );
383        }
384    }
385
386    #[doc(alias = "gtk_drag_source_set_target_list")]
387    fn drag_source_set_target_list(&self, target_list: Option<&TargetList>) {
388        unsafe {
389            ffi::gtk_drag_source_set_target_list(
390                self.as_ref().to_glib_none().0,
391                target_list.to_glib_none().0,
392            );
393        }
394    }
395
396    #[doc(alias = "gtk_drag_source_unset")]
397    fn drag_source_unset(&self) {
398        unsafe {
399            ffi::gtk_drag_source_unset(self.as_ref().to_glib_none().0);
400        }
401    }
402
403    #[doc(alias = "gtk_drag_unhighlight")]
404    fn drag_unhighlight(&self) {
405        unsafe {
406            ffi::gtk_drag_unhighlight(self.as_ref().to_glib_none().0);
407        }
408    }
409
410    #[doc(alias = "gtk_widget_draw")]
411    fn draw(&self, cr: &cairo::Context) {
412        unsafe {
413            ffi::gtk_widget_draw(
414                self.as_ref().to_glib_none().0,
415                mut_override(cr.to_glib_none().0),
416            );
417        }
418    }
419
420    #[doc(alias = "gtk_widget_error_bell")]
421    fn error_bell(&self) {
422        unsafe {
423            ffi::gtk_widget_error_bell(self.as_ref().to_glib_none().0);
424        }
425    }
426
427    #[doc(alias = "gtk_widget_event")]
428    fn event(&self, event: &gdk::Event) -> bool {
429        unsafe {
430            from_glib(ffi::gtk_widget_event(
431                self.as_ref().to_glib_none().0,
432                mut_override(event.to_glib_none().0),
433            ))
434        }
435    }
436
437    #[doc(alias = "gtk_widget_freeze_child_notify")]
438    fn freeze_child_notify(&self) {
439        unsafe {
440            ffi::gtk_widget_freeze_child_notify(self.as_ref().to_glib_none().0);
441        }
442    }
443
444    #[doc(alias = "gtk_widget_get_accessible")]
445    #[doc(alias = "get_accessible")]
446    fn accessible(&self) -> Option<atk::Object> {
447        unsafe {
448            from_glib_none(ffi::gtk_widget_get_accessible(
449                self.as_ref().to_glib_none().0,
450            ))
451        }
452    }
453
454    #[doc(alias = "gtk_widget_get_action_group")]
455    #[doc(alias = "get_action_group")]
456    fn action_group(&self, prefix: &str) -> Option<gio::ActionGroup> {
457        unsafe {
458            from_glib_none(ffi::gtk_widget_get_action_group(
459                self.as_ref().to_glib_none().0,
460                prefix.to_glib_none().0,
461            ))
462        }
463    }
464
465    #[doc(alias = "gtk_widget_get_allocated_baseline")]
466    #[doc(alias = "get_allocated_baseline")]
467    fn allocated_baseline(&self) -> i32 {
468        unsafe { ffi::gtk_widget_get_allocated_baseline(self.as_ref().to_glib_none().0) }
469    }
470
471    #[doc(alias = "gtk_widget_get_allocated_height")]
472    #[doc(alias = "get_allocated_height")]
473    fn allocated_height(&self) -> i32 {
474        unsafe { ffi::gtk_widget_get_allocated_height(self.as_ref().to_glib_none().0) }
475    }
476
477    #[doc(alias = "gtk_widget_get_allocated_size")]
478    #[doc(alias = "get_allocated_size")]
479    fn allocated_size(&self) -> (Allocation, i32) {
480        unsafe {
481            let mut allocation = Allocation::uninitialized();
482            let mut baseline = mem::MaybeUninit::uninit();
483            ffi::gtk_widget_get_allocated_size(
484                self.as_ref().to_glib_none().0,
485                allocation.to_glib_none_mut().0,
486                baseline.as_mut_ptr(),
487            );
488            (allocation, baseline.assume_init())
489        }
490    }
491
492    #[doc(alias = "gtk_widget_get_allocated_width")]
493    #[doc(alias = "get_allocated_width")]
494    fn allocated_width(&self) -> i32 {
495        unsafe { ffi::gtk_widget_get_allocated_width(self.as_ref().to_glib_none().0) }
496    }
497
498    #[doc(alias = "gtk_widget_get_allocation")]
499    #[doc(alias = "get_allocation")]
500    fn allocation(&self) -> Allocation {
501        unsafe {
502            let mut allocation = Allocation::uninitialized();
503            ffi::gtk_widget_get_allocation(
504                self.as_ref().to_glib_none().0,
505                allocation.to_glib_none_mut().0,
506            );
507            allocation
508        }
509    }
510
511    #[doc(alias = "gtk_widget_get_ancestor")]
512    #[doc(alias = "get_ancestor")]
513    #[must_use]
514    fn ancestor(&self, widget_type: glib::types::Type) -> Option<Widget> {
515        unsafe {
516            from_glib_none(ffi::gtk_widget_get_ancestor(
517                self.as_ref().to_glib_none().0,
518                widget_type.into_glib(),
519            ))
520        }
521    }
522
523    #[doc(alias = "gtk_widget_get_app_paintable")]
524    #[doc(alias = "get_app_paintable")]
525    fn is_app_paintable(&self) -> bool {
526        unsafe {
527            from_glib(ffi::gtk_widget_get_app_paintable(
528                self.as_ref().to_glib_none().0,
529            ))
530        }
531    }
532
533    #[doc(alias = "gtk_widget_get_can_default")]
534    #[doc(alias = "get_can_default")]
535    fn can_default(&self) -> bool {
536        unsafe {
537            from_glib(ffi::gtk_widget_get_can_default(
538                self.as_ref().to_glib_none().0,
539            ))
540        }
541    }
542
543    #[doc(alias = "gtk_widget_get_can_focus")]
544    #[doc(alias = "get_can_focus")]
545    fn can_focus(&self) -> bool {
546        unsafe {
547            from_glib(ffi::gtk_widget_get_can_focus(
548                self.as_ref().to_glib_none().0,
549            ))
550        }
551    }
552
553    #[doc(alias = "gtk_widget_get_child_visible")]
554    #[doc(alias = "get_child_visible")]
555    fn is_child_visible(&self) -> bool {
556        unsafe {
557            from_glib(ffi::gtk_widget_get_child_visible(
558                self.as_ref().to_glib_none().0,
559            ))
560        }
561    }
562
563    #[doc(alias = "gtk_widget_get_clip")]
564    #[doc(alias = "get_clip")]
565    fn clip(&self) -> Allocation {
566        unsafe {
567            let mut clip = Allocation::uninitialized();
568            ffi::gtk_widget_get_clip(self.as_ref().to_glib_none().0, clip.to_glib_none_mut().0);
569            clip
570        }
571    }
572
573    #[doc(alias = "gtk_widget_get_clipboard")]
574    #[doc(alias = "get_clipboard")]
575    fn clipboard(&self, selection: &gdk::Atom) -> Clipboard {
576        unsafe {
577            from_glib_none(ffi::gtk_widget_get_clipboard(
578                self.as_ref().to_glib_none().0,
579                selection.to_glib_none().0,
580            ))
581        }
582    }
583
584    #[doc(alias = "gtk_widget_get_device_enabled")]
585    #[doc(alias = "get_device_enabled")]
586    fn device_is_enabled(&self, device: &gdk::Device) -> bool {
587        unsafe {
588            from_glib(ffi::gtk_widget_get_device_enabled(
589                self.as_ref().to_glib_none().0,
590                device.to_glib_none().0,
591            ))
592        }
593    }
594
595    #[doc(alias = "gtk_widget_get_device_events")]
596    #[doc(alias = "get_device_events")]
597    fn device_events(&self, device: &gdk::Device) -> gdk::EventMask {
598        unsafe {
599            from_glib(ffi::gtk_widget_get_device_events(
600                self.as_ref().to_glib_none().0,
601                device.to_glib_none().0,
602            ))
603        }
604    }
605
606    #[doc(alias = "gtk_widget_get_direction")]
607    #[doc(alias = "get_direction")]
608    fn direction(&self) -> TextDirection {
609        unsafe {
610            from_glib(ffi::gtk_widget_get_direction(
611                self.as_ref().to_glib_none().0,
612            ))
613        }
614    }
615
616    #[doc(alias = "gtk_widget_get_display")]
617    #[doc(alias = "get_display")]
618    fn display(&self) -> gdk::Display {
619        unsafe { from_glib_none(ffi::gtk_widget_get_display(self.as_ref().to_glib_none().0)) }
620    }
621
622    #[doc(alias = "gtk_widget_get_double_buffered")]
623    #[doc(alias = "get_double_buffered")]
624    fn is_double_buffered(&self) -> bool {
625        unsafe {
626            from_glib(ffi::gtk_widget_get_double_buffered(
627                self.as_ref().to_glib_none().0,
628            ))
629        }
630    }
631
632    #[doc(alias = "gtk_widget_get_focus_on_click")]
633    #[doc(alias = "get_focus_on_click")]
634    fn gets_focus_on_click(&self) -> bool {
635        unsafe {
636            from_glib(ffi::gtk_widget_get_focus_on_click(
637                self.as_ref().to_glib_none().0,
638            ))
639        }
640    }
641
642    #[doc(alias = "gtk_widget_get_font_map")]
643    #[doc(alias = "get_font_map")]
644    fn font_map(&self) -> Option<pango::FontMap> {
645        unsafe { from_glib_none(ffi::gtk_widget_get_font_map(self.as_ref().to_glib_none().0)) }
646    }
647
648    #[doc(alias = "gtk_widget_get_font_options")]
649    #[doc(alias = "get_font_options")]
650    fn font_options(&self) -> Option<cairo::FontOptions> {
651        unsafe {
652            from_glib_none(ffi::gtk_widget_get_font_options(
653                self.as_ref().to_glib_none().0,
654            ))
655        }
656    }
657
658    #[doc(alias = "gtk_widget_get_frame_clock")]
659    #[doc(alias = "get_frame_clock")]
660    fn frame_clock(&self) -> Option<gdk::FrameClock> {
661        unsafe {
662            from_glib_none(ffi::gtk_widget_get_frame_clock(
663                self.as_ref().to_glib_none().0,
664            ))
665        }
666    }
667
668    #[doc(alias = "gtk_widget_get_halign")]
669    #[doc(alias = "get_halign")]
670    fn halign(&self) -> Align {
671        unsafe { from_glib(ffi::gtk_widget_get_halign(self.as_ref().to_glib_none().0)) }
672    }
673
674    #[doc(alias = "gtk_widget_get_has_tooltip")]
675    #[doc(alias = "get_has_tooltip")]
676    fn has_tooltip(&self) -> bool {
677        unsafe {
678            from_glib(ffi::gtk_widget_get_has_tooltip(
679                self.as_ref().to_glib_none().0,
680            ))
681        }
682    }
683
684    #[doc(alias = "gtk_widget_get_has_window")]
685    #[doc(alias = "get_has_window")]
686    fn has_window(&self) -> bool {
687        unsafe {
688            from_glib(ffi::gtk_widget_get_has_window(
689                self.as_ref().to_glib_none().0,
690            ))
691        }
692    }
693
694    #[doc(alias = "gtk_widget_get_hexpand")]
695    #[doc(alias = "get_hexpand")]
696    fn hexpands(&self) -> bool {
697        unsafe { from_glib(ffi::gtk_widget_get_hexpand(self.as_ref().to_glib_none().0)) }
698    }
699
700    #[doc(alias = "gtk_widget_get_hexpand_set")]
701    #[doc(alias = "get_hexpand_set")]
702    fn is_hexpand_set(&self) -> bool {
703        unsafe {
704            from_glib(ffi::gtk_widget_get_hexpand_set(
705                self.as_ref().to_glib_none().0,
706            ))
707        }
708    }
709
710    #[doc(alias = "gtk_widget_get_mapped")]
711    #[doc(alias = "get_mapped")]
712    fn is_mapped(&self) -> bool {
713        unsafe { from_glib(ffi::gtk_widget_get_mapped(self.as_ref().to_glib_none().0)) }
714    }
715
716    #[doc(alias = "gtk_widget_get_margin_bottom")]
717    #[doc(alias = "get_margin_bottom")]
718    fn margin_bottom(&self) -> i32 {
719        unsafe { ffi::gtk_widget_get_margin_bottom(self.as_ref().to_glib_none().0) }
720    }
721
722    #[doc(alias = "gtk_widget_get_margin_end")]
723    #[doc(alias = "get_margin_end")]
724    fn margin_end(&self) -> i32 {
725        unsafe { ffi::gtk_widget_get_margin_end(self.as_ref().to_glib_none().0) }
726    }
727
728    #[doc(alias = "gtk_widget_get_margin_start")]
729    #[doc(alias = "get_margin_start")]
730    fn margin_start(&self) -> i32 {
731        unsafe { ffi::gtk_widget_get_margin_start(self.as_ref().to_glib_none().0) }
732    }
733
734    #[doc(alias = "gtk_widget_get_margin_top")]
735    #[doc(alias = "get_margin_top")]
736    fn margin_top(&self) -> i32 {
737        unsafe { ffi::gtk_widget_get_margin_top(self.as_ref().to_glib_none().0) }
738    }
739
740    #[doc(alias = "gtk_widget_get_modifier_mask")]
741    #[doc(alias = "get_modifier_mask")]
742    fn modifier_mask(&self, intent: gdk::ModifierIntent) -> gdk::ModifierType {
743        unsafe {
744            from_glib(ffi::gtk_widget_get_modifier_mask(
745                self.as_ref().to_glib_none().0,
746                intent.into_glib(),
747            ))
748        }
749    }
750
751    #[doc(alias = "gtk_widget_get_name")]
752    #[doc(alias = "get_name")]
753    fn widget_name(&self) -> glib::GString {
754        unsafe { from_glib_none(ffi::gtk_widget_get_name(self.as_ref().to_glib_none().0)) }
755    }
756
757    #[doc(alias = "gtk_widget_get_no_show_all")]
758    #[doc(alias = "get_no_show_all")]
759    fn is_no_show_all(&self) -> bool {
760        unsafe {
761            from_glib(ffi::gtk_widget_get_no_show_all(
762                self.as_ref().to_glib_none().0,
763            ))
764        }
765    }
766
767    #[doc(alias = "gtk_widget_get_opacity")]
768    #[doc(alias = "get_opacity")]
769    fn opacity(&self) -> f64 {
770        unsafe { ffi::gtk_widget_get_opacity(self.as_ref().to_glib_none().0) }
771    }
772
773    #[doc(alias = "gtk_widget_get_pango_context")]
774    #[doc(alias = "get_pango_context")]
775    fn pango_context(&self) -> pango::Context {
776        unsafe {
777            from_glib_none(ffi::gtk_widget_get_pango_context(
778                self.as_ref().to_glib_none().0,
779            ))
780        }
781    }
782
783    #[doc(alias = "gtk_widget_get_parent")]
784    #[doc(alias = "get_parent")]
785    #[must_use]
786    fn parent(&self) -> Option<Widget> {
787        unsafe { from_glib_none(ffi::gtk_widget_get_parent(self.as_ref().to_glib_none().0)) }
788    }
789
790    #[doc(alias = "gtk_widget_get_parent_window")]
791    #[doc(alias = "get_parent_window")]
792    fn parent_window(&self) -> Option<gdk::Window> {
793        unsafe {
794            from_glib_none(ffi::gtk_widget_get_parent_window(
795                self.as_ref().to_glib_none().0,
796            ))
797        }
798    }
799
800    #[doc(alias = "gtk_widget_get_path")]
801    #[doc(alias = "get_path")]
802    fn path(&self) -> WidgetPath {
803        unsafe { from_glib_none(ffi::gtk_widget_get_path(self.as_ref().to_glib_none().0)) }
804    }
805
806    #[doc(alias = "gtk_widget_get_preferred_height")]
807    #[doc(alias = "get_preferred_height")]
808    fn preferred_height(&self) -> (i32, i32) {
809        unsafe {
810            let mut minimum_height = mem::MaybeUninit::uninit();
811            let mut natural_height = mem::MaybeUninit::uninit();
812            ffi::gtk_widget_get_preferred_height(
813                self.as_ref().to_glib_none().0,
814                minimum_height.as_mut_ptr(),
815                natural_height.as_mut_ptr(),
816            );
817            (minimum_height.assume_init(), natural_height.assume_init())
818        }
819    }
820
821    #[doc(alias = "gtk_widget_get_preferred_height_and_baseline_for_width")]
822    #[doc(alias = "get_preferred_height_and_baseline_for_width")]
823    fn preferred_height_and_baseline_for_width(&self, width: i32) -> (i32, i32, i32, i32) {
824        unsafe {
825            let mut minimum_height = mem::MaybeUninit::uninit();
826            let mut natural_height = mem::MaybeUninit::uninit();
827            let mut minimum_baseline = mem::MaybeUninit::uninit();
828            let mut natural_baseline = mem::MaybeUninit::uninit();
829            ffi::gtk_widget_get_preferred_height_and_baseline_for_width(
830                self.as_ref().to_glib_none().0,
831                width,
832                minimum_height.as_mut_ptr(),
833                natural_height.as_mut_ptr(),
834                minimum_baseline.as_mut_ptr(),
835                natural_baseline.as_mut_ptr(),
836            );
837            (
838                minimum_height.assume_init(),
839                natural_height.assume_init(),
840                minimum_baseline.assume_init(),
841                natural_baseline.assume_init(),
842            )
843        }
844    }
845
846    #[doc(alias = "gtk_widget_get_preferred_height_for_width")]
847    #[doc(alias = "get_preferred_height_for_width")]
848    fn preferred_height_for_width(&self, width: i32) -> (i32, i32) {
849        unsafe {
850            let mut minimum_height = mem::MaybeUninit::uninit();
851            let mut natural_height = mem::MaybeUninit::uninit();
852            ffi::gtk_widget_get_preferred_height_for_width(
853                self.as_ref().to_glib_none().0,
854                width,
855                minimum_height.as_mut_ptr(),
856                natural_height.as_mut_ptr(),
857            );
858            (minimum_height.assume_init(), natural_height.assume_init())
859        }
860    }
861
862    #[doc(alias = "gtk_widget_get_preferred_size")]
863    #[doc(alias = "get_preferred_size")]
864    fn preferred_size(&self) -> (Requisition, Requisition) {
865        unsafe {
866            let mut minimum_size = Requisition::uninitialized();
867            let mut natural_size = Requisition::uninitialized();
868            ffi::gtk_widget_get_preferred_size(
869                self.as_ref().to_glib_none().0,
870                minimum_size.to_glib_none_mut().0,
871                natural_size.to_glib_none_mut().0,
872            );
873            (minimum_size, natural_size)
874        }
875    }
876
877    #[doc(alias = "gtk_widget_get_preferred_width")]
878    #[doc(alias = "get_preferred_width")]
879    fn preferred_width(&self) -> (i32, i32) {
880        unsafe {
881            let mut minimum_width = mem::MaybeUninit::uninit();
882            let mut natural_width = mem::MaybeUninit::uninit();
883            ffi::gtk_widget_get_preferred_width(
884                self.as_ref().to_glib_none().0,
885                minimum_width.as_mut_ptr(),
886                natural_width.as_mut_ptr(),
887            );
888            (minimum_width.assume_init(), natural_width.assume_init())
889        }
890    }
891
892    #[doc(alias = "gtk_widget_get_preferred_width_for_height")]
893    #[doc(alias = "get_preferred_width_for_height")]
894    fn preferred_width_for_height(&self, height: i32) -> (i32, i32) {
895        unsafe {
896            let mut minimum_width = mem::MaybeUninit::uninit();
897            let mut natural_width = mem::MaybeUninit::uninit();
898            ffi::gtk_widget_get_preferred_width_for_height(
899                self.as_ref().to_glib_none().0,
900                height,
901                minimum_width.as_mut_ptr(),
902                natural_width.as_mut_ptr(),
903            );
904            (minimum_width.assume_init(), natural_width.assume_init())
905        }
906    }
907
908    #[doc(alias = "gtk_widget_get_realized")]
909    #[doc(alias = "get_realized")]
910    fn is_realized(&self) -> bool {
911        unsafe { from_glib(ffi::gtk_widget_get_realized(self.as_ref().to_glib_none().0)) }
912    }
913
914    #[doc(alias = "gtk_widget_get_receives_default")]
915    #[doc(alias = "get_receives_default")]
916    fn receives_default(&self) -> bool {
917        unsafe {
918            from_glib(ffi::gtk_widget_get_receives_default(
919                self.as_ref().to_glib_none().0,
920            ))
921        }
922    }
923
924    #[doc(alias = "gtk_widget_get_request_mode")]
925    #[doc(alias = "get_request_mode")]
926    fn request_mode(&self) -> SizeRequestMode {
927        unsafe {
928            from_glib(ffi::gtk_widget_get_request_mode(
929                self.as_ref().to_glib_none().0,
930            ))
931        }
932    }
933
934    #[doc(alias = "gtk_widget_get_scale_factor")]
935    #[doc(alias = "get_scale_factor")]
936    fn scale_factor(&self) -> i32 {
937        unsafe { ffi::gtk_widget_get_scale_factor(self.as_ref().to_glib_none().0) }
938    }
939
940    #[doc(alias = "gtk_widget_get_screen")]
941    #[doc(alias = "get_screen")]
942    fn screen(&self) -> Option<gdk::Screen> {
943        unsafe { from_glib_none(ffi::gtk_widget_get_screen(self.as_ref().to_glib_none().0)) }
944    }
945
946    #[doc(alias = "gtk_widget_get_sensitive")]
947    fn get_sensitive(&self) -> bool {
948        unsafe {
949            from_glib(ffi::gtk_widget_get_sensitive(
950                self.as_ref().to_glib_none().0,
951            ))
952        }
953    }
954
955    #[doc(alias = "gtk_widget_get_settings")]
956    #[doc(alias = "get_settings")]
957    fn settings(&self) -> Option<Settings> {
958        unsafe { from_glib_none(ffi::gtk_widget_get_settings(self.as_ref().to_glib_none().0)) }
959    }
960
961    #[doc(alias = "gtk_widget_get_size_request")]
962    #[doc(alias = "get_size_request")]
963    fn size_request(&self) -> (i32, i32) {
964        unsafe {
965            let mut width = mem::MaybeUninit::uninit();
966            let mut height = mem::MaybeUninit::uninit();
967            ffi::gtk_widget_get_size_request(
968                self.as_ref().to_glib_none().0,
969                width.as_mut_ptr(),
970                height.as_mut_ptr(),
971            );
972            (width.assume_init(), height.assume_init())
973        }
974    }
975
976    #[doc(alias = "gtk_widget_get_state_flags")]
977    #[doc(alias = "get_state_flags")]
978    fn state_flags(&self) -> StateFlags {
979        unsafe {
980            from_glib(ffi::gtk_widget_get_state_flags(
981                self.as_ref().to_glib_none().0,
982            ))
983        }
984    }
985
986    #[doc(alias = "gtk_widget_get_style_context")]
987    #[doc(alias = "get_style_context")]
988    fn style_context(&self) -> StyleContext {
989        unsafe {
990            from_glib_none(ffi::gtk_widget_get_style_context(
991                self.as_ref().to_glib_none().0,
992            ))
993        }
994    }
995
996    #[doc(alias = "gtk_widget_get_support_multidevice")]
997    #[doc(alias = "get_support_multidevice")]
998    fn supports_multidevice(&self) -> bool {
999        unsafe {
1000            from_glib(ffi::gtk_widget_get_support_multidevice(
1001                self.as_ref().to_glib_none().0,
1002            ))
1003        }
1004    }
1005
1006    #[doc(alias = "gtk_widget_get_template_child")]
1007    #[doc(alias = "get_template_child")]
1008    fn template_child(&self, widget_type: glib::types::Type, name: &str) -> Option<glib::Object> {
1009        unsafe {
1010            from_glib_none(ffi::gtk_widget_get_template_child(
1011                self.as_ref().to_glib_none().0,
1012                widget_type.into_glib(),
1013                name.to_glib_none().0,
1014            ))
1015        }
1016    }
1017
1018    #[doc(alias = "gtk_widget_get_tooltip_markup")]
1019    #[doc(alias = "get_tooltip_markup")]
1020    fn tooltip_markup(&self) -> Option<glib::GString> {
1021        unsafe {
1022            from_glib_full(ffi::gtk_widget_get_tooltip_markup(
1023                self.as_ref().to_glib_none().0,
1024            ))
1025        }
1026    }
1027
1028    #[doc(alias = "gtk_widget_get_tooltip_text")]
1029    #[doc(alias = "get_tooltip_text")]
1030    fn tooltip_text(&self) -> Option<glib::GString> {
1031        unsafe {
1032            from_glib_full(ffi::gtk_widget_get_tooltip_text(
1033                self.as_ref().to_glib_none().0,
1034            ))
1035        }
1036    }
1037
1038    #[doc(alias = "gtk_widget_get_tooltip_window")]
1039    #[doc(alias = "get_tooltip_window")]
1040    fn tooltip_window(&self) -> Option<Window> {
1041        unsafe {
1042            from_glib_none(ffi::gtk_widget_get_tooltip_window(
1043                self.as_ref().to_glib_none().0,
1044            ))
1045        }
1046    }
1047
1048    #[doc(alias = "gtk_widget_get_toplevel")]
1049    #[doc(alias = "get_toplevel")]
1050    #[must_use]
1051    fn toplevel(&self) -> Option<Widget> {
1052        unsafe { from_glib_none(ffi::gtk_widget_get_toplevel(self.as_ref().to_glib_none().0)) }
1053    }
1054
1055    #[doc(alias = "gtk_widget_get_valign")]
1056    #[doc(alias = "get_valign")]
1057    fn valign(&self) -> Align {
1058        unsafe { from_glib(ffi::gtk_widget_get_valign(self.as_ref().to_glib_none().0)) }
1059    }
1060
1061    #[doc(alias = "gtk_widget_get_valign_with_baseline")]
1062    #[doc(alias = "get_valign_with_baseline")]
1063    fn valign_with_baseline(&self) -> Align {
1064        unsafe {
1065            from_glib(ffi::gtk_widget_get_valign_with_baseline(
1066                self.as_ref().to_glib_none().0,
1067            ))
1068        }
1069    }
1070
1071    #[doc(alias = "gtk_widget_get_vexpand")]
1072    #[doc(alias = "get_vexpand")]
1073    fn vexpands(&self) -> bool {
1074        unsafe { from_glib(ffi::gtk_widget_get_vexpand(self.as_ref().to_glib_none().0)) }
1075    }
1076
1077    #[doc(alias = "gtk_widget_get_vexpand_set")]
1078    #[doc(alias = "get_vexpand_set")]
1079    fn is_vexpand_set(&self) -> bool {
1080        unsafe {
1081            from_glib(ffi::gtk_widget_get_vexpand_set(
1082                self.as_ref().to_glib_none().0,
1083            ))
1084        }
1085    }
1086
1087    #[doc(alias = "gtk_widget_get_visible")]
1088    fn get_visible(&self) -> bool {
1089        unsafe { from_glib(ffi::gtk_widget_get_visible(self.as_ref().to_glib_none().0)) }
1090    }
1091
1092    #[doc(alias = "gtk_widget_get_visual")]
1093    #[doc(alias = "get_visual")]
1094    fn visual(&self) -> Option<gdk::Visual> {
1095        unsafe { from_glib_none(ffi::gtk_widget_get_visual(self.as_ref().to_glib_none().0)) }
1096    }
1097
1098    #[doc(alias = "gtk_widget_get_window")]
1099    #[doc(alias = "get_window")]
1100    fn window(&self) -> Option<gdk::Window> {
1101        unsafe { from_glib_none(ffi::gtk_widget_get_window(self.as_ref().to_glib_none().0)) }
1102    }
1103
1104    #[doc(alias = "gtk_grab_add")]
1105    fn grab_add(&self) {
1106        unsafe {
1107            ffi::gtk_grab_add(self.as_ref().to_glib_none().0);
1108        }
1109    }
1110
1111    #[doc(alias = "gtk_widget_grab_default")]
1112    fn grab_default(&self) {
1113        unsafe {
1114            ffi::gtk_widget_grab_default(self.as_ref().to_glib_none().0);
1115        }
1116    }
1117
1118    #[doc(alias = "gtk_widget_grab_focus")]
1119    fn grab_focus(&self) {
1120        unsafe {
1121            ffi::gtk_widget_grab_focus(self.as_ref().to_glib_none().0);
1122        }
1123    }
1124
1125    #[doc(alias = "gtk_grab_remove")]
1126    fn grab_remove(&self) {
1127        unsafe {
1128            ffi::gtk_grab_remove(self.as_ref().to_glib_none().0);
1129        }
1130    }
1131
1132    #[doc(alias = "gtk_widget_has_default")]
1133    fn has_default(&self) -> bool {
1134        unsafe { from_glib(ffi::gtk_widget_has_default(self.as_ref().to_glib_none().0)) }
1135    }
1136
1137    #[doc(alias = "gtk_widget_has_focus")]
1138    fn has_focus(&self) -> bool {
1139        unsafe { from_glib(ffi::gtk_widget_has_focus(self.as_ref().to_glib_none().0)) }
1140    }
1141
1142    #[doc(alias = "gtk_widget_has_grab")]
1143    fn has_grab(&self) -> bool {
1144        unsafe { from_glib(ffi::gtk_widget_has_grab(self.as_ref().to_glib_none().0)) }
1145    }
1146
1147    #[doc(alias = "gtk_widget_has_screen")]
1148    fn has_screen(&self) -> bool {
1149        unsafe { from_glib(ffi::gtk_widget_has_screen(self.as_ref().to_glib_none().0)) }
1150    }
1151
1152    #[doc(alias = "gtk_widget_has_visible_focus")]
1153    fn has_visible_focus(&self) -> bool {
1154        unsafe {
1155            from_glib(ffi::gtk_widget_has_visible_focus(
1156                self.as_ref().to_glib_none().0,
1157            ))
1158        }
1159    }
1160
1161    #[doc(alias = "gtk_widget_hide")]
1162    fn hide(&self) {
1163        unsafe {
1164            ffi::gtk_widget_hide(self.as_ref().to_glib_none().0);
1165        }
1166    }
1167
1168    #[doc(alias = "gtk_widget_in_destruction")]
1169    fn in_destruction(&self) -> bool {
1170        unsafe {
1171            from_glib(ffi::gtk_widget_in_destruction(
1172                self.as_ref().to_glib_none().0,
1173            ))
1174        }
1175    }
1176
1177    #[doc(alias = "gtk_widget_init_template")]
1178    fn init_template(&self) {
1179        unsafe {
1180            ffi::gtk_widget_init_template(self.as_ref().to_glib_none().0);
1181        }
1182    }
1183
1184    #[doc(alias = "gtk_widget_input_shape_combine_region")]
1185    fn input_shape_combine_region(&self, region: Option<&cairo::Region>) {
1186        unsafe {
1187            ffi::gtk_widget_input_shape_combine_region(
1188                self.as_ref().to_glib_none().0,
1189                mut_override(region.to_glib_none().0),
1190            );
1191        }
1192    }
1193
1194    #[doc(alias = "gtk_widget_insert_action_group")]
1195    fn insert_action_group(&self, name: &str, group: Option<&impl IsA<gio::ActionGroup>>) {
1196        unsafe {
1197            ffi::gtk_widget_insert_action_group(
1198                self.as_ref().to_glib_none().0,
1199                name.to_glib_none().0,
1200                group.map(|p| p.as_ref()).to_glib_none().0,
1201            );
1202        }
1203    }
1204
1205    #[doc(alias = "gtk_widget_is_ancestor")]
1206    fn is_ancestor(&self, ancestor: &impl IsA<Widget>) -> bool {
1207        unsafe {
1208            from_glib(ffi::gtk_widget_is_ancestor(
1209                self.as_ref().to_glib_none().0,
1210                ancestor.as_ref().to_glib_none().0,
1211            ))
1212        }
1213    }
1214
1215    #[doc(alias = "gtk_widget_is_drawable")]
1216    fn is_drawable(&self) -> bool {
1217        unsafe { from_glib(ffi::gtk_widget_is_drawable(self.as_ref().to_glib_none().0)) }
1218    }
1219
1220    #[doc(alias = "gtk_widget_is_focus")]
1221    fn is_focus(&self) -> bool {
1222        unsafe { from_glib(ffi::gtk_widget_is_focus(self.as_ref().to_glib_none().0)) }
1223    }
1224
1225    #[doc(alias = "gtk_widget_is_sensitive")]
1226    fn is_sensitive(&self) -> bool {
1227        unsafe { from_glib(ffi::gtk_widget_is_sensitive(self.as_ref().to_glib_none().0)) }
1228    }
1229
1230    #[doc(alias = "gtk_widget_is_toplevel")]
1231    fn is_toplevel(&self) -> bool {
1232        unsafe { from_glib(ffi::gtk_widget_is_toplevel(self.as_ref().to_glib_none().0)) }
1233    }
1234
1235    #[doc(alias = "gtk_widget_is_visible")]
1236    fn is_visible(&self) -> bool {
1237        unsafe { from_glib(ffi::gtk_widget_is_visible(self.as_ref().to_glib_none().0)) }
1238    }
1239
1240    #[doc(alias = "gtk_widget_keynav_failed")]
1241    fn keynav_failed(&self, direction: DirectionType) -> bool {
1242        unsafe {
1243            from_glib(ffi::gtk_widget_keynav_failed(
1244                self.as_ref().to_glib_none().0,
1245                direction.into_glib(),
1246            ))
1247        }
1248    }
1249
1250    #[doc(alias = "gtk_widget_list_accel_closures")]
1251    fn list_accel_closures(&self) -> Vec<glib::Closure> {
1252        unsafe {
1253            FromGlibPtrContainer::from_glib_container(ffi::gtk_widget_list_accel_closures(
1254                self.as_ref().to_glib_none().0,
1255            ))
1256        }
1257    }
1258
1259    #[doc(alias = "gtk_widget_list_action_prefixes")]
1260    fn list_action_prefixes(&self) -> Vec<glib::GString> {
1261        unsafe {
1262            FromGlibPtrContainer::from_glib_container(ffi::gtk_widget_list_action_prefixes(
1263                self.as_ref().to_glib_none().0,
1264            ))
1265        }
1266    }
1267
1268    #[doc(alias = "gtk_widget_list_mnemonic_labels")]
1269    fn list_mnemonic_labels(&self) -> Vec<Widget> {
1270        unsafe {
1271            FromGlibPtrContainer::from_glib_container(ffi::gtk_widget_list_mnemonic_labels(
1272                self.as_ref().to_glib_none().0,
1273            ))
1274        }
1275    }
1276
1277    #[doc(alias = "gtk_widget_map")]
1278    fn map(&self) {
1279        unsafe {
1280            ffi::gtk_widget_map(self.as_ref().to_glib_none().0);
1281        }
1282    }
1283
1284    #[doc(alias = "gtk_widget_mnemonic_activate")]
1285    fn mnemonic_activate(&self, group_cycling: bool) -> bool {
1286        unsafe {
1287            from_glib(ffi::gtk_widget_mnemonic_activate(
1288                self.as_ref().to_glib_none().0,
1289                group_cycling.into_glib(),
1290            ))
1291        }
1292    }
1293
1294    #[doc(alias = "gtk_widget_queue_allocate")]
1295    fn queue_allocate(&self) {
1296        unsafe {
1297            ffi::gtk_widget_queue_allocate(self.as_ref().to_glib_none().0);
1298        }
1299    }
1300
1301    #[doc(alias = "gtk_widget_queue_compute_expand")]
1302    fn queue_compute_expand(&self) {
1303        unsafe {
1304            ffi::gtk_widget_queue_compute_expand(self.as_ref().to_glib_none().0);
1305        }
1306    }
1307
1308    #[doc(alias = "gtk_widget_queue_draw")]
1309    fn queue_draw(&self) {
1310        unsafe {
1311            ffi::gtk_widget_queue_draw(self.as_ref().to_glib_none().0);
1312        }
1313    }
1314
1315    #[doc(alias = "gtk_widget_queue_draw_area")]
1316    fn queue_draw_area(&self, x: i32, y: i32, width: i32, height: i32) {
1317        unsafe {
1318            ffi::gtk_widget_queue_draw_area(self.as_ref().to_glib_none().0, x, y, width, height);
1319        }
1320    }
1321
1322    #[doc(alias = "gtk_widget_queue_draw_region")]
1323    fn queue_draw_region(&self, region: &cairo::Region) {
1324        unsafe {
1325            ffi::gtk_widget_queue_draw_region(
1326                self.as_ref().to_glib_none().0,
1327                region.to_glib_none().0,
1328            );
1329        }
1330    }
1331
1332    #[doc(alias = "gtk_widget_queue_resize")]
1333    fn queue_resize(&self) {
1334        unsafe {
1335            ffi::gtk_widget_queue_resize(self.as_ref().to_glib_none().0);
1336        }
1337    }
1338
1339    #[doc(alias = "gtk_widget_queue_resize_no_redraw")]
1340    fn queue_resize_no_redraw(&self) {
1341        unsafe {
1342            ffi::gtk_widget_queue_resize_no_redraw(self.as_ref().to_glib_none().0);
1343        }
1344    }
1345
1346    #[doc(alias = "gtk_widget_realize")]
1347    fn realize(&self) {
1348        unsafe {
1349            ffi::gtk_widget_realize(self.as_ref().to_glib_none().0);
1350        }
1351    }
1352
1353    #[doc(alias = "gtk_widget_register_window")]
1354    fn register_window(&self, window: &gdk::Window) {
1355        unsafe {
1356            ffi::gtk_widget_register_window(
1357                self.as_ref().to_glib_none().0,
1358                window.to_glib_none().0,
1359            );
1360        }
1361    }
1362
1363    #[doc(alias = "gtk_widget_remove_accelerator")]
1364    fn remove_accelerator(
1365        &self,
1366        accel_group: &impl IsA<AccelGroup>,
1367        accel_key: u32,
1368        accel_mods: gdk::ModifierType,
1369    ) -> bool {
1370        unsafe {
1371            from_glib(ffi::gtk_widget_remove_accelerator(
1372                self.as_ref().to_glib_none().0,
1373                accel_group.as_ref().to_glib_none().0,
1374                accel_key,
1375                accel_mods.into_glib(),
1376            ))
1377        }
1378    }
1379
1380    #[doc(alias = "gtk_widget_remove_mnemonic_label")]
1381    fn remove_mnemonic_label(&self, label: &impl IsA<Widget>) {
1382        unsafe {
1383            ffi::gtk_widget_remove_mnemonic_label(
1384                self.as_ref().to_glib_none().0,
1385                label.as_ref().to_glib_none().0,
1386            );
1387        }
1388    }
1389
1390    #[doc(alias = "gtk_widget_reset_style")]
1391    fn reset_style(&self) {
1392        unsafe {
1393            ffi::gtk_widget_reset_style(self.as_ref().to_glib_none().0);
1394        }
1395    }
1396
1397    #[doc(alias = "gtk_widget_send_focus_change")]
1398    fn send_focus_change(&self, event: &gdk::Event) -> bool {
1399        unsafe {
1400            from_glib(ffi::gtk_widget_send_focus_change(
1401                self.as_ref().to_glib_none().0,
1402                mut_override(event.to_glib_none().0),
1403            ))
1404        }
1405    }
1406
1407    #[doc(alias = "gtk_widget_set_accel_path")]
1408    fn set_accel_path(&self, accel_path: Option<&str>, accel_group: Option<&impl IsA<AccelGroup>>) {
1409        unsafe {
1410            ffi::gtk_widget_set_accel_path(
1411                self.as_ref().to_glib_none().0,
1412                accel_path.to_glib_none().0,
1413                accel_group.map(|p| p.as_ref()).to_glib_none().0,
1414            );
1415        }
1416    }
1417
1418    #[doc(alias = "gtk_widget_set_allocation")]
1419    fn set_allocation(&self, allocation: &Allocation) {
1420        unsafe {
1421            ffi::gtk_widget_set_allocation(
1422                self.as_ref().to_glib_none().0,
1423                allocation.to_glib_none().0,
1424            );
1425        }
1426    }
1427
1428    #[doc(alias = "gtk_widget_set_app_paintable")]
1429    fn set_app_paintable(&self, app_paintable: bool) {
1430        unsafe {
1431            ffi::gtk_widget_set_app_paintable(
1432                self.as_ref().to_glib_none().0,
1433                app_paintable.into_glib(),
1434            );
1435        }
1436    }
1437
1438    #[doc(alias = "gtk_widget_set_can_default")]
1439    fn set_can_default(&self, can_default: bool) {
1440        unsafe {
1441            ffi::gtk_widget_set_can_default(
1442                self.as_ref().to_glib_none().0,
1443                can_default.into_glib(),
1444            );
1445        }
1446    }
1447
1448    #[doc(alias = "gtk_widget_set_can_focus")]
1449    fn set_can_focus(&self, can_focus: bool) {
1450        unsafe {
1451            ffi::gtk_widget_set_can_focus(self.as_ref().to_glib_none().0, can_focus.into_glib());
1452        }
1453    }
1454
1455    #[doc(alias = "gtk_widget_set_child_visible")]
1456    fn set_child_visible(&self, is_visible: bool) {
1457        unsafe {
1458            ffi::gtk_widget_set_child_visible(
1459                self.as_ref().to_glib_none().0,
1460                is_visible.into_glib(),
1461            );
1462        }
1463    }
1464
1465    #[doc(alias = "gtk_widget_set_clip")]
1466    fn set_clip(&self, clip: &Allocation) {
1467        unsafe {
1468            ffi::gtk_widget_set_clip(self.as_ref().to_glib_none().0, clip.to_glib_none().0);
1469        }
1470    }
1471
1472    #[doc(alias = "gtk_widget_set_device_enabled")]
1473    fn set_device_enabled(&self, device: &gdk::Device, enabled: bool) {
1474        unsafe {
1475            ffi::gtk_widget_set_device_enabled(
1476                self.as_ref().to_glib_none().0,
1477                device.to_glib_none().0,
1478                enabled.into_glib(),
1479            );
1480        }
1481    }
1482
1483    #[doc(alias = "gtk_widget_set_device_events")]
1484    fn set_device_events(&self, device: &gdk::Device, events: gdk::EventMask) {
1485        unsafe {
1486            ffi::gtk_widget_set_device_events(
1487                self.as_ref().to_glib_none().0,
1488                device.to_glib_none().0,
1489                events.into_glib(),
1490            );
1491        }
1492    }
1493
1494    #[doc(alias = "gtk_widget_set_direction")]
1495    fn set_direction(&self, dir: TextDirection) {
1496        unsafe {
1497            ffi::gtk_widget_set_direction(self.as_ref().to_glib_none().0, dir.into_glib());
1498        }
1499    }
1500
1501    #[doc(alias = "gtk_widget_set_focus_on_click")]
1502    fn set_focus_on_click(&self, focus_on_click: bool) {
1503        unsafe {
1504            ffi::gtk_widget_set_focus_on_click(
1505                self.as_ref().to_glib_none().0,
1506                focus_on_click.into_glib(),
1507            );
1508        }
1509    }
1510
1511    #[doc(alias = "gtk_widget_set_font_map")]
1512    fn set_font_map(&self, font_map: Option<&impl IsA<pango::FontMap>>) {
1513        unsafe {
1514            ffi::gtk_widget_set_font_map(
1515                self.as_ref().to_glib_none().0,
1516                font_map.map(|p| p.as_ref()).to_glib_none().0,
1517            );
1518        }
1519    }
1520
1521    #[doc(alias = "gtk_widget_set_font_options")]
1522    fn set_font_options(&self, options: Option<&cairo::FontOptions>) {
1523        unsafe {
1524            ffi::gtk_widget_set_font_options(
1525                self.as_ref().to_glib_none().0,
1526                options.to_glib_none().0,
1527            );
1528        }
1529    }
1530
1531    #[doc(alias = "gtk_widget_set_halign")]
1532    fn set_halign(&self, align: Align) {
1533        unsafe {
1534            ffi::gtk_widget_set_halign(self.as_ref().to_glib_none().0, align.into_glib());
1535        }
1536    }
1537
1538    #[doc(alias = "gtk_widget_set_has_tooltip")]
1539    fn set_has_tooltip(&self, has_tooltip: bool) {
1540        unsafe {
1541            ffi::gtk_widget_set_has_tooltip(
1542                self.as_ref().to_glib_none().0,
1543                has_tooltip.into_glib(),
1544            );
1545        }
1546    }
1547
1548    #[doc(alias = "gtk_widget_set_has_window")]
1549    fn set_has_window(&self, has_window: bool) {
1550        unsafe {
1551            ffi::gtk_widget_set_has_window(self.as_ref().to_glib_none().0, has_window.into_glib());
1552        }
1553    }
1554
1555    #[doc(alias = "gtk_widget_set_hexpand")]
1556    fn set_hexpand(&self, expand: bool) {
1557        unsafe {
1558            ffi::gtk_widget_set_hexpand(self.as_ref().to_glib_none().0, expand.into_glib());
1559        }
1560    }
1561
1562    #[doc(alias = "gtk_widget_set_hexpand_set")]
1563    fn set_hexpand_set(&self, set: bool) {
1564        unsafe {
1565            ffi::gtk_widget_set_hexpand_set(self.as_ref().to_glib_none().0, set.into_glib());
1566        }
1567    }
1568
1569    #[doc(alias = "gtk_widget_set_mapped")]
1570    fn set_mapped(&self, mapped: bool) {
1571        unsafe {
1572            ffi::gtk_widget_set_mapped(self.as_ref().to_glib_none().0, mapped.into_glib());
1573        }
1574    }
1575
1576    #[doc(alias = "gtk_widget_set_margin_bottom")]
1577    fn set_margin_bottom(&self, margin: i32) {
1578        unsafe {
1579            ffi::gtk_widget_set_margin_bottom(self.as_ref().to_glib_none().0, margin);
1580        }
1581    }
1582
1583    #[doc(alias = "gtk_widget_set_margin_end")]
1584    fn set_margin_end(&self, margin: i32) {
1585        unsafe {
1586            ffi::gtk_widget_set_margin_end(self.as_ref().to_glib_none().0, margin);
1587        }
1588    }
1589
1590    #[doc(alias = "gtk_widget_set_margin_start")]
1591    fn set_margin_start(&self, margin: i32) {
1592        unsafe {
1593            ffi::gtk_widget_set_margin_start(self.as_ref().to_glib_none().0, margin);
1594        }
1595    }
1596
1597    #[doc(alias = "gtk_widget_set_margin_top")]
1598    fn set_margin_top(&self, margin: i32) {
1599        unsafe {
1600            ffi::gtk_widget_set_margin_top(self.as_ref().to_glib_none().0, margin);
1601        }
1602    }
1603
1604    #[doc(alias = "gtk_widget_set_name")]
1605    #[doc(alias = "set_name")]
1606    fn set_widget_name(&self, name: &str) {
1607        unsafe {
1608            ffi::gtk_widget_set_name(self.as_ref().to_glib_none().0, name.to_glib_none().0);
1609        }
1610    }
1611
1612    #[doc(alias = "gtk_widget_set_no_show_all")]
1613    fn set_no_show_all(&self, no_show_all: bool) {
1614        unsafe {
1615            ffi::gtk_widget_set_no_show_all(
1616                self.as_ref().to_glib_none().0,
1617                no_show_all.into_glib(),
1618            );
1619        }
1620    }
1621
1622    #[doc(alias = "gtk_widget_set_opacity")]
1623    fn set_opacity(&self, opacity: f64) {
1624        unsafe {
1625            ffi::gtk_widget_set_opacity(self.as_ref().to_glib_none().0, opacity);
1626        }
1627    }
1628
1629    #[doc(alias = "gtk_widget_set_parent")]
1630    fn set_parent(&self, parent: &impl IsA<Widget>) {
1631        unsafe {
1632            ffi::gtk_widget_set_parent(
1633                self.as_ref().to_glib_none().0,
1634                parent.as_ref().to_glib_none().0,
1635            );
1636        }
1637    }
1638
1639    #[doc(alias = "gtk_widget_set_parent_window")]
1640    fn set_parent_window(&self, parent_window: &gdk::Window) {
1641        unsafe {
1642            ffi::gtk_widget_set_parent_window(
1643                self.as_ref().to_glib_none().0,
1644                parent_window.to_glib_none().0,
1645            );
1646        }
1647    }
1648
1649    #[doc(alias = "gtk_widget_set_realized")]
1650    fn set_realized(&self, realized: bool) {
1651        unsafe {
1652            ffi::gtk_widget_set_realized(self.as_ref().to_glib_none().0, realized.into_glib());
1653        }
1654    }
1655
1656    #[doc(alias = "gtk_widget_set_receives_default")]
1657    fn set_receives_default(&self, receives_default: bool) {
1658        unsafe {
1659            ffi::gtk_widget_set_receives_default(
1660                self.as_ref().to_glib_none().0,
1661                receives_default.into_glib(),
1662            );
1663        }
1664    }
1665
1666    #[doc(alias = "gtk_widget_set_redraw_on_allocate")]
1667    fn set_redraw_on_allocate(&self, redraw_on_allocate: bool) {
1668        unsafe {
1669            ffi::gtk_widget_set_redraw_on_allocate(
1670                self.as_ref().to_glib_none().0,
1671                redraw_on_allocate.into_glib(),
1672            );
1673        }
1674    }
1675
1676    #[doc(alias = "gtk_widget_set_sensitive")]
1677    fn set_sensitive(&self, sensitive: bool) {
1678        unsafe {
1679            ffi::gtk_widget_set_sensitive(self.as_ref().to_glib_none().0, sensitive.into_glib());
1680        }
1681    }
1682
1683    #[doc(alias = "gtk_widget_set_size_request")]
1684    fn set_size_request(&self, width: i32, height: i32) {
1685        unsafe {
1686            ffi::gtk_widget_set_size_request(self.as_ref().to_glib_none().0, width, height);
1687        }
1688    }
1689
1690    #[doc(alias = "gtk_widget_set_state_flags")]
1691    fn set_state_flags(&self, flags: StateFlags, clear: bool) {
1692        unsafe {
1693            ffi::gtk_widget_set_state_flags(
1694                self.as_ref().to_glib_none().0,
1695                flags.into_glib(),
1696                clear.into_glib(),
1697            );
1698        }
1699    }
1700
1701    #[doc(alias = "gtk_widget_set_support_multidevice")]
1702    fn set_support_multidevice(&self, support_multidevice: bool) {
1703        unsafe {
1704            ffi::gtk_widget_set_support_multidevice(
1705                self.as_ref().to_glib_none().0,
1706                support_multidevice.into_glib(),
1707            );
1708        }
1709    }
1710
1711    #[doc(alias = "gtk_widget_set_tooltip_markup")]
1712    fn set_tooltip_markup(&self, markup: Option<&str>) {
1713        unsafe {
1714            ffi::gtk_widget_set_tooltip_markup(
1715                self.as_ref().to_glib_none().0,
1716                markup.to_glib_none().0,
1717            );
1718        }
1719    }
1720
1721    #[doc(alias = "gtk_widget_set_tooltip_text")]
1722    fn set_tooltip_text(&self, text: Option<&str>) {
1723        unsafe {
1724            ffi::gtk_widget_set_tooltip_text(self.as_ref().to_glib_none().0, text.to_glib_none().0);
1725        }
1726    }
1727
1728    #[doc(alias = "gtk_widget_set_tooltip_window")]
1729    fn set_tooltip_window(&self, custom_window: Option<&impl IsA<Window>>) {
1730        unsafe {
1731            ffi::gtk_widget_set_tooltip_window(
1732                self.as_ref().to_glib_none().0,
1733                custom_window.map(|p| p.as_ref()).to_glib_none().0,
1734            );
1735        }
1736    }
1737
1738    #[doc(alias = "gtk_widget_set_valign")]
1739    fn set_valign(&self, align: Align) {
1740        unsafe {
1741            ffi::gtk_widget_set_valign(self.as_ref().to_glib_none().0, align.into_glib());
1742        }
1743    }
1744
1745    #[doc(alias = "gtk_widget_set_vexpand")]
1746    fn set_vexpand(&self, expand: bool) {
1747        unsafe {
1748            ffi::gtk_widget_set_vexpand(self.as_ref().to_glib_none().0, expand.into_glib());
1749        }
1750    }
1751
1752    #[doc(alias = "gtk_widget_set_vexpand_set")]
1753    fn set_vexpand_set(&self, set: bool) {
1754        unsafe {
1755            ffi::gtk_widget_set_vexpand_set(self.as_ref().to_glib_none().0, set.into_glib());
1756        }
1757    }
1758
1759    #[doc(alias = "gtk_widget_set_visible")]
1760    fn set_visible(&self, visible: bool) {
1761        unsafe {
1762            ffi::gtk_widget_set_visible(self.as_ref().to_glib_none().0, visible.into_glib());
1763        }
1764    }
1765
1766    #[doc(alias = "gtk_widget_set_visual")]
1767    fn set_visual(&self, visual: Option<&gdk::Visual>) {
1768        unsafe {
1769            ffi::gtk_widget_set_visual(self.as_ref().to_glib_none().0, visual.to_glib_none().0);
1770        }
1771    }
1772
1773    #[doc(alias = "gtk_widget_set_window")]
1774    fn set_window(&self, window: gdk::Window) {
1775        unsafe {
1776            ffi::gtk_widget_set_window(self.as_ref().to_glib_none().0, window.into_glib_ptr());
1777        }
1778    }
1779
1780    #[doc(alias = "gtk_widget_shape_combine_region")]
1781    fn shape_combine_region(&self, region: Option<&cairo::Region>) {
1782        unsafe {
1783            ffi::gtk_widget_shape_combine_region(
1784                self.as_ref().to_glib_none().0,
1785                mut_override(region.to_glib_none().0),
1786            );
1787        }
1788    }
1789
1790    #[doc(alias = "gtk_widget_show")]
1791    fn show(&self) {
1792        unsafe {
1793            ffi::gtk_widget_show(self.as_ref().to_glib_none().0);
1794        }
1795    }
1796
1797    #[doc(alias = "gtk_widget_show_all")]
1798    fn show_all(&self) {
1799        unsafe {
1800            ffi::gtk_widget_show_all(self.as_ref().to_glib_none().0);
1801        }
1802    }
1803
1804    #[doc(alias = "gtk_widget_show_now")]
1805    fn show_now(&self) {
1806        unsafe {
1807            ffi::gtk_widget_show_now(self.as_ref().to_glib_none().0);
1808        }
1809    }
1810
1811    #[doc(alias = "gtk_widget_size_allocate")]
1812    fn size_allocate(&self, allocation: &Allocation) {
1813        unsafe {
1814            ffi::gtk_widget_size_allocate(
1815                self.as_ref().to_glib_none().0,
1816                mut_override(allocation.to_glib_none().0),
1817            );
1818        }
1819    }
1820
1821    #[doc(alias = "gtk_widget_size_allocate_with_baseline")]
1822    fn size_allocate_with_baseline(&self, allocation: &mut Allocation, baseline: i32) {
1823        unsafe {
1824            ffi::gtk_widget_size_allocate_with_baseline(
1825                self.as_ref().to_glib_none().0,
1826                allocation.to_glib_none_mut().0,
1827                baseline,
1828            );
1829        }
1830    }
1831
1832    //#[doc(alias = "gtk_widget_style_get")]
1833    //fn style_get(&self, first_property_name: &str, : /*Unknown conversion*//*Unimplemented*/Basic: VarArgs) {
1834    //    unsafe { TODO: call ffi:gtk_widget_style_get() }
1835    //}
1836
1837    #[doc(alias = "gtk_widget_style_get_property")]
1838    fn style_get_property(&self, property_name: &str) -> glib::Value {
1839        unsafe {
1840            let mut value = glib::Value::uninitialized();
1841            ffi::gtk_widget_style_get_property(
1842                self.as_ref().to_glib_none().0,
1843                property_name.to_glib_none().0,
1844                value.to_glib_none_mut().0,
1845            );
1846            value
1847        }
1848    }
1849
1850    //#[doc(alias = "gtk_widget_style_get_valist")]
1851    //fn style_get_valist(&self, first_property_name: &str, var_args: /*Unknown conversion*//*Unimplemented*/Unsupported) {
1852    //    unsafe { TODO: call ffi:gtk_widget_style_get_valist() }
1853    //}
1854
1855    #[doc(alias = "gtk_widget_thaw_child_notify")]
1856    fn thaw_child_notify(&self) {
1857        unsafe {
1858            ffi::gtk_widget_thaw_child_notify(self.as_ref().to_glib_none().0);
1859        }
1860    }
1861
1862    #[doc(alias = "gtk_widget_translate_coordinates")]
1863    fn translate_coordinates(
1864        &self,
1865        dest_widget: &impl IsA<Widget>,
1866        src_x: i32,
1867        src_y: i32,
1868    ) -> Option<(i32, i32)> {
1869        unsafe {
1870            let mut dest_x = mem::MaybeUninit::uninit();
1871            let mut dest_y = mem::MaybeUninit::uninit();
1872            let ret = from_glib(ffi::gtk_widget_translate_coordinates(
1873                self.as_ref().to_glib_none().0,
1874                dest_widget.as_ref().to_glib_none().0,
1875                src_x,
1876                src_y,
1877                dest_x.as_mut_ptr(),
1878                dest_y.as_mut_ptr(),
1879            ));
1880            if ret {
1881                Some((dest_x.assume_init(), dest_y.assume_init()))
1882            } else {
1883                None
1884            }
1885        }
1886    }
1887
1888    #[doc(alias = "gtk_widget_trigger_tooltip_query")]
1889    fn trigger_tooltip_query(&self) {
1890        unsafe {
1891            ffi::gtk_widget_trigger_tooltip_query(self.as_ref().to_glib_none().0);
1892        }
1893    }
1894
1895    #[doc(alias = "gtk_widget_unmap")]
1896    fn unmap(&self) {
1897        unsafe {
1898            ffi::gtk_widget_unmap(self.as_ref().to_glib_none().0);
1899        }
1900    }
1901
1902    #[doc(alias = "gtk_widget_unparent")]
1903    fn unparent(&self) {
1904        unsafe {
1905            ffi::gtk_widget_unparent(self.as_ref().to_glib_none().0);
1906        }
1907    }
1908
1909    #[doc(alias = "gtk_widget_unrealize")]
1910    fn unrealize(&self) {
1911        unsafe {
1912            ffi::gtk_widget_unrealize(self.as_ref().to_glib_none().0);
1913        }
1914    }
1915
1916    #[doc(alias = "gtk_widget_unregister_window")]
1917    fn unregister_window(&self, window: &gdk::Window) {
1918        unsafe {
1919            ffi::gtk_widget_unregister_window(
1920                self.as_ref().to_glib_none().0,
1921                window.to_glib_none().0,
1922            );
1923        }
1924    }
1925
1926    #[doc(alias = "gtk_widget_unset_state_flags")]
1927    fn unset_state_flags(&self, flags: StateFlags) {
1928        unsafe {
1929            ffi::gtk_widget_unset_state_flags(self.as_ref().to_glib_none().0, flags.into_glib());
1930        }
1931    }
1932
1933    #[doc(alias = "composite-child")]
1934    fn is_composite_child(&self) -> bool {
1935        ObjectExt::property(self.as_ref(), "composite-child")
1936    }
1937
1938    fn expands(&self) -> bool {
1939        ObjectExt::property(self.as_ref(), "expand")
1940    }
1941
1942    fn set_expand(&self, expand: bool) {
1943        ObjectExt::set_property(self.as_ref(), "expand", expand)
1944    }
1945
1946    #[doc(alias = "has-default")]
1947    fn set_has_default(&self, has_default: bool) {
1948        ObjectExt::set_property(self.as_ref(), "has-default", has_default)
1949    }
1950
1951    #[doc(alias = "has-focus")]
1952    fn set_has_focus(&self, has_focus: bool) {
1953        ObjectExt::set_property(self.as_ref(), "has-focus", has_focus)
1954    }
1955
1956    #[doc(alias = "height-request")]
1957    fn height_request(&self) -> i32 {
1958        ObjectExt::property(self.as_ref(), "height-request")
1959    }
1960
1961    #[doc(alias = "height-request")]
1962    fn set_height_request(&self, height_request: i32) {
1963        ObjectExt::set_property(self.as_ref(), "height-request", height_request)
1964    }
1965
1966    #[doc(alias = "is-focus")]
1967    fn set_is_focus(&self, is_focus: bool) {
1968        ObjectExt::set_property(self.as_ref(), "is-focus", is_focus)
1969    }
1970
1971    fn margin(&self) -> i32 {
1972        ObjectExt::property(self.as_ref(), "margin")
1973    }
1974
1975    fn set_margin(&self, margin: i32) {
1976        ObjectExt::set_property(self.as_ref(), "margin", margin)
1977    }
1978
1979    #[doc(alias = "width-request")]
1980    fn width_request(&self) -> i32 {
1981        ObjectExt::property(self.as_ref(), "width-request")
1982    }
1983
1984    #[doc(alias = "width-request")]
1985    fn set_width_request(&self, width_request: i32) {
1986        ObjectExt::set_property(self.as_ref(), "width-request", width_request)
1987    }
1988
1989    #[doc(alias = "accel-closures-changed")]
1990    fn connect_accel_closures_changed<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1991        unsafe extern "C" fn accel_closures_changed_trampoline<
1992            P: IsA<Widget>,
1993            F: Fn(&P) + 'static,
1994        >(
1995            this: *mut ffi::GtkWidget,
1996            f: glib::ffi::gpointer,
1997        ) {
1998            let f: &F = &*(f as *const F);
1999            f(Widget::from_glib_borrow(this).unsafe_cast_ref())
2000        }
2001        unsafe {
2002            let f: Box_<F> = Box_::new(f);
2003            connect_raw(
2004                self.as_ptr() as *mut _,
2005                b"accel-closures-changed\0".as_ptr() as *const _,
2006                Some(transmute::<_, unsafe extern "C" fn()>(
2007                    accel_closures_changed_trampoline::<Self, F> as *const (),
2008                )),
2009                Box_::into_raw(f),
2010            )
2011        }
2012    }
2013
2014    #[doc(alias = "button-press-event")]
2015    fn connect_button_press_event<
2016        F: Fn(&Self, &gdk::EventButton) -> glib::Propagation + 'static,
2017    >(
2018        &self,
2019        f: F,
2020    ) -> SignalHandlerId {
2021        unsafe extern "C" fn button_press_event_trampoline<
2022            P: IsA<Widget>,
2023            F: Fn(&P, &gdk::EventButton) -> glib::Propagation + 'static,
2024        >(
2025            this: *mut ffi::GtkWidget,
2026            event: *mut gdk::ffi::GdkEventButton,
2027            f: glib::ffi::gpointer,
2028        ) -> glib::ffi::gboolean {
2029            let f: &F = &*(f as *const F);
2030            f(
2031                Widget::from_glib_borrow(this).unsafe_cast_ref(),
2032                &from_glib_borrow(event),
2033            )
2034            .into_glib()
2035        }
2036        unsafe {
2037            let f: Box_<F> = Box_::new(f);
2038            connect_raw(
2039                self.as_ptr() as *mut _,
2040                b"button-press-event\0".as_ptr() as *const _,
2041                Some(transmute::<_, unsafe extern "C" fn()>(
2042                    button_press_event_trampoline::<Self, F> as *const (),
2043                )),
2044                Box_::into_raw(f),
2045            )
2046        }
2047    }
2048
2049    #[doc(alias = "button-release-event")]
2050    fn connect_button_release_event<
2051        F: Fn(&Self, &gdk::EventButton) -> glib::Propagation + 'static,
2052    >(
2053        &self,
2054        f: F,
2055    ) -> SignalHandlerId {
2056        unsafe extern "C" fn button_release_event_trampoline<
2057            P: IsA<Widget>,
2058            F: Fn(&P, &gdk::EventButton) -> glib::Propagation + 'static,
2059        >(
2060            this: *mut ffi::GtkWidget,
2061            event: *mut gdk::ffi::GdkEventButton,
2062            f: glib::ffi::gpointer,
2063        ) -> glib::ffi::gboolean {
2064            let f: &F = &*(f as *const F);
2065            f(
2066                Widget::from_glib_borrow(this).unsafe_cast_ref(),
2067                &from_glib_borrow(event),
2068            )
2069            .into_glib()
2070        }
2071        unsafe {
2072            let f: Box_<F> = Box_::new(f);
2073            connect_raw(
2074                self.as_ptr() as *mut _,
2075                b"button-release-event\0".as_ptr() as *const _,
2076                Some(transmute::<_, unsafe extern "C" fn()>(
2077                    button_release_event_trampoline::<Self, F> as *const (),
2078                )),
2079                Box_::into_raw(f),
2080            )
2081        }
2082    }
2083
2084    #[doc(alias = "can-activate-accel")]
2085    fn connect_can_activate_accel<F: Fn(&Self, u32) -> bool + 'static>(
2086        &self,
2087        f: F,
2088    ) -> SignalHandlerId {
2089        unsafe extern "C" fn can_activate_accel_trampoline<
2090            P: IsA<Widget>,
2091            F: Fn(&P, u32) -> bool + 'static,
2092        >(
2093            this: *mut ffi::GtkWidget,
2094            signal_id: libc::c_uint,
2095            f: glib::ffi::gpointer,
2096        ) -> glib::ffi::gboolean {
2097            let f: &F = &*(f as *const F);
2098            f(Widget::from_glib_borrow(this).unsafe_cast_ref(), signal_id).into_glib()
2099        }
2100        unsafe {
2101            let f: Box_<F> = Box_::new(f);
2102            connect_raw(
2103                self.as_ptr() as *mut _,
2104                b"can-activate-accel\0".as_ptr() as *const _,
2105                Some(transmute::<_, unsafe extern "C" fn()>(
2106                    can_activate_accel_trampoline::<Self, F> as *const (),
2107                )),
2108                Box_::into_raw(f),
2109            )
2110        }
2111    }
2112
2113    #[doc(alias = "child-notify")]
2114    fn connect_child_notify<F: Fn(&Self, &glib::ParamSpec) + 'static>(
2115        &self,
2116        detail: Option<&str>,
2117        f: F,
2118    ) -> SignalHandlerId {
2119        unsafe extern "C" fn child_notify_trampoline<
2120            P: IsA<Widget>,
2121            F: Fn(&P, &glib::ParamSpec) + 'static,
2122        >(
2123            this: *mut ffi::GtkWidget,
2124            child_property: *mut glib::gobject_ffi::GParamSpec,
2125            f: glib::ffi::gpointer,
2126        ) {
2127            let f: &F = &*(f as *const F);
2128            f(
2129                Widget::from_glib_borrow(this).unsafe_cast_ref(),
2130                &from_glib_borrow(child_property),
2131            )
2132        }
2133        unsafe {
2134            let f: Box_<F> = Box_::new(f);
2135            let detailed_signal_name = detail.map(|name| format!("child-notify::{name}\0"));
2136            let signal_name: &[u8] = detailed_signal_name
2137                .as_ref()
2138                .map_or(&b"child-notify\0"[..], |n| n.as_bytes());
2139            connect_raw(
2140                self.as_ptr() as *mut _,
2141                signal_name.as_ptr() as *const _,
2142                Some(transmute::<_, unsafe extern "C" fn()>(
2143                    child_notify_trampoline::<Self, F> as *const (),
2144                )),
2145                Box_::into_raw(f),
2146            )
2147        }
2148    }
2149
2150    #[doc(alias = "configure-event")]
2151    fn connect_configure_event<F: Fn(&Self, &gdk::EventConfigure) -> bool + 'static>(
2152        &self,
2153        f: F,
2154    ) -> SignalHandlerId {
2155        unsafe extern "C" fn configure_event_trampoline<
2156            P: IsA<Widget>,
2157            F: Fn(&P, &gdk::EventConfigure) -> bool + 'static,
2158        >(
2159            this: *mut ffi::GtkWidget,
2160            event: *mut gdk::ffi::GdkEventConfigure,
2161            f: glib::ffi::gpointer,
2162        ) -> glib::ffi::gboolean {
2163            let f: &F = &*(f as *const F);
2164            f(
2165                Widget::from_glib_borrow(this).unsafe_cast_ref(),
2166                &from_glib_borrow(event),
2167            )
2168            .into_glib()
2169        }
2170        unsafe {
2171            let f: Box_<F> = Box_::new(f);
2172            connect_raw(
2173                self.as_ptr() as *mut _,
2174                b"configure-event\0".as_ptr() as *const _,
2175                Some(transmute::<_, unsafe extern "C" fn()>(
2176                    configure_event_trampoline::<Self, F> as *const (),
2177                )),
2178                Box_::into_raw(f),
2179            )
2180        }
2181    }
2182
2183    #[doc(alias = "damage-event")]
2184    fn connect_damage_event<F: Fn(&Self, &gdk::EventExpose) -> bool + 'static>(
2185        &self,
2186        f: F,
2187    ) -> SignalHandlerId {
2188        unsafe extern "C" fn damage_event_trampoline<
2189            P: IsA<Widget>,
2190            F: Fn(&P, &gdk::EventExpose) -> bool + 'static,
2191        >(
2192            this: *mut ffi::GtkWidget,
2193            event: *mut gdk::ffi::GdkEventExpose,
2194            f: glib::ffi::gpointer,
2195        ) -> glib::ffi::gboolean {
2196            let f: &F = &*(f as *const F);
2197            f(
2198                Widget::from_glib_borrow(this).unsafe_cast_ref(),
2199                &from_glib_borrow(event),
2200            )
2201            .into_glib()
2202        }
2203        unsafe {
2204            let f: Box_<F> = Box_::new(f);
2205            connect_raw(
2206                self.as_ptr() as *mut _,
2207                b"damage-event\0".as_ptr() as *const _,
2208                Some(transmute::<_, unsafe extern "C" fn()>(
2209                    damage_event_trampoline::<Self, F> as *const (),
2210                )),
2211                Box_::into_raw(f),
2212            )
2213        }
2214    }
2215
2216    #[doc(alias = "delete-event")]
2217    fn connect_delete_event<F: Fn(&Self, &gdk::Event) -> glib::Propagation + 'static>(
2218        &self,
2219        f: F,
2220    ) -> SignalHandlerId {
2221        unsafe extern "C" fn delete_event_trampoline<
2222            P: IsA<Widget>,
2223            F: Fn(&P, &gdk::Event) -> glib::Propagation + 'static,
2224        >(
2225            this: *mut ffi::GtkWidget,
2226            event: *mut gdk::ffi::GdkEvent,
2227            f: glib::ffi::gpointer,
2228        ) -> glib::ffi::gboolean {
2229            let f: &F = &*(f as *const F);
2230            f(
2231                Widget::from_glib_borrow(this).unsafe_cast_ref(),
2232                &from_glib_none(event),
2233            )
2234            .into_glib()
2235        }
2236        unsafe {
2237            let f: Box_<F> = Box_::new(f);
2238            connect_raw(
2239                self.as_ptr() as *mut _,
2240                b"delete-event\0".as_ptr() as *const _,
2241                Some(transmute::<_, unsafe extern "C" fn()>(
2242                    delete_event_trampoline::<Self, F> as *const (),
2243                )),
2244                Box_::into_raw(f),
2245            )
2246        }
2247    }
2248
2249    #[doc(alias = "destroy")]
2250    fn connect_destroy<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2251        unsafe extern "C" fn destroy_trampoline<P: IsA<Widget>, F: Fn(&P) + 'static>(
2252            this: *mut ffi::GtkWidget,
2253            f: glib::ffi::gpointer,
2254        ) {
2255            let f: &F = &*(f as *const F);
2256            f(Widget::from_glib_borrow(this).unsafe_cast_ref())
2257        }
2258        unsafe {
2259            let f: Box_<F> = Box_::new(f);
2260            connect_raw(
2261                self.as_ptr() as *mut _,
2262                b"destroy\0".as_ptr() as *const _,
2263                Some(transmute::<_, unsafe extern "C" fn()>(
2264                    destroy_trampoline::<Self, F> as *const (),
2265                )),
2266                Box_::into_raw(f),
2267            )
2268        }
2269    }
2270
2271    #[doc(alias = "destroy-event")]
2272    fn connect_destroy_event<F: Fn(&Self, &gdk::Event) -> glib::Propagation + 'static>(
2273        &self,
2274        f: F,
2275    ) -> SignalHandlerId {
2276        unsafe extern "C" fn destroy_event_trampoline<
2277            P: IsA<Widget>,
2278            F: Fn(&P, &gdk::Event) -> glib::Propagation + 'static,
2279        >(
2280            this: *mut ffi::GtkWidget,
2281            event: *mut gdk::ffi::GdkEvent,
2282            f: glib::ffi::gpointer,
2283        ) -> glib::ffi::gboolean {
2284            let f: &F = &*(f as *const F);
2285            f(
2286                Widget::from_glib_borrow(this).unsafe_cast_ref(),
2287                &from_glib_none(event),
2288            )
2289            .into_glib()
2290        }
2291        unsafe {
2292            let f: Box_<F> = Box_::new(f);
2293            connect_raw(
2294                self.as_ptr() as *mut _,
2295                b"destroy-event\0".as_ptr() as *const _,
2296                Some(transmute::<_, unsafe extern "C" fn()>(
2297                    destroy_event_trampoline::<Self, F> as *const (),
2298                )),
2299                Box_::into_raw(f),
2300            )
2301        }
2302    }
2303
2304    #[doc(alias = "direction-changed")]
2305    fn connect_direction_changed<F: Fn(&Self, TextDirection) + 'static>(
2306        &self,
2307        f: F,
2308    ) -> SignalHandlerId {
2309        unsafe extern "C" fn direction_changed_trampoline<
2310            P: IsA<Widget>,
2311            F: Fn(&P, TextDirection) + 'static,
2312        >(
2313            this: *mut ffi::GtkWidget,
2314            previous_direction: ffi::GtkTextDirection,
2315            f: glib::ffi::gpointer,
2316        ) {
2317            let f: &F = &*(f as *const F);
2318            f(
2319                Widget::from_glib_borrow(this).unsafe_cast_ref(),
2320                from_glib(previous_direction),
2321            )
2322        }
2323        unsafe {
2324            let f: Box_<F> = Box_::new(f);
2325            connect_raw(
2326                self.as_ptr() as *mut _,
2327                b"direction-changed\0".as_ptr() as *const _,
2328                Some(transmute::<_, unsafe extern "C" fn()>(
2329                    direction_changed_trampoline::<Self, F> as *const (),
2330                )),
2331                Box_::into_raw(f),
2332            )
2333        }
2334    }
2335
2336    #[doc(alias = "drag-begin")]
2337    fn connect_drag_begin<F: Fn(&Self, &gdk::DragContext) + 'static>(
2338        &self,
2339        f: F,
2340    ) -> SignalHandlerId {
2341        unsafe extern "C" fn drag_begin_trampoline<
2342            P: IsA<Widget>,
2343            F: Fn(&P, &gdk::DragContext) + 'static,
2344        >(
2345            this: *mut ffi::GtkWidget,
2346            context: *mut gdk::ffi::GdkDragContext,
2347            f: glib::ffi::gpointer,
2348        ) {
2349            let f: &F = &*(f as *const F);
2350            f(
2351                Widget::from_glib_borrow(this).unsafe_cast_ref(),
2352                &from_glib_borrow(context),
2353            )
2354        }
2355        unsafe {
2356            let f: Box_<F> = Box_::new(f);
2357            connect_raw(
2358                self.as_ptr() as *mut _,
2359                b"drag-begin\0".as_ptr() as *const _,
2360                Some(transmute::<_, unsafe extern "C" fn()>(
2361                    drag_begin_trampoline::<Self, F> as *const (),
2362                )),
2363                Box_::into_raw(f),
2364            )
2365        }
2366    }
2367
2368    #[doc(alias = "drag-data-delete")]
2369    fn connect_drag_data_delete<F: Fn(&Self, &gdk::DragContext) + 'static>(
2370        &self,
2371        f: F,
2372    ) -> SignalHandlerId {
2373        unsafe extern "C" fn drag_data_delete_trampoline<
2374            P: IsA<Widget>,
2375            F: Fn(&P, &gdk::DragContext) + 'static,
2376        >(
2377            this: *mut ffi::GtkWidget,
2378            context: *mut gdk::ffi::GdkDragContext,
2379            f: glib::ffi::gpointer,
2380        ) {
2381            let f: &F = &*(f as *const F);
2382            f(
2383                Widget::from_glib_borrow(this).unsafe_cast_ref(),
2384                &from_glib_borrow(context),
2385            )
2386        }
2387        unsafe {
2388            let f: Box_<F> = Box_::new(f);
2389            connect_raw(
2390                self.as_ptr() as *mut _,
2391                b"drag-data-delete\0".as_ptr() as *const _,
2392                Some(transmute::<_, unsafe extern "C" fn()>(
2393                    drag_data_delete_trampoline::<Self, F> as *const (),
2394                )),
2395                Box_::into_raw(f),
2396            )
2397        }
2398    }
2399
2400    #[doc(alias = "drag-data-get")]
2401    fn connect_drag_data_get<
2402        F: Fn(&Self, &gdk::DragContext, &SelectionData, u32, u32) + 'static,
2403    >(
2404        &self,
2405        f: F,
2406    ) -> SignalHandlerId {
2407        unsafe extern "C" fn drag_data_get_trampoline<
2408            P: IsA<Widget>,
2409            F: Fn(&P, &gdk::DragContext, &SelectionData, u32, u32) + 'static,
2410        >(
2411            this: *mut ffi::GtkWidget,
2412            context: *mut gdk::ffi::GdkDragContext,
2413            data: *mut ffi::GtkSelectionData,
2414            info: libc::c_uint,
2415            time: libc::c_uint,
2416            f: glib::ffi::gpointer,
2417        ) {
2418            let f: &F = &*(f as *const F);
2419            f(
2420                Widget::from_glib_borrow(this).unsafe_cast_ref(),
2421                &from_glib_borrow(context),
2422                &from_glib_borrow(data),
2423                info,
2424                time,
2425            )
2426        }
2427        unsafe {
2428            let f: Box_<F> = Box_::new(f);
2429            connect_raw(
2430                self.as_ptr() as *mut _,
2431                b"drag-data-get\0".as_ptr() as *const _,
2432                Some(transmute::<_, unsafe extern "C" fn()>(
2433                    drag_data_get_trampoline::<Self, F> as *const (),
2434                )),
2435                Box_::into_raw(f),
2436            )
2437        }
2438    }
2439
2440    #[doc(alias = "drag-data-received")]
2441    fn connect_drag_data_received<
2442        F: Fn(&Self, &gdk::DragContext, i32, i32, &SelectionData, u32, u32) + 'static,
2443    >(
2444        &self,
2445        f: F,
2446    ) -> SignalHandlerId {
2447        unsafe extern "C" fn drag_data_received_trampoline<
2448            P: IsA<Widget>,
2449            F: Fn(&P, &gdk::DragContext, i32, i32, &SelectionData, u32, u32) + 'static,
2450        >(
2451            this: *mut ffi::GtkWidget,
2452            context: *mut gdk::ffi::GdkDragContext,
2453            x: libc::c_int,
2454            y: libc::c_int,
2455            data: *mut ffi::GtkSelectionData,
2456            info: libc::c_uint,
2457            time: libc::c_uint,
2458            f: glib::ffi::gpointer,
2459        ) {
2460            let f: &F = &*(f as *const F);
2461            f(
2462                Widget::from_glib_borrow(this).unsafe_cast_ref(),
2463                &from_glib_borrow(context),
2464                x,
2465                y,
2466                &from_glib_borrow(data),
2467                info,
2468                time,
2469            )
2470        }
2471        unsafe {
2472            let f: Box_<F> = Box_::new(f);
2473            connect_raw(
2474                self.as_ptr() as *mut _,
2475                b"drag-data-received\0".as_ptr() as *const _,
2476                Some(transmute::<_, unsafe extern "C" fn()>(
2477                    drag_data_received_trampoline::<Self, F> as *const (),
2478                )),
2479                Box_::into_raw(f),
2480            )
2481        }
2482    }
2483
2484    #[doc(alias = "drag-drop")]
2485    fn connect_drag_drop<F: Fn(&Self, &gdk::DragContext, i32, i32, u32) -> bool + 'static>(
2486        &self,
2487        f: F,
2488    ) -> SignalHandlerId {
2489        unsafe extern "C" fn drag_drop_trampoline<
2490            P: IsA<Widget>,
2491            F: Fn(&P, &gdk::DragContext, i32, i32, u32) -> bool + 'static,
2492        >(
2493            this: *mut ffi::GtkWidget,
2494            context: *mut gdk::ffi::GdkDragContext,
2495            x: libc::c_int,
2496            y: libc::c_int,
2497            time: libc::c_uint,
2498            f: glib::ffi::gpointer,
2499        ) -> glib::ffi::gboolean {
2500            let f: &F = &*(f as *const F);
2501            f(
2502                Widget::from_glib_borrow(this).unsafe_cast_ref(),
2503                &from_glib_borrow(context),
2504                x,
2505                y,
2506                time,
2507            )
2508            .into_glib()
2509        }
2510        unsafe {
2511            let f: Box_<F> = Box_::new(f);
2512            connect_raw(
2513                self.as_ptr() as *mut _,
2514                b"drag-drop\0".as_ptr() as *const _,
2515                Some(transmute::<_, unsafe extern "C" fn()>(
2516                    drag_drop_trampoline::<Self, F> as *const (),
2517                )),
2518                Box_::into_raw(f),
2519            )
2520        }
2521    }
2522
2523    #[doc(alias = "drag-end")]
2524    fn connect_drag_end<F: Fn(&Self, &gdk::DragContext) + 'static>(&self, f: F) -> SignalHandlerId {
2525        unsafe extern "C" fn drag_end_trampoline<
2526            P: IsA<Widget>,
2527            F: Fn(&P, &gdk::DragContext) + 'static,
2528        >(
2529            this: *mut ffi::GtkWidget,
2530            context: *mut gdk::ffi::GdkDragContext,
2531            f: glib::ffi::gpointer,
2532        ) {
2533            let f: &F = &*(f as *const F);
2534            f(
2535                Widget::from_glib_borrow(this).unsafe_cast_ref(),
2536                &from_glib_borrow(context),
2537            )
2538        }
2539        unsafe {
2540            let f: Box_<F> = Box_::new(f);
2541            connect_raw(
2542                self.as_ptr() as *mut _,
2543                b"drag-end\0".as_ptr() as *const _,
2544                Some(transmute::<_, unsafe extern "C" fn()>(
2545                    drag_end_trampoline::<Self, F> as *const (),
2546                )),
2547                Box_::into_raw(f),
2548            )
2549        }
2550    }
2551
2552    #[doc(alias = "drag-failed")]
2553    fn connect_drag_failed<
2554        F: Fn(&Self, &gdk::DragContext, DragResult) -> glib::Propagation + 'static,
2555    >(
2556        &self,
2557        f: F,
2558    ) -> SignalHandlerId {
2559        unsafe extern "C" fn drag_failed_trampoline<
2560            P: IsA<Widget>,
2561            F: Fn(&P, &gdk::DragContext, DragResult) -> glib::Propagation + 'static,
2562        >(
2563            this: *mut ffi::GtkWidget,
2564            context: *mut gdk::ffi::GdkDragContext,
2565            result: ffi::GtkDragResult,
2566            f: glib::ffi::gpointer,
2567        ) -> glib::ffi::gboolean {
2568            let f: &F = &*(f as *const F);
2569            f(
2570                Widget::from_glib_borrow(this).unsafe_cast_ref(),
2571                &from_glib_borrow(context),
2572                from_glib(result),
2573            )
2574            .into_glib()
2575        }
2576        unsafe {
2577            let f: Box_<F> = Box_::new(f);
2578            connect_raw(
2579                self.as_ptr() as *mut _,
2580                b"drag-failed\0".as_ptr() as *const _,
2581                Some(transmute::<_, unsafe extern "C" fn()>(
2582                    drag_failed_trampoline::<Self, F> as *const (),
2583                )),
2584                Box_::into_raw(f),
2585            )
2586        }
2587    }
2588
2589    #[doc(alias = "drag-leave")]
2590    fn connect_drag_leave<F: Fn(&Self, &gdk::DragContext, u32) + 'static>(
2591        &self,
2592        f: F,
2593    ) -> SignalHandlerId {
2594        unsafe extern "C" fn drag_leave_trampoline<
2595            P: IsA<Widget>,
2596            F: Fn(&P, &gdk::DragContext, u32) + 'static,
2597        >(
2598            this: *mut ffi::GtkWidget,
2599            context: *mut gdk::ffi::GdkDragContext,
2600            time: libc::c_uint,
2601            f: glib::ffi::gpointer,
2602        ) {
2603            let f: &F = &*(f as *const F);
2604            f(
2605                Widget::from_glib_borrow(this).unsafe_cast_ref(),
2606                &from_glib_borrow(context),
2607                time,
2608            )
2609        }
2610        unsafe {
2611            let f: Box_<F> = Box_::new(f);
2612            connect_raw(
2613                self.as_ptr() as *mut _,
2614                b"drag-leave\0".as_ptr() as *const _,
2615                Some(transmute::<_, unsafe extern "C" fn()>(
2616                    drag_leave_trampoline::<Self, F> as *const (),
2617                )),
2618                Box_::into_raw(f),
2619            )
2620        }
2621    }
2622
2623    #[doc(alias = "drag-motion")]
2624    fn connect_drag_motion<F: Fn(&Self, &gdk::DragContext, i32, i32, u32) -> bool + 'static>(
2625        &self,
2626        f: F,
2627    ) -> SignalHandlerId {
2628        unsafe extern "C" fn drag_motion_trampoline<
2629            P: IsA<Widget>,
2630            F: Fn(&P, &gdk::DragContext, i32, i32, u32) -> bool + 'static,
2631        >(
2632            this: *mut ffi::GtkWidget,
2633            context: *mut gdk::ffi::GdkDragContext,
2634            x: libc::c_int,
2635            y: libc::c_int,
2636            time: libc::c_uint,
2637            f: glib::ffi::gpointer,
2638        ) -> glib::ffi::gboolean {
2639            let f: &F = &*(f as *const F);
2640            f(
2641                Widget::from_glib_borrow(this).unsafe_cast_ref(),
2642                &from_glib_borrow(context),
2643                x,
2644                y,
2645                time,
2646            )
2647            .into_glib()
2648        }
2649        unsafe {
2650            let f: Box_<F> = Box_::new(f);
2651            connect_raw(
2652                self.as_ptr() as *mut _,
2653                b"drag-motion\0".as_ptr() as *const _,
2654                Some(transmute::<_, unsafe extern "C" fn()>(
2655                    drag_motion_trampoline::<Self, F> as *const (),
2656                )),
2657                Box_::into_raw(f),
2658            )
2659        }
2660    }
2661
2662    #[doc(alias = "draw")]
2663    fn connect_draw<F: Fn(&Self, &cairo::Context) -> glib::Propagation + 'static>(
2664        &self,
2665        f: F,
2666    ) -> SignalHandlerId {
2667        unsafe extern "C" fn draw_trampoline<
2668            P: IsA<Widget>,
2669            F: Fn(&P, &cairo::Context) -> glib::Propagation + 'static,
2670        >(
2671            this: *mut ffi::GtkWidget,
2672            cr: *mut cairo::ffi::cairo_t,
2673            f: glib::ffi::gpointer,
2674        ) -> glib::ffi::gboolean {
2675            let f: &F = &*(f as *const F);
2676            f(
2677                Widget::from_glib_borrow(this).unsafe_cast_ref(),
2678                &from_glib_borrow(cr),
2679            )
2680            .into_glib()
2681        }
2682        unsafe {
2683            let f: Box_<F> = Box_::new(f);
2684            connect_raw(
2685                self.as_ptr() as *mut _,
2686                b"draw\0".as_ptr() as *const _,
2687                Some(transmute::<_, unsafe extern "C" fn()>(
2688                    draw_trampoline::<Self, F> as *const (),
2689                )),
2690                Box_::into_raw(f),
2691            )
2692        }
2693    }
2694
2695    #[doc(alias = "enter-notify-event")]
2696    fn connect_enter_notify_event<
2697        F: Fn(&Self, &gdk::EventCrossing) -> glib::Propagation + 'static,
2698    >(
2699        &self,
2700        f: F,
2701    ) -> SignalHandlerId {
2702        unsafe extern "C" fn enter_notify_event_trampoline<
2703            P: IsA<Widget>,
2704            F: Fn(&P, &gdk::EventCrossing) -> glib::Propagation + 'static,
2705        >(
2706            this: *mut ffi::GtkWidget,
2707            event: *mut gdk::ffi::GdkEventCrossing,
2708            f: glib::ffi::gpointer,
2709        ) -> glib::ffi::gboolean {
2710            let f: &F = &*(f as *const F);
2711            f(
2712                Widget::from_glib_borrow(this).unsafe_cast_ref(),
2713                &from_glib_borrow(event),
2714            )
2715            .into_glib()
2716        }
2717        unsafe {
2718            let f: Box_<F> = Box_::new(f);
2719            connect_raw(
2720                self.as_ptr() as *mut _,
2721                b"enter-notify-event\0".as_ptr() as *const _,
2722                Some(transmute::<_, unsafe extern "C" fn()>(
2723                    enter_notify_event_trampoline::<Self, F> as *const (),
2724                )),
2725                Box_::into_raw(f),
2726            )
2727        }
2728    }
2729
2730    #[doc(alias = "event")]
2731    fn connect_event<F: Fn(&Self, &gdk::Event) -> glib::Propagation + 'static>(
2732        &self,
2733        f: F,
2734    ) -> SignalHandlerId {
2735        unsafe extern "C" fn event_trampoline<
2736            P: IsA<Widget>,
2737            F: Fn(&P, &gdk::Event) -> glib::Propagation + 'static,
2738        >(
2739            this: *mut ffi::GtkWidget,
2740            event: *mut gdk::ffi::GdkEvent,
2741            f: glib::ffi::gpointer,
2742        ) -> glib::ffi::gboolean {
2743            let f: &F = &*(f as *const F);
2744            f(
2745                Widget::from_glib_borrow(this).unsafe_cast_ref(),
2746                &from_glib_none(event),
2747            )
2748            .into_glib()
2749        }
2750        unsafe {
2751            let f: Box_<F> = Box_::new(f);
2752            connect_raw(
2753                self.as_ptr() as *mut _,
2754                b"event\0".as_ptr() as *const _,
2755                Some(transmute::<_, unsafe extern "C" fn()>(
2756                    event_trampoline::<Self, F> as *const (),
2757                )),
2758                Box_::into_raw(f),
2759            )
2760        }
2761    }
2762
2763    #[doc(alias = "event-after")]
2764    fn connect_event_after<F: Fn(&Self, &gdk::Event) + 'static>(&self, f: F) -> SignalHandlerId {
2765        unsafe extern "C" fn event_after_trampoline<
2766            P: IsA<Widget>,
2767            F: Fn(&P, &gdk::Event) + 'static,
2768        >(
2769            this: *mut ffi::GtkWidget,
2770            event: *mut gdk::ffi::GdkEvent,
2771            f: glib::ffi::gpointer,
2772        ) {
2773            let f: &F = &*(f as *const F);
2774            f(
2775                Widget::from_glib_borrow(this).unsafe_cast_ref(),
2776                &from_glib_none(event),
2777            )
2778        }
2779        unsafe {
2780            let f: Box_<F> = Box_::new(f);
2781            connect_raw(
2782                self.as_ptr() as *mut _,
2783                b"event-after\0".as_ptr() as *const _,
2784                Some(transmute::<_, unsafe extern "C" fn()>(
2785                    event_after_trampoline::<Self, F> as *const (),
2786                )),
2787                Box_::into_raw(f),
2788            )
2789        }
2790    }
2791
2792    #[doc(alias = "focus")]
2793    fn connect_focus<F: Fn(&Self, DirectionType) -> glib::Propagation + 'static>(
2794        &self,
2795        f: F,
2796    ) -> SignalHandlerId {
2797        unsafe extern "C" fn focus_trampoline<
2798            P: IsA<Widget>,
2799            F: Fn(&P, DirectionType) -> glib::Propagation + 'static,
2800        >(
2801            this: *mut ffi::GtkWidget,
2802            direction: ffi::GtkDirectionType,
2803            f: glib::ffi::gpointer,
2804        ) -> glib::ffi::gboolean {
2805            let f: &F = &*(f as *const F);
2806            f(
2807                Widget::from_glib_borrow(this).unsafe_cast_ref(),
2808                from_glib(direction),
2809            )
2810            .into_glib()
2811        }
2812        unsafe {
2813            let f: Box_<F> = Box_::new(f);
2814            connect_raw(
2815                self.as_ptr() as *mut _,
2816                b"focus\0".as_ptr() as *const _,
2817                Some(transmute::<_, unsafe extern "C" fn()>(
2818                    focus_trampoline::<Self, F> as *const (),
2819                )),
2820                Box_::into_raw(f),
2821            )
2822        }
2823    }
2824
2825    #[doc(alias = "focus-in-event")]
2826    fn connect_focus_in_event<F: Fn(&Self, &gdk::EventFocus) -> glib::Propagation + 'static>(
2827        &self,
2828        f: F,
2829    ) -> SignalHandlerId {
2830        unsafe extern "C" fn focus_in_event_trampoline<
2831            P: IsA<Widget>,
2832            F: Fn(&P, &gdk::EventFocus) -> glib::Propagation + 'static,
2833        >(
2834            this: *mut ffi::GtkWidget,
2835            event: *mut gdk::ffi::GdkEventFocus,
2836            f: glib::ffi::gpointer,
2837        ) -> glib::ffi::gboolean {
2838            let f: &F = &*(f as *const F);
2839            f(
2840                Widget::from_glib_borrow(this).unsafe_cast_ref(),
2841                &from_glib_borrow(event),
2842            )
2843            .into_glib()
2844        }
2845        unsafe {
2846            let f: Box_<F> = Box_::new(f);
2847            connect_raw(
2848                self.as_ptr() as *mut _,
2849                b"focus-in-event\0".as_ptr() as *const _,
2850                Some(transmute::<_, unsafe extern "C" fn()>(
2851                    focus_in_event_trampoline::<Self, F> as *const (),
2852                )),
2853                Box_::into_raw(f),
2854            )
2855        }
2856    }
2857
2858    #[doc(alias = "focus-out-event")]
2859    fn connect_focus_out_event<F: Fn(&Self, &gdk::EventFocus) -> glib::Propagation + 'static>(
2860        &self,
2861        f: F,
2862    ) -> SignalHandlerId {
2863        unsafe extern "C" fn focus_out_event_trampoline<
2864            P: IsA<Widget>,
2865            F: Fn(&P, &gdk::EventFocus) -> glib::Propagation + 'static,
2866        >(
2867            this: *mut ffi::GtkWidget,
2868            event: *mut gdk::ffi::GdkEventFocus,
2869            f: glib::ffi::gpointer,
2870        ) -> glib::ffi::gboolean {
2871            let f: &F = &*(f as *const F);
2872            f(
2873                Widget::from_glib_borrow(this).unsafe_cast_ref(),
2874                &from_glib_borrow(event),
2875            )
2876            .into_glib()
2877        }
2878        unsafe {
2879            let f: Box_<F> = Box_::new(f);
2880            connect_raw(
2881                self.as_ptr() as *mut _,
2882                b"focus-out-event\0".as_ptr() as *const _,
2883                Some(transmute::<_, unsafe extern "C" fn()>(
2884                    focus_out_event_trampoline::<Self, F> as *const (),
2885                )),
2886                Box_::into_raw(f),
2887            )
2888        }
2889    }
2890
2891    #[doc(alias = "grab-broken-event")]
2892    fn connect_grab_broken_event<
2893        F: Fn(&Self, &gdk::EventGrabBroken) -> glib::Propagation + 'static,
2894    >(
2895        &self,
2896        f: F,
2897    ) -> SignalHandlerId {
2898        unsafe extern "C" fn grab_broken_event_trampoline<
2899            P: IsA<Widget>,
2900            F: Fn(&P, &gdk::EventGrabBroken) -> glib::Propagation + 'static,
2901        >(
2902            this: *mut ffi::GtkWidget,
2903            event: *mut gdk::ffi::GdkEventGrabBroken,
2904            f: glib::ffi::gpointer,
2905        ) -> glib::ffi::gboolean {
2906            let f: &F = &*(f as *const F);
2907            f(
2908                Widget::from_glib_borrow(this).unsafe_cast_ref(),
2909                &from_glib_borrow(event),
2910            )
2911            .into_glib()
2912        }
2913        unsafe {
2914            let f: Box_<F> = Box_::new(f);
2915            connect_raw(
2916                self.as_ptr() as *mut _,
2917                b"grab-broken-event\0".as_ptr() as *const _,
2918                Some(transmute::<_, unsafe extern "C" fn()>(
2919                    grab_broken_event_trampoline::<Self, F> as *const (),
2920                )),
2921                Box_::into_raw(f),
2922            )
2923        }
2924    }
2925
2926    #[doc(alias = "grab-focus")]
2927    fn connect_grab_focus<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2928        unsafe extern "C" fn grab_focus_trampoline<P: IsA<Widget>, F: Fn(&P) + 'static>(
2929            this: *mut ffi::GtkWidget,
2930            f: glib::ffi::gpointer,
2931        ) {
2932            let f: &F = &*(f as *const F);
2933            f(Widget::from_glib_borrow(this).unsafe_cast_ref())
2934        }
2935        unsafe {
2936            let f: Box_<F> = Box_::new(f);
2937            connect_raw(
2938                self.as_ptr() as *mut _,
2939                b"grab-focus\0".as_ptr() as *const _,
2940                Some(transmute::<_, unsafe extern "C" fn()>(
2941                    grab_focus_trampoline::<Self, F> as *const (),
2942                )),
2943                Box_::into_raw(f),
2944            )
2945        }
2946    }
2947
2948    fn emit_grab_focus(&self) {
2949        self.emit_by_name::<()>("grab-focus", &[]);
2950    }
2951
2952    #[doc(alias = "grab-notify")]
2953    fn connect_grab_notify<F: Fn(&Self, bool) + 'static>(&self, f: F) -> SignalHandlerId {
2954        unsafe extern "C" fn grab_notify_trampoline<P: IsA<Widget>, F: Fn(&P, bool) + 'static>(
2955            this: *mut ffi::GtkWidget,
2956            was_grabbed: glib::ffi::gboolean,
2957            f: glib::ffi::gpointer,
2958        ) {
2959            let f: &F = &*(f as *const F);
2960            f(
2961                Widget::from_glib_borrow(this).unsafe_cast_ref(),
2962                from_glib(was_grabbed),
2963            )
2964        }
2965        unsafe {
2966            let f: Box_<F> = Box_::new(f);
2967            connect_raw(
2968                self.as_ptr() as *mut _,
2969                b"grab-notify\0".as_ptr() as *const _,
2970                Some(transmute::<_, unsafe extern "C" fn()>(
2971                    grab_notify_trampoline::<Self, F> as *const (),
2972                )),
2973                Box_::into_raw(f),
2974            )
2975        }
2976    }
2977
2978    #[doc(alias = "hide")]
2979    fn connect_hide<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2980        unsafe extern "C" fn hide_trampoline<P: IsA<Widget>, F: Fn(&P) + 'static>(
2981            this: *mut ffi::GtkWidget,
2982            f: glib::ffi::gpointer,
2983        ) {
2984            let f: &F = &*(f as *const F);
2985            f(Widget::from_glib_borrow(this).unsafe_cast_ref())
2986        }
2987        unsafe {
2988            let f: Box_<F> = Box_::new(f);
2989            connect_raw(
2990                self.as_ptr() as *mut _,
2991                b"hide\0".as_ptr() as *const _,
2992                Some(transmute::<_, unsafe extern "C" fn()>(
2993                    hide_trampoline::<Self, F> as *const (),
2994                )),
2995                Box_::into_raw(f),
2996            )
2997        }
2998    }
2999
3000    #[doc(alias = "hierarchy-changed")]
3001    fn connect_hierarchy_changed<F: Fn(&Self, Option<&Widget>) + 'static>(
3002        &self,
3003        f: F,
3004    ) -> SignalHandlerId {
3005        unsafe extern "C" fn hierarchy_changed_trampoline<
3006            P: IsA<Widget>,
3007            F: Fn(&P, Option<&Widget>) + 'static,
3008        >(
3009            this: *mut ffi::GtkWidget,
3010            previous_toplevel: *mut ffi::GtkWidget,
3011            f: glib::ffi::gpointer,
3012        ) {
3013            let f: &F = &*(f as *const F);
3014            f(
3015                Widget::from_glib_borrow(this).unsafe_cast_ref(),
3016                Option::<Widget>::from_glib_borrow(previous_toplevel)
3017                    .as_ref()
3018                    .as_ref(),
3019            )
3020        }
3021        unsafe {
3022            let f: Box_<F> = Box_::new(f);
3023            connect_raw(
3024                self.as_ptr() as *mut _,
3025                b"hierarchy-changed\0".as_ptr() as *const _,
3026                Some(transmute::<_, unsafe extern "C" fn()>(
3027                    hierarchy_changed_trampoline::<Self, F> as *const (),
3028                )),
3029                Box_::into_raw(f),
3030            )
3031        }
3032    }
3033
3034    #[doc(alias = "key-press-event")]
3035    fn connect_key_press_event<F: Fn(&Self, &gdk::EventKey) -> glib::Propagation + 'static>(
3036        &self,
3037        f: F,
3038    ) -> SignalHandlerId {
3039        unsafe extern "C" fn key_press_event_trampoline<
3040            P: IsA<Widget>,
3041            F: Fn(&P, &gdk::EventKey) -> glib::Propagation + 'static,
3042        >(
3043            this: *mut ffi::GtkWidget,
3044            event: *mut gdk::ffi::GdkEventKey,
3045            f: glib::ffi::gpointer,
3046        ) -> glib::ffi::gboolean {
3047            let f: &F = &*(f as *const F);
3048            f(
3049                Widget::from_glib_borrow(this).unsafe_cast_ref(),
3050                &from_glib_borrow(event),
3051            )
3052            .into_glib()
3053        }
3054        unsafe {
3055            let f: Box_<F> = Box_::new(f);
3056            connect_raw(
3057                self.as_ptr() as *mut _,
3058                b"key-press-event\0".as_ptr() as *const _,
3059                Some(transmute::<_, unsafe extern "C" fn()>(
3060                    key_press_event_trampoline::<Self, F> as *const (),
3061                )),
3062                Box_::into_raw(f),
3063            )
3064        }
3065    }
3066
3067    #[doc(alias = "key-release-event")]
3068    fn connect_key_release_event<F: Fn(&Self, &gdk::EventKey) -> glib::Propagation + 'static>(
3069        &self,
3070        f: F,
3071    ) -> SignalHandlerId {
3072        unsafe extern "C" fn key_release_event_trampoline<
3073            P: IsA<Widget>,
3074            F: Fn(&P, &gdk::EventKey) -> glib::Propagation + 'static,
3075        >(
3076            this: *mut ffi::GtkWidget,
3077            event: *mut gdk::ffi::GdkEventKey,
3078            f: glib::ffi::gpointer,
3079        ) -> glib::ffi::gboolean {
3080            let f: &F = &*(f as *const F);
3081            f(
3082                Widget::from_glib_borrow(this).unsafe_cast_ref(),
3083                &from_glib_borrow(event),
3084            )
3085            .into_glib()
3086        }
3087        unsafe {
3088            let f: Box_<F> = Box_::new(f);
3089            connect_raw(
3090                self.as_ptr() as *mut _,
3091                b"key-release-event\0".as_ptr() as *const _,
3092                Some(transmute::<_, unsafe extern "C" fn()>(
3093                    key_release_event_trampoline::<Self, F> as *const (),
3094                )),
3095                Box_::into_raw(f),
3096            )
3097        }
3098    }
3099
3100    #[doc(alias = "keynav-failed")]
3101    fn connect_keynav_failed<F: Fn(&Self, DirectionType) -> glib::Propagation + 'static>(
3102        &self,
3103        f: F,
3104    ) -> SignalHandlerId {
3105        unsafe extern "C" fn keynav_failed_trampoline<
3106            P: IsA<Widget>,
3107            F: Fn(&P, DirectionType) -> glib::Propagation + 'static,
3108        >(
3109            this: *mut ffi::GtkWidget,
3110            direction: ffi::GtkDirectionType,
3111            f: glib::ffi::gpointer,
3112        ) -> glib::ffi::gboolean {
3113            let f: &F = &*(f as *const F);
3114            f(
3115                Widget::from_glib_borrow(this).unsafe_cast_ref(),
3116                from_glib(direction),
3117            )
3118            .into_glib()
3119        }
3120        unsafe {
3121            let f: Box_<F> = Box_::new(f);
3122            connect_raw(
3123                self.as_ptr() as *mut _,
3124                b"keynav-failed\0".as_ptr() as *const _,
3125                Some(transmute::<_, unsafe extern "C" fn()>(
3126                    keynav_failed_trampoline::<Self, F> as *const (),
3127                )),
3128                Box_::into_raw(f),
3129            )
3130        }
3131    }
3132
3133    #[doc(alias = "leave-notify-event")]
3134    fn connect_leave_notify_event<
3135        F: Fn(&Self, &gdk::EventCrossing) -> glib::Propagation + 'static,
3136    >(
3137        &self,
3138        f: F,
3139    ) -> SignalHandlerId {
3140        unsafe extern "C" fn leave_notify_event_trampoline<
3141            P: IsA<Widget>,
3142            F: Fn(&P, &gdk::EventCrossing) -> glib::Propagation + 'static,
3143        >(
3144            this: *mut ffi::GtkWidget,
3145            event: *mut gdk::ffi::GdkEventCrossing,
3146            f: glib::ffi::gpointer,
3147        ) -> glib::ffi::gboolean {
3148            let f: &F = &*(f as *const F);
3149            f(
3150                Widget::from_glib_borrow(this).unsafe_cast_ref(),
3151                &from_glib_borrow(event),
3152            )
3153            .into_glib()
3154        }
3155        unsafe {
3156            let f: Box_<F> = Box_::new(f);
3157            connect_raw(
3158                self.as_ptr() as *mut _,
3159                b"leave-notify-event\0".as_ptr() as *const _,
3160                Some(transmute::<_, unsafe extern "C" fn()>(
3161                    leave_notify_event_trampoline::<Self, F> as *const (),
3162                )),
3163                Box_::into_raw(f),
3164            )
3165        }
3166    }
3167
3168    #[doc(alias = "map")]
3169    fn connect_map<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3170        unsafe extern "C" fn map_trampoline<P: IsA<Widget>, F: Fn(&P) + 'static>(
3171            this: *mut ffi::GtkWidget,
3172            f: glib::ffi::gpointer,
3173        ) {
3174            let f: &F = &*(f as *const F);
3175            f(Widget::from_glib_borrow(this).unsafe_cast_ref())
3176        }
3177        unsafe {
3178            let f: Box_<F> = Box_::new(f);
3179            connect_raw(
3180                self.as_ptr() as *mut _,
3181                b"map\0".as_ptr() as *const _,
3182                Some(transmute::<_, unsafe extern "C" fn()>(
3183                    map_trampoline::<Self, F> as *const (),
3184                )),
3185                Box_::into_raw(f),
3186            )
3187        }
3188    }
3189
3190    #[doc(alias = "mnemonic-activate")]
3191    fn connect_mnemonic_activate<F: Fn(&Self, bool) -> glib::Propagation + 'static>(
3192        &self,
3193        f: F,
3194    ) -> SignalHandlerId {
3195        unsafe extern "C" fn mnemonic_activate_trampoline<
3196            P: IsA<Widget>,
3197            F: Fn(&P, bool) -> glib::Propagation + 'static,
3198        >(
3199            this: *mut ffi::GtkWidget,
3200            group_cycling: glib::ffi::gboolean,
3201            f: glib::ffi::gpointer,
3202        ) -> glib::ffi::gboolean {
3203            let f: &F = &*(f as *const F);
3204            f(
3205                Widget::from_glib_borrow(this).unsafe_cast_ref(),
3206                from_glib(group_cycling),
3207            )
3208            .into_glib()
3209        }
3210        unsafe {
3211            let f: Box_<F> = Box_::new(f);
3212            connect_raw(
3213                self.as_ptr() as *mut _,
3214                b"mnemonic-activate\0".as_ptr() as *const _,
3215                Some(transmute::<_, unsafe extern "C" fn()>(
3216                    mnemonic_activate_trampoline::<Self, F> as *const (),
3217                )),
3218                Box_::into_raw(f),
3219            )
3220        }
3221    }
3222
3223    #[doc(alias = "motion-notify-event")]
3224    fn connect_motion_notify_event<
3225        F: Fn(&Self, &gdk::EventMotion) -> glib::Propagation + 'static,
3226    >(
3227        &self,
3228        f: F,
3229    ) -> SignalHandlerId {
3230        unsafe extern "C" fn motion_notify_event_trampoline<
3231            P: IsA<Widget>,
3232            F: Fn(&P, &gdk::EventMotion) -> glib::Propagation + 'static,
3233        >(
3234            this: *mut ffi::GtkWidget,
3235            event: *mut gdk::ffi::GdkEventMotion,
3236            f: glib::ffi::gpointer,
3237        ) -> glib::ffi::gboolean {
3238            let f: &F = &*(f as *const F);
3239            f(
3240                Widget::from_glib_borrow(this).unsafe_cast_ref(),
3241                &from_glib_borrow(event),
3242            )
3243            .into_glib()
3244        }
3245        unsafe {
3246            let f: Box_<F> = Box_::new(f);
3247            connect_raw(
3248                self.as_ptr() as *mut _,
3249                b"motion-notify-event\0".as_ptr() as *const _,
3250                Some(transmute::<_, unsafe extern "C" fn()>(
3251                    motion_notify_event_trampoline::<Self, F> as *const (),
3252                )),
3253                Box_::into_raw(f),
3254            )
3255        }
3256    }
3257
3258    #[doc(alias = "move-focus")]
3259    fn connect_move_focus<F: Fn(&Self, DirectionType) + 'static>(&self, f: F) -> SignalHandlerId {
3260        unsafe extern "C" fn move_focus_trampoline<
3261            P: IsA<Widget>,
3262            F: Fn(&P, DirectionType) + 'static,
3263        >(
3264            this: *mut ffi::GtkWidget,
3265            direction: ffi::GtkDirectionType,
3266            f: glib::ffi::gpointer,
3267        ) {
3268            let f: &F = &*(f as *const F);
3269            f(
3270                Widget::from_glib_borrow(this).unsafe_cast_ref(),
3271                from_glib(direction),
3272            )
3273        }
3274        unsafe {
3275            let f: Box_<F> = Box_::new(f);
3276            connect_raw(
3277                self.as_ptr() as *mut _,
3278                b"move-focus\0".as_ptr() as *const _,
3279                Some(transmute::<_, unsafe extern "C" fn()>(
3280                    move_focus_trampoline::<Self, F> as *const (),
3281                )),
3282                Box_::into_raw(f),
3283            )
3284        }
3285    }
3286
3287    fn emit_move_focus(&self, direction: DirectionType) {
3288        self.emit_by_name::<()>("move-focus", &[&direction]);
3289    }
3290
3291    #[doc(alias = "parent-set")]
3292    fn connect_parent_set<F: Fn(&Self, Option<&Widget>) + 'static>(&self, f: F) -> SignalHandlerId {
3293        unsafe extern "C" fn parent_set_trampoline<
3294            P: IsA<Widget>,
3295            F: Fn(&P, Option<&Widget>) + 'static,
3296        >(
3297            this: *mut ffi::GtkWidget,
3298            old_parent: *mut ffi::GtkWidget,
3299            f: glib::ffi::gpointer,
3300        ) {
3301            let f: &F = &*(f as *const F);
3302            f(
3303                Widget::from_glib_borrow(this).unsafe_cast_ref(),
3304                Option::<Widget>::from_glib_borrow(old_parent)
3305                    .as_ref()
3306                    .as_ref(),
3307            )
3308        }
3309        unsafe {
3310            let f: Box_<F> = Box_::new(f);
3311            connect_raw(
3312                self.as_ptr() as *mut _,
3313                b"parent-set\0".as_ptr() as *const _,
3314                Some(transmute::<_, unsafe extern "C" fn()>(
3315                    parent_set_trampoline::<Self, F> as *const (),
3316                )),
3317                Box_::into_raw(f),
3318            )
3319        }
3320    }
3321
3322    #[doc(alias = "popup-menu")]
3323    fn connect_popup_menu<F: Fn(&Self) -> bool + 'static>(&self, f: F) -> SignalHandlerId {
3324        unsafe extern "C" fn popup_menu_trampoline<P: IsA<Widget>, F: Fn(&P) -> bool + 'static>(
3325            this: *mut ffi::GtkWidget,
3326            f: glib::ffi::gpointer,
3327        ) -> glib::ffi::gboolean {
3328            let f: &F = &*(f as *const F);
3329            f(Widget::from_glib_borrow(this).unsafe_cast_ref()).into_glib()
3330        }
3331        unsafe {
3332            let f: Box_<F> = Box_::new(f);
3333            connect_raw(
3334                self.as_ptr() as *mut _,
3335                b"popup-menu\0".as_ptr() as *const _,
3336                Some(transmute::<_, unsafe extern "C" fn()>(
3337                    popup_menu_trampoline::<Self, F> as *const (),
3338                )),
3339                Box_::into_raw(f),
3340            )
3341        }
3342    }
3343
3344    fn emit_popup_menu(&self) -> bool {
3345        self.emit_by_name("popup-menu", &[])
3346    }
3347
3348    #[doc(alias = "property-notify-event")]
3349    fn connect_property_notify_event<
3350        F: Fn(&Self, &gdk::EventProperty) -> glib::Propagation + 'static,
3351    >(
3352        &self,
3353        f: F,
3354    ) -> SignalHandlerId {
3355        unsafe extern "C" fn property_notify_event_trampoline<
3356            P: IsA<Widget>,
3357            F: Fn(&P, &gdk::EventProperty) -> glib::Propagation + 'static,
3358        >(
3359            this: *mut ffi::GtkWidget,
3360            event: *mut gdk::ffi::GdkEventProperty,
3361            f: glib::ffi::gpointer,
3362        ) -> glib::ffi::gboolean {
3363            let f: &F = &*(f as *const F);
3364            f(
3365                Widget::from_glib_borrow(this).unsafe_cast_ref(),
3366                &from_glib_borrow(event),
3367            )
3368            .into_glib()
3369        }
3370        unsafe {
3371            let f: Box_<F> = Box_::new(f);
3372            connect_raw(
3373                self.as_ptr() as *mut _,
3374                b"property-notify-event\0".as_ptr() as *const _,
3375                Some(transmute::<_, unsafe extern "C" fn()>(
3376                    property_notify_event_trampoline::<Self, F> as *const (),
3377                )),
3378                Box_::into_raw(f),
3379            )
3380        }
3381    }
3382
3383    #[doc(alias = "proximity-in-event")]
3384    fn connect_proximity_in_event<
3385        F: Fn(&Self, &gdk::EventProximity) -> glib::Propagation + 'static,
3386    >(
3387        &self,
3388        f: F,
3389    ) -> SignalHandlerId {
3390        unsafe extern "C" fn proximity_in_event_trampoline<
3391            P: IsA<Widget>,
3392            F: Fn(&P, &gdk::EventProximity) -> glib::Propagation + 'static,
3393        >(
3394            this: *mut ffi::GtkWidget,
3395            event: *mut gdk::ffi::GdkEventProximity,
3396            f: glib::ffi::gpointer,
3397        ) -> glib::ffi::gboolean {
3398            let f: &F = &*(f as *const F);
3399            f(
3400                Widget::from_glib_borrow(this).unsafe_cast_ref(),
3401                &from_glib_borrow(event),
3402            )
3403            .into_glib()
3404        }
3405        unsafe {
3406            let f: Box_<F> = Box_::new(f);
3407            connect_raw(
3408                self.as_ptr() as *mut _,
3409                b"proximity-in-event\0".as_ptr() as *const _,
3410                Some(transmute::<_, unsafe extern "C" fn()>(
3411                    proximity_in_event_trampoline::<Self, F> as *const (),
3412                )),
3413                Box_::into_raw(f),
3414            )
3415        }
3416    }
3417
3418    #[doc(alias = "proximity-out-event")]
3419    fn connect_proximity_out_event<
3420        F: Fn(&Self, &gdk::EventProximity) -> glib::Propagation + 'static,
3421    >(
3422        &self,
3423        f: F,
3424    ) -> SignalHandlerId {
3425        unsafe extern "C" fn proximity_out_event_trampoline<
3426            P: IsA<Widget>,
3427            F: Fn(&P, &gdk::EventProximity) -> glib::Propagation + 'static,
3428        >(
3429            this: *mut ffi::GtkWidget,
3430            event: *mut gdk::ffi::GdkEventProximity,
3431            f: glib::ffi::gpointer,
3432        ) -> glib::ffi::gboolean {
3433            let f: &F = &*(f as *const F);
3434            f(
3435                Widget::from_glib_borrow(this).unsafe_cast_ref(),
3436                &from_glib_borrow(event),
3437            )
3438            .into_glib()
3439        }
3440        unsafe {
3441            let f: Box_<F> = Box_::new(f);
3442            connect_raw(
3443                self.as_ptr() as *mut _,
3444                b"proximity-out-event\0".as_ptr() as *const _,
3445                Some(transmute::<_, unsafe extern "C" fn()>(
3446                    proximity_out_event_trampoline::<Self, F> as *const (),
3447                )),
3448                Box_::into_raw(f),
3449            )
3450        }
3451    }
3452
3453    #[doc(alias = "query-tooltip")]
3454    fn connect_query_tooltip<F: Fn(&Self, i32, i32, bool, &Tooltip) -> bool + 'static>(
3455        &self,
3456        f: F,
3457    ) -> SignalHandlerId {
3458        unsafe extern "C" fn query_tooltip_trampoline<
3459            P: IsA<Widget>,
3460            F: Fn(&P, i32, i32, bool, &Tooltip) -> bool + 'static,
3461        >(
3462            this: *mut ffi::GtkWidget,
3463            x: libc::c_int,
3464            y: libc::c_int,
3465            keyboard_mode: glib::ffi::gboolean,
3466            tooltip: *mut ffi::GtkTooltip,
3467            f: glib::ffi::gpointer,
3468        ) -> glib::ffi::gboolean {
3469            let f: &F = &*(f as *const F);
3470            f(
3471                Widget::from_glib_borrow(this).unsafe_cast_ref(),
3472                x,
3473                y,
3474                from_glib(keyboard_mode),
3475                &from_glib_borrow(tooltip),
3476            )
3477            .into_glib()
3478        }
3479        unsafe {
3480            let f: Box_<F> = Box_::new(f);
3481            connect_raw(
3482                self.as_ptr() as *mut _,
3483                b"query-tooltip\0".as_ptr() as *const _,
3484                Some(transmute::<_, unsafe extern "C" fn()>(
3485                    query_tooltip_trampoline::<Self, F> as *const (),
3486                )),
3487                Box_::into_raw(f),
3488            )
3489        }
3490    }
3491
3492    #[doc(alias = "realize")]
3493    fn connect_realize<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3494        unsafe extern "C" fn realize_trampoline<P: IsA<Widget>, F: Fn(&P) + 'static>(
3495            this: *mut ffi::GtkWidget,
3496            f: glib::ffi::gpointer,
3497        ) {
3498            let f: &F = &*(f as *const F);
3499            f(Widget::from_glib_borrow(this).unsafe_cast_ref())
3500        }
3501        unsafe {
3502            let f: Box_<F> = Box_::new(f);
3503            connect_raw(
3504                self.as_ptr() as *mut _,
3505                b"realize\0".as_ptr() as *const _,
3506                Some(transmute::<_, unsafe extern "C" fn()>(
3507                    realize_trampoline::<Self, F> as *const (),
3508                )),
3509                Box_::into_raw(f),
3510            )
3511        }
3512    }
3513
3514    #[doc(alias = "screen-changed")]
3515    fn connect_screen_changed<F: Fn(&Self, Option<&gdk::Screen>) + 'static>(
3516        &self,
3517        f: F,
3518    ) -> SignalHandlerId {
3519        unsafe extern "C" fn screen_changed_trampoline<
3520            P: IsA<Widget>,
3521            F: Fn(&P, Option<&gdk::Screen>) + 'static,
3522        >(
3523            this: *mut ffi::GtkWidget,
3524            previous_screen: *mut gdk::ffi::GdkScreen,
3525            f: glib::ffi::gpointer,
3526        ) {
3527            let f: &F = &*(f as *const F);
3528            f(
3529                Widget::from_glib_borrow(this).unsafe_cast_ref(),
3530                Option::<gdk::Screen>::from_glib_borrow(previous_screen)
3531                    .as_ref()
3532                    .as_ref(),
3533            )
3534        }
3535        unsafe {
3536            let f: Box_<F> = Box_::new(f);
3537            connect_raw(
3538                self.as_ptr() as *mut _,
3539                b"screen-changed\0".as_ptr() as *const _,
3540                Some(transmute::<_, unsafe extern "C" fn()>(
3541                    screen_changed_trampoline::<Self, F> as *const (),
3542                )),
3543                Box_::into_raw(f),
3544            )
3545        }
3546    }
3547
3548    #[doc(alias = "scroll-event")]
3549    fn connect_scroll_event<F: Fn(&Self, &gdk::EventScroll) -> glib::Propagation + 'static>(
3550        &self,
3551        f: F,
3552    ) -> SignalHandlerId {
3553        unsafe extern "C" fn scroll_event_trampoline<
3554            P: IsA<Widget>,
3555            F: Fn(&P, &gdk::EventScroll) -> glib::Propagation + 'static,
3556        >(
3557            this: *mut ffi::GtkWidget,
3558            event: *mut gdk::ffi::GdkEventScroll,
3559            f: glib::ffi::gpointer,
3560        ) -> glib::ffi::gboolean {
3561            let f: &F = &*(f as *const F);
3562            f(
3563                Widget::from_glib_borrow(this).unsafe_cast_ref(),
3564                &from_glib_borrow(event),
3565            )
3566            .into_glib()
3567        }
3568        unsafe {
3569            let f: Box_<F> = Box_::new(f);
3570            connect_raw(
3571                self.as_ptr() as *mut _,
3572                b"scroll-event\0".as_ptr() as *const _,
3573                Some(transmute::<_, unsafe extern "C" fn()>(
3574                    scroll_event_trampoline::<Self, F> as *const (),
3575                )),
3576                Box_::into_raw(f),
3577            )
3578        }
3579    }
3580
3581    #[doc(alias = "selection-clear-event")]
3582    fn connect_selection_clear_event<
3583        F: Fn(&Self, &gdk::EventSelection) -> glib::Propagation + 'static,
3584    >(
3585        &self,
3586        f: F,
3587    ) -> SignalHandlerId {
3588        unsafe extern "C" fn selection_clear_event_trampoline<
3589            P: IsA<Widget>,
3590            F: Fn(&P, &gdk::EventSelection) -> glib::Propagation + 'static,
3591        >(
3592            this: *mut ffi::GtkWidget,
3593            event: *mut gdk::ffi::GdkEventSelection,
3594            f: glib::ffi::gpointer,
3595        ) -> glib::ffi::gboolean {
3596            let f: &F = &*(f as *const F);
3597            f(
3598                Widget::from_glib_borrow(this).unsafe_cast_ref(),
3599                &from_glib_borrow(event),
3600            )
3601            .into_glib()
3602        }
3603        unsafe {
3604            let f: Box_<F> = Box_::new(f);
3605            connect_raw(
3606                self.as_ptr() as *mut _,
3607                b"selection-clear-event\0".as_ptr() as *const _,
3608                Some(transmute::<_, unsafe extern "C" fn()>(
3609                    selection_clear_event_trampoline::<Self, F> as *const (),
3610                )),
3611                Box_::into_raw(f),
3612            )
3613        }
3614    }
3615
3616    #[doc(alias = "selection-get")]
3617    fn connect_selection_get<F: Fn(&Self, &SelectionData, u32, u32) + 'static>(
3618        &self,
3619        f: F,
3620    ) -> SignalHandlerId {
3621        unsafe extern "C" fn selection_get_trampoline<
3622            P: IsA<Widget>,
3623            F: Fn(&P, &SelectionData, u32, u32) + 'static,
3624        >(
3625            this: *mut ffi::GtkWidget,
3626            data: *mut ffi::GtkSelectionData,
3627            info: libc::c_uint,
3628            time: libc::c_uint,
3629            f: glib::ffi::gpointer,
3630        ) {
3631            let f: &F = &*(f as *const F);
3632            f(
3633                Widget::from_glib_borrow(this).unsafe_cast_ref(),
3634                &from_glib_borrow(data),
3635                info,
3636                time,
3637            )
3638        }
3639        unsafe {
3640            let f: Box_<F> = Box_::new(f);
3641            connect_raw(
3642                self.as_ptr() as *mut _,
3643                b"selection-get\0".as_ptr() as *const _,
3644                Some(transmute::<_, unsafe extern "C" fn()>(
3645                    selection_get_trampoline::<Self, F> as *const (),
3646                )),
3647                Box_::into_raw(f),
3648            )
3649        }
3650    }
3651
3652    #[doc(alias = "selection-notify-event")]
3653    fn connect_selection_notify_event<
3654        F: Fn(&Self, &gdk::EventSelection) -> glib::Propagation + 'static,
3655    >(
3656        &self,
3657        f: F,
3658    ) -> SignalHandlerId {
3659        unsafe extern "C" fn selection_notify_event_trampoline<
3660            P: IsA<Widget>,
3661            F: Fn(&P, &gdk::EventSelection) -> glib::Propagation + 'static,
3662        >(
3663            this: *mut ffi::GtkWidget,
3664            event: *mut gdk::ffi::GdkEventSelection,
3665            f: glib::ffi::gpointer,
3666        ) -> glib::ffi::gboolean {
3667            let f: &F = &*(f as *const F);
3668            f(
3669                Widget::from_glib_borrow(this).unsafe_cast_ref(),
3670                &from_glib_borrow(event),
3671            )
3672            .into_glib()
3673        }
3674        unsafe {
3675            let f: Box_<F> = Box_::new(f);
3676            connect_raw(
3677                self.as_ptr() as *mut _,
3678                b"selection-notify-event\0".as_ptr() as *const _,
3679                Some(transmute::<_, unsafe extern "C" fn()>(
3680                    selection_notify_event_trampoline::<Self, F> as *const (),
3681                )),
3682                Box_::into_raw(f),
3683            )
3684        }
3685    }
3686
3687    #[doc(alias = "selection-received")]
3688    fn connect_selection_received<F: Fn(&Self, &SelectionData, u32) + 'static>(
3689        &self,
3690        f: F,
3691    ) -> SignalHandlerId {
3692        unsafe extern "C" fn selection_received_trampoline<
3693            P: IsA<Widget>,
3694            F: Fn(&P, &SelectionData, u32) + 'static,
3695        >(
3696            this: *mut ffi::GtkWidget,
3697            data: *mut ffi::GtkSelectionData,
3698            time: libc::c_uint,
3699            f: glib::ffi::gpointer,
3700        ) {
3701            let f: &F = &*(f as *const F);
3702            f(
3703                Widget::from_glib_borrow(this).unsafe_cast_ref(),
3704                &from_glib_borrow(data),
3705                time,
3706            )
3707        }
3708        unsafe {
3709            let f: Box_<F> = Box_::new(f);
3710            connect_raw(
3711                self.as_ptr() as *mut _,
3712                b"selection-received\0".as_ptr() as *const _,
3713                Some(transmute::<_, unsafe extern "C" fn()>(
3714                    selection_received_trampoline::<Self, F> as *const (),
3715                )),
3716                Box_::into_raw(f),
3717            )
3718        }
3719    }
3720
3721    #[doc(alias = "selection-request-event")]
3722    fn connect_selection_request_event<
3723        F: Fn(&Self, &gdk::EventSelection) -> glib::Propagation + 'static,
3724    >(
3725        &self,
3726        f: F,
3727    ) -> SignalHandlerId {
3728        unsafe extern "C" fn selection_request_event_trampoline<
3729            P: IsA<Widget>,
3730            F: Fn(&P, &gdk::EventSelection) -> glib::Propagation + 'static,
3731        >(
3732            this: *mut ffi::GtkWidget,
3733            event: *mut gdk::ffi::GdkEventSelection,
3734            f: glib::ffi::gpointer,
3735        ) -> glib::ffi::gboolean {
3736            let f: &F = &*(f as *const F);
3737            f(
3738                Widget::from_glib_borrow(this).unsafe_cast_ref(),
3739                &from_glib_borrow(event),
3740            )
3741            .into_glib()
3742        }
3743        unsafe {
3744            let f: Box_<F> = Box_::new(f);
3745            connect_raw(
3746                self.as_ptr() as *mut _,
3747                b"selection-request-event\0".as_ptr() as *const _,
3748                Some(transmute::<_, unsafe extern "C" fn()>(
3749                    selection_request_event_trampoline::<Self, F> as *const (),
3750                )),
3751                Box_::into_raw(f),
3752            )
3753        }
3754    }
3755
3756    #[doc(alias = "show")]
3757    fn connect_show<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3758        unsafe extern "C" fn show_trampoline<P: IsA<Widget>, F: Fn(&P) + 'static>(
3759            this: *mut ffi::GtkWidget,
3760            f: glib::ffi::gpointer,
3761        ) {
3762            let f: &F = &*(f as *const F);
3763            f(Widget::from_glib_borrow(this).unsafe_cast_ref())
3764        }
3765        unsafe {
3766            let f: Box_<F> = Box_::new(f);
3767            connect_raw(
3768                self.as_ptr() as *mut _,
3769                b"show\0".as_ptr() as *const _,
3770                Some(transmute::<_, unsafe extern "C" fn()>(
3771                    show_trampoline::<Self, F> as *const (),
3772                )),
3773                Box_::into_raw(f),
3774            )
3775        }
3776    }
3777
3778    #[doc(alias = "show-help")]
3779    fn connect_show_help<F: Fn(&Self, WidgetHelpType) -> bool + 'static>(
3780        &self,
3781        f: F,
3782    ) -> SignalHandlerId {
3783        unsafe extern "C" fn show_help_trampoline<
3784            P: IsA<Widget>,
3785            F: Fn(&P, WidgetHelpType) -> bool + 'static,
3786        >(
3787            this: *mut ffi::GtkWidget,
3788            help_type: ffi::GtkWidgetHelpType,
3789            f: glib::ffi::gpointer,
3790        ) -> glib::ffi::gboolean {
3791            let f: &F = &*(f as *const F);
3792            f(
3793                Widget::from_glib_borrow(this).unsafe_cast_ref(),
3794                from_glib(help_type),
3795            )
3796            .into_glib()
3797        }
3798        unsafe {
3799            let f: Box_<F> = Box_::new(f);
3800            connect_raw(
3801                self.as_ptr() as *mut _,
3802                b"show-help\0".as_ptr() as *const _,
3803                Some(transmute::<_, unsafe extern "C" fn()>(
3804                    show_help_trampoline::<Self, F> as *const (),
3805                )),
3806                Box_::into_raw(f),
3807            )
3808        }
3809    }
3810
3811    fn emit_show_help(&self, help_type: WidgetHelpType) -> bool {
3812        self.emit_by_name("show-help", &[&help_type])
3813    }
3814
3815    #[doc(alias = "size-allocate")]
3816    fn connect_size_allocate<F: Fn(&Self, &Allocation) + 'static>(&self, f: F) -> SignalHandlerId {
3817        unsafe extern "C" fn size_allocate_trampoline<
3818            P: IsA<Widget>,
3819            F: Fn(&P, &Allocation) + 'static,
3820        >(
3821            this: *mut ffi::GtkWidget,
3822            allocation: *mut ffi::GtkAllocation,
3823            f: glib::ffi::gpointer,
3824        ) {
3825            let f: &F = &*(f as *const F);
3826            f(
3827                Widget::from_glib_borrow(this).unsafe_cast_ref(),
3828                &from_glib_none(allocation),
3829            )
3830        }
3831        unsafe {
3832            let f: Box_<F> = Box_::new(f);
3833            connect_raw(
3834                self.as_ptr() as *mut _,
3835                b"size-allocate\0".as_ptr() as *const _,
3836                Some(transmute::<_, unsafe extern "C" fn()>(
3837                    size_allocate_trampoline::<Self, F> as *const (),
3838                )),
3839                Box_::into_raw(f),
3840            )
3841        }
3842    }
3843
3844    #[doc(alias = "state-flags-changed")]
3845    fn connect_state_flags_changed<F: Fn(&Self, StateFlags) + 'static>(
3846        &self,
3847        f: F,
3848    ) -> SignalHandlerId {
3849        unsafe extern "C" fn state_flags_changed_trampoline<
3850            P: IsA<Widget>,
3851            F: Fn(&P, StateFlags) + 'static,
3852        >(
3853            this: *mut ffi::GtkWidget,
3854            flags: ffi::GtkStateFlags,
3855            f: glib::ffi::gpointer,
3856        ) {
3857            let f: &F = &*(f as *const F);
3858            f(
3859                Widget::from_glib_borrow(this).unsafe_cast_ref(),
3860                from_glib(flags),
3861            )
3862        }
3863        unsafe {
3864            let f: Box_<F> = Box_::new(f);
3865            connect_raw(
3866                self.as_ptr() as *mut _,
3867                b"state-flags-changed\0".as_ptr() as *const _,
3868                Some(transmute::<_, unsafe extern "C" fn()>(
3869                    state_flags_changed_trampoline::<Self, F> as *const (),
3870                )),
3871                Box_::into_raw(f),
3872            )
3873        }
3874    }
3875
3876    #[doc(alias = "style-updated")]
3877    fn connect_style_updated<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3878        unsafe extern "C" fn style_updated_trampoline<P: IsA<Widget>, F: Fn(&P) + 'static>(
3879            this: *mut ffi::GtkWidget,
3880            f: glib::ffi::gpointer,
3881        ) {
3882            let f: &F = &*(f as *const F);
3883            f(Widget::from_glib_borrow(this).unsafe_cast_ref())
3884        }
3885        unsafe {
3886            let f: Box_<F> = Box_::new(f);
3887            connect_raw(
3888                self.as_ptr() as *mut _,
3889                b"style-updated\0".as_ptr() as *const _,
3890                Some(transmute::<_, unsafe extern "C" fn()>(
3891                    style_updated_trampoline::<Self, F> as *const (),
3892                )),
3893                Box_::into_raw(f),
3894            )
3895        }
3896    }
3897
3898    #[doc(alias = "touch-event")]
3899    fn connect_touch_event<F: Fn(&Self, &gdk::Event) -> glib::Propagation + 'static>(
3900        &self,
3901        f: F,
3902    ) -> SignalHandlerId {
3903        unsafe extern "C" fn touch_event_trampoline<
3904            P: IsA<Widget>,
3905            F: Fn(&P, &gdk::Event) -> glib::Propagation + 'static,
3906        >(
3907            this: *mut ffi::GtkWidget,
3908            object: *mut gdk::ffi::GdkEvent,
3909            f: glib::ffi::gpointer,
3910        ) -> glib::ffi::gboolean {
3911            let f: &F = &*(f as *const F);
3912            f(
3913                Widget::from_glib_borrow(this).unsafe_cast_ref(),
3914                &from_glib_none(object),
3915            )
3916            .into_glib()
3917        }
3918        unsafe {
3919            let f: Box_<F> = Box_::new(f);
3920            connect_raw(
3921                self.as_ptr() as *mut _,
3922                b"touch-event\0".as_ptr() as *const _,
3923                Some(transmute::<_, unsafe extern "C" fn()>(
3924                    touch_event_trampoline::<Self, F> as *const (),
3925                )),
3926                Box_::into_raw(f),
3927            )
3928        }
3929    }
3930
3931    #[doc(alias = "unmap")]
3932    fn connect_unmap<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3933        unsafe extern "C" fn unmap_trampoline<P: IsA<Widget>, F: Fn(&P) + 'static>(
3934            this: *mut ffi::GtkWidget,
3935            f: glib::ffi::gpointer,
3936        ) {
3937            let f: &F = &*(f as *const F);
3938            f(Widget::from_glib_borrow(this).unsafe_cast_ref())
3939        }
3940        unsafe {
3941            let f: Box_<F> = Box_::new(f);
3942            connect_raw(
3943                self.as_ptr() as *mut _,
3944                b"unmap\0".as_ptr() as *const _,
3945                Some(transmute::<_, unsafe extern "C" fn()>(
3946                    unmap_trampoline::<Self, F> as *const (),
3947                )),
3948                Box_::into_raw(f),
3949            )
3950        }
3951    }
3952
3953    #[doc(alias = "unrealize")]
3954    fn connect_unrealize<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3955        unsafe extern "C" fn unrealize_trampoline<P: IsA<Widget>, F: Fn(&P) + 'static>(
3956            this: *mut ffi::GtkWidget,
3957            f: glib::ffi::gpointer,
3958        ) {
3959            let f: &F = &*(f as *const F);
3960            f(Widget::from_glib_borrow(this).unsafe_cast_ref())
3961        }
3962        unsafe {
3963            let f: Box_<F> = Box_::new(f);
3964            connect_raw(
3965                self.as_ptr() as *mut _,
3966                b"unrealize\0".as_ptr() as *const _,
3967                Some(transmute::<_, unsafe extern "C" fn()>(
3968                    unrealize_trampoline::<Self, F> as *const (),
3969                )),
3970                Box_::into_raw(f),
3971            )
3972        }
3973    }
3974
3975    #[doc(alias = "window-state-event")]
3976    fn connect_window_state_event<
3977        F: Fn(&Self, &gdk::EventWindowState) -> glib::Propagation + 'static,
3978    >(
3979        &self,
3980        f: F,
3981    ) -> SignalHandlerId {
3982        unsafe extern "C" fn window_state_event_trampoline<
3983            P: IsA<Widget>,
3984            F: Fn(&P, &gdk::EventWindowState) -> glib::Propagation + 'static,
3985        >(
3986            this: *mut ffi::GtkWidget,
3987            event: *mut gdk::ffi::GdkEventWindowState,
3988            f: glib::ffi::gpointer,
3989        ) -> glib::ffi::gboolean {
3990            let f: &F = &*(f as *const F);
3991            f(
3992                Widget::from_glib_borrow(this).unsafe_cast_ref(),
3993                &from_glib_borrow(event),
3994            )
3995            .into_glib()
3996        }
3997        unsafe {
3998            let f: Box_<F> = Box_::new(f);
3999            connect_raw(
4000                self.as_ptr() as *mut _,
4001                b"window-state-event\0".as_ptr() as *const _,
4002                Some(transmute::<_, unsafe extern "C" fn()>(
4003                    window_state_event_trampoline::<Self, F> as *const (),
4004                )),
4005                Box_::into_raw(f),
4006            )
4007        }
4008    }
4009
4010    #[doc(alias = "app-paintable")]
4011    fn connect_app_paintable_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4012        unsafe extern "C" fn notify_app_paintable_trampoline<
4013            P: IsA<Widget>,
4014            F: Fn(&P) + 'static,
4015        >(
4016            this: *mut ffi::GtkWidget,
4017            _param_spec: glib::ffi::gpointer,
4018            f: glib::ffi::gpointer,
4019        ) {
4020            let f: &F = &*(f as *const F);
4021            f(Widget::from_glib_borrow(this).unsafe_cast_ref())
4022        }
4023        unsafe {
4024            let f: Box_<F> = Box_::new(f);
4025            connect_raw(
4026                self.as_ptr() as *mut _,
4027                b"notify::app-paintable\0".as_ptr() as *const _,
4028                Some(transmute::<_, unsafe extern "C" fn()>(
4029                    notify_app_paintable_trampoline::<Self, F> as *const (),
4030                )),
4031                Box_::into_raw(f),
4032            )
4033        }
4034    }
4035
4036    #[doc(alias = "can-default")]
4037    fn connect_can_default_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4038        unsafe extern "C" fn notify_can_default_trampoline<P: IsA<Widget>, F: Fn(&P) + 'static>(
4039            this: *mut ffi::GtkWidget,
4040            _param_spec: glib::ffi::gpointer,
4041            f: glib::ffi::gpointer,
4042        ) {
4043            let f: &F = &*(f as *const F);
4044            f(Widget::from_glib_borrow(this).unsafe_cast_ref())
4045        }
4046        unsafe {
4047            let f: Box_<F> = Box_::new(f);
4048            connect_raw(
4049                self.as_ptr() as *mut _,
4050                b"notify::can-default\0".as_ptr() as *const _,
4051                Some(transmute::<_, unsafe extern "C" fn()>(
4052                    notify_can_default_trampoline::<Self, F> as *const (),
4053                )),
4054                Box_::into_raw(f),
4055            )
4056        }
4057    }
4058
4059    #[doc(alias = "can-focus")]
4060    fn connect_can_focus_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4061        unsafe extern "C" fn notify_can_focus_trampoline<P: IsA<Widget>, F: Fn(&P) + 'static>(
4062            this: *mut ffi::GtkWidget,
4063            _param_spec: glib::ffi::gpointer,
4064            f: glib::ffi::gpointer,
4065        ) {
4066            let f: &F = &*(f as *const F);
4067            f(Widget::from_glib_borrow(this).unsafe_cast_ref())
4068        }
4069        unsafe {
4070            let f: Box_<F> = Box_::new(f);
4071            connect_raw(
4072                self.as_ptr() as *mut _,
4073                b"notify::can-focus\0".as_ptr() as *const _,
4074                Some(transmute::<_, unsafe extern "C" fn()>(
4075                    notify_can_focus_trampoline::<Self, F> as *const (),
4076                )),
4077                Box_::into_raw(f),
4078            )
4079        }
4080    }
4081
4082    #[doc(alias = "composite-child")]
4083    fn connect_composite_child_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4084        unsafe extern "C" fn notify_composite_child_trampoline<
4085            P: IsA<Widget>,
4086            F: Fn(&P) + 'static,
4087        >(
4088            this: *mut ffi::GtkWidget,
4089            _param_spec: glib::ffi::gpointer,
4090            f: glib::ffi::gpointer,
4091        ) {
4092            let f: &F = &*(f as *const F);
4093            f(Widget::from_glib_borrow(this).unsafe_cast_ref())
4094        }
4095        unsafe {
4096            let f: Box_<F> = Box_::new(f);
4097            connect_raw(
4098                self.as_ptr() as *mut _,
4099                b"notify::composite-child\0".as_ptr() as *const _,
4100                Some(transmute::<_, unsafe extern "C" fn()>(
4101                    notify_composite_child_trampoline::<Self, F> as *const (),
4102                )),
4103                Box_::into_raw(f),
4104            )
4105        }
4106    }
4107
4108    #[doc(alias = "events")]
4109    fn connect_events_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4110        unsafe extern "C" fn notify_events_trampoline<P: IsA<Widget>, F: Fn(&P) + 'static>(
4111            this: *mut ffi::GtkWidget,
4112            _param_spec: glib::ffi::gpointer,
4113            f: glib::ffi::gpointer,
4114        ) {
4115            let f: &F = &*(f as *const F);
4116            f(Widget::from_glib_borrow(this).unsafe_cast_ref())
4117        }
4118        unsafe {
4119            let f: Box_<F> = Box_::new(f);
4120            connect_raw(
4121                self.as_ptr() as *mut _,
4122                b"notify::events\0".as_ptr() as *const _,
4123                Some(transmute::<_, unsafe extern "C" fn()>(
4124                    notify_events_trampoline::<Self, F> as *const (),
4125                )),
4126                Box_::into_raw(f),
4127            )
4128        }
4129    }
4130
4131    #[doc(alias = "expand")]
4132    fn connect_expand_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4133        unsafe extern "C" fn notify_expand_trampoline<P: IsA<Widget>, F: Fn(&P) + 'static>(
4134            this: *mut ffi::GtkWidget,
4135            _param_spec: glib::ffi::gpointer,
4136            f: glib::ffi::gpointer,
4137        ) {
4138            let f: &F = &*(f as *const F);
4139            f(Widget::from_glib_borrow(this).unsafe_cast_ref())
4140        }
4141        unsafe {
4142            let f: Box_<F> = Box_::new(f);
4143            connect_raw(
4144                self.as_ptr() as *mut _,
4145                b"notify::expand\0".as_ptr() as *const _,
4146                Some(transmute::<_, unsafe extern "C" fn()>(
4147                    notify_expand_trampoline::<Self, F> as *const (),
4148                )),
4149                Box_::into_raw(f),
4150            )
4151        }
4152    }
4153
4154    #[doc(alias = "focus-on-click")]
4155    fn connect_focus_on_click_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4156        unsafe extern "C" fn notify_focus_on_click_trampoline<
4157            P: IsA<Widget>,
4158            F: Fn(&P) + 'static,
4159        >(
4160            this: *mut ffi::GtkWidget,
4161            _param_spec: glib::ffi::gpointer,
4162            f: glib::ffi::gpointer,
4163        ) {
4164            let f: &F = &*(f as *const F);
4165            f(Widget::from_glib_borrow(this).unsafe_cast_ref())
4166        }
4167        unsafe {
4168            let f: Box_<F> = Box_::new(f);
4169            connect_raw(
4170                self.as_ptr() as *mut _,
4171                b"notify::focus-on-click\0".as_ptr() as *const _,
4172                Some(transmute::<_, unsafe extern "C" fn()>(
4173                    notify_focus_on_click_trampoline::<Self, F> as *const (),
4174                )),
4175                Box_::into_raw(f),
4176            )
4177        }
4178    }
4179
4180    #[doc(alias = "halign")]
4181    fn connect_halign_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4182        unsafe extern "C" fn notify_halign_trampoline<P: IsA<Widget>, F: Fn(&P) + 'static>(
4183            this: *mut ffi::GtkWidget,
4184            _param_spec: glib::ffi::gpointer,
4185            f: glib::ffi::gpointer,
4186        ) {
4187            let f: &F = &*(f as *const F);
4188            f(Widget::from_glib_borrow(this).unsafe_cast_ref())
4189        }
4190        unsafe {
4191            let f: Box_<F> = Box_::new(f);
4192            connect_raw(
4193                self.as_ptr() as *mut _,
4194                b"notify::halign\0".as_ptr() as *const _,
4195                Some(transmute::<_, unsafe extern "C" fn()>(
4196                    notify_halign_trampoline::<Self, F> as *const (),
4197                )),
4198                Box_::into_raw(f),
4199            )
4200        }
4201    }
4202
4203    #[doc(alias = "has-default")]
4204    fn connect_has_default_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4205        unsafe extern "C" fn notify_has_default_trampoline<P: IsA<Widget>, F: Fn(&P) + 'static>(
4206            this: *mut ffi::GtkWidget,
4207            _param_spec: glib::ffi::gpointer,
4208            f: glib::ffi::gpointer,
4209        ) {
4210            let f: &F = &*(f as *const F);
4211            f(Widget::from_glib_borrow(this).unsafe_cast_ref())
4212        }
4213        unsafe {
4214            let f: Box_<F> = Box_::new(f);
4215            connect_raw(
4216                self.as_ptr() as *mut _,
4217                b"notify::has-default\0".as_ptr() as *const _,
4218                Some(transmute::<_, unsafe extern "C" fn()>(
4219                    notify_has_default_trampoline::<Self, F> as *const (),
4220                )),
4221                Box_::into_raw(f),
4222            )
4223        }
4224    }
4225
4226    #[doc(alias = "has-focus")]
4227    fn connect_has_focus_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4228        unsafe extern "C" fn notify_has_focus_trampoline<P: IsA<Widget>, F: Fn(&P) + 'static>(
4229            this: *mut ffi::GtkWidget,
4230            _param_spec: glib::ffi::gpointer,
4231            f: glib::ffi::gpointer,
4232        ) {
4233            let f: &F = &*(f as *const F);
4234            f(Widget::from_glib_borrow(this).unsafe_cast_ref())
4235        }
4236        unsafe {
4237            let f: Box_<F> = Box_::new(f);
4238            connect_raw(
4239                self.as_ptr() as *mut _,
4240                b"notify::has-focus\0".as_ptr() as *const _,
4241                Some(transmute::<_, unsafe extern "C" fn()>(
4242                    notify_has_focus_trampoline::<Self, F> as *const (),
4243                )),
4244                Box_::into_raw(f),
4245            )
4246        }
4247    }
4248
4249    #[doc(alias = "has-tooltip")]
4250    fn connect_has_tooltip_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4251        unsafe extern "C" fn notify_has_tooltip_trampoline<P: IsA<Widget>, F: Fn(&P) + 'static>(
4252            this: *mut ffi::GtkWidget,
4253            _param_spec: glib::ffi::gpointer,
4254            f: glib::ffi::gpointer,
4255        ) {
4256            let f: &F = &*(f as *const F);
4257            f(Widget::from_glib_borrow(this).unsafe_cast_ref())
4258        }
4259        unsafe {
4260            let f: Box_<F> = Box_::new(f);
4261            connect_raw(
4262                self.as_ptr() as *mut _,
4263                b"notify::has-tooltip\0".as_ptr() as *const _,
4264                Some(transmute::<_, unsafe extern "C" fn()>(
4265                    notify_has_tooltip_trampoline::<Self, F> as *const (),
4266                )),
4267                Box_::into_raw(f),
4268            )
4269        }
4270    }
4271
4272    #[doc(alias = "height-request")]
4273    fn connect_height_request_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4274        unsafe extern "C" fn notify_height_request_trampoline<
4275            P: IsA<Widget>,
4276            F: Fn(&P) + 'static,
4277        >(
4278            this: *mut ffi::GtkWidget,
4279            _param_spec: glib::ffi::gpointer,
4280            f: glib::ffi::gpointer,
4281        ) {
4282            let f: &F = &*(f as *const F);
4283            f(Widget::from_glib_borrow(this).unsafe_cast_ref())
4284        }
4285        unsafe {
4286            let f: Box_<F> = Box_::new(f);
4287            connect_raw(
4288                self.as_ptr() as *mut _,
4289                b"notify::height-request\0".as_ptr() as *const _,
4290                Some(transmute::<_, unsafe extern "C" fn()>(
4291                    notify_height_request_trampoline::<Self, F> as *const (),
4292                )),
4293                Box_::into_raw(f),
4294            )
4295        }
4296    }
4297
4298    #[doc(alias = "hexpand")]
4299    fn connect_hexpand_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4300        unsafe extern "C" fn notify_hexpand_trampoline<P: IsA<Widget>, F: Fn(&P) + 'static>(
4301            this: *mut ffi::GtkWidget,
4302            _param_spec: glib::ffi::gpointer,
4303            f: glib::ffi::gpointer,
4304        ) {
4305            let f: &F = &*(f as *const F);
4306            f(Widget::from_glib_borrow(this).unsafe_cast_ref())
4307        }
4308        unsafe {
4309            let f: Box_<F> = Box_::new(f);
4310            connect_raw(
4311                self.as_ptr() as *mut _,
4312                b"notify::hexpand\0".as_ptr() as *const _,
4313                Some(transmute::<_, unsafe extern "C" fn()>(
4314                    notify_hexpand_trampoline::<Self, F> as *const (),
4315                )),
4316                Box_::into_raw(f),
4317            )
4318        }
4319    }
4320
4321    #[doc(alias = "hexpand-set")]
4322    fn connect_hexpand_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4323        unsafe extern "C" fn notify_hexpand_set_trampoline<P: IsA<Widget>, F: Fn(&P) + 'static>(
4324            this: *mut ffi::GtkWidget,
4325            _param_spec: glib::ffi::gpointer,
4326            f: glib::ffi::gpointer,
4327        ) {
4328            let f: &F = &*(f as *const F);
4329            f(Widget::from_glib_borrow(this).unsafe_cast_ref())
4330        }
4331        unsafe {
4332            let f: Box_<F> = Box_::new(f);
4333            connect_raw(
4334                self.as_ptr() as *mut _,
4335                b"notify::hexpand-set\0".as_ptr() as *const _,
4336                Some(transmute::<_, unsafe extern "C" fn()>(
4337                    notify_hexpand_set_trampoline::<Self, F> as *const (),
4338                )),
4339                Box_::into_raw(f),
4340            )
4341        }
4342    }
4343
4344    #[doc(alias = "is-focus")]
4345    fn connect_is_focus_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4346        unsafe extern "C" fn notify_is_focus_trampoline<P: IsA<Widget>, F: Fn(&P) + 'static>(
4347            this: *mut ffi::GtkWidget,
4348            _param_spec: glib::ffi::gpointer,
4349            f: glib::ffi::gpointer,
4350        ) {
4351            let f: &F = &*(f as *const F);
4352            f(Widget::from_glib_borrow(this).unsafe_cast_ref())
4353        }
4354        unsafe {
4355            let f: Box_<F> = Box_::new(f);
4356            connect_raw(
4357                self.as_ptr() as *mut _,
4358                b"notify::is-focus\0".as_ptr() as *const _,
4359                Some(transmute::<_, unsafe extern "C" fn()>(
4360                    notify_is_focus_trampoline::<Self, F> as *const (),
4361                )),
4362                Box_::into_raw(f),
4363            )
4364        }
4365    }
4366
4367    #[doc(alias = "margin")]
4368    fn connect_margin_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4369        unsafe extern "C" fn notify_margin_trampoline<P: IsA<Widget>, F: Fn(&P) + 'static>(
4370            this: *mut ffi::GtkWidget,
4371            _param_spec: glib::ffi::gpointer,
4372            f: glib::ffi::gpointer,
4373        ) {
4374            let f: &F = &*(f as *const F);
4375            f(Widget::from_glib_borrow(this).unsafe_cast_ref())
4376        }
4377        unsafe {
4378            let f: Box_<F> = Box_::new(f);
4379            connect_raw(
4380                self.as_ptr() as *mut _,
4381                b"notify::margin\0".as_ptr() as *const _,
4382                Some(transmute::<_, unsafe extern "C" fn()>(
4383                    notify_margin_trampoline::<Self, F> as *const (),
4384                )),
4385                Box_::into_raw(f),
4386            )
4387        }
4388    }
4389
4390    #[doc(alias = "margin-bottom")]
4391    fn connect_margin_bottom_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4392        unsafe extern "C" fn notify_margin_bottom_trampoline<
4393            P: IsA<Widget>,
4394            F: Fn(&P) + 'static,
4395        >(
4396            this: *mut ffi::GtkWidget,
4397            _param_spec: glib::ffi::gpointer,
4398            f: glib::ffi::gpointer,
4399        ) {
4400            let f: &F = &*(f as *const F);
4401            f(Widget::from_glib_borrow(this).unsafe_cast_ref())
4402        }
4403        unsafe {
4404            let f: Box_<F> = Box_::new(f);
4405            connect_raw(
4406                self.as_ptr() as *mut _,
4407                b"notify::margin-bottom\0".as_ptr() as *const _,
4408                Some(transmute::<_, unsafe extern "C" fn()>(
4409                    notify_margin_bottom_trampoline::<Self, F> as *const (),
4410                )),
4411                Box_::into_raw(f),
4412            )
4413        }
4414    }
4415
4416    #[doc(alias = "margin-end")]
4417    fn connect_margin_end_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4418        unsafe extern "C" fn notify_margin_end_trampoline<P: IsA<Widget>, F: Fn(&P) + 'static>(
4419            this: *mut ffi::GtkWidget,
4420            _param_spec: glib::ffi::gpointer,
4421            f: glib::ffi::gpointer,
4422        ) {
4423            let f: &F = &*(f as *const F);
4424            f(Widget::from_glib_borrow(this).unsafe_cast_ref())
4425        }
4426        unsafe {
4427            let f: Box_<F> = Box_::new(f);
4428            connect_raw(
4429                self.as_ptr() as *mut _,
4430                b"notify::margin-end\0".as_ptr() as *const _,
4431                Some(transmute::<_, unsafe extern "C" fn()>(
4432                    notify_margin_end_trampoline::<Self, F> as *const (),
4433                )),
4434                Box_::into_raw(f),
4435            )
4436        }
4437    }
4438
4439    #[doc(alias = "margin-start")]
4440    fn connect_margin_start_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4441        unsafe extern "C" fn notify_margin_start_trampoline<P: IsA<Widget>, F: Fn(&P) + 'static>(
4442            this: *mut ffi::GtkWidget,
4443            _param_spec: glib::ffi::gpointer,
4444            f: glib::ffi::gpointer,
4445        ) {
4446            let f: &F = &*(f as *const F);
4447            f(Widget::from_glib_borrow(this).unsafe_cast_ref())
4448        }
4449        unsafe {
4450            let f: Box_<F> = Box_::new(f);
4451            connect_raw(
4452                self.as_ptr() as *mut _,
4453                b"notify::margin-start\0".as_ptr() as *const _,
4454                Some(transmute::<_, unsafe extern "C" fn()>(
4455                    notify_margin_start_trampoline::<Self, F> as *const (),
4456                )),
4457                Box_::into_raw(f),
4458            )
4459        }
4460    }
4461
4462    #[doc(alias = "margin-top")]
4463    fn connect_margin_top_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4464        unsafe extern "C" fn notify_margin_top_trampoline<P: IsA<Widget>, F: Fn(&P) + 'static>(
4465            this: *mut ffi::GtkWidget,
4466            _param_spec: glib::ffi::gpointer,
4467            f: glib::ffi::gpointer,
4468        ) {
4469            let f: &F = &*(f as *const F);
4470            f(Widget::from_glib_borrow(this).unsafe_cast_ref())
4471        }
4472        unsafe {
4473            let f: Box_<F> = Box_::new(f);
4474            connect_raw(
4475                self.as_ptr() as *mut _,
4476                b"notify::margin-top\0".as_ptr() as *const _,
4477                Some(transmute::<_, unsafe extern "C" fn()>(
4478                    notify_margin_top_trampoline::<Self, F> as *const (),
4479                )),
4480                Box_::into_raw(f),
4481            )
4482        }
4483    }
4484
4485    #[doc(alias = "name")]
4486    fn connect_name_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4487        unsafe extern "C" fn notify_name_trampoline<P: IsA<Widget>, F: Fn(&P) + 'static>(
4488            this: *mut ffi::GtkWidget,
4489            _param_spec: glib::ffi::gpointer,
4490            f: glib::ffi::gpointer,
4491        ) {
4492            let f: &F = &*(f as *const F);
4493            f(Widget::from_glib_borrow(this).unsafe_cast_ref())
4494        }
4495        unsafe {
4496            let f: Box_<F> = Box_::new(f);
4497            connect_raw(
4498                self.as_ptr() as *mut _,
4499                b"notify::name\0".as_ptr() as *const _,
4500                Some(transmute::<_, unsafe extern "C" fn()>(
4501                    notify_name_trampoline::<Self, F> as *const (),
4502                )),
4503                Box_::into_raw(f),
4504            )
4505        }
4506    }
4507
4508    #[doc(alias = "no-show-all")]
4509    fn connect_no_show_all_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4510        unsafe extern "C" fn notify_no_show_all_trampoline<P: IsA<Widget>, F: Fn(&P) + 'static>(
4511            this: *mut ffi::GtkWidget,
4512            _param_spec: glib::ffi::gpointer,
4513            f: glib::ffi::gpointer,
4514        ) {
4515            let f: &F = &*(f as *const F);
4516            f(Widget::from_glib_borrow(this).unsafe_cast_ref())
4517        }
4518        unsafe {
4519            let f: Box_<F> = Box_::new(f);
4520            connect_raw(
4521                self.as_ptr() as *mut _,
4522                b"notify::no-show-all\0".as_ptr() as *const _,
4523                Some(transmute::<_, unsafe extern "C" fn()>(
4524                    notify_no_show_all_trampoline::<Self, F> as *const (),
4525                )),
4526                Box_::into_raw(f),
4527            )
4528        }
4529    }
4530
4531    #[doc(alias = "opacity")]
4532    fn connect_opacity_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4533        unsafe extern "C" fn notify_opacity_trampoline<P: IsA<Widget>, F: Fn(&P) + 'static>(
4534            this: *mut ffi::GtkWidget,
4535            _param_spec: glib::ffi::gpointer,
4536            f: glib::ffi::gpointer,
4537        ) {
4538            let f: &F = &*(f as *const F);
4539            f(Widget::from_glib_borrow(this).unsafe_cast_ref())
4540        }
4541        unsafe {
4542            let f: Box_<F> = Box_::new(f);
4543            connect_raw(
4544                self.as_ptr() as *mut _,
4545                b"notify::opacity\0".as_ptr() as *const _,
4546                Some(transmute::<_, unsafe extern "C" fn()>(
4547                    notify_opacity_trampoline::<Self, F> as *const (),
4548                )),
4549                Box_::into_raw(f),
4550            )
4551        }
4552    }
4553
4554    #[doc(alias = "parent")]
4555    fn connect_parent_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4556        unsafe extern "C" fn notify_parent_trampoline<P: IsA<Widget>, F: Fn(&P) + 'static>(
4557            this: *mut ffi::GtkWidget,
4558            _param_spec: glib::ffi::gpointer,
4559            f: glib::ffi::gpointer,
4560        ) {
4561            let f: &F = &*(f as *const F);
4562            f(Widget::from_glib_borrow(this).unsafe_cast_ref())
4563        }
4564        unsafe {
4565            let f: Box_<F> = Box_::new(f);
4566            connect_raw(
4567                self.as_ptr() as *mut _,
4568                b"notify::parent\0".as_ptr() as *const _,
4569                Some(transmute::<_, unsafe extern "C" fn()>(
4570                    notify_parent_trampoline::<Self, F> as *const (),
4571                )),
4572                Box_::into_raw(f),
4573            )
4574        }
4575    }
4576
4577    #[doc(alias = "receives-default")]
4578    fn connect_receives_default_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4579        unsafe extern "C" fn notify_receives_default_trampoline<
4580            P: IsA<Widget>,
4581            F: Fn(&P) + 'static,
4582        >(
4583            this: *mut ffi::GtkWidget,
4584            _param_spec: glib::ffi::gpointer,
4585            f: glib::ffi::gpointer,
4586        ) {
4587            let f: &F = &*(f as *const F);
4588            f(Widget::from_glib_borrow(this).unsafe_cast_ref())
4589        }
4590        unsafe {
4591            let f: Box_<F> = Box_::new(f);
4592            connect_raw(
4593                self.as_ptr() as *mut _,
4594                b"notify::receives-default\0".as_ptr() as *const _,
4595                Some(transmute::<_, unsafe extern "C" fn()>(
4596                    notify_receives_default_trampoline::<Self, F> as *const (),
4597                )),
4598                Box_::into_raw(f),
4599            )
4600        }
4601    }
4602
4603    #[doc(alias = "scale-factor")]
4604    fn connect_scale_factor_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4605        unsafe extern "C" fn notify_scale_factor_trampoline<P: IsA<Widget>, F: Fn(&P) + 'static>(
4606            this: *mut ffi::GtkWidget,
4607            _param_spec: glib::ffi::gpointer,
4608            f: glib::ffi::gpointer,
4609        ) {
4610            let f: &F = &*(f as *const F);
4611            f(Widget::from_glib_borrow(this).unsafe_cast_ref())
4612        }
4613        unsafe {
4614            let f: Box_<F> = Box_::new(f);
4615            connect_raw(
4616                self.as_ptr() as *mut _,
4617                b"notify::scale-factor\0".as_ptr() as *const _,
4618                Some(transmute::<_, unsafe extern "C" fn()>(
4619                    notify_scale_factor_trampoline::<Self, F> as *const (),
4620                )),
4621                Box_::into_raw(f),
4622            )
4623        }
4624    }
4625
4626    #[doc(alias = "sensitive")]
4627    fn connect_sensitive_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4628        unsafe extern "C" fn notify_sensitive_trampoline<P: IsA<Widget>, F: Fn(&P) + 'static>(
4629            this: *mut ffi::GtkWidget,
4630            _param_spec: glib::ffi::gpointer,
4631            f: glib::ffi::gpointer,
4632        ) {
4633            let f: &F = &*(f as *const F);
4634            f(Widget::from_glib_borrow(this).unsafe_cast_ref())
4635        }
4636        unsafe {
4637            let f: Box_<F> = Box_::new(f);
4638            connect_raw(
4639                self.as_ptr() as *mut _,
4640                b"notify::sensitive\0".as_ptr() as *const _,
4641                Some(transmute::<_, unsafe extern "C" fn()>(
4642                    notify_sensitive_trampoline::<Self, F> as *const (),
4643                )),
4644                Box_::into_raw(f),
4645            )
4646        }
4647    }
4648
4649    #[doc(alias = "tooltip-markup")]
4650    fn connect_tooltip_markup_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4651        unsafe extern "C" fn notify_tooltip_markup_trampoline<
4652            P: IsA<Widget>,
4653            F: Fn(&P) + 'static,
4654        >(
4655            this: *mut ffi::GtkWidget,
4656            _param_spec: glib::ffi::gpointer,
4657            f: glib::ffi::gpointer,
4658        ) {
4659            let f: &F = &*(f as *const F);
4660            f(Widget::from_glib_borrow(this).unsafe_cast_ref())
4661        }
4662        unsafe {
4663            let f: Box_<F> = Box_::new(f);
4664            connect_raw(
4665                self.as_ptr() as *mut _,
4666                b"notify::tooltip-markup\0".as_ptr() as *const _,
4667                Some(transmute::<_, unsafe extern "C" fn()>(
4668                    notify_tooltip_markup_trampoline::<Self, F> as *const (),
4669                )),
4670                Box_::into_raw(f),
4671            )
4672        }
4673    }
4674
4675    #[doc(alias = "tooltip-text")]
4676    fn connect_tooltip_text_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4677        unsafe extern "C" fn notify_tooltip_text_trampoline<P: IsA<Widget>, F: Fn(&P) + 'static>(
4678            this: *mut ffi::GtkWidget,
4679            _param_spec: glib::ffi::gpointer,
4680            f: glib::ffi::gpointer,
4681        ) {
4682            let f: &F = &*(f as *const F);
4683            f(Widget::from_glib_borrow(this).unsafe_cast_ref())
4684        }
4685        unsafe {
4686            let f: Box_<F> = Box_::new(f);
4687            connect_raw(
4688                self.as_ptr() as *mut _,
4689                b"notify::tooltip-text\0".as_ptr() as *const _,
4690                Some(transmute::<_, unsafe extern "C" fn()>(
4691                    notify_tooltip_text_trampoline::<Self, F> as *const (),
4692                )),
4693                Box_::into_raw(f),
4694            )
4695        }
4696    }
4697
4698    #[doc(alias = "valign")]
4699    fn connect_valign_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4700        unsafe extern "C" fn notify_valign_trampoline<P: IsA<Widget>, F: Fn(&P) + 'static>(
4701            this: *mut ffi::GtkWidget,
4702            _param_spec: glib::ffi::gpointer,
4703            f: glib::ffi::gpointer,
4704        ) {
4705            let f: &F = &*(f as *const F);
4706            f(Widget::from_glib_borrow(this).unsafe_cast_ref())
4707        }
4708        unsafe {
4709            let f: Box_<F> = Box_::new(f);
4710            connect_raw(
4711                self.as_ptr() as *mut _,
4712                b"notify::valign\0".as_ptr() as *const _,
4713                Some(transmute::<_, unsafe extern "C" fn()>(
4714                    notify_valign_trampoline::<Self, F> as *const (),
4715                )),
4716                Box_::into_raw(f),
4717            )
4718        }
4719    }
4720
4721    #[doc(alias = "vexpand")]
4722    fn connect_vexpand_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4723        unsafe extern "C" fn notify_vexpand_trampoline<P: IsA<Widget>, F: Fn(&P) + 'static>(
4724            this: *mut ffi::GtkWidget,
4725            _param_spec: glib::ffi::gpointer,
4726            f: glib::ffi::gpointer,
4727        ) {
4728            let f: &F = &*(f as *const F);
4729            f(Widget::from_glib_borrow(this).unsafe_cast_ref())
4730        }
4731        unsafe {
4732            let f: Box_<F> = Box_::new(f);
4733            connect_raw(
4734                self.as_ptr() as *mut _,
4735                b"notify::vexpand\0".as_ptr() as *const _,
4736                Some(transmute::<_, unsafe extern "C" fn()>(
4737                    notify_vexpand_trampoline::<Self, F> as *const (),
4738                )),
4739                Box_::into_raw(f),
4740            )
4741        }
4742    }
4743
4744    #[doc(alias = "vexpand-set")]
4745    fn connect_vexpand_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4746        unsafe extern "C" fn notify_vexpand_set_trampoline<P: IsA<Widget>, F: Fn(&P) + 'static>(
4747            this: *mut ffi::GtkWidget,
4748            _param_spec: glib::ffi::gpointer,
4749            f: glib::ffi::gpointer,
4750        ) {
4751            let f: &F = &*(f as *const F);
4752            f(Widget::from_glib_borrow(this).unsafe_cast_ref())
4753        }
4754        unsafe {
4755            let f: Box_<F> = Box_::new(f);
4756            connect_raw(
4757                self.as_ptr() as *mut _,
4758                b"notify::vexpand-set\0".as_ptr() as *const _,
4759                Some(transmute::<_, unsafe extern "C" fn()>(
4760                    notify_vexpand_set_trampoline::<Self, F> as *const (),
4761                )),
4762                Box_::into_raw(f),
4763            )
4764        }
4765    }
4766
4767    #[doc(alias = "visible")]
4768    fn connect_visible_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4769        unsafe extern "C" fn notify_visible_trampoline<P: IsA<Widget>, F: Fn(&P) + 'static>(
4770            this: *mut ffi::GtkWidget,
4771            _param_spec: glib::ffi::gpointer,
4772            f: glib::ffi::gpointer,
4773        ) {
4774            let f: &F = &*(f as *const F);
4775            f(Widget::from_glib_borrow(this).unsafe_cast_ref())
4776        }
4777        unsafe {
4778            let f: Box_<F> = Box_::new(f);
4779            connect_raw(
4780                self.as_ptr() as *mut _,
4781                b"notify::visible\0".as_ptr() as *const _,
4782                Some(transmute::<_, unsafe extern "C" fn()>(
4783                    notify_visible_trampoline::<Self, F> as *const (),
4784                )),
4785                Box_::into_raw(f),
4786            )
4787        }
4788    }
4789
4790    #[doc(alias = "width-request")]
4791    fn connect_width_request_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4792        unsafe extern "C" fn notify_width_request_trampoline<
4793            P: IsA<Widget>,
4794            F: Fn(&P) + 'static,
4795        >(
4796            this: *mut ffi::GtkWidget,
4797            _param_spec: glib::ffi::gpointer,
4798            f: glib::ffi::gpointer,
4799        ) {
4800            let f: &F = &*(f as *const F);
4801            f(Widget::from_glib_borrow(this).unsafe_cast_ref())
4802        }
4803        unsafe {
4804            let f: Box_<F> = Box_::new(f);
4805            connect_raw(
4806                self.as_ptr() as *mut _,
4807                b"notify::width-request\0".as_ptr() as *const _,
4808                Some(transmute::<_, unsafe extern "C" fn()>(
4809                    notify_width_request_trampoline::<Self, F> as *const (),
4810                )),
4811                Box_::into_raw(f),
4812            )
4813        }
4814    }
4815
4816    #[doc(alias = "window")]
4817    fn connect_window_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4818        unsafe extern "C" fn notify_window_trampoline<P: IsA<Widget>, F: Fn(&P) + 'static>(
4819            this: *mut ffi::GtkWidget,
4820            _param_spec: glib::ffi::gpointer,
4821            f: glib::ffi::gpointer,
4822        ) {
4823            let f: &F = &*(f as *const F);
4824            f(Widget::from_glib_borrow(this).unsafe_cast_ref())
4825        }
4826        unsafe {
4827            let f: Box_<F> = Box_::new(f);
4828            connect_raw(
4829                self.as_ptr() as *mut _,
4830                b"notify::window\0".as_ptr() as *const _,
4831                Some(transmute::<_, unsafe extern "C" fn()>(
4832                    notify_window_trampoline::<Self, F> as *const (),
4833                )),
4834                Box_::into_raw(f),
4835            )
4836        }
4837    }
4838}
4839
4840impl<O: IsA<Widget>> WidgetExt for O {}