GLFW: Add support for window occluded notifications on macOS

Based on: https://github.com/glfw/glfw/pull/1123
This commit is contained in:
Kovid Goyal
2019-02-18 09:34:26 +05:30
parent c8bb7aae40
commit dcb2d95f9a
9 changed files with 127 additions and 2 deletions

28
kitty/glfw-wrapper.h generated
View File

@@ -585,7 +585,11 @@
* [window attribute](@ref GLFW_FOCUS_ON_SHOW_attrib).
*/
#define GLFW_FOCUS_ON_SHOW 0x0002000C
/*! @brief Occlusion window attribute
*
* Occlusion [window attribute](@ref GLFW_OCCLUDED_attrib).
*/
#define GLFW_OCCLUDED 0x0002000D
/*! @brief Framebuffer bit depth hint.
*
* Framebuffer bit depth [hint](@ref GLFW_RED_BITS).
@@ -1003,6 +1007,24 @@ typedef void (* GLFWwindowrefreshfun)(GLFWwindow*);
*/
typedef void (* GLFWwindowfocusfun)(GLFWwindow*,int);
/*! @brief The function signature for window occlusion callbacks.
*
* This is the function signature for window occlusion callback functions.
*
* @param[in] window The window whose occlusion state changed.
* @param[in] occluded `GLFW_TRUE` if the window was occluded, or `GLFW_FALSE`
* if the window is no longer occluded.
*
* @sa @ref window_occlusion
* @sa @ref glfwSetWindowOcclusionCallback
*
* @since Added in version 3.3.
*
* @ingroup window
*/
typedef void (* GLFWwindowocclusionfun)(GLFWwindow*, bool);
/*! @brief The function signature for window iconify/restore callbacks.
*
* This is the function signature for window iconify/restore callback
@@ -1641,6 +1663,10 @@ typedef GLFWwindowfocusfun (*glfwSetWindowFocusCallback_func)(GLFWwindow*, GLFWw
glfwSetWindowFocusCallback_func glfwSetWindowFocusCallback_impl;
#define glfwSetWindowFocusCallback glfwSetWindowFocusCallback_impl
typedef GLFWwindowocclusionfun (*glfwSetWindowOcclusionCallback_func)(GLFWwindow*, GLFWwindowocclusionfun);
glfwSetWindowOcclusionCallback_func glfwSetWindowOcclusionCallback_impl;
#define glfwSetWindowOcclusionCallback glfwSetWindowOcclusionCallback_impl
typedef GLFWwindowiconifyfun (*glfwSetWindowIconifyCallback_func)(GLFWwindow*, GLFWwindowiconifyfun);
glfwSetWindowIconifyCallback_func glfwSetWindowIconifyCallback_impl;
#define glfwSetWindowIconifyCallback glfwSetWindowIconifyCallback_impl