glfwSetWindowAttrib function

void glfwSetWindowAttrib(
  1. Pointer<GLFWwindow> window,
  2. int attrib,
  3. int value
)

! @brief Sets an attribute of the specified window.

This function sets the value of an attribute of the specified window.

The supported attributes are GLFW_DECORATED(@ref GLFW_DECORATED_attrib), GLFW_RESIZABLE(@ref GLFW_RESIZABLE_attrib), GLFW_FLOATING(@ref GLFW_FLOATING_attrib), GLFW_AUTO_ICONIFY(@ref GLFW_AUTO_ICONIFY_attrib) and GLFW_FOCUS_ON_SHOW(@ref GLFW_FOCUS_ON_SHOW_attrib).

Some of these attributes are ignored for full screen windows. The new value will take effect if the window is later made windowed.

Some of these attributes are ignored for windowed mode windows. The new value will take effect if the window is later made full screen.

@paramin window The window to set the attribute for. @paramin attrib A supported window attribute. @paramin value GLFW_TRUE or GLFW_FALSE.

@errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref GLFW_INVALID_ENUM, @ref GLFW_INVALID_VALUE and @ref GLFW_PLATFORM_ERROR.

@remark Calling @ref glfwGetWindowAttrib will always return the latest value, even if that value is ignored by the current mode of the window.

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

@sa @ref window_attribs @sa @ref glfwGetWindowAttrib

@since Added in version 3.3.

@ingroup window

GLFWAPI void glfwSetWindowAttrib(GLFWwindow* window, int attrib, int value)

Implementation

void glfwSetWindowAttrib(Pointer<GLFWwindow> window, int attrib, int value) {
  final glfwSetWindowAttribLookupFunction = libglfw.lookupFunction<
      Void Function(Pointer<GLFWwindow> window, Int32 attrib, Int32 value),
      void Function(Pointer<GLFWwindow> window, int attrib,
          int value)>('glfwSetWindowAttrib');
  return glfwSetWindowAttribLookupFunction(window, attrib, value);
}