Refactor drag API to make it asynchronous

Fixes #9477
This commit is contained in:
copilot-swe-agent[bot]
2026-02-05 15:00:53 +00:00
committed by Kovid Goyal
parent a7b8e880c9
commit 5ea35cbbfc
12 changed files with 856 additions and 271 deletions

24
glfw/null_window.c vendored
View File

@@ -531,13 +531,25 @@ void _glfwPlatformSetCursor(_GLFWwindow* window UNUSED, _GLFWcursor* cursor UNUS
{
}
int _glfwPlatformStartDrag(_GLFWwindow* window UNUSED,
const GLFWdragitem* items UNUSED,
int item_count UNUSED,
const GLFWimage* thumbnail UNUSED,
GLFWDragOperationType operation UNUSED)
void _glfwPlatformCancelDrag(_GLFWwindow* window UNUSED)
{
return false;
// No-op for null platform
}
int _glfwPlatformStartDrag(_GLFWwindow* window UNUSED,
const char* const* mime_types UNUSED,
int mime_count UNUSED,
const GLFWimage* thumbnail UNUSED,
int operations UNUSED)
{
return ENOTSUP;
}
ssize_t _glfwPlatformSendDragData(GLFWDragSourceData* source_data UNUSED,
const void* data UNUSED,
size_t size UNUSED)
{
return -ENOTSUP;
}
void _glfwPlatformUpdateDragState(_GLFWwindow* window UNUSED)