|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
Gtk over DirectFB - Moving mouse pointer through APIHi 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 _______________________________________________ gtk-list mailing list gtk-list@... http://mail.gnome.org/mailman/listinfo/gtk-list |
|
|
Re: Gtk over DirectFB - Moving mouse pointer through APIharinandan, 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. |
|
|
Re: Gtk over DirectFB - Moving mouse pointer through APIHi lkcl,
I am trying to use uinput to make my mouse pointer move and register keystrokes. However, when I compile the program you have linked to (this seems to be the most popular program example on the web), everytime I run it, when it asks me for an input, I enter 'A' for example and my system crashes and restarts. I also tried using another example which moved the mouse pointer every couple of seconds. Now I found it strange that the mouse pointer doesn't physically move, but there is some virtual unseen pointer which keeps moving (I know this because I get mouse rollover effects every couple of seconds). The 2nd question isn't as important as the first, as I cannot figure out why the program is crashing. Why did the author use a getchar() to ask for input? I am very confused as to how this program works. Any help would be appreciated. Thanks a lot.
|
|
|
Re: Gtk over DirectFB - Moving mouse pointer through APIHi,
I figured out what my second problem was. It's a ridiculous problem so thought I'd let people know in case they face a similar problem. Since I'm developing on a VirtualBox Ubuntu, it is a virtual environment. Mouse integration was turned ON (mouse integration is a feature so that your mouse pointer can shift between host and virtual OS without having to release). Once I turned it off, my mouse pointer movement was working.
|
| Free embeddable forum powered by Nabble | Forum Help |