JUCE SetCursorPos() equivalent

Im trying to find an equivalent function to windows SetCursorPos() to use it in osX, but I can’t find it.
I tried this:
Point newPosition(middleX+240, middleY+164);
Array sources=Desktop::getInstance().getMouseSources();

But I get this error

/JUCE/modules/juce_core/containers/juce_Array.h:251:16: No matching constructor for initialization of ‘juce::MouseInputSource’

I just figured it out, if someone needs this.

Point newPosition(middleX, middleY);
Desktop::getInstance().getMouseSource (0)->setScreenPosition(newPosition);

I’ve just used this one with no issue: