[PT Run] Refactoring: combined all NativeMethods.cs files for plugins… (#15807)

* [PT Run] Refactoring: combined all NativeMethods.cs files for plugins into Wox.Plugin/Common/Win32/

* Fixed spell check

* [PT Run] Changed NativeMethods.Helpers to Win32Helpers (seperate class) to not conflict with Microsoft.PowerToys.Settings.UI.Library.Helpers

* [PT Run] Renamed Constants.cs to ConstantsAndStructs.cs and moved all of them from NativeMethods.cs

* [PT Run] Merged ConstantsAndStructs.cs into NativeMethods.cs and renamed Constants to Win32Constants to avoid conflicting

* [PT Run] Added missing summaries + fixed missed refactored method

* [PT Run] Use using directive instead of alias + updated method call for .Net 6

* [PT Run] Fixed missed using alias + spell check
This commit is contained in:
cyberrex5
2022-02-10 23:44:19 +02:00
committed by GitHub
parent 57a8d505c0
commit 416419ffde
19 changed files with 1198 additions and 1182 deletions

View File

@@ -4,6 +4,7 @@
// Code forked from Betsegaw Tadele's https://github.com/betsegaw/windowwalker/
using System;
using Wox.Plugin.Common.Win32;
namespace Microsoft.Plugin.WindowWalker.Components
{
@@ -18,7 +19,7 @@ namespace Microsoft.Plugin.WindowWalker.Components
/// <param name="hwnd">handle to the window to exclude</param>
public static void SetWindowExclusionFromLivePreview(IntPtr hwnd)
{
int renderPolicy = (int)NativeMethods.DwmNCRenderingPolicy.Enabled;
int renderPolicy = (int)DwmNCRenderingPolicies.Enabled;
_ = NativeMethods.DwmSetWindowAttribute(
hwnd,
@@ -38,7 +39,7 @@ namespace Microsoft.Plugin.WindowWalker.Components
true,
targetWindow,
windowToSpare,
NativeMethods.LivePreviewTrigger.Superbar,
LivePreviewTrigger.Superbar,
IntPtr.Zero);
}
@@ -51,7 +52,7 @@ namespace Microsoft.Plugin.WindowWalker.Components
false,
IntPtr.Zero,
IntPtr.Zero,
NativeMethods.LivePreviewTrigger.AltTab,
LivePreviewTrigger.AltTab,
IntPtr.Zero);
}
}