gtk/auto/
cell_renderer_combo.rs

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