docs: def set_window_refresh_callback(window, cbfun):
      """
      Sets the refresh callback for the specified window.
  
      Wrapper for:
          GLFWwindowrefreshfun glfwSetWindowRefreshCallback(GLFWwindow* window, GLFWwindowrefreshfun cbfun);
      """
      window_addr = ctypes.cast(ctypes.pointer(window),
                                ctypes.POINTER(ctypes.c_long)).contents.value
      if window_addr in _window_refresh_callback_repository:
          previous_callback = _window_refresh_callback_repository[window_addr]
      else:
          previous_callback = None
      if cbfun is None:
          cbfun = 0
      c_cbfun = _GLFWwindowrefreshfun(cbfun)
      _window_refresh_callback_repository[window_addr] = (cbfun, c_cbfun)
      cbfun = c_cbfun
      _glfw.glfwSetWindowRefreshCallback(window, cbfun)
      if previous_callback is not None and previous_callback[0] != 0:
          return previous_callback[0]