1use gdk;
6use glib::object::Cast;
7use glib::object::IsA;
8use glib::signal::connect_raw;
9use glib::signal::SignalHandlerId;
10use glib::translate::*;
11use glib::GString;
12use glib::StaticType;
13use glib::ToValue;
14use glib::Value;
15use glib_sys;
16use gobject_sys;
17use gtk_sys;
18use libc;
19use pango;
20use std::boxed::Box as Box_;
21use std::fmt;
22use std::mem::transmute;
23use CellRenderer;
24use CellRendererMode;
25use TreePath;
26
27glib_wrapper! {
28 pub struct CellRendererText(Object<gtk_sys::GtkCellRendererText, gtk_sys::GtkCellRendererTextClass, CellRendererTextClass>) @extends CellRenderer;
29
30 match fn {
31 get_type => || gtk_sys::gtk_cell_renderer_text_get_type(),
32 }
33}
34
35impl CellRendererText {
36 pub fn new() -> CellRendererText {
37 assert_initialized_main_thread!();
38 unsafe { CellRenderer::from_glib_none(gtk_sys::gtk_cell_renderer_text_new()).unsafe_cast() }
39 }
40}
41
42impl Default for CellRendererText {
43 fn default() -> Self {
44 Self::new()
45 }
46}
47
48pub struct CellRendererTextBuilder {
49 align_set: Option<bool>,
50 alignment: Option<pango::Alignment>,
51 background: Option<String>,
52 background_rgba: Option<gdk::RGBA>,
53 background_set: Option<bool>,
54 editable: Option<bool>,
55 editable_set: Option<bool>,
56 ellipsize: Option<pango::EllipsizeMode>,
57 ellipsize_set: Option<bool>,
58 family: Option<String>,
59 family_set: Option<bool>,
60 font: Option<String>,
61 foreground: Option<String>,
62 foreground_rgba: Option<gdk::RGBA>,
63 foreground_set: Option<bool>,
64 language: Option<String>,
65 language_set: Option<bool>,
66 markup: Option<String>,
67 max_width_chars: Option<i32>,
68 placeholder_text: Option<String>,
69 rise: Option<i32>,
70 rise_set: Option<bool>,
71 scale: Option<f64>,
72 scale_set: Option<bool>,
73 single_paragraph_mode: Option<bool>,
74 size: Option<i32>,
75 size_points: Option<f64>,
76 size_set: Option<bool>,
77 stretch: Option<pango::Stretch>,
78 stretch_set: Option<bool>,
79 strikethrough: Option<bool>,
80 strikethrough_set: Option<bool>,
81 style: Option<pango::Style>,
82 style_set: Option<bool>,
83 text: Option<String>,
84 underline: Option<pango::Underline>,
85 underline_set: Option<bool>,
86 variant: Option<pango::Variant>,
87 variant_set: Option<bool>,
88 weight: Option<i32>,
89 weight_set: Option<bool>,
90 width_chars: Option<i32>,
91 wrap_mode: Option<pango::WrapMode>,
92 wrap_width: Option<i32>,
93 cell_background: Option<String>,
94 cell_background_rgba: Option<gdk::RGBA>,
95 cell_background_set: Option<bool>,
96 height: Option<i32>,
97 is_expanded: Option<bool>,
98 is_expander: Option<bool>,
99 mode: Option<CellRendererMode>,
100 sensitive: Option<bool>,
101 visible: Option<bool>,
102 width: Option<i32>,
103 xalign: Option<f32>,
104 xpad: Option<u32>,
105 yalign: Option<f32>,
106 ypad: Option<u32>,
107}
108
109impl CellRendererTextBuilder {
110 pub fn new() -> Self {
111 Self {
112 align_set: None,
113 alignment: None,
114 background: None,
115 background_rgba: None,
116 background_set: None,
117 editable: None,
118 editable_set: None,
119 ellipsize: None,
120 ellipsize_set: None,
121 family: None,
122 family_set: None,
123 font: None,
124 foreground: None,
125 foreground_rgba: None,
126 foreground_set: None,
127 language: None,
128 language_set: None,
129 markup: None,
130 max_width_chars: None,
131 placeholder_text: None,
132 rise: None,
133 rise_set: None,
134 scale: None,
135 scale_set: None,
136 single_paragraph_mode: None,
137 size: None,
138 size_points: None,
139 size_set: None,
140 stretch: None,
141 stretch_set: None,
142 strikethrough: None,
143 strikethrough_set: None,
144 style: None,
145 style_set: None,
146 text: None,
147 underline: None,
148 underline_set: None,
149 variant: None,
150 variant_set: None,
151 weight: None,
152 weight_set: None,
153 width_chars: None,
154 wrap_mode: None,
155 wrap_width: None,
156 cell_background: None,
157 cell_background_rgba: None,
158 cell_background_set: None,
159 height: None,
160 is_expanded: None,
161 is_expander: None,
162 mode: None,
163 sensitive: None,
164 visible: None,
165 width: None,
166 xalign: None,
167 xpad: None,
168 yalign: None,
169 ypad: None,
170 }
171 }
172
173 pub fn build(self) -> CellRendererText {
174 let mut properties: Vec<(&str, &dyn ToValue)> = vec![];
175 if let Some(ref align_set) = self.align_set {
176 properties.push(("align-set", align_set));
177 }
178 if let Some(ref alignment) = self.alignment {
179 properties.push(("alignment", alignment));
180 }
181 if let Some(ref background) = self.background {
182 properties.push(("background", background));
183 }
184 if let Some(ref background_rgba) = self.background_rgba {
185 properties.push(("background-rgba", background_rgba));
186 }
187 if let Some(ref background_set) = self.background_set {
188 properties.push(("background-set", background_set));
189 }
190 if let Some(ref editable) = self.editable {
191 properties.push(("editable", editable));
192 }
193 if let Some(ref editable_set) = self.editable_set {
194 properties.push(("editable-set", editable_set));
195 }
196 if let Some(ref ellipsize) = self.ellipsize {
197 properties.push(("ellipsize", ellipsize));
198 }
199 if let Some(ref ellipsize_set) = self.ellipsize_set {
200 properties.push(("ellipsize-set", ellipsize_set));
201 }
202 if let Some(ref family) = self.family {
203 properties.push(("family", family));
204 }
205 if let Some(ref family_set) = self.family_set {
206 properties.push(("family-set", family_set));
207 }
208 if let Some(ref font) = self.font {
209 properties.push(("font", font));
210 }
211 if let Some(ref foreground) = self.foreground {
212 properties.push(("foreground", foreground));
213 }
214 if let Some(ref foreground_rgba) = self.foreground_rgba {
215 properties.push(("foreground-rgba", foreground_rgba));
216 }
217 if let Some(ref foreground_set) = self.foreground_set {
218 properties.push(("foreground-set", foreground_set));
219 }
220 if let Some(ref language) = self.language {
221 properties.push(("language", language));
222 }
223 if let Some(ref language_set) = self.language_set {
224 properties.push(("language-set", language_set));
225 }
226 if let Some(ref markup) = self.markup {
227 properties.push(("markup", markup));
228 }
229 if let Some(ref max_width_chars) = self.max_width_chars {
230 properties.push(("max-width-chars", max_width_chars));
231 }
232 if let Some(ref placeholder_text) = self.placeholder_text {
233 properties.push(("placeholder-text", placeholder_text));
234 }
235 if let Some(ref rise) = self.rise {
236 properties.push(("rise", rise));
237 }
238 if let Some(ref rise_set) = self.rise_set {
239 properties.push(("rise-set", rise_set));
240 }
241 if let Some(ref scale) = self.scale {
242 properties.push(("scale", scale));
243 }
244 if let Some(ref scale_set) = self.scale_set {
245 properties.push(("scale-set", scale_set));
246 }
247 if let Some(ref single_paragraph_mode) = self.single_paragraph_mode {
248 properties.push(("single-paragraph-mode", single_paragraph_mode));
249 }
250 if let Some(ref size) = self.size {
251 properties.push(("size", size));
252 }
253 if let Some(ref size_points) = self.size_points {
254 properties.push(("size-points", size_points));
255 }
256 if let Some(ref size_set) = self.size_set {
257 properties.push(("size-set", size_set));
258 }
259 if let Some(ref stretch) = self.stretch {
260 properties.push(("stretch", stretch));
261 }
262 if let Some(ref stretch_set) = self.stretch_set {
263 properties.push(("stretch-set", stretch_set));
264 }
265 if let Some(ref strikethrough) = self.strikethrough {
266 properties.push(("strikethrough", strikethrough));
267 }
268 if let Some(ref strikethrough_set) = self.strikethrough_set {
269 properties.push(("strikethrough-set", strikethrough_set));
270 }
271 if let Some(ref style) = self.style {
272 properties.push(("style", style));
273 }
274 if let Some(ref style_set) = self.style_set {
275 properties.push(("style-set", style_set));
276 }
277 if let Some(ref text) = self.text {
278 properties.push(("text", text));
279 }
280 if let Some(ref underline) = self.underline {
281 properties.push(("underline", underline));
282 }
283 if let Some(ref underline_set) = self.underline_set {
284 properties.push(("underline-set", underline_set));
285 }
286 if let Some(ref variant) = self.variant {
287 properties.push(("variant", variant));
288 }
289 if let Some(ref variant_set) = self.variant_set {
290 properties.push(("variant-set", variant_set));
291 }
292 if let Some(ref weight) = self.weight {
293 properties.push(("weight", weight));
294 }
295 if let Some(ref weight_set) = self.weight_set {
296 properties.push(("weight-set", weight_set));
297 }
298 if let Some(ref width_chars) = self.width_chars {
299 properties.push(("width-chars", width_chars));
300 }
301 if let Some(ref wrap_mode) = self.wrap_mode {
302 properties.push(("wrap-mode", wrap_mode));
303 }
304 if let Some(ref wrap_width) = self.wrap_width {
305 properties.push(("wrap-width", wrap_width));
306 }
307 if let Some(ref cell_background) = self.cell_background {
308 properties.push(("cell-background", cell_background));
309 }
310 if let Some(ref cell_background_rgba) = self.cell_background_rgba {
311 properties.push(("cell-background-rgba", cell_background_rgba));
312 }
313 if let Some(ref cell_background_set) = self.cell_background_set {
314 properties.push(("cell-background-set", cell_background_set));
315 }
316 if let Some(ref height) = self.height {
317 properties.push(("height", height));
318 }
319 if let Some(ref is_expanded) = self.is_expanded {
320 properties.push(("is-expanded", is_expanded));
321 }
322 if let Some(ref is_expander) = self.is_expander {
323 properties.push(("is-expander", is_expander));
324 }
325 if let Some(ref mode) = self.mode {
326 properties.push(("mode", mode));
327 }
328 if let Some(ref sensitive) = self.sensitive {
329 properties.push(("sensitive", sensitive));
330 }
331 if let Some(ref visible) = self.visible {
332 properties.push(("visible", visible));
333 }
334 if let Some(ref width) = self.width {
335 properties.push(("width", width));
336 }
337 if let Some(ref xalign) = self.xalign {
338 properties.push(("xalign", xalign));
339 }
340 if let Some(ref xpad) = self.xpad {
341 properties.push(("xpad", xpad));
342 }
343 if let Some(ref yalign) = self.yalign {
344 properties.push(("yalign", yalign));
345 }
346 if let Some(ref ypad) = self.ypad {
347 properties.push(("ypad", ypad));
348 }
349 glib::Object::new(CellRendererText::static_type(), &properties)
350 .expect("object new")
351 .downcast()
352 .expect("downcast")
353 }
354
355 pub fn align_set(mut self, align_set: bool) -> Self {
356 self.align_set = Some(align_set);
357 self
358 }
359
360 pub fn alignment(mut self, alignment: pango::Alignment) -> Self {
361 self.alignment = Some(alignment);
362 self
363 }
364
365 pub fn background(mut self, background: &str) -> Self {
366 self.background = Some(background.to_string());
367 self
368 }
369
370 pub fn background_rgba(mut self, background_rgba: &gdk::RGBA) -> Self {
371 self.background_rgba = Some(background_rgba.clone());
372 self
373 }
374
375 pub fn background_set(mut self, background_set: bool) -> Self {
376 self.background_set = Some(background_set);
377 self
378 }
379
380 pub fn editable(mut self, editable: bool) -> Self {
381 self.editable = Some(editable);
382 self
383 }
384
385 pub fn editable_set(mut self, editable_set: bool) -> Self {
386 self.editable_set = Some(editable_set);
387 self
388 }
389
390 pub fn ellipsize(mut self, ellipsize: pango::EllipsizeMode) -> Self {
391 self.ellipsize = Some(ellipsize);
392 self
393 }
394
395 pub fn ellipsize_set(mut self, ellipsize_set: bool) -> Self {
396 self.ellipsize_set = Some(ellipsize_set);
397 self
398 }
399
400 pub fn family(mut self, family: &str) -> Self {
401 self.family = Some(family.to_string());
402 self
403 }
404
405 pub fn family_set(mut self, family_set: bool) -> Self {
406 self.family_set = Some(family_set);
407 self
408 }
409
410 pub fn font(mut self, font: &str) -> Self {
411 self.font = Some(font.to_string());
412 self
413 }
414
415 pub fn foreground(mut self, foreground: &str) -> Self {
416 self.foreground = Some(foreground.to_string());
417 self
418 }
419
420 pub fn foreground_rgba(mut self, foreground_rgba: &gdk::RGBA) -> Self {
421 self.foreground_rgba = Some(foreground_rgba.clone());
422 self
423 }
424
425 pub fn foreground_set(mut self, foreground_set: bool) -> Self {
426 self.foreground_set = Some(foreground_set);
427 self
428 }
429
430 pub fn language(mut self, language: &str) -> Self {
431 self.language = Some(language.to_string());
432 self
433 }
434
435 pub fn language_set(mut self, language_set: bool) -> Self {
436 self.language_set = Some(language_set);
437 self
438 }
439
440 pub fn markup(mut self, markup: &str) -> Self {
441 self.markup = Some(markup.to_string());
442 self
443 }
444
445 pub fn max_width_chars(mut self, max_width_chars: i32) -> Self {
446 self.max_width_chars = Some(max_width_chars);
447 self
448 }
449
450 pub fn placeholder_text(mut self, placeholder_text: &str) -> Self {
451 self.placeholder_text = Some(placeholder_text.to_string());
452 self
453 }
454
455 pub fn rise(mut self, rise: i32) -> Self {
456 self.rise = Some(rise);
457 self
458 }
459
460 pub fn rise_set(mut self, rise_set: bool) -> Self {
461 self.rise_set = Some(rise_set);
462 self
463 }
464
465 pub fn scale(mut self, scale: f64) -> Self {
466 self.scale = Some(scale);
467 self
468 }
469
470 pub fn scale_set(mut self, scale_set: bool) -> Self {
471 self.scale_set = Some(scale_set);
472 self
473 }
474
475 pub fn single_paragraph_mode(mut self, single_paragraph_mode: bool) -> Self {
476 self.single_paragraph_mode = Some(single_paragraph_mode);
477 self
478 }
479
480 pub fn size(mut self, size: i32) -> Self {
481 self.size = Some(size);
482 self
483 }
484
485 pub fn size_points(mut self, size_points: f64) -> Self {
486 self.size_points = Some(size_points);
487 self
488 }
489
490 pub fn size_set(mut self, size_set: bool) -> Self {
491 self.size_set = Some(size_set);
492 self
493 }
494
495 pub fn stretch(mut self, stretch: pango::Stretch) -> Self {
496 self.stretch = Some(stretch);
497 self
498 }
499
500 pub fn stretch_set(mut self, stretch_set: bool) -> Self {
501 self.stretch_set = Some(stretch_set);
502 self
503 }
504
505 pub fn strikethrough(mut self, strikethrough: bool) -> Self {
506 self.strikethrough = Some(strikethrough);
507 self
508 }
509
510 pub fn strikethrough_set(mut self, strikethrough_set: bool) -> Self {
511 self.strikethrough_set = Some(strikethrough_set);
512 self
513 }
514
515 pub fn style(mut self, style: pango::Style) -> Self {
516 self.style = Some(style);
517 self
518 }
519
520 pub fn style_set(mut self, style_set: bool) -> Self {
521 self.style_set = Some(style_set);
522 self
523 }
524
525 pub fn text(mut self, text: &str) -> Self {
526 self.text = Some(text.to_string());
527 self
528 }
529
530 pub fn underline(mut self, underline: pango::Underline) -> Self {
531 self.underline = Some(underline);
532 self
533 }
534
535 pub fn underline_set(mut self, underline_set: bool) -> Self {
536 self.underline_set = Some(underline_set);
537 self
538 }
539
540 pub fn variant(mut self, variant: pango::Variant) -> Self {
541 self.variant = Some(variant);
542 self
543 }
544
545 pub fn variant_set(mut self, variant_set: bool) -> Self {
546 self.variant_set = Some(variant_set);
547 self
548 }
549
550 pub fn weight(mut self, weight: i32) -> Self {
551 self.weight = Some(weight);
552 self
553 }
554
555 pub fn weight_set(mut self, weight_set: bool) -> Self {
556 self.weight_set = Some(weight_set);
557 self
558 }
559
560 pub fn width_chars(mut self, width_chars: i32) -> Self {
561 self.width_chars = Some(width_chars);
562 self
563 }
564
565 pub fn wrap_mode(mut self, wrap_mode: pango::WrapMode) -> Self {
566 self.wrap_mode = Some(wrap_mode);
567 self
568 }
569
570 pub fn wrap_width(mut self, wrap_width: i32) -> Self {
571 self.wrap_width = Some(wrap_width);
572 self
573 }
574
575 pub fn cell_background(mut self, cell_background: &str) -> Self {
576 self.cell_background = Some(cell_background.to_string());
577 self
578 }
579
580 pub fn cell_background_rgba(mut self, cell_background_rgba: &gdk::RGBA) -> Self {
581 self.cell_background_rgba = Some(cell_background_rgba.clone());
582 self
583 }
584
585 pub fn cell_background_set(mut self, cell_background_set: bool) -> Self {
586 self.cell_background_set = Some(cell_background_set);
587 self
588 }
589
590 pub fn height(mut self, height: i32) -> Self {
591 self.height = Some(height);
592 self
593 }
594
595 pub fn is_expanded(mut self, is_expanded: bool) -> Self {
596 self.is_expanded = Some(is_expanded);
597 self
598 }
599
600 pub fn is_expander(mut self, is_expander: bool) -> Self {
601 self.is_expander = Some(is_expander);
602 self
603 }
604
605 pub fn mode(mut self, mode: CellRendererMode) -> Self {
606 self.mode = Some(mode);
607 self
608 }
609
610 pub fn sensitive(mut self, sensitive: bool) -> Self {
611 self.sensitive = Some(sensitive);
612 self
613 }
614
615 pub fn visible(mut self, visible: bool) -> Self {
616 self.visible = Some(visible);
617 self
618 }
619
620 pub fn width(mut self, width: i32) -> Self {
621 self.width = Some(width);
622 self
623 }
624
625 pub fn xalign(mut self, xalign: f32) -> Self {
626 self.xalign = Some(xalign);
627 self
628 }
629
630 pub fn xpad(mut self, xpad: u32) -> Self {
631 self.xpad = Some(xpad);
632 self
633 }
634
635 pub fn yalign(mut self, yalign: f32) -> Self {
636 self.yalign = Some(yalign);
637 self
638 }
639
640 pub fn ypad(mut self, ypad: u32) -> Self {
641 self.ypad = Some(ypad);
642 self
643 }
644}
645
646pub const NONE_CELL_RENDERER_TEXT: Option<&CellRendererText> = None;
647
648pub trait CellRendererTextExt: 'static {
649 fn set_fixed_height_from_font(&self, number_of_rows: i32);
650
651 fn get_property_align_set(&self) -> bool;
652
653 fn set_property_align_set(&self, align_set: bool);
654
655 fn get_property_alignment(&self) -> pango::Alignment;
656
657 fn set_property_alignment(&self, alignment: pango::Alignment);
658
659 fn set_property_background(&self, background: Option<&str>);
660
661 fn get_property_background_rgba(&self) -> Option<gdk::RGBA>;
662
663 fn set_property_background_rgba(&self, background_rgba: Option<&gdk::RGBA>);
664
665 fn get_property_background_set(&self) -> bool;
666
667 fn set_property_background_set(&self, background_set: bool);
668
669 fn get_property_editable(&self) -> bool;
670
671 fn set_property_editable(&self, editable: bool);
672
673 fn get_property_editable_set(&self) -> bool;
674
675 fn set_property_editable_set(&self, editable_set: bool);
676
677 fn get_property_ellipsize(&self) -> pango::EllipsizeMode;
678
679 fn set_property_ellipsize(&self, ellipsize: pango::EllipsizeMode);
680
681 fn get_property_ellipsize_set(&self) -> bool;
682
683 fn set_property_ellipsize_set(&self, ellipsize_set: bool);
684
685 fn get_property_family(&self) -> Option<GString>;
686
687 fn set_property_family(&self, family: Option<&str>);
688
689 fn get_property_family_set(&self) -> bool;
690
691 fn set_property_family_set(&self, family_set: bool);
692
693 fn get_property_font(&self) -> Option<GString>;
694
695 fn set_property_font(&self, font: Option<&str>);
696
697 fn set_property_foreground(&self, foreground: Option<&str>);
698
699 fn get_property_foreground_rgba(&self) -> Option<gdk::RGBA>;
700
701 fn set_property_foreground_rgba(&self, foreground_rgba: Option<&gdk::RGBA>);
702
703 fn get_property_foreground_set(&self) -> bool;
704
705 fn set_property_foreground_set(&self, foreground_set: bool);
706
707 fn get_property_language(&self) -> Option<GString>;
708
709 fn set_property_language(&self, language: Option<&str>);
710
711 fn get_property_language_set(&self) -> bool;
712
713 fn set_property_language_set(&self, language_set: bool);
714
715 fn set_property_markup(&self, markup: Option<&str>);
716
717 fn get_property_max_width_chars(&self) -> i32;
718
719 fn set_property_max_width_chars(&self, max_width_chars: i32);
720
721 fn get_property_placeholder_text(&self) -> Option<GString>;
722
723 fn set_property_placeholder_text(&self, placeholder_text: Option<&str>);
724
725 fn get_property_rise(&self) -> i32;
726
727 fn set_property_rise(&self, rise: i32);
728
729 fn get_property_rise_set(&self) -> bool;
730
731 fn set_property_rise_set(&self, rise_set: bool);
732
733 fn get_property_scale(&self) -> f64;
734
735 fn set_property_scale(&self, scale: f64);
736
737 fn get_property_scale_set(&self) -> bool;
738
739 fn set_property_scale_set(&self, scale_set: bool);
740
741 fn get_property_single_paragraph_mode(&self) -> bool;
742
743 fn set_property_single_paragraph_mode(&self, single_paragraph_mode: bool);
744
745 fn get_property_size(&self) -> i32;
746
747 fn set_property_size(&self, size: i32);
748
749 fn get_property_size_points(&self) -> f64;
750
751 fn set_property_size_points(&self, size_points: f64);
752
753 fn get_property_size_set(&self) -> bool;
754
755 fn set_property_size_set(&self, size_set: bool);
756
757 fn get_property_stretch(&self) -> pango::Stretch;
758
759 fn set_property_stretch(&self, stretch: pango::Stretch);
760
761 fn get_property_stretch_set(&self) -> bool;
762
763 fn set_property_stretch_set(&self, stretch_set: bool);
764
765 fn get_property_strikethrough(&self) -> bool;
766
767 fn set_property_strikethrough(&self, strikethrough: bool);
768
769 fn get_property_strikethrough_set(&self) -> bool;
770
771 fn set_property_strikethrough_set(&self, strikethrough_set: bool);
772
773 fn get_property_style(&self) -> pango::Style;
774
775 fn set_property_style(&self, style: pango::Style);
776
777 fn get_property_style_set(&self) -> bool;
778
779 fn set_property_style_set(&self, style_set: bool);
780
781 fn get_property_text(&self) -> Option<GString>;
782
783 fn set_property_text(&self, text: Option<&str>);
784
785 fn get_property_underline(&self) -> pango::Underline;
786
787 fn set_property_underline(&self, underline: pango::Underline);
788
789 fn get_property_underline_set(&self) -> bool;
790
791 fn set_property_underline_set(&self, underline_set: bool);
792
793 fn get_property_variant(&self) -> pango::Variant;
794
795 fn set_property_variant(&self, variant: pango::Variant);
796
797 fn get_property_variant_set(&self) -> bool;
798
799 fn set_property_variant_set(&self, variant_set: bool);
800
801 fn get_property_weight(&self) -> i32;
802
803 fn set_property_weight(&self, weight: i32);
804
805 fn get_property_weight_set(&self) -> bool;
806
807 fn set_property_weight_set(&self, weight_set: bool);
808
809 fn get_property_width_chars(&self) -> i32;
810
811 fn set_property_width_chars(&self, width_chars: i32);
812
813 fn get_property_wrap_mode(&self) -> pango::WrapMode;
814
815 fn set_property_wrap_mode(&self, wrap_mode: pango::WrapMode);
816
817 fn get_property_wrap_width(&self) -> i32;
818
819 fn set_property_wrap_width(&self, wrap_width: i32);
820
821 fn connect_edited<F: Fn(&Self, TreePath, &str) + 'static>(&self, f: F) -> SignalHandlerId;
822
823 fn connect_property_align_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
824
825 fn connect_property_alignment_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
826
827 fn connect_property_background_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
828
829 fn connect_property_background_rgba_notify<F: Fn(&Self) + 'static>(
830 &self,
831 f: F,
832 ) -> SignalHandlerId;
833
834 fn connect_property_background_set_notify<F: Fn(&Self) + 'static>(
835 &self,
836 f: F,
837 ) -> SignalHandlerId;
838
839 fn connect_property_editable_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
840
841 fn connect_property_editable_set_notify<F: Fn(&Self) + 'static>(&self, f: F)
842 -> SignalHandlerId;
843
844 fn connect_property_ellipsize_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
845
846 fn connect_property_ellipsize_set_notify<F: Fn(&Self) + 'static>(
847 &self,
848 f: F,
849 ) -> SignalHandlerId;
850
851 fn connect_property_family_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
852
853 fn connect_property_family_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
854
855 fn connect_property_font_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
856
857 fn connect_property_foreground_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
858
859 fn connect_property_foreground_rgba_notify<F: Fn(&Self) + 'static>(
860 &self,
861 f: F,
862 ) -> SignalHandlerId;
863
864 fn connect_property_foreground_set_notify<F: Fn(&Self) + 'static>(
865 &self,
866 f: F,
867 ) -> SignalHandlerId;
868
869 fn connect_property_language_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
870
871 fn connect_property_language_set_notify<F: Fn(&Self) + 'static>(&self, f: F)
872 -> SignalHandlerId;
873
874 fn connect_property_markup_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
875
876 fn connect_property_max_width_chars_notify<F: Fn(&Self) + 'static>(
877 &self,
878 f: F,
879 ) -> SignalHandlerId;
880
881 fn connect_property_placeholder_text_notify<F: Fn(&Self) + 'static>(
882 &self,
883 f: F,
884 ) -> SignalHandlerId;
885
886 fn connect_property_rise_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
887
888 fn connect_property_rise_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
889
890 fn connect_property_scale_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
891
892 fn connect_property_scale_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
893
894 fn connect_property_single_paragraph_mode_notify<F: Fn(&Self) + 'static>(
895 &self,
896 f: F,
897 ) -> SignalHandlerId;
898
899 fn connect_property_size_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
900
901 fn connect_property_size_points_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
902
903 fn connect_property_size_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
904
905 fn connect_property_stretch_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
906
907 fn connect_property_stretch_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
908
909 fn connect_property_strikethrough_notify<F: Fn(&Self) + 'static>(
910 &self,
911 f: F,
912 ) -> SignalHandlerId;
913
914 fn connect_property_strikethrough_set_notify<F: Fn(&Self) + 'static>(
915 &self,
916 f: F,
917 ) -> SignalHandlerId;
918
919 fn connect_property_style_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
920
921 fn connect_property_style_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
922
923 fn connect_property_text_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
924
925 fn connect_property_underline_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
926
927 fn connect_property_underline_set_notify<F: Fn(&Self) + 'static>(
928 &self,
929 f: F,
930 ) -> SignalHandlerId;
931
932 fn connect_property_variant_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
933
934 fn connect_property_variant_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
935
936 fn connect_property_weight_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
937
938 fn connect_property_weight_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
939
940 fn connect_property_width_chars_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
941
942 fn connect_property_wrap_mode_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
943
944 fn connect_property_wrap_width_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
945}
946
947impl<O: IsA<CellRendererText>> CellRendererTextExt for O {
948 fn set_fixed_height_from_font(&self, number_of_rows: i32) {
949 unsafe {
950 gtk_sys::gtk_cell_renderer_text_set_fixed_height_from_font(
951 self.as_ref().to_glib_none().0,
952 number_of_rows,
953 );
954 }
955 }
956
957 fn get_property_align_set(&self) -> bool {
958 unsafe {
959 let mut value = Value::from_type(<bool as StaticType>::static_type());
960 gobject_sys::g_object_get_property(
961 self.to_glib_none().0 as *mut gobject_sys::GObject,
962 b"align-set\0".as_ptr() as *const _,
963 value.to_glib_none_mut().0,
964 );
965 value.get().unwrap()
966 }
967 }
968
969 fn set_property_align_set(&self, align_set: bool) {
970 unsafe {
971 gobject_sys::g_object_set_property(
972 self.to_glib_none().0 as *mut gobject_sys::GObject,
973 b"align-set\0".as_ptr() as *const _,
974 Value::from(&align_set).to_glib_none().0,
975 );
976 }
977 }
978
979 fn get_property_alignment(&self) -> pango::Alignment {
980 unsafe {
981 let mut value = Value::from_type(<pango::Alignment as StaticType>::static_type());
982 gobject_sys::g_object_get_property(
983 self.to_glib_none().0 as *mut gobject_sys::GObject,
984 b"alignment\0".as_ptr() as *const _,
985 value.to_glib_none_mut().0,
986 );
987 value.get().unwrap()
988 }
989 }
990
991 fn set_property_alignment(&self, alignment: pango::Alignment) {
992 unsafe {
993 gobject_sys::g_object_set_property(
994 self.to_glib_none().0 as *mut gobject_sys::GObject,
995 b"alignment\0".as_ptr() as *const _,
996 Value::from(&alignment).to_glib_none().0,
997 );
998 }
999 }
1000
1001 fn set_property_background(&self, background: Option<&str>) {
1002 unsafe {
1003 gobject_sys::g_object_set_property(
1004 self.to_glib_none().0 as *mut gobject_sys::GObject,
1005 b"background\0".as_ptr() as *const _,
1006 Value::from(background).to_glib_none().0,
1007 );
1008 }
1009 }
1010
1011 fn get_property_background_rgba(&self) -> Option<gdk::RGBA> {
1012 unsafe {
1013 let mut value = Value::from_type(<gdk::RGBA as StaticType>::static_type());
1014 gobject_sys::g_object_get_property(
1015 self.to_glib_none().0 as *mut gobject_sys::GObject,
1016 b"background-rgba\0".as_ptr() as *const _,
1017 value.to_glib_none_mut().0,
1018 );
1019 value.get()
1020 }
1021 }
1022
1023 fn set_property_background_rgba(&self, background_rgba: Option<&gdk::RGBA>) {
1024 unsafe {
1025 gobject_sys::g_object_set_property(
1026 self.to_glib_none().0 as *mut gobject_sys::GObject,
1027 b"background-rgba\0".as_ptr() as *const _,
1028 Value::from(background_rgba).to_glib_none().0,
1029 );
1030 }
1031 }
1032
1033 fn get_property_background_set(&self) -> bool {
1034 unsafe {
1035 let mut value = Value::from_type(<bool as StaticType>::static_type());
1036 gobject_sys::g_object_get_property(
1037 self.to_glib_none().0 as *mut gobject_sys::GObject,
1038 b"background-set\0".as_ptr() as *const _,
1039 value.to_glib_none_mut().0,
1040 );
1041 value.get().unwrap()
1042 }
1043 }
1044
1045 fn set_property_background_set(&self, background_set: bool) {
1046 unsafe {
1047 gobject_sys::g_object_set_property(
1048 self.to_glib_none().0 as *mut gobject_sys::GObject,
1049 b"background-set\0".as_ptr() as *const _,
1050 Value::from(&background_set).to_glib_none().0,
1051 );
1052 }
1053 }
1054
1055 fn get_property_editable(&self) -> bool {
1056 unsafe {
1057 let mut value = Value::from_type(<bool as StaticType>::static_type());
1058 gobject_sys::g_object_get_property(
1059 self.to_glib_none().0 as *mut gobject_sys::GObject,
1060 b"editable\0".as_ptr() as *const _,
1061 value.to_glib_none_mut().0,
1062 );
1063 value.get().unwrap()
1064 }
1065 }
1066
1067 fn set_property_editable(&self, editable: bool) {
1068 unsafe {
1069 gobject_sys::g_object_set_property(
1070 self.to_glib_none().0 as *mut gobject_sys::GObject,
1071 b"editable\0".as_ptr() as *const _,
1072 Value::from(&editable).to_glib_none().0,
1073 );
1074 }
1075 }
1076
1077 fn get_property_editable_set(&self) -> bool {
1078 unsafe {
1079 let mut value = Value::from_type(<bool as StaticType>::static_type());
1080 gobject_sys::g_object_get_property(
1081 self.to_glib_none().0 as *mut gobject_sys::GObject,
1082 b"editable-set\0".as_ptr() as *const _,
1083 value.to_glib_none_mut().0,
1084 );
1085 value.get().unwrap()
1086 }
1087 }
1088
1089 fn set_property_editable_set(&self, editable_set: bool) {
1090 unsafe {
1091 gobject_sys::g_object_set_property(
1092 self.to_glib_none().0 as *mut gobject_sys::GObject,
1093 b"editable-set\0".as_ptr() as *const _,
1094 Value::from(&editable_set).to_glib_none().0,
1095 );
1096 }
1097 }
1098
1099 fn get_property_ellipsize(&self) -> pango::EllipsizeMode {
1100 unsafe {
1101 let mut value = Value::from_type(<pango::EllipsizeMode as StaticType>::static_type());
1102 gobject_sys::g_object_get_property(
1103 self.to_glib_none().0 as *mut gobject_sys::GObject,
1104 b"ellipsize\0".as_ptr() as *const _,
1105 value.to_glib_none_mut().0,
1106 );
1107 value.get().unwrap()
1108 }
1109 }
1110
1111 fn set_property_ellipsize(&self, ellipsize: pango::EllipsizeMode) {
1112 unsafe {
1113 gobject_sys::g_object_set_property(
1114 self.to_glib_none().0 as *mut gobject_sys::GObject,
1115 b"ellipsize\0".as_ptr() as *const _,
1116 Value::from(&ellipsize).to_glib_none().0,
1117 );
1118 }
1119 }
1120
1121 fn get_property_ellipsize_set(&self) -> bool {
1122 unsafe {
1123 let mut value = Value::from_type(<bool as StaticType>::static_type());
1124 gobject_sys::g_object_get_property(
1125 self.to_glib_none().0 as *mut gobject_sys::GObject,
1126 b"ellipsize-set\0".as_ptr() as *const _,
1127 value.to_glib_none_mut().0,
1128 );
1129 value.get().unwrap()
1130 }
1131 }
1132
1133 fn set_property_ellipsize_set(&self, ellipsize_set: bool) {
1134 unsafe {
1135 gobject_sys::g_object_set_property(
1136 self.to_glib_none().0 as *mut gobject_sys::GObject,
1137 b"ellipsize-set\0".as_ptr() as *const _,
1138 Value::from(&ellipsize_set).to_glib_none().0,
1139 );
1140 }
1141 }
1142
1143 fn get_property_family(&self) -> Option<GString> {
1144 unsafe {
1145 let mut value = Value::from_type(<GString as StaticType>::static_type());
1146 gobject_sys::g_object_get_property(
1147 self.to_glib_none().0 as *mut gobject_sys::GObject,
1148 b"family\0".as_ptr() as *const _,
1149 value.to_glib_none_mut().0,
1150 );
1151 value.get()
1152 }
1153 }
1154
1155 fn set_property_family(&self, family: Option<&str>) {
1156 unsafe {
1157 gobject_sys::g_object_set_property(
1158 self.to_glib_none().0 as *mut gobject_sys::GObject,
1159 b"family\0".as_ptr() as *const _,
1160 Value::from(family).to_glib_none().0,
1161 );
1162 }
1163 }
1164
1165 fn get_property_family_set(&self) -> bool {
1166 unsafe {
1167 let mut value = Value::from_type(<bool as StaticType>::static_type());
1168 gobject_sys::g_object_get_property(
1169 self.to_glib_none().0 as *mut gobject_sys::GObject,
1170 b"family-set\0".as_ptr() as *const _,
1171 value.to_glib_none_mut().0,
1172 );
1173 value.get().unwrap()
1174 }
1175 }
1176
1177 fn set_property_family_set(&self, family_set: bool) {
1178 unsafe {
1179 gobject_sys::g_object_set_property(
1180 self.to_glib_none().0 as *mut gobject_sys::GObject,
1181 b"family-set\0".as_ptr() as *const _,
1182 Value::from(&family_set).to_glib_none().0,
1183 );
1184 }
1185 }
1186
1187 fn get_property_font(&self) -> Option<GString> {
1188 unsafe {
1189 let mut value = Value::from_type(<GString as StaticType>::static_type());
1190 gobject_sys::g_object_get_property(
1191 self.to_glib_none().0 as *mut gobject_sys::GObject,
1192 b"font\0".as_ptr() as *const _,
1193 value.to_glib_none_mut().0,
1194 );
1195 value.get()
1196 }
1197 }
1198
1199 fn set_property_font(&self, font: Option<&str>) {
1200 unsafe {
1201 gobject_sys::g_object_set_property(
1202 self.to_glib_none().0 as *mut gobject_sys::GObject,
1203 b"font\0".as_ptr() as *const _,
1204 Value::from(font).to_glib_none().0,
1205 );
1206 }
1207 }
1208
1209 fn set_property_foreground(&self, foreground: Option<&str>) {
1210 unsafe {
1211 gobject_sys::g_object_set_property(
1212 self.to_glib_none().0 as *mut gobject_sys::GObject,
1213 b"foreground\0".as_ptr() as *const _,
1214 Value::from(foreground).to_glib_none().0,
1215 );
1216 }
1217 }
1218
1219 fn get_property_foreground_rgba(&self) -> Option<gdk::RGBA> {
1220 unsafe {
1221 let mut value = Value::from_type(<gdk::RGBA as StaticType>::static_type());
1222 gobject_sys::g_object_get_property(
1223 self.to_glib_none().0 as *mut gobject_sys::GObject,
1224 b"foreground-rgba\0".as_ptr() as *const _,
1225 value.to_glib_none_mut().0,
1226 );
1227 value.get()
1228 }
1229 }
1230
1231 fn set_property_foreground_rgba(&self, foreground_rgba: Option<&gdk::RGBA>) {
1232 unsafe {
1233 gobject_sys::g_object_set_property(
1234 self.to_glib_none().0 as *mut gobject_sys::GObject,
1235 b"foreground-rgba\0".as_ptr() as *const _,
1236 Value::from(foreground_rgba).to_glib_none().0,
1237 );
1238 }
1239 }
1240
1241 fn get_property_foreground_set(&self) -> bool {
1242 unsafe {
1243 let mut value = Value::from_type(<bool as StaticType>::static_type());
1244 gobject_sys::g_object_get_property(
1245 self.to_glib_none().0 as *mut gobject_sys::GObject,
1246 b"foreground-set\0".as_ptr() as *const _,
1247 value.to_glib_none_mut().0,
1248 );
1249 value.get().unwrap()
1250 }
1251 }
1252
1253 fn set_property_foreground_set(&self, foreground_set: bool) {
1254 unsafe {
1255 gobject_sys::g_object_set_property(
1256 self.to_glib_none().0 as *mut gobject_sys::GObject,
1257 b"foreground-set\0".as_ptr() as *const _,
1258 Value::from(&foreground_set).to_glib_none().0,
1259 );
1260 }
1261 }
1262
1263 fn get_property_language(&self) -> Option<GString> {
1264 unsafe {
1265 let mut value = Value::from_type(<GString as StaticType>::static_type());
1266 gobject_sys::g_object_get_property(
1267 self.to_glib_none().0 as *mut gobject_sys::GObject,
1268 b"language\0".as_ptr() as *const _,
1269 value.to_glib_none_mut().0,
1270 );
1271 value.get()
1272 }
1273 }
1274
1275 fn set_property_language(&self, language: Option<&str>) {
1276 unsafe {
1277 gobject_sys::g_object_set_property(
1278 self.to_glib_none().0 as *mut gobject_sys::GObject,
1279 b"language\0".as_ptr() as *const _,
1280 Value::from(language).to_glib_none().0,
1281 );
1282 }
1283 }
1284
1285 fn get_property_language_set(&self) -> bool {
1286 unsafe {
1287 let mut value = Value::from_type(<bool as StaticType>::static_type());
1288 gobject_sys::g_object_get_property(
1289 self.to_glib_none().0 as *mut gobject_sys::GObject,
1290 b"language-set\0".as_ptr() as *const _,
1291 value.to_glib_none_mut().0,
1292 );
1293 value.get().unwrap()
1294 }
1295 }
1296
1297 fn set_property_language_set(&self, language_set: bool) {
1298 unsafe {
1299 gobject_sys::g_object_set_property(
1300 self.to_glib_none().0 as *mut gobject_sys::GObject,
1301 b"language-set\0".as_ptr() as *const _,
1302 Value::from(&language_set).to_glib_none().0,
1303 );
1304 }
1305 }
1306
1307 fn set_property_markup(&self, markup: Option<&str>) {
1308 unsafe {
1309 gobject_sys::g_object_set_property(
1310 self.to_glib_none().0 as *mut gobject_sys::GObject,
1311 b"markup\0".as_ptr() as *const _,
1312 Value::from(markup).to_glib_none().0,
1313 );
1314 }
1315 }
1316
1317 fn get_property_max_width_chars(&self) -> i32 {
1318 unsafe {
1319 let mut value = Value::from_type(<i32 as StaticType>::static_type());
1320 gobject_sys::g_object_get_property(
1321 self.to_glib_none().0 as *mut gobject_sys::GObject,
1322 b"max-width-chars\0".as_ptr() as *const _,
1323 value.to_glib_none_mut().0,
1324 );
1325 value.get().unwrap()
1326 }
1327 }
1328
1329 fn set_property_max_width_chars(&self, max_width_chars: i32) {
1330 unsafe {
1331 gobject_sys::g_object_set_property(
1332 self.to_glib_none().0 as *mut gobject_sys::GObject,
1333 b"max-width-chars\0".as_ptr() as *const _,
1334 Value::from(&max_width_chars).to_glib_none().0,
1335 );
1336 }
1337 }
1338
1339 fn get_property_placeholder_text(&self) -> Option<GString> {
1340 unsafe {
1341 let mut value = Value::from_type(<GString as StaticType>::static_type());
1342 gobject_sys::g_object_get_property(
1343 self.to_glib_none().0 as *mut gobject_sys::GObject,
1344 b"placeholder-text\0".as_ptr() as *const _,
1345 value.to_glib_none_mut().0,
1346 );
1347 value.get()
1348 }
1349 }
1350
1351 fn set_property_placeholder_text(&self, placeholder_text: Option<&str>) {
1352 unsafe {
1353 gobject_sys::g_object_set_property(
1354 self.to_glib_none().0 as *mut gobject_sys::GObject,
1355 b"placeholder-text\0".as_ptr() as *const _,
1356 Value::from(placeholder_text).to_glib_none().0,
1357 );
1358 }
1359 }
1360
1361 fn get_property_rise(&self) -> i32 {
1362 unsafe {
1363 let mut value = Value::from_type(<i32 as StaticType>::static_type());
1364 gobject_sys::g_object_get_property(
1365 self.to_glib_none().0 as *mut gobject_sys::GObject,
1366 b"rise\0".as_ptr() as *const _,
1367 value.to_glib_none_mut().0,
1368 );
1369 value.get().unwrap()
1370 }
1371 }
1372
1373 fn set_property_rise(&self, rise: i32) {
1374 unsafe {
1375 gobject_sys::g_object_set_property(
1376 self.to_glib_none().0 as *mut gobject_sys::GObject,
1377 b"rise\0".as_ptr() as *const _,
1378 Value::from(&rise).to_glib_none().0,
1379 );
1380 }
1381 }
1382
1383 fn get_property_rise_set(&self) -> bool {
1384 unsafe {
1385 let mut value = Value::from_type(<bool as StaticType>::static_type());
1386 gobject_sys::g_object_get_property(
1387 self.to_glib_none().0 as *mut gobject_sys::GObject,
1388 b"rise-set\0".as_ptr() as *const _,
1389 value.to_glib_none_mut().0,
1390 );
1391 value.get().unwrap()
1392 }
1393 }
1394
1395 fn set_property_rise_set(&self, rise_set: bool) {
1396 unsafe {
1397 gobject_sys::g_object_set_property(
1398 self.to_glib_none().0 as *mut gobject_sys::GObject,
1399 b"rise-set\0".as_ptr() as *const _,
1400 Value::from(&rise_set).to_glib_none().0,
1401 );
1402 }
1403 }
1404
1405 fn get_property_scale(&self) -> f64 {
1406 unsafe {
1407 let mut value = Value::from_type(<f64 as StaticType>::static_type());
1408 gobject_sys::g_object_get_property(
1409 self.to_glib_none().0 as *mut gobject_sys::GObject,
1410 b"scale\0".as_ptr() as *const _,
1411 value.to_glib_none_mut().0,
1412 );
1413 value.get().unwrap()
1414 }
1415 }
1416
1417 fn set_property_scale(&self, scale: f64) {
1418 unsafe {
1419 gobject_sys::g_object_set_property(
1420 self.to_glib_none().0 as *mut gobject_sys::GObject,
1421 b"scale\0".as_ptr() as *const _,
1422 Value::from(&scale).to_glib_none().0,
1423 );
1424 }
1425 }
1426
1427 fn get_property_scale_set(&self) -> bool {
1428 unsafe {
1429 let mut value = Value::from_type(<bool as StaticType>::static_type());
1430 gobject_sys::g_object_get_property(
1431 self.to_glib_none().0 as *mut gobject_sys::GObject,
1432 b"scale-set\0".as_ptr() as *const _,
1433 value.to_glib_none_mut().0,
1434 );
1435 value.get().unwrap()
1436 }
1437 }
1438
1439 fn set_property_scale_set(&self, scale_set: bool) {
1440 unsafe {
1441 gobject_sys::g_object_set_property(
1442 self.to_glib_none().0 as *mut gobject_sys::GObject,
1443 b"scale-set\0".as_ptr() as *const _,
1444 Value::from(&scale_set).to_glib_none().0,
1445 );
1446 }
1447 }
1448
1449 fn get_property_single_paragraph_mode(&self) -> bool {
1450 unsafe {
1451 let mut value = Value::from_type(<bool as StaticType>::static_type());
1452 gobject_sys::g_object_get_property(
1453 self.to_glib_none().0 as *mut gobject_sys::GObject,
1454 b"single-paragraph-mode\0".as_ptr() as *const _,
1455 value.to_glib_none_mut().0,
1456 );
1457 value.get().unwrap()
1458 }
1459 }
1460
1461 fn set_property_single_paragraph_mode(&self, single_paragraph_mode: bool) {
1462 unsafe {
1463 gobject_sys::g_object_set_property(
1464 self.to_glib_none().0 as *mut gobject_sys::GObject,
1465 b"single-paragraph-mode\0".as_ptr() as *const _,
1466 Value::from(&single_paragraph_mode).to_glib_none().0,
1467 );
1468 }
1469 }
1470
1471 fn get_property_size(&self) -> i32 {
1472 unsafe {
1473 let mut value = Value::from_type(<i32 as StaticType>::static_type());
1474 gobject_sys::g_object_get_property(
1475 self.to_glib_none().0 as *mut gobject_sys::GObject,
1476 b"size\0".as_ptr() as *const _,
1477 value.to_glib_none_mut().0,
1478 );
1479 value.get().unwrap()
1480 }
1481 }
1482
1483 fn set_property_size(&self, size: i32) {
1484 unsafe {
1485 gobject_sys::g_object_set_property(
1486 self.to_glib_none().0 as *mut gobject_sys::GObject,
1487 b"size\0".as_ptr() as *const _,
1488 Value::from(&size).to_glib_none().0,
1489 );
1490 }
1491 }
1492
1493 fn get_property_size_points(&self) -> f64 {
1494 unsafe {
1495 let mut value = Value::from_type(<f64 as StaticType>::static_type());
1496 gobject_sys::g_object_get_property(
1497 self.to_glib_none().0 as *mut gobject_sys::GObject,
1498 b"size-points\0".as_ptr() as *const _,
1499 value.to_glib_none_mut().0,
1500 );
1501 value.get().unwrap()
1502 }
1503 }
1504
1505 fn set_property_size_points(&self, size_points: f64) {
1506 unsafe {
1507 gobject_sys::g_object_set_property(
1508 self.to_glib_none().0 as *mut gobject_sys::GObject,
1509 b"size-points\0".as_ptr() as *const _,
1510 Value::from(&size_points).to_glib_none().0,
1511 );
1512 }
1513 }
1514
1515 fn get_property_size_set(&self) -> bool {
1516 unsafe {
1517 let mut value = Value::from_type(<bool as StaticType>::static_type());
1518 gobject_sys::g_object_get_property(
1519 self.to_glib_none().0 as *mut gobject_sys::GObject,
1520 b"size-set\0".as_ptr() as *const _,
1521 value.to_glib_none_mut().0,
1522 );
1523 value.get().unwrap()
1524 }
1525 }
1526
1527 fn set_property_size_set(&self, size_set: bool) {
1528 unsafe {
1529 gobject_sys::g_object_set_property(
1530 self.to_glib_none().0 as *mut gobject_sys::GObject,
1531 b"size-set\0".as_ptr() as *const _,
1532 Value::from(&size_set).to_glib_none().0,
1533 );
1534 }
1535 }
1536
1537 fn get_property_stretch(&self) -> pango::Stretch {
1538 unsafe {
1539 let mut value = Value::from_type(<pango::Stretch as StaticType>::static_type());
1540 gobject_sys::g_object_get_property(
1541 self.to_glib_none().0 as *mut gobject_sys::GObject,
1542 b"stretch\0".as_ptr() as *const _,
1543 value.to_glib_none_mut().0,
1544 );
1545 value.get().unwrap()
1546 }
1547 }
1548
1549 fn set_property_stretch(&self, stretch: pango::Stretch) {
1550 unsafe {
1551 gobject_sys::g_object_set_property(
1552 self.to_glib_none().0 as *mut gobject_sys::GObject,
1553 b"stretch\0".as_ptr() as *const _,
1554 Value::from(&stretch).to_glib_none().0,
1555 );
1556 }
1557 }
1558
1559 fn get_property_stretch_set(&self) -> bool {
1560 unsafe {
1561 let mut value = Value::from_type(<bool as StaticType>::static_type());
1562 gobject_sys::g_object_get_property(
1563 self.to_glib_none().0 as *mut gobject_sys::GObject,
1564 b"stretch-set\0".as_ptr() as *const _,
1565 value.to_glib_none_mut().0,
1566 );
1567 value.get().unwrap()
1568 }
1569 }
1570
1571 fn set_property_stretch_set(&self, stretch_set: bool) {
1572 unsafe {
1573 gobject_sys::g_object_set_property(
1574 self.to_glib_none().0 as *mut gobject_sys::GObject,
1575 b"stretch-set\0".as_ptr() as *const _,
1576 Value::from(&stretch_set).to_glib_none().0,
1577 );
1578 }
1579 }
1580
1581 fn get_property_strikethrough(&self) -> bool {
1582 unsafe {
1583 let mut value = Value::from_type(<bool as StaticType>::static_type());
1584 gobject_sys::g_object_get_property(
1585 self.to_glib_none().0 as *mut gobject_sys::GObject,
1586 b"strikethrough\0".as_ptr() as *const _,
1587 value.to_glib_none_mut().0,
1588 );
1589 value.get().unwrap()
1590 }
1591 }
1592
1593 fn set_property_strikethrough(&self, strikethrough: bool) {
1594 unsafe {
1595 gobject_sys::g_object_set_property(
1596 self.to_glib_none().0 as *mut gobject_sys::GObject,
1597 b"strikethrough\0".as_ptr() as *const _,
1598 Value::from(&strikethrough).to_glib_none().0,
1599 );
1600 }
1601 }
1602
1603 fn get_property_strikethrough_set(&self) -> bool {
1604 unsafe {
1605 let mut value = Value::from_type(<bool as StaticType>::static_type());
1606 gobject_sys::g_object_get_property(
1607 self.to_glib_none().0 as *mut gobject_sys::GObject,
1608 b"strikethrough-set\0".as_ptr() as *const _,
1609 value.to_glib_none_mut().0,
1610 );
1611 value.get().unwrap()
1612 }
1613 }
1614
1615 fn set_property_strikethrough_set(&self, strikethrough_set: bool) {
1616 unsafe {
1617 gobject_sys::g_object_set_property(
1618 self.to_glib_none().0 as *mut gobject_sys::GObject,
1619 b"strikethrough-set\0".as_ptr() as *const _,
1620 Value::from(&strikethrough_set).to_glib_none().0,
1621 );
1622 }
1623 }
1624
1625 fn get_property_style(&self) -> pango::Style {
1626 unsafe {
1627 let mut value = Value::from_type(<pango::Style as StaticType>::static_type());
1628 gobject_sys::g_object_get_property(
1629 self.to_glib_none().0 as *mut gobject_sys::GObject,
1630 b"style\0".as_ptr() as *const _,
1631 value.to_glib_none_mut().0,
1632 );
1633 value.get().unwrap()
1634 }
1635 }
1636
1637 fn set_property_style(&self, style: pango::Style) {
1638 unsafe {
1639 gobject_sys::g_object_set_property(
1640 self.to_glib_none().0 as *mut gobject_sys::GObject,
1641 b"style\0".as_ptr() as *const _,
1642 Value::from(&style).to_glib_none().0,
1643 );
1644 }
1645 }
1646
1647 fn get_property_style_set(&self) -> bool {
1648 unsafe {
1649 let mut value = Value::from_type(<bool as StaticType>::static_type());
1650 gobject_sys::g_object_get_property(
1651 self.to_glib_none().0 as *mut gobject_sys::GObject,
1652 b"style-set\0".as_ptr() as *const _,
1653 value.to_glib_none_mut().0,
1654 );
1655 value.get().unwrap()
1656 }
1657 }
1658
1659 fn set_property_style_set(&self, style_set: bool) {
1660 unsafe {
1661 gobject_sys::g_object_set_property(
1662 self.to_glib_none().0 as *mut gobject_sys::GObject,
1663 b"style-set\0".as_ptr() as *const _,
1664 Value::from(&style_set).to_glib_none().0,
1665 );
1666 }
1667 }
1668
1669 fn get_property_text(&self) -> Option<GString> {
1670 unsafe {
1671 let mut value = Value::from_type(<GString as StaticType>::static_type());
1672 gobject_sys::g_object_get_property(
1673 self.to_glib_none().0 as *mut gobject_sys::GObject,
1674 b"text\0".as_ptr() as *const _,
1675 value.to_glib_none_mut().0,
1676 );
1677 value.get()
1678 }
1679 }
1680
1681 fn set_property_text(&self, text: Option<&str>) {
1682 unsafe {
1683 gobject_sys::g_object_set_property(
1684 self.to_glib_none().0 as *mut gobject_sys::GObject,
1685 b"text\0".as_ptr() as *const _,
1686 Value::from(text).to_glib_none().0,
1687 );
1688 }
1689 }
1690
1691 fn get_property_underline(&self) -> pango::Underline {
1692 unsafe {
1693 let mut value = Value::from_type(<pango::Underline as StaticType>::static_type());
1694 gobject_sys::g_object_get_property(
1695 self.to_glib_none().0 as *mut gobject_sys::GObject,
1696 b"underline\0".as_ptr() as *const _,
1697 value.to_glib_none_mut().0,
1698 );
1699 value.get().unwrap()
1700 }
1701 }
1702
1703 fn set_property_underline(&self, underline: pango::Underline) {
1704 unsafe {
1705 gobject_sys::g_object_set_property(
1706 self.to_glib_none().0 as *mut gobject_sys::GObject,
1707 b"underline\0".as_ptr() as *const _,
1708 Value::from(&underline).to_glib_none().0,
1709 );
1710 }
1711 }
1712
1713 fn get_property_underline_set(&self) -> bool {
1714 unsafe {
1715 let mut value = Value::from_type(<bool as StaticType>::static_type());
1716 gobject_sys::g_object_get_property(
1717 self.to_glib_none().0 as *mut gobject_sys::GObject,
1718 b"underline-set\0".as_ptr() as *const _,
1719 value.to_glib_none_mut().0,
1720 );
1721 value.get().unwrap()
1722 }
1723 }
1724
1725 fn set_property_underline_set(&self, underline_set: bool) {
1726 unsafe {
1727 gobject_sys::g_object_set_property(
1728 self.to_glib_none().0 as *mut gobject_sys::GObject,
1729 b"underline-set\0".as_ptr() as *const _,
1730 Value::from(&underline_set).to_glib_none().0,
1731 );
1732 }
1733 }
1734
1735 fn get_property_variant(&self) -> pango::Variant {
1736 unsafe {
1737 let mut value = Value::from_type(<pango::Variant as StaticType>::static_type());
1738 gobject_sys::g_object_get_property(
1739 self.to_glib_none().0 as *mut gobject_sys::GObject,
1740 b"variant\0".as_ptr() as *const _,
1741 value.to_glib_none_mut().0,
1742 );
1743 value.get().unwrap()
1744 }
1745 }
1746
1747 fn set_property_variant(&self, variant: pango::Variant) {
1748 unsafe {
1749 gobject_sys::g_object_set_property(
1750 self.to_glib_none().0 as *mut gobject_sys::GObject,
1751 b"variant\0".as_ptr() as *const _,
1752 Value::from(&variant).to_glib_none().0,
1753 );
1754 }
1755 }
1756
1757 fn get_property_variant_set(&self) -> bool {
1758 unsafe {
1759 let mut value = Value::from_type(<bool as StaticType>::static_type());
1760 gobject_sys::g_object_get_property(
1761 self.to_glib_none().0 as *mut gobject_sys::GObject,
1762 b"variant-set\0".as_ptr() as *const _,
1763 value.to_glib_none_mut().0,
1764 );
1765 value.get().unwrap()
1766 }
1767 }
1768
1769 fn set_property_variant_set(&self, variant_set: bool) {
1770 unsafe {
1771 gobject_sys::g_object_set_property(
1772 self.to_glib_none().0 as *mut gobject_sys::GObject,
1773 b"variant-set\0".as_ptr() as *const _,
1774 Value::from(&variant_set).to_glib_none().0,
1775 );
1776 }
1777 }
1778
1779 fn get_property_weight(&self) -> i32 {
1780 unsafe {
1781 let mut value = Value::from_type(<i32 as StaticType>::static_type());
1782 gobject_sys::g_object_get_property(
1783 self.to_glib_none().0 as *mut gobject_sys::GObject,
1784 b"weight\0".as_ptr() as *const _,
1785 value.to_glib_none_mut().0,
1786 );
1787 value.get().unwrap()
1788 }
1789 }
1790
1791 fn set_property_weight(&self, weight: i32) {
1792 unsafe {
1793 gobject_sys::g_object_set_property(
1794 self.to_glib_none().0 as *mut gobject_sys::GObject,
1795 b"weight\0".as_ptr() as *const _,
1796 Value::from(&weight).to_glib_none().0,
1797 );
1798 }
1799 }
1800
1801 fn get_property_weight_set(&self) -> bool {
1802 unsafe {
1803 let mut value = Value::from_type(<bool as StaticType>::static_type());
1804 gobject_sys::g_object_get_property(
1805 self.to_glib_none().0 as *mut gobject_sys::GObject,
1806 b"weight-set\0".as_ptr() as *const _,
1807 value.to_glib_none_mut().0,
1808 );
1809 value.get().unwrap()
1810 }
1811 }
1812
1813 fn set_property_weight_set(&self, weight_set: bool) {
1814 unsafe {
1815 gobject_sys::g_object_set_property(
1816 self.to_glib_none().0 as *mut gobject_sys::GObject,
1817 b"weight-set\0".as_ptr() as *const _,
1818 Value::from(&weight_set).to_glib_none().0,
1819 );
1820 }
1821 }
1822
1823 fn get_property_width_chars(&self) -> i32 {
1824 unsafe {
1825 let mut value = Value::from_type(<i32 as StaticType>::static_type());
1826 gobject_sys::g_object_get_property(
1827 self.to_glib_none().0 as *mut gobject_sys::GObject,
1828 b"width-chars\0".as_ptr() as *const _,
1829 value.to_glib_none_mut().0,
1830 );
1831 value.get().unwrap()
1832 }
1833 }
1834
1835 fn set_property_width_chars(&self, width_chars: i32) {
1836 unsafe {
1837 gobject_sys::g_object_set_property(
1838 self.to_glib_none().0 as *mut gobject_sys::GObject,
1839 b"width-chars\0".as_ptr() as *const _,
1840 Value::from(&width_chars).to_glib_none().0,
1841 );
1842 }
1843 }
1844
1845 fn get_property_wrap_mode(&self) -> pango::WrapMode {
1846 unsafe {
1847 let mut value = Value::from_type(<pango::WrapMode as StaticType>::static_type());
1848 gobject_sys::g_object_get_property(
1849 self.to_glib_none().0 as *mut gobject_sys::GObject,
1850 b"wrap-mode\0".as_ptr() as *const _,
1851 value.to_glib_none_mut().0,
1852 );
1853 value.get().unwrap()
1854 }
1855 }
1856
1857 fn set_property_wrap_mode(&self, wrap_mode: pango::WrapMode) {
1858 unsafe {
1859 gobject_sys::g_object_set_property(
1860 self.to_glib_none().0 as *mut gobject_sys::GObject,
1861 b"wrap-mode\0".as_ptr() as *const _,
1862 Value::from(&wrap_mode).to_glib_none().0,
1863 );
1864 }
1865 }
1866
1867 fn get_property_wrap_width(&self) -> i32 {
1868 unsafe {
1869 let mut value = Value::from_type(<i32 as StaticType>::static_type());
1870 gobject_sys::g_object_get_property(
1871 self.to_glib_none().0 as *mut gobject_sys::GObject,
1872 b"wrap-width\0".as_ptr() as *const _,
1873 value.to_glib_none_mut().0,
1874 );
1875 value.get().unwrap()
1876 }
1877 }
1878
1879 fn set_property_wrap_width(&self, wrap_width: i32) {
1880 unsafe {
1881 gobject_sys::g_object_set_property(
1882 self.to_glib_none().0 as *mut gobject_sys::GObject,
1883 b"wrap-width\0".as_ptr() as *const _,
1884 Value::from(&wrap_width).to_glib_none().0,
1885 );
1886 }
1887 }
1888
1889 fn connect_edited<F: Fn(&Self, TreePath, &str) + 'static>(&self, f: F) -> SignalHandlerId {
1890 unsafe extern "C" fn edited_trampoline<P, F: Fn(&P, TreePath, &str) + 'static>(
1891 this: *mut gtk_sys::GtkCellRendererText,
1892 path: *mut libc::c_char,
1893 new_text: *mut libc::c_char,
1894 f: glib_sys::gpointer,
1895 ) where
1896 P: IsA<CellRendererText>,
1897 {
1898 let f: &F = &*(f as *const F);
1899 let path = from_glib_full(gtk_sys::gtk_tree_path_new_from_string(path));
1900 f(
1901 &CellRendererText::from_glib_borrow(this).unsafe_cast(),
1902 path,
1903 &GString::from_glib_borrow(new_text),
1904 )
1905 }
1906 unsafe {
1907 let f: Box_<F> = Box_::new(f);
1908 connect_raw(
1909 self.as_ptr() as *mut _,
1910 b"edited\0".as_ptr() as *const _,
1911 Some(transmute(edited_trampoline::<Self, F> as usize)),
1912 Box_::into_raw(f),
1913 )
1914 }
1915 }
1916
1917 fn connect_property_align_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1918 unsafe extern "C" fn notify_align_set_trampoline<P, F: Fn(&P) + 'static>(
1919 this: *mut gtk_sys::GtkCellRendererText,
1920 _param_spec: glib_sys::gpointer,
1921 f: glib_sys::gpointer,
1922 ) where
1923 P: IsA<CellRendererText>,
1924 {
1925 let f: &F = &*(f as *const F);
1926 f(&CellRendererText::from_glib_borrow(this).unsafe_cast())
1927 }
1928 unsafe {
1929 let f: Box_<F> = Box_::new(f);
1930 connect_raw(
1931 self.as_ptr() as *mut _,
1932 b"notify::align-set\0".as_ptr() as *const _,
1933 Some(transmute(notify_align_set_trampoline::<Self, F> as usize)),
1934 Box_::into_raw(f),
1935 )
1936 }
1937 }
1938
1939 fn connect_property_alignment_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1940 unsafe extern "C" fn notify_alignment_trampoline<P, F: Fn(&P) + 'static>(
1941 this: *mut gtk_sys::GtkCellRendererText,
1942 _param_spec: glib_sys::gpointer,
1943 f: glib_sys::gpointer,
1944 ) where
1945 P: IsA<CellRendererText>,
1946 {
1947 let f: &F = &*(f as *const F);
1948 f(&CellRendererText::from_glib_borrow(this).unsafe_cast())
1949 }
1950 unsafe {
1951 let f: Box_<F> = Box_::new(f);
1952 connect_raw(
1953 self.as_ptr() as *mut _,
1954 b"notify::alignment\0".as_ptr() as *const _,
1955 Some(transmute(notify_alignment_trampoline::<Self, F> as usize)),
1956 Box_::into_raw(f),
1957 )
1958 }
1959 }
1960
1961 fn connect_property_background_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1962 unsafe extern "C" fn notify_background_trampoline<P, F: Fn(&P) + 'static>(
1963 this: *mut gtk_sys::GtkCellRendererText,
1964 _param_spec: glib_sys::gpointer,
1965 f: glib_sys::gpointer,
1966 ) where
1967 P: IsA<CellRendererText>,
1968 {
1969 let f: &F = &*(f as *const F);
1970 f(&CellRendererText::from_glib_borrow(this).unsafe_cast())
1971 }
1972 unsafe {
1973 let f: Box_<F> = Box_::new(f);
1974 connect_raw(
1975 self.as_ptr() as *mut _,
1976 b"notify::background\0".as_ptr() as *const _,
1977 Some(transmute(notify_background_trampoline::<Self, F> as usize)),
1978 Box_::into_raw(f),
1979 )
1980 }
1981 }
1982
1983 fn connect_property_background_rgba_notify<F: Fn(&Self) + 'static>(
1984 &self,
1985 f: F,
1986 ) -> SignalHandlerId {
1987 unsafe extern "C" fn notify_background_rgba_trampoline<P, F: Fn(&P) + 'static>(
1988 this: *mut gtk_sys::GtkCellRendererText,
1989 _param_spec: glib_sys::gpointer,
1990 f: glib_sys::gpointer,
1991 ) where
1992 P: IsA<CellRendererText>,
1993 {
1994 let f: &F = &*(f as *const F);
1995 f(&CellRendererText::from_glib_borrow(this).unsafe_cast())
1996 }
1997 unsafe {
1998 let f: Box_<F> = Box_::new(f);
1999 connect_raw(
2000 self.as_ptr() as *mut _,
2001 b"notify::background-rgba\0".as_ptr() as *const _,
2002 Some(transmute(
2003 notify_background_rgba_trampoline::<Self, F> as usize,
2004 )),
2005 Box_::into_raw(f),
2006 )
2007 }
2008 }
2009
2010 fn connect_property_background_set_notify<F: Fn(&Self) + 'static>(
2011 &self,
2012 f: F,
2013 ) -> SignalHandlerId {
2014 unsafe extern "C" fn notify_background_set_trampoline<P, F: Fn(&P) + 'static>(
2015 this: *mut gtk_sys::GtkCellRendererText,
2016 _param_spec: glib_sys::gpointer,
2017 f: glib_sys::gpointer,
2018 ) where
2019 P: IsA<CellRendererText>,
2020 {
2021 let f: &F = &*(f as *const F);
2022 f(&CellRendererText::from_glib_borrow(this).unsafe_cast())
2023 }
2024 unsafe {
2025 let f: Box_<F> = Box_::new(f);
2026 connect_raw(
2027 self.as_ptr() as *mut _,
2028 b"notify::background-set\0".as_ptr() as *const _,
2029 Some(transmute(
2030 notify_background_set_trampoline::<Self, F> as usize,
2031 )),
2032 Box_::into_raw(f),
2033 )
2034 }
2035 }
2036
2037 fn connect_property_editable_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2038 unsafe extern "C" fn notify_editable_trampoline<P, F: Fn(&P) + 'static>(
2039 this: *mut gtk_sys::GtkCellRendererText,
2040 _param_spec: glib_sys::gpointer,
2041 f: glib_sys::gpointer,
2042 ) where
2043 P: IsA<CellRendererText>,
2044 {
2045 let f: &F = &*(f as *const F);
2046 f(&CellRendererText::from_glib_borrow(this).unsafe_cast())
2047 }
2048 unsafe {
2049 let f: Box_<F> = Box_::new(f);
2050 connect_raw(
2051 self.as_ptr() as *mut _,
2052 b"notify::editable\0".as_ptr() as *const _,
2053 Some(transmute(notify_editable_trampoline::<Self, F> as usize)),
2054 Box_::into_raw(f),
2055 )
2056 }
2057 }
2058
2059 fn connect_property_editable_set_notify<F: Fn(&Self) + 'static>(
2060 &self,
2061 f: F,
2062 ) -> SignalHandlerId {
2063 unsafe extern "C" fn notify_editable_set_trampoline<P, F: Fn(&P) + 'static>(
2064 this: *mut gtk_sys::GtkCellRendererText,
2065 _param_spec: glib_sys::gpointer,
2066 f: glib_sys::gpointer,
2067 ) where
2068 P: IsA<CellRendererText>,
2069 {
2070 let f: &F = &*(f as *const F);
2071 f(&CellRendererText::from_glib_borrow(this).unsafe_cast())
2072 }
2073 unsafe {
2074 let f: Box_<F> = Box_::new(f);
2075 connect_raw(
2076 self.as_ptr() as *mut _,
2077 b"notify::editable-set\0".as_ptr() as *const _,
2078 Some(transmute(
2079 notify_editable_set_trampoline::<Self, F> as usize,
2080 )),
2081 Box_::into_raw(f),
2082 )
2083 }
2084 }
2085
2086 fn connect_property_ellipsize_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2087 unsafe extern "C" fn notify_ellipsize_trampoline<P, F: Fn(&P) + 'static>(
2088 this: *mut gtk_sys::GtkCellRendererText,
2089 _param_spec: glib_sys::gpointer,
2090 f: glib_sys::gpointer,
2091 ) where
2092 P: IsA<CellRendererText>,
2093 {
2094 let f: &F = &*(f as *const F);
2095 f(&CellRendererText::from_glib_borrow(this).unsafe_cast())
2096 }
2097 unsafe {
2098 let f: Box_<F> = Box_::new(f);
2099 connect_raw(
2100 self.as_ptr() as *mut _,
2101 b"notify::ellipsize\0".as_ptr() as *const _,
2102 Some(transmute(notify_ellipsize_trampoline::<Self, F> as usize)),
2103 Box_::into_raw(f),
2104 )
2105 }
2106 }
2107
2108 fn connect_property_ellipsize_set_notify<F: Fn(&Self) + 'static>(
2109 &self,
2110 f: F,
2111 ) -> SignalHandlerId {
2112 unsafe extern "C" fn notify_ellipsize_set_trampoline<P, F: Fn(&P) + 'static>(
2113 this: *mut gtk_sys::GtkCellRendererText,
2114 _param_spec: glib_sys::gpointer,
2115 f: glib_sys::gpointer,
2116 ) where
2117 P: IsA<CellRendererText>,
2118 {
2119 let f: &F = &*(f as *const F);
2120 f(&CellRendererText::from_glib_borrow(this).unsafe_cast())
2121 }
2122 unsafe {
2123 let f: Box_<F> = Box_::new(f);
2124 connect_raw(
2125 self.as_ptr() as *mut _,
2126 b"notify::ellipsize-set\0".as_ptr() as *const _,
2127 Some(transmute(
2128 notify_ellipsize_set_trampoline::<Self, F> as usize,
2129 )),
2130 Box_::into_raw(f),
2131 )
2132 }
2133 }
2134
2135 fn connect_property_family_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2136 unsafe extern "C" fn notify_family_trampoline<P, F: Fn(&P) + 'static>(
2137 this: *mut gtk_sys::GtkCellRendererText,
2138 _param_spec: glib_sys::gpointer,
2139 f: glib_sys::gpointer,
2140 ) where
2141 P: IsA<CellRendererText>,
2142 {
2143 let f: &F = &*(f as *const F);
2144 f(&CellRendererText::from_glib_borrow(this).unsafe_cast())
2145 }
2146 unsafe {
2147 let f: Box_<F> = Box_::new(f);
2148 connect_raw(
2149 self.as_ptr() as *mut _,
2150 b"notify::family\0".as_ptr() as *const _,
2151 Some(transmute(notify_family_trampoline::<Self, F> as usize)),
2152 Box_::into_raw(f),
2153 )
2154 }
2155 }
2156
2157 fn connect_property_family_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2158 unsafe extern "C" fn notify_family_set_trampoline<P, F: Fn(&P) + 'static>(
2159 this: *mut gtk_sys::GtkCellRendererText,
2160 _param_spec: glib_sys::gpointer,
2161 f: glib_sys::gpointer,
2162 ) where
2163 P: IsA<CellRendererText>,
2164 {
2165 let f: &F = &*(f as *const F);
2166 f(&CellRendererText::from_glib_borrow(this).unsafe_cast())
2167 }
2168 unsafe {
2169 let f: Box_<F> = Box_::new(f);
2170 connect_raw(
2171 self.as_ptr() as *mut _,
2172 b"notify::family-set\0".as_ptr() as *const _,
2173 Some(transmute(notify_family_set_trampoline::<Self, F> as usize)),
2174 Box_::into_raw(f),
2175 )
2176 }
2177 }
2178
2179 fn connect_property_font_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2180 unsafe extern "C" fn notify_font_trampoline<P, F: Fn(&P) + 'static>(
2181 this: *mut gtk_sys::GtkCellRendererText,
2182 _param_spec: glib_sys::gpointer,
2183 f: glib_sys::gpointer,
2184 ) where
2185 P: IsA<CellRendererText>,
2186 {
2187 let f: &F = &*(f as *const F);
2188 f(&CellRendererText::from_glib_borrow(this).unsafe_cast())
2189 }
2190 unsafe {
2191 let f: Box_<F> = Box_::new(f);
2192 connect_raw(
2193 self.as_ptr() as *mut _,
2194 b"notify::font\0".as_ptr() as *const _,
2195 Some(transmute(notify_font_trampoline::<Self, F> as usize)),
2196 Box_::into_raw(f),
2197 )
2198 }
2199 }
2200
2201 fn connect_property_foreground_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2202 unsafe extern "C" fn notify_foreground_trampoline<P, F: Fn(&P) + 'static>(
2203 this: *mut gtk_sys::GtkCellRendererText,
2204 _param_spec: glib_sys::gpointer,
2205 f: glib_sys::gpointer,
2206 ) where
2207 P: IsA<CellRendererText>,
2208 {
2209 let f: &F = &*(f as *const F);
2210 f(&CellRendererText::from_glib_borrow(this).unsafe_cast())
2211 }
2212 unsafe {
2213 let f: Box_<F> = Box_::new(f);
2214 connect_raw(
2215 self.as_ptr() as *mut _,
2216 b"notify::foreground\0".as_ptr() as *const _,
2217 Some(transmute(notify_foreground_trampoline::<Self, F> as usize)),
2218 Box_::into_raw(f),
2219 )
2220 }
2221 }
2222
2223 fn connect_property_foreground_rgba_notify<F: Fn(&Self) + 'static>(
2224 &self,
2225 f: F,
2226 ) -> SignalHandlerId {
2227 unsafe extern "C" fn notify_foreground_rgba_trampoline<P, F: Fn(&P) + 'static>(
2228 this: *mut gtk_sys::GtkCellRendererText,
2229 _param_spec: glib_sys::gpointer,
2230 f: glib_sys::gpointer,
2231 ) where
2232 P: IsA<CellRendererText>,
2233 {
2234 let f: &F = &*(f as *const F);
2235 f(&CellRendererText::from_glib_borrow(this).unsafe_cast())
2236 }
2237 unsafe {
2238 let f: Box_<F> = Box_::new(f);
2239 connect_raw(
2240 self.as_ptr() as *mut _,
2241 b"notify::foreground-rgba\0".as_ptr() as *const _,
2242 Some(transmute(
2243 notify_foreground_rgba_trampoline::<Self, F> as usize,
2244 )),
2245 Box_::into_raw(f),
2246 )
2247 }
2248 }
2249
2250 fn connect_property_foreground_set_notify<F: Fn(&Self) + 'static>(
2251 &self,
2252 f: F,
2253 ) -> SignalHandlerId {
2254 unsafe extern "C" fn notify_foreground_set_trampoline<P, F: Fn(&P) + 'static>(
2255 this: *mut gtk_sys::GtkCellRendererText,
2256 _param_spec: glib_sys::gpointer,
2257 f: glib_sys::gpointer,
2258 ) where
2259 P: IsA<CellRendererText>,
2260 {
2261 let f: &F = &*(f as *const F);
2262 f(&CellRendererText::from_glib_borrow(this).unsafe_cast())
2263 }
2264 unsafe {
2265 let f: Box_<F> = Box_::new(f);
2266 connect_raw(
2267 self.as_ptr() as *mut _,
2268 b"notify::foreground-set\0".as_ptr() as *const _,
2269 Some(transmute(
2270 notify_foreground_set_trampoline::<Self, F> as usize,
2271 )),
2272 Box_::into_raw(f),
2273 )
2274 }
2275 }
2276
2277 fn connect_property_language_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2278 unsafe extern "C" fn notify_language_trampoline<P, F: Fn(&P) + 'static>(
2279 this: *mut gtk_sys::GtkCellRendererText,
2280 _param_spec: glib_sys::gpointer,
2281 f: glib_sys::gpointer,
2282 ) where
2283 P: IsA<CellRendererText>,
2284 {
2285 let f: &F = &*(f as *const F);
2286 f(&CellRendererText::from_glib_borrow(this).unsafe_cast())
2287 }
2288 unsafe {
2289 let f: Box_<F> = Box_::new(f);
2290 connect_raw(
2291 self.as_ptr() as *mut _,
2292 b"notify::language\0".as_ptr() as *const _,
2293 Some(transmute(notify_language_trampoline::<Self, F> as usize)),
2294 Box_::into_raw(f),
2295 )
2296 }
2297 }
2298
2299 fn connect_property_language_set_notify<F: Fn(&Self) + 'static>(
2300 &self,
2301 f: F,
2302 ) -> SignalHandlerId {
2303 unsafe extern "C" fn notify_language_set_trampoline<P, F: Fn(&P) + 'static>(
2304 this: *mut gtk_sys::GtkCellRendererText,
2305 _param_spec: glib_sys::gpointer,
2306 f: glib_sys::gpointer,
2307 ) where
2308 P: IsA<CellRendererText>,
2309 {
2310 let f: &F = &*(f as *const F);
2311 f(&CellRendererText::from_glib_borrow(this).unsafe_cast())
2312 }
2313 unsafe {
2314 let f: Box_<F> = Box_::new(f);
2315 connect_raw(
2316 self.as_ptr() as *mut _,
2317 b"notify::language-set\0".as_ptr() as *const _,
2318 Some(transmute(
2319 notify_language_set_trampoline::<Self, F> as usize,
2320 )),
2321 Box_::into_raw(f),
2322 )
2323 }
2324 }
2325
2326 fn connect_property_markup_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2327 unsafe extern "C" fn notify_markup_trampoline<P, F: Fn(&P) + 'static>(
2328 this: *mut gtk_sys::GtkCellRendererText,
2329 _param_spec: glib_sys::gpointer,
2330 f: glib_sys::gpointer,
2331 ) where
2332 P: IsA<CellRendererText>,
2333 {
2334 let f: &F = &*(f as *const F);
2335 f(&CellRendererText::from_glib_borrow(this).unsafe_cast())
2336 }
2337 unsafe {
2338 let f: Box_<F> = Box_::new(f);
2339 connect_raw(
2340 self.as_ptr() as *mut _,
2341 b"notify::markup\0".as_ptr() as *const _,
2342 Some(transmute(notify_markup_trampoline::<Self, F> as usize)),
2343 Box_::into_raw(f),
2344 )
2345 }
2346 }
2347
2348 fn connect_property_max_width_chars_notify<F: Fn(&Self) + 'static>(
2349 &self,
2350 f: F,
2351 ) -> SignalHandlerId {
2352 unsafe extern "C" fn notify_max_width_chars_trampoline<P, F: Fn(&P) + 'static>(
2353 this: *mut gtk_sys::GtkCellRendererText,
2354 _param_spec: glib_sys::gpointer,
2355 f: glib_sys::gpointer,
2356 ) where
2357 P: IsA<CellRendererText>,
2358 {
2359 let f: &F = &*(f as *const F);
2360 f(&CellRendererText::from_glib_borrow(this).unsafe_cast())
2361 }
2362 unsafe {
2363 let f: Box_<F> = Box_::new(f);
2364 connect_raw(
2365 self.as_ptr() as *mut _,
2366 b"notify::max-width-chars\0".as_ptr() as *const _,
2367 Some(transmute(
2368 notify_max_width_chars_trampoline::<Self, F> as usize,
2369 )),
2370 Box_::into_raw(f),
2371 )
2372 }
2373 }
2374
2375 fn connect_property_placeholder_text_notify<F: Fn(&Self) + 'static>(
2376 &self,
2377 f: F,
2378 ) -> SignalHandlerId {
2379 unsafe extern "C" fn notify_placeholder_text_trampoline<P, F: Fn(&P) + 'static>(
2380 this: *mut gtk_sys::GtkCellRendererText,
2381 _param_spec: glib_sys::gpointer,
2382 f: glib_sys::gpointer,
2383 ) where
2384 P: IsA<CellRendererText>,
2385 {
2386 let f: &F = &*(f as *const F);
2387 f(&CellRendererText::from_glib_borrow(this).unsafe_cast())
2388 }
2389 unsafe {
2390 let f: Box_<F> = Box_::new(f);
2391 connect_raw(
2392 self.as_ptr() as *mut _,
2393 b"notify::placeholder-text\0".as_ptr() as *const _,
2394 Some(transmute(
2395 notify_placeholder_text_trampoline::<Self, F> as usize,
2396 )),
2397 Box_::into_raw(f),
2398 )
2399 }
2400 }
2401
2402 fn connect_property_rise_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2403 unsafe extern "C" fn notify_rise_trampoline<P, F: Fn(&P) + 'static>(
2404 this: *mut gtk_sys::GtkCellRendererText,
2405 _param_spec: glib_sys::gpointer,
2406 f: glib_sys::gpointer,
2407 ) where
2408 P: IsA<CellRendererText>,
2409 {
2410 let f: &F = &*(f as *const F);
2411 f(&CellRendererText::from_glib_borrow(this).unsafe_cast())
2412 }
2413 unsafe {
2414 let f: Box_<F> = Box_::new(f);
2415 connect_raw(
2416 self.as_ptr() as *mut _,
2417 b"notify::rise\0".as_ptr() as *const _,
2418 Some(transmute(notify_rise_trampoline::<Self, F> as usize)),
2419 Box_::into_raw(f),
2420 )
2421 }
2422 }
2423
2424 fn connect_property_rise_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2425 unsafe extern "C" fn notify_rise_set_trampoline<P, F: Fn(&P) + 'static>(
2426 this: *mut gtk_sys::GtkCellRendererText,
2427 _param_spec: glib_sys::gpointer,
2428 f: glib_sys::gpointer,
2429 ) where
2430 P: IsA<CellRendererText>,
2431 {
2432 let f: &F = &*(f as *const F);
2433 f(&CellRendererText::from_glib_borrow(this).unsafe_cast())
2434 }
2435 unsafe {
2436 let f: Box_<F> = Box_::new(f);
2437 connect_raw(
2438 self.as_ptr() as *mut _,
2439 b"notify::rise-set\0".as_ptr() as *const _,
2440 Some(transmute(notify_rise_set_trampoline::<Self, F> as usize)),
2441 Box_::into_raw(f),
2442 )
2443 }
2444 }
2445
2446 fn connect_property_scale_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2447 unsafe extern "C" fn notify_scale_trampoline<P, F: Fn(&P) + 'static>(
2448 this: *mut gtk_sys::GtkCellRendererText,
2449 _param_spec: glib_sys::gpointer,
2450 f: glib_sys::gpointer,
2451 ) where
2452 P: IsA<CellRendererText>,
2453 {
2454 let f: &F = &*(f as *const F);
2455 f(&CellRendererText::from_glib_borrow(this).unsafe_cast())
2456 }
2457 unsafe {
2458 let f: Box_<F> = Box_::new(f);
2459 connect_raw(
2460 self.as_ptr() as *mut _,
2461 b"notify::scale\0".as_ptr() as *const _,
2462 Some(transmute(notify_scale_trampoline::<Self, F> as usize)),
2463 Box_::into_raw(f),
2464 )
2465 }
2466 }
2467
2468 fn connect_property_scale_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2469 unsafe extern "C" fn notify_scale_set_trampoline<P, F: Fn(&P) + 'static>(
2470 this: *mut gtk_sys::GtkCellRendererText,
2471 _param_spec: glib_sys::gpointer,
2472 f: glib_sys::gpointer,
2473 ) where
2474 P: IsA<CellRendererText>,
2475 {
2476 let f: &F = &*(f as *const F);
2477 f(&CellRendererText::from_glib_borrow(this).unsafe_cast())
2478 }
2479 unsafe {
2480 let f: Box_<F> = Box_::new(f);
2481 connect_raw(
2482 self.as_ptr() as *mut _,
2483 b"notify::scale-set\0".as_ptr() as *const _,
2484 Some(transmute(notify_scale_set_trampoline::<Self, F> as usize)),
2485 Box_::into_raw(f),
2486 )
2487 }
2488 }
2489
2490 fn connect_property_single_paragraph_mode_notify<F: Fn(&Self) + 'static>(
2491 &self,
2492 f: F,
2493 ) -> SignalHandlerId {
2494 unsafe extern "C" fn notify_single_paragraph_mode_trampoline<P, F: Fn(&P) + 'static>(
2495 this: *mut gtk_sys::GtkCellRendererText,
2496 _param_spec: glib_sys::gpointer,
2497 f: glib_sys::gpointer,
2498 ) where
2499 P: IsA<CellRendererText>,
2500 {
2501 let f: &F = &*(f as *const F);
2502 f(&CellRendererText::from_glib_borrow(this).unsafe_cast())
2503 }
2504 unsafe {
2505 let f: Box_<F> = Box_::new(f);
2506 connect_raw(
2507 self.as_ptr() as *mut _,
2508 b"notify::single-paragraph-mode\0".as_ptr() as *const _,
2509 Some(transmute(
2510 notify_single_paragraph_mode_trampoline::<Self, F> as usize,
2511 )),
2512 Box_::into_raw(f),
2513 )
2514 }
2515 }
2516
2517 fn connect_property_size_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2518 unsafe extern "C" fn notify_size_trampoline<P, F: Fn(&P) + 'static>(
2519 this: *mut gtk_sys::GtkCellRendererText,
2520 _param_spec: glib_sys::gpointer,
2521 f: glib_sys::gpointer,
2522 ) where
2523 P: IsA<CellRendererText>,
2524 {
2525 let f: &F = &*(f as *const F);
2526 f(&CellRendererText::from_glib_borrow(this).unsafe_cast())
2527 }
2528 unsafe {
2529 let f: Box_<F> = Box_::new(f);
2530 connect_raw(
2531 self.as_ptr() as *mut _,
2532 b"notify::size\0".as_ptr() as *const _,
2533 Some(transmute(notify_size_trampoline::<Self, F> as usize)),
2534 Box_::into_raw(f),
2535 )
2536 }
2537 }
2538
2539 fn connect_property_size_points_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2540 unsafe extern "C" fn notify_size_points_trampoline<P, F: Fn(&P) + 'static>(
2541 this: *mut gtk_sys::GtkCellRendererText,
2542 _param_spec: glib_sys::gpointer,
2543 f: glib_sys::gpointer,
2544 ) where
2545 P: IsA<CellRendererText>,
2546 {
2547 let f: &F = &*(f as *const F);
2548 f(&CellRendererText::from_glib_borrow(this).unsafe_cast())
2549 }
2550 unsafe {
2551 let f: Box_<F> = Box_::new(f);
2552 connect_raw(
2553 self.as_ptr() as *mut _,
2554 b"notify::size-points\0".as_ptr() as *const _,
2555 Some(transmute(notify_size_points_trampoline::<Self, F> as usize)),
2556 Box_::into_raw(f),
2557 )
2558 }
2559 }
2560
2561 fn connect_property_size_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2562 unsafe extern "C" fn notify_size_set_trampoline<P, F: Fn(&P) + 'static>(
2563 this: *mut gtk_sys::GtkCellRendererText,
2564 _param_spec: glib_sys::gpointer,
2565 f: glib_sys::gpointer,
2566 ) where
2567 P: IsA<CellRendererText>,
2568 {
2569 let f: &F = &*(f as *const F);
2570 f(&CellRendererText::from_glib_borrow(this).unsafe_cast())
2571 }
2572 unsafe {
2573 let f: Box_<F> = Box_::new(f);
2574 connect_raw(
2575 self.as_ptr() as *mut _,
2576 b"notify::size-set\0".as_ptr() as *const _,
2577 Some(transmute(notify_size_set_trampoline::<Self, F> as usize)),
2578 Box_::into_raw(f),
2579 )
2580 }
2581 }
2582
2583 fn connect_property_stretch_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2584 unsafe extern "C" fn notify_stretch_trampoline<P, F: Fn(&P) + 'static>(
2585 this: *mut gtk_sys::GtkCellRendererText,
2586 _param_spec: glib_sys::gpointer,
2587 f: glib_sys::gpointer,
2588 ) where
2589 P: IsA<CellRendererText>,
2590 {
2591 let f: &F = &*(f as *const F);
2592 f(&CellRendererText::from_glib_borrow(this).unsafe_cast())
2593 }
2594 unsafe {
2595 let f: Box_<F> = Box_::new(f);
2596 connect_raw(
2597 self.as_ptr() as *mut _,
2598 b"notify::stretch\0".as_ptr() as *const _,
2599 Some(transmute(notify_stretch_trampoline::<Self, F> as usize)),
2600 Box_::into_raw(f),
2601 )
2602 }
2603 }
2604
2605 fn connect_property_stretch_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2606 unsafe extern "C" fn notify_stretch_set_trampoline<P, F: Fn(&P) + 'static>(
2607 this: *mut gtk_sys::GtkCellRendererText,
2608 _param_spec: glib_sys::gpointer,
2609 f: glib_sys::gpointer,
2610 ) where
2611 P: IsA<CellRendererText>,
2612 {
2613 let f: &F = &*(f as *const F);
2614 f(&CellRendererText::from_glib_borrow(this).unsafe_cast())
2615 }
2616 unsafe {
2617 let f: Box_<F> = Box_::new(f);
2618 connect_raw(
2619 self.as_ptr() as *mut _,
2620 b"notify::stretch-set\0".as_ptr() as *const _,
2621 Some(transmute(notify_stretch_set_trampoline::<Self, F> as usize)),
2622 Box_::into_raw(f),
2623 )
2624 }
2625 }
2626
2627 fn connect_property_strikethrough_notify<F: Fn(&Self) + 'static>(
2628 &self,
2629 f: F,
2630 ) -> SignalHandlerId {
2631 unsafe extern "C" fn notify_strikethrough_trampoline<P, F: Fn(&P) + 'static>(
2632 this: *mut gtk_sys::GtkCellRendererText,
2633 _param_spec: glib_sys::gpointer,
2634 f: glib_sys::gpointer,
2635 ) where
2636 P: IsA<CellRendererText>,
2637 {
2638 let f: &F = &*(f as *const F);
2639 f(&CellRendererText::from_glib_borrow(this).unsafe_cast())
2640 }
2641 unsafe {
2642 let f: Box_<F> = Box_::new(f);
2643 connect_raw(
2644 self.as_ptr() as *mut _,
2645 b"notify::strikethrough\0".as_ptr() as *const _,
2646 Some(transmute(
2647 notify_strikethrough_trampoline::<Self, F> as usize,
2648 )),
2649 Box_::into_raw(f),
2650 )
2651 }
2652 }
2653
2654 fn connect_property_strikethrough_set_notify<F: Fn(&Self) + 'static>(
2655 &self,
2656 f: F,
2657 ) -> SignalHandlerId {
2658 unsafe extern "C" fn notify_strikethrough_set_trampoline<P, F: Fn(&P) + 'static>(
2659 this: *mut gtk_sys::GtkCellRendererText,
2660 _param_spec: glib_sys::gpointer,
2661 f: glib_sys::gpointer,
2662 ) where
2663 P: IsA<CellRendererText>,
2664 {
2665 let f: &F = &*(f as *const F);
2666 f(&CellRendererText::from_glib_borrow(this).unsafe_cast())
2667 }
2668 unsafe {
2669 let f: Box_<F> = Box_::new(f);
2670 connect_raw(
2671 self.as_ptr() as *mut _,
2672 b"notify::strikethrough-set\0".as_ptr() as *const _,
2673 Some(transmute(
2674 notify_strikethrough_set_trampoline::<Self, F> as usize,
2675 )),
2676 Box_::into_raw(f),
2677 )
2678 }
2679 }
2680
2681 fn connect_property_style_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2682 unsafe extern "C" fn notify_style_trampoline<P, F: Fn(&P) + 'static>(
2683 this: *mut gtk_sys::GtkCellRendererText,
2684 _param_spec: glib_sys::gpointer,
2685 f: glib_sys::gpointer,
2686 ) where
2687 P: IsA<CellRendererText>,
2688 {
2689 let f: &F = &*(f as *const F);
2690 f(&CellRendererText::from_glib_borrow(this).unsafe_cast())
2691 }
2692 unsafe {
2693 let f: Box_<F> = Box_::new(f);
2694 connect_raw(
2695 self.as_ptr() as *mut _,
2696 b"notify::style\0".as_ptr() as *const _,
2697 Some(transmute(notify_style_trampoline::<Self, F> as usize)),
2698 Box_::into_raw(f),
2699 )
2700 }
2701 }
2702
2703 fn connect_property_style_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2704 unsafe extern "C" fn notify_style_set_trampoline<P, F: Fn(&P) + 'static>(
2705 this: *mut gtk_sys::GtkCellRendererText,
2706 _param_spec: glib_sys::gpointer,
2707 f: glib_sys::gpointer,
2708 ) where
2709 P: IsA<CellRendererText>,
2710 {
2711 let f: &F = &*(f as *const F);
2712 f(&CellRendererText::from_glib_borrow(this).unsafe_cast())
2713 }
2714 unsafe {
2715 let f: Box_<F> = Box_::new(f);
2716 connect_raw(
2717 self.as_ptr() as *mut _,
2718 b"notify::style-set\0".as_ptr() as *const _,
2719 Some(transmute(notify_style_set_trampoline::<Self, F> as usize)),
2720 Box_::into_raw(f),
2721 )
2722 }
2723 }
2724
2725 fn connect_property_text_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2726 unsafe extern "C" fn notify_text_trampoline<P, F: Fn(&P) + 'static>(
2727 this: *mut gtk_sys::GtkCellRendererText,
2728 _param_spec: glib_sys::gpointer,
2729 f: glib_sys::gpointer,
2730 ) where
2731 P: IsA<CellRendererText>,
2732 {
2733 let f: &F = &*(f as *const F);
2734 f(&CellRendererText::from_glib_borrow(this).unsafe_cast())
2735 }
2736 unsafe {
2737 let f: Box_<F> = Box_::new(f);
2738 connect_raw(
2739 self.as_ptr() as *mut _,
2740 b"notify::text\0".as_ptr() as *const _,
2741 Some(transmute(notify_text_trampoline::<Self, F> as usize)),
2742 Box_::into_raw(f),
2743 )
2744 }
2745 }
2746
2747 fn connect_property_underline_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2748 unsafe extern "C" fn notify_underline_trampoline<P, F: Fn(&P) + 'static>(
2749 this: *mut gtk_sys::GtkCellRendererText,
2750 _param_spec: glib_sys::gpointer,
2751 f: glib_sys::gpointer,
2752 ) where
2753 P: IsA<CellRendererText>,
2754 {
2755 let f: &F = &*(f as *const F);
2756 f(&CellRendererText::from_glib_borrow(this).unsafe_cast())
2757 }
2758 unsafe {
2759 let f: Box_<F> = Box_::new(f);
2760 connect_raw(
2761 self.as_ptr() as *mut _,
2762 b"notify::underline\0".as_ptr() as *const _,
2763 Some(transmute(notify_underline_trampoline::<Self, F> as usize)),
2764 Box_::into_raw(f),
2765 )
2766 }
2767 }
2768
2769 fn connect_property_underline_set_notify<F: Fn(&Self) + 'static>(
2770 &self,
2771 f: F,
2772 ) -> SignalHandlerId {
2773 unsafe extern "C" fn notify_underline_set_trampoline<P, F: Fn(&P) + 'static>(
2774 this: *mut gtk_sys::GtkCellRendererText,
2775 _param_spec: glib_sys::gpointer,
2776 f: glib_sys::gpointer,
2777 ) where
2778 P: IsA<CellRendererText>,
2779 {
2780 let f: &F = &*(f as *const F);
2781 f(&CellRendererText::from_glib_borrow(this).unsafe_cast())
2782 }
2783 unsafe {
2784 let f: Box_<F> = Box_::new(f);
2785 connect_raw(
2786 self.as_ptr() as *mut _,
2787 b"notify::underline-set\0".as_ptr() as *const _,
2788 Some(transmute(
2789 notify_underline_set_trampoline::<Self, F> as usize,
2790 )),
2791 Box_::into_raw(f),
2792 )
2793 }
2794 }
2795
2796 fn connect_property_variant_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2797 unsafe extern "C" fn notify_variant_trampoline<P, F: Fn(&P) + 'static>(
2798 this: *mut gtk_sys::GtkCellRendererText,
2799 _param_spec: glib_sys::gpointer,
2800 f: glib_sys::gpointer,
2801 ) where
2802 P: IsA<CellRendererText>,
2803 {
2804 let f: &F = &*(f as *const F);
2805 f(&CellRendererText::from_glib_borrow(this).unsafe_cast())
2806 }
2807 unsafe {
2808 let f: Box_<F> = Box_::new(f);
2809 connect_raw(
2810 self.as_ptr() as *mut _,
2811 b"notify::variant\0".as_ptr() as *const _,
2812 Some(transmute(notify_variant_trampoline::<Self, F> as usize)),
2813 Box_::into_raw(f),
2814 )
2815 }
2816 }
2817
2818 fn connect_property_variant_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2819 unsafe extern "C" fn notify_variant_set_trampoline<P, F: Fn(&P) + 'static>(
2820 this: *mut gtk_sys::GtkCellRendererText,
2821 _param_spec: glib_sys::gpointer,
2822 f: glib_sys::gpointer,
2823 ) where
2824 P: IsA<CellRendererText>,
2825 {
2826 let f: &F = &*(f as *const F);
2827 f(&CellRendererText::from_glib_borrow(this).unsafe_cast())
2828 }
2829 unsafe {
2830 let f: Box_<F> = Box_::new(f);
2831 connect_raw(
2832 self.as_ptr() as *mut _,
2833 b"notify::variant-set\0".as_ptr() as *const _,
2834 Some(transmute(notify_variant_set_trampoline::<Self, F> as usize)),
2835 Box_::into_raw(f),
2836 )
2837 }
2838 }
2839
2840 fn connect_property_weight_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2841 unsafe extern "C" fn notify_weight_trampoline<P, F: Fn(&P) + 'static>(
2842 this: *mut gtk_sys::GtkCellRendererText,
2843 _param_spec: glib_sys::gpointer,
2844 f: glib_sys::gpointer,
2845 ) where
2846 P: IsA<CellRendererText>,
2847 {
2848 let f: &F = &*(f as *const F);
2849 f(&CellRendererText::from_glib_borrow(this).unsafe_cast())
2850 }
2851 unsafe {
2852 let f: Box_<F> = Box_::new(f);
2853 connect_raw(
2854 self.as_ptr() as *mut _,
2855 b"notify::weight\0".as_ptr() as *const _,
2856 Some(transmute(notify_weight_trampoline::<Self, F> as usize)),
2857 Box_::into_raw(f),
2858 )
2859 }
2860 }
2861
2862 fn connect_property_weight_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2863 unsafe extern "C" fn notify_weight_set_trampoline<P, F: Fn(&P) + 'static>(
2864 this: *mut gtk_sys::GtkCellRendererText,
2865 _param_spec: glib_sys::gpointer,
2866 f: glib_sys::gpointer,
2867 ) where
2868 P: IsA<CellRendererText>,
2869 {
2870 let f: &F = &*(f as *const F);
2871 f(&CellRendererText::from_glib_borrow(this).unsafe_cast())
2872 }
2873 unsafe {
2874 let f: Box_<F> = Box_::new(f);
2875 connect_raw(
2876 self.as_ptr() as *mut _,
2877 b"notify::weight-set\0".as_ptr() as *const _,
2878 Some(transmute(notify_weight_set_trampoline::<Self, F> as usize)),
2879 Box_::into_raw(f),
2880 )
2881 }
2882 }
2883
2884 fn connect_property_width_chars_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2885 unsafe extern "C" fn notify_width_chars_trampoline<P, F: Fn(&P) + 'static>(
2886 this: *mut gtk_sys::GtkCellRendererText,
2887 _param_spec: glib_sys::gpointer,
2888 f: glib_sys::gpointer,
2889 ) where
2890 P: IsA<CellRendererText>,
2891 {
2892 let f: &F = &*(f as *const F);
2893 f(&CellRendererText::from_glib_borrow(this).unsafe_cast())
2894 }
2895 unsafe {
2896 let f: Box_<F> = Box_::new(f);
2897 connect_raw(
2898 self.as_ptr() as *mut _,
2899 b"notify::width-chars\0".as_ptr() as *const _,
2900 Some(transmute(notify_width_chars_trampoline::<Self, F> as usize)),
2901 Box_::into_raw(f),
2902 )
2903 }
2904 }
2905
2906 fn connect_property_wrap_mode_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2907 unsafe extern "C" fn notify_wrap_mode_trampoline<P, F: Fn(&P) + 'static>(
2908 this: *mut gtk_sys::GtkCellRendererText,
2909 _param_spec: glib_sys::gpointer,
2910 f: glib_sys::gpointer,
2911 ) where
2912 P: IsA<CellRendererText>,
2913 {
2914 let f: &F = &*(f as *const F);
2915 f(&CellRendererText::from_glib_borrow(this).unsafe_cast())
2916 }
2917 unsafe {
2918 let f: Box_<F> = Box_::new(f);
2919 connect_raw(
2920 self.as_ptr() as *mut _,
2921 b"notify::wrap-mode\0".as_ptr() as *const _,
2922 Some(transmute(notify_wrap_mode_trampoline::<Self, F> as usize)),
2923 Box_::into_raw(f),
2924 )
2925 }
2926 }
2927
2928 fn connect_property_wrap_width_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2929 unsafe extern "C" fn notify_wrap_width_trampoline<P, F: Fn(&P) + 'static>(
2930 this: *mut gtk_sys::GtkCellRendererText,
2931 _param_spec: glib_sys::gpointer,
2932 f: glib_sys::gpointer,
2933 ) where
2934 P: IsA<CellRendererText>,
2935 {
2936 let f: &F = &*(f as *const F);
2937 f(&CellRendererText::from_glib_borrow(this).unsafe_cast())
2938 }
2939 unsafe {
2940 let f: Box_<F> = Box_::new(f);
2941 connect_raw(
2942 self.as_ptr() as *mut _,
2943 b"notify::wrap-width\0".as_ptr() as *const _,
2944 Some(transmute(notify_wrap_width_trampoline::<Self, F> as usize)),
2945 Box_::into_raw(f),
2946 )
2947 }
2948 }
2949}
2950
2951impl fmt::Display for CellRendererText {
2952 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2953 write!(f, "CellRendererText")
2954 }
2955}