From 8031534c38372ff8313560afafa0abb115797b58 Mon Sep 17 00:00:00 2001 From: Florian Albrechtskirchinger Date: Fri, 10 Jun 2022 22:51:54 +0200 Subject: [PATCH] Add GLFW_DND_* constants --- include/GLFW/glfw3.h | 22 ++++++++++++++++++++++ src/internal.h | 11 +++++++++++ 2 files changed, 33 insertions(+) diff --git a/include/GLFW/glfw3.h b/include/GLFW/glfw3.h index 52225c74..29af61cf 100644 --- a/include/GLFW/glfw3.h +++ b/include/GLFW/glfw3.h @@ -927,6 +927,9 @@ extern "C" { */ #define GLFW_MOUSE_PASSTHROUGH 0x0002000D +// TODO doc +#define GLFW_DND_DRAGGING 0x0002000E + /*! @brief Framebuffer bit depth hint. * * Framebuffer bit depth [hint](@ref GLFW_RED_BITS). @@ -1302,6 +1305,25 @@ extern "C" { #define GLFW_PLATFORM_NULL 0x00060005 /*! @} */ +// TODO doc +#define GLFW_DND_NONE 0 + +// Drag and drop events +#define GLFW_DND_ENTER 0xdd100001 +#define GLFW_DND_DRAG 0xdd100002 +#define GLFW_DND_LEAVE 0xdd100003 + +// Drag and drop actions +// GLFW_DND_NONE +#define GLFW_DND_COPY 0xdd200001 +#define GLFW_DND_LINK 0xdd200002 +#define GLFW_DND_MOVE 0xdd200004 + +// Drag and drop formats +// GLFW_DND_NONE +#define GLFW_DND_TEXT 0xdd300002 +#define GLFW_DND_PATHS 0xdd300001 + #define GLFW_DONT_CARE -1 diff --git a/src/internal.h b/src/internal.h index 89a18628..5abf6de2 100644 --- a/src/internal.h +++ b/src/internal.h @@ -58,6 +58,17 @@ #define _GLFW_MESSAGE_SIZE 1024 +#define _GLFW_DND_MASK 0x000fffff + +#define _GLFW_DND_TEXT_INDEX 1 +#define _GLFW_DND_PATHS_INDEX 0 +#define _GLFW_DND_FORMAT_COUNT 2 + +#define _GLFW_DND_COPY_INDEX 0 +#define _GLFW_DND_LINK_INDEX 1 +#define _GLFW_DND_MOVE_INDEX 2 +#define _GLFW_DND_ACTION_COUNT 3 + typedef int GLFWbool; typedef void (*GLFWproc)(void);