thermal

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: 3 Imported by: 0

Documentation

Overview

Package thermal provides Go bindings for Android thermal management.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error int32

Error represents an NDK error code.

func (Error) Error

func (e Error) Error() string

type Manager

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

Manager wraps the NDK AThermalManager handle.

func NewManager

func NewManager() *Manager

NewManager creates a new Manager.

func NewManagerFromPointer

func NewManagerFromPointer(ptr unsafe.Pointer) *Manager

NewManagerFromPointer wraps a raw AThermalManager pointer.

func (*Manager) AThermal_getThermalHeadroom

func (h *Manager) AThermal_getThermalHeadroom(forecastSeconds int32) float32

AThermal_getThermalHeadroom returns the value directly.

func (*Manager) Close

func (h *Manager) Close() error

Close releases the underlying NDK handle.

func (*Manager) CurrentStatus

func (h *Manager) CurrentStatus() ThermalStatus

CurrentStatus returns the value directly.

func (*Manager) Pointer

func (h *Manager) Pointer() unsafe.Pointer

Pointer returns the underlying pointer as unsafe.Pointer.

type ThermalHeadroomThreshold

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

ThermalHeadroomThreshold wraps the NDK AThermalHeadroomThreshold handle.

func NewThermalHeadroomThresholdFromPointer

func NewThermalHeadroomThresholdFromPointer(ptr unsafe.Pointer) *ThermalHeadroomThreshold

NewThermalHeadroomThresholdFromPointer wraps a raw AThermalHeadroomThreshold pointer.

func (*ThermalHeadroomThreshold) Pointer

Pointer returns the underlying pointer as unsafe.Pointer.

type ThermalStatus

type ThermalStatus int32
const (
	StatusError     ThermalStatus = -1
	StatusNone      ThermalStatus = 0
	StatusLight     ThermalStatus = 1
	StatusModerate  ThermalStatus = 2
	StatusSevere    ThermalStatus = 3
	StatusCritical  ThermalStatus = 4
	StatusEmergency ThermalStatus = 5
	StatusShutdown  ThermalStatus = 6
)

func (ThermalStatus) String

func (v ThermalStatus) String() string

Jump to

Keyboard shortcuts

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