using System; using System.Collections.Generic; using RGB.NET.Core; namespace Artemis.Core.Services { /// /// A service that allows you to manage the and its contents /// public interface IRgbService : IArtemisService, IDisposable { /// /// Gets a read-only collection containing all enabled devices /// IReadOnlyCollection EnabledDevices { get; } /// /// Gets a read-only collection containing all registered devices /// IReadOnlyCollection Devices { get; } /// /// Gets a dictionary containing all s on the surface with their corresponding RGB.NET /// as key /// IReadOnlyDictionary LedMap { get; } /// /// Gets or sets the RGB surface rendering is performed on /// RGBSurface Surface { get; set; } /// /// Gets the bitmap brush used to convert the rendered frame to LED-colors /// BitmapBrush? BitmapBrush { get; } /// /// Gets the update trigger that drives the render loop /// TimerUpdateTrigger UpdateTrigger { get; } /// /// Gets or sets whether rendering should be paused /// bool IsRenderPaused { get; set; } /// /// Adds the given device provider to the /// /// void AddDeviceProvider(IRGBDeviceProvider deviceProvider); /// /// Removes the given device provider from the /// /// void RemoveDeviceProvider(IRGBDeviceProvider deviceProvider); /// /// Applies auto-arranging logic to the surface /// void AutoArrangeDevices(); /// /// Applies the best available layout for the given /// /// The device to apply the best available layout to /// The layout that was applied to the device ArtemisLayout ApplyBestDeviceLayout(ArtemisDevice device); /// /// Apples the provided to the provided /// /// /// void ApplyDeviceLayout(ArtemisDevice device, ArtemisLayout layout); /// /// Attempts to retrieve the that corresponds the provided RGB.NET /// /// /// /// The RGB.NET to find the corresponding /// for /// /// If found, the corresponding ; otherwise . ArtemisDevice? GetDevice(IRGBDevice rgbDevice); /// /// Attempts to retrieve the that corresponds the provided RGB.NET /// /// The RGB.NET to find the corresponding for /// If found, the corresponding ; otherwise . ArtemisLed? GetLed(Led led); /// /// Saves the configuration of the provided device to persistent storage /// /// void SaveDevice(ArtemisDevice artemisDevice); /// /// Saves the configuration of all current devices to persistent storage /// void SaveDevices(); void EnableDevice(ArtemisDevice device); void DisableDevice(ArtemisDevice device); /// /// Occurs when a single device was added /// event EventHandler DeviceAdded; /// /// Occurs when a single device was removed /// event EventHandler DeviceRemoved; /// /// Occurs when the surface has had modifications to its LED collection /// event EventHandler LedsChanged; } }