glfwGetWindowOpacity function

double glfwGetWindowOpacity(
  1. Pointer<GLFWwindow> window
)

! @brief Returns the opacity of the whole window.

This function returns the opacity of the window, including any decorations.

The opacity (or alpha) value is a positive finite number between zero and one, where zero is fully transparent and one is fully opaque. If the system does not support whole window transparency, this function always returns one.

The initial opacity value for newly created windows is one.

@paramin window The window to query. @return The opacity value of the specified window.

@errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref GLFW_PLATFORM_ERROR.

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

@sa @ref window_transparency @sa @ref glfwSetWindowOpacity

@since Added in version 3.3.

@ingroup window

GLFWAPI float glfwGetWindowOpacity(GLFWwindow* window)

Implementation

double glfwGetWindowOpacity(Pointer<GLFWwindow> window) {
  final glfwGetWindowOpacityLookupFunction = libglfw.lookupFunction<
      Float Function(Pointer<GLFWwindow> window),
      double Function(Pointer<GLFWwindow> window)>('glfwGetWindowOpacity');
  return glfwGetWindowOpacityLookupFunction(window);
}