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 Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager wraps the NDK AThermalManager handle.
func NewManagerFromPointer ¶
NewManagerFromPointer wraps a raw AThermalManager pointer.
func NewManagerFromUintPtr ¶ added in v0.0.4
NewManagerFromUintPtr wraps a uintptr as a Manager. The caller must ensure ptr points to a valid AThermalManager.
func (*Manager) AThermal_getThermalHeadroom ¶
AThermal_getThermalHeadroom returns the value directly.
func (*Manager) CurrentStatus ¶
func (h *Manager) CurrentStatus() ThermalStatus
CurrentStatus returns the value directly.
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 NewThermalHeadroomThresholdFromUintPtr ¶ added in v0.0.4
func NewThermalHeadroomThresholdFromUintPtr(ptr uintptr) *ThermalHeadroomThreshold
NewThermalHeadroomThresholdFromUintPtr wraps a uintptr as a ThermalHeadroomThreshold. The caller must ensure ptr points to a valid AThermalHeadroomThreshold.
func (*ThermalHeadroomThreshold) Pointer ¶
func (h *ThermalHeadroomThreshold) Pointer() unsafe.Pointer
Pointer returns the underlying pointer as unsafe.Pointer.
func (*ThermalHeadroomThreshold) UintPtr ¶ added in v0.0.4
func (h *ThermalHeadroomThreshold) UintPtr() uintptr
UintPtr returns the underlying pointer as a uintptr. This is useful for interop with gomobile bind, golang.org/x/mobile, gioui.org, and other packages that represent native handles as uintptr.
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