Added inline functions to get cursor x and y position.