using System; using System.Collections.Generic; namespace RGB.NET.Core { /// /// /// /// /// Represents a generic RGB-device. /// public interface IRGBDevice : IEnumerable, IBindable, IDisposable { #region Properties /// /// Gets generic information about the . /// IRGBDeviceInfo DeviceInfo { get; } /// /// Gets or sets the location of the . /// Point Location { get; set; } /// /// Gets a copy of the of the whole . /// Size Size { get; } /// /// Gets or sets the of the . /// DeviceUpdateMode UpdateMode { get; set; } #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 given physical location. /// /// The to get the location from. /// The at the given or null if no location is found. Led this[Point location] { get; } /// /// Gets a list of inside the given . /// /// The to check. /// The minimal percentage overlay a must have with the to be taken into the list. /// 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. /// Only physically syncs the colors to the device if is set to true. /// /// Specifies whether the colors should be synced to the device or not. /// Specifies whether all (including clean ones) should be updated. void Update(bool sync = true, bool flushLeds = false); /// /// Synchronizes the internal state of the device to the real (physical) state. /// This isn't supported by all devices! Check to see if it's supported or not. /// void SyncBack(); /// /// Adds the given to the device. /// This will override existing of the same type. /// /// The to add. /// The generic typeof of the to add. void AddSpecialDevicePart(T specialDevicePart) where T : class, IRGBDeviceSpecialPart; /// /// Gets the requested if available on this . /// /// The generic type of the requested . /// The requested or null if not available in this . T GetSpecialDevicePart() where T : class, IRGBDeviceSpecialPart; #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; } } }