Skip to main content

gtk/
list_box.rs

1// Take a look at the license at the top of the repository in the LICENSE file.
2
3use crate::{ListBox, ffi};
4use glib::object::IsA;
5use glib::translate::*;
6use std::ptr;
7
8mod sealed {
9    pub trait Sealed {}
10    impl<T: glib::object::IsA<crate::ListBox>> Sealed for T {}
11}
12
13pub trait ListBoxExtManual: IsA<ListBox> + sealed::Sealed + 'static {
14    fn unbind_model(&self) {
15        unsafe {
16            ffi::gtk_list_box_bind_model(
17                self.as_ref().to_glib_none().0,
18                ptr::null_mut(),
19                None,
20                ptr::null_mut(),
21                None,
22            )
23        }
24    }
25}
26
27impl<O: IsA<ListBox>> ListBoxExtManual for O {}