getMousePosition static method

Point<double> getMousePosition()

Implementation

static math.Point<double> getMousePosition() {
  var xPointer = ffi.calloc<Int32>();
  var yPointer = ffi.calloc<Int32>();
  // 47
  sdlGetMouseState(xPointer, yPointer);
  var result = math.Point<double>(
      xPointer.value.toDouble(), yPointer.value.toDouble());
  ffi.calloc.free(xPointer);
  ffi.calloc.free(yPointer);
  return result;
}