glfwSetWindowRefreshCallback function
- Pointer<
GLFWwindow> window, - GLFWwindowrefreshfun callback
! @brief Sets the refresh callback for the specified window.
This function sets the refresh callback of the specified window, which is called when the content area of the window needs to be redrawn, for example if the window has been exposed after having been covered by another window.
On compositing window systems such as Aero, Compiz, Aqua or Wayland, where the window contents are saved off-screen, this callback may be called only very infrequently or never at all.
@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);
@endcode
For more information about the callback parameters, see the
function pointer type
(@ref GLFWwindowrefreshfun).
@errors Possible errors include @ref GLFW_NOT_INITIALIZED.
@thread_safety This function must only be called from the main thread.
@sa @ref window_refresh
@since Added in version 2.5. @glfw3 Added window handle parameter and return value.
@ingroup window
GLFWAPI GLFWwindowrefreshfun glfwSetWindowRefreshCallback(GLFWwindow* window, GLFWwindowrefreshfun callback)
Implementation
GLFWwindowrefreshfun glfwSetWindowRefreshCallback(
Pointer<GLFWwindow> window, GLFWwindowrefreshfun callback) {
final glfwSetWindowRefreshCallbackLookupFunction = libglfw.lookupFunction<
GLFWwindowrefreshfun Function(
Pointer<GLFWwindow> window, GLFWwindowrefreshfun callback),
GLFWwindowrefreshfun Function(Pointer<GLFWwindow> window,
GLFWwindowrefreshfun callback)>('glfwSetWindowRefreshCallback');
return glfwSetWindowRefreshCallbackLookupFunction(window, callback);
}