Mouse tracking and mouse capture didn't work well together. Mouse capture was
also buggy in that it could release capture prematurely.
Mouse capture is now counted and tracked better, multiple requests to set
capture will only call SetCapture once. ReleaseCapture will only be called once
the same number of releases have been made as sets.
MW_MOUSELEAVE messages are now ignored if the mouse is captured.
Mouse tracking is renabled when mouse capture is released.
While the mouse is captured enter and leave events are genereated based on
tracking of the mouse inside MouseMove.
Fixes#301
GetIconInfo
(https://msdn.microsoft.com/en-us/library/windows/desktop/ms648070(v=vs.85).aspx)
creates bitmaps that must be deleted after the call to
CreateIconIndirect, which copies the bitmaps to the icon it creates.
bmpIcon created by Bitmap.GetHicon is now destroyed after being used.
The return value of SetCursor was used to retrieve the last cursor, as
it could have been set by another library (Some UI libraries change the
cursor using the .net Cursor) this could of leaked the cursor we created
and now lost track of. We now delete the handle we had set, not the one
returned by SetCursor.
The mask part of an XIEventMask struct is actually not a pointer to an
integer containing the mask, but rather to an array of bytes each
holding 8 bits of the mask, with the first byte holding bit 0-7.
Therefore the old code would only work on little endian arches.
Adds eglQuerySurfacePointerANGLE and a number of ANGLE related
constants.
Add eglGetPlatformDisplayEXT, eglCreatePlatformWindowSurfaceEXT and
eglCreatePlatformPixmapSurfaceEXT from EGL_EXT_platform_base.
Adds properties to KeyboardState, MouseState, JoystickState and GamePadState
(GamePadButtons), to see if any key or button is down. This should be faster
than iterating over all the public IsDown properties as we can make use of the
internal bit fields.
GamePadButtons uses IsButtonPressed rather than IsButtonDown like the others as
it more closely matches it's current interface (no down methods).
If the legacy keyboard device receives a key down event with IsRepeat set it
will only raise it's own key down event if it's KeyRepeat field is set to true.
This is as documented, regression casused by refactoring. Fixes issue #201.
Also change the GameWindowState example to show setting of KeyRepeat to true
and false and how that changes the event counts for the legacy and new keyboard
devices.
When running under NUnit GetEntryAssembly returns null. In this case we instead
search through the AppDomain for an assembly that matches the AppDomain name.
Fixes warnings [#61] by disabling unused field warnings for two structures in
HidProtocol. These fields aren't currently used by OpenTK but the stuctures are
used in native marshalling so must match the documented structures perfectly.