Support API for set/get cursor position