As part of a small app I am working on, I need to find a way to return the coordinates of the mouse on the screen when I click. I am looking for a solution that would run the same across operating systems, or at least the same on Unix systems. I'm wondering if there's a low-level solution for this. I have seen solutions implemented in Java, C#, and Python, but they all involve using a larger framework.
I would suggest using Qt. The problem is that, you will have different windowing systems on different platforms, potentially even on Linux.
As a fallback, you could check how Qt gets this bit right across the platforms, and copy/paste that into your software. It might bring further dependencies into your software.
gtk is also an option, but it might not be a cross-platform solution such as Qt or wxWidgets, or even FLTK. However, gtk is closer to your initial requirement, the C programming language.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With