// Package gtk was automatically generated by github.com/bnema/puregotk DO NOT EDIT package gtk import ( "structs" "unsafe" "github.com/ebitengine/purego" "github.com/bnema/puregotk/pkg/core" "github.com/bnema/puregotk/v4/gobject" "github.com/bnema/puregotk/v4/gobject/types" ) type TextTagClass struct { _ structs.HostLayout ParentClass gobject.ObjectClass Padding [8]uintptr } func (x *TextTagClass) GoPointer() uintptr { return uintptr(unsafe.Pointer(x)) } type TextTagPrivate struct { _ structs.HostLayout } func (x *TextTagPrivate) GoPointer() uintptr { return uintptr(unsafe.Pointer(x)) } // Can be applied to text contained in a `GtkTextBuffer`. // // You may wish to begin by reading the // [text widget conceptual overview](section-text-widget.html), // which gives an overview of all the objects and data types // related to the text widget and how they work together. // // Tags should be in the [class@Gtk.TextTagTable] for a given // `GtkTextBuffer` before using them with that buffer. // // [method@Gtk.TextBuffer.create_tag] is the best way to create tags. // See “gtk4-demo” for numerous examples. // // For each property of `GtkTextTag`, there is a “set” property, e.g. // “font-set” corresponds to “font”. These “set” properties reflect // whether a property has been set or not. // // They are maintained by GTK and you should not set them independently. type TextTag struct { gobject.Object } var xTextTagGLibType func() types.GType func TextTagGLibType() types.GType { return xTextTagGLibType() } func TextTagNewFromInternalPtr(ptr uintptr) *TextTag { cls := &TextTag{} cls.Ptr = ptr return cls } var xNewTextTag func(uintptr) uintptr // Creates a `GtkTextTag`. func NewTextTag(NameVar *string) *TextTag { var cls *TextTag NameVarPtr := core.GStrdupNullable(NameVar) defer core.GFreeNullable(NameVarPtr) cret := xNewTextTag(NameVarPtr) if cret == 0 { return nil } cls = &TextTag{} cls.Ptr = cret return cls } var xTextTagChanged func(uintptr, bool) // Emits the [signal@Gtk.TextTagTable::tag-changed] signal on the // `GtkTextTagTable` where the tag is included. // // The signal is already emitted when setting a `GtkTextTag` property. // This function is useful for a `GtkTextTag` subclass. func (x *TextTag) Changed(SizeChangedVar bool) { xTextTagChanged(x.GoPointer(), SizeChangedVar) } var xTextTagGetPriority func(uintptr) int // Get the tag priority. func (x *TextTag) GetPriority() int { cret := xTextTagGetPriority(x.GoPointer()) return cret } var xTextTagSetPriority func(uintptr, int) // Sets the priority of a `GtkTextTag`. // // Valid priorities start at 0 and go to one less than // [method@Gtk.TextTagTable.get_size]. Each tag in a table // has a unique priority; setting the priority of one tag shifts // the priorities of all the other tags in the table to maintain // a unique priority for each tag. // // Higher priority tags “win” if two tags both set the same text // attribute. When adding a tag to a tag table, it will be assigned // the highest priority in the table by default; so normally the // precedence of a set of tags is the order in which they were added // to the table, or created with [method@Gtk.TextBuffer.create_tag], // which adds the tag to the buffer’s table automatically. func (x *TextTag) SetPriority(PriorityVar int) { xTextTagSetPriority(x.GoPointer(), PriorityVar) } func (c *TextTag) GoPointer() uintptr { if c == nil { return 0 } return c.Ptr } func (c *TextTag) SetGoPointer(ptr uintptr) { c.Ptr = ptr } // SetPropertyAccumulativeMargin sets the "accumulative-margin" property. // Whether the margins accumulate or override each other. // // When set to %TRUE the margins of this tag are added to the margins // of any other non-accumulative margins present. When set to %FALSE // the margins override one another (the default). func (x *TextTag) SetPropertyAccumulativeMargin(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("accumulative-margin", &v) } // GetPropertyAccumulativeMargin gets the "accumulative-margin" property. // Whether the margins accumulate or override each other. // // When set to %TRUE the margins of this tag are added to the margins // of any other non-accumulative margins present. When set to %FALSE // the margins override one another (the default). func (x *TextTag) GetPropertyAccumulativeMargin() bool { var v gobject.Value x.GetProperty("accumulative-margin", &v) return v.GetBoolean() } // SetPropertyAllowBreaks sets the "allow-breaks" property. // Whether breaks are allowed. func (x *TextTag) SetPropertyAllowBreaks(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("allow-breaks", &v) } // GetPropertyAllowBreaks gets the "allow-breaks" property. // Whether breaks are allowed. func (x *TextTag) GetPropertyAllowBreaks() bool { var v gobject.Value x.GetProperty("allow-breaks", &v) return v.GetBoolean() } // SetPropertyAllowBreaksSet sets the "allow-breaks-set" property. // Whether the `allow-breaks` property is set. func (x *TextTag) SetPropertyAllowBreaksSet(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("allow-breaks-set", &v) } // GetPropertyAllowBreaksSet gets the "allow-breaks-set" property. // Whether the `allow-breaks` property is set. func (x *TextTag) GetPropertyAllowBreaksSet() bool { var v gobject.Value x.GetProperty("allow-breaks-set", &v) return v.GetBoolean() } // SetPropertyBackground sets the "background" property. // Background color as a string. func (x *TextTag) SetPropertyBackground(value string) { var v gobject.Value v.Init(gobject.TypeStringVal) v.SetString(&value) x.SetProperty("background", &v) } // SetPropertyBackgroundFullHeight sets the "background-full-height" property. // Whether the background color fills the entire line height // or only the height of the tagged characters. func (x *TextTag) SetPropertyBackgroundFullHeight(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("background-full-height", &v) } // GetPropertyBackgroundFullHeight gets the "background-full-height" property. // Whether the background color fills the entire line height // or only the height of the tagged characters. func (x *TextTag) GetPropertyBackgroundFullHeight() bool { var v gobject.Value x.GetProperty("background-full-height", &v) return v.GetBoolean() } // SetPropertyBackgroundFullHeightSet sets the "background-full-height-set" property. // Whether the `background-full-height` property is set. func (x *TextTag) SetPropertyBackgroundFullHeightSet(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("background-full-height-set", &v) } // GetPropertyBackgroundFullHeightSet gets the "background-full-height-set" property. // Whether the `background-full-height` property is set. func (x *TextTag) GetPropertyBackgroundFullHeightSet() bool { var v gobject.Value x.GetProperty("background-full-height-set", &v) return v.GetBoolean() } // SetPropertyBackgroundRgba sets the "background-rgba" property. // Background color as a `GdkRGBA`. func (x *TextTag) SetPropertyBackgroundRgba(value uintptr) { var v gobject.Value v.Init(gobject.TypePointerVal) v.SetPointer(value) x.SetProperty("background-rgba", &v) } // GetPropertyBackgroundRgba gets the "background-rgba" property. // Background color as a `GdkRGBA`. func (x *TextTag) GetPropertyBackgroundRgba() uintptr { var v gobject.Value x.GetProperty("background-rgba", &v) return v.GetPointer() } // SetPropertyBackgroundSet sets the "background-set" property. // Whether the `background` property is set. func (x *TextTag) SetPropertyBackgroundSet(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("background-set", &v) } // GetPropertyBackgroundSet gets the "background-set" property. // Whether the `background` property is set. func (x *TextTag) GetPropertyBackgroundSet() bool { var v gobject.Value x.GetProperty("background-set", &v) return v.GetBoolean() } // SetPropertyEditable sets the "editable" property. // Whether the text can be modified by the user. func (x *TextTag) SetPropertyEditable(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("editable", &v) } // GetPropertyEditable gets the "editable" property. // Whether the text can be modified by the user. func (x *TextTag) GetPropertyEditable() bool { var v gobject.Value x.GetProperty("editable", &v) return v.GetBoolean() } // SetPropertyEditableSet sets the "editable-set" property. // Whether the `editable` property is set. func (x *TextTag) SetPropertyEditableSet(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("editable-set", &v) } // GetPropertyEditableSet gets the "editable-set" property. // Whether the `editable` property is set. func (x *TextTag) GetPropertyEditableSet() bool { var v gobject.Value x.GetProperty("editable-set", &v) return v.GetBoolean() } // SetPropertyFallback sets the "fallback" property. // Whether font fallback is enabled. // // When set to %TRUE, other fonts will be substituted // where the current font is missing glyphs. func (x *TextTag) SetPropertyFallback(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("fallback", &v) } // GetPropertyFallback gets the "fallback" property. // Whether font fallback is enabled. // // When set to %TRUE, other fonts will be substituted // where the current font is missing glyphs. func (x *TextTag) GetPropertyFallback() bool { var v gobject.Value x.GetProperty("fallback", &v) return v.GetBoolean() } // SetPropertyFallbackSet sets the "fallback-set" property. // Whether the `fallback` property is set. func (x *TextTag) SetPropertyFallbackSet(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("fallback-set", &v) } // GetPropertyFallbackSet gets the "fallback-set" property. // Whether the `fallback` property is set. func (x *TextTag) GetPropertyFallbackSet() bool { var v gobject.Value x.GetProperty("fallback-set", &v) return v.GetBoolean() } // SetPropertyFamily sets the "family" property. // Name of the font family, e.g. Sans, Helvetica, Times, Monospace. func (x *TextTag) SetPropertyFamily(value string) { var v gobject.Value v.Init(gobject.TypeStringVal) v.SetString(&value) x.SetProperty("family", &v) } // GetPropertyFamily gets the "family" property. // Name of the font family, e.g. Sans, Helvetica, Times, Monospace. func (x *TextTag) GetPropertyFamily() string { var v gobject.Value x.GetProperty("family", &v) return v.GetString() } // SetPropertyFamilySet sets the "family-set" property. // Whether the `family` property is set. func (x *TextTag) SetPropertyFamilySet(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("family-set", &v) } // GetPropertyFamilySet gets the "family-set" property. // Whether the `family` property is set. func (x *TextTag) GetPropertyFamilySet() bool { var v gobject.Value x.GetProperty("family-set", &v) return v.GetBoolean() } // SetPropertyFont sets the "font" property. // Font description as string, e.g. \"Sans Italic 12\". // // Note that the initial value of this property depends on // the internals of `PangoFontDescription`. func (x *TextTag) SetPropertyFont(value string) { var v gobject.Value v.Init(gobject.TypeStringVal) v.SetString(&value) x.SetProperty("font", &v) } // GetPropertyFont gets the "font" property. // Font description as string, e.g. \"Sans Italic 12\". // // Note that the initial value of this property depends on // the internals of `PangoFontDescription`. func (x *TextTag) GetPropertyFont() string { var v gobject.Value x.GetProperty("font", &v) return v.GetString() } // SetPropertyFontDesc sets the "font-desc" property. // Font description as a `PangoFontDescription`. func (x *TextTag) SetPropertyFontDesc(value uintptr) { var v gobject.Value v.Init(gobject.TypePointerVal) v.SetPointer(value) x.SetProperty("font-desc", &v) } // GetPropertyFontDesc gets the "font-desc" property. // Font description as a `PangoFontDescription`. func (x *TextTag) GetPropertyFontDesc() uintptr { var v gobject.Value x.GetProperty("font-desc", &v) return v.GetPointer() } // SetPropertyFontFeatures sets the "font-features" property. // OpenType font features, as a string. func (x *TextTag) SetPropertyFontFeatures(value string) { var v gobject.Value v.Init(gobject.TypeStringVal) v.SetString(&value) x.SetProperty("font-features", &v) } // GetPropertyFontFeatures gets the "font-features" property. // OpenType font features, as a string. func (x *TextTag) GetPropertyFontFeatures() string { var v gobject.Value x.GetProperty("font-features", &v) return v.GetString() } // SetPropertyFontFeaturesSet sets the "font-features-set" property. // Whether the `font-features` property is set. func (x *TextTag) SetPropertyFontFeaturesSet(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("font-features-set", &v) } // GetPropertyFontFeaturesSet gets the "font-features-set" property. // Whether the `font-features` property is set. func (x *TextTag) GetPropertyFontFeaturesSet() bool { var v gobject.Value x.GetProperty("font-features-set", &v) return v.GetBoolean() } // SetPropertyForeground sets the "foreground" property. // Foreground color as a string. func (x *TextTag) SetPropertyForeground(value string) { var v gobject.Value v.Init(gobject.TypeStringVal) v.SetString(&value) x.SetProperty("foreground", &v) } // SetPropertyForegroundRgba sets the "foreground-rgba" property. // Foreground color as a `GdkRGBA`. func (x *TextTag) SetPropertyForegroundRgba(value uintptr) { var v gobject.Value v.Init(gobject.TypePointerVal) v.SetPointer(value) x.SetProperty("foreground-rgba", &v) } // GetPropertyForegroundRgba gets the "foreground-rgba" property. // Foreground color as a `GdkRGBA`. func (x *TextTag) GetPropertyForegroundRgba() uintptr { var v gobject.Value x.GetProperty("foreground-rgba", &v) return v.GetPointer() } // SetPropertyForegroundSet sets the "foreground-set" property. // Whether the `foreground` property is set. func (x *TextTag) SetPropertyForegroundSet(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("foreground-set", &v) } // GetPropertyForegroundSet gets the "foreground-set" property. // Whether the `foreground` property is set. func (x *TextTag) GetPropertyForegroundSet() bool { var v gobject.Value x.GetProperty("foreground-set", &v) return v.GetBoolean() } // SetPropertyIndent sets the "indent" property. // Amount to indent the paragraph, in pixels. // // A negative value of indent will produce a hanging indentation. // That is, the first line will have the full width, and subsequent // lines will be indented by the absolute value of indent. func (x *TextTag) SetPropertyIndent(value int) { var v gobject.Value v.Init(gobject.TypeIntVal) v.SetInt(value) x.SetProperty("indent", &v) } // GetPropertyIndent gets the "indent" property. // Amount to indent the paragraph, in pixels. // // A negative value of indent will produce a hanging indentation. // That is, the first line will have the full width, and subsequent // lines will be indented by the absolute value of indent. func (x *TextTag) GetPropertyIndent() int { var v gobject.Value x.GetProperty("indent", &v) return v.GetInt() } // SetPropertyIndentSet sets the "indent-set" property. // Whether the `indent` property is set. func (x *TextTag) SetPropertyIndentSet(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("indent-set", &v) } // GetPropertyIndentSet gets the "indent-set" property. // Whether the `indent` property is set. func (x *TextTag) GetPropertyIndentSet() bool { var v gobject.Value x.GetProperty("indent-set", &v) return v.GetBoolean() } // SetPropertyInsertHyphens sets the "insert-hyphens" property. // Whether to insert hyphens at breaks. func (x *TextTag) SetPropertyInsertHyphens(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("insert-hyphens", &v) } // GetPropertyInsertHyphens gets the "insert-hyphens" property. // Whether to insert hyphens at breaks. func (x *TextTag) GetPropertyInsertHyphens() bool { var v gobject.Value x.GetProperty("insert-hyphens", &v) return v.GetBoolean() } // SetPropertyInsertHyphensSet sets the "insert-hyphens-set" property. // Whether the `insert-hyphens` property is set. func (x *TextTag) SetPropertyInsertHyphensSet(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("insert-hyphens-set", &v) } // GetPropertyInsertHyphensSet gets the "insert-hyphens-set" property. // Whether the `insert-hyphens` property is set. func (x *TextTag) GetPropertyInsertHyphensSet() bool { var v gobject.Value x.GetProperty("insert-hyphens-set", &v) return v.GetBoolean() } // SetPropertyInvisible sets the "invisible" property. // Whether this text is hidden. // // Note that there may still be problems with the support for invisible // text, in particular when navigating programmatically inside a buffer // containing invisible segments. func (x *TextTag) SetPropertyInvisible(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("invisible", &v) } // GetPropertyInvisible gets the "invisible" property. // Whether this text is hidden. // // Note that there may still be problems with the support for invisible // text, in particular when navigating programmatically inside a buffer // containing invisible segments. func (x *TextTag) GetPropertyInvisible() bool { var v gobject.Value x.GetProperty("invisible", &v) return v.GetBoolean() } // SetPropertyInvisibleSet sets the "invisible-set" property. // Whether the `invisible` property is set. func (x *TextTag) SetPropertyInvisibleSet(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("invisible-set", &v) } // GetPropertyInvisibleSet gets the "invisible-set" property. // Whether the `invisible` property is set. func (x *TextTag) GetPropertyInvisibleSet() bool { var v gobject.Value x.GetProperty("invisible-set", &v) return v.GetBoolean() } // SetPropertyJustificationSet sets the "justification-set" property. // Whether the `justification` property is set. func (x *TextTag) SetPropertyJustificationSet(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("justification-set", &v) } // GetPropertyJustificationSet gets the "justification-set" property. // Whether the `justification` property is set. func (x *TextTag) GetPropertyJustificationSet() bool { var v gobject.Value x.GetProperty("justification-set", &v) return v.GetBoolean() } // SetPropertyLanguage sets the "language" property. // The language this text is in, as an ISO code. // // Pango can use this as a hint when rendering the text. // If not set, an appropriate default will be used. // // Note that the initial value of this property depends // on the current locale, see also [func@Gtk.get_default_language]. func (x *TextTag) SetPropertyLanguage(value string) { var v gobject.Value v.Init(gobject.TypeStringVal) v.SetString(&value) x.SetProperty("language", &v) } // GetPropertyLanguage gets the "language" property. // The language this text is in, as an ISO code. // // Pango can use this as a hint when rendering the text. // If not set, an appropriate default will be used. // // Note that the initial value of this property depends // on the current locale, see also [func@Gtk.get_default_language]. func (x *TextTag) GetPropertyLanguage() string { var v gobject.Value x.GetProperty("language", &v) return v.GetString() } // SetPropertyLanguageSet sets the "language-set" property. // Whether the `language` property is set. func (x *TextTag) SetPropertyLanguageSet(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("language-set", &v) } // GetPropertyLanguageSet gets the "language-set" property. // Whether the `language` property is set. func (x *TextTag) GetPropertyLanguageSet() bool { var v gobject.Value x.GetProperty("language-set", &v) return v.GetBoolean() } // SetPropertyLeftMargin sets the "left-margin" property. // Width of the left margin in pixels. func (x *TextTag) SetPropertyLeftMargin(value int) { var v gobject.Value v.Init(gobject.TypeIntVal) v.SetInt(value) x.SetProperty("left-margin", &v) } // GetPropertyLeftMargin gets the "left-margin" property. // Width of the left margin in pixels. func (x *TextTag) GetPropertyLeftMargin() int { var v gobject.Value x.GetProperty("left-margin", &v) return v.GetInt() } // SetPropertyLeftMarginSet sets the "left-margin-set" property. // Whether the `left-margin` property is set. func (x *TextTag) SetPropertyLeftMarginSet(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("left-margin-set", &v) } // GetPropertyLeftMarginSet gets the "left-margin-set" property. // Whether the `left-margin` property is set. func (x *TextTag) GetPropertyLeftMarginSet() bool { var v gobject.Value x.GetProperty("left-margin-set", &v) return v.GetBoolean() } // SetPropertyLetterSpacing sets the "letter-spacing" property. // Extra spacing between graphemes, in Pango units. func (x *TextTag) SetPropertyLetterSpacing(value int) { var v gobject.Value v.Init(gobject.TypeIntVal) v.SetInt(value) x.SetProperty("letter-spacing", &v) } // GetPropertyLetterSpacing gets the "letter-spacing" property. // Extra spacing between graphemes, in Pango units. func (x *TextTag) GetPropertyLetterSpacing() int { var v gobject.Value x.GetProperty("letter-spacing", &v) return v.GetInt() } // SetPropertyLetterSpacingSet sets the "letter-spacing-set" property. // Whether the `letter-spacing` property is set. func (x *TextTag) SetPropertyLetterSpacingSet(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("letter-spacing-set", &v) } // GetPropertyLetterSpacingSet gets the "letter-spacing-set" property. // Whether the `letter-spacing` property is set. func (x *TextTag) GetPropertyLetterSpacingSet() bool { var v gobject.Value x.GetProperty("letter-spacing-set", &v) return v.GetBoolean() } // SetPropertyLineHeight sets the "line-height" property. // Factor to scale line height by. func (x *TextTag) SetPropertyLineHeight(value float32) { var v gobject.Value v.Init(gobject.TypeFloatVal) v.SetFloat(value) x.SetProperty("line-height", &v) } // GetPropertyLineHeight gets the "line-height" property. // Factor to scale line height by. func (x *TextTag) GetPropertyLineHeight() float32 { var v gobject.Value x.GetProperty("line-height", &v) return v.GetFloat() } // SetPropertyLineHeightSet sets the "line-height-set" property. // Whether the `line-height` property is set. func (x *TextTag) SetPropertyLineHeightSet(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("line-height-set", &v) } // GetPropertyLineHeightSet gets the "line-height-set" property. // Whether the `line-height` property is set. func (x *TextTag) GetPropertyLineHeightSet() bool { var v gobject.Value x.GetProperty("line-height-set", &v) return v.GetBoolean() } // SetPropertyName sets the "name" property. // The name used to refer to the tag. // // %NULL for anonymous tags. func (x *TextTag) SetPropertyName(value string) { var v gobject.Value v.Init(gobject.TypeStringVal) v.SetString(&value) x.SetProperty("name", &v) } // GetPropertyName gets the "name" property. // The name used to refer to the tag. // // %NULL for anonymous tags. func (x *TextTag) GetPropertyName() string { var v gobject.Value x.GetProperty("name", &v) return v.GetString() } // SetPropertyOverlineRgba sets the "overline-rgba" property. // This property modifies the color of overlines. // // If not set, overlines will use the foreground color. func (x *TextTag) SetPropertyOverlineRgba(value uintptr) { var v gobject.Value v.Init(gobject.TypePointerVal) v.SetPointer(value) x.SetProperty("overline-rgba", &v) } // GetPropertyOverlineRgba gets the "overline-rgba" property. // This property modifies the color of overlines. // // If not set, overlines will use the foreground color. func (x *TextTag) GetPropertyOverlineRgba() uintptr { var v gobject.Value x.GetProperty("overline-rgba", &v) return v.GetPointer() } // SetPropertyOverlineRgbaSet sets the "overline-rgba-set" property. // Whether the `overline-rgba` property is set. func (x *TextTag) SetPropertyOverlineRgbaSet(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("overline-rgba-set", &v) } // GetPropertyOverlineRgbaSet gets the "overline-rgba-set" property. // Whether the `overline-rgba` property is set. func (x *TextTag) GetPropertyOverlineRgbaSet() bool { var v gobject.Value x.GetProperty("overline-rgba-set", &v) return v.GetBoolean() } // SetPropertyOverlineSet sets the "overline-set" property. // Whether the `overline` property is set. func (x *TextTag) SetPropertyOverlineSet(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("overline-set", &v) } // GetPropertyOverlineSet gets the "overline-set" property. // Whether the `overline` property is set. func (x *TextTag) GetPropertyOverlineSet() bool { var v gobject.Value x.GetProperty("overline-set", &v) return v.GetBoolean() } // SetPropertyParagraphBackground sets the "paragraph-background" property. // The paragraph background color as a string. func (x *TextTag) SetPropertyParagraphBackground(value string) { var v gobject.Value v.Init(gobject.TypeStringVal) v.SetString(&value) x.SetProperty("paragraph-background", &v) } // SetPropertyParagraphBackgroundRgba sets the "paragraph-background-rgba" property. // The paragraph background color as a `GdkRGBA`. func (x *TextTag) SetPropertyParagraphBackgroundRgba(value uintptr) { var v gobject.Value v.Init(gobject.TypePointerVal) v.SetPointer(value) x.SetProperty("paragraph-background-rgba", &v) } // GetPropertyParagraphBackgroundRgba gets the "paragraph-background-rgba" property. // The paragraph background color as a `GdkRGBA`. func (x *TextTag) GetPropertyParagraphBackgroundRgba() uintptr { var v gobject.Value x.GetProperty("paragraph-background-rgba", &v) return v.GetPointer() } // SetPropertyParagraphBackgroundSet sets the "paragraph-background-set" property. // Whether the `paragraph-background` property is set. func (x *TextTag) SetPropertyParagraphBackgroundSet(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("paragraph-background-set", &v) } // GetPropertyParagraphBackgroundSet gets the "paragraph-background-set" property. // Whether the `paragraph-background` property is set. func (x *TextTag) GetPropertyParagraphBackgroundSet() bool { var v gobject.Value x.GetProperty("paragraph-background-set", &v) return v.GetBoolean() } // SetPropertyPixelsAboveLines sets the "pixels-above-lines" property. // Pixels of blank space above paragraphs. func (x *TextTag) SetPropertyPixelsAboveLines(value int) { var v gobject.Value v.Init(gobject.TypeIntVal) v.SetInt(value) x.SetProperty("pixels-above-lines", &v) } // GetPropertyPixelsAboveLines gets the "pixels-above-lines" property. // Pixels of blank space above paragraphs. func (x *TextTag) GetPropertyPixelsAboveLines() int { var v gobject.Value x.GetProperty("pixels-above-lines", &v) return v.GetInt() } // SetPropertyPixelsAboveLinesSet sets the "pixels-above-lines-set" property. // Whether the `pixels-above-lines` property is set. func (x *TextTag) SetPropertyPixelsAboveLinesSet(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("pixels-above-lines-set", &v) } // GetPropertyPixelsAboveLinesSet gets the "pixels-above-lines-set" property. // Whether the `pixels-above-lines` property is set. func (x *TextTag) GetPropertyPixelsAboveLinesSet() bool { var v gobject.Value x.GetProperty("pixels-above-lines-set", &v) return v.GetBoolean() } // SetPropertyPixelsBelowLines sets the "pixels-below-lines" property. // Pixels of blank space below paragraphs. func (x *TextTag) SetPropertyPixelsBelowLines(value int) { var v gobject.Value v.Init(gobject.TypeIntVal) v.SetInt(value) x.SetProperty("pixels-below-lines", &v) } // GetPropertyPixelsBelowLines gets the "pixels-below-lines" property. // Pixels of blank space below paragraphs. func (x *TextTag) GetPropertyPixelsBelowLines() int { var v gobject.Value x.GetProperty("pixels-below-lines", &v) return v.GetInt() } // SetPropertyPixelsBelowLinesSet sets the "pixels-below-lines-set" property. // Whether the `pixels-below-lines` property is set. func (x *TextTag) SetPropertyPixelsBelowLinesSet(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("pixels-below-lines-set", &v) } // GetPropertyPixelsBelowLinesSet gets the "pixels-below-lines-set" property. // Whether the `pixels-below-lines` property is set. func (x *TextTag) GetPropertyPixelsBelowLinesSet() bool { var v gobject.Value x.GetProperty("pixels-below-lines-set", &v) return v.GetBoolean() } // SetPropertyPixelsInsideWrap sets the "pixels-inside-wrap" property. // Pixels of blank space between wrapped lines in a paragraph. func (x *TextTag) SetPropertyPixelsInsideWrap(value int) { var v gobject.Value v.Init(gobject.TypeIntVal) v.SetInt(value) x.SetProperty("pixels-inside-wrap", &v) } // GetPropertyPixelsInsideWrap gets the "pixels-inside-wrap" property. // Pixels of blank space between wrapped lines in a paragraph. func (x *TextTag) GetPropertyPixelsInsideWrap() int { var v gobject.Value x.GetProperty("pixels-inside-wrap", &v) return v.GetInt() } // SetPropertyPixelsInsideWrapSet sets the "pixels-inside-wrap-set" property. // Whether the `pixels-inside-wrap` property is set. func (x *TextTag) SetPropertyPixelsInsideWrapSet(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("pixels-inside-wrap-set", &v) } // GetPropertyPixelsInsideWrapSet gets the "pixels-inside-wrap-set" property. // Whether the `pixels-inside-wrap` property is set. func (x *TextTag) GetPropertyPixelsInsideWrapSet() bool { var v gobject.Value x.GetProperty("pixels-inside-wrap-set", &v) return v.GetBoolean() } // SetPropertyRightMargin sets the "right-margin" property. // Width of the right margin, in pixels. func (x *TextTag) SetPropertyRightMargin(value int) { var v gobject.Value v.Init(gobject.TypeIntVal) v.SetInt(value) x.SetProperty("right-margin", &v) } // GetPropertyRightMargin gets the "right-margin" property. // Width of the right margin, in pixels. func (x *TextTag) GetPropertyRightMargin() int { var v gobject.Value x.GetProperty("right-margin", &v) return v.GetInt() } // SetPropertyRightMarginSet sets the "right-margin-set" property. // Whether the `right-margin` property is set. func (x *TextTag) SetPropertyRightMarginSet(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("right-margin-set", &v) } // GetPropertyRightMarginSet gets the "right-margin-set" property. // Whether the `right-margin` property is set. func (x *TextTag) GetPropertyRightMarginSet() bool { var v gobject.Value x.GetProperty("right-margin-set", &v) return v.GetBoolean() } // SetPropertyRise sets the "rise" property. // Offset of text above the baseline, in Pango units. // // Negative values go below the baseline. func (x *TextTag) SetPropertyRise(value int) { var v gobject.Value v.Init(gobject.TypeIntVal) v.SetInt(value) x.SetProperty("rise", &v) } // GetPropertyRise gets the "rise" property. // Offset of text above the baseline, in Pango units. // // Negative values go below the baseline. func (x *TextTag) GetPropertyRise() int { var v gobject.Value x.GetProperty("rise", &v) return v.GetInt() } // SetPropertyRiseSet sets the "rise-set" property. // Whether the `rise` property is set. func (x *TextTag) SetPropertyRiseSet(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("rise-set", &v) } // GetPropertyRiseSet gets the "rise-set" property. // Whether the `rise` property is set. func (x *TextTag) GetPropertyRiseSet() bool { var v gobject.Value x.GetProperty("rise-set", &v) return v.GetBoolean() } // SetPropertyScale sets the "scale" property. // Font size as a scale factor relative to the default font size. // // This properly adapts to theme changes, etc. so is recommended. // Pango predefines some scales such as %PANGO_SCALE_X_LARGE. func (x *TextTag) SetPropertyScale(value float64) { var v gobject.Value v.Init(gobject.TypeDoubleVal) v.SetDouble(value) x.SetProperty("scale", &v) } // GetPropertyScale gets the "scale" property. // Font size as a scale factor relative to the default font size. // // This properly adapts to theme changes, etc. so is recommended. // Pango predefines some scales such as %PANGO_SCALE_X_LARGE. func (x *TextTag) GetPropertyScale() float64 { var v gobject.Value x.GetProperty("scale", &v) return v.GetDouble() } // SetPropertyScaleSet sets the "scale-set" property. // Whether the `scale` property is set. func (x *TextTag) SetPropertyScaleSet(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("scale-set", &v) } // GetPropertyScaleSet gets the "scale-set" property. // Whether the `scale` property is set. func (x *TextTag) GetPropertyScaleSet() bool { var v gobject.Value x.GetProperty("scale-set", &v) return v.GetBoolean() } // SetPropertySentence sets the "sentence" property. // Whether this tag represents a single sentence. // // This affects cursor movement. func (x *TextTag) SetPropertySentence(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("sentence", &v) } // GetPropertySentence gets the "sentence" property. // Whether this tag represents a single sentence. // // This affects cursor movement. func (x *TextTag) GetPropertySentence() bool { var v gobject.Value x.GetProperty("sentence", &v) return v.GetBoolean() } // SetPropertySentenceSet sets the "sentence-set" property. // Whether the `sentence` property is set. func (x *TextTag) SetPropertySentenceSet(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("sentence-set", &v) } // GetPropertySentenceSet gets the "sentence-set" property. // Whether the `sentence` property is set. func (x *TextTag) GetPropertySentenceSet() bool { var v gobject.Value x.GetProperty("sentence-set", &v) return v.GetBoolean() } // SetPropertyShowSpacesSet sets the "show-spaces-set" property. // Whether the `show-spaces` property is set. func (x *TextTag) SetPropertyShowSpacesSet(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("show-spaces-set", &v) } // GetPropertyShowSpacesSet gets the "show-spaces-set" property. // Whether the `show-spaces` property is set. func (x *TextTag) GetPropertyShowSpacesSet() bool { var v gobject.Value x.GetProperty("show-spaces-set", &v) return v.GetBoolean() } // SetPropertySize sets the "size" property. // Font size in Pango units. func (x *TextTag) SetPropertySize(value int) { var v gobject.Value v.Init(gobject.TypeIntVal) v.SetInt(value) x.SetProperty("size", &v) } // GetPropertySize gets the "size" property. // Font size in Pango units. func (x *TextTag) GetPropertySize() int { var v gobject.Value x.GetProperty("size", &v) return v.GetInt() } // SetPropertySizePoints sets the "size-points" property. // Font size in points. func (x *TextTag) SetPropertySizePoints(value float64) { var v gobject.Value v.Init(gobject.TypeDoubleVal) v.SetDouble(value) x.SetProperty("size-points", &v) } // GetPropertySizePoints gets the "size-points" property. // Font size in points. func (x *TextTag) GetPropertySizePoints() float64 { var v gobject.Value x.GetProperty("size-points", &v) return v.GetDouble() } // SetPropertySizeSet sets the "size-set" property. // Whether the `size` property is set. func (x *TextTag) SetPropertySizeSet(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("size-set", &v) } // GetPropertySizeSet gets the "size-set" property. // Whether the `size` property is set. func (x *TextTag) GetPropertySizeSet() bool { var v gobject.Value x.GetProperty("size-set", &v) return v.GetBoolean() } // SetPropertyStretchSet sets the "stretch-set" property. // Whether the `stretch` property is set. func (x *TextTag) SetPropertyStretchSet(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("stretch-set", &v) } // GetPropertyStretchSet gets the "stretch-set" property. // Whether the `stretch` property is set. func (x *TextTag) GetPropertyStretchSet() bool { var v gobject.Value x.GetProperty("stretch-set", &v) return v.GetBoolean() } // SetPropertyStrikethrough sets the "strikethrough" property. // Whether to strike through the text. func (x *TextTag) SetPropertyStrikethrough(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("strikethrough", &v) } // GetPropertyStrikethrough gets the "strikethrough" property. // Whether to strike through the text. func (x *TextTag) GetPropertyStrikethrough() bool { var v gobject.Value x.GetProperty("strikethrough", &v) return v.GetBoolean() } // SetPropertyStrikethroughRgba sets the "strikethrough-rgba" property. // This property modifies the color of strikeouts. // // If not set, strikeouts will use the foreground color. func (x *TextTag) SetPropertyStrikethroughRgba(value uintptr) { var v gobject.Value v.Init(gobject.TypePointerVal) v.SetPointer(value) x.SetProperty("strikethrough-rgba", &v) } // GetPropertyStrikethroughRgba gets the "strikethrough-rgba" property. // This property modifies the color of strikeouts. // // If not set, strikeouts will use the foreground color. func (x *TextTag) GetPropertyStrikethroughRgba() uintptr { var v gobject.Value x.GetProperty("strikethrough-rgba", &v) return v.GetPointer() } // SetPropertyStrikethroughRgbaSet sets the "strikethrough-rgba-set" property. // If the `strikethrough-rgba` property has been set. func (x *TextTag) SetPropertyStrikethroughRgbaSet(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("strikethrough-rgba-set", &v) } // GetPropertyStrikethroughRgbaSet gets the "strikethrough-rgba-set" property. // If the `strikethrough-rgba` property has been set. func (x *TextTag) GetPropertyStrikethroughRgbaSet() bool { var v gobject.Value x.GetProperty("strikethrough-rgba-set", &v) return v.GetBoolean() } // SetPropertyStrikethroughSet sets the "strikethrough-set" property. // Whether the `strikethrough` property is set. func (x *TextTag) SetPropertyStrikethroughSet(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("strikethrough-set", &v) } // GetPropertyStrikethroughSet gets the "strikethrough-set" property. // Whether the `strikethrough` property is set. func (x *TextTag) GetPropertyStrikethroughSet() bool { var v gobject.Value x.GetProperty("strikethrough-set", &v) return v.GetBoolean() } // SetPropertyStyleSet sets the "style-set" property. // Whether the `style` property is set. func (x *TextTag) SetPropertyStyleSet(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("style-set", &v) } // GetPropertyStyleSet gets the "style-set" property. // Whether the `style` property is set. func (x *TextTag) GetPropertyStyleSet() bool { var v gobject.Value x.GetProperty("style-set", &v) return v.GetBoolean() } // SetPropertyTabs sets the "tabs" property. // Custom tabs for this text. func (x *TextTag) SetPropertyTabs(value uintptr) { var v gobject.Value v.Init(gobject.TypePointerVal) v.SetPointer(value) x.SetProperty("tabs", &v) } // GetPropertyTabs gets the "tabs" property. // Custom tabs for this text. func (x *TextTag) GetPropertyTabs() uintptr { var v gobject.Value x.GetProperty("tabs", &v) return v.GetPointer() } // SetPropertyTabsSet sets the "tabs-set" property. // Whether the `tabs` property is set. func (x *TextTag) SetPropertyTabsSet(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("tabs-set", &v) } // GetPropertyTabsSet gets the "tabs-set" property. // Whether the `tabs` property is set. func (x *TextTag) GetPropertyTabsSet() bool { var v gobject.Value x.GetProperty("tabs-set", &v) return v.GetBoolean() } // SetPropertyTextTransformSet sets the "text-transform-set" property. // Whether the `text-transform` property is set. func (x *TextTag) SetPropertyTextTransformSet(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("text-transform-set", &v) } // GetPropertyTextTransformSet gets the "text-transform-set" property. // Whether the `text-transform` property is set. func (x *TextTag) GetPropertyTextTransformSet() bool { var v gobject.Value x.GetProperty("text-transform-set", &v) return v.GetBoolean() } // SetPropertyUnderlineRgba sets the "underline-rgba" property. // This property modifies the color of underlines. // // If not set, underlines will use the foreground color. // // If [property@Gtk.TextTag:underline] is set to %PANGO_UNDERLINE_ERROR, // an alternate color may be applied instead of the foreground. Setting // this property will always override those defaults. func (x *TextTag) SetPropertyUnderlineRgba(value uintptr) { var v gobject.Value v.Init(gobject.TypePointerVal) v.SetPointer(value) x.SetProperty("underline-rgba", &v) } // GetPropertyUnderlineRgba gets the "underline-rgba" property. // This property modifies the color of underlines. // // If not set, underlines will use the foreground color. // // If [property@Gtk.TextTag:underline] is set to %PANGO_UNDERLINE_ERROR, // an alternate color may be applied instead of the foreground. Setting // this property will always override those defaults. func (x *TextTag) GetPropertyUnderlineRgba() uintptr { var v gobject.Value x.GetProperty("underline-rgba", &v) return v.GetPointer() } // SetPropertyUnderlineRgbaSet sets the "underline-rgba-set" property. // If the `underline-rgba` property has been set. func (x *TextTag) SetPropertyUnderlineRgbaSet(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("underline-rgba-set", &v) } // GetPropertyUnderlineRgbaSet gets the "underline-rgba-set" property. // If the `underline-rgba` property has been set. func (x *TextTag) GetPropertyUnderlineRgbaSet() bool { var v gobject.Value x.GetProperty("underline-rgba-set", &v) return v.GetBoolean() } // SetPropertyUnderlineSet sets the "underline-set" property. // Whether the `underline` property is set. func (x *TextTag) SetPropertyUnderlineSet(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("underline-set", &v) } // GetPropertyUnderlineSet gets the "underline-set" property. // Whether the `underline` property is set. func (x *TextTag) GetPropertyUnderlineSet() bool { var v gobject.Value x.GetProperty("underline-set", &v) return v.GetBoolean() } // SetPropertyVariantSet sets the "variant-set" property. // Whether the `variant` property is set. func (x *TextTag) SetPropertyVariantSet(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("variant-set", &v) } // GetPropertyVariantSet gets the "variant-set" property. // Whether the `variant` property is set. func (x *TextTag) GetPropertyVariantSet() bool { var v gobject.Value x.GetProperty("variant-set", &v) return v.GetBoolean() } // SetPropertyWeight sets the "weight" property. // Font weight as an integer. func (x *TextTag) SetPropertyWeight(value int) { var v gobject.Value v.Init(gobject.TypeIntVal) v.SetInt(value) x.SetProperty("weight", &v) } // GetPropertyWeight gets the "weight" property. // Font weight as an integer. func (x *TextTag) GetPropertyWeight() int { var v gobject.Value x.GetProperty("weight", &v) return v.GetInt() } // SetPropertyWeightSet sets the "weight-set" property. // Whether the `weight` property is set. func (x *TextTag) SetPropertyWeightSet(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("weight-set", &v) } // GetPropertyWeightSet gets the "weight-set" property. // Whether the `weight` property is set. func (x *TextTag) GetPropertyWeightSet() bool { var v gobject.Value x.GetProperty("weight-set", &v) return v.GetBoolean() } // SetPropertyWord sets the "word" property. // Whether this tag represents a single word. // // This affects line breaks and cursor movement. func (x *TextTag) SetPropertyWord(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("word", &v) } // GetPropertyWord gets the "word" property. // Whether this tag represents a single word. // // This affects line breaks and cursor movement. func (x *TextTag) GetPropertyWord() bool { var v gobject.Value x.GetProperty("word", &v) return v.GetBoolean() } // SetPropertyWordSet sets the "word-set" property. // Whether the `word` property is set. func (x *TextTag) SetPropertyWordSet(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("word-set", &v) } // GetPropertyWordSet gets the "word-set" property. // Whether the `word` property is set. func (x *TextTag) GetPropertyWordSet() bool { var v gobject.Value x.GetProperty("word-set", &v) return v.GetBoolean() } // SetPropertyWrapModeSet sets the "wrap-mode-set" property. // Whether the `wrap-mode` property is set. func (x *TextTag) SetPropertyWrapModeSet(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("wrap-mode-set", &v) } // GetPropertyWrapModeSet gets the "wrap-mode-set" property. // Whether the `wrap-mode` property is set. func (x *TextTag) GetPropertyWrapModeSet() bool { var v gobject.Value x.GetProperty("wrap-mode-set", &v) return v.GetBoolean() } func init() { core.SetPackageName("GTK", "gtk4") core.SetSharedLibraries("GTK", []string{"libgtk-4.so.1"}) var libs []uintptr for _, libPath := range core.GetPaths("GTK") { lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) if err != nil { panic(err) } libs = append(libs, lib) } core.PuregoSafeRegister(&xTextTagGLibType, libs, "gtk_text_tag_get_type") core.PuregoSafeRegister(&xNewTextTag, libs, "gtk_text_tag_new") core.PuregoSafeRegister(&xTextTagChanged, libs, "gtk_text_tag_changed") core.PuregoSafeRegister(&xTextTagGetPriority, libs, "gtk_text_tag_get_priority") core.PuregoSafeRegister(&xTextTagSetPriority, libs, "gtk_text_tag_set_priority") }