MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/SPlisHSPlasH / glfwDestroyCursor

Function glfwDestroyCursor

extern/glfw/src/input.c:804–837  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

802}
803
804GLFWAPI void glfwDestroyCursor(GLFWcursor* handle)
805{
806 _GLFWcursor* cursor = (_GLFWcursor*) handle;
807
808 _GLFW_REQUIRE_INIT();
809
810 if (cursor == NULL)
811 return;
812
813 // Make sure the cursor is not being used by any window
814 {
815 _GLFWwindow* window;
816
817 for (window = _glfw.windowListHead; window; window = window->next)
818 {
819 if (window->cursor == cursor)
820 glfwSetCursor((GLFWwindow*) window, NULL);
821 }
822 }
823
824 _glfwPlatformDestroyCursor(cursor);
825
826 // Unlink cursor from global linked list
827 {
828 _GLFWcursor** prev = &_glfw.cursorListHead;
829
830 while (*prev != cursor)
831 prev = &((*prev)->next);
832
833 *prev = cursor->next;
834 }
835
836 free(cursor);
837}
838
839GLFWAPI void glfwSetCursor(GLFWwindow* windowHandle, GLFWcursor* cursorHandle)
840{

Callers 4

ImGui_ImplGlfw_ShutdownFunction · 0.85
terminateFunction · 0.85
glfwCreateCursorFunction · 0.85
glfwCreateStandardCursorFunction · 0.85

Calls 2

glfwSetCursorFunction · 0.85

Tested by

no test coverage detected