osu/osu.Game/Utils/BatteryInfo.cs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

25 lines
821 B
C#
Raw Permalink Normal View History

// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
namespace osu.Game.Utils
{
/// <summary>
/// Provides access to the system's power status.
/// </summary>
public abstract class BatteryInfo
{
/// <summary>
2022-07-30 12:26:19 +00:00
/// The charge level of the battery, from <c>0</c> to <c>1</c>, or <c>null</c> if a battery isn't present.
/// </summary>
2022-07-30 12:26:19 +00:00
public abstract double? ChargeLevel { get; }
2022-07-30 12:26:19 +00:00
/// <summary>
/// Whether the current power source is the battery.
/// </summary>
/// <remarks>
/// This is <c>false</c> when the device is charging or doesn't have a battery.
/// </remarks>
public abstract bool OnBattery { get; }
}
}