How to control mouse pointer by C++ Code ???

Sep 19, 2014 at 8:05pm
Hello,

I have a question about controlling a mouse pointer in Linux (i.e. in Webbrowser) by C++ Code in Eclipse. So my question is which libraries do I need for this? I found some code in the Internet but only for Windows.


Can you help me?

Best Regards,
Tim
Sep 19, 2014 at 8:15pm
There is no standard or platform-independent way, you need to look up how to do it for your operating system. Be aware that getting and/or setting the actual absolute position of the mouse cursor is something that antivirus software hate.

In *nix, the way you accomplish this depends entirely on the windowing system being used. There might not even be a windowing system though.
Sep 19, 2014 at 8:34pm
Hi,

thanks for your answer.

I don´t want to be platform-independent, I want to use Linux operating-system like Ubuntu.
Sep 19, 2014 at 8:37pm
LB wrote:
In *nix, the way you accomplish this depends entirely on the windowing system being used. There might not even be a windowing system though.
Sep 20, 2014 at 7:34pm
For Xorg, look at Xlib or xcb.
For framebuffer pointer... uh... good luck.
For Wayland, look at http://cgit.freedesktop.org/wayland/libinput

EDIT: I think you can accomplish this in a platform independent way with SDL.
Last edited on Sep 20, 2014 at 7:35pm
Topic archived. No new replies allowed.