Commit Graph

205 Commits

Author SHA1 Message Date
Michael Pfaff b53c59b989
Clean-up 2022-08-16 14:27:14 -04:00
Michael Pfaff 4f7fee2ed4
Remove a lot of synchronization 2022-08-14 13:21:03 -04:00
Michael Pfaff 325db15a1d
More progress, nearly fixed native header generation
BufferUtils.c and CallbackUtil.c have been modified to not include the
generated header file. This is because `javac` is choosing to ignore
those files for generation of headers for unknown reasons.
2022-08-10 11:43:59 -04:00
Ioannis Tsakpinis f97ac09641 Removed NondirectBufferWrapper. It was only used in the Cursor constructor and in a way that could cause crashes: Passing heap buffers to both the images and delays arguments would result in both sharing the same direct memory. 2013-10-30 17:20:28 +02:00
kappaOne 6c4de65e20 Slight tweak to the controller patch, rename getEventButtonStatus() to
getEventButtonState() to make it consistent with Keyboard and Mouse
classes and remove unused import.
2013-10-29 22:06:20 +00:00
momokan dc580e2584 I correct that it was pointed out in my pull request
・src/java/org/lwjgl/input/Controllers.java, line 265: Should be "The timestamp assigned to the current event"
・src/java/org/lwjgl/input/JInputController.java, line 211: Consider splitting on two lines.
2013-07-12 05:58:31 +09:00
momokan a9e492d93a Add controller's status to event buffer 2013-06-30 12:28:01 +09:00
Ollie 5631c5a3ba Fixed JavaDoc for Mouse#next()
Mouse does not contain a getEventDZ() method, so the JavaDoc was invalid.

Signed-off-by: Ollie <dzineit@live.co.uk>
2013-04-11 23:02:11 +02:00
kappaOne 0d25914029 Fix colors on OS X native cursors 2013-01-31 22:44:43 +00:00
kappaOne 4e023eec16 Implement animated cursor support on OS X 2013-01-29 22:59:40 +00:00
kappaOne 486ff0edea Added initial work towards getting native cursors working, not
implemented yet
2013-01-25 00:28:26 +00:00
Erik Broes 129d0711c5 Modifiers now report the correct side they are pressed. Added 'fn'-key as modifier. 2012-11-29 18:27:08 +01:00
Erik Broes 9d4f22034c Allow the use of F16-F19, SECTION, INSERT, HOME, END, DELETE, NUMPADENTER, CLEAR, LMETA keys. 2012-11-27 19:29:26 +01:00
Erik Broes ee69763707 Don't resolve a key to a deprecated name. 2012-11-27 19:28:49 +01:00
Ioannis Tsakpinis c58a34ee2e Changed keyName array size to match KEYBOARD_SIZE. 2012-09-10 07:51:13 +00:00
kappa1 5f1efa0de3 Fix Mouse.getDX() and Mouse.getDY() values when mouse moves outside Display window & clipping is on. Thanks to ra4king for patch. 2012-05-13 12:11:12 +00:00
kappa1 d2174850be Update ControllerAdapter in util package to reflect new changes in the Controller interface class (should fix broken build) 2012-04-10 13:23:08 +00:00
kappa1 18fc034c51 Apply patch by OrangyTang to expose JInput's rumble functionality in LWJGL's Controller class. 2012-04-10 11:44:50 +00:00
kappa1 6f95b368e3 Fix issue with Mouse getWidth/getHeight values being wrongly clipped when using Display.setParent(), thx to MatthiasM for finding this. 2011-08-13 18:53:54 +00:00
Brian Matzon c797193647 Applying patch from Matthias that adds the "negative mouse coordinates" to Mouse.next() too 2011-06-24 18:31:26 +00:00
kappa1 ea5f8518ee fix minor typo in javadoc/comments 2010-12-15 18:48:56 +00:00
Ioannis Tsakpinis a8bcb7fd25 Ported codebase to Java 1.5.
Misc OpenCL fixes and API improvements.
Changed fractal demo to use events/sync objects instead of cl/glFinish for synchronization. (untested)
2010-09-28 21:11:35 +00:00
Brian Matzon 4dcf4df209 yes, we really should... 2010-04-29 17:37:18 +00:00
kappa1 08a2e8a010 Further improvement to mouse ungrab position behaviour. Mouse no longer limited to just ungrabbing at the position it was grabbed, now you can can call setCursorPosition(x,y) while mouse is grabbed and ungrab the mouse at any position you like. 2010-03-27 16:04:30 +00:00
kappa1 8cee11ede7 oops, windows mousegrab fixed 2010-03-26 19:52:40 +00:00
kappa1 b272e7d891 Consistent mouse grab behaviour on all platforms. Mouse will now ungrab at the same place it was grabbed from. 2010-03-26 19:17:53 +00:00
Brian Matzon 663a7cf235 stop updating cursor all the time and only continue animation if mouse is inside window 2009-11-26 22:44:17 +00:00
Brian Matzon 8bd591fe5e support for tracking mouse outside window on drag, new api for checking if mouse is inside window 2009-09-12 22:15:21 +00:00
Brian Matzon bb16ec7492 updated and added license where needed 2008-04-07 18:36:09 +00:00
Elias Naur 65309d759c Added notes to Mouse.poll() and Keyboard.poll() that Display.processMessages() (or Display.update()) must be called to receive new input state 2008-03-02 18:16:39 +00:00
Elias Naur 31669b02ec javdoc fixes 2008-01-21 22:15:12 +00:00
Elias Naur 1cd7d96c68 Mouse: Attempt to clarify Mouse.setNativeCursor javadoc 2007-11-27 07:58:03 +00:00
Brian Matzon 21b2cc0c21 cleaning imports 2007-10-20 21:31:52 +00:00
Brian Matzon 5a659ac1d9 make sure that any windows cursor image pixel is either 0xffxxxxxx or 0x00000000 2007-10-20 14:48:07 +00:00
Elias Naur 3d81b7715d Added KEY_LMETA and KEY_RMETA to Keyboard to replace the windows centric KEY_LWIN and KEY_RWIN, which are now deprecated 2007-08-28 08:02:24 +00:00
Elias Naur 8f2da1dea5 Removed unnecessary (and deadlock prone) synchronized modifiers from methods in Keyboard and Mouse 2007-05-30 20:33:40 +00:00
Elias Naur fc759e6192 Implemented Keyboard.enableRepeatEvents(), Keyboard.areRepeatEventsEnabled() and Keyboard.isEventRepeat() to control repeat event reporting. Added repeat key test to KeyboardTest 2007-05-13 22:01:48 +00:00
Elias Naur 7ee398fe4e Added support for non-direct buffers to Cursor 2007-04-23 16:47:25 +00:00
Elias Naur 56178d97fd Make the rest of LWJGL thread safe. No attempt have been done to make the locking minimal. Instead, one global lock is shared by Display, Mouse, Keyboard and Cursor. The lock surrounds all public methods. 2007-02-12 12:18:26 +00:00
Brian Matzon 48fe0910a1 osx cursor animation emulation enabled 2007-01-04 23:28:33 +00:00
Elias Naur 63532ca647 Make sure that the cursor position doesn't jump when switching grab mode 2006-11-24 14:53:01 +00:00
Elias Naur 2577827e4a Synchronize Keyboard and Mouse to avoid problems with AWTInputAdapter based usage 2006-11-24 10:18:36 +00:00
Elias Naur d2de70f2d9 Make sure that Mouse.destroy ungrabs the cursor 2006-11-19 21:41:34 +00:00
Kevin Glass 007fe5999e Updated Controllers event queue to make use of the new JInput
event queue, including adding getEventNanoseconds() to the 
Controllers interface. TestControllers against Logitech pad on
Win32 confirms that no behaviour changes are evident.
2006-11-17 08:08:21 +00:00
Kevin Glass 15fd0f6d81 Updated to return the controller name unmodified from JInput. 2006-11-17 07:17:12 +00:00
Elias Naur 70e3294b7b Restore old Mouse.create/Keyboard.create behavior which is to ignore create() when already created. 2006-11-16 12:29:52 +00:00
Elias Naur d396992cc5 Fixed potential NPE from Cursor.getCapabilities() 2006-10-27 06:27:58 +00:00
Elias Naur 3674d843c2 Added org.lwjgl.opengl.AWTInputAdapter which enabled use of Mouse and
Keyboard with AWTGLCanvases. Programs can now avoid implementing AWT input processing and access the mouse grabbing features from both Display and AWTGLCanvas. See org.lwjgl.test.opengl.awt.AWTInputAdapterTest for an example.

Note: This commit is the linux and generic AWT imlementation and can still
change a lot while implementing windows and mac os x.
2006-10-26 20:19:40 +00:00
Elias Naur 1616724cb5 Removed redundant import 2006-10-26 12:15:46 +00:00
Elias Naur 1f5f8687bb Linux: Moved current_win to java 2006-10-23 20:40:48 +00:00
Elias Naur ec9b449b78 Made Display.getImplementation package private, and made the input.* packages access it through reflection. 2006-10-08 09:05:16 +00:00
Elias Naur ec4a94d47d Don't throw exceptions on Mouse.getEventButtonState 2006-08-31 13:35:36 +00:00
Kevin Glass 7f9faf144d Removed sanity checks for controllers. All controllers are now reported allowing the developer to make the decision over which ones to display to the user. 2006-08-30 02:47:49 +00:00
Kevin Glass b1a4935212 Added sanity checks on reported controllers to prune out one with no Axis or no Buttons. 2006-08-21 17:26:28 +00:00
Elias Naur 4e68c787b3 Added Keyboard.getEventNanoseconds() and Mouse.getEventNanoseconds() 2006-07-04 17:07:13 +00:00
Elias Naur 26c6de6363 Implemented variable sized events in preparation of timestamped input events 2006-07-03 23:16:26 +00:00
Elias Naur 3902c69c7a Now that no native side event_queue_t type is used anymore, convert input read() semantics to use normal nio Buffer semantics - that is, move the position when writing events 2006-07-03 19:09:47 +00:00
Elias Naur 18721df832 Reverted the widening of Keyboard.getEventCharacter 2006-06-30 23:05:28 +00:00
Elias Naur 13d345abce Widened Keyboard.getEventCharacter() return type from char to int to accomodate 32 bit characters. 2006-06-26 14:13:57 +00:00
Elias Naur 6cf49718db Windows: LWJGL didn't work well with jinput, but compatibility could be greatly improved if LWJGL used DirectInput 8 (like jinput). This can't be done unconditionally, since we need the DX3 support for older versions of windows. So, I've moved most Mouse and Keyboard stuff from native to java side and generalized DirectInput access through an abstract base class, with two concrete subclasses, one for dx3 and one for dx8. 2006-06-26 13:50:48 +00:00
Elias Naur 9f41ecaedb Removed Keyboard.isStateKeySet() - it is easily replaced by Toolkit.getLockingKeyState() 2006-06-10 20:42:26 +00:00
Brian Matzon 4869744cf1 changed cursor support exception to lwjglexception 2006-04-30 21:09:16 +00:00
Brian Matzon 8a3bee6b1c applied patch to move ID tag 2006-03-23 19:32:21 +00:00
Kevin Glass 02a9ec5c9c Removed the use of "jinput.plugins" system property since it doesn't appear to be needed any more and causes double detection of controllers. 2005-11-15 22:31:49 +00:00
Brian Matzon 351e6f5b19 support isCreated and destroy (destroy currently ignored) 2005-06-29 20:47:18 +00:00
Brian Matzon e487a4a2b9 decrease visibility of classes 2005-06-29 20:38:21 +00:00
Kevin Glass 0ae6c420ef Initial controller input checkin. Source for the wrapper round JInput including the test tool. 2005-06-29 20:11:15 +00:00
Elias Naur b12ac2c44c Mouse: Allow delta queries when not grabbed. 2005-05-17 08:04:48 +00:00
Elias Naur 137cad2394 Properly reset Keyboard on destroy() 2005-05-05 10:16:46 +00:00
Caspian Rychlik-Prince 200ed3792a Cleanup of unused imports 2005-05-04 20:59:44 +00:00
Caspian Rychlik-Prince 4747c4878b Clean state after destroy 2005-05-04 20:38:29 +00:00
Elias Naur 2cd1e740ee Removed cached width and height from Mouse 2005-04-28 11:57:38 +00:00
Elias Naur 8ae988494b Remove unused code 2005-04-28 10:52:03 +00:00
Elias Naur a32da7e226 Fon't reset the cursor position in resetMouse() 2005-04-28 10:36:51 +00:00
Elias Naur 038d929180 Allow setCursorPosition when mouse is grabbed 2005-04-28 10:31:32 +00:00
Elias Naur 0b9d221f9c Fix cursor jumping after Mouse.setGrabbed() 2005-04-28 09:57:45 +00:00
Elias Naur 5fe3157227 *** empty log message *** 2005-04-12 11:56:59 +00:00
Elias Naur 61ddd625df Added Mouse.setCursorPosition(x, y) 2005-04-12 11:45:06 +00:00
Elias Naur 0e6c9aa0cd Added LWJGLUtil.getPlatform to encapsulate platform detection. Added FreeBSD as an alias to Linux. 2005-04-09 17:35:37 +00:00
Brian Matzon ad8d7676c2 moved Sys.log to LWJGLUtils and renamed property to org.lwjgl.util.Debug 2005-03-29 18:09:33 +00:00
Elias Naur fb5d89599b Linux support for AWTGLCanvas. Big refactor of context specific code into Context.java that is now shared between Display, Pbuffer and AWTGLCanvas. (Win32 and Mac OS X is now broken while I implement the same changes on those platforms) 2005-02-20 11:24:22 +00:00
Brian Matzon 2c5a862c99 add comment on keyboard layout/key 2005-02-07 18:45:25 +00:00
Elias Naur f4180a214d Cleaned up Mouse and Keyboard now that buffering and translation are always enabled 2005-01-18 16:42:31 +00:00
Elias Naur 250a87767f Removed Controller 2005-01-18 15:32:13 +00:00
Elias Naur fbcd19698b Moved Mouse.getNativeCursorCaps() to Cursor.getCapabilities()
Renamed Pbuffer.getPbufferCaps() to Pbuffer.getCapabilities()
2005-01-18 12:34:36 +00:00
Elias Naur 69bc20f3f5 Removed enableBuffer() and enableTranslation() from the public API. 2005-01-10 08:19:28 +00:00
Brian Matzon 5a01a1313a simple optimization 2004-12-07 21:50:30 +00:00
Ioannis Tsakpinis 3041c0494d Code cleanup 2004-11-25 22:20:45 +00:00
Brian Matzon 6fd2a42ef0 import cleanup 2004-11-20 16:46:44 +00:00
Elias Naur 9741a99c64 Make read() and poll() return absolute coordinates when the mouse is not grabbed 2004-11-12 15:01:29 +00:00
Elias Naur 1ec70842d0 Mac OS X port, second try :) 2004-11-11 16:03:19 +00:00
Elias Naur b5d783f685 *** empty log message *** 2004-11-11 13:54:25 +00:00
Elias Naur 5b1b513aab Moved native cursors to DisplayImplementation 2004-11-11 13:27:59 +00:00
Elias Naur 742559fe20 Don't set native cursor if not supported by the platform 2004-11-03 13:49:08 +00:00
Elias Naur ddd61963ee Split out native implementation of Display/Mouse/Keyboard into implementers of DisplayImplementation 2004-11-02 12:48:58 +00:00
Elias Naur fa1713c4e8 Add delta values to Mouse events 2004-09-22 11:08:21 +00:00
Elias Naur 72afa14aa3 Converted *.allocateDirect to BufferUtils 2004-07-29 11:41:11 +00:00
Elias Naur ad1ff19437 Split general buffer checks into org.lwjgl.BufferChecks and the gl specific buffer checks into org.lwjgl.opengl.GLBufferChecks 2004-07-29 11:20:43 +00:00
Elias Naur 466faf572f Add missing initialized check to Mouse.java 2004-07-27 17:08:48 +00:00
Elias Naur bdf5a43d5e Converted Cursor and Pbuffer handles to ByteBuffers 2004-07-25 14:28:50 +00:00