I want to write a little vnc similar program that moves the Mac OS cursor to a position (x, y) given through a protocol which gets data from Bonjour service. The problem is that I don't know how to move the cursor!
I'm working with Cocoa.
You can be forgiven for not looking in Quartz Display Services for this one. The function you're after is CGWarpMouseCursorPosition
.
Since the documentation doesn't say, you'll have to experiment to determine which co-ordinate system it uses—ie, where the origin is and which way positive y goes.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.