xtd
1.0.0
Toggle main menu visibility
Loading...
Searching...
No Matches
xtd.forms
include
xtd
forms
power_status.hpp
Go to the documentation of this file.
1
4
#pragma once
5
#include "
../forms_export.hpp
"
6
#include "
battery_charge_status.hpp
"
7
#include "
power_line_status.hpp
"
8
#include <xtd/object>
9
#include <cstdint>
10
12
namespace
xtd
{
14
namespace
forms
{
16
class
system_information
;
18
31
class
forms_export_
power_status :
public
object
{
32
public
:
34
power_status() =
default
;
35
power_status(
const
power_status&) =
default
;
36
power_status& operator =(
const
power_status&) =
default
;
38
40
45
xtd::forms::battery_charge_status
battery_charge_status
() const noexcept;
46
49
int32
battery_full_life_time
() const noexcept;
50
53
float
battery_life_percent
() const noexcept;
54
57
int32
battery_life_remaining
() const noexcept;
58
62
xtd
::
forms
::
power_line_status
power_line_status
() const noexcept;
64
65
private:
66
friend class system_information;
67
power_status(
xtd
::
forms
::
battery_charge_status
battery_charge_status
,
int32
battery_full_life_time
,
float
battery_life_percent
,
int32
battery_life_remaining
,
xtd
::
forms
::
power_line_status
power_line_status
);
68
xtd
::
forms
::
battery_charge_status
battery_charge_status_ =
xtd
::
forms
::
battery_charge_status
::unknown;
69
int32
battery_full_life_time_ = -1;
70
float
battery_life_percent_ = 1.0f;
71
int32
battery_life_remaining_ = -1;
72
xtd
::
forms
::
power_line_status
power_line_status_ =
xtd
::
forms
::
power_line_status
::unknown;
73
};
74
}
75
}
battery_charge_status.hpp
Contains xtd::forms::battery_charge_status enum class.
xtd::forms::power_status::battery_charge_status
xtd::forms::battery_charge_status battery_charge_status() const noexcept
Gets the current battery charge status.
xtd::forms::power_status::battery_full_life_time
int32 battery_full_life_time() const noexcept
Gets the reported full charge lifetime of the primary battery power source in seconds.
xtd::forms::power_status::battery_life_remaining
int32 battery_life_remaining() const noexcept
Gets the approximate number of seconds of battery time remaining.
xtd::forms::power_status::battery_life_percent
float battery_life_percent() const noexcept
Gets the approximate amount of full battery charge remaining.
xtd::forms::power_status::power_line_status
xtd::forms::power_line_status power_line_status() const noexcept
Gets the current system power status.
xtd::forms::system_information
Provides information about the current system environment.
Definition
system_information.hpp:33
xtd::object::object
object()=default
Create a new instance of the ultimate base class object.
forms_export.hpp
Contains forms_export_ keyword.
forms_export_
#define forms_export_
Define shared library export.
Definition
forms_export.hpp:13
xtd::int32
std::int32_t int32
Represents a 32-bit signed integer.
Definition
int32.hpp:25
xtd::forms::battery_charge_status
battery_charge_status
Defines identifiers that indicate the current battery charge level or charging state information....
Definition
battery_charge_status.hpp:23
xtd::forms
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition
texts.hpp:219
xtd
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition
abstract_object.hpp:8
power_line_status.hpp
Contains xtd::forms::power_line_status enum class.
Generated on
for xtd by
Gammasoft
. All rights reserved.