microsoft/TypeAgent
Publicmirrored fromhttps://github.com/microsoft/TypeAgentAvailable
dotnet/autoShell/Services/IVirtualDesktopService.cs
42lines · modecode
| 1 | // Copyright (c) Microsoft Corporation. |
| 2 | // Licensed under the MIT License. |
| 3 | |
| 4 | using System; |
| 5 | |
| 6 | namespace autoShell.Services; |
| 7 | |
| 8 | /// <summary> |
| 9 | /// Abstracts Windows virtual desktop COM operations for testability. |
| 10 | /// </summary> |
| 11 | internal interface IVirtualDesktopService |
| 12 | { |
| 13 | /// <summary> |
| 14 | /// Creates one or more virtual desktops from a JSON array of names. |
| 15 | /// </summary> |
| 16 | void CreateDesktops(string jsonDesktopNames); |
| 17 | |
| 18 | /// <summary> |
| 19 | /// Moves a window to the specified desktop by index (1-based) or name. |
| 20 | /// </summary> |
| 21 | void MoveWindowToDesktop(IntPtr hWnd, string desktopIdentifier); |
| 22 | |
| 23 | /// <summary> |
| 24 | /// Switches to the next virtual desktop. |
| 25 | /// </summary> |
| 26 | void NextDesktop(); |
| 27 | |
| 28 | /// <summary> |
| 29 | /// Pins a window (by handle) to all desktops. |
| 30 | /// </summary> |
| 31 | void PinWindow(IntPtr hWnd); |
| 32 | |
| 33 | /// <summary> |
| 34 | /// Switches to the previous virtual desktop. |
| 35 | /// </summary> |
| 36 | void PreviousDesktop(); |
| 37 | |
| 38 | /// <summary> |
| 39 | /// Switches to a virtual desktop by index or name. |
| 40 | /// </summary> |
| 41 | void SwitchDesktop(string desktopIdentifier); |
| 42 | } |
| 43 | |