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

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
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.
Hi,

thanks for your answer.

I donĀ“t want to be platform-independent, I want to use Linux operating-system like Ubuntu.
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.
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
Topic archived. No new replies allowed.