text

package
v0.0.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 28, 2026 License: CC0-1.0 Imports: 6 Imported by: 0

Documentation

Overview

Package text provides Go bindings for android.graphics.text.

Index

Constants

View Source
const (
	HyphenationModeFast             = consts.HyphenationModeFast
	HyphenationModeNone             = consts.HyphenationModeNone
	HyphenationModeNormal           = consts.HyphenationModeNormal
	Creator                         = consts.Creator
	HyphenationDisabled             = consts.HyphenationDisabled
	HyphenationEnabled              = consts.HyphenationEnabled
	HyphenationUnspecified          = consts.HyphenationUnspecified
	LineBreakStyleAuto              = consts.LineBreakStyleAuto
	LineBreakStyleLoose             = consts.LineBreakStyleLoose
	LineBreakStyleNone              = consts.LineBreakStyleNone
	LineBreakStyleNormal            = consts.LineBreakStyleNormal
	LineBreakStyleNoBreak           = consts.LineBreakStyleNoBreak
	LineBreakStyleStrict            = consts.LineBreakStyleStrict
	LineBreakStyleUnspecified       = consts.LineBreakStyleUnspecified
	LineBreakWordStyleAuto          = consts.LineBreakWordStyleAuto
	LineBreakWordStyleNone          = consts.LineBreakWordStyleNone
	LineBreakWordStylePhrase        = consts.LineBreakWordStylePhrase
	LineBreakWordStyleUnspecified   = consts.LineBreakWordStyleUnspecified
	BreakStrategyBalanced           = consts.BreakStrategyBalanced
	BreakStrategyHighQuality        = consts.BreakStrategyHighQuality
	BreakStrategySimple             = consts.BreakStrategySimple
	HyphenationFrequencyFull        = consts.HyphenationFrequencyFull
	HyphenationFrequencyNone        = consts.HyphenationFrequencyNone
	HyphenationFrequencyNormal      = consts.HyphenationFrequencyNormal
	JustificationModeInterCharacter = consts.JustificationModeInterCharacter
	JustificationModeInterWord      = consts.JustificationModeInterWord
	JustificationModeNone           = consts.JustificationModeNone
)
View Source
const (
	NoOverride = consts.NoOverride
)

Variables

This section is empty.

Functions

func Init

func Init(env *jni.Env) error

Init resolves all JNI class and method references for this package. It is safe to call multiple times (uses sync.Once internally). Exported for E2E testing on Android.

Types

type LineBreakConfig

type LineBreakConfig struct {
	VM  *jni.VM
	Obj *jni.GlobalRef
}

LineBreakConfig wraps android.graphics.text.LineBreakConfig.

func (*LineBreakConfig) DescribeContents

func (m *LineBreakConfig) DescribeContents() (int32, error)

DescribeContents calls android.graphics.text.LineBreakConfig.describeContents.

func (*LineBreakConfig) Equals

func (m *LineBreakConfig) Equals(arg0 *jni.Object) (bool, error)

Equals calls android.graphics.text.LineBreakConfig.equals.

func (*LineBreakConfig) GetHyphenation

func (m *LineBreakConfig) GetHyphenation() (int32, error)

GetHyphenation calls android.graphics.text.LineBreakConfig.getHyphenation.

func (*LineBreakConfig) GetLineBreakStyle

func (m *LineBreakConfig) GetLineBreakStyle() (int32, error)

GetLineBreakStyle calls android.graphics.text.LineBreakConfig.getLineBreakStyle.

func (*LineBreakConfig) GetLineBreakWordStyle

func (m *LineBreakConfig) GetLineBreakWordStyle() (int32, error)

GetLineBreakWordStyle calls android.graphics.text.LineBreakConfig.getLineBreakWordStyle.

func (*LineBreakConfig) HashCode

func (m *LineBreakConfig) HashCode() (int32, error)

HashCode calls android.graphics.text.LineBreakConfig.hashCode.

func (*LineBreakConfig) Merge

func (m *LineBreakConfig) Merge(arg0 *jni.Object) (*jni.Object, error)

Merge calls android.graphics.text.LineBreakConfig.merge.

func (*LineBreakConfig) ToString

func (m *LineBreakConfig) ToString() (string, error)

ToString calls android.graphics.text.LineBreakConfig.toString.

func (*LineBreakConfig) WriteToParcel

func (m *LineBreakConfig) WriteToParcel(arg0 *jni.Object, arg1 int32) error

WriteToParcel calls android.graphics.text.LineBreakConfig.writeToParcel.

type LineBreakConfigBuilder

type LineBreakConfigBuilder struct {
	VM  *jni.VM
	Obj *jni.GlobalRef
}

LineBreakConfigBuilder wraps android.graphics.text.LineBreakConfig$Builder.

func (*LineBreakConfigBuilder) Build

func (m *LineBreakConfigBuilder) Build() (*jni.Object, error)

Build calls android.graphics.text.LineBreakConfig$Builder.build.

func (*LineBreakConfigBuilder) Merge

func (m *LineBreakConfigBuilder) Merge(arg0 *jni.Object) (*jni.Object, error)

Merge calls android.graphics.text.LineBreakConfig$Builder.merge.

func (*LineBreakConfigBuilder) SetHyphenation

func (m *LineBreakConfigBuilder) SetHyphenation(arg0 int32) (*jni.Object, error)

SetHyphenation calls android.graphics.text.LineBreakConfig$Builder.setHyphenation.

func (*LineBreakConfigBuilder) SetLineBreakStyle

func (m *LineBreakConfigBuilder) SetLineBreakStyle(arg0 int32) (*jni.Object, error)

SetLineBreakStyle calls android.graphics.text.LineBreakConfig$Builder.setLineBreakStyle.

func (*LineBreakConfigBuilder) SetLineBreakWordStyle

func (m *LineBreakConfigBuilder) SetLineBreakWordStyle(arg0 int32) (*jni.Object, error)

SetLineBreakWordStyle calls android.graphics.text.LineBreakConfig$Builder.setLineBreakWordStyle.

type LineBreaker

type LineBreaker struct {
	VM  *jni.VM
	Obj *jni.GlobalRef
}

LineBreaker wraps android.graphics.text.LineBreaker.

func (*LineBreaker) ComputeLineBreaks

func (m *LineBreaker) ComputeLineBreaks(
	arg0 *jni.Object,
	arg1 *jni.Object,
	arg2 int32,
) (*jni.Object, error)

ComputeLineBreaks calls android.graphics.text.LineBreaker.computeLineBreaks.

type LineBreakerBuilder

type LineBreakerBuilder struct {
	VM  *jni.VM
	Obj *jni.GlobalRef
}

LineBreakerBuilder wraps android.graphics.text.LineBreaker$Builder.

func (*LineBreakerBuilder) Build

func (m *LineBreakerBuilder) Build() (*jni.Object, error)

Build calls android.graphics.text.LineBreaker$Builder.build.

func (*LineBreakerBuilder) SetBreakStrategy

func (m *LineBreakerBuilder) SetBreakStrategy(arg0 int32) (*jni.Object, error)

SetBreakStrategy calls android.graphics.text.LineBreaker$Builder.setBreakStrategy.

func (*LineBreakerBuilder) SetHyphenationFrequency

func (m *LineBreakerBuilder) SetHyphenationFrequency(arg0 int32) (*jni.Object, error)

SetHyphenationFrequency calls android.graphics.text.LineBreaker$Builder.setHyphenationFrequency.

func (*LineBreakerBuilder) SetIndents

func (m *LineBreakerBuilder) SetIndents(arg0 *jni.Object) (*jni.Object, error)

SetIndents calls android.graphics.text.LineBreaker$Builder.setIndents.

func (*LineBreakerBuilder) SetJustificationMode

func (m *LineBreakerBuilder) SetJustificationMode(arg0 int32) (*jni.Object, error)

SetJustificationMode calls android.graphics.text.LineBreaker$Builder.setJustificationMode.

func (*LineBreakerBuilder) SetUseBoundsForWidth

func (m *LineBreakerBuilder) SetUseBoundsForWidth(arg0 bool) (*jni.Object, error)

SetUseBoundsForWidth calls android.graphics.text.LineBreaker$Builder.setUseBoundsForWidth.

type LineBreakerParagraphConstraints

type LineBreakerParagraphConstraints struct {
	VM  *jni.VM
	Obj *jni.GlobalRef
}

LineBreakerParagraphConstraints wraps android.graphics.text.LineBreaker$ParagraphConstraints.

func (*LineBreakerParagraphConstraints) GetDefaultTabStop

func (m *LineBreakerParagraphConstraints) GetDefaultTabStop() (float32, error)

GetDefaultTabStop calls android.graphics.text.LineBreaker$ParagraphConstraints.getDefaultTabStop.

func (*LineBreakerParagraphConstraints) GetFirstWidth

func (m *LineBreakerParagraphConstraints) GetFirstWidth() (float32, error)

GetFirstWidth calls android.graphics.text.LineBreaker$ParagraphConstraints.getFirstWidth.

func (*LineBreakerParagraphConstraints) GetFirstWidthLineCount

func (m *LineBreakerParagraphConstraints) GetFirstWidthLineCount() (int32, error)

GetFirstWidthLineCount calls android.graphics.text.LineBreaker$ParagraphConstraints.getFirstWidthLineCount.

func (*LineBreakerParagraphConstraints) GetTabStops

func (m *LineBreakerParagraphConstraints) GetTabStops() (*jni.Object, error)

GetTabStops calls android.graphics.text.LineBreaker$ParagraphConstraints.getTabStops.

func (*LineBreakerParagraphConstraints) GetWidth

GetWidth calls android.graphics.text.LineBreaker$ParagraphConstraints.getWidth.

func (*LineBreakerParagraphConstraints) SetIndent

func (m *LineBreakerParagraphConstraints) SetIndent(arg0 float32, arg1 int32) error

SetIndent calls android.graphics.text.LineBreaker$ParagraphConstraints.setIndent.

func (*LineBreakerParagraphConstraints) SetTabStops

func (m *LineBreakerParagraphConstraints) SetTabStops(arg0 *jni.Object, arg1 float32) error

SetTabStops calls android.graphics.text.LineBreaker$ParagraphConstraints.setTabStops.

func (*LineBreakerParagraphConstraints) SetWidth

func (m *LineBreakerParagraphConstraints) SetWidth(arg0 float32) error

SetWidth calls android.graphics.text.LineBreaker$ParagraphConstraints.setWidth.

type LineBreakerResult

type LineBreakerResult struct {
	VM  *jni.VM
	Obj *jni.GlobalRef
}

LineBreakerResult wraps android.graphics.text.LineBreaker$Result.

func (*LineBreakerResult) GetEndLineHyphenEdit

func (m *LineBreakerResult) GetEndLineHyphenEdit(arg0 int32) (int32, error)

GetEndLineHyphenEdit calls android.graphics.text.LineBreaker$Result.getEndLineHyphenEdit.

func (*LineBreakerResult) GetLineAscent

func (m *LineBreakerResult) GetLineAscent(arg0 int32) (float32, error)

GetLineAscent calls android.graphics.text.LineBreaker$Result.getLineAscent.

func (*LineBreakerResult) GetLineBreakOffset

func (m *LineBreakerResult) GetLineBreakOffset(arg0 int32) (int32, error)

GetLineBreakOffset calls android.graphics.text.LineBreaker$Result.getLineBreakOffset.

func (*LineBreakerResult) GetLineCount

func (m *LineBreakerResult) GetLineCount() (int32, error)

GetLineCount calls android.graphics.text.LineBreaker$Result.getLineCount.

func (*LineBreakerResult) GetLineDescent

func (m *LineBreakerResult) GetLineDescent(arg0 int32) (float32, error)

GetLineDescent calls android.graphics.text.LineBreaker$Result.getLineDescent.

func (*LineBreakerResult) GetLineWidth

func (m *LineBreakerResult) GetLineWidth(arg0 int32) (float32, error)

GetLineWidth calls android.graphics.text.LineBreaker$Result.getLineWidth.

func (*LineBreakerResult) GetStartLineHyphenEdit

func (m *LineBreakerResult) GetStartLineHyphenEdit(arg0 int32) (int32, error)

GetStartLineHyphenEdit calls android.graphics.text.LineBreaker$Result.getStartLineHyphenEdit.

func (*LineBreakerResult) HasLineTab

func (m *LineBreakerResult) HasLineTab(arg0 int32) (bool, error)

HasLineTab calls android.graphics.text.LineBreaker$Result.hasLineTab.

type MeasuredText

type MeasuredText struct {
	VM  *jni.VM
	Obj *jni.GlobalRef
}

MeasuredText wraps android.graphics.text.MeasuredText.

func (*MeasuredText) GetBounds

func (m *MeasuredText) GetBounds(
	arg0 int32,
	arg1 int32,
	arg2 *jni.Object,
) error

GetBounds calls android.graphics.text.MeasuredText.getBounds.

func (*MeasuredText) GetCharWidthAt

func (m *MeasuredText) GetCharWidthAt(arg0 int32) (float32, error)

GetCharWidthAt calls android.graphics.text.MeasuredText.getCharWidthAt.

func (*MeasuredText) GetFontMetricsInt

func (m *MeasuredText) GetFontMetricsInt(
	arg0 int32,
	arg1 int32,
	arg2 *jni.Object,
) error

GetFontMetricsInt calls android.graphics.text.MeasuredText.getFontMetricsInt.

func (*MeasuredText) GetWidth

func (m *MeasuredText) GetWidth(arg0 int32, arg1 int32) (float32, error)

GetWidth calls android.graphics.text.MeasuredText.getWidth.

type MeasuredTextBuilder

type MeasuredTextBuilder struct {
	VM  *jni.VM
	Obj *jni.GlobalRef
}

MeasuredTextBuilder wraps android.graphics.text.MeasuredText$Builder.

func (*MeasuredTextBuilder) AppendReplacementRun

func (m *MeasuredTextBuilder) AppendReplacementRun(
	arg0 *jni.Object,
	arg1 int32,
	arg2 float32,
) (*jni.Object, error)

AppendReplacementRun calls android.graphics.text.MeasuredText$Builder.appendReplacementRun.

func (*MeasuredTextBuilder) AppendStyleRun3_1

func (m *MeasuredTextBuilder) AppendStyleRun3_1(
	arg0 *jni.Object,
	arg1 int32,
	arg2 bool,
) (*jni.Object, error)

AppendStyleRun3_1 calls android.graphics.text.MeasuredText$Builder.appendStyleRun.

func (*MeasuredTextBuilder) AppendStyleRun4

func (m *MeasuredTextBuilder) AppendStyleRun4(
	arg0 *jni.Object,
	arg1 *jni.Object,
	arg2 int32,
	arg3 bool,
) (*jni.Object, error)

AppendStyleRun4 calls android.graphics.text.MeasuredText$Builder.appendStyleRun.

func (*MeasuredTextBuilder) Build

func (m *MeasuredTextBuilder) Build() (*jni.Object, error)

Build calls android.graphics.text.MeasuredText$Builder.build.

func (*MeasuredTextBuilder) SetComputeHyphenation1

func (m *MeasuredTextBuilder) SetComputeHyphenation1(arg0 bool) (*jni.Object, error)

SetComputeHyphenation1 calls android.graphics.text.MeasuredText$Builder.setComputeHyphenation.

func (*MeasuredTextBuilder) SetComputeHyphenation1_1

func (m *MeasuredTextBuilder) SetComputeHyphenation1_1(arg0 int32) (*jni.Object, error)

SetComputeHyphenation1_1 calls android.graphics.text.MeasuredText$Builder.setComputeHyphenation.

func (*MeasuredTextBuilder) SetComputeLayout

func (m *MeasuredTextBuilder) SetComputeLayout(arg0 bool) (*jni.Object, error)

SetComputeLayout calls android.graphics.text.MeasuredText$Builder.setComputeLayout.

type PositionedGlyphs

type PositionedGlyphs struct {
	VM  *jni.VM
	Obj *jni.GlobalRef
}

PositionedGlyphs wraps android.graphics.text.PositionedGlyphs.

func (*PositionedGlyphs) Equals

func (m *PositionedGlyphs) Equals(arg0 *jni.Object) (bool, error)

Equals calls android.graphics.text.PositionedGlyphs.equals.

func (*PositionedGlyphs) GetAdvance

func (m *PositionedGlyphs) GetAdvance() (float32, error)

GetAdvance calls android.graphics.text.PositionedGlyphs.getAdvance.

func (*PositionedGlyphs) GetAscent

func (m *PositionedGlyphs) GetAscent() (float32, error)

GetAscent calls android.graphics.text.PositionedGlyphs.getAscent.

func (*PositionedGlyphs) GetDescent

func (m *PositionedGlyphs) GetDescent() (float32, error)

GetDescent calls android.graphics.text.PositionedGlyphs.getDescent.

func (*PositionedGlyphs) GetFakeBold

func (m *PositionedGlyphs) GetFakeBold(arg0 int32) (bool, error)

GetFakeBold calls android.graphics.text.PositionedGlyphs.getFakeBold.

func (*PositionedGlyphs) GetFakeItalic

func (m *PositionedGlyphs) GetFakeItalic(arg0 int32) (bool, error)

GetFakeItalic calls android.graphics.text.PositionedGlyphs.getFakeItalic.

func (*PositionedGlyphs) GetFont

func (m *PositionedGlyphs) GetFont(arg0 int32) (*jni.Object, error)

GetFont calls android.graphics.text.PositionedGlyphs.getFont.

func (*PositionedGlyphs) GetGlyphId

func (m *PositionedGlyphs) GetGlyphId(arg0 int32) (int32, error)

GetGlyphId calls android.graphics.text.PositionedGlyphs.getGlyphId.

func (*PositionedGlyphs) GetGlyphX

func (m *PositionedGlyphs) GetGlyphX(arg0 int32) (float32, error)

GetGlyphX calls android.graphics.text.PositionedGlyphs.getGlyphX.

func (*PositionedGlyphs) GetGlyphY

func (m *PositionedGlyphs) GetGlyphY(arg0 int32) (float32, error)

GetGlyphY calls android.graphics.text.PositionedGlyphs.getGlyphY.

func (*PositionedGlyphs) GetItalicOverride

func (m *PositionedGlyphs) GetItalicOverride(arg0 int32) (float32, error)

GetItalicOverride calls android.graphics.text.PositionedGlyphs.getItalicOverride.

func (*PositionedGlyphs) GetOffsetX

func (m *PositionedGlyphs) GetOffsetX() (float32, error)

GetOffsetX calls android.graphics.text.PositionedGlyphs.getOffsetX.

func (*PositionedGlyphs) GetOffsetY

func (m *PositionedGlyphs) GetOffsetY() (float32, error)

GetOffsetY calls android.graphics.text.PositionedGlyphs.getOffsetY.

func (*PositionedGlyphs) GetWeightOverride

func (m *PositionedGlyphs) GetWeightOverride(arg0 int32) (float32, error)

GetWeightOverride calls android.graphics.text.PositionedGlyphs.getWeightOverride.

func (*PositionedGlyphs) GlyphCount

func (m *PositionedGlyphs) GlyphCount() (int32, error)

GlyphCount calls android.graphics.text.PositionedGlyphs.glyphCount.

func (*PositionedGlyphs) HashCode

func (m *PositionedGlyphs) HashCode() (int32, error)

HashCode calls android.graphics.text.PositionedGlyphs.hashCode.

func (*PositionedGlyphs) ToString

func (m *PositionedGlyphs) ToString() (string, error)

ToString calls android.graphics.text.PositionedGlyphs.toString.

type RunShaper

type RunShaper struct {
	VM  *jni.VM
	Obj *jni.GlobalRef
}

RunShaper wraps android.graphics.text.TextRunShaper.

func (*RunShaper) ShapeTextRun9

func (m *RunShaper) ShapeTextRun9(
	arg0 *jni.Object,
	arg1 int32,
	arg2 int32,
	arg3 int32,
	arg4 int32,
	arg5 float32,
	arg6 float32,
	arg7 bool,
	arg8 *jni.Object,
) (*jni.Object, error)

ShapeTextRun9 calls android.graphics.text.TextRunShaper.shapeTextRun.

func (*RunShaper) ShapeTextRun9_1

func (m *RunShaper) ShapeTextRun9_1(
	arg0 string,
	arg1 int32,
	arg2 int32,
	arg3 int32,
	arg4 int32,
	arg5 float32,
	arg6 float32,
	arg7 bool,
	arg8 *jni.Object,
) (*jni.Object, error)

ShapeTextRun9_1 calls android.graphics.text.TextRunShaper.shapeTextRun.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL