1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// Take a look at the license at the top of the repository in the LICENSE file.

use glib::translate::*;

use crate::{prelude::*, TreeIter, TreePath, TreeRowReference};

impl TreeRowReference {
    /// Lets a set of row reference created by
    /// gtk_tree_row_reference_new_proxy() know that the
    /// model emitted the ::rows-reordered signal.
    ///
    /// # Deprecated since 4.10
    ///
    /// ## `proxy`
    /// a `GObject`
    /// ## `path`
    /// the parent path of the reordered signal
    /// ## `iter`
    /// the iter pointing to the parent of the reordered
    /// ## `new_order`
    /// the new order of rows
    #[doc(alias = "gtk_tree_row_reference_reordered")]
    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
    #[allow(deprecated)]
    pub fn reordered(
        &self,
        proxy: &impl IsA<glib::Object>,
        path: &TreePath,
        iter: &TreeIter,
        new_order: &[i32],
    ) {
        assert_eq!(
            new_order.len() as i32,
            self.model().iter_n_children(Some(iter)),
            "TreeRowReference got passed a `new_order` bigger than the total children in the model for the passed iter"
        );
        assert_initialized_main_thread!();
        unsafe {
            ffi::gtk_tree_row_reference_reordered(
                proxy.as_ref().to_glib_none().0,
                mut_override(path.to_glib_none().0),
                mut_override(iter.to_glib_none().0),
                mut_override(new_order.as_ptr()),
            )
        }
    }
}