glfwDestroyCursor function

void glfwDestroyCursor(
  1. Pointer<GLFWcursor> cursor
)

! @brief Destroys a cursor.

This function destroys a cursor previously created with @ref glfwCreateCursor. Any remaining cursors will be destroyed by @ref glfwTerminate.

If the specified cursor is current for any window, that window will be reverted to the default cursor. This does not affect the cursor mode.

@paramin cursor The cursor object to destroy.

@errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref GLFW_PLATFORM_ERROR.

@reentrancy This function must not be called from a callback.

@thread_safety This function must only be called from the main thread.

@sa @ref cursor_object @sa @ref glfwCreateCursor

@since Added in version 3.1.

@ingroup input

GLFWAPI void glfwDestroyCursor(GLFWcursor* cursor)

Implementation

void glfwDestroyCursor(Pointer<GLFWcursor> cursor) {
  final glfwDestroyCursorLookupFunction = libglfw.lookupFunction<
      Void Function(Pointer<GLFWcursor> cursor),
      void Function(Pointer<GLFWcursor> cursor)>('glfwDestroyCursor');
  return glfwDestroyCursorLookupFunction(cursor);
}