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
use crate::MapListModel;
use glib::translate::*;
use glib::IsA;
impl MapListModel {
#[doc(alias = "gtk_map_list_model_new")]
pub fn without_map_func<P: IsA<gio::ListModel>>(model: Option<&P>) -> Self {
assert_initialized_main_thread!();
unsafe {
from_glib_full(ffi::gtk_map_list_model_new(
model.map(|p| p.as_ref()).to_glib_full(),
None,
std::ptr::null_mut(),
None,
))
}
}
#[doc(alias = "gtk_map_list_model_set_map_func")]
#[doc(alias = "set_map_func")]
pub fn unset_map_func(&self) {
unsafe {
ffi::gtk_map_list_model_set_map_func(
self.to_glib_none().0,
None,
std::ptr::null_mut(),
None,
);
}
}
}