thermal

package
v0.0.4 Latest Latest
Warning

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

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

Documentation

Overview

Raw CGo bindings for Android thermal

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AThermal_StatusCallback2A5901BC

func AThermal_StatusCallback2A5901BC(cdata unsafe.Pointer, cstatus C.AThermalStatus)

func AThermal_getThermalHeadroom

func AThermal_getThermalHeadroom(manager *AThermalManager, forecastSeconds int32) float32

func AThermal_getThermalHeadroomThresholds

func AThermal_getThermalHeadroomThresholds(manager *AThermalManager, outThresholds **AThermalHeadroomThreshold, size *uint64) int32

func AThermal_registerThermalStatusListener

func AThermal_registerThermalStatusListener(manager *AThermalManager, callback AThermal_StatusCallback, data unsafe.Pointer) int32

func AThermal_releaseManager

func AThermal_releaseManager(manager *AThermalManager)

func AThermal_unregisterThermalStatusListener

func AThermal_unregisterThermalStatusListener(manager *AThermalManager, callback AThermal_StatusCallback, data unsafe.Pointer) int32

Types

type AThermalHeadroomThreshold

type AThermalHeadroomThreshold C.AThermalHeadroomThreshold

type AThermalManager

type AThermalManager C.AThermalManager

func AThermal_acquireManager

func AThermal_acquireManager() *AThermalManager

type AThermalStatus

type AThermalStatus int32
const (
	ATHERMAL_STATUS_ERROR     AThermalStatus = -1
	ATHERMAL_STATUS_NONE      AThermalStatus = 0
	ATHERMAL_STATUS_LIGHT     AThermalStatus = 1
	ATHERMAL_STATUS_MODERATE  AThermalStatus = 2
	ATHERMAL_STATUS_SEVERE    AThermalStatus = 3
	ATHERMAL_STATUS_CRITICAL  AThermalStatus = 4
	ATHERMAL_STATUS_EMERGENCY AThermalStatus = 5
	ATHERMAL_STATUS_SHUTDOWN  AThermalStatus = 6
)

func AThermal_getCurrentThermalStatus

func AThermal_getCurrentThermalStatus(manager *AThermalManager) AThermalStatus

type AThermal_StatusCallback

type AThermal_StatusCallback func(data unsafe.Pointer, status AThermalStatus)

func NewAThermal_StatusCallbackRef

func NewAThermal_StatusCallbackRef(ref unsafe.Pointer) *AThermal_StatusCallback

func (AThermal_StatusCallback) PassRef

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

func (AThermal_StatusCallback) PassValue

func (x AThermal_StatusCallback) PassValue() (ref C.AThermal_StatusCallback, 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