Files
PowerToys/src/modules/MouseUtils/MouseJumpUI/Common/Models/Drawing/ScreenInfo.cs
Michael Clayton 651f2e4bd8 [MouseJump]Refactor code to allow later introduction of customizable appearance (#32838)
* [Mouse Jump] - move code shared with FancyMouse into "Common" folder (#25482)

* [Mouse Jump] - updates to NativeMethods (#25482)

* [Mouse Jump] - added new drawing / layout / style classes (#25482)

* [Mouse Jump] - new style-based preview rendering (actual preview visual style unchanged) (#25482)

* [Mouse Jump] - add words to spell checker (#25482)

* [Mouse Jump] - small tweak to error handling (#25482)

* [Mouse Jump] - fixed failing test (#25482)
2024-06-12 16:30:18 +01:00

44 lines
1.1 KiB
C#

// 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;
using static MouseJumpUI.Common.NativeMethods.Core;
namespace MouseJumpUI.Common.Models.Drawing;
/// <summary>
/// Immutable version of a System.Windows.Forms.Screen object so we don't need to
/// take a dependency on WinForms just for screen info.
/// </summary>
internal sealed class ScreenInfo
{
internal ScreenInfo(HMONITOR handle, bool primary, RectangleInfo displayArea, RectangleInfo workingArea)
{
this.Handle = handle;
this.Primary = primary;
this.DisplayArea = displayArea ?? throw new ArgumentNullException(nameof(displayArea));
this.WorkingArea = workingArea ?? throw new ArgumentNullException(nameof(workingArea));
}
public int Handle
{
get;
}
public bool Primary
{
get;
}
public RectangleInfo DisplayArea
{
get;
}
public RectangleInfo WorkingArea
{
get;
}
}