mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-15 03:07:56 +01:00
* [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)
44 lines
1.1 KiB
C#
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;
|
|
}
|
|
}
|