// This file was generated by gir (https://github.com/gtk-rs/gir)
// from gir-files (https://github.com/gtk-rs/gir-files)
// DO NOT EDIT

use crate::{ffi, Justification, TextDirection, WrapMode};
use glib::{
    prelude::*,
    signal::{connect_raw, SignalHandlerId},
    translate::*,
};
use std::boxed::Box as Box_;

glib::wrapper! {
    #[doc(alias = "GtkTextTag")]
    pub struct TextTag(Object<ffi::GtkTextTag, ffi::GtkTextTagClass>);

    match fn {
        type_ => || ffi::gtk_text_tag_get_type(),
    }
}

impl TextTag {
    pub const NONE: Option<&'static TextTag> = None;

    #[doc(alias = "gtk_text_tag_new")]
    pub fn new(name: Option<&str>) -> TextTag {
        assert_initialized_main_thread!();
        unsafe { from_glib_full(ffi::gtk_text_tag_new(name.to_glib_none().0)) }
    }

    // rustdoc-stripper-ignore-next
    /// Creates a new builder-pattern struct instance to construct [`TextTag`] objects.
    ///
    /// This method returns an instance of [`TextTagBuilder`](crate::builders::TextTagBuilder) which can be used to create [`TextTag`] objects.
    pub fn builder() -> TextTagBuilder {
        TextTagBuilder::new()
    }
}

impl Default for TextTag {
    fn default() -> Self {
        glib::object::Object::new::<Self>()
    }
}

// rustdoc-stripper-ignore-next
/// A [builder-pattern] type to construct [`TextTag`] objects.
///
/// [builder-pattern]: https://doc.rust-lang.org/1.0.0/style/ownership/builders.html
#[must_use = "The builder must be built to be used"]
pub struct TextTagBuilder {
    builder: glib::object::ObjectBuilder<'static, TextTag>,
}

impl TextTagBuilder {
    fn new() -> Self {
        Self {
            builder: glib::object::Object::builder(),
        }
    }

    pub fn accumulative_margin(self, accumulative_margin: bool) -> Self {
        Self {
            builder: self
                .builder
                .property("accumulative-margin", accumulative_margin),
        }
    }

    pub fn allow_breaks(self, allow_breaks: bool) -> Self {
        Self {
            builder: self.builder.property("allow-breaks", allow_breaks),
        }
    }

    pub fn allow_breaks_set(self, allow_breaks_set: bool) -> Self {
        Self {
            builder: self.builder.property("allow-breaks-set", allow_breaks_set),
        }
    }

    pub fn background(self, background: impl Into<glib::GString>) -> Self {
        Self {
            builder: self.builder.property("background", background.into()),
        }
    }

    pub fn background_full_height(self, background_full_height: bool) -> Self {
        Self {
            builder: self
                .builder
                .property("background-full-height", background_full_height),
        }
    }

    pub fn background_full_height_set(self, background_full_height_set: bool) -> Self {
        Self {
            builder: self
                .builder
                .property("background-full-height-set", background_full_height_set),
        }
    }

    pub fn background_rgba(self, background_rgba: &gdk::RGBA) -> Self {
        Self {
            builder: self.builder.property("background-rgba", background_rgba),
        }
    }

    pub fn background_set(self, background_set: bool) -> Self {
        Self {
            builder: self.builder.property("background-set", background_set),
        }
    }

    pub fn direction(self, direction: TextDirection) -> Self {
        Self {
            builder: self.builder.property("direction", direction),
        }
    }

    pub fn editable(self, editable: bool) -> Self {
        Self {
            builder: self.builder.property("editable", editable),
        }
    }

    pub fn editable_set(self, editable_set: bool) -> Self {
        Self {
            builder: self.builder.property("editable-set", editable_set),
        }
    }

    pub fn fallback(self, fallback: bool) -> Self {
        Self {
            builder: self.builder.property("fallback", fallback),
        }
    }

    pub fn fallback_set(self, fallback_set: bool) -> Self {
        Self {
            builder: self.builder.property("fallback-set", fallback_set),
        }
    }

    pub fn family(self, family: impl Into<glib::GString>) -> Self {
        Self {
            builder: self.builder.property("family", family.into()),
        }
    }

    pub fn family_set(self, family_set: bool) -> Self {
        Self {
            builder: self.builder.property("family-set", family_set),
        }
    }

    pub fn font(self, font: impl Into<glib::GString>) -> Self {
        Self {
            builder: self.builder.property("font", font.into()),
        }
    }

    pub fn font_desc(self, font_desc: &pango::FontDescription) -> Self {
        Self {
            builder: self.builder.property("font-desc", font_desc),
        }
    }

    pub fn font_features(self, font_features: impl Into<glib::GString>) -> Self {
        Self {
            builder: self.builder.property("font-features", font_features.into()),
        }
    }

    pub fn font_features_set(self, font_features_set: bool) -> Self {
        Self {
            builder: self
                .builder
                .property("font-features-set", font_features_set),
        }
    }

    pub fn foreground(self, foreground: impl Into<glib::GString>) -> Self {
        Self {
            builder: self.builder.property("foreground", foreground.into()),
        }
    }

    pub fn foreground_rgba(self, foreground_rgba: &gdk::RGBA) -> Self {
        Self {
            builder: self.builder.property("foreground-rgba", foreground_rgba),
        }
    }

    pub fn foreground_set(self, foreground_set: bool) -> Self {
        Self {
            builder: self.builder.property("foreground-set", foreground_set),
        }
    }

    pub fn indent(self, indent: i32) -> Self {
        Self {
            builder: self.builder.property("indent", indent),
        }
    }

    pub fn indent_set(self, indent_set: bool) -> Self {
        Self {
            builder: self.builder.property("indent-set", indent_set),
        }
    }

    pub fn insert_hyphens(self, insert_hyphens: bool) -> Self {
        Self {
            builder: self.builder.property("insert-hyphens", insert_hyphens),
        }
    }

    pub fn insert_hyphens_set(self, insert_hyphens_set: bool) -> Self {
        Self {
            builder: self
                .builder
                .property("insert-hyphens-set", insert_hyphens_set),
        }
    }

    pub fn invisible(self, invisible: bool) -> Self {
        Self {
            builder: self.builder.property("invisible", invisible),
        }
    }

    pub fn invisible_set(self, invisible_set: bool) -> Self {
        Self {
            builder: self.builder.property("invisible-set", invisible_set),
        }
    }

    pub fn justification(self, justification: Justification) -> Self {
        Self {
            builder: self.builder.property("justification", justification),
        }
    }

    pub fn justification_set(self, justification_set: bool) -> Self {
        Self {
            builder: self
                .builder
                .property("justification-set", justification_set),
        }
    }

    pub fn language(self, language: impl Into<glib::GString>) -> Self {
        Self {
            builder: self.builder.property("language", language.into()),
        }
    }

    pub fn language_set(self, language_set: bool) -> Self {
        Self {
            builder: self.builder.property("language-set", language_set),
        }
    }

    pub fn left_margin(self, left_margin: i32) -> Self {
        Self {
            builder: self.builder.property("left-margin", left_margin),
        }
    }

    pub fn left_margin_set(self, left_margin_set: bool) -> Self {
        Self {
            builder: self.builder.property("left-margin-set", left_margin_set),
        }
    }

    pub fn letter_spacing(self, letter_spacing: i32) -> Self {
        Self {
            builder: self.builder.property("letter-spacing", letter_spacing),
        }
    }

    pub fn letter_spacing_set(self, letter_spacing_set: bool) -> Self {
        Self {
            builder: self
                .builder
                .property("letter-spacing-set", letter_spacing_set),
        }
    }

    #[cfg(feature = "v4_6")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v4_6")))]
    pub fn line_height(self, line_height: f32) -> Self {
        Self {
            builder: self.builder.property("line-height", line_height),
        }
    }

    #[cfg(feature = "v4_6")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v4_6")))]
    pub fn line_height_set(self, line_height_set: bool) -> Self {
        Self {
            builder: self.builder.property("line-height-set", line_height_set),
        }
    }

    pub fn name(self, name: impl Into<glib::GString>) -> Self {
        Self {
            builder: self.builder.property("name", name.into()),
        }
    }

    pub fn overline(self, overline: pango::Overline) -> Self {
        Self {
            builder: self.builder.property("overline", overline),
        }
    }

    pub fn overline_rgba(self, overline_rgba: &gdk::RGBA) -> Self {
        Self {
            builder: self.builder.property("overline-rgba", overline_rgba),
        }
    }

    pub fn overline_rgba_set(self, overline_rgba_set: bool) -> Self {
        Self {
            builder: self
                .builder
                .property("overline-rgba-set", overline_rgba_set),
        }
    }

    pub fn overline_set(self, overline_set: bool) -> Self {
        Self {
            builder: self.builder.property("overline-set", overline_set),
        }
    }

    pub fn paragraph_background(self, paragraph_background: impl Into<glib::GString>) -> Self {
        Self {
            builder: self
                .builder
                .property("paragraph-background", paragraph_background.into()),
        }
    }

    pub fn paragraph_background_rgba(self, paragraph_background_rgba: &gdk::RGBA) -> Self {
        Self {
            builder: self
                .builder
                .property("paragraph-background-rgba", paragraph_background_rgba),
        }
    }

    pub fn paragraph_background_set(self, paragraph_background_set: bool) -> Self {
        Self {
            builder: self
                .builder
                .property("paragraph-background-set", paragraph_background_set),
        }
    }

    pub fn pixels_above_lines(self, pixels_above_lines: i32) -> Self {
        Self {
            builder: self
                .builder
                .property("pixels-above-lines", pixels_above_lines),
        }
    }

    pub fn pixels_above_lines_set(self, pixels_above_lines_set: bool) -> Self {
        Self {
            builder: self
                .builder
                .property("pixels-above-lines-set", pixels_above_lines_set),
        }
    }

    pub fn pixels_below_lines(self, pixels_below_lines: i32) -> Self {
        Self {
            builder: self
                .builder
                .property("pixels-below-lines", pixels_below_lines),
        }
    }

    pub fn pixels_below_lines_set(self, pixels_below_lines_set: bool) -> Self {
        Self {
            builder: self
                .builder
                .property("pixels-below-lines-set", pixels_below_lines_set),
        }
    }

    pub fn pixels_inside_wrap(self, pixels_inside_wrap: i32) -> Self {
        Self {
            builder: self
                .builder
                .property("pixels-inside-wrap", pixels_inside_wrap),
        }
    }

    pub fn pixels_inside_wrap_set(self, pixels_inside_wrap_set: bool) -> Self {
        Self {
            builder: self
                .builder
                .property("pixels-inside-wrap-set", pixels_inside_wrap_set),
        }
    }

    pub fn right_margin(self, right_margin: i32) -> Self {
        Self {
            builder: self.builder.property("right-margin", right_margin),
        }
    }

    pub fn right_margin_set(self, right_margin_set: bool) -> Self {
        Self {
            builder: self.builder.property("right-margin-set", right_margin_set),
        }
    }

    pub fn rise(self, rise: i32) -> Self {
        Self {
            builder: self.builder.property("rise", rise),
        }
    }

    pub fn rise_set(self, rise_set: bool) -> Self {
        Self {
            builder: self.builder.property("rise-set", rise_set),
        }
    }

    pub fn scale(self, scale: f64) -> Self {
        Self {
            builder: self.builder.property("scale", scale),
        }
    }

    pub fn scale_set(self, scale_set: bool) -> Self {
        Self {
            builder: self.builder.property("scale-set", scale_set),
        }
    }

    #[cfg(feature = "v4_6")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v4_6")))]
    pub fn sentence(self, sentence: bool) -> Self {
        Self {
            builder: self.builder.property("sentence", sentence),
        }
    }

    #[cfg(feature = "v4_6")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v4_6")))]
    pub fn sentence_set(self, sentence_set: bool) -> Self {
        Self {
            builder: self.builder.property("sentence-set", sentence_set),
        }
    }

    pub fn show_spaces(self, show_spaces: pango::ShowFlags) -> Self {
        Self {
            builder: self.builder.property("show-spaces", show_spaces),
        }
    }

    pub fn show_spaces_set(self, show_spaces_set: bool) -> Self {
        Self {
            builder: self.builder.property("show-spaces-set", show_spaces_set),
        }
    }

    pub fn size(self, size: i32) -> Self {
        Self {
            builder: self.builder.property("size", size),
        }
    }

    pub fn size_points(self, size_points: f64) -> Self {
        Self {
            builder: self.builder.property("size-points", size_points),
        }
    }

    pub fn size_set(self, size_set: bool) -> Self {
        Self {
            builder: self.builder.property("size-set", size_set),
        }
    }

    pub fn stretch(self, stretch: pango::Stretch) -> Self {
        Self {
            builder: self.builder.property("stretch", stretch),
        }
    }

    pub fn stretch_set(self, stretch_set: bool) -> Self {
        Self {
            builder: self.builder.property("stretch-set", stretch_set),
        }
    }

    pub fn strikethrough(self, strikethrough: bool) -> Self {
        Self {
            builder: self.builder.property("strikethrough", strikethrough),
        }
    }

    pub fn strikethrough_rgba(self, strikethrough_rgba: &gdk::RGBA) -> Self {
        Self {
            builder: self
                .builder
                .property("strikethrough-rgba", strikethrough_rgba),
        }
    }

    pub fn strikethrough_rgba_set(self, strikethrough_rgba_set: bool) -> Self {
        Self {
            builder: self
                .builder
                .property("strikethrough-rgba-set", strikethrough_rgba_set),
        }
    }

    pub fn strikethrough_set(self, strikethrough_set: bool) -> Self {
        Self {
            builder: self
                .builder
                .property("strikethrough-set", strikethrough_set),
        }
    }

    pub fn style(self, style: pango::Style) -> Self {
        Self {
            builder: self.builder.property("style", style),
        }
    }

    pub fn style_set(self, style_set: bool) -> Self {
        Self {
            builder: self.builder.property("style-set", style_set),
        }
    }

    pub fn tabs(self, tabs: &pango::TabArray) -> Self {
        Self {
            builder: self.builder.property("tabs", tabs),
        }
    }

    pub fn tabs_set(self, tabs_set: bool) -> Self {
        Self {
            builder: self.builder.property("tabs-set", tabs_set),
        }
    }

    #[cfg(feature = "v4_6")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v4_6")))]
    pub fn text_transform(self, text_transform: pango::TextTransform) -> Self {
        Self {
            builder: self.builder.property("text-transform", text_transform),
        }
    }

    #[cfg(feature = "v4_6")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v4_6")))]
    pub fn text_transform_set(self, text_transform_set: bool) -> Self {
        Self {
            builder: self
                .builder
                .property("text-transform-set", text_transform_set),
        }
    }

    pub fn underline(self, underline: pango::Underline) -> Self {
        Self {
            builder: self.builder.property("underline", underline),
        }
    }

    pub fn underline_rgba(self, underline_rgba: &gdk::RGBA) -> Self {
        Self {
            builder: self.builder.property("underline-rgba", underline_rgba),
        }
    }

    pub fn underline_rgba_set(self, underline_rgba_set: bool) -> Self {
        Self {
            builder: self
                .builder
                .property("underline-rgba-set", underline_rgba_set),
        }
    }

    pub fn underline_set(self, underline_set: bool) -> Self {
        Self {
            builder: self.builder.property("underline-set", underline_set),
        }
    }

    pub fn variant(self, variant: pango::Variant) -> Self {
        Self {
            builder: self.builder.property("variant", variant),
        }
    }

    pub fn variant_set(self, variant_set: bool) -> Self {
        Self {
            builder: self.builder.property("variant-set", variant_set),
        }
    }

    pub fn weight(self, weight: i32) -> Self {
        Self {
            builder: self.builder.property("weight", weight),
        }
    }

    pub fn weight_set(self, weight_set: bool) -> Self {
        Self {
            builder: self.builder.property("weight-set", weight_set),
        }
    }

    #[cfg(feature = "v4_6")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v4_6")))]
    pub fn word(self, word: bool) -> Self {
        Self {
            builder: self.builder.property("word", word),
        }
    }

    #[cfg(feature = "v4_6")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v4_6")))]
    pub fn word_set(self, word_set: bool) -> Self {
        Self {
            builder: self.builder.property("word-set", word_set),
        }
    }

    pub fn wrap_mode(self, wrap_mode: WrapMode) -> Self {
        Self {
            builder: self.builder.property("wrap-mode", wrap_mode),
        }
    }

    pub fn wrap_mode_set(self, wrap_mode_set: bool) -> Self {
        Self {
            builder: self.builder.property("wrap-mode-set", wrap_mode_set),
        }
    }

    // rustdoc-stripper-ignore-next
    /// Build the [`TextTag`].
    #[must_use = "Building the object from the builder is usually expensive and is not expected to have side effects"]
    pub fn build(self) -> TextTag {
        assert_initialized_main_thread!();
        self.builder.build()
    }
}

mod sealed {
    pub trait Sealed {}
    impl<T: super::IsA<super::TextTag>> Sealed for T {}
}

pub trait TextTagExt: IsA<TextTag> + sealed::Sealed + 'static {
    #[doc(alias = "gtk_text_tag_changed")]
    fn changed(&self, size_changed: bool) {
        unsafe {
            ffi::gtk_text_tag_changed(self.as_ref().to_glib_none().0, size_changed.into_glib());
        }
    }

    #[doc(alias = "gtk_text_tag_get_priority")]
    #[doc(alias = "get_priority")]
    fn priority(&self) -> i32 {
        unsafe { ffi::gtk_text_tag_get_priority(self.as_ref().to_glib_none().0) }
    }

    #[doc(alias = "gtk_text_tag_set_priority")]
    fn set_priority(&self, priority: i32) {
        unsafe {
            ffi::gtk_text_tag_set_priority(self.as_ref().to_glib_none().0, priority);
        }
    }

    #[doc(alias = "accumulative-margin")]
    fn is_accumulative_margin(&self) -> bool {
        ObjectExt::property(self.as_ref(), "accumulative-margin")
    }

    #[doc(alias = "accumulative-margin")]
    fn set_accumulative_margin(&self, accumulative_margin: bool) {
        ObjectExt::set_property(self.as_ref(), "accumulative-margin", accumulative_margin)
    }

    #[doc(alias = "allow-breaks")]
    fn allows_breaks(&self) -> bool {
        ObjectExt::property(self.as_ref(), "allow-breaks")
    }

    #[doc(alias = "allow-breaks")]
    fn set_allow_breaks(&self, allow_breaks: bool) {
        ObjectExt::set_property(self.as_ref(), "allow-breaks", allow_breaks)
    }

    #[doc(alias = "allow-breaks-set")]
    fn allows_breaks_set(&self) -> bool {
        ObjectExt::property(self.as_ref(), "allow-breaks-set")
    }

    fn set_background(&self, background: Option<&str>) {
        ObjectExt::set_property(self.as_ref(), "background", background)
    }

    #[doc(alias = "background-full-height")]
    fn is_background_full_height(&self) -> bool {
        ObjectExt::property(self.as_ref(), "background-full-height")
    }

    #[doc(alias = "background-full-height")]
    fn set_background_full_height(&self, background_full_height: bool) {
        ObjectExt::set_property(
            self.as_ref(),
            "background-full-height",
            background_full_height,
        )
    }

    #[doc(alias = "background-full-height-set")]
    fn is_background_full_height_set(&self) -> bool {
        ObjectExt::property(self.as_ref(), "background-full-height-set")
    }

    #[doc(alias = "background-rgba")]
    fn background_rgba(&self) -> Option<gdk::RGBA> {
        ObjectExt::property(self.as_ref(), "background-rgba")
    }

    #[doc(alias = "background-rgba")]
    fn set_background_rgba(&self, background_rgba: Option<&gdk::RGBA>) {
        ObjectExt::set_property(self.as_ref(), "background-rgba", background_rgba)
    }

    #[doc(alias = "background-set")]
    fn is_background_set(&self) -> bool {
        ObjectExt::property(self.as_ref(), "background-set")
    }

    fn direction(&self) -> TextDirection {
        ObjectExt::property(self.as_ref(), "direction")
    }

    fn set_direction(&self, direction: TextDirection) {
        ObjectExt::set_property(self.as_ref(), "direction", direction)
    }

    fn is_editable(&self) -> bool {
        ObjectExt::property(self.as_ref(), "editable")
    }

    fn set_editable(&self, editable: bool) {
        ObjectExt::set_property(self.as_ref(), "editable", editable)
    }

    #[doc(alias = "editable-set")]
    fn is_editable_set(&self) -> bool {
        ObjectExt::property(self.as_ref(), "editable-set")
    }

    fn is_fallback(&self) -> bool {
        ObjectExt::property(self.as_ref(), "fallback")
    }

    fn set_fallback(&self, fallback: bool) {
        ObjectExt::set_property(self.as_ref(), "fallback", fallback)
    }

    #[doc(alias = "fallback-set")]
    fn is_fallback_set(&self) -> bool {
        ObjectExt::property(self.as_ref(), "fallback-set")
    }

    fn family(&self) -> Option<glib::GString> {
        ObjectExt::property(self.as_ref(), "family")
    }

    fn set_family(&self, family: Option<&str>) {
        ObjectExt::set_property(self.as_ref(), "family", family)
    }

    #[doc(alias = "family-set")]
    fn is_family_set(&self) -> bool {
        ObjectExt::property(self.as_ref(), "family-set")
    }

    fn font(&self) -> Option<glib::GString> {
        ObjectExt::property(self.as_ref(), "font")
    }

    fn set_font(&self, font: Option<&str>) {
        ObjectExt::set_property(self.as_ref(), "font", font)
    }

    #[doc(alias = "font-desc")]
    fn font_desc(&self) -> Option<pango::FontDescription> {
        ObjectExt::property(self.as_ref(), "font-desc")
    }

    #[doc(alias = "font-desc")]
    fn set_font_desc(&self, font_desc: Option<&pango::FontDescription>) {
        ObjectExt::set_property(self.as_ref(), "font-desc", font_desc)
    }

    #[doc(alias = "font-features")]
    fn font_features(&self) -> Option<glib::GString> {
        ObjectExt::property(self.as_ref(), "font-features")
    }

    #[doc(alias = "font-features")]
    fn set_font_features(&self, font_features: Option<&str>) {
        ObjectExt::set_property(self.as_ref(), "font-features", font_features)
    }

    #[doc(alias = "font-features-set")]
    fn is_font_features_set(&self) -> bool {
        ObjectExt::property(self.as_ref(), "font-features-set")
    }

    fn set_foreground(&self, foreground: Option<&str>) {
        ObjectExt::set_property(self.as_ref(), "foreground", foreground)
    }

    #[doc(alias = "foreground-rgba")]
    fn foreground_rgba(&self) -> Option<gdk::RGBA> {
        ObjectExt::property(self.as_ref(), "foreground-rgba")
    }

    #[doc(alias = "foreground-rgba")]
    fn set_foreground_rgba(&self, foreground_rgba: Option<&gdk::RGBA>) {
        ObjectExt::set_property(self.as_ref(), "foreground-rgba", foreground_rgba)
    }

    #[doc(alias = "foreground-set")]
    fn is_foreground_set(&self) -> bool {
        ObjectExt::property(self.as_ref(), "foreground-set")
    }

    fn indent(&self) -> i32 {
        ObjectExt::property(self.as_ref(), "indent")
    }

    fn set_indent(&self, indent: i32) {
        ObjectExt::set_property(self.as_ref(), "indent", indent)
    }

    #[doc(alias = "indent-set")]
    fn is_indent_set(&self) -> bool {
        ObjectExt::property(self.as_ref(), "indent-set")
    }

    #[doc(alias = "insert-hyphens")]
    fn is_insert_hyphens(&self) -> bool {
        ObjectExt::property(self.as_ref(), "insert-hyphens")
    }

    #[doc(alias = "insert-hyphens")]
    fn set_insert_hyphens(&self, insert_hyphens: bool) {
        ObjectExt::set_property(self.as_ref(), "insert-hyphens", insert_hyphens)
    }

    #[doc(alias = "insert-hyphens-set")]
    fn is_insert_hyphens_set(&self) -> bool {
        ObjectExt::property(self.as_ref(), "insert-hyphens-set")
    }

    fn is_invisible(&self) -> bool {
        ObjectExt::property(self.as_ref(), "invisible")
    }

    fn set_invisible(&self, invisible: bool) {
        ObjectExt::set_property(self.as_ref(), "invisible", invisible)
    }

    #[doc(alias = "invisible-set")]
    fn is_invisible_set(&self) -> bool {
        ObjectExt::property(self.as_ref(), "invisible-set")
    }

    fn justification(&self) -> Justification {
        ObjectExt::property(self.as_ref(), "justification")
    }

    fn set_justification(&self, justification: Justification) {
        ObjectExt::set_property(self.as_ref(), "justification", justification)
    }

    #[doc(alias = "justification-set")]
    fn is_justification_set(&self) -> bool {
        ObjectExt::property(self.as_ref(), "justification-set")
    }

    fn language(&self) -> Option<glib::GString> {
        ObjectExt::property(self.as_ref(), "language")
    }

    fn set_language(&self, language: Option<&str>) {
        ObjectExt::set_property(self.as_ref(), "language", language)
    }

    #[doc(alias = "language-set")]
    fn is_language_set(&self) -> bool {
        ObjectExt::property(self.as_ref(), "language-set")
    }

    #[doc(alias = "left-margin")]
    fn left_margin(&self) -> i32 {
        ObjectExt::property(self.as_ref(), "left-margin")
    }

    #[doc(alias = "left-margin")]
    fn set_left_margin(&self, left_margin: i32) {
        ObjectExt::set_property(self.as_ref(), "left-margin", left_margin)
    }

    #[doc(alias = "left-margin-set")]
    fn is_left_margin_set(&self) -> bool {
        ObjectExt::property(self.as_ref(), "left-margin-set")
    }

    #[doc(alias = "letter-spacing")]
    fn letter_spacing(&self) -> i32 {
        ObjectExt::property(self.as_ref(), "letter-spacing")
    }

    #[doc(alias = "letter-spacing")]
    fn set_letter_spacing(&self, letter_spacing: i32) {
        ObjectExt::set_property(self.as_ref(), "letter-spacing", letter_spacing)
    }

    #[doc(alias = "letter-spacing-set")]
    fn is_letter_spacing_set(&self) -> bool {
        ObjectExt::property(self.as_ref(), "letter-spacing-set")
    }

    #[cfg(feature = "v4_6")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v4_6")))]
    #[doc(alias = "line-height")]
    fn line_height(&self) -> f32 {
        ObjectExt::property(self.as_ref(), "line-height")
    }

    #[cfg(feature = "v4_6")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v4_6")))]
    #[doc(alias = "line-height")]
    fn set_line_height(&self, line_height: f32) {
        ObjectExt::set_property(self.as_ref(), "line-height", line_height)
    }

    #[cfg(feature = "v4_6")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v4_6")))]
    #[doc(alias = "line-height-set")]
    fn is_line_height_set(&self) -> bool {
        ObjectExt::property(self.as_ref(), "line-height-set")
    }

    fn name(&self) -> Option<glib::GString> {
        ObjectExt::property(self.as_ref(), "name")
    }

    fn overline(&self) -> pango::Overline {
        ObjectExt::property(self.as_ref(), "overline")
    }

    fn set_overline(&self, overline: pango::Overline) {
        ObjectExt::set_property(self.as_ref(), "overline", overline)
    }

    #[doc(alias = "overline-rgba")]
    fn overline_rgba(&self) -> Option<gdk::RGBA> {
        ObjectExt::property(self.as_ref(), "overline-rgba")
    }

    #[doc(alias = "overline-rgba")]
    fn set_overline_rgba(&self, overline_rgba: Option<&gdk::RGBA>) {
        ObjectExt::set_property(self.as_ref(), "overline-rgba", overline_rgba)
    }

    #[doc(alias = "overline-rgba-set")]
    fn is_overline_rgba_set(&self) -> bool {
        ObjectExt::property(self.as_ref(), "overline-rgba-set")
    }

    #[doc(alias = "overline-set")]
    fn is_overline_set(&self) -> bool {
        ObjectExt::property(self.as_ref(), "overline-set")
    }

    #[doc(alias = "paragraph-background")]
    fn set_paragraph_background(&self, paragraph_background: Option<&str>) {
        ObjectExt::set_property(self.as_ref(), "paragraph-background", paragraph_background)
    }

    #[doc(alias = "paragraph-background-rgba")]
    fn paragraph_background_rgba(&self) -> Option<gdk::RGBA> {
        ObjectExt::property(self.as_ref(), "paragraph-background-rgba")
    }

    #[doc(alias = "paragraph-background-rgba")]
    fn set_paragraph_background_rgba(&self, paragraph_background_rgba: Option<&gdk::RGBA>) {
        ObjectExt::set_property(
            self.as_ref(),
            "paragraph-background-rgba",
            paragraph_background_rgba,
        )
    }

    #[doc(alias = "paragraph-background-set")]
    fn is_paragraph_background_set(&self) -> bool {
        ObjectExt::property(self.as_ref(), "paragraph-background-set")
    }

    #[doc(alias = "pixels-above-lines")]
    fn pixels_above_lines(&self) -> i32 {
        ObjectExt::property(self.as_ref(), "pixels-above-lines")
    }

    #[doc(alias = "pixels-above-lines")]
    fn set_pixels_above_lines(&self, pixels_above_lines: i32) {
        ObjectExt::set_property(self.as_ref(), "pixels-above-lines", pixels_above_lines)
    }

    #[doc(alias = "pixels-above-lines-set")]
    fn is_pixels_above_lines_set(&self) -> bool {
        ObjectExt::property(self.as_ref(), "pixels-above-lines-set")
    }

    #[doc(alias = "pixels-below-lines")]
    fn pixels_below_lines(&self) -> i32 {
        ObjectExt::property(self.as_ref(), "pixels-below-lines")
    }

    #[doc(alias = "pixels-below-lines")]
    fn set_pixels_below_lines(&self, pixels_below_lines: i32) {
        ObjectExt::set_property(self.as_ref(), "pixels-below-lines", pixels_below_lines)
    }

    #[doc(alias = "pixels-below-lines-set")]
    fn is_pixels_below_lines_set(&self) -> bool {
        ObjectExt::property(self.as_ref(), "pixels-below-lines-set")
    }

    #[doc(alias = "pixels-inside-wrap")]
    fn pixels_inside_wrap(&self) -> i32 {
        ObjectExt::property(self.as_ref(), "pixels-inside-wrap")
    }

    #[doc(alias = "pixels-inside-wrap")]
    fn set_pixels_inside_wrap(&self, pixels_inside_wrap: i32) {
        ObjectExt::set_property(self.as_ref(), "pixels-inside-wrap", pixels_inside_wrap)
    }

    #[doc(alias = "pixels-inside-wrap-set")]
    fn is_pixels_inside_wrap_set(&self) -> bool {
        ObjectExt::property(self.as_ref(), "pixels-inside-wrap-set")
    }

    #[doc(alias = "right-margin")]
    fn right_margin(&self) -> i32 {
        ObjectExt::property(self.as_ref(), "right-margin")
    }

    #[doc(alias = "right-margin")]
    fn set_right_margin(&self, right_margin: i32) {
        ObjectExt::set_property(self.as_ref(), "right-margin", right_margin)
    }

    #[doc(alias = "right-margin-set")]
    fn is_right_margin_set(&self) -> bool {
        ObjectExt::property(self.as_ref(), "right-margin-set")
    }

    fn rise(&self) -> i32 {
        ObjectExt::property(self.as_ref(), "rise")
    }

    fn set_rise(&self, rise: i32) {
        ObjectExt::set_property(self.as_ref(), "rise", rise)
    }

    #[doc(alias = "rise-set")]
    fn is_rise_set(&self) -> bool {
        ObjectExt::property(self.as_ref(), "rise-set")
    }

    fn scale(&self) -> f64 {
        ObjectExt::property(self.as_ref(), "scale")
    }

    fn set_scale(&self, scale: f64) {
        ObjectExt::set_property(self.as_ref(), "scale", scale)
    }

    #[doc(alias = "scale-set")]
    fn is_scale_set(&self) -> bool {
        ObjectExt::property(self.as_ref(), "scale-set")
    }

    #[cfg(feature = "v4_6")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v4_6")))]
    fn is_sentence(&self) -> bool {
        ObjectExt::property(self.as_ref(), "sentence")
    }

    #[cfg(feature = "v4_6")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v4_6")))]
    fn set_sentence(&self, sentence: bool) {
        ObjectExt::set_property(self.as_ref(), "sentence", sentence)
    }

    #[cfg(feature = "v4_6")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v4_6")))]
    #[doc(alias = "sentence-set")]
    fn is_sentence_set(&self) -> bool {
        ObjectExt::property(self.as_ref(), "sentence-set")
    }

    #[doc(alias = "show-spaces")]
    fn show_spaces(&self) -> pango::ShowFlags {
        ObjectExt::property(self.as_ref(), "show-spaces")
    }

    #[doc(alias = "show-spaces")]
    fn set_show_spaces(&self, show_spaces: pango::ShowFlags) {
        ObjectExt::set_property(self.as_ref(), "show-spaces", show_spaces)
    }

    #[doc(alias = "show-spaces-set")]
    fn shows_spaces_set(&self) -> bool {
        ObjectExt::property(self.as_ref(), "show-spaces-set")
    }

    fn size(&self) -> i32 {
        ObjectExt::property(self.as_ref(), "size")
    }

    fn set_size(&self, size: i32) {
        ObjectExt::set_property(self.as_ref(), "size", size)
    }

    #[doc(alias = "size-points")]
    fn size_points(&self) -> f64 {
        ObjectExt::property(self.as_ref(), "size-points")
    }

    #[doc(alias = "size-points")]
    fn set_size_points(&self, size_points: f64) {
        ObjectExt::set_property(self.as_ref(), "size-points", size_points)
    }

    #[doc(alias = "size-set")]
    fn is_size_set(&self) -> bool {
        ObjectExt::property(self.as_ref(), "size-set")
    }

    fn stretch(&self) -> pango::Stretch {
        ObjectExt::property(self.as_ref(), "stretch")
    }

    fn set_stretch(&self, stretch: pango::Stretch) {
        ObjectExt::set_property(self.as_ref(), "stretch", stretch)
    }

    #[doc(alias = "stretch-set")]
    fn is_stretch_set(&self) -> bool {
        ObjectExt::property(self.as_ref(), "stretch-set")
    }

    fn is_strikethrough(&self) -> bool {
        ObjectExt::property(self.as_ref(), "strikethrough")
    }

    fn set_strikethrough(&self, strikethrough: bool) {
        ObjectExt::set_property(self.as_ref(), "strikethrough", strikethrough)
    }

    #[doc(alias = "strikethrough-rgba")]
    fn strikethrough_rgba(&self) -> Option<gdk::RGBA> {
        ObjectExt::property(self.as_ref(), "strikethrough-rgba")
    }

    #[doc(alias = "strikethrough-rgba")]
    fn set_strikethrough_rgba(&self, strikethrough_rgba: Option<&gdk::RGBA>) {
        ObjectExt::set_property(self.as_ref(), "strikethrough-rgba", strikethrough_rgba)
    }

    #[doc(alias = "strikethrough-rgba-set")]
    fn is_strikethrough_rgba_set(&self) -> bool {
        ObjectExt::property(self.as_ref(), "strikethrough-rgba-set")
    }

    #[doc(alias = "strikethrough-set")]
    fn is_strikethrough_set(&self) -> bool {
        ObjectExt::property(self.as_ref(), "strikethrough-set")
    }

    fn style(&self) -> pango::Style {
        ObjectExt::property(self.as_ref(), "style")
    }

    fn set_style(&self, style: pango::Style) {
        ObjectExt::set_property(self.as_ref(), "style", style)
    }

    #[doc(alias = "style-set")]
    fn is_style_set(&self) -> bool {
        ObjectExt::property(self.as_ref(), "style-set")
    }

    fn tabs(&self) -> Option<pango::TabArray> {
        ObjectExt::property(self.as_ref(), "tabs")
    }

    fn set_tabs(&self, tabs: Option<&pango::TabArray>) {
        ObjectExt::set_property(self.as_ref(), "tabs", tabs)
    }

    #[doc(alias = "tabs-set")]
    fn is_tabs_set(&self) -> bool {
        ObjectExt::property(self.as_ref(), "tabs-set")
    }

    #[cfg(feature = "v4_6")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v4_6")))]
    #[doc(alias = "text-transform")]
    fn text_transform(&self) -> pango::TextTransform {
        ObjectExt::property(self.as_ref(), "text-transform")
    }

    #[cfg(feature = "v4_6")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v4_6")))]
    #[doc(alias = "text-transform")]
    fn set_text_transform(&self, text_transform: pango::TextTransform) {
        ObjectExt::set_property(self.as_ref(), "text-transform", text_transform)
    }

    #[cfg(feature = "v4_6")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v4_6")))]
    #[doc(alias = "text-transform-set")]
    fn is_text_transform_set(&self) -> bool {
        ObjectExt::property(self.as_ref(), "text-transform-set")
    }

    fn underline(&self) -> pango::Underline {
        ObjectExt::property(self.as_ref(), "underline")
    }

    fn set_underline(&self, underline: pango::Underline) {
        ObjectExt::set_property(self.as_ref(), "underline", underline)
    }

    #[doc(alias = "underline-rgba")]
    fn underline_rgba(&self) -> Option<gdk::RGBA> {
        ObjectExt::property(self.as_ref(), "underline-rgba")
    }

    #[doc(alias = "underline-rgba")]
    fn set_underline_rgba(&self, underline_rgba: Option<&gdk::RGBA>) {
        ObjectExt::set_property(self.as_ref(), "underline-rgba", underline_rgba)
    }

    #[doc(alias = "underline-rgba-set")]
    fn is_underline_rgba_set(&self) -> bool {
        ObjectExt::property(self.as_ref(), "underline-rgba-set")
    }

    #[doc(alias = "underline-set")]
    fn is_underline_set(&self) -> bool {
        ObjectExt::property(self.as_ref(), "underline-set")
    }

    fn variant(&self) -> pango::Variant {
        ObjectExt::property(self.as_ref(), "variant")
    }

    fn set_variant(&self, variant: pango::Variant) {
        ObjectExt::set_property(self.as_ref(), "variant", variant)
    }

    #[doc(alias = "variant-set")]
    fn is_variant_set(&self) -> bool {
        ObjectExt::property(self.as_ref(), "variant-set")
    }

    fn weight(&self) -> i32 {
        ObjectExt::property(self.as_ref(), "weight")
    }

    fn set_weight(&self, weight: i32) {
        ObjectExt::set_property(self.as_ref(), "weight", weight)
    }

    #[doc(alias = "weight-set")]
    fn is_weight_set(&self) -> bool {
        ObjectExt::property(self.as_ref(), "weight-set")
    }

    #[cfg(feature = "v4_6")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v4_6")))]
    fn is_word(&self) -> bool {
        ObjectExt::property(self.as_ref(), "word")
    }

    #[cfg(feature = "v4_6")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v4_6")))]
    fn set_word(&self, word: bool) {
        ObjectExt::set_property(self.as_ref(), "word", word)
    }

    #[cfg(feature = "v4_6")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v4_6")))]
    #[doc(alias = "word-set")]
    fn is_word_set(&self) -> bool {
        ObjectExt::property(self.as_ref(), "word-set")
    }

    #[doc(alias = "wrap-mode")]
    fn wrap_mode(&self) -> WrapMode {
        ObjectExt::property(self.as_ref(), "wrap-mode")
    }

    #[doc(alias = "wrap-mode")]
    fn set_wrap_mode(&self, wrap_mode: WrapMode) {
        ObjectExt::set_property(self.as_ref(), "wrap-mode", wrap_mode)
    }

    #[doc(alias = "wrap-mode-set")]
    fn wraps_mode_set(&self) -> bool {
        ObjectExt::property(self.as_ref(), "wrap-mode-set")
    }

    #[doc(alias = "accumulative-margin")]
    fn connect_accumulative_margin_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_accumulative_margin_trampoline<
            P: IsA<TextTag>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::accumulative-margin\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_accumulative_margin_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "allow-breaks")]
    fn connect_allow_breaks_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_allow_breaks_trampoline<
            P: IsA<TextTag>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::allow-breaks\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_allow_breaks_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "allow-breaks-set")]
    fn connect_allow_breaks_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_allow_breaks_set_trampoline<
            P: IsA<TextTag>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::allow-breaks-set\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_allow_breaks_set_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "background")]
    fn connect_background_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_background_trampoline<P: IsA<TextTag>, F: Fn(&P) + 'static>(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::background\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_background_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "background-full-height")]
    fn connect_background_full_height_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F,
    ) -> SignalHandlerId {
        unsafe extern "C" fn notify_background_full_height_trampoline<
            P: IsA<TextTag>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::background-full-height\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_background_full_height_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "background-full-height-set")]
    fn connect_background_full_height_set_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F,
    ) -> SignalHandlerId {
        unsafe extern "C" fn notify_background_full_height_set_trampoline<
            P: IsA<TextTag>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::background-full-height-set\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_background_full_height_set_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "background-rgba")]
    fn connect_background_rgba_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_background_rgba_trampoline<
            P: IsA<TextTag>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::background-rgba\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_background_rgba_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "background-set")]
    fn connect_background_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_background_set_trampoline<
            P: IsA<TextTag>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::background-set\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_background_set_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "direction")]
    fn connect_direction_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_direction_trampoline<P: IsA<TextTag>, F: Fn(&P) + 'static>(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::direction\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_direction_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "editable")]
    fn connect_editable_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_editable_trampoline<P: IsA<TextTag>, F: Fn(&P) + 'static>(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::editable\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_editable_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "editable-set")]
    fn connect_editable_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_editable_set_trampoline<
            P: IsA<TextTag>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::editable-set\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_editable_set_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "fallback")]
    fn connect_fallback_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_fallback_trampoline<P: IsA<TextTag>, F: Fn(&P) + 'static>(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::fallback\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_fallback_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "fallback-set")]
    fn connect_fallback_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_fallback_set_trampoline<
            P: IsA<TextTag>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::fallback-set\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_fallback_set_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "family")]
    fn connect_family_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_family_trampoline<P: IsA<TextTag>, F: Fn(&P) + 'static>(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::family\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_family_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "family-set")]
    fn connect_family_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_family_set_trampoline<P: IsA<TextTag>, F: Fn(&P) + 'static>(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::family-set\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_family_set_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "font")]
    fn connect_font_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_font_trampoline<P: IsA<TextTag>, F: Fn(&P) + 'static>(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::font\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_font_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "font-desc")]
    fn connect_font_desc_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_font_desc_trampoline<P: IsA<TextTag>, F: Fn(&P) + 'static>(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::font-desc\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_font_desc_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "font-features")]
    fn connect_font_features_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_font_features_trampoline<
            P: IsA<TextTag>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::font-features\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_font_features_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "font-features-set")]
    fn connect_font_features_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_font_features_set_trampoline<
            P: IsA<TextTag>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::font-features-set\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_font_features_set_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "foreground")]
    fn connect_foreground_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_foreground_trampoline<P: IsA<TextTag>, F: Fn(&P) + 'static>(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::foreground\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_foreground_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "foreground-rgba")]
    fn connect_foreground_rgba_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_foreground_rgba_trampoline<
            P: IsA<TextTag>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::foreground-rgba\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_foreground_rgba_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "foreground-set")]
    fn connect_foreground_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_foreground_set_trampoline<
            P: IsA<TextTag>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::foreground-set\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_foreground_set_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "indent")]
    fn connect_indent_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_indent_trampoline<P: IsA<TextTag>, F: Fn(&P) + 'static>(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::indent\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_indent_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "indent-set")]
    fn connect_indent_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_indent_set_trampoline<P: IsA<TextTag>, F: Fn(&P) + 'static>(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::indent-set\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_indent_set_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "insert-hyphens")]
    fn connect_insert_hyphens_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_insert_hyphens_trampoline<
            P: IsA<TextTag>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::insert-hyphens\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_insert_hyphens_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "insert-hyphens-set")]
    fn connect_insert_hyphens_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_insert_hyphens_set_trampoline<
            P: IsA<TextTag>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::insert-hyphens-set\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_insert_hyphens_set_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "invisible")]
    fn connect_invisible_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_invisible_trampoline<P: IsA<TextTag>, F: Fn(&P) + 'static>(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::invisible\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_invisible_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "invisible-set")]
    fn connect_invisible_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_invisible_set_trampoline<
            P: IsA<TextTag>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::invisible-set\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_invisible_set_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "justification")]
    fn connect_justification_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_justification_trampoline<
            P: IsA<TextTag>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::justification\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_justification_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "justification-set")]
    fn connect_justification_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_justification_set_trampoline<
            P: IsA<TextTag>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::justification-set\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_justification_set_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "language")]
    fn connect_language_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_language_trampoline<P: IsA<TextTag>, F: Fn(&P) + 'static>(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::language\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_language_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "language-set")]
    fn connect_language_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_language_set_trampoline<
            P: IsA<TextTag>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::language-set\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_language_set_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "left-margin")]
    fn connect_left_margin_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_left_margin_trampoline<P: IsA<TextTag>, F: Fn(&P) + 'static>(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::left-margin\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_left_margin_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "left-margin-set")]
    fn connect_left_margin_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_left_margin_set_trampoline<
            P: IsA<TextTag>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::left-margin-set\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_left_margin_set_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "letter-spacing")]
    fn connect_letter_spacing_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_letter_spacing_trampoline<
            P: IsA<TextTag>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::letter-spacing\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_letter_spacing_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "letter-spacing-set")]
    fn connect_letter_spacing_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_letter_spacing_set_trampoline<
            P: IsA<TextTag>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::letter-spacing-set\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_letter_spacing_set_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[cfg(feature = "v4_6")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v4_6")))]
    #[doc(alias = "line-height")]
    fn connect_line_height_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_line_height_trampoline<P: IsA<TextTag>, F: Fn(&P) + 'static>(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::line-height\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_line_height_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[cfg(feature = "v4_6")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v4_6")))]
    #[doc(alias = "line-height-set")]
    fn connect_line_height_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_line_height_set_trampoline<
            P: IsA<TextTag>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::line-height-set\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_line_height_set_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "overline")]
    fn connect_overline_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_overline_trampoline<P: IsA<TextTag>, F: Fn(&P) + 'static>(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::overline\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_overline_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "overline-rgba")]
    fn connect_overline_rgba_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_overline_rgba_trampoline<
            P: IsA<TextTag>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::overline-rgba\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_overline_rgba_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "overline-rgba-set")]
    fn connect_overline_rgba_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_overline_rgba_set_trampoline<
            P: IsA<TextTag>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::overline-rgba-set\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_overline_rgba_set_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "overline-set")]
    fn connect_overline_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_overline_set_trampoline<
            P: IsA<TextTag>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::overline-set\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_overline_set_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "paragraph-background")]
    fn connect_paragraph_background_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_paragraph_background_trampoline<
            P: IsA<TextTag>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::paragraph-background\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_paragraph_background_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "paragraph-background-rgba")]
    fn connect_paragraph_background_rgba_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F,
    ) -> SignalHandlerId {
        unsafe extern "C" fn notify_paragraph_background_rgba_trampoline<
            P: IsA<TextTag>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::paragraph-background-rgba\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_paragraph_background_rgba_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "paragraph-background-set")]
    fn connect_paragraph_background_set_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F,
    ) -> SignalHandlerId {
        unsafe extern "C" fn notify_paragraph_background_set_trampoline<
            P: IsA<TextTag>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::paragraph-background-set\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_paragraph_background_set_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "pixels-above-lines")]
    fn connect_pixels_above_lines_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_pixels_above_lines_trampoline<
            P: IsA<TextTag>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::pixels-above-lines\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_pixels_above_lines_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "pixels-above-lines-set")]
    fn connect_pixels_above_lines_set_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F,
    ) -> SignalHandlerId {
        unsafe extern "C" fn notify_pixels_above_lines_set_trampoline<
            P: IsA<TextTag>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::pixels-above-lines-set\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_pixels_above_lines_set_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "pixels-below-lines")]
    fn connect_pixels_below_lines_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_pixels_below_lines_trampoline<
            P: IsA<TextTag>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::pixels-below-lines\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_pixels_below_lines_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "pixels-below-lines-set")]
    fn connect_pixels_below_lines_set_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F,
    ) -> SignalHandlerId {
        unsafe extern "C" fn notify_pixels_below_lines_set_trampoline<
            P: IsA<TextTag>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::pixels-below-lines-set\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_pixels_below_lines_set_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "pixels-inside-wrap")]
    fn connect_pixels_inside_wrap_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_pixels_inside_wrap_trampoline<
            P: IsA<TextTag>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::pixels-inside-wrap\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_pixels_inside_wrap_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "pixels-inside-wrap-set")]
    fn connect_pixels_inside_wrap_set_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F,
    ) -> SignalHandlerId {
        unsafe extern "C" fn notify_pixels_inside_wrap_set_trampoline<
            P: IsA<TextTag>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::pixels-inside-wrap-set\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_pixels_inside_wrap_set_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "right-margin")]
    fn connect_right_margin_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_right_margin_trampoline<
            P: IsA<TextTag>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::right-margin\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_right_margin_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "right-margin-set")]
    fn connect_right_margin_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_right_margin_set_trampoline<
            P: IsA<TextTag>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::right-margin-set\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_right_margin_set_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "rise")]
    fn connect_rise_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_rise_trampoline<P: IsA<TextTag>, F: Fn(&P) + 'static>(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::rise\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_rise_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "rise-set")]
    fn connect_rise_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_rise_set_trampoline<P: IsA<TextTag>, F: Fn(&P) + 'static>(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::rise-set\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_rise_set_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "scale")]
    fn connect_scale_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_scale_trampoline<P: IsA<TextTag>, F: Fn(&P) + 'static>(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::scale\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_scale_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "scale-set")]
    fn connect_scale_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_scale_set_trampoline<P: IsA<TextTag>, F: Fn(&P) + 'static>(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::scale-set\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_scale_set_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[cfg(feature = "v4_6")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v4_6")))]
    #[doc(alias = "sentence")]
    fn connect_sentence_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_sentence_trampoline<P: IsA<TextTag>, F: Fn(&P) + 'static>(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::sentence\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_sentence_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[cfg(feature = "v4_6")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v4_6")))]
    #[doc(alias = "sentence-set")]
    fn connect_sentence_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_sentence_set_trampoline<
            P: IsA<TextTag>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::sentence-set\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_sentence_set_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "show-spaces")]
    fn connect_show_spaces_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_show_spaces_trampoline<P: IsA<TextTag>, F: Fn(&P) + 'static>(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::show-spaces\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_show_spaces_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "show-spaces-set")]
    fn connect_show_spaces_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_show_spaces_set_trampoline<
            P: IsA<TextTag>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::show-spaces-set\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_show_spaces_set_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "size")]
    fn connect_size_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_size_trampoline<P: IsA<TextTag>, F: Fn(&P) + 'static>(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::size\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_size_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "size-points")]
    fn connect_size_points_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_size_points_trampoline<P: IsA<TextTag>, F: Fn(&P) + 'static>(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::size-points\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_size_points_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "size-set")]
    fn connect_size_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_size_set_trampoline<P: IsA<TextTag>, F: Fn(&P) + 'static>(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::size-set\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_size_set_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "stretch")]
    fn connect_stretch_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_stretch_trampoline<P: IsA<TextTag>, F: Fn(&P) + 'static>(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::stretch\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_stretch_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "stretch-set")]
    fn connect_stretch_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_stretch_set_trampoline<P: IsA<TextTag>, F: Fn(&P) + 'static>(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::stretch-set\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_stretch_set_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "strikethrough")]
    fn connect_strikethrough_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_strikethrough_trampoline<
            P: IsA<TextTag>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::strikethrough\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_strikethrough_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "strikethrough-rgba")]
    fn connect_strikethrough_rgba_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_strikethrough_rgba_trampoline<
            P: IsA<TextTag>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::strikethrough-rgba\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_strikethrough_rgba_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "strikethrough-rgba-set")]
    fn connect_strikethrough_rgba_set_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F,
    ) -> SignalHandlerId {
        unsafe extern "C" fn notify_strikethrough_rgba_set_trampoline<
            P: IsA<TextTag>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::strikethrough-rgba-set\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_strikethrough_rgba_set_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "strikethrough-set")]
    fn connect_strikethrough_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_strikethrough_set_trampoline<
            P: IsA<TextTag>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::strikethrough-set\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_strikethrough_set_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "style")]
    fn connect_style_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_style_trampoline<P: IsA<TextTag>, F: Fn(&P) + 'static>(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::style\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_style_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "style-set")]
    fn connect_style_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_style_set_trampoline<P: IsA<TextTag>, F: Fn(&P) + 'static>(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::style-set\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_style_set_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "tabs")]
    fn connect_tabs_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_tabs_trampoline<P: IsA<TextTag>, F: Fn(&P) + 'static>(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::tabs\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_tabs_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "tabs-set")]
    fn connect_tabs_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_tabs_set_trampoline<P: IsA<TextTag>, F: Fn(&P) + 'static>(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::tabs-set\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_tabs_set_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[cfg(feature = "v4_6")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v4_6")))]
    #[doc(alias = "text-transform")]
    fn connect_text_transform_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_text_transform_trampoline<
            P: IsA<TextTag>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::text-transform\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_text_transform_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[cfg(feature = "v4_6")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v4_6")))]
    #[doc(alias = "text-transform-set")]
    fn connect_text_transform_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_text_transform_set_trampoline<
            P: IsA<TextTag>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::text-transform-set\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_text_transform_set_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "underline")]
    fn connect_underline_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_underline_trampoline<P: IsA<TextTag>, F: Fn(&P) + 'static>(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::underline\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_underline_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "underline-rgba")]
    fn connect_underline_rgba_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_underline_rgba_trampoline<
            P: IsA<TextTag>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::underline-rgba\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_underline_rgba_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "underline-rgba-set")]
    fn connect_underline_rgba_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_underline_rgba_set_trampoline<
            P: IsA<TextTag>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::underline-rgba-set\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_underline_rgba_set_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "underline-set")]
    fn connect_underline_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_underline_set_trampoline<
            P: IsA<TextTag>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::underline-set\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_underline_set_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "variant")]
    fn connect_variant_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_variant_trampoline<P: IsA<TextTag>, F: Fn(&P) + 'static>(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::variant\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_variant_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "variant-set")]
    fn connect_variant_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_variant_set_trampoline<P: IsA<TextTag>, F: Fn(&P) + 'static>(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::variant-set\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_variant_set_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "weight")]
    fn connect_weight_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_weight_trampoline<P: IsA<TextTag>, F: Fn(&P) + 'static>(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::weight\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_weight_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "weight-set")]
    fn connect_weight_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_weight_set_trampoline<P: IsA<TextTag>, F: Fn(&P) + 'static>(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::weight-set\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_weight_set_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[cfg(feature = "v4_6")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v4_6")))]
    #[doc(alias = "word")]
    fn connect_word_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_word_trampoline<P: IsA<TextTag>, F: Fn(&P) + 'static>(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::word\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_word_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[cfg(feature = "v4_6")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v4_6")))]
    #[doc(alias = "word-set")]
    fn connect_word_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_word_set_trampoline<P: IsA<TextTag>, F: Fn(&P) + 'static>(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::word-set\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_word_set_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "wrap-mode")]
    fn connect_wrap_mode_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_wrap_mode_trampoline<P: IsA<TextTag>, F: Fn(&P) + 'static>(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::wrap-mode\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_wrap_mode_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "wrap-mode-set")]
    fn connect_wrap_mode_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_wrap_mode_set_trampoline<
            P: IsA<TextTag>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::GtkTextTag,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(TextTag::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::wrap-mode-set\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_wrap_mode_set_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }
}

impl<O: IsA<TextTag>> TextTagExt for O {}
