mirror of
https://github.com/DarthAffe/RGB.NET.git
synced 2025-12-31 17:53:39 +00:00
Compare commits
No commits in common. "35d61e14969a278c8f9b5f042063c36f6bb8bdf3" and "0edf2fc7d6c62f31343a2f7eff07b7af58d61c2b" have entirely different histories.
35d61e1496
...
0edf2fc7d6
@ -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,3 +58,4 @@ public class DefaultColorBehavior : IColorBehavior
|
|||||||
|
|
||||||
#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,3 +33,4 @@ public interface IColorBehavior
|
|||||||
/// <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,3 +281,4 @@ public readonly struct Color
|
|||||||
|
|
||||||
#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,3 +226,4 @@ public static class HSVColor
|
|||||||
|
|
||||||
#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,3 +209,4 @@ public static class HclColor
|
|||||||
|
|
||||||
#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,3 +225,4 @@ public static class LabColor
|
|||||||
|
|
||||||
#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,3 +293,4 @@ public static class RGBColor
|
|||||||
|
|
||||||
#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,3 +205,4 @@ public static class XYZColor
|
|||||||
|
|
||||||
#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,3 +13,4 @@ public interface IColorCorrection
|
|||||||
/// <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,3 +67,4 @@ public abstract class AbstractDecoratable<T> : AbstractBindable, IDecoratable<T>
|
|||||||
|
|
||||||
#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,3 +59,4 @@ public abstract class AbstractDecorator : AbstractBindable, IDecorator
|
|||||||
|
|
||||||
#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,3 +69,4 @@ public abstract class AbstractUpdateAwareDecorator : AbstractDecorator
|
|||||||
|
|
||||||
#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,3 +14,4 @@ public interface IBrushDecorator : IDecorator
|
|||||||
/// <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,3 +39,4 @@ public interface IDecoratable<T> : IDecoratable
|
|||||||
/// </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,3 +36,4 @@ public interface IDecorator
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|||||||
@ -1,8 +1,9 @@
|
|||||||
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,3 +236,4 @@ public abstract class AbstractRGBDevice<TDeviceInfo> : Placeable, IRGBDevice<TDe
|
|||||||
|
|
||||||
#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,3 +204,4 @@ public abstract class AbstractRGBDeviceProvider : IRGBDeviceProvider
|
|||||||
|
|
||||||
#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,3 +96,4 @@ public interface IRGBDevice<out TDeviceInfo> : IRGBDevice
|
|||||||
/// </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,3 +34,4 @@ public interface IRGBDeviceInfo
|
|||||||
|
|
||||||
#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,3 +55,4 @@ public interface IRGBDeviceProvider : IDisposable
|
|||||||
|
|
||||||
#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,3 +15,4 @@ public enum KeyboardLayoutType
|
|||||||
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,3 +98,4 @@ public enum RGBDeviceType
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
All = ~None
|
All = ~None
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|||||||
@ -1,7 +1,8 @@
|
|||||||
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,7 +1,8 @@
|
|||||||
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,7 +1,8 @@
|
|||||||
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,7 +1,8 @@
|
|||||||
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,7 +1,8 @@
|
|||||||
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,7 +1,8 @@
|
|||||||
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,3 +21,4 @@ public interface IKeyboardDeviceInfo : IRGBDeviceInfo
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
KeyboardLayoutType Layout { get; }
|
KeyboardLayoutType Layout { get; }
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|||||||
@ -1,7 +1,8 @@
|
|||||||
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,7 +1,8 @@
|
|||||||
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,7 +1,8 @@
|
|||||||
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,7 +1,8 @@
|
|||||||
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,7 +1,8 @@
|
|||||||
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,7 +1,8 @@
|
|||||||
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,7 +1,8 @@
|
|||||||
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,7 +1,8 @@
|
|||||||
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,3 +48,4 @@ public class ExceptionEventArgs : EventArgs
|
|||||||
|
|
||||||
#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,3 +64,4 @@ public class SurfaceLayoutChangedEventArgs : EventArgs
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|||||||
@ -1,10 +1,11 @@
|
|||||||
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,3 +48,4 @@ public class UpdatingEventArgs : EventArgs
|
|||||||
|
|
||||||
#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,3 +32,4 @@ public class DeviceProviderException : ApplicationException
|
|||||||
|
|
||||||
#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,3 +22,4 @@ public class RGBDeviceException : ApplicationException
|
|||||||
|
|
||||||
#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,3 +22,4 @@ public class RGBSurfaceException : ApplicationException
|
|||||||
|
|
||||||
#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,3 +30,4 @@ public static class ColorExtensions
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|||||||
@ -1,43 +0,0 @@
|
|||||||
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,3 +108,4 @@ public static class FloatExtensions
|
|||||||
|
|
||||||
#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,3 +41,4 @@ public static class PointExtensions
|
|||||||
|
|
||||||
#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,3 +174,4 @@ public static class RectangleExtensions
|
|||||||
|
|
||||||
#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,3 +82,4 @@ public static class SurfaceExtensions
|
|||||||
|
|
||||||
#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,3 +59,4 @@ public abstract class AbstractLedGroup : AbstractDecoratable<ILedGroupDecorator>
|
|||||||
|
|
||||||
#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,3 +40,4 @@ public interface ILedGroup : IDecoratable<ILedGroupDecorator>, IEnumerable<Led>
|
|||||||
/// </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,3 +55,4 @@ public static class LedGroupExtension
|
|||||||
/// <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,3 +130,4 @@ public class ListLedGroup : AbstractLedGroup
|
|||||||
|
|
||||||
#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,3 +59,4 @@ public static class ConversionHelper
|
|||||||
|
|
||||||
#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,3 +24,4 @@ public static class DeviceHelper
|
|||||||
|
|
||||||
#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,3 +72,4 @@ public static class IdGenerator
|
|||||||
|
|
||||||
#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,3 +173,4 @@ public class Led : Placeable
|
|||||||
|
|
||||||
#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,3 +8338,4 @@ public enum LedId
|
|||||||
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,3 +146,4 @@ public class LedMapping<T> : IEnumerable<(LedId ledId, T mapping)>
|
|||||||
|
|
||||||
#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,3 +59,4 @@ public abstract class AbstractBindable : IBindable
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|||||||
@ -1,10 +1,11 @@
|
|||||||
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,3 +90,4 @@ public interface IPlaceable
|
|||||||
|
|
||||||
#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,3 +259,4 @@ public class Placeable : AbstractBindable, IPlaceable
|
|||||||
|
|
||||||
#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,3 +152,4 @@ public readonly struct Point
|
|||||||
|
|
||||||
#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,3 +239,4 @@ public readonly struct Rectangle
|
|||||||
|
|
||||||
#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,3 +159,4 @@ public readonly struct Rotation
|
|||||||
|
|
||||||
#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,3 +141,4 @@ public readonly struct Scale
|
|||||||
|
|
||||||
#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,3 +23,4 @@ public enum Shape
|
|||||||
/// </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,3 +194,4 @@ public readonly struct Size
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>net6.0;net5.0</TargetFrameworks>
|
<TargetFrameworks>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 @@ public sealed class RGBSurface : AbstractBindable, IDisposable
|
|||||||
/// 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((CustomUpdateDataIndex.FLUSH_LEDS, flushLeds)));
|
public void Update(bool flushLeds = false) => Update(null, new CustomUpdateData(("flushLeds", 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 @@ public sealed class RGBSurface : AbstractBindable, IDisposable
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
bool flushLeds = customData[CustomUpdateDataIndex.FLUSH_LEDS] as bool? ?? false;
|
bool flushLeds = customData["flushLeds"] as bool? ?? false;
|
||||||
bool render = customData[CustomUpdateDataIndex.RENDER] as bool? ?? true;
|
bool render = customData["render"] as bool? ?? true;
|
||||||
bool updateDevices = customData[CustomUpdateDataIndex.UPDATE_DEVICES] as bool? ?? true;
|
bool updateDevices = customData["updateDevices"] as bool? ?? true;
|
||||||
|
|
||||||
lock (UpdateTriggers)
|
lock (UpdateTriggers)
|
||||||
lock (Devices)
|
lock (Devices)
|
||||||
@ -383,3 +383,4 @@ public sealed class RGBSurface : AbstractBindable, IDisposable
|
|||||||
|
|
||||||
#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,3 +106,4 @@ public abstract class AbstractBrush : AbstractDecoratable<IBrushDecorator>, IBru
|
|||||||
|
|
||||||
#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,3 +38,4 @@ public interface IBrush : IDecoratable<IBrushDecorator>
|
|||||||
/// <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,3 +59,4 @@ public class SolidColorBrush : AbstractBrush
|
|||||||
|
|
||||||
#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,3 +44,4 @@ public class TextureBrush : AbstractBrush
|
|||||||
|
|
||||||
#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,3 +17,4 @@ public enum RenderMode
|
|||||||
/// </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,3 +42,4 @@ public readonly struct RenderTarget
|
|||||||
|
|
||||||
#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,3 +10,4 @@ internal class EmptyTexture : ITexture
|
|||||||
|
|
||||||
#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,3 +29,4 @@ public interface ITexture
|
|||||||
/// <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,3 +226,4 @@ public sealed class PixelTexture : PixelTexture<Color>
|
|||||||
|
|
||||||
#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,3 +32,4 @@ public class AverageColorSampler : ISampler<Color>
|
|||||||
|
|
||||||
#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,3 +15,4 @@ public interface ISampler<T>
|
|||||||
/// <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,3 +44,4 @@ public readonly ref struct SamplerInfo<T>
|
|||||||
|
|
||||||
#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,3 +45,4 @@ public abstract class AbstractUpdateTrigger : AbstractBindable, IUpdateTrigger
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|||||||
@ -1,31 +1,7 @@
|
|||||||
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>
|
||||||
@ -72,3 +48,4 @@ public class CustomUpdateData
|
|||||||
|
|
||||||
#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,3 +178,4 @@ public class DeviceUpdateTrigger : AbstractUpdateTrigger, IDeviceUpdateTrigger
|
|||||||
|
|
||||||
#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,3 +10,4 @@ public interface IDeviceUpdateTrigger : IUpdateTrigger
|
|||||||
/// </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,3 +29,4 @@ public interface IUpdateQueue<TIdentifier, TData> : IDisposable
|
|||||||
/// </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,3 +136,4 @@ public abstract class UpdateQueue : UpdateQueue<object, Color>, IUpdateQueue
|
|||||||
|
|
||||||
#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,3 +27,4 @@ public interface IUpdateTrigger : IDisposable
|
|||||||
/// </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,8 +19,6 @@ public sealed class ManualUpdateTrigger : AbstractUpdateTrigger
|
|||||||
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>
|
||||||
@ -73,11 +71,7 @@ public sealed class ManualUpdateTrigger : AbstractUpdateTrigger
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Triggers an update.
|
/// Triggers an update.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void TriggerUpdate(CustomUpdateData? updateData = null)
|
public void TriggerUpdate() => _mutex.Set();
|
||||||
{
|
|
||||||
_customUpdateData = updateData;
|
|
||||||
_mutex.Set();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void UpdateLoop()
|
private void UpdateLoop()
|
||||||
{
|
{
|
||||||
@ -88,7 +82,7 @@ public sealed class ManualUpdateTrigger : AbstractUpdateTrigger
|
|||||||
if (_mutex.WaitOne(100))
|
if (_mutex.WaitOne(100))
|
||||||
{
|
{
|
||||||
long preUpdateTicks = Stopwatch.GetTimestamp();
|
long preUpdateTicks = Stopwatch.GetTimestamp();
|
||||||
OnUpdate(_customUpdateData);
|
OnUpdate();
|
||||||
LastUpdateTime = ((Stopwatch.GetTimestamp() - preUpdateTicks) / 10000.0);
|
LastUpdateTime = ((Stopwatch.GetTimestamp() - preUpdateTicks) / 10000.0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -99,3 +93,4 @@ public sealed class ManualUpdateTrigger : AbstractUpdateTrigger
|
|||||||
|
|
||||||
#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,8 +17,6 @@ public class TimerUpdateTrigger : AbstractUpdateTrigger
|
|||||||
|
|
||||||
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>
|
||||||
@ -64,20 +62,6 @@ public class TimerUpdateTrigger : AbstractUpdateTrigger
|
|||||||
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
|
||||||
@ -134,7 +118,7 @@ public class TimerUpdateTrigger : AbstractUpdateTrigger
|
|||||||
{
|
{
|
||||||
long preUpdateTicks = Stopwatch.GetTimestamp();
|
long preUpdateTicks = Stopwatch.GetTimestamp();
|
||||||
|
|
||||||
OnUpdate(_customUpdateData);
|
OnUpdate();
|
||||||
|
|
||||||
if (UpdateFrequency > 0)
|
if (UpdateFrequency > 0)
|
||||||
{
|
{
|
||||||
@ -156,3 +140,4 @@ public class TimerUpdateTrigger : AbstractUpdateTrigger
|
|||||||
|
|
||||||
#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,3 +92,4 @@ public class AsusDeviceProvider : AbstractRGBDeviceProvider
|
|||||||
|
|
||||||
#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,3 +38,4 @@ public class AsusDramRGBDevice : AsusRGBDevice<AsusRGBDeviceInfo>, IDRAM
|
|||||||
|
|
||||||
#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,3 +22,4 @@ internal enum AsusDeviceType : uint
|
|||||||
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,3 +162,4 @@ public enum AsusLedId : ushort
|
|||||||
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,3 +15,4 @@ public enum AsusLedType
|
|||||||
/// </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,3 +22,4 @@ public abstract class AsusRGBDevice<TDeviceInfo> : AbstractRGBDevice<TDeviceInfo
|
|||||||
|
|
||||||
#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