From 1b1c12a56f2f9de543816aef354fd97628ad3169 Mon Sep 17 00:00:00 2001 From: Marco Melorio Date: Sat, 11 Jan 2020 01:36:48 +0100 Subject: [PATCH] GlfwApplication: added new GLFW 3.4 resizing cursors. --- src/Magnum/Platform/GlfwApplication.cpp | 8 ++++++++ src/Magnum/Platform/GlfwApplication.h | 26 +++++++++++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/src/Magnum/Platform/GlfwApplication.cpp b/src/Magnum/Platform/GlfwApplication.cpp index cc9f53e45..76d329769 100644 --- a/src/Magnum/Platform/GlfwApplication.cpp +++ b/src/Magnum/Platform/GlfwApplication.cpp @@ -710,8 +710,16 @@ constexpr Int CursorMap[] { GLFW_ARROW_CURSOR, GLFW_IBEAM_CURSOR, GLFW_CROSSHAIR_CURSOR, + #if GLFW_VERSION_MAJOR*100 + GLFW_VERSION_MINOR >= 304 + GLFW_RESIZE_NWSE_CURSOR, + GLFW_RESIZE_NESW_CURSOR, + #endif GLFW_HRESIZE_CURSOR, GLFW_VRESIZE_CURSOR, + #if GLFW_VERSION_MAJOR*100 + GLFW_VERSION_MINOR >= 304 + GLFW_RESIZE_ALL_CURSOR, + GLFW_NOT_ALLOWED_CURSOR, + #endif GLFW_HAND_CURSOR }; diff --git a/src/Magnum/Platform/GlfwApplication.h b/src/Magnum/Platform/GlfwApplication.h index 73674497e..5395937d9 100644 --- a/src/Magnum/Platform/GlfwApplication.h +++ b/src/Magnum/Platform/GlfwApplication.h @@ -561,8 +561,34 @@ class GlfwApplication { Arrow, /**< Arrow */ TextInput, /**< Text input */ Crosshair, /**< Crosshair */ + + #if defined(DOXYGEN_GENERATING_OUTPUT) || GLFW_VERSION_MAJOR*100 + GLFW_VERSION_MINOR >= 304 + /** Double arrow pointing northwest and southeast + * @note Supported since GLFW 3.4. + */ + ResizeNWSE, + + /** Double arrow pointing northeast and southwest + * @note Supported since GLFW 3.4. + */ + ResizeNESW, + #endif + ResizeWE, /**< Double arrow pointing west and east */ ResizeNS, /**< Double arrow pointing north and south */ + + #if defined(DOXYGEN_GENERATING_OUTPUT) || GLFW_VERSION_MAJOR*100 + GLFW_VERSION_MINOR >= 304 + /** Four pointed arrow pointing north, south, east, and west + * @note Supported since GLFW 3.4. + */ + ResizeAll, + + /** Slashed circle or crossbones + * @note Supported since GLFW 3.4. + */ + No, + #endif + Hand, /**< Hand */ Hidden, /**< Hidden */ HiddenLocked /**< Hidden and locked */