Skip to main content

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    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, ffi,
11};
12use glib::{
13    object::ObjectType as _,
14    prelude::*,
15    signal::{SignalHandlerId, connect_raw},
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    /// <picture>
26    ///   <source srcset="list-and-tree-dark.png" media="(prefers-color-scheme: dark)">
27    ///   <img alt="An example GtkTreeView" src="list-and-tree.png">
28    /// </picture>
29    ///
30    /// Widget that displays any object that implements the [`TreeModel`][crate::TreeModel] interface.
31    ///
32    /// Please refer to the [tree widget conceptual overview](section-tree-widget.html)
33    /// for an overview of all the objects and data types related to the tree
34    /// widget and how they work together.
35    ///
36    /// ## Coordinate systems in GtkTreeView API
37    ///
38    /// Several different coordinate systems are exposed in the [`TreeView`][crate::TreeView] API.
39    /// These are:
40    ///
41    /// ![](tree-view-coordinates.png)
42    ///
43    /// - Widget coordinates: Coordinates relative to the widget (usually `widget->window`).
44    ///
45    /// - Bin window coordinates: Coordinates relative to the window that GtkTreeView renders to.
46    ///
47    /// - Tree coordinates: Coordinates relative to the entire scrollable area of GtkTreeView. These
48    ///   coordinates start at (0, 0) for row 0 of the tree.
49    ///
50    /// Several functions are available for converting between the different
51    /// coordinate systems.  The most common translations are between widget and bin
52    /// window coordinates and between bin window and tree coordinates. For the
53    /// former you can use [`TreeViewExt::convert_widget_to_bin_window_coords()`][crate::prelude::TreeViewExt::convert_widget_to_bin_window_coords()]
54    /// (and vice versa), for the latter [`TreeViewExt::convert_bin_window_to_tree_coords()`][crate::prelude::TreeViewExt::convert_bin_window_to_tree_coords()]
55    /// (and vice versa).
56    ///
57    /// ## [`TreeView`][crate::TreeView] as [`Buildable`][crate::Buildable]
58    ///
59    /// The [`TreeView`][crate::TreeView] implementation of the [`Buildable`][crate::Buildable] interface accepts
60    /// [`TreeViewColumn`][crate::TreeViewColumn] objects as `<child>` elements and exposes the
61    /// internal [`TreeSelection`][crate::TreeSelection] in UI definitions.
62    ///
63    /// An example of a UI definition fragment with [`TreeView`][crate::TreeView]:
64    ///
65    /// ```xml
66    /// <object class="GtkTreeView" id="treeview">
67    ///   <property name="model">liststore1</property>
68    ///   <child>
69    ///     <object class="GtkTreeViewColumn" id="test-column">
70    ///       <property name="title">Test</property>
71    ///       <child>
72    ///         <object class="GtkCellRendererText" id="test-renderer"/>
73    ///         <attributes>
74    ///           <attribute name="text">1</attribute>
75    ///         </attributes>
76    ///       </child>
77    ///     </object>
78    ///   </child>
79    ///   <child internal-child="selection">
80    ///     <object class="GtkTreeSelection" id="selection">
81    ///       <signal name="changed" handler="on_treeview_selection_changed"/>
82    ///     </object>
83    ///   </child>
84    /// </object>
85    /// ```
86    ///
87    /// ## CSS nodes
88    ///
89    /// ```text
90    /// treeview.view
91    /// ├── header
92    /// │   ├── button
93    /// │   │   ╰── [sort-indicator]
94    /// ┊   ┊
95    /// │   ╰── button
96    /// │       ╰── [sort-indicator]
97    /// │
98    /// ├── [rubberband]
99    /// ╰── [dndtarget]
100    /// ```
101    ///
102    /// [`TreeView`][crate::TreeView] has a main CSS node with name `treeview` and style class `.view`.
103    /// It has a subnode with name `header`, which is the parent for all the column
104    /// header widgets' CSS nodes.
105    ///
106    /// Each column header consists of a `button`, which among other content, has a
107    /// child with name `sort-indicator`, which carries the `.ascending` or `.descending`
108    /// style classes when the column header should show a sort indicator. The CSS
109    /// is expected to provide a suitable image using the `-gtk-icon-source` property.
110    ///
111    /// For rubberband selection, a subnode with name `rubberband` is used.
112    ///
113    /// For the drop target location during DND, a subnode with name `dndtarget` is used.
114    ///
115    /// ## Properties
116    ///
117    ///
118    /// #### `activate-on-single-click`
119    ///  The activate-on-single-click property specifies whether the "row-activated" signal
120    /// will be emitted after a single click.
121    ///
122    /// Readable | Writeable
123    ///
124    ///
125    /// #### `enable-grid-lines`
126    ///  Readable | Writeable
127    ///
128    ///
129    /// #### `enable-search`
130    ///  Readable | Writeable
131    ///
132    ///
133    /// #### `enable-tree-lines`
134    ///  Readable | Writeable
135    ///
136    ///
137    /// #### `expander-column`
138    ///  Readable | Writeable
139    ///
140    ///
141    /// #### `fixed-height-mode`
142    ///  Setting the ::fixed-height-mode property to [`true`] speeds up
143    /// [`TreeView`][crate::TreeView] by assuming that all rows have the same height.
144    /// Only enable this option if all rows are the same height.
145    /// Please see gtk_tree_view_set_fixed_height_mode() for more
146    /// information on this option.
147    ///
148    /// Readable | Writeable
149    ///
150    ///
151    /// #### `headers-clickable`
152    ///  Readable | Writeable
153    ///
154    ///
155    /// #### `headers-visible`
156    ///  Readable | Writeable
157    ///
158    ///
159    /// #### `hover-expand`
160    ///  Enables or disables the hover expansion mode of @tree_view.
161    /// Hover expansion makes rows expand or collapse if the pointer moves
162    /// over them.
163    ///
164    /// This mode is primarily intended for treeviews in popups, e.g.
165    /// in [`ComboBox`][crate::ComboBox] or [`EntryCompletion`][crate::EntryCompletion].
166    ///
167    /// Readable | Writeable
168    ///
169    ///
170    /// #### `hover-selection`
171    ///  Enables or disables the hover selection mode of @tree_view.
172    /// Hover selection makes the selected row follow the pointer.
173    /// Currently, this works only for the selection modes
174    /// [`SelectionMode::Single`][crate::SelectionMode::Single] and [`SelectionMode::Browse`][crate::SelectionMode::Browse].
175    ///
176    /// This mode is primarily intended for treeviews in popups, e.g.
177    /// in [`ComboBox`][crate::ComboBox] or [`EntryCompletion`][crate::EntryCompletion].
178    ///
179    /// Readable | Writeable
180    ///
181    ///
182    /// #### `level-indentation`
183    ///  Extra indentation for each level.
184    ///
185    /// Readable | Writeable
186    ///
187    ///
188    /// #### `model`
189    ///  Readable | Writeable
190    ///
191    ///
192    /// #### `reorderable`
193    ///  Readable | Writeable
194    ///
195    ///
196    /// #### `rubber-banding`
197    ///  Readable | Writeable
198    ///
199    ///
200    /// #### `search-column`
201    ///  Readable | Writeable
202    ///
203    ///
204    /// #### `show-expanders`
205    ///  [`true`] if the view has expanders.
206    ///
207    /// Readable | Writeable
208    ///
209    ///
210    /// #### `tooltip-column`
211    ///  Readable | Writeable
212    /// <details><summary><h4>Widget</h4></summary>
213    ///
214    ///
215    /// #### `can-focus`
216    ///  Whether the widget or any of its descendents can accept
217    /// the input focus.
218    ///
219    /// This property is meant to be set by widget implementations,
220    /// typically in their instance init function.
221    ///
222    /// Readable | Writeable
223    ///
224    ///
225    /// #### `can-target`
226    ///  Whether the widget can receive pointer events.
227    ///
228    /// Readable | Writeable
229    ///
230    ///
231    /// #### `css-classes`
232    ///  A list of css classes applied to this widget.
233    ///
234    /// Readable | Writeable
235    ///
236    ///
237    /// #### `css-name`
238    ///  The name of this widget in the CSS tree.
239    ///
240    /// This property is meant to be set by widget implementations,
241    /// typically in their instance init function.
242    ///
243    /// Readable | Writeable | Construct Only
244    ///
245    ///
246    /// #### `cursor`
247    ///  The cursor used by @widget.
248    ///
249    /// Readable | Writeable
250    ///
251    ///
252    /// #### `focus-on-click`
253    ///  Whether the widget should grab focus when it is clicked with the mouse.
254    ///
255    /// This property is only relevant for widgets that can take focus.
256    ///
257    /// Readable | Writeable
258    ///
259    ///
260    /// #### `focusable`
261    ///  Whether this widget itself will accept the input focus.
262    ///
263    /// Readable | Writeable
264    ///
265    ///
266    /// #### `halign`
267    ///  How to distribute horizontal space if widget gets extra space.
268    ///
269    /// Readable | Writeable
270    ///
271    ///
272    /// #### `has-default`
273    ///  Whether the widget is the default widget.
274    ///
275    /// Readable
276    ///
277    ///
278    /// #### `has-focus`
279    ///  Whether the widget has the input focus.
280    ///
281    /// Readable
282    ///
283    ///
284    /// #### `has-tooltip`
285    ///  Enables or disables the emission of the [`query-tooltip`][struct@crate::Widget#query-tooltip]
286    /// signal on @widget.
287    ///
288    /// A true value indicates that @widget can have a tooltip, in this case
289    /// the widget will be queried using [`query-tooltip`][struct@crate::Widget#query-tooltip] to
290    /// determine whether it will provide a tooltip or not.
291    ///
292    /// Readable | Writeable
293    ///
294    ///
295    /// #### `height-request`
296    ///  Overrides for height request of the widget.
297    ///
298    /// If this is -1, the natural request will be used.
299    ///
300    /// Readable | Writeable
301    ///
302    ///
303    /// #### `hexpand`
304    ///  Whether to expand horizontally.
305    ///
306    /// Readable | Writeable
307    ///
308    ///
309    /// #### `hexpand-set`
310    ///  Whether to use the `hexpand` property.
311    ///
312    /// Readable | Writeable
313    ///
314    ///
315    /// #### `layout-manager`
316    ///  The [`LayoutManager`][crate::LayoutManager] instance to use to compute
317    /// the preferred size of the widget, and allocate its children.
318    ///
319    /// This property is meant to be set by widget implementations,
320    /// typically in their instance init function.
321    ///
322    /// Readable | Writeable
323    ///
324    ///
325    /// #### `limit-events`
326    ///  Makes this widget act like a modal dialog, with respect to
327    /// event delivery.
328    ///
329    /// Global event controllers will not handle events with targets
330    /// inside the widget, unless they are set up to ignore propagation
331    /// limits. See [`EventControllerExt::set_propagation_limit()`][crate::prelude::EventControllerExt::set_propagation_limit()].
332    ///
333    /// Readable | Writeable
334    ///
335    ///
336    /// #### `margin-bottom`
337    ///  Margin on bottom side of widget.
338    ///
339    /// This property adds margin outside of the widget's normal size
340    /// request, the margin will be added in addition to the size from
341    /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
342    ///
343    /// Readable | Writeable
344    ///
345    ///
346    /// #### `margin-end`
347    ///  Margin on end of widget, horizontally.
348    ///
349    /// This property supports left-to-right and right-to-left text
350    /// directions.
351    ///
352    /// This property adds margin outside of the widget's normal size
353    /// request, the margin will be added in addition to the size from
354    /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
355    ///
356    /// Readable | Writeable
357    ///
358    ///
359    /// #### `margin-start`
360    ///  Margin on start of widget, horizontally.
361    ///
362    /// This property supports left-to-right and right-to-left text
363    /// directions.
364    ///
365    /// This property adds margin outside of the widget's normal size
366    /// request, the margin will be added in addition to the size from
367    /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
368    ///
369    /// Readable | Writeable
370    ///
371    ///
372    /// #### `margin-top`
373    ///  Margin on top side of widget.
374    ///
375    /// This property adds margin outside of the widget's normal size
376    /// request, the margin will be added in addition to the size from
377    /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
378    ///
379    /// Readable | Writeable
380    ///
381    ///
382    /// #### `name`
383    ///  The name of the widget.
384    ///
385    /// Readable | Writeable
386    ///
387    ///
388    /// #### `opacity`
389    ///  The requested opacity of the widget.
390    ///
391    /// Readable | Writeable
392    ///
393    ///
394    /// #### `overflow`
395    ///  How content outside the widget's content area is treated.
396    ///
397    /// This property is meant to be set by widget implementations,
398    /// typically in their instance init function.
399    ///
400    /// Readable | Writeable
401    ///
402    ///
403    /// #### `parent`
404    ///  The parent widget of this widget.
405    ///
406    /// Readable
407    ///
408    ///
409    /// #### `receives-default`
410    ///  Whether the widget will receive the default action when it is focused.
411    ///
412    /// Readable | Writeable
413    ///
414    ///
415    /// #### `root`
416    ///  The [`Root`][crate::Root] widget of the widget tree containing this widget.
417    ///
418    /// This will be `NULL` if the widget is not contained in a root widget.
419    ///
420    /// Readable
421    ///
422    ///
423    /// #### `scale-factor`
424    ///  The scale factor of the widget.
425    ///
426    /// Readable
427    ///
428    ///
429    /// #### `sensitive`
430    ///  Whether the widget responds to input.
431    ///
432    /// Readable | Writeable
433    ///
434    ///
435    /// #### `tooltip-markup`
436    ///  Sets the text of tooltip to be the given string, which is marked up
437    /// with Pango markup.
438    ///
439    /// Also see [`Tooltip::set_markup()`][crate::Tooltip::set_markup()].
440    ///
441    /// This is a convenience property which will take care of getting the
442    /// tooltip shown if the given string is not `NULL`:
443    /// [`has-tooltip`][struct@crate::Widget#has-tooltip] will automatically be set to true
444    /// and there will be taken care of [`query-tooltip`][struct@crate::Widget#query-tooltip] in
445    /// the default signal handler.
446    ///
447    /// Note that if both [`tooltip-text`][struct@crate::Widget#tooltip-text] and
448    /// [`tooltip-markup`][struct@crate::Widget#tooltip-markup] are set, the last one wins.
449    ///
450    /// Readable | Writeable
451    ///
452    ///
453    /// #### `tooltip-text`
454    ///  Sets the text of tooltip to be the given string.
455    ///
456    /// Also see [`Tooltip::set_text()`][crate::Tooltip::set_text()].
457    ///
458    /// This is a convenience property which will take care of getting the
459    /// tooltip shown if the given string is not `NULL`:
460    /// [`has-tooltip`][struct@crate::Widget#has-tooltip] will automatically be set to true
461    /// and there will be taken care of [`query-tooltip`][struct@crate::Widget#query-tooltip] in
462    /// the default signal handler.
463    ///
464    /// Note that if both [`tooltip-text`][struct@crate::Widget#tooltip-text] and
465    /// [`tooltip-markup`][struct@crate::Widget#tooltip-markup] are set, the last one wins.
466    ///
467    /// Readable | Writeable
468    ///
469    ///
470    /// #### `valign`
471    ///  How to distribute vertical space if widget gets extra space.
472    ///
473    /// Readable | Writeable
474    ///
475    ///
476    /// #### `vexpand`
477    ///  Whether to expand vertically.
478    ///
479    /// Readable | Writeable
480    ///
481    ///
482    /// #### `vexpand-set`
483    ///  Whether to use the `vexpand` property.
484    ///
485    /// Readable | Writeable
486    ///
487    ///
488    /// #### `visible`
489    ///  Whether the widget is visible.
490    ///
491    /// Readable | Writeable
492    ///
493    ///
494    /// #### `width-request`
495    ///  Overrides for width request of the widget.
496    ///
497    /// If this is -1, the natural request will be used.
498    ///
499    /// Readable | Writeable
500    /// </details>
501    /// <details><summary><h4>Accessible</h4></summary>
502    ///
503    ///
504    /// #### `accessible-role`
505    ///  The accessible role of the given [`Accessible`][crate::Accessible] implementation.
506    ///
507    /// The accessible role cannot be changed once set.
508    ///
509    /// Readable | Writeable
510    /// </details>
511    /// <details><summary><h4>Scrollable</h4></summary>
512    ///
513    ///
514    /// #### `hadjustment`
515    ///  Horizontal [`Adjustment`][crate::Adjustment] of the scrollable widget.
516    ///
517    /// This adjustment is shared between the scrollable widget and its parent.
518    ///
519    /// Readable | Writeable | Construct
520    ///
521    ///
522    /// #### `hscroll-policy`
523    ///  Determines when horizontal scrolling should start.
524    ///
525    /// Readable | Writeable
526    ///
527    ///
528    /// #### `vadjustment`
529    ///  Vertical [`Adjustment`][crate::Adjustment] of the scrollable widget.
530    ///
531    /// This adjustment is shared between the scrollable widget and its parent.
532    ///
533    /// Readable | Writeable | Construct
534    ///
535    ///
536    /// #### `vscroll-policy`
537    ///  Determines when vertical scrolling should start.
538    ///
539    /// Readable | Writeable
540    /// </details>
541    ///
542    /// ## Signals
543    ///
544    ///
545    /// #### `columns-changed`
546    ///  The number of columns of the treeview has changed.
547    ///
548    ///
549    ///
550    ///
551    /// #### `cursor-changed`
552    ///  The position of the cursor (focused cell) has changed.
553    ///
554    ///
555    ///
556    ///
557    /// #### `expand-collapse-cursor-row`
558    ///  Action
559    ///
560    ///
561    /// #### `move-cursor`
562    ///  The [`TreeView`][crate::TreeView]::move-cursor signal is a [keybinding
563    /// signal][`SignalAction`][crate::SignalAction] which gets emitted when the user
564    /// presses one of the cursor keys.
565    ///
566    /// Applications should not connect to it, but may emit it with
567    /// g_signal_emit_by_name() if they need to control the cursor
568    /// programmatically. In contrast to gtk_tree_view_set_cursor() and
569    /// gtk_tree_view_set_cursor_on_cell() when moving horizontally
570    /// [`TreeView`][crate::TreeView]::move-cursor does not reset the current selection.
571    ///
572    /// Action
573    ///
574    ///
575    /// #### `row-activated`
576    ///  The "row-activated" signal is emitted when the method
577    /// [`TreeViewExt::row_activated()`][crate::prelude::TreeViewExt::row_activated()] is called.
578    ///
579    /// This signal is emitted when the user double-clicks a treeview row with the
580    /// [`activate-on-single-click`][struct@crate::TreeView#activate-on-single-click] property set to [`false`],
581    /// or when the user single-clicks a row when that property set to [`true`].
582    ///
583    /// This signal is also emitted when a non-editable row is selected and one
584    /// of the keys: <kbd>Space</kbd>, <kbd>Shift</kbd>+<kbd>Space</kbd>,
585    /// <kbd>Return</kbd> or <kbd>Enter</kbd> is pressed.
586    ///
587    /// For selection handling refer to the
588    /// [tree widget conceptual overview](section-tree-widget.html)
589    /// as well as [`TreeSelection`][crate::TreeSelection].
590    ///
591    /// Action
592    ///
593    ///
594    /// #### `row-collapsed`
595    ///  The given row has been collapsed (child nodes are hidden).
596    ///
597    ///
598    ///
599    ///
600    /// #### `row-expanded`
601    ///  The given row has been expanded (child nodes are shown).
602    ///
603    ///
604    ///
605    ///
606    /// #### `select-all`
607    ///  Action
608    ///
609    ///
610    /// #### `select-cursor-parent`
611    ///  Action
612    ///
613    ///
614    /// #### `select-cursor-row`
615    ///  Action
616    ///
617    ///
618    /// #### `start-interactive-search`
619    ///  Action
620    ///
621    ///
622    /// #### `test-collapse-row`
623    ///  The given row is about to be collapsed (hide its children nodes). Use this
624    /// signal if you need to control the collapsibility of individual rows.
625    ///
626    ///
627    ///
628    ///
629    /// #### `test-expand-row`
630    ///  The given row is about to be expanded (show its children nodes). Use this
631    /// signal if you need to control the expandability of individual rows.
632    ///
633    ///
634    ///
635    ///
636    /// #### `toggle-cursor-row`
637    ///  Action
638    ///
639    ///
640    /// #### `unselect-all`
641    ///  Action
642    /// <details><summary><h4>Widget</h4></summary>
643    ///
644    ///
645    /// #### `destroy`
646    ///  Signals that all holders of a reference to the widget should release
647    /// the reference that they hold.
648    ///
649    /// May result in finalization of the widget if all references are released.
650    ///
651    /// This signal is not suitable for saving widget state.
652    ///
653    ///
654    ///
655    ///
656    /// #### `direction-changed`
657    ///  Emitted when the text direction of a widget changes.
658    ///
659    ///
660    ///
661    ///
662    /// #### `hide`
663    ///  Emitted when @widget is hidden.
664    ///
665    ///
666    ///
667    ///
668    /// #### `keynav-failed`
669    ///  Emitted if keyboard navigation fails.
670    ///
671    /// See [`WidgetExt::keynav_failed()`][crate::prelude::WidgetExt::keynav_failed()] for details.
672    ///
673    ///
674    ///
675    ///
676    /// #### `map`
677    ///  Emitted when @widget is going to be mapped.
678    ///
679    /// A widget is mapped when the widget is visible (which is controlled with
680    /// [`visible`][struct@crate::Widget#visible]) and all its parents up to the toplevel widget
681    /// are also visible.
682    ///
683    /// The `::map` signal can be used to determine whether a widget will be drawn,
684    /// for instance it can resume an animation that was stopped during the
685    /// emission of [`unmap`][struct@crate::Widget#unmap].
686    ///
687    ///
688    ///
689    ///
690    /// #### `mnemonic-activate`
691    ///  Emitted when a widget is activated via a mnemonic.
692    ///
693    /// The default handler for this signal activates @widget if @group_cycling
694    /// is false, or just makes @widget grab focus if @group_cycling is true.
695    ///
696    ///
697    ///
698    ///
699    /// #### `move-focus`
700    ///  Emitted when the focus is moved.
701    ///
702    /// The `::move-focus` signal is a [keybinding signal](class.SignalAction.html).
703    ///
704    /// The default bindings for this signal are <kbd>Tab</kbd> to move forward,
705    /// and <kbd>Shift</kbd>+<kbd>Tab</kbd> to move backward.
706    ///
707    /// Action
708    ///
709    ///
710    /// #### `query-tooltip`
711    ///  Emitted when the widget’s tooltip is about to be shown.
712    ///
713    /// This happens when the [`has-tooltip`][struct@crate::Widget#has-tooltip] property
714    /// is true and the hover timeout has expired with the cursor hovering
715    /// above @widget; or emitted when @widget got focus in keyboard mode.
716    ///
717    /// Using the given coordinates, the signal handler should determine
718    /// whether a tooltip should be shown for @widget. If this is the case
719    /// true should be returned, false otherwise. Note that if @keyboard_mode
720    /// is true, the values of @x and @y are undefined and should not be used.
721    ///
722    /// The signal handler is free to manipulate @tooltip with the therefore
723    /// destined function calls.
724    ///
725    ///
726    ///
727    ///
728    /// #### `realize`
729    ///  Emitted when @widget is associated with a [`gdk::Surface`][crate::gdk::Surface].
730    ///
731    /// This means that [`WidgetExt::realize()`][crate::prelude::WidgetExt::realize()] has been called
732    /// or the widget has been mapped (that is, it is going to be drawn).
733    ///
734    ///
735    ///
736    ///
737    /// #### `show`
738    ///  Emitted when @widget is shown.
739    ///
740    ///
741    ///
742    ///
743    /// #### `state-flags-changed`
744    ///  Emitted when the widget state changes.
745    ///
746    /// See [`WidgetExt::state_flags()`][crate::prelude::WidgetExt::state_flags()].
747    ///
748    ///
749    ///
750    ///
751    /// #### `unmap`
752    ///  Emitted when @widget is going to be unmapped.
753    ///
754    /// A widget is unmapped when either it or any of its parents up to the
755    /// toplevel widget have been set as hidden.
756    ///
757    /// As `::unmap` indicates that a widget will not be shown any longer,
758    /// it can be used to, for example, stop an animation on the widget.
759    ///
760    ///
761    ///
762    ///
763    /// #### `unrealize`
764    ///  Emitted when the [`gdk::Surface`][crate::gdk::Surface] associated with @widget is destroyed.
765    ///
766    /// This means that [`WidgetExt::unrealize()`][crate::prelude::WidgetExt::unrealize()] has been called
767    /// or the widget has been unmapped (that is, it is going to be hidden).
768    ///
769    ///
770    /// </details>
771    ///
772    /// # Implements
773    ///
774    /// [`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]
775    #[doc(alias = "GtkTreeView")]
776    pub struct TreeView(Object<ffi::GtkTreeView, ffi::GtkTreeViewClass>) @extends Widget, @implements Accessible, Buildable, ConstraintTarget, Scrollable;
777
778    match fn {
779        type_ => || ffi::gtk_tree_view_get_type(),
780    }
781}
782
783impl TreeView {
784    pub const NONE: Option<&'static TreeView> = None;
785
786    /// Creates a new [`TreeView`][crate::TreeView] widget.
787    ///
788    /// # Deprecated since 4.10
789    ///
790    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
791    ///
792    /// # Returns
793    ///
794    /// A newly created [`TreeView`][crate::TreeView] widget.
795    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
796    #[allow(deprecated)]
797    #[doc(alias = "gtk_tree_view_new")]
798    pub fn new() -> TreeView {
799        assert_initialized_main_thread!();
800        unsafe { Widget::from_glib_none(ffi::gtk_tree_view_new()).unsafe_cast() }
801    }
802
803    /// Creates a new [`TreeView`][crate::TreeView] widget with the model initialized to @model.
804    ///
805    /// # Deprecated since 4.10
806    ///
807    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
808    /// ## `model`
809    /// the model.
810    ///
811    /// # Returns
812    ///
813    /// A newly created [`TreeView`][crate::TreeView] widget.
814    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
815    #[allow(deprecated)]
816    #[doc(alias = "gtk_tree_view_new_with_model")]
817    #[doc(alias = "new_with_model")]
818    pub fn with_model(model: &impl IsA<TreeModel>) -> TreeView {
819        skip_assert_initialized!();
820        unsafe {
821            Widget::from_glib_none(ffi::gtk_tree_view_new_with_model(
822                model.as_ref().to_glib_none().0,
823            ))
824            .unsafe_cast()
825        }
826    }
827
828    // rustdoc-stripper-ignore-next
829    /// Creates a new builder-pattern struct instance to construct [`TreeView`] objects.
830    ///
831    /// This method returns an instance of [`TreeViewBuilder`](crate::builders::TreeViewBuilder) which can be used to create [`TreeView`] objects.
832    pub fn builder() -> TreeViewBuilder {
833        TreeViewBuilder::new()
834    }
835}
836
837impl Default for TreeView {
838    fn default() -> Self {
839        Self::new()
840    }
841}
842
843// rustdoc-stripper-ignore-next
844/// A [builder-pattern] type to construct [`TreeView`] objects.
845///
846/// [builder-pattern]: https://doc.rust-lang.org/1.0.0/style/ownership/builders.html
847#[must_use = "The builder must be built to be used"]
848pub struct TreeViewBuilder {
849    builder: glib::object::ObjectBuilder<'static, TreeView>,
850}
851
852impl TreeViewBuilder {
853    fn new() -> Self {
854        Self {
855            builder: glib::object::Object::builder(),
856        }
857    }
858
859    /// The activate-on-single-click property specifies whether the "row-activated" signal
860    /// will be emitted after a single click.
861    pub fn activate_on_single_click(self, activate_on_single_click: bool) -> Self {
862        Self {
863            builder: self
864                .builder
865                .property("activate-on-single-click", activate_on_single_click),
866        }
867    }
868
869    pub fn enable_grid_lines(self, enable_grid_lines: TreeViewGridLines) -> Self {
870        Self {
871            builder: self
872                .builder
873                .property("enable-grid-lines", enable_grid_lines),
874        }
875    }
876
877    pub fn enable_search(self, enable_search: bool) -> Self {
878        Self {
879            builder: self.builder.property("enable-search", enable_search),
880        }
881    }
882
883    pub fn enable_tree_lines(self, enable_tree_lines: bool) -> Self {
884        Self {
885            builder: self
886                .builder
887                .property("enable-tree-lines", enable_tree_lines),
888        }
889    }
890
891    pub fn expander_column(self, expander_column: &TreeViewColumn) -> Self {
892        Self {
893            builder: self
894                .builder
895                .property("expander-column", expander_column.clone()),
896        }
897    }
898
899    /// Setting the ::fixed-height-mode property to [`true`] speeds up
900    /// [`TreeView`][crate::TreeView] by assuming that all rows have the same height.
901    /// Only enable this option if all rows are the same height.
902    /// Please see gtk_tree_view_set_fixed_height_mode() for more
903    /// information on this option.
904    pub fn fixed_height_mode(self, fixed_height_mode: bool) -> Self {
905        Self {
906            builder: self
907                .builder
908                .property("fixed-height-mode", fixed_height_mode),
909        }
910    }
911
912    pub fn headers_clickable(self, headers_clickable: bool) -> Self {
913        Self {
914            builder: self
915                .builder
916                .property("headers-clickable", headers_clickable),
917        }
918    }
919
920    pub fn headers_visible(self, headers_visible: bool) -> Self {
921        Self {
922            builder: self.builder.property("headers-visible", headers_visible),
923        }
924    }
925
926    /// Enables or disables the hover expansion mode of @tree_view.
927    /// Hover expansion makes rows expand or collapse if the pointer moves
928    /// over them.
929    ///
930    /// This mode is primarily intended for treeviews in popups, e.g.
931    /// in [`ComboBox`][crate::ComboBox] or [`EntryCompletion`][crate::EntryCompletion].
932    pub fn hover_expand(self, hover_expand: bool) -> Self {
933        Self {
934            builder: self.builder.property("hover-expand", hover_expand),
935        }
936    }
937
938    /// Enables or disables the hover selection mode of @tree_view.
939    /// Hover selection makes the selected row follow the pointer.
940    /// Currently, this works only for the selection modes
941    /// [`SelectionMode::Single`][crate::SelectionMode::Single] and [`SelectionMode::Browse`][crate::SelectionMode::Browse].
942    ///
943    /// This mode is primarily intended for treeviews in popups, e.g.
944    /// in [`ComboBox`][crate::ComboBox] or [`EntryCompletion`][crate::EntryCompletion].
945    pub fn hover_selection(self, hover_selection: bool) -> Self {
946        Self {
947            builder: self.builder.property("hover-selection", hover_selection),
948        }
949    }
950
951    /// Extra indentation for each level.
952    pub fn level_indentation(self, level_indentation: i32) -> Self {
953        Self {
954            builder: self
955                .builder
956                .property("level-indentation", level_indentation),
957        }
958    }
959
960    pub fn model(self, model: &impl IsA<TreeModel>) -> Self {
961        Self {
962            builder: self.builder.property("model", model.clone().upcast()),
963        }
964    }
965
966    pub fn reorderable(self, reorderable: bool) -> Self {
967        Self {
968            builder: self.builder.property("reorderable", reorderable),
969        }
970    }
971
972    pub fn rubber_banding(self, rubber_banding: bool) -> Self {
973        Self {
974            builder: self.builder.property("rubber-banding", rubber_banding),
975        }
976    }
977
978    pub fn search_column(self, search_column: i32) -> Self {
979        Self {
980            builder: self.builder.property("search-column", search_column),
981        }
982    }
983
984    /// [`true`] if the view has expanders.
985    pub fn show_expanders(self, show_expanders: bool) -> Self {
986        Self {
987            builder: self.builder.property("show-expanders", show_expanders),
988        }
989    }
990
991    pub fn tooltip_column(self, tooltip_column: i32) -> Self {
992        Self {
993            builder: self.builder.property("tooltip-column", tooltip_column),
994        }
995    }
996
997    /// Whether the widget or any of its descendents can accept
998    /// the input focus.
999    ///
1000    /// This property is meant to be set by widget implementations,
1001    /// typically in their instance init function.
1002    pub fn can_focus(self, can_focus: bool) -> Self {
1003        Self {
1004            builder: self.builder.property("can-focus", can_focus),
1005        }
1006    }
1007
1008    /// Whether the widget can receive pointer events.
1009    pub fn can_target(self, can_target: bool) -> Self {
1010        Self {
1011            builder: self.builder.property("can-target", can_target),
1012        }
1013    }
1014
1015    /// A list of css classes applied to this widget.
1016    pub fn css_classes(self, css_classes: impl Into<glib::StrV>) -> Self {
1017        Self {
1018            builder: self.builder.property("css-classes", css_classes.into()),
1019        }
1020    }
1021
1022    /// The name of this widget in the CSS tree.
1023    ///
1024    /// This property is meant to be set by widget implementations,
1025    /// typically in their instance init function.
1026    pub fn css_name(self, css_name: impl Into<glib::GString>) -> Self {
1027        Self {
1028            builder: self.builder.property("css-name", css_name.into()),
1029        }
1030    }
1031
1032    /// The cursor used by @widget.
1033    pub fn cursor(self, cursor: &gdk::Cursor) -> Self {
1034        Self {
1035            builder: self.builder.property("cursor", cursor.clone()),
1036        }
1037    }
1038
1039    /// Whether the widget should grab focus when it is clicked with the mouse.
1040    ///
1041    /// This property is only relevant for widgets that can take focus.
1042    pub fn focus_on_click(self, focus_on_click: bool) -> Self {
1043        Self {
1044            builder: self.builder.property("focus-on-click", focus_on_click),
1045        }
1046    }
1047
1048    /// Whether this widget itself will accept the input focus.
1049    pub fn focusable(self, focusable: bool) -> Self {
1050        Self {
1051            builder: self.builder.property("focusable", focusable),
1052        }
1053    }
1054
1055    /// How to distribute horizontal space if widget gets extra space.
1056    pub fn halign(self, halign: Align) -> Self {
1057        Self {
1058            builder: self.builder.property("halign", halign),
1059        }
1060    }
1061
1062    /// Enables or disables the emission of the [`query-tooltip`][struct@crate::Widget#query-tooltip]
1063    /// signal on @widget.
1064    ///
1065    /// A true value indicates that @widget can have a tooltip, in this case
1066    /// the widget will be queried using [`query-tooltip`][struct@crate::Widget#query-tooltip] to
1067    /// determine whether it will provide a tooltip or not.
1068    pub fn has_tooltip(self, has_tooltip: bool) -> Self {
1069        Self {
1070            builder: self.builder.property("has-tooltip", has_tooltip),
1071        }
1072    }
1073
1074    /// Overrides for height request of the widget.
1075    ///
1076    /// If this is -1, the natural request will be used.
1077    pub fn height_request(self, height_request: i32) -> Self {
1078        Self {
1079            builder: self.builder.property("height-request", height_request),
1080        }
1081    }
1082
1083    /// Whether to expand horizontally.
1084    pub fn hexpand(self, hexpand: bool) -> Self {
1085        Self {
1086            builder: self.builder.property("hexpand", hexpand),
1087        }
1088    }
1089
1090    /// Whether to use the `hexpand` property.
1091    pub fn hexpand_set(self, hexpand_set: bool) -> Self {
1092        Self {
1093            builder: self.builder.property("hexpand-set", hexpand_set),
1094        }
1095    }
1096
1097    /// The [`LayoutManager`][crate::LayoutManager] instance to use to compute
1098    /// the preferred size of the widget, and allocate its children.
1099    ///
1100    /// This property is meant to be set by widget implementations,
1101    /// typically in their instance init function.
1102    pub fn layout_manager(self, layout_manager: &impl IsA<LayoutManager>) -> Self {
1103        Self {
1104            builder: self
1105                .builder
1106                .property("layout-manager", layout_manager.clone().upcast()),
1107        }
1108    }
1109
1110    /// Makes this widget act like a modal dialog, with respect to
1111    /// event delivery.
1112    ///
1113    /// Global event controllers will not handle events with targets
1114    /// inside the widget, unless they are set up to ignore propagation
1115    /// limits. See [`EventControllerExt::set_propagation_limit()`][crate::prelude::EventControllerExt::set_propagation_limit()].
1116    #[cfg(feature = "v4_18")]
1117    #[cfg_attr(docsrs, doc(cfg(feature = "v4_18")))]
1118    pub fn limit_events(self, limit_events: bool) -> Self {
1119        Self {
1120            builder: self.builder.property("limit-events", limit_events),
1121        }
1122    }
1123
1124    /// Margin on bottom side of widget.
1125    ///
1126    /// This property adds margin outside of the widget's normal size
1127    /// request, the margin will be added in addition to the size from
1128    /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
1129    pub fn margin_bottom(self, margin_bottom: i32) -> Self {
1130        Self {
1131            builder: self.builder.property("margin-bottom", margin_bottom),
1132        }
1133    }
1134
1135    /// Margin on end of widget, horizontally.
1136    ///
1137    /// This property supports left-to-right and right-to-left text
1138    /// directions.
1139    ///
1140    /// This property adds margin outside of the widget's normal size
1141    /// request, the margin will be added in addition to the size from
1142    /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
1143    pub fn margin_end(self, margin_end: i32) -> Self {
1144        Self {
1145            builder: self.builder.property("margin-end", margin_end),
1146        }
1147    }
1148
1149    /// Margin on start of widget, horizontally.
1150    ///
1151    /// This property supports left-to-right and right-to-left text
1152    /// directions.
1153    ///
1154    /// This property adds margin outside of the widget's normal size
1155    /// request, the margin will be added in addition to the size from
1156    /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
1157    pub fn margin_start(self, margin_start: i32) -> Self {
1158        Self {
1159            builder: self.builder.property("margin-start", margin_start),
1160        }
1161    }
1162
1163    /// Margin on top side of widget.
1164    ///
1165    /// This property adds margin outside of the widget's normal size
1166    /// request, the margin will be added in addition to the size from
1167    /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
1168    pub fn margin_top(self, margin_top: i32) -> Self {
1169        Self {
1170            builder: self.builder.property("margin-top", margin_top),
1171        }
1172    }
1173
1174    /// The name of the widget.
1175    pub fn name(self, name: impl Into<glib::GString>) -> Self {
1176        Self {
1177            builder: self.builder.property("name", name.into()),
1178        }
1179    }
1180
1181    /// The requested opacity of the widget.
1182    pub fn opacity(self, opacity: f64) -> Self {
1183        Self {
1184            builder: self.builder.property("opacity", opacity),
1185        }
1186    }
1187
1188    /// How content outside the widget's content area is treated.
1189    ///
1190    /// This property is meant to be set by widget implementations,
1191    /// typically in their instance init function.
1192    pub fn overflow(self, overflow: Overflow) -> Self {
1193        Self {
1194            builder: self.builder.property("overflow", overflow),
1195        }
1196    }
1197
1198    /// Whether the widget will receive the default action when it is focused.
1199    pub fn receives_default(self, receives_default: bool) -> Self {
1200        Self {
1201            builder: self.builder.property("receives-default", receives_default),
1202        }
1203    }
1204
1205    /// Whether the widget responds to input.
1206    pub fn sensitive(self, sensitive: bool) -> Self {
1207        Self {
1208            builder: self.builder.property("sensitive", sensitive),
1209        }
1210    }
1211
1212    /// Sets the text of tooltip to be the given string, which is marked up
1213    /// with Pango markup.
1214    ///
1215    /// Also see [`Tooltip::set_markup()`][crate::Tooltip::set_markup()].
1216    ///
1217    /// This is a convenience property which will take care of getting the
1218    /// tooltip shown if the given string is not `NULL`:
1219    /// [`has-tooltip`][struct@crate::Widget#has-tooltip] will automatically be set to true
1220    /// and there will be taken care of [`query-tooltip`][struct@crate::Widget#query-tooltip] in
1221    /// the default signal handler.
1222    ///
1223    /// Note that if both [`tooltip-text`][struct@crate::Widget#tooltip-text] and
1224    /// [`tooltip-markup`][struct@crate::Widget#tooltip-markup] are set, the last one wins.
1225    pub fn tooltip_markup(self, tooltip_markup: impl Into<glib::GString>) -> Self {
1226        Self {
1227            builder: self
1228                .builder
1229                .property("tooltip-markup", tooltip_markup.into()),
1230        }
1231    }
1232
1233    /// Sets the text of tooltip to be the given string.
1234    ///
1235    /// Also see [`Tooltip::set_text()`][crate::Tooltip::set_text()].
1236    ///
1237    /// This is a convenience property which will take care of getting the
1238    /// tooltip shown if the given string is not `NULL`:
1239    /// [`has-tooltip`][struct@crate::Widget#has-tooltip] will automatically be set to true
1240    /// and there will be taken care of [`query-tooltip`][struct@crate::Widget#query-tooltip] in
1241    /// the default signal handler.
1242    ///
1243    /// Note that if both [`tooltip-text`][struct@crate::Widget#tooltip-text] and
1244    /// [`tooltip-markup`][struct@crate::Widget#tooltip-markup] are set, the last one wins.
1245    pub fn tooltip_text(self, tooltip_text: impl Into<glib::GString>) -> Self {
1246        Self {
1247            builder: self.builder.property("tooltip-text", tooltip_text.into()),
1248        }
1249    }
1250
1251    /// How to distribute vertical space if widget gets extra space.
1252    pub fn valign(self, valign: Align) -> Self {
1253        Self {
1254            builder: self.builder.property("valign", valign),
1255        }
1256    }
1257
1258    /// Whether to expand vertically.
1259    pub fn vexpand(self, vexpand: bool) -> Self {
1260        Self {
1261            builder: self.builder.property("vexpand", vexpand),
1262        }
1263    }
1264
1265    /// Whether to use the `vexpand` property.
1266    pub fn vexpand_set(self, vexpand_set: bool) -> Self {
1267        Self {
1268            builder: self.builder.property("vexpand-set", vexpand_set),
1269        }
1270    }
1271
1272    /// Whether the widget is visible.
1273    pub fn visible(self, visible: bool) -> Self {
1274        Self {
1275            builder: self.builder.property("visible", visible),
1276        }
1277    }
1278
1279    /// Overrides for width request of the widget.
1280    ///
1281    /// If this is -1, the natural request will be used.
1282    pub fn width_request(self, width_request: i32) -> Self {
1283        Self {
1284            builder: self.builder.property("width-request", width_request),
1285        }
1286    }
1287
1288    /// The accessible role of the given [`Accessible`][crate::Accessible] implementation.
1289    ///
1290    /// The accessible role cannot be changed once set.
1291    pub fn accessible_role(self, accessible_role: AccessibleRole) -> Self {
1292        Self {
1293            builder: self.builder.property("accessible-role", accessible_role),
1294        }
1295    }
1296
1297    /// Horizontal [`Adjustment`][crate::Adjustment] of the scrollable widget.
1298    ///
1299    /// This adjustment is shared between the scrollable widget and its parent.
1300    pub fn hadjustment(self, hadjustment: &impl IsA<Adjustment>) -> Self {
1301        Self {
1302            builder: self
1303                .builder
1304                .property("hadjustment", hadjustment.clone().upcast()),
1305        }
1306    }
1307
1308    /// Determines when horizontal scrolling should start.
1309    pub fn hscroll_policy(self, hscroll_policy: ScrollablePolicy) -> Self {
1310        Self {
1311            builder: self.builder.property("hscroll-policy", hscroll_policy),
1312        }
1313    }
1314
1315    /// Vertical [`Adjustment`][crate::Adjustment] of the scrollable widget.
1316    ///
1317    /// This adjustment is shared between the scrollable widget and its parent.
1318    pub fn vadjustment(self, vadjustment: &impl IsA<Adjustment>) -> Self {
1319        Self {
1320            builder: self
1321                .builder
1322                .property("vadjustment", vadjustment.clone().upcast()),
1323        }
1324    }
1325
1326    /// Determines when vertical scrolling should start.
1327    pub fn vscroll_policy(self, vscroll_policy: ScrollablePolicy) -> Self {
1328        Self {
1329            builder: self.builder.property("vscroll-policy", vscroll_policy),
1330        }
1331    }
1332
1333    // rustdoc-stripper-ignore-next
1334    /// Build the [`TreeView`].
1335    #[must_use = "Building the object from the builder is usually expensive and is not expected to have side effects"]
1336    pub fn build(self) -> TreeView {
1337        assert_initialized_main_thread!();
1338        self.builder.build()
1339    }
1340}
1341
1342/// Trait containing all [`struct@TreeView`] methods.
1343///
1344/// # Implementors
1345///
1346/// [`TreeView`][struct@crate::TreeView]
1347pub trait TreeViewExt: IsA<TreeView> + '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            unsafe {
2761                let tree_column = from_glib_borrow(tree_column);
2762                let cell = from_glib_borrow(cell);
2763                let tree_model = from_glib_borrow(tree_model);
2764                let iter = from_glib_borrow(iter);
2765                let callback = &*(data as *mut P);
2766                (*callback)(&tree_column, &cell, &tree_model, &iter)
2767            }
2768        }
2769        let func = Some(func_func::<P> as _);
2770        unsafe extern "C" fn dnotify_func<
2771            P: Fn(&TreeViewColumn, &CellRenderer, &TreeModel, &TreeIter) + 'static,
2772        >(
2773            data: glib::ffi::gpointer,
2774        ) {
2775            unsafe {
2776                let _callback = Box_::from_raw(data as *mut P);
2777            }
2778        }
2779        let destroy_call6 = Some(dnotify_func::<P> as _);
2780        let super_callback0: Box_<P> = func_data;
2781        unsafe {
2782            ffi::gtk_tree_view_insert_column_with_data_func(
2783                self.as_ref().to_glib_none().0,
2784                position,
2785                title.to_glib_none().0,
2786                cell.as_ref().to_glib_none().0,
2787                func,
2788                Box_::into_raw(super_callback0) as *mut _,
2789                destroy_call6,
2790            )
2791        }
2792    }
2793
2794    /// Determine whether the point (@x, @y) in @self is blank, that is no
2795    /// cell content nor an expander arrow is drawn at the location. If so, the
2796    /// location can be considered as the background. You might wish to take
2797    /// special action on clicks on the background, such as clearing a current
2798    /// selection, having a custom context menu or starting rubber banding.
2799    ///
2800    /// The @x and @y coordinate that are provided must be relative to bin_window
2801    /// coordinates.  Widget-relative coordinates must be converted using
2802    /// gtk_tree_view_convert_widget_to_bin_window_coords().
2803    ///
2804    /// For converting widget coordinates (eg. the ones you get from
2805    /// GtkWidget::query-tooltip), please see
2806    /// gtk_tree_view_convert_widget_to_bin_window_coords().
2807    ///
2808    /// The @path, @column, @cell_x and @cell_y arguments will be filled in
2809    /// likewise as for gtk_tree_view_get_path_at_pos().  Please see
2810    /// gtk_tree_view_get_path_at_pos() for more information.
2811    ///
2812    /// # Deprecated since 4.10
2813    ///
2814    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
2815    /// ## `x`
2816    /// The x position to be identified (relative to bin_window)
2817    /// ## `y`
2818    /// The y position to be identified (relative to bin_window)
2819    ///
2820    /// # Returns
2821    ///
2822    /// [`true`] if the area at the given coordinates is blank,
2823    /// [`false`] otherwise.
2824    ///
2825    /// ## `path`
2826    /// A pointer to a [`TreePath`][crate::TreePath] pointer to
2827    ///   be filled in
2828    ///
2829    /// ## `column`
2830    /// A pointer to a
2831    ///   [`TreeViewColumn`][crate::TreeViewColumn] pointer to be filled in
2832    ///
2833    /// ## `cell_x`
2834    /// A pointer where the X coordinate relative to the
2835    ///   cell can be placed
2836    ///
2837    /// ## `cell_y`
2838    /// A pointer where the Y coordinate relative to the
2839    ///   cell can be placed
2840    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
2841    #[allow(deprecated)]
2842    #[doc(alias = "gtk_tree_view_is_blank_at_pos")]
2843    fn is_blank_at_pos(
2844        &self,
2845        x: i32,
2846        y: i32,
2847    ) -> Option<(Option<TreePath>, Option<TreeViewColumn>, i32, i32)> {
2848        unsafe {
2849            let mut path = std::ptr::null_mut();
2850            let mut column = std::ptr::null_mut();
2851            let mut cell_x = std::mem::MaybeUninit::uninit();
2852            let mut cell_y = std::mem::MaybeUninit::uninit();
2853            let ret = from_glib(ffi::gtk_tree_view_is_blank_at_pos(
2854                self.as_ref().to_glib_none().0,
2855                x,
2856                y,
2857                &mut path,
2858                &mut column,
2859                cell_x.as_mut_ptr(),
2860                cell_y.as_mut_ptr(),
2861            ));
2862            if ret {
2863                Some((
2864                    from_glib_full(path),
2865                    from_glib_none(column),
2866                    cell_x.assume_init(),
2867                    cell_y.assume_init(),
2868                ))
2869            } else {
2870                None
2871            }
2872        }
2873    }
2874
2875    /// Returns whether a rubber banding operation is currently being done
2876    /// in @self.
2877    ///
2878    /// # Deprecated since 4.10
2879    ///
2880    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
2881    ///
2882    /// # Returns
2883    ///
2884    /// [`true`] if a rubber banding operation is currently being
2885    /// done in @self.
2886    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
2887    #[allow(deprecated)]
2888    #[doc(alias = "gtk_tree_view_is_rubber_banding_active")]
2889    fn is_rubber_banding_active(&self) -> bool {
2890        unsafe {
2891            from_glib(ffi::gtk_tree_view_is_rubber_banding_active(
2892                self.as_ref().to_glib_none().0,
2893            ))
2894        }
2895    }
2896
2897    /// Calls @func on all expanded rows.
2898    ///
2899    /// # Deprecated since 4.10
2900    ///
2901    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
2902    /// ## `func`
2903    /// A function to be called
2904    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
2905    #[allow(deprecated)]
2906    #[doc(alias = "gtk_tree_view_map_expanded_rows")]
2907    fn map_expanded_rows<P: FnMut(&TreeView, &TreePath)>(&self, func: P) {
2908        let mut func_data: P = func;
2909        unsafe extern "C" fn func_func<P: FnMut(&TreeView, &TreePath)>(
2910            tree_view: *mut ffi::GtkTreeView,
2911            path: *mut ffi::GtkTreePath,
2912            user_data: glib::ffi::gpointer,
2913        ) {
2914            unsafe {
2915                let tree_view = from_glib_borrow(tree_view);
2916                let path = from_glib_borrow(path);
2917                let callback = user_data as *mut P;
2918                (*callback)(&tree_view, &path)
2919            }
2920        }
2921        let func = Some(func_func::<P> as _);
2922        let super_callback0: &mut P = &mut func_data;
2923        unsafe {
2924            ffi::gtk_tree_view_map_expanded_rows(
2925                self.as_ref().to_glib_none().0,
2926                func,
2927                super_callback0 as *mut _ as *mut _,
2928            );
2929        }
2930    }
2931
2932    /// Moves @column to be after to @base_column.  If @base_column is [`None`], then
2933    /// @column is placed in the first position.
2934    ///
2935    /// # Deprecated since 4.10
2936    ///
2937    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
2938    /// ## `column`
2939    /// The [`TreeViewColumn`][crate::TreeViewColumn] to be moved.
2940    /// ## `base_column`
2941    /// The [`TreeViewColumn`][crate::TreeViewColumn] to be moved relative to
2942    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
2943    #[allow(deprecated)]
2944    #[doc(alias = "gtk_tree_view_move_column_after")]
2945    fn move_column_after(&self, column: &TreeViewColumn, base_column: Option<&TreeViewColumn>) {
2946        unsafe {
2947            ffi::gtk_tree_view_move_column_after(
2948                self.as_ref().to_glib_none().0,
2949                column.to_glib_none().0,
2950                base_column.to_glib_none().0,
2951            );
2952        }
2953    }
2954
2955    /// Removes @column from @self.
2956    ///
2957    /// # Deprecated since 4.10
2958    ///
2959    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
2960    /// ## `column`
2961    /// The [`TreeViewColumn`][crate::TreeViewColumn] to remove.
2962    ///
2963    /// # Returns
2964    ///
2965    /// The number of columns in @self after removing.
2966    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
2967    #[allow(deprecated)]
2968    #[doc(alias = "gtk_tree_view_remove_column")]
2969    fn remove_column(&self, column: &TreeViewColumn) -> i32 {
2970        unsafe {
2971            ffi::gtk_tree_view_remove_column(
2972                self.as_ref().to_glib_none().0,
2973                column.to_glib_none().0,
2974            )
2975        }
2976    }
2977
2978    /// Activates the cell determined by @path and @column.
2979    ///
2980    /// # Deprecated since 4.10
2981    ///
2982    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
2983    /// ## `path`
2984    /// The [`TreePath`][crate::TreePath] to be activated.
2985    /// ## `column`
2986    /// The [`TreeViewColumn`][crate::TreeViewColumn] to be activated.
2987    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
2988    #[allow(deprecated)]
2989    #[doc(alias = "gtk_tree_view_row_activated")]
2990    fn row_activated(&self, path: &TreePath, column: Option<&TreeViewColumn>) {
2991        unsafe {
2992            ffi::gtk_tree_view_row_activated(
2993                self.as_ref().to_glib_none().0,
2994                mut_override(path.to_glib_none().0),
2995                column.to_glib_none().0,
2996            );
2997        }
2998    }
2999
3000    /// Returns [`true`] if the node pointed to by @path is expanded in @self.
3001    ///
3002    /// # Deprecated since 4.10
3003    ///
3004    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
3005    /// ## `path`
3006    /// A [`TreePath`][crate::TreePath] to test expansion state.
3007    ///
3008    /// # Returns
3009    ///
3010    /// [`true`] if #path is expanded.
3011    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
3012    #[allow(deprecated)]
3013    #[doc(alias = "gtk_tree_view_row_expanded")]
3014    fn row_expanded(&self, path: &TreePath) -> bool {
3015        unsafe {
3016            from_glib(ffi::gtk_tree_view_row_expanded(
3017                self.as_ref().to_glib_none().0,
3018                mut_override(path.to_glib_none().0),
3019            ))
3020        }
3021    }
3022
3023    /// Moves the alignments of @self to the position specified by @column and
3024    /// @path.  If @column is [`None`], then no horizontal scrolling occurs.  Likewise,
3025    /// if @path is [`None`] no vertical scrolling occurs.  At a minimum, one of @column
3026    /// or @path need to be non-[`None`].  @row_align determines where the row is
3027    /// placed, and @col_align determines where @column is placed.  Both are expected
3028    /// to be between 0.0 and 1.0. 0.0 means left/top alignment, 1.0 means
3029    /// right/bottom alignment, 0.5 means center.
3030    ///
3031    /// If @use_align is [`false`], then the alignment arguments are ignored, and the
3032    /// tree does the minimum amount of work to scroll the cell onto the screen.
3033    /// This means that the cell will be scrolled to the edge closest to its current
3034    /// position.  If the cell is currently visible on the screen, nothing is done.
3035    ///
3036    /// This function only works if the model is set, and @path is a valid row on the
3037    /// model.  If the model changes before the @self is realized, the centered
3038    /// path will be modified to reflect this change.
3039    ///
3040    /// # Deprecated since 4.10
3041    ///
3042    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
3043    /// ## `path`
3044    /// The path of the row to move to
3045    /// ## `column`
3046    /// The [`TreeViewColumn`][crate::TreeViewColumn] to move horizontally to
3047    /// ## `use_align`
3048    /// whether to use alignment arguments, or [`false`].
3049    /// ## `row_align`
3050    /// The vertical alignment of the row specified by @path.
3051    /// ## `col_align`
3052    /// The horizontal alignment of the column specified by @column.
3053    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
3054    #[allow(deprecated)]
3055    #[doc(alias = "gtk_tree_view_scroll_to_cell")]
3056    fn scroll_to_cell(
3057        &self,
3058        path: Option<&TreePath>,
3059        column: Option<&TreeViewColumn>,
3060        use_align: bool,
3061        row_align: f32,
3062        col_align: f32,
3063    ) {
3064        unsafe {
3065            ffi::gtk_tree_view_scroll_to_cell(
3066                self.as_ref().to_glib_none().0,
3067                mut_override(path.to_glib_none().0),
3068                column.to_glib_none().0,
3069                use_align.into_glib(),
3070                row_align,
3071                col_align,
3072            );
3073        }
3074    }
3075
3076    /// Scrolls the tree view such that the top-left corner of the visible
3077    /// area is @tree_x, @tree_y, where @tree_x and @tree_y are specified
3078    /// in tree coordinates.  The @self must be realized before
3079    /// this function is called.  If it isn't, you probably want to be
3080    /// using gtk_tree_view_scroll_to_cell().
3081    ///
3082    /// If either @tree_x or @tree_y are -1, then that direction isn’t scrolled.
3083    ///
3084    /// # Deprecated since 4.10
3085    ///
3086    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
3087    /// ## `tree_x`
3088    /// X coordinate of new top-left pixel of visible area, or -1
3089    /// ## `tree_y`
3090    /// Y coordinate of new top-left pixel of visible area, or -1
3091    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
3092    #[allow(deprecated)]
3093    #[doc(alias = "gtk_tree_view_scroll_to_point")]
3094    fn scroll_to_point(&self, tree_x: i32, tree_y: i32) {
3095        unsafe {
3096            ffi::gtk_tree_view_scroll_to_point(self.as_ref().to_glib_none().0, tree_x, tree_y);
3097        }
3098    }
3099
3100    /// Cause the [`TreeView`][crate::TreeView]::row-activated signal to be emitted
3101    /// on a single click instead of a double click.
3102    ///
3103    /// # Deprecated since 4.10
3104    ///
3105    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
3106    /// ## `single`
3107    /// [`true`] to emit row-activated on a single click
3108    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
3109    #[allow(deprecated)]
3110    #[doc(alias = "gtk_tree_view_set_activate_on_single_click")]
3111    #[doc(alias = "activate-on-single-click")]
3112    fn set_activate_on_single_click(&self, single: bool) {
3113        unsafe {
3114            ffi::gtk_tree_view_set_activate_on_single_click(
3115                self.as_ref().to_glib_none().0,
3116                single.into_glib(),
3117            );
3118        }
3119    }
3120
3121    /// Sets a user function for determining where a column may be dropped when
3122    /// dragged.  This function is called on every column pair in turn at the
3123    /// beginning of a column drag to determine where a drop can take place.  The
3124    /// arguments passed to @func are: the @self, the [`TreeViewColumn`][crate::TreeViewColumn] being
3125    /// dragged, the two [`TreeViewColumn`][crate::TreeViewColumn]s determining the drop spot, and
3126    /// @user_data.  If either of the [`TreeViewColumn`][crate::TreeViewColumn] arguments for the drop spot
3127    /// are [`None`], then they indicate an edge.  If @func is set to be [`None`], then
3128    /// @self reverts to the default behavior of allowing all columns to be
3129    /// dropped everywhere.
3130    ///
3131    /// # Deprecated since 4.10
3132    ///
3133    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
3134    /// ## `func`
3135    /// A function to determine which columns are reorderable
3136    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
3137    #[allow(deprecated)]
3138    #[doc(alias = "gtk_tree_view_set_column_drag_function")]
3139    fn set_column_drag_function(
3140        &self,
3141        func: Option<
3142            Box_<
3143                dyn Fn(&TreeView, &TreeViewColumn, &TreeViewColumn, &TreeViewColumn) -> bool
3144                    + 'static,
3145            >,
3146        >,
3147    ) {
3148        let func_data: Box_<
3149            Option<
3150                Box_<
3151                    dyn Fn(&TreeView, &TreeViewColumn, &TreeViewColumn, &TreeViewColumn) -> bool
3152                        + 'static,
3153                >,
3154            >,
3155        > = Box_::new(func);
3156        unsafe extern "C" fn func_func(
3157            tree_view: *mut ffi::GtkTreeView,
3158            column: *mut ffi::GtkTreeViewColumn,
3159            prev_column: *mut ffi::GtkTreeViewColumn,
3160            next_column: *mut ffi::GtkTreeViewColumn,
3161            data: glib::ffi::gpointer,
3162        ) -> glib::ffi::gboolean {
3163            unsafe {
3164                let tree_view = from_glib_borrow(tree_view);
3165                let column = from_glib_borrow(column);
3166                let prev_column = from_glib_borrow(prev_column);
3167                let next_column = from_glib_borrow(next_column);
3168                let callback = &*(data as *mut Option<
3169                    Box_<
3170                        dyn Fn(&TreeView, &TreeViewColumn, &TreeViewColumn, &TreeViewColumn) -> bool
3171                            + 'static,
3172                    >,
3173                >);
3174                if let Some(ref callback) = *callback {
3175                    callback(&tree_view, &column, &prev_column, &next_column)
3176                } else {
3177                    panic!("cannot get closure...")
3178                }
3179                .into_glib()
3180            }
3181        }
3182        let func = if func_data.is_some() {
3183            Some(func_func as _)
3184        } else {
3185            None
3186        };
3187        unsafe extern "C" fn destroy_func(data: glib::ffi::gpointer) {
3188            unsafe {
3189                let _callback = Box_::from_raw(
3190                    data as *mut Option<
3191                        Box_<
3192                            dyn Fn(
3193                                    &TreeView,
3194                                    &TreeViewColumn,
3195                                    &TreeViewColumn,
3196                                    &TreeViewColumn,
3197                                ) -> bool
3198                                + 'static,
3199                        >,
3200                    >,
3201                );
3202            }
3203        }
3204        let destroy_call3 = Some(destroy_func as _);
3205        let super_callback0: Box_<
3206            Option<
3207                Box_<
3208                    dyn Fn(&TreeView, &TreeViewColumn, &TreeViewColumn, &TreeViewColumn) -> bool
3209                        + 'static,
3210                >,
3211            >,
3212        > = func_data;
3213        unsafe {
3214            ffi::gtk_tree_view_set_column_drag_function(
3215                self.as_ref().to_glib_none().0,
3216                func,
3217                Box_::into_raw(super_callback0) as *mut _,
3218                destroy_call3,
3219            );
3220        }
3221    }
3222
3223    /// Sets the current keyboard focus to be at @path, and selects it.  This is
3224    /// useful when you want to focus the user’s attention on a particular row.  If
3225    /// @focus_column is not [`None`], then focus is given to the column specified by
3226    /// it. Additionally, if @focus_column is specified, and @start_editing is
3227    /// [`true`], then editing should be started in the specified cell.
3228    /// This function is often followed by @gtk_widget_grab_focus (@self)
3229    /// in order to give keyboard focus to the widget.  Please note that editing
3230    /// can only happen when the widget is realized.
3231    ///
3232    /// If @path is invalid for @model, the current cursor (if any) will be unset
3233    /// and the function will return without failing.
3234    ///
3235    /// # Deprecated since 4.10
3236    ///
3237    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
3238    /// ## `path`
3239    /// A [`TreePath`][crate::TreePath]
3240    /// ## `focus_column`
3241    /// A [`TreeViewColumn`][crate::TreeViewColumn]
3242    /// ## `start_editing`
3243    /// [`true`] if the specified cell should start being edited.
3244    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
3245    #[allow(deprecated)]
3246    #[doc(alias = "gtk_tree_view_set_cursor")]
3247    fn set_cursor(
3248        &self,
3249        path: &TreePath,
3250        focus_column: Option<&TreeViewColumn>,
3251        start_editing: bool,
3252    ) {
3253        unsafe {
3254            ffi::gtk_tree_view_set_cursor(
3255                self.as_ref().to_glib_none().0,
3256                mut_override(path.to_glib_none().0),
3257                focus_column.to_glib_none().0,
3258                start_editing.into_glib(),
3259            );
3260        }
3261    }
3262
3263    /// Sets the current keyboard focus to be at @path, and selects it.  This is
3264    /// useful when you want to focus the user’s attention on a particular row.  If
3265    /// @focus_column is not [`None`], then focus is given to the column specified by
3266    /// it. If @focus_column and @focus_cell are not [`None`], and @focus_column
3267    /// contains 2 or more editable or activatable cells, then focus is given to
3268    /// the cell specified by @focus_cell. Additionally, if @focus_column is
3269    /// specified, and @start_editing is [`true`], then editing should be started in
3270    /// the specified cell.  This function is often followed by
3271    /// @gtk_widget_grab_focus (@self) in order to give keyboard focus to the
3272    /// widget.  Please note that editing can only happen when the widget is
3273    /// realized.
3274    ///
3275    /// If @path is invalid for @model, the current cursor (if any) will be unset
3276    /// and the function will return without failing.
3277    ///
3278    /// # Deprecated since 4.10
3279    ///
3280    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
3281    /// ## `path`
3282    /// A [`TreePath`][crate::TreePath]
3283    /// ## `focus_column`
3284    /// A [`TreeViewColumn`][crate::TreeViewColumn]
3285    /// ## `focus_cell`
3286    /// A [`CellRenderer`][crate::CellRenderer]
3287    /// ## `start_editing`
3288    /// [`true`] if the specified cell should start being edited.
3289    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
3290    #[allow(deprecated)]
3291    #[doc(alias = "gtk_tree_view_set_cursor_on_cell")]
3292    fn set_cursor_on_cell(
3293        &self,
3294        path: &TreePath,
3295        focus_column: Option<&TreeViewColumn>,
3296        focus_cell: Option<&impl IsA<CellRenderer>>,
3297        start_editing: bool,
3298    ) {
3299        unsafe {
3300            ffi::gtk_tree_view_set_cursor_on_cell(
3301                self.as_ref().to_glib_none().0,
3302                mut_override(path.to_glib_none().0),
3303                focus_column.to_glib_none().0,
3304                focus_cell.map(|p| p.as_ref()).to_glib_none().0,
3305                start_editing.into_glib(),
3306            );
3307        }
3308    }
3309
3310    /// Sets the row that is highlighted for feedback.
3311    /// If @path is [`None`], an existing highlight is removed.
3312    ///
3313    /// # Deprecated since 4.10
3314    ///
3315    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
3316    /// ## `path`
3317    /// The path of the row to highlight
3318    /// ## `pos`
3319    /// Specifies whether to drop before, after or into the row
3320    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
3321    #[allow(deprecated)]
3322    #[doc(alias = "gtk_tree_view_set_drag_dest_row")]
3323    fn set_drag_dest_row(&self, path: Option<&TreePath>, pos: TreeViewDropPosition) {
3324        unsafe {
3325            ffi::gtk_tree_view_set_drag_dest_row(
3326                self.as_ref().to_glib_none().0,
3327                mut_override(path.to_glib_none().0),
3328                pos.into_glib(),
3329            );
3330        }
3331    }
3332
3333    /// If @enable_search is set, then the user can type in text to search through
3334    /// the tree interactively (this is sometimes called "typeahead find").
3335    ///
3336    /// Note that even if this is [`false`], the user can still initiate a search
3337    /// using the “start-interactive-search” key binding.
3338    ///
3339    /// # Deprecated since 4.10
3340    ///
3341    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
3342    /// ## `enable_search`
3343    /// [`true`], if the user can search interactively
3344    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
3345    #[allow(deprecated)]
3346    #[doc(alias = "gtk_tree_view_set_enable_search")]
3347    #[doc(alias = "enable-search")]
3348    fn set_enable_search(&self, enable_search: bool) {
3349        unsafe {
3350            ffi::gtk_tree_view_set_enable_search(
3351                self.as_ref().to_glib_none().0,
3352                enable_search.into_glib(),
3353            );
3354        }
3355    }
3356
3357    /// Sets whether to draw lines interconnecting the expanders in @self.
3358    /// This does not have any visible effects for lists.
3359    ///
3360    /// # Deprecated since 4.10
3361    ///
3362    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
3363    /// ## `enabled`
3364    /// [`true`] to enable tree line drawing, [`false`] otherwise.
3365    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
3366    #[allow(deprecated)]
3367    #[doc(alias = "gtk_tree_view_set_enable_tree_lines")]
3368    #[doc(alias = "enable-tree-lines")]
3369    fn set_enable_tree_lines(&self, enabled: bool) {
3370        unsafe {
3371            ffi::gtk_tree_view_set_enable_tree_lines(
3372                self.as_ref().to_glib_none().0,
3373                enabled.into_glib(),
3374            );
3375        }
3376    }
3377
3378    /// Sets the column to draw the expander arrow at. It must be in @self.
3379    /// If @column is [`None`], then the expander arrow is always at the first
3380    /// visible column.
3381    ///
3382    /// If you do not want expander arrow to appear in your tree, set the
3383    /// expander column to a hidden column.
3384    ///
3385    /// # Deprecated since 4.10
3386    ///
3387    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
3388    /// ## `column`
3389    /// [`None`], or the column to draw the expander arrow at.
3390    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
3391    #[allow(deprecated)]
3392    #[doc(alias = "gtk_tree_view_set_expander_column")]
3393    #[doc(alias = "expander-column")]
3394    fn set_expander_column(&self, column: Option<&TreeViewColumn>) {
3395        unsafe {
3396            ffi::gtk_tree_view_set_expander_column(
3397                self.as_ref().to_glib_none().0,
3398                column.to_glib_none().0,
3399            );
3400        }
3401    }
3402
3403    /// Enables or disables the fixed height mode of @self.
3404    /// Fixed height mode speeds up [`TreeView`][crate::TreeView] by assuming that all
3405    /// rows have the same height.
3406    /// Only enable this option if all rows are the same height and all
3407    /// columns are of type [`TreeViewColumnSizing::Fixed`][crate::TreeViewColumnSizing::Fixed].
3408    ///
3409    /// # Deprecated since 4.10
3410    ///
3411    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
3412    /// ## `enable`
3413    /// [`true`] to enable fixed height mode
3414    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
3415    #[allow(deprecated)]
3416    #[doc(alias = "gtk_tree_view_set_fixed_height_mode")]
3417    #[doc(alias = "fixed-height-mode")]
3418    fn set_fixed_height_mode(&self, enable: bool) {
3419        unsafe {
3420            ffi::gtk_tree_view_set_fixed_height_mode(
3421                self.as_ref().to_glib_none().0,
3422                enable.into_glib(),
3423            );
3424        }
3425    }
3426
3427    /// Sets which grid lines to draw in @self.
3428    ///
3429    /// # Deprecated since 4.10
3430    ///
3431    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
3432    /// ## `grid_lines`
3433    /// a [`TreeView`][crate::TreeView]GridLines value indicating which grid lines to
3434    /// enable.
3435    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
3436    #[allow(deprecated)]
3437    #[doc(alias = "gtk_tree_view_set_grid_lines")]
3438    fn set_grid_lines(&self, grid_lines: TreeViewGridLines) {
3439        unsafe {
3440            ffi::gtk_tree_view_set_grid_lines(
3441                self.as_ref().to_glib_none().0,
3442                grid_lines.into_glib(),
3443            );
3444        }
3445    }
3446
3447    /// Allow the column title buttons to be clicked.
3448    ///
3449    /// # Deprecated since 4.10
3450    ///
3451    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
3452    /// ## `setting`
3453    /// [`true`] if the columns are clickable.
3454    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
3455    #[allow(deprecated)]
3456    #[doc(alias = "gtk_tree_view_set_headers_clickable")]
3457    #[doc(alias = "headers-clickable")]
3458    fn set_headers_clickable(&self, setting: bool) {
3459        unsafe {
3460            ffi::gtk_tree_view_set_headers_clickable(
3461                self.as_ref().to_glib_none().0,
3462                setting.into_glib(),
3463            );
3464        }
3465    }
3466
3467    /// Sets the visibility state of the headers.
3468    ///
3469    /// # Deprecated since 4.10
3470    ///
3471    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
3472    /// ## `headers_visible`
3473    /// [`true`] if the headers are visible
3474    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
3475    #[allow(deprecated)]
3476    #[doc(alias = "gtk_tree_view_set_headers_visible")]
3477    #[doc(alias = "headers-visible")]
3478    fn set_headers_visible(&self, headers_visible: bool) {
3479        unsafe {
3480            ffi::gtk_tree_view_set_headers_visible(
3481                self.as_ref().to_glib_none().0,
3482                headers_visible.into_glib(),
3483            );
3484        }
3485    }
3486
3487    /// Enables or disables the hover expansion mode of @self.
3488    /// Hover expansion makes rows expand or collapse if the pointer
3489    /// moves over them.
3490    ///
3491    /// # Deprecated since 4.10
3492    ///
3493    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
3494    /// ## `expand`
3495    /// [`true`] to enable hover selection mode
3496    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
3497    #[allow(deprecated)]
3498    #[doc(alias = "gtk_tree_view_set_hover_expand")]
3499    #[doc(alias = "hover-expand")]
3500    fn set_hover_expand(&self, expand: bool) {
3501        unsafe {
3502            ffi::gtk_tree_view_set_hover_expand(self.as_ref().to_glib_none().0, expand.into_glib());
3503        }
3504    }
3505
3506    /// Enables or disables the hover selection mode of @self.
3507    /// Hover selection makes the selected row follow the pointer.
3508    /// Currently, this works only for the selection modes
3509    /// [`SelectionMode::Single`][crate::SelectionMode::Single] and [`SelectionMode::Browse`][crate::SelectionMode::Browse].
3510    ///
3511    /// # Deprecated since 4.10
3512    ///
3513    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
3514    /// ## `hover`
3515    /// [`true`] to enable hover selection mode
3516    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
3517    #[allow(deprecated)]
3518    #[doc(alias = "gtk_tree_view_set_hover_selection")]
3519    #[doc(alias = "hover-selection")]
3520    fn set_hover_selection(&self, hover: bool) {
3521        unsafe {
3522            ffi::gtk_tree_view_set_hover_selection(
3523                self.as_ref().to_glib_none().0,
3524                hover.into_glib(),
3525            );
3526        }
3527    }
3528
3529    /// Sets the amount of extra indentation for child levels to use in @self
3530    /// in addition to the default indentation.  The value should be specified in
3531    /// pixels, a value of 0 disables this feature and in this case only the default
3532    /// indentation will be used.
3533    /// This does not have any visible effects for lists.
3534    ///
3535    /// # Deprecated since 4.10
3536    ///
3537    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
3538    /// ## `indentation`
3539    /// the amount, in pixels, of extra indentation in @self.
3540    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
3541    #[allow(deprecated)]
3542    #[doc(alias = "gtk_tree_view_set_level_indentation")]
3543    #[doc(alias = "level-indentation")]
3544    fn set_level_indentation(&self, indentation: i32) {
3545        unsafe {
3546            ffi::gtk_tree_view_set_level_indentation(self.as_ref().to_glib_none().0, indentation);
3547        }
3548    }
3549
3550    /// Sets the model for a [`TreeView`][crate::TreeView].  If the @self already has a model
3551    /// set, it will remove it before setting the new model.  If @model is [`None`],
3552    /// then it will unset the old model.
3553    ///
3554    /// # Deprecated since 4.10
3555    ///
3556    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
3557    /// ## `model`
3558    /// The model.
3559    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
3560    #[allow(deprecated)]
3561    #[doc(alias = "gtk_tree_view_set_model")]
3562    #[doc(alias = "model")]
3563    fn set_model(&self, model: Option<&impl IsA<TreeModel>>) {
3564        unsafe {
3565            ffi::gtk_tree_view_set_model(
3566                self.as_ref().to_glib_none().0,
3567                model.map(|p| p.as_ref()).to_glib_none().0,
3568            );
3569        }
3570    }
3571
3572    /// This function is a convenience function to allow you to reorder
3573    /// models that support the `GtkTreeDragSourceIface` and the
3574    /// `GtkTreeDragDestIface`.  Both [`TreeStore`][crate::TreeStore] and [`ListStore`][crate::ListStore] support
3575    /// these.  If @reorderable is [`true`], then the user can reorder the
3576    /// model by dragging and dropping rows. The developer can listen to
3577    /// these changes by connecting to the model’s `GtkTreeModel::row-inserted`
3578    /// and `GtkTreeModel::row-deleted` signals. The reordering is implemented
3579    /// by setting up the tree view as a drag source and destination.
3580    /// Therefore, drag and drop can not be used in a reorderable view for any
3581    /// other purpose.
3582    ///
3583    /// This function does not give you any degree of control over the order -- any
3584    /// reordering is allowed.  If more control is needed, you should probably
3585    /// handle drag and drop manually.
3586    ///
3587    /// # Deprecated since 4.10
3588    ///
3589    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
3590    /// ## `reorderable`
3591    /// [`true`], if the tree can be reordered.
3592    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
3593    #[allow(deprecated)]
3594    #[doc(alias = "gtk_tree_view_set_reorderable")]
3595    #[doc(alias = "reorderable")]
3596    fn set_reorderable(&self, reorderable: bool) {
3597        unsafe {
3598            ffi::gtk_tree_view_set_reorderable(
3599                self.as_ref().to_glib_none().0,
3600                reorderable.into_glib(),
3601            );
3602        }
3603    }
3604
3605    /// Sets the row separator function, which is used to determine
3606    /// whether a row should be drawn as a separator. If the row separator
3607    /// function is [`None`], no separators are drawn. This is the default value.
3608    ///
3609    /// # Deprecated since 4.10
3610    ///
3611    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
3612    /// ## `func`
3613    /// a [`TreeView`][crate::TreeView]RowSeparatorFunc
3614    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
3615    #[allow(deprecated)]
3616    #[doc(alias = "gtk_tree_view_set_row_separator_func")]
3617    fn set_row_separator_func<P: Fn(&TreeModel, &TreeIter) -> bool + 'static>(&self, func: P) {
3618        let func_data: Box_<P> = Box_::new(func);
3619        unsafe extern "C" fn func_func<P: Fn(&TreeModel, &TreeIter) -> bool + 'static>(
3620            model: *mut ffi::GtkTreeModel,
3621            iter: *mut ffi::GtkTreeIter,
3622            data: glib::ffi::gpointer,
3623        ) -> glib::ffi::gboolean {
3624            unsafe {
3625                let model = from_glib_borrow(model);
3626                let iter = from_glib_borrow(iter);
3627                let callback = &*(data as *mut P);
3628                (*callback)(&model, &iter).into_glib()
3629            }
3630        }
3631        let func = Some(func_func::<P> as _);
3632        unsafe extern "C" fn destroy_func<P: Fn(&TreeModel, &TreeIter) -> bool + 'static>(
3633            data: glib::ffi::gpointer,
3634        ) {
3635            unsafe {
3636                let _callback = Box_::from_raw(data as *mut P);
3637            }
3638        }
3639        let destroy_call3 = Some(destroy_func::<P> as _);
3640        let super_callback0: Box_<P> = func_data;
3641        unsafe {
3642            ffi::gtk_tree_view_set_row_separator_func(
3643                self.as_ref().to_glib_none().0,
3644                func,
3645                Box_::into_raw(super_callback0) as *mut _,
3646                destroy_call3,
3647            );
3648        }
3649    }
3650
3651    /// Enables or disables rubber banding in @self.  If the selection mode
3652    /// is [`SelectionMode::Multiple`][crate::SelectionMode::Multiple], rubber banding will allow the user to select
3653    /// multiple rows by dragging the mouse.
3654    ///
3655    /// # Deprecated since 4.10
3656    ///
3657    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
3658    /// ## `enable`
3659    /// [`true`] to enable rubber banding
3660    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
3661    #[allow(deprecated)]
3662    #[doc(alias = "gtk_tree_view_set_rubber_banding")]
3663    #[doc(alias = "rubber-banding")]
3664    fn set_rubber_banding(&self, enable: bool) {
3665        unsafe {
3666            ffi::gtk_tree_view_set_rubber_banding(
3667                self.as_ref().to_glib_none().0,
3668                enable.into_glib(),
3669            );
3670        }
3671    }
3672
3673    /// Sets @column as the column where the interactive search code should
3674    /// search in for the current model.
3675    ///
3676    /// If the search column is set, users can use the “start-interactive-search”
3677    /// key binding to bring up search popup. The enable-search property controls
3678    /// whether simply typing text will also start an interactive search.
3679    ///
3680    /// Note that @column refers to a column of the current model. The search
3681    /// column is reset to -1 when the model is changed.
3682    ///
3683    /// # Deprecated since 4.10
3684    ///
3685    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
3686    /// ## `column`
3687    /// the column of the model to search in, or -1 to disable searching
3688    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
3689    #[allow(deprecated)]
3690    #[doc(alias = "gtk_tree_view_set_search_column")]
3691    #[doc(alias = "search-column")]
3692    fn set_search_column(&self, column: i32) {
3693        unsafe {
3694            ffi::gtk_tree_view_set_search_column(self.as_ref().to_glib_none().0, column);
3695        }
3696    }
3697
3698    /// Sets the entry which the interactive search code will use for this
3699    /// @self.  This is useful when you want to provide a search entry
3700    /// in our interface at all time at a fixed position.  Passing [`None`] for
3701    /// @entry will make the interactive search code use the built-in popup
3702    /// entry again.
3703    ///
3704    /// # Deprecated since 4.10
3705    ///
3706    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
3707    /// ## `entry`
3708    /// the entry the interactive search code of @self should use
3709    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
3710    #[allow(deprecated)]
3711    #[doc(alias = "gtk_tree_view_set_search_entry")]
3712    fn set_search_entry(&self, entry: Option<&impl IsA<Editable>>) {
3713        unsafe {
3714            ffi::gtk_tree_view_set_search_entry(
3715                self.as_ref().to_glib_none().0,
3716                entry.map(|p| p.as_ref()).to_glib_none().0,
3717            );
3718        }
3719    }
3720
3721    /// Sets the compare function for the interactive search capabilities; note
3722    /// that somewhat like strcmp() returning 0 for equality
3723    /// [`TreeView`][crate::TreeView]SearchEqualFunc returns [`false`] on matches.
3724    ///
3725    /// # Deprecated since 4.10
3726    ///
3727    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
3728    /// ## `search_equal_func`
3729    /// the compare function to use during the search
3730    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
3731    #[allow(deprecated)]
3732    #[doc(alias = "gtk_tree_view_set_search_equal_func")]
3733    fn set_search_equal_func<P: Fn(&TreeModel, i32, &str, &TreeIter) -> bool + 'static>(
3734        &self,
3735        search_equal_func: P,
3736    ) {
3737        let search_equal_func_data: Box_<P> = Box_::new(search_equal_func);
3738        unsafe extern "C" fn search_equal_func_func<
3739            P: Fn(&TreeModel, i32, &str, &TreeIter) -> bool + 'static,
3740        >(
3741            model: *mut ffi::GtkTreeModel,
3742            column: std::ffi::c_int,
3743            key: *const std::ffi::c_char,
3744            iter: *mut ffi::GtkTreeIter,
3745            search_data: glib::ffi::gpointer,
3746        ) -> glib::ffi::gboolean {
3747            unsafe {
3748                let model = from_glib_borrow(model);
3749                let key: Borrowed<glib::GString> = from_glib_borrow(key);
3750                let iter = from_glib_borrow(iter);
3751                let callback = &*(search_data as *mut P);
3752                (*callback)(&model, column, key.as_str(), &iter).into_glib()
3753            }
3754        }
3755        let search_equal_func = Some(search_equal_func_func::<P> as _);
3756        unsafe extern "C" fn search_destroy_func<
3757            P: Fn(&TreeModel, i32, &str, &TreeIter) -> bool + 'static,
3758        >(
3759            data: glib::ffi::gpointer,
3760        ) {
3761            unsafe {
3762                let _callback = Box_::from_raw(data as *mut P);
3763            }
3764        }
3765        let destroy_call3 = Some(search_destroy_func::<P> as _);
3766        let super_callback0: Box_<P> = search_equal_func_data;
3767        unsafe {
3768            ffi::gtk_tree_view_set_search_equal_func(
3769                self.as_ref().to_glib_none().0,
3770                search_equal_func,
3771                Box_::into_raw(super_callback0) as *mut _,
3772                destroy_call3,
3773            );
3774        }
3775    }
3776
3777    /// Sets whether to draw and enable expanders and indent child rows in
3778    /// @self.  When disabled there will be no expanders visible in trees
3779    /// and there will be no way to expand and collapse rows by default.  Also
3780    /// note that hiding the expanders will disable the default indentation.  You
3781    /// can set a custom indentation in this case using
3782    /// gtk_tree_view_set_level_indentation().
3783    /// This does not have any visible effects for lists.
3784    ///
3785    /// # Deprecated since 4.10
3786    ///
3787    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
3788    /// ## `enabled`
3789    /// [`true`] to enable expander drawing, [`false`] otherwise.
3790    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
3791    #[allow(deprecated)]
3792    #[doc(alias = "gtk_tree_view_set_show_expanders")]
3793    #[doc(alias = "show-expanders")]
3794    fn set_show_expanders(&self, enabled: bool) {
3795        unsafe {
3796            ffi::gtk_tree_view_set_show_expanders(
3797                self.as_ref().to_glib_none().0,
3798                enabled.into_glib(),
3799            );
3800        }
3801    }
3802
3803    /// Sets the tip area of @tooltip to the area @path, @column and @cell have
3804    /// in common.  For example if @path is [`None`] and @column is set, the tip
3805    /// area will be set to the full area covered by @column.  See also
3806    /// gtk_tooltip_set_tip_area().
3807    ///
3808    /// Note that if @path is not specified and @cell is set and part of a column
3809    /// containing the expander, the tooltip might not show and hide at the correct
3810    /// position.  In such cases @path must be set to the current node under the
3811    /// mouse cursor for this function to operate correctly.
3812    ///
3813    /// See also gtk_tree_view_set_tooltip_column() for a simpler alternative.
3814    ///
3815    /// # Deprecated since 4.10
3816    ///
3817    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
3818    /// ## `tooltip`
3819    /// a [`Tooltip`][crate::Tooltip]
3820    /// ## `path`
3821    /// a [`TreePath`][crate::TreePath]
3822    /// ## `column`
3823    /// a [`TreeViewColumn`][crate::TreeViewColumn]
3824    /// ## `cell`
3825    /// a [`CellRenderer`][crate::CellRenderer]
3826    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
3827    #[allow(deprecated)]
3828    #[doc(alias = "gtk_tree_view_set_tooltip_cell")]
3829    fn set_tooltip_cell(
3830        &self,
3831        tooltip: &Tooltip,
3832        path: Option<&TreePath>,
3833        column: Option<&TreeViewColumn>,
3834        cell: Option<&impl IsA<CellRenderer>>,
3835    ) {
3836        unsafe {
3837            ffi::gtk_tree_view_set_tooltip_cell(
3838                self.as_ref().to_glib_none().0,
3839                tooltip.to_glib_none().0,
3840                mut_override(path.to_glib_none().0),
3841                column.to_glib_none().0,
3842                cell.map(|p| p.as_ref()).to_glib_none().0,
3843            );
3844        }
3845    }
3846
3847    /// If you only plan to have simple (text-only) tooltips on full rows, you
3848    /// can use this function to have [`TreeView`][crate::TreeView] handle these automatically
3849    /// for you. @column should be set to the column in @self’s model
3850    /// containing the tooltip texts, or -1 to disable this feature.
3851    ///
3852    /// When enabled, `GtkWidget:has-tooltip` will be set to [`true`] and
3853    /// @self will connect a `GtkWidget::query-tooltip` signal handler.
3854    ///
3855    /// Note that the signal handler sets the text with gtk_tooltip_set_markup(),
3856    /// so &, <, etc have to be escaped in the text.
3857    ///
3858    /// # Deprecated since 4.10
3859    ///
3860    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
3861    /// ## `column`
3862    /// an integer, which is a valid column number for @self’s model
3863    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
3864    #[allow(deprecated)]
3865    #[doc(alias = "gtk_tree_view_set_tooltip_column")]
3866    #[doc(alias = "tooltip-column")]
3867    fn set_tooltip_column(&self, column: i32) {
3868        unsafe {
3869            ffi::gtk_tree_view_set_tooltip_column(self.as_ref().to_glib_none().0, column);
3870        }
3871    }
3872
3873    /// Sets the tip area of @tooltip to be the area covered by the row at @path.
3874    /// See also gtk_tree_view_set_tooltip_column() for a simpler alternative.
3875    /// See also gtk_tooltip_set_tip_area().
3876    ///
3877    /// # Deprecated since 4.10
3878    ///
3879    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
3880    /// ## `tooltip`
3881    /// a [`Tooltip`][crate::Tooltip]
3882    /// ## `path`
3883    /// a [`TreePath`][crate::TreePath]
3884    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
3885    #[allow(deprecated)]
3886    #[doc(alias = "gtk_tree_view_set_tooltip_row")]
3887    fn set_tooltip_row(&self, tooltip: &Tooltip, path: &TreePath) {
3888        unsafe {
3889            ffi::gtk_tree_view_set_tooltip_row(
3890                self.as_ref().to_glib_none().0,
3891                tooltip.to_glib_none().0,
3892                mut_override(path.to_glib_none().0),
3893            );
3894        }
3895    }
3896
3897    /// Undoes the effect of
3898    /// gtk_tree_view_enable_model_drag_dest(). Calling this method sets
3899    /// [`TreeView`][crate::TreeView]:reorderable to [`false`].
3900    ///
3901    /// # Deprecated since 4.10
3902    ///
3903    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
3904    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
3905    #[allow(deprecated)]
3906    #[doc(alias = "gtk_tree_view_unset_rows_drag_dest")]
3907    fn unset_rows_drag_dest(&self) {
3908        unsafe {
3909            ffi::gtk_tree_view_unset_rows_drag_dest(self.as_ref().to_glib_none().0);
3910        }
3911    }
3912
3913    /// Undoes the effect of
3914    /// gtk_tree_view_enable_model_drag_source(). Calling this method sets
3915    /// [`TreeView`][crate::TreeView]:reorderable to [`false`].
3916    ///
3917    /// # Deprecated since 4.10
3918    ///
3919    /// Use [`ListView`][crate::ListView] or [`ColumnView`][crate::ColumnView] instead
3920    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
3921    #[allow(deprecated)]
3922    #[doc(alias = "gtk_tree_view_unset_rows_drag_source")]
3923    fn unset_rows_drag_source(&self) {
3924        unsafe {
3925            ffi::gtk_tree_view_unset_rows_drag_source(self.as_ref().to_glib_none().0);
3926        }
3927    }
3928
3929    #[doc(alias = "enable-grid-lines")]
3930    fn enable_grid_lines(&self) -> TreeViewGridLines {
3931        ObjectExt::property(self.as_ref(), "enable-grid-lines")
3932    }
3933
3934    #[doc(alias = "enable-grid-lines")]
3935    fn set_enable_grid_lines(&self, enable_grid_lines: TreeViewGridLines) {
3936        ObjectExt::set_property(self.as_ref(), "enable-grid-lines", enable_grid_lines)
3937    }
3938
3939    /// The number of columns of the treeview has changed.
3940    #[doc(alias = "columns-changed")]
3941    fn connect_columns_changed<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3942        unsafe extern "C" fn columns_changed_trampoline<P: IsA<TreeView>, F: Fn(&P) + 'static>(
3943            this: *mut ffi::GtkTreeView,
3944            f: glib::ffi::gpointer,
3945        ) {
3946            unsafe {
3947                let f: &F = &*(f as *const F);
3948                f(TreeView::from_glib_borrow(this).unsafe_cast_ref())
3949            }
3950        }
3951        unsafe {
3952            let f: Box_<F> = Box_::new(f);
3953            connect_raw(
3954                self.as_ptr() as *mut _,
3955                c"columns-changed".as_ptr() as *const _,
3956                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3957                    columns_changed_trampoline::<Self, F> as *const (),
3958                )),
3959                Box_::into_raw(f),
3960            )
3961        }
3962    }
3963
3964    /// The position of the cursor (focused cell) has changed.
3965    #[doc(alias = "cursor-changed")]
3966    fn connect_cursor_changed<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3967        unsafe extern "C" fn cursor_changed_trampoline<P: IsA<TreeView>, F: Fn(&P) + 'static>(
3968            this: *mut ffi::GtkTreeView,
3969            f: glib::ffi::gpointer,
3970        ) {
3971            unsafe {
3972                let f: &F = &*(f as *const F);
3973                f(TreeView::from_glib_borrow(this).unsafe_cast_ref())
3974            }
3975        }
3976        unsafe {
3977            let f: Box_<F> = Box_::new(f);
3978            connect_raw(
3979                self.as_ptr() as *mut _,
3980                c"cursor-changed".as_ptr() as *const _,
3981                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3982                    cursor_changed_trampoline::<Self, F> as *const (),
3983                )),
3984                Box_::into_raw(f),
3985            )
3986        }
3987    }
3988
3989    #[doc(alias = "expand-collapse-cursor-row")]
3990    fn connect_expand_collapse_cursor_row<F: Fn(&Self, bool, bool, bool) -> bool + 'static>(
3991        &self,
3992        f: F,
3993    ) -> SignalHandlerId {
3994        unsafe extern "C" fn expand_collapse_cursor_row_trampoline<
3995            P: IsA<TreeView>,
3996            F: Fn(&P, bool, bool, bool) -> bool + 'static,
3997        >(
3998            this: *mut ffi::GtkTreeView,
3999            object: glib::ffi::gboolean,
4000            p0: glib::ffi::gboolean,
4001            p1: glib::ffi::gboolean,
4002            f: glib::ffi::gpointer,
4003        ) -> glib::ffi::gboolean {
4004            unsafe {
4005                let f: &F = &*(f as *const F);
4006                f(
4007                    TreeView::from_glib_borrow(this).unsafe_cast_ref(),
4008                    from_glib(object),
4009                    from_glib(p0),
4010                    from_glib(p1),
4011                )
4012                .into_glib()
4013            }
4014        }
4015        unsafe {
4016            let f: Box_<F> = Box_::new(f);
4017            connect_raw(
4018                self.as_ptr() as *mut _,
4019                c"expand-collapse-cursor-row".as_ptr() as *const _,
4020                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4021                    expand_collapse_cursor_row_trampoline::<Self, F> as *const (),
4022                )),
4023                Box_::into_raw(f),
4024            )
4025        }
4026    }
4027
4028    fn emit_expand_collapse_cursor_row(&self, object: bool, p0: bool, p1: bool) -> bool {
4029        self.emit_by_name("expand-collapse-cursor-row", &[&object, &p0, &p1])
4030    }
4031
4032    /// The [`TreeView`][crate::TreeView]::move-cursor signal is a [keybinding
4033    /// signal][`SignalAction`][crate::SignalAction] which gets emitted when the user
4034    /// presses one of the cursor keys.
4035    ///
4036    /// Applications should not connect to it, but may emit it with
4037    /// g_signal_emit_by_name() if they need to control the cursor
4038    /// programmatically. In contrast to gtk_tree_view_set_cursor() and
4039    /// gtk_tree_view_set_cursor_on_cell() when moving horizontally
4040    /// [`TreeView`][crate::TreeView]::move-cursor does not reset the current selection.
4041    /// ## `step`
4042    /// the granularity of the move, as a [`MovementStep`][crate::MovementStep].
4043    ///     [`MovementStep::LogicalPositions`][crate::MovementStep::LogicalPositions], [`MovementStep::VisualPositions`][crate::MovementStep::VisualPositions],
4044    ///     [`MovementStep::DisplayLines`][crate::MovementStep::DisplayLines], [`MovementStep::Pages`][crate::MovementStep::Pages] and
4045    ///     [`MovementStep::BufferEnds`][crate::MovementStep::BufferEnds] are supported.
4046    ///     [`MovementStep::LogicalPositions`][crate::MovementStep::LogicalPositions] and [`MovementStep::VisualPositions`][crate::MovementStep::VisualPositions]
4047    ///     are treated identically.
4048    /// ## `direction`
4049    /// the direction to move: +1 to move forwards; -1 to move
4050    ///     backwards. The resulting movement is undefined for all other values.
4051    /// ## `extend`
4052    /// whether to extend the selection
4053    /// ## `modify`
4054    /// whether to modify the selection
4055    ///
4056    /// # Returns
4057    ///
4058    /// [`true`] if @step is supported, [`false`] otherwise.
4059    #[doc(alias = "move-cursor")]
4060    fn connect_move_cursor<F: Fn(&Self, MovementStep, i32, bool, bool) -> bool + 'static>(
4061        &self,
4062        f: F,
4063    ) -> SignalHandlerId {
4064        unsafe extern "C" fn move_cursor_trampoline<
4065            P: IsA<TreeView>,
4066            F: Fn(&P, MovementStep, i32, bool, bool) -> bool + 'static,
4067        >(
4068            this: *mut ffi::GtkTreeView,
4069            step: ffi::GtkMovementStep,
4070            direction: std::ffi::c_int,
4071            extend: glib::ffi::gboolean,
4072            modify: glib::ffi::gboolean,
4073            f: glib::ffi::gpointer,
4074        ) -> glib::ffi::gboolean {
4075            unsafe {
4076                let f: &F = &*(f as *const F);
4077                f(
4078                    TreeView::from_glib_borrow(this).unsafe_cast_ref(),
4079                    from_glib(step),
4080                    direction,
4081                    from_glib(extend),
4082                    from_glib(modify),
4083                )
4084                .into_glib()
4085            }
4086        }
4087        unsafe {
4088            let f: Box_<F> = Box_::new(f);
4089            connect_raw(
4090                self.as_ptr() as *mut _,
4091                c"move-cursor".as_ptr() as *const _,
4092                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4093                    move_cursor_trampoline::<Self, F> as *const (),
4094                )),
4095                Box_::into_raw(f),
4096            )
4097        }
4098    }
4099
4100    fn emit_move_cursor(
4101        &self,
4102        step: MovementStep,
4103        direction: i32,
4104        extend: bool,
4105        modify: bool,
4106    ) -> bool {
4107        self.emit_by_name("move-cursor", &[&step, &direction, &extend, &modify])
4108    }
4109
4110    /// The "row-activated" signal is emitted when the method
4111    /// [`row_activated()`][Self::row_activated()] is called.
4112    ///
4113    /// This signal is emitted when the user double-clicks a treeview row with the
4114    /// [`activate-on-single-click`][struct@crate::TreeView#activate-on-single-click] property set to [`false`],
4115    /// or when the user single-clicks a row when that property set to [`true`].
4116    ///
4117    /// This signal is also emitted when a non-editable row is selected and one
4118    /// of the keys: <kbd>Space</kbd>, <kbd>Shift</kbd>+<kbd>Space</kbd>,
4119    /// <kbd>Return</kbd> or <kbd>Enter</kbd> is pressed.
4120    ///
4121    /// For selection handling refer to the
4122    /// [tree widget conceptual overview](section-tree-widget.html)
4123    /// as well as [`TreeSelection`][crate::TreeSelection].
4124    /// ## `path`
4125    /// the [`TreePath`][crate::TreePath] for the activated row
4126    /// ## `column`
4127    /// the [`TreeViewColumn`][crate::TreeViewColumn] in which the activation occurred
4128    #[doc(alias = "row-activated")]
4129    fn connect_row_activated<F: Fn(&Self, &TreePath, Option<&TreeViewColumn>) + 'static>(
4130        &self,
4131        f: F,
4132    ) -> SignalHandlerId {
4133        unsafe extern "C" fn row_activated_trampoline<
4134            P: IsA<TreeView>,
4135            F: Fn(&P, &TreePath, Option<&TreeViewColumn>) + 'static,
4136        >(
4137            this: *mut ffi::GtkTreeView,
4138            path: *mut ffi::GtkTreePath,
4139            column: *mut ffi::GtkTreeViewColumn,
4140            f: glib::ffi::gpointer,
4141        ) {
4142            unsafe {
4143                let f: &F = &*(f as *const F);
4144                f(
4145                    TreeView::from_glib_borrow(this).unsafe_cast_ref(),
4146                    &from_glib_borrow(path),
4147                    Option::<TreeViewColumn>::from_glib_borrow(column)
4148                        .as_ref()
4149                        .as_ref(),
4150                )
4151            }
4152        }
4153        unsafe {
4154            let f: Box_<F> = Box_::new(f);
4155            connect_raw(
4156                self.as_ptr() as *mut _,
4157                c"row-activated".as_ptr() as *const _,
4158                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4159                    row_activated_trampoline::<Self, F> as *const (),
4160                )),
4161                Box_::into_raw(f),
4162            )
4163        }
4164    }
4165
4166    fn emit_row_activated(&self, path: &TreePath, column: Option<&TreeViewColumn>) {
4167        self.emit_by_name::<()>("row-activated", &[&path, &column]);
4168    }
4169
4170    /// The given row has been collapsed (child nodes are hidden).
4171    /// ## `iter`
4172    /// the tree iter of the collapsed row
4173    /// ## `path`
4174    /// a tree path that points to the row
4175    #[doc(alias = "row-collapsed")]
4176    fn connect_row_collapsed<F: Fn(&Self, &TreeIter, &TreePath) + 'static>(
4177        &self,
4178        f: F,
4179    ) -> SignalHandlerId {
4180        unsafe extern "C" fn row_collapsed_trampoline<
4181            P: IsA<TreeView>,
4182            F: Fn(&P, &TreeIter, &TreePath) + 'static,
4183        >(
4184            this: *mut ffi::GtkTreeView,
4185            iter: *mut ffi::GtkTreeIter,
4186            path: *mut ffi::GtkTreePath,
4187            f: glib::ffi::gpointer,
4188        ) {
4189            unsafe {
4190                let f: &F = &*(f as *const F);
4191                f(
4192                    TreeView::from_glib_borrow(this).unsafe_cast_ref(),
4193                    &from_glib_borrow(iter),
4194                    &from_glib_borrow(path),
4195                )
4196            }
4197        }
4198        unsafe {
4199            let f: Box_<F> = Box_::new(f);
4200            connect_raw(
4201                self.as_ptr() as *mut _,
4202                c"row-collapsed".as_ptr() as *const _,
4203                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4204                    row_collapsed_trampoline::<Self, F> as *const (),
4205                )),
4206                Box_::into_raw(f),
4207            )
4208        }
4209    }
4210
4211    /// The given row has been expanded (child nodes are shown).
4212    /// ## `iter`
4213    /// the tree iter of the expanded row
4214    /// ## `path`
4215    /// a tree path that points to the row
4216    #[doc(alias = "row-expanded")]
4217    fn connect_row_expanded<F: Fn(&Self, &TreeIter, &TreePath) + 'static>(
4218        &self,
4219        f: F,
4220    ) -> SignalHandlerId {
4221        unsafe extern "C" fn row_expanded_trampoline<
4222            P: IsA<TreeView>,
4223            F: Fn(&P, &TreeIter, &TreePath) + 'static,
4224        >(
4225            this: *mut ffi::GtkTreeView,
4226            iter: *mut ffi::GtkTreeIter,
4227            path: *mut ffi::GtkTreePath,
4228            f: glib::ffi::gpointer,
4229        ) {
4230            unsafe {
4231                let f: &F = &*(f as *const F);
4232                f(
4233                    TreeView::from_glib_borrow(this).unsafe_cast_ref(),
4234                    &from_glib_borrow(iter),
4235                    &from_glib_borrow(path),
4236                )
4237            }
4238        }
4239        unsafe {
4240            let f: Box_<F> = Box_::new(f);
4241            connect_raw(
4242                self.as_ptr() as *mut _,
4243                c"row-expanded".as_ptr() as *const _,
4244                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4245                    row_expanded_trampoline::<Self, F> as *const (),
4246                )),
4247                Box_::into_raw(f),
4248            )
4249        }
4250    }
4251
4252    #[doc(alias = "select-all")]
4253    fn connect_select_all<F: Fn(&Self) -> bool + 'static>(&self, f: F) -> SignalHandlerId {
4254        unsafe extern "C" fn select_all_trampoline<
4255            P: IsA<TreeView>,
4256            F: Fn(&P) -> bool + 'static,
4257        >(
4258            this: *mut ffi::GtkTreeView,
4259            f: glib::ffi::gpointer,
4260        ) -> glib::ffi::gboolean {
4261            unsafe {
4262                let f: &F = &*(f as *const F);
4263                f(TreeView::from_glib_borrow(this).unsafe_cast_ref()).into_glib()
4264            }
4265        }
4266        unsafe {
4267            let f: Box_<F> = Box_::new(f);
4268            connect_raw(
4269                self.as_ptr() as *mut _,
4270                c"select-all".as_ptr() as *const _,
4271                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4272                    select_all_trampoline::<Self, F> as *const (),
4273                )),
4274                Box_::into_raw(f),
4275            )
4276        }
4277    }
4278
4279    fn emit_select_all(&self) -> bool {
4280        self.emit_by_name("select-all", &[])
4281    }
4282
4283    #[doc(alias = "select-cursor-parent")]
4284    fn connect_select_cursor_parent<F: Fn(&Self) -> bool + 'static>(
4285        &self,
4286        f: F,
4287    ) -> SignalHandlerId {
4288        unsafe extern "C" fn select_cursor_parent_trampoline<
4289            P: IsA<TreeView>,
4290            F: Fn(&P) -> bool + 'static,
4291        >(
4292            this: *mut ffi::GtkTreeView,
4293            f: glib::ffi::gpointer,
4294        ) -> glib::ffi::gboolean {
4295            unsafe {
4296                let f: &F = &*(f as *const F);
4297                f(TreeView::from_glib_borrow(this).unsafe_cast_ref()).into_glib()
4298            }
4299        }
4300        unsafe {
4301            let f: Box_<F> = Box_::new(f);
4302            connect_raw(
4303                self.as_ptr() as *mut _,
4304                c"select-cursor-parent".as_ptr() as *const _,
4305                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4306                    select_cursor_parent_trampoline::<Self, F> as *const (),
4307                )),
4308                Box_::into_raw(f),
4309            )
4310        }
4311    }
4312
4313    fn emit_select_cursor_parent(&self) -> bool {
4314        self.emit_by_name("select-cursor-parent", &[])
4315    }
4316
4317    #[doc(alias = "select-cursor-row")]
4318    fn connect_select_cursor_row<F: Fn(&Self, bool) -> bool + 'static>(
4319        &self,
4320        f: F,
4321    ) -> SignalHandlerId {
4322        unsafe extern "C" fn select_cursor_row_trampoline<
4323            P: IsA<TreeView>,
4324            F: Fn(&P, bool) -> bool + 'static,
4325        >(
4326            this: *mut ffi::GtkTreeView,
4327            object: glib::ffi::gboolean,
4328            f: glib::ffi::gpointer,
4329        ) -> glib::ffi::gboolean {
4330            unsafe {
4331                let f: &F = &*(f as *const F);
4332                f(
4333                    TreeView::from_glib_borrow(this).unsafe_cast_ref(),
4334                    from_glib(object),
4335                )
4336                .into_glib()
4337            }
4338        }
4339        unsafe {
4340            let f: Box_<F> = Box_::new(f);
4341            connect_raw(
4342                self.as_ptr() as *mut _,
4343                c"select-cursor-row".as_ptr() as *const _,
4344                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4345                    select_cursor_row_trampoline::<Self, F> as *const (),
4346                )),
4347                Box_::into_raw(f),
4348            )
4349        }
4350    }
4351
4352    fn emit_select_cursor_row(&self, object: bool) -> bool {
4353        self.emit_by_name("select-cursor-row", &[&object])
4354    }
4355
4356    #[doc(alias = "start-interactive-search")]
4357    fn connect_start_interactive_search<F: Fn(&Self) -> bool + 'static>(
4358        &self,
4359        f: F,
4360    ) -> SignalHandlerId {
4361        unsafe extern "C" fn start_interactive_search_trampoline<
4362            P: IsA<TreeView>,
4363            F: Fn(&P) -> bool + 'static,
4364        >(
4365            this: *mut ffi::GtkTreeView,
4366            f: glib::ffi::gpointer,
4367        ) -> glib::ffi::gboolean {
4368            unsafe {
4369                let f: &F = &*(f as *const F);
4370                f(TreeView::from_glib_borrow(this).unsafe_cast_ref()).into_glib()
4371            }
4372        }
4373        unsafe {
4374            let f: Box_<F> = Box_::new(f);
4375            connect_raw(
4376                self.as_ptr() as *mut _,
4377                c"start-interactive-search".as_ptr() as *const _,
4378                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4379                    start_interactive_search_trampoline::<Self, F> as *const (),
4380                )),
4381                Box_::into_raw(f),
4382            )
4383        }
4384    }
4385
4386    fn emit_start_interactive_search(&self) -> bool {
4387        self.emit_by_name("start-interactive-search", &[])
4388    }
4389
4390    /// The given row is about to be collapsed (hide its children nodes). Use this
4391    /// signal if you need to control the collapsibility of individual rows.
4392    /// ## `iter`
4393    /// the tree iter of the row to collapse
4394    /// ## `path`
4395    /// a tree path that points to the row
4396    ///
4397    /// # Returns
4398    ///
4399    /// [`false`] to allow collapsing, [`true`] to reject
4400    #[doc(alias = "test-collapse-row")]
4401    fn connect_test_collapse_row<
4402        F: Fn(&Self, &TreeIter, &TreePath) -> glib::Propagation + 'static,
4403    >(
4404        &self,
4405        f: F,
4406    ) -> SignalHandlerId {
4407        unsafe extern "C" fn test_collapse_row_trampoline<
4408            P: IsA<TreeView>,
4409            F: Fn(&P, &TreeIter, &TreePath) -> glib::Propagation + 'static,
4410        >(
4411            this: *mut ffi::GtkTreeView,
4412            iter: *mut ffi::GtkTreeIter,
4413            path: *mut ffi::GtkTreePath,
4414            f: glib::ffi::gpointer,
4415        ) -> glib::ffi::gboolean {
4416            unsafe {
4417                let f: &F = &*(f as *const F);
4418                f(
4419                    TreeView::from_glib_borrow(this).unsafe_cast_ref(),
4420                    &from_glib_borrow(iter),
4421                    &from_glib_borrow(path),
4422                )
4423                .into_glib()
4424            }
4425        }
4426        unsafe {
4427            let f: Box_<F> = Box_::new(f);
4428            connect_raw(
4429                self.as_ptr() as *mut _,
4430                c"test-collapse-row".as_ptr() as *const _,
4431                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4432                    test_collapse_row_trampoline::<Self, F> as *const (),
4433                )),
4434                Box_::into_raw(f),
4435            )
4436        }
4437    }
4438
4439    /// The given row is about to be expanded (show its children nodes). Use this
4440    /// signal if you need to control the expandability of individual rows.
4441    /// ## `iter`
4442    /// the tree iter of the row to expand
4443    /// ## `path`
4444    /// a tree path that points to the row
4445    ///
4446    /// # Returns
4447    ///
4448    /// [`false`] to allow expansion, [`true`] to reject
4449    #[doc(alias = "test-expand-row")]
4450    fn connect_test_expand_row<
4451        F: Fn(&Self, &TreeIter, &TreePath) -> glib::Propagation + 'static,
4452    >(
4453        &self,
4454        f: F,
4455    ) -> SignalHandlerId {
4456        unsafe extern "C" fn test_expand_row_trampoline<
4457            P: IsA<TreeView>,
4458            F: Fn(&P, &TreeIter, &TreePath) -> glib::Propagation + 'static,
4459        >(
4460            this: *mut ffi::GtkTreeView,
4461            iter: *mut ffi::GtkTreeIter,
4462            path: *mut ffi::GtkTreePath,
4463            f: glib::ffi::gpointer,
4464        ) -> glib::ffi::gboolean {
4465            unsafe {
4466                let f: &F = &*(f as *const F);
4467                f(
4468                    TreeView::from_glib_borrow(this).unsafe_cast_ref(),
4469                    &from_glib_borrow(iter),
4470                    &from_glib_borrow(path),
4471                )
4472                .into_glib()
4473            }
4474        }
4475        unsafe {
4476            let f: Box_<F> = Box_::new(f);
4477            connect_raw(
4478                self.as_ptr() as *mut _,
4479                c"test-expand-row".as_ptr() as *const _,
4480                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4481                    test_expand_row_trampoline::<Self, F> as *const (),
4482                )),
4483                Box_::into_raw(f),
4484            )
4485        }
4486    }
4487
4488    #[doc(alias = "toggle-cursor-row")]
4489    fn connect_toggle_cursor_row<F: Fn(&Self) -> bool + 'static>(&self, f: F) -> SignalHandlerId {
4490        unsafe extern "C" fn toggle_cursor_row_trampoline<
4491            P: IsA<TreeView>,
4492            F: Fn(&P) -> bool + 'static,
4493        >(
4494            this: *mut ffi::GtkTreeView,
4495            f: glib::ffi::gpointer,
4496        ) -> glib::ffi::gboolean {
4497            unsafe {
4498                let f: &F = &*(f as *const F);
4499                f(TreeView::from_glib_borrow(this).unsafe_cast_ref()).into_glib()
4500            }
4501        }
4502        unsafe {
4503            let f: Box_<F> = Box_::new(f);
4504            connect_raw(
4505                self.as_ptr() as *mut _,
4506                c"toggle-cursor-row".as_ptr() as *const _,
4507                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4508                    toggle_cursor_row_trampoline::<Self, F> as *const (),
4509                )),
4510                Box_::into_raw(f),
4511            )
4512        }
4513    }
4514
4515    fn emit_toggle_cursor_row(&self) -> bool {
4516        self.emit_by_name("toggle-cursor-row", &[])
4517    }
4518
4519    #[doc(alias = "unselect-all")]
4520    fn connect_unselect_all<F: Fn(&Self) -> bool + 'static>(&self, f: F) -> SignalHandlerId {
4521        unsafe extern "C" fn unselect_all_trampoline<
4522            P: IsA<TreeView>,
4523            F: Fn(&P) -> bool + 'static,
4524        >(
4525            this: *mut ffi::GtkTreeView,
4526            f: glib::ffi::gpointer,
4527        ) -> glib::ffi::gboolean {
4528            unsafe {
4529                let f: &F = &*(f as *const F);
4530                f(TreeView::from_glib_borrow(this).unsafe_cast_ref()).into_glib()
4531            }
4532        }
4533        unsafe {
4534            let f: Box_<F> = Box_::new(f);
4535            connect_raw(
4536                self.as_ptr() as *mut _,
4537                c"unselect-all".as_ptr() as *const _,
4538                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4539                    unselect_all_trampoline::<Self, F> as *const (),
4540                )),
4541                Box_::into_raw(f),
4542            )
4543        }
4544    }
4545
4546    fn emit_unselect_all(&self) -> bool {
4547        self.emit_by_name("unselect-all", &[])
4548    }
4549
4550    #[doc(alias = "activate-on-single-click")]
4551    fn connect_activate_on_single_click_notify<F: Fn(&Self) + 'static>(
4552        &self,
4553        f: F,
4554    ) -> SignalHandlerId {
4555        unsafe extern "C" fn notify_activate_on_single_click_trampoline<
4556            P: IsA<TreeView>,
4557            F: Fn(&P) + 'static,
4558        >(
4559            this: *mut ffi::GtkTreeView,
4560            _param_spec: glib::ffi::gpointer,
4561            f: glib::ffi::gpointer,
4562        ) {
4563            unsafe {
4564                let f: &F = &*(f as *const F);
4565                f(TreeView::from_glib_borrow(this).unsafe_cast_ref())
4566            }
4567        }
4568        unsafe {
4569            let f: Box_<F> = Box_::new(f);
4570            connect_raw(
4571                self.as_ptr() as *mut _,
4572                c"notify::activate-on-single-click".as_ptr() as *const _,
4573                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4574                    notify_activate_on_single_click_trampoline::<Self, F> as *const (),
4575                )),
4576                Box_::into_raw(f),
4577            )
4578        }
4579    }
4580
4581    #[doc(alias = "enable-grid-lines")]
4582    fn connect_enable_grid_lines_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4583        unsafe extern "C" fn notify_enable_grid_lines_trampoline<
4584            P: IsA<TreeView>,
4585            F: Fn(&P) + 'static,
4586        >(
4587            this: *mut ffi::GtkTreeView,
4588            _param_spec: glib::ffi::gpointer,
4589            f: glib::ffi::gpointer,
4590        ) {
4591            unsafe {
4592                let f: &F = &*(f as *const F);
4593                f(TreeView::from_glib_borrow(this).unsafe_cast_ref())
4594            }
4595        }
4596        unsafe {
4597            let f: Box_<F> = Box_::new(f);
4598            connect_raw(
4599                self.as_ptr() as *mut _,
4600                c"notify::enable-grid-lines".as_ptr() as *const _,
4601                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4602                    notify_enable_grid_lines_trampoline::<Self, F> as *const (),
4603                )),
4604                Box_::into_raw(f),
4605            )
4606        }
4607    }
4608
4609    #[doc(alias = "enable-search")]
4610    fn connect_enable_search_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4611        unsafe extern "C" fn notify_enable_search_trampoline<
4612            P: IsA<TreeView>,
4613            F: Fn(&P) + 'static,
4614        >(
4615            this: *mut ffi::GtkTreeView,
4616            _param_spec: glib::ffi::gpointer,
4617            f: glib::ffi::gpointer,
4618        ) {
4619            unsafe {
4620                let f: &F = &*(f as *const F);
4621                f(TreeView::from_glib_borrow(this).unsafe_cast_ref())
4622            }
4623        }
4624        unsafe {
4625            let f: Box_<F> = Box_::new(f);
4626            connect_raw(
4627                self.as_ptr() as *mut _,
4628                c"notify::enable-search".as_ptr() as *const _,
4629                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4630                    notify_enable_search_trampoline::<Self, F> as *const (),
4631                )),
4632                Box_::into_raw(f),
4633            )
4634        }
4635    }
4636
4637    #[doc(alias = "enable-tree-lines")]
4638    fn connect_enable_tree_lines_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4639        unsafe extern "C" fn notify_enable_tree_lines_trampoline<
4640            P: IsA<TreeView>,
4641            F: Fn(&P) + 'static,
4642        >(
4643            this: *mut ffi::GtkTreeView,
4644            _param_spec: glib::ffi::gpointer,
4645            f: glib::ffi::gpointer,
4646        ) {
4647            unsafe {
4648                let f: &F = &*(f as *const F);
4649                f(TreeView::from_glib_borrow(this).unsafe_cast_ref())
4650            }
4651        }
4652        unsafe {
4653            let f: Box_<F> = Box_::new(f);
4654            connect_raw(
4655                self.as_ptr() as *mut _,
4656                c"notify::enable-tree-lines".as_ptr() as *const _,
4657                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4658                    notify_enable_tree_lines_trampoline::<Self, F> as *const (),
4659                )),
4660                Box_::into_raw(f),
4661            )
4662        }
4663    }
4664
4665    #[doc(alias = "expander-column")]
4666    fn connect_expander_column_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4667        unsafe extern "C" fn notify_expander_column_trampoline<
4668            P: IsA<TreeView>,
4669            F: Fn(&P) + 'static,
4670        >(
4671            this: *mut ffi::GtkTreeView,
4672            _param_spec: glib::ffi::gpointer,
4673            f: glib::ffi::gpointer,
4674        ) {
4675            unsafe {
4676                let f: &F = &*(f as *const F);
4677                f(TreeView::from_glib_borrow(this).unsafe_cast_ref())
4678            }
4679        }
4680        unsafe {
4681            let f: Box_<F> = Box_::new(f);
4682            connect_raw(
4683                self.as_ptr() as *mut _,
4684                c"notify::expander-column".as_ptr() as *const _,
4685                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4686                    notify_expander_column_trampoline::<Self, F> as *const (),
4687                )),
4688                Box_::into_raw(f),
4689            )
4690        }
4691    }
4692
4693    #[doc(alias = "fixed-height-mode")]
4694    fn connect_fixed_height_mode_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4695        unsafe extern "C" fn notify_fixed_height_mode_trampoline<
4696            P: IsA<TreeView>,
4697            F: Fn(&P) + 'static,
4698        >(
4699            this: *mut ffi::GtkTreeView,
4700            _param_spec: glib::ffi::gpointer,
4701            f: glib::ffi::gpointer,
4702        ) {
4703            unsafe {
4704                let f: &F = &*(f as *const F);
4705                f(TreeView::from_glib_borrow(this).unsafe_cast_ref())
4706            }
4707        }
4708        unsafe {
4709            let f: Box_<F> = Box_::new(f);
4710            connect_raw(
4711                self.as_ptr() as *mut _,
4712                c"notify::fixed-height-mode".as_ptr() as *const _,
4713                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4714                    notify_fixed_height_mode_trampoline::<Self, F> as *const (),
4715                )),
4716                Box_::into_raw(f),
4717            )
4718        }
4719    }
4720
4721    #[doc(alias = "headers-clickable")]
4722    fn connect_headers_clickable_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4723        unsafe extern "C" fn notify_headers_clickable_trampoline<
4724            P: IsA<TreeView>,
4725            F: Fn(&P) + 'static,
4726        >(
4727            this: *mut ffi::GtkTreeView,
4728            _param_spec: glib::ffi::gpointer,
4729            f: glib::ffi::gpointer,
4730        ) {
4731            unsafe {
4732                let f: &F = &*(f as *const F);
4733                f(TreeView::from_glib_borrow(this).unsafe_cast_ref())
4734            }
4735        }
4736        unsafe {
4737            let f: Box_<F> = Box_::new(f);
4738            connect_raw(
4739                self.as_ptr() as *mut _,
4740                c"notify::headers-clickable".as_ptr() as *const _,
4741                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4742                    notify_headers_clickable_trampoline::<Self, F> as *const (),
4743                )),
4744                Box_::into_raw(f),
4745            )
4746        }
4747    }
4748
4749    #[doc(alias = "headers-visible")]
4750    fn connect_headers_visible_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4751        unsafe extern "C" fn notify_headers_visible_trampoline<
4752            P: IsA<TreeView>,
4753            F: Fn(&P) + 'static,
4754        >(
4755            this: *mut ffi::GtkTreeView,
4756            _param_spec: glib::ffi::gpointer,
4757            f: glib::ffi::gpointer,
4758        ) {
4759            unsafe {
4760                let f: &F = &*(f as *const F);
4761                f(TreeView::from_glib_borrow(this).unsafe_cast_ref())
4762            }
4763        }
4764        unsafe {
4765            let f: Box_<F> = Box_::new(f);
4766            connect_raw(
4767                self.as_ptr() as *mut _,
4768                c"notify::headers-visible".as_ptr() as *const _,
4769                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4770                    notify_headers_visible_trampoline::<Self, F> as *const (),
4771                )),
4772                Box_::into_raw(f),
4773            )
4774        }
4775    }
4776
4777    #[doc(alias = "hover-expand")]
4778    fn connect_hover_expand_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4779        unsafe extern "C" fn notify_hover_expand_trampoline<
4780            P: IsA<TreeView>,
4781            F: Fn(&P) + 'static,
4782        >(
4783            this: *mut ffi::GtkTreeView,
4784            _param_spec: glib::ffi::gpointer,
4785            f: glib::ffi::gpointer,
4786        ) {
4787            unsafe {
4788                let f: &F = &*(f as *const F);
4789                f(TreeView::from_glib_borrow(this).unsafe_cast_ref())
4790            }
4791        }
4792        unsafe {
4793            let f: Box_<F> = Box_::new(f);
4794            connect_raw(
4795                self.as_ptr() as *mut _,
4796                c"notify::hover-expand".as_ptr() as *const _,
4797                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4798                    notify_hover_expand_trampoline::<Self, F> as *const (),
4799                )),
4800                Box_::into_raw(f),
4801            )
4802        }
4803    }
4804
4805    #[doc(alias = "hover-selection")]
4806    fn connect_hover_selection_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4807        unsafe extern "C" fn notify_hover_selection_trampoline<
4808            P: IsA<TreeView>,
4809            F: Fn(&P) + 'static,
4810        >(
4811            this: *mut ffi::GtkTreeView,
4812            _param_spec: glib::ffi::gpointer,
4813            f: glib::ffi::gpointer,
4814        ) {
4815            unsafe {
4816                let f: &F = &*(f as *const F);
4817                f(TreeView::from_glib_borrow(this).unsafe_cast_ref())
4818            }
4819        }
4820        unsafe {
4821            let f: Box_<F> = Box_::new(f);
4822            connect_raw(
4823                self.as_ptr() as *mut _,
4824                c"notify::hover-selection".as_ptr() as *const _,
4825                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4826                    notify_hover_selection_trampoline::<Self, F> as *const (),
4827                )),
4828                Box_::into_raw(f),
4829            )
4830        }
4831    }
4832
4833    #[doc(alias = "level-indentation")]
4834    fn connect_level_indentation_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4835        unsafe extern "C" fn notify_level_indentation_trampoline<
4836            P: IsA<TreeView>,
4837            F: Fn(&P) + 'static,
4838        >(
4839            this: *mut ffi::GtkTreeView,
4840            _param_spec: glib::ffi::gpointer,
4841            f: glib::ffi::gpointer,
4842        ) {
4843            unsafe {
4844                let f: &F = &*(f as *const F);
4845                f(TreeView::from_glib_borrow(this).unsafe_cast_ref())
4846            }
4847        }
4848        unsafe {
4849            let f: Box_<F> = Box_::new(f);
4850            connect_raw(
4851                self.as_ptr() as *mut _,
4852                c"notify::level-indentation".as_ptr() as *const _,
4853                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4854                    notify_level_indentation_trampoline::<Self, F> as *const (),
4855                )),
4856                Box_::into_raw(f),
4857            )
4858        }
4859    }
4860
4861    #[doc(alias = "model")]
4862    fn connect_model_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4863        unsafe extern "C" fn notify_model_trampoline<P: IsA<TreeView>, F: Fn(&P) + 'static>(
4864            this: *mut ffi::GtkTreeView,
4865            _param_spec: glib::ffi::gpointer,
4866            f: glib::ffi::gpointer,
4867        ) {
4868            unsafe {
4869                let f: &F = &*(f as *const F);
4870                f(TreeView::from_glib_borrow(this).unsafe_cast_ref())
4871            }
4872        }
4873        unsafe {
4874            let f: Box_<F> = Box_::new(f);
4875            connect_raw(
4876                self.as_ptr() as *mut _,
4877                c"notify::model".as_ptr() as *const _,
4878                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4879                    notify_model_trampoline::<Self, F> as *const (),
4880                )),
4881                Box_::into_raw(f),
4882            )
4883        }
4884    }
4885
4886    #[doc(alias = "reorderable")]
4887    fn connect_reorderable_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4888        unsafe extern "C" fn notify_reorderable_trampoline<
4889            P: IsA<TreeView>,
4890            F: Fn(&P) + 'static,
4891        >(
4892            this: *mut ffi::GtkTreeView,
4893            _param_spec: glib::ffi::gpointer,
4894            f: glib::ffi::gpointer,
4895        ) {
4896            unsafe {
4897                let f: &F = &*(f as *const F);
4898                f(TreeView::from_glib_borrow(this).unsafe_cast_ref())
4899            }
4900        }
4901        unsafe {
4902            let f: Box_<F> = Box_::new(f);
4903            connect_raw(
4904                self.as_ptr() as *mut _,
4905                c"notify::reorderable".as_ptr() as *const _,
4906                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4907                    notify_reorderable_trampoline::<Self, F> as *const (),
4908                )),
4909                Box_::into_raw(f),
4910            )
4911        }
4912    }
4913
4914    #[doc(alias = "rubber-banding")]
4915    fn connect_rubber_banding_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4916        unsafe extern "C" fn notify_rubber_banding_trampoline<
4917            P: IsA<TreeView>,
4918            F: Fn(&P) + 'static,
4919        >(
4920            this: *mut ffi::GtkTreeView,
4921            _param_spec: glib::ffi::gpointer,
4922            f: glib::ffi::gpointer,
4923        ) {
4924            unsafe {
4925                let f: &F = &*(f as *const F);
4926                f(TreeView::from_glib_borrow(this).unsafe_cast_ref())
4927            }
4928        }
4929        unsafe {
4930            let f: Box_<F> = Box_::new(f);
4931            connect_raw(
4932                self.as_ptr() as *mut _,
4933                c"notify::rubber-banding".as_ptr() as *const _,
4934                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4935                    notify_rubber_banding_trampoline::<Self, F> as *const (),
4936                )),
4937                Box_::into_raw(f),
4938            )
4939        }
4940    }
4941
4942    #[doc(alias = "search-column")]
4943    fn connect_search_column_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4944        unsafe extern "C" fn notify_search_column_trampoline<
4945            P: IsA<TreeView>,
4946            F: Fn(&P) + 'static,
4947        >(
4948            this: *mut ffi::GtkTreeView,
4949            _param_spec: glib::ffi::gpointer,
4950            f: glib::ffi::gpointer,
4951        ) {
4952            unsafe {
4953                let f: &F = &*(f as *const F);
4954                f(TreeView::from_glib_borrow(this).unsafe_cast_ref())
4955            }
4956        }
4957        unsafe {
4958            let f: Box_<F> = Box_::new(f);
4959            connect_raw(
4960                self.as_ptr() as *mut _,
4961                c"notify::search-column".as_ptr() as *const _,
4962                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4963                    notify_search_column_trampoline::<Self, F> as *const (),
4964                )),
4965                Box_::into_raw(f),
4966            )
4967        }
4968    }
4969
4970    #[doc(alias = "show-expanders")]
4971    fn connect_show_expanders_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4972        unsafe extern "C" fn notify_show_expanders_trampoline<
4973            P: IsA<TreeView>,
4974            F: Fn(&P) + 'static,
4975        >(
4976            this: *mut ffi::GtkTreeView,
4977            _param_spec: glib::ffi::gpointer,
4978            f: glib::ffi::gpointer,
4979        ) {
4980            unsafe {
4981                let f: &F = &*(f as *const F);
4982                f(TreeView::from_glib_borrow(this).unsafe_cast_ref())
4983            }
4984        }
4985        unsafe {
4986            let f: Box_<F> = Box_::new(f);
4987            connect_raw(
4988                self.as_ptr() as *mut _,
4989                c"notify::show-expanders".as_ptr() as *const _,
4990                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4991                    notify_show_expanders_trampoline::<Self, F> as *const (),
4992                )),
4993                Box_::into_raw(f),
4994            )
4995        }
4996    }
4997
4998    #[doc(alias = "tooltip-column")]
4999    fn connect_tooltip_column_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
5000        unsafe extern "C" fn notify_tooltip_column_trampoline<
5001            P: IsA<TreeView>,
5002            F: Fn(&P) + 'static,
5003        >(
5004            this: *mut ffi::GtkTreeView,
5005            _param_spec: glib::ffi::gpointer,
5006            f: glib::ffi::gpointer,
5007        ) {
5008            unsafe {
5009                let f: &F = &*(f as *const F);
5010                f(TreeView::from_glib_borrow(this).unsafe_cast_ref())
5011            }
5012        }
5013        unsafe {
5014            let f: Box_<F> = Box_::new(f);
5015            connect_raw(
5016                self.as_ptr() as *mut _,
5017                c"notify::tooltip-column".as_ptr() as *const _,
5018                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
5019                    notify_tooltip_column_trampoline::<Self, F> as *const (),
5020                )),
5021                Box_::into_raw(f),
5022            )
5023        }
5024    }
5025}
5026
5027impl<O: IsA<TreeView>> TreeViewExt for O {}