using System; using System.Collections.Generic; namespace RGB.NET.Core { /// /// /// /// /// Represents a generic RGB-device. /// public interface IRGBDevice : IEnumerable, IPlaceable, IBindable, IDisposable { #region Properties /// /// Gets the surface this device is attached to. /// RGBSurface? Surface { get; internal set; } /// /// Gets generic information about the . /// IRGBDeviceInfo DeviceInfo { get; } /// /// Gets a list of color corrections applied to this device. /// IList ColorCorrections { get; } #endregion #region Indexer /// /// Gets the with the specified . /// /// The of the to get. /// The with the specified or null if no is found. Led? this[LedId ledId] { get; } /// /// Gets the at the specified physical location. /// /// The to get the location from. /// The at the specified or null if no location is found. Led? this[Point location] { get; } /// /// Gets a list of inside the specified . /// /// The to check. /// The minimal percentage overlay a must have with the to be taken into the list. /// A enumerable of leds inside the specified rectangle. IEnumerable this[Rectangle referenceRect, double minOverlayPercentage = 0.5] { get; } #endregion #region Methods /// /// Perform an update for all dirty , or all if flushLeds is set to true. /// /// Specifies whether all (including clean ones) should be updated. void Update(bool flushLeds = false); /// /// Adds a led to the device. /// /// The id of the led. /// The location of the led on the device. /// The size of the led. /// Custom data saved on the led. /// The newly added led or null if a led with this id is already added. Led? AddLed(LedId ledId, in Point location, in Size size, object? customData = null); /// /// Removes the led with the specified id from the device. /// /// The id of the led to remove. /// The removed led or null if there was no led with the specified id. Led? RemoveLed(LedId ledId); #endregion } /// /// /// Represents a generic RGB-device with an known device-info type. /// public interface IRGBDevice : IRGBDevice where TDeviceInfo : IRGBDeviceInfo { /// /// Gets generic information about the . /// new TDeviceInfo DeviceInfo { get; } } }