gtk4/auto/
tree_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#![allow(deprecated)]
5
6use crate::{
7    ffi, Accessible, AccessibleRole, Adjustment, Align, Buildable, CellRenderer, ConstraintTarget,
8    Editable, LayoutManager, MovementStep, Overflow, Scrollable, ScrollablePolicy, Tooltip,
9    TreeIter, TreeModel, TreePath, TreeSelection, TreeViewColumn, TreeViewDropPosition,
10    TreeViewGridLines, Widget,
11};
12use glib::{
13    object::ObjectType as _,
14    prelude::*,
15    signal::{connect_raw, SignalHandlerId},
16    translate::*,
17};
18use std::boxed::Box as Box_;
19
20glib::wrapper! {
21    /// Use [`ListView`][crate::ListView] for lists, and [`ColumnView`][crate::ColumnView]
22    ///   for tabular lists
23    /// A widget for displaying both trees and lists
24    ///
25    /// Widget that displays any object that implements the [`TreeModel`][crate::TreeModel] interface.
26    ///
27    /// Please refer to the [tree widget conceptual overview](section-tree-widget.html)
28    /// for an overview of all the objects and data types related to the tree
29    /// widget and how they work together.
30    ///
31    /// ## Coordinate systems in GtkTreeView API
32    ///
33    /// Several different coordinate systems are exposed in the [`TreeView`][crate::TreeView] API.
34    /// These are:
35    ///
36    /// ![](tree-view-coordinates.png)
37    ///
38    /// - Widget coordinates: Coordinates relative to the widget (usually `widget->window`).
39    ///
40    /// - Bin window coordinates: Coordinates relative to the window that GtkTreeView renders to.
41    ///
42    /// - Tree coordinates: Coordinates relative to the entire scrollable area of GtkTreeView. These
43    ///   coordinates start at (0, 0) for row 0 of the tree.
44    ///
45    /// Several functions are available for converting between the different
46    /// coordinate systems.  The most common translations are between widget and bin
47    /// window coordinates and between bin window and tree coordinates. For the
48    /// former you can use [`TreeViewExt::convert_widget_to_bin_window_coords()`][crate::prelude::TreeViewExt::convert_widget_to_bin_window_coords()]
49    /// (and vice versa), for the latter [`TreeViewExt::convert_bin_window_to_tree_coords()`][crate::prelude::TreeViewExt::convert_bin_window_to_tree_coords()]
50    /// (and vice versa).
51    ///
52    /// ## [`TreeView`][crate::TreeView] as [`Buildable`][crate::Buildable]
53    ///
54    /// The [`TreeView`][crate::TreeView] implementation of the [`Buildable`][crate::Buildable] interface accepts
55    /// [`TreeViewColumn`][crate::TreeViewColumn] objects as `<child>` elements and exposes the
56    /// internal [`TreeSelection`][crate::TreeSelection] in UI definitions.
57    ///
58    /// An example of a UI definition fragment with [`TreeView`][crate::TreeView]:
59    ///
60    /// ```xml
61    /// <object class="GtkTreeView" id="treeview">
62    ///   <property name="model">liststore1</property>
63    ///   <child>
64    ///     <object class="GtkTreeViewColumn" id="test-column">
65    ///       <property name="title">Test</property>
66    ///       <child>
67    ///         <object class="GtkCellRendererText" id="test-renderer"/>
68    ///         <attributes>
69    ///           <attribute name="text">1</attribute>
70    ///         </attributes>
71    ///       </child>
72    ///     </object>
73    ///   </child>
74    ///   <child internal-child="selection">
75    ///     <object class="GtkTreeSelection" id="selection">
76    ///       <signal name="changed" handler="on_treeview_selection_changed"/>
77    ///     </object>
78    ///   </child>
79    /// </object>
80    /// ```
81    ///
82    /// ## CSS nodes
83    ///
84    /// ```text
85    /// treeview.view
86    /// ├── header
87    /// │   ├── button
88    /// │   │   ╰── [sort-indicator]
89    /// ┊   ┊
90    /// │   ╰── button
91    /// │       ╰── [sort-indicator]
92    /// │
93    /// ├── [rubberband]
94    /// ╰── [dndtarget]
95    /// ```
96    ///
97    /// [`TreeView`][crate::TreeView] has a main CSS node with name `treeview` and style class `.view`.
98    /// It has a subnode with name `header`, which is the parent for all the column
99    /// header widgets' CSS nodes.
100    ///
101    /// Each column header consists of a `button`, which among other content, has a
102    /// child with name `sort-indicator`, which carries the `.ascending` or `.descending`
103    /// style classes when the column header should show a sort indicator. The CSS
104    /// is expected to provide a suitable image using the `-gtk-icon-source` property.
105    ///
106    /// For rubberband selection, a subnode with name `rubberband` is used.
107    ///
108    /// For the drop target location during DND, a subnode with name `dndtarget` is used.
109    ///
110    /// ## Properties
111    ///
112    ///
113    /// #### `activate-on-single-click`
114    ///  The activate-on-single-click property specifies whether the "row-activated" signal
115    /// will be emitted after a single click.
116    ///
117    /// Readable | Writeable
118    ///
119    ///
120    /// #### `enable-grid-lines`
121    ///  Readable | Writeable
122    ///
123    ///
124    /// #### `enable-search`
125    ///  Readable | Writeable
126    ///
127    ///
128    /// #### `enable-tree-lines`
129    ///  Readable | Writeable
130    ///
131    ///
132    /// #### `expander-column`
133    ///  Readable | Writeable
134    ///
135    ///
136    /// #### `fixed-height-mode`
137    ///  Setting the ::fixed-height-mode property to [`true`] speeds up
138    /// [`TreeView`][crate::TreeView] by assuming that all rows have the same height.
139    /// Only enable this option if all rows are the same height.
140    /// Please see gtk_tree_view_set_fixed_height_mode() for more
141    /// information on this option.
142    ///
143    /// Readable | Writeable
144    ///
145    ///
146    /// #### `headers-clickable`
147    ///  Readable | Writeable
148    ///
149    ///
150    /// #### `headers-visible`
151    ///  Readable | Writeable
152    ///
153    ///
154    /// #### `hover-expand`
155    ///  Enables or disables the hover expansion mode of @tree_view.
156    /// Hover expansion makes rows expand or collapse if the pointer moves
157    /// over them.
158    ///
159    /// This mode is primarily intended for treeviews in popups, e.g.
160    /// in [`ComboBox`][crate::ComboBox] or [`EntryCompletion`][crate::EntryCompletion].
161    ///
162    /// Readable | Writeable
163    ///
164    ///
165    /// #### `hover-selection`
166    ///  Enables or disables the hover selection mode of @tree_view.
167    /// Hover selection makes the selected row follow the pointer.
168    /// Currently, this works only for the selection modes
169    /// [`SelectionMode::Single`][crate::SelectionMode::Single] and [`SelectionMode::Browse`][crate::SelectionMode::Browse].
170    ///
171    /// This mode is primarily intended for treeviews in popups, e.g.
172    /// in [`ComboBox`][crate::ComboBox] or [`EntryCompletion`][crate::EntryCompletion].
173    ///
174    /// Readable | Writeable
175    ///
176    ///
177    /// #### `level-indentation`
178    ///  Extra indentation for each level.
179    ///
180    /// Readable | Writeable
181    ///
182    ///
183    /// #### `model`
184    ///  Readable | Writeable
185    ///
186    ///
187    /// #### `reorderable`
188    ///  Readable | Writeable
189    ///
190    ///
191    /// #### `rubber-banding`
192    ///  Readable | Writeable
193    ///
194    ///
195    /// #### `search-column`
196    ///  Readable | Writeable
197    ///
198    ///
199    /// #### `show-expanders`
200    ///  [`true`] if the view has expanders.
201    ///
202    /// Readable | Writeable
203    ///
204    ///
205    /// #### `tooltip-column`
206    ///  Readable | Writeable
207    /// <details><summary><h4>Widget</h4></summary>
208    ///
209    ///
210    /// #### `can-focus`
211    ///  Whether the widget or any of its descendents can accept
212    /// the input focus.
213    ///
214    /// This property is meant to be set by widget implementations,
215    /// typically in their instance init function.
216    ///
217    /// Readable | Writeable
218    ///
219    ///
220    /// #### `can-target`
221    ///  Whether the widget can receive pointer events.
222    ///
223    /// Readable | Writeable
224    ///
225    ///
226    /// #### `css-classes`
227    ///  A list of css classes applied to this widget.
228    ///
229    /// Readable | Writeable
230    ///
231    ///
232    /// #### `css-name`
233    ///  The name of this widget in the CSS tree.
234    ///
235    /// This property is meant to be set by widget implementations,
236    /// typically in their instance init function.
237    ///
238    /// Readable | Writeable | Construct Only
239    ///
240    ///
241    /// #### `cursor`
242    ///  The cursor used by @widget.
243    ///
244    /// Readable | Writeable
245    ///
246    ///
247    /// #### `focus-on-click`
248    ///  Whether the widget should grab focus when it is clicked with the mouse.
249    ///
250    /// This property is only relevant for widgets that can take focus.
251    ///
252    /// Readable | Writeable
253    ///
254    ///
255    /// #### `focusable`
256    ///  Whether this widget itself will accept the input focus.
257    ///
258    /// Readable | Writeable
259    ///
260    ///
261    /// #### `halign`
262    ///  How to distribute horizontal space if widget gets extra space.
263    ///
264    /// Readable | Writeable
265    ///
266    ///
267    /// #### `has-default`
268    ///  Whether the widget is the default widget.
269    ///
270    /// Readable
271    ///
272    ///
273    /// #### `has-focus`
274    ///  Whether the widget has the input focus.
275    ///
276    /// Readable
277    ///
278    ///
279    /// #### `has-tooltip`
280    ///  Enables or disables the emission of the [`query-tooltip`][struct@crate::Widget#query-tooltip]
281    /// signal on @widget.
282    ///
283    /// A true value indicates that @widget can have a tooltip, in this case
284    /// the widget will be queried using [`query-tooltip`][struct@crate::Widget#query-tooltip] to
285    /// determine whether it will provide a tooltip or not.
286    ///
287    /// Readable | Writeable
288    ///
289    ///
290    /// #### `height-request`
291    ///  Overrides for height request of the widget.
292    ///
293    /// If this is -1, the natural request will be used.
294    ///
295    /// Readable | Writeable
296    ///
297    ///
298    /// #### `hexpand`
299    ///  Whether to expand horizontally.
300    ///
301    /// Readable | Writeable
302    ///
303    ///
304    /// #### `hexpand-set`
305    ///  Whether to use the `hexpand` property.
306    ///
307    /// Readable | Writeable
308    ///
309    ///
310    /// #### `layout-manager`
311    ///  The [`LayoutManager`][crate::LayoutManager] instance to use to compute
312    /// the preferred size of the widget, and allocate its children.
313    ///
314    /// This property is meant to be set by widget implementations,
315    /// typically in their instance init function.
316    ///
317    /// Readable | Writeable
318    ///
319    ///
320    /// #### `limit-events`
321    ///  Makes this widget act like a modal dialog, with respect to
322    /// event delivery.
323    ///
324    /// Global event controllers will not handle events with targets
325    /// inside the widget, unless they are set up to ignore propagation
326    /// limits. See [`EventControllerExt::set_propagation_limit()`][crate::prelude::EventControllerExt::set_propagation_limit()].
327    ///
328    /// Readable | Writeable
329    ///
330    ///
331    /// #### `margin-bottom`
332    ///  Margin on bottom side of widget.
333    ///
334    /// This property adds margin outside of the widget's normal size
335    /// request, the margin will be added in addition to the size from
336    /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
337    ///
338    /// Readable | Writeable
339    ///
340    ///
341    /// #### `margin-end`
342    ///  Margin on end of widget, horizontally.
343    ///
344    /// This property supports left-to-right and right-to-left text
345    /// directions.
346    ///
347    /// This property adds margin outside of the widget's normal size
348    /// request, the margin will be added in addition to the size from
349    /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
350    ///
351    /// Readable | Writeable
352    ///
353    ///
354    /// #### `margin-start`
355    ///  Margin on start of widget, horizontally.
356    ///
357    /// This property supports left-to-right and right-to-left text
358    /// directions.
359    ///
360    /// This property adds margin outside of the widget's normal size
361    /// request, the margin will be added in addition to the size from
362    /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
363    ///
364    /// Readable | Writeable
365    ///
366    ///
367    /// #### `margin-top`
368    ///  Margin on top side of widget.
369    ///
370    /// This property adds margin outside of the widget's normal size
371    /// request, the margin will be added in addition to the size from
372    /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
373    ///
374    /// Readable | Writeable
375    ///
376    ///
377    /// #### `name`
378    ///  The name of the widget.
379    ///
380    /// Readable | Writeable
381    ///
382    ///
383    /// #### `opacity`
384    ///  The requested opacity of the widget.
385    ///
386    /// Readable | Writeable
387    ///
388    ///
389    /// #### `overflow`
390    ///  How content outside the widget's content area is treated.
391    ///
392    /// This property is meant to be set by widget implementations,
393    /// typically in their instance init function.
394    ///
395    /// Readable | Writeable
396    ///
397    ///
398    /// #### `parent`
399    ///  The parent widget of this widget.
400    ///
401    /// Readable
402    ///
403    ///
404    /// #### `receives-default`
405    ///  Whether the widget will receive the default action when it is focused.
406    ///
407    /// Readable | Writeable
408    ///
409    ///
410    /// #### `root`
411    ///  The [`Root`][crate::Root] widget of the widget tree containing this widget.
412    ///
413    /// This will be `NULL` if the widget is not contained in a root widget.
414    ///
415    /// Readable
416    ///
417    ///
418    /// #### `scale-factor`
419    ///  The scale factor of the widget.
420    ///
421    /// Readable
422    ///
423    ///
424    /// #### `sensitive`
425    ///  Whether the widget responds to input.
426    ///
427    /// Readable | Writeable
428    ///
429    ///
430    /// #### `tooltip-markup`
431    ///  Sets the text of tooltip to be the given string, which is marked up
432    /// with Pango markup.
433    ///
434    /// Also see [`Tooltip::set_markup()`][crate::Tooltip::set_markup()].
435    ///
436    /// This is a convenience property which will take care of getting the
437    /// tooltip shown if the given string is not `NULL`:
438    /// [`has-tooltip`][struct@crate::Widget#has-tooltip] will automatically be set to true
439    /// and there will be taken care of [`query-tooltip`][struct@crate::Widget#query-tooltip] in
440    /// the default signal handler.
441    ///
442    /// Note that if both [`tooltip-text`][struct@crate::Widget#tooltip-text] and
443    /// [`tooltip-markup`][struct@crate::Widget#tooltip-markup] are set, the last one wins.
444    ///
445    /// Readable | Writeable
446    ///
447    ///
448    /// #### `tooltip-text`
449    ///  Sets the text of tooltip to be the given string.
450    ///
451    /// Also see [`Tooltip::set_text()`][crate::Tooltip::set_text()].
452    ///
453    /// This is a convenience property which will take care of getting the
454    /// tooltip shown if the given string is not `NULL`:
455    /// [`has-tooltip`][struct@crate::Widget#has-tooltip] will automatically be set to true
456    /// and there will be taken care of [`query-tooltip`][struct@crate::Widget#query-tooltip] in
457    /// the default signal handler.
458    ///
459    /// Note that if both [`tooltip-text`][struct@crate::Widget#tooltip-text] and
460    /// [`tooltip-markup`][struct@crate::Widget#tooltip-markup] are set, the last one wins.
461    ///
462    /// Readable | Writeable
463    ///
464    ///
465    /// #### `valign`
466    ///  How to distribute vertical space if widget gets extra space.
467    ///
468    /// Readable | Writeable
469    ///
470    ///
471    /// #### `vexpand`
472    ///  Whether to expand vertically.
473    ///
474    /// Readable | Writeable
475    ///
476    ///
477    /// #### `vexpand-set`
478    ///  Whether to use the `vexpand` property.
479    ///
480    /// Readable | Writeable
481    ///
482    ///
483    /// #### `visible`
484    ///  Whether the widget is visible.
485    ///
486    /// Readable | Writeable
487    ///
488    ///
489    /// #### `width-request`
490    ///  Overrides for width request of the widget.
491    ///
492    /// If this is -1, the natural request will be used.
493    ///
494    /// Readable | Writeable
495    /// </details>
496    /// <details><summary><h4>Accessible</h4></summary>
497    ///
498    ///
499    /// #### `accessible-role`
500    ///  The accessible role of the given [`Accessible`][crate::Accessible] implementation.
501    ///
502    /// The accessible role cannot be changed once set.
503    ///
504    /// Readable | Writeable
505    /// </details>
506    /// <details><summary><h4>Scrollable</h4></summary>
507    ///
508    ///
509    /// #### `hadjustment`
510    ///  Horizontal [`Adjustment`][crate::Adjustment] of the scrollable widget.
511    ///
512    /// This adjustment is shared between the scrollable widget and its parent.
513    ///
514    /// Readable | Writeable | Construct
515    ///
516    ///
517    /// #### `hscroll-policy`
518    ///  Determines when horizontal scrolling should start.
519    ///
520    /// Readable | Writeable
521    ///
522    ///
523    /// #### `vadjustment`
524    ///  Vertical [`Adjustment`][crate::Adjustment] of the scrollable widget.
525    ///
526    /// This adjustment is shared between the scrollable widget and its parent.
527    ///
528    /// Readable | Writeable | Construct
529    ///
530    ///
531    /// #### `vscroll-policy`
532    ///  Determines when vertical scrolling should start.
533    ///
534    /// Readable | Writeable
535    /// </details>
536    ///
537    /// ## Signals
538    ///
539    ///
540    /// #### `columns-changed`
541    ///  The number of columns of the treeview has changed.
542    ///
543    ///
544    ///
545    ///
546    /// #### `cursor-changed`
547    ///  The position of the cursor (focused cell) has changed.
548    ///
549    ///
550    ///
551    ///
552    /// #### `expand-collapse-cursor-row`
553    ///  Action
554    ///
555    ///
556    /// #### `move-cursor`
557    ///  The [`TreeView`][crate::TreeView]::move-cursor signal is a [keybinding
558    /// signal][`SignalAction`][crate::SignalAction] which gets emitted when the user
559    /// presses one of the cursor keys.
560    ///
561    /// Applications should not connect to it, but may emit it with
562    /// g_signal_emit_by_name() if they need to control the cursor
563    /// programmatically. In contrast to gtk_tree_view_set_cursor() and
564    /// gtk_tree_view_set_cursor_on_cell() when moving horizontally
565    /// [`TreeView`][crate::TreeView]::move-cursor does not reset the current selection.
566    ///
567    /// Action
568    ///
569    ///
570    /// #### `row-activated`
571    ///  The "row-activated" signal is emitted when the method
572    /// [`TreeViewExt::row_activated()`][crate::prelude::TreeViewExt::row_activated()] is called.
573    ///
574    /// This signal is emitted when the user double-clicks a treeview row with the
575    /// [`activate-on-single-click`][struct@crate::TreeView#activate-on-single-click] property set to [`false`],
576    /// or when the user single-clicks a row when that property set to [`true`].
577    ///
578    /// This signal is also emitted when a non-editable row is selected and one
579    /// of the keys: <kbd>Space</kbd>, <kbd>Shift</kbd>+<kbd>Space</kbd>,
580    /// <kbd>Return</kbd> or <kbd>Enter</kbd> is pressed.
581    ///
582    /// For selection handling refer to the
583    /// [tree widget conceptual overview](section-tree-widget.html)
584    /// as well as [`TreeSelection`][crate::TreeSelection].
585    ///
586    /// Action
587    ///
588    ///
589    /// #### `row-collapsed`
590    ///  The given row has been collapsed (child nodes are hidden).
591    ///
592    ///
593    ///
594    ///
595    /// #### `row-expanded`
596    ///  The given row has been expanded (child nodes are shown).
597    ///
598    ///
599    ///
600    ///
601    /// #### `select-all`
602    ///  Action
603    ///
604    ///
605    /// #### `select-cursor-parent`
606    ///  Action
607    ///
608    ///
609    /// #### `select-cursor-row`
610    ///  Action
611    ///
612    ///
613    /// #### `start-interactive-search`
614    ///  Action
615    ///
616    ///
617    /// #### `test-collapse-row`
618    ///  The given row is about to be collapsed (hide its children nodes). Use this
619    /// signal if you need to control the collapsibility of individual rows.
620    ///
621    ///
622    ///
623    ///
624    /// #### `test-expand-row`
625    ///  The given row is about to be expanded (show its children nodes). Use this
626    /// signal if you need to control the expandability of individual rows.
627    ///
628    ///
629    ///
630    ///
631    /// #### `toggle-cursor-row`
632    ///  Action
633    ///
634    ///
635    /// #### `unselect-all`
636    ///  Action
637    /// <details><summary><h4>Widget</h4></summary>
638    ///
639    ///
640    /// #### `destroy`
641    ///  Signals that all holders of a reference to the widget should release
642    /// the reference that they hold.
643    ///
644    /// May result in finalization of the widget if all references are released.
645    ///
646    /// This signal is not suitable for saving widget state.
647    ///
648    ///
649    ///
650    ///
651    /// #### `direction-changed`
652    ///  Emitted when the text direction of a widget changes.
653    ///
654    ///
655    ///
656    ///
657    /// #### `hide`
658    ///  Emitted when @widget is hidden.
659    ///
660    ///
661    ///
662    ///
663    /// #### `keynav-failed`
664    ///  Emitted if keyboard navigation fails.
665    ///
666    /// See [`WidgetExt::keynav_failed()`][crate::prelude::WidgetExt::keynav_failed()] for details.
667    ///
668    ///
669    ///
670    ///
671    /// #### `map`
672    ///  Emitted when @widget is going to be mapped.
673    ///
674    /// A widget is mapped when the widget is visible (which is controlled with
675    /// [`visible`][struct@crate::Widget#visible]) and all its parents up to the toplevel widget
676    /// are also visible.
677    ///
678    /// The `::map` signal can be used to determine whether a widget will be drawn,
679    /// for instance it can resume an animation that was stopped during the
680    /// emission of [`unmap`][struct@crate::Widget#unmap].
681    ///
682    ///
683    ///
684    ///
685    /// #### `mnemonic-activate`
686    ///  Emitted when a widget is activated via a mnemonic.
687    ///
688    /// The default handler for this signal activates @widget if @group_cycling
689    /// is false, or just makes @widget grab focus if @group_cycling is true.
690    ///
691    ///
692    ///
693    ///
694    /// #### `move-focus`
695    ///  Emitted when the focus is moved.
696    ///
697    /// The `::move-focus` signal is a [keybinding signal](class.SignalAction.html).
698    ///
699    /// The default bindings for this signal are <kbd>Tab</kbd> to move forward,
700    /// and <kbd>Shift</kbd>+<kbd>Tab</kbd> to move backward.
701    ///
702    /// Action
703    ///
704    ///
705    /// #### `query-tooltip`
706    ///  Emitted when the widget’s tooltip is about to be shown.
707    ///
708    /// This happens when the [`has-tooltip`][struct@crate::Widget#has-tooltip] property
709    /// is true and the hover timeout has expired with the cursor hovering
710    /// above @widget; or emitted when @widget got focus in keyboard mode.
711    ///
712    /// Using the given coordinates, the signal handler should determine
713    /// whether a tooltip should be shown for @widget. If this is the case
714    /// true should be returned, false otherwise. Note that if @keyboard_mode
715    /// is true, the values of @x and @y are undefined and should not be used.
716    ///
717    /// The signal handler is free to manipulate @tooltip with the therefore
718    /// destined function calls.
719    ///
720    ///
721    ///
722    ///
723    /// #### `realize`
724    ///  Emitted when @widget is associated with a [`gdk::Surface`][crate::gdk::Surface].
725    ///
726    /// This means that [`WidgetExt::realize()`][crate::prelude::WidgetExt::realize()] has been called
727    /// or the widget has been mapped (that is, it is going to be drawn).
728    ///
729    ///
730    ///
731    ///
732    /// #### `show`
733    ///  Emitted when @widget is shown.
734    ///
735    ///
736    ///
737    ///
738    /// #### `state-flags-changed`
739    ///  Emitted when the widget state changes.
740    ///
741    /// See [`WidgetExt::state_flags()`][crate::prelude::WidgetExt::state_flags()].
742    ///
743    ///
744    ///
745    ///
746    /// #### `unmap`
747    ///  Emitted when @widget is going to be unmapped.
748    ///
749    /// A widget is unmapped when either it or any of its parents up to the
750    /// toplevel widget have been set as hidden.
751    ///
752    /// As `::unmap` indicates that a widget will not be shown any longer,
753    /// it can be used to, for example, stop an animation on the widget.
754    ///
755    ///
756    ///
757    ///
758    /// #### `unrealize`
759    ///  Emitted when the [`gdk::Surface`][crate::gdk::Surface] associated with @widget is destroyed.
760    ///
761    /// This means that [`WidgetExt::unrealize()`][crate::prelude::WidgetExt::unrealize()] has been called
762    /// or the widget has been unmapped (that is, it is going to be hidden).
763    ///
764    ///
765    /// </details>
766    ///
767    /// # Implements
768    ///
769    /// [`TreeViewExt`][trait@crate::prelude::TreeViewExt], [`WidgetExt`][trait@crate::prelude::WidgetExt], [`trait@glib::ObjectExt`], [`AccessibleExt`][trait@crate::prelude::AccessibleExt], [`BuildableExt`][trait@crate::prelude::BuildableExt], [`ConstraintTargetExt`][trait@crate::prelude::ConstraintTargetExt], [`ScrollableExt`][trait@crate::prelude::ScrollableExt], [`TreeViewExtManual`][trait@crate::prelude::TreeViewExtManual], [`WidgetExtManual`][trait@crate::prelude::WidgetExtManual], [`AccessibleExtManual`][trait@crate::prelude::AccessibleExtManual]
770    #[doc(alias = "GtkTreeView")]
771    pub struct TreeView(Object<ffi::GtkTreeView, ffi::GtkTreeViewClass>) @extends Widget, @implements Accessible, Buildable, ConstraintTarget, Scrollable;
772
773    match fn {
774        type_ => || ffi::gtk_tree_view_get_type(),
775    }
776}
777
778impl TreeView {
779    pub const NONE: Option<&'static TreeView> = None;
780
781    /// Creates a new [`TreeView`][crate::TreeView] widget.
782    ///
783    /// # Deprecated since 4.10
784    ///
785    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
786    ///
787    /// # Returns
788    ///
789    /// A newly created [`TreeView`][crate::TreeView] widget.
790    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
791    #[allow(deprecated)]
792    #[doc(alias = "gtk_tree_view_new")]
793    pub fn new() -> TreeView {
794        assert_initialized_main_thread!();
795        unsafe { Widget::from_glib_none(ffi::gtk_tree_view_new()).unsafe_cast() }
796    }
797
798    /// Creates a new [`TreeView`][crate::TreeView] widget with the model initialized to @model.
799    ///
800    /// # Deprecated since 4.10
801    ///
802    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
803    /// ## `model`
804    /// the model.
805    ///
806    /// # Returns
807    ///
808    /// A newly created [`TreeView`][crate::TreeView] widget.
809    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
810    #[allow(deprecated)]
811    #[doc(alias = "gtk_tree_view_new_with_model")]
812    #[doc(alias = "new_with_model")]
813    pub fn with_model(model: &impl IsA<TreeModel>) -> TreeView {
814        skip_assert_initialized!();
815        unsafe {
816            Widget::from_glib_none(ffi::gtk_tree_view_new_with_model(
817                model.as_ref().to_glib_none().0,
818            ))
819            .unsafe_cast()
820        }
821    }
822
823    // rustdoc-stripper-ignore-next
824    /// Creates a new builder-pattern struct instance to construct [`TreeView`] objects.
825    ///
826    /// This method returns an instance of [`TreeViewBuilder`](crate::builders::TreeViewBuilder) which can be used to create [`TreeView`] objects.
827    pub fn builder() -> TreeViewBuilder {
828        TreeViewBuilder::new()
829    }
830}
831
832impl Default for TreeView {
833    fn default() -> Self {
834        Self::new()
835    }
836}
837
838// rustdoc-stripper-ignore-next
839/// A [builder-pattern] type to construct [`TreeView`] objects.
840///
841/// [builder-pattern]: https://doc.rust-lang.org/1.0.0/style/ownership/builders.html
842#[must_use = "The builder must be built to be used"]
843pub struct TreeViewBuilder {
844    builder: glib::object::ObjectBuilder<'static, TreeView>,
845}
846
847impl TreeViewBuilder {
848    fn new() -> Self {
849        Self {
850            builder: glib::object::Object::builder(),
851        }
852    }
853
854    /// The activate-on-single-click property specifies whether the "row-activated" signal
855    /// will be emitted after a single click.
856    pub fn activate_on_single_click(self, activate_on_single_click: bool) -> Self {
857        Self {
858            builder: self
859                .builder
860                .property("activate-on-single-click", activate_on_single_click),
861        }
862    }
863
864    pub fn enable_grid_lines(self, enable_grid_lines: TreeViewGridLines) -> Self {
865        Self {
866            builder: self
867                .builder
868                .property("enable-grid-lines", enable_grid_lines),
869        }
870    }
871
872    pub fn enable_search(self, enable_search: bool) -> Self {
873        Self {
874            builder: self.builder.property("enable-search", enable_search),
875        }
876    }
877
878    pub fn enable_tree_lines(self, enable_tree_lines: bool) -> Self {
879        Self {
880            builder: self
881                .builder
882                .property("enable-tree-lines", enable_tree_lines),
883        }
884    }
885
886    pub fn expander_column(self, expander_column: &TreeViewColumn) -> Self {
887        Self {
888            builder: self
889                .builder
890                .property("expander-column", expander_column.clone()),
891        }
892    }
893
894    /// Setting the ::fixed-height-mode property to [`true`] speeds up
895    /// [`TreeView`][crate::TreeView] by assuming that all rows have the same height.
896    /// Only enable this option if all rows are the same height.
897    /// Please see gtk_tree_view_set_fixed_height_mode() for more
898    /// information on this option.
899    pub fn fixed_height_mode(self, fixed_height_mode: bool) -> Self {
900        Self {
901            builder: self
902                .builder
903                .property("fixed-height-mode", fixed_height_mode),
904        }
905    }
906
907    pub fn headers_clickable(self, headers_clickable: bool) -> Self {
908        Self {
909            builder: self
910                .builder
911                .property("headers-clickable", headers_clickable),
912        }
913    }
914
915    pub fn headers_visible(self, headers_visible: bool) -> Self {
916        Self {
917            builder: self.builder.property("headers-visible", headers_visible),
918        }
919    }
920
921    /// Enables or disables the hover expansion mode of @tree_view.
922    /// Hover expansion makes rows expand or collapse if the pointer moves
923    /// over them.
924    ///
925    /// This mode is primarily intended for treeviews in popups, e.g.
926    /// in [`ComboBox`][crate::ComboBox] or [`EntryCompletion`][crate::EntryCompletion].
927    pub fn hover_expand(self, hover_expand: bool) -> Self {
928        Self {
929            builder: self.builder.property("hover-expand", hover_expand),
930        }
931    }
932
933    /// Enables or disables the hover selection mode of @tree_view.
934    /// Hover selection makes the selected row follow the pointer.
935    /// Currently, this works only for the selection modes
936    /// [`SelectionMode::Single`][crate::SelectionMode::Single] and [`SelectionMode::Browse`][crate::SelectionMode::Browse].
937    ///
938    /// This mode is primarily intended for treeviews in popups, e.g.
939    /// in [`ComboBox`][crate::ComboBox] or [`EntryCompletion`][crate::EntryCompletion].
940    pub fn hover_selection(self, hover_selection: bool) -> Self {
941        Self {
942            builder: self.builder.property("hover-selection", hover_selection),
943        }
944    }
945
946    /// Extra indentation for each level.
947    pub fn level_indentation(self, level_indentation: i32) -> Self {
948        Self {
949            builder: self
950                .builder
951                .property("level-indentation", level_indentation),
952        }
953    }
954
955    pub fn model(self, model: &impl IsA<TreeModel>) -> Self {
956        Self {
957            builder: self.builder.property("model", model.clone().upcast()),
958        }
959    }
960
961    pub fn reorderable(self, reorderable: bool) -> Self {
962        Self {
963            builder: self.builder.property("reorderable", reorderable),
964        }
965    }
966
967    pub fn rubber_banding(self, rubber_banding: bool) -> Self {
968        Self {
969            builder: self.builder.property("rubber-banding", rubber_banding),
970        }
971    }
972
973    pub fn search_column(self, search_column: i32) -> Self {
974        Self {
975            builder: self.builder.property("search-column", search_column),
976        }
977    }
978
979    /// [`true`] if the view has expanders.
980    pub fn show_expanders(self, show_expanders: bool) -> Self {
981        Self {
982            builder: self.builder.property("show-expanders", show_expanders),
983        }
984    }
985
986    pub fn tooltip_column(self, tooltip_column: i32) -> Self {
987        Self {
988            builder: self.builder.property("tooltip-column", tooltip_column),
989        }
990    }
991
992    /// Whether the widget or any of its descendents can accept
993    /// the input focus.
994    ///
995    /// This property is meant to be set by widget implementations,
996    /// typically in their instance init function.
997    pub fn can_focus(self, can_focus: bool) -> Self {
998        Self {
999            builder: self.builder.property("can-focus", can_focus),
1000        }
1001    }
1002
1003    /// Whether the widget can receive pointer events.
1004    pub fn can_target(self, can_target: bool) -> Self {
1005        Self {
1006            builder: self.builder.property("can-target", can_target),
1007        }
1008    }
1009
1010    /// A list of css classes applied to this widget.
1011    pub fn css_classes(self, css_classes: impl Into<glib::StrV>) -> Self {
1012        Self {
1013            builder: self.builder.property("css-classes", css_classes.into()),
1014        }
1015    }
1016
1017    /// The name of this widget in the CSS tree.
1018    ///
1019    /// This property is meant to be set by widget implementations,
1020    /// typically in their instance init function.
1021    pub fn css_name(self, css_name: impl Into<glib::GString>) -> Self {
1022        Self {
1023            builder: self.builder.property("css-name", css_name.into()),
1024        }
1025    }
1026
1027    /// The cursor used by @widget.
1028    pub fn cursor(self, cursor: &gdk::Cursor) -> Self {
1029        Self {
1030            builder: self.builder.property("cursor", cursor.clone()),
1031        }
1032    }
1033
1034    /// Whether the widget should grab focus when it is clicked with the mouse.
1035    ///
1036    /// This property is only relevant for widgets that can take focus.
1037    pub fn focus_on_click(self, focus_on_click: bool) -> Self {
1038        Self {
1039            builder: self.builder.property("focus-on-click", focus_on_click),
1040        }
1041    }
1042
1043    /// Whether this widget itself will accept the input focus.
1044    pub fn focusable(self, focusable: bool) -> Self {
1045        Self {
1046            builder: self.builder.property("focusable", focusable),
1047        }
1048    }
1049
1050    /// How to distribute horizontal space if widget gets extra space.
1051    pub fn halign(self, halign: Align) -> Self {
1052        Self {
1053            builder: self.builder.property("halign", halign),
1054        }
1055    }
1056
1057    /// Enables or disables the emission of the [`query-tooltip`][struct@crate::Widget#query-tooltip]
1058    /// signal on @widget.
1059    ///
1060    /// A true value indicates that @widget can have a tooltip, in this case
1061    /// the widget will be queried using [`query-tooltip`][struct@crate::Widget#query-tooltip] to
1062    /// determine whether it will provide a tooltip or not.
1063    pub fn has_tooltip(self, has_tooltip: bool) -> Self {
1064        Self {
1065            builder: self.builder.property("has-tooltip", has_tooltip),
1066        }
1067    }
1068
1069    /// Overrides for height request of the widget.
1070    ///
1071    /// If this is -1, the natural request will be used.
1072    pub fn height_request(self, height_request: i32) -> Self {
1073        Self {
1074            builder: self.builder.property("height-request", height_request),
1075        }
1076    }
1077
1078    /// Whether to expand horizontally.
1079    pub fn hexpand(self, hexpand: bool) -> Self {
1080        Self {
1081            builder: self.builder.property("hexpand", hexpand),
1082        }
1083    }
1084
1085    /// Whether to use the `hexpand` property.
1086    pub fn hexpand_set(self, hexpand_set: bool) -> Self {
1087        Self {
1088            builder: self.builder.property("hexpand-set", hexpand_set),
1089        }
1090    }
1091
1092    /// The [`LayoutManager`][crate::LayoutManager] instance to use to compute
1093    /// the preferred size of the widget, and allocate its children.
1094    ///
1095    /// This property is meant to be set by widget implementations,
1096    /// typically in their instance init function.
1097    pub fn layout_manager(self, layout_manager: &impl IsA<LayoutManager>) -> Self {
1098        Self {
1099            builder: self
1100                .builder
1101                .property("layout-manager", layout_manager.clone().upcast()),
1102        }
1103    }
1104
1105    /// Makes this widget act like a modal dialog, with respect to
1106    /// event delivery.
1107    ///
1108    /// Global event controllers will not handle events with targets
1109    /// inside the widget, unless they are set up to ignore propagation
1110    /// limits. See [`EventControllerExt::set_propagation_limit()`][crate::prelude::EventControllerExt::set_propagation_limit()].
1111    #[cfg(feature = "v4_18")]
1112    #[cfg_attr(docsrs, doc(cfg(feature = "v4_18")))]
1113    pub fn limit_events(self, limit_events: bool) -> Self {
1114        Self {
1115            builder: self.builder.property("limit-events", limit_events),
1116        }
1117    }
1118
1119    /// Margin on bottom side of widget.
1120    ///
1121    /// This property adds margin outside of the widget's normal size
1122    /// request, the margin will be added in addition to the size from
1123    /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
1124    pub fn margin_bottom(self, margin_bottom: i32) -> Self {
1125        Self {
1126            builder: self.builder.property("margin-bottom", margin_bottom),
1127        }
1128    }
1129
1130    /// Margin on end of widget, horizontally.
1131    ///
1132    /// This property supports left-to-right and right-to-left text
1133    /// directions.
1134    ///
1135    /// This property adds margin outside of the widget's normal size
1136    /// request, the margin will be added in addition to the size from
1137    /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
1138    pub fn margin_end(self, margin_end: i32) -> Self {
1139        Self {
1140            builder: self.builder.property("margin-end", margin_end),
1141        }
1142    }
1143
1144    /// Margin on start of widget, horizontally.
1145    ///
1146    /// This property supports left-to-right and right-to-left text
1147    /// directions.
1148    ///
1149    /// This property adds margin outside of the widget's normal size
1150    /// request, the margin will be added in addition to the size from
1151    /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
1152    pub fn margin_start(self, margin_start: i32) -> Self {
1153        Self {
1154            builder: self.builder.property("margin-start", margin_start),
1155        }
1156    }
1157
1158    /// Margin on top side of widget.
1159    ///
1160    /// This property adds margin outside of the widget's normal size
1161    /// request, the margin will be added in addition to the size from
1162    /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
1163    pub fn margin_top(self, margin_top: i32) -> Self {
1164        Self {
1165            builder: self.builder.property("margin-top", margin_top),
1166        }
1167    }
1168
1169    /// The name of the widget.
1170    pub fn name(self, name: impl Into<glib::GString>) -> Self {
1171        Self {
1172            builder: self.builder.property("name", name.into()),
1173        }
1174    }
1175
1176    /// The requested opacity of the widget.
1177    pub fn opacity(self, opacity: f64) -> Self {
1178        Self {
1179            builder: self.builder.property("opacity", opacity),
1180        }
1181    }
1182
1183    /// How content outside the widget's content area is treated.
1184    ///
1185    /// This property is meant to be set by widget implementations,
1186    /// typically in their instance init function.
1187    pub fn overflow(self, overflow: Overflow) -> Self {
1188        Self {
1189            builder: self.builder.property("overflow", overflow),
1190        }
1191    }
1192
1193    /// Whether the widget will receive the default action when it is focused.
1194    pub fn receives_default(self, receives_default: bool) -> Self {
1195        Self {
1196            builder: self.builder.property("receives-default", receives_default),
1197        }
1198    }
1199
1200    /// Whether the widget responds to input.
1201    pub fn sensitive(self, sensitive: bool) -> Self {
1202        Self {
1203            builder: self.builder.property("sensitive", sensitive),
1204        }
1205    }
1206
1207    /// Sets the text of tooltip to be the given string, which is marked up
1208    /// with Pango markup.
1209    ///
1210    /// Also see [`Tooltip::set_markup()`][crate::Tooltip::set_markup()].
1211    ///
1212    /// This is a convenience property which will take care of getting the
1213    /// tooltip shown if the given string is not `NULL`:
1214    /// [`has-tooltip`][struct@crate::Widget#has-tooltip] will automatically be set to true
1215    /// and there will be taken care of [`query-tooltip`][struct@crate::Widget#query-tooltip] in
1216    /// the default signal handler.
1217    ///
1218    /// Note that if both [`tooltip-text`][struct@crate::Widget#tooltip-text] and
1219    /// [`tooltip-markup`][struct@crate::Widget#tooltip-markup] are set, the last one wins.
1220    pub fn tooltip_markup(self, tooltip_markup: impl Into<glib::GString>) -> Self {
1221        Self {
1222            builder: self
1223                .builder
1224                .property("tooltip-markup", tooltip_markup.into()),
1225        }
1226    }
1227
1228    /// Sets the text of tooltip to be the given string.
1229    ///
1230    /// Also see [`Tooltip::set_text()`][crate::Tooltip::set_text()].
1231    ///
1232    /// This is a convenience property which will take care of getting the
1233    /// tooltip shown if the given string is not `NULL`:
1234    /// [`has-tooltip`][struct@crate::Widget#has-tooltip] will automatically be set to true
1235    /// and there will be taken care of [`query-tooltip`][struct@crate::Widget#query-tooltip] in
1236    /// the default signal handler.
1237    ///
1238    /// Note that if both [`tooltip-text`][struct@crate::Widget#tooltip-text] and
1239    /// [`tooltip-markup`][struct@crate::Widget#tooltip-markup] are set, the last one wins.
1240    pub fn tooltip_text(self, tooltip_text: impl Into<glib::GString>) -> Self {
1241        Self {
1242            builder: self.builder.property("tooltip-text", tooltip_text.into()),
1243        }
1244    }
1245
1246    /// How to distribute vertical space if widget gets extra space.
1247    pub fn valign(self, valign: Align) -> Self {
1248        Self {
1249            builder: self.builder.property("valign", valign),
1250        }
1251    }
1252
1253    /// Whether to expand vertically.
1254    pub fn vexpand(self, vexpand: bool) -> Self {
1255        Self {
1256            builder: self.builder.property("vexpand", vexpand),
1257        }
1258    }
1259
1260    /// Whether to use the `vexpand` property.
1261    pub fn vexpand_set(self, vexpand_set: bool) -> Self {
1262        Self {
1263            builder: self.builder.property("vexpand-set", vexpand_set),
1264        }
1265    }
1266
1267    /// Whether the widget is visible.
1268    pub fn visible(self, visible: bool) -> Self {
1269        Self {
1270            builder: self.builder.property("visible", visible),
1271        }
1272    }
1273
1274    /// Overrides for width request of the widget.
1275    ///
1276    /// If this is -1, the natural request will be used.
1277    pub fn width_request(self, width_request: i32) -> Self {
1278        Self {
1279            builder: self.builder.property("width-request", width_request),
1280        }
1281    }
1282
1283    /// The accessible role of the given [`Accessible`][crate::Accessible] implementation.
1284    ///
1285    /// The accessible role cannot be changed once set.
1286    pub fn accessible_role(self, accessible_role: AccessibleRole) -> Self {
1287        Self {
1288            builder: self.builder.property("accessible-role", accessible_role),
1289        }
1290    }
1291
1292    /// Horizontal [`Adjustment`][crate::Adjustment] of the scrollable widget.
1293    ///
1294    /// This adjustment is shared between the scrollable widget and its parent.
1295    pub fn hadjustment(self, hadjustment: &impl IsA<Adjustment>) -> Self {
1296        Self {
1297            builder: self
1298                .builder
1299                .property("hadjustment", hadjustment.clone().upcast()),
1300        }
1301    }
1302
1303    /// Determines when horizontal scrolling should start.
1304    pub fn hscroll_policy(self, hscroll_policy: ScrollablePolicy) -> Self {
1305        Self {
1306            builder: self.builder.property("hscroll-policy", hscroll_policy),
1307        }
1308    }
1309
1310    /// Vertical [`Adjustment`][crate::Adjustment] of the scrollable widget.
1311    ///
1312    /// This adjustment is shared between the scrollable widget and its parent.
1313    pub fn vadjustment(self, vadjustment: &impl IsA<Adjustment>) -> Self {
1314        Self {
1315            builder: self
1316                .builder
1317                .property("vadjustment", vadjustment.clone().upcast()),
1318        }
1319    }
1320
1321    /// Determines when vertical scrolling should start.
1322    pub fn vscroll_policy(self, vscroll_policy: ScrollablePolicy) -> Self {
1323        Self {
1324            builder: self.builder.property("vscroll-policy", vscroll_policy),
1325        }
1326    }
1327
1328    // rustdoc-stripper-ignore-next
1329    /// Build the [`TreeView`].
1330    #[must_use = "Building the object from the builder is usually expensive and is not expected to have side effects"]
1331    pub fn build(self) -> TreeView {
1332        assert_initialized_main_thread!();
1333        self.builder.build()
1334    }
1335}
1336
1337mod sealed {
1338    pub trait Sealed {}
1339    impl<T: super::IsA<super::TreeView>> Sealed for T {}
1340}
1341
1342/// Trait containing all [`struct@TreeView`] methods.
1343///
1344/// # Implementors
1345///
1346/// [`TreeView`][struct@crate::TreeView]
1347pub trait TreeViewExt: IsA<TreeView> + sealed::Sealed + 'static {
1348    /// Appends @column to the list of columns. If @self has “fixed_height”
1349    /// mode enabled, then @column must have its “sizing” property set to be
1350    /// GTK_TREE_VIEW_COLUMN_FIXED.
1351    ///
1352    /// # Deprecated since 4.10
1353    ///
1354    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
1355    /// ## `column`
1356    /// The [`TreeViewColumn`][crate::TreeViewColumn] to add.
1357    ///
1358    /// # Returns
1359    ///
1360    /// The number of columns in @self after appending.
1361    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
1362    #[allow(deprecated)]
1363    #[doc(alias = "gtk_tree_view_append_column")]
1364    fn append_column(&self, column: &TreeViewColumn) -> i32 {
1365        unsafe {
1366            ffi::gtk_tree_view_append_column(
1367                self.as_ref().to_glib_none().0,
1368                column.to_glib_none().0,
1369            )
1370        }
1371    }
1372
1373    /// Recursively collapses all visible, expanded nodes in @self.
1374    ///
1375    /// # Deprecated since 4.10
1376    ///
1377    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
1378    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
1379    #[allow(deprecated)]
1380    #[doc(alias = "gtk_tree_view_collapse_all")]
1381    fn collapse_all(&self) {
1382        unsafe {
1383            ffi::gtk_tree_view_collapse_all(self.as_ref().to_glib_none().0);
1384        }
1385    }
1386
1387    /// Collapses a row (hides its child rows, if they exist).
1388    ///
1389    /// # Deprecated since 4.10
1390    ///
1391    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
1392    /// ## `path`
1393    /// path to a row in the @self
1394    ///
1395    /// # Returns
1396    ///
1397    /// [`true`] if the row was collapsed.
1398    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
1399    #[allow(deprecated)]
1400    #[doc(alias = "gtk_tree_view_collapse_row")]
1401    fn collapse_row(&self, path: &TreePath) -> bool {
1402        unsafe {
1403            from_glib(ffi::gtk_tree_view_collapse_row(
1404                self.as_ref().to_glib_none().0,
1405                mut_override(path.to_glib_none().0),
1406            ))
1407        }
1408    }
1409
1410    /// Resizes all columns to their optimal width. Only works after the
1411    /// treeview has been realized.
1412    ///
1413    /// # Deprecated since 4.10
1414    ///
1415    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
1416    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
1417    #[allow(deprecated)]
1418    #[doc(alias = "gtk_tree_view_columns_autosize")]
1419    fn columns_autosize(&self) {
1420        unsafe {
1421            ffi::gtk_tree_view_columns_autosize(self.as_ref().to_glib_none().0);
1422        }
1423    }
1424
1425    /// Converts bin_window coordinates to coordinates for the
1426    /// tree (the full scrollable area of the tree).
1427    ///
1428    /// # Deprecated since 4.10
1429    ///
1430    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
1431    /// ## `bx`
1432    /// X coordinate relative to bin_window
1433    /// ## `by`
1434    /// Y coordinate relative to bin_window
1435    ///
1436    /// # Returns
1437    ///
1438    ///
1439    /// ## `tx`
1440    /// return location for tree X coordinate
1441    ///
1442    /// ## `ty`
1443    /// return location for tree Y coordinate
1444    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
1445    #[allow(deprecated)]
1446    #[doc(alias = "gtk_tree_view_convert_bin_window_to_tree_coords")]
1447    fn convert_bin_window_to_tree_coords(&self, bx: i32, by: i32) -> (i32, i32) {
1448        unsafe {
1449            let mut tx = std::mem::MaybeUninit::uninit();
1450            let mut ty = std::mem::MaybeUninit::uninit();
1451            ffi::gtk_tree_view_convert_bin_window_to_tree_coords(
1452                self.as_ref().to_glib_none().0,
1453                bx,
1454                by,
1455                tx.as_mut_ptr(),
1456                ty.as_mut_ptr(),
1457            );
1458            (tx.assume_init(), ty.assume_init())
1459        }
1460    }
1461
1462    /// Converts bin_window coordinates to widget relative coordinates.
1463    ///
1464    /// # Deprecated since 4.10
1465    ///
1466    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
1467    /// ## `bx`
1468    /// bin_window X coordinate
1469    /// ## `by`
1470    /// bin_window Y coordinate
1471    ///
1472    /// # Returns
1473    ///
1474    ///
1475    /// ## `wx`
1476    /// return location for widget X coordinate
1477    ///
1478    /// ## `wy`
1479    /// return location for widget Y coordinate
1480    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
1481    #[allow(deprecated)]
1482    #[doc(alias = "gtk_tree_view_convert_bin_window_to_widget_coords")]
1483    fn convert_bin_window_to_widget_coords(&self, bx: i32, by: i32) -> (i32, i32) {
1484        unsafe {
1485            let mut wx = std::mem::MaybeUninit::uninit();
1486            let mut wy = std::mem::MaybeUninit::uninit();
1487            ffi::gtk_tree_view_convert_bin_window_to_widget_coords(
1488                self.as_ref().to_glib_none().0,
1489                bx,
1490                by,
1491                wx.as_mut_ptr(),
1492                wy.as_mut_ptr(),
1493            );
1494            (wx.assume_init(), wy.assume_init())
1495        }
1496    }
1497
1498    /// Converts tree coordinates (coordinates in full scrollable area of the tree)
1499    /// to bin_window coordinates.
1500    ///
1501    /// # Deprecated since 4.10
1502    ///
1503    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
1504    /// ## `tx`
1505    /// tree X coordinate
1506    /// ## `ty`
1507    /// tree Y coordinate
1508    ///
1509    /// # Returns
1510    ///
1511    ///
1512    /// ## `bx`
1513    /// return location for X coordinate relative to bin_window
1514    ///
1515    /// ## `by`
1516    /// return location for Y coordinate relative to bin_window
1517    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
1518    #[allow(deprecated)]
1519    #[doc(alias = "gtk_tree_view_convert_tree_to_bin_window_coords")]
1520    fn convert_tree_to_bin_window_coords(&self, tx: i32, ty: i32) -> (i32, i32) {
1521        unsafe {
1522            let mut bx = std::mem::MaybeUninit::uninit();
1523            let mut by = std::mem::MaybeUninit::uninit();
1524            ffi::gtk_tree_view_convert_tree_to_bin_window_coords(
1525                self.as_ref().to_glib_none().0,
1526                tx,
1527                ty,
1528                bx.as_mut_ptr(),
1529                by.as_mut_ptr(),
1530            );
1531            (bx.assume_init(), by.assume_init())
1532        }
1533    }
1534
1535    /// Converts tree coordinates (coordinates in full scrollable area of the tree)
1536    /// to widget coordinates.
1537    ///
1538    /// # Deprecated since 4.10
1539    ///
1540    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
1541    /// ## `tx`
1542    /// X coordinate relative to the tree
1543    /// ## `ty`
1544    /// Y coordinate relative to the tree
1545    ///
1546    /// # Returns
1547    ///
1548    ///
1549    /// ## `wx`
1550    /// return location for widget X coordinate
1551    ///
1552    /// ## `wy`
1553    /// return location for widget Y coordinate
1554    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
1555    #[allow(deprecated)]
1556    #[doc(alias = "gtk_tree_view_convert_tree_to_widget_coords")]
1557    fn convert_tree_to_widget_coords(&self, tx: i32, ty: i32) -> (i32, i32) {
1558        unsafe {
1559            let mut wx = std::mem::MaybeUninit::uninit();
1560            let mut wy = std::mem::MaybeUninit::uninit();
1561            ffi::gtk_tree_view_convert_tree_to_widget_coords(
1562                self.as_ref().to_glib_none().0,
1563                tx,
1564                ty,
1565                wx.as_mut_ptr(),
1566                wy.as_mut_ptr(),
1567            );
1568            (wx.assume_init(), wy.assume_init())
1569        }
1570    }
1571
1572    /// Converts widget coordinates to coordinates for the bin_window.
1573    ///
1574    /// # Deprecated since 4.10
1575    ///
1576    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
1577    /// ## `wx`
1578    /// X coordinate relative to the widget
1579    /// ## `wy`
1580    /// Y coordinate relative to the widget
1581    ///
1582    /// # Returns
1583    ///
1584    ///
1585    /// ## `bx`
1586    /// return location for bin_window X coordinate
1587    ///
1588    /// ## `by`
1589    /// return location for bin_window Y coordinate
1590    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
1591    #[allow(deprecated)]
1592    #[doc(alias = "gtk_tree_view_convert_widget_to_bin_window_coords")]
1593    fn convert_widget_to_bin_window_coords(&self, wx: i32, wy: i32) -> (i32, i32) {
1594        unsafe {
1595            let mut bx = std::mem::MaybeUninit::uninit();
1596            let mut by = std::mem::MaybeUninit::uninit();
1597            ffi::gtk_tree_view_convert_widget_to_bin_window_coords(
1598                self.as_ref().to_glib_none().0,
1599                wx,
1600                wy,
1601                bx.as_mut_ptr(),
1602                by.as_mut_ptr(),
1603            );
1604            (bx.assume_init(), by.assume_init())
1605        }
1606    }
1607
1608    /// Converts widget coordinates to coordinates for the
1609    /// tree (the full scrollable area of the tree).
1610    ///
1611    /// # Deprecated since 4.10
1612    ///
1613    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
1614    /// ## `wx`
1615    /// X coordinate relative to the widget
1616    /// ## `wy`
1617    /// Y coordinate relative to the widget
1618    ///
1619    /// # Returns
1620    ///
1621    ///
1622    /// ## `tx`
1623    /// return location for tree X coordinate
1624    ///
1625    /// ## `ty`
1626    /// return location for tree Y coordinate
1627    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
1628    #[allow(deprecated)]
1629    #[doc(alias = "gtk_tree_view_convert_widget_to_tree_coords")]
1630    fn convert_widget_to_tree_coords(&self, wx: i32, wy: i32) -> (i32, i32) {
1631        unsafe {
1632            let mut tx = std::mem::MaybeUninit::uninit();
1633            let mut ty = std::mem::MaybeUninit::uninit();
1634            ffi::gtk_tree_view_convert_widget_to_tree_coords(
1635                self.as_ref().to_glib_none().0,
1636                wx,
1637                wy,
1638                tx.as_mut_ptr(),
1639                ty.as_mut_ptr(),
1640            );
1641            (tx.assume_init(), ty.assume_init())
1642        }
1643    }
1644
1645    /// Creates a [`cairo::Surface`][crate::cairo::Surface] representation of the row at @path.
1646    /// This image is used for a drag icon.
1647    ///
1648    /// # Deprecated since 4.10
1649    ///
1650    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
1651    /// ## `path`
1652    /// a [`TreePath`][crate::TreePath] in @self
1653    ///
1654    /// # Returns
1655    ///
1656    /// a newly-allocated surface of the drag icon.
1657    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
1658    #[allow(deprecated)]
1659    #[doc(alias = "gtk_tree_view_create_row_drag_icon")]
1660    fn create_row_drag_icon(&self, path: &TreePath) -> Option<gdk::Paintable> {
1661        unsafe {
1662            from_glib_full(ffi::gtk_tree_view_create_row_drag_icon(
1663                self.as_ref().to_glib_none().0,
1664                mut_override(path.to_glib_none().0),
1665            ))
1666        }
1667    }
1668
1669    /// Turns @self into a drop destination for automatic DND. Calling
1670    /// this method sets [`TreeView`][crate::TreeView]:reorderable to [`false`].
1671    ///
1672    /// # Deprecated since 4.10
1673    ///
1674    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
1675    /// ## `formats`
1676    /// the target formats that the drag will support
1677    /// ## `actions`
1678    /// the bitmask of possible actions for a drag from this
1679    ///    widget
1680    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
1681    #[allow(deprecated)]
1682    #[doc(alias = "gtk_tree_view_enable_model_drag_dest")]
1683    fn enable_model_drag_dest(&self, formats: &gdk::ContentFormats, actions: gdk::DragAction) {
1684        unsafe {
1685            ffi::gtk_tree_view_enable_model_drag_dest(
1686                self.as_ref().to_glib_none().0,
1687                formats.to_glib_none().0,
1688                actions.into_glib(),
1689            );
1690        }
1691    }
1692
1693    /// Turns @self into a drag source for automatic DND. Calling this
1694    /// method sets [`TreeView`][crate::TreeView]:reorderable to [`false`].
1695    ///
1696    /// # Deprecated since 4.10
1697    ///
1698    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
1699    /// ## `start_button_mask`
1700    /// Mask of allowed buttons to start drag
1701    /// ## `formats`
1702    /// the target formats that the drag will support
1703    /// ## `actions`
1704    /// the bitmask of possible actions for a drag from this
1705    ///    widget
1706    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
1707    #[allow(deprecated)]
1708    #[doc(alias = "gtk_tree_view_enable_model_drag_source")]
1709    fn enable_model_drag_source(
1710        &self,
1711        start_button_mask: gdk::ModifierType,
1712        formats: &gdk::ContentFormats,
1713        actions: gdk::DragAction,
1714    ) {
1715        unsafe {
1716            ffi::gtk_tree_view_enable_model_drag_source(
1717                self.as_ref().to_glib_none().0,
1718                start_button_mask.into_glib(),
1719                formats.to_glib_none().0,
1720                actions.into_glib(),
1721            );
1722        }
1723    }
1724
1725    /// Recursively expands all nodes in the @self.
1726    ///
1727    /// # Deprecated since 4.10
1728    ///
1729    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
1730    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
1731    #[allow(deprecated)]
1732    #[doc(alias = "gtk_tree_view_expand_all")]
1733    fn expand_all(&self) {
1734        unsafe {
1735            ffi::gtk_tree_view_expand_all(self.as_ref().to_glib_none().0);
1736        }
1737    }
1738
1739    /// Opens the row so its children are visible.
1740    ///
1741    /// # Deprecated since 4.10
1742    ///
1743    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
1744    /// ## `path`
1745    /// path to a row
1746    /// ## `open_all`
1747    /// whether to recursively expand, or just expand immediate children
1748    ///
1749    /// # Returns
1750    ///
1751    /// [`true`] if the row existed and had children
1752    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
1753    #[allow(deprecated)]
1754    #[doc(alias = "gtk_tree_view_expand_row")]
1755    fn expand_row(&self, path: &TreePath, open_all: bool) -> bool {
1756        unsafe {
1757            from_glib(ffi::gtk_tree_view_expand_row(
1758                self.as_ref().to_glib_none().0,
1759                mut_override(path.to_glib_none().0),
1760                open_all.into_glib(),
1761            ))
1762        }
1763    }
1764
1765    /// Expands the row at @path. This will also expand all parent rows of
1766    /// @path as necessary.
1767    ///
1768    /// # Deprecated since 4.10
1769    ///
1770    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
1771    /// ## `path`
1772    /// path to a row.
1773    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
1774    #[allow(deprecated)]
1775    #[doc(alias = "gtk_tree_view_expand_to_path")]
1776    fn expand_to_path(&self, path: &TreePath) {
1777        unsafe {
1778            ffi::gtk_tree_view_expand_to_path(
1779                self.as_ref().to_glib_none().0,
1780                mut_override(path.to_glib_none().0),
1781            );
1782        }
1783    }
1784
1785    /// Gets the setting set by gtk_tree_view_set_activate_on_single_click().
1786    ///
1787    /// # Deprecated since 4.10
1788    ///
1789    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
1790    ///
1791    /// # Returns
1792    ///
1793    /// [`true`] if row-activated will be emitted on a single click
1794    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
1795    #[allow(deprecated)]
1796    #[doc(alias = "gtk_tree_view_get_activate_on_single_click")]
1797    #[doc(alias = "get_activate_on_single_click")]
1798    #[doc(alias = "activate-on-single-click")]
1799    fn activates_on_single_click(&self) -> bool {
1800        unsafe {
1801            from_glib(ffi::gtk_tree_view_get_activate_on_single_click(
1802                self.as_ref().to_glib_none().0,
1803            ))
1804        }
1805    }
1806
1807    /// Fills the bounding rectangle in bin_window coordinates for the cell at the
1808    /// row specified by @path and the column specified by @column.  If @path is
1809    /// [`None`], or points to a node not found in the tree, the @y and @height fields of
1810    /// the rectangle will be filled with 0. If @column is [`None`], the @x and @width
1811    /// fields will be filled with 0.  The returned rectangle is equivalent to the
1812    /// @background_area passed to gtk_cell_renderer_render().  These background
1813    /// areas tile to cover the entire bin window.  Contrast with the @cell_area,
1814    /// returned by gtk_tree_view_get_cell_area(), which returns only the cell
1815    /// itself, excluding surrounding borders and the tree expander area.
1816    ///
1817    /// # Deprecated since 4.10
1818    ///
1819    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
1820    /// ## `path`
1821    /// a [`TreePath`][crate::TreePath] for the row, or [`None`] to get only horizontal coordinates
1822    /// ## `column`
1823    /// a [`TreeViewColumn`][crate::TreeViewColumn] for the column, or [`None`] to get only vertical coordinates
1824    ///
1825    /// # Returns
1826    ///
1827    ///
1828    /// ## `rect`
1829    /// rectangle to fill with cell background rect
1830    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
1831    #[allow(deprecated)]
1832    #[doc(alias = "gtk_tree_view_get_background_area")]
1833    #[doc(alias = "get_background_area")]
1834    fn background_area(
1835        &self,
1836        path: Option<&TreePath>,
1837        column: Option<&TreeViewColumn>,
1838    ) -> gdk::Rectangle {
1839        unsafe {
1840            let mut rect = gdk::Rectangle::uninitialized();
1841            ffi::gtk_tree_view_get_background_area(
1842                self.as_ref().to_glib_none().0,
1843                mut_override(path.to_glib_none().0),
1844                column.to_glib_none().0,
1845                rect.to_glib_none_mut().0,
1846            );
1847            rect
1848        }
1849    }
1850
1851    /// Fills the bounding rectangle in bin_window coordinates for the cell at the
1852    /// row specified by @path and the column specified by @column.  If @path is
1853    /// [`None`], or points to a path not currently displayed, the @y and @height fields
1854    /// of the rectangle will be filled with 0. If @column is [`None`], the @x and @width
1855    /// fields will be filled with 0.  The sum of all cell rects does not cover the
1856    /// entire tree; there are extra pixels in between rows, for example. The
1857    /// returned rectangle is equivalent to the @cell_area passed to
1858    /// gtk_cell_renderer_render().  This function is only valid if @self is
1859    /// realized.
1860    ///
1861    /// # Deprecated since 4.10
1862    ///
1863    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
1864    /// ## `path`
1865    /// a [`TreePath`][crate::TreePath] for the row, or [`None`] to get only horizontal coordinates
1866    /// ## `column`
1867    /// a [`TreeViewColumn`][crate::TreeViewColumn] for the column, or [`None`] to get only vertical coordinates
1868    ///
1869    /// # Returns
1870    ///
1871    ///
1872    /// ## `rect`
1873    /// rectangle to fill with cell rect
1874    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
1875    #[allow(deprecated)]
1876    #[doc(alias = "gtk_tree_view_get_cell_area")]
1877    #[doc(alias = "get_cell_area")]
1878    fn cell_area(
1879        &self,
1880        path: Option<&TreePath>,
1881        column: Option<&TreeViewColumn>,
1882    ) -> gdk::Rectangle {
1883        unsafe {
1884            let mut rect = gdk::Rectangle::uninitialized();
1885            ffi::gtk_tree_view_get_cell_area(
1886                self.as_ref().to_glib_none().0,
1887                mut_override(path.to_glib_none().0),
1888                column.to_glib_none().0,
1889                rect.to_glib_none_mut().0,
1890            );
1891            rect
1892        }
1893    }
1894
1895    /// Gets the [`TreeViewColumn`][crate::TreeViewColumn] at the given position in the #tree_view.
1896    ///
1897    /// # Deprecated since 4.10
1898    ///
1899    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
1900    /// ## `n`
1901    /// The position of the column, counting from 0.
1902    ///
1903    /// # Returns
1904    ///
1905    /// The [`TreeViewColumn`][crate::TreeViewColumn], or [`None`] if the
1906    /// position is outside the range of columns.
1907    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
1908    #[allow(deprecated)]
1909    #[doc(alias = "gtk_tree_view_get_column")]
1910    #[doc(alias = "get_column")]
1911    fn column(&self, n: i32) -> Option<TreeViewColumn> {
1912        unsafe {
1913            from_glib_none(ffi::gtk_tree_view_get_column(
1914                self.as_ref().to_glib_none().0,
1915                n,
1916            ))
1917        }
1918    }
1919
1920    /// Returns a `GList` of all the [`TreeViewColumn`][crate::TreeViewColumn]s currently in @self.
1921    /// The returned list must be freed with g_list_free ().
1922    ///
1923    /// # Deprecated since 4.10
1924    ///
1925    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
1926    ///
1927    /// # Returns
1928    ///
1929    /// A list of [`TreeViewColumn`][crate::TreeViewColumn]s
1930    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
1931    #[allow(deprecated)]
1932    #[doc(alias = "gtk_tree_view_get_columns")]
1933    #[doc(alias = "get_columns")]
1934    fn columns(&self) -> Vec<TreeViewColumn> {
1935        unsafe {
1936            FromGlibPtrContainer::from_glib_container(ffi::gtk_tree_view_get_columns(
1937                self.as_ref().to_glib_none().0,
1938            ))
1939        }
1940    }
1941
1942    /// Fills in @path and @focus_column with the current path and focus column.  If
1943    /// the cursor isn’t currently set, then *@path will be [`None`].  If no column
1944    /// currently has focus, then *@focus_column will be [`None`].
1945    ///
1946    /// The returned [`TreePath`][crate::TreePath] must be freed with gtk_tree_path_free() when
1947    /// you are done with it.
1948    ///
1949    /// # Deprecated since 4.10
1950    ///
1951    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
1952    ///
1953    /// # Returns
1954    ///
1955    ///
1956    /// ## `path`
1957    /// A pointer to be
1958    ///   filled with the current cursor path
1959    ///
1960    /// ## `focus_column`
1961    /// A
1962    ///   pointer to be filled with the current focus column
1963    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
1964    #[allow(deprecated)]
1965    #[doc(alias = "gtk_tree_view_get_cursor")]
1966    #[doc(alias = "get_cursor")]
1967    fn cursor(&self) -> (Option<TreePath>, Option<TreeViewColumn>) {
1968        unsafe {
1969            let mut path = std::ptr::null_mut();
1970            let mut focus_column = std::ptr::null_mut();
1971            ffi::gtk_tree_view_get_cursor(
1972                self.as_ref().to_glib_none().0,
1973                &mut path,
1974                &mut focus_column,
1975            );
1976            (from_glib_full(path), from_glib_none(focus_column))
1977        }
1978    }
1979
1980    /// Determines the destination row for a given position.  @drag_x and
1981    /// @drag_y are expected to be in widget coordinates.  This function is only
1982    /// meaningful if @self is realized.  Therefore this function will always
1983    /// return [`false`] if @self is not realized or does not have a model.
1984    ///
1985    /// # Deprecated since 4.10
1986    ///
1987    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
1988    /// ## `drag_x`
1989    /// the position to determine the destination row for
1990    /// ## `drag_y`
1991    /// the position to determine the destination row for
1992    ///
1993    /// # Returns
1994    ///
1995    /// whether there is a row at the given position, [`true`] if this
1996    /// is indeed the case.
1997    ///
1998    /// ## `path`
1999    /// Return location for the path of
2000    ///   the highlighted row
2001    ///
2002    /// ## `pos`
2003    /// Return location for the drop position, or
2004    ///   [`None`]
2005    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
2006    #[allow(deprecated)]
2007    #[doc(alias = "gtk_tree_view_get_dest_row_at_pos")]
2008    #[doc(alias = "get_dest_row_at_pos")]
2009    fn dest_row_at_pos(
2010        &self,
2011        drag_x: i32,
2012        drag_y: i32,
2013    ) -> Option<(Option<TreePath>, TreeViewDropPosition)> {
2014        unsafe {
2015            let mut path = std::ptr::null_mut();
2016            let mut pos = std::mem::MaybeUninit::uninit();
2017            let ret = from_glib(ffi::gtk_tree_view_get_dest_row_at_pos(
2018                self.as_ref().to_glib_none().0,
2019                drag_x,
2020                drag_y,
2021                &mut path,
2022                pos.as_mut_ptr(),
2023            ));
2024            if ret {
2025                Some((from_glib_full(path), from_glib(pos.assume_init())))
2026            } else {
2027                None
2028            }
2029        }
2030    }
2031
2032    /// Gets information about the row that is highlighted for feedback.
2033    ///
2034    /// # Deprecated since 4.10
2035    ///
2036    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
2037    ///
2038    /// # Returns
2039    ///
2040    ///
2041    /// ## `path`
2042    /// Return location for the path of the highlighted row
2043    ///
2044    /// ## `pos`
2045    /// Return location for the drop position
2046    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
2047    #[allow(deprecated)]
2048    #[doc(alias = "gtk_tree_view_get_drag_dest_row")]
2049    #[doc(alias = "get_drag_dest_row")]
2050    fn drag_dest_row(&self) -> (Option<TreePath>, TreeViewDropPosition) {
2051        unsafe {
2052            let mut path = std::ptr::null_mut();
2053            let mut pos = std::mem::MaybeUninit::uninit();
2054            ffi::gtk_tree_view_get_drag_dest_row(
2055                self.as_ref().to_glib_none().0,
2056                &mut path,
2057                pos.as_mut_ptr(),
2058            );
2059            (from_glib_full(path), from_glib(pos.assume_init()))
2060        }
2061    }
2062
2063    /// Returns whether or not the tree allows to start interactive searching
2064    /// by typing in text.
2065    ///
2066    /// # Deprecated since 4.10
2067    ///
2068    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
2069    ///
2070    /// # Returns
2071    ///
2072    /// whether or not to let the user search interactively
2073    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
2074    #[allow(deprecated)]
2075    #[doc(alias = "gtk_tree_view_get_enable_search")]
2076    #[doc(alias = "get_enable_search")]
2077    #[doc(alias = "enable-search")]
2078    fn enables_search(&self) -> bool {
2079        unsafe {
2080            from_glib(ffi::gtk_tree_view_get_enable_search(
2081                self.as_ref().to_glib_none().0,
2082            ))
2083        }
2084    }
2085
2086    /// Returns whether or not tree lines are drawn in @self.
2087    ///
2088    /// # Deprecated since 4.10
2089    ///
2090    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
2091    ///
2092    /// # Returns
2093    ///
2094    /// [`true`] if tree lines are drawn in @self, [`false`]
2095    /// otherwise.
2096    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
2097    #[allow(deprecated)]
2098    #[doc(alias = "gtk_tree_view_get_enable_tree_lines")]
2099    #[doc(alias = "get_enable_tree_lines")]
2100    #[doc(alias = "enable-tree-lines")]
2101    fn enables_tree_lines(&self) -> bool {
2102        unsafe {
2103            from_glib(ffi::gtk_tree_view_get_enable_tree_lines(
2104                self.as_ref().to_glib_none().0,
2105            ))
2106        }
2107    }
2108
2109    /// Returns the column that is the current expander column,
2110    /// or [`None`] if none has been set.
2111    /// This column has the expander arrow drawn next to it.
2112    ///
2113    /// # Deprecated since 4.10
2114    ///
2115    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
2116    ///
2117    /// # Returns
2118    ///
2119    /// The expander column.
2120    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
2121    #[allow(deprecated)]
2122    #[doc(alias = "gtk_tree_view_get_expander_column")]
2123    #[doc(alias = "get_expander_column")]
2124    #[doc(alias = "expander-column")]
2125    fn expander_column(&self) -> Option<TreeViewColumn> {
2126        unsafe {
2127            from_glib_none(ffi::gtk_tree_view_get_expander_column(
2128                self.as_ref().to_glib_none().0,
2129            ))
2130        }
2131    }
2132
2133    /// Returns whether fixed height mode is turned on for @self.
2134    ///
2135    /// # Deprecated since 4.10
2136    ///
2137    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
2138    ///
2139    /// # Returns
2140    ///
2141    /// [`true`] if @self is in fixed height mode
2142    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
2143    #[allow(deprecated)]
2144    #[doc(alias = "gtk_tree_view_get_fixed_height_mode")]
2145    #[doc(alias = "get_fixed_height_mode")]
2146    #[doc(alias = "fixed-height-mode")]
2147    fn is_fixed_height_mode(&self) -> bool {
2148        unsafe {
2149            from_glib(ffi::gtk_tree_view_get_fixed_height_mode(
2150                self.as_ref().to_glib_none().0,
2151            ))
2152        }
2153    }
2154
2155    /// Returns which grid lines are enabled in @self.
2156    ///
2157    /// # Deprecated since 4.10
2158    ///
2159    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
2160    ///
2161    /// # Returns
2162    ///
2163    /// a [`TreeView`][crate::TreeView]GridLines value indicating which grid lines
2164    /// are enabled.
2165    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
2166    #[allow(deprecated)]
2167    #[doc(alias = "gtk_tree_view_get_grid_lines")]
2168    #[doc(alias = "get_grid_lines")]
2169    fn grid_lines(&self) -> TreeViewGridLines {
2170        unsafe {
2171            from_glib(ffi::gtk_tree_view_get_grid_lines(
2172                self.as_ref().to_glib_none().0,
2173            ))
2174        }
2175    }
2176
2177    /// Returns whether all header columns are clickable.
2178    ///
2179    /// # Deprecated since 4.10
2180    ///
2181    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
2182    ///
2183    /// # Returns
2184    ///
2185    /// [`true`] if all header columns are clickable, otherwise [`false`]
2186    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
2187    #[allow(deprecated)]
2188    #[doc(alias = "gtk_tree_view_get_headers_clickable")]
2189    #[doc(alias = "get_headers_clickable")]
2190    #[doc(alias = "headers-clickable")]
2191    fn is_headers_clickable(&self) -> bool {
2192        unsafe {
2193            from_glib(ffi::gtk_tree_view_get_headers_clickable(
2194                self.as_ref().to_glib_none().0,
2195            ))
2196        }
2197    }
2198
2199    /// Returns [`true`] if the headers on the @self are visible.
2200    ///
2201    /// # Deprecated since 4.10
2202    ///
2203    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
2204    ///
2205    /// # Returns
2206    ///
2207    /// Whether the headers are visible or not.
2208    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
2209    #[allow(deprecated)]
2210    #[doc(alias = "gtk_tree_view_get_headers_visible")]
2211    #[doc(alias = "get_headers_visible")]
2212    #[doc(alias = "headers-visible")]
2213    fn is_headers_visible(&self) -> bool {
2214        unsafe {
2215            from_glib(ffi::gtk_tree_view_get_headers_visible(
2216                self.as_ref().to_glib_none().0,
2217            ))
2218        }
2219    }
2220
2221    /// Returns whether hover expansion mode is turned on for @self.
2222    ///
2223    /// # Deprecated since 4.10
2224    ///
2225    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
2226    ///
2227    /// # Returns
2228    ///
2229    /// [`true`] if @self is in hover expansion mode
2230    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
2231    #[allow(deprecated)]
2232    #[doc(alias = "gtk_tree_view_get_hover_expand")]
2233    #[doc(alias = "get_hover_expand")]
2234    #[doc(alias = "hover-expand")]
2235    fn hover_expands(&self) -> bool {
2236        unsafe {
2237            from_glib(ffi::gtk_tree_view_get_hover_expand(
2238                self.as_ref().to_glib_none().0,
2239            ))
2240        }
2241    }
2242
2243    /// Returns whether hover selection mode is turned on for @self.
2244    ///
2245    /// # Deprecated since 4.10
2246    ///
2247    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
2248    ///
2249    /// # Returns
2250    ///
2251    /// [`true`] if @self is in hover selection mode
2252    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
2253    #[allow(deprecated)]
2254    #[doc(alias = "gtk_tree_view_get_hover_selection")]
2255    #[doc(alias = "get_hover_selection")]
2256    #[doc(alias = "hover-selection")]
2257    fn is_hover_selection(&self) -> bool {
2258        unsafe {
2259            from_glib(ffi::gtk_tree_view_get_hover_selection(
2260                self.as_ref().to_glib_none().0,
2261            ))
2262        }
2263    }
2264
2265    /// Returns the amount, in pixels, of extra indentation for child levels
2266    /// in @self.
2267    ///
2268    /// # Deprecated since 4.10
2269    ///
2270    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
2271    ///
2272    /// # Returns
2273    ///
2274    /// the amount of extra indentation for child levels in
2275    /// @self.  A return value of 0 means that this feature is disabled.
2276    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
2277    #[allow(deprecated)]
2278    #[doc(alias = "gtk_tree_view_get_level_indentation")]
2279    #[doc(alias = "get_level_indentation")]
2280    #[doc(alias = "level-indentation")]
2281    fn level_indentation(&self) -> i32 {
2282        unsafe { ffi::gtk_tree_view_get_level_indentation(self.as_ref().to_glib_none().0) }
2283    }
2284
2285    /// Returns the model the [`TreeView`][crate::TreeView] is based on.  Returns [`None`] if the
2286    /// model is unset.
2287    ///
2288    /// # Deprecated since 4.10
2289    ///
2290    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
2291    ///
2292    /// # Returns
2293    ///
2294    /// A [`TreeModel`][crate::TreeModel]
2295    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
2296    #[allow(deprecated)]
2297    #[doc(alias = "gtk_tree_view_get_model")]
2298    #[doc(alias = "get_model")]
2299    fn model(&self) -> Option<TreeModel> {
2300        unsafe { from_glib_none(ffi::gtk_tree_view_get_model(self.as_ref().to_glib_none().0)) }
2301    }
2302
2303    /// Queries the number of columns in the given @self.
2304    ///
2305    /// # Deprecated since 4.10
2306    ///
2307    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
2308    ///
2309    /// # Returns
2310    ///
2311    /// The number of columns in the @self
2312    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
2313    #[allow(deprecated)]
2314    #[doc(alias = "gtk_tree_view_get_n_columns")]
2315    #[doc(alias = "get_n_columns")]
2316    fn n_columns(&self) -> u32 {
2317        unsafe { ffi::gtk_tree_view_get_n_columns(self.as_ref().to_glib_none().0) }
2318    }
2319
2320    /// Finds the path at the point (@x, @y), relative to bin_window coordinates.
2321    /// That is, @x and @y are relative to an events coordinates. Widget-relative
2322    /// coordinates must be converted using
2323    /// gtk_tree_view_convert_widget_to_bin_window_coords(). It is primarily for
2324    /// things like popup menus. If @path is non-[`None`], then it will be filled
2325    /// with the [`TreePath`][crate::TreePath] at that point.  This path should be freed with
2326    /// gtk_tree_path_free().  If @column is non-[`None`], then it will be filled
2327    /// with the column at that point.  @cell_x and @cell_y return the coordinates
2328    /// relative to the cell background (i.e. the @background_area passed to
2329    /// gtk_cell_renderer_render()).  This function is only meaningful if
2330    /// @self is realized.  Therefore this function will always return [`false`]
2331    /// if @self is not realized or does not have a model.
2332    ///
2333    /// For converting widget coordinates (eg. the ones you get from
2334    /// GtkWidget::query-tooltip), please see
2335    /// gtk_tree_view_convert_widget_to_bin_window_coords().
2336    ///
2337    /// # Deprecated since 4.10
2338    ///
2339    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
2340    /// ## `x`
2341    /// The x position to be identified (relative to bin_window).
2342    /// ## `y`
2343    /// The y position to be identified (relative to bin_window).
2344    ///
2345    /// # Returns
2346    ///
2347    /// [`true`] if a row exists at that coordinate.
2348    ///
2349    /// ## `path`
2350    /// A pointer to a [`TreePath`][crate::TreePath]
2351    ///   pointer to be filled in
2352    ///
2353    /// ## `column`
2354    /// A pointer to
2355    ///   a [`TreeViewColumn`][crate::TreeViewColumn] pointer to be filled in
2356    ///
2357    /// ## `cell_x`
2358    /// A pointer where the X coordinate
2359    ///   relative to the cell can be placed
2360    ///
2361    /// ## `cell_y`
2362    /// A pointer where the Y coordinate
2363    ///   relative to the cell can be placed
2364    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
2365    #[allow(deprecated)]
2366    #[doc(alias = "gtk_tree_view_get_path_at_pos")]
2367    #[doc(alias = "get_path_at_pos")]
2368    fn path_at_pos(
2369        &self,
2370        x: i32,
2371        y: i32,
2372    ) -> Option<(Option<TreePath>, Option<TreeViewColumn>, i32, i32)> {
2373        unsafe {
2374            let mut path = std::ptr::null_mut();
2375            let mut column = std::ptr::null_mut();
2376            let mut cell_x = std::mem::MaybeUninit::uninit();
2377            let mut cell_y = std::mem::MaybeUninit::uninit();
2378            let ret = from_glib(ffi::gtk_tree_view_get_path_at_pos(
2379                self.as_ref().to_glib_none().0,
2380                x,
2381                y,
2382                &mut path,
2383                &mut column,
2384                cell_x.as_mut_ptr(),
2385                cell_y.as_mut_ptr(),
2386            ));
2387            if ret {
2388                Some((
2389                    from_glib_full(path),
2390                    from_glib_none(column),
2391                    cell_x.assume_init(),
2392                    cell_y.assume_init(),
2393                ))
2394            } else {
2395                None
2396            }
2397        }
2398    }
2399
2400    /// Retrieves whether the user can reorder the tree via drag-and-drop. See
2401    /// gtk_tree_view_set_reorderable().
2402    ///
2403    /// # Deprecated since 4.10
2404    ///
2405    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
2406    ///
2407    /// # Returns
2408    ///
2409    /// [`true`] if the tree can be reordered.
2410    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
2411    #[allow(deprecated)]
2412    #[doc(alias = "gtk_tree_view_get_reorderable")]
2413    #[doc(alias = "get_reorderable")]
2414    #[doc(alias = "reorderable")]
2415    fn is_reorderable(&self) -> bool {
2416        unsafe {
2417            from_glib(ffi::gtk_tree_view_get_reorderable(
2418                self.as_ref().to_glib_none().0,
2419            ))
2420        }
2421    }
2422
2423    /// Returns whether rubber banding is turned on for @self.  If the
2424    /// selection mode is [`SelectionMode::Multiple`][crate::SelectionMode::Multiple], rubber banding will allow the
2425    /// user to select multiple rows by dragging the mouse.
2426    ///
2427    /// # Deprecated since 4.10
2428    ///
2429    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
2430    ///
2431    /// # Returns
2432    ///
2433    /// [`true`] if rubber banding in @self is enabled.
2434    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
2435    #[allow(deprecated)]
2436    #[doc(alias = "gtk_tree_view_get_rubber_banding")]
2437    #[doc(alias = "get_rubber_banding")]
2438    #[doc(alias = "rubber-banding")]
2439    fn is_rubber_banding(&self) -> bool {
2440        unsafe {
2441            from_glib(ffi::gtk_tree_view_get_rubber_banding(
2442                self.as_ref().to_glib_none().0,
2443            ))
2444        }
2445    }
2446
2447    /// Gets the column searched on by the interactive search code.
2448    ///
2449    /// # Deprecated since 4.10
2450    ///
2451    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
2452    ///
2453    /// # Returns
2454    ///
2455    /// the column the interactive search code searches in.
2456    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
2457    #[allow(deprecated)]
2458    #[doc(alias = "gtk_tree_view_get_search_column")]
2459    #[doc(alias = "get_search_column")]
2460    #[doc(alias = "search-column")]
2461    fn search_column(&self) -> i32 {
2462        unsafe { ffi::gtk_tree_view_get_search_column(self.as_ref().to_glib_none().0) }
2463    }
2464
2465    /// Returns the [`Entry`][crate::Entry] which is currently in use as interactive search
2466    /// entry for @self.  In case the built-in entry is being used, [`None`]
2467    /// will be returned.
2468    ///
2469    /// # Deprecated since 4.10
2470    ///
2471    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
2472    ///
2473    /// # Returns
2474    ///
2475    /// the entry currently in use as search entry.
2476    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
2477    #[allow(deprecated)]
2478    #[doc(alias = "gtk_tree_view_get_search_entry")]
2479    #[doc(alias = "get_search_entry")]
2480    fn search_entry(&self) -> Option<Editable> {
2481        unsafe {
2482            from_glib_none(ffi::gtk_tree_view_get_search_entry(
2483                self.as_ref().to_glib_none().0,
2484            ))
2485        }
2486    }
2487
2488    /// Gets the [`TreeSelection`][crate::TreeSelection] associated with @self.
2489    ///
2490    /// # Deprecated since 4.10
2491    ///
2492    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
2493    ///
2494    /// # Returns
2495    ///
2496    /// A [`TreeSelection`][crate::TreeSelection] object.
2497    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
2498    #[allow(deprecated)]
2499    #[doc(alias = "gtk_tree_view_get_selection")]
2500    #[doc(alias = "get_selection")]
2501    fn selection(&self) -> TreeSelection {
2502        unsafe {
2503            from_glib_none(ffi::gtk_tree_view_get_selection(
2504                self.as_ref().to_glib_none().0,
2505            ))
2506        }
2507    }
2508
2509    /// Returns whether or not expanders are drawn in @self.
2510    ///
2511    /// # Deprecated since 4.10
2512    ///
2513    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
2514    ///
2515    /// # Returns
2516    ///
2517    /// [`true`] if expanders are drawn in @self, [`false`]
2518    /// otherwise.
2519    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
2520    #[allow(deprecated)]
2521    #[doc(alias = "gtk_tree_view_get_show_expanders")]
2522    #[doc(alias = "get_show_expanders")]
2523    #[doc(alias = "show-expanders")]
2524    fn shows_expanders(&self) -> bool {
2525        unsafe {
2526            from_glib(ffi::gtk_tree_view_get_show_expanders(
2527                self.as_ref().to_glib_none().0,
2528            ))
2529        }
2530    }
2531
2532    /// Returns the column of @self’s model which is being used for
2533    /// displaying tooltips on @self’s rows.
2534    ///
2535    /// # Deprecated since 4.10
2536    ///
2537    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
2538    ///
2539    /// # Returns
2540    ///
2541    /// the index of the tooltip column that is currently being
2542    /// used, or -1 if this is disabled.
2543    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
2544    #[allow(deprecated)]
2545    #[doc(alias = "gtk_tree_view_get_tooltip_column")]
2546    #[doc(alias = "get_tooltip_column")]
2547    #[doc(alias = "tooltip-column")]
2548    fn tooltip_column(&self) -> i32 {
2549        unsafe { ffi::gtk_tree_view_get_tooltip_column(self.as_ref().to_glib_none().0) }
2550    }
2551
2552    /// This function is supposed to be used in a ::query-tooltip
2553    /// signal handler for [`TreeView`][crate::TreeView]. The @x, @y and @keyboard_tip values
2554    /// which are received in the signal handler, should be passed to this
2555    /// function without modification.
2556    ///
2557    /// The return value indicates whether there is a tree view row at the given
2558    /// coordinates ([`true`]) or not ([`false`]) for mouse tooltips. For keyboard
2559    /// tooltips the row returned will be the cursor row. When [`true`], then any of
2560    /// @model, @path and @iter which have been provided will be set to point to
2561    /// that row and the corresponding model. @x and @y will always be converted
2562    /// to be relative to @self’s bin_window if @keyboard_tooltip is [`false`].
2563    ///
2564    /// # Deprecated since 4.10
2565    ///
2566    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
2567    /// ## `x`
2568    /// the x coordinate (relative to widget coordinates)
2569    /// ## `y`
2570    /// the y coordinate (relative to widget coordinates)
2571    /// ## `keyboard_tip`
2572    /// whether this is a keyboard tooltip or not
2573    ///
2574    /// # Returns
2575    ///
2576    /// whether or not the given tooltip context points to a row
2577    ///
2578    /// ## `model`
2579    /// a pointer to
2580    ///   receive a [`TreeModel`][crate::TreeModel]
2581    ///
2582    /// ## `path`
2583    /// a pointer to receive a [`TreePath`][crate::TreePath]
2584    ///
2585    /// ## `iter`
2586    /// a pointer to receive a [`TreeIter`][crate::TreeIter]
2587    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
2588    #[allow(deprecated)]
2589    #[doc(alias = "gtk_tree_view_get_tooltip_context")]
2590    #[doc(alias = "get_tooltip_context")]
2591    fn tooltip_context(
2592        &self,
2593        x: i32,
2594        y: i32,
2595        keyboard_tip: bool,
2596    ) -> Option<(Option<TreeModel>, TreePath, TreeIter)> {
2597        unsafe {
2598            let mut model = std::ptr::null_mut();
2599            let mut path = std::ptr::null_mut();
2600            let mut iter = TreeIter::uninitialized();
2601            let ret = from_glib(ffi::gtk_tree_view_get_tooltip_context(
2602                self.as_ref().to_glib_none().0,
2603                x,
2604                y,
2605                keyboard_tip.into_glib(),
2606                &mut model,
2607                &mut path,
2608                iter.to_glib_none_mut().0,
2609            ));
2610            if ret {
2611                Some((from_glib_none(model), from_glib_full(path), iter))
2612            } else {
2613                None
2614            }
2615        }
2616    }
2617
2618    /// Sets @start_path and @end_path to be the first and last visible path.
2619    /// Note that there may be invisible paths in between.
2620    ///
2621    /// The paths should be freed with gtk_tree_path_free() after use.
2622    ///
2623    /// # Deprecated since 4.10
2624    ///
2625    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
2626    ///
2627    /// # Returns
2628    ///
2629    /// [`true`], if valid paths were placed in @start_path and @end_path.
2630    ///
2631    /// ## `start_path`
2632    /// Return location for start of region
2633    ///
2634    /// ## `end_path`
2635    /// Return location for end of region
2636    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
2637    #[allow(deprecated)]
2638    #[doc(alias = "gtk_tree_view_get_visible_range")]
2639    #[doc(alias = "get_visible_range")]
2640    fn visible_range(&self) -> Option<(TreePath, TreePath)> {
2641        unsafe {
2642            let mut start_path = std::ptr::null_mut();
2643            let mut end_path = std::ptr::null_mut();
2644            let ret = from_glib(ffi::gtk_tree_view_get_visible_range(
2645                self.as_ref().to_glib_none().0,
2646                &mut start_path,
2647                &mut end_path,
2648            ));
2649            if ret {
2650                Some((from_glib_full(start_path), from_glib_full(end_path)))
2651            } else {
2652                None
2653            }
2654        }
2655    }
2656
2657    /// Fills @visible_rect with the currently-visible region of the
2658    /// buffer, in tree coordinates. Convert to bin_window coordinates with
2659    /// gtk_tree_view_convert_tree_to_bin_window_coords().
2660    /// Tree coordinates start at 0,0 for row 0 of the tree, and cover the entire
2661    /// scrollable area of the tree.
2662    ///
2663    /// # Deprecated since 4.10
2664    ///
2665    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
2666    ///
2667    /// # Returns
2668    ///
2669    ///
2670    /// ## `visible_rect`
2671    /// rectangle to fill
2672    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
2673    #[allow(deprecated)]
2674    #[doc(alias = "gtk_tree_view_get_visible_rect")]
2675    #[doc(alias = "get_visible_rect")]
2676    fn visible_rect(&self) -> gdk::Rectangle {
2677        unsafe {
2678            let mut visible_rect = gdk::Rectangle::uninitialized();
2679            ffi::gtk_tree_view_get_visible_rect(
2680                self.as_ref().to_glib_none().0,
2681                visible_rect.to_glib_none_mut().0,
2682            );
2683            visible_rect
2684        }
2685    }
2686
2687    /// This inserts the @column into the @self at @position.  If @position is
2688    /// -1, then the column is inserted at the end. If @self has
2689    /// “fixed_height” mode enabled, then @column must have its “sizing” property
2690    /// set to be GTK_TREE_VIEW_COLUMN_FIXED.
2691    ///
2692    /// # Deprecated since 4.10
2693    ///
2694    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
2695    /// ## `column`
2696    /// The [`TreeViewColumn`][crate::TreeViewColumn] to be inserted.
2697    /// ## `position`
2698    /// The position to insert @column in.
2699    ///
2700    /// # Returns
2701    ///
2702    /// The number of columns in @self after insertion.
2703    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
2704    #[allow(deprecated)]
2705    #[doc(alias = "gtk_tree_view_insert_column")]
2706    fn insert_column(&self, column: &TreeViewColumn, position: i32) -> i32 {
2707        unsafe {
2708            ffi::gtk_tree_view_insert_column(
2709                self.as_ref().to_glib_none().0,
2710                column.to_glib_none().0,
2711                position,
2712            )
2713        }
2714    }
2715
2716    /// Convenience function that inserts a new column into the [`TreeView`][crate::TreeView]
2717    /// with the given cell renderer and a `GtkTreeCellDataFunc` to set cell renderer
2718    /// attributes (normally using data from the model). See also
2719    /// gtk_tree_view_column_set_cell_data_func(), gtk_tree_view_column_pack_start().
2720    /// If @self has “fixed_height” mode enabled, then the new column will have its
2721    /// “sizing” property set to be GTK_TREE_VIEW_COLUMN_FIXED.
2722    ///
2723    /// # Deprecated since 4.10
2724    ///
2725    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
2726    /// ## `position`
2727    /// Position to insert, -1 for append
2728    /// ## `title`
2729    /// column title
2730    /// ## `cell`
2731    /// cell renderer for column
2732    /// ## `func`
2733    /// function to set attributes of cell renderer
2734    ///
2735    /// # Returns
2736    ///
2737    /// number of columns in the tree view post-insert
2738    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
2739    #[allow(deprecated)]
2740    #[doc(alias = "gtk_tree_view_insert_column_with_data_func")]
2741    fn insert_column_with_data_func<
2742        P: Fn(&TreeViewColumn, &CellRenderer, &TreeModel, &TreeIter) + 'static,
2743    >(
2744        &self,
2745        position: i32,
2746        title: &str,
2747        cell: &impl IsA<CellRenderer>,
2748        func: P,
2749    ) -> i32 {
2750        let func_data: Box_<P> = Box_::new(func);
2751        unsafe extern "C" fn func_func<
2752            P: Fn(&TreeViewColumn, &CellRenderer, &TreeModel, &TreeIter) + 'static,
2753        >(
2754            tree_column: *mut ffi::GtkTreeViewColumn,
2755            cell: *mut ffi::GtkCellRenderer,
2756            tree_model: *mut ffi::GtkTreeModel,
2757            iter: *mut ffi::GtkTreeIter,
2758            data: glib::ffi::gpointer,
2759        ) {
2760            let tree_column = from_glib_borrow(tree_column);
2761            let cell = from_glib_borrow(cell);
2762            let tree_model = from_glib_borrow(tree_model);
2763            let iter = from_glib_borrow(iter);
2764            let callback = &*(data as *mut P);
2765            (*callback)(&tree_column, &cell, &tree_model, &iter)
2766        }
2767        let func = Some(func_func::<P> as _);
2768        unsafe extern "C" fn dnotify_func<
2769            P: Fn(&TreeViewColumn, &CellRenderer, &TreeModel, &TreeIter) + 'static,
2770        >(
2771            data: glib::ffi::gpointer,
2772        ) {
2773            let _callback = Box_::from_raw(data as *mut P);
2774        }
2775        let destroy_call6 = Some(dnotify_func::<P> as _);
2776        let super_callback0: Box_<P> = func_data;
2777        unsafe {
2778            ffi::gtk_tree_view_insert_column_with_data_func(
2779                self.as_ref().to_glib_none().0,
2780                position,
2781                title.to_glib_none().0,
2782                cell.as_ref().to_glib_none().0,
2783                func,
2784                Box_::into_raw(super_callback0) as *mut _,
2785                destroy_call6,
2786            )
2787        }
2788    }
2789
2790    /// Determine whether the point (@x, @y) in @self is blank, that is no
2791    /// cell content nor an expander arrow is drawn at the location. If so, the
2792    /// location can be considered as the background. You might wish to take
2793    /// special action on clicks on the background, such as clearing a current
2794    /// selection, having a custom context menu or starting rubber banding.
2795    ///
2796    /// The @x and @y coordinate that are provided must be relative to bin_window
2797    /// coordinates.  Widget-relative coordinates must be converted using
2798    /// gtk_tree_view_convert_widget_to_bin_window_coords().
2799    ///
2800    /// For converting widget coordinates (eg. the ones you get from
2801    /// GtkWidget::query-tooltip), please see
2802    /// gtk_tree_view_convert_widget_to_bin_window_coords().
2803    ///
2804    /// The @path, @column, @cell_x and @cell_y arguments will be filled in
2805    /// likewise as for gtk_tree_view_get_path_at_pos().  Please see
2806    /// gtk_tree_view_get_path_at_pos() for more information.
2807    ///
2808    /// # Deprecated since 4.10
2809    ///
2810    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
2811    /// ## `x`
2812    /// The x position to be identified (relative to bin_window)
2813    /// ## `y`
2814    /// The y position to be identified (relative to bin_window)
2815    ///
2816    /// # Returns
2817    ///
2818    /// [`true`] if the area at the given coordinates is blank,
2819    /// [`false`] otherwise.
2820    ///
2821    /// ## `path`
2822    /// A pointer to a [`TreePath`][crate::TreePath] pointer to
2823    ///   be filled in
2824    ///
2825    /// ## `column`
2826    /// A pointer to a
2827    ///   [`TreeViewColumn`][crate::TreeViewColumn] pointer to be filled in
2828    ///
2829    /// ## `cell_x`
2830    /// A pointer where the X coordinate relative to the
2831    ///   cell can be placed
2832    ///
2833    /// ## `cell_y`
2834    /// A pointer where the Y coordinate relative to the
2835    ///   cell can be placed
2836    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
2837    #[allow(deprecated)]
2838    #[doc(alias = "gtk_tree_view_is_blank_at_pos")]
2839    fn is_blank_at_pos(
2840        &self,
2841        x: i32,
2842        y: i32,
2843    ) -> Option<(Option<TreePath>, Option<TreeViewColumn>, i32, i32)> {
2844        unsafe {
2845            let mut path = std::ptr::null_mut();
2846            let mut column = std::ptr::null_mut();
2847            let mut cell_x = std::mem::MaybeUninit::uninit();
2848            let mut cell_y = std::mem::MaybeUninit::uninit();
2849            let ret = from_glib(ffi::gtk_tree_view_is_blank_at_pos(
2850                self.as_ref().to_glib_none().0,
2851                x,
2852                y,
2853                &mut path,
2854                &mut column,
2855                cell_x.as_mut_ptr(),
2856                cell_y.as_mut_ptr(),
2857            ));
2858            if ret {
2859                Some((
2860                    from_glib_full(path),
2861                    from_glib_none(column),
2862                    cell_x.assume_init(),
2863                    cell_y.assume_init(),
2864                ))
2865            } else {
2866                None
2867            }
2868        }
2869    }
2870
2871    /// Returns whether a rubber banding operation is currently being done
2872    /// in @self.
2873    ///
2874    /// # Deprecated since 4.10
2875    ///
2876    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
2877    ///
2878    /// # Returns
2879    ///
2880    /// [`true`] if a rubber banding operation is currently being
2881    /// done in @self.
2882    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
2883    #[allow(deprecated)]
2884    #[doc(alias = "gtk_tree_view_is_rubber_banding_active")]
2885    fn is_rubber_banding_active(&self) -> bool {
2886        unsafe {
2887            from_glib(ffi::gtk_tree_view_is_rubber_banding_active(
2888                self.as_ref().to_glib_none().0,
2889            ))
2890        }
2891    }
2892
2893    /// Calls @func on all expanded rows.
2894    ///
2895    /// # Deprecated since 4.10
2896    ///
2897    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
2898    /// ## `func`
2899    /// A function to be called
2900    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
2901    #[allow(deprecated)]
2902    #[doc(alias = "gtk_tree_view_map_expanded_rows")]
2903    fn map_expanded_rows<P: FnMut(&TreeView, &TreePath)>(&self, func: P) {
2904        let mut func_data: P = func;
2905        unsafe extern "C" fn func_func<P: FnMut(&TreeView, &TreePath)>(
2906            tree_view: *mut ffi::GtkTreeView,
2907            path: *mut ffi::GtkTreePath,
2908            user_data: glib::ffi::gpointer,
2909        ) {
2910            let tree_view = from_glib_borrow(tree_view);
2911            let path = from_glib_borrow(path);
2912            let callback = user_data as *mut P;
2913            (*callback)(&tree_view, &path)
2914        }
2915        let func = Some(func_func::<P> as _);
2916        let super_callback0: &mut P = &mut func_data;
2917        unsafe {
2918            ffi::gtk_tree_view_map_expanded_rows(
2919                self.as_ref().to_glib_none().0,
2920                func,
2921                super_callback0 as *mut _ as *mut _,
2922            );
2923        }
2924    }
2925
2926    /// Moves @column to be after to @base_column.  If @base_column is [`None`], then
2927    /// @column is placed in the first position.
2928    ///
2929    /// # Deprecated since 4.10
2930    ///
2931    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
2932    /// ## `column`
2933    /// The [`TreeViewColumn`][crate::TreeViewColumn] to be moved.
2934    /// ## `base_column`
2935    /// The [`TreeViewColumn`][crate::TreeViewColumn] to be moved relative to
2936    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
2937    #[allow(deprecated)]
2938    #[doc(alias = "gtk_tree_view_move_column_after")]
2939    fn move_column_after(&self, column: &TreeViewColumn, base_column: Option<&TreeViewColumn>) {
2940        unsafe {
2941            ffi::gtk_tree_view_move_column_after(
2942                self.as_ref().to_glib_none().0,
2943                column.to_glib_none().0,
2944                base_column.to_glib_none().0,
2945            );
2946        }
2947    }
2948
2949    /// Removes @column from @self.
2950    ///
2951    /// # Deprecated since 4.10
2952    ///
2953    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
2954    /// ## `column`
2955    /// The [`TreeViewColumn`][crate::TreeViewColumn] to remove.
2956    ///
2957    /// # Returns
2958    ///
2959    /// The number of columns in @self after removing.
2960    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
2961    #[allow(deprecated)]
2962    #[doc(alias = "gtk_tree_view_remove_column")]
2963    fn remove_column(&self, column: &TreeViewColumn) -> i32 {
2964        unsafe {
2965            ffi::gtk_tree_view_remove_column(
2966                self.as_ref().to_glib_none().0,
2967                column.to_glib_none().0,
2968            )
2969        }
2970    }
2971
2972    /// Activates the cell determined by @path and @column.
2973    ///
2974    /// # Deprecated since 4.10
2975    ///
2976    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
2977    /// ## `path`
2978    /// The [`TreePath`][crate::TreePath] to be activated.
2979    /// ## `column`
2980    /// The [`TreeViewColumn`][crate::TreeViewColumn] to be activated.
2981    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
2982    #[allow(deprecated)]
2983    #[doc(alias = "gtk_tree_view_row_activated")]
2984    fn row_activated(&self, path: &TreePath, column: Option<&TreeViewColumn>) {
2985        unsafe {
2986            ffi::gtk_tree_view_row_activated(
2987                self.as_ref().to_glib_none().0,
2988                mut_override(path.to_glib_none().0),
2989                column.to_glib_none().0,
2990            );
2991        }
2992    }
2993
2994    /// Returns [`true`] if the node pointed to by @path is expanded in @self.
2995    ///
2996    /// # Deprecated since 4.10
2997    ///
2998    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
2999    /// ## `path`
3000    /// A [`TreePath`][crate::TreePath] to test expansion state.
3001    ///
3002    /// # Returns
3003    ///
3004    /// [`true`] if #path is expanded.
3005    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
3006    #[allow(deprecated)]
3007    #[doc(alias = "gtk_tree_view_row_expanded")]
3008    fn row_expanded(&self, path: &TreePath) -> bool {
3009        unsafe {
3010            from_glib(ffi::gtk_tree_view_row_expanded(
3011                self.as_ref().to_glib_none().0,
3012                mut_override(path.to_glib_none().0),
3013            ))
3014        }
3015    }
3016
3017    /// Moves the alignments of @self to the position specified by @column and
3018    /// @path.  If @column is [`None`], then no horizontal scrolling occurs.  Likewise,
3019    /// if @path is [`None`] no vertical scrolling occurs.  At a minimum, one of @column
3020    /// or @path need to be non-[`None`].  @row_align determines where the row is
3021    /// placed, and @col_align determines where @column is placed.  Both are expected
3022    /// to be between 0.0 and 1.0. 0.0 means left/top alignment, 1.0 means
3023    /// right/bottom alignment, 0.5 means center.
3024    ///
3025    /// If @use_align is [`false`], then the alignment arguments are ignored, and the
3026    /// tree does the minimum amount of work to scroll the cell onto the screen.
3027    /// This means that the cell will be scrolled to the edge closest to its current
3028    /// position.  If the cell is currently visible on the screen, nothing is done.
3029    ///
3030    /// This function only works if the model is set, and @path is a valid row on the
3031    /// model.  If the model changes before the @self is realized, the centered
3032    /// path will be modified to reflect this change.
3033    ///
3034    /// # Deprecated since 4.10
3035    ///
3036    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
3037    /// ## `path`
3038    /// The path of the row to move to
3039    /// ## `column`
3040    /// The [`TreeViewColumn`][crate::TreeViewColumn] to move horizontally to
3041    /// ## `use_align`
3042    /// whether to use alignment arguments, or [`false`].
3043    /// ## `row_align`
3044    /// The vertical alignment of the row specified by @path.
3045    /// ## `col_align`
3046    /// The horizontal alignment of the column specified by @column.
3047    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
3048    #[allow(deprecated)]
3049    #[doc(alias = "gtk_tree_view_scroll_to_cell")]
3050    fn scroll_to_cell(
3051        &self,
3052        path: Option<&TreePath>,
3053        column: Option<&TreeViewColumn>,
3054        use_align: bool,
3055        row_align: f32,
3056        col_align: f32,
3057    ) {
3058        unsafe {
3059            ffi::gtk_tree_view_scroll_to_cell(
3060                self.as_ref().to_glib_none().0,
3061                mut_override(path.to_glib_none().0),
3062                column.to_glib_none().0,
3063                use_align.into_glib(),
3064                row_align,
3065                col_align,
3066            );
3067        }
3068    }
3069
3070    /// Scrolls the tree view such that the top-left corner of the visible
3071    /// area is @tree_x, @tree_y, where @tree_x and @tree_y are specified
3072    /// in tree coordinates.  The @self must be realized before
3073    /// this function is called.  If it isn't, you probably want to be
3074    /// using gtk_tree_view_scroll_to_cell().
3075    ///
3076    /// If either @tree_x or @tree_y are -1, then that direction isn’t scrolled.
3077    ///
3078    /// # Deprecated since 4.10
3079    ///
3080    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
3081    /// ## `tree_x`
3082    /// X coordinate of new top-left pixel of visible area, or -1
3083    /// ## `tree_y`
3084    /// Y coordinate of new top-left pixel of visible area, or -1
3085    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
3086    #[allow(deprecated)]
3087    #[doc(alias = "gtk_tree_view_scroll_to_point")]
3088    fn scroll_to_point(&self, tree_x: i32, tree_y: i32) {
3089        unsafe {
3090            ffi::gtk_tree_view_scroll_to_point(self.as_ref().to_glib_none().0, tree_x, tree_y);
3091        }
3092    }
3093
3094    /// Cause the [`TreeView`][crate::TreeView]::row-activated signal to be emitted
3095    /// on a single click instead of a double click.
3096    ///
3097    /// # Deprecated since 4.10
3098    ///
3099    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
3100    /// ## `single`
3101    /// [`true`] to emit row-activated on a single click
3102    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
3103    #[allow(deprecated)]
3104    #[doc(alias = "gtk_tree_view_set_activate_on_single_click")]
3105    #[doc(alias = "activate-on-single-click")]
3106    fn set_activate_on_single_click(&self, single: bool) {
3107        unsafe {
3108            ffi::gtk_tree_view_set_activate_on_single_click(
3109                self.as_ref().to_glib_none().0,
3110                single.into_glib(),
3111            );
3112        }
3113    }
3114
3115    /// Sets a user function for determining where a column may be dropped when
3116    /// dragged.  This function is called on every column pair in turn at the
3117    /// beginning of a column drag to determine where a drop can take place.  The
3118    /// arguments passed to @func are: the @self, the [`TreeViewColumn`][crate::TreeViewColumn] being
3119    /// dragged, the two [`TreeViewColumn`][crate::TreeViewColumn]s determining the drop spot, and
3120    /// @user_data.  If either of the [`TreeViewColumn`][crate::TreeViewColumn] arguments for the drop spot
3121    /// are [`None`], then they indicate an edge.  If @func is set to be [`None`], then
3122    /// @self reverts to the default behavior of allowing all columns to be
3123    /// dropped everywhere.
3124    ///
3125    /// # Deprecated since 4.10
3126    ///
3127    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
3128    /// ## `func`
3129    /// A function to determine which columns are reorderable
3130    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
3131    #[allow(deprecated)]
3132    #[doc(alias = "gtk_tree_view_set_column_drag_function")]
3133    fn set_column_drag_function(
3134        &self,
3135        func: Option<
3136            Box_<
3137                dyn Fn(&TreeView, &TreeViewColumn, &TreeViewColumn, &TreeViewColumn) -> bool
3138                    + 'static,
3139            >,
3140        >,
3141    ) {
3142        let func_data: Box_<
3143            Option<
3144                Box_<
3145                    dyn Fn(&TreeView, &TreeViewColumn, &TreeViewColumn, &TreeViewColumn) -> bool
3146                        + 'static,
3147                >,
3148            >,
3149        > = Box_::new(func);
3150        unsafe extern "C" fn func_func(
3151            tree_view: *mut ffi::GtkTreeView,
3152            column: *mut ffi::GtkTreeViewColumn,
3153            prev_column: *mut ffi::GtkTreeViewColumn,
3154            next_column: *mut ffi::GtkTreeViewColumn,
3155            data: glib::ffi::gpointer,
3156        ) -> glib::ffi::gboolean {
3157            let tree_view = from_glib_borrow(tree_view);
3158            let column = from_glib_borrow(column);
3159            let prev_column = from_glib_borrow(prev_column);
3160            let next_column = from_glib_borrow(next_column);
3161            let callback = &*(data as *mut Option<
3162                Box_<
3163                    dyn Fn(&TreeView, &TreeViewColumn, &TreeViewColumn, &TreeViewColumn) -> bool
3164                        + 'static,
3165                >,
3166            >);
3167            if let Some(ref callback) = *callback {
3168                callback(&tree_view, &column, &prev_column, &next_column)
3169            } else {
3170                panic!("cannot get closure...")
3171            }
3172            .into_glib()
3173        }
3174        let func = if func_data.is_some() {
3175            Some(func_func as _)
3176        } else {
3177            None
3178        };
3179        unsafe extern "C" fn destroy_func(data: glib::ffi::gpointer) {
3180            let _callback = Box_::from_raw(
3181                data as *mut Option<
3182                    Box_<
3183                        dyn Fn(&TreeView, &TreeViewColumn, &TreeViewColumn, &TreeViewColumn) -> bool
3184                            + 'static,
3185                    >,
3186                >,
3187            );
3188        }
3189        let destroy_call3 = Some(destroy_func as _);
3190        let super_callback0: Box_<
3191            Option<
3192                Box_<
3193                    dyn Fn(&TreeView, &TreeViewColumn, &TreeViewColumn, &TreeViewColumn) -> bool
3194                        + 'static,
3195                >,
3196            >,
3197        > = func_data;
3198        unsafe {
3199            ffi::gtk_tree_view_set_column_drag_function(
3200                self.as_ref().to_glib_none().0,
3201                func,
3202                Box_::into_raw(super_callback0) as *mut _,
3203                destroy_call3,
3204            );
3205        }
3206    }
3207
3208    /// Sets the current keyboard focus to be at @path, and selects it.  This is
3209    /// useful when you want to focus the user’s attention on a particular row.  If
3210    /// @focus_column is not [`None`], then focus is given to the column specified by
3211    /// it. Additionally, if @focus_column is specified, and @start_editing is
3212    /// [`true`], then editing should be started in the specified cell.
3213    /// This function is often followed by @gtk_widget_grab_focus (@self)
3214    /// in order to give keyboard focus to the widget.  Please note that editing
3215    /// can only happen when the widget is realized.
3216    ///
3217    /// If @path is invalid for @model, the current cursor (if any) will be unset
3218    /// and the function will return without failing.
3219    ///
3220    /// # Deprecated since 4.10
3221    ///
3222    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
3223    /// ## `path`
3224    /// A [`TreePath`][crate::TreePath]
3225    /// ## `focus_column`
3226    /// A [`TreeViewColumn`][crate::TreeViewColumn]
3227    /// ## `start_editing`
3228    /// [`true`] if the specified cell should start being edited.
3229    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
3230    #[allow(deprecated)]
3231    #[doc(alias = "gtk_tree_view_set_cursor")]
3232    fn set_cursor(
3233        &self,
3234        path: &TreePath,
3235        focus_column: Option<&TreeViewColumn>,
3236        start_editing: bool,
3237    ) {
3238        unsafe {
3239            ffi::gtk_tree_view_set_cursor(
3240                self.as_ref().to_glib_none().0,
3241                mut_override(path.to_glib_none().0),
3242                focus_column.to_glib_none().0,
3243                start_editing.into_glib(),
3244            );
3245        }
3246    }
3247
3248    /// Sets the current keyboard focus to be at @path, and selects it.  This is
3249    /// useful when you want to focus the user’s attention on a particular row.  If
3250    /// @focus_column is not [`None`], then focus is given to the column specified by
3251    /// it. If @focus_column and @focus_cell are not [`None`], and @focus_column
3252    /// contains 2 or more editable or activatable cells, then focus is given to
3253    /// the cell specified by @focus_cell. Additionally, if @focus_column is
3254    /// specified, and @start_editing is [`true`], then editing should be started in
3255    /// the specified cell.  This function is often followed by
3256    /// @gtk_widget_grab_focus (@self) in order to give keyboard focus to the
3257    /// widget.  Please note that editing can only happen when the widget is
3258    /// realized.
3259    ///
3260    /// If @path is invalid for @model, the current cursor (if any) will be unset
3261    /// and the function will return without failing.
3262    ///
3263    /// # Deprecated since 4.10
3264    ///
3265    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
3266    /// ## `path`
3267    /// A [`TreePath`][crate::TreePath]
3268    /// ## `focus_column`
3269    /// A [`TreeViewColumn`][crate::TreeViewColumn]
3270    /// ## `focus_cell`
3271    /// A [`CellRenderer`][crate::CellRenderer]
3272    /// ## `start_editing`
3273    /// [`true`] if the specified cell should start being edited.
3274    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
3275    #[allow(deprecated)]
3276    #[doc(alias = "gtk_tree_view_set_cursor_on_cell")]
3277    fn set_cursor_on_cell(
3278        &self,
3279        path: &TreePath,
3280        focus_column: Option<&TreeViewColumn>,
3281        focus_cell: Option<&impl IsA<CellRenderer>>,
3282        start_editing: bool,
3283    ) {
3284        unsafe {
3285            ffi::gtk_tree_view_set_cursor_on_cell(
3286                self.as_ref().to_glib_none().0,
3287                mut_override(path.to_glib_none().0),
3288                focus_column.to_glib_none().0,
3289                focus_cell.map(|p| p.as_ref()).to_glib_none().0,
3290                start_editing.into_glib(),
3291            );
3292        }
3293    }
3294
3295    /// Sets the row that is highlighted for feedback.
3296    /// If @path is [`None`], an existing highlight is removed.
3297    ///
3298    /// # Deprecated since 4.10
3299    ///
3300    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
3301    /// ## `path`
3302    /// The path of the row to highlight
3303    /// ## `pos`
3304    /// Specifies whether to drop before, after or into the row
3305    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
3306    #[allow(deprecated)]
3307    #[doc(alias = "gtk_tree_view_set_drag_dest_row")]
3308    fn set_drag_dest_row(&self, path: Option<&TreePath>, pos: TreeViewDropPosition) {
3309        unsafe {
3310            ffi::gtk_tree_view_set_drag_dest_row(
3311                self.as_ref().to_glib_none().0,
3312                mut_override(path.to_glib_none().0),
3313                pos.into_glib(),
3314            );
3315        }
3316    }
3317
3318    /// If @enable_search is set, then the user can type in text to search through
3319    /// the tree interactively (this is sometimes called "typeahead find").
3320    ///
3321    /// Note that even if this is [`false`], the user can still initiate a search
3322    /// using the “start-interactive-search” key binding.
3323    ///
3324    /// # Deprecated since 4.10
3325    ///
3326    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
3327    /// ## `enable_search`
3328    /// [`true`], if the user can search interactively
3329    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
3330    #[allow(deprecated)]
3331    #[doc(alias = "gtk_tree_view_set_enable_search")]
3332    #[doc(alias = "enable-search")]
3333    fn set_enable_search(&self, enable_search: bool) {
3334        unsafe {
3335            ffi::gtk_tree_view_set_enable_search(
3336                self.as_ref().to_glib_none().0,
3337                enable_search.into_glib(),
3338            );
3339        }
3340    }
3341
3342    /// Sets whether to draw lines interconnecting the expanders in @self.
3343    /// This does not have any visible effects for lists.
3344    ///
3345    /// # Deprecated since 4.10
3346    ///
3347    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
3348    /// ## `enabled`
3349    /// [`true`] to enable tree line drawing, [`false`] otherwise.
3350    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
3351    #[allow(deprecated)]
3352    #[doc(alias = "gtk_tree_view_set_enable_tree_lines")]
3353    #[doc(alias = "enable-tree-lines")]
3354    fn set_enable_tree_lines(&self, enabled: bool) {
3355        unsafe {
3356            ffi::gtk_tree_view_set_enable_tree_lines(
3357                self.as_ref().to_glib_none().0,
3358                enabled.into_glib(),
3359            );
3360        }
3361    }
3362
3363    /// Sets the column to draw the expander arrow at. It must be in @self.
3364    /// If @column is [`None`], then the expander arrow is always at the first
3365    /// visible column.
3366    ///
3367    /// If you do not want expander arrow to appear in your tree, set the
3368    /// expander column to a hidden column.
3369    ///
3370    /// # Deprecated since 4.10
3371    ///
3372    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
3373    /// ## `column`
3374    /// [`None`], or the column to draw the expander arrow at.
3375    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
3376    #[allow(deprecated)]
3377    #[doc(alias = "gtk_tree_view_set_expander_column")]
3378    #[doc(alias = "expander-column")]
3379    fn set_expander_column(&self, column: Option<&TreeViewColumn>) {
3380        unsafe {
3381            ffi::gtk_tree_view_set_expander_column(
3382                self.as_ref().to_glib_none().0,
3383                column.to_glib_none().0,
3384            );
3385        }
3386    }
3387
3388    /// Enables or disables the fixed height mode of @self.
3389    /// Fixed height mode speeds up [`TreeView`][crate::TreeView] by assuming that all
3390    /// rows have the same height.
3391    /// Only enable this option if all rows are the same height and all
3392    /// columns are of type [`TreeViewColumnSizing::Fixed`][crate::TreeViewColumnSizing::Fixed].
3393    ///
3394    /// # Deprecated since 4.10
3395    ///
3396    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
3397    /// ## `enable`
3398    /// [`true`] to enable fixed height mode
3399    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
3400    #[allow(deprecated)]
3401    #[doc(alias = "gtk_tree_view_set_fixed_height_mode")]
3402    #[doc(alias = "fixed-height-mode")]
3403    fn set_fixed_height_mode(&self, enable: bool) {
3404        unsafe {
3405            ffi::gtk_tree_view_set_fixed_height_mode(
3406                self.as_ref().to_glib_none().0,
3407                enable.into_glib(),
3408            );
3409        }
3410    }
3411
3412    /// Sets which grid lines to draw in @self.
3413    ///
3414    /// # Deprecated since 4.10
3415    ///
3416    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
3417    /// ## `grid_lines`
3418    /// a [`TreeView`][crate::TreeView]GridLines value indicating which grid lines to
3419    /// enable.
3420    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
3421    #[allow(deprecated)]
3422    #[doc(alias = "gtk_tree_view_set_grid_lines")]
3423    fn set_grid_lines(&self, grid_lines: TreeViewGridLines) {
3424        unsafe {
3425            ffi::gtk_tree_view_set_grid_lines(
3426                self.as_ref().to_glib_none().0,
3427                grid_lines.into_glib(),
3428            );
3429        }
3430    }
3431
3432    /// Allow the column title buttons to be clicked.
3433    ///
3434    /// # Deprecated since 4.10
3435    ///
3436    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
3437    /// ## `setting`
3438    /// [`true`] if the columns are clickable.
3439    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
3440    #[allow(deprecated)]
3441    #[doc(alias = "gtk_tree_view_set_headers_clickable")]
3442    #[doc(alias = "headers-clickable")]
3443    fn set_headers_clickable(&self, setting: bool) {
3444        unsafe {
3445            ffi::gtk_tree_view_set_headers_clickable(
3446                self.as_ref().to_glib_none().0,
3447                setting.into_glib(),
3448            );
3449        }
3450    }
3451
3452    /// Sets the visibility state of the headers.
3453    ///
3454    /// # Deprecated since 4.10
3455    ///
3456    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
3457    /// ## `headers_visible`
3458    /// [`true`] if the headers are visible
3459    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
3460    #[allow(deprecated)]
3461    #[doc(alias = "gtk_tree_view_set_headers_visible")]
3462    #[doc(alias = "headers-visible")]
3463    fn set_headers_visible(&self, headers_visible: bool) {
3464        unsafe {
3465            ffi::gtk_tree_view_set_headers_visible(
3466                self.as_ref().to_glib_none().0,
3467                headers_visible.into_glib(),
3468            );
3469        }
3470    }
3471
3472    /// Enables or disables the hover expansion mode of @self.
3473    /// Hover expansion makes rows expand or collapse if the pointer
3474    /// moves over them.
3475    ///
3476    /// # Deprecated since 4.10
3477    ///
3478    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
3479    /// ## `expand`
3480    /// [`true`] to enable hover selection mode
3481    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
3482    #[allow(deprecated)]
3483    #[doc(alias = "gtk_tree_view_set_hover_expand")]
3484    #[doc(alias = "hover-expand")]
3485    fn set_hover_expand(&self, expand: bool) {
3486        unsafe {
3487            ffi::gtk_tree_view_set_hover_expand(self.as_ref().to_glib_none().0, expand.into_glib());
3488        }
3489    }
3490
3491    /// Enables or disables the hover selection mode of @self.
3492    /// Hover selection makes the selected row follow the pointer.
3493    /// Currently, this works only for the selection modes
3494    /// [`SelectionMode::Single`][crate::SelectionMode::Single] and [`SelectionMode::Browse`][crate::SelectionMode::Browse].
3495    ///
3496    /// # Deprecated since 4.10
3497    ///
3498    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
3499    /// ## `hover`
3500    /// [`true`] to enable hover selection mode
3501    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
3502    #[allow(deprecated)]
3503    #[doc(alias = "gtk_tree_view_set_hover_selection")]
3504    #[doc(alias = "hover-selection")]
3505    fn set_hover_selection(&self, hover: bool) {
3506        unsafe {
3507            ffi::gtk_tree_view_set_hover_selection(
3508                self.as_ref().to_glib_none().0,
3509                hover.into_glib(),
3510            );
3511        }
3512    }
3513
3514    /// Sets the amount of extra indentation for child levels to use in @self
3515    /// in addition to the default indentation.  The value should be specified in
3516    /// pixels, a value of 0 disables this feature and in this case only the default
3517    /// indentation will be used.
3518    /// This does not have any visible effects for lists.
3519    ///
3520    /// # Deprecated since 4.10
3521    ///
3522    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
3523    /// ## `indentation`
3524    /// the amount, in pixels, of extra indentation in @self.
3525    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
3526    #[allow(deprecated)]
3527    #[doc(alias = "gtk_tree_view_set_level_indentation")]
3528    #[doc(alias = "level-indentation")]
3529    fn set_level_indentation(&self, indentation: i32) {
3530        unsafe {
3531            ffi::gtk_tree_view_set_level_indentation(self.as_ref().to_glib_none().0, indentation);
3532        }
3533    }
3534
3535    /// Sets the model for a [`TreeView`][crate::TreeView].  If the @self already has a model
3536    /// set, it will remove it before setting the new model.  If @model is [`None`],
3537    /// then it will unset the old model.
3538    ///
3539    /// # Deprecated since 4.10
3540    ///
3541    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
3542    /// ## `model`
3543    /// The model.
3544    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
3545    #[allow(deprecated)]
3546    #[doc(alias = "gtk_tree_view_set_model")]
3547    #[doc(alias = "model")]
3548    fn set_model(&self, model: Option<&impl IsA<TreeModel>>) {
3549        unsafe {
3550            ffi::gtk_tree_view_set_model(
3551                self.as_ref().to_glib_none().0,
3552                model.map(|p| p.as_ref()).to_glib_none().0,
3553            );
3554        }
3555    }
3556
3557    /// This function is a convenience function to allow you to reorder
3558    /// models that support the `GtkTreeDragSourceIface` and the
3559    /// `GtkTreeDragDestIface`.  Both [`TreeStore`][crate::TreeStore] and [`ListStore`][crate::ListStore] support
3560    /// these.  If @reorderable is [`true`], then the user can reorder the
3561    /// model by dragging and dropping rows. The developer can listen to
3562    /// these changes by connecting to the model’s `GtkTreeModel::row-inserted`
3563    /// and `GtkTreeModel::row-deleted` signals. The reordering is implemented
3564    /// by setting up the tree view as a drag source and destination.
3565    /// Therefore, drag and drop can not be used in a reorderable view for any
3566    /// other purpose.
3567    ///
3568    /// This function does not give you any degree of control over the order -- any
3569    /// reordering is allowed.  If more control is needed, you should probably
3570    /// handle drag and drop manually.
3571    ///
3572    /// # Deprecated since 4.10
3573    ///
3574    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
3575    /// ## `reorderable`
3576    /// [`true`], if the tree can be reordered.
3577    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
3578    #[allow(deprecated)]
3579    #[doc(alias = "gtk_tree_view_set_reorderable")]
3580    #[doc(alias = "reorderable")]
3581    fn set_reorderable(&self, reorderable: bool) {
3582        unsafe {
3583            ffi::gtk_tree_view_set_reorderable(
3584                self.as_ref().to_glib_none().0,
3585                reorderable.into_glib(),
3586            );
3587        }
3588    }
3589
3590    /// Sets the row separator function, which is used to determine
3591    /// whether a row should be drawn as a separator. If the row separator
3592    /// function is [`None`], no separators are drawn. This is the default value.
3593    ///
3594    /// # Deprecated since 4.10
3595    ///
3596    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
3597    /// ## `func`
3598    /// a [`TreeView`][crate::TreeView]RowSeparatorFunc
3599    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
3600    #[allow(deprecated)]
3601    #[doc(alias = "gtk_tree_view_set_row_separator_func")]
3602    fn set_row_separator_func<P: Fn(&TreeModel, &TreeIter) -> bool + 'static>(&self, func: P) {
3603        let func_data: Box_<P> = Box_::new(func);
3604        unsafe extern "C" fn func_func<P: Fn(&TreeModel, &TreeIter) -> bool + 'static>(
3605            model: *mut ffi::GtkTreeModel,
3606            iter: *mut ffi::GtkTreeIter,
3607            data: glib::ffi::gpointer,
3608        ) -> glib::ffi::gboolean {
3609            let model = from_glib_borrow(model);
3610            let iter = from_glib_borrow(iter);
3611            let callback = &*(data as *mut P);
3612            (*callback)(&model, &iter).into_glib()
3613        }
3614        let func = Some(func_func::<P> as _);
3615        unsafe extern "C" fn destroy_func<P: Fn(&TreeModel, &TreeIter) -> bool + 'static>(
3616            data: glib::ffi::gpointer,
3617        ) {
3618            let _callback = Box_::from_raw(data as *mut P);
3619        }
3620        let destroy_call3 = Some(destroy_func::<P> as _);
3621        let super_callback0: Box_<P> = func_data;
3622        unsafe {
3623            ffi::gtk_tree_view_set_row_separator_func(
3624                self.as_ref().to_glib_none().0,
3625                func,
3626                Box_::into_raw(super_callback0) as *mut _,
3627                destroy_call3,
3628            );
3629        }
3630    }
3631
3632    /// Enables or disables rubber banding in @self.  If the selection mode
3633    /// is [`SelectionMode::Multiple`][crate::SelectionMode::Multiple], rubber banding will allow the user to select
3634    /// multiple rows by dragging the mouse.
3635    ///
3636    /// # Deprecated since 4.10
3637    ///
3638    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
3639    /// ## `enable`
3640    /// [`true`] to enable rubber banding
3641    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
3642    #[allow(deprecated)]
3643    #[doc(alias = "gtk_tree_view_set_rubber_banding")]
3644    #[doc(alias = "rubber-banding")]
3645    fn set_rubber_banding(&self, enable: bool) {
3646        unsafe {
3647            ffi::gtk_tree_view_set_rubber_banding(
3648                self.as_ref().to_glib_none().0,
3649                enable.into_glib(),
3650            );
3651        }
3652    }
3653
3654    /// Sets @column as the column where the interactive search code should
3655    /// search in for the current model.
3656    ///
3657    /// If the search column is set, users can use the “start-interactive-search”
3658    /// key binding to bring up search popup. The enable-search property controls
3659    /// whether simply typing text will also start an interactive search.
3660    ///
3661    /// Note that @column refers to a column of the current model. The search
3662    /// column is reset to -1 when the model is changed.
3663    ///
3664    /// # Deprecated since 4.10
3665    ///
3666    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
3667    /// ## `column`
3668    /// the column of the model to search in, or -1 to disable searching
3669    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
3670    #[allow(deprecated)]
3671    #[doc(alias = "gtk_tree_view_set_search_column")]
3672    #[doc(alias = "search-column")]
3673    fn set_search_column(&self, column: i32) {
3674        unsafe {
3675            ffi::gtk_tree_view_set_search_column(self.as_ref().to_glib_none().0, column);
3676        }
3677    }
3678
3679    /// Sets the entry which the interactive search code will use for this
3680    /// @self.  This is useful when you want to provide a search entry
3681    /// in our interface at all time at a fixed position.  Passing [`None`] for
3682    /// @entry will make the interactive search code use the built-in popup
3683    /// entry again.
3684    ///
3685    /// # Deprecated since 4.10
3686    ///
3687    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
3688    /// ## `entry`
3689    /// the entry the interactive search code of @self should use
3690    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
3691    #[allow(deprecated)]
3692    #[doc(alias = "gtk_tree_view_set_search_entry")]
3693    fn set_search_entry(&self, entry: Option<&impl IsA<Editable>>) {
3694        unsafe {
3695            ffi::gtk_tree_view_set_search_entry(
3696                self.as_ref().to_glib_none().0,
3697                entry.map(|p| p.as_ref()).to_glib_none().0,
3698            );
3699        }
3700    }
3701
3702    /// Sets the compare function for the interactive search capabilities; note
3703    /// that somewhat like strcmp() returning 0 for equality
3704    /// [`TreeView`][crate::TreeView]SearchEqualFunc returns [`false`] on matches.
3705    ///
3706    /// # Deprecated since 4.10
3707    ///
3708    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
3709    /// ## `search_equal_func`
3710    /// the compare function to use during the search
3711    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
3712    #[allow(deprecated)]
3713    #[doc(alias = "gtk_tree_view_set_search_equal_func")]
3714    fn set_search_equal_func<P: Fn(&TreeModel, i32, &str, &TreeIter) -> bool + 'static>(
3715        &self,
3716        search_equal_func: P,
3717    ) {
3718        let search_equal_func_data: Box_<P> = Box_::new(search_equal_func);
3719        unsafe extern "C" fn search_equal_func_func<
3720            P: Fn(&TreeModel, i32, &str, &TreeIter) -> bool + 'static,
3721        >(
3722            model: *mut ffi::GtkTreeModel,
3723            column: std::ffi::c_int,
3724            key: *const std::ffi::c_char,
3725            iter: *mut ffi::GtkTreeIter,
3726            search_data: glib::ffi::gpointer,
3727        ) -> glib::ffi::gboolean {
3728            let model = from_glib_borrow(model);
3729            let key: Borrowed<glib::GString> = from_glib_borrow(key);
3730            let iter = from_glib_borrow(iter);
3731            let callback = &*(search_data as *mut P);
3732            (*callback)(&model, column, key.as_str(), &iter).into_glib()
3733        }
3734        let search_equal_func = Some(search_equal_func_func::<P> as _);
3735        unsafe extern "C" fn search_destroy_func<
3736            P: Fn(&TreeModel, i32, &str, &TreeIter) -> bool + 'static,
3737        >(
3738            data: glib::ffi::gpointer,
3739        ) {
3740            let _callback = Box_::from_raw(data as *mut P);
3741        }
3742        let destroy_call3 = Some(search_destroy_func::<P> as _);
3743        let super_callback0: Box_<P> = search_equal_func_data;
3744        unsafe {
3745            ffi::gtk_tree_view_set_search_equal_func(
3746                self.as_ref().to_glib_none().0,
3747                search_equal_func,
3748                Box_::into_raw(super_callback0) as *mut _,
3749                destroy_call3,
3750            );
3751        }
3752    }
3753
3754    /// Sets whether to draw and enable expanders and indent child rows in
3755    /// @self.  When disabled there will be no expanders visible in trees
3756    /// and there will be no way to expand and collapse rows by default.  Also
3757    /// note that hiding the expanders will disable the default indentation.  You
3758    /// can set a custom indentation in this case using
3759    /// gtk_tree_view_set_level_indentation().
3760    /// This does not have any visible effects for lists.
3761    ///
3762    /// # Deprecated since 4.10
3763    ///
3764    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
3765    /// ## `enabled`
3766    /// [`true`] to enable expander drawing, [`false`] otherwise.
3767    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
3768    #[allow(deprecated)]
3769    #[doc(alias = "gtk_tree_view_set_show_expanders")]
3770    #[doc(alias = "show-expanders")]
3771    fn set_show_expanders(&self, enabled: bool) {
3772        unsafe {
3773            ffi::gtk_tree_view_set_show_expanders(
3774                self.as_ref().to_glib_none().0,
3775                enabled.into_glib(),
3776            );
3777        }
3778    }
3779
3780    /// Sets the tip area of @tooltip to the area @path, @column and @cell have
3781    /// in common.  For example if @path is [`None`] and @column is set, the tip
3782    /// area will be set to the full area covered by @column.  See also
3783    /// gtk_tooltip_set_tip_area().
3784    ///
3785    /// Note that if @path is not specified and @cell is set and part of a column
3786    /// containing the expander, the tooltip might not show and hide at the correct
3787    /// position.  In such cases @path must be set to the current node under the
3788    /// mouse cursor for this function to operate correctly.
3789    ///
3790    /// See also gtk_tree_view_set_tooltip_column() for a simpler alternative.
3791    ///
3792    /// # Deprecated since 4.10
3793    ///
3794    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
3795    /// ## `tooltip`
3796    /// a [`Tooltip`][crate::Tooltip]
3797    /// ## `path`
3798    /// a [`TreePath`][crate::TreePath]
3799    /// ## `column`
3800    /// a [`TreeViewColumn`][crate::TreeViewColumn]
3801    /// ## `cell`
3802    /// a [`CellRenderer`][crate::CellRenderer]
3803    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
3804    #[allow(deprecated)]
3805    #[doc(alias = "gtk_tree_view_set_tooltip_cell")]
3806    fn set_tooltip_cell(
3807        &self,
3808        tooltip: &Tooltip,
3809        path: Option<&TreePath>,
3810        column: Option<&TreeViewColumn>,
3811        cell: Option<&impl IsA<CellRenderer>>,
3812    ) {
3813        unsafe {
3814            ffi::gtk_tree_view_set_tooltip_cell(
3815                self.as_ref().to_glib_none().0,
3816                tooltip.to_glib_none().0,
3817                mut_override(path.to_glib_none().0),
3818                column.to_glib_none().0,
3819                cell.map(|p| p.as_ref()).to_glib_none().0,
3820            );
3821        }
3822    }
3823
3824    /// If you only plan to have simple (text-only) tooltips on full rows, you
3825    /// can use this function to have [`TreeView`][crate::TreeView] handle these automatically
3826    /// for you. @column should be set to the column in @self’s model
3827    /// containing the tooltip texts, or -1 to disable this feature.
3828    ///
3829    /// When enabled, `GtkWidget:has-tooltip` will be set to [`true`] and
3830    /// @self will connect a `GtkWidget::query-tooltip` signal handler.
3831    ///
3832    /// Note that the signal handler sets the text with gtk_tooltip_set_markup(),
3833    /// so &, <, etc have to be escaped in the text.
3834    ///
3835    /// # Deprecated since 4.10
3836    ///
3837    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
3838    /// ## `column`
3839    /// an integer, which is a valid column number for @self’s model
3840    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
3841    #[allow(deprecated)]
3842    #[doc(alias = "gtk_tree_view_set_tooltip_column")]
3843    #[doc(alias = "tooltip-column")]
3844    fn set_tooltip_column(&self, column: i32) {
3845        unsafe {
3846            ffi::gtk_tree_view_set_tooltip_column(self.as_ref().to_glib_none().0, column);
3847        }
3848    }
3849
3850    /// Sets the tip area of @tooltip to be the area covered by the row at @path.
3851    /// See also gtk_tree_view_set_tooltip_column() for a simpler alternative.
3852    /// See also gtk_tooltip_set_tip_area().
3853    ///
3854    /// # Deprecated since 4.10
3855    ///
3856    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
3857    /// ## `tooltip`
3858    /// a [`Tooltip`][crate::Tooltip]
3859    /// ## `path`
3860    /// a [`TreePath`][crate::TreePath]
3861    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
3862    #[allow(deprecated)]
3863    #[doc(alias = "gtk_tree_view_set_tooltip_row")]
3864    fn set_tooltip_row(&self, tooltip: &Tooltip, path: &TreePath) {
3865        unsafe {
3866            ffi::gtk_tree_view_set_tooltip_row(
3867                self.as_ref().to_glib_none().0,
3868                tooltip.to_glib_none().0,
3869                mut_override(path.to_glib_none().0),
3870            );
3871        }
3872    }
3873
3874    /// Undoes the effect of
3875    /// gtk_tree_view_enable_model_drag_dest(). Calling this method sets
3876    /// [`TreeView`][crate::TreeView]:reorderable to [`false`].
3877    ///
3878    /// # Deprecated since 4.10
3879    ///
3880    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
3881    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
3882    #[allow(deprecated)]
3883    #[doc(alias = "gtk_tree_view_unset_rows_drag_dest")]
3884    fn unset_rows_drag_dest(&self) {
3885        unsafe {
3886            ffi::gtk_tree_view_unset_rows_drag_dest(self.as_ref().to_glib_none().0);
3887        }
3888    }
3889
3890    /// Undoes the effect of
3891    /// gtk_tree_view_enable_model_drag_source(). Calling this method sets
3892    /// [`TreeView`][crate::TreeView]:reorderable to [`false`].
3893    ///
3894    /// # Deprecated since 4.10
3895    ///
3896    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
3897    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
3898    #[allow(deprecated)]
3899    #[doc(alias = "gtk_tree_view_unset_rows_drag_source")]
3900    fn unset_rows_drag_source(&self) {
3901        unsafe {
3902            ffi::gtk_tree_view_unset_rows_drag_source(self.as_ref().to_glib_none().0);
3903        }
3904    }
3905
3906    #[doc(alias = "enable-grid-lines")]
3907    fn enable_grid_lines(&self) -> TreeViewGridLines {
3908        ObjectExt::property(self.as_ref(), "enable-grid-lines")
3909    }
3910
3911    #[doc(alias = "enable-grid-lines")]
3912    fn set_enable_grid_lines(&self, enable_grid_lines: TreeViewGridLines) {
3913        ObjectExt::set_property(self.as_ref(), "enable-grid-lines", enable_grid_lines)
3914    }
3915
3916    /// The number of columns of the treeview has changed.
3917    #[doc(alias = "columns-changed")]
3918    fn connect_columns_changed<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3919        unsafe extern "C" fn columns_changed_trampoline<P: IsA<TreeView>, F: Fn(&P) + 'static>(
3920            this: *mut ffi::GtkTreeView,
3921            f: glib::ffi::gpointer,
3922        ) {
3923            let f: &F = &*(f as *const F);
3924            f(TreeView::from_glib_borrow(this).unsafe_cast_ref())
3925        }
3926        unsafe {
3927            let f: Box_<F> = Box_::new(f);
3928            connect_raw(
3929                self.as_ptr() as *mut _,
3930                b"columns-changed\0".as_ptr() as *const _,
3931                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3932                    columns_changed_trampoline::<Self, F> as *const (),
3933                )),
3934                Box_::into_raw(f),
3935            )
3936        }
3937    }
3938
3939    /// The position of the cursor (focused cell) has changed.
3940    #[doc(alias = "cursor-changed")]
3941    fn connect_cursor_changed<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3942        unsafe extern "C" fn cursor_changed_trampoline<P: IsA<TreeView>, F: Fn(&P) + 'static>(
3943            this: *mut ffi::GtkTreeView,
3944            f: glib::ffi::gpointer,
3945        ) {
3946            let f: &F = &*(f as *const F);
3947            f(TreeView::from_glib_borrow(this).unsafe_cast_ref())
3948        }
3949        unsafe {
3950            let f: Box_<F> = Box_::new(f);
3951            connect_raw(
3952                self.as_ptr() as *mut _,
3953                b"cursor-changed\0".as_ptr() as *const _,
3954                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3955                    cursor_changed_trampoline::<Self, F> as *const (),
3956                )),
3957                Box_::into_raw(f),
3958            )
3959        }
3960    }
3961
3962    #[doc(alias = "expand-collapse-cursor-row")]
3963    fn connect_expand_collapse_cursor_row<F: Fn(&Self, bool, bool, bool) -> bool + 'static>(
3964        &self,
3965        f: F,
3966    ) -> SignalHandlerId {
3967        unsafe extern "C" fn expand_collapse_cursor_row_trampoline<
3968            P: IsA<TreeView>,
3969            F: Fn(&P, bool, bool, bool) -> bool + 'static,
3970        >(
3971            this: *mut ffi::GtkTreeView,
3972            object: glib::ffi::gboolean,
3973            p0: glib::ffi::gboolean,
3974            p1: glib::ffi::gboolean,
3975            f: glib::ffi::gpointer,
3976        ) -> glib::ffi::gboolean {
3977            let f: &F = &*(f as *const F);
3978            f(
3979                TreeView::from_glib_borrow(this).unsafe_cast_ref(),
3980                from_glib(object),
3981                from_glib(p0),
3982                from_glib(p1),
3983            )
3984            .into_glib()
3985        }
3986        unsafe {
3987            let f: Box_<F> = Box_::new(f);
3988            connect_raw(
3989                self.as_ptr() as *mut _,
3990                b"expand-collapse-cursor-row\0".as_ptr() as *const _,
3991                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3992                    expand_collapse_cursor_row_trampoline::<Self, F> as *const (),
3993                )),
3994                Box_::into_raw(f),
3995            )
3996        }
3997    }
3998
3999    fn emit_expand_collapse_cursor_row(&self, object: bool, p0: bool, p1: bool) -> bool {
4000        self.emit_by_name("expand-collapse-cursor-row", &[&object, &p0, &p1])
4001    }
4002
4003    /// The [`TreeView`][crate::TreeView]::move-cursor signal is a [keybinding
4004    /// signal][`SignalAction`][crate::SignalAction] which gets emitted when the user
4005    /// presses one of the cursor keys.
4006    ///
4007    /// Applications should not connect to it, but may emit it with
4008    /// g_signal_emit_by_name() if they need to control the cursor
4009    /// programmatically. In contrast to gtk_tree_view_set_cursor() and
4010    /// gtk_tree_view_set_cursor_on_cell() when moving horizontally
4011    /// [`TreeView`][crate::TreeView]::move-cursor does not reset the current selection.
4012    /// ## `step`
4013    /// the granularity of the move, as a [`MovementStep`][crate::MovementStep].
4014    ///     [`MovementStep::LogicalPositions`][crate::MovementStep::LogicalPositions], [`MovementStep::VisualPositions`][crate::MovementStep::VisualPositions],
4015    ///     [`MovementStep::DisplayLines`][crate::MovementStep::DisplayLines], [`MovementStep::Pages`][crate::MovementStep::Pages] and
4016    ///     [`MovementStep::BufferEnds`][crate::MovementStep::BufferEnds] are supported.
4017    ///     [`MovementStep::LogicalPositions`][crate::MovementStep::LogicalPositions] and [`MovementStep::VisualPositions`][crate::MovementStep::VisualPositions]
4018    ///     are treated identically.
4019    /// ## `direction`
4020    /// the direction to move: +1 to move forwards; -1 to move
4021    ///     backwards. The resulting movement is undefined for all other values.
4022    /// ## `extend`
4023    /// whether to extend the selection
4024    /// ## `modify`
4025    /// whether to modify the selection
4026    ///
4027    /// # Returns
4028    ///
4029    /// [`true`] if @step is supported, [`false`] otherwise.
4030    #[doc(alias = "move-cursor")]
4031    fn connect_move_cursor<F: Fn(&Self, MovementStep, i32, bool, bool) -> bool + 'static>(
4032        &self,
4033        f: F,
4034    ) -> SignalHandlerId {
4035        unsafe extern "C" fn move_cursor_trampoline<
4036            P: IsA<TreeView>,
4037            F: Fn(&P, MovementStep, i32, bool, bool) -> bool + 'static,
4038        >(
4039            this: *mut ffi::GtkTreeView,
4040            step: ffi::GtkMovementStep,
4041            direction: std::ffi::c_int,
4042            extend: glib::ffi::gboolean,
4043            modify: glib::ffi::gboolean,
4044            f: glib::ffi::gpointer,
4045        ) -> glib::ffi::gboolean {
4046            let f: &F = &*(f as *const F);
4047            f(
4048                TreeView::from_glib_borrow(this).unsafe_cast_ref(),
4049                from_glib(step),
4050                direction,
4051                from_glib(extend),
4052                from_glib(modify),
4053            )
4054            .into_glib()
4055        }
4056        unsafe {
4057            let f: Box_<F> = Box_::new(f);
4058            connect_raw(
4059                self.as_ptr() as *mut _,
4060                b"move-cursor\0".as_ptr() as *const _,
4061                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4062                    move_cursor_trampoline::<Self, F> as *const (),
4063                )),
4064                Box_::into_raw(f),
4065            )
4066        }
4067    }
4068
4069    fn emit_move_cursor(
4070        &self,
4071        step: MovementStep,
4072        direction: i32,
4073        extend: bool,
4074        modify: bool,
4075    ) -> bool {
4076        self.emit_by_name("move-cursor", &[&step, &direction, &extend, &modify])
4077    }
4078
4079    /// The "row-activated" signal is emitted when the method
4080    /// [`row_activated()`][Self::row_activated()] is called.
4081    ///
4082    /// This signal is emitted when the user double-clicks a treeview row with the
4083    /// [`activate-on-single-click`][struct@crate::TreeView#activate-on-single-click] property set to [`false`],
4084    /// or when the user single-clicks a row when that property set to [`true`].
4085    ///
4086    /// This signal is also emitted when a non-editable row is selected and one
4087    /// of the keys: <kbd>Space</kbd>, <kbd>Shift</kbd>+<kbd>Space</kbd>,
4088    /// <kbd>Return</kbd> or <kbd>Enter</kbd> is pressed.
4089    ///
4090    /// For selection handling refer to the
4091    /// [tree widget conceptual overview](section-tree-widget.html)
4092    /// as well as [`TreeSelection`][crate::TreeSelection].
4093    /// ## `path`
4094    /// the [`TreePath`][crate::TreePath] for the activated row
4095    /// ## `column`
4096    /// the [`TreeViewColumn`][crate::TreeViewColumn] in which the activation occurred
4097    #[doc(alias = "row-activated")]
4098    fn connect_row_activated<F: Fn(&Self, &TreePath, Option<&TreeViewColumn>) + 'static>(
4099        &self,
4100        f: F,
4101    ) -> SignalHandlerId {
4102        unsafe extern "C" fn row_activated_trampoline<
4103            P: IsA<TreeView>,
4104            F: Fn(&P, &TreePath, Option<&TreeViewColumn>) + 'static,
4105        >(
4106            this: *mut ffi::GtkTreeView,
4107            path: *mut ffi::GtkTreePath,
4108            column: *mut ffi::GtkTreeViewColumn,
4109            f: glib::ffi::gpointer,
4110        ) {
4111            let f: &F = &*(f as *const F);
4112            f(
4113                TreeView::from_glib_borrow(this).unsafe_cast_ref(),
4114                &from_glib_borrow(path),
4115                Option::<TreeViewColumn>::from_glib_borrow(column)
4116                    .as_ref()
4117                    .as_ref(),
4118            )
4119        }
4120        unsafe {
4121            let f: Box_<F> = Box_::new(f);
4122            connect_raw(
4123                self.as_ptr() as *mut _,
4124                b"row-activated\0".as_ptr() as *const _,
4125                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4126                    row_activated_trampoline::<Self, F> as *const (),
4127                )),
4128                Box_::into_raw(f),
4129            )
4130        }
4131    }
4132
4133    fn emit_row_activated(&self, path: &TreePath, column: Option<&TreeViewColumn>) {
4134        self.emit_by_name::<()>("row-activated", &[&path, &column]);
4135    }
4136
4137    /// The given row has been collapsed (child nodes are hidden).
4138    /// ## `iter`
4139    /// the tree iter of the collapsed row
4140    /// ## `path`
4141    /// a tree path that points to the row
4142    #[doc(alias = "row-collapsed")]
4143    fn connect_row_collapsed<F: Fn(&Self, &TreeIter, &TreePath) + 'static>(
4144        &self,
4145        f: F,
4146    ) -> SignalHandlerId {
4147        unsafe extern "C" fn row_collapsed_trampoline<
4148            P: IsA<TreeView>,
4149            F: Fn(&P, &TreeIter, &TreePath) + 'static,
4150        >(
4151            this: *mut ffi::GtkTreeView,
4152            iter: *mut ffi::GtkTreeIter,
4153            path: *mut ffi::GtkTreePath,
4154            f: glib::ffi::gpointer,
4155        ) {
4156            let f: &F = &*(f as *const F);
4157            f(
4158                TreeView::from_glib_borrow(this).unsafe_cast_ref(),
4159                &from_glib_borrow(iter),
4160                &from_glib_borrow(path),
4161            )
4162        }
4163        unsafe {
4164            let f: Box_<F> = Box_::new(f);
4165            connect_raw(
4166                self.as_ptr() as *mut _,
4167                b"row-collapsed\0".as_ptr() as *const _,
4168                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4169                    row_collapsed_trampoline::<Self, F> as *const (),
4170                )),
4171                Box_::into_raw(f),
4172            )
4173        }
4174    }
4175
4176    /// The given row has been expanded (child nodes are shown).
4177    /// ## `iter`
4178    /// the tree iter of the expanded row
4179    /// ## `path`
4180    /// a tree path that points to the row
4181    #[doc(alias = "row-expanded")]
4182    fn connect_row_expanded<F: Fn(&Self, &TreeIter, &TreePath) + 'static>(
4183        &self,
4184        f: F,
4185    ) -> SignalHandlerId {
4186        unsafe extern "C" fn row_expanded_trampoline<
4187            P: IsA<TreeView>,
4188            F: Fn(&P, &TreeIter, &TreePath) + 'static,
4189        >(
4190            this: *mut ffi::GtkTreeView,
4191            iter: *mut ffi::GtkTreeIter,
4192            path: *mut ffi::GtkTreePath,
4193            f: glib::ffi::gpointer,
4194        ) {
4195            let f: &F = &*(f as *const F);
4196            f(
4197                TreeView::from_glib_borrow(this).unsafe_cast_ref(),
4198                &from_glib_borrow(iter),
4199                &from_glib_borrow(path),
4200            )
4201        }
4202        unsafe {
4203            let f: Box_<F> = Box_::new(f);
4204            connect_raw(
4205                self.as_ptr() as *mut _,
4206                b"row-expanded\0".as_ptr() as *const _,
4207                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4208                    row_expanded_trampoline::<Self, F> as *const (),
4209                )),
4210                Box_::into_raw(f),
4211            )
4212        }
4213    }
4214
4215    #[doc(alias = "select-all")]
4216    fn connect_select_all<F: Fn(&Self) -> bool + 'static>(&self, f: F) -> SignalHandlerId {
4217        unsafe extern "C" fn select_all_trampoline<
4218            P: IsA<TreeView>,
4219            F: Fn(&P) -> bool + 'static,
4220        >(
4221            this: *mut ffi::GtkTreeView,
4222            f: glib::ffi::gpointer,
4223        ) -> glib::ffi::gboolean {
4224            let f: &F = &*(f as *const F);
4225            f(TreeView::from_glib_borrow(this).unsafe_cast_ref()).into_glib()
4226        }
4227        unsafe {
4228            let f: Box_<F> = Box_::new(f);
4229            connect_raw(
4230                self.as_ptr() as *mut _,
4231                b"select-all\0".as_ptr() as *const _,
4232                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4233                    select_all_trampoline::<Self, F> as *const (),
4234                )),
4235                Box_::into_raw(f),
4236            )
4237        }
4238    }
4239
4240    fn emit_select_all(&self) -> bool {
4241        self.emit_by_name("select-all", &[])
4242    }
4243
4244    #[doc(alias = "select-cursor-parent")]
4245    fn connect_select_cursor_parent<F: Fn(&Self) -> bool + 'static>(
4246        &self,
4247        f: F,
4248    ) -> SignalHandlerId {
4249        unsafe extern "C" fn select_cursor_parent_trampoline<
4250            P: IsA<TreeView>,
4251            F: Fn(&P) -> bool + 'static,
4252        >(
4253            this: *mut ffi::GtkTreeView,
4254            f: glib::ffi::gpointer,
4255        ) -> glib::ffi::gboolean {
4256            let f: &F = &*(f as *const F);
4257            f(TreeView::from_glib_borrow(this).unsafe_cast_ref()).into_glib()
4258        }
4259        unsafe {
4260            let f: Box_<F> = Box_::new(f);
4261            connect_raw(
4262                self.as_ptr() as *mut _,
4263                b"select-cursor-parent\0".as_ptr() as *const _,
4264                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4265                    select_cursor_parent_trampoline::<Self, F> as *const (),
4266                )),
4267                Box_::into_raw(f),
4268            )
4269        }
4270    }
4271
4272    fn emit_select_cursor_parent(&self) -> bool {
4273        self.emit_by_name("select-cursor-parent", &[])
4274    }
4275
4276    #[doc(alias = "select-cursor-row")]
4277    fn connect_select_cursor_row<F: Fn(&Self, bool) -> bool + 'static>(
4278        &self,
4279        f: F,
4280    ) -> SignalHandlerId {
4281        unsafe extern "C" fn select_cursor_row_trampoline<
4282            P: IsA<TreeView>,
4283            F: Fn(&P, bool) -> bool + 'static,
4284        >(
4285            this: *mut ffi::GtkTreeView,
4286            object: glib::ffi::gboolean,
4287            f: glib::ffi::gpointer,
4288        ) -> glib::ffi::gboolean {
4289            let f: &F = &*(f as *const F);
4290            f(
4291                TreeView::from_glib_borrow(this).unsafe_cast_ref(),
4292                from_glib(object),
4293            )
4294            .into_glib()
4295        }
4296        unsafe {
4297            let f: Box_<F> = Box_::new(f);
4298            connect_raw(
4299                self.as_ptr() as *mut _,
4300                b"select-cursor-row\0".as_ptr() as *const _,
4301                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4302                    select_cursor_row_trampoline::<Self, F> as *const (),
4303                )),
4304                Box_::into_raw(f),
4305            )
4306        }
4307    }
4308
4309    fn emit_select_cursor_row(&self, object: bool) -> bool {
4310        self.emit_by_name("select-cursor-row", &[&object])
4311    }
4312
4313    #[doc(alias = "start-interactive-search")]
4314    fn connect_start_interactive_search<F: Fn(&Self) -> bool + 'static>(
4315        &self,
4316        f: F,
4317    ) -> SignalHandlerId {
4318        unsafe extern "C" fn start_interactive_search_trampoline<
4319            P: IsA<TreeView>,
4320            F: Fn(&P) -> bool + 'static,
4321        >(
4322            this: *mut ffi::GtkTreeView,
4323            f: glib::ffi::gpointer,
4324        ) -> glib::ffi::gboolean {
4325            let f: &F = &*(f as *const F);
4326            f(TreeView::from_glib_borrow(this).unsafe_cast_ref()).into_glib()
4327        }
4328        unsafe {
4329            let f: Box_<F> = Box_::new(f);
4330            connect_raw(
4331                self.as_ptr() as *mut _,
4332                b"start-interactive-search\0".as_ptr() as *const _,
4333                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4334                    start_interactive_search_trampoline::<Self, F> as *const (),
4335                )),
4336                Box_::into_raw(f),
4337            )
4338        }
4339    }
4340
4341    fn emit_start_interactive_search(&self) -> bool {
4342        self.emit_by_name("start-interactive-search", &[])
4343    }
4344
4345    /// The given row is about to be collapsed (hide its children nodes). Use this
4346    /// signal if you need to control the collapsibility of individual rows.
4347    /// ## `iter`
4348    /// the tree iter of the row to collapse
4349    /// ## `path`
4350    /// a tree path that points to the row
4351    ///
4352    /// # Returns
4353    ///
4354    /// [`false`] to allow collapsing, [`true`] to reject
4355    #[doc(alias = "test-collapse-row")]
4356    fn connect_test_collapse_row<
4357        F: Fn(&Self, &TreeIter, &TreePath) -> glib::Propagation + 'static,
4358    >(
4359        &self,
4360        f: F,
4361    ) -> SignalHandlerId {
4362        unsafe extern "C" fn test_collapse_row_trampoline<
4363            P: IsA<TreeView>,
4364            F: Fn(&P, &TreeIter, &TreePath) -> glib::Propagation + 'static,
4365        >(
4366            this: *mut ffi::GtkTreeView,
4367            iter: *mut ffi::GtkTreeIter,
4368            path: *mut ffi::GtkTreePath,
4369            f: glib::ffi::gpointer,
4370        ) -> glib::ffi::gboolean {
4371            let f: &F = &*(f as *const F);
4372            f(
4373                TreeView::from_glib_borrow(this).unsafe_cast_ref(),
4374                &from_glib_borrow(iter),
4375                &from_glib_borrow(path),
4376            )
4377            .into_glib()
4378        }
4379        unsafe {
4380            let f: Box_<F> = Box_::new(f);
4381            connect_raw(
4382                self.as_ptr() as *mut _,
4383                b"test-collapse-row\0".as_ptr() as *const _,
4384                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4385                    test_collapse_row_trampoline::<Self, F> as *const (),
4386                )),
4387                Box_::into_raw(f),
4388            )
4389        }
4390    }
4391
4392    /// The given row is about to be expanded (show its children nodes). Use this
4393    /// signal if you need to control the expandability of individual rows.
4394    /// ## `iter`
4395    /// the tree iter of the row to expand
4396    /// ## `path`
4397    /// a tree path that points to the row
4398    ///
4399    /// # Returns
4400    ///
4401    /// [`false`] to allow expansion, [`true`] to reject
4402    #[doc(alias = "test-expand-row")]
4403    fn connect_test_expand_row<
4404        F: Fn(&Self, &TreeIter, &TreePath) -> glib::Propagation + 'static,
4405    >(
4406        &self,
4407        f: F,
4408    ) -> SignalHandlerId {
4409        unsafe extern "C" fn test_expand_row_trampoline<
4410            P: IsA<TreeView>,
4411            F: Fn(&P, &TreeIter, &TreePath) -> glib::Propagation + 'static,
4412        >(
4413            this: *mut ffi::GtkTreeView,
4414            iter: *mut ffi::GtkTreeIter,
4415            path: *mut ffi::GtkTreePath,
4416            f: glib::ffi::gpointer,
4417        ) -> glib::ffi::gboolean {
4418            let f: &F = &*(f as *const F);
4419            f(
4420                TreeView::from_glib_borrow(this).unsafe_cast_ref(),
4421                &from_glib_borrow(iter),
4422                &from_glib_borrow(path),
4423            )
4424            .into_glib()
4425        }
4426        unsafe {
4427            let f: Box_<F> = Box_::new(f);
4428            connect_raw(
4429                self.as_ptr() as *mut _,
4430                b"test-expand-row\0".as_ptr() as *const _,
4431                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4432                    test_expand_row_trampoline::<Self, F> as *const (),
4433                )),
4434                Box_::into_raw(f),
4435            )
4436        }
4437    }
4438
4439    #[doc(alias = "toggle-cursor-row")]
4440    fn connect_toggle_cursor_row<F: Fn(&Self) -> bool + 'static>(&self, f: F) -> SignalHandlerId {
4441        unsafe extern "C" fn toggle_cursor_row_trampoline<
4442            P: IsA<TreeView>,
4443            F: Fn(&P) -> bool + 'static,
4444        >(
4445            this: *mut ffi::GtkTreeView,
4446            f: glib::ffi::gpointer,
4447        ) -> glib::ffi::gboolean {
4448            let f: &F = &*(f as *const F);
4449            f(TreeView::from_glib_borrow(this).unsafe_cast_ref()).into_glib()
4450        }
4451        unsafe {
4452            let f: Box_<F> = Box_::new(f);
4453            connect_raw(
4454                self.as_ptr() as *mut _,
4455                b"toggle-cursor-row\0".as_ptr() as *const _,
4456                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4457                    toggle_cursor_row_trampoline::<Self, F> as *const (),
4458                )),
4459                Box_::into_raw(f),
4460            )
4461        }
4462    }
4463
4464    fn emit_toggle_cursor_row(&self) -> bool {
4465        self.emit_by_name("toggle-cursor-row", &[])
4466    }
4467
4468    #[doc(alias = "unselect-all")]
4469    fn connect_unselect_all<F: Fn(&Self) -> bool + 'static>(&self, f: F) -> SignalHandlerId {
4470        unsafe extern "C" fn unselect_all_trampoline<
4471            P: IsA<TreeView>,
4472            F: Fn(&P) -> bool + 'static,
4473        >(
4474            this: *mut ffi::GtkTreeView,
4475            f: glib::ffi::gpointer,
4476        ) -> glib::ffi::gboolean {
4477            let f: &F = &*(f as *const F);
4478            f(TreeView::from_glib_borrow(this).unsafe_cast_ref()).into_glib()
4479        }
4480        unsafe {
4481            let f: Box_<F> = Box_::new(f);
4482            connect_raw(
4483                self.as_ptr() as *mut _,
4484                b"unselect-all\0".as_ptr() as *const _,
4485                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4486                    unselect_all_trampoline::<Self, F> as *const (),
4487                )),
4488                Box_::into_raw(f),
4489            )
4490        }
4491    }
4492
4493    fn emit_unselect_all(&self) -> bool {
4494        self.emit_by_name("unselect-all", &[])
4495    }
4496
4497    #[doc(alias = "activate-on-single-click")]
4498    fn connect_activate_on_single_click_notify<F: Fn(&Self) + 'static>(
4499        &self,
4500        f: F,
4501    ) -> SignalHandlerId {
4502        unsafe extern "C" fn notify_activate_on_single_click_trampoline<
4503            P: IsA<TreeView>,
4504            F: Fn(&P) + 'static,
4505        >(
4506            this: *mut ffi::GtkTreeView,
4507            _param_spec: glib::ffi::gpointer,
4508            f: glib::ffi::gpointer,
4509        ) {
4510            let f: &F = &*(f as *const F);
4511            f(TreeView::from_glib_borrow(this).unsafe_cast_ref())
4512        }
4513        unsafe {
4514            let f: Box_<F> = Box_::new(f);
4515            connect_raw(
4516                self.as_ptr() as *mut _,
4517                b"notify::activate-on-single-click\0".as_ptr() as *const _,
4518                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4519                    notify_activate_on_single_click_trampoline::<Self, F> as *const (),
4520                )),
4521                Box_::into_raw(f),
4522            )
4523        }
4524    }
4525
4526    #[doc(alias = "enable-grid-lines")]
4527    fn connect_enable_grid_lines_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4528        unsafe extern "C" fn notify_enable_grid_lines_trampoline<
4529            P: IsA<TreeView>,
4530            F: Fn(&P) + 'static,
4531        >(
4532            this: *mut ffi::GtkTreeView,
4533            _param_spec: glib::ffi::gpointer,
4534            f: glib::ffi::gpointer,
4535        ) {
4536            let f: &F = &*(f as *const F);
4537            f(TreeView::from_glib_borrow(this).unsafe_cast_ref())
4538        }
4539        unsafe {
4540            let f: Box_<F> = Box_::new(f);
4541            connect_raw(
4542                self.as_ptr() as *mut _,
4543                b"notify::enable-grid-lines\0".as_ptr() as *const _,
4544                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4545                    notify_enable_grid_lines_trampoline::<Self, F> as *const (),
4546                )),
4547                Box_::into_raw(f),
4548            )
4549        }
4550    }
4551
4552    #[doc(alias = "enable-search")]
4553    fn connect_enable_search_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4554        unsafe extern "C" fn notify_enable_search_trampoline<
4555            P: IsA<TreeView>,
4556            F: Fn(&P) + 'static,
4557        >(
4558            this: *mut ffi::GtkTreeView,
4559            _param_spec: glib::ffi::gpointer,
4560            f: glib::ffi::gpointer,
4561        ) {
4562            let f: &F = &*(f as *const F);
4563            f(TreeView::from_glib_borrow(this).unsafe_cast_ref())
4564        }
4565        unsafe {
4566            let f: Box_<F> = Box_::new(f);
4567            connect_raw(
4568                self.as_ptr() as *mut _,
4569                b"notify::enable-search\0".as_ptr() as *const _,
4570                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4571                    notify_enable_search_trampoline::<Self, F> as *const (),
4572                )),
4573                Box_::into_raw(f),
4574            )
4575        }
4576    }
4577
4578    #[doc(alias = "enable-tree-lines")]
4579    fn connect_enable_tree_lines_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4580        unsafe extern "C" fn notify_enable_tree_lines_trampoline<
4581            P: IsA<TreeView>,
4582            F: Fn(&P) + 'static,
4583        >(
4584            this: *mut ffi::GtkTreeView,
4585            _param_spec: glib::ffi::gpointer,
4586            f: glib::ffi::gpointer,
4587        ) {
4588            let f: &F = &*(f as *const F);
4589            f(TreeView::from_glib_borrow(this).unsafe_cast_ref())
4590        }
4591        unsafe {
4592            let f: Box_<F> = Box_::new(f);
4593            connect_raw(
4594                self.as_ptr() as *mut _,
4595                b"notify::enable-tree-lines\0".as_ptr() as *const _,
4596                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4597                    notify_enable_tree_lines_trampoline::<Self, F> as *const (),
4598                )),
4599                Box_::into_raw(f),
4600            )
4601        }
4602    }
4603
4604    #[doc(alias = "expander-column")]
4605    fn connect_expander_column_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4606        unsafe extern "C" fn notify_expander_column_trampoline<
4607            P: IsA<TreeView>,
4608            F: Fn(&P) + 'static,
4609        >(
4610            this: *mut ffi::GtkTreeView,
4611            _param_spec: glib::ffi::gpointer,
4612            f: glib::ffi::gpointer,
4613        ) {
4614            let f: &F = &*(f as *const F);
4615            f(TreeView::from_glib_borrow(this).unsafe_cast_ref())
4616        }
4617        unsafe {
4618            let f: Box_<F> = Box_::new(f);
4619            connect_raw(
4620                self.as_ptr() as *mut _,
4621                b"notify::expander-column\0".as_ptr() as *const _,
4622                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4623                    notify_expander_column_trampoline::<Self, F> as *const (),
4624                )),
4625                Box_::into_raw(f),
4626            )
4627        }
4628    }
4629
4630    #[doc(alias = "fixed-height-mode")]
4631    fn connect_fixed_height_mode_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4632        unsafe extern "C" fn notify_fixed_height_mode_trampoline<
4633            P: IsA<TreeView>,
4634            F: Fn(&P) + 'static,
4635        >(
4636            this: *mut ffi::GtkTreeView,
4637            _param_spec: glib::ffi::gpointer,
4638            f: glib::ffi::gpointer,
4639        ) {
4640            let f: &F = &*(f as *const F);
4641            f(TreeView::from_glib_borrow(this).unsafe_cast_ref())
4642        }
4643        unsafe {
4644            let f: Box_<F> = Box_::new(f);
4645            connect_raw(
4646                self.as_ptr() as *mut _,
4647                b"notify::fixed-height-mode\0".as_ptr() as *const _,
4648                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4649                    notify_fixed_height_mode_trampoline::<Self, F> as *const (),
4650                )),
4651                Box_::into_raw(f),
4652            )
4653        }
4654    }
4655
4656    #[doc(alias = "headers-clickable")]
4657    fn connect_headers_clickable_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4658        unsafe extern "C" fn notify_headers_clickable_trampoline<
4659            P: IsA<TreeView>,
4660            F: Fn(&P) + 'static,
4661        >(
4662            this: *mut ffi::GtkTreeView,
4663            _param_spec: glib::ffi::gpointer,
4664            f: glib::ffi::gpointer,
4665        ) {
4666            let f: &F = &*(f as *const F);
4667            f(TreeView::from_glib_borrow(this).unsafe_cast_ref())
4668        }
4669        unsafe {
4670            let f: Box_<F> = Box_::new(f);
4671            connect_raw(
4672                self.as_ptr() as *mut _,
4673                b"notify::headers-clickable\0".as_ptr() as *const _,
4674                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4675                    notify_headers_clickable_trampoline::<Self, F> as *const (),
4676                )),
4677                Box_::into_raw(f),
4678            )
4679        }
4680    }
4681
4682    #[doc(alias = "headers-visible")]
4683    fn connect_headers_visible_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4684        unsafe extern "C" fn notify_headers_visible_trampoline<
4685            P: IsA<TreeView>,
4686            F: Fn(&P) + 'static,
4687        >(
4688            this: *mut ffi::GtkTreeView,
4689            _param_spec: glib::ffi::gpointer,
4690            f: glib::ffi::gpointer,
4691        ) {
4692            let f: &F = &*(f as *const F);
4693            f(TreeView::from_glib_borrow(this).unsafe_cast_ref())
4694        }
4695        unsafe {
4696            let f: Box_<F> = Box_::new(f);
4697            connect_raw(
4698                self.as_ptr() as *mut _,
4699                b"notify::headers-visible\0".as_ptr() as *const _,
4700                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4701                    notify_headers_visible_trampoline::<Self, F> as *const (),
4702                )),
4703                Box_::into_raw(f),
4704            )
4705        }
4706    }
4707
4708    #[doc(alias = "hover-expand")]
4709    fn connect_hover_expand_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4710        unsafe extern "C" fn notify_hover_expand_trampoline<
4711            P: IsA<TreeView>,
4712            F: Fn(&P) + 'static,
4713        >(
4714            this: *mut ffi::GtkTreeView,
4715            _param_spec: glib::ffi::gpointer,
4716            f: glib::ffi::gpointer,
4717        ) {
4718            let f: &F = &*(f as *const F);
4719            f(TreeView::from_glib_borrow(this).unsafe_cast_ref())
4720        }
4721        unsafe {
4722            let f: Box_<F> = Box_::new(f);
4723            connect_raw(
4724                self.as_ptr() as *mut _,
4725                b"notify::hover-expand\0".as_ptr() as *const _,
4726                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4727                    notify_hover_expand_trampoline::<Self, F> as *const (),
4728                )),
4729                Box_::into_raw(f),
4730            )
4731        }
4732    }
4733
4734    #[doc(alias = "hover-selection")]
4735    fn connect_hover_selection_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4736        unsafe extern "C" fn notify_hover_selection_trampoline<
4737            P: IsA<TreeView>,
4738            F: Fn(&P) + 'static,
4739        >(
4740            this: *mut ffi::GtkTreeView,
4741            _param_spec: glib::ffi::gpointer,
4742            f: glib::ffi::gpointer,
4743        ) {
4744            let f: &F = &*(f as *const F);
4745            f(TreeView::from_glib_borrow(this).unsafe_cast_ref())
4746        }
4747        unsafe {
4748            let f: Box_<F> = Box_::new(f);
4749            connect_raw(
4750                self.as_ptr() as *mut _,
4751                b"notify::hover-selection\0".as_ptr() as *const _,
4752                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4753                    notify_hover_selection_trampoline::<Self, F> as *const (),
4754                )),
4755                Box_::into_raw(f),
4756            )
4757        }
4758    }
4759
4760    #[doc(alias = "level-indentation")]
4761    fn connect_level_indentation_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4762        unsafe extern "C" fn notify_level_indentation_trampoline<
4763            P: IsA<TreeView>,
4764            F: Fn(&P) + 'static,
4765        >(
4766            this: *mut ffi::GtkTreeView,
4767            _param_spec: glib::ffi::gpointer,
4768            f: glib::ffi::gpointer,
4769        ) {
4770            let f: &F = &*(f as *const F);
4771            f(TreeView::from_glib_borrow(this).unsafe_cast_ref())
4772        }
4773        unsafe {
4774            let f: Box_<F> = Box_::new(f);
4775            connect_raw(
4776                self.as_ptr() as *mut _,
4777                b"notify::level-indentation\0".as_ptr() as *const _,
4778                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4779                    notify_level_indentation_trampoline::<Self, F> as *const (),
4780                )),
4781                Box_::into_raw(f),
4782            )
4783        }
4784    }
4785
4786    #[doc(alias = "model")]
4787    fn connect_model_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4788        unsafe extern "C" fn notify_model_trampoline<P: IsA<TreeView>, F: Fn(&P) + 'static>(
4789            this: *mut ffi::GtkTreeView,
4790            _param_spec: glib::ffi::gpointer,
4791            f: glib::ffi::gpointer,
4792        ) {
4793            let f: &F = &*(f as *const F);
4794            f(TreeView::from_glib_borrow(this).unsafe_cast_ref())
4795        }
4796        unsafe {
4797            let f: Box_<F> = Box_::new(f);
4798            connect_raw(
4799                self.as_ptr() as *mut _,
4800                b"notify::model\0".as_ptr() as *const _,
4801                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4802                    notify_model_trampoline::<Self, F> as *const (),
4803                )),
4804                Box_::into_raw(f),
4805            )
4806        }
4807    }
4808
4809    #[doc(alias = "reorderable")]
4810    fn connect_reorderable_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4811        unsafe extern "C" fn notify_reorderable_trampoline<
4812            P: IsA<TreeView>,
4813            F: Fn(&P) + 'static,
4814        >(
4815            this: *mut ffi::GtkTreeView,
4816            _param_spec: glib::ffi::gpointer,
4817            f: glib::ffi::gpointer,
4818        ) {
4819            let f: &F = &*(f as *const F);
4820            f(TreeView::from_glib_borrow(this).unsafe_cast_ref())
4821        }
4822        unsafe {
4823            let f: Box_<F> = Box_::new(f);
4824            connect_raw(
4825                self.as_ptr() as *mut _,
4826                b"notify::reorderable\0".as_ptr() as *const _,
4827                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4828                    notify_reorderable_trampoline::<Self, F> as *const (),
4829                )),
4830                Box_::into_raw(f),
4831            )
4832        }
4833    }
4834
4835    #[doc(alias = "rubber-banding")]
4836    fn connect_rubber_banding_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4837        unsafe extern "C" fn notify_rubber_banding_trampoline<
4838            P: IsA<TreeView>,
4839            F: Fn(&P) + 'static,
4840        >(
4841            this: *mut ffi::GtkTreeView,
4842            _param_spec: glib::ffi::gpointer,
4843            f: glib::ffi::gpointer,
4844        ) {
4845            let f: &F = &*(f as *const F);
4846            f(TreeView::from_glib_borrow(this).unsafe_cast_ref())
4847        }
4848        unsafe {
4849            let f: Box_<F> = Box_::new(f);
4850            connect_raw(
4851                self.as_ptr() as *mut _,
4852                b"notify::rubber-banding\0".as_ptr() as *const _,
4853                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4854                    notify_rubber_banding_trampoline::<Self, F> as *const (),
4855                )),
4856                Box_::into_raw(f),
4857            )
4858        }
4859    }
4860
4861    #[doc(alias = "search-column")]
4862    fn connect_search_column_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4863        unsafe extern "C" fn notify_search_column_trampoline<
4864            P: IsA<TreeView>,
4865            F: Fn(&P) + 'static,
4866        >(
4867            this: *mut ffi::GtkTreeView,
4868            _param_spec: glib::ffi::gpointer,
4869            f: glib::ffi::gpointer,
4870        ) {
4871            let f: &F = &*(f as *const F);
4872            f(TreeView::from_glib_borrow(this).unsafe_cast_ref())
4873        }
4874        unsafe {
4875            let f: Box_<F> = Box_::new(f);
4876            connect_raw(
4877                self.as_ptr() as *mut _,
4878                b"notify::search-column\0".as_ptr() as *const _,
4879                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4880                    notify_search_column_trampoline::<Self, F> as *const (),
4881                )),
4882                Box_::into_raw(f),
4883            )
4884        }
4885    }
4886
4887    #[doc(alias = "show-expanders")]
4888    fn connect_show_expanders_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4889        unsafe extern "C" fn notify_show_expanders_trampoline<
4890            P: IsA<TreeView>,
4891            F: Fn(&P) + 'static,
4892        >(
4893            this: *mut ffi::GtkTreeView,
4894            _param_spec: glib::ffi::gpointer,
4895            f: glib::ffi::gpointer,
4896        ) {
4897            let f: &F = &*(f as *const F);
4898            f(TreeView::from_glib_borrow(this).unsafe_cast_ref())
4899        }
4900        unsafe {
4901            let f: Box_<F> = Box_::new(f);
4902            connect_raw(
4903                self.as_ptr() as *mut _,
4904                b"notify::show-expanders\0".as_ptr() as *const _,
4905                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4906                    notify_show_expanders_trampoline::<Self, F> as *const (),
4907                )),
4908                Box_::into_raw(f),
4909            )
4910        }
4911    }
4912
4913    #[doc(alias = "tooltip-column")]
4914    fn connect_tooltip_column_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4915        unsafe extern "C" fn notify_tooltip_column_trampoline<
4916            P: IsA<TreeView>,
4917            F: Fn(&P) + 'static,
4918        >(
4919            this: *mut ffi::GtkTreeView,
4920            _param_spec: glib::ffi::gpointer,
4921            f: glib::ffi::gpointer,
4922        ) {
4923            let f: &F = &*(f as *const F);
4924            f(TreeView::from_glib_borrow(this).unsafe_cast_ref())
4925        }
4926        unsafe {
4927            let f: Box_<F> = Box_::new(f);
4928            connect_raw(
4929                self.as_ptr() as *mut _,
4930                b"notify::tooltip-column\0".as_ptr() as *const _,
4931                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4932                    notify_tooltip_column_trampoline::<Self, F> as *const (),
4933                )),
4934                Box_::into_raw(f),
4935            )
4936        }
4937    }
4938}
4939
4940impl<O: IsA<TreeView>> TreeViewExt for O {}