Skip to main content

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 crate::{
6    Adjustment, Align, Buildable, CellArea, CellLayout, CellRenderer, Container,
7    IconViewDropPosition, MovementStep, Orientation, ResizeMode, Scrollable, ScrollablePolicy,
8    SelectionMode, Tooltip, TreeIter, TreeModel, TreePath, Widget,
9};
10use glib::{
11    prelude::*,
12    signal::{connect_raw, SignalHandlerId},
13    translate::*,
14};
15use std::{boxed::Box as Box_, fmt, mem, mem::transmute, ptr};
16
17glib::wrapper! {
18    /// [`IconView`][crate::IconView] provides an alternative view on a [`TreeModel`][crate::TreeModel].
19    /// It displays the model as a grid of icons with labels. Like
20    /// [`TreeView`][crate::TreeView], it allows to select one or multiple items
21    /// (depending on the selection mode, see [`IconViewExt::set_selection_mode()`][crate::prelude::IconViewExt::set_selection_mode()]).
22    /// In addition to selection with the arrow keys, [`IconView`][crate::IconView] supports
23    /// rubberband selection, which is controlled by dragging the pointer.
24    ///
25    /// Note that if the tree model is backed by an actual tree store (as
26    /// opposed to a flat list where the mapping to icons is obvious),
27    /// [`IconView`][crate::IconView] will only display the first level of the tree and
28    /// ignore the tree’s branches.
29    ///
30    /// # CSS nodes
31    ///
32    ///
33    ///
34    /// **⚠️ The following code is in plain ⚠️**
35    ///
36    /// ```plain
37    /// iconview.view
38    /// ╰── [rubberband]
39    /// ```
40    ///
41    /// GtkIconView has a single CSS node with name iconview and style class .view.
42    /// For rubberband selection, a subnode with name rubberband is used.
43    ///
44    /// ## Properties
45    ///
46    ///
47    /// #### `activate-on-single-click`
48    ///  The activate-on-single-click property specifies whether the "item-activated" signal
49    /// will be emitted after a single click.
50    ///
51    /// Readable | Writeable
52    ///
53    ///
54    /// #### `cell-area`
55    ///  The [`CellArea`][crate::CellArea] used to layout cell renderers for this view.
56    ///
57    /// If no area is specified when creating the icon view with [`IconView::with_area()`][crate::IconView::with_area()]
58    /// a [`CellAreaBox`][crate::CellAreaBox] will be used.
59    ///
60    /// Readable | Writeable | Construct Only
61    ///
62    ///
63    /// #### `column-spacing`
64    ///  The column-spacing property specifies the space which is inserted between
65    /// the columns of the icon view.
66    ///
67    /// Readable | Writeable
68    ///
69    ///
70    /// #### `columns`
71    ///  The columns property contains the number of the columns in which the
72    /// items should be displayed. If it is -1, the number of columns will
73    /// be chosen automatically to fill the available area.
74    ///
75    /// Readable | Writeable
76    ///
77    ///
78    /// #### `item-orientation`
79    ///  The item-orientation property specifies how the cells (i.e. the icon and
80    /// the text) of the item are positioned relative to each other.
81    ///
82    /// Readable | Writeable
83    ///
84    ///
85    /// #### `item-padding`
86    ///  The item-padding property specifies the padding around each
87    /// of the icon view's item.
88    ///
89    /// Readable | Writeable
90    ///
91    ///
92    /// #### `item-width`
93    ///  The item-width property specifies the width to use for each item.
94    /// If it is set to -1, the icon view will automatically determine a
95    /// suitable item size.
96    ///
97    /// Readable | Writeable
98    ///
99    ///
100    /// #### `margin`
101    ///  The margin property specifies the space which is inserted
102    /// at the edges of the icon view.
103    ///
104    /// Readable | Writeable
105    ///
106    ///
107    /// #### `markup-column`
108    ///  The ::markup-column property contains the number of the model column
109    /// containing markup information to be displayed. The markup column must be
110    /// of type `G_TYPE_STRING`. If this property and the :text-column property
111    /// are both set to column numbers, it overrides the text column.
112    /// If both are set to -1, no texts are displayed.
113    ///
114    /// Readable | Writeable
115    ///
116    ///
117    /// #### `model`
118    ///  Readable | Writeable
119    ///
120    ///
121    /// #### `pixbuf-column`
122    ///  The ::pixbuf-column property contains the number of the model column
123    /// containing the pixbufs which are displayed. The pixbuf column must be
124    /// of type `GDK_TYPE_PIXBUF`. Setting this property to -1 turns off the
125    /// display of pixbufs.
126    ///
127    /// Readable | Writeable
128    ///
129    ///
130    /// #### `reorderable`
131    ///  The reorderable property specifies if the items can be reordered
132    /// by DND.
133    ///
134    /// Readable | Writeable
135    ///
136    ///
137    /// #### `row-spacing`
138    ///  The row-spacing property specifies the space which is inserted between
139    /// the rows of the icon view.
140    ///
141    /// Readable | Writeable
142    ///
143    ///
144    /// #### `selection-mode`
145    ///  The ::selection-mode property specifies the selection mode of
146    /// icon view. If the mode is [`SelectionMode::Multiple`][crate::SelectionMode::Multiple], rubberband selection
147    /// is enabled, for the other modes, only keyboard selection is possible.
148    ///
149    /// Readable | Writeable
150    ///
151    ///
152    /// #### `spacing`
153    ///  The spacing property specifies the space which is inserted between
154    /// the cells (i.e. the icon and the text) of an item.
155    ///
156    /// Readable | Writeable
157    ///
158    ///
159    /// #### `text-column`
160    ///  The ::text-column property contains the number of the model column
161    /// containing the texts which are displayed. The text column must be
162    /// of type `G_TYPE_STRING`. If this property and the :markup-column
163    /// property are both set to -1, no texts are displayed.
164    ///
165    /// Readable | Writeable
166    ///
167    ///
168    /// #### `tooltip-column`
169    ///  Readable | Writeable
170    /// <details><summary><h4>Container</h4></summary>
171    ///
172    ///
173    /// #### `border-width`
174    ///  Readable | Writeable
175    ///
176    ///
177    /// #### `child`
178    ///  Writeable
179    ///
180    ///
181    /// #### `resize-mode`
182    ///  Readable | Writeable
183    /// </details>
184    /// <details><summary><h4>Widget</h4></summary>
185    ///
186    ///
187    /// #### `app-paintable`
188    ///  Readable | Writeable
189    ///
190    ///
191    /// #### `can-default`
192    ///  Readable | Writeable
193    ///
194    ///
195    /// #### `can-focus`
196    ///  Readable | Writeable
197    ///
198    ///
199    /// #### `composite-child`
200    ///  Readable
201    ///
202    ///
203    /// #### `double-buffered`
204    ///  Whether the widget is double buffered.
205    ///
206    /// Readable | Writeable
207    ///
208    ///
209    /// #### `events`
210    ///  Readable | Writeable
211    ///
212    ///
213    /// #### `expand`
214    ///  Whether to expand in both directions. Setting this sets both [`hexpand`][struct@crate::Widget#hexpand] and [`vexpand`][struct@crate::Widget#vexpand]
215    ///
216    /// Readable | Writeable
217    ///
218    ///
219    /// #### `focus-on-click`
220    ///  Whether the widget should grab focus when it is clicked with the mouse.
221    ///
222    /// This property is only relevant for widgets that can take focus.
223    ///
224    /// Before 3.20, several widgets (GtkButton, GtkFileChooserButton,
225    /// GtkComboBox) implemented this property individually.
226    ///
227    /// Readable | Writeable
228    ///
229    ///
230    /// #### `halign`
231    ///  How to distribute horizontal space if widget gets extra space, see [`Align`][crate::Align]
232    ///
233    /// Readable | Writeable
234    ///
235    ///
236    /// #### `has-default`
237    ///  Readable | Writeable
238    ///
239    ///
240    /// #### `has-focus`
241    ///  Readable | Writeable
242    ///
243    ///
244    /// #### `has-tooltip`
245    ///  Enables or disables the emission of [`query-tooltip`][struct@crate::Widget#query-tooltip] on `widget`.
246    /// A value of [`true`] indicates that `widget` can have a tooltip, in this case
247    /// the widget will be queried using [`query-tooltip`][struct@crate::Widget#query-tooltip] to determine
248    /// whether it will provide a tooltip or not.
249    ///
250    /// Note that setting this property to [`true`] for the first time will change
251    /// the event masks of the GdkWindows of this widget to include leave-notify
252    /// and motion-notify events. This cannot and will not be undone when the
253    /// property is set to [`false`] again.
254    ///
255    /// Readable | Writeable
256    ///
257    ///
258    /// #### `height-request`
259    ///  Readable | Writeable
260    ///
261    ///
262    /// #### `hexpand`
263    ///  Whether to expand horizontally. See [`WidgetExt::set_hexpand()`][crate::prelude::WidgetExt::set_hexpand()].
264    ///
265    /// Readable | Writeable
266    ///
267    ///
268    /// #### `hexpand-set`
269    ///  Whether to use the [`hexpand`][struct@crate::Widget#hexpand] property. See [`WidgetExt::is_hexpand_set()`][crate::prelude::WidgetExt::is_hexpand_set()].
270    ///
271    /// Readable | Writeable
272    ///
273    ///
274    /// #### `is-focus`
275    ///  Readable | Writeable
276    ///
277    ///
278    /// #### `margin`
279    ///  Sets all four sides' margin at once. If read, returns max
280    /// margin on any side.
281    ///
282    /// Readable | Writeable
283    ///
284    ///
285    /// #### `margin-bottom`
286    ///  Margin on bottom side of widget.
287    ///
288    /// This property adds margin outside of the widget's normal size
289    /// request, the margin will be added in addition to the size from
290    /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
291    ///
292    /// Readable | Writeable
293    ///
294    ///
295    /// #### `margin-end`
296    ///  Margin on end of widget, horizontally. This property supports
297    /// left-to-right and right-to-left text directions.
298    ///
299    /// This property adds margin outside of the widget's normal size
300    /// request, the margin will be added in addition to the size from
301    /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
302    ///
303    /// Readable | Writeable
304    ///
305    ///
306    /// #### `margin-left`
307    ///  Margin on left side of widget.
308    ///
309    /// This property adds margin outside of the widget's normal size
310    /// request, the margin will be added in addition to the size from
311    /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
312    ///
313    /// Readable | Writeable
314    ///
315    ///
316    /// #### `margin-right`
317    ///  Margin on right side of widget.
318    ///
319    /// This property adds margin outside of the widget's normal size
320    /// request, the margin will be added in addition to the size from
321    /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
322    ///
323    /// Readable | Writeable
324    ///
325    ///
326    /// #### `margin-start`
327    ///  Margin on start of widget, horizontally. This property supports
328    /// left-to-right and right-to-left text directions.
329    ///
330    /// This property adds margin outside of the widget's normal size
331    /// request, the margin will be added in addition to the size from
332    /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
333    ///
334    /// Readable | Writeable
335    ///
336    ///
337    /// #### `margin-top`
338    ///  Margin on top side of widget.
339    ///
340    /// This property adds margin outside of the widget's normal size
341    /// request, the margin will be added in addition to the size from
342    /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
343    ///
344    /// Readable | Writeable
345    ///
346    ///
347    /// #### `name`
348    ///  Readable | Writeable
349    ///
350    ///
351    /// #### `no-show-all`
352    ///  Readable | Writeable
353    ///
354    ///
355    /// #### `opacity`
356    ///  The requested opacity of the widget. See [`WidgetExt::set_opacity()`][crate::prelude::WidgetExt::set_opacity()] for
357    /// more details about window opacity.
358    ///
359    /// Before 3.8 this was only available in GtkWindow
360    ///
361    /// Readable | Writeable
362    ///
363    ///
364    /// #### `parent`
365    ///  Readable | Writeable
366    ///
367    ///
368    /// #### `receives-default`
369    ///  Readable | Writeable
370    ///
371    ///
372    /// #### `scale-factor`
373    ///  The scale factor of the widget. See [`WidgetExt::scale_factor()`][crate::prelude::WidgetExt::scale_factor()] for
374    /// more details about widget scaling.
375    ///
376    /// Readable
377    ///
378    ///
379    /// #### `sensitive`
380    ///  Readable | Writeable
381    ///
382    ///
383    /// #### `style`
384    ///  The style of the widget, which contains information about how it will look (colors, etc).
385    ///
386    /// Readable | Writeable
387    ///
388    ///
389    /// #### `tooltip-markup`
390    ///  Sets the text of tooltip to be the given string, which is marked up
391    /// with the [Pango text markup language][PangoMarkupFormat].
392    /// Also see [`Tooltip::set_markup()`][crate::Tooltip::set_markup()].
393    ///
394    /// This is a convenience property which will take care of getting the
395    /// tooltip shown if the given string is not [`None`]: [`has-tooltip`][struct@crate::Widget#has-tooltip]
396    /// will automatically be set to [`true`] and there will be taken care of
397    /// [`query-tooltip`][struct@crate::Widget#query-tooltip] in the default signal handler.
398    ///
399    /// Note that if both [`tooltip-text`][struct@crate::Widget#tooltip-text] and [`tooltip-markup`][struct@crate::Widget#tooltip-markup]
400    /// are set, the last one wins.
401    ///
402    /// Readable | Writeable
403    ///
404    ///
405    /// #### `tooltip-text`
406    ///  Sets the text of tooltip to be the given string.
407    ///
408    /// Also see [`Tooltip::set_text()`][crate::Tooltip::set_text()].
409    ///
410    /// This is a convenience property which will take care of getting the
411    /// tooltip shown if the given string is not [`None`]: [`has-tooltip`][struct@crate::Widget#has-tooltip]
412    /// will automatically be set to [`true`] and there will be taken care of
413    /// [`query-tooltip`][struct@crate::Widget#query-tooltip] in the default signal handler.
414    ///
415    /// Note that if both [`tooltip-text`][struct@crate::Widget#tooltip-text] and [`tooltip-markup`][struct@crate::Widget#tooltip-markup]
416    /// are set, the last one wins.
417    ///
418    /// Readable | Writeable
419    ///
420    ///
421    /// #### `valign`
422    ///  How to distribute vertical space if widget gets extra space, see [`Align`][crate::Align]
423    ///
424    /// Readable | Writeable
425    ///
426    ///
427    /// #### `vexpand`
428    ///  Whether to expand vertically. See [`WidgetExt::set_vexpand()`][crate::prelude::WidgetExt::set_vexpand()].
429    ///
430    /// Readable | Writeable
431    ///
432    ///
433    /// #### `vexpand-set`
434    ///  Whether to use the [`vexpand`][struct@crate::Widget#vexpand] property. See [`WidgetExt::is_vexpand_set()`][crate::prelude::WidgetExt::is_vexpand_set()].
435    ///
436    /// Readable | Writeable
437    ///
438    ///
439    /// #### `visible`
440    ///  Readable | Writeable
441    ///
442    ///
443    /// #### `width-request`
444    ///  Readable | Writeable
445    ///
446    ///
447    /// #### `window`
448    ///  The widget's window if it is realized, [`None`] otherwise.
449    ///
450    /// Readable
451    /// </details>
452    /// <details><summary><h4>Scrollable</h4></summary>
453    ///
454    ///
455    /// #### `hadjustment`
456    ///  Horizontal [`Adjustment`][crate::Adjustment] of the scrollable widget. This adjustment is
457    /// shared between the scrollable widget and its parent.
458    ///
459    /// Readable | Writeable | Construct
460    ///
461    ///
462    /// #### `hscroll-policy`
463    ///  Determines whether horizontal scrolling should start once the scrollable
464    /// widget is allocated less than its minimum width or less than its natural width.
465    ///
466    /// Readable | Writeable
467    ///
468    ///
469    /// #### `vadjustment`
470    ///  Verical [`Adjustment`][crate::Adjustment] of the scrollable widget. This adjustment is shared
471    /// between the scrollable widget and its parent.
472    ///
473    /// Readable | Writeable | Construct
474    ///
475    ///
476    /// #### `vscroll-policy`
477    ///  Determines whether vertical scrolling should start once the scrollable
478    /// widget is allocated less than its minimum height or less than its natural height.
479    ///
480    /// Readable | Writeable
481    /// </details>
482    ///
483    /// ## Signals
484    ///
485    ///
486    /// #### `activate-cursor-item`
487    ///  A [keybinding signal][GtkBindingSignal]
488    /// which gets emitted when the user activates the currently
489    /// focused item.
490    ///
491    /// Applications should not connect to it, but may emit it with
492    /// `g_signal_emit_by_name()` if they need to control activation
493    /// programmatically.
494    ///
495    /// The default bindings for this signal are Space, Return and Enter.
496    ///
497    /// Action
498    ///
499    ///
500    /// #### `item-activated`
501    ///  The ::item-activated signal is emitted when the method
502    /// [`IconViewExt::item_activated()`][crate::prelude::IconViewExt::item_activated()] is called, when the user double
503    /// clicks an item with the "activate-on-single-click" property set
504    /// to [`false`], or when the user single clicks an item when the
505    /// "activate-on-single-click" property set to [`true`]. It is also
506    /// emitted when a non-editable item is selected and one of the keys:
507    /// Space, Return or Enter is pressed.
508    ///
509    ///
510    ///
511    ///
512    /// #### `move-cursor`
513    ///  The ::move-cursor signal is a
514    /// [keybinding signal][GtkBindingSignal]
515    /// which gets emitted when the user initiates a cursor movement.
516    ///
517    /// Applications should not connect to it, but may emit it with
518    /// `g_signal_emit_by_name()` if they need to control the cursor
519    /// programmatically.
520    ///
521    /// The default bindings for this signal include
522    /// - Arrow keys which move by individual steps
523    /// - Home/End keys which move to the first/last item
524    /// - PageUp/PageDown which move by "pages"
525    /// All of these will extend the selection when combined with
526    /// the Shift modifier.
527    ///
528    /// Action
529    ///
530    ///
531    /// #### `select-all`
532    ///  A [keybinding signal][GtkBindingSignal]
533    /// which gets emitted when the user selects all items.
534    ///
535    /// Applications should not connect to it, but may emit it with
536    /// `g_signal_emit_by_name()` if they need to control selection
537    /// programmatically.
538    ///
539    /// The default binding for this signal is Ctrl-a.
540    ///
541    /// Action
542    ///
543    ///
544    /// #### `select-cursor-item`
545    ///  A [keybinding signal][GtkBindingSignal]
546    /// which gets emitted when the user selects the item that is currently
547    /// focused.
548    ///
549    /// Applications should not connect to it, but may emit it with
550    /// `g_signal_emit_by_name()` if they need to control selection
551    /// programmatically.
552    ///
553    /// There is no default binding for this signal.
554    ///
555    /// Action
556    ///
557    ///
558    /// #### `selection-changed`
559    ///  The ::selection-changed signal is emitted when the selection
560    /// (i.e. the set of selected items) changes.
561    ///
562    ///
563    ///
564    ///
565    /// #### `toggle-cursor-item`
566    ///  A [keybinding signal][GtkBindingSignal]
567    /// which gets emitted when the user toggles whether the currently
568    /// focused item is selected or not. The exact effect of this
569    /// depend on the selection mode.
570    ///
571    /// Applications should not connect to it, but may emit it with
572    /// `g_signal_emit_by_name()` if they need to control selection
573    /// programmatically.
574    ///
575    /// There is no default binding for this signal is Ctrl-Space.
576    ///
577    /// Action
578    ///
579    ///
580    /// #### `unselect-all`
581    ///  A [keybinding signal][GtkBindingSignal]
582    /// which gets emitted when the user unselects all items.
583    ///
584    /// Applications should not connect to it, but may emit it with
585    /// `g_signal_emit_by_name()` if they need to control selection
586    /// programmatically.
587    ///
588    /// The default binding for this signal is Ctrl-Shift-a.
589    ///
590    /// Action
591    /// <details><summary><h4>Container</h4></summary>
592    ///
593    ///
594    /// #### `add`
595    ///
596    ///
597    ///
598    /// #### `check-resize`
599    ///
600    ///
601    ///
602    /// #### `remove`
603    ///
604    ///
605    ///
606    /// #### `set-focus-child`
607    ///
608    /// </details>
609    /// <details><summary><h4>Widget</h4></summary>
610    ///
611    ///
612    /// #### `accel-closures-changed`
613    ///
614    ///
615    ///
616    /// #### `button-press-event`
617    ///  The ::button-press-event signal will be emitted when a button
618    /// (typically from a mouse) is pressed.
619    ///
620    /// To receive this signal, the [`gdk::Window`][crate::gdk::Window] associated to the
621    /// widget needs to enable the [`gdk::EventMask::BUTTON_PRESS_MASK`][crate::gdk::EventMask::BUTTON_PRESS_MASK] mask.
622    ///
623    /// This signal will be sent to the grab widget if there is one.
624    ///
625    ///
626    ///
627    ///
628    /// #### `button-release-event`
629    ///  The ::button-release-event signal will be emitted when a button
630    /// (typically from a mouse) is released.
631    ///
632    /// To receive this signal, the [`gdk::Window`][crate::gdk::Window] associated to the
633    /// widget needs to enable the [`gdk::EventMask::BUTTON_RELEASE_MASK`][crate::gdk::EventMask::BUTTON_RELEASE_MASK] mask.
634    ///
635    /// This signal will be sent to the grab widget if there is one.
636    ///
637    ///
638    ///
639    ///
640    /// #### `can-activate-accel`
641    ///  Determines whether an accelerator that activates the signal
642    /// identified by `signal_id` can currently be activated.
643    /// This signal is present to allow applications and derived
644    /// widgets to override the default [`Widget`][crate::Widget] handling
645    /// for determining whether an accelerator can be activated.
646    ///
647    ///
648    ///
649    ///
650    /// #### `child-notify`
651    ///  The ::child-notify signal is emitted for each
652    /// [child property][child-properties] that has
653    /// changed on an object. The signal's detail holds the property name.
654    ///
655    /// Detailed
656    ///
657    ///
658    /// #### `composited-changed`
659    ///  The ::composited-changed signal is emitted when the composited
660    /// status of `widgets` screen changes.
661    /// See [`Screen::is_composited()`][crate::gdk::Screen::is_composited()].
662    ///
663    /// Action
664    ///
665    ///
666    /// #### `configure-event`
667    ///  The ::configure-event signal will be emitted when the size, position or
668    /// stacking of the `widget`'s window has changed.
669    ///
670    /// To receive this signal, the [`gdk::Window`][crate::gdk::Window] associated to the widget needs
671    /// to enable the [`gdk::EventMask::STRUCTURE_MASK`][crate::gdk::EventMask::STRUCTURE_MASK] mask. GDK will enable this mask
672    /// automatically for all new windows.
673    ///
674    ///
675    ///
676    ///
677    /// #### `damage-event`
678    ///  Emitted when a redirected window belonging to `widget` gets drawn into.
679    /// The region/area members of the event shows what area of the redirected
680    /// drawable was drawn into.
681    ///
682    ///
683    ///
684    ///
685    /// #### `delete-event`
686    ///  The ::delete-event signal is emitted if a user requests that
687    /// a toplevel window is closed. The default handler for this signal
688    /// destroys the window. Connecting [`WidgetExtManual::hide_on_delete()`][crate::prelude::WidgetExtManual::hide_on_delete()] to
689    /// this signal will cause the window to be hidden instead, so that
690    /// it can later be shown again without reconstructing it.
691    ///
692    ///
693    ///
694    ///
695    /// #### `destroy`
696    ///  Signals that all holders of a reference to the widget should release
697    /// the reference that they hold. May result in finalization of the widget
698    /// if all references are released.
699    ///
700    /// This signal is not suitable for saving widget state.
701    ///
702    ///
703    ///
704    ///
705    /// #### `destroy-event`
706    ///  The ::destroy-event signal is emitted when a [`gdk::Window`][crate::gdk::Window] is destroyed.
707    /// You rarely get this signal, because most widgets disconnect themselves
708    /// from their window before they destroy it, so no widget owns the
709    /// window at destroy time.
710    ///
711    /// To receive this signal, the [`gdk::Window`][crate::gdk::Window] associated to the widget needs
712    /// to enable the [`gdk::EventMask::STRUCTURE_MASK`][crate::gdk::EventMask::STRUCTURE_MASK] mask. GDK will enable this mask
713    /// automatically for all new windows.
714    ///
715    ///
716    ///
717    ///
718    /// #### `direction-changed`
719    ///  The ::direction-changed signal is emitted when the text direction
720    /// of a widget changes.
721    ///
722    ///
723    ///
724    ///
725    /// #### `drag-begin`
726    ///  The ::drag-begin signal is emitted on the drag source when a drag is
727    /// started. A typical reason to connect to this signal is to set up a
728    /// custom drag icon with e.g. [`WidgetExt::drag_source_set_icon_pixbuf()`][crate::prelude::WidgetExt::drag_source_set_icon_pixbuf()].
729    ///
730    /// Note that some widgets set up a drag icon in the default handler of
731    /// this signal, so you may have to use `g_signal_connect_after()` to
732    /// override what the default handler did.
733    ///
734    ///
735    ///
736    ///
737    /// #### `drag-data-delete`
738    ///  The ::drag-data-delete signal is emitted on the drag source when a drag
739    /// with the action [`gdk::DragAction::MOVE`][crate::gdk::DragAction::MOVE] is successfully completed. The signal
740    /// handler is responsible for deleting the data that has been dropped. What
741    /// "delete" means depends on the context of the drag operation.
742    ///
743    ///
744    ///
745    ///
746    /// #### `drag-data-get`
747    ///  The ::drag-data-get signal is emitted on the drag source when the drop
748    /// site requests the data which is dragged. It is the responsibility of
749    /// the signal handler to fill `data` with the data in the format which
750    /// is indicated by `info`. See [`SelectionData::set()`][crate::SelectionData::set()] and
751    /// [`SelectionData::set_text()`][crate::SelectionData::set_text()].
752    ///
753    ///
754    ///
755    ///
756    /// #### `drag-data-received`
757    ///  The ::drag-data-received signal is emitted on the drop site when the
758    /// dragged data has been received. If the data was received in order to
759    /// determine whether the drop will be accepted, the handler is expected
760    /// to call `gdk_drag_status()` and not finish the drag.
761    /// If the data was received in response to a [`drag-drop`][struct@crate::Widget#drag-drop] signal
762    /// (and this is the last target to be received), the handler for this
763    /// signal is expected to process the received data and then call
764    /// `gtk_drag_finish()`, setting the `success` parameter depending on
765    /// whether the data was processed successfully.
766    ///
767    /// Applications must create some means to determine why the signal was emitted
768    /// and therefore whether to call `gdk_drag_status()` or `gtk_drag_finish()`.
769    ///
770    /// The handler may inspect the selected action with
771    /// [`DragContext::selected_action()`][crate::gdk::DragContext::selected_action()] before calling
772    /// `gtk_drag_finish()`, e.g. to implement [`gdk::DragAction::ASK`][crate::gdk::DragAction::ASK] as
773    /// shown in the following example:
774    ///
775    ///
776    /// **⚠️ The following code is in C ⚠️**
777    ///
778    /// ```C
779    /// void
780    /// drag_data_received (GtkWidget          *widget,
781    ///                     GdkDragContext     *context,
782    ///                     gint                x,
783    ///                     gint                y,
784    ///                     GtkSelectionData   *data,
785    ///                     guint               info,
786    ///                     guint               time)
787    /// {
788    ///   if ((data->length >= 0) && (data->format == 8))
789    ///     {
790    ///       GdkDragAction action;
791    ///
792    ///       // handle data here
793    ///
794    ///       action = gdk_drag_context_get_selected_action (context);
795    ///       if (action == GDK_ACTION_ASK)
796    ///         {
797    ///           GtkWidget *dialog;
798    ///           gint response;
799    ///
800    ///           dialog = gtk_message_dialog_new (NULL,
801    ///                                            GTK_DIALOG_MODAL |
802    ///                                            GTK_DIALOG_DESTROY_WITH_PARENT,
803    ///                                            GTK_MESSAGE_INFO,
804    ///                                            GTK_BUTTONS_YES_NO,
805    ///                                            "Move the data ?\n");
806    ///           response = gtk_dialog_run (GTK_DIALOG (dialog));
807    ///           gtk_widget_destroy (dialog);
808    ///
809    ///           if (response == GTK_RESPONSE_YES)
810    ///             action = GDK_ACTION_MOVE;
811    ///           else
812    ///             action = GDK_ACTION_COPY;
813    ///          }
814    ///
815    ///       gtk_drag_finish (context, TRUE, action == GDK_ACTION_MOVE, time);
816    ///     }
817    ///   else
818    ///     gtk_drag_finish (context, FALSE, FALSE, time);
819    ///  }
820    /// ```
821    ///
822    ///
823    ///
824    ///
825    /// #### `drag-drop`
826    ///  The ::drag-drop signal is emitted on the drop site when the user drops
827    /// the data onto the widget. The signal handler must determine whether
828    /// the cursor position is in a drop zone or not. If it is not in a drop
829    /// zone, it returns [`false`] and no further processing is necessary.
830    /// Otherwise, the handler returns [`true`]. In this case, the handler must
831    /// ensure that `gtk_drag_finish()` is called to let the source know that
832    /// the drop is done. The call to `gtk_drag_finish()` can be done either
833    /// directly or in a [`drag-data-received`][struct@crate::Widget#drag-data-received] handler which gets
834    /// triggered by calling [`WidgetExt::drag_get_data()`][crate::prelude::WidgetExt::drag_get_data()] to receive the data for one
835    /// or more of the supported targets.
836    ///
837    ///
838    ///
839    ///
840    /// #### `drag-end`
841    ///  The ::drag-end signal is emitted on the drag source when a drag is
842    /// finished. A typical reason to connect to this signal is to undo
843    /// things done in [`drag-begin`][struct@crate::Widget#drag-begin].
844    ///
845    ///
846    ///
847    ///
848    /// #### `drag-failed`
849    ///  The ::drag-failed signal is emitted on the drag source when a drag has
850    /// failed. The signal handler may hook custom code to handle a failed DnD
851    /// operation based on the type of error, it returns [`true`] is the failure has
852    /// been already handled (not showing the default "drag operation failed"
853    /// animation), otherwise it returns [`false`].
854    ///
855    ///
856    ///
857    ///
858    /// #### `drag-leave`
859    ///  The ::drag-leave signal is emitted on the drop site when the cursor
860    /// leaves the widget. A typical reason to connect to this signal is to
861    /// undo things done in [`drag-motion`][struct@crate::Widget#drag-motion], e.g. undo highlighting
862    /// with [`WidgetExt::drag_unhighlight()`][crate::prelude::WidgetExt::drag_unhighlight()].
863    ///
864    ///
865    /// Likewise, the [`drag-leave`][struct@crate::Widget#drag-leave] signal is also emitted before the
866    /// ::drag-drop signal, for instance to allow cleaning up of a preview item
867    /// created in the [`drag-motion`][struct@crate::Widget#drag-motion] signal handler.
868    ///
869    ///
870    ///
871    ///
872    /// #### `drag-motion`
873    ///  The ::drag-motion signal is emitted on the drop site when the user
874    /// moves the cursor over the widget during a drag. The signal handler
875    /// must determine whether the cursor position is in a drop zone or not.
876    /// If it is not in a drop zone, it returns [`false`] and no further processing
877    /// is necessary. Otherwise, the handler returns [`true`]. In this case, the
878    /// handler is responsible for providing the necessary information for
879    /// displaying feedback to the user, by calling `gdk_drag_status()`.
880    ///
881    /// If the decision whether the drop will be accepted or rejected can't be
882    /// made based solely on the cursor position and the type of the data, the
883    /// handler may inspect the dragged data by calling [`WidgetExt::drag_get_data()`][crate::prelude::WidgetExt::drag_get_data()] and
884    /// defer the `gdk_drag_status()` call to the [`drag-data-received`][struct@crate::Widget#drag-data-received]
885    /// handler. Note that you must pass [`DestDefaults::DROP`][crate::DestDefaults::DROP],
886    /// [`DestDefaults::MOTION`][crate::DestDefaults::MOTION] or [`DestDefaults::ALL`][crate::DestDefaults::ALL] to [`WidgetExtManual::drag_dest_set()`][crate::prelude::WidgetExtManual::drag_dest_set()]
887    /// when using the drag-motion signal that way.
888    ///
889    /// Also note that there is no drag-enter signal. The drag receiver has to
890    /// keep track of whether he has received any drag-motion signals since the
891    /// last [`drag-leave`][struct@crate::Widget#drag-leave] and if not, treat the drag-motion signal as
892    /// an "enter" signal. Upon an "enter", the handler will typically highlight
893    /// the drop site with [`WidgetExt::drag_highlight()`][crate::prelude::WidgetExt::drag_highlight()].
894    ///
895    ///
896    /// **⚠️ The following code is in C ⚠️**
897    ///
898    /// ```C
899    /// static void
900    /// drag_motion (GtkWidget      *widget,
901    ///              GdkDragContext *context,
902    ///              gint            x,
903    ///              gint            y,
904    ///              guint           time)
905    /// {
906    ///   GdkAtom target;
907    ///
908    ///   PrivateData *private_data = GET_PRIVATE_DATA (widget);
909    ///
910    ///   if (!private_data->drag_highlight)
911    ///    {
912    ///      private_data->drag_highlight = 1;
913    ///      gtk_drag_highlight (widget);
914    ///    }
915    ///
916    ///   target = gtk_drag_dest_find_target (widget, context, NULL);
917    ///   if (target == GDK_NONE)
918    ///     gdk_drag_status (context, 0, time);
919    ///   else
920    ///    {
921    ///      private_data->pending_status
922    ///         = gdk_drag_context_get_suggested_action (context);
923    ///      gtk_drag_get_data (widget, context, target, time);
924    ///    }
925    ///
926    ///   return TRUE;
927    /// }
928    ///
929    /// static void
930    /// drag_data_received (GtkWidget        *widget,
931    ///                     GdkDragContext   *context,
932    ///                     gint              x,
933    ///                     gint              y,
934    ///                     GtkSelectionData *selection_data,
935    ///                     guint             info,
936    ///                     guint             time)
937    /// {
938    ///   PrivateData *private_data = GET_PRIVATE_DATA (widget);
939    ///
940    ///   if (private_data->suggested_action)
941    ///    {
942    ///      private_data->suggested_action = 0;
943    ///
944    ///      // We are getting this data due to a request in drag_motion,
945    ///      // rather than due to a request in drag_drop, so we are just
946    ///      // supposed to call gdk_drag_status(), not actually paste in
947    ///      // the data.
948    ///
949    ///      str = gtk_selection_data_get_text (selection_data);
950    ///      if (!data_is_acceptable (str))
951    ///        gdk_drag_status (context, 0, time);
952    ///      else
953    ///        gdk_drag_status (context,
954    ///                         private_data->suggested_action,
955    ///                         time);
956    ///    }
957    ///   else
958    ///    {
959    ///      // accept the drop
960    ///    }
961    /// }
962    /// ```
963    ///
964    ///
965    ///
966    ///
967    /// #### `draw`
968    ///  This signal is emitted when a widget is supposed to render itself.
969    /// The `widget`'s top left corner must be painted at the origin of
970    /// the passed in context and be sized to the values returned by
971    /// [`WidgetExt::allocated_width()`][crate::prelude::WidgetExt::allocated_width()] and
972    /// [`WidgetExt::allocated_height()`][crate::prelude::WidgetExt::allocated_height()].
973    ///
974    /// Signal handlers connected to this signal can modify the cairo
975    /// context passed as `cr` in any way they like and don't need to
976    /// restore it. The signal emission takes care of calling `cairo_save()`
977    /// before and `cairo_restore()` after invoking the handler.
978    ///
979    /// The signal handler will get a `cr` with a clip region already set to the
980    /// widget's dirty region, i.e. to the area that needs repainting. Complicated
981    /// widgets that want to avoid redrawing themselves completely can get the full
982    /// extents of the clip region with `gdk_cairo_get_clip_rectangle()`, or they can
983    /// get a finer-grained representation of the dirty region with
984    /// `cairo_copy_clip_rectangle_list()`.
985    ///
986    ///
987    ///
988    ///
989    /// #### `enter-notify-event`
990    ///  The ::enter-notify-event will be emitted when the pointer enters
991    /// the `widget`'s window.
992    ///
993    /// To receive this signal, the [`gdk::Window`][crate::gdk::Window] associated to the widget needs
994    /// to enable the [`gdk::EventMask::ENTER_NOTIFY_MASK`][crate::gdk::EventMask::ENTER_NOTIFY_MASK] mask.
995    ///
996    /// This signal will be sent to the grab widget if there is one.
997    ///
998    ///
999    ///
1000    ///
1001    /// #### `event`
1002    ///  The GTK+ main loop will emit three signals for each GDK event delivered
1003    /// to a widget: one generic ::event signal, another, more specific,
1004    /// signal that matches the type of event delivered (e.g.
1005    /// [`key-press-event`][struct@crate::Widget#key-press-event]) and finally a generic
1006    /// [`event-after`][struct@crate::Widget#event-after] signal.
1007    ///
1008    ///
1009    ///
1010    ///
1011    /// #### `event-after`
1012    ///  After the emission of the [`event`][struct@crate::Widget#event] signal and (optionally)
1013    /// the second more specific signal, ::event-after will be emitted
1014    /// regardless of the previous two signals handlers return values.
1015    ///
1016    ///
1017    ///
1018    ///
1019    /// #### `focus`
1020    ///
1021    ///
1022    ///
1023    /// #### `focus-in-event`
1024    ///  The ::focus-in-event signal will be emitted when the keyboard focus
1025    /// enters the `widget`'s window.
1026    ///
1027    /// To receive this signal, the [`gdk::Window`][crate::gdk::Window] associated to the widget needs
1028    /// to enable the [`gdk::EventMask::FOCUS_CHANGE_MASK`][crate::gdk::EventMask::FOCUS_CHANGE_MASK] mask.
1029    ///
1030    ///
1031    ///
1032    ///
1033    /// #### `focus-out-event`
1034    ///  The ::focus-out-event signal will be emitted when the keyboard focus
1035    /// leaves the `widget`'s window.
1036    ///
1037    /// To receive this signal, the [`gdk::Window`][crate::gdk::Window] associated to the widget needs
1038    /// to enable the [`gdk::EventMask::FOCUS_CHANGE_MASK`][crate::gdk::EventMask::FOCUS_CHANGE_MASK] mask.
1039    ///
1040    ///
1041    ///
1042    ///
1043    /// #### `grab-broken-event`
1044    ///  Emitted when a pointer or keyboard grab on a window belonging
1045    /// to `widget` gets broken.
1046    ///
1047    /// On X11, this happens when the grab window becomes unviewable
1048    /// (i.e. it or one of its ancestors is unmapped), or if the same
1049    /// application grabs the pointer or keyboard again.
1050    ///
1051    ///
1052    ///
1053    ///
1054    /// #### `grab-focus`
1055    ///  Action
1056    ///
1057    ///
1058    /// #### `grab-notify`
1059    ///  The ::grab-notify signal is emitted when a widget becomes
1060    /// shadowed by a GTK+ grab (not a pointer or keyboard grab) on
1061    /// another widget, or when it becomes unshadowed due to a grab
1062    /// being removed.
1063    ///
1064    /// A widget is shadowed by a [`WidgetExt::grab_add()`][crate::prelude::WidgetExt::grab_add()] when the topmost
1065    /// grab widget in the grab stack of its window group is not
1066    /// its ancestor.
1067    ///
1068    ///
1069    ///
1070    ///
1071    /// #### `hide`
1072    ///  The ::hide signal is emitted when `widget` is hidden, for example with
1073    /// [`WidgetExt::hide()`][crate::prelude::WidgetExt::hide()].
1074    ///
1075    ///
1076    ///
1077    ///
1078    /// #### `hierarchy-changed`
1079    ///  The ::hierarchy-changed signal is emitted when the
1080    /// anchored state of a widget changes. A widget is
1081    /// “anchored” when its toplevel
1082    /// ancestor is a [`Window`][crate::Window]. This signal is emitted when
1083    /// a widget changes from un-anchored to anchored or vice-versa.
1084    ///
1085    ///
1086    ///
1087    ///
1088    /// #### `key-press-event`
1089    ///  The ::key-press-event signal is emitted when a key is pressed. The signal
1090    /// emission will reoccur at the key-repeat rate when the key is kept pressed.
1091    ///
1092    /// To receive this signal, the [`gdk::Window`][crate::gdk::Window] associated to the widget needs
1093    /// to enable the [`gdk::EventMask::KEY_PRESS_MASK`][crate::gdk::EventMask::KEY_PRESS_MASK] mask.
1094    ///
1095    /// This signal will be sent to the grab widget if there is one.
1096    ///
1097    ///
1098    ///
1099    ///
1100    /// #### `key-release-event`
1101    ///  The ::key-release-event signal is emitted when a key is released.
1102    ///
1103    /// To receive this signal, the [`gdk::Window`][crate::gdk::Window] associated to the widget needs
1104    /// to enable the [`gdk::EventMask::KEY_RELEASE_MASK`][crate::gdk::EventMask::KEY_RELEASE_MASK] mask.
1105    ///
1106    /// This signal will be sent to the grab widget if there is one.
1107    ///
1108    ///
1109    ///
1110    ///
1111    /// #### `keynav-failed`
1112    ///  Gets emitted if keyboard navigation fails.
1113    /// See [`WidgetExt::keynav_failed()`][crate::prelude::WidgetExt::keynav_failed()] for details.
1114    ///
1115    ///
1116    ///
1117    ///
1118    /// #### `leave-notify-event`
1119    ///  The ::leave-notify-event will be emitted when the pointer leaves
1120    /// the `widget`'s window.
1121    ///
1122    /// To receive this signal, the [`gdk::Window`][crate::gdk::Window] associated to the widget needs
1123    /// to enable the [`gdk::EventMask::LEAVE_NOTIFY_MASK`][crate::gdk::EventMask::LEAVE_NOTIFY_MASK] mask.
1124    ///
1125    /// This signal will be sent to the grab widget if there is one.
1126    ///
1127    ///
1128    ///
1129    ///
1130    /// #### `map`
1131    ///  The ::map signal is emitted when `widget` is going to be mapped, that is
1132    /// when the widget is visible (which is controlled with
1133    /// [`WidgetExt::set_visible()`][crate::prelude::WidgetExt::set_visible()]) and all its parents up to the toplevel widget
1134    /// are also visible. Once the map has occurred, [`map-event`][struct@crate::Widget#map-event] will
1135    /// be emitted.
1136    ///
1137    /// The ::map signal can be used to determine whether a widget will be drawn,
1138    /// for instance it can resume an animation that was stopped during the
1139    /// emission of [`unmap`][struct@crate::Widget#unmap].
1140    ///
1141    ///
1142    ///
1143    ///
1144    /// #### `map-event`
1145    ///  The ::map-event signal will be emitted when the `widget`'s window is
1146    /// mapped. A window is mapped when it becomes visible on the screen.
1147    ///
1148    /// To receive this signal, the [`gdk::Window`][crate::gdk::Window] associated to the widget needs
1149    /// to enable the [`gdk::EventMask::STRUCTURE_MASK`][crate::gdk::EventMask::STRUCTURE_MASK] mask. GDK will enable this mask
1150    /// automatically for all new windows.
1151    ///
1152    ///
1153    ///
1154    ///
1155    /// #### `mnemonic-activate`
1156    ///  The default handler for this signal activates `widget` if `group_cycling`
1157    /// is [`false`], or just makes `widget` grab focus if `group_cycling` is [`true`].
1158    ///
1159    ///
1160    ///
1161    ///
1162    /// #### `motion-notify-event`
1163    ///  The ::motion-notify-event signal is emitted when the pointer moves
1164    /// over the widget's [`gdk::Window`][crate::gdk::Window].
1165    ///
1166    /// To receive this signal, the [`gdk::Window`][crate::gdk::Window] associated to the widget
1167    /// needs to enable the [`gdk::EventMask::POINTER_MOTION_MASK`][crate::gdk::EventMask::POINTER_MOTION_MASK] mask.
1168    ///
1169    /// This signal will be sent to the grab widget if there is one.
1170    ///
1171    ///
1172    ///
1173    ///
1174    /// #### `move-focus`
1175    ///  Action
1176    ///
1177    ///
1178    /// #### `parent-set`
1179    ///  The ::parent-set signal is emitted when a new parent
1180    /// has been set on a widget.
1181    ///
1182    ///
1183    ///
1184    ///
1185    /// #### `popup-menu`
1186    ///  This signal gets emitted whenever a widget should pop up a context
1187    /// menu. This usually happens through the standard key binding mechanism;
1188    /// by pressing a certain key while a widget is focused, the user can cause
1189    /// the widget to pop up a menu. For example, the [`Entry`][crate::Entry] widget creates
1190    /// a menu with clipboard commands. See the
1191    /// [Popup Menu Migration Checklist][checklist-popup-menu]
1192    /// for an example of how to use this signal.
1193    ///
1194    /// Action
1195    ///
1196    ///
1197    /// #### `property-notify-event`
1198    ///  The ::property-notify-event signal will be emitted when a property on
1199    /// the `widget`'s window has been changed or deleted.
1200    ///
1201    /// To receive this signal, the [`gdk::Window`][crate::gdk::Window] associated to the widget needs
1202    /// to enable the [`gdk::EventMask::PROPERTY_CHANGE_MASK`][crate::gdk::EventMask::PROPERTY_CHANGE_MASK] mask.
1203    ///
1204    ///
1205    ///
1206    ///
1207    /// #### `proximity-in-event`
1208    ///  To receive this signal the [`gdk::Window`][crate::gdk::Window] associated to the widget needs
1209    /// to enable the [`gdk::EventMask::PROXIMITY_IN_MASK`][crate::gdk::EventMask::PROXIMITY_IN_MASK] mask.
1210    ///
1211    /// This signal will be sent to the grab widget if there is one.
1212    ///
1213    ///
1214    ///
1215    ///
1216    /// #### `proximity-out-event`
1217    ///  To receive this signal the [`gdk::Window`][crate::gdk::Window] associated to the widget needs
1218    /// to enable the [`gdk::EventMask::PROXIMITY_OUT_MASK`][crate::gdk::EventMask::PROXIMITY_OUT_MASK] mask.
1219    ///
1220    /// This signal will be sent to the grab widget if there is one.
1221    ///
1222    ///
1223    ///
1224    ///
1225    /// #### `query-tooltip`
1226    ///  Emitted when [`has-tooltip`][struct@crate::Widget#has-tooltip] is [`true`] and the hover timeout
1227    /// has expired with the cursor hovering "above" `widget`; or emitted when `widget` got
1228    /// focus in keyboard mode.
1229    ///
1230    /// Using the given coordinates, the signal handler should determine
1231    /// whether a tooltip should be shown for `widget`. If this is the case
1232    /// [`true`] should be returned, [`false`] otherwise. Note that if
1233    /// `keyboard_mode` is [`true`], the values of `x` and `y` are undefined and
1234    /// should not be used.
1235    ///
1236    /// The signal handler is free to manipulate `tooltip` with the therefore
1237    /// destined function calls.
1238    ///
1239    ///
1240    ///
1241    ///
1242    /// #### `realize`
1243    ///  The ::realize signal is emitted when `widget` is associated with a
1244    /// [`gdk::Window`][crate::gdk::Window], which means that [`WidgetExt::realize()`][crate::prelude::WidgetExt::realize()] has been called or the
1245    /// widget has been mapped (that is, it is going to be drawn).
1246    ///
1247    ///
1248    ///
1249    ///
1250    /// #### `screen-changed`
1251    ///  The ::screen-changed signal gets emitted when the
1252    /// screen of a widget has changed.
1253    ///
1254    ///
1255    ///
1256    ///
1257    /// #### `scroll-event`
1258    ///  The ::scroll-event signal is emitted when a button in the 4 to 7
1259    /// range is pressed. Wheel mice are usually configured to generate
1260    /// button press events for buttons 4 and 5 when the wheel is turned.
1261    ///
1262    /// To receive this signal, the [`gdk::Window`][crate::gdk::Window] associated to the widget needs
1263    /// to enable the [`gdk::EventMask::SCROLL_MASK`][crate::gdk::EventMask::SCROLL_MASK] mask.
1264    ///
1265    /// This signal will be sent to the grab widget if there is one.
1266    ///
1267    ///
1268    ///
1269    ///
1270    /// #### `selection-clear-event`
1271    ///  The ::selection-clear-event signal will be emitted when the
1272    /// the `widget`'s window has lost ownership of a selection.
1273    ///
1274    ///
1275    ///
1276    ///
1277    /// #### `selection-get`
1278    ///
1279    ///
1280    ///
1281    /// #### `selection-notify-event`
1282    ///
1283    ///
1284    ///
1285    /// #### `selection-received`
1286    ///
1287    ///
1288    ///
1289    /// #### `selection-request-event`
1290    ///  The ::selection-request-event signal will be emitted when
1291    /// another client requests ownership of the selection owned by
1292    /// the `widget`'s window.
1293    ///
1294    ///
1295    ///
1296    ///
1297    /// #### `show`
1298    ///  The ::show signal is emitted when `widget` is shown, for example with
1299    /// [`WidgetExt::show()`][crate::prelude::WidgetExt::show()].
1300    ///
1301    ///
1302    ///
1303    ///
1304    /// #### `show-help`
1305    ///  Action
1306    ///
1307    ///
1308    /// #### `size-allocate`
1309    ///
1310    ///
1311    ///
1312    /// #### `state-changed`
1313    ///  The ::state-changed signal is emitted when the widget state changes.
1314    /// See `gtk_widget_get_state()`.
1315    ///
1316    ///
1317    ///
1318    ///
1319    /// #### `state-flags-changed`
1320    ///  The ::state-flags-changed signal is emitted when the widget state
1321    /// changes, see [`WidgetExt::state_flags()`][crate::prelude::WidgetExt::state_flags()].
1322    ///
1323    ///
1324    ///
1325    ///
1326    /// #### `style-set`
1327    ///  The ::style-set signal is emitted when a new style has been set
1328    /// on a widget. Note that style-modifying functions like
1329    /// `gtk_widget_modify_base()` also cause this signal to be emitted.
1330    ///
1331    /// Note that this signal is emitted for changes to the deprecated
1332    /// `GtkStyle`. To track changes to the [`StyleContext`][crate::StyleContext] associated
1333    /// with a widget, use the [`style-updated`][struct@crate::Widget#style-updated] signal.
1334    ///
1335    ///
1336    ///
1337    ///
1338    /// #### `style-updated`
1339    ///  The ::style-updated signal is a convenience signal that is emitted when the
1340    /// [`changed`][struct@crate::StyleContext#changed] signal is emitted on the `widget`'s associated
1341    /// [`StyleContext`][crate::StyleContext] as returned by [`WidgetExt::style_context()`][crate::prelude::WidgetExt::style_context()].
1342    ///
1343    /// Note that style-modifying functions like `gtk_widget_override_color()` also
1344    /// cause this signal to be emitted.
1345    ///
1346    ///
1347    ///
1348    ///
1349    /// #### `touch-event`
1350    ///
1351    ///
1352    ///
1353    /// #### `unmap`
1354    ///  The ::unmap signal is emitted when `widget` is going to be unmapped, which
1355    /// means that either it or any of its parents up to the toplevel widget have
1356    /// been set as hidden.
1357    ///
1358    /// As ::unmap indicates that a widget will not be shown any longer, it can be
1359    /// used to, for example, stop an animation on the widget.
1360    ///
1361    ///
1362    ///
1363    ///
1364    /// #### `unmap-event`
1365    ///  The ::unmap-event signal will be emitted when the `widget`'s window is
1366    /// unmapped. A window is unmapped when it becomes invisible on the screen.
1367    ///
1368    /// To receive this signal, the [`gdk::Window`][crate::gdk::Window] associated to the widget needs
1369    /// to enable the [`gdk::EventMask::STRUCTURE_MASK`][crate::gdk::EventMask::STRUCTURE_MASK] mask. GDK will enable this mask
1370    /// automatically for all new windows.
1371    ///
1372    ///
1373    ///
1374    ///
1375    /// #### `unrealize`
1376    ///  The ::unrealize signal is emitted when the [`gdk::Window`][crate::gdk::Window] associated with
1377    /// `widget` is destroyed, which means that [`WidgetExt::unrealize()`][crate::prelude::WidgetExt::unrealize()] has been
1378    /// called or the widget has been unmapped (that is, it is going to be
1379    /// hidden).
1380    ///
1381    ///
1382    ///
1383    ///
1384    /// #### `visibility-notify-event`
1385    ///  The ::visibility-notify-event will be emitted when the `widget`'s
1386    /// window is obscured or unobscured.
1387    ///
1388    /// To receive this signal the [`gdk::Window`][crate::gdk::Window] associated to the widget needs
1389    /// to enable the [`gdk::EventMask::VISIBILITY_NOTIFY_MASK`][crate::gdk::EventMask::VISIBILITY_NOTIFY_MASK] mask.
1390    ///
1391    ///
1392    ///
1393    ///
1394    /// #### `window-state-event`
1395    ///  The ::window-state-event will be emitted when the state of the
1396    /// toplevel window associated to the `widget` changes.
1397    ///
1398    /// To receive this signal the [`gdk::Window`][crate::gdk::Window] associated to the widget
1399    /// needs to enable the [`gdk::EventMask::STRUCTURE_MASK`][crate::gdk::EventMask::STRUCTURE_MASK] mask. GDK will enable
1400    /// this mask automatically for all new windows.
1401    ///
1402    ///
1403    /// </details>
1404    ///
1405    /// # Implements
1406    ///
1407    /// [`IconViewExt`][trait@crate::prelude::IconViewExt], [`ContainerExt`][trait@crate::prelude::ContainerExt], [`WidgetExt`][trait@crate::prelude::WidgetExt], [`trait@glib::ObjectExt`], [`BuildableExt`][trait@crate::prelude::BuildableExt], [`CellLayoutExt`][trait@crate::prelude::CellLayoutExt], [`ScrollableExt`][trait@crate::prelude::ScrollableExt], [`ContainerExtManual`][trait@crate::prelude::ContainerExtManual], [`WidgetExtManual`][trait@crate::prelude::WidgetExtManual], [`BuildableExtManual`][trait@crate::prelude::BuildableExtManual]
1408    #[doc(alias = "GtkIconView")]
1409    pub struct IconView(Object<ffi::GtkIconView, ffi::GtkIconViewClass>) @extends Container, Widget, @implements Buildable, CellLayout, Scrollable;
1410
1411    match fn {
1412        type_ => || ffi::gtk_icon_view_get_type(),
1413    }
1414}
1415
1416impl IconView {
1417    pub const NONE: Option<&'static IconView> = None;
1418
1419    /// Creates a new [`IconView`][crate::IconView] widget
1420    ///
1421    /// # Returns
1422    ///
1423    /// A newly created [`IconView`][crate::IconView] widget
1424    #[doc(alias = "gtk_icon_view_new")]
1425    pub fn new() -> IconView {
1426        assert_initialized_main_thread!();
1427        unsafe { Widget::from_glib_none(ffi::gtk_icon_view_new()).unsafe_cast() }
1428    }
1429
1430    /// Creates a new [`IconView`][crate::IconView] widget using the
1431    /// specified `area` to layout cells inside the icons.
1432    /// ## `area`
1433    /// the [`CellArea`][crate::CellArea] to use to layout cells
1434    ///
1435    /// # Returns
1436    ///
1437    /// A newly created [`IconView`][crate::IconView] widget
1438    #[doc(alias = "gtk_icon_view_new_with_area")]
1439    #[doc(alias = "new_with_area")]
1440    pub fn with_area(area: &impl IsA<CellArea>) -> IconView {
1441        skip_assert_initialized!();
1442        unsafe {
1443            Widget::from_glib_none(ffi::gtk_icon_view_new_with_area(
1444                area.as_ref().to_glib_none().0,
1445            ))
1446            .unsafe_cast()
1447        }
1448    }
1449
1450    /// Creates a new [`IconView`][crate::IconView] widget with the model `model`.
1451    /// ## `model`
1452    /// The model.
1453    ///
1454    /// # Returns
1455    ///
1456    /// A newly created [`IconView`][crate::IconView] widget.
1457    #[doc(alias = "gtk_icon_view_new_with_model")]
1458    #[doc(alias = "new_with_model")]
1459    pub fn with_model(model: &impl IsA<TreeModel>) -> IconView {
1460        skip_assert_initialized!();
1461        unsafe {
1462            Widget::from_glib_none(ffi::gtk_icon_view_new_with_model(
1463                model.as_ref().to_glib_none().0,
1464            ))
1465            .unsafe_cast()
1466        }
1467    }
1468
1469    // rustdoc-stripper-ignore-next
1470    /// Creates a new builder-pattern struct instance to construct [`IconView`] objects.
1471    ///
1472    /// This method returns an instance of [`IconViewBuilder`](crate::builders::IconViewBuilder) which can be used to create [`IconView`] objects.
1473    pub fn builder() -> IconViewBuilder {
1474        IconViewBuilder::new()
1475    }
1476}
1477
1478impl Default for IconView {
1479    fn default() -> Self {
1480        Self::new()
1481    }
1482}
1483
1484// rustdoc-stripper-ignore-next
1485/// A [builder-pattern] type to construct [`IconView`] objects.
1486///
1487/// [builder-pattern]: https://doc.rust-lang.org/1.0.0/style/ownership/builders.html
1488#[must_use = "The builder must be built to be used"]
1489pub struct IconViewBuilder {
1490    builder: glib::object::ObjectBuilder<'static, IconView>,
1491}
1492
1493impl IconViewBuilder {
1494    fn new() -> Self {
1495        Self {
1496            builder: glib::object::Object::builder(),
1497        }
1498    }
1499
1500    /// The activate-on-single-click property specifies whether the "item-activated" signal
1501    /// will be emitted after a single click.
1502    pub fn activate_on_single_click(self, activate_on_single_click: bool) -> Self {
1503        Self {
1504            builder: self
1505                .builder
1506                .property("activate-on-single-click", activate_on_single_click),
1507        }
1508    }
1509
1510    /// The [`CellArea`][crate::CellArea] used to layout cell renderers for this view.
1511    ///
1512    /// If no area is specified when creating the icon view with [`IconView::with_area()`][crate::IconView::with_area()]
1513    /// a [`CellAreaBox`][crate::CellAreaBox] will be used.
1514    pub fn cell_area(self, cell_area: &impl IsA<CellArea>) -> Self {
1515        Self {
1516            builder: self
1517                .builder
1518                .property("cell-area", cell_area.clone().upcast()),
1519        }
1520    }
1521
1522    /// The column-spacing property specifies the space which is inserted between
1523    /// the columns of the icon view.
1524    pub fn column_spacing(self, column_spacing: i32) -> Self {
1525        Self {
1526            builder: self.builder.property("column-spacing", column_spacing),
1527        }
1528    }
1529
1530    /// The columns property contains the number of the columns in which the
1531    /// items should be displayed. If it is -1, the number of columns will
1532    /// be chosen automatically to fill the available area.
1533    pub fn columns(self, columns: i32) -> Self {
1534        Self {
1535            builder: self.builder.property("columns", columns),
1536        }
1537    }
1538
1539    /// The item-orientation property specifies how the cells (i.e. the icon and
1540    /// the text) of the item are positioned relative to each other.
1541    pub fn item_orientation(self, item_orientation: Orientation) -> Self {
1542        Self {
1543            builder: self.builder.property("item-orientation", item_orientation),
1544        }
1545    }
1546
1547    /// The item-padding property specifies the padding around each
1548    /// of the icon view's item.
1549    pub fn item_padding(self, item_padding: i32) -> Self {
1550        Self {
1551            builder: self.builder.property("item-padding", item_padding),
1552        }
1553    }
1554
1555    /// The item-width property specifies the width to use for each item.
1556    /// If it is set to -1, the icon view will automatically determine a
1557    /// suitable item size.
1558    pub fn item_width(self, item_width: i32) -> Self {
1559        Self {
1560            builder: self.builder.property("item-width", item_width),
1561        }
1562    }
1563
1564    /// The margin property specifies the space which is inserted
1565    /// at the edges of the icon view.
1566    pub fn margin(self, margin: i32) -> Self {
1567        Self {
1568            builder: self.builder.property("margin", margin),
1569        }
1570    }
1571
1572    /// The ::markup-column property contains the number of the model column
1573    /// containing markup information to be displayed. The markup column must be
1574    /// of type `G_TYPE_STRING`. If this property and the :text-column property
1575    /// are both set to column numbers, it overrides the text column.
1576    /// If both are set to -1, no texts are displayed.
1577    pub fn markup_column(self, markup_column: i32) -> Self {
1578        Self {
1579            builder: self.builder.property("markup-column", markup_column),
1580        }
1581    }
1582
1583    pub fn model(self, model: &impl IsA<TreeModel>) -> Self {
1584        Self {
1585            builder: self.builder.property("model", model.clone().upcast()),
1586        }
1587    }
1588
1589    /// The ::pixbuf-column property contains the number of the model column
1590    /// containing the pixbufs which are displayed. The pixbuf column must be
1591    /// of type `GDK_TYPE_PIXBUF`. Setting this property to -1 turns off the
1592    /// display of pixbufs.
1593    pub fn pixbuf_column(self, pixbuf_column: i32) -> Self {
1594        Self {
1595            builder: self.builder.property("pixbuf-column", pixbuf_column),
1596        }
1597    }
1598
1599    /// The reorderable property specifies if the items can be reordered
1600    /// by DND.
1601    pub fn reorderable(self, reorderable: bool) -> Self {
1602        Self {
1603            builder: self.builder.property("reorderable", reorderable),
1604        }
1605    }
1606
1607    /// The row-spacing property specifies the space which is inserted between
1608    /// the rows of the icon view.
1609    pub fn row_spacing(self, row_spacing: i32) -> Self {
1610        Self {
1611            builder: self.builder.property("row-spacing", row_spacing),
1612        }
1613    }
1614
1615    /// The ::selection-mode property specifies the selection mode of
1616    /// icon view. If the mode is [`SelectionMode::Multiple`][crate::SelectionMode::Multiple], rubberband selection
1617    /// is enabled, for the other modes, only keyboard selection is possible.
1618    pub fn selection_mode(self, selection_mode: SelectionMode) -> Self {
1619        Self {
1620            builder: self.builder.property("selection-mode", selection_mode),
1621        }
1622    }
1623
1624    /// The spacing property specifies the space which is inserted between
1625    /// the cells (i.e. the icon and the text) of an item.
1626    pub fn spacing(self, spacing: i32) -> Self {
1627        Self {
1628            builder: self.builder.property("spacing", spacing),
1629        }
1630    }
1631
1632    /// The ::text-column property contains the number of the model column
1633    /// containing the texts which are displayed. The text column must be
1634    /// of type `G_TYPE_STRING`. If this property and the :markup-column
1635    /// property are both set to -1, no texts are displayed.
1636    pub fn text_column(self, text_column: i32) -> Self {
1637        Self {
1638            builder: self.builder.property("text-column", text_column),
1639        }
1640    }
1641
1642    pub fn tooltip_column(self, tooltip_column: i32) -> Self {
1643        Self {
1644            builder: self.builder.property("tooltip-column", tooltip_column),
1645        }
1646    }
1647
1648    pub fn border_width(self, border_width: u32) -> Self {
1649        Self {
1650            builder: self.builder.property("border-width", border_width),
1651        }
1652    }
1653
1654    pub fn child(self, child: &impl IsA<Widget>) -> Self {
1655        Self {
1656            builder: self.builder.property("child", child.clone().upcast()),
1657        }
1658    }
1659
1660    pub fn resize_mode(self, resize_mode: ResizeMode) -> Self {
1661        Self {
1662            builder: self.builder.property("resize-mode", resize_mode),
1663        }
1664    }
1665
1666    pub fn app_paintable(self, app_paintable: bool) -> Self {
1667        Self {
1668            builder: self.builder.property("app-paintable", app_paintable),
1669        }
1670    }
1671
1672    pub fn can_default(self, can_default: bool) -> Self {
1673        Self {
1674            builder: self.builder.property("can-default", can_default),
1675        }
1676    }
1677
1678    pub fn can_focus(self, can_focus: bool) -> Self {
1679        Self {
1680            builder: self.builder.property("can-focus", can_focus),
1681        }
1682    }
1683
1684    pub fn events(self, events: gdk::EventMask) -> Self {
1685        Self {
1686            builder: self.builder.property("events", events),
1687        }
1688    }
1689
1690    /// Whether to expand in both directions. Setting this sets both [`hexpand`][struct@crate::Widget#hexpand] and [`vexpand`][struct@crate::Widget#vexpand]
1691    pub fn expand(self, expand: bool) -> Self {
1692        Self {
1693            builder: self.builder.property("expand", expand),
1694        }
1695    }
1696
1697    /// Whether the widget should grab focus when it is clicked with the mouse.
1698    ///
1699    /// This property is only relevant for widgets that can take focus.
1700    ///
1701    /// Before 3.20, several widgets (GtkButton, GtkFileChooserButton,
1702    /// GtkComboBox) implemented this property individually.
1703    pub fn focus_on_click(self, focus_on_click: bool) -> Self {
1704        Self {
1705            builder: self.builder.property("focus-on-click", focus_on_click),
1706        }
1707    }
1708
1709    /// How to distribute horizontal space if widget gets extra space, see [`Align`][crate::Align]
1710    pub fn halign(self, halign: Align) -> Self {
1711        Self {
1712            builder: self.builder.property("halign", halign),
1713        }
1714    }
1715
1716    pub fn has_default(self, has_default: bool) -> Self {
1717        Self {
1718            builder: self.builder.property("has-default", has_default),
1719        }
1720    }
1721
1722    pub fn has_focus(self, has_focus: bool) -> Self {
1723        Self {
1724            builder: self.builder.property("has-focus", has_focus),
1725        }
1726    }
1727
1728    /// Enables or disables the emission of [`query-tooltip`][struct@crate::Widget#query-tooltip] on `widget`.
1729    /// A value of [`true`] indicates that `widget` can have a tooltip, in this case
1730    /// the widget will be queried using [`query-tooltip`][struct@crate::Widget#query-tooltip] to determine
1731    /// whether it will provide a tooltip or not.
1732    ///
1733    /// Note that setting this property to [`true`] for the first time will change
1734    /// the event masks of the GdkWindows of this widget to include leave-notify
1735    /// and motion-notify events. This cannot and will not be undone when the
1736    /// property is set to [`false`] again.
1737    pub fn has_tooltip(self, has_tooltip: bool) -> Self {
1738        Self {
1739            builder: self.builder.property("has-tooltip", has_tooltip),
1740        }
1741    }
1742
1743    pub fn height_request(self, height_request: i32) -> Self {
1744        Self {
1745            builder: self.builder.property("height-request", height_request),
1746        }
1747    }
1748
1749    /// Whether to expand horizontally. See [`WidgetExt::set_hexpand()`][crate::prelude::WidgetExt::set_hexpand()].
1750    pub fn hexpand(self, hexpand: bool) -> Self {
1751        Self {
1752            builder: self.builder.property("hexpand", hexpand),
1753        }
1754    }
1755
1756    /// Whether to use the [`hexpand`][struct@crate::Widget#hexpand] property. See [`WidgetExt::is_hexpand_set()`][crate::prelude::WidgetExt::is_hexpand_set()].
1757    pub fn hexpand_set(self, hexpand_set: bool) -> Self {
1758        Self {
1759            builder: self.builder.property("hexpand-set", hexpand_set),
1760        }
1761    }
1762
1763    pub fn is_focus(self, is_focus: bool) -> Self {
1764        Self {
1765            builder: self.builder.property("is-focus", is_focus),
1766        }
1767    }
1768
1769    /// Margin on bottom side of widget.
1770    ///
1771    /// This property adds margin outside of the widget's normal size
1772    /// request, the margin will be added in addition to the size from
1773    /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
1774    pub fn margin_bottom(self, margin_bottom: i32) -> Self {
1775        Self {
1776            builder: self.builder.property("margin-bottom", margin_bottom),
1777        }
1778    }
1779
1780    /// Margin on end of widget, horizontally. This property supports
1781    /// left-to-right and right-to-left text directions.
1782    ///
1783    /// This property adds margin outside of the widget's normal size
1784    /// request, the margin will be added in addition to the size from
1785    /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
1786    pub fn margin_end(self, margin_end: i32) -> Self {
1787        Self {
1788            builder: self.builder.property("margin-end", margin_end),
1789        }
1790    }
1791
1792    /// Margin on start of widget, horizontally. This property supports
1793    /// left-to-right and right-to-left text directions.
1794    ///
1795    /// This property adds margin outside of the widget's normal size
1796    /// request, the margin will be added in addition to the size from
1797    /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
1798    pub fn margin_start(self, margin_start: i32) -> Self {
1799        Self {
1800            builder: self.builder.property("margin-start", margin_start),
1801        }
1802    }
1803
1804    /// Margin on top side of widget.
1805    ///
1806    /// This property adds margin outside of the widget's normal size
1807    /// request, the margin will be added in addition to the size from
1808    /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
1809    pub fn margin_top(self, margin_top: i32) -> Self {
1810        Self {
1811            builder: self.builder.property("margin-top", margin_top),
1812        }
1813    }
1814
1815    pub fn name(self, name: impl Into<glib::GString>) -> Self {
1816        Self {
1817            builder: self.builder.property("name", name.into()),
1818        }
1819    }
1820
1821    pub fn no_show_all(self, no_show_all: bool) -> Self {
1822        Self {
1823            builder: self.builder.property("no-show-all", no_show_all),
1824        }
1825    }
1826
1827    /// The requested opacity of the widget. See [`WidgetExt::set_opacity()`][crate::prelude::WidgetExt::set_opacity()] for
1828    /// more details about window opacity.
1829    ///
1830    /// Before 3.8 this was only available in GtkWindow
1831    pub fn opacity(self, opacity: f64) -> Self {
1832        Self {
1833            builder: self.builder.property("opacity", opacity),
1834        }
1835    }
1836
1837    pub fn parent(self, parent: &impl IsA<Container>) -> Self {
1838        Self {
1839            builder: self.builder.property("parent", parent.clone().upcast()),
1840        }
1841    }
1842
1843    pub fn receives_default(self, receives_default: bool) -> Self {
1844        Self {
1845            builder: self.builder.property("receives-default", receives_default),
1846        }
1847    }
1848
1849    pub fn sensitive(self, sensitive: bool) -> Self {
1850        Self {
1851            builder: self.builder.property("sensitive", sensitive),
1852        }
1853    }
1854
1855    /// Sets the text of tooltip to be the given string, which is marked up
1856    /// with the [Pango text markup language][PangoMarkupFormat].
1857    /// Also see [`Tooltip::set_markup()`][crate::Tooltip::set_markup()].
1858    ///
1859    /// This is a convenience property which will take care of getting the
1860    /// tooltip shown if the given string is not [`None`]: [`has-tooltip`][struct@crate::Widget#has-tooltip]
1861    /// will automatically be set to [`true`] and there will be taken care of
1862    /// [`query-tooltip`][struct@crate::Widget#query-tooltip] in the default signal handler.
1863    ///
1864    /// Note that if both [`tooltip-text`][struct@crate::Widget#tooltip-text] and [`tooltip-markup`][struct@crate::Widget#tooltip-markup]
1865    /// are set, the last one wins.
1866    pub fn tooltip_markup(self, tooltip_markup: impl Into<glib::GString>) -> Self {
1867        Self {
1868            builder: self
1869                .builder
1870                .property("tooltip-markup", tooltip_markup.into()),
1871        }
1872    }
1873
1874    /// Sets the text of tooltip to be the given string.
1875    ///
1876    /// Also see [`Tooltip::set_text()`][crate::Tooltip::set_text()].
1877    ///
1878    /// This is a convenience property which will take care of getting the
1879    /// tooltip shown if the given string is not [`None`]: [`has-tooltip`][struct@crate::Widget#has-tooltip]
1880    /// will automatically be set to [`true`] and there will be taken care of
1881    /// [`query-tooltip`][struct@crate::Widget#query-tooltip] in the default signal handler.
1882    ///
1883    /// Note that if both [`tooltip-text`][struct@crate::Widget#tooltip-text] and [`tooltip-markup`][struct@crate::Widget#tooltip-markup]
1884    /// are set, the last one wins.
1885    pub fn tooltip_text(self, tooltip_text: impl Into<glib::GString>) -> Self {
1886        Self {
1887            builder: self.builder.property("tooltip-text", tooltip_text.into()),
1888        }
1889    }
1890
1891    /// How to distribute vertical space if widget gets extra space, see [`Align`][crate::Align]
1892    pub fn valign(self, valign: Align) -> Self {
1893        Self {
1894            builder: self.builder.property("valign", valign),
1895        }
1896    }
1897
1898    /// Whether to expand vertically. See [`WidgetExt::set_vexpand()`][crate::prelude::WidgetExt::set_vexpand()].
1899    pub fn vexpand(self, vexpand: bool) -> Self {
1900        Self {
1901            builder: self.builder.property("vexpand", vexpand),
1902        }
1903    }
1904
1905    /// Whether to use the [`vexpand`][struct@crate::Widget#vexpand] property. See [`WidgetExt::is_vexpand_set()`][crate::prelude::WidgetExt::is_vexpand_set()].
1906    pub fn vexpand_set(self, vexpand_set: bool) -> Self {
1907        Self {
1908            builder: self.builder.property("vexpand-set", vexpand_set),
1909        }
1910    }
1911
1912    pub fn visible(self, visible: bool) -> Self {
1913        Self {
1914            builder: self.builder.property("visible", visible),
1915        }
1916    }
1917
1918    pub fn width_request(self, width_request: i32) -> Self {
1919        Self {
1920            builder: self.builder.property("width-request", width_request),
1921        }
1922    }
1923
1924    /// Horizontal [`Adjustment`][crate::Adjustment] of the scrollable widget. This adjustment is
1925    /// shared between the scrollable widget and its parent.
1926    pub fn hadjustment(self, hadjustment: &impl IsA<Adjustment>) -> Self {
1927        Self {
1928            builder: self
1929                .builder
1930                .property("hadjustment", hadjustment.clone().upcast()),
1931        }
1932    }
1933
1934    /// Determines whether horizontal scrolling should start once the scrollable
1935    /// widget is allocated less than its minimum width or less than its natural width.
1936    pub fn hscroll_policy(self, hscroll_policy: ScrollablePolicy) -> Self {
1937        Self {
1938            builder: self.builder.property("hscroll-policy", hscroll_policy),
1939        }
1940    }
1941
1942    /// Verical [`Adjustment`][crate::Adjustment] of the scrollable widget. This adjustment is shared
1943    /// between the scrollable widget and its parent.
1944    pub fn vadjustment(self, vadjustment: &impl IsA<Adjustment>) -> Self {
1945        Self {
1946            builder: self
1947                .builder
1948                .property("vadjustment", vadjustment.clone().upcast()),
1949        }
1950    }
1951
1952    /// Determines whether vertical scrolling should start once the scrollable
1953    /// widget is allocated less than its minimum height or less than its natural height.
1954    pub fn vscroll_policy(self, vscroll_policy: ScrollablePolicy) -> Self {
1955        Self {
1956            builder: self.builder.property("vscroll-policy", vscroll_policy),
1957        }
1958    }
1959
1960    // rustdoc-stripper-ignore-next
1961    /// Build the [`IconView`].
1962    #[must_use = "Building the object from the builder is usually expensive and is not expected to have side effects"]
1963    pub fn build(self) -> IconView {
1964        self.builder.build()
1965    }
1966}
1967
1968mod sealed {
1969    pub trait Sealed {}
1970    impl<T: super::IsA<super::IconView>> Sealed for T {}
1971}
1972
1973/// Trait containing all [`struct@IconView`] methods.
1974///
1975/// # Implementors
1976///
1977/// [`IconView`][struct@crate::IconView]
1978pub trait IconViewExt: IsA<IconView> + sealed::Sealed + 'static {
1979    /// Converts widget coordinates to coordinates for the bin_window,
1980    /// as expected by e.g. [`path_at_pos()`][Self::path_at_pos()].
1981    /// ## `wx`
1982    /// X coordinate relative to the widget
1983    /// ## `wy`
1984    /// Y coordinate relative to the widget
1985    ///
1986    /// # Returns
1987    ///
1988    ///
1989    /// ## `bx`
1990    /// return location for bin_window X coordinate
1991    ///
1992    /// ## `by`
1993    /// return location for bin_window Y coordinate
1994    #[doc(alias = "gtk_icon_view_convert_widget_to_bin_window_coords")]
1995    fn convert_widget_to_bin_window_coords(&self, wx: i32, wy: i32) -> (i32, i32) {
1996        unsafe {
1997            let mut bx = mem::MaybeUninit::uninit();
1998            let mut by = mem::MaybeUninit::uninit();
1999            ffi::gtk_icon_view_convert_widget_to_bin_window_coords(
2000                self.as_ref().to_glib_none().0,
2001                wx,
2002                wy,
2003                bx.as_mut_ptr(),
2004                by.as_mut_ptr(),
2005            );
2006            (bx.assume_init(), by.assume_init())
2007        }
2008    }
2009
2010    /// Creates a [`cairo::Surface`][crate::cairo::Surface] representation of the item at `path`.
2011    /// This image is used for a drag icon.
2012    /// ## `path`
2013    /// a [`TreePath`][crate::TreePath] in `self`
2014    ///
2015    /// # Returns
2016    ///
2017    /// a newly-allocated surface of the drag icon.
2018    #[doc(alias = "gtk_icon_view_create_drag_icon")]
2019    fn create_drag_icon(&self, path: &TreePath) -> Option<cairo::Surface> {
2020        unsafe {
2021            from_glib_full(ffi::gtk_icon_view_create_drag_icon(
2022                self.as_ref().to_glib_none().0,
2023                mut_override(path.to_glib_none().0),
2024            ))
2025        }
2026    }
2027
2028    /// Gets the setting set by [`set_activate_on_single_click()`][Self::set_activate_on_single_click()].
2029    ///
2030    /// # Returns
2031    ///
2032    /// [`true`] if item-activated will be emitted on a single click
2033    #[doc(alias = "gtk_icon_view_get_activate_on_single_click")]
2034    #[doc(alias = "get_activate_on_single_click")]
2035    fn activates_on_single_click(&self) -> bool {
2036        unsafe {
2037            from_glib(ffi::gtk_icon_view_get_activate_on_single_click(
2038                self.as_ref().to_glib_none().0,
2039            ))
2040        }
2041    }
2042
2043    /// Fills the bounding rectangle in widget coordinates for the cell specified by
2044    /// `path` and `cell`. If `cell` is [`None`] the main cell area is used.
2045    ///
2046    /// This function is only valid if `self` is realized.
2047    /// ## `path`
2048    /// a [`TreePath`][crate::TreePath]
2049    /// ## `cell`
2050    /// a [`CellRenderer`][crate::CellRenderer] or [`None`]
2051    ///
2052    /// # Returns
2053    ///
2054    /// [`false`] if there is no such item, [`true`] otherwise
2055    ///
2056    /// ## `rect`
2057    /// rectangle to fill with cell rect
2058    #[doc(alias = "gtk_icon_view_get_cell_rect")]
2059    #[doc(alias = "get_cell_rect")]
2060    fn cell_rect(
2061        &self,
2062        path: &TreePath,
2063        cell: Option<&impl IsA<CellRenderer>>,
2064    ) -> Option<gdk::Rectangle> {
2065        unsafe {
2066            let mut rect = gdk::Rectangle::uninitialized();
2067            let ret = from_glib(ffi::gtk_icon_view_get_cell_rect(
2068                self.as_ref().to_glib_none().0,
2069                mut_override(path.to_glib_none().0),
2070                cell.map(|p| p.as_ref()).to_glib_none().0,
2071                rect.to_glib_none_mut().0,
2072            ));
2073            if ret {
2074                Some(rect)
2075            } else {
2076                None
2077            }
2078        }
2079    }
2080
2081    /// Returns the value of the ::column-spacing property.
2082    ///
2083    /// # Returns
2084    ///
2085    /// the space between columns
2086    #[doc(alias = "gtk_icon_view_get_column_spacing")]
2087    #[doc(alias = "get_column_spacing")]
2088    fn column_spacing(&self) -> i32 {
2089        unsafe { ffi::gtk_icon_view_get_column_spacing(self.as_ref().to_glib_none().0) }
2090    }
2091
2092    /// Returns the value of the ::columns property.
2093    ///
2094    /// # Returns
2095    ///
2096    /// the number of columns, or -1
2097    #[doc(alias = "gtk_icon_view_get_columns")]
2098    #[doc(alias = "get_columns")]
2099    fn columns(&self) -> i32 {
2100        unsafe { ffi::gtk_icon_view_get_columns(self.as_ref().to_glib_none().0) }
2101    }
2102
2103    /// Fills in `path` and `cell` with the current cursor path and cell.
2104    /// If the cursor isn’t currently set, then *`path` will be [`None`].
2105    /// If no cell currently has focus, then *`cell` will be [`None`].
2106    ///
2107    /// The returned [`TreePath`][crate::TreePath] must be freed with `gtk_tree_path_free()`.
2108    ///
2109    /// # Returns
2110    ///
2111    /// [`true`] if the cursor is set.
2112    ///
2113    /// ## `path`
2114    /// Return location for the current
2115    ///  cursor path, or [`None`]
2116    ///
2117    /// ## `cell`
2118    /// Return location the current
2119    ///  focus cell, or [`None`]
2120    #[doc(alias = "gtk_icon_view_get_cursor")]
2121    #[doc(alias = "get_cursor")]
2122    fn cursor(&self) -> Option<(TreePath, CellRenderer)> {
2123        unsafe {
2124            let mut path = ptr::null_mut();
2125            let mut cell = ptr::null_mut();
2126            let ret = from_glib(ffi::gtk_icon_view_get_cursor(
2127                self.as_ref().to_glib_none().0,
2128                &mut path,
2129                &mut cell,
2130            ));
2131            if ret {
2132                Some((from_glib_full(path), from_glib_none(cell)))
2133            } else {
2134                None
2135            }
2136        }
2137    }
2138
2139    /// Determines the destination item for a given position.
2140    /// ## `drag_x`
2141    /// the position to determine the destination item for
2142    /// ## `drag_y`
2143    /// the position to determine the destination item for
2144    ///
2145    /// # Returns
2146    ///
2147    /// whether there is an item at the given position.
2148    ///
2149    /// ## `path`
2150    /// Return location for the path of the item,
2151    ///  or [`None`].
2152    ///
2153    /// ## `pos`
2154    /// Return location for the drop position, or [`None`]
2155    #[doc(alias = "gtk_icon_view_get_dest_item_at_pos")]
2156    #[doc(alias = "get_dest_item_at_pos")]
2157    fn dest_item_at_pos(
2158        &self,
2159        drag_x: i32,
2160        drag_y: i32,
2161    ) -> Option<(TreePath, IconViewDropPosition)> {
2162        unsafe {
2163            let mut path = ptr::null_mut();
2164            let mut pos = mem::MaybeUninit::uninit();
2165            let ret = from_glib(ffi::gtk_icon_view_get_dest_item_at_pos(
2166                self.as_ref().to_glib_none().0,
2167                drag_x,
2168                drag_y,
2169                &mut path,
2170                pos.as_mut_ptr(),
2171            ));
2172            if ret {
2173                Some((from_glib_full(path), from_glib(pos.assume_init())))
2174            } else {
2175                None
2176            }
2177        }
2178    }
2179
2180    /// Gets information about the item that is highlighted for feedback.
2181    ///
2182    /// # Returns
2183    ///
2184    ///
2185    /// ## `path`
2186    /// Return location for the path of
2187    ///  the highlighted item, or [`None`].
2188    ///
2189    /// ## `pos`
2190    /// Return location for the drop position, or [`None`]
2191    #[doc(alias = "gtk_icon_view_get_drag_dest_item")]
2192    #[doc(alias = "get_drag_dest_item")]
2193    fn drag_dest_item(&self) -> (TreePath, IconViewDropPosition) {
2194        unsafe {
2195            let mut path = ptr::null_mut();
2196            let mut pos = mem::MaybeUninit::uninit();
2197            ffi::gtk_icon_view_get_drag_dest_item(
2198                self.as_ref().to_glib_none().0,
2199                &mut path,
2200                pos.as_mut_ptr(),
2201            );
2202            (from_glib_full(path), from_glib(pos.assume_init()))
2203        }
2204    }
2205
2206    /// Finds the path at the point (`x`, `y`), relative to bin_window coordinates.
2207    /// In contrast to [`path_at_pos()`][Self::path_at_pos()], this function also
2208    /// obtains the cell at the specified position. The returned path should
2209    /// be freed with `gtk_tree_path_free()`.
2210    /// See [`convert_widget_to_bin_window_coords()`][Self::convert_widget_to_bin_window_coords()] for converting
2211    /// widget coordinates to bin_window coordinates.
2212    /// ## `x`
2213    /// The x position to be identified
2214    /// ## `y`
2215    /// The y position to be identified
2216    ///
2217    /// # Returns
2218    ///
2219    /// [`true`] if an item exists at the specified position
2220    ///
2221    /// ## `path`
2222    /// Return location for the path, or [`None`]
2223    ///
2224    /// ## `cell`
2225    /// Return location for the renderer
2226    ///  responsible for the cell at (`x`, `y`), or [`None`]
2227    #[doc(alias = "gtk_icon_view_get_item_at_pos")]
2228    #[doc(alias = "get_item_at_pos")]
2229    fn item_at_pos(&self, x: i32, y: i32) -> Option<(TreePath, CellRenderer)> {
2230        unsafe {
2231            let mut path = ptr::null_mut();
2232            let mut cell = ptr::null_mut();
2233            let ret = from_glib(ffi::gtk_icon_view_get_item_at_pos(
2234                self.as_ref().to_glib_none().0,
2235                x,
2236                y,
2237                &mut path,
2238                &mut cell,
2239            ));
2240            if ret {
2241                Some((from_glib_full(path), from_glib_none(cell)))
2242            } else {
2243                None
2244            }
2245        }
2246    }
2247
2248    /// Gets the column in which the item `path` is currently
2249    /// displayed. Column numbers start at 0.
2250    /// ## `path`
2251    /// the [`TreePath`][crate::TreePath] of the item
2252    ///
2253    /// # Returns
2254    ///
2255    /// The column in which the item is displayed
2256    #[doc(alias = "gtk_icon_view_get_item_column")]
2257    #[doc(alias = "get_item_column")]
2258    fn item_column(&self, path: &TreePath) -> i32 {
2259        unsafe {
2260            ffi::gtk_icon_view_get_item_column(
2261                self.as_ref().to_glib_none().0,
2262                mut_override(path.to_glib_none().0),
2263            )
2264        }
2265    }
2266
2267    /// Returns the value of the ::item-orientation property which determines
2268    /// whether the labels are drawn beside the icons instead of below.
2269    ///
2270    /// # Returns
2271    ///
2272    /// the relative position of texts and icons
2273    #[doc(alias = "gtk_icon_view_get_item_orientation")]
2274    #[doc(alias = "get_item_orientation")]
2275    fn item_orientation(&self) -> Orientation {
2276        unsafe {
2277            from_glib(ffi::gtk_icon_view_get_item_orientation(
2278                self.as_ref().to_glib_none().0,
2279            ))
2280        }
2281    }
2282
2283    /// Returns the value of the ::item-padding property.
2284    ///
2285    /// # Returns
2286    ///
2287    /// the padding around items
2288    #[doc(alias = "gtk_icon_view_get_item_padding")]
2289    #[doc(alias = "get_item_padding")]
2290    fn item_padding(&self) -> i32 {
2291        unsafe { ffi::gtk_icon_view_get_item_padding(self.as_ref().to_glib_none().0) }
2292    }
2293
2294    /// Gets the row in which the item `path` is currently
2295    /// displayed. Row numbers start at 0.
2296    /// ## `path`
2297    /// the [`TreePath`][crate::TreePath] of the item
2298    ///
2299    /// # Returns
2300    ///
2301    /// The row in which the item is displayed
2302    #[doc(alias = "gtk_icon_view_get_item_row")]
2303    #[doc(alias = "get_item_row")]
2304    fn item_row(&self, path: &TreePath) -> i32 {
2305        unsafe {
2306            ffi::gtk_icon_view_get_item_row(
2307                self.as_ref().to_glib_none().0,
2308                mut_override(path.to_glib_none().0),
2309            )
2310        }
2311    }
2312
2313    /// Returns the value of the ::item-width property.
2314    ///
2315    /// # Returns
2316    ///
2317    /// the width of a single item, or -1
2318    #[doc(alias = "gtk_icon_view_get_item_width")]
2319    #[doc(alias = "get_item_width")]
2320    fn item_width(&self) -> i32 {
2321        unsafe { ffi::gtk_icon_view_get_item_width(self.as_ref().to_glib_none().0) }
2322    }
2323
2324    /// Returns the value of the ::margin property.
2325    ///
2326    /// # Returns
2327    ///
2328    /// the space at the borders
2329    #[doc(alias = "gtk_icon_view_get_margin")]
2330    #[doc(alias = "get_margin")]
2331    fn margin(&self) -> i32 {
2332        unsafe { ffi::gtk_icon_view_get_margin(self.as_ref().to_glib_none().0) }
2333    }
2334
2335    /// Returns the column with markup text for `self`.
2336    ///
2337    /// # Returns
2338    ///
2339    /// the markup column, or -1 if it’s unset.
2340    #[doc(alias = "gtk_icon_view_get_markup_column")]
2341    #[doc(alias = "get_markup_column")]
2342    fn markup_column(&self) -> i32 {
2343        unsafe { ffi::gtk_icon_view_get_markup_column(self.as_ref().to_glib_none().0) }
2344    }
2345
2346    /// Returns the model the [`IconView`][crate::IconView] is based on. Returns [`None`] if the
2347    /// model is unset.
2348    ///
2349    /// # Returns
2350    ///
2351    /// A [`TreeModel`][crate::TreeModel], or [`None`] if none is
2352    ///  currently being used.
2353    #[doc(alias = "gtk_icon_view_get_model")]
2354    #[doc(alias = "get_model")]
2355    fn model(&self) -> Option<TreeModel> {
2356        unsafe { from_glib_none(ffi::gtk_icon_view_get_model(self.as_ref().to_glib_none().0)) }
2357    }
2358
2359    /// Finds the path at the point (`x`, `y`), relative to bin_window coordinates.
2360    /// See [`item_at_pos()`][Self::item_at_pos()], if you are also interested in
2361    /// the cell at the specified position.
2362    /// See [`convert_widget_to_bin_window_coords()`][Self::convert_widget_to_bin_window_coords()] for converting
2363    /// widget coordinates to bin_window coordinates.
2364    /// ## `x`
2365    /// The x position to be identified
2366    /// ## `y`
2367    /// The y position to be identified
2368    ///
2369    /// # Returns
2370    ///
2371    /// The [`TreePath`][crate::TreePath] corresponding
2372    /// to the icon or [`None`] if no icon exists at that position.
2373    #[doc(alias = "gtk_icon_view_get_path_at_pos")]
2374    #[doc(alias = "get_path_at_pos")]
2375    fn path_at_pos(&self, x: i32, y: i32) -> Option<TreePath> {
2376        unsafe {
2377            from_glib_full(ffi::gtk_icon_view_get_path_at_pos(
2378                self.as_ref().to_glib_none().0,
2379                x,
2380                y,
2381            ))
2382        }
2383    }
2384
2385    /// Returns the column with pixbufs for `self`.
2386    ///
2387    /// # Returns
2388    ///
2389    /// the pixbuf column, or -1 if it’s unset.
2390    #[doc(alias = "gtk_icon_view_get_pixbuf_column")]
2391    #[doc(alias = "get_pixbuf_column")]
2392    fn pixbuf_column(&self) -> i32 {
2393        unsafe { ffi::gtk_icon_view_get_pixbuf_column(self.as_ref().to_glib_none().0) }
2394    }
2395
2396    /// Retrieves whether the user can reorder the list via drag-and-drop.
2397    /// See [`set_reorderable()`][Self::set_reorderable()].
2398    ///
2399    /// # Returns
2400    ///
2401    /// [`true`] if the list can be reordered.
2402    #[doc(alias = "gtk_icon_view_get_reorderable")]
2403    #[doc(alias = "get_reorderable")]
2404    fn is_reorderable(&self) -> bool {
2405        unsafe {
2406            from_glib(ffi::gtk_icon_view_get_reorderable(
2407                self.as_ref().to_glib_none().0,
2408            ))
2409        }
2410    }
2411
2412    /// Returns the value of the ::row-spacing property.
2413    ///
2414    /// # Returns
2415    ///
2416    /// the space between rows
2417    #[doc(alias = "gtk_icon_view_get_row_spacing")]
2418    #[doc(alias = "get_row_spacing")]
2419    fn row_spacing(&self) -> i32 {
2420        unsafe { ffi::gtk_icon_view_get_row_spacing(self.as_ref().to_glib_none().0) }
2421    }
2422
2423    /// Creates a list of paths of all selected items. Additionally, if you are
2424    /// planning on modifying the model after calling this function, you may
2425    /// want to convert the returned list into a list of `GtkTreeRowReferences`.
2426    /// To do this, you can use [`TreeRowReference::new()`][crate::TreeRowReference::new()].
2427    ///
2428    /// To free the return value, use:
2429    ///
2430    ///
2431    /// **⚠️ The following code is in C ⚠️**
2432    ///
2433    /// ```C
2434    /// g_list_free_full (list, (GDestroyNotify) gtk_tree_path_free);
2435    /// ```
2436    ///
2437    /// # Returns
2438    ///
2439    /// A `GList` containing a [`TreePath`][crate::TreePath] for each selected row.
2440    #[doc(alias = "gtk_icon_view_get_selected_items")]
2441    #[doc(alias = "get_selected_items")]
2442    fn selected_items(&self) -> Vec<TreePath> {
2443        unsafe {
2444            FromGlibPtrContainer::from_glib_full(ffi::gtk_icon_view_get_selected_items(
2445                self.as_ref().to_glib_none().0,
2446            ))
2447        }
2448    }
2449
2450    /// Gets the selection mode of the `self`.
2451    ///
2452    /// # Returns
2453    ///
2454    /// the current selection mode
2455    #[doc(alias = "gtk_icon_view_get_selection_mode")]
2456    #[doc(alias = "get_selection_mode")]
2457    fn selection_mode(&self) -> SelectionMode {
2458        unsafe {
2459            from_glib(ffi::gtk_icon_view_get_selection_mode(
2460                self.as_ref().to_glib_none().0,
2461            ))
2462        }
2463    }
2464
2465    /// Returns the value of the ::spacing property.
2466    ///
2467    /// # Returns
2468    ///
2469    /// the space between cells
2470    #[doc(alias = "gtk_icon_view_get_spacing")]
2471    #[doc(alias = "get_spacing")]
2472    fn spacing(&self) -> i32 {
2473        unsafe { ffi::gtk_icon_view_get_spacing(self.as_ref().to_glib_none().0) }
2474    }
2475
2476    /// Returns the column with text for `self`.
2477    ///
2478    /// # Returns
2479    ///
2480    /// the text column, or -1 if it’s unset.
2481    #[doc(alias = "gtk_icon_view_get_text_column")]
2482    #[doc(alias = "get_text_column")]
2483    fn text_column(&self) -> i32 {
2484        unsafe { ffi::gtk_icon_view_get_text_column(self.as_ref().to_glib_none().0) }
2485    }
2486
2487    /// Returns the column of `self`’s model which is being used for
2488    /// displaying tooltips on `self`’s rows.
2489    ///
2490    /// # Returns
2491    ///
2492    /// the index of the tooltip column that is currently being
2493    /// used, or -1 if this is disabled.
2494    #[doc(alias = "gtk_icon_view_get_tooltip_column")]
2495    #[doc(alias = "get_tooltip_column")]
2496    fn tooltip_column(&self) -> i32 {
2497        unsafe { ffi::gtk_icon_view_get_tooltip_column(self.as_ref().to_glib_none().0) }
2498    }
2499
2500    /// This function is supposed to be used in a [`query-tooltip`][struct@crate::Widget#query-tooltip]
2501    /// signal handler for [`IconView`][crate::IconView]. The `x`, `y` and `keyboard_tip` values
2502    /// which are received in the signal handler, should be passed to this
2503    /// function without modification.
2504    ///
2505    /// The return value indicates whether there is an icon view item at the given
2506    /// coordinates ([`true`]) or not ([`false`]) for mouse tooltips. For keyboard
2507    /// tooltips the item returned will be the cursor item. When [`true`], then any of
2508    /// `model`, `path` and `iter` which have been provided will be set to point to
2509    /// that row and the corresponding model. `x` and `y` will always be converted
2510    /// to be relative to `self`’s bin_window if `keyboard_tooltip` is [`false`].
2511    /// ## `x`
2512    /// the x coordinate (relative to widget coordinates)
2513    /// ## `y`
2514    /// the y coordinate (relative to widget coordinates)
2515    /// ## `keyboard_tip`
2516    /// whether this is a keyboard tooltip or not
2517    ///
2518    /// # Returns
2519    ///
2520    /// whether or not the given tooltip context points to a item
2521    ///
2522    /// ## `model`
2523    /// a pointer to receive a
2524    ///  [`TreeModel`][crate::TreeModel] or [`None`]
2525    ///
2526    /// ## `path`
2527    /// a pointer to receive a [`TreePath`][crate::TreePath] or [`None`]
2528    ///
2529    /// ## `iter`
2530    /// a pointer to receive a [`TreeIter`][crate::TreeIter] or [`None`]
2531    #[doc(alias = "gtk_icon_view_get_tooltip_context")]
2532    #[doc(alias = "get_tooltip_context")]
2533    fn tooltip_context(
2534        &self,
2535        x: &mut i32,
2536        y: &mut i32,
2537        keyboard_tip: bool,
2538    ) -> Option<(TreeModel, TreePath, TreeIter)> {
2539        unsafe {
2540            let mut model = ptr::null_mut();
2541            let mut path = ptr::null_mut();
2542            let mut iter = TreeIter::uninitialized();
2543            let ret = from_glib(ffi::gtk_icon_view_get_tooltip_context(
2544                self.as_ref().to_glib_none().0,
2545                x,
2546                y,
2547                keyboard_tip.into_glib(),
2548                &mut model,
2549                &mut path,
2550                iter.to_glib_none_mut().0,
2551            ));
2552            if ret {
2553                Some((from_glib_none(model), from_glib_full(path), iter))
2554            } else {
2555                None
2556            }
2557        }
2558    }
2559
2560    /// Sets `start_path` and `end_path` to be the first and last visible path.
2561    /// Note that there may be invisible paths in between.
2562    ///
2563    /// Both paths should be freed with `gtk_tree_path_free()` after use.
2564    ///
2565    /// # Returns
2566    ///
2567    /// [`true`], if valid paths were placed in `start_path` and `end_path`
2568    ///
2569    /// ## `start_path`
2570    /// Return location for start of region,
2571    ///  or [`None`]
2572    ///
2573    /// ## `end_path`
2574    /// Return location for end of region, or [`None`]
2575    #[doc(alias = "gtk_icon_view_get_visible_range")]
2576    #[doc(alias = "get_visible_range")]
2577    fn visible_range(&self) -> Option<(TreePath, TreePath)> {
2578        unsafe {
2579            let mut start_path = ptr::null_mut();
2580            let mut end_path = ptr::null_mut();
2581            let ret = from_glib(ffi::gtk_icon_view_get_visible_range(
2582                self.as_ref().to_glib_none().0,
2583                &mut start_path,
2584                &mut end_path,
2585            ));
2586            if ret {
2587                Some((from_glib_full(start_path), from_glib_full(end_path)))
2588            } else {
2589                None
2590            }
2591        }
2592    }
2593
2594    /// Activates the item determined by `path`.
2595    /// ## `path`
2596    /// The [`TreePath`][crate::TreePath] to be activated
2597    #[doc(alias = "gtk_icon_view_item_activated")]
2598    fn item_activated(&self, path: &TreePath) {
2599        unsafe {
2600            ffi::gtk_icon_view_item_activated(
2601                self.as_ref().to_glib_none().0,
2602                mut_override(path.to_glib_none().0),
2603            );
2604        }
2605    }
2606
2607    /// Returns [`true`] if the icon pointed to by `path` is currently
2608    /// selected. If `path` does not point to a valid location, [`false`] is returned.
2609    /// ## `path`
2610    /// A [`TreePath`][crate::TreePath] to check selection on.
2611    ///
2612    /// # Returns
2613    ///
2614    /// [`true`] if `path` is selected.
2615    #[doc(alias = "gtk_icon_view_path_is_selected")]
2616    fn path_is_selected(&self, path: &TreePath) -> bool {
2617        unsafe {
2618            from_glib(ffi::gtk_icon_view_path_is_selected(
2619                self.as_ref().to_glib_none().0,
2620                mut_override(path.to_glib_none().0),
2621            ))
2622        }
2623    }
2624
2625    /// Moves the alignments of `self` to the position specified by `path`.
2626    /// `row_align` determines where the row is placed, and `col_align` determines
2627    /// where `column` is placed. Both are expected to be between 0.0 and 1.0.
2628    /// 0.0 means left/top alignment, 1.0 means right/bottom alignment, 0.5 means
2629    /// center.
2630    ///
2631    /// If `use_align` is [`false`], then the alignment arguments are ignored, and the
2632    /// tree does the minimum amount of work to scroll the item onto the screen.
2633    /// This means that the item will be scrolled to the edge closest to its current
2634    /// position. If the item is currently visible on the screen, nothing is done.
2635    ///
2636    /// This function only works if the model is set, and `path` is a valid row on
2637    /// the model. If the model changes before the `self` is realized, the
2638    /// centered path will be modified to reflect this change.
2639    /// ## `path`
2640    /// The path of the item to move to.
2641    /// ## `use_align`
2642    /// whether to use alignment arguments, or [`false`].
2643    /// ## `row_align`
2644    /// The vertical alignment of the item specified by `path`.
2645    /// ## `col_align`
2646    /// The horizontal alignment of the item specified by `path`.
2647    #[doc(alias = "gtk_icon_view_scroll_to_path")]
2648    fn scroll_to_path(&self, path: &TreePath, use_align: bool, row_align: f32, col_align: f32) {
2649        unsafe {
2650            ffi::gtk_icon_view_scroll_to_path(
2651                self.as_ref().to_glib_none().0,
2652                mut_override(path.to_glib_none().0),
2653                use_align.into_glib(),
2654                row_align,
2655                col_align,
2656            );
2657        }
2658    }
2659
2660    /// Selects all the icons. `self` must has its selection mode set
2661    /// to [`SelectionMode::Multiple`][crate::SelectionMode::Multiple].
2662    #[doc(alias = "gtk_icon_view_select_all")]
2663    fn select_all(&self) {
2664        unsafe {
2665            ffi::gtk_icon_view_select_all(self.as_ref().to_glib_none().0);
2666        }
2667    }
2668
2669    /// Selects the row at `path`.
2670    /// ## `path`
2671    /// The [`TreePath`][crate::TreePath] to be selected.
2672    #[doc(alias = "gtk_icon_view_select_path")]
2673    fn select_path(&self, path: &TreePath) {
2674        unsafe {
2675            ffi::gtk_icon_view_select_path(
2676                self.as_ref().to_glib_none().0,
2677                mut_override(path.to_glib_none().0),
2678            );
2679        }
2680    }
2681
2682    /// Calls a function for each selected icon. Note that the model or
2683    /// selection cannot be modified from within this function.
2684    /// ## `func`
2685    /// The function to call for each selected icon.
2686    #[doc(alias = "gtk_icon_view_selected_foreach")]
2687    fn selected_foreach<P: FnMut(&IconView, &TreePath)>(&self, func: P) {
2688        let func_data: P = func;
2689        unsafe extern "C" fn func_func<P: FnMut(&IconView, &TreePath)>(
2690            icon_view: *mut ffi::GtkIconView,
2691            path: *mut ffi::GtkTreePath,
2692            data: glib::ffi::gpointer,
2693        ) {
2694            let icon_view = from_glib_borrow(icon_view);
2695            let path = from_glib_borrow(path);
2696            let callback: *mut P = data as *const _ as usize as *mut P;
2697            (*callback)(&icon_view, &path)
2698        }
2699        let func = Some(func_func::<P> as _);
2700        let super_callback0: &P = &func_data;
2701        unsafe {
2702            ffi::gtk_icon_view_selected_foreach(
2703                self.as_ref().to_glib_none().0,
2704                func,
2705                super_callback0 as *const _ as usize as *mut _,
2706            );
2707        }
2708    }
2709
2710    /// Causes the [`item-activated`][struct@crate::IconView#item-activated] signal to be emitted on
2711    /// a single click instead of a double click.
2712    /// ## `single`
2713    /// [`true`] to emit item-activated on a single click
2714    #[doc(alias = "gtk_icon_view_set_activate_on_single_click")]
2715    fn set_activate_on_single_click(&self, single: bool) {
2716        unsafe {
2717            ffi::gtk_icon_view_set_activate_on_single_click(
2718                self.as_ref().to_glib_none().0,
2719                single.into_glib(),
2720            );
2721        }
2722    }
2723
2724    /// Sets the ::column-spacing property which specifies the space
2725    /// which is inserted between the columns of the icon view.
2726    /// ## `column_spacing`
2727    /// the column spacing
2728    #[doc(alias = "gtk_icon_view_set_column_spacing")]
2729    fn set_column_spacing(&self, column_spacing: i32) {
2730        unsafe {
2731            ffi::gtk_icon_view_set_column_spacing(self.as_ref().to_glib_none().0, column_spacing);
2732        }
2733    }
2734
2735    /// Sets the ::columns property which determines in how
2736    /// many columns the icons are arranged. If `columns` is
2737    /// -1, the number of columns will be chosen automatically
2738    /// to fill the available area.
2739    /// ## `columns`
2740    /// the number of columns
2741    #[doc(alias = "gtk_icon_view_set_columns")]
2742    fn set_columns(&self, columns: i32) {
2743        unsafe {
2744            ffi::gtk_icon_view_set_columns(self.as_ref().to_glib_none().0, columns);
2745        }
2746    }
2747
2748    /// Sets the current keyboard focus to be at `path`, and selects it. This is
2749    /// useful when you want to focus the user’s attention on a particular item.
2750    /// If `cell` is not [`None`], then focus is given to the cell specified by
2751    /// it. Additionally, if `start_editing` is [`true`], then editing should be
2752    /// started in the specified cell.
2753    ///
2754    /// This function is often followed by `gtk_widget_grab_focus
2755    /// (icon_view)` in order to give keyboard focus to the widget.
2756    /// Please note that editing can only happen when the widget is realized.
2757    /// ## `path`
2758    /// A [`TreePath`][crate::TreePath]
2759    /// ## `cell`
2760    /// One of the cell renderers of `self`, or [`None`]
2761    /// ## `start_editing`
2762    /// [`true`] if the specified cell should start being edited.
2763    #[doc(alias = "gtk_icon_view_set_cursor")]
2764    fn set_cursor(
2765        &self,
2766        path: &TreePath,
2767        cell: Option<&impl IsA<CellRenderer>>,
2768        start_editing: bool,
2769    ) {
2770        unsafe {
2771            ffi::gtk_icon_view_set_cursor(
2772                self.as_ref().to_glib_none().0,
2773                mut_override(path.to_glib_none().0),
2774                cell.map(|p| p.as_ref()).to_glib_none().0,
2775                start_editing.into_glib(),
2776            );
2777        }
2778    }
2779
2780    /// Sets the item that is highlighted for feedback.
2781    /// ## `path`
2782    /// The path of the item to highlight, or [`None`].
2783    /// ## `pos`
2784    /// Specifies where to drop, relative to the item
2785    #[doc(alias = "gtk_icon_view_set_drag_dest_item")]
2786    fn set_drag_dest_item(&self, path: Option<&TreePath>, pos: IconViewDropPosition) {
2787        unsafe {
2788            ffi::gtk_icon_view_set_drag_dest_item(
2789                self.as_ref().to_glib_none().0,
2790                mut_override(path.to_glib_none().0),
2791                pos.into_glib(),
2792            );
2793        }
2794    }
2795
2796    /// Sets the ::item-orientation property which determines whether the labels
2797    /// are drawn beside the icons instead of below.
2798    /// ## `orientation`
2799    /// the relative position of texts and icons
2800    #[doc(alias = "gtk_icon_view_set_item_orientation")]
2801    fn set_item_orientation(&self, orientation: Orientation) {
2802        unsafe {
2803            ffi::gtk_icon_view_set_item_orientation(
2804                self.as_ref().to_glib_none().0,
2805                orientation.into_glib(),
2806            );
2807        }
2808    }
2809
2810    /// Sets the [`item-padding`][struct@crate::IconView#item-padding] property which specifies the padding
2811    /// around each of the icon view’s items.
2812    /// ## `item_padding`
2813    /// the item padding
2814    #[doc(alias = "gtk_icon_view_set_item_padding")]
2815    fn set_item_padding(&self, item_padding: i32) {
2816        unsafe {
2817            ffi::gtk_icon_view_set_item_padding(self.as_ref().to_glib_none().0, item_padding);
2818        }
2819    }
2820
2821    /// Sets the ::item-width property which specifies the width
2822    /// to use for each item. If it is set to -1, the icon view will
2823    /// automatically determine a suitable item size.
2824    /// ## `item_width`
2825    /// the width for each item
2826    #[doc(alias = "gtk_icon_view_set_item_width")]
2827    fn set_item_width(&self, item_width: i32) {
2828        unsafe {
2829            ffi::gtk_icon_view_set_item_width(self.as_ref().to_glib_none().0, item_width);
2830        }
2831    }
2832
2833    /// Sets the ::margin property which specifies the space
2834    /// which is inserted at the top, bottom, left and right
2835    /// of the icon view.
2836    /// ## `margin`
2837    /// the margin
2838    #[doc(alias = "gtk_icon_view_set_margin")]
2839    fn set_margin(&self, margin: i32) {
2840        unsafe {
2841            ffi::gtk_icon_view_set_margin(self.as_ref().to_glib_none().0, margin);
2842        }
2843    }
2844
2845    /// Sets the column with markup information for `self` to be
2846    /// `column`. The markup column must be of type `G_TYPE_STRING`.
2847    /// If the markup column is set to something, it overrides
2848    /// the text column set by [`set_text_column()`][Self::set_text_column()].
2849    /// ## `column`
2850    /// A column in the currently used model, or -1 to display no text
2851    #[doc(alias = "gtk_icon_view_set_markup_column")]
2852    fn set_markup_column(&self, column: i32) {
2853        unsafe {
2854            ffi::gtk_icon_view_set_markup_column(self.as_ref().to_glib_none().0, column);
2855        }
2856    }
2857
2858    /// Sets the model for a [`IconView`][crate::IconView].
2859    /// If the `self` already has a model set, it will remove
2860    /// it before setting the new model. If `model` is [`None`], then
2861    /// it will unset the old model.
2862    /// ## `model`
2863    /// The model.
2864    #[doc(alias = "gtk_icon_view_set_model")]
2865    fn set_model(&self, model: Option<&impl IsA<TreeModel>>) {
2866        unsafe {
2867            ffi::gtk_icon_view_set_model(
2868                self.as_ref().to_glib_none().0,
2869                model.map(|p| p.as_ref()).to_glib_none().0,
2870            );
2871        }
2872    }
2873
2874    /// Sets the column with pixbufs for `self` to be `column`. The pixbuf
2875    /// column must be of type `GDK_TYPE_PIXBUF`
2876    /// ## `column`
2877    /// A column in the currently used model, or -1 to disable
2878    #[doc(alias = "gtk_icon_view_set_pixbuf_column")]
2879    fn set_pixbuf_column(&self, column: i32) {
2880        unsafe {
2881            ffi::gtk_icon_view_set_pixbuf_column(self.as_ref().to_glib_none().0, column);
2882        }
2883    }
2884
2885    /// This function is a convenience function to allow you to reorder models that
2886    /// support the `GtkTreeDragSourceIface` and the `GtkTreeDragDestIface`. Both
2887    /// [`TreeStore`][crate::TreeStore] and [`ListStore`][crate::ListStore] support these. If `reorderable` is [`true`], then
2888    /// the user can reorder the model by dragging and dropping rows. The
2889    /// developer can listen to these changes by connecting to the model's
2890    /// row_inserted and row_deleted signals. The reordering is implemented by setting up
2891    /// the icon view as a drag source and destination. Therefore, drag and
2892    /// drop can not be used in a reorderable view for any other purpose.
2893    ///
2894    /// This function does not give you any degree of control over the order -- any
2895    /// reordering is allowed. If more control is needed, you should probably
2896    /// handle drag and drop manually.
2897    /// ## `reorderable`
2898    /// [`true`], if the list of items can be reordered.
2899    #[doc(alias = "gtk_icon_view_set_reorderable")]
2900    fn set_reorderable(&self, reorderable: bool) {
2901        unsafe {
2902            ffi::gtk_icon_view_set_reorderable(
2903                self.as_ref().to_glib_none().0,
2904                reorderable.into_glib(),
2905            );
2906        }
2907    }
2908
2909    /// Sets the ::row-spacing property which specifies the space
2910    /// which is inserted between the rows of the icon view.
2911    /// ## `row_spacing`
2912    /// the row spacing
2913    #[doc(alias = "gtk_icon_view_set_row_spacing")]
2914    fn set_row_spacing(&self, row_spacing: i32) {
2915        unsafe {
2916            ffi::gtk_icon_view_set_row_spacing(self.as_ref().to_glib_none().0, row_spacing);
2917        }
2918    }
2919
2920    /// Sets the selection mode of the `self`.
2921    /// ## `mode`
2922    /// The selection mode
2923    #[doc(alias = "gtk_icon_view_set_selection_mode")]
2924    fn set_selection_mode(&self, mode: SelectionMode) {
2925        unsafe {
2926            ffi::gtk_icon_view_set_selection_mode(self.as_ref().to_glib_none().0, mode.into_glib());
2927        }
2928    }
2929
2930    /// Sets the ::spacing property which specifies the space
2931    /// which is inserted between the cells (i.e. the icon and
2932    /// the text) of an item.
2933    /// ## `spacing`
2934    /// the spacing
2935    #[doc(alias = "gtk_icon_view_set_spacing")]
2936    fn set_spacing(&self, spacing: i32) {
2937        unsafe {
2938            ffi::gtk_icon_view_set_spacing(self.as_ref().to_glib_none().0, spacing);
2939        }
2940    }
2941
2942    /// Sets the column with text for `self` to be `column`. The text
2943    /// column must be of type `G_TYPE_STRING`.
2944    /// ## `column`
2945    /// A column in the currently used model, or -1 to display no text
2946    #[doc(alias = "gtk_icon_view_set_text_column")]
2947    fn set_text_column(&self, column: i32) {
2948        unsafe {
2949            ffi::gtk_icon_view_set_text_column(self.as_ref().to_glib_none().0, column);
2950        }
2951    }
2952
2953    /// Sets the tip area of `tooltip` to the area which `cell` occupies in
2954    /// the item pointed to by `path`. See also [`Tooltip::set_tip_area()`][crate::Tooltip::set_tip_area()].
2955    ///
2956    /// See also [`set_tooltip_column()`][Self::set_tooltip_column()] for a simpler alternative.
2957    /// ## `tooltip`
2958    /// a [`Tooltip`][crate::Tooltip]
2959    /// ## `path`
2960    /// a [`TreePath`][crate::TreePath]
2961    /// ## `cell`
2962    /// a [`CellRenderer`][crate::CellRenderer] or [`None`]
2963    #[doc(alias = "gtk_icon_view_set_tooltip_cell")]
2964    fn set_tooltip_cell(
2965        &self,
2966        tooltip: &Tooltip,
2967        path: &TreePath,
2968        cell: Option<&impl IsA<CellRenderer>>,
2969    ) {
2970        unsafe {
2971            ffi::gtk_icon_view_set_tooltip_cell(
2972                self.as_ref().to_glib_none().0,
2973                tooltip.to_glib_none().0,
2974                mut_override(path.to_glib_none().0),
2975                cell.map(|p| p.as_ref()).to_glib_none().0,
2976            );
2977        }
2978    }
2979
2980    /// If you only plan to have simple (text-only) tooltips on full items, you
2981    /// can use this function to have [`IconView`][crate::IconView] handle these automatically
2982    /// for you. `column` should be set to the column in `self`’s model
2983    /// containing the tooltip texts, or -1 to disable this feature.
2984    ///
2985    /// When enabled, [`has-tooltip`][struct@crate::Widget#has-tooltip] will be set to [`true`] and
2986    /// `self` will connect a [`query-tooltip`][struct@crate::Widget#query-tooltip] signal handler.
2987    ///
2988    /// Note that the signal handler sets the text with [`Tooltip::set_markup()`][crate::Tooltip::set_markup()],
2989    /// so &, <, etc have to be escaped in the text.
2990    /// ## `column`
2991    /// an integer, which is a valid column number for `self`’s model
2992    #[doc(alias = "gtk_icon_view_set_tooltip_column")]
2993    fn set_tooltip_column(&self, column: i32) {
2994        unsafe {
2995            ffi::gtk_icon_view_set_tooltip_column(self.as_ref().to_glib_none().0, column);
2996        }
2997    }
2998
2999    /// Sets the tip area of `tooltip` to be the area covered by the item at `path`.
3000    /// See also [`set_tooltip_column()`][Self::set_tooltip_column()] for a simpler alternative.
3001    /// See also [`Tooltip::set_tip_area()`][crate::Tooltip::set_tip_area()].
3002    /// ## `tooltip`
3003    /// a [`Tooltip`][crate::Tooltip]
3004    /// ## `path`
3005    /// a [`TreePath`][crate::TreePath]
3006    #[doc(alias = "gtk_icon_view_set_tooltip_item")]
3007    fn set_tooltip_item(&self, tooltip: &Tooltip, path: &TreePath) {
3008        unsafe {
3009            ffi::gtk_icon_view_set_tooltip_item(
3010                self.as_ref().to_glib_none().0,
3011                tooltip.to_glib_none().0,
3012                mut_override(path.to_glib_none().0),
3013            );
3014        }
3015    }
3016
3017    /// Unselects all the icons.
3018    #[doc(alias = "gtk_icon_view_unselect_all")]
3019    fn unselect_all(&self) {
3020        unsafe {
3021            ffi::gtk_icon_view_unselect_all(self.as_ref().to_glib_none().0);
3022        }
3023    }
3024
3025    /// Unselects the row at `path`.
3026    /// ## `path`
3027    /// The [`TreePath`][crate::TreePath] to be unselected.
3028    #[doc(alias = "gtk_icon_view_unselect_path")]
3029    fn unselect_path(&self, path: &TreePath) {
3030        unsafe {
3031            ffi::gtk_icon_view_unselect_path(
3032                self.as_ref().to_glib_none().0,
3033                mut_override(path.to_glib_none().0),
3034            );
3035        }
3036    }
3037
3038    /// Undoes the effect of `gtk_icon_view_enable_model_drag_dest()`. Calling this
3039    /// method sets [`reorderable`][struct@crate::IconView#reorderable] to [`false`].
3040    #[doc(alias = "gtk_icon_view_unset_model_drag_dest")]
3041    fn unset_model_drag_dest(&self) {
3042        unsafe {
3043            ffi::gtk_icon_view_unset_model_drag_dest(self.as_ref().to_glib_none().0);
3044        }
3045    }
3046
3047    /// Undoes the effect of `gtk_icon_view_enable_model_drag_source()`. Calling this
3048    /// method sets [`reorderable`][struct@crate::IconView#reorderable] to [`false`].
3049    #[doc(alias = "gtk_icon_view_unset_model_drag_source")]
3050    fn unset_model_drag_source(&self) {
3051        unsafe {
3052            ffi::gtk_icon_view_unset_model_drag_source(self.as_ref().to_glib_none().0);
3053        }
3054    }
3055
3056    /// The [`CellArea`][crate::CellArea] used to layout cell renderers for this view.
3057    ///
3058    /// If no area is specified when creating the icon view with [`IconView::with_area()`][crate::IconView::with_area()]
3059    /// a [`CellAreaBox`][crate::CellAreaBox] will be used.
3060    #[doc(alias = "cell-area")]
3061    fn cell_area(&self) -> Option<CellArea> {
3062        ObjectExt::property(self.as_ref(), "cell-area")
3063    }
3064
3065    /// A [keybinding signal][GtkBindingSignal]
3066    /// which gets emitted when the user activates the currently
3067    /// focused item.
3068    ///
3069    /// Applications should not connect to it, but may emit it with
3070    /// `g_signal_emit_by_name()` if they need to control activation
3071    /// programmatically.
3072    ///
3073    /// The default bindings for this signal are Space, Return and Enter.
3074    #[doc(alias = "activate-cursor-item")]
3075    fn connect_activate_cursor_item<F: Fn(&Self) -> bool + 'static>(
3076        &self,
3077        f: F,
3078    ) -> SignalHandlerId {
3079        unsafe extern "C" fn activate_cursor_item_trampoline<
3080            P: IsA<IconView>,
3081            F: Fn(&P) -> bool + 'static,
3082        >(
3083            this: *mut ffi::GtkIconView,
3084            f: glib::ffi::gpointer,
3085        ) -> glib::ffi::gboolean {
3086            let f: &F = &*(f as *const F);
3087            f(IconView::from_glib_borrow(this).unsafe_cast_ref()).into_glib()
3088        }
3089        unsafe {
3090            let f: Box_<F> = Box_::new(f);
3091            connect_raw(
3092                self.as_ptr() as *mut _,
3093                b"activate-cursor-item\0".as_ptr() as *const _,
3094                Some(transmute::<_, unsafe extern "C" fn()>(
3095                    activate_cursor_item_trampoline::<Self, F> as *const (),
3096                )),
3097                Box_::into_raw(f),
3098            )
3099        }
3100    }
3101
3102    fn emit_activate_cursor_item(&self) -> bool {
3103        self.emit_by_name("activate-cursor-item", &[])
3104    }
3105
3106    /// The ::item-activated signal is emitted when the method
3107    /// [`item_activated()`][Self::item_activated()] is called, when the user double
3108    /// clicks an item with the "activate-on-single-click" property set
3109    /// to [`false`], or when the user single clicks an item when the
3110    /// "activate-on-single-click" property set to [`true`]. It is also
3111    /// emitted when a non-editable item is selected and one of the keys:
3112    /// Space, Return or Enter is pressed.
3113    /// ## `path`
3114    /// the [`TreePath`][crate::TreePath] for the activated item
3115    #[doc(alias = "item-activated")]
3116    fn connect_item_activated<F: Fn(&Self, &TreePath) + 'static>(&self, f: F) -> SignalHandlerId {
3117        unsafe extern "C" fn item_activated_trampoline<
3118            P: IsA<IconView>,
3119            F: Fn(&P, &TreePath) + 'static,
3120        >(
3121            this: *mut ffi::GtkIconView,
3122            path: *mut ffi::GtkTreePath,
3123            f: glib::ffi::gpointer,
3124        ) {
3125            let f: &F = &*(f as *const F);
3126            f(
3127                IconView::from_glib_borrow(this).unsafe_cast_ref(),
3128                &from_glib_borrow(path),
3129            )
3130        }
3131        unsafe {
3132            let f: Box_<F> = Box_::new(f);
3133            connect_raw(
3134                self.as_ptr() as *mut _,
3135                b"item-activated\0".as_ptr() as *const _,
3136                Some(transmute::<_, unsafe extern "C" fn()>(
3137                    item_activated_trampoline::<Self, F> as *const (),
3138                )),
3139                Box_::into_raw(f),
3140            )
3141        }
3142    }
3143
3144    /// The ::move-cursor signal is a
3145    /// [keybinding signal][GtkBindingSignal]
3146    /// which gets emitted when the user initiates a cursor movement.
3147    ///
3148    /// Applications should not connect to it, but may emit it with
3149    /// `g_signal_emit_by_name()` if they need to control the cursor
3150    /// programmatically.
3151    ///
3152    /// The default bindings for this signal include
3153    /// - Arrow keys which move by individual steps
3154    /// - Home/End keys which move to the first/last item
3155    /// - PageUp/PageDown which move by "pages"
3156    /// All of these will extend the selection when combined with
3157    /// the Shift modifier.
3158    /// ## `step`
3159    /// the granularity of the move, as a [`MovementStep`][crate::MovementStep]
3160    /// ## `count`
3161    /// the number of `step` units to move
3162    #[doc(alias = "move-cursor")]
3163    fn connect_move_cursor<F: Fn(&Self, MovementStep, i32) -> bool + 'static>(
3164        &self,
3165        f: F,
3166    ) -> SignalHandlerId {
3167        unsafe extern "C" fn move_cursor_trampoline<
3168            P: IsA<IconView>,
3169            F: Fn(&P, MovementStep, i32) -> bool + 'static,
3170        >(
3171            this: *mut ffi::GtkIconView,
3172            step: ffi::GtkMovementStep,
3173            count: libc::c_int,
3174            f: glib::ffi::gpointer,
3175        ) -> glib::ffi::gboolean {
3176            let f: &F = &*(f as *const F);
3177            f(
3178                IconView::from_glib_borrow(this).unsafe_cast_ref(),
3179                from_glib(step),
3180                count,
3181            )
3182            .into_glib()
3183        }
3184        unsafe {
3185            let f: Box_<F> = Box_::new(f);
3186            connect_raw(
3187                self.as_ptr() as *mut _,
3188                b"move-cursor\0".as_ptr() as *const _,
3189                Some(transmute::<_, unsafe extern "C" fn()>(
3190                    move_cursor_trampoline::<Self, F> as *const (),
3191                )),
3192                Box_::into_raw(f),
3193            )
3194        }
3195    }
3196
3197    fn emit_move_cursor(&self, step: MovementStep, count: i32) -> bool {
3198        self.emit_by_name("move-cursor", &[&step, &count])
3199    }
3200
3201    /// A [keybinding signal][GtkBindingSignal]
3202    /// which gets emitted when the user selects all items.
3203    ///
3204    /// Applications should not connect to it, but may emit it with
3205    /// `g_signal_emit_by_name()` if they need to control selection
3206    /// programmatically.
3207    ///
3208    /// The default binding for this signal is Ctrl-a.
3209    #[doc(alias = "select-all")]
3210    fn connect_select_all<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3211        unsafe extern "C" fn select_all_trampoline<P: IsA<IconView>, F: Fn(&P) + 'static>(
3212            this: *mut ffi::GtkIconView,
3213            f: glib::ffi::gpointer,
3214        ) {
3215            let f: &F = &*(f as *const F);
3216            f(IconView::from_glib_borrow(this).unsafe_cast_ref())
3217        }
3218        unsafe {
3219            let f: Box_<F> = Box_::new(f);
3220            connect_raw(
3221                self.as_ptr() as *mut _,
3222                b"select-all\0".as_ptr() as *const _,
3223                Some(transmute::<_, unsafe extern "C" fn()>(
3224                    select_all_trampoline::<Self, F> as *const (),
3225                )),
3226                Box_::into_raw(f),
3227            )
3228        }
3229    }
3230
3231    fn emit_select_all(&self) {
3232        self.emit_by_name::<()>("select-all", &[]);
3233    }
3234
3235    /// A [keybinding signal][GtkBindingSignal]
3236    /// which gets emitted when the user selects the item that is currently
3237    /// focused.
3238    ///
3239    /// Applications should not connect to it, but may emit it with
3240    /// `g_signal_emit_by_name()` if they need to control selection
3241    /// programmatically.
3242    ///
3243    /// There is no default binding for this signal.
3244    #[doc(alias = "select-cursor-item")]
3245    fn connect_select_cursor_item<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3246        unsafe extern "C" fn select_cursor_item_trampoline<
3247            P: IsA<IconView>,
3248            F: Fn(&P) + 'static,
3249        >(
3250            this: *mut ffi::GtkIconView,
3251            f: glib::ffi::gpointer,
3252        ) {
3253            let f: &F = &*(f as *const F);
3254            f(IconView::from_glib_borrow(this).unsafe_cast_ref())
3255        }
3256        unsafe {
3257            let f: Box_<F> = Box_::new(f);
3258            connect_raw(
3259                self.as_ptr() as *mut _,
3260                b"select-cursor-item\0".as_ptr() as *const _,
3261                Some(transmute::<_, unsafe extern "C" fn()>(
3262                    select_cursor_item_trampoline::<Self, F> as *const (),
3263                )),
3264                Box_::into_raw(f),
3265            )
3266        }
3267    }
3268
3269    fn emit_select_cursor_item(&self) {
3270        self.emit_by_name::<()>("select-cursor-item", &[]);
3271    }
3272
3273    /// The ::selection-changed signal is emitted when the selection
3274    /// (i.e. the set of selected items) changes.
3275    #[doc(alias = "selection-changed")]
3276    fn connect_selection_changed<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3277        unsafe extern "C" fn selection_changed_trampoline<P: IsA<IconView>, F: Fn(&P) + 'static>(
3278            this: *mut ffi::GtkIconView,
3279            f: glib::ffi::gpointer,
3280        ) {
3281            let f: &F = &*(f as *const F);
3282            f(IconView::from_glib_borrow(this).unsafe_cast_ref())
3283        }
3284        unsafe {
3285            let f: Box_<F> = Box_::new(f);
3286            connect_raw(
3287                self.as_ptr() as *mut _,
3288                b"selection-changed\0".as_ptr() as *const _,
3289                Some(transmute::<_, unsafe extern "C" fn()>(
3290                    selection_changed_trampoline::<Self, F> as *const (),
3291                )),
3292                Box_::into_raw(f),
3293            )
3294        }
3295    }
3296
3297    /// A [keybinding signal][GtkBindingSignal]
3298    /// which gets emitted when the user toggles whether the currently
3299    /// focused item is selected or not. The exact effect of this
3300    /// depend on the selection mode.
3301    ///
3302    /// Applications should not connect to it, but may emit it with
3303    /// `g_signal_emit_by_name()` if they need to control selection
3304    /// programmatically.
3305    ///
3306    /// There is no default binding for this signal is Ctrl-Space.
3307    #[doc(alias = "toggle-cursor-item")]
3308    fn connect_toggle_cursor_item<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3309        unsafe extern "C" fn toggle_cursor_item_trampoline<
3310            P: IsA<IconView>,
3311            F: Fn(&P) + 'static,
3312        >(
3313            this: *mut ffi::GtkIconView,
3314            f: glib::ffi::gpointer,
3315        ) {
3316            let f: &F = &*(f as *const F);
3317            f(IconView::from_glib_borrow(this).unsafe_cast_ref())
3318        }
3319        unsafe {
3320            let f: Box_<F> = Box_::new(f);
3321            connect_raw(
3322                self.as_ptr() as *mut _,
3323                b"toggle-cursor-item\0".as_ptr() as *const _,
3324                Some(transmute::<_, unsafe extern "C" fn()>(
3325                    toggle_cursor_item_trampoline::<Self, F> as *const (),
3326                )),
3327                Box_::into_raw(f),
3328            )
3329        }
3330    }
3331
3332    fn emit_toggle_cursor_item(&self) {
3333        self.emit_by_name::<()>("toggle-cursor-item", &[]);
3334    }
3335
3336    /// A [keybinding signal][GtkBindingSignal]
3337    /// which gets emitted when the user unselects all items.
3338    ///
3339    /// Applications should not connect to it, but may emit it with
3340    /// `g_signal_emit_by_name()` if they need to control selection
3341    /// programmatically.
3342    ///
3343    /// The default binding for this signal is Ctrl-Shift-a.
3344    #[doc(alias = "unselect-all")]
3345    fn connect_unselect_all<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3346        unsafe extern "C" fn unselect_all_trampoline<P: IsA<IconView>, F: Fn(&P) + 'static>(
3347            this: *mut ffi::GtkIconView,
3348            f: glib::ffi::gpointer,
3349        ) {
3350            let f: &F = &*(f as *const F);
3351            f(IconView::from_glib_borrow(this).unsafe_cast_ref())
3352        }
3353        unsafe {
3354            let f: Box_<F> = Box_::new(f);
3355            connect_raw(
3356                self.as_ptr() as *mut _,
3357                b"unselect-all\0".as_ptr() as *const _,
3358                Some(transmute::<_, unsafe extern "C" fn()>(
3359                    unselect_all_trampoline::<Self, F> as *const (),
3360                )),
3361                Box_::into_raw(f),
3362            )
3363        }
3364    }
3365
3366    fn emit_unselect_all(&self) {
3367        self.emit_by_name::<()>("unselect-all", &[]);
3368    }
3369
3370    #[doc(alias = "activate-on-single-click")]
3371    fn connect_activate_on_single_click_notify<F: Fn(&Self) + 'static>(
3372        &self,
3373        f: F,
3374    ) -> SignalHandlerId {
3375        unsafe extern "C" fn notify_activate_on_single_click_trampoline<
3376            P: IsA<IconView>,
3377            F: Fn(&P) + 'static,
3378        >(
3379            this: *mut ffi::GtkIconView,
3380            _param_spec: glib::ffi::gpointer,
3381            f: glib::ffi::gpointer,
3382        ) {
3383            let f: &F = &*(f as *const F);
3384            f(IconView::from_glib_borrow(this).unsafe_cast_ref())
3385        }
3386        unsafe {
3387            let f: Box_<F> = Box_::new(f);
3388            connect_raw(
3389                self.as_ptr() as *mut _,
3390                b"notify::activate-on-single-click\0".as_ptr() as *const _,
3391                Some(transmute::<_, unsafe extern "C" fn()>(
3392                    notify_activate_on_single_click_trampoline::<Self, F> as *const (),
3393                )),
3394                Box_::into_raw(f),
3395            )
3396        }
3397    }
3398
3399    #[doc(alias = "column-spacing")]
3400    fn connect_column_spacing_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3401        unsafe extern "C" fn notify_column_spacing_trampoline<
3402            P: IsA<IconView>,
3403            F: Fn(&P) + 'static,
3404        >(
3405            this: *mut ffi::GtkIconView,
3406            _param_spec: glib::ffi::gpointer,
3407            f: glib::ffi::gpointer,
3408        ) {
3409            let f: &F = &*(f as *const F);
3410            f(IconView::from_glib_borrow(this).unsafe_cast_ref())
3411        }
3412        unsafe {
3413            let f: Box_<F> = Box_::new(f);
3414            connect_raw(
3415                self.as_ptr() as *mut _,
3416                b"notify::column-spacing\0".as_ptr() as *const _,
3417                Some(transmute::<_, unsafe extern "C" fn()>(
3418                    notify_column_spacing_trampoline::<Self, F> as *const (),
3419                )),
3420                Box_::into_raw(f),
3421            )
3422        }
3423    }
3424
3425    #[doc(alias = "columns")]
3426    fn connect_columns_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3427        unsafe extern "C" fn notify_columns_trampoline<P: IsA<IconView>, F: Fn(&P) + 'static>(
3428            this: *mut ffi::GtkIconView,
3429            _param_spec: glib::ffi::gpointer,
3430            f: glib::ffi::gpointer,
3431        ) {
3432            let f: &F = &*(f as *const F);
3433            f(IconView::from_glib_borrow(this).unsafe_cast_ref())
3434        }
3435        unsafe {
3436            let f: Box_<F> = Box_::new(f);
3437            connect_raw(
3438                self.as_ptr() as *mut _,
3439                b"notify::columns\0".as_ptr() as *const _,
3440                Some(transmute::<_, unsafe extern "C" fn()>(
3441                    notify_columns_trampoline::<Self, F> as *const (),
3442                )),
3443                Box_::into_raw(f),
3444            )
3445        }
3446    }
3447
3448    #[doc(alias = "item-orientation")]
3449    fn connect_item_orientation_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3450        unsafe extern "C" fn notify_item_orientation_trampoline<
3451            P: IsA<IconView>,
3452            F: Fn(&P) + 'static,
3453        >(
3454            this: *mut ffi::GtkIconView,
3455            _param_spec: glib::ffi::gpointer,
3456            f: glib::ffi::gpointer,
3457        ) {
3458            let f: &F = &*(f as *const F);
3459            f(IconView::from_glib_borrow(this).unsafe_cast_ref())
3460        }
3461        unsafe {
3462            let f: Box_<F> = Box_::new(f);
3463            connect_raw(
3464                self.as_ptr() as *mut _,
3465                b"notify::item-orientation\0".as_ptr() as *const _,
3466                Some(transmute::<_, unsafe extern "C" fn()>(
3467                    notify_item_orientation_trampoline::<Self, F> as *const (),
3468                )),
3469                Box_::into_raw(f),
3470            )
3471        }
3472    }
3473
3474    #[doc(alias = "item-padding")]
3475    fn connect_item_padding_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3476        unsafe extern "C" fn notify_item_padding_trampoline<
3477            P: IsA<IconView>,
3478            F: Fn(&P) + 'static,
3479        >(
3480            this: *mut ffi::GtkIconView,
3481            _param_spec: glib::ffi::gpointer,
3482            f: glib::ffi::gpointer,
3483        ) {
3484            let f: &F = &*(f as *const F);
3485            f(IconView::from_glib_borrow(this).unsafe_cast_ref())
3486        }
3487        unsafe {
3488            let f: Box_<F> = Box_::new(f);
3489            connect_raw(
3490                self.as_ptr() as *mut _,
3491                b"notify::item-padding\0".as_ptr() as *const _,
3492                Some(transmute::<_, unsafe extern "C" fn()>(
3493                    notify_item_padding_trampoline::<Self, F> as *const (),
3494                )),
3495                Box_::into_raw(f),
3496            )
3497        }
3498    }
3499
3500    #[doc(alias = "item-width")]
3501    fn connect_item_width_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3502        unsafe extern "C" fn notify_item_width_trampoline<P: IsA<IconView>, F: Fn(&P) + 'static>(
3503            this: *mut ffi::GtkIconView,
3504            _param_spec: glib::ffi::gpointer,
3505            f: glib::ffi::gpointer,
3506        ) {
3507            let f: &F = &*(f as *const F);
3508            f(IconView::from_glib_borrow(this).unsafe_cast_ref())
3509        }
3510        unsafe {
3511            let f: Box_<F> = Box_::new(f);
3512            connect_raw(
3513                self.as_ptr() as *mut _,
3514                b"notify::item-width\0".as_ptr() as *const _,
3515                Some(transmute::<_, unsafe extern "C" fn()>(
3516                    notify_item_width_trampoline::<Self, F> as *const (),
3517                )),
3518                Box_::into_raw(f),
3519            )
3520        }
3521    }
3522
3523    #[doc(alias = "markup-column")]
3524    fn connect_markup_column_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3525        unsafe extern "C" fn notify_markup_column_trampoline<
3526            P: IsA<IconView>,
3527            F: Fn(&P) + 'static,
3528        >(
3529            this: *mut ffi::GtkIconView,
3530            _param_spec: glib::ffi::gpointer,
3531            f: glib::ffi::gpointer,
3532        ) {
3533            let f: &F = &*(f as *const F);
3534            f(IconView::from_glib_borrow(this).unsafe_cast_ref())
3535        }
3536        unsafe {
3537            let f: Box_<F> = Box_::new(f);
3538            connect_raw(
3539                self.as_ptr() as *mut _,
3540                b"notify::markup-column\0".as_ptr() as *const _,
3541                Some(transmute::<_, unsafe extern "C" fn()>(
3542                    notify_markup_column_trampoline::<Self, F> as *const (),
3543                )),
3544                Box_::into_raw(f),
3545            )
3546        }
3547    }
3548
3549    #[doc(alias = "model")]
3550    fn connect_model_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3551        unsafe extern "C" fn notify_model_trampoline<P: IsA<IconView>, F: Fn(&P) + 'static>(
3552            this: *mut ffi::GtkIconView,
3553            _param_spec: glib::ffi::gpointer,
3554            f: glib::ffi::gpointer,
3555        ) {
3556            let f: &F = &*(f as *const F);
3557            f(IconView::from_glib_borrow(this).unsafe_cast_ref())
3558        }
3559        unsafe {
3560            let f: Box_<F> = Box_::new(f);
3561            connect_raw(
3562                self.as_ptr() as *mut _,
3563                b"notify::model\0".as_ptr() as *const _,
3564                Some(transmute::<_, unsafe extern "C" fn()>(
3565                    notify_model_trampoline::<Self, F> as *const (),
3566                )),
3567                Box_::into_raw(f),
3568            )
3569        }
3570    }
3571
3572    #[doc(alias = "pixbuf-column")]
3573    fn connect_pixbuf_column_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3574        unsafe extern "C" fn notify_pixbuf_column_trampoline<
3575            P: IsA<IconView>,
3576            F: Fn(&P) + 'static,
3577        >(
3578            this: *mut ffi::GtkIconView,
3579            _param_spec: glib::ffi::gpointer,
3580            f: glib::ffi::gpointer,
3581        ) {
3582            let f: &F = &*(f as *const F);
3583            f(IconView::from_glib_borrow(this).unsafe_cast_ref())
3584        }
3585        unsafe {
3586            let f: Box_<F> = Box_::new(f);
3587            connect_raw(
3588                self.as_ptr() as *mut _,
3589                b"notify::pixbuf-column\0".as_ptr() as *const _,
3590                Some(transmute::<_, unsafe extern "C" fn()>(
3591                    notify_pixbuf_column_trampoline::<Self, F> as *const (),
3592                )),
3593                Box_::into_raw(f),
3594            )
3595        }
3596    }
3597
3598    #[doc(alias = "reorderable")]
3599    fn connect_reorderable_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3600        unsafe extern "C" fn notify_reorderable_trampoline<
3601            P: IsA<IconView>,
3602            F: Fn(&P) + 'static,
3603        >(
3604            this: *mut ffi::GtkIconView,
3605            _param_spec: glib::ffi::gpointer,
3606            f: glib::ffi::gpointer,
3607        ) {
3608            let f: &F = &*(f as *const F);
3609            f(IconView::from_glib_borrow(this).unsafe_cast_ref())
3610        }
3611        unsafe {
3612            let f: Box_<F> = Box_::new(f);
3613            connect_raw(
3614                self.as_ptr() as *mut _,
3615                b"notify::reorderable\0".as_ptr() as *const _,
3616                Some(transmute::<_, unsafe extern "C" fn()>(
3617                    notify_reorderable_trampoline::<Self, F> as *const (),
3618                )),
3619                Box_::into_raw(f),
3620            )
3621        }
3622    }
3623
3624    #[doc(alias = "row-spacing")]
3625    fn connect_row_spacing_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3626        unsafe extern "C" fn notify_row_spacing_trampoline<
3627            P: IsA<IconView>,
3628            F: Fn(&P) + 'static,
3629        >(
3630            this: *mut ffi::GtkIconView,
3631            _param_spec: glib::ffi::gpointer,
3632            f: glib::ffi::gpointer,
3633        ) {
3634            let f: &F = &*(f as *const F);
3635            f(IconView::from_glib_borrow(this).unsafe_cast_ref())
3636        }
3637        unsafe {
3638            let f: Box_<F> = Box_::new(f);
3639            connect_raw(
3640                self.as_ptr() as *mut _,
3641                b"notify::row-spacing\0".as_ptr() as *const _,
3642                Some(transmute::<_, unsafe extern "C" fn()>(
3643                    notify_row_spacing_trampoline::<Self, F> as *const (),
3644                )),
3645                Box_::into_raw(f),
3646            )
3647        }
3648    }
3649
3650    #[doc(alias = "selection-mode")]
3651    fn connect_selection_mode_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3652        unsafe extern "C" fn notify_selection_mode_trampoline<
3653            P: IsA<IconView>,
3654            F: Fn(&P) + 'static,
3655        >(
3656            this: *mut ffi::GtkIconView,
3657            _param_spec: glib::ffi::gpointer,
3658            f: glib::ffi::gpointer,
3659        ) {
3660            let f: &F = &*(f as *const F);
3661            f(IconView::from_glib_borrow(this).unsafe_cast_ref())
3662        }
3663        unsafe {
3664            let f: Box_<F> = Box_::new(f);
3665            connect_raw(
3666                self.as_ptr() as *mut _,
3667                b"notify::selection-mode\0".as_ptr() as *const _,
3668                Some(transmute::<_, unsafe extern "C" fn()>(
3669                    notify_selection_mode_trampoline::<Self, F> as *const (),
3670                )),
3671                Box_::into_raw(f),
3672            )
3673        }
3674    }
3675
3676    #[doc(alias = "spacing")]
3677    fn connect_spacing_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3678        unsafe extern "C" fn notify_spacing_trampoline<P: IsA<IconView>, F: Fn(&P) + 'static>(
3679            this: *mut ffi::GtkIconView,
3680            _param_spec: glib::ffi::gpointer,
3681            f: glib::ffi::gpointer,
3682        ) {
3683            let f: &F = &*(f as *const F);
3684            f(IconView::from_glib_borrow(this).unsafe_cast_ref())
3685        }
3686        unsafe {
3687            let f: Box_<F> = Box_::new(f);
3688            connect_raw(
3689                self.as_ptr() as *mut _,
3690                b"notify::spacing\0".as_ptr() as *const _,
3691                Some(transmute::<_, unsafe extern "C" fn()>(
3692                    notify_spacing_trampoline::<Self, F> as *const (),
3693                )),
3694                Box_::into_raw(f),
3695            )
3696        }
3697    }
3698
3699    #[doc(alias = "text-column")]
3700    fn connect_text_column_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3701        unsafe extern "C" fn notify_text_column_trampoline<
3702            P: IsA<IconView>,
3703            F: Fn(&P) + 'static,
3704        >(
3705            this: *mut ffi::GtkIconView,
3706            _param_spec: glib::ffi::gpointer,
3707            f: glib::ffi::gpointer,
3708        ) {
3709            let f: &F = &*(f as *const F);
3710            f(IconView::from_glib_borrow(this).unsafe_cast_ref())
3711        }
3712        unsafe {
3713            let f: Box_<F> = Box_::new(f);
3714            connect_raw(
3715                self.as_ptr() as *mut _,
3716                b"notify::text-column\0".as_ptr() as *const _,
3717                Some(transmute::<_, unsafe extern "C" fn()>(
3718                    notify_text_column_trampoline::<Self, F> as *const (),
3719                )),
3720                Box_::into_raw(f),
3721            )
3722        }
3723    }
3724
3725    #[doc(alias = "tooltip-column")]
3726    fn connect_tooltip_column_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3727        unsafe extern "C" fn notify_tooltip_column_trampoline<
3728            P: IsA<IconView>,
3729            F: Fn(&P) + 'static,
3730        >(
3731            this: *mut ffi::GtkIconView,
3732            _param_spec: glib::ffi::gpointer,
3733            f: glib::ffi::gpointer,
3734        ) {
3735            let f: &F = &*(f as *const F);
3736            f(IconView::from_glib_borrow(this).unsafe_cast_ref())
3737        }
3738        unsafe {
3739            let f: Box_<F> = Box_::new(f);
3740            connect_raw(
3741                self.as_ptr() as *mut _,
3742                b"notify::tooltip-column\0".as_ptr() as *const _,
3743                Some(transmute::<_, unsafe extern "C" fn()>(
3744                    notify_tooltip_column_trampoline::<Self, F> as *const (),
3745                )),
3746                Box_::into_raw(f),
3747            )
3748        }
3749    }
3750}
3751
3752impl<O: IsA<IconView>> IconViewExt for O {}
3753
3754impl fmt::Display for IconView {
3755    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3756        f.write_str("IconView")
3757    }
3758}