gtk/auto/
icon_view.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 cairo;
6use gdk;
7use glib;
8use glib::object::Cast;
9use glib::object::IsA;
10use glib::object::ObjectExt;
11use glib::signal::connect_raw;
12use glib::signal::SignalHandlerId;
13use glib::translate::*;
14use glib::StaticType;
15use glib::Value;
16use glib_sys;
17use gobject_sys;
18use gtk_sys;
19use libc;
20use std::boxed::Box as Box_;
21use std::fmt;
22use std::mem;
23use std::mem::transmute;
24use std::ptr;
25use Buildable;
26use CellArea;
27use CellLayout;
28use CellRenderer;
29use Container;
30use IconViewDropPosition;
31use MovementStep;
32use Orientation;
33use Scrollable;
34use SelectionMode;
35use Tooltip;
36use TreeIter;
37use TreeModel;
38use TreePath;
39use Widget;
40
41glib_wrapper! {
42    pub struct IconView(Object<gtk_sys::GtkIconView, gtk_sys::GtkIconViewClass, IconViewClass>) @extends Container, Widget, @implements Buildable, CellLayout, Scrollable;
43
44    match fn {
45        get_type => || gtk_sys::gtk_icon_view_get_type(),
46    }
47}
48
49impl IconView {
50    pub fn new() -> IconView {
51        assert_initialized_main_thread!();
52        unsafe { Widget::from_glib_none(gtk_sys::gtk_icon_view_new()).unsafe_cast() }
53    }
54
55    pub fn new_with_area<P: IsA<CellArea>>(area: &P) -> IconView {
56        skip_assert_initialized!();
57        unsafe {
58            Widget::from_glib_none(gtk_sys::gtk_icon_view_new_with_area(
59                area.as_ref().to_glib_none().0,
60            ))
61            .unsafe_cast()
62        }
63    }
64
65    pub fn new_with_model<P: IsA<TreeModel>>(model: &P) -> IconView {
66        skip_assert_initialized!();
67        unsafe {
68            Widget::from_glib_none(gtk_sys::gtk_icon_view_new_with_model(
69                model.as_ref().to_glib_none().0,
70            ))
71            .unsafe_cast()
72        }
73    }
74}
75
76impl Default for IconView {
77    fn default() -> Self {
78        Self::new()
79    }
80}
81
82pub const NONE_ICON_VIEW: Option<&IconView> = None;
83
84pub trait IconViewExt: 'static {
85    fn convert_widget_to_bin_window_coords(&self, wx: i32, wy: i32) -> (i32, i32);
86
87    fn create_drag_icon(&self, path: &TreePath) -> Option<cairo::Surface>;
88
89    fn get_activate_on_single_click(&self) -> bool;
90
91    fn get_cell_rect<P: IsA<CellRenderer>>(
92        &self,
93        path: &TreePath,
94        cell: Option<&P>,
95    ) -> Option<gdk::Rectangle>;
96
97    fn get_column_spacing(&self) -> i32;
98
99    fn get_columns(&self) -> i32;
100
101    fn get_cursor(&self) -> Option<(TreePath, CellRenderer)>;
102
103    fn get_dest_item_at_pos(
104        &self,
105        drag_x: i32,
106        drag_y: i32,
107    ) -> Option<(TreePath, IconViewDropPosition)>;
108
109    fn get_drag_dest_item(&self) -> (TreePath, IconViewDropPosition);
110
111    fn get_item_at_pos(&self, x: i32, y: i32) -> Option<(TreePath, CellRenderer)>;
112
113    fn get_item_column(&self, path: &TreePath) -> i32;
114
115    fn get_item_orientation(&self) -> Orientation;
116
117    fn get_item_padding(&self) -> i32;
118
119    fn get_item_row(&self, path: &TreePath) -> i32;
120
121    fn get_item_width(&self) -> i32;
122
123    fn get_margin(&self) -> i32;
124
125    fn get_markup_column(&self) -> i32;
126
127    fn get_model(&self) -> Option<TreeModel>;
128
129    fn get_path_at_pos(&self, x: i32, y: i32) -> Option<TreePath>;
130
131    fn get_pixbuf_column(&self) -> i32;
132
133    fn get_reorderable(&self) -> bool;
134
135    fn get_row_spacing(&self) -> i32;
136
137    fn get_selected_items(&self) -> Vec<TreePath>;
138
139    fn get_selection_mode(&self) -> SelectionMode;
140
141    fn get_spacing(&self) -> i32;
142
143    fn get_text_column(&self) -> i32;
144
145    fn get_tooltip_column(&self) -> i32;
146
147    fn get_tooltip_context(
148        &self,
149        x: &mut i32,
150        y: &mut i32,
151        keyboard_tip: bool,
152    ) -> Option<(TreeModel, TreePath, TreeIter)>;
153
154    fn get_visible_range(&self) -> Option<(TreePath, TreePath)>;
155
156    fn item_activated(&self, path: &TreePath);
157
158    fn path_is_selected(&self, path: &TreePath) -> bool;
159
160    fn scroll_to_path(&self, path: &TreePath, use_align: bool, row_align: f32, col_align: f32);
161
162    fn select_all(&self);
163
164    fn select_path(&self, path: &TreePath);
165
166    fn selected_foreach<P: FnMut(&IconView, &TreePath)>(&self, func: P);
167
168    fn set_activate_on_single_click(&self, single: bool);
169
170    fn set_column_spacing(&self, column_spacing: i32);
171
172    fn set_columns(&self, columns: i32);
173
174    fn set_cursor<P: IsA<CellRenderer>>(
175        &self,
176        path: &TreePath,
177        cell: Option<&P>,
178        start_editing: bool,
179    );
180
181    fn set_drag_dest_item(&self, path: Option<&TreePath>, pos: IconViewDropPosition);
182
183    fn set_item_orientation(&self, orientation: Orientation);
184
185    fn set_item_padding(&self, item_padding: i32);
186
187    fn set_item_width(&self, item_width: i32);
188
189    fn set_margin(&self, margin: i32);
190
191    fn set_markup_column(&self, column: i32);
192
193    fn set_model<P: IsA<TreeModel>>(&self, model: Option<&P>);
194
195    fn set_pixbuf_column(&self, column: i32);
196
197    fn set_reorderable(&self, reorderable: bool);
198
199    fn set_row_spacing(&self, row_spacing: i32);
200
201    fn set_selection_mode(&self, mode: SelectionMode);
202
203    fn set_spacing(&self, spacing: i32);
204
205    fn set_text_column(&self, column: i32);
206
207    fn set_tooltip_cell<P: IsA<CellRenderer>>(
208        &self,
209        tooltip: &Tooltip,
210        path: &TreePath,
211        cell: Option<&P>,
212    );
213
214    fn set_tooltip_column(&self, column: i32);
215
216    fn set_tooltip_item(&self, tooltip: &Tooltip, path: &TreePath);
217
218    fn unselect_all(&self);
219
220    fn unselect_path(&self, path: &TreePath);
221
222    fn unset_model_drag_dest(&self);
223
224    fn unset_model_drag_source(&self);
225
226    fn get_property_cell_area(&self) -> Option<CellArea>;
227
228    fn connect_activate_cursor_item<F: Fn(&Self) -> bool + 'static>(&self, f: F)
229        -> SignalHandlerId;
230
231    fn emit_activate_cursor_item(&self) -> bool;
232
233    fn connect_item_activated<F: Fn(&Self, &TreePath) + 'static>(&self, f: F) -> SignalHandlerId;
234
235    fn connect_move_cursor<F: Fn(&Self, MovementStep, i32) -> bool + 'static>(
236        &self,
237        f: F,
238    ) -> SignalHandlerId;
239
240    fn emit_move_cursor(&self, step: MovementStep, count: i32) -> bool;
241
242    fn connect_select_all<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
243
244    fn emit_select_all(&self);
245
246    fn connect_select_cursor_item<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
247
248    fn emit_select_cursor_item(&self);
249
250    fn connect_selection_changed<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
251
252    fn connect_toggle_cursor_item<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
253
254    fn emit_toggle_cursor_item(&self);
255
256    fn connect_unselect_all<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
257
258    fn emit_unselect_all(&self);
259
260    fn connect_property_activate_on_single_click_notify<F: Fn(&Self) + 'static>(
261        &self,
262        f: F,
263    ) -> SignalHandlerId;
264
265    fn connect_property_column_spacing_notify<F: Fn(&Self) + 'static>(
266        &self,
267        f: F,
268    ) -> SignalHandlerId;
269
270    fn connect_property_columns_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
271
272    fn connect_property_item_orientation_notify<F: Fn(&Self) + 'static>(
273        &self,
274        f: F,
275    ) -> SignalHandlerId;
276
277    fn connect_property_item_padding_notify<F: Fn(&Self) + 'static>(&self, f: F)
278        -> SignalHandlerId;
279
280    fn connect_property_item_width_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
281
282    fn connect_property_margin_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
283
284    fn connect_property_markup_column_notify<F: Fn(&Self) + 'static>(
285        &self,
286        f: F,
287    ) -> SignalHandlerId;
288
289    fn connect_property_model_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
290
291    fn connect_property_pixbuf_column_notify<F: Fn(&Self) + 'static>(
292        &self,
293        f: F,
294    ) -> SignalHandlerId;
295
296    fn connect_property_reorderable_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
297
298    fn connect_property_row_spacing_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
299
300    fn connect_property_selection_mode_notify<F: Fn(&Self) + 'static>(
301        &self,
302        f: F,
303    ) -> SignalHandlerId;
304
305    fn connect_property_spacing_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
306
307    fn connect_property_text_column_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
308
309    fn connect_property_tooltip_column_notify<F: Fn(&Self) + 'static>(
310        &self,
311        f: F,
312    ) -> SignalHandlerId;
313}
314
315impl<O: IsA<IconView>> IconViewExt for O {
316    fn convert_widget_to_bin_window_coords(&self, wx: i32, wy: i32) -> (i32, i32) {
317        unsafe {
318            let mut bx = mem::uninitialized();
319            let mut by = mem::uninitialized();
320            gtk_sys::gtk_icon_view_convert_widget_to_bin_window_coords(
321                self.as_ref().to_glib_none().0,
322                wx,
323                wy,
324                &mut bx,
325                &mut by,
326            );
327            (bx, by)
328        }
329    }
330
331    fn create_drag_icon(&self, path: &TreePath) -> Option<cairo::Surface> {
332        unsafe {
333            from_glib_full(gtk_sys::gtk_icon_view_create_drag_icon(
334                self.as_ref().to_glib_none().0,
335                mut_override(path.to_glib_none().0),
336            ))
337        }
338    }
339
340    fn get_activate_on_single_click(&self) -> bool {
341        unsafe {
342            from_glib(gtk_sys::gtk_icon_view_get_activate_on_single_click(
343                self.as_ref().to_glib_none().0,
344            ))
345        }
346    }
347
348    fn get_cell_rect<P: IsA<CellRenderer>>(
349        &self,
350        path: &TreePath,
351        cell: Option<&P>,
352    ) -> Option<gdk::Rectangle> {
353        unsafe {
354            let mut rect = gdk::Rectangle::uninitialized();
355            let ret = from_glib(gtk_sys::gtk_icon_view_get_cell_rect(
356                self.as_ref().to_glib_none().0,
357                mut_override(path.to_glib_none().0),
358                cell.map(|p| p.as_ref()).to_glib_none().0,
359                rect.to_glib_none_mut().0,
360            ));
361            if ret {
362                Some(rect)
363            } else {
364                None
365            }
366        }
367    }
368
369    fn get_column_spacing(&self) -> i32 {
370        unsafe { gtk_sys::gtk_icon_view_get_column_spacing(self.as_ref().to_glib_none().0) }
371    }
372
373    fn get_columns(&self) -> i32 {
374        unsafe { gtk_sys::gtk_icon_view_get_columns(self.as_ref().to_glib_none().0) }
375    }
376
377    fn get_cursor(&self) -> Option<(TreePath, CellRenderer)> {
378        unsafe {
379            let mut path = ptr::null_mut();
380            let mut cell = ptr::null_mut();
381            let ret = from_glib(gtk_sys::gtk_icon_view_get_cursor(
382                self.as_ref().to_glib_none().0,
383                &mut path,
384                &mut cell,
385            ));
386            if ret {
387                Some((from_glib_full(path), from_glib_none(cell)))
388            } else {
389                None
390            }
391        }
392    }
393
394    fn get_dest_item_at_pos(
395        &self,
396        drag_x: i32,
397        drag_y: i32,
398    ) -> Option<(TreePath, IconViewDropPosition)> {
399        unsafe {
400            let mut path = ptr::null_mut();
401            let mut pos = mem::uninitialized();
402            let ret = from_glib(gtk_sys::gtk_icon_view_get_dest_item_at_pos(
403                self.as_ref().to_glib_none().0,
404                drag_x,
405                drag_y,
406                &mut path,
407                &mut pos,
408            ));
409            if ret {
410                Some((from_glib_full(path), from_glib(pos)))
411            } else {
412                None
413            }
414        }
415    }
416
417    fn get_drag_dest_item(&self) -> (TreePath, IconViewDropPosition) {
418        unsafe {
419            let mut path = ptr::null_mut();
420            let mut pos = mem::uninitialized();
421            gtk_sys::gtk_icon_view_get_drag_dest_item(
422                self.as_ref().to_glib_none().0,
423                &mut path,
424                &mut pos,
425            );
426            (from_glib_full(path), from_glib(pos))
427        }
428    }
429
430    fn get_item_at_pos(&self, x: i32, y: i32) -> Option<(TreePath, CellRenderer)> {
431        unsafe {
432            let mut path = ptr::null_mut();
433            let mut cell = ptr::null_mut();
434            let ret = from_glib(gtk_sys::gtk_icon_view_get_item_at_pos(
435                self.as_ref().to_glib_none().0,
436                x,
437                y,
438                &mut path,
439                &mut cell,
440            ));
441            if ret {
442                Some((from_glib_full(path), from_glib_none(cell)))
443            } else {
444                None
445            }
446        }
447    }
448
449    fn get_item_column(&self, path: &TreePath) -> i32 {
450        unsafe {
451            gtk_sys::gtk_icon_view_get_item_column(
452                self.as_ref().to_glib_none().0,
453                mut_override(path.to_glib_none().0),
454            )
455        }
456    }
457
458    fn get_item_orientation(&self) -> Orientation {
459        unsafe {
460            from_glib(gtk_sys::gtk_icon_view_get_item_orientation(
461                self.as_ref().to_glib_none().0,
462            ))
463        }
464    }
465
466    fn get_item_padding(&self) -> i32 {
467        unsafe { gtk_sys::gtk_icon_view_get_item_padding(self.as_ref().to_glib_none().0) }
468    }
469
470    fn get_item_row(&self, path: &TreePath) -> i32 {
471        unsafe {
472            gtk_sys::gtk_icon_view_get_item_row(
473                self.as_ref().to_glib_none().0,
474                mut_override(path.to_glib_none().0),
475            )
476        }
477    }
478
479    fn get_item_width(&self) -> i32 {
480        unsafe { gtk_sys::gtk_icon_view_get_item_width(self.as_ref().to_glib_none().0) }
481    }
482
483    fn get_margin(&self) -> i32 {
484        unsafe { gtk_sys::gtk_icon_view_get_margin(self.as_ref().to_glib_none().0) }
485    }
486
487    fn get_markup_column(&self) -> i32 {
488        unsafe { gtk_sys::gtk_icon_view_get_markup_column(self.as_ref().to_glib_none().0) }
489    }
490
491    fn get_model(&self) -> Option<TreeModel> {
492        unsafe {
493            from_glib_none(gtk_sys::gtk_icon_view_get_model(
494                self.as_ref().to_glib_none().0,
495            ))
496        }
497    }
498
499    fn get_path_at_pos(&self, x: i32, y: i32) -> Option<TreePath> {
500        unsafe {
501            from_glib_full(gtk_sys::gtk_icon_view_get_path_at_pos(
502                self.as_ref().to_glib_none().0,
503                x,
504                y,
505            ))
506        }
507    }
508
509    fn get_pixbuf_column(&self) -> i32 {
510        unsafe { gtk_sys::gtk_icon_view_get_pixbuf_column(self.as_ref().to_glib_none().0) }
511    }
512
513    fn get_reorderable(&self) -> bool {
514        unsafe {
515            from_glib(gtk_sys::gtk_icon_view_get_reorderable(
516                self.as_ref().to_glib_none().0,
517            ))
518        }
519    }
520
521    fn get_row_spacing(&self) -> i32 {
522        unsafe { gtk_sys::gtk_icon_view_get_row_spacing(self.as_ref().to_glib_none().0) }
523    }
524
525    fn get_selected_items(&self) -> Vec<TreePath> {
526        unsafe {
527            FromGlibPtrContainer::from_glib_full(gtk_sys::gtk_icon_view_get_selected_items(
528                self.as_ref().to_glib_none().0,
529            ))
530        }
531    }
532
533    fn get_selection_mode(&self) -> SelectionMode {
534        unsafe {
535            from_glib(gtk_sys::gtk_icon_view_get_selection_mode(
536                self.as_ref().to_glib_none().0,
537            ))
538        }
539    }
540
541    fn get_spacing(&self) -> i32 {
542        unsafe { gtk_sys::gtk_icon_view_get_spacing(self.as_ref().to_glib_none().0) }
543    }
544
545    fn get_text_column(&self) -> i32 {
546        unsafe { gtk_sys::gtk_icon_view_get_text_column(self.as_ref().to_glib_none().0) }
547    }
548
549    fn get_tooltip_column(&self) -> i32 {
550        unsafe { gtk_sys::gtk_icon_view_get_tooltip_column(self.as_ref().to_glib_none().0) }
551    }
552
553    fn get_tooltip_context(
554        &self,
555        x: &mut i32,
556        y: &mut i32,
557        keyboard_tip: bool,
558    ) -> Option<(TreeModel, TreePath, TreeIter)> {
559        unsafe {
560            let mut model = ptr::null_mut();
561            let mut path = ptr::null_mut();
562            let mut iter = TreeIter::uninitialized();
563            let ret = from_glib(gtk_sys::gtk_icon_view_get_tooltip_context(
564                self.as_ref().to_glib_none().0,
565                x,
566                y,
567                keyboard_tip.to_glib(),
568                &mut model,
569                &mut path,
570                iter.to_glib_none_mut().0,
571            ));
572            if ret {
573                Some((from_glib_none(model), from_glib_full(path), iter))
574            } else {
575                None
576            }
577        }
578    }
579
580    fn get_visible_range(&self) -> Option<(TreePath, TreePath)> {
581        unsafe {
582            let mut start_path = ptr::null_mut();
583            let mut end_path = ptr::null_mut();
584            let ret = from_glib(gtk_sys::gtk_icon_view_get_visible_range(
585                self.as_ref().to_glib_none().0,
586                &mut start_path,
587                &mut end_path,
588            ));
589            if ret {
590                Some((from_glib_full(start_path), from_glib_full(end_path)))
591            } else {
592                None
593            }
594        }
595    }
596
597    fn item_activated(&self, path: &TreePath) {
598        unsafe {
599            gtk_sys::gtk_icon_view_item_activated(
600                self.as_ref().to_glib_none().0,
601                mut_override(path.to_glib_none().0),
602            );
603        }
604    }
605
606    fn path_is_selected(&self, path: &TreePath) -> bool {
607        unsafe {
608            from_glib(gtk_sys::gtk_icon_view_path_is_selected(
609                self.as_ref().to_glib_none().0,
610                mut_override(path.to_glib_none().0),
611            ))
612        }
613    }
614
615    fn scroll_to_path(&self, path: &TreePath, use_align: bool, row_align: f32, col_align: f32) {
616        unsafe {
617            gtk_sys::gtk_icon_view_scroll_to_path(
618                self.as_ref().to_glib_none().0,
619                mut_override(path.to_glib_none().0),
620                use_align.to_glib(),
621                row_align,
622                col_align,
623            );
624        }
625    }
626
627    fn select_all(&self) {
628        unsafe {
629            gtk_sys::gtk_icon_view_select_all(self.as_ref().to_glib_none().0);
630        }
631    }
632
633    fn select_path(&self, path: &TreePath) {
634        unsafe {
635            gtk_sys::gtk_icon_view_select_path(
636                self.as_ref().to_glib_none().0,
637                mut_override(path.to_glib_none().0),
638            );
639        }
640    }
641
642    fn selected_foreach<P: FnMut(&IconView, &TreePath)>(&self, func: P) {
643        let func_data: P = func;
644        unsafe extern "C" fn func_func<P: FnMut(&IconView, &TreePath)>(
645            icon_view: *mut gtk_sys::GtkIconView,
646            path: *mut gtk_sys::GtkTreePath,
647            data: glib_sys::gpointer,
648        ) {
649            let icon_view = from_glib_borrow(icon_view);
650            let path = from_glib_borrow(path);
651            let callback: *mut P = data as *const _ as usize as *mut P;
652            (*callback)(&icon_view, &path);
653        }
654        let func = Some(func_func::<P> as _);
655        let super_callback0: &P = &func_data;
656        unsafe {
657            gtk_sys::gtk_icon_view_selected_foreach(
658                self.as_ref().to_glib_none().0,
659                func,
660                super_callback0 as *const _ as usize as *mut _,
661            );
662        }
663    }
664
665    fn set_activate_on_single_click(&self, single: bool) {
666        unsafe {
667            gtk_sys::gtk_icon_view_set_activate_on_single_click(
668                self.as_ref().to_glib_none().0,
669                single.to_glib(),
670            );
671        }
672    }
673
674    fn set_column_spacing(&self, column_spacing: i32) {
675        unsafe {
676            gtk_sys::gtk_icon_view_set_column_spacing(
677                self.as_ref().to_glib_none().0,
678                column_spacing,
679            );
680        }
681    }
682
683    fn set_columns(&self, columns: i32) {
684        unsafe {
685            gtk_sys::gtk_icon_view_set_columns(self.as_ref().to_glib_none().0, columns);
686        }
687    }
688
689    fn set_cursor<P: IsA<CellRenderer>>(
690        &self,
691        path: &TreePath,
692        cell: Option<&P>,
693        start_editing: bool,
694    ) {
695        unsafe {
696            gtk_sys::gtk_icon_view_set_cursor(
697                self.as_ref().to_glib_none().0,
698                mut_override(path.to_glib_none().0),
699                cell.map(|p| p.as_ref()).to_glib_none().0,
700                start_editing.to_glib(),
701            );
702        }
703    }
704
705    fn set_drag_dest_item(&self, path: Option<&TreePath>, pos: IconViewDropPosition) {
706        unsafe {
707            gtk_sys::gtk_icon_view_set_drag_dest_item(
708                self.as_ref().to_glib_none().0,
709                mut_override(path.to_glib_none().0),
710                pos.to_glib(),
711            );
712        }
713    }
714
715    fn set_item_orientation(&self, orientation: Orientation) {
716        unsafe {
717            gtk_sys::gtk_icon_view_set_item_orientation(
718                self.as_ref().to_glib_none().0,
719                orientation.to_glib(),
720            );
721        }
722    }
723
724    fn set_item_padding(&self, item_padding: i32) {
725        unsafe {
726            gtk_sys::gtk_icon_view_set_item_padding(self.as_ref().to_glib_none().0, item_padding);
727        }
728    }
729
730    fn set_item_width(&self, item_width: i32) {
731        unsafe {
732            gtk_sys::gtk_icon_view_set_item_width(self.as_ref().to_glib_none().0, item_width);
733        }
734    }
735
736    fn set_margin(&self, margin: i32) {
737        unsafe {
738            gtk_sys::gtk_icon_view_set_margin(self.as_ref().to_glib_none().0, margin);
739        }
740    }
741
742    fn set_markup_column(&self, column: i32) {
743        unsafe {
744            gtk_sys::gtk_icon_view_set_markup_column(self.as_ref().to_glib_none().0, column);
745        }
746    }
747
748    fn set_model<P: IsA<TreeModel>>(&self, model: Option<&P>) {
749        unsafe {
750            gtk_sys::gtk_icon_view_set_model(
751                self.as_ref().to_glib_none().0,
752                model.map(|p| p.as_ref()).to_glib_none().0,
753            );
754        }
755    }
756
757    fn set_pixbuf_column(&self, column: i32) {
758        unsafe {
759            gtk_sys::gtk_icon_view_set_pixbuf_column(self.as_ref().to_glib_none().0, column);
760        }
761    }
762
763    fn set_reorderable(&self, reorderable: bool) {
764        unsafe {
765            gtk_sys::gtk_icon_view_set_reorderable(
766                self.as_ref().to_glib_none().0,
767                reorderable.to_glib(),
768            );
769        }
770    }
771
772    fn set_row_spacing(&self, row_spacing: i32) {
773        unsafe {
774            gtk_sys::gtk_icon_view_set_row_spacing(self.as_ref().to_glib_none().0, row_spacing);
775        }
776    }
777
778    fn set_selection_mode(&self, mode: SelectionMode) {
779        unsafe {
780            gtk_sys::gtk_icon_view_set_selection_mode(
781                self.as_ref().to_glib_none().0,
782                mode.to_glib(),
783            );
784        }
785    }
786
787    fn set_spacing(&self, spacing: i32) {
788        unsafe {
789            gtk_sys::gtk_icon_view_set_spacing(self.as_ref().to_glib_none().0, spacing);
790        }
791    }
792
793    fn set_text_column(&self, column: i32) {
794        unsafe {
795            gtk_sys::gtk_icon_view_set_text_column(self.as_ref().to_glib_none().0, column);
796        }
797    }
798
799    fn set_tooltip_cell<P: IsA<CellRenderer>>(
800        &self,
801        tooltip: &Tooltip,
802        path: &TreePath,
803        cell: Option<&P>,
804    ) {
805        unsafe {
806            gtk_sys::gtk_icon_view_set_tooltip_cell(
807                self.as_ref().to_glib_none().0,
808                tooltip.to_glib_none().0,
809                mut_override(path.to_glib_none().0),
810                cell.map(|p| p.as_ref()).to_glib_none().0,
811            );
812        }
813    }
814
815    fn set_tooltip_column(&self, column: i32) {
816        unsafe {
817            gtk_sys::gtk_icon_view_set_tooltip_column(self.as_ref().to_glib_none().0, column);
818        }
819    }
820
821    fn set_tooltip_item(&self, tooltip: &Tooltip, path: &TreePath) {
822        unsafe {
823            gtk_sys::gtk_icon_view_set_tooltip_item(
824                self.as_ref().to_glib_none().0,
825                tooltip.to_glib_none().0,
826                mut_override(path.to_glib_none().0),
827            );
828        }
829    }
830
831    fn unselect_all(&self) {
832        unsafe {
833            gtk_sys::gtk_icon_view_unselect_all(self.as_ref().to_glib_none().0);
834        }
835    }
836
837    fn unselect_path(&self, path: &TreePath) {
838        unsafe {
839            gtk_sys::gtk_icon_view_unselect_path(
840                self.as_ref().to_glib_none().0,
841                mut_override(path.to_glib_none().0),
842            );
843        }
844    }
845
846    fn unset_model_drag_dest(&self) {
847        unsafe {
848            gtk_sys::gtk_icon_view_unset_model_drag_dest(self.as_ref().to_glib_none().0);
849        }
850    }
851
852    fn unset_model_drag_source(&self) {
853        unsafe {
854            gtk_sys::gtk_icon_view_unset_model_drag_source(self.as_ref().to_glib_none().0);
855        }
856    }
857
858    fn get_property_cell_area(&self) -> Option<CellArea> {
859        unsafe {
860            let mut value = Value::from_type(<CellArea as StaticType>::static_type());
861            gobject_sys::g_object_get_property(
862                self.to_glib_none().0 as *mut gobject_sys::GObject,
863                b"cell-area\0".as_ptr() as *const _,
864                value.to_glib_none_mut().0,
865            );
866            value.get()
867        }
868    }
869
870    fn connect_activate_cursor_item<F: Fn(&Self) -> bool + 'static>(
871        &self,
872        f: F,
873    ) -> SignalHandlerId {
874        unsafe extern "C" fn activate_cursor_item_trampoline<P, F: Fn(&P) -> bool + 'static>(
875            this: *mut gtk_sys::GtkIconView,
876            f: glib_sys::gpointer,
877        ) -> glib_sys::gboolean
878        where
879            P: IsA<IconView>,
880        {
881            let f: &F = &*(f as *const F);
882            f(&IconView::from_glib_borrow(this).unsafe_cast()).to_glib()
883        }
884        unsafe {
885            let f: Box_<F> = Box_::new(f);
886            connect_raw(
887                self.as_ptr() as *mut _,
888                b"activate-cursor-item\0".as_ptr() as *const _,
889                Some(transmute(
890                    activate_cursor_item_trampoline::<Self, F> as usize,
891                )),
892                Box_::into_raw(f),
893            )
894        }
895    }
896
897    fn emit_activate_cursor_item(&self) -> bool {
898        let res = unsafe {
899            glib::Object::from_glib_borrow(self.to_glib_none().0 as *mut gobject_sys::GObject)
900                .emit("activate-cursor-item", &[])
901                .unwrap()
902        };
903        res.unwrap().get().unwrap()
904    }
905
906    fn connect_item_activated<F: Fn(&Self, &TreePath) + 'static>(&self, f: F) -> SignalHandlerId {
907        unsafe extern "C" fn item_activated_trampoline<P, F: Fn(&P, &TreePath) + 'static>(
908            this: *mut gtk_sys::GtkIconView,
909            path: *mut gtk_sys::GtkTreePath,
910            f: glib_sys::gpointer,
911        ) where
912            P: IsA<IconView>,
913        {
914            let f: &F = &*(f as *const F);
915            f(
916                &IconView::from_glib_borrow(this).unsafe_cast(),
917                &from_glib_borrow(path),
918            )
919        }
920        unsafe {
921            let f: Box_<F> = Box_::new(f);
922            connect_raw(
923                self.as_ptr() as *mut _,
924                b"item-activated\0".as_ptr() as *const _,
925                Some(transmute(item_activated_trampoline::<Self, F> as usize)),
926                Box_::into_raw(f),
927            )
928        }
929    }
930
931    fn connect_move_cursor<F: Fn(&Self, MovementStep, i32) -> bool + 'static>(
932        &self,
933        f: F,
934    ) -> SignalHandlerId {
935        unsafe extern "C" fn move_cursor_trampoline<
936            P,
937            F: Fn(&P, MovementStep, i32) -> bool + 'static,
938        >(
939            this: *mut gtk_sys::GtkIconView,
940            step: gtk_sys::GtkMovementStep,
941            count: libc::c_int,
942            f: glib_sys::gpointer,
943        ) -> glib_sys::gboolean
944        where
945            P: IsA<IconView>,
946        {
947            let f: &F = &*(f as *const F);
948            f(
949                &IconView::from_glib_borrow(this).unsafe_cast(),
950                from_glib(step),
951                count,
952            )
953            .to_glib()
954        }
955        unsafe {
956            let f: Box_<F> = Box_::new(f);
957            connect_raw(
958                self.as_ptr() as *mut _,
959                b"move-cursor\0".as_ptr() as *const _,
960                Some(transmute(move_cursor_trampoline::<Self, F> as usize)),
961                Box_::into_raw(f),
962            )
963        }
964    }
965
966    fn emit_move_cursor(&self, step: MovementStep, count: i32) -> bool {
967        let res = unsafe {
968            glib::Object::from_glib_borrow(self.to_glib_none().0 as *mut gobject_sys::GObject)
969                .emit("move-cursor", &[&step, &count])
970                .unwrap()
971        };
972        res.unwrap().get().unwrap()
973    }
974
975    fn connect_select_all<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
976        unsafe extern "C" fn select_all_trampoline<P, F: Fn(&P) + 'static>(
977            this: *mut gtk_sys::GtkIconView,
978            f: glib_sys::gpointer,
979        ) where
980            P: IsA<IconView>,
981        {
982            let f: &F = &*(f as *const F);
983            f(&IconView::from_glib_borrow(this).unsafe_cast())
984        }
985        unsafe {
986            let f: Box_<F> = Box_::new(f);
987            connect_raw(
988                self.as_ptr() as *mut _,
989                b"select-all\0".as_ptr() as *const _,
990                Some(transmute(select_all_trampoline::<Self, F> as usize)),
991                Box_::into_raw(f),
992            )
993        }
994    }
995
996    fn emit_select_all(&self) {
997        let _ = unsafe {
998            glib::Object::from_glib_borrow(self.to_glib_none().0 as *mut gobject_sys::GObject)
999                .emit("select-all", &[])
1000                .unwrap()
1001        };
1002    }
1003
1004    fn connect_select_cursor_item<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1005        unsafe extern "C" fn select_cursor_item_trampoline<P, F: Fn(&P) + 'static>(
1006            this: *mut gtk_sys::GtkIconView,
1007            f: glib_sys::gpointer,
1008        ) where
1009            P: IsA<IconView>,
1010        {
1011            let f: &F = &*(f as *const F);
1012            f(&IconView::from_glib_borrow(this).unsafe_cast())
1013        }
1014        unsafe {
1015            let f: Box_<F> = Box_::new(f);
1016            connect_raw(
1017                self.as_ptr() as *mut _,
1018                b"select-cursor-item\0".as_ptr() as *const _,
1019                Some(transmute(select_cursor_item_trampoline::<Self, F> as usize)),
1020                Box_::into_raw(f),
1021            )
1022        }
1023    }
1024
1025    fn emit_select_cursor_item(&self) {
1026        let _ = unsafe {
1027            glib::Object::from_glib_borrow(self.to_glib_none().0 as *mut gobject_sys::GObject)
1028                .emit("select-cursor-item", &[])
1029                .unwrap()
1030        };
1031    }
1032
1033    fn connect_selection_changed<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1034        unsafe extern "C" fn selection_changed_trampoline<P, F: Fn(&P) + 'static>(
1035            this: *mut gtk_sys::GtkIconView,
1036            f: glib_sys::gpointer,
1037        ) where
1038            P: IsA<IconView>,
1039        {
1040            let f: &F = &*(f as *const F);
1041            f(&IconView::from_glib_borrow(this).unsafe_cast())
1042        }
1043        unsafe {
1044            let f: Box_<F> = Box_::new(f);
1045            connect_raw(
1046                self.as_ptr() as *mut _,
1047                b"selection-changed\0".as_ptr() as *const _,
1048                Some(transmute(selection_changed_trampoline::<Self, F> as usize)),
1049                Box_::into_raw(f),
1050            )
1051        }
1052    }
1053
1054    fn connect_toggle_cursor_item<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1055        unsafe extern "C" fn toggle_cursor_item_trampoline<P, F: Fn(&P) + 'static>(
1056            this: *mut gtk_sys::GtkIconView,
1057            f: glib_sys::gpointer,
1058        ) where
1059            P: IsA<IconView>,
1060        {
1061            let f: &F = &*(f as *const F);
1062            f(&IconView::from_glib_borrow(this).unsafe_cast())
1063        }
1064        unsafe {
1065            let f: Box_<F> = Box_::new(f);
1066            connect_raw(
1067                self.as_ptr() as *mut _,
1068                b"toggle-cursor-item\0".as_ptr() as *const _,
1069                Some(transmute(toggle_cursor_item_trampoline::<Self, F> as usize)),
1070                Box_::into_raw(f),
1071            )
1072        }
1073    }
1074
1075    fn emit_toggle_cursor_item(&self) {
1076        let _ = unsafe {
1077            glib::Object::from_glib_borrow(self.to_glib_none().0 as *mut gobject_sys::GObject)
1078                .emit("toggle-cursor-item", &[])
1079                .unwrap()
1080        };
1081    }
1082
1083    fn connect_unselect_all<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1084        unsafe extern "C" fn unselect_all_trampoline<P, F: Fn(&P) + 'static>(
1085            this: *mut gtk_sys::GtkIconView,
1086            f: glib_sys::gpointer,
1087        ) where
1088            P: IsA<IconView>,
1089        {
1090            let f: &F = &*(f as *const F);
1091            f(&IconView::from_glib_borrow(this).unsafe_cast())
1092        }
1093        unsafe {
1094            let f: Box_<F> = Box_::new(f);
1095            connect_raw(
1096                self.as_ptr() as *mut _,
1097                b"unselect-all\0".as_ptr() as *const _,
1098                Some(transmute(unselect_all_trampoline::<Self, F> as usize)),
1099                Box_::into_raw(f),
1100            )
1101        }
1102    }
1103
1104    fn emit_unselect_all(&self) {
1105        let _ = unsafe {
1106            glib::Object::from_glib_borrow(self.to_glib_none().0 as *mut gobject_sys::GObject)
1107                .emit("unselect-all", &[])
1108                .unwrap()
1109        };
1110    }
1111
1112    fn connect_property_activate_on_single_click_notify<F: Fn(&Self) + 'static>(
1113        &self,
1114        f: F,
1115    ) -> SignalHandlerId {
1116        unsafe extern "C" fn notify_activate_on_single_click_trampoline<P, F: Fn(&P) + 'static>(
1117            this: *mut gtk_sys::GtkIconView,
1118            _param_spec: glib_sys::gpointer,
1119            f: glib_sys::gpointer,
1120        ) where
1121            P: IsA<IconView>,
1122        {
1123            let f: &F = &*(f as *const F);
1124            f(&IconView::from_glib_borrow(this).unsafe_cast())
1125        }
1126        unsafe {
1127            let f: Box_<F> = Box_::new(f);
1128            connect_raw(
1129                self.as_ptr() as *mut _,
1130                b"notify::activate-on-single-click\0".as_ptr() as *const _,
1131                Some(transmute(
1132                    notify_activate_on_single_click_trampoline::<Self, F> as usize,
1133                )),
1134                Box_::into_raw(f),
1135            )
1136        }
1137    }
1138
1139    fn connect_property_column_spacing_notify<F: Fn(&Self) + 'static>(
1140        &self,
1141        f: F,
1142    ) -> SignalHandlerId {
1143        unsafe extern "C" fn notify_column_spacing_trampoline<P, F: Fn(&P) + 'static>(
1144            this: *mut gtk_sys::GtkIconView,
1145            _param_spec: glib_sys::gpointer,
1146            f: glib_sys::gpointer,
1147        ) where
1148            P: IsA<IconView>,
1149        {
1150            let f: &F = &*(f as *const F);
1151            f(&IconView::from_glib_borrow(this).unsafe_cast())
1152        }
1153        unsafe {
1154            let f: Box_<F> = Box_::new(f);
1155            connect_raw(
1156                self.as_ptr() as *mut _,
1157                b"notify::column-spacing\0".as_ptr() as *const _,
1158                Some(transmute(
1159                    notify_column_spacing_trampoline::<Self, F> as usize,
1160                )),
1161                Box_::into_raw(f),
1162            )
1163        }
1164    }
1165
1166    fn connect_property_columns_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1167        unsafe extern "C" fn notify_columns_trampoline<P, F: Fn(&P) + 'static>(
1168            this: *mut gtk_sys::GtkIconView,
1169            _param_spec: glib_sys::gpointer,
1170            f: glib_sys::gpointer,
1171        ) where
1172            P: IsA<IconView>,
1173        {
1174            let f: &F = &*(f as *const F);
1175            f(&IconView::from_glib_borrow(this).unsafe_cast())
1176        }
1177        unsafe {
1178            let f: Box_<F> = Box_::new(f);
1179            connect_raw(
1180                self.as_ptr() as *mut _,
1181                b"notify::columns\0".as_ptr() as *const _,
1182                Some(transmute(notify_columns_trampoline::<Self, F> as usize)),
1183                Box_::into_raw(f),
1184            )
1185        }
1186    }
1187
1188    fn connect_property_item_orientation_notify<F: Fn(&Self) + 'static>(
1189        &self,
1190        f: F,
1191    ) -> SignalHandlerId {
1192        unsafe extern "C" fn notify_item_orientation_trampoline<P, F: Fn(&P) + 'static>(
1193            this: *mut gtk_sys::GtkIconView,
1194            _param_spec: glib_sys::gpointer,
1195            f: glib_sys::gpointer,
1196        ) where
1197            P: IsA<IconView>,
1198        {
1199            let f: &F = &*(f as *const F);
1200            f(&IconView::from_glib_borrow(this).unsafe_cast())
1201        }
1202        unsafe {
1203            let f: Box_<F> = Box_::new(f);
1204            connect_raw(
1205                self.as_ptr() as *mut _,
1206                b"notify::item-orientation\0".as_ptr() as *const _,
1207                Some(transmute(
1208                    notify_item_orientation_trampoline::<Self, F> as usize,
1209                )),
1210                Box_::into_raw(f),
1211            )
1212        }
1213    }
1214
1215    fn connect_property_item_padding_notify<F: Fn(&Self) + 'static>(
1216        &self,
1217        f: F,
1218    ) -> SignalHandlerId {
1219        unsafe extern "C" fn notify_item_padding_trampoline<P, F: Fn(&P) + 'static>(
1220            this: *mut gtk_sys::GtkIconView,
1221            _param_spec: glib_sys::gpointer,
1222            f: glib_sys::gpointer,
1223        ) where
1224            P: IsA<IconView>,
1225        {
1226            let f: &F = &*(f as *const F);
1227            f(&IconView::from_glib_borrow(this).unsafe_cast())
1228        }
1229        unsafe {
1230            let f: Box_<F> = Box_::new(f);
1231            connect_raw(
1232                self.as_ptr() as *mut _,
1233                b"notify::item-padding\0".as_ptr() as *const _,
1234                Some(transmute(
1235                    notify_item_padding_trampoline::<Self, F> as usize,
1236                )),
1237                Box_::into_raw(f),
1238            )
1239        }
1240    }
1241
1242    fn connect_property_item_width_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1243        unsafe extern "C" fn notify_item_width_trampoline<P, F: Fn(&P) + 'static>(
1244            this: *mut gtk_sys::GtkIconView,
1245            _param_spec: glib_sys::gpointer,
1246            f: glib_sys::gpointer,
1247        ) where
1248            P: IsA<IconView>,
1249        {
1250            let f: &F = &*(f as *const F);
1251            f(&IconView::from_glib_borrow(this).unsafe_cast())
1252        }
1253        unsafe {
1254            let f: Box_<F> = Box_::new(f);
1255            connect_raw(
1256                self.as_ptr() as *mut _,
1257                b"notify::item-width\0".as_ptr() as *const _,
1258                Some(transmute(notify_item_width_trampoline::<Self, F> as usize)),
1259                Box_::into_raw(f),
1260            )
1261        }
1262    }
1263
1264    fn connect_property_margin_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1265        unsafe extern "C" fn notify_margin_trampoline<P, F: Fn(&P) + 'static>(
1266            this: *mut gtk_sys::GtkIconView,
1267            _param_spec: glib_sys::gpointer,
1268            f: glib_sys::gpointer,
1269        ) where
1270            P: IsA<IconView>,
1271        {
1272            let f: &F = &*(f as *const F);
1273            f(&IconView::from_glib_borrow(this).unsafe_cast())
1274        }
1275        unsafe {
1276            let f: Box_<F> = Box_::new(f);
1277            connect_raw(
1278                self.as_ptr() as *mut _,
1279                b"notify::margin\0".as_ptr() as *const _,
1280                Some(transmute(notify_margin_trampoline::<Self, F> as usize)),
1281                Box_::into_raw(f),
1282            )
1283        }
1284    }
1285
1286    fn connect_property_markup_column_notify<F: Fn(&Self) + 'static>(
1287        &self,
1288        f: F,
1289    ) -> SignalHandlerId {
1290        unsafe extern "C" fn notify_markup_column_trampoline<P, F: Fn(&P) + 'static>(
1291            this: *mut gtk_sys::GtkIconView,
1292            _param_spec: glib_sys::gpointer,
1293            f: glib_sys::gpointer,
1294        ) where
1295            P: IsA<IconView>,
1296        {
1297            let f: &F = &*(f as *const F);
1298            f(&IconView::from_glib_borrow(this).unsafe_cast())
1299        }
1300        unsafe {
1301            let f: Box_<F> = Box_::new(f);
1302            connect_raw(
1303                self.as_ptr() as *mut _,
1304                b"notify::markup-column\0".as_ptr() as *const _,
1305                Some(transmute(
1306                    notify_markup_column_trampoline::<Self, F> as usize,
1307                )),
1308                Box_::into_raw(f),
1309            )
1310        }
1311    }
1312
1313    fn connect_property_model_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1314        unsafe extern "C" fn notify_model_trampoline<P, F: Fn(&P) + 'static>(
1315            this: *mut gtk_sys::GtkIconView,
1316            _param_spec: glib_sys::gpointer,
1317            f: glib_sys::gpointer,
1318        ) where
1319            P: IsA<IconView>,
1320        {
1321            let f: &F = &*(f as *const F);
1322            f(&IconView::from_glib_borrow(this).unsafe_cast())
1323        }
1324        unsafe {
1325            let f: Box_<F> = Box_::new(f);
1326            connect_raw(
1327                self.as_ptr() as *mut _,
1328                b"notify::model\0".as_ptr() as *const _,
1329                Some(transmute(notify_model_trampoline::<Self, F> as usize)),
1330                Box_::into_raw(f),
1331            )
1332        }
1333    }
1334
1335    fn connect_property_pixbuf_column_notify<F: Fn(&Self) + 'static>(
1336        &self,
1337        f: F,
1338    ) -> SignalHandlerId {
1339        unsafe extern "C" fn notify_pixbuf_column_trampoline<P, F: Fn(&P) + 'static>(
1340            this: *mut gtk_sys::GtkIconView,
1341            _param_spec: glib_sys::gpointer,
1342            f: glib_sys::gpointer,
1343        ) where
1344            P: IsA<IconView>,
1345        {
1346            let f: &F = &*(f as *const F);
1347            f(&IconView::from_glib_borrow(this).unsafe_cast())
1348        }
1349        unsafe {
1350            let f: Box_<F> = Box_::new(f);
1351            connect_raw(
1352                self.as_ptr() as *mut _,
1353                b"notify::pixbuf-column\0".as_ptr() as *const _,
1354                Some(transmute(
1355                    notify_pixbuf_column_trampoline::<Self, F> as usize,
1356                )),
1357                Box_::into_raw(f),
1358            )
1359        }
1360    }
1361
1362    fn connect_property_reorderable_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1363        unsafe extern "C" fn notify_reorderable_trampoline<P, F: Fn(&P) + 'static>(
1364            this: *mut gtk_sys::GtkIconView,
1365            _param_spec: glib_sys::gpointer,
1366            f: glib_sys::gpointer,
1367        ) where
1368            P: IsA<IconView>,
1369        {
1370            let f: &F = &*(f as *const F);
1371            f(&IconView::from_glib_borrow(this).unsafe_cast())
1372        }
1373        unsafe {
1374            let f: Box_<F> = Box_::new(f);
1375            connect_raw(
1376                self.as_ptr() as *mut _,
1377                b"notify::reorderable\0".as_ptr() as *const _,
1378                Some(transmute(notify_reorderable_trampoline::<Self, F> as usize)),
1379                Box_::into_raw(f),
1380            )
1381        }
1382    }
1383
1384    fn connect_property_row_spacing_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1385        unsafe extern "C" fn notify_row_spacing_trampoline<P, F: Fn(&P) + 'static>(
1386            this: *mut gtk_sys::GtkIconView,
1387            _param_spec: glib_sys::gpointer,
1388            f: glib_sys::gpointer,
1389        ) where
1390            P: IsA<IconView>,
1391        {
1392            let f: &F = &*(f as *const F);
1393            f(&IconView::from_glib_borrow(this).unsafe_cast())
1394        }
1395        unsafe {
1396            let f: Box_<F> = Box_::new(f);
1397            connect_raw(
1398                self.as_ptr() as *mut _,
1399                b"notify::row-spacing\0".as_ptr() as *const _,
1400                Some(transmute(notify_row_spacing_trampoline::<Self, F> as usize)),
1401                Box_::into_raw(f),
1402            )
1403        }
1404    }
1405
1406    fn connect_property_selection_mode_notify<F: Fn(&Self) + 'static>(
1407        &self,
1408        f: F,
1409    ) -> SignalHandlerId {
1410        unsafe extern "C" fn notify_selection_mode_trampoline<P, F: Fn(&P) + 'static>(
1411            this: *mut gtk_sys::GtkIconView,
1412            _param_spec: glib_sys::gpointer,
1413            f: glib_sys::gpointer,
1414        ) where
1415            P: IsA<IconView>,
1416        {
1417            let f: &F = &*(f as *const F);
1418            f(&IconView::from_glib_borrow(this).unsafe_cast())
1419        }
1420        unsafe {
1421            let f: Box_<F> = Box_::new(f);
1422            connect_raw(
1423                self.as_ptr() as *mut _,
1424                b"notify::selection-mode\0".as_ptr() as *const _,
1425                Some(transmute(
1426                    notify_selection_mode_trampoline::<Self, F> as usize,
1427                )),
1428                Box_::into_raw(f),
1429            )
1430        }
1431    }
1432
1433    fn connect_property_spacing_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1434        unsafe extern "C" fn notify_spacing_trampoline<P, F: Fn(&P) + 'static>(
1435            this: *mut gtk_sys::GtkIconView,
1436            _param_spec: glib_sys::gpointer,
1437            f: glib_sys::gpointer,
1438        ) where
1439            P: IsA<IconView>,
1440        {
1441            let f: &F = &*(f as *const F);
1442            f(&IconView::from_glib_borrow(this).unsafe_cast())
1443        }
1444        unsafe {
1445            let f: Box_<F> = Box_::new(f);
1446            connect_raw(
1447                self.as_ptr() as *mut _,
1448                b"notify::spacing\0".as_ptr() as *const _,
1449                Some(transmute(notify_spacing_trampoline::<Self, F> as usize)),
1450                Box_::into_raw(f),
1451            )
1452        }
1453    }
1454
1455    fn connect_property_text_column_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1456        unsafe extern "C" fn notify_text_column_trampoline<P, F: Fn(&P) + 'static>(
1457            this: *mut gtk_sys::GtkIconView,
1458            _param_spec: glib_sys::gpointer,
1459            f: glib_sys::gpointer,
1460        ) where
1461            P: IsA<IconView>,
1462        {
1463            let f: &F = &*(f as *const F);
1464            f(&IconView::from_glib_borrow(this).unsafe_cast())
1465        }
1466        unsafe {
1467            let f: Box_<F> = Box_::new(f);
1468            connect_raw(
1469                self.as_ptr() as *mut _,
1470                b"notify::text-column\0".as_ptr() as *const _,
1471                Some(transmute(notify_text_column_trampoline::<Self, F> as usize)),
1472                Box_::into_raw(f),
1473            )
1474        }
1475    }
1476
1477    fn connect_property_tooltip_column_notify<F: Fn(&Self) + 'static>(
1478        &self,
1479        f: F,
1480    ) -> SignalHandlerId {
1481        unsafe extern "C" fn notify_tooltip_column_trampoline<P, F: Fn(&P) + 'static>(
1482            this: *mut gtk_sys::GtkIconView,
1483            _param_spec: glib_sys::gpointer,
1484            f: glib_sys::gpointer,
1485        ) where
1486            P: IsA<IconView>,
1487        {
1488            let f: &F = &*(f as *const F);
1489            f(&IconView::from_glib_borrow(this).unsafe_cast())
1490        }
1491        unsafe {
1492            let f: Box_<F> = Box_::new(f);
1493            connect_raw(
1494                self.as_ptr() as *mut _,
1495                b"notify::tooltip-column\0".as_ptr() as *const _,
1496                Some(transmute(
1497                    notify_tooltip_column_trampoline::<Self, F> as usize,
1498                )),
1499                Box_::into_raw(f),
1500            )
1501        }
1502    }
1503}
1504
1505impl fmt::Display for IconView {
1506    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1507        write!(f, "IconView")
1508    }
1509}