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