Skip to main content

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