mirror of
https://github.com/glfw/glfw.git
synced 2026-09-21 00:30:57 +00:00
Added API and X11 implementation of cursor enter and leave callbacks.
This commit is contained in:
+32
@@ -436,3 +436,35 @@ GLFWAPI void glfwSetScrollCallback(GLFWscrollfun cbfun)
|
||||
_glfwLibrary.scrollCallback = cbfun;
|
||||
}
|
||||
|
||||
|
||||
//========================================================================
|
||||
// Set callback function for cursor enter events
|
||||
//========================================================================
|
||||
|
||||
GLFWAPI void glfwSetCursorEnterCallback(GLFWcursorenterfun cbfun)
|
||||
{
|
||||
if (!_glfwInitialized)
|
||||
{
|
||||
_glfwSetError(GLFW_NOT_INITIALIZED, NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
_glfwLibrary.cursorEnterCallback = cbfun;
|
||||
}
|
||||
|
||||
|
||||
//========================================================================
|
||||
// Set callback function for cursor enter events
|
||||
//========================================================================
|
||||
|
||||
GLFWAPI void glfwSetCursorLeaveCallback(GLFWcursorleavefun cbfun)
|
||||
{
|
||||
if (!_glfwInitialized)
|
||||
{
|
||||
_glfwSetError(GLFW_NOT_INITIALIZED, NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
_glfwLibrary.cursorLeaveCallback = cbfun;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user