glfwSetCursorEnterCallback function
- Pointer<
GLFWwindow> window, - GLFWcursorenterfun callback
! @brief Sets the cursor enter/leave callback.
This function sets the cursor boundary crossing callback of the specified window, which is called when the cursor enters or leaves the content area of the window.
@paramin
window The window whose callback to set.
@paramin
callback The new callback, or NULL
to remove the currently set
callback.
@return The previously set callback, or NULL
if no callback was set or the
library had not been initialized
(@ref intro_init).
@callback_signature
@code
void function_name(GLFWwindow* window, int entered)
@endcode
For more information about the callback parameters, see the
function pointer type
(@ref GLFWcursorenterfun).
@errors Possible errors include @ref GLFW_NOT_INITIALIZED.
@thread_safety This function must only be called from the main thread.
@sa @ref cursor_enter
@since Added in version 3.0.
@ingroup input
GLFWAPI GLFWcursorenterfun glfwSetCursorEnterCallback(GLFWwindow* window, GLFWcursorenterfun callback)
Implementation
GLFWcursorenterfun glfwSetCursorEnterCallback(
Pointer<GLFWwindow> window, GLFWcursorenterfun callback) {
final glfwSetCursorEnterCallbackLookupFunction = libglfw.lookupFunction<
GLFWcursorenterfun Function(
Pointer<GLFWwindow> window, GLFWcursorenterfun callback),
GLFWcursorenterfun Function(Pointer<GLFWwindow> window,
GLFWcursorenterfun callback)>('glfwSetCursorEnterCallback');
return glfwSetCursorEnterCallbackLookupFunction(window, callback);
}