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 gdk;
6 use glib::object::Cast;
7 use glib::object::IsA;
8 use glib::signal::connect_raw;
9 use glib::signal::SignalHandlerId;
10 use glib::translate::*;
11 use glib::value::SetValueOptional;
12 use glib::StaticType;
13 use glib::ToValue;
14 use glib::Value;
15 use glib_sys;
16 use gobject_sys;
17 use gtk_sys;
18 use libc;
19 use pango;
20 use std::boxed::Box as Box_;
21 use std::fmt;
22 use std::mem::transmute;
23 use CellRenderer;
24 use CellRendererMode;
25 use CellRendererText;
26 use TreeIter;
27 use TreeModel;
28 use TreePath;
29 
30 glib_wrapper! {
31     pub struct CellRendererCombo(Object<gtk_sys::GtkCellRendererCombo, gtk_sys::GtkCellRendererComboClass, CellRendererComboClass>) @extends CellRendererText, CellRenderer;
32 
33     match fn {
34         get_type => || gtk_sys::gtk_cell_renderer_combo_get_type(),
35     }
36 }
37 
38 impl CellRendererCombo {
new() -> CellRendererCombo39     pub fn new() -> CellRendererCombo {
40         assert_initialized_main_thread!();
41         unsafe {
42             CellRenderer::from_glib_none(gtk_sys::gtk_cell_renderer_combo_new()).unsafe_cast()
43         }
44     }
45 }
46 
47 impl Default for CellRendererCombo {
default() -> Self48     fn default() -> Self {
49         Self::new()
50     }
51 }
52 
53 #[derive(Clone, Default)]
54 pub struct CellRendererComboBuilder {
55     has_entry: Option<bool>,
56     model: Option<TreeModel>,
57     text_column: Option<i32>,
58     align_set: Option<bool>,
59     alignment: Option<pango::Alignment>,
60     attributes: Option<pango::AttrList>,
61     background: Option<String>,
62     background_rgba: Option<gdk::RGBA>,
63     background_set: Option<bool>,
64     editable: Option<bool>,
65     editable_set: Option<bool>,
66     ellipsize: Option<pango::EllipsizeMode>,
67     ellipsize_set: Option<bool>,
68     family: Option<String>,
69     family_set: Option<bool>,
70     font: Option<String>,
71     font_desc: Option<pango::FontDescription>,
72     foreground: Option<String>,
73     foreground_rgba: Option<gdk::RGBA>,
74     foreground_set: Option<bool>,
75     language: Option<String>,
76     language_set: Option<bool>,
77     markup: Option<String>,
78     max_width_chars: Option<i32>,
79     placeholder_text: Option<String>,
80     rise: Option<i32>,
81     rise_set: Option<bool>,
82     scale: Option<f64>,
83     scale_set: Option<bool>,
84     single_paragraph_mode: Option<bool>,
85     size: Option<i32>,
86     size_points: Option<f64>,
87     size_set: Option<bool>,
88     stretch: Option<pango::Stretch>,
89     stretch_set: Option<bool>,
90     strikethrough: Option<bool>,
91     strikethrough_set: Option<bool>,
92     style: Option<pango::Style>,
93     style_set: Option<bool>,
94     text: Option<String>,
95     underline: Option<pango::Underline>,
96     underline_set: Option<bool>,
97     variant: Option<pango::Variant>,
98     variant_set: Option<bool>,
99     weight: Option<i32>,
100     weight_set: Option<bool>,
101     width_chars: Option<i32>,
102     wrap_mode: Option<pango::WrapMode>,
103     wrap_width: Option<i32>,
104     cell_background: Option<String>,
105     cell_background_rgba: Option<gdk::RGBA>,
106     cell_background_set: Option<bool>,
107     height: Option<i32>,
108     is_expanded: Option<bool>,
109     is_expander: Option<bool>,
110     mode: Option<CellRendererMode>,
111     sensitive: Option<bool>,
112     visible: Option<bool>,
113     width: Option<i32>,
114     xalign: Option<f32>,
115     xpad: Option<u32>,
116     yalign: Option<f32>,
117     ypad: Option<u32>,
118 }
119 
120 impl CellRendererComboBuilder {
new() -> Self121     pub fn new() -> Self {
122         Self::default()
123     }
124 
build(self) -> CellRendererCombo125     pub fn build(self) -> CellRendererCombo {
126         let mut properties: Vec<(&str, &dyn ToValue)> = vec![];
127         if let Some(ref has_entry) = self.has_entry {
128             properties.push(("has-entry", has_entry));
129         }
130         if let Some(ref model) = self.model {
131             properties.push(("model", model));
132         }
133         if let Some(ref text_column) = self.text_column {
134             properties.push(("text-column", text_column));
135         }
136         if let Some(ref align_set) = self.align_set {
137             properties.push(("align-set", align_set));
138         }
139         if let Some(ref alignment) = self.alignment {
140             properties.push(("alignment", alignment));
141         }
142         if let Some(ref attributes) = self.attributes {
143             properties.push(("attributes", attributes));
144         }
145         if let Some(ref background) = self.background {
146             properties.push(("background", background));
147         }
148         if let Some(ref background_rgba) = self.background_rgba {
149             properties.push(("background-rgba", background_rgba));
150         }
151         if let Some(ref background_set) = self.background_set {
152             properties.push(("background-set", background_set));
153         }
154         if let Some(ref editable) = self.editable {
155             properties.push(("editable", editable));
156         }
157         if let Some(ref editable_set) = self.editable_set {
158             properties.push(("editable-set", editable_set));
159         }
160         if let Some(ref ellipsize) = self.ellipsize {
161             properties.push(("ellipsize", ellipsize));
162         }
163         if let Some(ref ellipsize_set) = self.ellipsize_set {
164             properties.push(("ellipsize-set", ellipsize_set));
165         }
166         if let Some(ref family) = self.family {
167             properties.push(("family", family));
168         }
169         if let Some(ref family_set) = self.family_set {
170             properties.push(("family-set", family_set));
171         }
172         if let Some(ref font) = self.font {
173             properties.push(("font", font));
174         }
175         if let Some(ref font_desc) = self.font_desc {
176             properties.push(("font-desc", font_desc));
177         }
178         if let Some(ref foreground) = self.foreground {
179             properties.push(("foreground", foreground));
180         }
181         if let Some(ref foreground_rgba) = self.foreground_rgba {
182             properties.push(("foreground-rgba", foreground_rgba));
183         }
184         if let Some(ref foreground_set) = self.foreground_set {
185             properties.push(("foreground-set", foreground_set));
186         }
187         if let Some(ref language) = self.language {
188             properties.push(("language", language));
189         }
190         if let Some(ref language_set) = self.language_set {
191             properties.push(("language-set", language_set));
192         }
193         if let Some(ref markup) = self.markup {
194             properties.push(("markup", markup));
195         }
196         if let Some(ref max_width_chars) = self.max_width_chars {
197             properties.push(("max-width-chars", max_width_chars));
198         }
199         if let Some(ref placeholder_text) = self.placeholder_text {
200             properties.push(("placeholder-text", placeholder_text));
201         }
202         if let Some(ref rise) = self.rise {
203             properties.push(("rise", rise));
204         }
205         if let Some(ref rise_set) = self.rise_set {
206             properties.push(("rise-set", rise_set));
207         }
208         if let Some(ref scale) = self.scale {
209             properties.push(("scale", scale));
210         }
211         if let Some(ref scale_set) = self.scale_set {
212             properties.push(("scale-set", scale_set));
213         }
214         if let Some(ref single_paragraph_mode) = self.single_paragraph_mode {
215             properties.push(("single-paragraph-mode", single_paragraph_mode));
216         }
217         if let Some(ref size) = self.size {
218             properties.push(("size", size));
219         }
220         if let Some(ref size_points) = self.size_points {
221             properties.push(("size-points", size_points));
222         }
223         if let Some(ref size_set) = self.size_set {
224             properties.push(("size-set", size_set));
225         }
226         if let Some(ref stretch) = self.stretch {
227             properties.push(("stretch", stretch));
228         }
229         if let Some(ref stretch_set) = self.stretch_set {
230             properties.push(("stretch-set", stretch_set));
231         }
232         if let Some(ref strikethrough) = self.strikethrough {
233             properties.push(("strikethrough", strikethrough));
234         }
235         if let Some(ref strikethrough_set) = self.strikethrough_set {
236             properties.push(("strikethrough-set", strikethrough_set));
237         }
238         if let Some(ref style) = self.style {
239             properties.push(("style", style));
240         }
241         if let Some(ref style_set) = self.style_set {
242             properties.push(("style-set", style_set));
243         }
244         if let Some(ref text) = self.text {
245             properties.push(("text", text));
246         }
247         if let Some(ref underline) = self.underline {
248             properties.push(("underline", underline));
249         }
250         if let Some(ref underline_set) = self.underline_set {
251             properties.push(("underline-set", underline_set));
252         }
253         if let Some(ref variant) = self.variant {
254             properties.push(("variant", variant));
255         }
256         if let Some(ref variant_set) = self.variant_set {
257             properties.push(("variant-set", variant_set));
258         }
259         if let Some(ref weight) = self.weight {
260             properties.push(("weight", weight));
261         }
262         if let Some(ref weight_set) = self.weight_set {
263             properties.push(("weight-set", weight_set));
264         }
265         if let Some(ref width_chars) = self.width_chars {
266             properties.push(("width-chars", width_chars));
267         }
268         if let Some(ref wrap_mode) = self.wrap_mode {
269             properties.push(("wrap-mode", wrap_mode));
270         }
271         if let Some(ref wrap_width) = self.wrap_width {
272             properties.push(("wrap-width", wrap_width));
273         }
274         if let Some(ref cell_background) = self.cell_background {
275             properties.push(("cell-background", cell_background));
276         }
277         if let Some(ref cell_background_rgba) = self.cell_background_rgba {
278             properties.push(("cell-background-rgba", cell_background_rgba));
279         }
280         if let Some(ref cell_background_set) = self.cell_background_set {
281             properties.push(("cell-background-set", cell_background_set));
282         }
283         if let Some(ref height) = self.height {
284             properties.push(("height", height));
285         }
286         if let Some(ref is_expanded) = self.is_expanded {
287             properties.push(("is-expanded", is_expanded));
288         }
289         if let Some(ref is_expander) = self.is_expander {
290             properties.push(("is-expander", is_expander));
291         }
292         if let Some(ref mode) = self.mode {
293             properties.push(("mode", mode));
294         }
295         if let Some(ref sensitive) = self.sensitive {
296             properties.push(("sensitive", sensitive));
297         }
298         if let Some(ref visible) = self.visible {
299             properties.push(("visible", visible));
300         }
301         if let Some(ref width) = self.width {
302             properties.push(("width", width));
303         }
304         if let Some(ref xalign) = self.xalign {
305             properties.push(("xalign", xalign));
306         }
307         if let Some(ref xpad) = self.xpad {
308             properties.push(("xpad", xpad));
309         }
310         if let Some(ref yalign) = self.yalign {
311             properties.push(("yalign", yalign));
312         }
313         if let Some(ref ypad) = self.ypad {
314             properties.push(("ypad", ypad));
315         }
316         glib::Object::new(CellRendererCombo::static_type(), &properties)
317             .expect("object new")
318             .downcast()
319             .expect("downcast")
320     }
321 
has_entry(mut self, has_entry: bool) -> Self322     pub fn has_entry(mut self, has_entry: bool) -> Self {
323         self.has_entry = Some(has_entry);
324         self
325     }
326 
model<P: IsA<TreeModel>>(mut self, model: &P) -> Self327     pub fn model<P: IsA<TreeModel>>(mut self, model: &P) -> Self {
328         self.model = Some(model.clone().upcast());
329         self
330     }
331 
text_column(mut self, text_column: i32) -> Self332     pub fn text_column(mut self, text_column: i32) -> Self {
333         self.text_column = Some(text_column);
334         self
335     }
336 
align_set(mut self, align_set: bool) -> Self337     pub fn align_set(mut self, align_set: bool) -> Self {
338         self.align_set = Some(align_set);
339         self
340     }
341 
alignment(mut self, alignment: pango::Alignment) -> Self342     pub fn alignment(mut self, alignment: pango::Alignment) -> Self {
343         self.alignment = Some(alignment);
344         self
345     }
346 
attributes(mut self, attributes: &pango::AttrList) -> Self347     pub fn attributes(mut self, attributes: &pango::AttrList) -> Self {
348         self.attributes = Some(attributes.clone());
349         self
350     }
351 
background(mut self, background: &str) -> Self352     pub fn background(mut self, background: &str) -> Self {
353         self.background = Some(background.to_string());
354         self
355     }
356 
background_rgba(mut self, background_rgba: &gdk::RGBA) -> Self357     pub fn background_rgba(mut self, background_rgba: &gdk::RGBA) -> Self {
358         self.background_rgba = Some(background_rgba.clone());
359         self
360     }
361 
background_set(mut self, background_set: bool) -> Self362     pub fn background_set(mut self, background_set: bool) -> Self {
363         self.background_set = Some(background_set);
364         self
365     }
366 
editable(mut self, editable: bool) -> Self367     pub fn editable(mut self, editable: bool) -> Self {
368         self.editable = Some(editable);
369         self
370     }
371 
editable_set(mut self, editable_set: bool) -> Self372     pub fn editable_set(mut self, editable_set: bool) -> Self {
373         self.editable_set = Some(editable_set);
374         self
375     }
376 
ellipsize(mut self, ellipsize: pango::EllipsizeMode) -> Self377     pub fn ellipsize(mut self, ellipsize: pango::EllipsizeMode) -> Self {
378         self.ellipsize = Some(ellipsize);
379         self
380     }
381 
ellipsize_set(mut self, ellipsize_set: bool) -> Self382     pub fn ellipsize_set(mut self, ellipsize_set: bool) -> Self {
383         self.ellipsize_set = Some(ellipsize_set);
384         self
385     }
386 
family(mut self, family: &str) -> Self387     pub fn family(mut self, family: &str) -> Self {
388         self.family = Some(family.to_string());
389         self
390     }
391 
family_set(mut self, family_set: bool) -> Self392     pub fn family_set(mut self, family_set: bool) -> Self {
393         self.family_set = Some(family_set);
394         self
395     }
396 
font(mut self, font: &str) -> Self397     pub fn font(mut self, font: &str) -> Self {
398         self.font = Some(font.to_string());
399         self
400     }
401 
font_desc(mut self, font_desc: &pango::FontDescription) -> Self402     pub fn font_desc(mut self, font_desc: &pango::FontDescription) -> Self {
403         self.font_desc = Some(font_desc.clone());
404         self
405     }
406 
foreground(mut self, foreground: &str) -> Self407     pub fn foreground(mut self, foreground: &str) -> Self {
408         self.foreground = Some(foreground.to_string());
409         self
410     }
411 
foreground_rgba(mut self, foreground_rgba: &gdk::RGBA) -> Self412     pub fn foreground_rgba(mut self, foreground_rgba: &gdk::RGBA) -> Self {
413         self.foreground_rgba = Some(foreground_rgba.clone());
414         self
415     }
416 
foreground_set(mut self, foreground_set: bool) -> Self417     pub fn foreground_set(mut self, foreground_set: bool) -> Self {
418         self.foreground_set = Some(foreground_set);
419         self
420     }
421 
language(mut self, language: &str) -> Self422     pub fn language(mut self, language: &str) -> Self {
423         self.language = Some(language.to_string());
424         self
425     }
426 
language_set(mut self, language_set: bool) -> Self427     pub fn language_set(mut self, language_set: bool) -> Self {
428         self.language_set = Some(language_set);
429         self
430     }
431 
markup(mut self, markup: &str) -> Self432     pub fn markup(mut self, markup: &str) -> Self {
433         self.markup = Some(markup.to_string());
434         self
435     }
436 
max_width_chars(mut self, max_width_chars: i32) -> Self437     pub fn max_width_chars(mut self, max_width_chars: i32) -> Self {
438         self.max_width_chars = Some(max_width_chars);
439         self
440     }
441 
placeholder_text(mut self, placeholder_text: &str) -> Self442     pub fn placeholder_text(mut self, placeholder_text: &str) -> Self {
443         self.placeholder_text = Some(placeholder_text.to_string());
444         self
445     }
446 
rise(mut self, rise: i32) -> Self447     pub fn rise(mut self, rise: i32) -> Self {
448         self.rise = Some(rise);
449         self
450     }
451 
rise_set(mut self, rise_set: bool) -> Self452     pub fn rise_set(mut self, rise_set: bool) -> Self {
453         self.rise_set = Some(rise_set);
454         self
455     }
456 
scale(mut self, scale: f64) -> Self457     pub fn scale(mut self, scale: f64) -> Self {
458         self.scale = Some(scale);
459         self
460     }
461 
scale_set(mut self, scale_set: bool) -> Self462     pub fn scale_set(mut self, scale_set: bool) -> Self {
463         self.scale_set = Some(scale_set);
464         self
465     }
466 
single_paragraph_mode(mut self, single_paragraph_mode: bool) -> Self467     pub fn single_paragraph_mode(mut self, single_paragraph_mode: bool) -> Self {
468         self.single_paragraph_mode = Some(single_paragraph_mode);
469         self
470     }
471 
size(mut self, size: i32) -> Self472     pub fn size(mut self, size: i32) -> Self {
473         self.size = Some(size);
474         self
475     }
476 
size_points(mut self, size_points: f64) -> Self477     pub fn size_points(mut self, size_points: f64) -> Self {
478         self.size_points = Some(size_points);
479         self
480     }
481 
size_set(mut self, size_set: bool) -> Self482     pub fn size_set(mut self, size_set: bool) -> Self {
483         self.size_set = Some(size_set);
484         self
485     }
486 
stretch(mut self, stretch: pango::Stretch) -> Self487     pub fn stretch(mut self, stretch: pango::Stretch) -> Self {
488         self.stretch = Some(stretch);
489         self
490     }
491 
stretch_set(mut self, stretch_set: bool) -> Self492     pub fn stretch_set(mut self, stretch_set: bool) -> Self {
493         self.stretch_set = Some(stretch_set);
494         self
495     }
496 
strikethrough(mut self, strikethrough: bool) -> Self497     pub fn strikethrough(mut self, strikethrough: bool) -> Self {
498         self.strikethrough = Some(strikethrough);
499         self
500     }
501 
strikethrough_set(mut self, strikethrough_set: bool) -> Self502     pub fn strikethrough_set(mut self, strikethrough_set: bool) -> Self {
503         self.strikethrough_set = Some(strikethrough_set);
504         self
505     }
506 
style(mut self, style: pango::Style) -> Self507     pub fn style(mut self, style: pango::Style) -> Self {
508         self.style = Some(style);
509         self
510     }
511 
style_set(mut self, style_set: bool) -> Self512     pub fn style_set(mut self, style_set: bool) -> Self {
513         self.style_set = Some(style_set);
514         self
515     }
516 
text(mut self, text: &str) -> Self517     pub fn text(mut self, text: &str) -> Self {
518         self.text = Some(text.to_string());
519         self
520     }
521 
underline(mut self, underline: pango::Underline) -> Self522     pub fn underline(mut self, underline: pango::Underline) -> Self {
523         self.underline = Some(underline);
524         self
525     }
526 
underline_set(mut self, underline_set: bool) -> Self527     pub fn underline_set(mut self, underline_set: bool) -> Self {
528         self.underline_set = Some(underline_set);
529         self
530     }
531 
variant(mut self, variant: pango::Variant) -> Self532     pub fn variant(mut self, variant: pango::Variant) -> Self {
533         self.variant = Some(variant);
534         self
535     }
536 
variant_set(mut self, variant_set: bool) -> Self537     pub fn variant_set(mut self, variant_set: bool) -> Self {
538         self.variant_set = Some(variant_set);
539         self
540     }
541 
weight(mut self, weight: i32) -> Self542     pub fn weight(mut self, weight: i32) -> Self {
543         self.weight = Some(weight);
544         self
545     }
546 
weight_set(mut self, weight_set: bool) -> Self547     pub fn weight_set(mut self, weight_set: bool) -> Self {
548         self.weight_set = Some(weight_set);
549         self
550     }
551 
width_chars(mut self, width_chars: i32) -> Self552     pub fn width_chars(mut self, width_chars: i32) -> Self {
553         self.width_chars = Some(width_chars);
554         self
555     }
556 
wrap_mode(mut self, wrap_mode: pango::WrapMode) -> Self557     pub fn wrap_mode(mut self, wrap_mode: pango::WrapMode) -> Self {
558         self.wrap_mode = Some(wrap_mode);
559         self
560     }
561 
wrap_width(mut self, wrap_width: i32) -> Self562     pub fn wrap_width(mut self, wrap_width: i32) -> Self {
563         self.wrap_width = Some(wrap_width);
564         self
565     }
566 
cell_background(mut self, cell_background: &str) -> Self567     pub fn cell_background(mut self, cell_background: &str) -> Self {
568         self.cell_background = Some(cell_background.to_string());
569         self
570     }
571 
cell_background_rgba(mut self, cell_background_rgba: &gdk::RGBA) -> Self572     pub fn cell_background_rgba(mut self, cell_background_rgba: &gdk::RGBA) -> Self {
573         self.cell_background_rgba = Some(cell_background_rgba.clone());
574         self
575     }
576 
cell_background_set(mut self, cell_background_set: bool) -> Self577     pub fn cell_background_set(mut self, cell_background_set: bool) -> Self {
578         self.cell_background_set = Some(cell_background_set);
579         self
580     }
581 
height(mut self, height: i32) -> Self582     pub fn height(mut self, height: i32) -> Self {
583         self.height = Some(height);
584         self
585     }
586 
is_expanded(mut self, is_expanded: bool) -> Self587     pub fn is_expanded(mut self, is_expanded: bool) -> Self {
588         self.is_expanded = Some(is_expanded);
589         self
590     }
591 
is_expander(mut self, is_expander: bool) -> Self592     pub fn is_expander(mut self, is_expander: bool) -> Self {
593         self.is_expander = Some(is_expander);
594         self
595     }
596 
mode(mut self, mode: CellRendererMode) -> Self597     pub fn mode(mut self, mode: CellRendererMode) -> Self {
598         self.mode = Some(mode);
599         self
600     }
601 
sensitive(mut self, sensitive: bool) -> Self602     pub fn sensitive(mut self, sensitive: bool) -> Self {
603         self.sensitive = Some(sensitive);
604         self
605     }
606 
visible(mut self, visible: bool) -> Self607     pub fn visible(mut self, visible: bool) -> Self {
608         self.visible = Some(visible);
609         self
610     }
611 
width(mut self, width: i32) -> Self612     pub fn width(mut self, width: i32) -> Self {
613         self.width = Some(width);
614         self
615     }
616 
xalign(mut self, xalign: f32) -> Self617     pub fn xalign(mut self, xalign: f32) -> Self {
618         self.xalign = Some(xalign);
619         self
620     }
621 
xpad(mut self, xpad: u32) -> Self622     pub fn xpad(mut self, xpad: u32) -> Self {
623         self.xpad = Some(xpad);
624         self
625     }
626 
yalign(mut self, yalign: f32) -> Self627     pub fn yalign(mut self, yalign: f32) -> Self {
628         self.yalign = Some(yalign);
629         self
630     }
631 
ypad(mut self, ypad: u32) -> Self632     pub fn ypad(mut self, ypad: u32) -> Self {
633         self.ypad = Some(ypad);
634         self
635     }
636 }
637 
638 pub const NONE_CELL_RENDERER_COMBO: Option<&CellRendererCombo> = None;
639 
640 pub trait CellRendererComboExt: 'static {
get_property_has_entry(&self) -> bool641     fn get_property_has_entry(&self) -> bool;
642 
set_property_has_entry(&self, has_entry: bool)643     fn set_property_has_entry(&self, has_entry: bool);
644 
get_property_model(&self) -> Option<TreeModel>645     fn get_property_model(&self) -> Option<TreeModel>;
646 
set_property_model<P: IsA<TreeModel> + SetValueOptional>(&self, model: Option<&P>)647     fn set_property_model<P: IsA<TreeModel> + SetValueOptional>(&self, model: Option<&P>);
648 
get_property_text_column(&self) -> i32649     fn get_property_text_column(&self) -> i32;
650 
set_property_text_column(&self, text_column: i32)651     fn set_property_text_column(&self, text_column: i32);
652 
connect_changed<F: Fn(&Self, TreePath, &TreeIter) + 'static>(&self, f: F) -> SignalHandlerId653     fn connect_changed<F: Fn(&Self, TreePath, &TreeIter) + 'static>(&self, f: F)
654         -> SignalHandlerId;
655 
connect_property_has_entry_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId656     fn connect_property_has_entry_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
657 
connect_property_model_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId658     fn connect_property_model_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
659 
connect_property_text_column_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId660     fn connect_property_text_column_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
661 }
662 
663 impl<O: IsA<CellRendererCombo>> CellRendererComboExt for O {
get_property_has_entry(&self) -> bool664     fn get_property_has_entry(&self) -> bool {
665         unsafe {
666             let mut value = Value::from_type(<bool as StaticType>::static_type());
667             gobject_sys::g_object_get_property(
668                 self.to_glib_none().0 as *mut gobject_sys::GObject,
669                 b"has-entry\0".as_ptr() as *const _,
670                 value.to_glib_none_mut().0,
671             );
672             value
673                 .get()
674                 .expect("Return Value for property `has-entry` getter")
675                 .unwrap()
676         }
677     }
678 
set_property_has_entry(&self, has_entry: bool)679     fn set_property_has_entry(&self, has_entry: bool) {
680         unsafe {
681             gobject_sys::g_object_set_property(
682                 self.to_glib_none().0 as *mut gobject_sys::GObject,
683                 b"has-entry\0".as_ptr() as *const _,
684                 Value::from(&has_entry).to_glib_none().0,
685             );
686         }
687     }
688 
get_property_model(&self) -> Option<TreeModel>689     fn get_property_model(&self) -> Option<TreeModel> {
690         unsafe {
691             let mut value = Value::from_type(<TreeModel as StaticType>::static_type());
692             gobject_sys::g_object_get_property(
693                 self.to_glib_none().0 as *mut gobject_sys::GObject,
694                 b"model\0".as_ptr() as *const _,
695                 value.to_glib_none_mut().0,
696             );
697             value
698                 .get()
699                 .expect("Return Value for property `model` getter")
700         }
701     }
702 
set_property_model<P: IsA<TreeModel> + SetValueOptional>(&self, model: Option<&P>)703     fn set_property_model<P: IsA<TreeModel> + SetValueOptional>(&self, model: Option<&P>) {
704         unsafe {
705             gobject_sys::g_object_set_property(
706                 self.to_glib_none().0 as *mut gobject_sys::GObject,
707                 b"model\0".as_ptr() as *const _,
708                 Value::from(model).to_glib_none().0,
709             );
710         }
711     }
712 
get_property_text_column(&self) -> i32713     fn get_property_text_column(&self) -> i32 {
714         unsafe {
715             let mut value = Value::from_type(<i32 as StaticType>::static_type());
716             gobject_sys::g_object_get_property(
717                 self.to_glib_none().0 as *mut gobject_sys::GObject,
718                 b"text-column\0".as_ptr() as *const _,
719                 value.to_glib_none_mut().0,
720             );
721             value
722                 .get()
723                 .expect("Return Value for property `text-column` getter")
724                 .unwrap()
725         }
726     }
727 
set_property_text_column(&self, text_column: i32)728     fn set_property_text_column(&self, text_column: i32) {
729         unsafe {
730             gobject_sys::g_object_set_property(
731                 self.to_glib_none().0 as *mut gobject_sys::GObject,
732                 b"text-column\0".as_ptr() as *const _,
733                 Value::from(&text_column).to_glib_none().0,
734             );
735         }
736     }
737 
connect_changed<F: Fn(&Self, TreePath, &TreeIter) + 'static>( &self, f: F, ) -> SignalHandlerId738     fn connect_changed<F: Fn(&Self, TreePath, &TreeIter) + 'static>(
739         &self,
740         f: F,
741     ) -> SignalHandlerId {
742         unsafe extern "C" fn changed_trampoline<P, F: Fn(&P, TreePath, &TreeIter) + 'static>(
743             this: *mut gtk_sys::GtkCellRendererCombo,
744             path_string: *mut libc::c_char,
745             new_iter: *mut gtk_sys::GtkTreeIter,
746             f: glib_sys::gpointer,
747         ) where
748             P: IsA<CellRendererCombo>,
749         {
750             let f: &F = &*(f as *const F);
751             let path = from_glib_full(gtk_sys::gtk_tree_path_new_from_string(path_string));
752             f(
753                 &CellRendererCombo::from_glib_borrow(this).unsafe_cast(),
754                 path,
755                 &from_glib_borrow(new_iter),
756             )
757         }
758         unsafe {
759             let f: Box_<F> = Box_::new(f);
760             connect_raw(
761                 self.as_ptr() as *mut _,
762                 b"changed\0".as_ptr() as *const _,
763                 Some(transmute(changed_trampoline::<Self, F> as usize)),
764                 Box_::into_raw(f),
765             )
766         }
767     }
768 
connect_property_has_entry_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId769     fn connect_property_has_entry_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
770         unsafe extern "C" fn notify_has_entry_trampoline<P, F: Fn(&P) + 'static>(
771             this: *mut gtk_sys::GtkCellRendererCombo,
772             _param_spec: glib_sys::gpointer,
773             f: glib_sys::gpointer,
774         ) where
775             P: IsA<CellRendererCombo>,
776         {
777             let f: &F = &*(f as *const F);
778             f(&CellRendererCombo::from_glib_borrow(this).unsafe_cast())
779         }
780         unsafe {
781             let f: Box_<F> = Box_::new(f);
782             connect_raw(
783                 self.as_ptr() as *mut _,
784                 b"notify::has-entry\0".as_ptr() as *const _,
785                 Some(transmute(notify_has_entry_trampoline::<Self, F> as usize)),
786                 Box_::into_raw(f),
787             )
788         }
789     }
790 
connect_property_model_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId791     fn connect_property_model_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
792         unsafe extern "C" fn notify_model_trampoline<P, F: Fn(&P) + 'static>(
793             this: *mut gtk_sys::GtkCellRendererCombo,
794             _param_spec: glib_sys::gpointer,
795             f: glib_sys::gpointer,
796         ) where
797             P: IsA<CellRendererCombo>,
798         {
799             let f: &F = &*(f as *const F);
800             f(&CellRendererCombo::from_glib_borrow(this).unsafe_cast())
801         }
802         unsafe {
803             let f: Box_<F> = Box_::new(f);
804             connect_raw(
805                 self.as_ptr() as *mut _,
806                 b"notify::model\0".as_ptr() as *const _,
807                 Some(transmute(notify_model_trampoline::<Self, F> as usize)),
808                 Box_::into_raw(f),
809             )
810         }
811     }
812 
connect_property_text_column_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId813     fn connect_property_text_column_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
814         unsafe extern "C" fn notify_text_column_trampoline<P, F: Fn(&P) + 'static>(
815             this: *mut gtk_sys::GtkCellRendererCombo,
816             _param_spec: glib_sys::gpointer,
817             f: glib_sys::gpointer,
818         ) where
819             P: IsA<CellRendererCombo>,
820         {
821             let f: &F = &*(f as *const F);
822             f(&CellRendererCombo::from_glib_borrow(this).unsafe_cast())
823         }
824         unsafe {
825             let f: Box_<F> = Box_::new(f);
826             connect_raw(
827                 self.as_ptr() as *mut _,
828                 b"notify::text-column\0".as_ptr() as *const _,
829                 Some(transmute(notify_text_column_trampoline::<Self, F> as usize)),
830                 Box_::into_raw(f),
831             )
832         }
833     }
834 }
835 
836 impl fmt::Display for CellRendererCombo {
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result837     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
838         write!(f, "CellRendererCombo")
839     }
840 }
841