Package org.sm.smtools.application.util
Class JStatusBar.Kernel32.SYSTEM_POWER_STATUS
java.lang.Object
com.sun.jna.Structure
org.sm.smtools.application.util.JStatusBar.Kernel32.SYSTEM_POWER_STATUS
- Enclosing interface:
- JStatusBar.Kernel32
public static class JStatusBar.Kernel32.SYSTEM_POWER_STATUS
extends com.sun.jna.Structure
Refer to http://msdn2.microsoft.com/en-us/library/aa373232.aspx for more details.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.sun.jna.Structure
com.sun.jna.Structure.ByReference, com.sun.jna.Structure.ByValue, com.sun.jna.Structure.FieldOrder, com.sun.jna.Structure.StructField
-
Field Summary
Modifier and TypeFieldDescriptionbyte
The AC line status.byte
The battery flag.int
The battery full life time.byte
The battery life percentage.int
The battery life time.byte
A reserved flag.Fields inherited from class com.sun.jna.Structure
ALIGN_DEFAULT, ALIGN_GNUC, ALIGN_MSVC, ALIGN_NONE, CALCULATE_SIZE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
Returns the percentage of full battery charge remaining.int
Returns the number of seconds of battery life remaining.boolean
Returns the charging status.boolean
Returns the AC power status.Methods inherited from class com.sun.jna.Structure
allocateMemory, allocateMemory, autoAllocate, autoRead, autoRead, autoWrite, autoWrite, cacheTypeInfo, calculateSize, clear, createFieldsOrder, createFieldsOrder, createFieldsOrder, createFieldsOrder, dataEquals, dataEquals, ensureAllocated, equals, fieldOffset, getAutoRead, getAutoWrite, getFieldList, getFields, getNativeAlignment, getNativeSize, getNativeSize, getPointer, getStringEncoding, getStructAlignment, hashCode, newInstance, newInstance, read, readField, readField, setAlignType, setAutoRead, setAutoSynch, setAutoWrite, setStringEncoding, size, sortFields, toArray, toArray, toString, toString, useMemory, useMemory, write, writeField, writeField, writeField
-
Field Details
-
ACLineStatus
public byte ACLineStatusThe AC line status. -
BatteryFlag
public byte BatteryFlagThe battery flag. -
BatteryLifePercent
public byte BatteryLifePercentThe battery life percentage. -
Reserved1
public byte Reserved1A reserved flag. -
BatteryLifeTime
public int BatteryLifeTimeThe battery life time. -
BatteryFullLifeTime
public int BatteryFullLifeTimeThe battery full life time.
-
-
Constructor Details
-
SYSTEM_POWER_STATUS
public SYSTEM_POWER_STATUS()
-
-
Method Details
-
getFieldOrder
- Overrides:
getFieldOrder
in classcom.sun.jna.Structure
-
isOnACPower
public boolean isOnACPower()Returns the AC power status.- Returns:
- the AC power status
-
isCharging
public boolean isCharging()Returns the charging status.- Returns:
- the charging status
-
getBatteryLifePercent
public int getBatteryLifePercent()Returns the percentage of full battery charge remaining.- Returns:
- the percentage of full battery charge remaining.
-
getBatteryLifeTime
public int getBatteryLifeTime()Returns the number of seconds of battery life remaining.- Returns:
- the number of seconds of battery life remaining
-