| | | 1 | | using System; |
| | | 2 | | using System.Collections.Generic; |
| | | 3 | | using System.Threading.Tasks; |
| | | 4 | | using SwitchBlade.Contracts; |
| | | 5 | | |
| | | 6 | | namespace SwitchBlade.Services |
| | | 7 | | { |
| | | 8 | | /// <summary> |
| | | 9 | | /// Coordinates parallel execution of window providers and manages the master window list. |
| | | 10 | | /// </summary> |
| | | 11 | | public interface IWindowOrchestrationService : IDiagnosticsProvider |
| | | 12 | | { |
| | | 13 | | /// <summary> |
| | | 14 | | /// Event raised when the window list has been updated. |
| | | 15 | | /// </summary> |
| | | 16 | | event EventHandler<WindowListUpdatedEventArgs>? WindowListUpdated; |
| | | 17 | | |
| | | 18 | | /// <summary> |
| | | 19 | | /// Refreshes windows from all enabled providers in parallel. |
| | | 20 | | /// </summary> |
| | | 21 | | /// <param name="disabledPlugins">Set of disabled plugin names.</param> |
| | | 22 | | Task RefreshAsync(IEnumerable<string> disabledPlugins); |
| | | 23 | | |
| | | 24 | | /// <summary> |
| | | 25 | | /// Gets the current master list of all windows. |
| | | 26 | | /// </summary> |
| | | 27 | | IReadOnlyList<WindowItem> AllWindows { get; } |
| | | 28 | | } |
| | | 29 | | |
| | | 30 | | /// <summary> |
| | | 31 | | /// Event args for window list updates. |
| | | 32 | | /// </summary> |
| | 105 | 33 | | public class WindowListUpdatedEventArgs(IWindowProvider provider, bool isStructuralChange) : EventArgs |
| | | 34 | | { |
| | 106 | 35 | | public IWindowProvider Provider { get; } = provider; |
| | 106 | 36 | | public bool IsStructuralChange { get; } = isStructuralChange; |
| | | 37 | | } |
| | | 38 | | } |