GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Fri May 24, 2013 12:05 pm

All times are UTC




Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: [New in GTK]mouse coordiante in referrence with GTKEventbox?
PostPosted: Tue Jan 13, 2009 7:17 am 
Offline
Familiar Face

Joined: Tue Dec 16, 2008 5:11 am
Posts: 17
Im using Gtk in windows:
how to get the mouse coordinates of the mouse cursor inside the GTKEventbox without clicking anything?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 13, 2009 8:43 am 
Offline
Never Seen the Sunlight

Joined: Wed Jul 23, 2008 10:31 am
Posts: 2406
Location: Slovenia
Hello.

Gdk offers some functions to manipulate the mouse pointer, but the one you'll be most interested is gdk_display_get_pointer. There is also an example posted in this section of the forum that demonstrates moving mouse pointer using keyboard: http://www.gtkforums.com/about182.html

The other option would be to connect motion-notify-event and obtain the x and y coordinates from second parameter of the function (event->x and event->y will be coordinates of th current location of the mouse pointer).

BTW, I think it would be better to post your question in GTK+ programming section.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 13, 2009 8:58 am 
Offline
Familiar Face

Joined: Tue Dec 16, 2008 5:11 am
Posts: 17
tnx...

i tried the second option that you gave me but compiling it in VB C++. i still need to click the mouse button..


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 13, 2009 4:44 pm 
Offline
Never Seen the Sunlight

Joined: Thu Jun 14, 2007 11:02 pm
Posts: 923
Location: Falun, WI USA
Please start only one topic per topic.
Discussion can continue here:
viewtopic.php?t=2565


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 3 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