Hi
I have been asked for an event queue based version of jinput, so that the queue can be read and checked for events. Not a positive notification, just a queue for events.
What I am proposing, is that we move a chunk of the functionality up from the native code into the java, and expose an event queue on each device. I’m thinking that each button/axis/key should have a queue, but there must also be a way to clear the queue for events on components that are not being monitored.
I also propose that the existing API should be a wrapper around the queue’s exposed, so no existing JInput app should need any rework, but new apps have the choice to use the event queue.
As event queues as already used in the underlying native APIs I don’t see exposing an event system as being that much of an issue, and wil allow us to common up the code for combining the events on each poll.
My worry is that some platforms (say a console) may not have events, and may only poll. One way round this would be to have an ‘eventQueueSupported()’ type method that can return false and so users would know they needed to poll the device. The other way is to have the underlaying plugin say that it has no event queue, and make a simulated queue with synthetic based off the poll call.
Discuss
Endolf