Help us shape the future of Go! Take the 2026 Go Developer Survey

fonts

package
v0.0.9 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	TransactionIFontManagerGetFontConfig    = binder.FirstCallTransaction + 0
	TransactionIFontManagerUpdateFontFamily = binder.FirstCallTransaction + 1
)
View Source
const (
	MethodIFontManagerGetFontConfig    = "getFontConfig"
	MethodIFontManagerUpdateFontFamily = "updateFontFamily"
)
View Source
const DescriptorIFontManager = "com.android.internal.graphics.fonts.IFontManager"

Variables

This section is empty.

Functions

This section is empty.

Types

type FontManagerProxy

type FontManagerProxy struct {
	Remote binder.IBinder
}

func GetFontManager

func GetFontManager(
	ctx context.Context,
	sm *servicemanager.ServiceManager,
) (*FontManagerProxy, error)

GetFontManager retrieves the FontService service and returns a typed proxy.

func NewFontManagerProxy

func NewFontManagerProxy(
	remote binder.IBinder,
) *FontManagerProxy

func (*FontManagerProxy) AsBinder

func (p *FontManagerProxy) AsBinder() binder.IBinder

func (*FontManagerProxy) GetFontConfig

func (p *FontManagerProxy) GetFontConfig(
	ctx context.Context,
) (text.FontConfig, error)

func (*FontManagerProxy) UpdateFontFamily

func (p *FontManagerProxy) UpdateFontFamily(
	ctx context.Context,
	request []graphicsFonts.FontUpdateRequest,
	baseVersion int32,
) (int32, error)

type FontManagerStub

type FontManagerStub struct {
	Impl      IFontManager
	Transport binder.VersionAwareTransport
}

FontManagerStub dispatches incoming binder transactions to a typed IFontManager implementation.

func (*FontManagerStub) Descriptor

func (s *FontManagerStub) Descriptor() string

func (*FontManagerStub) OnTransaction

func (s *FontManagerStub) OnTransaction(
	ctx context.Context,
	code binder.TransactionCode,
	_data *parcel.Parcel,
) (*parcel.Parcel, error)

type IFontManager

type IFontManager interface {
	AsBinder() binder.IBinder
	GetFontConfig(ctx context.Context) (text.FontConfig, error)
	UpdateFontFamily(ctx context.Context, request []graphicsFonts.FontUpdateRequest, baseVersion int32) (int32, error)
}

func NewFontManagerStub

func NewFontManagerStub(
	impl IFontManagerServer,
) IFontManager

NewFontManagerStub creates a server-side IFontManager wrapping the given server implementation. The returned value satisfies IFontManager and can be passed to proxy methods; its AsBinder() returns a *binder.StubBinder that is auto-registered with the binder driver on first use.

type IFontManagerServer

type IFontManagerServer interface {
	GetFontConfig(ctx context.Context) (text.FontConfig, error)
	UpdateFontFamily(ctx context.Context, request []graphicsFonts.FontUpdateRequest, baseVersion int32) (int32, error)
}

IFontManagerServer is the server-side interface that user implementations provide to NewFontManagerStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).

Jump to

Keyboard shortcuts

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