tslib icon indicating copy to clipboard operation
tslib copied to clipboard

Accessing multitouch point data in Java with TSLIB

Open shacharoz opened this issue 6 years ago • 0 comments

continuing the conversation on this issue: https://github.com/libts/tslib/issues/155

GOAL i would like to access the multitouch point data from a touch screen connected to a linux powered system. but from Java.

LIMITED TO JAVA i must used Java since another part of the product's code is already written in Java. so even if i use QT (investigating this solution as well at the moment), i would need to translate the data between QT and Java.

JAVA AND TOUCH API currently I am using Javafx library, which is the commonly used API for this task in Java. as you can see, it has clear support for TouchEvent, and these samples work when running on Windows (others have managed to work with this on Linux systems as well of course).

Java SDK (JDK) is becoming open source, but not yet. but JavaFX is almost open source and i use version 11 (although touch support was there at least from 7, to the best of my knowledge)

so if we can find a solution to make the standard libraries work - i would be the happiest.

OTHER OPTIONS the second option would be to use TSLIB from C, wrap it with JNI and send the events into Java. @merge recommended that i

install tslib and point it to the touchscreen (using TSLIB_TSDEVICE) and use it's interface according to the docs.

third option i think about is to capture the events with QT, and then send them with similar solutions.

OTHER REFERENCES the one library I found that might be helpful and shed light on the process to expose these events in Java is LibJam-MT. the problem is it is too old, and some of its instructions are not clear enough or non functional. maybe someone can help me figure out what should i do in order to install it, if you think its a relevant solution.

i would certainly like a solution like this for Java as open source and i think TSLIB should add that to its product line :)

shacharoz avatar Aug 22 '19 16:08 shacharoz