glfwCreateStandardCursor function

Pointer<GLFWcursor> glfwCreateStandardCursor(
  1. int shape
)

! @brief Creates a cursor with a standard shape.

Returns a cursor with a standard shape(@ref shapes), that can be set for a window with @ref glfwSetCursor.

@paramin shape One of the standard shapes(@ref shapes). @return A new cursor ready to use or NULL if an error(@ref error_handling) occurred.

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

@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 GLFWcursor* glfwCreateStandardCursor(int shape)

Implementation

Pointer<GLFWcursor> glfwCreateStandardCursor(int shape) {
  final glfwCreateStandardCursorLookupFunction = libglfw.lookupFunction<
      Pointer<GLFWcursor> Function(Int32 shape),
      Pointer<GLFWcursor> Function(int shape)>('glfwCreateStandardCursor');
  return glfwCreateStandardCursorLookupFunction(shape);
}