This is my first post to this forum. I am an experienced professional programmer with 30+ years of “C” programming experience, 3+ years of X.Windows (but that was about 20 years ago), and 0 days of GTK experience.
My eyesight is very bad and I constantly lose track of the mouse pointer. On my Mac, I use an app called MousePosé. It comes up at boot time and runs in the background. When you press a configurable HotKey (like Control-Space in my setup), it puts a “spotlight” on the mouse by dimming all of the screen except for a circular area around the mouse pointer.
Click on this URL to see a screenshot of MousePosé in action: http://www.avatarci.com/~kory/MPSS.png
I want to write a similar app for Linux under gnome. What I cannot figure out how to do are the following:
1. Getting the current mouse position relative to the root (desktop?) window.
2. How do I dim the entire display except for an area around the mouse?
3. How do I attach to the keyboard stream to capture any key pressed for any app that is running, not just my app or the one that has the focus? I need to pass on all keystrokes downstream to the application that has the current keyboard focus, except when the HotKey is pressed.
I looked through a lot of the tutorials listed here and could not find examples of the issues I just listed.
I would like to code this app in C (and not C++). I would consider Python if there is a compiling advantage over C (other than the instant gratification of script code).
If anyone can help me with these questions, I would be eternally grateful. Some sample code for each of the 3 points above would be fantastic. If I can get this program working well, I will release it open source with a GNU GPL license.