mirror of
https://github.com/DarthAffe/RGB.NET.git
synced 2025-12-13 10:08:31 +00:00
Compare commits
35 Commits
0edf2fc7d6
...
35d61e1496
| Author | SHA1 | Date | |
|---|---|---|---|
| 35d61e1496 | |||
| 02c4be2fa4 | |||
| bf7b80d85e | |||
| f6102bcf43 | |||
| eccf27f359 | |||
| bee329ff4f | |||
| 4afa46f25d | |||
| 9a5fe75b60 | |||
| dc34535cea | |||
| 71981a5cf3 | |||
| f69560224d | |||
| 30624035f1 | |||
| a0c6ccebea | |||
| 07fde6e31b | |||
|
|
2b64773c47 | ||
| edc4094e21 | |||
|
|
8280b99f0c | ||
|
|
fb9c98269f | ||
|
|
7b52e9e3ee | ||
|
|
39e3a1d11b | ||
| 11c31d07df | |||
| f4522f7bdc | |||
| 293343a7ed | |||
|
|
02843705a8 | ||
|
|
4b6c341185 | ||
| afb68f1277 | |||
|
|
a04018fef1 | ||
|
|
4074b015ef | ||
|
|
e06857e236 | ||
|
|
412dc9785c | ||
|
|
21b2f774c4 | ||
|
|
ecf880d297 | ||
|
|
e73fb45503 | ||
|
|
06f46811f4 | ||
|
|
7520147ff8 |
@ -1,7 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents the default-behavior for the work with colors.
|
/// Represents the default-behavior for the work with colors.
|
||||||
@ -58,4 +58,3 @@ namespace RGB.NET.Core
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a behavior of a color for base operations.
|
/// Represents a behavior of a color for base operations.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -33,4 +33,3 @@
|
|||||||
/// <param name="blendColor">The <see cref="Color"/> to blend.</param>
|
/// <param name="blendColor">The <see cref="Color"/> to blend.</param>
|
||||||
Color Blend(in Color baseColor, in Color blendColor);
|
Color Blend(in Color baseColor, in Color blendColor);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -5,8 +5,8 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
|
||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents an ARGB (alpha, red, green, blue) color.
|
/// Represents an ARGB (alpha, red, green, blue) color.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -281,4 +281,3 @@ namespace RGB.NET.Core
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -2,8 +2,8 @@
|
|||||||
// ReSharper disable UnusedMember.Global
|
// ReSharper disable UnusedMember.Global
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Contains helper-methods and extension for the <see cref="Color"/>-type to work in the HSV color space.
|
/// Contains helper-methods and extension for the <see cref="Color"/>-type to work in the HSV color space.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -226,4 +226,3 @@ namespace RGB.NET.Core
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -2,8 +2,8 @@
|
|||||||
// ReSharper disable UnusedMember.Global
|
// ReSharper disable UnusedMember.Global
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Contains helper-methods and extension for the <see cref="Color"/>-type to work in the Hcl color space.
|
/// Contains helper-methods and extension for the <see cref="Color"/>-type to work in the Hcl color space.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -209,4 +209,3 @@ namespace RGB.NET.Core
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -2,8 +2,8 @@
|
|||||||
// ReSharper disable UnusedMember.Global
|
// ReSharper disable UnusedMember.Global
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Contains helper-methods and extension for the <see cref="Color"/>-type to work in the Lab color space.
|
/// Contains helper-methods and extension for the <see cref="Color"/>-type to work in the Lab color space.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -225,4 +225,3 @@ namespace RGB.NET.Core
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -2,8 +2,8 @@
|
|||||||
// ReSharper disable UnusedMember.Global
|
// ReSharper disable UnusedMember.Global
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Contains helper-methods and extension for the <see cref="Color"/>-type to work in the RGB color space.
|
/// Contains helper-methods and extension for the <see cref="Color"/>-type to work in the RGB color space.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -293,4 +293,3 @@ namespace RGB.NET.Core
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -2,8 +2,8 @@
|
|||||||
// ReSharper disable UnusedMember.Global
|
// ReSharper disable UnusedMember.Global
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Contains helper-methods and extension for the <see cref="Color"/>-type to work in the XYZ color space.
|
/// Contains helper-methods and extension for the <see cref="Color"/>-type to work in the XYZ color space.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -205,4 +205,3 @@ namespace RGB.NET.Core
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
// ReSharper disable UnusedMember.Global
|
// ReSharper disable UnusedMember.Global
|
||||||
|
|
||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a generic color-correction.
|
/// Represents a generic color-correction.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -13,4 +13,3 @@ namespace RGB.NET.Core
|
|||||||
/// <param name="color">The <see cref="Color"/> to correct.</param>
|
/// <param name="color">The <see cref="Color"/> to correct.</param>
|
||||||
void ApplyTo(ref Color color);
|
void ApplyTo(ref Color color);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -2,8 +2,8 @@
|
|||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <inheritdoc cref="AbstractBindable" />
|
/// <inheritdoc cref="AbstractBindable" />
|
||||||
/// <inheritdoc cref="IDecoratable{T}" />
|
/// <inheritdoc cref="IDecoratable{T}" />
|
||||||
public abstract class AbstractDecoratable<T> : AbstractBindable, IDecoratable<T>
|
public abstract class AbstractDecoratable<T> : AbstractBindable, IDecoratable<T>
|
||||||
@ -67,4 +67,3 @@ namespace RGB.NET.Core
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -2,8 +2,8 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <inheritdoc cref="AbstractBindable" />
|
/// <inheritdoc cref="AbstractBindable" />
|
||||||
/// <inheritdoc cref="IDecorator" />
|
/// <inheritdoc cref="IDecorator" />
|
||||||
public abstract class AbstractDecorator : AbstractBindable, IDecorator
|
public abstract class AbstractDecorator : AbstractBindable, IDecorator
|
||||||
@ -59,4 +59,3 @@ namespace RGB.NET.Core
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a basic decorator which is aware of the <see cref="E:RGB.NET.Core.RGBSurface.Updating" /> event.
|
/// Represents a basic decorator which is aware of the <see cref="E:RGB.NET.Core.RGBSurface.Updating" /> event.
|
||||||
@ -69,4 +69,3 @@
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a <see cref="T:RGB.NET.Core.IDecorator" /> decorating a <see cref="T:RGB.NET.Core.IBrush" />.
|
/// Represents a <see cref="T:RGB.NET.Core.IDecorator" /> decorating a <see cref="T:RGB.NET.Core.IBrush" />.
|
||||||
@ -14,4 +14,3 @@
|
|||||||
/// <param name="color">The <see cref="Color"/> to be modified.</param>
|
/// <param name="color">The <see cref="Color"/> to be modified.</param>
|
||||||
void ManipulateColor(in Rectangle rectangle, in RenderTarget renderTarget, ref Color color);
|
void ManipulateColor(in Rectangle rectangle, in RenderTarget renderTarget, ref Color color);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
|
|
||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a basic decoratable.
|
/// Represents a basic decoratable.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -39,4 +39,3 @@ namespace RGB.NET.Core
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
void RemoveAllDecorators();
|
void RemoveAllDecorators();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a basic decorator.
|
/// Represents a basic decorator.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -36,4 +36,3 @@
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -1,9 +1,8 @@
|
|||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a basic decorator decorating a <see cref="T:RGB.NET.Core.ILedGroup" />.
|
/// Represents a basic decorator decorating a <see cref="T:RGB.NET.Core.ILedGroup" />.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface ILedGroupDecorator : IDecorator
|
public interface ILedGroupDecorator : IDecorator
|
||||||
{ }
|
{ }
|
||||||
}
|
|
||||||
|
|||||||
@ -6,8 +6,8 @@ using System.Collections;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <inheritdoc cref="AbstractBindable" />
|
/// <inheritdoc cref="AbstractBindable" />
|
||||||
/// <inheritdoc cref="IRGBDevice{TDeviceInfo}" />
|
/// <inheritdoc cref="IRGBDevice{TDeviceInfo}" />
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -236,4 +236,3 @@ namespace RGB.NET.Core
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -3,8 +3,8 @@ using System.Collections.Generic;
|
|||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents the abstract base implementation for a <see cref="IRGBDeviceProvider"/>.
|
/// Represents the abstract base implementation for a <see cref="IRGBDeviceProvider"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -204,4 +204,3 @@ namespace RGB.NET.Core
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <inheritdoc cref="IEnumerable{Led}" />
|
/// <inheritdoc cref="IEnumerable{Led}" />
|
||||||
/// <inheritdoc cref="IBindable" />
|
/// <inheritdoc cref="IBindable" />
|
||||||
/// <inheritdoc cref="IDisposable" />
|
/// <inheritdoc cref="IDisposable" />
|
||||||
@ -96,4 +96,3 @@ namespace RGB.NET.Core
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
new TDeviceInfo DeviceInfo { get; }
|
new TDeviceInfo DeviceInfo { get; }
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a generic information for a <see cref="IRGBDevice"/>
|
/// Represents a generic information for a <see cref="IRGBDevice"/>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -34,4 +34,3 @@
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -3,8 +3,8 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a generic device provider.
|
/// Represents a generic device provider.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -55,4 +55,3 @@ namespace RGB.NET.Core
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
// ReSharper disable InconsistentNaming
|
// ReSharper disable InconsistentNaming
|
||||||
#pragma warning disable 1591
|
#pragma warning disable 1591
|
||||||
|
|
||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Contains a list of available keyboard layout types.
|
/// Contains a list of available keyboard layout types.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -15,4 +15,3 @@ namespace RGB.NET.Core
|
|||||||
ABNT = 4,
|
ABNT = 4,
|
||||||
KS = 5
|
KS = 5
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Contains a list of different types of device.
|
/// Contains a list of different types of device.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -98,4 +98,3 @@ namespace RGB.NET.Core
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
All = ~None
|
All = ~None
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -1,8 +1,7 @@
|
|||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a cooler-device
|
/// Represents a cooler-device
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface ICooler : IRGBDevice
|
public interface ICooler : IRGBDevice
|
||||||
{ }
|
{ }
|
||||||
}
|
|
||||||
|
|||||||
@ -1,8 +1,7 @@
|
|||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a DRAM-device
|
/// Represents a DRAM-device
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IDRAM : IRGBDevice
|
public interface IDRAM : IRGBDevice
|
||||||
{ }
|
{ }
|
||||||
}
|
|
||||||
|
|||||||
@ -1,8 +1,7 @@
|
|||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// represents a fan-device
|
/// represents a fan-device
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IFan : IRGBDevice
|
public interface IFan : IRGBDevice
|
||||||
{ }
|
{ }
|
||||||
}
|
|
||||||
|
|||||||
@ -1,8 +1,7 @@
|
|||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a graphics-card-device
|
/// Represents a graphics-card-device
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IGraphicsCard : IRGBDevice
|
public interface IGraphicsCard : IRGBDevice
|
||||||
{ }
|
{ }
|
||||||
}
|
|
||||||
|
|||||||
@ -1,8 +1,7 @@
|
|||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a headset-device
|
/// Represents a headset-device
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IHeadset : IRGBDevice
|
public interface IHeadset : IRGBDevice
|
||||||
{ }
|
{ }
|
||||||
}
|
|
||||||
|
|||||||
@ -1,8 +1,7 @@
|
|||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a headset-stand-device
|
/// Represents a headset-stand-device
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IHeadsetStand : IRGBDevice
|
public interface IHeadsetStand : IRGBDevice
|
||||||
{ }
|
{ }
|
||||||
}
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a generic keyboard-device.
|
/// Represents a generic keyboard-device.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -21,4 +21,3 @@
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
KeyboardLayoutType Layout { get; }
|
KeyboardLayoutType Layout { get; }
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -1,8 +1,7 @@
|
|||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a keypad-device
|
/// Represents a keypad-device
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IKeypad : IRGBDevice
|
public interface IKeypad : IRGBDevice
|
||||||
{ }
|
{ }
|
||||||
}
|
|
||||||
|
|||||||
@ -1,8 +1,7 @@
|
|||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a led-matrix-device
|
/// Represents a led-matrix-device
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface ILedMatrix : IRGBDevice
|
public interface ILedMatrix : IRGBDevice
|
||||||
{ }
|
{ }
|
||||||
}
|
|
||||||
|
|||||||
@ -1,8 +1,7 @@
|
|||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a led-stripe-device
|
/// Represents a led-stripe-device
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface ILedStripe : IRGBDevice
|
public interface ILedStripe : IRGBDevice
|
||||||
{ }
|
{ }
|
||||||
}
|
|
||||||
|
|||||||
@ -1,8 +1,7 @@
|
|||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a mainboard-device
|
/// Represents a mainboard-device
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IMainboard : IRGBDevice
|
public interface IMainboard : IRGBDevice
|
||||||
{ }
|
{ }
|
||||||
}
|
|
||||||
|
|||||||
@ -1,8 +1,7 @@
|
|||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a mouse-device
|
/// Represents a mouse-device
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IMouse : IRGBDevice
|
public interface IMouse : IRGBDevice
|
||||||
{ }
|
{ }
|
||||||
}
|
|
||||||
|
|||||||
@ -1,8 +1,7 @@
|
|||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a mousepad-device
|
/// Represents a mousepad-device
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IMousepad : IRGBDevice
|
public interface IMousepad : IRGBDevice
|
||||||
{ }
|
{ }
|
||||||
}
|
|
||||||
|
|||||||
@ -1,8 +1,7 @@
|
|||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a speaker-device
|
/// Represents a speaker-device
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface ISpeaker : IRGBDevice
|
public interface ISpeaker : IRGBDevice
|
||||||
{ }
|
{ }
|
||||||
}
|
|
||||||
|
|||||||
@ -1,8 +1,7 @@
|
|||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a device with unkown or not specified type.
|
/// Represents a device with unkown or not specified type.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IUnknownDevice : IRGBDevice
|
public interface IUnknownDevice : IRGBDevice
|
||||||
{ }
|
{ }
|
||||||
}
|
|
||||||
|
|||||||
@ -3,8 +3,8 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents the information supplied with an <see cref="E:RGB.NET.Core.RGBSurface.Exception" />-event.
|
/// Represents the information supplied with an <see cref="E:RGB.NET.Core.RGBSurface.Exception" />-event.
|
||||||
@ -48,4 +48,3 @@ namespace RGB.NET.Core
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -3,8 +3,8 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents the information supplied with an <see cref="E:RGB.NET.Core.RGBSurface.SurfaceLayoutChanged" />-event.
|
/// Represents the information supplied with an <see cref="E:RGB.NET.Core.RGBSurface.SurfaceLayoutChanged" />-event.
|
||||||
@ -64,4 +64,3 @@ namespace RGB.NET.Core
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -1,11 +1,10 @@
|
|||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents the information supplied with an <see cref="E:RGB.NET.Core.RGBSurface.Updated" />-event.
|
/// Represents the information supplied with an <see cref="E:RGB.NET.Core.RGBSurface.Updated" />-event.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class UpdatedEventArgs : EventArgs
|
public class UpdatedEventArgs : EventArgs
|
||||||
{ }
|
{ }
|
||||||
}
|
|
||||||
|
|||||||
@ -3,8 +3,8 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents the information supplied with an <see cref="E:RGB.NET.Core.RGBSurface.Updating" />-event.
|
/// Represents the information supplied with an <see cref="E:RGB.NET.Core.RGBSurface.Updating" />-event.
|
||||||
@ -48,4 +48,3 @@ namespace RGB.NET.Core
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents an exception thrown by a <see cref="IRGBDeviceProvider" />.
|
/// Represents an exception thrown by a <see cref="IRGBDeviceProvider" />.
|
||||||
@ -32,4 +32,3 @@ namespace RGB.NET.Core
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents an exception thrown by an <see cref="T:RGB.NET.Core.IRGBDevice" />.
|
/// Represents an exception thrown by an <see cref="T:RGB.NET.Core.IRGBDevice" />.
|
||||||
@ -22,4 +22,3 @@ namespace RGB.NET.Core
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents an exception thrown by an <see cref="T:RGB.NET.Core.RGBSurface" />.
|
/// Represents an exception thrown by an <see cref="T:RGB.NET.Core.RGBSurface" />.
|
||||||
@ -22,4 +22,3 @@ namespace RGB.NET.Core
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Offers some extensions and helper-methods for <see cref="Color"/> related things.
|
/// Offers some extensions and helper-methods for <see cref="Color"/> related things.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -30,4 +30,3 @@ namespace RGB.NET.Core
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
43
RGB.NET.Core/Extensions/CustomUpdateDataExtension.cs
Normal file
43
RGB.NET.Core/Extensions/CustomUpdateDataExtension.cs
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
namespace RGB.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Offers some extensions for easier use of <see cref="CustomUpdateData"/>.
|
||||||
|
/// </summary>
|
||||||
|
public static class CustomUpdateDataExtension
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Sets the <see cref="CustomUpdateDataIndex.FLUSH_LEDS"/>-Parameter to the given value.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="customUpdateData">The update-data to modify.</param>
|
||||||
|
/// <param name="value">The value to set.</param>
|
||||||
|
/// <returns>The modified update-data.</returns>
|
||||||
|
public static CustomUpdateData FlushLeds(this CustomUpdateData customUpdateData, bool value = true)
|
||||||
|
{
|
||||||
|
customUpdateData[CustomUpdateDataIndex.FLUSH_LEDS] = value;
|
||||||
|
return customUpdateData;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Sets the <see cref="CustomUpdateDataIndex.RENDER"/>-Parameter to the given value.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="customUpdateData">The update-data to modify.</param>
|
||||||
|
/// <param name="value">The value to set.</param>
|
||||||
|
/// <returns>The modified update-data.</returns>
|
||||||
|
public static CustomUpdateData Render(this CustomUpdateData customUpdateData, bool value = true)
|
||||||
|
{
|
||||||
|
customUpdateData[CustomUpdateDataIndex.RENDER] = value;
|
||||||
|
return customUpdateData;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Sets the <see cref="CustomUpdateDataIndex.UPDATE_DEVICES"/>-Parameter to the given value.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="customUpdateData">The update-data to modify.</param>
|
||||||
|
/// <param name="value">The value to set.</param>
|
||||||
|
/// <returns>The modified update-data.</returns>
|
||||||
|
public static CustomUpdateData UpdateDevices(this CustomUpdateData customUpdateData, bool value = true)
|
||||||
|
{
|
||||||
|
customUpdateData[CustomUpdateDataIndex.UPDATE_DEVICES] = value;
|
||||||
|
return customUpdateData;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,8 +1,8 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Runtime.CompilerServices;
|
using System.Runtime.CompilerServices;
|
||||||
|
|
||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Offers some extensions and helper-methods for the work with floats.
|
/// Offers some extensions and helper-methods for the work with floats.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -108,4 +108,3 @@ namespace RGB.NET.Core
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Offers some extensions and helper-methods for <see cref="Point"/> related things.
|
/// Offers some extensions and helper-methods for <see cref="Point"/> related things.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -41,4 +41,3 @@ namespace RGB.NET.Core
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Offers some extensions and helper-methods for the work with rectangles.
|
/// Offers some extensions and helper-methods for the work with rectangles.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -174,4 +174,3 @@ namespace RGB.NET.Core
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -3,8 +3,8 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Offers some extensions and helper-methods for the work with the surface.
|
/// Offers some extensions and helper-methods for the work with the surface.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -82,4 +82,3 @@ namespace RGB.NET.Core
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <inheritdoc cref="AbstractDecoratable{T}" />
|
/// <inheritdoc cref="AbstractDecoratable{T}" />
|
||||||
/// <inheritdoc cref="ILedGroup" />
|
/// <inheritdoc cref="ILedGroup" />
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -59,4 +59,3 @@ namespace RGB.NET.Core
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -3,8 +3,8 @@
|
|||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a generic ledgroup.
|
/// Represents a generic ledgroup.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -40,4 +40,3 @@ namespace RGB.NET.Core
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
void OnDetach();
|
void OnDetach();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
// ReSharper disable MemberCanBePrivate.Global
|
// ReSharper disable MemberCanBePrivate.Global
|
||||||
// ReSharper disable UnusedMember.Global
|
// ReSharper disable UnusedMember.Global
|
||||||
|
|
||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Offers some extensions and helper-methods for <see cref="ILedGroup"/> related things.
|
/// Offers some extensions and helper-methods for <see cref="ILedGroup"/> related things.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -55,4 +55,3 @@ namespace RGB.NET.Core
|
|||||||
/// <returns><c>true</c> if the <see cref="ILedGroup"/> could be detached; otherwise, <c>false</c>.</returns>
|
/// <returns><c>true</c> if the <see cref="ILedGroup"/> could be detached; otherwise, <c>false</c>.</returns>
|
||||||
public static bool Detach(this ILedGroup ledGroup) => ledGroup.Surface?.Detach(ledGroup) ?? false;
|
public static bool Detach(this ILedGroup ledGroup) => ledGroup.Surface?.Detach(ledGroup) ?? false;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -3,8 +3,8 @@
|
|||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a ledgroup containing arbitrary <see cref="T:RGB.NET.Core.Led" />.
|
/// Represents a ledgroup containing arbitrary <see cref="T:RGB.NET.Core.Led" />.
|
||||||
@ -130,4 +130,3 @@ namespace RGB.NET.Core
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Contains helper methods for converting things.
|
/// Contains helper methods for converting things.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -59,4 +59,3 @@ namespace RGB.NET.Core
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Runtime.CompilerServices;
|
using System.Runtime.CompilerServices;
|
||||||
|
|
||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Offsers some helper methods for device creation.
|
/// Offsers some helper methods for device creation.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -24,4 +24,3 @@ namespace RGB.NET.Core
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -2,8 +2,8 @@
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Runtime.CompilerServices;
|
using System.Runtime.CompilerServices;
|
||||||
|
|
||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Offers some methods to create and handle unique identifiers.
|
/// Offers some methods to create and handle unique identifiers.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -72,4 +72,3 @@ namespace RGB.NET.Core
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
|
||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a single LED of a RGB-device.
|
/// Represents a single LED of a RGB-device.
|
||||||
@ -173,4 +173,3 @@ namespace RGB.NET.Core
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -3,8 +3,8 @@
|
|||||||
|
|
||||||
#pragma warning disable 1591 // Missing XML comment for publicly visible type or member
|
#pragma warning disable 1591 // Missing XML comment for publicly visible type or member
|
||||||
|
|
||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
public enum LedId
|
public enum LedId
|
||||||
{
|
{
|
||||||
Invalid = -1,
|
Invalid = -1,
|
||||||
@ -8338,4 +8338,3 @@ namespace RGB.NET.Core
|
|||||||
Unknown1023 = 0x0FF003FF,
|
Unknown1023 = 0x0FF003FF,
|
||||||
Unknown1024 = 0x0FF00400,
|
Unknown1024 = 0x0FF00400,
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -2,8 +2,8 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a mapping from <see cref="LedId"/> to a custom identifier.
|
/// Represents a mapping from <see cref="LedId"/> to a custom identifier.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -146,4 +146,3 @@ namespace RGB.NET.Core
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Runtime.CompilerServices;
|
using System.Runtime.CompilerServices;
|
||||||
|
|
||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a basic bindable class which notifies when a property value changes.
|
/// Represents a basic bindable class which notifies when a property value changes.
|
||||||
@ -59,4 +59,3 @@ namespace RGB.NET.Core
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -1,11 +1,10 @@
|
|||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
|
|
||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a basic bindable class which notifies when a property value changes.
|
/// Represents a basic bindable class which notifies when a property value changes.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IBindable : INotifyPropertyChanged
|
public interface IBindable : INotifyPropertyChanged
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a generic placeable element.
|
/// Represents a generic placeable element.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -90,4 +90,3 @@ namespace RGB.NET.Core
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a placeable element.
|
/// Represents a placeable element.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -259,4 +259,3 @@ namespace RGB.NET.Core
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -4,8 +4,8 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
|
||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a point consisting of a X- and a Y-position.
|
/// Represents a point consisting of a X- and a Y-position.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -152,4 +152,3 @@ namespace RGB.NET.Core
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -6,8 +6,8 @@ using System.Collections.Generic;
|
|||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a rectangle defined by it's position and it's size.
|
/// Represents a rectangle defined by it's position and it's size.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -239,4 +239,3 @@ namespace RGB.NET.Core
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -4,8 +4,8 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
|
||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents an angular rotation.
|
/// Represents an angular rotation.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -159,4 +159,3 @@ namespace RGB.NET.Core
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -3,8 +3,8 @@
|
|||||||
|
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
|
||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a scaling.
|
/// Represents a scaling.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -141,4 +141,3 @@ namespace RGB.NET.Core
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Contains a list of different shapes used to define the layout of a LED.
|
/// Contains a list of different shapes used to define the layout of a LED.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -23,4 +23,3 @@ namespace RGB.NET.Core
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
Circle = 2,
|
Circle = 2,
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -3,8 +3,8 @@
|
|||||||
|
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
|
||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a size consisting of a width and a height.
|
/// Represents a size consisting of a width and a height.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -194,4 +194,3 @@ namespace RGB.NET.Core
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>net5.0</TargetFrameworks>
|
<TargetFrameworks>net6.0;net5.0</TargetFrameworks>
|
||||||
<LangVersion>latest</LangVersion>
|
<LangVersion>latest</LangVersion>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
|
|
||||||
|
|||||||
@ -7,8 +7,8 @@ using System.Collections.ObjectModel;
|
|||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <inheritdoc cref="AbstractBindable" />
|
/// <inheritdoc cref="AbstractBindable" />
|
||||||
/// <inheritdoc cref="IDisposable" />
|
/// <inheritdoc cref="IDisposable" />
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -132,7 +132,7 @@ namespace RGB.NET.Core
|
|||||||
/// Perform a full update for all devices. Updates only dirty <see cref="Led"/> by default, or all <see cref="Led"/>, if flushLeds is set to true.
|
/// Perform a full update for all devices. Updates only dirty <see cref="Led"/> by default, or all <see cref="Led"/>, if flushLeds is set to true.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="flushLeds">Specifies whether all <see cref="Led"/>, (including clean ones) should be updated.</param>
|
/// <param name="flushLeds">Specifies whether all <see cref="Led"/>, (including clean ones) should be updated.</param>
|
||||||
public void Update(bool flushLeds = false) => Update(null, new CustomUpdateData(("flushLeds", flushLeds)));
|
public void Update(bool flushLeds = false) => Update(null, new CustomUpdateData((CustomUpdateDataIndex.FLUSH_LEDS, flushLeds)));
|
||||||
|
|
||||||
private void Update(object? updateTrigger, CustomUpdateData customData) => Update(updateTrigger as IUpdateTrigger, customData);
|
private void Update(object? updateTrigger, CustomUpdateData customData) => Update(updateTrigger as IUpdateTrigger, customData);
|
||||||
|
|
||||||
@ -140,9 +140,9 @@ namespace RGB.NET.Core
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
bool flushLeds = customData["flushLeds"] as bool? ?? false;
|
bool flushLeds = customData[CustomUpdateDataIndex.FLUSH_LEDS] as bool? ?? false;
|
||||||
bool render = customData["render"] as bool? ?? true;
|
bool render = customData[CustomUpdateDataIndex.RENDER] as bool? ?? true;
|
||||||
bool updateDevices = customData["updateDevices"] as bool? ?? true;
|
bool updateDevices = customData[CustomUpdateDataIndex.UPDATE_DEVICES] as bool? ?? true;
|
||||||
|
|
||||||
lock (UpdateTriggers)
|
lock (UpdateTriggers)
|
||||||
lock (Devices)
|
lock (Devices)
|
||||||
@ -383,4 +383,3 @@ namespace RGB.NET.Core
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -4,8 +4,8 @@
|
|||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <inheritdoc cref="AbstractDecoratable{T}" />
|
/// <inheritdoc cref="AbstractDecoratable{T}" />
|
||||||
/// <inheritdoc cref="IBrush" />
|
/// <inheritdoc cref="IBrush" />
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -106,4 +106,3 @@ namespace RGB.NET.Core
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -4,8 +4,8 @@
|
|||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a basic brush.
|
/// Represents a basic brush.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -38,4 +38,3 @@ namespace RGB.NET.Core
|
|||||||
/// <param name="renderTargets">The <see cref="RenderTarget"/> (keys/points) of which the color should be calculated.</param>
|
/// <param name="renderTargets">The <see cref="RenderTarget"/> (keys/points) of which the color should be calculated.</param>
|
||||||
IEnumerable<(RenderTarget renderTarget, Color color)> Render(Rectangle rectangle, IEnumerable<RenderTarget> renderTargets);
|
IEnumerable<(RenderTarget renderTarget, Color color)> Render(Rectangle rectangle, IEnumerable<RenderTarget> renderTargets);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@ -1,8 +1,8 @@
|
|||||||
// ReSharper disable MemberCanBePrivate.Global
|
// ReSharper disable MemberCanBePrivate.Global
|
||||||
// ReSharper disable AutoPropertyCanBeMadeGetOnly.Global
|
// ReSharper disable AutoPropertyCanBeMadeGetOnly.Global
|
||||||
|
|
||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a brush drawing only a single color.
|
/// Represents a brush drawing only a single color.
|
||||||
@ -59,4 +59,3 @@ namespace RGB.NET.Core
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@ -1,5 +1,5 @@
|
|||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a brush drawing a texture.
|
/// Represents a brush drawing a texture.
|
||||||
@ -44,4 +44,3 @@
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
// ReSharper disable UnusedMember.Global
|
// ReSharper disable UnusedMember.Global
|
||||||
|
|
||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Contains a list of all brush calculation modes.
|
/// Contains a list of all brush calculation modes.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -17,4 +17,3 @@ namespace RGB.NET.Core
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
Absolute
|
Absolute
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
// ReSharper disable MemberCanBePrivate.Global
|
// ReSharper disable MemberCanBePrivate.Global
|
||||||
// ReSharper disable UnusedAutoPropertyAccessor.Global
|
// ReSharper disable UnusedAutoPropertyAccessor.Global
|
||||||
|
|
||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a single target of a brush render.
|
/// Represents a single target of a brush render.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -42,4 +42,3 @@ namespace RGB.NET.Core
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
internal class EmptyTexture : ITexture
|
internal class EmptyTexture : ITexture
|
||||||
{
|
{
|
||||||
#region Properties & Fields
|
#region Properties & Fields
|
||||||
@ -10,4 +10,3 @@
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a generic texture.
|
/// Represents a generic texture.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -29,4 +29,3 @@
|
|||||||
/// <returns>The sampled color.</returns>
|
/// <returns>The sampled color.</returns>
|
||||||
Color this[in Rectangle rectangle] { get; }
|
Color this[in Rectangle rectangle] { get; }
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -2,8 +2,8 @@
|
|||||||
using System.Buffers;
|
using System.Buffers;
|
||||||
using System.Runtime.CompilerServices;
|
using System.Runtime.CompilerServices;
|
||||||
|
|
||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a texture made of pixels (like a common image).
|
/// Represents a texture made of pixels (like a common image).
|
||||||
@ -226,4 +226,3 @@ namespace RGB.NET.Core
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a sampled that averages multiple color to a single color.
|
/// Represents a sampled that averages multiple color to a single color.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -32,4 +32,3 @@ namespace RGB.NET.Core
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a generic sampler to combine multipel data entries to a single one.
|
/// Represents a generic sampler to combine multipel data entries to a single one.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -15,4 +15,3 @@ namespace RGB.NET.Core
|
|||||||
/// <param name="pixelData">The buffer used to write the resulting pixel to.</param>
|
/// <param name="pixelData">The buffer used to write the resulting pixel to.</param>
|
||||||
void Sample(in SamplerInfo<T> info, in Span<T> pixelData);
|
void Sample(in SamplerInfo<T> info, in Span<T> pixelData);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents the information used to sample data.
|
/// Represents the information used to sample data.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -44,4 +44,3 @@ namespace RGB.NET.Core
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a generic update trigger.
|
/// Represents a generic update trigger.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -45,4 +45,3 @@ namespace RGB.NET.Core
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -1,7 +1,31 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Represents an index used to identify data in the <see cref="CustomUpdateData"/>.
|
||||||
|
/// </summary>
|
||||||
|
public static class CustomUpdateDataIndex
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Checked by the <see cref="RGBSurface"/> to see if all LEDs needs to be flushed even if they aren't changed in this update.
|
||||||
|
/// default: false
|
||||||
|
/// </summary>
|
||||||
|
public const string FLUSH_LEDS = "flushLeds";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Checked by the <see cref="RGBSurface"/> to see if the surface should be rendered in this update.
|
||||||
|
/// default: true
|
||||||
|
/// </summary>
|
||||||
|
public const string RENDER = "render";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Checked by the <see cref="RGBSurface"/> to see if devies should be updated after rendering.
|
||||||
|
/// default: true
|
||||||
|
/// </summary>
|
||||||
|
public const string UPDATE_DEVICES = "updateDevices";
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a set of custom data, each indexed by a string-key.
|
/// Represents a set of custom data, each indexed by a string-key.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -48,4 +72,3 @@ namespace RGB.NET.Core
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -4,8 +4,8 @@ using System.Diagnostics;
|
|||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents an update-trigger used to update devices with a maximum update-rate.
|
/// Represents an update-trigger used to update devices with a maximum update-rate.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -178,4 +178,3 @@ namespace RGB.NET.Core
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents an update trigger used to trigger device-updates.
|
/// Represents an update trigger used to trigger device-updates.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -10,4 +10,3 @@
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
void TriggerHasData();
|
void TriggerHasData();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a generic update queue.
|
/// Represents a generic update queue.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -29,4 +29,3 @@ namespace RGB.NET.Core
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IUpdateQueue : IUpdateQueue<object, Color>
|
public interface IUpdateQueue : IUpdateQueue<object, Color>
|
||||||
{ }
|
{ }
|
||||||
}
|
|
||||||
|
|||||||
@ -3,8 +3,8 @@ using System.Buffers;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a generic update queue.
|
/// Represents a generic update queue.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -136,4 +136,3 @@ namespace RGB.NET.Core
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a trigger causing an update.
|
/// Represents a trigger causing an update.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -27,4 +27,3 @@ namespace RGB.NET.Core
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
void Start();
|
void Start();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -4,8 +4,8 @@ using System.Diagnostics;
|
|||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents an update trigger that is manully triggered by calling <see cref="TriggerUpdate"/>.
|
/// Represents an update trigger that is manully triggered by calling <see cref="TriggerUpdate"/>.
|
||||||
@ -19,6 +19,8 @@ namespace RGB.NET.Core
|
|||||||
private CancellationTokenSource? UpdateTokenSource { get; set; }
|
private CancellationTokenSource? UpdateTokenSource { get; set; }
|
||||||
private CancellationToken UpdateToken { get; set; }
|
private CancellationToken UpdateToken { get; set; }
|
||||||
|
|
||||||
|
private CustomUpdateData? _customUpdateData;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the time it took the last update-loop cycle to run.
|
/// Gets the time it took the last update-loop cycle to run.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -71,7 +73,11 @@ namespace RGB.NET.Core
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Triggers an update.
|
/// Triggers an update.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void TriggerUpdate() => _mutex.Set();
|
public void TriggerUpdate(CustomUpdateData? updateData = null)
|
||||||
|
{
|
||||||
|
_customUpdateData = updateData;
|
||||||
|
_mutex.Set();
|
||||||
|
}
|
||||||
|
|
||||||
private void UpdateLoop()
|
private void UpdateLoop()
|
||||||
{
|
{
|
||||||
@ -82,7 +88,7 @@ namespace RGB.NET.Core
|
|||||||
if (_mutex.WaitOne(100))
|
if (_mutex.WaitOne(100))
|
||||||
{
|
{
|
||||||
long preUpdateTicks = Stopwatch.GetTimestamp();
|
long preUpdateTicks = Stopwatch.GetTimestamp();
|
||||||
OnUpdate();
|
OnUpdate(_customUpdateData);
|
||||||
LastUpdateTime = ((Stopwatch.GetTimestamp() - preUpdateTicks) / 10000.0);
|
LastUpdateTime = ((Stopwatch.GetTimestamp() - preUpdateTicks) / 10000.0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -93,4 +99,3 @@ namespace RGB.NET.Core
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -5,8 +5,8 @@ using System.Diagnostics;
|
|||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace RGB.NET.Core
|
namespace RGB.NET.Core;
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents an update trigger that triggers in a set interval.
|
/// Represents an update trigger that triggers in a set interval.
|
||||||
@ -17,6 +17,8 @@ namespace RGB.NET.Core
|
|||||||
|
|
||||||
private readonly object _lock = new();
|
private readonly object _lock = new();
|
||||||
|
|
||||||
|
private readonly CustomUpdateData? _customUpdateData;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the update loop of this trigger.
|
/// Gets or sets the update loop of this trigger.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -62,6 +64,20 @@ namespace RGB.NET.Core
|
|||||||
Start();
|
Start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="TimerUpdateTrigger"/> class.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="customUpdateData">The update-data passed on each update triggered.</param>
|
||||||
|
/// <param name="autostart">A value indicating if the trigger should automatically <see cref="Start"/> right after construction.</param>
|
||||||
|
public TimerUpdateTrigger(CustomUpdateData? customUpdateData, bool autostart = true)
|
||||||
|
{
|
||||||
|
this._customUpdateData = customUpdateData;
|
||||||
|
|
||||||
|
if (autostart)
|
||||||
|
// ReSharper disable once VirtualMemberCallInConstructor - HACK DarthAffe 01.06.2021: I've no idea how to correctly handle that case, for now just disable it
|
||||||
|
Start();
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Methods
|
#region Methods
|
||||||
@ -118,7 +134,7 @@ namespace RGB.NET.Core
|
|||||||
{
|
{
|
||||||
long preUpdateTicks = Stopwatch.GetTimestamp();
|
long preUpdateTicks = Stopwatch.GetTimestamp();
|
||||||
|
|
||||||
OnUpdate();
|
OnUpdate(_customUpdateData);
|
||||||
|
|
||||||
if (UpdateFrequency > 0)
|
if (UpdateFrequency > 0)
|
||||||
{
|
{
|
||||||
@ -140,4 +156,3 @@ namespace RGB.NET.Core
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -6,8 +6,8 @@ using System.Collections.Generic;
|
|||||||
using AuraServiceLib;
|
using AuraServiceLib;
|
||||||
using RGB.NET.Core;
|
using RGB.NET.Core;
|
||||||
|
|
||||||
namespace RGB.NET.Devices.Asus
|
namespace RGB.NET.Devices.Asus;
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a device provider responsible for Cooler Master devices.
|
/// Represents a device provider responsible for Cooler Master devices.
|
||||||
@ -92,4 +92,3 @@ namespace RGB.NET.Devices.Asus
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
using RGB.NET.Core;
|
using RGB.NET.Core;
|
||||||
|
|
||||||
namespace RGB.NET.Devices.Asus
|
namespace RGB.NET.Devices.Asus;
|
||||||
{
|
|
||||||
/// <inheritdoc cref="AsusRGBDevice{TDeviceInfo}" />
|
/// <inheritdoc cref="AsusRGBDevice{TDeviceInfo}" />
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a Asus dram.
|
/// Represents a Asus dram.
|
||||||
@ -38,4 +38,3 @@ namespace RGB.NET.Devices.Asus
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
// ReSharper disable InconsistentNaming
|
// ReSharper disable InconsistentNaming
|
||||||
|
|
||||||
namespace RGB.NET.Devices.Asus
|
namespace RGB.NET.Devices.Asus;
|
||||||
{
|
|
||||||
internal enum AsusDeviceType : uint
|
internal enum AsusDeviceType : uint
|
||||||
{
|
{
|
||||||
ALL = 0,
|
ALL = 0,
|
||||||
@ -22,4 +22,3 @@ namespace RGB.NET.Devices.Asus
|
|||||||
CHASSIS_RGB = 0xB0000,
|
CHASSIS_RGB = 0xB0000,
|
||||||
PROJECTOR_RGB = 0xC0000
|
PROJECTOR_RGB = 0xC0000
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
// ReSharper disable InconsistentNaming
|
// ReSharper disable InconsistentNaming
|
||||||
#pragma warning disable 1591
|
#pragma warning disable 1591
|
||||||
|
|
||||||
namespace RGB.NET.Devices.Asus
|
namespace RGB.NET.Devices.Asus;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a LED ID as they are known by the ASUS SDK
|
/// Represents a LED ID as they are known by the ASUS SDK
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -162,4 +162,3 @@ namespace RGB.NET.Devices.Asus
|
|||||||
UNDOCUMENTED_5 = 0x103,
|
UNDOCUMENTED_5 = 0x103,
|
||||||
UNDOCUMENTED_6 = 0xDA, // Bottom-left function on the ROG Zephyrus Duo 15
|
UNDOCUMENTED_6 = 0xDA, // Bottom-left function on the ROG Zephyrus Duo 15
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
namespace RGB.NET.Devices.Asus
|
namespace RGB.NET.Devices.Asus;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a type of ASUS LED as known by the ASUS SDK
|
/// Represents a type of ASUS LED as known by the ASUS SDK
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -15,4 +15,3 @@
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
Light
|
Light
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
using RGB.NET.Core;
|
using RGB.NET.Core;
|
||||||
|
|
||||||
namespace RGB.NET.Devices.Asus
|
namespace RGB.NET.Devices.Asus;
|
||||||
{
|
|
||||||
/// <inheritdoc cref="AbstractRGBDevice{TDeviceInfo}" />
|
/// <inheritdoc cref="AbstractRGBDevice{TDeviceInfo}" />
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a generic Asus-device. (keyboard, mouse, headset, mousepad).
|
/// Represents a generic Asus-device. (keyboard, mouse, headset, mousepad).
|
||||||
@ -22,4 +22,3 @@ namespace RGB.NET.Devices.Asus
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user