asset

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Raw CGo bindings for Android asset manager

Index

Constants

View Source
const (
	AASSET_MODE_UNKNOWN   = 0
	AASSET_MODE_RANDOM    = 1
	AASSET_MODE_STREAMING = 2
	AASSET_MODE_BUFFER    = 3
)

Variables

This section is empty.

Functions

func AAssetDir_close

func AAssetDir_close(assetDir *AAssetDir)

func AAssetDir_getNextFileName

func AAssetDir_getNextFileName(assetDir *AAssetDir) string

func AAssetDir_rewind

func AAssetDir_rewind(assetDir *AAssetDir)

func AAsset_close

func AAsset_close(asset *AAsset)

func AAsset_getBuffer

func AAsset_getBuffer(asset *AAsset) unsafe.Pointer

func AAsset_isAllocated

func AAsset_isAllocated(asset *AAsset) int32

func AAsset_openFileDescriptor

func AAsset_openFileDescriptor(asset *AAsset, outStart *Off_t, outLength *Off_t) int32

func AAsset_openFileDescriptor64

func AAsset_openFileDescriptor64(asset *AAsset, outStart *Off64_t, outLength *Off64_t) int32

func AAsset_read

func AAsset_read(asset *AAsset, buf unsafe.Pointer, count uint64) int32

Types

type AAsset

type AAsset C.AAsset

func AAssetManager_open

func AAssetManager_open(mgr *AAssetManager, filename string, mode int32) *AAsset

type AAssetDir

type AAssetDir C.AAssetDir

func AAssetManager_openDir

func AAssetManager_openDir(mgr *AAssetManager, dirName string) *AAssetDir

type AAssetManager

type AAssetManager C.AAssetManager

type CgoAllocMap

type CgoAllocMap struct {
	// contains filtered or unexported fields
}

CgoAllocMap stores pointers to C allocated memory for future reference.

func UnpackPCharString

func UnpackPCharString(str string) (*C.char, *CgoAllocMap)

UnpackPCharString copies the data from Go string as *C.char.

func (*CgoAllocMap) Add

func (a *CgoAllocMap) Add(ptr unsafe.Pointer)

func (*CgoAllocMap) Borrow

func (a *CgoAllocMap) Borrow(b *CgoAllocMap)

func (*CgoAllocMap) Free

func (a *CgoAllocMap) Free()

func (*CgoAllocMap) IsEmpty

func (a *CgoAllocMap) IsEmpty() bool

type Off64_t

type Off64_t C.off64_t

func AAsset_getLength64

func AAsset_getLength64(asset *AAsset) Off64_t

func AAsset_getRemainingLength64

func AAsset_getRemainingLength64(asset *AAsset) Off64_t

func AAsset_seek64

func AAsset_seek64(asset *AAsset, offset Off64_t, whence int32) Off64_t

type Off_t

type Off_t C.off_t

func AAsset_getLength

func AAsset_getLength(asset *AAsset) Off_t

func AAsset_getRemainingLength

func AAsset_getRemainingLength(asset *AAsset) Off_t

func AAsset_seek

func AAsset_seek(asset *AAsset, offset Off_t, whence int32) Off_t

type SliceHeader

type SliceHeader struct {
	Data unsafe.Pointer
	Len  int
	Cap  int
}

Jump to

Keyboard shortcuts

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