Reputation: 1693
What is the best way to control the user interface on linux using C++ program.
I need to be able to move the mouse, enter text, and view the screen.
Upvotes: 0
Views: 142
Reputation: 12141
To control mouse/keyboard input you should just take a look at xdotool, an open source binary that allows control of the X11 inputs: http://www.semicomplete.com/projects/xdotool/#id54155
You can freely reuse their code as long as you are ok with the license.
For grabbing screenshots of windows (which is what I think you want to do) the best combination I found under linux is a combination of X11 window managing functions (such as get window by title) and imlib2.
Upvotes: 0
Reputation: 6581
Xlib.... you can call things like Warp pointer. The documentation is here http://tronche.com/gui/x/ with some example programs.
EDIT: http://tronche.com/gui/x/xlib/input/
Upvotes: 1