Skip to main content

gtk/auto/
text_tag.rs

1// This file was generated by gir (https://github.com/gtk-rs/gir)
2// from gir-files (https://github.com/gtk-rs/gir-files)
3// DO NOT EDIT
4
5use crate::{Justification, TextDirection, TextIter, WrapMode, ffi};
6use glib::{
7    object::ObjectType as _,
8    prelude::*,
9    signal::{SignalHandlerId, connect_raw},
10    translate::*,
11};
12use std::boxed::Box as Box_;
13
14glib::wrapper! {
15    /// You may wish to begin by reading the
16    /// [text widget conceptual overview](TextWidget.html)
17    /// which gives an overview of all the objects and
18    /// data types related to the text widget and how they work together.
19    ///
20    /// Tags should be in the [`TextTagTable`][crate::TextTagTable] for a given [`TextBuffer`][crate::TextBuffer]
21    /// before using them with that buffer.
22    ///
23    /// `gtk_text_buffer_create_tag()` is the best way to create tags.
24    /// See “gtk3-demo” for numerous examples.
25    ///
26    /// For each property of [`TextTag`][crate::TextTag], there is a “set” property, e.g.
27    /// “font-set” corresponds to “font”. These “set” properties reflect
28    /// whether a property has been set or not.
29    /// They are maintained by GTK+ and you should not set them independently.
30    ///
31    /// ## Properties
32    ///
33    ///
34    /// #### `accumulative-margin`
35    ///  Whether the margins accumulate or override each other.
36    ///
37    /// When set to [`true`] the margins of this tag are added to the margins
38    /// of any other non-accumulative margins present. When set to [`false`]
39    /// the margins override one another (the default).
40    ///
41    /// Readable | Writable
42    ///
43    ///
44    /// #### `background`
45    ///  Writable
46    ///
47    ///
48    /// #### `background-full-height`
49    ///  Readable | Writable
50    ///
51    ///
52    /// #### `background-full-height-set`
53    ///  Readable | Writable
54    ///
55    ///
56    /// #### `background-gdk`
57    ///  Background color as a `GdkColor`.
58    ///
59    /// Readable | Writable
60    ///
61    ///
62    /// #### `background-rgba`
63    ///  Background color as a [`gdk::RGBA`][crate::gdk::RGBA].
64    ///
65    /// Readable | Writable
66    ///
67    ///
68    /// #### `background-set`
69    ///  Readable | Writable
70    ///
71    ///
72    /// #### `direction`
73    ///  Readable | Writable
74    ///
75    ///
76    /// #### `editable`
77    ///  Readable | Writable
78    ///
79    ///
80    /// #### `editable-set`
81    ///  Readable | Writable
82    ///
83    ///
84    /// #### `fallback`
85    ///  Whether font fallback is enabled.
86    ///
87    /// When set to [`true`], other fonts will be substituted
88    /// where the current font is missing glyphs.
89    ///
90    /// Readable | Writable
91    ///
92    ///
93    /// #### `fallback-set`
94    ///  Readable | Writable
95    ///
96    ///
97    /// #### `family`
98    ///  Readable | Writable
99    ///
100    ///
101    /// #### `family-set`
102    ///  Readable | Writable
103    ///
104    ///
105    /// #### `font`
106    ///  Font description as string, e.g. \"Sans Italic 12\".
107    ///
108    /// Note that the initial value of this property depends on
109    /// the internals of [`pango::FontDescription`][crate::pango::FontDescription].
110    ///
111    /// Readable | Writable
112    ///
113    ///
114    /// #### `font-desc`
115    ///  Readable | Writable
116    ///
117    ///
118    /// #### `font-features`
119    ///  OpenType font features, as a string.
120    ///
121    /// Readable | Writable
122    ///
123    ///
124    /// #### `font-features-set`
125    ///  Readable | Writable
126    ///
127    ///
128    /// #### `foreground`
129    ///  Writable
130    ///
131    ///
132    /// #### `foreground-gdk`
133    ///  Foreground color as a `GdkColor`.
134    ///
135    /// Readable | Writable
136    ///
137    ///
138    /// #### `foreground-rgba`
139    ///  Foreground color as a [`gdk::RGBA`][crate::gdk::RGBA].
140    ///
141    /// Readable | Writable
142    ///
143    ///
144    /// #### `foreground-set`
145    ///  Readable | Writable
146    ///
147    ///
148    /// #### `indent`
149    ///  Readable | Writable
150    ///
151    ///
152    /// #### `indent-set`
153    ///  Readable | Writable
154    ///
155    ///
156    /// #### `invisible`
157    ///  Whether this text is hidden.
158    ///
159    /// Note that there may still be problems with the support for invisible
160    /// text, in particular when navigating programmatically inside a buffer
161    /// containing invisible segments.
162    ///
163    /// Readable | Writable
164    ///
165    ///
166    /// #### `invisible-set`
167    ///  Readable | Writable
168    ///
169    ///
170    /// #### `justification`
171    ///  Readable | Writable
172    ///
173    ///
174    /// #### `justification-set`
175    ///  Readable | Writable
176    ///
177    ///
178    /// #### `language`
179    ///  The language this text is in, as an ISO code. Pango can use this as a
180    /// hint when rendering the text. If not set, an appropriate default will be
181    /// used.
182    ///
183    /// Note that the initial value of this property depends on the current
184    /// locale, see also [`default_language()`][crate::default_language()].
185    ///
186    /// Readable | Writable
187    ///
188    ///
189    /// #### `language-set`
190    ///  Readable | Writable
191    ///
192    ///
193    /// #### `left-margin`
194    ///  Readable | Writable
195    ///
196    ///
197    /// #### `left-margin-set`
198    ///  Readable | Writable
199    ///
200    ///
201    /// #### `letter-spacing`
202    ///  Extra spacing between graphemes, in Pango units.
203    ///
204    /// Readable | Writable
205    ///
206    ///
207    /// #### `letter-spacing-set`
208    ///  Readable | Writable
209    ///
210    ///
211    /// #### `name`
212    ///  Readable | Writable | Construct Only
213    ///
214    ///
215    /// #### `paragraph-background`
216    ///  The paragraph background color as a string.
217    ///
218    /// Writable
219    ///
220    ///
221    /// #### `paragraph-background-gdk`
222    ///  The paragraph background color as a `GdkColor`.
223    ///
224    /// Readable | Writable
225    ///
226    ///
227    /// #### `paragraph-background-rgba`
228    ///  The paragraph background color as a [`gdk::RGBA`][crate::gdk::RGBA].
229    ///
230    /// Readable | Writable
231    ///
232    ///
233    /// #### `paragraph-background-set`
234    ///  Readable | Writable
235    ///
236    ///
237    /// #### `pixels-above-lines`
238    ///  Readable | Writable
239    ///
240    ///
241    /// #### `pixels-above-lines-set`
242    ///  Readable | Writable
243    ///
244    ///
245    /// #### `pixels-below-lines`
246    ///  Readable | Writable
247    ///
248    ///
249    /// #### `pixels-below-lines-set`
250    ///  Readable | Writable
251    ///
252    ///
253    /// #### `pixels-inside-wrap`
254    ///  Readable | Writable
255    ///
256    ///
257    /// #### `pixels-inside-wrap-set`
258    ///  Readable | Writable
259    ///
260    ///
261    /// #### `right-margin`
262    ///  Readable | Writable
263    ///
264    ///
265    /// #### `right-margin-set`
266    ///  Readable | Writable
267    ///
268    ///
269    /// #### `rise`
270    ///  Readable | Writable
271    ///
272    ///
273    /// #### `rise-set`
274    ///  Readable | Writable
275    ///
276    ///
277    /// #### `scale`
278    ///  Readable | Writable
279    ///
280    ///
281    /// #### `scale-set`
282    ///  Readable | Writable
283    ///
284    ///
285    /// #### `size`
286    ///  Readable | Writable
287    ///
288    ///
289    /// #### `size-points`
290    ///  Readable | Writable
291    ///
292    ///
293    /// #### `size-set`
294    ///  Readable | Writable
295    ///
296    ///
297    /// #### `stretch`
298    ///  Readable | Writable
299    ///
300    ///
301    /// #### `stretch-set`
302    ///  Readable | Writable
303    ///
304    ///
305    /// #### `strikethrough`
306    ///  Readable | Writable
307    ///
308    ///
309    /// #### `strikethrough-rgba`
310    ///  This property modifies the color of strikeouts. If not set, strikeouts
311    /// will use the forground color.
312    ///
313    /// Readable | Writable
314    ///
315    ///
316    /// #### `strikethrough-rgba-set`
317    ///  If the [`strikethrough-rgba`][struct@crate::TextTag#strikethrough-rgba] property has been set.
318    ///
319    /// Readable | Writable
320    ///
321    ///
322    /// #### `strikethrough-set`
323    ///  Readable | Writable
324    ///
325    ///
326    /// #### `style`
327    ///  Readable | Writable
328    ///
329    ///
330    /// #### `style-set`
331    ///  Readable | Writable
332    ///
333    ///
334    /// #### `tabs`
335    ///  Readable | Writable
336    ///
337    ///
338    /// #### `tabs-set`
339    ///  Readable | Writable
340    ///
341    ///
342    /// #### `underline`
343    ///  Readable | Writable
344    ///
345    ///
346    /// #### `underline-rgba`
347    ///  This property modifies the color of underlines. If not set, underlines
348    /// will use the forground color.
349    ///
350    /// If [`underline`][struct@crate::TextTag#underline] is set to [`pango::Underline::Error`][crate::pango::Underline::Error], an alternate
351    /// color may be applied instead of the foreground. Setting this property
352    /// will always override those defaults.
353    ///
354    /// Readable | Writable
355    ///
356    ///
357    /// #### `underline-rgba-set`
358    ///  If the [`underline-rgba`][struct@crate::TextTag#underline-rgba] property has been set.
359    ///
360    /// Readable | Writable
361    ///
362    ///
363    /// #### `underline-set`
364    ///  Readable | Writable
365    ///
366    ///
367    /// #### `variant`
368    ///  Readable | Writable
369    ///
370    ///
371    /// #### `variant-set`
372    ///  Readable | Writable
373    ///
374    ///
375    /// #### `weight`
376    ///  Readable | Writable
377    ///
378    ///
379    /// #### `weight-set`
380    ///  Readable | Writable
381    ///
382    ///
383    /// #### `wrap-mode`
384    ///  Readable | Writable
385    ///
386    ///
387    /// #### `wrap-mode-set`
388    ///  Readable | Writable
389    ///
390    /// ## Signals
391    ///
392    ///
393    /// #### `event`
394    ///  The ::event signal is emitted when an event occurs on a region of the
395    /// buffer marked with this tag.
396    ///
397    ///
398    ///
399    /// # Implements
400    ///
401    /// [`TextTagExt`][trait@crate::prelude::TextTagExt], [`trait@glib::ObjectExt`]
402    #[doc(alias = "GtkTextTag")]
403    pub struct TextTag(Object<ffi::GtkTextTag, ffi::GtkTextTagClass>);
404
405    match fn {
406        type_ => || ffi::gtk_text_tag_get_type(),
407    }
408}
409
410impl TextTag {
411    pub const NONE: Option<&'static TextTag> = None;
412
413    /// Creates a [`TextTag`][crate::TextTag]. Configure the tag using object arguments,
414    /// i.e. using [`ObjectExt::set()`][crate::glib::prelude::ObjectExt::set()].
415    /// ## `name`
416    /// tag name, or [`None`]
417    ///
418    /// # Returns
419    ///
420    /// a new [`TextTag`][crate::TextTag]
421    #[doc(alias = "gtk_text_tag_new")]
422    pub fn new(name: Option<&str>) -> TextTag {
423        assert_initialized_main_thread!();
424        unsafe { from_glib_full(ffi::gtk_text_tag_new(name.to_glib_none().0)) }
425    }
426
427    // rustdoc-stripper-ignore-next
428    /// Creates a new builder-pattern struct instance to construct [`TextTag`] objects.
429    ///
430    /// This method returns an instance of [`TextTagBuilder`](crate::builders::TextTagBuilder) which can be used to create [`TextTag`] objects.
431    pub fn builder() -> TextTagBuilder {
432        TextTagBuilder::new()
433    }
434}
435
436impl Default for TextTag {
437    fn default() -> Self {
438        glib::object::Object::new::<Self>()
439    }
440}
441
442// rustdoc-stripper-ignore-next
443/// A [builder-pattern] type to construct [`TextTag`] objects.
444///
445/// [builder-pattern]: https://doc.rust-lang.org/1.0.0/style/ownership/builders.html
446#[must_use = "The builder must be built to be used"]
447pub struct TextTagBuilder {
448    builder: glib::object::ObjectBuilder<'static, TextTag>,
449}
450
451impl TextTagBuilder {
452    fn new() -> Self {
453        Self {
454            builder: glib::object::Object::builder(),
455        }
456    }
457
458    /// Whether the margins accumulate or override each other.
459    ///
460    /// When set to [`true`] the margins of this tag are added to the margins
461    /// of any other non-accumulative margins present. When set to [`false`]
462    /// the margins override one another (the default).
463    pub fn accumulative_margin(self, accumulative_margin: bool) -> Self {
464        Self {
465            builder: self
466                .builder
467                .property("accumulative-margin", accumulative_margin),
468        }
469    }
470
471    pub fn background(self, background: impl Into<glib::GString>) -> Self {
472        Self {
473            builder: self.builder.property("background", background.into()),
474        }
475    }
476
477    pub fn background_full_height(self, background_full_height: bool) -> Self {
478        Self {
479            builder: self
480                .builder
481                .property("background-full-height", background_full_height),
482        }
483    }
484
485    pub fn background_full_height_set(self, background_full_height_set: bool) -> Self {
486        Self {
487            builder: self
488                .builder
489                .property("background-full-height-set", background_full_height_set),
490        }
491    }
492
493    /// Background color as a [`gdk::RGBA`][crate::gdk::RGBA].
494    pub fn background_rgba(self, background_rgba: &gdk::RGBA) -> Self {
495        Self {
496            builder: self.builder.property("background-rgba", background_rgba),
497        }
498    }
499
500    pub fn background_set(self, background_set: bool) -> Self {
501        Self {
502            builder: self.builder.property("background-set", background_set),
503        }
504    }
505
506    pub fn direction(self, direction: TextDirection) -> Self {
507        Self {
508            builder: self.builder.property("direction", direction),
509        }
510    }
511
512    pub fn editable(self, editable: bool) -> Self {
513        Self {
514            builder: self.builder.property("editable", editable),
515        }
516    }
517
518    pub fn editable_set(self, editable_set: bool) -> Self {
519        Self {
520            builder: self.builder.property("editable-set", editable_set),
521        }
522    }
523
524    /// Whether font fallback is enabled.
525    ///
526    /// When set to [`true`], other fonts will be substituted
527    /// where the current font is missing glyphs.
528    pub fn fallback(self, fallback: bool) -> Self {
529        Self {
530            builder: self.builder.property("fallback", fallback),
531        }
532    }
533
534    pub fn fallback_set(self, fallback_set: bool) -> Self {
535        Self {
536            builder: self.builder.property("fallback-set", fallback_set),
537        }
538    }
539
540    pub fn family(self, family: impl Into<glib::GString>) -> Self {
541        Self {
542            builder: self.builder.property("family", family.into()),
543        }
544    }
545
546    pub fn family_set(self, family_set: bool) -> Self {
547        Self {
548            builder: self.builder.property("family-set", family_set),
549        }
550    }
551
552    /// Font description as string, e.g. \"Sans Italic 12\".
553    ///
554    /// Note that the initial value of this property depends on
555    /// the internals of [`pango::FontDescription`][crate::pango::FontDescription].
556    pub fn font(self, font: impl Into<glib::GString>) -> Self {
557        Self {
558            builder: self.builder.property("font", font.into()),
559        }
560    }
561
562    pub fn font_desc(self, font_desc: &pango::FontDescription) -> Self {
563        Self {
564            builder: self.builder.property("font-desc", font_desc),
565        }
566    }
567
568    /// OpenType font features, as a string.
569    pub fn font_features(self, font_features: impl Into<glib::GString>) -> Self {
570        Self {
571            builder: self.builder.property("font-features", font_features.into()),
572        }
573    }
574
575    pub fn font_features_set(self, font_features_set: bool) -> Self {
576        Self {
577            builder: self
578                .builder
579                .property("font-features-set", font_features_set),
580        }
581    }
582
583    pub fn foreground(self, foreground: impl Into<glib::GString>) -> Self {
584        Self {
585            builder: self.builder.property("foreground", foreground.into()),
586        }
587    }
588
589    /// Foreground color as a [`gdk::RGBA`][crate::gdk::RGBA].
590    pub fn foreground_rgba(self, foreground_rgba: &gdk::RGBA) -> Self {
591        Self {
592            builder: self.builder.property("foreground-rgba", foreground_rgba),
593        }
594    }
595
596    pub fn foreground_set(self, foreground_set: bool) -> Self {
597        Self {
598            builder: self.builder.property("foreground-set", foreground_set),
599        }
600    }
601
602    pub fn indent(self, indent: i32) -> Self {
603        Self {
604            builder: self.builder.property("indent", indent),
605        }
606    }
607
608    pub fn indent_set(self, indent_set: bool) -> Self {
609        Self {
610            builder: self.builder.property("indent-set", indent_set),
611        }
612    }
613
614    /// Whether this text is hidden.
615    ///
616    /// Note that there may still be problems with the support for invisible
617    /// text, in particular when navigating programmatically inside a buffer
618    /// containing invisible segments.
619    pub fn invisible(self, invisible: bool) -> Self {
620        Self {
621            builder: self.builder.property("invisible", invisible),
622        }
623    }
624
625    pub fn invisible_set(self, invisible_set: bool) -> Self {
626        Self {
627            builder: self.builder.property("invisible-set", invisible_set),
628        }
629    }
630
631    pub fn justification(self, justification: Justification) -> Self {
632        Self {
633            builder: self.builder.property("justification", justification),
634        }
635    }
636
637    pub fn justification_set(self, justification_set: bool) -> Self {
638        Self {
639            builder: self
640                .builder
641                .property("justification-set", justification_set),
642        }
643    }
644
645    /// The language this text is in, as an ISO code. Pango can use this as a
646    /// hint when rendering the text. If not set, an appropriate default will be
647    /// used.
648    ///
649    /// Note that the initial value of this property depends on the current
650    /// locale, see also [`default_language()`][crate::default_language()].
651    pub fn language(self, language: impl Into<glib::GString>) -> Self {
652        Self {
653            builder: self.builder.property("language", language.into()),
654        }
655    }
656
657    pub fn language_set(self, language_set: bool) -> Self {
658        Self {
659            builder: self.builder.property("language-set", language_set),
660        }
661    }
662
663    pub fn left_margin(self, left_margin: i32) -> Self {
664        Self {
665            builder: self.builder.property("left-margin", left_margin),
666        }
667    }
668
669    pub fn left_margin_set(self, left_margin_set: bool) -> Self {
670        Self {
671            builder: self.builder.property("left-margin-set", left_margin_set),
672        }
673    }
674
675    /// Extra spacing between graphemes, in Pango units.
676    pub fn letter_spacing(self, letter_spacing: i32) -> Self {
677        Self {
678            builder: self.builder.property("letter-spacing", letter_spacing),
679        }
680    }
681
682    pub fn letter_spacing_set(self, letter_spacing_set: bool) -> Self {
683        Self {
684            builder: self
685                .builder
686                .property("letter-spacing-set", letter_spacing_set),
687        }
688    }
689
690    pub fn name(self, name: impl Into<glib::GString>) -> Self {
691        Self {
692            builder: self.builder.property("name", name.into()),
693        }
694    }
695
696    /// The paragraph background color as a string.
697    pub fn paragraph_background(self, paragraph_background: impl Into<glib::GString>) -> Self {
698        Self {
699            builder: self
700                .builder
701                .property("paragraph-background", paragraph_background.into()),
702        }
703    }
704
705    /// The paragraph background color as a [`gdk::RGBA`][crate::gdk::RGBA].
706    pub fn paragraph_background_rgba(self, paragraph_background_rgba: &gdk::RGBA) -> Self {
707        Self {
708            builder: self
709                .builder
710                .property("paragraph-background-rgba", paragraph_background_rgba),
711        }
712    }
713
714    pub fn paragraph_background_set(self, paragraph_background_set: bool) -> Self {
715        Self {
716            builder: self
717                .builder
718                .property("paragraph-background-set", paragraph_background_set),
719        }
720    }
721
722    pub fn pixels_above_lines(self, pixels_above_lines: i32) -> Self {
723        Self {
724            builder: self
725                .builder
726                .property("pixels-above-lines", pixels_above_lines),
727        }
728    }
729
730    pub fn pixels_above_lines_set(self, pixels_above_lines_set: bool) -> Self {
731        Self {
732            builder: self
733                .builder
734                .property("pixels-above-lines-set", pixels_above_lines_set),
735        }
736    }
737
738    pub fn pixels_below_lines(self, pixels_below_lines: i32) -> Self {
739        Self {
740            builder: self
741                .builder
742                .property("pixels-below-lines", pixels_below_lines),
743        }
744    }
745
746    pub fn pixels_below_lines_set(self, pixels_below_lines_set: bool) -> Self {
747        Self {
748            builder: self
749                .builder
750                .property("pixels-below-lines-set", pixels_below_lines_set),
751        }
752    }
753
754    pub fn pixels_inside_wrap(self, pixels_inside_wrap: i32) -> Self {
755        Self {
756            builder: self
757                .builder
758                .property("pixels-inside-wrap", pixels_inside_wrap),
759        }
760    }
761
762    pub fn pixels_inside_wrap_set(self, pixels_inside_wrap_set: bool) -> Self {
763        Self {
764            builder: self
765                .builder
766                .property("pixels-inside-wrap-set", pixels_inside_wrap_set),
767        }
768    }
769
770    pub fn right_margin(self, right_margin: i32) -> Self {
771        Self {
772            builder: self.builder.property("right-margin", right_margin),
773        }
774    }
775
776    pub fn right_margin_set(self, right_margin_set: bool) -> Self {
777        Self {
778            builder: self.builder.property("right-margin-set", right_margin_set),
779        }
780    }
781
782    pub fn rise(self, rise: i32) -> Self {
783        Self {
784            builder: self.builder.property("rise", rise),
785        }
786    }
787
788    pub fn rise_set(self, rise_set: bool) -> Self {
789        Self {
790            builder: self.builder.property("rise-set", rise_set),
791        }
792    }
793
794    pub fn scale(self, scale: f64) -> Self {
795        Self {
796            builder: self.builder.property("scale", scale),
797        }
798    }
799
800    pub fn scale_set(self, scale_set: bool) -> Self {
801        Self {
802            builder: self.builder.property("scale-set", scale_set),
803        }
804    }
805
806    pub fn size(self, size: i32) -> Self {
807        Self {
808            builder: self.builder.property("size", size),
809        }
810    }
811
812    pub fn size_points(self, size_points: f64) -> Self {
813        Self {
814            builder: self.builder.property("size-points", size_points),
815        }
816    }
817
818    pub fn size_set(self, size_set: bool) -> Self {
819        Self {
820            builder: self.builder.property("size-set", size_set),
821        }
822    }
823
824    pub fn stretch(self, stretch: pango::Stretch) -> Self {
825        Self {
826            builder: self.builder.property("stretch", stretch),
827        }
828    }
829
830    pub fn stretch_set(self, stretch_set: bool) -> Self {
831        Self {
832            builder: self.builder.property("stretch-set", stretch_set),
833        }
834    }
835
836    pub fn strikethrough(self, strikethrough: bool) -> Self {
837        Self {
838            builder: self.builder.property("strikethrough", strikethrough),
839        }
840    }
841
842    /// This property modifies the color of strikeouts. If not set, strikeouts
843    /// will use the forground color.
844    pub fn strikethrough_rgba(self, strikethrough_rgba: &gdk::RGBA) -> Self {
845        Self {
846            builder: self
847                .builder
848                .property("strikethrough-rgba", strikethrough_rgba),
849        }
850    }
851
852    /// If the [`strikethrough-rgba`][struct@crate::TextTag#strikethrough-rgba] property has been set.
853    pub fn strikethrough_rgba_set(self, strikethrough_rgba_set: bool) -> Self {
854        Self {
855            builder: self
856                .builder
857                .property("strikethrough-rgba-set", strikethrough_rgba_set),
858        }
859    }
860
861    pub fn strikethrough_set(self, strikethrough_set: bool) -> Self {
862        Self {
863            builder: self
864                .builder
865                .property("strikethrough-set", strikethrough_set),
866        }
867    }
868
869    pub fn style(self, style: pango::Style) -> Self {
870        Self {
871            builder: self.builder.property("style", style),
872        }
873    }
874
875    pub fn style_set(self, style_set: bool) -> Self {
876        Self {
877            builder: self.builder.property("style-set", style_set),
878        }
879    }
880
881    pub fn tabs(self, tabs: &pango::TabArray) -> Self {
882        Self {
883            builder: self.builder.property("tabs", tabs),
884        }
885    }
886
887    pub fn tabs_set(self, tabs_set: bool) -> Self {
888        Self {
889            builder: self.builder.property("tabs-set", tabs_set),
890        }
891    }
892
893    pub fn underline(self, underline: pango::Underline) -> Self {
894        Self {
895            builder: self.builder.property("underline", underline),
896        }
897    }
898
899    /// This property modifies the color of underlines. If not set, underlines
900    /// will use the forground color.
901    ///
902    /// If [`underline`][struct@crate::TextTag#underline] is set to [`pango::Underline::Error`][crate::pango::Underline::Error], an alternate
903    /// color may be applied instead of the foreground. Setting this property
904    /// will always override those defaults.
905    pub fn underline_rgba(self, underline_rgba: &gdk::RGBA) -> Self {
906        Self {
907            builder: self.builder.property("underline-rgba", underline_rgba),
908        }
909    }
910
911    /// If the [`underline-rgba`][struct@crate::TextTag#underline-rgba] property has been set.
912    pub fn underline_rgba_set(self, underline_rgba_set: bool) -> Self {
913        Self {
914            builder: self
915                .builder
916                .property("underline-rgba-set", underline_rgba_set),
917        }
918    }
919
920    pub fn underline_set(self, underline_set: bool) -> Self {
921        Self {
922            builder: self.builder.property("underline-set", underline_set),
923        }
924    }
925
926    pub fn variant(self, variant: pango::Variant) -> Self {
927        Self {
928            builder: self.builder.property("variant", variant),
929        }
930    }
931
932    pub fn variant_set(self, variant_set: bool) -> Self {
933        Self {
934            builder: self.builder.property("variant-set", variant_set),
935        }
936    }
937
938    pub fn weight(self, weight: i32) -> Self {
939        Self {
940            builder: self.builder.property("weight", weight),
941        }
942    }
943
944    pub fn weight_set(self, weight_set: bool) -> Self {
945        Self {
946            builder: self.builder.property("weight-set", weight_set),
947        }
948    }
949
950    pub fn wrap_mode(self, wrap_mode: WrapMode) -> Self {
951        Self {
952            builder: self.builder.property("wrap-mode", wrap_mode),
953        }
954    }
955
956    pub fn wrap_mode_set(self, wrap_mode_set: bool) -> Self {
957        Self {
958            builder: self.builder.property("wrap-mode-set", wrap_mode_set),
959        }
960    }
961
962    // rustdoc-stripper-ignore-next
963    /// Build the [`TextTag`].
964    #[must_use = "Building the object from the builder is usually expensive and is not expected to have side effects"]
965    pub fn build(self) -> TextTag {
966        assert_initialized_main_thread!();
967        self.builder.build()
968    }
969}
970
971/// Trait containing all [`struct@TextTag`] methods.
972///
973/// # Implementors
974///
975/// [`TextTag`][struct@crate::TextTag]
976pub trait TextTagExt: IsA<TextTag> + 'static {
977    /// Emits the [`tag-changed`][struct@crate::TextTagTable#tag-changed] signal on the [`TextTagTable`][crate::TextTagTable] where
978    /// the tag is included.
979    ///
980    /// The signal is already emitted when setting a [`TextTag`][crate::TextTag] property. This
981    /// function is useful for a [`TextTag`][crate::TextTag] subclass.
982    /// ## `size_changed`
983    /// whether the change affects the [`TextView`][crate::TextView] layout.
984    #[doc(alias = "gtk_text_tag_changed")]
985    fn changed(&self, size_changed: bool) {
986        unsafe {
987            ffi::gtk_text_tag_changed(self.as_ref().to_glib_none().0, size_changed.into_glib());
988        }
989    }
990
991    /// Emits the “event” signal on the [`TextTag`][crate::TextTag].
992    /// ## `event_object`
993    /// object that received the event, such as a widget
994    /// ## `event`
995    /// the event
996    /// ## `iter`
997    /// location where the event was received
998    ///
999    /// # Returns
1000    ///
1001    /// result of signal emission (whether the event was handled)
1002    #[doc(alias = "gtk_text_tag_event")]
1003    fn event(
1004        &self,
1005        event_object: &impl IsA<glib::Object>,
1006        event: &gdk::Event,
1007        iter: &TextIter,
1008    ) -> bool {
1009        unsafe {
1010            from_glib(ffi::gtk_text_tag_event(
1011                self.as_ref().to_glib_none().0,
1012                event_object.as_ref().to_glib_none().0,
1013                mut_override(event.to_glib_none().0),
1014                iter.to_glib_none().0,
1015            ))
1016        }
1017    }
1018
1019    /// Get the tag priority.
1020    ///
1021    /// # Returns
1022    ///
1023    /// The tag’s priority.
1024    #[doc(alias = "gtk_text_tag_get_priority")]
1025    #[doc(alias = "get_priority")]
1026    fn priority(&self) -> i32 {
1027        unsafe { ffi::gtk_text_tag_get_priority(self.as_ref().to_glib_none().0) }
1028    }
1029
1030    /// Sets the priority of a [`TextTag`][crate::TextTag]. Valid priorities
1031    /// start at 0 and go to one less than [`TextTagTableExt::size()`][crate::prelude::TextTagTableExt::size()].
1032    /// Each tag in a table has a unique priority; setting the priority
1033    /// of one tag shifts the priorities of all the other tags in the
1034    /// table to maintain a unique priority for each tag. Higher priority
1035    /// tags “win” if two tags both set the same text attribute. When adding
1036    /// a tag to a tag table, it will be assigned the highest priority in
1037    /// the table by default; so normally the precedence of a set of tags
1038    /// is the order in which they were added to the table, or created with
1039    /// `gtk_text_buffer_create_tag()`, which adds the tag to the buffer’s table
1040    /// automatically.
1041    /// ## `priority`
1042    /// the new priority
1043    #[doc(alias = "gtk_text_tag_set_priority")]
1044    fn set_priority(&self, priority: i32) {
1045        unsafe {
1046            ffi::gtk_text_tag_set_priority(self.as_ref().to_glib_none().0, priority);
1047        }
1048    }
1049
1050    /// Whether the margins accumulate or override each other.
1051    ///
1052    /// When set to [`true`] the margins of this tag are added to the margins
1053    /// of any other non-accumulative margins present. When set to [`false`]
1054    /// the margins override one another (the default).
1055    #[doc(alias = "accumulative-margin")]
1056    fn is_accumulative_margin(&self) -> bool {
1057        ObjectExt::property(self.as_ref(), "accumulative-margin")
1058    }
1059
1060    /// Whether the margins accumulate or override each other.
1061    ///
1062    /// When set to [`true`] the margins of this tag are added to the margins
1063    /// of any other non-accumulative margins present. When set to [`false`]
1064    /// the margins override one another (the default).
1065    #[doc(alias = "accumulative-margin")]
1066    fn set_accumulative_margin(&self, accumulative_margin: bool) {
1067        ObjectExt::set_property(self.as_ref(), "accumulative-margin", accumulative_margin)
1068    }
1069
1070    fn set_background(&self, background: Option<&str>) {
1071        ObjectExt::set_property(self.as_ref(), "background", background)
1072    }
1073
1074    #[doc(alias = "background-full-height")]
1075    fn is_background_full_height(&self) -> bool {
1076        ObjectExt::property(self.as_ref(), "background-full-height")
1077    }
1078
1079    #[doc(alias = "background-full-height")]
1080    fn set_background_full_height(&self, background_full_height: bool) {
1081        ObjectExt::set_property(
1082            self.as_ref(),
1083            "background-full-height",
1084            background_full_height,
1085        )
1086    }
1087
1088    #[doc(alias = "background-full-height-set")]
1089    fn is_background_full_height_set(&self) -> bool {
1090        ObjectExt::property(self.as_ref(), "background-full-height-set")
1091    }
1092
1093    #[doc(alias = "background-full-height-set")]
1094    fn set_background_full_height_set(&self, background_full_height_set: bool) {
1095        ObjectExt::set_property(
1096            self.as_ref(),
1097            "background-full-height-set",
1098            background_full_height_set,
1099        )
1100    }
1101
1102    /// Background color as a [`gdk::RGBA`][crate::gdk::RGBA].
1103    #[doc(alias = "background-rgba")]
1104    fn background_rgba(&self) -> Option<gdk::RGBA> {
1105        ObjectExt::property(self.as_ref(), "background-rgba")
1106    }
1107
1108    /// Background color as a [`gdk::RGBA`][crate::gdk::RGBA].
1109    #[doc(alias = "background-rgba")]
1110    fn set_background_rgba(&self, background_rgba: Option<&gdk::RGBA>) {
1111        ObjectExt::set_property(self.as_ref(), "background-rgba", background_rgba)
1112    }
1113
1114    #[doc(alias = "background-set")]
1115    fn is_background_set(&self) -> bool {
1116        ObjectExt::property(self.as_ref(), "background-set")
1117    }
1118
1119    #[doc(alias = "background-set")]
1120    fn set_background_set(&self, background_set: bool) {
1121        ObjectExt::set_property(self.as_ref(), "background-set", background_set)
1122    }
1123
1124    fn direction(&self) -> TextDirection {
1125        ObjectExt::property(self.as_ref(), "direction")
1126    }
1127
1128    fn set_direction(&self, direction: TextDirection) {
1129        ObjectExt::set_property(self.as_ref(), "direction", direction)
1130    }
1131
1132    fn is_editable(&self) -> bool {
1133        ObjectExt::property(self.as_ref(), "editable")
1134    }
1135
1136    fn set_editable(&self, editable: bool) {
1137        ObjectExt::set_property(self.as_ref(), "editable", editable)
1138    }
1139
1140    #[doc(alias = "editable-set")]
1141    fn is_editable_set(&self) -> bool {
1142        ObjectExt::property(self.as_ref(), "editable-set")
1143    }
1144
1145    #[doc(alias = "editable-set")]
1146    fn set_editable_set(&self, editable_set: bool) {
1147        ObjectExt::set_property(self.as_ref(), "editable-set", editable_set)
1148    }
1149
1150    /// Whether font fallback is enabled.
1151    ///
1152    /// When set to [`true`], other fonts will be substituted
1153    /// where the current font is missing glyphs.
1154    fn is_fallback(&self) -> bool {
1155        ObjectExt::property(self.as_ref(), "fallback")
1156    }
1157
1158    /// Whether font fallback is enabled.
1159    ///
1160    /// When set to [`true`], other fonts will be substituted
1161    /// where the current font is missing glyphs.
1162    fn set_fallback(&self, fallback: bool) {
1163        ObjectExt::set_property(self.as_ref(), "fallback", fallback)
1164    }
1165
1166    #[doc(alias = "fallback-set")]
1167    fn is_fallback_set(&self) -> bool {
1168        ObjectExt::property(self.as_ref(), "fallback-set")
1169    }
1170
1171    #[doc(alias = "fallback-set")]
1172    fn set_fallback_set(&self, fallback_set: bool) {
1173        ObjectExt::set_property(self.as_ref(), "fallback-set", fallback_set)
1174    }
1175
1176    fn family(&self) -> Option<glib::GString> {
1177        ObjectExt::property(self.as_ref(), "family")
1178    }
1179
1180    fn set_family(&self, family: Option<&str>) {
1181        ObjectExt::set_property(self.as_ref(), "family", family)
1182    }
1183
1184    #[doc(alias = "family-set")]
1185    fn is_family_set(&self) -> bool {
1186        ObjectExt::property(self.as_ref(), "family-set")
1187    }
1188
1189    #[doc(alias = "family-set")]
1190    fn set_family_set(&self, family_set: bool) {
1191        ObjectExt::set_property(self.as_ref(), "family-set", family_set)
1192    }
1193
1194    /// Font description as string, e.g. \"Sans Italic 12\".
1195    ///
1196    /// Note that the initial value of this property depends on
1197    /// the internals of [`pango::FontDescription`][crate::pango::FontDescription].
1198    fn font(&self) -> Option<glib::GString> {
1199        ObjectExt::property(self.as_ref(), "font")
1200    }
1201
1202    /// Font description as string, e.g. \"Sans Italic 12\".
1203    ///
1204    /// Note that the initial value of this property depends on
1205    /// the internals of [`pango::FontDescription`][crate::pango::FontDescription].
1206    fn set_font(&self, font: Option<&str>) {
1207        ObjectExt::set_property(self.as_ref(), "font", font)
1208    }
1209
1210    #[doc(alias = "font-desc")]
1211    fn font_desc(&self) -> Option<pango::FontDescription> {
1212        ObjectExt::property(self.as_ref(), "font-desc")
1213    }
1214
1215    #[doc(alias = "font-desc")]
1216    fn set_font_desc(&self, font_desc: Option<&pango::FontDescription>) {
1217        ObjectExt::set_property(self.as_ref(), "font-desc", font_desc)
1218    }
1219
1220    /// OpenType font features, as a string.
1221    #[doc(alias = "font-features")]
1222    fn font_features(&self) -> Option<glib::GString> {
1223        ObjectExt::property(self.as_ref(), "font-features")
1224    }
1225
1226    /// OpenType font features, as a string.
1227    #[doc(alias = "font-features")]
1228    fn set_font_features(&self, font_features: Option<&str>) {
1229        ObjectExt::set_property(self.as_ref(), "font-features", font_features)
1230    }
1231
1232    #[doc(alias = "font-features-set")]
1233    fn is_font_features_set(&self) -> bool {
1234        ObjectExt::property(self.as_ref(), "font-features-set")
1235    }
1236
1237    #[doc(alias = "font-features-set")]
1238    fn set_font_features_set(&self, font_features_set: bool) {
1239        ObjectExt::set_property(self.as_ref(), "font-features-set", font_features_set)
1240    }
1241
1242    fn set_foreground(&self, foreground: Option<&str>) {
1243        ObjectExt::set_property(self.as_ref(), "foreground", foreground)
1244    }
1245
1246    /// Foreground color as a [`gdk::RGBA`][crate::gdk::RGBA].
1247    #[doc(alias = "foreground-rgba")]
1248    fn foreground_rgba(&self) -> Option<gdk::RGBA> {
1249        ObjectExt::property(self.as_ref(), "foreground-rgba")
1250    }
1251
1252    /// Foreground color as a [`gdk::RGBA`][crate::gdk::RGBA].
1253    #[doc(alias = "foreground-rgba")]
1254    fn set_foreground_rgba(&self, foreground_rgba: Option<&gdk::RGBA>) {
1255        ObjectExt::set_property(self.as_ref(), "foreground-rgba", foreground_rgba)
1256    }
1257
1258    #[doc(alias = "foreground-set")]
1259    fn is_foreground_set(&self) -> bool {
1260        ObjectExt::property(self.as_ref(), "foreground-set")
1261    }
1262
1263    #[doc(alias = "foreground-set")]
1264    fn set_foreground_set(&self, foreground_set: bool) {
1265        ObjectExt::set_property(self.as_ref(), "foreground-set", foreground_set)
1266    }
1267
1268    fn indent(&self) -> i32 {
1269        ObjectExt::property(self.as_ref(), "indent")
1270    }
1271
1272    fn set_indent(&self, indent: i32) {
1273        ObjectExt::set_property(self.as_ref(), "indent", indent)
1274    }
1275
1276    #[doc(alias = "indent-set")]
1277    fn is_indent_set(&self) -> bool {
1278        ObjectExt::property(self.as_ref(), "indent-set")
1279    }
1280
1281    #[doc(alias = "indent-set")]
1282    fn set_indent_set(&self, indent_set: bool) {
1283        ObjectExt::set_property(self.as_ref(), "indent-set", indent_set)
1284    }
1285
1286    /// Whether this text is hidden.
1287    ///
1288    /// Note that there may still be problems with the support for invisible
1289    /// text, in particular when navigating programmatically inside a buffer
1290    /// containing invisible segments.
1291    fn is_invisible(&self) -> bool {
1292        ObjectExt::property(self.as_ref(), "invisible")
1293    }
1294
1295    /// Whether this text is hidden.
1296    ///
1297    /// Note that there may still be problems with the support for invisible
1298    /// text, in particular when navigating programmatically inside a buffer
1299    /// containing invisible segments.
1300    fn set_invisible(&self, invisible: bool) {
1301        ObjectExt::set_property(self.as_ref(), "invisible", invisible)
1302    }
1303
1304    #[doc(alias = "invisible-set")]
1305    fn is_invisible_set(&self) -> bool {
1306        ObjectExt::property(self.as_ref(), "invisible-set")
1307    }
1308
1309    #[doc(alias = "invisible-set")]
1310    fn set_invisible_set(&self, invisible_set: bool) {
1311        ObjectExt::set_property(self.as_ref(), "invisible-set", invisible_set)
1312    }
1313
1314    fn justification(&self) -> Justification {
1315        ObjectExt::property(self.as_ref(), "justification")
1316    }
1317
1318    fn set_justification(&self, justification: Justification) {
1319        ObjectExt::set_property(self.as_ref(), "justification", justification)
1320    }
1321
1322    #[doc(alias = "justification-set")]
1323    fn is_justification_set(&self) -> bool {
1324        ObjectExt::property(self.as_ref(), "justification-set")
1325    }
1326
1327    #[doc(alias = "justification-set")]
1328    fn set_justification_set(&self, justification_set: bool) {
1329        ObjectExt::set_property(self.as_ref(), "justification-set", justification_set)
1330    }
1331
1332    /// The language this text is in, as an ISO code. Pango can use this as a
1333    /// hint when rendering the text. If not set, an appropriate default will be
1334    /// used.
1335    ///
1336    /// Note that the initial value of this property depends on the current
1337    /// locale, see also [`default_language()`][crate::default_language()].
1338    fn language(&self) -> Option<glib::GString> {
1339        ObjectExt::property(self.as_ref(), "language")
1340    }
1341
1342    /// The language this text is in, as an ISO code. Pango can use this as a
1343    /// hint when rendering the text. If not set, an appropriate default will be
1344    /// used.
1345    ///
1346    /// Note that the initial value of this property depends on the current
1347    /// locale, see also [`default_language()`][crate::default_language()].
1348    fn set_language(&self, language: Option<&str>) {
1349        ObjectExt::set_property(self.as_ref(), "language", language)
1350    }
1351
1352    #[doc(alias = "language-set")]
1353    fn is_language_set(&self) -> bool {
1354        ObjectExt::property(self.as_ref(), "language-set")
1355    }
1356
1357    #[doc(alias = "language-set")]
1358    fn set_language_set(&self, language_set: bool) {
1359        ObjectExt::set_property(self.as_ref(), "language-set", language_set)
1360    }
1361
1362    #[doc(alias = "left-margin")]
1363    fn left_margin(&self) -> i32 {
1364        ObjectExt::property(self.as_ref(), "left-margin")
1365    }
1366
1367    #[doc(alias = "left-margin")]
1368    fn set_left_margin(&self, left_margin: i32) {
1369        ObjectExt::set_property(self.as_ref(), "left-margin", left_margin)
1370    }
1371
1372    #[doc(alias = "left-margin-set")]
1373    fn is_left_margin_set(&self) -> bool {
1374        ObjectExt::property(self.as_ref(), "left-margin-set")
1375    }
1376
1377    #[doc(alias = "left-margin-set")]
1378    fn set_left_margin_set(&self, left_margin_set: bool) {
1379        ObjectExt::set_property(self.as_ref(), "left-margin-set", left_margin_set)
1380    }
1381
1382    /// Extra spacing between graphemes, in Pango units.
1383    #[doc(alias = "letter-spacing")]
1384    fn letter_spacing(&self) -> i32 {
1385        ObjectExt::property(self.as_ref(), "letter-spacing")
1386    }
1387
1388    /// Extra spacing between graphemes, in Pango units.
1389    #[doc(alias = "letter-spacing")]
1390    fn set_letter_spacing(&self, letter_spacing: i32) {
1391        ObjectExt::set_property(self.as_ref(), "letter-spacing", letter_spacing)
1392    }
1393
1394    #[doc(alias = "letter-spacing-set")]
1395    fn is_letter_spacing_set(&self) -> bool {
1396        ObjectExt::property(self.as_ref(), "letter-spacing-set")
1397    }
1398
1399    #[doc(alias = "letter-spacing-set")]
1400    fn set_letter_spacing_set(&self, letter_spacing_set: bool) {
1401        ObjectExt::set_property(self.as_ref(), "letter-spacing-set", letter_spacing_set)
1402    }
1403
1404    fn name(&self) -> Option<glib::GString> {
1405        ObjectExt::property(self.as_ref(), "name")
1406    }
1407
1408    /// The paragraph background color as a string.
1409    #[doc(alias = "paragraph-background")]
1410    fn set_paragraph_background(&self, paragraph_background: Option<&str>) {
1411        ObjectExt::set_property(self.as_ref(), "paragraph-background", paragraph_background)
1412    }
1413
1414    /// The paragraph background color as a [`gdk::RGBA`][crate::gdk::RGBA].
1415    #[doc(alias = "paragraph-background-rgba")]
1416    fn paragraph_background_rgba(&self) -> Option<gdk::RGBA> {
1417        ObjectExt::property(self.as_ref(), "paragraph-background-rgba")
1418    }
1419
1420    /// The paragraph background color as a [`gdk::RGBA`][crate::gdk::RGBA].
1421    #[doc(alias = "paragraph-background-rgba")]
1422    fn set_paragraph_background_rgba(&self, paragraph_background_rgba: Option<&gdk::RGBA>) {
1423        ObjectExt::set_property(
1424            self.as_ref(),
1425            "paragraph-background-rgba",
1426            paragraph_background_rgba,
1427        )
1428    }
1429
1430    #[doc(alias = "paragraph-background-set")]
1431    fn is_paragraph_background_set(&self) -> bool {
1432        ObjectExt::property(self.as_ref(), "paragraph-background-set")
1433    }
1434
1435    #[doc(alias = "paragraph-background-set")]
1436    fn set_paragraph_background_set(&self, paragraph_background_set: bool) {
1437        ObjectExt::set_property(
1438            self.as_ref(),
1439            "paragraph-background-set",
1440            paragraph_background_set,
1441        )
1442    }
1443
1444    #[doc(alias = "pixels-above-lines")]
1445    fn pixels_above_lines(&self) -> i32 {
1446        ObjectExt::property(self.as_ref(), "pixels-above-lines")
1447    }
1448
1449    #[doc(alias = "pixels-above-lines")]
1450    fn set_pixels_above_lines(&self, pixels_above_lines: i32) {
1451        ObjectExt::set_property(self.as_ref(), "pixels-above-lines", pixels_above_lines)
1452    }
1453
1454    #[doc(alias = "pixels-above-lines-set")]
1455    fn is_pixels_above_lines_set(&self) -> bool {
1456        ObjectExt::property(self.as_ref(), "pixels-above-lines-set")
1457    }
1458
1459    #[doc(alias = "pixels-above-lines-set")]
1460    fn set_pixels_above_lines_set(&self, pixels_above_lines_set: bool) {
1461        ObjectExt::set_property(
1462            self.as_ref(),
1463            "pixels-above-lines-set",
1464            pixels_above_lines_set,
1465        )
1466    }
1467
1468    #[doc(alias = "pixels-below-lines")]
1469    fn pixels_below_lines(&self) -> i32 {
1470        ObjectExt::property(self.as_ref(), "pixels-below-lines")
1471    }
1472
1473    #[doc(alias = "pixels-below-lines")]
1474    fn set_pixels_below_lines(&self, pixels_below_lines: i32) {
1475        ObjectExt::set_property(self.as_ref(), "pixels-below-lines", pixels_below_lines)
1476    }
1477
1478    #[doc(alias = "pixels-below-lines-set")]
1479    fn is_pixels_below_lines_set(&self) -> bool {
1480        ObjectExt::property(self.as_ref(), "pixels-below-lines-set")
1481    }
1482
1483    #[doc(alias = "pixels-below-lines-set")]
1484    fn set_pixels_below_lines_set(&self, pixels_below_lines_set: bool) {
1485        ObjectExt::set_property(
1486            self.as_ref(),
1487            "pixels-below-lines-set",
1488            pixels_below_lines_set,
1489        )
1490    }
1491
1492    #[doc(alias = "pixels-inside-wrap")]
1493    fn pixels_inside_wrap(&self) -> i32 {
1494        ObjectExt::property(self.as_ref(), "pixels-inside-wrap")
1495    }
1496
1497    #[doc(alias = "pixels-inside-wrap")]
1498    fn set_pixels_inside_wrap(&self, pixels_inside_wrap: i32) {
1499        ObjectExt::set_property(self.as_ref(), "pixels-inside-wrap", pixels_inside_wrap)
1500    }
1501
1502    #[doc(alias = "pixels-inside-wrap-set")]
1503    fn is_pixels_inside_wrap_set(&self) -> bool {
1504        ObjectExt::property(self.as_ref(), "pixels-inside-wrap-set")
1505    }
1506
1507    #[doc(alias = "pixels-inside-wrap-set")]
1508    fn set_pixels_inside_wrap_set(&self, pixels_inside_wrap_set: bool) {
1509        ObjectExt::set_property(
1510            self.as_ref(),
1511            "pixels-inside-wrap-set",
1512            pixels_inside_wrap_set,
1513        )
1514    }
1515
1516    #[doc(alias = "right-margin")]
1517    fn right_margin(&self) -> i32 {
1518        ObjectExt::property(self.as_ref(), "right-margin")
1519    }
1520
1521    #[doc(alias = "right-margin")]
1522    fn set_right_margin(&self, right_margin: i32) {
1523        ObjectExt::set_property(self.as_ref(), "right-margin", right_margin)
1524    }
1525
1526    #[doc(alias = "right-margin-set")]
1527    fn is_right_margin_set(&self) -> bool {
1528        ObjectExt::property(self.as_ref(), "right-margin-set")
1529    }
1530
1531    #[doc(alias = "right-margin-set")]
1532    fn set_right_margin_set(&self, right_margin_set: bool) {
1533        ObjectExt::set_property(self.as_ref(), "right-margin-set", right_margin_set)
1534    }
1535
1536    fn rise(&self) -> i32 {
1537        ObjectExt::property(self.as_ref(), "rise")
1538    }
1539
1540    fn set_rise(&self, rise: i32) {
1541        ObjectExt::set_property(self.as_ref(), "rise", rise)
1542    }
1543
1544    #[doc(alias = "rise-set")]
1545    fn is_rise_set(&self) -> bool {
1546        ObjectExt::property(self.as_ref(), "rise-set")
1547    }
1548
1549    #[doc(alias = "rise-set")]
1550    fn set_rise_set(&self, rise_set: bool) {
1551        ObjectExt::set_property(self.as_ref(), "rise-set", rise_set)
1552    }
1553
1554    fn scale(&self) -> f64 {
1555        ObjectExt::property(self.as_ref(), "scale")
1556    }
1557
1558    fn set_scale(&self, scale: f64) {
1559        ObjectExt::set_property(self.as_ref(), "scale", scale)
1560    }
1561
1562    #[doc(alias = "scale-set")]
1563    fn is_scale_set(&self) -> bool {
1564        ObjectExt::property(self.as_ref(), "scale-set")
1565    }
1566
1567    #[doc(alias = "scale-set")]
1568    fn set_scale_set(&self, scale_set: bool) {
1569        ObjectExt::set_property(self.as_ref(), "scale-set", scale_set)
1570    }
1571
1572    fn size(&self) -> i32 {
1573        ObjectExt::property(self.as_ref(), "size")
1574    }
1575
1576    fn set_size(&self, size: i32) {
1577        ObjectExt::set_property(self.as_ref(), "size", size)
1578    }
1579
1580    #[doc(alias = "size-points")]
1581    fn size_points(&self) -> f64 {
1582        ObjectExt::property(self.as_ref(), "size-points")
1583    }
1584
1585    #[doc(alias = "size-points")]
1586    fn set_size_points(&self, size_points: f64) {
1587        ObjectExt::set_property(self.as_ref(), "size-points", size_points)
1588    }
1589
1590    #[doc(alias = "size-set")]
1591    fn is_size_set(&self) -> bool {
1592        ObjectExt::property(self.as_ref(), "size-set")
1593    }
1594
1595    #[doc(alias = "size-set")]
1596    fn set_size_set(&self, size_set: bool) {
1597        ObjectExt::set_property(self.as_ref(), "size-set", size_set)
1598    }
1599
1600    fn stretch(&self) -> pango::Stretch {
1601        ObjectExt::property(self.as_ref(), "stretch")
1602    }
1603
1604    fn set_stretch(&self, stretch: pango::Stretch) {
1605        ObjectExt::set_property(self.as_ref(), "stretch", stretch)
1606    }
1607
1608    #[doc(alias = "stretch-set")]
1609    fn is_stretch_set(&self) -> bool {
1610        ObjectExt::property(self.as_ref(), "stretch-set")
1611    }
1612
1613    #[doc(alias = "stretch-set")]
1614    fn set_stretch_set(&self, stretch_set: bool) {
1615        ObjectExt::set_property(self.as_ref(), "stretch-set", stretch_set)
1616    }
1617
1618    fn is_strikethrough(&self) -> bool {
1619        ObjectExt::property(self.as_ref(), "strikethrough")
1620    }
1621
1622    fn set_strikethrough(&self, strikethrough: bool) {
1623        ObjectExt::set_property(self.as_ref(), "strikethrough", strikethrough)
1624    }
1625
1626    /// This property modifies the color of strikeouts. If not set, strikeouts
1627    /// will use the forground color.
1628    #[doc(alias = "strikethrough-rgba")]
1629    fn strikethrough_rgba(&self) -> Option<gdk::RGBA> {
1630        ObjectExt::property(self.as_ref(), "strikethrough-rgba")
1631    }
1632
1633    /// This property modifies the color of strikeouts. If not set, strikeouts
1634    /// will use the forground color.
1635    #[doc(alias = "strikethrough-rgba")]
1636    fn set_strikethrough_rgba(&self, strikethrough_rgba: Option<&gdk::RGBA>) {
1637        ObjectExt::set_property(self.as_ref(), "strikethrough-rgba", strikethrough_rgba)
1638    }
1639
1640    /// If the [`strikethrough-rgba`][struct@crate::TextTag#strikethrough-rgba] property has been set.
1641    #[doc(alias = "strikethrough-rgba-set")]
1642    fn is_strikethrough_rgba_set(&self) -> bool {
1643        ObjectExt::property(self.as_ref(), "strikethrough-rgba-set")
1644    }
1645
1646    /// If the [`strikethrough-rgba`][struct@crate::TextTag#strikethrough-rgba] property has been set.
1647    #[doc(alias = "strikethrough-rgba-set")]
1648    fn set_strikethrough_rgba_set(&self, strikethrough_rgba_set: bool) {
1649        ObjectExt::set_property(
1650            self.as_ref(),
1651            "strikethrough-rgba-set",
1652            strikethrough_rgba_set,
1653        )
1654    }
1655
1656    #[doc(alias = "strikethrough-set")]
1657    fn is_strikethrough_set(&self) -> bool {
1658        ObjectExt::property(self.as_ref(), "strikethrough-set")
1659    }
1660
1661    #[doc(alias = "strikethrough-set")]
1662    fn set_strikethrough_set(&self, strikethrough_set: bool) {
1663        ObjectExt::set_property(self.as_ref(), "strikethrough-set", strikethrough_set)
1664    }
1665
1666    fn style(&self) -> pango::Style {
1667        ObjectExt::property(self.as_ref(), "style")
1668    }
1669
1670    fn set_style(&self, style: pango::Style) {
1671        ObjectExt::set_property(self.as_ref(), "style", style)
1672    }
1673
1674    #[doc(alias = "style-set")]
1675    fn is_style_set(&self) -> bool {
1676        ObjectExt::property(self.as_ref(), "style-set")
1677    }
1678
1679    #[doc(alias = "style-set")]
1680    fn set_style_set(&self, style_set: bool) {
1681        ObjectExt::set_property(self.as_ref(), "style-set", style_set)
1682    }
1683
1684    fn tabs(&self) -> Option<pango::TabArray> {
1685        ObjectExt::property(self.as_ref(), "tabs")
1686    }
1687
1688    fn set_tabs(&self, tabs: Option<&pango::TabArray>) {
1689        ObjectExt::set_property(self.as_ref(), "tabs", tabs)
1690    }
1691
1692    #[doc(alias = "tabs-set")]
1693    fn is_tabs_set(&self) -> bool {
1694        ObjectExt::property(self.as_ref(), "tabs-set")
1695    }
1696
1697    #[doc(alias = "tabs-set")]
1698    fn set_tabs_set(&self, tabs_set: bool) {
1699        ObjectExt::set_property(self.as_ref(), "tabs-set", tabs_set)
1700    }
1701
1702    fn underline(&self) -> pango::Underline {
1703        ObjectExt::property(self.as_ref(), "underline")
1704    }
1705
1706    fn set_underline(&self, underline: pango::Underline) {
1707        ObjectExt::set_property(self.as_ref(), "underline", underline)
1708    }
1709
1710    /// This property modifies the color of underlines. If not set, underlines
1711    /// will use the forground color.
1712    ///
1713    /// If [`underline`][struct@crate::TextTag#underline] is set to [`pango::Underline::Error`][crate::pango::Underline::Error], an alternate
1714    /// color may be applied instead of the foreground. Setting this property
1715    /// will always override those defaults.
1716    #[doc(alias = "underline-rgba")]
1717    fn underline_rgba(&self) -> Option<gdk::RGBA> {
1718        ObjectExt::property(self.as_ref(), "underline-rgba")
1719    }
1720
1721    /// This property modifies the color of underlines. If not set, underlines
1722    /// will use the forground color.
1723    ///
1724    /// If [`underline`][struct@crate::TextTag#underline] is set to [`pango::Underline::Error`][crate::pango::Underline::Error], an alternate
1725    /// color may be applied instead of the foreground. Setting this property
1726    /// will always override those defaults.
1727    #[doc(alias = "underline-rgba")]
1728    fn set_underline_rgba(&self, underline_rgba: Option<&gdk::RGBA>) {
1729        ObjectExt::set_property(self.as_ref(), "underline-rgba", underline_rgba)
1730    }
1731
1732    /// If the [`underline-rgba`][struct@crate::TextTag#underline-rgba] property has been set.
1733    #[doc(alias = "underline-rgba-set")]
1734    fn is_underline_rgba_set(&self) -> bool {
1735        ObjectExt::property(self.as_ref(), "underline-rgba-set")
1736    }
1737
1738    /// If the [`underline-rgba`][struct@crate::TextTag#underline-rgba] property has been set.
1739    #[doc(alias = "underline-rgba-set")]
1740    fn set_underline_rgba_set(&self, underline_rgba_set: bool) {
1741        ObjectExt::set_property(self.as_ref(), "underline-rgba-set", underline_rgba_set)
1742    }
1743
1744    #[doc(alias = "underline-set")]
1745    fn is_underline_set(&self) -> bool {
1746        ObjectExt::property(self.as_ref(), "underline-set")
1747    }
1748
1749    #[doc(alias = "underline-set")]
1750    fn set_underline_set(&self, underline_set: bool) {
1751        ObjectExt::set_property(self.as_ref(), "underline-set", underline_set)
1752    }
1753
1754    fn variant(&self) -> pango::Variant {
1755        ObjectExt::property(self.as_ref(), "variant")
1756    }
1757
1758    fn set_variant(&self, variant: pango::Variant) {
1759        ObjectExt::set_property(self.as_ref(), "variant", variant)
1760    }
1761
1762    #[doc(alias = "variant-set")]
1763    fn is_variant_set(&self) -> bool {
1764        ObjectExt::property(self.as_ref(), "variant-set")
1765    }
1766
1767    #[doc(alias = "variant-set")]
1768    fn set_variant_set(&self, variant_set: bool) {
1769        ObjectExt::set_property(self.as_ref(), "variant-set", variant_set)
1770    }
1771
1772    fn weight(&self) -> i32 {
1773        ObjectExt::property(self.as_ref(), "weight")
1774    }
1775
1776    fn set_weight(&self, weight: i32) {
1777        ObjectExt::set_property(self.as_ref(), "weight", weight)
1778    }
1779
1780    #[doc(alias = "weight-set")]
1781    fn is_weight_set(&self) -> bool {
1782        ObjectExt::property(self.as_ref(), "weight-set")
1783    }
1784
1785    #[doc(alias = "weight-set")]
1786    fn set_weight_set(&self, weight_set: bool) {
1787        ObjectExt::set_property(self.as_ref(), "weight-set", weight_set)
1788    }
1789
1790    #[doc(alias = "wrap-mode")]
1791    fn wrap_mode(&self) -> WrapMode {
1792        ObjectExt::property(self.as_ref(), "wrap-mode")
1793    }
1794
1795    #[doc(alias = "wrap-mode")]
1796    fn set_wrap_mode(&self, wrap_mode: WrapMode) {
1797        ObjectExt::set_property(self.as_ref(), "wrap-mode", wrap_mode)
1798    }
1799
1800    #[doc(alias = "wrap-mode-set")]
1801    fn wraps_mode_set(&self) -> bool {
1802        ObjectExt::property(self.as_ref(), "wrap-mode-set")
1803    }
1804
1805    #[doc(alias = "wrap-mode-set")]
1806    fn set_wrap_mode_set(&self, wrap_mode_set: bool) {
1807        ObjectExt::set_property(self.as_ref(), "wrap-mode-set", wrap_mode_set)
1808    }
1809
1810    /// The ::event signal is emitted when an event occurs on a region of the
1811    /// buffer marked with this tag.
1812    /// ## `object`
1813    /// the object the event was fired from (typically a [`TextView`][crate::TextView])
1814    /// ## `event`
1815    /// the event which triggered the signal
1816    /// ## `iter`
1817    /// a [`TextIter`][crate::TextIter] pointing at the location the event occurred
1818    ///
1819    /// # Returns
1820    ///
1821    /// [`true`] to stop other handlers from being invoked for the
1822    /// event. [`false`] to propagate the event further.
1823    #[doc(alias = "event")]
1824    fn connect_event<
1825        F: Fn(&Self, &glib::Object, &gdk::Event, &TextIter) -> glib::Propagation + 'static,
1826    >(
1827        &self,
1828        f: F,
1829    ) -> SignalHandlerId {
1830        unsafe extern "C" fn event_trampoline<
1831            P: IsA<TextTag>,
1832            F: Fn(&P, &glib::Object, &gdk::Event, &TextIter) -> glib::Propagation + 'static,
1833        >(
1834            this: *mut ffi::GtkTextTag,
1835            object: *mut glib::gobject_ffi::GObject,
1836            event: *mut gdk::ffi::GdkEvent,
1837            iter: *mut ffi::GtkTextIter,
1838            f: glib::ffi::gpointer,
1839        ) -> glib::ffi::gboolean {
1840            unsafe {
1841                let f: &F = &*(f as *const F);
1842                f(
1843                    TextTag::from_glib_borrow(this).unsafe_cast_ref(),
1844                    &from_glib_borrow(object),
1845                    &from_glib_none(event),
1846                    &from_glib_borrow(iter),
1847                )
1848                .into_glib()
1849            }
1850        }
1851        unsafe {
1852            let f: Box_<F> = Box_::new(f);
1853            connect_raw(
1854                self.as_ptr() as *mut _,
1855                c"event".as_ptr(),
1856                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1857                    event_trampoline::<Self, F> as *const (),
1858                )),
1859                Box_::into_raw(f),
1860            )
1861        }
1862    }
1863
1864    #[doc(alias = "accumulative-margin")]
1865    fn connect_accumulative_margin_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1866        unsafe extern "C" fn notify_accumulative_margin_trampoline<
1867            P: IsA<TextTag>,
1868            F: Fn(&P) + 'static,
1869        >(
1870            this: *mut ffi::GtkTextTag,
1871            _param_spec: glib::ffi::gpointer,
1872            f: glib::ffi::gpointer,
1873        ) {
1874            unsafe {
1875                let f: &F = &*(f as *const F);
1876                f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
1877            }
1878        }
1879        unsafe {
1880            let f: Box_<F> = Box_::new(f);
1881            connect_raw(
1882                self.as_ptr() as *mut _,
1883                c"notify::accumulative-margin".as_ptr(),
1884                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1885                    notify_accumulative_margin_trampoline::<Self, F> as *const (),
1886                )),
1887                Box_::into_raw(f),
1888            )
1889        }
1890    }
1891
1892    #[doc(alias = "background")]
1893    fn connect_background_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1894        unsafe extern "C" fn notify_background_trampoline<P: IsA<TextTag>, F: Fn(&P) + 'static>(
1895            this: *mut ffi::GtkTextTag,
1896            _param_spec: glib::ffi::gpointer,
1897            f: glib::ffi::gpointer,
1898        ) {
1899            unsafe {
1900                let f: &F = &*(f as *const F);
1901                f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
1902            }
1903        }
1904        unsafe {
1905            let f: Box_<F> = Box_::new(f);
1906            connect_raw(
1907                self.as_ptr() as *mut _,
1908                c"notify::background".as_ptr(),
1909                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1910                    notify_background_trampoline::<Self, F> as *const (),
1911                )),
1912                Box_::into_raw(f),
1913            )
1914        }
1915    }
1916
1917    #[doc(alias = "background-full-height")]
1918    fn connect_background_full_height_notify<F: Fn(&Self) + 'static>(
1919        &self,
1920        f: F,
1921    ) -> SignalHandlerId {
1922        unsafe extern "C" fn notify_background_full_height_trampoline<
1923            P: IsA<TextTag>,
1924            F: Fn(&P) + 'static,
1925        >(
1926            this: *mut ffi::GtkTextTag,
1927            _param_spec: glib::ffi::gpointer,
1928            f: glib::ffi::gpointer,
1929        ) {
1930            unsafe {
1931                let f: &F = &*(f as *const F);
1932                f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
1933            }
1934        }
1935        unsafe {
1936            let f: Box_<F> = Box_::new(f);
1937            connect_raw(
1938                self.as_ptr() as *mut _,
1939                c"notify::background-full-height".as_ptr(),
1940                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1941                    notify_background_full_height_trampoline::<Self, F> as *const (),
1942                )),
1943                Box_::into_raw(f),
1944            )
1945        }
1946    }
1947
1948    #[doc(alias = "background-full-height-set")]
1949    fn connect_background_full_height_set_notify<F: Fn(&Self) + 'static>(
1950        &self,
1951        f: F,
1952    ) -> SignalHandlerId {
1953        unsafe extern "C" fn notify_background_full_height_set_trampoline<
1954            P: IsA<TextTag>,
1955            F: Fn(&P) + 'static,
1956        >(
1957            this: *mut ffi::GtkTextTag,
1958            _param_spec: glib::ffi::gpointer,
1959            f: glib::ffi::gpointer,
1960        ) {
1961            unsafe {
1962                let f: &F = &*(f as *const F);
1963                f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
1964            }
1965        }
1966        unsafe {
1967            let f: Box_<F> = Box_::new(f);
1968            connect_raw(
1969                self.as_ptr() as *mut _,
1970                c"notify::background-full-height-set".as_ptr(),
1971                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1972                    notify_background_full_height_set_trampoline::<Self, F> as *const (),
1973                )),
1974                Box_::into_raw(f),
1975            )
1976        }
1977    }
1978
1979    #[doc(alias = "background-rgba")]
1980    fn connect_background_rgba_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1981        unsafe extern "C" fn notify_background_rgba_trampoline<
1982            P: IsA<TextTag>,
1983            F: Fn(&P) + 'static,
1984        >(
1985            this: *mut ffi::GtkTextTag,
1986            _param_spec: glib::ffi::gpointer,
1987            f: glib::ffi::gpointer,
1988        ) {
1989            unsafe {
1990                let f: &F = &*(f as *const F);
1991                f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
1992            }
1993        }
1994        unsafe {
1995            let f: Box_<F> = Box_::new(f);
1996            connect_raw(
1997                self.as_ptr() as *mut _,
1998                c"notify::background-rgba".as_ptr(),
1999                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2000                    notify_background_rgba_trampoline::<Self, F> as *const (),
2001                )),
2002                Box_::into_raw(f),
2003            )
2004        }
2005    }
2006
2007    #[doc(alias = "background-set")]
2008    fn connect_background_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2009        unsafe extern "C" fn notify_background_set_trampoline<
2010            P: IsA<TextTag>,
2011            F: Fn(&P) + 'static,
2012        >(
2013            this: *mut ffi::GtkTextTag,
2014            _param_spec: glib::ffi::gpointer,
2015            f: glib::ffi::gpointer,
2016        ) {
2017            unsafe {
2018                let f: &F = &*(f as *const F);
2019                f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
2020            }
2021        }
2022        unsafe {
2023            let f: Box_<F> = Box_::new(f);
2024            connect_raw(
2025                self.as_ptr() as *mut _,
2026                c"notify::background-set".as_ptr(),
2027                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2028                    notify_background_set_trampoline::<Self, F> as *const (),
2029                )),
2030                Box_::into_raw(f),
2031            )
2032        }
2033    }
2034
2035    #[doc(alias = "direction")]
2036    fn connect_direction_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2037        unsafe extern "C" fn notify_direction_trampoline<P: IsA<TextTag>, F: Fn(&P) + 'static>(
2038            this: *mut ffi::GtkTextTag,
2039            _param_spec: glib::ffi::gpointer,
2040            f: glib::ffi::gpointer,
2041        ) {
2042            unsafe {
2043                let f: &F = &*(f as *const F);
2044                f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
2045            }
2046        }
2047        unsafe {
2048            let f: Box_<F> = Box_::new(f);
2049            connect_raw(
2050                self.as_ptr() as *mut _,
2051                c"notify::direction".as_ptr(),
2052                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2053                    notify_direction_trampoline::<Self, F> as *const (),
2054                )),
2055                Box_::into_raw(f),
2056            )
2057        }
2058    }
2059
2060    #[doc(alias = "editable")]
2061    fn connect_editable_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2062        unsafe extern "C" fn notify_editable_trampoline<P: IsA<TextTag>, F: Fn(&P) + 'static>(
2063            this: *mut ffi::GtkTextTag,
2064            _param_spec: glib::ffi::gpointer,
2065            f: glib::ffi::gpointer,
2066        ) {
2067            unsafe {
2068                let f: &F = &*(f as *const F);
2069                f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
2070            }
2071        }
2072        unsafe {
2073            let f: Box_<F> = Box_::new(f);
2074            connect_raw(
2075                self.as_ptr() as *mut _,
2076                c"notify::editable".as_ptr(),
2077                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2078                    notify_editable_trampoline::<Self, F> as *const (),
2079                )),
2080                Box_::into_raw(f),
2081            )
2082        }
2083    }
2084
2085    #[doc(alias = "editable-set")]
2086    fn connect_editable_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2087        unsafe extern "C" fn notify_editable_set_trampoline<
2088            P: IsA<TextTag>,
2089            F: Fn(&P) + 'static,
2090        >(
2091            this: *mut ffi::GtkTextTag,
2092            _param_spec: glib::ffi::gpointer,
2093            f: glib::ffi::gpointer,
2094        ) {
2095            unsafe {
2096                let f: &F = &*(f as *const F);
2097                f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
2098            }
2099        }
2100        unsafe {
2101            let f: Box_<F> = Box_::new(f);
2102            connect_raw(
2103                self.as_ptr() as *mut _,
2104                c"notify::editable-set".as_ptr(),
2105                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2106                    notify_editable_set_trampoline::<Self, F> as *const (),
2107                )),
2108                Box_::into_raw(f),
2109            )
2110        }
2111    }
2112
2113    #[doc(alias = "fallback")]
2114    fn connect_fallback_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2115        unsafe extern "C" fn notify_fallback_trampoline<P: IsA<TextTag>, F: Fn(&P) + 'static>(
2116            this: *mut ffi::GtkTextTag,
2117            _param_spec: glib::ffi::gpointer,
2118            f: glib::ffi::gpointer,
2119        ) {
2120            unsafe {
2121                let f: &F = &*(f as *const F);
2122                f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
2123            }
2124        }
2125        unsafe {
2126            let f: Box_<F> = Box_::new(f);
2127            connect_raw(
2128                self.as_ptr() as *mut _,
2129                c"notify::fallback".as_ptr(),
2130                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2131                    notify_fallback_trampoline::<Self, F> as *const (),
2132                )),
2133                Box_::into_raw(f),
2134            )
2135        }
2136    }
2137
2138    #[doc(alias = "fallback-set")]
2139    fn connect_fallback_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2140        unsafe extern "C" fn notify_fallback_set_trampoline<
2141            P: IsA<TextTag>,
2142            F: Fn(&P) + 'static,
2143        >(
2144            this: *mut ffi::GtkTextTag,
2145            _param_spec: glib::ffi::gpointer,
2146            f: glib::ffi::gpointer,
2147        ) {
2148            unsafe {
2149                let f: &F = &*(f as *const F);
2150                f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
2151            }
2152        }
2153        unsafe {
2154            let f: Box_<F> = Box_::new(f);
2155            connect_raw(
2156                self.as_ptr() as *mut _,
2157                c"notify::fallback-set".as_ptr(),
2158                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2159                    notify_fallback_set_trampoline::<Self, F> as *const (),
2160                )),
2161                Box_::into_raw(f),
2162            )
2163        }
2164    }
2165
2166    #[doc(alias = "family")]
2167    fn connect_family_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2168        unsafe extern "C" fn notify_family_trampoline<P: IsA<TextTag>, F: Fn(&P) + 'static>(
2169            this: *mut ffi::GtkTextTag,
2170            _param_spec: glib::ffi::gpointer,
2171            f: glib::ffi::gpointer,
2172        ) {
2173            unsafe {
2174                let f: &F = &*(f as *const F);
2175                f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
2176            }
2177        }
2178        unsafe {
2179            let f: Box_<F> = Box_::new(f);
2180            connect_raw(
2181                self.as_ptr() as *mut _,
2182                c"notify::family".as_ptr(),
2183                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2184                    notify_family_trampoline::<Self, F> as *const (),
2185                )),
2186                Box_::into_raw(f),
2187            )
2188        }
2189    }
2190
2191    #[doc(alias = "family-set")]
2192    fn connect_family_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2193        unsafe extern "C" fn notify_family_set_trampoline<P: IsA<TextTag>, F: Fn(&P) + 'static>(
2194            this: *mut ffi::GtkTextTag,
2195            _param_spec: glib::ffi::gpointer,
2196            f: glib::ffi::gpointer,
2197        ) {
2198            unsafe {
2199                let f: &F = &*(f as *const F);
2200                f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
2201            }
2202        }
2203        unsafe {
2204            let f: Box_<F> = Box_::new(f);
2205            connect_raw(
2206                self.as_ptr() as *mut _,
2207                c"notify::family-set".as_ptr(),
2208                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2209                    notify_family_set_trampoline::<Self, F> as *const (),
2210                )),
2211                Box_::into_raw(f),
2212            )
2213        }
2214    }
2215
2216    #[doc(alias = "font")]
2217    fn connect_font_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2218        unsafe extern "C" fn notify_font_trampoline<P: IsA<TextTag>, F: Fn(&P) + 'static>(
2219            this: *mut ffi::GtkTextTag,
2220            _param_spec: glib::ffi::gpointer,
2221            f: glib::ffi::gpointer,
2222        ) {
2223            unsafe {
2224                let f: &F = &*(f as *const F);
2225                f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
2226            }
2227        }
2228        unsafe {
2229            let f: Box_<F> = Box_::new(f);
2230            connect_raw(
2231                self.as_ptr() as *mut _,
2232                c"notify::font".as_ptr(),
2233                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2234                    notify_font_trampoline::<Self, F> as *const (),
2235                )),
2236                Box_::into_raw(f),
2237            )
2238        }
2239    }
2240
2241    #[doc(alias = "font-desc")]
2242    fn connect_font_desc_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2243        unsafe extern "C" fn notify_font_desc_trampoline<P: IsA<TextTag>, F: Fn(&P) + 'static>(
2244            this: *mut ffi::GtkTextTag,
2245            _param_spec: glib::ffi::gpointer,
2246            f: glib::ffi::gpointer,
2247        ) {
2248            unsafe {
2249                let f: &F = &*(f as *const F);
2250                f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
2251            }
2252        }
2253        unsafe {
2254            let f: Box_<F> = Box_::new(f);
2255            connect_raw(
2256                self.as_ptr() as *mut _,
2257                c"notify::font-desc".as_ptr(),
2258                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2259                    notify_font_desc_trampoline::<Self, F> as *const (),
2260                )),
2261                Box_::into_raw(f),
2262            )
2263        }
2264    }
2265
2266    #[doc(alias = "font-features")]
2267    fn connect_font_features_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2268        unsafe extern "C" fn notify_font_features_trampoline<
2269            P: IsA<TextTag>,
2270            F: Fn(&P) + 'static,
2271        >(
2272            this: *mut ffi::GtkTextTag,
2273            _param_spec: glib::ffi::gpointer,
2274            f: glib::ffi::gpointer,
2275        ) {
2276            unsafe {
2277                let f: &F = &*(f as *const F);
2278                f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
2279            }
2280        }
2281        unsafe {
2282            let f: Box_<F> = Box_::new(f);
2283            connect_raw(
2284                self.as_ptr() as *mut _,
2285                c"notify::font-features".as_ptr(),
2286                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2287                    notify_font_features_trampoline::<Self, F> as *const (),
2288                )),
2289                Box_::into_raw(f),
2290            )
2291        }
2292    }
2293
2294    #[doc(alias = "font-features-set")]
2295    fn connect_font_features_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2296        unsafe extern "C" fn notify_font_features_set_trampoline<
2297            P: IsA<TextTag>,
2298            F: Fn(&P) + 'static,
2299        >(
2300            this: *mut ffi::GtkTextTag,
2301            _param_spec: glib::ffi::gpointer,
2302            f: glib::ffi::gpointer,
2303        ) {
2304            unsafe {
2305                let f: &F = &*(f as *const F);
2306                f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
2307            }
2308        }
2309        unsafe {
2310            let f: Box_<F> = Box_::new(f);
2311            connect_raw(
2312                self.as_ptr() as *mut _,
2313                c"notify::font-features-set".as_ptr(),
2314                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2315                    notify_font_features_set_trampoline::<Self, F> as *const (),
2316                )),
2317                Box_::into_raw(f),
2318            )
2319        }
2320    }
2321
2322    #[doc(alias = "foreground")]
2323    fn connect_foreground_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2324        unsafe extern "C" fn notify_foreground_trampoline<P: IsA<TextTag>, F: Fn(&P) + 'static>(
2325            this: *mut ffi::GtkTextTag,
2326            _param_spec: glib::ffi::gpointer,
2327            f: glib::ffi::gpointer,
2328        ) {
2329            unsafe {
2330                let f: &F = &*(f as *const F);
2331                f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
2332            }
2333        }
2334        unsafe {
2335            let f: Box_<F> = Box_::new(f);
2336            connect_raw(
2337                self.as_ptr() as *mut _,
2338                c"notify::foreground".as_ptr(),
2339                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2340                    notify_foreground_trampoline::<Self, F> as *const (),
2341                )),
2342                Box_::into_raw(f),
2343            )
2344        }
2345    }
2346
2347    #[doc(alias = "foreground-rgba")]
2348    fn connect_foreground_rgba_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2349        unsafe extern "C" fn notify_foreground_rgba_trampoline<
2350            P: IsA<TextTag>,
2351            F: Fn(&P) + 'static,
2352        >(
2353            this: *mut ffi::GtkTextTag,
2354            _param_spec: glib::ffi::gpointer,
2355            f: glib::ffi::gpointer,
2356        ) {
2357            unsafe {
2358                let f: &F = &*(f as *const F);
2359                f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
2360            }
2361        }
2362        unsafe {
2363            let f: Box_<F> = Box_::new(f);
2364            connect_raw(
2365                self.as_ptr() as *mut _,
2366                c"notify::foreground-rgba".as_ptr(),
2367                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2368                    notify_foreground_rgba_trampoline::<Self, F> as *const (),
2369                )),
2370                Box_::into_raw(f),
2371            )
2372        }
2373    }
2374
2375    #[doc(alias = "foreground-set")]
2376    fn connect_foreground_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2377        unsafe extern "C" fn notify_foreground_set_trampoline<
2378            P: IsA<TextTag>,
2379            F: Fn(&P) + 'static,
2380        >(
2381            this: *mut ffi::GtkTextTag,
2382            _param_spec: glib::ffi::gpointer,
2383            f: glib::ffi::gpointer,
2384        ) {
2385            unsafe {
2386                let f: &F = &*(f as *const F);
2387                f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
2388            }
2389        }
2390        unsafe {
2391            let f: Box_<F> = Box_::new(f);
2392            connect_raw(
2393                self.as_ptr() as *mut _,
2394                c"notify::foreground-set".as_ptr(),
2395                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2396                    notify_foreground_set_trampoline::<Self, F> as *const (),
2397                )),
2398                Box_::into_raw(f),
2399            )
2400        }
2401    }
2402
2403    #[doc(alias = "indent")]
2404    fn connect_indent_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2405        unsafe extern "C" fn notify_indent_trampoline<P: IsA<TextTag>, F: Fn(&P) + 'static>(
2406            this: *mut ffi::GtkTextTag,
2407            _param_spec: glib::ffi::gpointer,
2408            f: glib::ffi::gpointer,
2409        ) {
2410            unsafe {
2411                let f: &F = &*(f as *const F);
2412                f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
2413            }
2414        }
2415        unsafe {
2416            let f: Box_<F> = Box_::new(f);
2417            connect_raw(
2418                self.as_ptr() as *mut _,
2419                c"notify::indent".as_ptr(),
2420                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2421                    notify_indent_trampoline::<Self, F> as *const (),
2422                )),
2423                Box_::into_raw(f),
2424            )
2425        }
2426    }
2427
2428    #[doc(alias = "indent-set")]
2429    fn connect_indent_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2430        unsafe extern "C" fn notify_indent_set_trampoline<P: IsA<TextTag>, F: Fn(&P) + 'static>(
2431            this: *mut ffi::GtkTextTag,
2432            _param_spec: glib::ffi::gpointer,
2433            f: glib::ffi::gpointer,
2434        ) {
2435            unsafe {
2436                let f: &F = &*(f as *const F);
2437                f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
2438            }
2439        }
2440        unsafe {
2441            let f: Box_<F> = Box_::new(f);
2442            connect_raw(
2443                self.as_ptr() as *mut _,
2444                c"notify::indent-set".as_ptr(),
2445                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2446                    notify_indent_set_trampoline::<Self, F> as *const (),
2447                )),
2448                Box_::into_raw(f),
2449            )
2450        }
2451    }
2452
2453    #[doc(alias = "invisible")]
2454    fn connect_invisible_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2455        unsafe extern "C" fn notify_invisible_trampoline<P: IsA<TextTag>, F: Fn(&P) + 'static>(
2456            this: *mut ffi::GtkTextTag,
2457            _param_spec: glib::ffi::gpointer,
2458            f: glib::ffi::gpointer,
2459        ) {
2460            unsafe {
2461                let f: &F = &*(f as *const F);
2462                f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
2463            }
2464        }
2465        unsafe {
2466            let f: Box_<F> = Box_::new(f);
2467            connect_raw(
2468                self.as_ptr() as *mut _,
2469                c"notify::invisible".as_ptr(),
2470                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2471                    notify_invisible_trampoline::<Self, F> as *const (),
2472                )),
2473                Box_::into_raw(f),
2474            )
2475        }
2476    }
2477
2478    #[doc(alias = "invisible-set")]
2479    fn connect_invisible_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2480        unsafe extern "C" fn notify_invisible_set_trampoline<
2481            P: IsA<TextTag>,
2482            F: Fn(&P) + 'static,
2483        >(
2484            this: *mut ffi::GtkTextTag,
2485            _param_spec: glib::ffi::gpointer,
2486            f: glib::ffi::gpointer,
2487        ) {
2488            unsafe {
2489                let f: &F = &*(f as *const F);
2490                f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
2491            }
2492        }
2493        unsafe {
2494            let f: Box_<F> = Box_::new(f);
2495            connect_raw(
2496                self.as_ptr() as *mut _,
2497                c"notify::invisible-set".as_ptr(),
2498                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2499                    notify_invisible_set_trampoline::<Self, F> as *const (),
2500                )),
2501                Box_::into_raw(f),
2502            )
2503        }
2504    }
2505
2506    #[doc(alias = "justification")]
2507    fn connect_justification_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2508        unsafe extern "C" fn notify_justification_trampoline<
2509            P: IsA<TextTag>,
2510            F: Fn(&P) + 'static,
2511        >(
2512            this: *mut ffi::GtkTextTag,
2513            _param_spec: glib::ffi::gpointer,
2514            f: glib::ffi::gpointer,
2515        ) {
2516            unsafe {
2517                let f: &F = &*(f as *const F);
2518                f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
2519            }
2520        }
2521        unsafe {
2522            let f: Box_<F> = Box_::new(f);
2523            connect_raw(
2524                self.as_ptr() as *mut _,
2525                c"notify::justification".as_ptr(),
2526                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2527                    notify_justification_trampoline::<Self, F> as *const (),
2528                )),
2529                Box_::into_raw(f),
2530            )
2531        }
2532    }
2533
2534    #[doc(alias = "justification-set")]
2535    fn connect_justification_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2536        unsafe extern "C" fn notify_justification_set_trampoline<
2537            P: IsA<TextTag>,
2538            F: Fn(&P) + 'static,
2539        >(
2540            this: *mut ffi::GtkTextTag,
2541            _param_spec: glib::ffi::gpointer,
2542            f: glib::ffi::gpointer,
2543        ) {
2544            unsafe {
2545                let f: &F = &*(f as *const F);
2546                f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
2547            }
2548        }
2549        unsafe {
2550            let f: Box_<F> = Box_::new(f);
2551            connect_raw(
2552                self.as_ptr() as *mut _,
2553                c"notify::justification-set".as_ptr(),
2554                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2555                    notify_justification_set_trampoline::<Self, F> as *const (),
2556                )),
2557                Box_::into_raw(f),
2558            )
2559        }
2560    }
2561
2562    #[doc(alias = "language")]
2563    fn connect_language_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2564        unsafe extern "C" fn notify_language_trampoline<P: IsA<TextTag>, F: Fn(&P) + 'static>(
2565            this: *mut ffi::GtkTextTag,
2566            _param_spec: glib::ffi::gpointer,
2567            f: glib::ffi::gpointer,
2568        ) {
2569            unsafe {
2570                let f: &F = &*(f as *const F);
2571                f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
2572            }
2573        }
2574        unsafe {
2575            let f: Box_<F> = Box_::new(f);
2576            connect_raw(
2577                self.as_ptr() as *mut _,
2578                c"notify::language".as_ptr(),
2579                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2580                    notify_language_trampoline::<Self, F> as *const (),
2581                )),
2582                Box_::into_raw(f),
2583            )
2584        }
2585    }
2586
2587    #[doc(alias = "language-set")]
2588    fn connect_language_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2589        unsafe extern "C" fn notify_language_set_trampoline<
2590            P: IsA<TextTag>,
2591            F: Fn(&P) + 'static,
2592        >(
2593            this: *mut ffi::GtkTextTag,
2594            _param_spec: glib::ffi::gpointer,
2595            f: glib::ffi::gpointer,
2596        ) {
2597            unsafe {
2598                let f: &F = &*(f as *const F);
2599                f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
2600            }
2601        }
2602        unsafe {
2603            let f: Box_<F> = Box_::new(f);
2604            connect_raw(
2605                self.as_ptr() as *mut _,
2606                c"notify::language-set".as_ptr(),
2607                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2608                    notify_language_set_trampoline::<Self, F> as *const (),
2609                )),
2610                Box_::into_raw(f),
2611            )
2612        }
2613    }
2614
2615    #[doc(alias = "left-margin")]
2616    fn connect_left_margin_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2617        unsafe extern "C" fn notify_left_margin_trampoline<P: IsA<TextTag>, F: Fn(&P) + 'static>(
2618            this: *mut ffi::GtkTextTag,
2619            _param_spec: glib::ffi::gpointer,
2620            f: glib::ffi::gpointer,
2621        ) {
2622            unsafe {
2623                let f: &F = &*(f as *const F);
2624                f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
2625            }
2626        }
2627        unsafe {
2628            let f: Box_<F> = Box_::new(f);
2629            connect_raw(
2630                self.as_ptr() as *mut _,
2631                c"notify::left-margin".as_ptr(),
2632                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2633                    notify_left_margin_trampoline::<Self, F> as *const (),
2634                )),
2635                Box_::into_raw(f),
2636            )
2637        }
2638    }
2639
2640    #[doc(alias = "left-margin-set")]
2641    fn connect_left_margin_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2642        unsafe extern "C" fn notify_left_margin_set_trampoline<
2643            P: IsA<TextTag>,
2644            F: Fn(&P) + 'static,
2645        >(
2646            this: *mut ffi::GtkTextTag,
2647            _param_spec: glib::ffi::gpointer,
2648            f: glib::ffi::gpointer,
2649        ) {
2650            unsafe {
2651                let f: &F = &*(f as *const F);
2652                f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
2653            }
2654        }
2655        unsafe {
2656            let f: Box_<F> = Box_::new(f);
2657            connect_raw(
2658                self.as_ptr() as *mut _,
2659                c"notify::left-margin-set".as_ptr(),
2660                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2661                    notify_left_margin_set_trampoline::<Self, F> as *const (),
2662                )),
2663                Box_::into_raw(f),
2664            )
2665        }
2666    }
2667
2668    #[doc(alias = "letter-spacing")]
2669    fn connect_letter_spacing_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2670        unsafe extern "C" fn notify_letter_spacing_trampoline<
2671            P: IsA<TextTag>,
2672            F: Fn(&P) + 'static,
2673        >(
2674            this: *mut ffi::GtkTextTag,
2675            _param_spec: glib::ffi::gpointer,
2676            f: glib::ffi::gpointer,
2677        ) {
2678            unsafe {
2679                let f: &F = &*(f as *const F);
2680                f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
2681            }
2682        }
2683        unsafe {
2684            let f: Box_<F> = Box_::new(f);
2685            connect_raw(
2686                self.as_ptr() as *mut _,
2687                c"notify::letter-spacing".as_ptr(),
2688                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2689                    notify_letter_spacing_trampoline::<Self, F> as *const (),
2690                )),
2691                Box_::into_raw(f),
2692            )
2693        }
2694    }
2695
2696    #[doc(alias = "letter-spacing-set")]
2697    fn connect_letter_spacing_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2698        unsafe extern "C" fn notify_letter_spacing_set_trampoline<
2699            P: IsA<TextTag>,
2700            F: Fn(&P) + 'static,
2701        >(
2702            this: *mut ffi::GtkTextTag,
2703            _param_spec: glib::ffi::gpointer,
2704            f: glib::ffi::gpointer,
2705        ) {
2706            unsafe {
2707                let f: &F = &*(f as *const F);
2708                f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
2709            }
2710        }
2711        unsafe {
2712            let f: Box_<F> = Box_::new(f);
2713            connect_raw(
2714                self.as_ptr() as *mut _,
2715                c"notify::letter-spacing-set".as_ptr(),
2716                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2717                    notify_letter_spacing_set_trampoline::<Self, F> as *const (),
2718                )),
2719                Box_::into_raw(f),
2720            )
2721        }
2722    }
2723
2724    #[doc(alias = "paragraph-background")]
2725    fn connect_paragraph_background_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2726        unsafe extern "C" fn notify_paragraph_background_trampoline<
2727            P: IsA<TextTag>,
2728            F: Fn(&P) + 'static,
2729        >(
2730            this: *mut ffi::GtkTextTag,
2731            _param_spec: glib::ffi::gpointer,
2732            f: glib::ffi::gpointer,
2733        ) {
2734            unsafe {
2735                let f: &F = &*(f as *const F);
2736                f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
2737            }
2738        }
2739        unsafe {
2740            let f: Box_<F> = Box_::new(f);
2741            connect_raw(
2742                self.as_ptr() as *mut _,
2743                c"notify::paragraph-background".as_ptr(),
2744                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2745                    notify_paragraph_background_trampoline::<Self, F> as *const (),
2746                )),
2747                Box_::into_raw(f),
2748            )
2749        }
2750    }
2751
2752    #[doc(alias = "paragraph-background-rgba")]
2753    fn connect_paragraph_background_rgba_notify<F: Fn(&Self) + 'static>(
2754        &self,
2755        f: F,
2756    ) -> SignalHandlerId {
2757        unsafe extern "C" fn notify_paragraph_background_rgba_trampoline<
2758            P: IsA<TextTag>,
2759            F: Fn(&P) + 'static,
2760        >(
2761            this: *mut ffi::GtkTextTag,
2762            _param_spec: glib::ffi::gpointer,
2763            f: glib::ffi::gpointer,
2764        ) {
2765            unsafe {
2766                let f: &F = &*(f as *const F);
2767                f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
2768            }
2769        }
2770        unsafe {
2771            let f: Box_<F> = Box_::new(f);
2772            connect_raw(
2773                self.as_ptr() as *mut _,
2774                c"notify::paragraph-background-rgba".as_ptr(),
2775                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2776                    notify_paragraph_background_rgba_trampoline::<Self, F> as *const (),
2777                )),
2778                Box_::into_raw(f),
2779            )
2780        }
2781    }
2782
2783    #[doc(alias = "paragraph-background-set")]
2784    fn connect_paragraph_background_set_notify<F: Fn(&Self) + 'static>(
2785        &self,
2786        f: F,
2787    ) -> SignalHandlerId {
2788        unsafe extern "C" fn notify_paragraph_background_set_trampoline<
2789            P: IsA<TextTag>,
2790            F: Fn(&P) + 'static,
2791        >(
2792            this: *mut ffi::GtkTextTag,
2793            _param_spec: glib::ffi::gpointer,
2794            f: glib::ffi::gpointer,
2795        ) {
2796            unsafe {
2797                let f: &F = &*(f as *const F);
2798                f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
2799            }
2800        }
2801        unsafe {
2802            let f: Box_<F> = Box_::new(f);
2803            connect_raw(
2804                self.as_ptr() as *mut _,
2805                c"notify::paragraph-background-set".as_ptr(),
2806                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2807                    notify_paragraph_background_set_trampoline::<Self, F> as *const (),
2808                )),
2809                Box_::into_raw(f),
2810            )
2811        }
2812    }
2813
2814    #[doc(alias = "pixels-above-lines")]
2815    fn connect_pixels_above_lines_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2816        unsafe extern "C" fn notify_pixels_above_lines_trampoline<
2817            P: IsA<TextTag>,
2818            F: Fn(&P) + 'static,
2819        >(
2820            this: *mut ffi::GtkTextTag,
2821            _param_spec: glib::ffi::gpointer,
2822            f: glib::ffi::gpointer,
2823        ) {
2824            unsafe {
2825                let f: &F = &*(f as *const F);
2826                f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
2827            }
2828        }
2829        unsafe {
2830            let f: Box_<F> = Box_::new(f);
2831            connect_raw(
2832                self.as_ptr() as *mut _,
2833                c"notify::pixels-above-lines".as_ptr(),
2834                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2835                    notify_pixels_above_lines_trampoline::<Self, F> as *const (),
2836                )),
2837                Box_::into_raw(f),
2838            )
2839        }
2840    }
2841
2842    #[doc(alias = "pixels-above-lines-set")]
2843    fn connect_pixels_above_lines_set_notify<F: Fn(&Self) + 'static>(
2844        &self,
2845        f: F,
2846    ) -> SignalHandlerId {
2847        unsafe extern "C" fn notify_pixels_above_lines_set_trampoline<
2848            P: IsA<TextTag>,
2849            F: Fn(&P) + 'static,
2850        >(
2851            this: *mut ffi::GtkTextTag,
2852            _param_spec: glib::ffi::gpointer,
2853            f: glib::ffi::gpointer,
2854        ) {
2855            unsafe {
2856                let f: &F = &*(f as *const F);
2857                f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
2858            }
2859        }
2860        unsafe {
2861            let f: Box_<F> = Box_::new(f);
2862            connect_raw(
2863                self.as_ptr() as *mut _,
2864                c"notify::pixels-above-lines-set".as_ptr(),
2865                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2866                    notify_pixels_above_lines_set_trampoline::<Self, F> as *const (),
2867                )),
2868                Box_::into_raw(f),
2869            )
2870        }
2871    }
2872
2873    #[doc(alias = "pixels-below-lines")]
2874    fn connect_pixels_below_lines_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2875        unsafe extern "C" fn notify_pixels_below_lines_trampoline<
2876            P: IsA<TextTag>,
2877            F: Fn(&P) + 'static,
2878        >(
2879            this: *mut ffi::GtkTextTag,
2880            _param_spec: glib::ffi::gpointer,
2881            f: glib::ffi::gpointer,
2882        ) {
2883            unsafe {
2884                let f: &F = &*(f as *const F);
2885                f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
2886            }
2887        }
2888        unsafe {
2889            let f: Box_<F> = Box_::new(f);
2890            connect_raw(
2891                self.as_ptr() as *mut _,
2892                c"notify::pixels-below-lines".as_ptr(),
2893                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2894                    notify_pixels_below_lines_trampoline::<Self, F> as *const (),
2895                )),
2896                Box_::into_raw(f),
2897            )
2898        }
2899    }
2900
2901    #[doc(alias = "pixels-below-lines-set")]
2902    fn connect_pixels_below_lines_set_notify<F: Fn(&Self) + 'static>(
2903        &self,
2904        f: F,
2905    ) -> SignalHandlerId {
2906        unsafe extern "C" fn notify_pixels_below_lines_set_trampoline<
2907            P: IsA<TextTag>,
2908            F: Fn(&P) + 'static,
2909        >(
2910            this: *mut ffi::GtkTextTag,
2911            _param_spec: glib::ffi::gpointer,
2912            f: glib::ffi::gpointer,
2913        ) {
2914            unsafe {
2915                let f: &F = &*(f as *const F);
2916                f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
2917            }
2918        }
2919        unsafe {
2920            let f: Box_<F> = Box_::new(f);
2921            connect_raw(
2922                self.as_ptr() as *mut _,
2923                c"notify::pixels-below-lines-set".as_ptr(),
2924                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2925                    notify_pixels_below_lines_set_trampoline::<Self, F> as *const (),
2926                )),
2927                Box_::into_raw(f),
2928            )
2929        }
2930    }
2931
2932    #[doc(alias = "pixels-inside-wrap")]
2933    fn connect_pixels_inside_wrap_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2934        unsafe extern "C" fn notify_pixels_inside_wrap_trampoline<
2935            P: IsA<TextTag>,
2936            F: Fn(&P) + 'static,
2937        >(
2938            this: *mut ffi::GtkTextTag,
2939            _param_spec: glib::ffi::gpointer,
2940            f: glib::ffi::gpointer,
2941        ) {
2942            unsafe {
2943                let f: &F = &*(f as *const F);
2944                f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
2945            }
2946        }
2947        unsafe {
2948            let f: Box_<F> = Box_::new(f);
2949            connect_raw(
2950                self.as_ptr() as *mut _,
2951                c"notify::pixels-inside-wrap".as_ptr(),
2952                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2953                    notify_pixels_inside_wrap_trampoline::<Self, F> as *const (),
2954                )),
2955                Box_::into_raw(f),
2956            )
2957        }
2958    }
2959
2960    #[doc(alias = "pixels-inside-wrap-set")]
2961    fn connect_pixels_inside_wrap_set_notify<F: Fn(&Self) + 'static>(
2962        &self,
2963        f: F,
2964    ) -> SignalHandlerId {
2965        unsafe extern "C" fn notify_pixels_inside_wrap_set_trampoline<
2966            P: IsA<TextTag>,
2967            F: Fn(&P) + 'static,
2968        >(
2969            this: *mut ffi::GtkTextTag,
2970            _param_spec: glib::ffi::gpointer,
2971            f: glib::ffi::gpointer,
2972        ) {
2973            unsafe {
2974                let f: &F = &*(f as *const F);
2975                f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
2976            }
2977        }
2978        unsafe {
2979            let f: Box_<F> = Box_::new(f);
2980            connect_raw(
2981                self.as_ptr() as *mut _,
2982                c"notify::pixels-inside-wrap-set".as_ptr(),
2983                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2984                    notify_pixels_inside_wrap_set_trampoline::<Self, F> as *const (),
2985                )),
2986                Box_::into_raw(f),
2987            )
2988        }
2989    }
2990
2991    #[doc(alias = "right-margin")]
2992    fn connect_right_margin_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2993        unsafe extern "C" fn notify_right_margin_trampoline<
2994            P: IsA<TextTag>,
2995            F: Fn(&P) + 'static,
2996        >(
2997            this: *mut ffi::GtkTextTag,
2998            _param_spec: glib::ffi::gpointer,
2999            f: glib::ffi::gpointer,
3000        ) {
3001            unsafe {
3002                let f: &F = &*(f as *const F);
3003                f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
3004            }
3005        }
3006        unsafe {
3007            let f: Box_<F> = Box_::new(f);
3008            connect_raw(
3009                self.as_ptr() as *mut _,
3010                c"notify::right-margin".as_ptr(),
3011                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3012                    notify_right_margin_trampoline::<Self, F> as *const (),
3013                )),
3014                Box_::into_raw(f),
3015            )
3016        }
3017    }
3018
3019    #[doc(alias = "right-margin-set")]
3020    fn connect_right_margin_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3021        unsafe extern "C" fn notify_right_margin_set_trampoline<
3022            P: IsA<TextTag>,
3023            F: Fn(&P) + 'static,
3024        >(
3025            this: *mut ffi::GtkTextTag,
3026            _param_spec: glib::ffi::gpointer,
3027            f: glib::ffi::gpointer,
3028        ) {
3029            unsafe {
3030                let f: &F = &*(f as *const F);
3031                f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
3032            }
3033        }
3034        unsafe {
3035            let f: Box_<F> = Box_::new(f);
3036            connect_raw(
3037                self.as_ptr() as *mut _,
3038                c"notify::right-margin-set".as_ptr(),
3039                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3040                    notify_right_margin_set_trampoline::<Self, F> as *const (),
3041                )),
3042                Box_::into_raw(f),
3043            )
3044        }
3045    }
3046
3047    #[doc(alias = "rise")]
3048    fn connect_rise_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3049        unsafe extern "C" fn notify_rise_trampoline<P: IsA<TextTag>, F: Fn(&P) + 'static>(
3050            this: *mut ffi::GtkTextTag,
3051            _param_spec: glib::ffi::gpointer,
3052            f: glib::ffi::gpointer,
3053        ) {
3054            unsafe {
3055                let f: &F = &*(f as *const F);
3056                f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
3057            }
3058        }
3059        unsafe {
3060            let f: Box_<F> = Box_::new(f);
3061            connect_raw(
3062                self.as_ptr() as *mut _,
3063                c"notify::rise".as_ptr(),
3064                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3065                    notify_rise_trampoline::<Self, F> as *const (),
3066                )),
3067                Box_::into_raw(f),
3068            )
3069        }
3070    }
3071
3072    #[doc(alias = "rise-set")]
3073    fn connect_rise_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3074        unsafe extern "C" fn notify_rise_set_trampoline<P: IsA<TextTag>, F: Fn(&P) + 'static>(
3075            this: *mut ffi::GtkTextTag,
3076            _param_spec: glib::ffi::gpointer,
3077            f: glib::ffi::gpointer,
3078        ) {
3079            unsafe {
3080                let f: &F = &*(f as *const F);
3081                f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
3082            }
3083        }
3084        unsafe {
3085            let f: Box_<F> = Box_::new(f);
3086            connect_raw(
3087                self.as_ptr() as *mut _,
3088                c"notify::rise-set".as_ptr(),
3089                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3090                    notify_rise_set_trampoline::<Self, F> as *const (),
3091                )),
3092                Box_::into_raw(f),
3093            )
3094        }
3095    }
3096
3097    #[doc(alias = "scale")]
3098    fn connect_scale_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3099        unsafe extern "C" fn notify_scale_trampoline<P: IsA<TextTag>, F: Fn(&P) + 'static>(
3100            this: *mut ffi::GtkTextTag,
3101            _param_spec: glib::ffi::gpointer,
3102            f: glib::ffi::gpointer,
3103        ) {
3104            unsafe {
3105                let f: &F = &*(f as *const F);
3106                f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
3107            }
3108        }
3109        unsafe {
3110            let f: Box_<F> = Box_::new(f);
3111            connect_raw(
3112                self.as_ptr() as *mut _,
3113                c"notify::scale".as_ptr(),
3114                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3115                    notify_scale_trampoline::<Self, F> as *const (),
3116                )),
3117                Box_::into_raw(f),
3118            )
3119        }
3120    }
3121
3122    #[doc(alias = "scale-set")]
3123    fn connect_scale_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3124        unsafe extern "C" fn notify_scale_set_trampoline<P: IsA<TextTag>, F: Fn(&P) + 'static>(
3125            this: *mut ffi::GtkTextTag,
3126            _param_spec: glib::ffi::gpointer,
3127            f: glib::ffi::gpointer,
3128        ) {
3129            unsafe {
3130                let f: &F = &*(f as *const F);
3131                f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
3132            }
3133        }
3134        unsafe {
3135            let f: Box_<F> = Box_::new(f);
3136            connect_raw(
3137                self.as_ptr() as *mut _,
3138                c"notify::scale-set".as_ptr(),
3139                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3140                    notify_scale_set_trampoline::<Self, F> as *const (),
3141                )),
3142                Box_::into_raw(f),
3143            )
3144        }
3145    }
3146
3147    #[doc(alias = "size")]
3148    fn connect_size_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3149        unsafe extern "C" fn notify_size_trampoline<P: IsA<TextTag>, F: Fn(&P) + 'static>(
3150            this: *mut ffi::GtkTextTag,
3151            _param_spec: glib::ffi::gpointer,
3152            f: glib::ffi::gpointer,
3153        ) {
3154            unsafe {
3155                let f: &F = &*(f as *const F);
3156                f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
3157            }
3158        }
3159        unsafe {
3160            let f: Box_<F> = Box_::new(f);
3161            connect_raw(
3162                self.as_ptr() as *mut _,
3163                c"notify::size".as_ptr(),
3164                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3165                    notify_size_trampoline::<Self, F> as *const (),
3166                )),
3167                Box_::into_raw(f),
3168            )
3169        }
3170    }
3171
3172    #[doc(alias = "size-points")]
3173    fn connect_size_points_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3174        unsafe extern "C" fn notify_size_points_trampoline<P: IsA<TextTag>, F: Fn(&P) + 'static>(
3175            this: *mut ffi::GtkTextTag,
3176            _param_spec: glib::ffi::gpointer,
3177            f: glib::ffi::gpointer,
3178        ) {
3179            unsafe {
3180                let f: &F = &*(f as *const F);
3181                f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
3182            }
3183        }
3184        unsafe {
3185            let f: Box_<F> = Box_::new(f);
3186            connect_raw(
3187                self.as_ptr() as *mut _,
3188                c"notify::size-points".as_ptr(),
3189                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3190                    notify_size_points_trampoline::<Self, F> as *const (),
3191                )),
3192                Box_::into_raw(f),
3193            )
3194        }
3195    }
3196
3197    #[doc(alias = "size-set")]
3198    fn connect_size_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3199        unsafe extern "C" fn notify_size_set_trampoline<P: IsA<TextTag>, F: Fn(&P) + 'static>(
3200            this: *mut ffi::GtkTextTag,
3201            _param_spec: glib::ffi::gpointer,
3202            f: glib::ffi::gpointer,
3203        ) {
3204            unsafe {
3205                let f: &F = &*(f as *const F);
3206                f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
3207            }
3208        }
3209        unsafe {
3210            let f: Box_<F> = Box_::new(f);
3211            connect_raw(
3212                self.as_ptr() as *mut _,
3213                c"notify::size-set".as_ptr(),
3214                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3215                    notify_size_set_trampoline::<Self, F> as *const (),
3216                )),
3217                Box_::into_raw(f),
3218            )
3219        }
3220    }
3221
3222    #[doc(alias = "stretch")]
3223    fn connect_stretch_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3224        unsafe extern "C" fn notify_stretch_trampoline<P: IsA<TextTag>, F: Fn(&P) + 'static>(
3225            this: *mut ffi::GtkTextTag,
3226            _param_spec: glib::ffi::gpointer,
3227            f: glib::ffi::gpointer,
3228        ) {
3229            unsafe {
3230                let f: &F = &*(f as *const F);
3231                f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
3232            }
3233        }
3234        unsafe {
3235            let f: Box_<F> = Box_::new(f);
3236            connect_raw(
3237                self.as_ptr() as *mut _,
3238                c"notify::stretch".as_ptr(),
3239                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3240                    notify_stretch_trampoline::<Self, F> as *const (),
3241                )),
3242                Box_::into_raw(f),
3243            )
3244        }
3245    }
3246
3247    #[doc(alias = "stretch-set")]
3248    fn connect_stretch_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3249        unsafe extern "C" fn notify_stretch_set_trampoline<P: IsA<TextTag>, F: Fn(&P) + 'static>(
3250            this: *mut ffi::GtkTextTag,
3251            _param_spec: glib::ffi::gpointer,
3252            f: glib::ffi::gpointer,
3253        ) {
3254            unsafe {
3255                let f: &F = &*(f as *const F);
3256                f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
3257            }
3258        }
3259        unsafe {
3260            let f: Box_<F> = Box_::new(f);
3261            connect_raw(
3262                self.as_ptr() as *mut _,
3263                c"notify::stretch-set".as_ptr(),
3264                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3265                    notify_stretch_set_trampoline::<Self, F> as *const (),
3266                )),
3267                Box_::into_raw(f),
3268            )
3269        }
3270    }
3271
3272    #[doc(alias = "strikethrough")]
3273    fn connect_strikethrough_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3274        unsafe extern "C" fn notify_strikethrough_trampoline<
3275            P: IsA<TextTag>,
3276            F: Fn(&P) + 'static,
3277        >(
3278            this: *mut ffi::GtkTextTag,
3279            _param_spec: glib::ffi::gpointer,
3280            f: glib::ffi::gpointer,
3281        ) {
3282            unsafe {
3283                let f: &F = &*(f as *const F);
3284                f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
3285            }
3286        }
3287        unsafe {
3288            let f: Box_<F> = Box_::new(f);
3289            connect_raw(
3290                self.as_ptr() as *mut _,
3291                c"notify::strikethrough".as_ptr(),
3292                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3293                    notify_strikethrough_trampoline::<Self, F> as *const (),
3294                )),
3295                Box_::into_raw(f),
3296            )
3297        }
3298    }
3299
3300    #[doc(alias = "strikethrough-rgba")]
3301    fn connect_strikethrough_rgba_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3302        unsafe extern "C" fn notify_strikethrough_rgba_trampoline<
3303            P: IsA<TextTag>,
3304            F: Fn(&P) + 'static,
3305        >(
3306            this: *mut ffi::GtkTextTag,
3307            _param_spec: glib::ffi::gpointer,
3308            f: glib::ffi::gpointer,
3309        ) {
3310            unsafe {
3311                let f: &F = &*(f as *const F);
3312                f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
3313            }
3314        }
3315        unsafe {
3316            let f: Box_<F> = Box_::new(f);
3317            connect_raw(
3318                self.as_ptr() as *mut _,
3319                c"notify::strikethrough-rgba".as_ptr(),
3320                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3321                    notify_strikethrough_rgba_trampoline::<Self, F> as *const (),
3322                )),
3323                Box_::into_raw(f),
3324            )
3325        }
3326    }
3327
3328    #[doc(alias = "strikethrough-rgba-set")]
3329    fn connect_strikethrough_rgba_set_notify<F: Fn(&Self) + 'static>(
3330        &self,
3331        f: F,
3332    ) -> SignalHandlerId {
3333        unsafe extern "C" fn notify_strikethrough_rgba_set_trampoline<
3334            P: IsA<TextTag>,
3335            F: Fn(&P) + 'static,
3336        >(
3337            this: *mut ffi::GtkTextTag,
3338            _param_spec: glib::ffi::gpointer,
3339            f: glib::ffi::gpointer,
3340        ) {
3341            unsafe {
3342                let f: &F = &*(f as *const F);
3343                f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
3344            }
3345        }
3346        unsafe {
3347            let f: Box_<F> = Box_::new(f);
3348            connect_raw(
3349                self.as_ptr() as *mut _,
3350                c"notify::strikethrough-rgba-set".as_ptr(),
3351                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3352                    notify_strikethrough_rgba_set_trampoline::<Self, F> as *const (),
3353                )),
3354                Box_::into_raw(f),
3355            )
3356        }
3357    }
3358
3359    #[doc(alias = "strikethrough-set")]
3360    fn connect_strikethrough_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3361        unsafe extern "C" fn notify_strikethrough_set_trampoline<
3362            P: IsA<TextTag>,
3363            F: Fn(&P) + 'static,
3364        >(
3365            this: *mut ffi::GtkTextTag,
3366            _param_spec: glib::ffi::gpointer,
3367            f: glib::ffi::gpointer,
3368        ) {
3369            unsafe {
3370                let f: &F = &*(f as *const F);
3371                f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
3372            }
3373        }
3374        unsafe {
3375            let f: Box_<F> = Box_::new(f);
3376            connect_raw(
3377                self.as_ptr() as *mut _,
3378                c"notify::strikethrough-set".as_ptr(),
3379                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3380                    notify_strikethrough_set_trampoline::<Self, F> as *const (),
3381                )),
3382                Box_::into_raw(f),
3383            )
3384        }
3385    }
3386
3387    #[doc(alias = "style")]
3388    fn connect_style_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3389        unsafe extern "C" fn notify_style_trampoline<P: IsA<TextTag>, F: Fn(&P) + 'static>(
3390            this: *mut ffi::GtkTextTag,
3391            _param_spec: glib::ffi::gpointer,
3392            f: glib::ffi::gpointer,
3393        ) {
3394            unsafe {
3395                let f: &F = &*(f as *const F);
3396                f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
3397            }
3398        }
3399        unsafe {
3400            let f: Box_<F> = Box_::new(f);
3401            connect_raw(
3402                self.as_ptr() as *mut _,
3403                c"notify::style".as_ptr(),
3404                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3405                    notify_style_trampoline::<Self, F> as *const (),
3406                )),
3407                Box_::into_raw(f),
3408            )
3409        }
3410    }
3411
3412    #[doc(alias = "style-set")]
3413    fn connect_style_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3414        unsafe extern "C" fn notify_style_set_trampoline<P: IsA<TextTag>, F: Fn(&P) + 'static>(
3415            this: *mut ffi::GtkTextTag,
3416            _param_spec: glib::ffi::gpointer,
3417            f: glib::ffi::gpointer,
3418        ) {
3419            unsafe {
3420                let f: &F = &*(f as *const F);
3421                f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
3422            }
3423        }
3424        unsafe {
3425            let f: Box_<F> = Box_::new(f);
3426            connect_raw(
3427                self.as_ptr() as *mut _,
3428                c"notify::style-set".as_ptr(),
3429                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3430                    notify_style_set_trampoline::<Self, F> as *const (),
3431                )),
3432                Box_::into_raw(f),
3433            )
3434        }
3435    }
3436
3437    #[doc(alias = "tabs")]
3438    fn connect_tabs_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3439        unsafe extern "C" fn notify_tabs_trampoline<P: IsA<TextTag>, F: Fn(&P) + 'static>(
3440            this: *mut ffi::GtkTextTag,
3441            _param_spec: glib::ffi::gpointer,
3442            f: glib::ffi::gpointer,
3443        ) {
3444            unsafe {
3445                let f: &F = &*(f as *const F);
3446                f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
3447            }
3448        }
3449        unsafe {
3450            let f: Box_<F> = Box_::new(f);
3451            connect_raw(
3452                self.as_ptr() as *mut _,
3453                c"notify::tabs".as_ptr(),
3454                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3455                    notify_tabs_trampoline::<Self, F> as *const (),
3456                )),
3457                Box_::into_raw(f),
3458            )
3459        }
3460    }
3461
3462    #[doc(alias = "tabs-set")]
3463    fn connect_tabs_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3464        unsafe extern "C" fn notify_tabs_set_trampoline<P: IsA<TextTag>, F: Fn(&P) + 'static>(
3465            this: *mut ffi::GtkTextTag,
3466            _param_spec: glib::ffi::gpointer,
3467            f: glib::ffi::gpointer,
3468        ) {
3469            unsafe {
3470                let f: &F = &*(f as *const F);
3471                f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
3472            }
3473        }
3474        unsafe {
3475            let f: Box_<F> = Box_::new(f);
3476            connect_raw(
3477                self.as_ptr() as *mut _,
3478                c"notify::tabs-set".as_ptr(),
3479                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3480                    notify_tabs_set_trampoline::<Self, F> as *const (),
3481                )),
3482                Box_::into_raw(f),
3483            )
3484        }
3485    }
3486
3487    #[doc(alias = "underline")]
3488    fn connect_underline_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3489        unsafe extern "C" fn notify_underline_trampoline<P: IsA<TextTag>, F: Fn(&P) + 'static>(
3490            this: *mut ffi::GtkTextTag,
3491            _param_spec: glib::ffi::gpointer,
3492            f: glib::ffi::gpointer,
3493        ) {
3494            unsafe {
3495                let f: &F = &*(f as *const F);
3496                f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
3497            }
3498        }
3499        unsafe {
3500            let f: Box_<F> = Box_::new(f);
3501            connect_raw(
3502                self.as_ptr() as *mut _,
3503                c"notify::underline".as_ptr(),
3504                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3505                    notify_underline_trampoline::<Self, F> as *const (),
3506                )),
3507                Box_::into_raw(f),
3508            )
3509        }
3510    }
3511
3512    #[doc(alias = "underline-rgba")]
3513    fn connect_underline_rgba_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3514        unsafe extern "C" fn notify_underline_rgba_trampoline<
3515            P: IsA<TextTag>,
3516            F: Fn(&P) + 'static,
3517        >(
3518            this: *mut ffi::GtkTextTag,
3519            _param_spec: glib::ffi::gpointer,
3520            f: glib::ffi::gpointer,
3521        ) {
3522            unsafe {
3523                let f: &F = &*(f as *const F);
3524                f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
3525            }
3526        }
3527        unsafe {
3528            let f: Box_<F> = Box_::new(f);
3529            connect_raw(
3530                self.as_ptr() as *mut _,
3531                c"notify::underline-rgba".as_ptr(),
3532                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3533                    notify_underline_rgba_trampoline::<Self, F> as *const (),
3534                )),
3535                Box_::into_raw(f),
3536            )
3537        }
3538    }
3539
3540    #[doc(alias = "underline-rgba-set")]
3541    fn connect_underline_rgba_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3542        unsafe extern "C" fn notify_underline_rgba_set_trampoline<
3543            P: IsA<TextTag>,
3544            F: Fn(&P) + 'static,
3545        >(
3546            this: *mut ffi::GtkTextTag,
3547            _param_spec: glib::ffi::gpointer,
3548            f: glib::ffi::gpointer,
3549        ) {
3550            unsafe {
3551                let f: &F = &*(f as *const F);
3552                f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
3553            }
3554        }
3555        unsafe {
3556            let f: Box_<F> = Box_::new(f);
3557            connect_raw(
3558                self.as_ptr() as *mut _,
3559                c"notify::underline-rgba-set".as_ptr(),
3560                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3561                    notify_underline_rgba_set_trampoline::<Self, F> as *const (),
3562                )),
3563                Box_::into_raw(f),
3564            )
3565        }
3566    }
3567
3568    #[doc(alias = "underline-set")]
3569    fn connect_underline_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3570        unsafe extern "C" fn notify_underline_set_trampoline<
3571            P: IsA<TextTag>,
3572            F: Fn(&P) + 'static,
3573        >(
3574            this: *mut ffi::GtkTextTag,
3575            _param_spec: glib::ffi::gpointer,
3576            f: glib::ffi::gpointer,
3577        ) {
3578            unsafe {
3579                let f: &F = &*(f as *const F);
3580                f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
3581            }
3582        }
3583        unsafe {
3584            let f: Box_<F> = Box_::new(f);
3585            connect_raw(
3586                self.as_ptr() as *mut _,
3587                c"notify::underline-set".as_ptr(),
3588                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3589                    notify_underline_set_trampoline::<Self, F> as *const (),
3590                )),
3591                Box_::into_raw(f),
3592            )
3593        }
3594    }
3595
3596    #[doc(alias = "variant")]
3597    fn connect_variant_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3598        unsafe extern "C" fn notify_variant_trampoline<P: IsA<TextTag>, F: Fn(&P) + 'static>(
3599            this: *mut ffi::GtkTextTag,
3600            _param_spec: glib::ffi::gpointer,
3601            f: glib::ffi::gpointer,
3602        ) {
3603            unsafe {
3604                let f: &F = &*(f as *const F);
3605                f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
3606            }
3607        }
3608        unsafe {
3609            let f: Box_<F> = Box_::new(f);
3610            connect_raw(
3611                self.as_ptr() as *mut _,
3612                c"notify::variant".as_ptr(),
3613                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3614                    notify_variant_trampoline::<Self, F> as *const (),
3615                )),
3616                Box_::into_raw(f),
3617            )
3618        }
3619    }
3620
3621    #[doc(alias = "variant-set")]
3622    fn connect_variant_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3623        unsafe extern "C" fn notify_variant_set_trampoline<P: IsA<TextTag>, F: Fn(&P) + 'static>(
3624            this: *mut ffi::GtkTextTag,
3625            _param_spec: glib::ffi::gpointer,
3626            f: glib::ffi::gpointer,
3627        ) {
3628            unsafe {
3629                let f: &F = &*(f as *const F);
3630                f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
3631            }
3632        }
3633        unsafe {
3634            let f: Box_<F> = Box_::new(f);
3635            connect_raw(
3636                self.as_ptr() as *mut _,
3637                c"notify::variant-set".as_ptr(),
3638                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3639                    notify_variant_set_trampoline::<Self, F> as *const (),
3640                )),
3641                Box_::into_raw(f),
3642            )
3643        }
3644    }
3645
3646    #[doc(alias = "weight")]
3647    fn connect_weight_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3648        unsafe extern "C" fn notify_weight_trampoline<P: IsA<TextTag>, F: Fn(&P) + 'static>(
3649            this: *mut ffi::GtkTextTag,
3650            _param_spec: glib::ffi::gpointer,
3651            f: glib::ffi::gpointer,
3652        ) {
3653            unsafe {
3654                let f: &F = &*(f as *const F);
3655                f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
3656            }
3657        }
3658        unsafe {
3659            let f: Box_<F> = Box_::new(f);
3660            connect_raw(
3661                self.as_ptr() as *mut _,
3662                c"notify::weight".as_ptr(),
3663                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3664                    notify_weight_trampoline::<Self, F> as *const (),
3665                )),
3666                Box_::into_raw(f),
3667            )
3668        }
3669    }
3670
3671    #[doc(alias = "weight-set")]
3672    fn connect_weight_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3673        unsafe extern "C" fn notify_weight_set_trampoline<P: IsA<TextTag>, F: Fn(&P) + 'static>(
3674            this: *mut ffi::GtkTextTag,
3675            _param_spec: glib::ffi::gpointer,
3676            f: glib::ffi::gpointer,
3677        ) {
3678            unsafe {
3679                let f: &F = &*(f as *const F);
3680                f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
3681            }
3682        }
3683        unsafe {
3684            let f: Box_<F> = Box_::new(f);
3685            connect_raw(
3686                self.as_ptr() as *mut _,
3687                c"notify::weight-set".as_ptr(),
3688                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3689                    notify_weight_set_trampoline::<Self, F> as *const (),
3690                )),
3691                Box_::into_raw(f),
3692            )
3693        }
3694    }
3695
3696    #[doc(alias = "wrap-mode")]
3697    fn connect_wrap_mode_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3698        unsafe extern "C" fn notify_wrap_mode_trampoline<P: IsA<TextTag>, F: Fn(&P) + 'static>(
3699            this: *mut ffi::GtkTextTag,
3700            _param_spec: glib::ffi::gpointer,
3701            f: glib::ffi::gpointer,
3702        ) {
3703            unsafe {
3704                let f: &F = &*(f as *const F);
3705                f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
3706            }
3707        }
3708        unsafe {
3709            let f: Box_<F> = Box_::new(f);
3710            connect_raw(
3711                self.as_ptr() as *mut _,
3712                c"notify::wrap-mode".as_ptr(),
3713                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3714                    notify_wrap_mode_trampoline::<Self, F> as *const (),
3715                )),
3716                Box_::into_raw(f),
3717            )
3718        }
3719    }
3720
3721    #[doc(alias = "wrap-mode-set")]
3722    fn connect_wrap_mode_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3723        unsafe extern "C" fn notify_wrap_mode_set_trampoline<
3724            P: IsA<TextTag>,
3725            F: Fn(&P) + 'static,
3726        >(
3727            this: *mut ffi::GtkTextTag,
3728            _param_spec: glib::ffi::gpointer,
3729            f: glib::ffi::gpointer,
3730        ) {
3731            unsafe {
3732                let f: &F = &*(f as *const F);
3733                f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
3734            }
3735        }
3736        unsafe {
3737            let f: Box_<F> = Box_::new(f);
3738            connect_raw(
3739                self.as_ptr() as *mut _,
3740                c"notify::wrap-mode-set".as_ptr(),
3741                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3742                    notify_wrap_mode_set_trampoline::<Self, F> as *const (),
3743                )),
3744                Box_::into_raw(f),
3745            )
3746        }
3747    }
3748}
3749
3750impl<O: IsA<TextTag>> TextTagExt for O {}