Added getCursorPos() method