Re: Gtk over DirectFB - Moving mouse pointer through API





Harinandan S wrote:
> 
> Hi All,
> 
> I am using Gtk 2.12.2 over DirectFB 1.1.1. I get prints
> saying gdk_display_warp_pointer is not implemented. Is there any other way
> to move mouse pointer?
> 
> Regards,
> Harinandan S
> 

harinandan, hi,

you can always use the linux userspace uinput kernel module to simulate key
and mouse events, programmatically.  see the following:
http://lkcl.net/software/uinput/

this is a working example - you _will_ need to initialise both keyboard
_and_ mouse ioctls otherwise uinput refuses to work, inexplicably.  the
example shows moving the mouse cursor to the right by a small margin;
pressing the "a" key; releasing the "a" key and then reading the program's
stdin using getchar() to receive the "a" key.

l.

p.s. if you don't do the "release" then you get a stream of "a"s because,
well, duh, the key is being held down.

-- 
View this message in context: http://www.nabble.com/Gtk-over-DirectFB---Moving-mouse-pointer-through-API-tp22635749p23704453.html
Sent from the Gtk+ - General mailing list archive at Nabble.com.



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