forked from MonoGame/MonoGame
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Trying to hook into windows procedure messages for pointer (touch).
- Loading branch information
James
committed
Apr 8, 2013
1 parent
878e9fd
commit 7d8352d
Showing
3 changed files
with
48 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Runtime.InteropServices; | ||
using System.Text; | ||
using System.Windows.Forms; | ||
|
||
|
||
|
||
namespace Microsoft.Xna.Framework.Windows | ||
{ | ||
[StructLayout(LayoutKind.Sequential)] | ||
public struct WinProc | ||
{ | ||
public const int WM_POINTERUP = 0x0247; | ||
public const int WM_POINTERDOWN = 0x0246; | ||
public const int WM_POINTERUPDATE = 0x0245; | ||
|
||
public IntPtr handle; | ||
public uint msg; | ||
public IntPtr wParam; | ||
public IntPtr lParam; | ||
} | ||
|
||
internal class WinForm : Form | ||
{ | ||
[System.Security.Permissions.PermissionSet(System.Security.Permissions.SecurityAction.Demand, Name = "FullTrust")] | ||
protected override void WndProc(ref Message m) | ||
{ | ||
switch (m.Msg) | ||
{ | ||
case WinProc.WM_POINTERUP: | ||
break; | ||
case WinProc.WM_POINTERDOWN: | ||
break; | ||
case WinProc.WM_POINTERUPDATE: | ||
break; | ||
} | ||
|
||
base.WndProc(ref m); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters