1use glib::translate::*;
4
5use crate::{prelude::*, CellLayout, CellRenderer};
6
7mod sealed {
8 pub trait Sealed {}
9 impl<T: super::IsA<super::CellLayout>> Sealed for T {}
10}
11#[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
15#[allow(deprecated)]
16pub trait CellLayoutExtManual: sealed::Sealed + IsA<CellLayout> + 'static {
17 #[doc(alias = "gtk_cell_layout_set_attributes")]
31 fn set_attributes(&self, cell: &impl IsA<CellRenderer>, attributes: &[(&str, i32)]) {
32 self.as_ref().clear_attributes(cell);
33 attributes.iter().for_each(|(attr, column)| {
34 self.as_ref().add_attribute(cell, attr, *column);
35 });
36 }
37
38 #[doc(alias = "gtk_cell_layout_set_cell_data_func")]
39 #[doc(alias = "set_cell_data_func")]
40 fn unset_cell_data_func(&self, cell: &impl IsA<CellRenderer>) {
41 unsafe {
42 crate::ffi::gtk_cell_layout_set_cell_data_func(
43 self.as_ref().to_glib_none().0,
44 cell.as_ref().to_glib_none().0,
45 None,
46 std::ptr::null_mut(),
47 None,
48 );
49 }
50 }
51}
52
53impl<O: IsA<CellLayout>> CellLayoutExtManual for O {}