looper

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 looper

Index

Constants

View Source
const (
	ALOOPER_EVENT_INPUT   = 1
	ALOOPER_EVENT_OUTPUT  = 2
	ALOOPER_EVENT_ERROR   = 4
	ALOOPER_EVENT_HANGUP  = 8
	ALOOPER_EVENT_INVALID = 16
)
View Source
const (
	ALOOPER_POLL_WAKE     = -1
	ALOOPER_POLL_CALLBACK = -2
	ALOOPER_POLL_TIMEOUT  = -3
	ALOOPER_POLL_ERROR    = -4
)
View Source
const (
	ALOOPER_PREPARE_ALLOW_NON_CALLBACKS = 1
)

Variables

This section is empty.

Functions

func ALooper_acquire

func ALooper_acquire(looper *ALooper)

func ALooper_addFd

func ALooper_addFd(looper *ALooper, fd int32, ident int32, events int32, callback ALooper_callbackFunc, data unsafe.Pointer) int32

func ALooper_callbackFuncE9F631A5

func ALooper_callbackFuncE9F631A5(cfd C.int, cevents C.int, cdata unsafe.Pointer) C.int

func ALooper_pollOnce

func ALooper_pollOnce(timeoutMillis int32, outFd *int32, outEvents *int32, outData *unsafe.Pointer) int32

func ALooper_release

func ALooper_release(looper *ALooper)

func ALooper_removeFd

func ALooper_removeFd(looper *ALooper, fd int32) int32

func ALooper_wake

func ALooper_wake(looper *ALooper)

Types

type ALooper

type ALooper C.ALooper

func ALooper_forThread

func ALooper_forThread() *ALooper

func ALooper_prepare

func ALooper_prepare(opts int32) *ALooper

type ALooper_callbackFunc

type ALooper_callbackFunc func(fd int32, events int32, data unsafe.Pointer) int32

func NewALooper_callbackFuncRef

func NewALooper_callbackFuncRef(ref unsafe.Pointer) *ALooper_callbackFunc

func (ALooper_callbackFunc) PassRef

func (x ALooper_callbackFunc) PassRef() (ref *C.ALooper_callbackFunc, allocs *CgoAllocMap)

func (ALooper_callbackFunc) PassValue

func (x ALooper_callbackFunc) PassValue() (ref C.ALooper_callbackFunc, allocs *CgoAllocMap)

type CgoAllocMap

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

CgoAllocMap stores pointers to C allocated memory for future reference.

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 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