2022-03-07 12:45:29 +01:00
// Copyright (c) Microsoft Corporation
// The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System ;
namespace Wox.Plugin.Common.VirtualDesktop.Helper
{
2022-09-16 11:54:58 +03:00
/// <summary>
/// Class that represents a Virtual Desktop
/// </summary>
/// <remarks>This class is named VDesktop to make clear it isn't an instance of the original Desktop class from Virtual Desktop Manager.
/// We can't use the original one, because therefore we must access private com interfaces. We aren't allowed to do this, because this is an official Microsoft project.</remarks>
2022-03-07 12:45:29 +01:00
public class VDesktop
{
/// <summary>
/// Gets or sets the guid of the desktop
/// </summary>
public Guid Id
{
get ; set ;
}
/// <summary>
/// Gets or sets the name of the desktop
/// </summary>
public string Name
{
get ; set ;
}
/// <summary>
/// Gets or sets the number (position) of the desktop
/// </summary>
public int Number
{
get ; set ;
}
/// <summary>
/// Gets or sets a value indicating whether the desktop is currently visible to the user
/// </summary>
public bool IsVisible
{
get ; set ;
}
/// <summary>
/// Gets or sets a value indicating whether the desktop guid belongs to the generic "AllDesktops" view.
/// This view hold all windows that are pinned to all desktops.
/// </summary>
public bool IsAllDesktopsView
{
get ; set ;
}
/// <summary>
/// Gets or sets a value indicating the position of a desktop in the list of all desktops
/// </summary>
public VirtualDesktopPosition Position
{
get ; set ;
}
/// <summary>
/// Gets an empty instance of <see cref="VDesktop"/>
/// </summary>
public static VDesktop Empty
{
get
{
return new VDesktop ( )
{
Id = Guid . Empty ,
Name = string . Empty ,
Number = 0 ,
2022-03-14 16:40:27 +01:00
IsVisible = true , // Setting this always to true to simulate a visible desktop
2022-03-07 12:45:29 +01:00
IsAllDesktopsView = false ,
Position = VirtualDesktopPosition . NotApplicable ,
} ;
}
}
}
}