Simulating a mouse click



I am creating an application that uses gtk+ and creating the interface
was easy, but what I need to code now is 'simulating' n mouse click at
the cursors current position (e.g. if the cursor happens to be hovering
over a menu and my applications fakes a mouse click, the menu would
open). I know that I can send mouse signals to widgets inside my
application's interface, but I need this for the whole screen (i.e.
detect the cursors position and then send a mouse signal to the object
on that position). 
Someone told me that GDK can do this, so I took a look at the GDK API,
but I still don't know how to do this. I did find a function called
gdk_display_get_pointer(), which may be what I need to detect the
cursors position, but I am not sure since I can't get it to work. Can
anyone help me further with this?
Thanks in advance.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]