![]() |
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 | |
namespace | BatteryMonitor |
Root namespace. | |
Defines | |
#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. | |
void | BatteryMonitor::cleanUp (HWND hwnd) |
Memory and handler cleanups, taskbar icon removal. | |
void | BatteryMonitor::errOut (void) |
Error output. | |
BATTERY_INFORMATION | BatteryMonitor::getBatteryInformation () |
retrieves battery informations from the system. | |
void | BatteryMonitor::initDevice (void) |
Retrieves the path of the battery device. | |
HWND | BatteryMonitor::setupWindow (int nCmdShow) |
Shows the main window. | |
long | BatteryMonitor::setupWindowClass (void) |
registers the window class stored in classname. | |
void | BatteryMonitor::showBatteryInfo (HWND hwnd) |
Shows a balloon tip with battery information. | |
void | BatteryMonitor::shutdown (void) |
Tries to shut down the computer. | |
LRESULT CALLBACK | BatteryMonitor::wndProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) |
The window procedure. | |
Variables | |
double | BatteryMonitor::battery = 0 |
Battery charge. | |
long | BatteryMonitor::batterylifetime = -1 |
Remaining battery lifetime in seconds. | |
HBRUSH | BatteryMonitor::blue |
Blue brush. | |
char | BatteryMonitor::classname [14] |
Name of registered window class. | |
char * | BatteryMonitor::devicepath |
Path to battery device. | |
HBRUSH | BatteryMonitor::green |
Green brush. | |
HINSTANCE | BatteryMonitor::instance |
Application instance. | |
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. | |
HBRUSH | BatteryMonitor::yellow |
Yellow brush. |