Initial drag and drop support.

This commit is contained in:
arturo
2013-07-10 11:42:14 +02:00
committed by Camilla Berglund
parent 0548c713e8
commit 89d0723ba3
10 changed files with 338 additions and 5 deletions
+17
View File
@@ -211,6 +211,12 @@ void _glfwInputCursorEnter(_GLFWwindow* window, int entered)
window->callbacks.cursorEnter((GLFWwindow*) window, entered);
}
void _glfwInputDrop(_GLFWwindow* window, const char* dropString){
if (window->callbacks.drop)
window->callbacks.drop((GLFWwindow*) window, dropString);
}
//////////////////////////////////////////////////////////////////////////
////// GLFW public API //////
@@ -394,3 +400,14 @@ GLFWAPI GLFWscrollfun glfwSetScrollCallback(GLFWwindow* handle,
return cbfun;
}
GLFWAPI GLFWdropfun glfwSetDropCallback(GLFWwindow* handle, GLFWdropfun cbfun)
{
_GLFWwindow* window = (_GLFWwindow*) handle;
GLFWdropfun previous;
_GLFW_REQUIRE_INIT_OR_RETURN(NULL);
previous = window->callbacks.drop;
window->callbacks.drop = cbfun;
return previous;
}