GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Wed Aug 20, 2014 10:42 am

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Newbie Could Use Some Help
PostPosted: Sun May 11, 2014 4:29 am 
Offline

Joined: Sat May 10, 2014 3:08 am
Posts: 2
Hello Everyone,

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.

Regards,
Kory


Top
 Profile  
 
 Post subject: Re: Newbie Could Use Some Help
PostPosted: Sun May 11, 2014 10:55 pm 
Offline
Familiar Face

Joined: Wed Jul 03, 2013 4:52 am
Posts: 9
Doesn't gnome already have that feature?
http://www.nhs.uk/accessibilityhelp/Finding-your-mouse-pointer-in-Gnome.html


Top
 Profile  
 
 Post subject: Re: Newbie Could Use Some Help
PostPosted: Tue May 13, 2014 11:33 pm 
Offline

Joined: Sat May 10, 2014 3:08 am
Posts: 2
That URL seems to be very old. The Mouse Setting that is shipped with FC20 only has two options:double click speed, and pointer speed. You can use gnome-tweak-tool to enable the mouse locator, which when you hit the control yet, it draws a very pale blue halo for a second or two. Not very helpful, to me at least.

In this thread:

http://forums.fedoraforum.org/showthread.php?t=298944

I asked for some help on how to improve the locator feature, but did not get much help.

Maybe a better place to ask is in the GNOME user's forum?

Thanks,
Kory


Top
 Profile  
 
 Post subject: Re: Newbie Could Use Some Help
PostPosted: Fri May 16, 2014 11:27 pm 
Offline
Familiar Face

Joined: Wed Jul 03, 2013 4:52 am
Posts: 9
Found some code -
https://github.com/ebroder/gnome-settings-daemon/blob/master/plugins/mouse/gsd-locate-pointer.c


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group