[go: up one dir, main page]

gtk4/
tree_path.rs

1// Take a look at the license at the top of the repository in the LICENSE file.
2
3use glib::{translate::*, Slice};
4
5use crate::TreePath;
6
7impl TreePath {
8    #[doc(alias = "gtk_tree_path_get_indices_with_depth")]
9    #[doc(alias = "get_indices")]
10    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
11    #[allow(deprecated)]
12    pub fn indices(&self) -> Slice<i32> {
13        unsafe {
14            let mut count = 0;
15            let ptr = crate::ffi::gtk_tree_path_get_indices_with_depth(
16                mut_override(self.to_glib_none().0),
17                &mut count,
18            );
19            Slice::from_glib_none_num(ptr, count as usize)
20        }
21    }
22}