mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-11 11:26:27 +00:00
Core - Add device provider suspension system
This commit is contained in:
1 parent
db6fb33c96
commit
3022c7df65
8 files changed
+192
-14
No files matched your search
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using RGB.NET.Core;
|
||||
|
||||
namespace Artemis.Core.DeviceProviders;
|
||||
@@ -15,7 +16,7 @@ public abstract class DeviceProvider : PluginFeature
|
||||
/// The RGB.NET device provider backing this Artemis device provider
|
||||
/// </summary>
|
||||
public abstract IRGBDeviceProvider RgbDeviceProvider { get; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A boolean indicating whether this device provider detects the physical layout of connected keyboards.
|
||||
/// <para>
|
||||
@@ -48,6 +49,11 @@ public abstract class DeviceProvider : PluginFeature
|
||||
/// </summary>
|
||||
public bool RemoveExcessiveLedsSupported { get; protected set; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a boolean indicating whether suspending the device provider is supported
|
||||
/// </summary>
|
||||
public bool SuspendSupported { get; protected set; }
|
||||
|
||||
/// <summary>
|
||||
/// Loads a layout for the specified device and wraps it in an <see cref="ArtemisLayout" />
|
||||
/// </summary>
|
||||
@@ -109,4 +115,12 @@ public abstract class DeviceProvider : PluginFeature
|
||||
|
||||
return fileName + ".xml";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called when the device provider is being suspended, like when the system is going to sleep.
|
||||
/// Note: This will be called while the plugin is disabled.
|
||||
/// </summary>
|
||||
public virtual void Suspend()
|
||||
{
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user