The Battle for Wesnoth  1.19.7+dev
Namespaces | Functions
desktop::battery_info Namespace Reference

Namespaces

 apple
 

Functions

bool does_device_have_battery ()
 
double get_battery_percentage ()
 

Function Documentation

◆ does_device_have_battery()

bool desktop::battery_info::does_device_have_battery ( )
Returns
true if the device has a battery, false otherwise.

Definition at line 33 of file battery_info.cpp.

References desktop::battery_info::apple::does_device_have_battery(), dbus::does_device_have_battery(), and windows_battery_info::does_device_have_battery().

Referenced by theme::add_object().

◆ get_battery_percentage()

double desktop::battery_info::get_battery_percentage ( )
Returns
battery charge as a number between 0 and 100.

Definition at line 46 of file battery_info.cpp.

References desktop::battery_info::apple::get_battery_percentage(), dbus::get_battery_percentage(), and windows_battery_info::get_battery_percentage().

Referenced by REPORT_GENERATOR().