Skip to content
This repository was archived by the owner on Jul 26, 2023. It is now read-only.

Commit 22a8ca3

Browse files
committed
Add MagSetFullscreenTransform
1 parent 771c147 commit 22a8ca3

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

src/Magnification/Magnification.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,5 +106,19 @@ public static extern unsafe bool MagSetFullscreenColorEffect(
106106
[return: MarshalAs(UnmanagedType.Bool)]
107107
public static extern unsafe bool MagGetFullscreenColorEffect(
108108
[Friendly(FriendlyFlags.Out)] MAGCOLOREFFECT* pEffect);
109+
110+
/// <summary>
111+
/// Changes the magnification settings for the full-screen magnifier.
112+
/// </summary>
113+
/// <param name="magLevel">The new magnification factor for the full-screen magnifier. The minimum value of this parameter is 1.0, and the maximum value is 4096.0. If this value is 1.0, the screen content is not magnified and no offsets are applied. </param>
114+
/// <param name="xOffset">The new x-coordinate offset, in pixels, for the upper-left corner of the magnified view. The offset is relative to the upper-left corner of the primary monitor, in unmagnified coordinates. The minimum value of the parameter is -262144, and the maximum value is 262144.</param>
115+
/// <param name="yOffset">The new y-coordinate offset, in pixels, for the upper-left corner of the magnified view. The offset is relative to the upper-left corner of the primary monitor, in unmagnified coordinates. The minimum value of the parameter is -262144, and the maximum value is 262144.</param>
116+
/// <returns>Returns TRUE if successful, or FALSE otherwise.</returns>
117+
[DllImport(nameof(Magnification))]
118+
[return: MarshalAs(UnmanagedType.Bool)]
119+
public static extern bool MagSetFullscreenTransform(
120+
 float magLevel,
121+
 int xOffset,
122+
 int yOffset);
109123
}
110124
}

src/Magnification/PublicAPI.Unshipped.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ static extern PInvoke.Magnification.MagGetWindowTransform(System.IntPtr hwnd, PI
2121
static extern PInvoke.Magnification.MagInitialize() -> bool
2222
static extern PInvoke.Magnification.MagSetColorEffect(System.IntPtr hwnd, PInvoke.Magnification.MAGCOLOREFFECT* pEffect) -> bool
2323
static extern PInvoke.Magnification.MagSetFullscreenColorEffect(PInvoke.Magnification.MAGCOLOREFFECT* pEffect) -> bool
24+
static extern PInvoke.Magnification.MagSetFullscreenTransform(float magLevel, int xOffset, int yOffset) -> bool
2425
static extern PInvoke.Magnification.MagSetWindowTransform(System.IntPtr hwnd, PInvoke.Magnification.MAGTRANSFORM* pTransform) -> bool
2526
static extern PInvoke.Magnification.MagShowSystemCursor(bool fShowCursor) -> bool
2627
static extern PInvoke.Magnification.MagUninitialize() -> bool

0 commit comments

Comments
 (0)