Handmade Hero»Forums»Code
Baird Linde
2 posts
Touch input APIs/libs?
Hello! I'm trying to get started on an overambitious project to build an alternative/experimental desktop-environment/application-suite/UI-paradigm-thing, using the philosophies of exploratory coding and exploratory design that Casey and Jon have sagely described, and I want to start by playing around with pen & touch input. dragging rectangles around, poking mock-up menus, experimenting with palm-rejection techniques and gesture behaviors and such.

But I've just stumbled onto this post from Jon's blog:
http://the-witness.net/news/2012/10/wm_touch-is-totally-bananas/
And from there, this post from Casey:
http://web.archive.org/web/201303...t.com/forums/viewtopic.php?p=7496

And now I'm concerned that WM_Touch is going to be a tremendous pain in the ass for someone as new to programming as myself. Windows 7 is what I've got on the tablet I'm working with (soon to be my only PC for the foreseeable future, because travel plans) and I don't have the time or money to "upgrade" to Windows 8 or 10 since that's not free anymore. I'm actually a long time Linux user by preference, but touch support is still pretty garbage or non-existent on any of the Linux desktop environments I tried and it was “easier”, after a lot of tweaking, to achieve a passably usable system for my day to day needs on Windows 7. So I was planning to start prototyping on Windows, and then dual boot a minimal Linux environment later when I'm ready to graduate from UI mock-ups to something that actually starts to interface with real OS functionality, but maybe it would be easier to just do that now and bear the inconvenience of having to reboot between my day to day OS and my development environment? (it might even reduce distractions while I'm working)

Does anyone here have experience with touch input API(s) on Linux? Are they (relatively) sane? Am I just overestimating the difficulty of patching WM_Touch support into the handmade win32 layer, given the workarounds that Jon and Casey have already found?
Alternatively, is anyone aware of a sane multiplatform multitouch library along the lines of what ApoorvaJ and serge_rgb did for wacom stylus input?
34 posts
I am fully functional, programmed in multiple techniques.
Touch input APIs/libs?
Here's a start:

How to get the coordinates of touchscreen using Linux
Gianluca Alloisio
33 posts
Touch input APIs/libs?
I made this https://thegiallo.itch.io/space-master for a jam using only SDL2 and it worked well. SDL2 gets you all the touch points.
I have never done something more complex with touch, so I don't know if problems arise in such cases.

Also SDL2 is opensource and zlib licensed, so you can sneak peak how it works on your target platforms.