Set cursor position in Mac OS
Asked Answered
D

1

5

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.

Downdraft answered 25/8, 2010 at 22:3 Comment(0)
G
12

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 coordinate system it uses — i.e., where the origin is and which way positive y goes.

Greige answered 26/8, 2010 at 0:42 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.