Class DeviceProvider
Represents an feature of a certain type provided by a plugin
Implements
Inherited Members
Namespace: Artemis.Core.DeviceProviders
Assembly: Artemis.Core.dll
Syntax
public abstract class DeviceProvider : PluginFeature, IDisposable
Constructors
DeviceProvider()
Declaration
protected DeviceProvider()
Properties
CanDetectLogicalLayout
A boolean indicating whether this device provider detects the logical layout of connected keyboards
Note: GetLogicalLayout(IKeyboard) is only called when this or CanDetectPhysicalLayout is true.
Declaration
public bool CanDetectLogicalLayout { get; protected set; }
Property Value
Type | Description |
---|---|
bool |
CanDetectPhysicalLayout
A boolean indicating whether this device provider detects the physical layout of connected keyboards.
Note: GetLogicalLayout(IKeyboard) is only called when this or CanDetectLogicalLayout is true.
Declaration
public bool CanDetectPhysicalLayout { get; protected set; }
Property Value
Type | Description |
---|---|
bool |
CreateMissingLedsSupported
Gets or sets a boolean indicating whether adding missing LEDs defined in a layout but missing on the device is supported
Note: Defaults to true.
Declaration
public bool CreateMissingLedsSupported { get; protected set; }
Property Value
Type | Description |
---|---|
bool |
RemoveExcessiveLedsSupported
Gets or sets a boolean indicating whether removing excess LEDs present in the device but missing in the layout is supported
Note: Defaults to true.
Declaration
public bool RemoveExcessiveLedsSupported { get; protected set; }
Property Value
Type | Description |
---|---|
bool |
RgbDeviceProvider
The RGB.NET device provider backing this Artemis device provider
Declaration
public abstract IRGBDeviceProvider RgbDeviceProvider { get; }
Property Value
Type | Description |
---|---|
IRGBDeviceProvider |
Methods
GetDeviceLayoutName(ArtemisDevice)
Called when determining which file name to use when loading the layout of the specified
device
.
Declaration
public virtual string GetDeviceLayoutName(ArtemisDevice device)
Parameters
Type | Name | Description |
---|---|---|
ArtemisDevice | device | The device to determine the layout file name for. |
Returns
Type | Description |
---|---|
string | A file name, including an extension |
GetLogicalLayout(IKeyboard)
Called when a specific RGB device's logical and physical layout must be detected
Note: Only called when CanDetectLogicalLayout is true.
Declaration
public virtual string GetLogicalLayout(IKeyboard keyboard)
Parameters
Type | Name | Description |
---|---|---|
IKeyboard | keyboard | The device to detect the layout for, always a keyboard |
Returns
Type | Description |
---|---|
string |
LoadLayout(ArtemisDevice)
Loads a layout for the specified device and wraps it in an ArtemisLayout
Declaration
public virtual ArtemisLayout LoadLayout(ArtemisDevice device)
Parameters
Type | Name | Description |
---|---|---|
ArtemisDevice | device | The device to load the layout for |
Returns
Type | Description |
---|---|
ArtemisLayout | The resulting Artemis layout |
LoadUserLayout(ArtemisDevice)
Loads a layout from the user layout folder for the specified device and wraps it in an ArtemisLayout
Declaration
public virtual ArtemisLayout LoadUserLayout(ArtemisDevice device)
Parameters
Type | Name | Description |
---|---|---|
ArtemisDevice | device | The device to load the layout for |
Returns
Type | Description |
---|---|
ArtemisLayout | The resulting Artemis layout |