Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Devices /
Chapter 6 - Power Manager / Power Manager Reference
Data Structures


Battery Information Structure

The GetScaledBatteryInfo function returns information about the battery in a data structure of type BatteryInfo.

typedef struct BatteryInfo {
   unsigned char     flags;            /* misc flags (see below) */
   unsigned char     warningLevel;     /* scaled warning level (0-255) */
   char              reserved;         /* reserved for internal use */
   unsigned char     batteryLevel;     /* scaled battery level (0-255) */
} BatteryInfo;
Bit nameBit numberDescription
batteryInstalled7A battery is installed.
batteryCharging6The battery is charging.
chargerConnectedXThe charger is connected.
The values of the bits in the flags field are as follows:


Previous Book Contents Book Index Next

© Apple Computer, Inc.
3 JUL 1996