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