tags:

views:

55

answers:

2

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.

+1  A: 

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/

Chris H
A: 

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.

ldog