Skip to main content

gtk/auto/
cell_renderer_text.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 crate::{CellRenderer, CellRendererMode, TreePath, ffi};
6use glib::{
7    object::ObjectType as _,
8    prelude::*,
9    signal::{SignalHandlerId, connect_raw},
10    translate::*,
11};
12use std::boxed::Box as Box_;
13
14glib::wrapper! {
15    /// A [`CellRendererText`][crate::CellRendererText] renders a given text in its cell, using the font, color and
16    /// style information provided by its properties. The text will be ellipsized if it is
17    /// too long and the [`ellipsize`][struct@crate::CellRendererText#ellipsize] property allows it.
18    ///
19    /// If the [`mode`][struct@crate::CellRenderer#mode] is [`CellRendererMode::Editable`][crate::CellRendererMode::Editable],
20    /// the [`CellRendererText`][crate::CellRendererText] allows to edit its text using an entry.
21    ///
22    /// ## Properties
23    ///
24    ///
25    /// #### `align-set`
26    ///  Readable | Writable
27    ///
28    ///
29    /// #### `alignment`
30    ///  Specifies how to align the lines of text with respect to each other.
31    ///
32    /// Note that this property describes how to align the lines of text in
33    /// case there are several of them. The "xalign" property of [`CellRenderer`][crate::CellRenderer],
34    /// on the other hand, sets the horizontal alignment of the whole text.
35    ///
36    /// Readable | Writable
37    ///
38    ///
39    /// #### `attributes`
40    ///  Readable | Writable
41    ///
42    ///
43    /// #### `background`
44    ///  Writable
45    ///
46    ///
47    /// #### `background-gdk`
48    ///  Background color as a `GdkColor`
49    ///
50    /// Readable | Writable
51    ///
52    ///
53    /// #### `background-rgba`
54    ///  Background color as a [`gdk::RGBA`][crate::gdk::RGBA]
55    ///
56    /// Readable | Writable
57    ///
58    ///
59    /// #### `background-set`
60    ///  Readable | Writable
61    ///
62    ///
63    /// #### `editable`
64    ///  Readable | Writable
65    ///
66    ///
67    /// #### `editable-set`
68    ///  Readable | Writable
69    ///
70    ///
71    /// #### `ellipsize`
72    ///  Specifies the preferred place to ellipsize the string, if the cell renderer
73    /// does not have enough room to display the entire string. Setting it to
74    /// [`pango::EllipsizeMode::None`][crate::pango::EllipsizeMode::None] turns off ellipsizing. See the wrap-width property
75    /// for another way of making the text fit into a given width.
76    ///
77    /// Readable | Writable
78    ///
79    ///
80    /// #### `ellipsize-set`
81    ///  Readable | Writable
82    ///
83    ///
84    /// #### `family`
85    ///  Readable | Writable
86    ///
87    ///
88    /// #### `family-set`
89    ///  Readable | Writable
90    ///
91    ///
92    /// #### `font`
93    ///  Readable | Writable
94    ///
95    ///
96    /// #### `font-desc`
97    ///  Readable | Writable
98    ///
99    ///
100    /// #### `foreground`
101    ///  Writable
102    ///
103    ///
104    /// #### `foreground-gdk`
105    ///  Foreground color as a `GdkColor`
106    ///
107    /// Readable | Writable
108    ///
109    ///
110    /// #### `foreground-rgba`
111    ///  Foreground color as a [`gdk::RGBA`][crate::gdk::RGBA]
112    ///
113    /// Readable | Writable
114    ///
115    ///
116    /// #### `foreground-set`
117    ///  Readable | Writable
118    ///
119    ///
120    /// #### `language`
121    ///  Readable | Writable
122    ///
123    ///
124    /// #### `language-set`
125    ///  Readable | Writable
126    ///
127    ///
128    /// #### `markup`
129    ///  Writable
130    ///
131    ///
132    /// #### `max-width-chars`
133    ///  The desired maximum width of the cell, in characters. If this property
134    /// is set to -1, the width will be calculated automatically.
135    ///
136    /// For cell renderers that ellipsize or wrap text; this property
137    /// controls the maximum reported width of the cell. The
138    /// cell should not receive any greater allocation unless it is
139    /// set to expand in its [`CellLayout`][crate::CellLayout] and all of the cell's siblings
140    /// have received their natural width.
141    ///
142    /// Readable | Writable
143    ///
144    ///
145    /// #### `placeholder-text`
146    ///  The text that will be displayed in the [`CellRenderer`][crate::CellRenderer] if
147    /// [`editable`][struct@crate::CellRendererText#editable] is [`true`] and the cell is empty.
148    ///
149    /// Since 3.6
150    ///
151    /// Readable | Writable
152    ///
153    ///
154    /// #### `rise`
155    ///  Readable | Writable
156    ///
157    ///
158    /// #### `rise-set`
159    ///  Readable | Writable
160    ///
161    ///
162    /// #### `scale`
163    ///  Readable | Writable
164    ///
165    ///
166    /// #### `scale-set`
167    ///  Readable | Writable
168    ///
169    ///
170    /// #### `single-paragraph-mode`
171    ///  Readable | Writable
172    ///
173    ///
174    /// #### `size`
175    ///  Readable | Writable
176    ///
177    ///
178    /// #### `size-points`
179    ///  Readable | Writable
180    ///
181    ///
182    /// #### `size-set`
183    ///  Readable | Writable
184    ///
185    ///
186    /// #### `stretch`
187    ///  Readable | Writable
188    ///
189    ///
190    /// #### `stretch-set`
191    ///  Readable | Writable
192    ///
193    ///
194    /// #### `strikethrough`
195    ///  Readable | Writable
196    ///
197    ///
198    /// #### `strikethrough-set`
199    ///  Readable | Writable
200    ///
201    ///
202    /// #### `style`
203    ///  Readable | Writable
204    ///
205    ///
206    /// #### `style-set`
207    ///  Readable | Writable
208    ///
209    ///
210    /// #### `text`
211    ///  Readable | Writable
212    ///
213    ///
214    /// #### `underline`
215    ///  Readable | Writable
216    ///
217    ///
218    /// #### `underline-set`
219    ///  Readable | Writable
220    ///
221    ///
222    /// #### `variant`
223    ///  Readable | Writable
224    ///
225    ///
226    /// #### `variant-set`
227    ///  Readable | Writable
228    ///
229    ///
230    /// #### `weight`
231    ///  Readable | Writable
232    ///
233    ///
234    /// #### `weight-set`
235    ///  Readable | Writable
236    ///
237    ///
238    /// #### `width-chars`
239    ///  The desired width of the cell, in characters. If this property is set to
240    /// -1, the width will be calculated automatically, otherwise the cell will
241    /// request either 3 characters or the property value, whichever is greater.
242    ///
243    /// Readable | Writable
244    ///
245    ///
246    /// #### `wrap-mode`
247    ///  Specifies how to break the string into multiple lines, if the cell
248    /// renderer does not have enough room to display the entire string.
249    /// This property has no effect unless the wrap-width property is set.
250    ///
251    /// Readable | Writable
252    ///
253    ///
254    /// #### `wrap-width`
255    ///  Specifies the minimum width at which the text is wrapped. The wrap-mode property can
256    /// be used to influence at what character positions the line breaks can be placed.
257    /// Setting wrap-width to -1 turns wrapping off.
258    ///
259    /// Readable | Writable
260    /// <details><summary><h4>CellRenderer</h4></summary>
261    ///
262    ///
263    /// #### `cell-background`
264    ///  Writable
265    ///
266    ///
267    /// #### `cell-background-gdk`
268    ///  Cell background as a `GdkColor`
269    ///
270    /// Readable | Writable
271    ///
272    ///
273    /// #### `cell-background-rgba`
274    ///  Cell background as a [`gdk::RGBA`][crate::gdk::RGBA]
275    ///
276    /// Readable | Writable
277    ///
278    ///
279    /// #### `cell-background-set`
280    ///  Readable | Writable
281    ///
282    ///
283    /// #### `editing`
284    ///  Readable
285    ///
286    ///
287    /// #### `height`
288    ///  Readable | Writable
289    ///
290    ///
291    /// #### `is-expanded`
292    ///  Readable | Writable
293    ///
294    ///
295    /// #### `is-expander`
296    ///  Readable | Writable
297    ///
298    ///
299    /// #### `mode`
300    ///  Readable | Writable
301    ///
302    ///
303    /// #### `sensitive`
304    ///  Readable | Writable
305    ///
306    ///
307    /// #### `visible`
308    ///  Readable | Writable
309    ///
310    ///
311    /// #### `width`
312    ///  Readable | Writable
313    ///
314    ///
315    /// #### `xalign`
316    ///  Readable | Writable
317    ///
318    ///
319    /// #### `xpad`
320    ///  Readable | Writable
321    ///
322    ///
323    /// #### `yalign`
324    ///  Readable | Writable
325    ///
326    ///
327    /// #### `ypad`
328    ///  Readable | Writable
329    /// </details>
330    ///
331    /// ## Signals
332    ///
333    ///
334    /// #### `edited`
335    ///  This signal is emitted after `renderer` has been edited.
336    ///
337    /// It is the responsibility of the application to update the model
338    /// and store `new_text` at the position indicated by `path`.
339    ///
340    ///
341    /// <details><summary><h4>CellRenderer</h4></summary>
342    ///
343    ///
344    /// #### `editing-canceled`
345    ///  This signal gets emitted when the user cancels the process of editing a
346    /// cell. For example, an editable cell renderer could be written to cancel
347    /// editing when the user presses Escape.
348    ///
349    /// See also: [`CellRendererExt::stop_editing()`][crate::prelude::CellRendererExt::stop_editing()].
350    ///
351    ///
352    ///
353    ///
354    /// #### `editing-started`
355    ///
356    /// static void
357    /// text_editing_started (GtkCellRenderer *cell,
358    ///  GtkCellEditable *editable,
359    ///  const gchar *path,
360    ///  gpointer data)
361    /// {
362    ///  if (GTK_IS_ENTRY (editable))
363    ///  {
364    ///  GtkEntry *entry = GTK_ENTRY (editable);
365    ///
366    ///  // ... create a GtkEntryCompletion
367    ///
368    ///  gtk_entry_set_completion (entry, completion);
369    ///  }
370    /// }
371    /// ]|
372    ///
373    ///
374    /// </details>
375    ///
376    /// # Implements
377    ///
378    /// [`CellRendererTextExt`][trait@crate::prelude::CellRendererTextExt], [`CellRendererExt`][trait@crate::prelude::CellRendererExt], [`trait@glib::ObjectExt`]
379    #[doc(alias = "GtkCellRendererText")]
380    pub struct CellRendererText(Object<ffi::GtkCellRendererText, ffi::GtkCellRendererTextClass>) @extends CellRenderer;
381
382    match fn {
383        type_ => || ffi::gtk_cell_renderer_text_get_type(),
384    }
385}
386
387impl CellRendererText {
388    pub const NONE: Option<&'static CellRendererText> = None;
389
390    /// Creates a new [`CellRendererText`][crate::CellRendererText]. Adjust how text is drawn using
391    /// object properties. Object properties can be
392    /// set globally (with [`ObjectExt::set()`][crate::glib::prelude::ObjectExt::set()]). Also, with [`TreeViewColumn`][crate::TreeViewColumn],
393    /// you can bind a property to a value in a [`TreeModel`][crate::TreeModel]. For example,
394    /// you can bind the “text” property on the cell renderer to a string
395    /// value in the model, thus rendering a different string in each row
396    /// of the [`TreeView`][crate::TreeView]
397    ///
398    /// # Returns
399    ///
400    /// the new cell renderer
401    #[doc(alias = "gtk_cell_renderer_text_new")]
402    pub fn new() -> CellRendererText {
403        assert_initialized_main_thread!();
404        unsafe { CellRenderer::from_glib_none(ffi::gtk_cell_renderer_text_new()).unsafe_cast() }
405    }
406
407    // rustdoc-stripper-ignore-next
408    /// Creates a new builder-pattern struct instance to construct [`CellRendererText`] objects.
409    ///
410    /// This method returns an instance of [`CellRendererTextBuilder`](crate::builders::CellRendererTextBuilder) which can be used to create [`CellRendererText`] objects.
411    pub fn builder() -> CellRendererTextBuilder {
412        CellRendererTextBuilder::new()
413    }
414}
415
416impl Default for CellRendererText {
417    fn default() -> Self {
418        Self::new()
419    }
420}
421
422// rustdoc-stripper-ignore-next
423/// A [builder-pattern] type to construct [`CellRendererText`] objects.
424///
425/// [builder-pattern]: https://doc.rust-lang.org/1.0.0/style/ownership/builders.html
426#[must_use = "The builder must be built to be used"]
427pub struct CellRendererTextBuilder {
428    builder: glib::object::ObjectBuilder<'static, CellRendererText>,
429}
430
431impl CellRendererTextBuilder {
432    fn new() -> Self {
433        Self {
434            builder: glib::object::Object::builder(),
435        }
436    }
437
438    pub fn align_set(self, align_set: bool) -> Self {
439        Self {
440            builder: self.builder.property("align-set", align_set),
441        }
442    }
443
444    /// Specifies how to align the lines of text with respect to each other.
445    ///
446    /// Note that this property describes how to align the lines of text in
447    /// case there are several of them. The "xalign" property of [`CellRenderer`][crate::CellRenderer],
448    /// on the other hand, sets the horizontal alignment of the whole text.
449    pub fn alignment(self, alignment: pango::Alignment) -> Self {
450        Self {
451            builder: self.builder.property("alignment", alignment),
452        }
453    }
454
455    pub fn attributes(self, attributes: &pango::AttrList) -> Self {
456        Self {
457            builder: self.builder.property("attributes", attributes.clone()),
458        }
459    }
460
461    pub fn background(self, background: impl Into<glib::GString>) -> Self {
462        Self {
463            builder: self.builder.property("background", background.into()),
464        }
465    }
466
467    /// Background color as a [`gdk::RGBA`][crate::gdk::RGBA]
468    pub fn background_rgba(self, background_rgba: &gdk::RGBA) -> Self {
469        Self {
470            builder: self.builder.property("background-rgba", background_rgba),
471        }
472    }
473
474    pub fn background_set(self, background_set: bool) -> Self {
475        Self {
476            builder: self.builder.property("background-set", background_set),
477        }
478    }
479
480    pub fn editable(self, editable: bool) -> Self {
481        Self {
482            builder: self.builder.property("editable", editable),
483        }
484    }
485
486    pub fn editable_set(self, editable_set: bool) -> Self {
487        Self {
488            builder: self.builder.property("editable-set", editable_set),
489        }
490    }
491
492    /// Specifies the preferred place to ellipsize the string, if the cell renderer
493    /// does not have enough room to display the entire string. Setting it to
494    /// [`pango::EllipsizeMode::None`][crate::pango::EllipsizeMode::None] turns off ellipsizing. See the wrap-width property
495    /// for another way of making the text fit into a given width.
496    pub fn ellipsize(self, ellipsize: pango::EllipsizeMode) -> Self {
497        Self {
498            builder: self.builder.property("ellipsize", ellipsize),
499        }
500    }
501
502    pub fn ellipsize_set(self, ellipsize_set: bool) -> Self {
503        Self {
504            builder: self.builder.property("ellipsize-set", ellipsize_set),
505        }
506    }
507
508    pub fn family(self, family: impl Into<glib::GString>) -> Self {
509        Self {
510            builder: self.builder.property("family", family.into()),
511        }
512    }
513
514    pub fn family_set(self, family_set: bool) -> Self {
515        Self {
516            builder: self.builder.property("family-set", family_set),
517        }
518    }
519
520    pub fn font(self, font: impl Into<glib::GString>) -> Self {
521        Self {
522            builder: self.builder.property("font", font.into()),
523        }
524    }
525
526    pub fn font_desc(self, font_desc: &pango::FontDescription) -> Self {
527        Self {
528            builder: self.builder.property("font-desc", font_desc),
529        }
530    }
531
532    pub fn foreground(self, foreground: impl Into<glib::GString>) -> Self {
533        Self {
534            builder: self.builder.property("foreground", foreground.into()),
535        }
536    }
537
538    /// Foreground color as a [`gdk::RGBA`][crate::gdk::RGBA]
539    pub fn foreground_rgba(self, foreground_rgba: &gdk::RGBA) -> Self {
540        Self {
541            builder: self.builder.property("foreground-rgba", foreground_rgba),
542        }
543    }
544
545    pub fn foreground_set(self, foreground_set: bool) -> Self {
546        Self {
547            builder: self.builder.property("foreground-set", foreground_set),
548        }
549    }
550
551    pub fn language(self, language: impl Into<glib::GString>) -> Self {
552        Self {
553            builder: self.builder.property("language", language.into()),
554        }
555    }
556
557    pub fn language_set(self, language_set: bool) -> Self {
558        Self {
559            builder: self.builder.property("language-set", language_set),
560        }
561    }
562
563    pub fn markup(self, markup: impl Into<glib::GString>) -> Self {
564        Self {
565            builder: self.builder.property("markup", markup.into()),
566        }
567    }
568
569    /// The desired maximum width of the cell, in characters. If this property
570    /// is set to -1, the width will be calculated automatically.
571    ///
572    /// For cell renderers that ellipsize or wrap text; this property
573    /// controls the maximum reported width of the cell. The
574    /// cell should not receive any greater allocation unless it is
575    /// set to expand in its [`CellLayout`][crate::CellLayout] and all of the cell's siblings
576    /// have received their natural width.
577    pub fn max_width_chars(self, max_width_chars: i32) -> Self {
578        Self {
579            builder: self.builder.property("max-width-chars", max_width_chars),
580        }
581    }
582
583    /// The text that will be displayed in the [`CellRenderer`][crate::CellRenderer] if
584    /// [`editable`][struct@crate::CellRendererText#editable] is [`true`] and the cell is empty.
585    ///
586    /// Since 3.6
587    pub fn placeholder_text(self, placeholder_text: impl Into<glib::GString>) -> Self {
588        Self {
589            builder: self
590                .builder
591                .property("placeholder-text", placeholder_text.into()),
592        }
593    }
594
595    pub fn rise(self, rise: i32) -> Self {
596        Self {
597            builder: self.builder.property("rise", rise),
598        }
599    }
600
601    pub fn rise_set(self, rise_set: bool) -> Self {
602        Self {
603            builder: self.builder.property("rise-set", rise_set),
604        }
605    }
606
607    pub fn scale(self, scale: f64) -> Self {
608        Self {
609            builder: self.builder.property("scale", scale),
610        }
611    }
612
613    pub fn scale_set(self, scale_set: bool) -> Self {
614        Self {
615            builder: self.builder.property("scale-set", scale_set),
616        }
617    }
618
619    pub fn single_paragraph_mode(self, single_paragraph_mode: bool) -> Self {
620        Self {
621            builder: self
622                .builder
623                .property("single-paragraph-mode", single_paragraph_mode),
624        }
625    }
626
627    pub fn size(self, size: i32) -> Self {
628        Self {
629            builder: self.builder.property("size", size),
630        }
631    }
632
633    pub fn size_points(self, size_points: f64) -> Self {
634        Self {
635            builder: self.builder.property("size-points", size_points),
636        }
637    }
638
639    pub fn size_set(self, size_set: bool) -> Self {
640        Self {
641            builder: self.builder.property("size-set", size_set),
642        }
643    }
644
645    pub fn stretch(self, stretch: pango::Stretch) -> Self {
646        Self {
647            builder: self.builder.property("stretch", stretch),
648        }
649    }
650
651    pub fn stretch_set(self, stretch_set: bool) -> Self {
652        Self {
653            builder: self.builder.property("stretch-set", stretch_set),
654        }
655    }
656
657    pub fn strikethrough(self, strikethrough: bool) -> Self {
658        Self {
659            builder: self.builder.property("strikethrough", strikethrough),
660        }
661    }
662
663    pub fn strikethrough_set(self, strikethrough_set: bool) -> Self {
664        Self {
665            builder: self
666                .builder
667                .property("strikethrough-set", strikethrough_set),
668        }
669    }
670
671    pub fn style(self, style: pango::Style) -> Self {
672        Self {
673            builder: self.builder.property("style", style),
674        }
675    }
676
677    pub fn style_set(self, style_set: bool) -> Self {
678        Self {
679            builder: self.builder.property("style-set", style_set),
680        }
681    }
682
683    pub fn text(self, text: impl Into<glib::GString>) -> Self {
684        Self {
685            builder: self.builder.property("text", text.into()),
686        }
687    }
688
689    pub fn underline(self, underline: pango::Underline) -> Self {
690        Self {
691            builder: self.builder.property("underline", underline),
692        }
693    }
694
695    pub fn underline_set(self, underline_set: bool) -> Self {
696        Self {
697            builder: self.builder.property("underline-set", underline_set),
698        }
699    }
700
701    pub fn variant(self, variant: pango::Variant) -> Self {
702        Self {
703            builder: self.builder.property("variant", variant),
704        }
705    }
706
707    pub fn variant_set(self, variant_set: bool) -> Self {
708        Self {
709            builder: self.builder.property("variant-set", variant_set),
710        }
711    }
712
713    pub fn weight(self, weight: i32) -> Self {
714        Self {
715            builder: self.builder.property("weight", weight),
716        }
717    }
718
719    pub fn weight_set(self, weight_set: bool) -> Self {
720        Self {
721            builder: self.builder.property("weight-set", weight_set),
722        }
723    }
724
725    /// The desired width of the cell, in characters. If this property is set to
726    /// -1, the width will be calculated automatically, otherwise the cell will
727    /// request either 3 characters or the property value, whichever is greater.
728    pub fn width_chars(self, width_chars: i32) -> Self {
729        Self {
730            builder: self.builder.property("width-chars", width_chars),
731        }
732    }
733
734    /// Specifies how to break the string into multiple lines, if the cell
735    /// renderer does not have enough room to display the entire string.
736    /// This property has no effect unless the wrap-width property is set.
737    pub fn wrap_mode(self, wrap_mode: pango::WrapMode) -> Self {
738        Self {
739            builder: self.builder.property("wrap-mode", wrap_mode),
740        }
741    }
742
743    /// Specifies the minimum width at which the text is wrapped. The wrap-mode property can
744    /// be used to influence at what character positions the line breaks can be placed.
745    /// Setting wrap-width to -1 turns wrapping off.
746    pub fn wrap_width(self, wrap_width: i32) -> Self {
747        Self {
748            builder: self.builder.property("wrap-width", wrap_width),
749        }
750    }
751
752    pub fn cell_background(self, cell_background: impl Into<glib::GString>) -> Self {
753        Self {
754            builder: self
755                .builder
756                .property("cell-background", cell_background.into()),
757        }
758    }
759
760    /// Cell background as a [`gdk::RGBA`][crate::gdk::RGBA]
761    pub fn cell_background_rgba(self, cell_background_rgba: &gdk::RGBA) -> Self {
762        Self {
763            builder: self
764                .builder
765                .property("cell-background-rgba", cell_background_rgba),
766        }
767    }
768
769    pub fn cell_background_set(self, cell_background_set: bool) -> Self {
770        Self {
771            builder: self
772                .builder
773                .property("cell-background-set", cell_background_set),
774        }
775    }
776
777    pub fn height(self, height: i32) -> Self {
778        Self {
779            builder: self.builder.property("height", height),
780        }
781    }
782
783    pub fn is_expanded(self, is_expanded: bool) -> Self {
784        Self {
785            builder: self.builder.property("is-expanded", is_expanded),
786        }
787    }
788
789    pub fn is_expander(self, is_expander: bool) -> Self {
790        Self {
791            builder: self.builder.property("is-expander", is_expander),
792        }
793    }
794
795    pub fn mode(self, mode: CellRendererMode) -> Self {
796        Self {
797            builder: self.builder.property("mode", mode),
798        }
799    }
800
801    pub fn sensitive(self, sensitive: bool) -> Self {
802        Self {
803            builder: self.builder.property("sensitive", sensitive),
804        }
805    }
806
807    pub fn visible(self, visible: bool) -> Self {
808        Self {
809            builder: self.builder.property("visible", visible),
810        }
811    }
812
813    pub fn width(self, width: i32) -> Self {
814        Self {
815            builder: self.builder.property("width", width),
816        }
817    }
818
819    pub fn xalign(self, xalign: f32) -> Self {
820        Self {
821            builder: self.builder.property("xalign", xalign),
822        }
823    }
824
825    pub fn xpad(self, xpad: u32) -> Self {
826        Self {
827            builder: self.builder.property("xpad", xpad),
828        }
829    }
830
831    pub fn yalign(self, yalign: f32) -> Self {
832        Self {
833            builder: self.builder.property("yalign", yalign),
834        }
835    }
836
837    pub fn ypad(self, ypad: u32) -> Self {
838        Self {
839            builder: self.builder.property("ypad", ypad),
840        }
841    }
842
843    // rustdoc-stripper-ignore-next
844    /// Build the [`CellRendererText`].
845    #[must_use = "Building the object from the builder is usually expensive and is not expected to have side effects"]
846    pub fn build(self) -> CellRendererText {
847        assert_initialized_main_thread!();
848        self.builder.build()
849    }
850}
851
852/// Trait containing all [`struct@CellRendererText`] methods.
853///
854/// # Implementors
855///
856/// [`CellRendererAccel`][struct@crate::CellRendererAccel], [`CellRendererCombo`][struct@crate::CellRendererCombo], [`CellRendererSpin`][struct@crate::CellRendererSpin], [`CellRendererText`][struct@crate::CellRendererText]
857pub trait CellRendererTextExt: IsA<CellRendererText> + 'static {
858    /// Sets the height of a renderer to explicitly be determined by the “font” and
859    /// “y_pad” property set on it. Further changes in these properties do not
860    /// affect the height, so they must be accompanied by a subsequent call to this
861    /// function. Using this function is unflexible, and should really only be used
862    /// if calculating the size of a cell is too slow (ie, a massive number of cells
863    /// displayed). If `number_of_rows` is -1, then the fixed height is unset, and
864    /// the height is determined by the properties again.
865    /// ## `number_of_rows`
866    /// Number of rows of text each cell renderer is allocated, or -1
867    #[doc(alias = "gtk_cell_renderer_text_set_fixed_height_from_font")]
868    fn set_fixed_height_from_font(&self, number_of_rows: i32) {
869        unsafe {
870            ffi::gtk_cell_renderer_text_set_fixed_height_from_font(
871                self.as_ref().to_glib_none().0,
872                number_of_rows,
873            );
874        }
875    }
876
877    #[doc(alias = "align-set")]
878    fn is_align_set(&self) -> bool {
879        ObjectExt::property(self.as_ref(), "align-set")
880    }
881
882    #[doc(alias = "align-set")]
883    fn set_align_set(&self, align_set: bool) {
884        ObjectExt::set_property(self.as_ref(), "align-set", align_set)
885    }
886
887    /// Specifies how to align the lines of text with respect to each other.
888    ///
889    /// Note that this property describes how to align the lines of text in
890    /// case there are several of them. The "xalign" property of [`CellRenderer`][crate::CellRenderer],
891    /// on the other hand, sets the horizontal alignment of the whole text.
892    fn alignment(&self) -> pango::Alignment {
893        ObjectExt::property(self.as_ref(), "alignment")
894    }
895
896    /// Specifies how to align the lines of text with respect to each other.
897    ///
898    /// Note that this property describes how to align the lines of text in
899    /// case there are several of them. The "xalign" property of [`CellRenderer`][crate::CellRenderer],
900    /// on the other hand, sets the horizontal alignment of the whole text.
901    fn set_alignment(&self, alignment: pango::Alignment) {
902        ObjectExt::set_property(self.as_ref(), "alignment", alignment)
903    }
904
905    fn attributes(&self) -> Option<pango::AttrList> {
906        ObjectExt::property(self.as_ref(), "attributes")
907    }
908
909    fn set_attributes(&self, attributes: Option<&pango::AttrList>) {
910        ObjectExt::set_property(self.as_ref(), "attributes", attributes)
911    }
912
913    fn set_background(&self, background: Option<&str>) {
914        ObjectExt::set_property(self.as_ref(), "background", background)
915    }
916
917    /// Background color as a [`gdk::RGBA`][crate::gdk::RGBA]
918    #[doc(alias = "background-rgba")]
919    fn background_rgba(&self) -> Option<gdk::RGBA> {
920        ObjectExt::property(self.as_ref(), "background-rgba")
921    }
922
923    /// Background color as a [`gdk::RGBA`][crate::gdk::RGBA]
924    #[doc(alias = "background-rgba")]
925    fn set_background_rgba(&self, background_rgba: Option<&gdk::RGBA>) {
926        ObjectExt::set_property(self.as_ref(), "background-rgba", background_rgba)
927    }
928
929    #[doc(alias = "background-set")]
930    fn is_background_set(&self) -> bool {
931        ObjectExt::property(self.as_ref(), "background-set")
932    }
933
934    #[doc(alias = "background-set")]
935    fn set_background_set(&self, background_set: bool) {
936        ObjectExt::set_property(self.as_ref(), "background-set", background_set)
937    }
938
939    fn is_editable(&self) -> bool {
940        ObjectExt::property(self.as_ref(), "editable")
941    }
942
943    fn set_editable(&self, editable: bool) {
944        ObjectExt::set_property(self.as_ref(), "editable", editable)
945    }
946
947    #[doc(alias = "editable-set")]
948    fn is_editable_set(&self) -> bool {
949        ObjectExt::property(self.as_ref(), "editable-set")
950    }
951
952    #[doc(alias = "editable-set")]
953    fn set_editable_set(&self, editable_set: bool) {
954        ObjectExt::set_property(self.as_ref(), "editable-set", editable_set)
955    }
956
957    /// Specifies the preferred place to ellipsize the string, if the cell renderer
958    /// does not have enough room to display the entire string. Setting it to
959    /// [`pango::EllipsizeMode::None`][crate::pango::EllipsizeMode::None] turns off ellipsizing. See the wrap-width property
960    /// for another way of making the text fit into a given width.
961    fn ellipsize(&self) -> pango::EllipsizeMode {
962        ObjectExt::property(self.as_ref(), "ellipsize")
963    }
964
965    /// Specifies the preferred place to ellipsize the string, if the cell renderer
966    /// does not have enough room to display the entire string. Setting it to
967    /// [`pango::EllipsizeMode::None`][crate::pango::EllipsizeMode::None] turns off ellipsizing. See the wrap-width property
968    /// for another way of making the text fit into a given width.
969    fn set_ellipsize(&self, ellipsize: pango::EllipsizeMode) {
970        ObjectExt::set_property(self.as_ref(), "ellipsize", ellipsize)
971    }
972
973    #[doc(alias = "ellipsize-set")]
974    fn is_ellipsize_set(&self) -> bool {
975        ObjectExt::property(self.as_ref(), "ellipsize-set")
976    }
977
978    #[doc(alias = "ellipsize-set")]
979    fn set_ellipsize_set(&self, ellipsize_set: bool) {
980        ObjectExt::set_property(self.as_ref(), "ellipsize-set", ellipsize_set)
981    }
982
983    fn family(&self) -> Option<glib::GString> {
984        ObjectExt::property(self.as_ref(), "family")
985    }
986
987    fn set_family(&self, family: Option<&str>) {
988        ObjectExt::set_property(self.as_ref(), "family", family)
989    }
990
991    #[doc(alias = "family-set")]
992    fn is_family_set(&self) -> bool {
993        ObjectExt::property(self.as_ref(), "family-set")
994    }
995
996    #[doc(alias = "family-set")]
997    fn set_family_set(&self, family_set: bool) {
998        ObjectExt::set_property(self.as_ref(), "family-set", family_set)
999    }
1000
1001    fn font(&self) -> Option<glib::GString> {
1002        ObjectExt::property(self.as_ref(), "font")
1003    }
1004
1005    fn set_font(&self, font: Option<&str>) {
1006        ObjectExt::set_property(self.as_ref(), "font", font)
1007    }
1008
1009    #[doc(alias = "font-desc")]
1010    fn font_desc(&self) -> Option<pango::FontDescription> {
1011        ObjectExt::property(self.as_ref(), "font-desc")
1012    }
1013
1014    #[doc(alias = "font-desc")]
1015    fn set_font_desc(&self, font_desc: Option<&pango::FontDescription>) {
1016        ObjectExt::set_property(self.as_ref(), "font-desc", font_desc)
1017    }
1018
1019    fn set_foreground(&self, foreground: Option<&str>) {
1020        ObjectExt::set_property(self.as_ref(), "foreground", foreground)
1021    }
1022
1023    /// Foreground color as a [`gdk::RGBA`][crate::gdk::RGBA]
1024    #[doc(alias = "foreground-rgba")]
1025    fn foreground_rgba(&self) -> Option<gdk::RGBA> {
1026        ObjectExt::property(self.as_ref(), "foreground-rgba")
1027    }
1028
1029    /// Foreground color as a [`gdk::RGBA`][crate::gdk::RGBA]
1030    #[doc(alias = "foreground-rgba")]
1031    fn set_foreground_rgba(&self, foreground_rgba: Option<&gdk::RGBA>) {
1032        ObjectExt::set_property(self.as_ref(), "foreground-rgba", foreground_rgba)
1033    }
1034
1035    #[doc(alias = "foreground-set")]
1036    fn is_foreground_set(&self) -> bool {
1037        ObjectExt::property(self.as_ref(), "foreground-set")
1038    }
1039
1040    #[doc(alias = "foreground-set")]
1041    fn set_foreground_set(&self, foreground_set: bool) {
1042        ObjectExt::set_property(self.as_ref(), "foreground-set", foreground_set)
1043    }
1044
1045    fn language(&self) -> Option<glib::GString> {
1046        ObjectExt::property(self.as_ref(), "language")
1047    }
1048
1049    fn set_language(&self, language: Option<&str>) {
1050        ObjectExt::set_property(self.as_ref(), "language", language)
1051    }
1052
1053    #[doc(alias = "language-set")]
1054    fn is_language_set(&self) -> bool {
1055        ObjectExt::property(self.as_ref(), "language-set")
1056    }
1057
1058    #[doc(alias = "language-set")]
1059    fn set_language_set(&self, language_set: bool) {
1060        ObjectExt::set_property(self.as_ref(), "language-set", language_set)
1061    }
1062
1063    fn set_markup(&self, markup: Option<&str>) {
1064        ObjectExt::set_property(self.as_ref(), "markup", markup)
1065    }
1066
1067    /// The desired maximum width of the cell, in characters. If this property
1068    /// is set to -1, the width will be calculated automatically.
1069    ///
1070    /// For cell renderers that ellipsize or wrap text; this property
1071    /// controls the maximum reported width of the cell. The
1072    /// cell should not receive any greater allocation unless it is
1073    /// set to expand in its [`CellLayout`][crate::CellLayout] and all of the cell's siblings
1074    /// have received their natural width.
1075    #[doc(alias = "max-width-chars")]
1076    fn max_width_chars(&self) -> i32 {
1077        ObjectExt::property(self.as_ref(), "max-width-chars")
1078    }
1079
1080    /// The desired maximum width of the cell, in characters. If this property
1081    /// is set to -1, the width will be calculated automatically.
1082    ///
1083    /// For cell renderers that ellipsize or wrap text; this property
1084    /// controls the maximum reported width of the cell. The
1085    /// cell should not receive any greater allocation unless it is
1086    /// set to expand in its [`CellLayout`][crate::CellLayout] and all of the cell's siblings
1087    /// have received their natural width.
1088    #[doc(alias = "max-width-chars")]
1089    fn set_max_width_chars(&self, max_width_chars: i32) {
1090        ObjectExt::set_property(self.as_ref(), "max-width-chars", max_width_chars)
1091    }
1092
1093    /// The text that will be displayed in the [`CellRenderer`][crate::CellRenderer] if
1094    /// [`editable`][struct@crate::CellRendererText#editable] is [`true`] and the cell is empty.
1095    ///
1096    /// Since 3.6
1097    #[doc(alias = "placeholder-text")]
1098    fn placeholder_text(&self) -> Option<glib::GString> {
1099        ObjectExt::property(self.as_ref(), "placeholder-text")
1100    }
1101
1102    /// The text that will be displayed in the [`CellRenderer`][crate::CellRenderer] if
1103    /// [`editable`][struct@crate::CellRendererText#editable] is [`true`] and the cell is empty.
1104    ///
1105    /// Since 3.6
1106    #[doc(alias = "placeholder-text")]
1107    fn set_placeholder_text(&self, placeholder_text: Option<&str>) {
1108        ObjectExt::set_property(self.as_ref(), "placeholder-text", placeholder_text)
1109    }
1110
1111    fn rise(&self) -> i32 {
1112        ObjectExt::property(self.as_ref(), "rise")
1113    }
1114
1115    fn set_rise(&self, rise: i32) {
1116        ObjectExt::set_property(self.as_ref(), "rise", rise)
1117    }
1118
1119    #[doc(alias = "rise-set")]
1120    fn is_rise_set(&self) -> bool {
1121        ObjectExt::property(self.as_ref(), "rise-set")
1122    }
1123
1124    #[doc(alias = "rise-set")]
1125    fn set_rise_set(&self, rise_set: bool) {
1126        ObjectExt::set_property(self.as_ref(), "rise-set", rise_set)
1127    }
1128
1129    fn scale(&self) -> f64 {
1130        ObjectExt::property(self.as_ref(), "scale")
1131    }
1132
1133    fn set_scale(&self, scale: f64) {
1134        ObjectExt::set_property(self.as_ref(), "scale", scale)
1135    }
1136
1137    #[doc(alias = "scale-set")]
1138    fn is_scale_set(&self) -> bool {
1139        ObjectExt::property(self.as_ref(), "scale-set")
1140    }
1141
1142    #[doc(alias = "scale-set")]
1143    fn set_scale_set(&self, scale_set: bool) {
1144        ObjectExt::set_property(self.as_ref(), "scale-set", scale_set)
1145    }
1146
1147    #[doc(alias = "single-paragraph-mode")]
1148    fn is_single_paragraph_mode(&self) -> bool {
1149        ObjectExt::property(self.as_ref(), "single-paragraph-mode")
1150    }
1151
1152    #[doc(alias = "single-paragraph-mode")]
1153    fn set_single_paragraph_mode(&self, single_paragraph_mode: bool) {
1154        ObjectExt::set_property(
1155            self.as_ref(),
1156            "single-paragraph-mode",
1157            single_paragraph_mode,
1158        )
1159    }
1160
1161    fn size(&self) -> i32 {
1162        ObjectExt::property(self.as_ref(), "size")
1163    }
1164
1165    fn set_size(&self, size: i32) {
1166        ObjectExt::set_property(self.as_ref(), "size", size)
1167    }
1168
1169    #[doc(alias = "size-points")]
1170    fn size_points(&self) -> f64 {
1171        ObjectExt::property(self.as_ref(), "size-points")
1172    }
1173
1174    #[doc(alias = "size-points")]
1175    fn set_size_points(&self, size_points: f64) {
1176        ObjectExt::set_property(self.as_ref(), "size-points", size_points)
1177    }
1178
1179    #[doc(alias = "size-set")]
1180    fn is_size_set(&self) -> bool {
1181        ObjectExt::property(self.as_ref(), "size-set")
1182    }
1183
1184    #[doc(alias = "size-set")]
1185    fn set_size_set(&self, size_set: bool) {
1186        ObjectExt::set_property(self.as_ref(), "size-set", size_set)
1187    }
1188
1189    fn stretch(&self) -> pango::Stretch {
1190        ObjectExt::property(self.as_ref(), "stretch")
1191    }
1192
1193    fn set_stretch(&self, stretch: pango::Stretch) {
1194        ObjectExt::set_property(self.as_ref(), "stretch", stretch)
1195    }
1196
1197    #[doc(alias = "stretch-set")]
1198    fn is_stretch_set(&self) -> bool {
1199        ObjectExt::property(self.as_ref(), "stretch-set")
1200    }
1201
1202    #[doc(alias = "stretch-set")]
1203    fn set_stretch_set(&self, stretch_set: bool) {
1204        ObjectExt::set_property(self.as_ref(), "stretch-set", stretch_set)
1205    }
1206
1207    fn is_strikethrough(&self) -> bool {
1208        ObjectExt::property(self.as_ref(), "strikethrough")
1209    }
1210
1211    fn set_strikethrough(&self, strikethrough: bool) {
1212        ObjectExt::set_property(self.as_ref(), "strikethrough", strikethrough)
1213    }
1214
1215    #[doc(alias = "strikethrough-set")]
1216    fn is_strikethrough_set(&self) -> bool {
1217        ObjectExt::property(self.as_ref(), "strikethrough-set")
1218    }
1219
1220    #[doc(alias = "strikethrough-set")]
1221    fn set_strikethrough_set(&self, strikethrough_set: bool) {
1222        ObjectExt::set_property(self.as_ref(), "strikethrough-set", strikethrough_set)
1223    }
1224
1225    fn style(&self) -> pango::Style {
1226        ObjectExt::property(self.as_ref(), "style")
1227    }
1228
1229    fn set_style(&self, style: pango::Style) {
1230        ObjectExt::set_property(self.as_ref(), "style", style)
1231    }
1232
1233    #[doc(alias = "style-set")]
1234    fn is_style_set(&self) -> bool {
1235        ObjectExt::property(self.as_ref(), "style-set")
1236    }
1237
1238    #[doc(alias = "style-set")]
1239    fn set_style_set(&self, style_set: bool) {
1240        ObjectExt::set_property(self.as_ref(), "style-set", style_set)
1241    }
1242
1243    fn text(&self) -> Option<glib::GString> {
1244        ObjectExt::property(self.as_ref(), "text")
1245    }
1246
1247    fn set_text(&self, text: Option<&str>) {
1248        ObjectExt::set_property(self.as_ref(), "text", text)
1249    }
1250
1251    fn underline(&self) -> pango::Underline {
1252        ObjectExt::property(self.as_ref(), "underline")
1253    }
1254
1255    fn set_underline(&self, underline: pango::Underline) {
1256        ObjectExt::set_property(self.as_ref(), "underline", underline)
1257    }
1258
1259    #[doc(alias = "underline-set")]
1260    fn is_underline_set(&self) -> bool {
1261        ObjectExt::property(self.as_ref(), "underline-set")
1262    }
1263
1264    #[doc(alias = "underline-set")]
1265    fn set_underline_set(&self, underline_set: bool) {
1266        ObjectExt::set_property(self.as_ref(), "underline-set", underline_set)
1267    }
1268
1269    fn variant(&self) -> pango::Variant {
1270        ObjectExt::property(self.as_ref(), "variant")
1271    }
1272
1273    fn set_variant(&self, variant: pango::Variant) {
1274        ObjectExt::set_property(self.as_ref(), "variant", variant)
1275    }
1276
1277    #[doc(alias = "variant-set")]
1278    fn is_variant_set(&self) -> bool {
1279        ObjectExt::property(self.as_ref(), "variant-set")
1280    }
1281
1282    #[doc(alias = "variant-set")]
1283    fn set_variant_set(&self, variant_set: bool) {
1284        ObjectExt::set_property(self.as_ref(), "variant-set", variant_set)
1285    }
1286
1287    fn weight(&self) -> i32 {
1288        ObjectExt::property(self.as_ref(), "weight")
1289    }
1290
1291    fn set_weight(&self, weight: i32) {
1292        ObjectExt::set_property(self.as_ref(), "weight", weight)
1293    }
1294
1295    #[doc(alias = "weight-set")]
1296    fn is_weight_set(&self) -> bool {
1297        ObjectExt::property(self.as_ref(), "weight-set")
1298    }
1299
1300    #[doc(alias = "weight-set")]
1301    fn set_weight_set(&self, weight_set: bool) {
1302        ObjectExt::set_property(self.as_ref(), "weight-set", weight_set)
1303    }
1304
1305    /// The desired width of the cell, in characters. If this property is set to
1306    /// -1, the width will be calculated automatically, otherwise the cell will
1307    /// request either 3 characters or the property value, whichever is greater.
1308    #[doc(alias = "width-chars")]
1309    fn width_chars(&self) -> i32 {
1310        ObjectExt::property(self.as_ref(), "width-chars")
1311    }
1312
1313    /// The desired width of the cell, in characters. If this property is set to
1314    /// -1, the width will be calculated automatically, otherwise the cell will
1315    /// request either 3 characters or the property value, whichever is greater.
1316    #[doc(alias = "width-chars")]
1317    fn set_width_chars(&self, width_chars: i32) {
1318        ObjectExt::set_property(self.as_ref(), "width-chars", width_chars)
1319    }
1320
1321    /// Specifies how to break the string into multiple lines, if the cell
1322    /// renderer does not have enough room to display the entire string.
1323    /// This property has no effect unless the wrap-width property is set.
1324    #[doc(alias = "wrap-mode")]
1325    fn wrap_mode(&self) -> pango::WrapMode {
1326        ObjectExt::property(self.as_ref(), "wrap-mode")
1327    }
1328
1329    /// Specifies how to break the string into multiple lines, if the cell
1330    /// renderer does not have enough room to display the entire string.
1331    /// This property has no effect unless the wrap-width property is set.
1332    #[doc(alias = "wrap-mode")]
1333    fn set_wrap_mode(&self, wrap_mode: pango::WrapMode) {
1334        ObjectExt::set_property(self.as_ref(), "wrap-mode", wrap_mode)
1335    }
1336
1337    /// Specifies the minimum width at which the text is wrapped. The wrap-mode property can
1338    /// be used to influence at what character positions the line breaks can be placed.
1339    /// Setting wrap-width to -1 turns wrapping off.
1340    #[doc(alias = "wrap-width")]
1341    fn wrap_width(&self) -> i32 {
1342        ObjectExt::property(self.as_ref(), "wrap-width")
1343    }
1344
1345    /// Specifies the minimum width at which the text is wrapped. The wrap-mode property can
1346    /// be used to influence at what character positions the line breaks can be placed.
1347    /// Setting wrap-width to -1 turns wrapping off.
1348    #[doc(alias = "wrap-width")]
1349    fn set_wrap_width(&self, wrap_width: i32) {
1350        ObjectExt::set_property(self.as_ref(), "wrap-width", wrap_width)
1351    }
1352
1353    /// This signal is emitted after `renderer` has been edited.
1354    ///
1355    /// It is the responsibility of the application to update the model
1356    /// and store `new_text` at the position indicated by `path`.
1357    /// ## `path`
1358    /// the path identifying the edited cell
1359    /// ## `new_text`
1360    /// the new text
1361    #[doc(alias = "edited")]
1362    fn connect_edited<F: Fn(&Self, TreePath, &str) + 'static>(&self, f: F) -> SignalHandlerId {
1363        unsafe extern "C" fn edited_trampoline<
1364            P: IsA<CellRendererText>,
1365            F: Fn(&P, TreePath, &str) + 'static,
1366        >(
1367            this: *mut ffi::GtkCellRendererText,
1368            path: *mut std::ffi::c_char,
1369            new_text: *mut std::ffi::c_char,
1370            f: glib::ffi::gpointer,
1371        ) {
1372            unsafe {
1373                let f: &F = &*(f as *const F);
1374                let path = from_glib_full(crate::ffi::gtk_tree_path_new_from_string(path));
1375                f(
1376                    CellRendererText::from_glib_borrow(this).unsafe_cast_ref(),
1377                    path,
1378                    &glib::GString::from_glib_borrow(new_text),
1379                )
1380            }
1381        }
1382        unsafe {
1383            let f: Box_<F> = Box_::new(f);
1384            connect_raw(
1385                self.as_ptr() as *mut _,
1386                c"edited".as_ptr(),
1387                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1388                    edited_trampoline::<Self, F> as *const (),
1389                )),
1390                Box_::into_raw(f),
1391            )
1392        }
1393    }
1394
1395    #[doc(alias = "align-set")]
1396    fn connect_align_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1397        unsafe extern "C" fn notify_align_set_trampoline<
1398            P: IsA<CellRendererText>,
1399            F: Fn(&P) + 'static,
1400        >(
1401            this: *mut ffi::GtkCellRendererText,
1402            _param_spec: glib::ffi::gpointer,
1403            f: glib::ffi::gpointer,
1404        ) {
1405            unsafe {
1406                let f: &F = &*(f as *const F);
1407                f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
1408            }
1409        }
1410        unsafe {
1411            let f: Box_<F> = Box_::new(f);
1412            connect_raw(
1413                self.as_ptr() as *mut _,
1414                c"notify::align-set".as_ptr(),
1415                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1416                    notify_align_set_trampoline::<Self, F> as *const (),
1417                )),
1418                Box_::into_raw(f),
1419            )
1420        }
1421    }
1422
1423    #[doc(alias = "alignment")]
1424    fn connect_alignment_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1425        unsafe extern "C" fn notify_alignment_trampoline<
1426            P: IsA<CellRendererText>,
1427            F: Fn(&P) + 'static,
1428        >(
1429            this: *mut ffi::GtkCellRendererText,
1430            _param_spec: glib::ffi::gpointer,
1431            f: glib::ffi::gpointer,
1432        ) {
1433            unsafe {
1434                let f: &F = &*(f as *const F);
1435                f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
1436            }
1437        }
1438        unsafe {
1439            let f: Box_<F> = Box_::new(f);
1440            connect_raw(
1441                self.as_ptr() as *mut _,
1442                c"notify::alignment".as_ptr(),
1443                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1444                    notify_alignment_trampoline::<Self, F> as *const (),
1445                )),
1446                Box_::into_raw(f),
1447            )
1448        }
1449    }
1450
1451    #[doc(alias = "attributes")]
1452    fn connect_attributes_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1453        unsafe extern "C" fn notify_attributes_trampoline<
1454            P: IsA<CellRendererText>,
1455            F: Fn(&P) + 'static,
1456        >(
1457            this: *mut ffi::GtkCellRendererText,
1458            _param_spec: glib::ffi::gpointer,
1459            f: glib::ffi::gpointer,
1460        ) {
1461            unsafe {
1462                let f: &F = &*(f as *const F);
1463                f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
1464            }
1465        }
1466        unsafe {
1467            let f: Box_<F> = Box_::new(f);
1468            connect_raw(
1469                self.as_ptr() as *mut _,
1470                c"notify::attributes".as_ptr(),
1471                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1472                    notify_attributes_trampoline::<Self, F> as *const (),
1473                )),
1474                Box_::into_raw(f),
1475            )
1476        }
1477    }
1478
1479    #[doc(alias = "background")]
1480    fn connect_background_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1481        unsafe extern "C" fn notify_background_trampoline<
1482            P: IsA<CellRendererText>,
1483            F: Fn(&P) + 'static,
1484        >(
1485            this: *mut ffi::GtkCellRendererText,
1486            _param_spec: glib::ffi::gpointer,
1487            f: glib::ffi::gpointer,
1488        ) {
1489            unsafe {
1490                let f: &F = &*(f as *const F);
1491                f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
1492            }
1493        }
1494        unsafe {
1495            let f: Box_<F> = Box_::new(f);
1496            connect_raw(
1497                self.as_ptr() as *mut _,
1498                c"notify::background".as_ptr(),
1499                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1500                    notify_background_trampoline::<Self, F> as *const (),
1501                )),
1502                Box_::into_raw(f),
1503            )
1504        }
1505    }
1506
1507    #[doc(alias = "background-rgba")]
1508    fn connect_background_rgba_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1509        unsafe extern "C" fn notify_background_rgba_trampoline<
1510            P: IsA<CellRendererText>,
1511            F: Fn(&P) + 'static,
1512        >(
1513            this: *mut ffi::GtkCellRendererText,
1514            _param_spec: glib::ffi::gpointer,
1515            f: glib::ffi::gpointer,
1516        ) {
1517            unsafe {
1518                let f: &F = &*(f as *const F);
1519                f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
1520            }
1521        }
1522        unsafe {
1523            let f: Box_<F> = Box_::new(f);
1524            connect_raw(
1525                self.as_ptr() as *mut _,
1526                c"notify::background-rgba".as_ptr(),
1527                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1528                    notify_background_rgba_trampoline::<Self, F> as *const (),
1529                )),
1530                Box_::into_raw(f),
1531            )
1532        }
1533    }
1534
1535    #[doc(alias = "background-set")]
1536    fn connect_background_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1537        unsafe extern "C" fn notify_background_set_trampoline<
1538            P: IsA<CellRendererText>,
1539            F: Fn(&P) + 'static,
1540        >(
1541            this: *mut ffi::GtkCellRendererText,
1542            _param_spec: glib::ffi::gpointer,
1543            f: glib::ffi::gpointer,
1544        ) {
1545            unsafe {
1546                let f: &F = &*(f as *const F);
1547                f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
1548            }
1549        }
1550        unsafe {
1551            let f: Box_<F> = Box_::new(f);
1552            connect_raw(
1553                self.as_ptr() as *mut _,
1554                c"notify::background-set".as_ptr(),
1555                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1556                    notify_background_set_trampoline::<Self, F> as *const (),
1557                )),
1558                Box_::into_raw(f),
1559            )
1560        }
1561    }
1562
1563    #[doc(alias = "editable")]
1564    fn connect_editable_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1565        unsafe extern "C" fn notify_editable_trampoline<
1566            P: IsA<CellRendererText>,
1567            F: Fn(&P) + 'static,
1568        >(
1569            this: *mut ffi::GtkCellRendererText,
1570            _param_spec: glib::ffi::gpointer,
1571            f: glib::ffi::gpointer,
1572        ) {
1573            unsafe {
1574                let f: &F = &*(f as *const F);
1575                f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
1576            }
1577        }
1578        unsafe {
1579            let f: Box_<F> = Box_::new(f);
1580            connect_raw(
1581                self.as_ptr() as *mut _,
1582                c"notify::editable".as_ptr(),
1583                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1584                    notify_editable_trampoline::<Self, F> as *const (),
1585                )),
1586                Box_::into_raw(f),
1587            )
1588        }
1589    }
1590
1591    #[doc(alias = "editable-set")]
1592    fn connect_editable_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1593        unsafe extern "C" fn notify_editable_set_trampoline<
1594            P: IsA<CellRendererText>,
1595            F: Fn(&P) + 'static,
1596        >(
1597            this: *mut ffi::GtkCellRendererText,
1598            _param_spec: glib::ffi::gpointer,
1599            f: glib::ffi::gpointer,
1600        ) {
1601            unsafe {
1602                let f: &F = &*(f as *const F);
1603                f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
1604            }
1605        }
1606        unsafe {
1607            let f: Box_<F> = Box_::new(f);
1608            connect_raw(
1609                self.as_ptr() as *mut _,
1610                c"notify::editable-set".as_ptr(),
1611                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1612                    notify_editable_set_trampoline::<Self, F> as *const (),
1613                )),
1614                Box_::into_raw(f),
1615            )
1616        }
1617    }
1618
1619    #[doc(alias = "ellipsize")]
1620    fn connect_ellipsize_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1621        unsafe extern "C" fn notify_ellipsize_trampoline<
1622            P: IsA<CellRendererText>,
1623            F: Fn(&P) + 'static,
1624        >(
1625            this: *mut ffi::GtkCellRendererText,
1626            _param_spec: glib::ffi::gpointer,
1627            f: glib::ffi::gpointer,
1628        ) {
1629            unsafe {
1630                let f: &F = &*(f as *const F);
1631                f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
1632            }
1633        }
1634        unsafe {
1635            let f: Box_<F> = Box_::new(f);
1636            connect_raw(
1637                self.as_ptr() as *mut _,
1638                c"notify::ellipsize".as_ptr(),
1639                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1640                    notify_ellipsize_trampoline::<Self, F> as *const (),
1641                )),
1642                Box_::into_raw(f),
1643            )
1644        }
1645    }
1646
1647    #[doc(alias = "ellipsize-set")]
1648    fn connect_ellipsize_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1649        unsafe extern "C" fn notify_ellipsize_set_trampoline<
1650            P: IsA<CellRendererText>,
1651            F: Fn(&P) + 'static,
1652        >(
1653            this: *mut ffi::GtkCellRendererText,
1654            _param_spec: glib::ffi::gpointer,
1655            f: glib::ffi::gpointer,
1656        ) {
1657            unsafe {
1658                let f: &F = &*(f as *const F);
1659                f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
1660            }
1661        }
1662        unsafe {
1663            let f: Box_<F> = Box_::new(f);
1664            connect_raw(
1665                self.as_ptr() as *mut _,
1666                c"notify::ellipsize-set".as_ptr(),
1667                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1668                    notify_ellipsize_set_trampoline::<Self, F> as *const (),
1669                )),
1670                Box_::into_raw(f),
1671            )
1672        }
1673    }
1674
1675    #[doc(alias = "family")]
1676    fn connect_family_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1677        unsafe extern "C" fn notify_family_trampoline<
1678            P: IsA<CellRendererText>,
1679            F: Fn(&P) + 'static,
1680        >(
1681            this: *mut ffi::GtkCellRendererText,
1682            _param_spec: glib::ffi::gpointer,
1683            f: glib::ffi::gpointer,
1684        ) {
1685            unsafe {
1686                let f: &F = &*(f as *const F);
1687                f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
1688            }
1689        }
1690        unsafe {
1691            let f: Box_<F> = Box_::new(f);
1692            connect_raw(
1693                self.as_ptr() as *mut _,
1694                c"notify::family".as_ptr(),
1695                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1696                    notify_family_trampoline::<Self, F> as *const (),
1697                )),
1698                Box_::into_raw(f),
1699            )
1700        }
1701    }
1702
1703    #[doc(alias = "family-set")]
1704    fn connect_family_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1705        unsafe extern "C" fn notify_family_set_trampoline<
1706            P: IsA<CellRendererText>,
1707            F: Fn(&P) + 'static,
1708        >(
1709            this: *mut ffi::GtkCellRendererText,
1710            _param_spec: glib::ffi::gpointer,
1711            f: glib::ffi::gpointer,
1712        ) {
1713            unsafe {
1714                let f: &F = &*(f as *const F);
1715                f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
1716            }
1717        }
1718        unsafe {
1719            let f: Box_<F> = Box_::new(f);
1720            connect_raw(
1721                self.as_ptr() as *mut _,
1722                c"notify::family-set".as_ptr(),
1723                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1724                    notify_family_set_trampoline::<Self, F> as *const (),
1725                )),
1726                Box_::into_raw(f),
1727            )
1728        }
1729    }
1730
1731    #[doc(alias = "font")]
1732    fn connect_font_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1733        unsafe extern "C" fn notify_font_trampoline<
1734            P: IsA<CellRendererText>,
1735            F: Fn(&P) + 'static,
1736        >(
1737            this: *mut ffi::GtkCellRendererText,
1738            _param_spec: glib::ffi::gpointer,
1739            f: glib::ffi::gpointer,
1740        ) {
1741            unsafe {
1742                let f: &F = &*(f as *const F);
1743                f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
1744            }
1745        }
1746        unsafe {
1747            let f: Box_<F> = Box_::new(f);
1748            connect_raw(
1749                self.as_ptr() as *mut _,
1750                c"notify::font".as_ptr(),
1751                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1752                    notify_font_trampoline::<Self, F> as *const (),
1753                )),
1754                Box_::into_raw(f),
1755            )
1756        }
1757    }
1758
1759    #[doc(alias = "font-desc")]
1760    fn connect_font_desc_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1761        unsafe extern "C" fn notify_font_desc_trampoline<
1762            P: IsA<CellRendererText>,
1763            F: Fn(&P) + 'static,
1764        >(
1765            this: *mut ffi::GtkCellRendererText,
1766            _param_spec: glib::ffi::gpointer,
1767            f: glib::ffi::gpointer,
1768        ) {
1769            unsafe {
1770                let f: &F = &*(f as *const F);
1771                f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
1772            }
1773        }
1774        unsafe {
1775            let f: Box_<F> = Box_::new(f);
1776            connect_raw(
1777                self.as_ptr() as *mut _,
1778                c"notify::font-desc".as_ptr(),
1779                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1780                    notify_font_desc_trampoline::<Self, F> as *const (),
1781                )),
1782                Box_::into_raw(f),
1783            )
1784        }
1785    }
1786
1787    #[doc(alias = "foreground")]
1788    fn connect_foreground_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1789        unsafe extern "C" fn notify_foreground_trampoline<
1790            P: IsA<CellRendererText>,
1791            F: Fn(&P) + 'static,
1792        >(
1793            this: *mut ffi::GtkCellRendererText,
1794            _param_spec: glib::ffi::gpointer,
1795            f: glib::ffi::gpointer,
1796        ) {
1797            unsafe {
1798                let f: &F = &*(f as *const F);
1799                f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
1800            }
1801        }
1802        unsafe {
1803            let f: Box_<F> = Box_::new(f);
1804            connect_raw(
1805                self.as_ptr() as *mut _,
1806                c"notify::foreground".as_ptr(),
1807                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1808                    notify_foreground_trampoline::<Self, F> as *const (),
1809                )),
1810                Box_::into_raw(f),
1811            )
1812        }
1813    }
1814
1815    #[doc(alias = "foreground-rgba")]
1816    fn connect_foreground_rgba_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1817        unsafe extern "C" fn notify_foreground_rgba_trampoline<
1818            P: IsA<CellRendererText>,
1819            F: Fn(&P) + 'static,
1820        >(
1821            this: *mut ffi::GtkCellRendererText,
1822            _param_spec: glib::ffi::gpointer,
1823            f: glib::ffi::gpointer,
1824        ) {
1825            unsafe {
1826                let f: &F = &*(f as *const F);
1827                f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
1828            }
1829        }
1830        unsafe {
1831            let f: Box_<F> = Box_::new(f);
1832            connect_raw(
1833                self.as_ptr() as *mut _,
1834                c"notify::foreground-rgba".as_ptr(),
1835                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1836                    notify_foreground_rgba_trampoline::<Self, F> as *const (),
1837                )),
1838                Box_::into_raw(f),
1839            )
1840        }
1841    }
1842
1843    #[doc(alias = "foreground-set")]
1844    fn connect_foreground_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1845        unsafe extern "C" fn notify_foreground_set_trampoline<
1846            P: IsA<CellRendererText>,
1847            F: Fn(&P) + 'static,
1848        >(
1849            this: *mut ffi::GtkCellRendererText,
1850            _param_spec: glib::ffi::gpointer,
1851            f: glib::ffi::gpointer,
1852        ) {
1853            unsafe {
1854                let f: &F = &*(f as *const F);
1855                f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
1856            }
1857        }
1858        unsafe {
1859            let f: Box_<F> = Box_::new(f);
1860            connect_raw(
1861                self.as_ptr() as *mut _,
1862                c"notify::foreground-set".as_ptr(),
1863                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1864                    notify_foreground_set_trampoline::<Self, F> as *const (),
1865                )),
1866                Box_::into_raw(f),
1867            )
1868        }
1869    }
1870
1871    #[doc(alias = "language")]
1872    fn connect_language_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1873        unsafe extern "C" fn notify_language_trampoline<
1874            P: IsA<CellRendererText>,
1875            F: Fn(&P) + 'static,
1876        >(
1877            this: *mut ffi::GtkCellRendererText,
1878            _param_spec: glib::ffi::gpointer,
1879            f: glib::ffi::gpointer,
1880        ) {
1881            unsafe {
1882                let f: &F = &*(f as *const F);
1883                f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
1884            }
1885        }
1886        unsafe {
1887            let f: Box_<F> = Box_::new(f);
1888            connect_raw(
1889                self.as_ptr() as *mut _,
1890                c"notify::language".as_ptr(),
1891                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1892                    notify_language_trampoline::<Self, F> as *const (),
1893                )),
1894                Box_::into_raw(f),
1895            )
1896        }
1897    }
1898
1899    #[doc(alias = "language-set")]
1900    fn connect_language_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1901        unsafe extern "C" fn notify_language_set_trampoline<
1902            P: IsA<CellRendererText>,
1903            F: Fn(&P) + 'static,
1904        >(
1905            this: *mut ffi::GtkCellRendererText,
1906            _param_spec: glib::ffi::gpointer,
1907            f: glib::ffi::gpointer,
1908        ) {
1909            unsafe {
1910                let f: &F = &*(f as *const F);
1911                f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
1912            }
1913        }
1914        unsafe {
1915            let f: Box_<F> = Box_::new(f);
1916            connect_raw(
1917                self.as_ptr() as *mut _,
1918                c"notify::language-set".as_ptr(),
1919                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1920                    notify_language_set_trampoline::<Self, F> as *const (),
1921                )),
1922                Box_::into_raw(f),
1923            )
1924        }
1925    }
1926
1927    #[doc(alias = "markup")]
1928    fn connect_markup_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1929        unsafe extern "C" fn notify_markup_trampoline<
1930            P: IsA<CellRendererText>,
1931            F: Fn(&P) + 'static,
1932        >(
1933            this: *mut ffi::GtkCellRendererText,
1934            _param_spec: glib::ffi::gpointer,
1935            f: glib::ffi::gpointer,
1936        ) {
1937            unsafe {
1938                let f: &F = &*(f as *const F);
1939                f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
1940            }
1941        }
1942        unsafe {
1943            let f: Box_<F> = Box_::new(f);
1944            connect_raw(
1945                self.as_ptr() as *mut _,
1946                c"notify::markup".as_ptr(),
1947                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1948                    notify_markup_trampoline::<Self, F> as *const (),
1949                )),
1950                Box_::into_raw(f),
1951            )
1952        }
1953    }
1954
1955    #[doc(alias = "max-width-chars")]
1956    fn connect_max_width_chars_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1957        unsafe extern "C" fn notify_max_width_chars_trampoline<
1958            P: IsA<CellRendererText>,
1959            F: Fn(&P) + 'static,
1960        >(
1961            this: *mut ffi::GtkCellRendererText,
1962            _param_spec: glib::ffi::gpointer,
1963            f: glib::ffi::gpointer,
1964        ) {
1965            unsafe {
1966                let f: &F = &*(f as *const F);
1967                f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
1968            }
1969        }
1970        unsafe {
1971            let f: Box_<F> = Box_::new(f);
1972            connect_raw(
1973                self.as_ptr() as *mut _,
1974                c"notify::max-width-chars".as_ptr(),
1975                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1976                    notify_max_width_chars_trampoline::<Self, F> as *const (),
1977                )),
1978                Box_::into_raw(f),
1979            )
1980        }
1981    }
1982
1983    #[doc(alias = "placeholder-text")]
1984    fn connect_placeholder_text_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1985        unsafe extern "C" fn notify_placeholder_text_trampoline<
1986            P: IsA<CellRendererText>,
1987            F: Fn(&P) + 'static,
1988        >(
1989            this: *mut ffi::GtkCellRendererText,
1990            _param_spec: glib::ffi::gpointer,
1991            f: glib::ffi::gpointer,
1992        ) {
1993            unsafe {
1994                let f: &F = &*(f as *const F);
1995                f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
1996            }
1997        }
1998        unsafe {
1999            let f: Box_<F> = Box_::new(f);
2000            connect_raw(
2001                self.as_ptr() as *mut _,
2002                c"notify::placeholder-text".as_ptr(),
2003                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2004                    notify_placeholder_text_trampoline::<Self, F> as *const (),
2005                )),
2006                Box_::into_raw(f),
2007            )
2008        }
2009    }
2010
2011    #[doc(alias = "rise")]
2012    fn connect_rise_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2013        unsafe extern "C" fn notify_rise_trampoline<
2014            P: IsA<CellRendererText>,
2015            F: Fn(&P) + 'static,
2016        >(
2017            this: *mut ffi::GtkCellRendererText,
2018            _param_spec: glib::ffi::gpointer,
2019            f: glib::ffi::gpointer,
2020        ) {
2021            unsafe {
2022                let f: &F = &*(f as *const F);
2023                f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
2024            }
2025        }
2026        unsafe {
2027            let f: Box_<F> = Box_::new(f);
2028            connect_raw(
2029                self.as_ptr() as *mut _,
2030                c"notify::rise".as_ptr(),
2031                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2032                    notify_rise_trampoline::<Self, F> as *const (),
2033                )),
2034                Box_::into_raw(f),
2035            )
2036        }
2037    }
2038
2039    #[doc(alias = "rise-set")]
2040    fn connect_rise_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2041        unsafe extern "C" fn notify_rise_set_trampoline<
2042            P: IsA<CellRendererText>,
2043            F: Fn(&P) + 'static,
2044        >(
2045            this: *mut ffi::GtkCellRendererText,
2046            _param_spec: glib::ffi::gpointer,
2047            f: glib::ffi::gpointer,
2048        ) {
2049            unsafe {
2050                let f: &F = &*(f as *const F);
2051                f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
2052            }
2053        }
2054        unsafe {
2055            let f: Box_<F> = Box_::new(f);
2056            connect_raw(
2057                self.as_ptr() as *mut _,
2058                c"notify::rise-set".as_ptr(),
2059                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2060                    notify_rise_set_trampoline::<Self, F> as *const (),
2061                )),
2062                Box_::into_raw(f),
2063            )
2064        }
2065    }
2066
2067    #[doc(alias = "scale")]
2068    fn connect_scale_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2069        unsafe extern "C" fn notify_scale_trampoline<
2070            P: IsA<CellRendererText>,
2071            F: Fn(&P) + 'static,
2072        >(
2073            this: *mut ffi::GtkCellRendererText,
2074            _param_spec: glib::ffi::gpointer,
2075            f: glib::ffi::gpointer,
2076        ) {
2077            unsafe {
2078                let f: &F = &*(f as *const F);
2079                f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
2080            }
2081        }
2082        unsafe {
2083            let f: Box_<F> = Box_::new(f);
2084            connect_raw(
2085                self.as_ptr() as *mut _,
2086                c"notify::scale".as_ptr(),
2087                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2088                    notify_scale_trampoline::<Self, F> as *const (),
2089                )),
2090                Box_::into_raw(f),
2091            )
2092        }
2093    }
2094
2095    #[doc(alias = "scale-set")]
2096    fn connect_scale_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2097        unsafe extern "C" fn notify_scale_set_trampoline<
2098            P: IsA<CellRendererText>,
2099            F: Fn(&P) + 'static,
2100        >(
2101            this: *mut ffi::GtkCellRendererText,
2102            _param_spec: glib::ffi::gpointer,
2103            f: glib::ffi::gpointer,
2104        ) {
2105            unsafe {
2106                let f: &F = &*(f as *const F);
2107                f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
2108            }
2109        }
2110        unsafe {
2111            let f: Box_<F> = Box_::new(f);
2112            connect_raw(
2113                self.as_ptr() as *mut _,
2114                c"notify::scale-set".as_ptr(),
2115                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2116                    notify_scale_set_trampoline::<Self, F> as *const (),
2117                )),
2118                Box_::into_raw(f),
2119            )
2120        }
2121    }
2122
2123    #[doc(alias = "single-paragraph-mode")]
2124    fn connect_single_paragraph_mode_notify<F: Fn(&Self) + 'static>(
2125        &self,
2126        f: F,
2127    ) -> SignalHandlerId {
2128        unsafe extern "C" fn notify_single_paragraph_mode_trampoline<
2129            P: IsA<CellRendererText>,
2130            F: Fn(&P) + 'static,
2131        >(
2132            this: *mut ffi::GtkCellRendererText,
2133            _param_spec: glib::ffi::gpointer,
2134            f: glib::ffi::gpointer,
2135        ) {
2136            unsafe {
2137                let f: &F = &*(f as *const F);
2138                f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
2139            }
2140        }
2141        unsafe {
2142            let f: Box_<F> = Box_::new(f);
2143            connect_raw(
2144                self.as_ptr() as *mut _,
2145                c"notify::single-paragraph-mode".as_ptr(),
2146                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2147                    notify_single_paragraph_mode_trampoline::<Self, F> as *const (),
2148                )),
2149                Box_::into_raw(f),
2150            )
2151        }
2152    }
2153
2154    #[doc(alias = "size")]
2155    fn connect_size_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2156        unsafe extern "C" fn notify_size_trampoline<
2157            P: IsA<CellRendererText>,
2158            F: Fn(&P) + 'static,
2159        >(
2160            this: *mut ffi::GtkCellRendererText,
2161            _param_spec: glib::ffi::gpointer,
2162            f: glib::ffi::gpointer,
2163        ) {
2164            unsafe {
2165                let f: &F = &*(f as *const F);
2166                f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
2167            }
2168        }
2169        unsafe {
2170            let f: Box_<F> = Box_::new(f);
2171            connect_raw(
2172                self.as_ptr() as *mut _,
2173                c"notify::size".as_ptr(),
2174                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2175                    notify_size_trampoline::<Self, F> as *const (),
2176                )),
2177                Box_::into_raw(f),
2178            )
2179        }
2180    }
2181
2182    #[doc(alias = "size-points")]
2183    fn connect_size_points_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2184        unsafe extern "C" fn notify_size_points_trampoline<
2185            P: IsA<CellRendererText>,
2186            F: Fn(&P) + 'static,
2187        >(
2188            this: *mut ffi::GtkCellRendererText,
2189            _param_spec: glib::ffi::gpointer,
2190            f: glib::ffi::gpointer,
2191        ) {
2192            unsafe {
2193                let f: &F = &*(f as *const F);
2194                f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
2195            }
2196        }
2197        unsafe {
2198            let f: Box_<F> = Box_::new(f);
2199            connect_raw(
2200                self.as_ptr() as *mut _,
2201                c"notify::size-points".as_ptr(),
2202                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2203                    notify_size_points_trampoline::<Self, F> as *const (),
2204                )),
2205                Box_::into_raw(f),
2206            )
2207        }
2208    }
2209
2210    #[doc(alias = "size-set")]
2211    fn connect_size_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2212        unsafe extern "C" fn notify_size_set_trampoline<
2213            P: IsA<CellRendererText>,
2214            F: Fn(&P) + 'static,
2215        >(
2216            this: *mut ffi::GtkCellRendererText,
2217            _param_spec: glib::ffi::gpointer,
2218            f: glib::ffi::gpointer,
2219        ) {
2220            unsafe {
2221                let f: &F = &*(f as *const F);
2222                f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
2223            }
2224        }
2225        unsafe {
2226            let f: Box_<F> = Box_::new(f);
2227            connect_raw(
2228                self.as_ptr() as *mut _,
2229                c"notify::size-set".as_ptr(),
2230                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2231                    notify_size_set_trampoline::<Self, F> as *const (),
2232                )),
2233                Box_::into_raw(f),
2234            )
2235        }
2236    }
2237
2238    #[doc(alias = "stretch")]
2239    fn connect_stretch_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2240        unsafe extern "C" fn notify_stretch_trampoline<
2241            P: IsA<CellRendererText>,
2242            F: Fn(&P) + 'static,
2243        >(
2244            this: *mut ffi::GtkCellRendererText,
2245            _param_spec: glib::ffi::gpointer,
2246            f: glib::ffi::gpointer,
2247        ) {
2248            unsafe {
2249                let f: &F = &*(f as *const F);
2250                f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
2251            }
2252        }
2253        unsafe {
2254            let f: Box_<F> = Box_::new(f);
2255            connect_raw(
2256                self.as_ptr() as *mut _,
2257                c"notify::stretch".as_ptr(),
2258                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2259                    notify_stretch_trampoline::<Self, F> as *const (),
2260                )),
2261                Box_::into_raw(f),
2262            )
2263        }
2264    }
2265
2266    #[doc(alias = "stretch-set")]
2267    fn connect_stretch_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2268        unsafe extern "C" fn notify_stretch_set_trampoline<
2269            P: IsA<CellRendererText>,
2270            F: Fn(&P) + 'static,
2271        >(
2272            this: *mut ffi::GtkCellRendererText,
2273            _param_spec: glib::ffi::gpointer,
2274            f: glib::ffi::gpointer,
2275        ) {
2276            unsafe {
2277                let f: &F = &*(f as *const F);
2278                f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
2279            }
2280        }
2281        unsafe {
2282            let f: Box_<F> = Box_::new(f);
2283            connect_raw(
2284                self.as_ptr() as *mut _,
2285                c"notify::stretch-set".as_ptr(),
2286                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2287                    notify_stretch_set_trampoline::<Self, F> as *const (),
2288                )),
2289                Box_::into_raw(f),
2290            )
2291        }
2292    }
2293
2294    #[doc(alias = "strikethrough")]
2295    fn connect_strikethrough_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2296        unsafe extern "C" fn notify_strikethrough_trampoline<
2297            P: IsA<CellRendererText>,
2298            F: Fn(&P) + 'static,
2299        >(
2300            this: *mut ffi::GtkCellRendererText,
2301            _param_spec: glib::ffi::gpointer,
2302            f: glib::ffi::gpointer,
2303        ) {
2304            unsafe {
2305                let f: &F = &*(f as *const F);
2306                f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
2307            }
2308        }
2309        unsafe {
2310            let f: Box_<F> = Box_::new(f);
2311            connect_raw(
2312                self.as_ptr() as *mut _,
2313                c"notify::strikethrough".as_ptr(),
2314                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2315                    notify_strikethrough_trampoline::<Self, F> as *const (),
2316                )),
2317                Box_::into_raw(f),
2318            )
2319        }
2320    }
2321
2322    #[doc(alias = "strikethrough-set")]
2323    fn connect_strikethrough_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2324        unsafe extern "C" fn notify_strikethrough_set_trampoline<
2325            P: IsA<CellRendererText>,
2326            F: Fn(&P) + 'static,
2327        >(
2328            this: *mut ffi::GtkCellRendererText,
2329            _param_spec: glib::ffi::gpointer,
2330            f: glib::ffi::gpointer,
2331        ) {
2332            unsafe {
2333                let f: &F = &*(f as *const F);
2334                f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
2335            }
2336        }
2337        unsafe {
2338            let f: Box_<F> = Box_::new(f);
2339            connect_raw(
2340                self.as_ptr() as *mut _,
2341                c"notify::strikethrough-set".as_ptr(),
2342                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2343                    notify_strikethrough_set_trampoline::<Self, F> as *const (),
2344                )),
2345                Box_::into_raw(f),
2346            )
2347        }
2348    }
2349
2350    #[doc(alias = "style")]
2351    fn connect_style_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2352        unsafe extern "C" fn notify_style_trampoline<
2353            P: IsA<CellRendererText>,
2354            F: Fn(&P) + 'static,
2355        >(
2356            this: *mut ffi::GtkCellRendererText,
2357            _param_spec: glib::ffi::gpointer,
2358            f: glib::ffi::gpointer,
2359        ) {
2360            unsafe {
2361                let f: &F = &*(f as *const F);
2362                f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
2363            }
2364        }
2365        unsafe {
2366            let f: Box_<F> = Box_::new(f);
2367            connect_raw(
2368                self.as_ptr() as *mut _,
2369                c"notify::style".as_ptr(),
2370                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2371                    notify_style_trampoline::<Self, F> as *const (),
2372                )),
2373                Box_::into_raw(f),
2374            )
2375        }
2376    }
2377
2378    #[doc(alias = "style-set")]
2379    fn connect_style_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2380        unsafe extern "C" fn notify_style_set_trampoline<
2381            P: IsA<CellRendererText>,
2382            F: Fn(&P) + 'static,
2383        >(
2384            this: *mut ffi::GtkCellRendererText,
2385            _param_spec: glib::ffi::gpointer,
2386            f: glib::ffi::gpointer,
2387        ) {
2388            unsafe {
2389                let f: &F = &*(f as *const F);
2390                f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
2391            }
2392        }
2393        unsafe {
2394            let f: Box_<F> = Box_::new(f);
2395            connect_raw(
2396                self.as_ptr() as *mut _,
2397                c"notify::style-set".as_ptr(),
2398                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2399                    notify_style_set_trampoline::<Self, F> as *const (),
2400                )),
2401                Box_::into_raw(f),
2402            )
2403        }
2404    }
2405
2406    #[doc(alias = "text")]
2407    fn connect_text_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2408        unsafe extern "C" fn notify_text_trampoline<
2409            P: IsA<CellRendererText>,
2410            F: Fn(&P) + 'static,
2411        >(
2412            this: *mut ffi::GtkCellRendererText,
2413            _param_spec: glib::ffi::gpointer,
2414            f: glib::ffi::gpointer,
2415        ) {
2416            unsafe {
2417                let f: &F = &*(f as *const F);
2418                f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
2419            }
2420        }
2421        unsafe {
2422            let f: Box_<F> = Box_::new(f);
2423            connect_raw(
2424                self.as_ptr() as *mut _,
2425                c"notify::text".as_ptr(),
2426                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2427                    notify_text_trampoline::<Self, F> as *const (),
2428                )),
2429                Box_::into_raw(f),
2430            )
2431        }
2432    }
2433
2434    #[doc(alias = "underline")]
2435    fn connect_underline_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2436        unsafe extern "C" fn notify_underline_trampoline<
2437            P: IsA<CellRendererText>,
2438            F: Fn(&P) + 'static,
2439        >(
2440            this: *mut ffi::GtkCellRendererText,
2441            _param_spec: glib::ffi::gpointer,
2442            f: glib::ffi::gpointer,
2443        ) {
2444            unsafe {
2445                let f: &F = &*(f as *const F);
2446                f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
2447            }
2448        }
2449        unsafe {
2450            let f: Box_<F> = Box_::new(f);
2451            connect_raw(
2452                self.as_ptr() as *mut _,
2453                c"notify::underline".as_ptr(),
2454                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2455                    notify_underline_trampoline::<Self, F> as *const (),
2456                )),
2457                Box_::into_raw(f),
2458            )
2459        }
2460    }
2461
2462    #[doc(alias = "underline-set")]
2463    fn connect_underline_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2464        unsafe extern "C" fn notify_underline_set_trampoline<
2465            P: IsA<CellRendererText>,
2466            F: Fn(&P) + 'static,
2467        >(
2468            this: *mut ffi::GtkCellRendererText,
2469            _param_spec: glib::ffi::gpointer,
2470            f: glib::ffi::gpointer,
2471        ) {
2472            unsafe {
2473                let f: &F = &*(f as *const F);
2474                f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
2475            }
2476        }
2477        unsafe {
2478            let f: Box_<F> = Box_::new(f);
2479            connect_raw(
2480                self.as_ptr() as *mut _,
2481                c"notify::underline-set".as_ptr(),
2482                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2483                    notify_underline_set_trampoline::<Self, F> as *const (),
2484                )),
2485                Box_::into_raw(f),
2486            )
2487        }
2488    }
2489
2490    #[doc(alias = "variant")]
2491    fn connect_variant_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2492        unsafe extern "C" fn notify_variant_trampoline<
2493            P: IsA<CellRendererText>,
2494            F: Fn(&P) + 'static,
2495        >(
2496            this: *mut ffi::GtkCellRendererText,
2497            _param_spec: glib::ffi::gpointer,
2498            f: glib::ffi::gpointer,
2499        ) {
2500            unsafe {
2501                let f: &F = &*(f as *const F);
2502                f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
2503            }
2504        }
2505        unsafe {
2506            let f: Box_<F> = Box_::new(f);
2507            connect_raw(
2508                self.as_ptr() as *mut _,
2509                c"notify::variant".as_ptr(),
2510                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2511                    notify_variant_trampoline::<Self, F> as *const (),
2512                )),
2513                Box_::into_raw(f),
2514            )
2515        }
2516    }
2517
2518    #[doc(alias = "variant-set")]
2519    fn connect_variant_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2520        unsafe extern "C" fn notify_variant_set_trampoline<
2521            P: IsA<CellRendererText>,
2522            F: Fn(&P) + 'static,
2523        >(
2524            this: *mut ffi::GtkCellRendererText,
2525            _param_spec: glib::ffi::gpointer,
2526            f: glib::ffi::gpointer,
2527        ) {
2528            unsafe {
2529                let f: &F = &*(f as *const F);
2530                f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
2531            }
2532        }
2533        unsafe {
2534            let f: Box_<F> = Box_::new(f);
2535            connect_raw(
2536                self.as_ptr() as *mut _,
2537                c"notify::variant-set".as_ptr(),
2538                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2539                    notify_variant_set_trampoline::<Self, F> as *const (),
2540                )),
2541                Box_::into_raw(f),
2542            )
2543        }
2544    }
2545
2546    #[doc(alias = "weight")]
2547    fn connect_weight_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2548        unsafe extern "C" fn notify_weight_trampoline<
2549            P: IsA<CellRendererText>,
2550            F: Fn(&P) + 'static,
2551        >(
2552            this: *mut ffi::GtkCellRendererText,
2553            _param_spec: glib::ffi::gpointer,
2554            f: glib::ffi::gpointer,
2555        ) {
2556            unsafe {
2557                let f: &F = &*(f as *const F);
2558                f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
2559            }
2560        }
2561        unsafe {
2562            let f: Box_<F> = Box_::new(f);
2563            connect_raw(
2564                self.as_ptr() as *mut _,
2565                c"notify::weight".as_ptr(),
2566                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2567                    notify_weight_trampoline::<Self, F> as *const (),
2568                )),
2569                Box_::into_raw(f),
2570            )
2571        }
2572    }
2573
2574    #[doc(alias = "weight-set")]
2575    fn connect_weight_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2576        unsafe extern "C" fn notify_weight_set_trampoline<
2577            P: IsA<CellRendererText>,
2578            F: Fn(&P) + 'static,
2579        >(
2580            this: *mut ffi::GtkCellRendererText,
2581            _param_spec: glib::ffi::gpointer,
2582            f: glib::ffi::gpointer,
2583        ) {
2584            unsafe {
2585                let f: &F = &*(f as *const F);
2586                f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
2587            }
2588        }
2589        unsafe {
2590            let f: Box_<F> = Box_::new(f);
2591            connect_raw(
2592                self.as_ptr() as *mut _,
2593                c"notify::weight-set".as_ptr(),
2594                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2595                    notify_weight_set_trampoline::<Self, F> as *const (),
2596                )),
2597                Box_::into_raw(f),
2598            )
2599        }
2600    }
2601
2602    #[doc(alias = "width-chars")]
2603    fn connect_width_chars_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2604        unsafe extern "C" fn notify_width_chars_trampoline<
2605            P: IsA<CellRendererText>,
2606            F: Fn(&P) + 'static,
2607        >(
2608            this: *mut ffi::GtkCellRendererText,
2609            _param_spec: glib::ffi::gpointer,
2610            f: glib::ffi::gpointer,
2611        ) {
2612            unsafe {
2613                let f: &F = &*(f as *const F);
2614                f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
2615            }
2616        }
2617        unsafe {
2618            let f: Box_<F> = Box_::new(f);
2619            connect_raw(
2620                self.as_ptr() as *mut _,
2621                c"notify::width-chars".as_ptr(),
2622                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2623                    notify_width_chars_trampoline::<Self, F> as *const (),
2624                )),
2625                Box_::into_raw(f),
2626            )
2627        }
2628    }
2629
2630    #[doc(alias = "wrap-mode")]
2631    fn connect_wrap_mode_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2632        unsafe extern "C" fn notify_wrap_mode_trampoline<
2633            P: IsA<CellRendererText>,
2634            F: Fn(&P) + 'static,
2635        >(
2636            this: *mut ffi::GtkCellRendererText,
2637            _param_spec: glib::ffi::gpointer,
2638            f: glib::ffi::gpointer,
2639        ) {
2640            unsafe {
2641                let f: &F = &*(f as *const F);
2642                f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
2643            }
2644        }
2645        unsafe {
2646            let f: Box_<F> = Box_::new(f);
2647            connect_raw(
2648                self.as_ptr() as *mut _,
2649                c"notify::wrap-mode".as_ptr(),
2650                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2651                    notify_wrap_mode_trampoline::<Self, F> as *const (),
2652                )),
2653                Box_::into_raw(f),
2654            )
2655        }
2656    }
2657
2658    #[doc(alias = "wrap-width")]
2659    fn connect_wrap_width_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2660        unsafe extern "C" fn notify_wrap_width_trampoline<
2661            P: IsA<CellRendererText>,
2662            F: Fn(&P) + 'static,
2663        >(
2664            this: *mut ffi::GtkCellRendererText,
2665            _param_spec: glib::ffi::gpointer,
2666            f: glib::ffi::gpointer,
2667        ) {
2668            unsafe {
2669                let f: &F = &*(f as *const F);
2670                f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
2671            }
2672        }
2673        unsafe {
2674            let f: Box_<F> = Box_::new(f);
2675            connect_raw(
2676                self.as_ptr() as *mut _,
2677                c"notify::wrap-width".as_ptr(),
2678                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2679                    notify_wrap_width_trampoline::<Self, F> as *const (),
2680                )),
2681                Box_::into_raw(f),
2682            )
2683        }
2684    }
2685}
2686
2687impl<O: IsA<CellRendererText>> CellRendererTextExt for O {}