Linux, how to capture screen, and simulate mouse movements.
Posted
by 2di
on Stack Overflow
See other posts from Stack Overflow
or by 2di
Published on 2010-04-09T11:35:06Z
Indexed on
2010/04/09
12:03 UTC
Read the original article
Hit count: 298
Hi All
I need to capture screen (as print screen) in the way so I can access pixel color data, to do some image recognition, after that I will need to generate mouse events on the screen such as left click, drag and drop (moving mouse while button is pressed, and then release it). Once its done, image will be deleted.
Note: I need to capture whole screen everything that user can see, and I need to simulate clicks outside window of my program (if it makes any difference)
Spec: Linux ubuntu Language: C++
Performance is not very important,"print screen" function will be executed once every ~10 sec. Duration of the process can be up to 24 hours so method needs to be stable and memory leaks free (as usuall :)
I was able to do in windows with win GDI and some windows events, but I'ev no idea how to do it in Linux.
Thanks a lot
© Stack Overflow or respective owner