Commit graph

319 commits

Author SHA1 Message Date
thefiddler
2e1bcaf280 Added support for high-dpi mode on Windows.
The platform factory for windows now calls SetProcessDPIAware
in order to enable support for high-dpi modes. The relevant
DllImport has been added to API.cs
2013-09-26 01:35:59 +02:00
zastrowm
e7ba5e789f Update whitespace issues to conform to the rest of the document 2013-04-26 21:09:12 -05:00
zastrowm
5f336dd9f9 Change WinRawMouse.ProcessMouseEvents to call code directly instead of using lambdas
Change WinRawMouse.ProcessMouseEvents to call code directly instead of using lambdas.  The lambdas caused memory allocations and were unneeded
2013-04-26 21:06:08 -05:00
Dean Ellis
9a39949249 Merge pull request #1 from elisee/fix-client-rectangle-setter
Fix ClientRectangle setter on Windows (WinGL) & Linux (X11)
2013-03-22 16:29:36 -05:00
Tom Edwards
6c35e8ef24 Merge remote-tracking branch 'origin/ScanCodeKeyboardBranch' 2013-02-17 14:58:16 +00:00
Jacob Hauberg Hansen
af74d97903 Fix NullPointerException on Windows 8. 2013-01-26 14:27:26 +01:00
Andy Korth
0f64af130a Committing artfunkel patch for scan codes 2013-01-24 15:48:01 -06:00
Robert Rouhani
b5591e1eee Started implementing GamePad 2013-01-16 17:56:31 -08:00
Andy Korth
fa422dca2a Fix Windows 8 Keyboard, OpenTK issue 3198 2013-01-14 13:09:55 -06:00
Andy Korth
5b0db16a89 Mouse up events in Windows occur regardless of where on the screen the cursor is. OpenTK issue 2133 2012-12-21 21:12:59 -06:00
Andy Korth
224a296220 Address mouse on windows 8 for OpenTK issue 3198 2012-12-20 15:18:52 -06:00
the_fiddler
1e739bb4ff Added minimal SystemEvents definition to allow compilation on mobile devices. 2011-12-08 00:14:36 +00:00
the_fiddler
4fde3c4dab Added conditional compilation and the necessary classes to compile OpenTK without referencing System.Drawing.dll. To build without System.Drawing, add "MINIMAL" to the conditional compilation symbols. Note that this is an experimental feature that will result in a source- and binary-incompatible dll. 2011-12-08 00:03:14 +00:00
the_fiddler
809d369c52 Implemented IGraphicsContext.SwapInterval property that supersedes IGraphicsContext.VSync. Fixes issue [#2671]: "Expose SwapInterval to GameWindow". 2011-09-06 12:06:30 +00:00
the_fiddler
9c6a4bb2df Fixed coordinate transform for CursorVisible = false on Windows. Fixes issue [#2416]: "Hided mouse cursor problem".
Removed unnecessary constructors from Win32Rectangle struct.
2011-08-25 13:38:08 +00:00
the_fiddler
da5371e92b Added PFD_SUPPORT_COMPOSITION on Vista and higher, to avoid inadvertently disabling Aero.
Allow non-accelerated formats when all accelerated ones fail. Fixes issue [#2224]: "Getting GraphicsModeException from WinGraphicsMode constructor".
2011-02-09 00:23:43 +00:00
the_fiddler
d19244feb5 Add DrawToWindow and SupportOpenGL flags to GetModesARB and check whether Wgl.Arb.ChoosePixelFormat() worked correctly (to avoid undefined results). 2011-01-18 22:34:06 +00:00
the_fiddler
26075f0243 Do not try to register device when device description is empty. 2010-12-03 12:29:01 +00:00
the_fiddler
1d33d1000e [Win32] Implemented Mouse.SetPosition via SetCursorPos. This was refreshingly simple, the function works exactly as expected! (unlike XWarpPointer on X11) 2010-11-23 22:10:49 +00:00
the_fiddler
23eaef0c70 Avoid loading Wgl entry points automatically. This is now explicitly done through WinGLContext. 2010-11-23 22:08:53 +00:00
the_fiddler
07cbb9dd8b * Input/Mouse.cs:
* Input/IMouseDriver2.cs:
* Platform/X11/X11Mouse.cs:
* Platform/X11/XI2Mouse.cs:
* Platform/X11/Functions.cs:
* Platform/Windows/WMInput.cs:
* Platform/X11/X11GLNative.cs:
* Platform/Windows/WinRawMouse.cs: Added ability to set the position
  of the mouse cursor.
[X11] Avoid grabbing the pointer, as this causes unexpected
  side-effects (XInput2 stops working, debugging becomes difficult).
  We now use XWarpPointer and try to discard the spurious MouseMove
  events it generates.
[X11] Make cursor visible when window loses focus, to make debugging
  easier. Restore previous state when it regains focus.
2010-11-23 17:17:13 +00:00
the_fiddler
6c0da79687 Refactored and simplified DisplayDevice detection (devices are now stored in the platform-specific drivers instead of the frontend).
Made XRR resolution changes more robust.
Resolution changes now refresh the DisplayDevices on Windows.
2010-11-21 20:16:18 +00:00
the_fiddler
d9eaf4562c Improved and simplified behavior of RelaxParameters. Removed unused code. 2010-11-11 19:32:22 +00:00
the_fiddler
e0736a69bc Added workaround for zoom-in/zoom-out keys on Microsoft Digital 3000 keyboard. These keys report 0 as a device id, but no such device exists. 2010-11-09 15:19:58 +00:00
the_fiddler
daf7c83dc8 Capture ButtonUp events after ButtonDown even if the mouse leaves the window. 2010-11-09 08:55:55 +00:00
the_fiddler
e8373def1b Use async input to poll the keyboard/mouse. 2010-11-08 22:19:44 +00:00
the_fiddler
2e0a6c8a96 Reverted to wait for messages. 2010-11-08 22:19:19 +00:00
the_fiddler
c2d6f0c091 Refactored input drivers in terms of WinInputBase to reduce code duplication. 2010-11-08 21:43:29 +00:00
the_fiddler
0533a6be23 Minor spelling fix.
Use POINT structure instead of System.Drawing.Point.
2010-11-08 21:41:44 +00:00
the_fiddler
e5928f2b8d WinRawInput requires Windows 5.1 (XP) or higher. 2010-11-08 21:40:43 +00:00
the_fiddler
13a07273ba Removed unimplement SetPixelFormatARB - no such function exists.
Added aggressive locking during context creation and delegate loading in order to avoid potential race conditions.
Now uses Wgl.Imports directly wherever possible in order to improve performance and avoid race conditions.
Slightly improved debugging messages.
2010-11-08 21:38:32 +00:00
the_fiddler
452d8924e6 Minor cosmetic fixes. Removed unused code. 2010-11-08 21:36:10 +00:00
the_fiddler
e1e1be49c4 Removed WinForms dependency and performed general code cleanup. 2010-11-08 19:48:01 +00:00
the_fiddler
6bb01d4cbb Added GraphicsModeComparer for GraphicsMode comparisons.
Added WinInputBase as a base abstraction for all win32 input class.
2010-11-08 19:45:58 +00:00
the_fiddler
fd3e1850b7 Retrieve all pixel formats at once and select the correct one through a custom selection predicate. Simplifies the code significantly and reduces the chance of race conditions. 2010-11-08 19:41:24 +00:00
the_fiddler
d08438785e Avoid reference to System.Windows.Forms.
Pass a concrete GraphicsMode to the context constructor in SelectPixelFormatARB to avoid NRE.
2010-11-08 16:01:50 +00:00
the_fiddler
206a6530a4 Removed duplicate success message. 2010-11-08 15:58:42 +00:00
the_fiddler
d65e0aad47 Release both shift keys when one is released. Otherwise, we end up with stuck keys. 2010-11-08 08:59:32 +00:00
the_fiddler
2c5e7220c3 Implemented KeyboardState.IsConnected property.
Implemented WinRawKeyboard.RefreshDevices().
General code clean-up and beautification.
2010-10-29 11:46:57 +00:00
the_fiddler
2934c9d004 Decoupled new driver API from old public interface.
WinRawMouse can now detect mouse disconnection/connection events.
2010-10-29 11:27:40 +00:00
the_fiddler
c1043d1693 Do not modify device state during the GetState() call. Fixes intermittent crashes. 2010-10-28 13:00:21 +00:00
the_fiddler
0044e4442d Modified GetState() to return the combined state for all mouse/keyboard devices. 2010-10-28 11:10:57 +00:00
the_fiddler
c99571acac Fixed capacity parameter for GetWindowText(). Fixed debug string format that is printed when GetWindowText() fails. 2010-10-28 10:36:28 +00:00
the_fiddler
a070918e93 Removed events that are not part of the INativeWindow interface. 2010-10-28 09:34:13 +00:00
the_fiddler
e13a8e25ae Added code to raise all available events. Removed unused events from old OpenTK versions. Fixed potential race condition when raising events (an event might become null between the null check and the actual raising). 2010-10-28 09:31:00 +00:00
the_fiddler
d56478c5b2 Minor cosmetic change. 2010-10-28 08:43:36 +00:00
the_fiddler
1bef154d36 Implemented WinRawKeyboard input driver. 2010-10-28 08:42:38 +00:00
the_fiddler
40c2576e06 Avoid numeric overflow when printing debug message. 2010-10-28 08:42:20 +00:00
the_fiddler
fa0abf0d51 Minor fixes for code clarity. 2010-10-28 08:13:42 +00:00
the_fiddler
2430f82ff7 Implemented raw keyboard input for Windows. Improved the interface for receiving input. Moved raw input window to its own thread. 2010-10-22 14:57:06 +00:00