Legacy Documentclose button

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

Apple Developer Connection
Advanced Search
Member Login Log In | Not a Member? Contact ADC

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

Get information on Apple products.
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Copyright © 2007 Apple Inc.
All rights reserved. | Terms of use | Privacy Notice