![]() |
BatteryMonitor
|
public funktions and variables More...
#include <initguid.h>#include <stdlib.h>#include <windows.h>#include <winuser.h>#include <stdio.h>#include <setupapi.h>#include <ddk/batclass.h>#include "mainres.h"Go to the source code of this file.
Namespaces | |
| BatteryMonitor | |
| Root namespace. | |
Macros | |
| #define | _WIN32_IE 0x600 |
| Sets windows version information for some Apis. | |
| #define | UPDATE_BATTERY 1 |
| Window message for updating battery status. | |
| #define | WINVER 0x0501 |
| Sets windows version information for some Apis. | |
Functions | |
| void | BatteryMonitor::addNotifyIcon (HWND hwnd) |
| Adds an icon to the taskbar. More... | |
| void | BatteryMonitor::cleanUp (HWND hwnd) |
| Memory and handler cleanups, taskbar icon removal. More... | |
| void | BatteryMonitor::errOut (void) |
| Error output. More... | |
| BATTERY_INFORMATION | BatteryMonitor::getBatteryInformation () |
| retrieves battery informations from the system. More... | |
| void | BatteryMonitor::initDevice (void) |
| Retrieves the path of the battery device. More... | |
| HWND | BatteryMonitor::setupWindow (int nCmdShow) |
| Shows the main window. More... | |
| long | BatteryMonitor::setupWindowClass (void) |
| registers the window class stored in classname. More... | |
| void | BatteryMonitor::showBatteryInfo (HWND hwnd) |
| Shows a balloon tip with battery information. | |
| void | BatteryMonitor::shutdown (void) |
| Tries to shut down the computer. More... | |
| LRESULT CALLBACK | BatteryMonitor::wndProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) |
| The window procedure. More... | |
Variables | |
| double | BatteryMonitor::battery =0 |
| Battery charge. More... | |
| long | BatteryMonitor::batterylifetime =-1 |
| Remaining battery lifetime in seconds. More... | |
| HBRUSH | BatteryMonitor::blue |
| Blue brush. | |
| char | BatteryMonitor::classname [14] |
| Name of registered window class. More... | |
| char * | BatteryMonitor::devicepath |
| Path to battery device. More... | |
| HBRUSH | BatteryMonitor::green |
| Green brush. | |
| HINSTANCE | BatteryMonitor::instance |
| Application instance. More... | |
| HBRUSH | BatteryMonitor::red |
| Red brush. | |
| bool | BatteryMonitor::shutdown_enabled =false |
| Indicates, if shutdown was invoked by BatteryMonitor. | |
| UINT | BatteryMonitor::WM_TASKBARCREATED =0 |
| Window message for taskbarcreated-event. More... | |
| HBRUSH | BatteryMonitor::yellow |
| Yellow brush. | |