1 // This file was generated by gir (https://github.com/gtk-rs/gir)
2 // from gir-files (https://github.com/gtk-rs/gir-files)
3 // DO NOT EDIT
4 
5 use crate::Buildable;
6 use crate::CellArea;
7 use crate::CellLayout;
8 use crate::CellRenderer;
9 use crate::SortType;
10 use crate::TreeIter;
11 use crate::TreeModel;
12 use crate::TreeViewColumnSizing;
13 use crate::Widget;
14 use glib::object::Cast;
15 use glib::object::IsA;
16 use glib::signal::connect_raw;
17 use glib::signal::SignalHandlerId;
18 use glib::translate::*;
19 use glib::StaticType;
20 use glib::ToValue;
21 use std::boxed::Box as Box_;
22 use std::fmt;
23 use std::mem;
24 use std::mem::transmute;
25 
26 glib::wrapper! {
27     #[doc(alias = "GtkTreeViewColumn")]
28     pub struct TreeViewColumn(Object<ffi::GtkTreeViewColumn, ffi::GtkTreeViewColumnClass>) @implements Buildable, CellLayout;
29 
30     match fn {
31         type_ => || ffi::gtk_tree_view_column_get_type(),
32     }
33 }
34 
35 impl TreeViewColumn {
36     #[doc(alias = "gtk_tree_view_column_new")]
new() -> TreeViewColumn37     pub fn new() -> TreeViewColumn {
38         assert_initialized_main_thread!();
39         unsafe { from_glib_none(ffi::gtk_tree_view_column_new()) }
40     }
41 
42     #[doc(alias = "gtk_tree_view_column_new_with_area")]
43     #[doc(alias = "new_with_area")]
with_area<P: IsA<CellArea>>(area: &P) -> TreeViewColumn44     pub fn with_area<P: IsA<CellArea>>(area: &P) -> TreeViewColumn {
45         skip_assert_initialized!();
46         unsafe {
47             from_glib_none(ffi::gtk_tree_view_column_new_with_area(
48                 area.as_ref().to_glib_none().0,
49             ))
50         }
51     }
52 
53     //#[doc(alias = "gtk_tree_view_column_new_with_attributes")]
54     //#[doc(alias = "new_with_attributes")]
55     //pub fn with_attributes<P: IsA<CellRenderer>>(title: &str, cell: &P, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs) -> TreeViewColumn {
56     //    unsafe { TODO: call ffi:gtk_tree_view_column_new_with_attributes() }
57     //}
58 
59     // rustdoc-stripper-ignore-next
60     /// Creates a new builder-pattern struct instance to construct [`TreeViewColumn`] objects.
61     ///
62     /// This method returns an instance of [`TreeViewColumnBuilder`] which can be used to create [`TreeViewColumn`] objects.
builder() -> TreeViewColumnBuilder63     pub fn builder() -> TreeViewColumnBuilder {
64         TreeViewColumnBuilder::default()
65     }
66 }
67 
68 impl Default for TreeViewColumn {
default() -> Self69     fn default() -> Self {
70         Self::new()
71     }
72 }
73 
74 #[derive(Clone, Default)]
75 // rustdoc-stripper-ignore-next
76 /// A [builder-pattern] type to construct [`TreeViewColumn`] objects.
77 ///
78 /// [builder-pattern]: https://doc.rust-lang.org/1.0.0/style/ownership/builders.html
79 pub struct TreeViewColumnBuilder {
80     alignment: Option<f32>,
81     cell_area: Option<CellArea>,
82     clickable: Option<bool>,
83     expand: Option<bool>,
84     fixed_width: Option<i32>,
85     max_width: Option<i32>,
86     min_width: Option<i32>,
87     reorderable: Option<bool>,
88     resizable: Option<bool>,
89     sizing: Option<TreeViewColumnSizing>,
90     sort_column_id: Option<i32>,
91     sort_indicator: Option<bool>,
92     sort_order: Option<SortType>,
93     spacing: Option<i32>,
94     title: Option<String>,
95     visible: Option<bool>,
96     widget: Option<Widget>,
97 }
98 
99 impl TreeViewColumnBuilder {
100     // rustdoc-stripper-ignore-next
101     /// Create a new [`TreeViewColumnBuilder`].
new() -> Self102     pub fn new() -> Self {
103         Self::default()
104     }
105 
106     // rustdoc-stripper-ignore-next
107     /// Build the [`TreeViewColumn`].
build(self) -> TreeViewColumn108     pub fn build(self) -> TreeViewColumn {
109         let mut properties: Vec<(&str, &dyn ToValue)> = vec![];
110         if let Some(ref alignment) = self.alignment {
111             properties.push(("alignment", alignment));
112         }
113         if let Some(ref cell_area) = self.cell_area {
114             properties.push(("cell-area", cell_area));
115         }
116         if let Some(ref clickable) = self.clickable {
117             properties.push(("clickable", clickable));
118         }
119         if let Some(ref expand) = self.expand {
120             properties.push(("expand", expand));
121         }
122         if let Some(ref fixed_width) = self.fixed_width {
123             properties.push(("fixed-width", fixed_width));
124         }
125         if let Some(ref max_width) = self.max_width {
126             properties.push(("max-width", max_width));
127         }
128         if let Some(ref min_width) = self.min_width {
129             properties.push(("min-width", min_width));
130         }
131         if let Some(ref reorderable) = self.reorderable {
132             properties.push(("reorderable", reorderable));
133         }
134         if let Some(ref resizable) = self.resizable {
135             properties.push(("resizable", resizable));
136         }
137         if let Some(ref sizing) = self.sizing {
138             properties.push(("sizing", sizing));
139         }
140         if let Some(ref sort_column_id) = self.sort_column_id {
141             properties.push(("sort-column-id", sort_column_id));
142         }
143         if let Some(ref sort_indicator) = self.sort_indicator {
144             properties.push(("sort-indicator", sort_indicator));
145         }
146         if let Some(ref sort_order) = self.sort_order {
147             properties.push(("sort-order", sort_order));
148         }
149         if let Some(ref spacing) = self.spacing {
150             properties.push(("spacing", spacing));
151         }
152         if let Some(ref title) = self.title {
153             properties.push(("title", title));
154         }
155         if let Some(ref visible) = self.visible {
156             properties.push(("visible", visible));
157         }
158         if let Some(ref widget) = self.widget {
159             properties.push(("widget", widget));
160         }
161         glib::Object::new::<TreeViewColumn>(&properties)
162             .expect("Failed to create an instance of TreeViewColumn")
163     }
164 
alignment(mut self, alignment: f32) -> Self165     pub fn alignment(mut self, alignment: f32) -> Self {
166         self.alignment = Some(alignment);
167         self
168     }
169 
cell_area<P: IsA<CellArea>>(mut self, cell_area: &P) -> Self170     pub fn cell_area<P: IsA<CellArea>>(mut self, cell_area: &P) -> Self {
171         self.cell_area = Some(cell_area.clone().upcast());
172         self
173     }
174 
clickable(mut self, clickable: bool) -> Self175     pub fn clickable(mut self, clickable: bool) -> Self {
176         self.clickable = Some(clickable);
177         self
178     }
179 
expand(mut self, expand: bool) -> Self180     pub fn expand(mut self, expand: bool) -> Self {
181         self.expand = Some(expand);
182         self
183     }
184 
fixed_width(mut self, fixed_width: i32) -> Self185     pub fn fixed_width(mut self, fixed_width: i32) -> Self {
186         self.fixed_width = Some(fixed_width);
187         self
188     }
189 
max_width(mut self, max_width: i32) -> Self190     pub fn max_width(mut self, max_width: i32) -> Self {
191         self.max_width = Some(max_width);
192         self
193     }
194 
min_width(mut self, min_width: i32) -> Self195     pub fn min_width(mut self, min_width: i32) -> Self {
196         self.min_width = Some(min_width);
197         self
198     }
199 
reorderable(mut self, reorderable: bool) -> Self200     pub fn reorderable(mut self, reorderable: bool) -> Self {
201         self.reorderable = Some(reorderable);
202         self
203     }
204 
resizable(mut self, resizable: bool) -> Self205     pub fn resizable(mut self, resizable: bool) -> Self {
206         self.resizable = Some(resizable);
207         self
208     }
209 
sizing(mut self, sizing: TreeViewColumnSizing) -> Self210     pub fn sizing(mut self, sizing: TreeViewColumnSizing) -> Self {
211         self.sizing = Some(sizing);
212         self
213     }
214 
sort_column_id(mut self, sort_column_id: i32) -> Self215     pub fn sort_column_id(mut self, sort_column_id: i32) -> Self {
216         self.sort_column_id = Some(sort_column_id);
217         self
218     }
219 
sort_indicator(mut self, sort_indicator: bool) -> Self220     pub fn sort_indicator(mut self, sort_indicator: bool) -> Self {
221         self.sort_indicator = Some(sort_indicator);
222         self
223     }
224 
sort_order(mut self, sort_order: SortType) -> Self225     pub fn sort_order(mut self, sort_order: SortType) -> Self {
226         self.sort_order = Some(sort_order);
227         self
228     }
229 
spacing(mut self, spacing: i32) -> Self230     pub fn spacing(mut self, spacing: i32) -> Self {
231         self.spacing = Some(spacing);
232         self
233     }
234 
title(mut self, title: &str) -> Self235     pub fn title(mut self, title: &str) -> Self {
236         self.title = Some(title.to_string());
237         self
238     }
239 
visible(mut self, visible: bool) -> Self240     pub fn visible(mut self, visible: bool) -> Self {
241         self.visible = Some(visible);
242         self
243     }
244 
widget<P: IsA<Widget>>(mut self, widget: &P) -> Self245     pub fn widget<P: IsA<Widget>>(mut self, widget: &P) -> Self {
246         self.widget = Some(widget.clone().upcast());
247         self
248     }
249 }
250 
251 pub const NONE_TREE_VIEW_COLUMN: Option<&TreeViewColumn> = None;
252 
253 pub trait TreeViewColumnExt: 'static {
254     #[doc(alias = "gtk_tree_view_column_cell_get_position")]
cell_get_position<P: IsA<CellRenderer>>(&self, cell_renderer: &P) -> Option<(i32, i32)>255     fn cell_get_position<P: IsA<CellRenderer>>(&self, cell_renderer: &P) -> Option<(i32, i32)>;
256 
257     #[doc(alias = "gtk_tree_view_column_cell_get_size")]
cell_get_size(&self, cell_area: Option<&gdk::Rectangle>) -> (i32, i32, i32, i32)258     fn cell_get_size(&self, cell_area: Option<&gdk::Rectangle>) -> (i32, i32, i32, i32);
259 
260     #[doc(alias = "gtk_tree_view_column_cell_is_visible")]
cell_is_visible(&self) -> bool261     fn cell_is_visible(&self) -> bool;
262 
263     #[doc(alias = "gtk_tree_view_column_cell_set_cell_data")]
cell_set_cell_data<P: IsA<TreeModel>>( &self, tree_model: &P, iter: &TreeIter, is_expander: bool, is_expanded: bool, )264     fn cell_set_cell_data<P: IsA<TreeModel>>(
265         &self,
266         tree_model: &P,
267         iter: &TreeIter,
268         is_expander: bool,
269         is_expanded: bool,
270     );
271 
272     #[doc(alias = "gtk_tree_view_column_clicked")]
clicked(&self)273     fn clicked(&self);
274 
275     #[doc(alias = "gtk_tree_view_column_focus_cell")]
focus_cell<P: IsA<CellRenderer>>(&self, cell: &P)276     fn focus_cell<P: IsA<CellRenderer>>(&self, cell: &P);
277 
278     #[doc(alias = "gtk_tree_view_column_get_alignment")]
279     #[doc(alias = "get_alignment")]
alignment(&self) -> f32280     fn alignment(&self) -> f32;
281 
282     #[doc(alias = "gtk_tree_view_column_get_button")]
283     #[doc(alias = "get_button")]
button(&self) -> Option<Widget>284     fn button(&self) -> Option<Widget>;
285 
286     #[doc(alias = "gtk_tree_view_column_get_clickable")]
287     #[doc(alias = "get_clickable")]
is_clickable(&self) -> bool288     fn is_clickable(&self) -> bool;
289 
290     #[doc(alias = "gtk_tree_view_column_get_expand")]
291     #[doc(alias = "get_expand")]
expands(&self) -> bool292     fn expands(&self) -> bool;
293 
294     #[doc(alias = "gtk_tree_view_column_get_fixed_width")]
295     #[doc(alias = "get_fixed_width")]
fixed_width(&self) -> i32296     fn fixed_width(&self) -> i32;
297 
298     #[doc(alias = "gtk_tree_view_column_get_max_width")]
299     #[doc(alias = "get_max_width")]
max_width(&self) -> i32300     fn max_width(&self) -> i32;
301 
302     #[doc(alias = "gtk_tree_view_column_get_min_width")]
303     #[doc(alias = "get_min_width")]
min_width(&self) -> i32304     fn min_width(&self) -> i32;
305 
306     #[doc(alias = "gtk_tree_view_column_get_reorderable")]
307     #[doc(alias = "get_reorderable")]
is_reorderable(&self) -> bool308     fn is_reorderable(&self) -> bool;
309 
310     #[doc(alias = "gtk_tree_view_column_get_resizable")]
311     #[doc(alias = "get_resizable")]
is_resizable(&self) -> bool312     fn is_resizable(&self) -> bool;
313 
314     #[doc(alias = "gtk_tree_view_column_get_sizing")]
315     #[doc(alias = "get_sizing")]
sizing(&self) -> TreeViewColumnSizing316     fn sizing(&self) -> TreeViewColumnSizing;
317 
318     #[doc(alias = "gtk_tree_view_column_get_sort_column_id")]
319     #[doc(alias = "get_sort_column_id")]
sort_column_id(&self) -> i32320     fn sort_column_id(&self) -> i32;
321 
322     #[doc(alias = "gtk_tree_view_column_get_sort_indicator")]
323     #[doc(alias = "get_sort_indicator")]
is_sort_indicator(&self) -> bool324     fn is_sort_indicator(&self) -> bool;
325 
326     #[doc(alias = "gtk_tree_view_column_get_sort_order")]
327     #[doc(alias = "get_sort_order")]
sort_order(&self) -> SortType328     fn sort_order(&self) -> SortType;
329 
330     #[doc(alias = "gtk_tree_view_column_get_spacing")]
331     #[doc(alias = "get_spacing")]
spacing(&self) -> i32332     fn spacing(&self) -> i32;
333 
334     #[doc(alias = "gtk_tree_view_column_get_title")]
335     #[doc(alias = "get_title")]
title(&self) -> Option<glib::GString>336     fn title(&self) -> Option<glib::GString>;
337 
338     #[doc(alias = "gtk_tree_view_column_get_tree_view")]
339     #[doc(alias = "get_tree_view")]
tree_view(&self) -> Option<Widget>340     fn tree_view(&self) -> Option<Widget>;
341 
342     #[doc(alias = "gtk_tree_view_column_get_visible")]
343     #[doc(alias = "get_visible")]
is_visible(&self) -> bool344     fn is_visible(&self) -> bool;
345 
346     #[doc(alias = "gtk_tree_view_column_get_widget")]
347     #[doc(alias = "get_widget")]
widget(&self) -> Option<Widget>348     fn widget(&self) -> Option<Widget>;
349 
350     #[doc(alias = "gtk_tree_view_column_get_width")]
351     #[doc(alias = "get_width")]
width(&self) -> i32352     fn width(&self) -> i32;
353 
354     #[doc(alias = "gtk_tree_view_column_get_x_offset")]
355     #[doc(alias = "get_x_offset")]
x_offset(&self) -> i32356     fn x_offset(&self) -> i32;
357 
358     #[doc(alias = "gtk_tree_view_column_queue_resize")]
queue_resize(&self)359     fn queue_resize(&self);
360 
361     #[doc(alias = "gtk_tree_view_column_set_alignment")]
set_alignment(&self, xalign: f32)362     fn set_alignment(&self, xalign: f32);
363 
364     #[doc(alias = "gtk_tree_view_column_set_cell_data_func")]
set_cell_data_func<P: IsA<CellRenderer>>( &self, cell_renderer: &P, func: Option<Box_<dyn Fn(&TreeViewColumn, &CellRenderer, &TreeModel, &TreeIter) + 'static>>, )365     fn set_cell_data_func<P: IsA<CellRenderer>>(
366         &self,
367         cell_renderer: &P,
368         func: Option<Box_<dyn Fn(&TreeViewColumn, &CellRenderer, &TreeModel, &TreeIter) + 'static>>,
369     );
370 
371     #[doc(alias = "gtk_tree_view_column_set_clickable")]
set_clickable(&self, clickable: bool)372     fn set_clickable(&self, clickable: bool);
373 
374     #[doc(alias = "gtk_tree_view_column_set_expand")]
set_expand(&self, expand: bool)375     fn set_expand(&self, expand: bool);
376 
377     #[doc(alias = "gtk_tree_view_column_set_fixed_width")]
set_fixed_width(&self, fixed_width: i32)378     fn set_fixed_width(&self, fixed_width: i32);
379 
380     #[doc(alias = "gtk_tree_view_column_set_max_width")]
set_max_width(&self, max_width: i32)381     fn set_max_width(&self, max_width: i32);
382 
383     #[doc(alias = "gtk_tree_view_column_set_min_width")]
set_min_width(&self, min_width: i32)384     fn set_min_width(&self, min_width: i32);
385 
386     #[doc(alias = "gtk_tree_view_column_set_reorderable")]
set_reorderable(&self, reorderable: bool)387     fn set_reorderable(&self, reorderable: bool);
388 
389     #[doc(alias = "gtk_tree_view_column_set_resizable")]
set_resizable(&self, resizable: bool)390     fn set_resizable(&self, resizable: bool);
391 
392     #[doc(alias = "gtk_tree_view_column_set_sizing")]
set_sizing(&self, type_: TreeViewColumnSizing)393     fn set_sizing(&self, type_: TreeViewColumnSizing);
394 
395     #[doc(alias = "gtk_tree_view_column_set_sort_column_id")]
set_sort_column_id(&self, sort_column_id: i32)396     fn set_sort_column_id(&self, sort_column_id: i32);
397 
398     #[doc(alias = "gtk_tree_view_column_set_sort_indicator")]
set_sort_indicator(&self, setting: bool)399     fn set_sort_indicator(&self, setting: bool);
400 
401     #[doc(alias = "gtk_tree_view_column_set_sort_order")]
set_sort_order(&self, order: SortType)402     fn set_sort_order(&self, order: SortType);
403 
404     #[doc(alias = "gtk_tree_view_column_set_spacing")]
set_spacing(&self, spacing: i32)405     fn set_spacing(&self, spacing: i32);
406 
407     #[doc(alias = "gtk_tree_view_column_set_title")]
set_title(&self, title: &str)408     fn set_title(&self, title: &str);
409 
410     #[doc(alias = "gtk_tree_view_column_set_visible")]
set_visible(&self, visible: bool)411     fn set_visible(&self, visible: bool);
412 
413     #[doc(alias = "gtk_tree_view_column_set_widget")]
set_widget<P: IsA<Widget>>(&self, widget: Option<&P>)414     fn set_widget<P: IsA<Widget>>(&self, widget: Option<&P>);
415 
416     #[doc(alias = "cell-area")]
cell_area(&self) -> Option<CellArea>417     fn cell_area(&self) -> Option<CellArea>;
418 
419     #[doc(alias = "clicked")]
connect_clicked<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId420     fn connect_clicked<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
421 
422     #[doc(alias = "alignment")]
connect_alignment_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId423     fn connect_alignment_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
424 
425     #[doc(alias = "clickable")]
connect_clickable_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId426     fn connect_clickable_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
427 
428     #[doc(alias = "expand")]
connect_expand_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId429     fn connect_expand_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
430 
431     #[doc(alias = "fixed-width")]
connect_fixed_width_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId432     fn connect_fixed_width_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
433 
434     #[doc(alias = "max-width")]
connect_max_width_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId435     fn connect_max_width_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
436 
437     #[doc(alias = "min-width")]
connect_min_width_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId438     fn connect_min_width_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
439 
440     #[doc(alias = "reorderable")]
connect_reorderable_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId441     fn connect_reorderable_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
442 
443     #[doc(alias = "resizable")]
connect_resizable_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId444     fn connect_resizable_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
445 
446     #[doc(alias = "sizing")]
connect_sizing_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId447     fn connect_sizing_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
448 
449     #[doc(alias = "sort-column-id")]
connect_sort_column_id_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId450     fn connect_sort_column_id_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
451 
452     #[doc(alias = "sort-indicator")]
connect_sort_indicator_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId453     fn connect_sort_indicator_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
454 
455     #[doc(alias = "sort-order")]
connect_sort_order_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId456     fn connect_sort_order_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
457 
458     #[doc(alias = "spacing")]
connect_spacing_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId459     fn connect_spacing_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
460 
461     #[doc(alias = "title")]
connect_title_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId462     fn connect_title_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
463 
464     #[doc(alias = "visible")]
connect_visible_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId465     fn connect_visible_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
466 
467     #[doc(alias = "widget")]
connect_widget_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId468     fn connect_widget_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
469 
470     #[doc(alias = "width")]
connect_width_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId471     fn connect_width_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
472 
473     #[doc(alias = "x-offset")]
connect_x_offset_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId474     fn connect_x_offset_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
475 }
476 
477 impl<O: IsA<TreeViewColumn>> TreeViewColumnExt for O {
cell_get_position<P: IsA<CellRenderer>>(&self, cell_renderer: &P) -> Option<(i32, i32)>478     fn cell_get_position<P: IsA<CellRenderer>>(&self, cell_renderer: &P) -> Option<(i32, i32)> {
479         unsafe {
480             let mut x_offset = mem::MaybeUninit::uninit();
481             let mut width = mem::MaybeUninit::uninit();
482             let ret = from_glib(ffi::gtk_tree_view_column_cell_get_position(
483                 self.as_ref().to_glib_none().0,
484                 cell_renderer.as_ref().to_glib_none().0,
485                 x_offset.as_mut_ptr(),
486                 width.as_mut_ptr(),
487             ));
488             let x_offset = x_offset.assume_init();
489             let width = width.assume_init();
490             if ret {
491                 Some((x_offset, width))
492             } else {
493                 None
494             }
495         }
496     }
497 
cell_get_size(&self, cell_area: Option<&gdk::Rectangle>) -> (i32, i32, i32, i32)498     fn cell_get_size(&self, cell_area: Option<&gdk::Rectangle>) -> (i32, i32, i32, i32) {
499         unsafe {
500             let mut x_offset = mem::MaybeUninit::uninit();
501             let mut y_offset = mem::MaybeUninit::uninit();
502             let mut width = mem::MaybeUninit::uninit();
503             let mut height = mem::MaybeUninit::uninit();
504             ffi::gtk_tree_view_column_cell_get_size(
505                 self.as_ref().to_glib_none().0,
506                 cell_area.to_glib_none().0,
507                 x_offset.as_mut_ptr(),
508                 y_offset.as_mut_ptr(),
509                 width.as_mut_ptr(),
510                 height.as_mut_ptr(),
511             );
512             let x_offset = x_offset.assume_init();
513             let y_offset = y_offset.assume_init();
514             let width = width.assume_init();
515             let height = height.assume_init();
516             (x_offset, y_offset, width, height)
517         }
518     }
519 
cell_is_visible(&self) -> bool520     fn cell_is_visible(&self) -> bool {
521         unsafe {
522             from_glib(ffi::gtk_tree_view_column_cell_is_visible(
523                 self.as_ref().to_glib_none().0,
524             ))
525         }
526     }
527 
cell_set_cell_data<P: IsA<TreeModel>>( &self, tree_model: &P, iter: &TreeIter, is_expander: bool, is_expanded: bool, )528     fn cell_set_cell_data<P: IsA<TreeModel>>(
529         &self,
530         tree_model: &P,
531         iter: &TreeIter,
532         is_expander: bool,
533         is_expanded: bool,
534     ) {
535         unsafe {
536             ffi::gtk_tree_view_column_cell_set_cell_data(
537                 self.as_ref().to_glib_none().0,
538                 tree_model.as_ref().to_glib_none().0,
539                 mut_override(iter.to_glib_none().0),
540                 is_expander.into_glib(),
541                 is_expanded.into_glib(),
542             );
543         }
544     }
545 
clicked(&self)546     fn clicked(&self) {
547         unsafe {
548             ffi::gtk_tree_view_column_clicked(self.as_ref().to_glib_none().0);
549         }
550     }
551 
focus_cell<P: IsA<CellRenderer>>(&self, cell: &P)552     fn focus_cell<P: IsA<CellRenderer>>(&self, cell: &P) {
553         unsafe {
554             ffi::gtk_tree_view_column_focus_cell(
555                 self.as_ref().to_glib_none().0,
556                 cell.as_ref().to_glib_none().0,
557             );
558         }
559     }
560 
alignment(&self) -> f32561     fn alignment(&self) -> f32 {
562         unsafe { ffi::gtk_tree_view_column_get_alignment(self.as_ref().to_glib_none().0) }
563     }
564 
button(&self) -> Option<Widget>565     fn button(&self) -> Option<Widget> {
566         unsafe {
567             from_glib_none(ffi::gtk_tree_view_column_get_button(
568                 self.as_ref().to_glib_none().0,
569             ))
570         }
571     }
572 
is_clickable(&self) -> bool573     fn is_clickable(&self) -> bool {
574         unsafe {
575             from_glib(ffi::gtk_tree_view_column_get_clickable(
576                 self.as_ref().to_glib_none().0,
577             ))
578         }
579     }
580 
expands(&self) -> bool581     fn expands(&self) -> bool {
582         unsafe {
583             from_glib(ffi::gtk_tree_view_column_get_expand(
584                 self.as_ref().to_glib_none().0,
585             ))
586         }
587     }
588 
fixed_width(&self) -> i32589     fn fixed_width(&self) -> i32 {
590         unsafe { ffi::gtk_tree_view_column_get_fixed_width(self.as_ref().to_glib_none().0) }
591     }
592 
max_width(&self) -> i32593     fn max_width(&self) -> i32 {
594         unsafe { ffi::gtk_tree_view_column_get_max_width(self.as_ref().to_glib_none().0) }
595     }
596 
min_width(&self) -> i32597     fn min_width(&self) -> i32 {
598         unsafe { ffi::gtk_tree_view_column_get_min_width(self.as_ref().to_glib_none().0) }
599     }
600 
is_reorderable(&self) -> bool601     fn is_reorderable(&self) -> bool {
602         unsafe {
603             from_glib(ffi::gtk_tree_view_column_get_reorderable(
604                 self.as_ref().to_glib_none().0,
605             ))
606         }
607     }
608 
is_resizable(&self) -> bool609     fn is_resizable(&self) -> bool {
610         unsafe {
611             from_glib(ffi::gtk_tree_view_column_get_resizable(
612                 self.as_ref().to_glib_none().0,
613             ))
614         }
615     }
616 
sizing(&self) -> TreeViewColumnSizing617     fn sizing(&self) -> TreeViewColumnSizing {
618         unsafe {
619             from_glib(ffi::gtk_tree_view_column_get_sizing(
620                 self.as_ref().to_glib_none().0,
621             ))
622         }
623     }
624 
sort_column_id(&self) -> i32625     fn sort_column_id(&self) -> i32 {
626         unsafe { ffi::gtk_tree_view_column_get_sort_column_id(self.as_ref().to_glib_none().0) }
627     }
628 
is_sort_indicator(&self) -> bool629     fn is_sort_indicator(&self) -> bool {
630         unsafe {
631             from_glib(ffi::gtk_tree_view_column_get_sort_indicator(
632                 self.as_ref().to_glib_none().0,
633             ))
634         }
635     }
636 
sort_order(&self) -> SortType637     fn sort_order(&self) -> SortType {
638         unsafe {
639             from_glib(ffi::gtk_tree_view_column_get_sort_order(
640                 self.as_ref().to_glib_none().0,
641             ))
642         }
643     }
644 
spacing(&self) -> i32645     fn spacing(&self) -> i32 {
646         unsafe { ffi::gtk_tree_view_column_get_spacing(self.as_ref().to_glib_none().0) }
647     }
648 
title(&self) -> Option<glib::GString>649     fn title(&self) -> Option<glib::GString> {
650         unsafe {
651             from_glib_none(ffi::gtk_tree_view_column_get_title(
652                 self.as_ref().to_glib_none().0,
653             ))
654         }
655     }
656 
tree_view(&self) -> Option<Widget>657     fn tree_view(&self) -> Option<Widget> {
658         unsafe {
659             from_glib_none(ffi::gtk_tree_view_column_get_tree_view(
660                 self.as_ref().to_glib_none().0,
661             ))
662         }
663     }
664 
is_visible(&self) -> bool665     fn is_visible(&self) -> bool {
666         unsafe {
667             from_glib(ffi::gtk_tree_view_column_get_visible(
668                 self.as_ref().to_glib_none().0,
669             ))
670         }
671     }
672 
widget(&self) -> Option<Widget>673     fn widget(&self) -> Option<Widget> {
674         unsafe {
675             from_glib_none(ffi::gtk_tree_view_column_get_widget(
676                 self.as_ref().to_glib_none().0,
677             ))
678         }
679     }
680 
width(&self) -> i32681     fn width(&self) -> i32 {
682         unsafe { ffi::gtk_tree_view_column_get_width(self.as_ref().to_glib_none().0) }
683     }
684 
x_offset(&self) -> i32685     fn x_offset(&self) -> i32 {
686         unsafe { ffi::gtk_tree_view_column_get_x_offset(self.as_ref().to_glib_none().0) }
687     }
688 
queue_resize(&self)689     fn queue_resize(&self) {
690         unsafe {
691             ffi::gtk_tree_view_column_queue_resize(self.as_ref().to_glib_none().0);
692         }
693     }
694 
set_alignment(&self, xalign: f32)695     fn set_alignment(&self, xalign: f32) {
696         unsafe {
697             ffi::gtk_tree_view_column_set_alignment(self.as_ref().to_glib_none().0, xalign);
698         }
699     }
700 
set_cell_data_func<P: IsA<CellRenderer>>( &self, cell_renderer: &P, func: Option<Box_<dyn Fn(&TreeViewColumn, &CellRenderer, &TreeModel, &TreeIter) + 'static>>, )701     fn set_cell_data_func<P: IsA<CellRenderer>>(
702         &self,
703         cell_renderer: &P,
704         func: Option<Box_<dyn Fn(&TreeViewColumn, &CellRenderer, &TreeModel, &TreeIter) + 'static>>,
705     ) {
706         let func_data: Box_<
707             Option<Box_<dyn Fn(&TreeViewColumn, &CellRenderer, &TreeModel, &TreeIter) + 'static>>,
708         > = Box_::new(func);
709         unsafe extern "C" fn func_func<P: IsA<CellRenderer>>(
710             tree_column: *mut ffi::GtkTreeViewColumn,
711             cell: *mut ffi::GtkCellRenderer,
712             tree_model: *mut ffi::GtkTreeModel,
713             iter: *mut ffi::GtkTreeIter,
714             data: glib::ffi::gpointer,
715         ) {
716             let tree_column = from_glib_borrow(tree_column);
717             let cell = from_glib_borrow(cell);
718             let tree_model = from_glib_borrow(tree_model);
719             let iter = from_glib_borrow(iter);
720             let callback: &Option<
721                 Box_<dyn Fn(&TreeViewColumn, &CellRenderer, &TreeModel, &TreeIter) + 'static>,
722             > = &*(data as *mut _);
723             if let Some(ref callback) = *callback {
724                 callback(&tree_column, &cell, &tree_model, &iter)
725             } else {
726                 panic!("cannot get closure...")
727             };
728         }
729         let func = if func_data.is_some() {
730             Some(func_func::<P> as _)
731         } else {
732             None
733         };
734         unsafe extern "C" fn destroy_func<P: IsA<CellRenderer>>(data: glib::ffi::gpointer) {
735             let _callback: Box_<
736                 Option<
737                     Box_<dyn Fn(&TreeViewColumn, &CellRenderer, &TreeModel, &TreeIter) + 'static>,
738                 >,
739             > = Box_::from_raw(data as *mut _);
740         }
741         let destroy_call4 = Some(destroy_func::<P> as _);
742         let super_callback0: Box_<
743             Option<Box_<dyn Fn(&TreeViewColumn, &CellRenderer, &TreeModel, &TreeIter) + 'static>>,
744         > = func_data;
745         unsafe {
746             ffi::gtk_tree_view_column_set_cell_data_func(
747                 self.as_ref().to_glib_none().0,
748                 cell_renderer.as_ref().to_glib_none().0,
749                 func,
750                 Box_::into_raw(super_callback0) as *mut _,
751                 destroy_call4,
752             );
753         }
754     }
755 
set_clickable(&self, clickable: bool)756     fn set_clickable(&self, clickable: bool) {
757         unsafe {
758             ffi::gtk_tree_view_column_set_clickable(
759                 self.as_ref().to_glib_none().0,
760                 clickable.into_glib(),
761             );
762         }
763     }
764 
set_expand(&self, expand: bool)765     fn set_expand(&self, expand: bool) {
766         unsafe {
767             ffi::gtk_tree_view_column_set_expand(
768                 self.as_ref().to_glib_none().0,
769                 expand.into_glib(),
770             );
771         }
772     }
773 
set_fixed_width(&self, fixed_width: i32)774     fn set_fixed_width(&self, fixed_width: i32) {
775         unsafe {
776             ffi::gtk_tree_view_column_set_fixed_width(self.as_ref().to_glib_none().0, fixed_width);
777         }
778     }
779 
set_max_width(&self, max_width: i32)780     fn set_max_width(&self, max_width: i32) {
781         unsafe {
782             ffi::gtk_tree_view_column_set_max_width(self.as_ref().to_glib_none().0, max_width);
783         }
784     }
785 
set_min_width(&self, min_width: i32)786     fn set_min_width(&self, min_width: i32) {
787         unsafe {
788             ffi::gtk_tree_view_column_set_min_width(self.as_ref().to_glib_none().0, min_width);
789         }
790     }
791 
set_reorderable(&self, reorderable: bool)792     fn set_reorderable(&self, reorderable: bool) {
793         unsafe {
794             ffi::gtk_tree_view_column_set_reorderable(
795                 self.as_ref().to_glib_none().0,
796                 reorderable.into_glib(),
797             );
798         }
799     }
800 
set_resizable(&self, resizable: bool)801     fn set_resizable(&self, resizable: bool) {
802         unsafe {
803             ffi::gtk_tree_view_column_set_resizable(
804                 self.as_ref().to_glib_none().0,
805                 resizable.into_glib(),
806             );
807         }
808     }
809 
set_sizing(&self, type_: TreeViewColumnSizing)810     fn set_sizing(&self, type_: TreeViewColumnSizing) {
811         unsafe {
812             ffi::gtk_tree_view_column_set_sizing(self.as_ref().to_glib_none().0, type_.into_glib());
813         }
814     }
815 
set_sort_column_id(&self, sort_column_id: i32)816     fn set_sort_column_id(&self, sort_column_id: i32) {
817         unsafe {
818             ffi::gtk_tree_view_column_set_sort_column_id(
819                 self.as_ref().to_glib_none().0,
820                 sort_column_id,
821             );
822         }
823     }
824 
set_sort_indicator(&self, setting: bool)825     fn set_sort_indicator(&self, setting: bool) {
826         unsafe {
827             ffi::gtk_tree_view_column_set_sort_indicator(
828                 self.as_ref().to_glib_none().0,
829                 setting.into_glib(),
830             );
831         }
832     }
833 
set_sort_order(&self, order: SortType)834     fn set_sort_order(&self, order: SortType) {
835         unsafe {
836             ffi::gtk_tree_view_column_set_sort_order(
837                 self.as_ref().to_glib_none().0,
838                 order.into_glib(),
839             );
840         }
841     }
842 
set_spacing(&self, spacing: i32)843     fn set_spacing(&self, spacing: i32) {
844         unsafe {
845             ffi::gtk_tree_view_column_set_spacing(self.as_ref().to_glib_none().0, spacing);
846         }
847     }
848 
set_title(&self, title: &str)849     fn set_title(&self, title: &str) {
850         unsafe {
851             ffi::gtk_tree_view_column_set_title(
852                 self.as_ref().to_glib_none().0,
853                 title.to_glib_none().0,
854             );
855         }
856     }
857 
set_visible(&self, visible: bool)858     fn set_visible(&self, visible: bool) {
859         unsafe {
860             ffi::gtk_tree_view_column_set_visible(
861                 self.as_ref().to_glib_none().0,
862                 visible.into_glib(),
863             );
864         }
865     }
866 
set_widget<P: IsA<Widget>>(&self, widget: Option<&P>)867     fn set_widget<P: IsA<Widget>>(&self, widget: Option<&P>) {
868         unsafe {
869             ffi::gtk_tree_view_column_set_widget(
870                 self.as_ref().to_glib_none().0,
871                 widget.map(|p| p.as_ref()).to_glib_none().0,
872             );
873         }
874     }
875 
cell_area(&self) -> Option<CellArea>876     fn cell_area(&self) -> Option<CellArea> {
877         unsafe {
878             let mut value = glib::Value::from_type(<CellArea as StaticType>::static_type());
879             glib::gobject_ffi::g_object_get_property(
880                 self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
881                 b"cell-area\0".as_ptr() as *const _,
882                 value.to_glib_none_mut().0,
883             );
884             value
885                 .get()
886                 .expect("Return Value for property `cell-area` getter")
887         }
888     }
889 
connect_clicked<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId890     fn connect_clicked<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
891         unsafe extern "C" fn clicked_trampoline<P: IsA<TreeViewColumn>, F: Fn(&P) + 'static>(
892             this: *mut ffi::GtkTreeViewColumn,
893             f: glib::ffi::gpointer,
894         ) {
895             let f: &F = &*(f as *const F);
896             f(TreeViewColumn::from_glib_borrow(this).unsafe_cast_ref())
897         }
898         unsafe {
899             let f: Box_<F> = Box_::new(f);
900             connect_raw(
901                 self.as_ptr() as *mut _,
902                 b"clicked\0".as_ptr() as *const _,
903                 Some(transmute::<_, unsafe extern "C" fn()>(
904                     clicked_trampoline::<Self, F> as *const (),
905                 )),
906                 Box_::into_raw(f),
907             )
908         }
909     }
910 
connect_alignment_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId911     fn connect_alignment_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
912         unsafe extern "C" fn notify_alignment_trampoline<
913             P: IsA<TreeViewColumn>,
914             F: Fn(&P) + 'static,
915         >(
916             this: *mut ffi::GtkTreeViewColumn,
917             _param_spec: glib::ffi::gpointer,
918             f: glib::ffi::gpointer,
919         ) {
920             let f: &F = &*(f as *const F);
921             f(TreeViewColumn::from_glib_borrow(this).unsafe_cast_ref())
922         }
923         unsafe {
924             let f: Box_<F> = Box_::new(f);
925             connect_raw(
926                 self.as_ptr() as *mut _,
927                 b"notify::alignment\0".as_ptr() as *const _,
928                 Some(transmute::<_, unsafe extern "C" fn()>(
929                     notify_alignment_trampoline::<Self, F> as *const (),
930                 )),
931                 Box_::into_raw(f),
932             )
933         }
934     }
935 
connect_clickable_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId936     fn connect_clickable_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
937         unsafe extern "C" fn notify_clickable_trampoline<
938             P: IsA<TreeViewColumn>,
939             F: Fn(&P) + 'static,
940         >(
941             this: *mut ffi::GtkTreeViewColumn,
942             _param_spec: glib::ffi::gpointer,
943             f: glib::ffi::gpointer,
944         ) {
945             let f: &F = &*(f as *const F);
946             f(TreeViewColumn::from_glib_borrow(this).unsafe_cast_ref())
947         }
948         unsafe {
949             let f: Box_<F> = Box_::new(f);
950             connect_raw(
951                 self.as_ptr() as *mut _,
952                 b"notify::clickable\0".as_ptr() as *const _,
953                 Some(transmute::<_, unsafe extern "C" fn()>(
954                     notify_clickable_trampoline::<Self, F> as *const (),
955                 )),
956                 Box_::into_raw(f),
957             )
958         }
959     }
960 
connect_expand_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId961     fn connect_expand_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
962         unsafe extern "C" fn notify_expand_trampoline<
963             P: IsA<TreeViewColumn>,
964             F: Fn(&P) + 'static,
965         >(
966             this: *mut ffi::GtkTreeViewColumn,
967             _param_spec: glib::ffi::gpointer,
968             f: glib::ffi::gpointer,
969         ) {
970             let f: &F = &*(f as *const F);
971             f(TreeViewColumn::from_glib_borrow(this).unsafe_cast_ref())
972         }
973         unsafe {
974             let f: Box_<F> = Box_::new(f);
975             connect_raw(
976                 self.as_ptr() as *mut _,
977                 b"notify::expand\0".as_ptr() as *const _,
978                 Some(transmute::<_, unsafe extern "C" fn()>(
979                     notify_expand_trampoline::<Self, F> as *const (),
980                 )),
981                 Box_::into_raw(f),
982             )
983         }
984     }
985 
connect_fixed_width_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId986     fn connect_fixed_width_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
987         unsafe extern "C" fn notify_fixed_width_trampoline<
988             P: IsA<TreeViewColumn>,
989             F: Fn(&P) + 'static,
990         >(
991             this: *mut ffi::GtkTreeViewColumn,
992             _param_spec: glib::ffi::gpointer,
993             f: glib::ffi::gpointer,
994         ) {
995             let f: &F = &*(f as *const F);
996             f(TreeViewColumn::from_glib_borrow(this).unsafe_cast_ref())
997         }
998         unsafe {
999             let f: Box_<F> = Box_::new(f);
1000             connect_raw(
1001                 self.as_ptr() as *mut _,
1002                 b"notify::fixed-width\0".as_ptr() as *const _,
1003                 Some(transmute::<_, unsafe extern "C" fn()>(
1004                     notify_fixed_width_trampoline::<Self, F> as *const (),
1005                 )),
1006                 Box_::into_raw(f),
1007             )
1008         }
1009     }
1010 
connect_max_width_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId1011     fn connect_max_width_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1012         unsafe extern "C" fn notify_max_width_trampoline<
1013             P: IsA<TreeViewColumn>,
1014             F: Fn(&P) + 'static,
1015         >(
1016             this: *mut ffi::GtkTreeViewColumn,
1017             _param_spec: glib::ffi::gpointer,
1018             f: glib::ffi::gpointer,
1019         ) {
1020             let f: &F = &*(f as *const F);
1021             f(TreeViewColumn::from_glib_borrow(this).unsafe_cast_ref())
1022         }
1023         unsafe {
1024             let f: Box_<F> = Box_::new(f);
1025             connect_raw(
1026                 self.as_ptr() as *mut _,
1027                 b"notify::max-width\0".as_ptr() as *const _,
1028                 Some(transmute::<_, unsafe extern "C" fn()>(
1029                     notify_max_width_trampoline::<Self, F> as *const (),
1030                 )),
1031                 Box_::into_raw(f),
1032             )
1033         }
1034     }
1035 
connect_min_width_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId1036     fn connect_min_width_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1037         unsafe extern "C" fn notify_min_width_trampoline<
1038             P: IsA<TreeViewColumn>,
1039             F: Fn(&P) + 'static,
1040         >(
1041             this: *mut ffi::GtkTreeViewColumn,
1042             _param_spec: glib::ffi::gpointer,
1043             f: glib::ffi::gpointer,
1044         ) {
1045             let f: &F = &*(f as *const F);
1046             f(TreeViewColumn::from_glib_borrow(this).unsafe_cast_ref())
1047         }
1048         unsafe {
1049             let f: Box_<F> = Box_::new(f);
1050             connect_raw(
1051                 self.as_ptr() as *mut _,
1052                 b"notify::min-width\0".as_ptr() as *const _,
1053                 Some(transmute::<_, unsafe extern "C" fn()>(
1054                     notify_min_width_trampoline::<Self, F> as *const (),
1055                 )),
1056                 Box_::into_raw(f),
1057             )
1058         }
1059     }
1060 
connect_reorderable_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId1061     fn connect_reorderable_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1062         unsafe extern "C" fn notify_reorderable_trampoline<
1063             P: IsA<TreeViewColumn>,
1064             F: Fn(&P) + 'static,
1065         >(
1066             this: *mut ffi::GtkTreeViewColumn,
1067             _param_spec: glib::ffi::gpointer,
1068             f: glib::ffi::gpointer,
1069         ) {
1070             let f: &F = &*(f as *const F);
1071             f(TreeViewColumn::from_glib_borrow(this).unsafe_cast_ref())
1072         }
1073         unsafe {
1074             let f: Box_<F> = Box_::new(f);
1075             connect_raw(
1076                 self.as_ptr() as *mut _,
1077                 b"notify::reorderable\0".as_ptr() as *const _,
1078                 Some(transmute::<_, unsafe extern "C" fn()>(
1079                     notify_reorderable_trampoline::<Self, F> as *const (),
1080                 )),
1081                 Box_::into_raw(f),
1082             )
1083         }
1084     }
1085 
connect_resizable_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId1086     fn connect_resizable_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1087         unsafe extern "C" fn notify_resizable_trampoline<
1088             P: IsA<TreeViewColumn>,
1089             F: Fn(&P) + 'static,
1090         >(
1091             this: *mut ffi::GtkTreeViewColumn,
1092             _param_spec: glib::ffi::gpointer,
1093             f: glib::ffi::gpointer,
1094         ) {
1095             let f: &F = &*(f as *const F);
1096             f(TreeViewColumn::from_glib_borrow(this).unsafe_cast_ref())
1097         }
1098         unsafe {
1099             let f: Box_<F> = Box_::new(f);
1100             connect_raw(
1101                 self.as_ptr() as *mut _,
1102                 b"notify::resizable\0".as_ptr() as *const _,
1103                 Some(transmute::<_, unsafe extern "C" fn()>(
1104                     notify_resizable_trampoline::<Self, F> as *const (),
1105                 )),
1106                 Box_::into_raw(f),
1107             )
1108         }
1109     }
1110 
connect_sizing_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId1111     fn connect_sizing_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1112         unsafe extern "C" fn notify_sizing_trampoline<
1113             P: IsA<TreeViewColumn>,
1114             F: Fn(&P) + 'static,
1115         >(
1116             this: *mut ffi::GtkTreeViewColumn,
1117             _param_spec: glib::ffi::gpointer,
1118             f: glib::ffi::gpointer,
1119         ) {
1120             let f: &F = &*(f as *const F);
1121             f(TreeViewColumn::from_glib_borrow(this).unsafe_cast_ref())
1122         }
1123         unsafe {
1124             let f: Box_<F> = Box_::new(f);
1125             connect_raw(
1126                 self.as_ptr() as *mut _,
1127                 b"notify::sizing\0".as_ptr() as *const _,
1128                 Some(transmute::<_, unsafe extern "C" fn()>(
1129                     notify_sizing_trampoline::<Self, F> as *const (),
1130                 )),
1131                 Box_::into_raw(f),
1132             )
1133         }
1134     }
1135 
connect_sort_column_id_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId1136     fn connect_sort_column_id_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1137         unsafe extern "C" fn notify_sort_column_id_trampoline<
1138             P: IsA<TreeViewColumn>,
1139             F: Fn(&P) + 'static,
1140         >(
1141             this: *mut ffi::GtkTreeViewColumn,
1142             _param_spec: glib::ffi::gpointer,
1143             f: glib::ffi::gpointer,
1144         ) {
1145             let f: &F = &*(f as *const F);
1146             f(TreeViewColumn::from_glib_borrow(this).unsafe_cast_ref())
1147         }
1148         unsafe {
1149             let f: Box_<F> = Box_::new(f);
1150             connect_raw(
1151                 self.as_ptr() as *mut _,
1152                 b"notify::sort-column-id\0".as_ptr() as *const _,
1153                 Some(transmute::<_, unsafe extern "C" fn()>(
1154                     notify_sort_column_id_trampoline::<Self, F> as *const (),
1155                 )),
1156                 Box_::into_raw(f),
1157             )
1158         }
1159     }
1160 
connect_sort_indicator_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId1161     fn connect_sort_indicator_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1162         unsafe extern "C" fn notify_sort_indicator_trampoline<
1163             P: IsA<TreeViewColumn>,
1164             F: Fn(&P) + 'static,
1165         >(
1166             this: *mut ffi::GtkTreeViewColumn,
1167             _param_spec: glib::ffi::gpointer,
1168             f: glib::ffi::gpointer,
1169         ) {
1170             let f: &F = &*(f as *const F);
1171             f(TreeViewColumn::from_glib_borrow(this).unsafe_cast_ref())
1172         }
1173         unsafe {
1174             let f: Box_<F> = Box_::new(f);
1175             connect_raw(
1176                 self.as_ptr() as *mut _,
1177                 b"notify::sort-indicator\0".as_ptr() as *const _,
1178                 Some(transmute::<_, unsafe extern "C" fn()>(
1179                     notify_sort_indicator_trampoline::<Self, F> as *const (),
1180                 )),
1181                 Box_::into_raw(f),
1182             )
1183         }
1184     }
1185 
connect_sort_order_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId1186     fn connect_sort_order_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1187         unsafe extern "C" fn notify_sort_order_trampoline<
1188             P: IsA<TreeViewColumn>,
1189             F: Fn(&P) + 'static,
1190         >(
1191             this: *mut ffi::GtkTreeViewColumn,
1192             _param_spec: glib::ffi::gpointer,
1193             f: glib::ffi::gpointer,
1194         ) {
1195             let f: &F = &*(f as *const F);
1196             f(TreeViewColumn::from_glib_borrow(this).unsafe_cast_ref())
1197         }
1198         unsafe {
1199             let f: Box_<F> = Box_::new(f);
1200             connect_raw(
1201                 self.as_ptr() as *mut _,
1202                 b"notify::sort-order\0".as_ptr() as *const _,
1203                 Some(transmute::<_, unsafe extern "C" fn()>(
1204                     notify_sort_order_trampoline::<Self, F> as *const (),
1205                 )),
1206                 Box_::into_raw(f),
1207             )
1208         }
1209     }
1210 
connect_spacing_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId1211     fn connect_spacing_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1212         unsafe extern "C" fn notify_spacing_trampoline<
1213             P: IsA<TreeViewColumn>,
1214             F: Fn(&P) + 'static,
1215         >(
1216             this: *mut ffi::GtkTreeViewColumn,
1217             _param_spec: glib::ffi::gpointer,
1218             f: glib::ffi::gpointer,
1219         ) {
1220             let f: &F = &*(f as *const F);
1221             f(TreeViewColumn::from_glib_borrow(this).unsafe_cast_ref())
1222         }
1223         unsafe {
1224             let f: Box_<F> = Box_::new(f);
1225             connect_raw(
1226                 self.as_ptr() as *mut _,
1227                 b"notify::spacing\0".as_ptr() as *const _,
1228                 Some(transmute::<_, unsafe extern "C" fn()>(
1229                     notify_spacing_trampoline::<Self, F> as *const (),
1230                 )),
1231                 Box_::into_raw(f),
1232             )
1233         }
1234     }
1235 
connect_title_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId1236     fn connect_title_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1237         unsafe extern "C" fn notify_title_trampoline<
1238             P: IsA<TreeViewColumn>,
1239             F: Fn(&P) + 'static,
1240         >(
1241             this: *mut ffi::GtkTreeViewColumn,
1242             _param_spec: glib::ffi::gpointer,
1243             f: glib::ffi::gpointer,
1244         ) {
1245             let f: &F = &*(f as *const F);
1246             f(TreeViewColumn::from_glib_borrow(this).unsafe_cast_ref())
1247         }
1248         unsafe {
1249             let f: Box_<F> = Box_::new(f);
1250             connect_raw(
1251                 self.as_ptr() as *mut _,
1252                 b"notify::title\0".as_ptr() as *const _,
1253                 Some(transmute::<_, unsafe extern "C" fn()>(
1254                     notify_title_trampoline::<Self, F> as *const (),
1255                 )),
1256                 Box_::into_raw(f),
1257             )
1258         }
1259     }
1260 
connect_visible_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId1261     fn connect_visible_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1262         unsafe extern "C" fn notify_visible_trampoline<
1263             P: IsA<TreeViewColumn>,
1264             F: Fn(&P) + 'static,
1265         >(
1266             this: *mut ffi::GtkTreeViewColumn,
1267             _param_spec: glib::ffi::gpointer,
1268             f: glib::ffi::gpointer,
1269         ) {
1270             let f: &F = &*(f as *const F);
1271             f(TreeViewColumn::from_glib_borrow(this).unsafe_cast_ref())
1272         }
1273         unsafe {
1274             let f: Box_<F> = Box_::new(f);
1275             connect_raw(
1276                 self.as_ptr() as *mut _,
1277                 b"notify::visible\0".as_ptr() as *const _,
1278                 Some(transmute::<_, unsafe extern "C" fn()>(
1279                     notify_visible_trampoline::<Self, F> as *const (),
1280                 )),
1281                 Box_::into_raw(f),
1282             )
1283         }
1284     }
1285 
connect_widget_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId1286     fn connect_widget_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1287         unsafe extern "C" fn notify_widget_trampoline<
1288             P: IsA<TreeViewColumn>,
1289             F: Fn(&P) + 'static,
1290         >(
1291             this: *mut ffi::GtkTreeViewColumn,
1292             _param_spec: glib::ffi::gpointer,
1293             f: glib::ffi::gpointer,
1294         ) {
1295             let f: &F = &*(f as *const F);
1296             f(TreeViewColumn::from_glib_borrow(this).unsafe_cast_ref())
1297         }
1298         unsafe {
1299             let f: Box_<F> = Box_::new(f);
1300             connect_raw(
1301                 self.as_ptr() as *mut _,
1302                 b"notify::widget\0".as_ptr() as *const _,
1303                 Some(transmute::<_, unsafe extern "C" fn()>(
1304                     notify_widget_trampoline::<Self, F> as *const (),
1305                 )),
1306                 Box_::into_raw(f),
1307             )
1308         }
1309     }
1310 
connect_width_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId1311     fn connect_width_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1312         unsafe extern "C" fn notify_width_trampoline<
1313             P: IsA<TreeViewColumn>,
1314             F: Fn(&P) + 'static,
1315         >(
1316             this: *mut ffi::GtkTreeViewColumn,
1317             _param_spec: glib::ffi::gpointer,
1318             f: glib::ffi::gpointer,
1319         ) {
1320             let f: &F = &*(f as *const F);
1321             f(TreeViewColumn::from_glib_borrow(this).unsafe_cast_ref())
1322         }
1323         unsafe {
1324             let f: Box_<F> = Box_::new(f);
1325             connect_raw(
1326                 self.as_ptr() as *mut _,
1327                 b"notify::width\0".as_ptr() as *const _,
1328                 Some(transmute::<_, unsafe extern "C" fn()>(
1329                     notify_width_trampoline::<Self, F> as *const (),
1330                 )),
1331                 Box_::into_raw(f),
1332             )
1333         }
1334     }
1335 
connect_x_offset_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId1336     fn connect_x_offset_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1337         unsafe extern "C" fn notify_x_offset_trampoline<
1338             P: IsA<TreeViewColumn>,
1339             F: Fn(&P) + 'static,
1340         >(
1341             this: *mut ffi::GtkTreeViewColumn,
1342             _param_spec: glib::ffi::gpointer,
1343             f: glib::ffi::gpointer,
1344         ) {
1345             let f: &F = &*(f as *const F);
1346             f(TreeViewColumn::from_glib_borrow(this).unsafe_cast_ref())
1347         }
1348         unsafe {
1349             let f: Box_<F> = Box_::new(f);
1350             connect_raw(
1351                 self.as_ptr() as *mut _,
1352                 b"notify::x-offset\0".as_ptr() as *const _,
1353                 Some(transmute::<_, unsafe extern "C" fn()>(
1354                     notify_x_offset_trampoline::<Self, F> as *const (),
1355                 )),
1356                 Box_::into_raw(f),
1357             )
1358         }
1359     }
1360 }
1361 
1362 impl fmt::Display for TreeViewColumn {
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result1363     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1364         f.write_str("TreeViewColumn")
1365     }
1366 }
1367