diff options
author | Emmanuel Hansen <emmausssss@gmail.com> | 2024-03-12 00:21:39 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-11 21:21:39 -0300 |
commit | 8354434a37abe28e587a3f515b1e2009d1b4e8c2 (patch) | |
tree | 1a4b414bed5bff60b1e39987c4d5fd7cd7a6b0a9 /src/Ryujinx/UI/Helpers/Win32NativeInterop.cs | |
parent | 5a900f38c52269ee1282695e5e62a05269d0a478 (diff) |
Passthrough mouse for win32 (#6450)1.1.1224
* passthrough mouse for win32
* remove unused enums
Diffstat (limited to 'src/Ryujinx/UI/Helpers/Win32NativeInterop.cs')
-rw-r--r-- | src/Ryujinx/UI/Helpers/Win32NativeInterop.cs | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/src/Ryujinx/UI/Helpers/Win32NativeInterop.cs b/src/Ryujinx/UI/Helpers/Win32NativeInterop.cs index 4834df80..fce2d518 100644 --- a/src/Ryujinx/UI/Helpers/Win32NativeInterop.cs +++ b/src/Ryujinx/UI/Helpers/Win32NativeInterop.cs @@ -8,6 +8,8 @@ namespace Ryujinx.Ava.UI.Helpers [SupportedOSPlatform("windows")] internal partial class Win32NativeInterop { + internal const int GWLP_WNDPROC = -4; + [Flags] public enum ClassStyles : uint { @@ -29,22 +31,7 @@ namespace Ryujinx.Ava.UI.Helpers [SuppressMessage("Design", "CA1069: Enums values should not be duplicated")] public enum WindowsMessages : uint { - Mousemove = 0x0200, - Lbuttondown = 0x0201, - Lbuttonup = 0x0202, - Lbuttondblclk = 0x0203, - Rbuttondown = 0x0204, - Rbuttonup = 0x0205, - Rbuttondblclk = 0x0206, - Mbuttondown = 0x0207, - Mbuttonup = 0x0208, - Mbuttondblclk = 0x0209, - Mousewheel = 0x020A, - Xbuttondown = 0x020B, - Xbuttonup = 0x020C, - Xbuttondblclk = 0x020D, - Mousehwheel = 0x020E, - Mouselast = 0x020E, + NcHitTest = 0x0084, } [UnmanagedFunctionPointer(CallingConvention.Winapi)] @@ -121,5 +108,11 @@ namespace Ryujinx.Ava.UI.Helpers IntPtr hMenu, IntPtr hInstance, IntPtr lpParam); + + [LibraryImport("user32.dll", SetLastError = true)] + public static partial IntPtr SetWindowLongPtrW(IntPtr hWnd, int nIndex, IntPtr value); + + [LibraryImport("user32.dll", SetLastError = true)] + public static partial IntPtr SetWindowLongW(IntPtr hWnd, int nIndex, int value); } } |