vi

package
v0.0.0-...-e9d5adc Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AdjustRefCount

func AdjustRefCount(handle, addVal, Type int32) error

func CloseDisplay

func CloseDisplay(d *Display) error

func CloseLayer

func CloseLayer(layerId uint64) error

func CreateManagedLayer

func CreateManagedLayer(display *Display, flags uint32, aruid nxtypes.ARUID) (uint64, error)

func DestroyManagedLayer

func DestroyManagedLayer(layerId uint64) error

func Finalize

func Finalize()

func GetDisplayVsyncEvent

func GetDisplayVsyncEvent(d *Display) error

func GetObject

func GetObject(iface ipc.Object, command int) (ipc.Object, error)

func IadsSetLayerScalingMode

func IadsSetLayerScalingMode(scalingMode ScalingMode, layerId uint64) error

func Init

func Init() (err error)

func TransactParcel

func TransactParcel(handle int32, transaction, flags uint32, rqParcel []byte, rsParcel []byte) error

Types

type Binder

type Binder struct {
	Handle int32
}

Binder Represents a remote interface

func (*Binder) AdjustRefCount

func (b *Binder) AdjustRefCount(addVal, Type int32) error

type Display

type Display struct {
	ID    uint64
	VSync nxtypes.ReventHandle
}

func OpenDisplay

func OpenDisplay(name string) (*Display, error)

type FlatBinderObject

type FlatBinderObject struct {
	Type    uint32
	Flags   uint32
	Content uint64 // union of void *binder and int32 Handle
	Cookie  uint64
}

FlatBinderObject Binder object as included in a Parcel

func (*FlatBinderObject) GetBinder

func (fb *FlatBinderObject) GetBinder() uintptr

func (*FlatBinderObject) GetHandle

func (fb *FlatBinderObject) GetHandle() int32

type IGBP

type IGBP struct {
	IgbpBinder Binder // IGraphicBufferProducer
}

IGBP IGraphicBufferProducer object https://android.googlesource.com/platform/frameworks/native/+/f7a6758/include/gui/IGraphicBufferProducer.h#51

func OpenLayer

func OpenLayer(displayName string, layerId uint64, aruid nxtypes.ARUID) (*IGBP, error)

type Parcel

type Parcel struct {
	Contents struct {
		DataSize      uint32
		DataOffset    uint32
		ObjectsSize   uint32
		ObjectsOffset uint32
		Payload       [0x200]byte
	}
	ReadHead         int
	WriteHead        int
	WritingFinalized bool
}

Parcel Represents a parcel

Bounds checking is the caller's responsibility.
Objects aren't currently supported very well.

func BinderTransactParcel

func BinderTransactParcel(binder Binder, transaction, flags uint32, in *Parcel) (*Parcel, error)

func ParcelLoad

func ParcelLoad(flattened []byte) (*Parcel, error)

func (*Parcel) FinalizeWriting

func (p *Parcel) FinalizeWriting() ([]byte, int)

func (*Parcel) ReadBinder

func (p *Parcel) ReadBinder() (*Binder, error)

func (*Parcel) ReadInPlace

func (p *Parcel) ReadInPlace(length int) []byte

func (*Parcel) ReadString

func (p *Parcel) ReadString() string

func (*Parcel) ReadU32

func (p *Parcel) ReadU32() uint32

func (*Parcel) Remaining

func (p *Parcel) Remaining() int

func (*Parcel) WriteInPlace

func (p *Parcel) WriteInPlace(data []byte)

func (*Parcel) WriteInPlaceU16

func (p *Parcel) WriteInPlaceU16(data []uint16)

func (*Parcel) WriteInPlaceU32

func (p *Parcel) WriteInPlaceU32(data []uint32)

func (*Parcel) WriteInterfaceToken

func (p *Parcel) WriteInterfaceToken(token string)

func (*Parcel) WriteRemaining

func (p *Parcel) WriteRemaining() int

func (*Parcel) WriteString16

func (p *Parcel) WriteString16(data string)

func (*Parcel) WriteU32

func (p *Parcel) WriteU32(v uint32)

type ScalingMode

type ScalingMode uint32
const (
	ScalingMode_None                ScalingMode = 0x0
	ScalingMode_FitToLayer          ScalingMode = 0x2
	ScalingMode_PreserveAspectRatio ScalingMode = 0x4
	ScalingModeDefault                          = ScalingMode_FitToLayer
)

Jump to

Keyboard shortcuts

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