glfwSetWindowIconifyCallback function

GLFWwindowiconifyfun glfwSetWindowIconifyCallback(
  1. Pointer<GLFWwindow> window,
  2. GLFWwindowiconifyfun callback
)

! @brief Sets the iconify callback for the specified window.

This function sets the iconification callback of the specified window, which is called when the window is iconified or restored.

@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 iconified) @endcode For more information about the callback parameters, see the function pointer type(@ref GLFWwindowiconifyfun).

@errors Possible errors include @ref GLFW_NOT_INITIALIZED.

@remark @wayland The XDG-shell protocol has no event for iconification, so this callback will never be called.

@thread_safety This function must only be called from the main thread.

@sa @ref window_iconify

@since Added in version 3.0.

@ingroup window

GLFWAPI GLFWwindowiconifyfun glfwSetWindowIconifyCallback(GLFWwindow* window, GLFWwindowiconifyfun callback)

Implementation

GLFWwindowiconifyfun glfwSetWindowIconifyCallback(
    Pointer<GLFWwindow> window, GLFWwindowiconifyfun callback) {
  final glfwSetWindowIconifyCallbackLookupFunction = libglfw.lookupFunction<
      GLFWwindowiconifyfun Function(
          Pointer<GLFWwindow> window, GLFWwindowiconifyfun callback),
      GLFWwindowiconifyfun Function(Pointer<GLFWwindow> window,
          GLFWwindowiconifyfun callback)>('glfwSetWindowIconifyCallback');
  return glfwSetWindowIconifyCallbackLookupFunction(window, callback);
}