glfwSetDropCallback

Sets the path drop callback.

This function sets the path drop callback of the specified window, which is called when one or more dragged paths are dropped on the window.

Because the path array and its strings may have been generated specifically for that event, they are not guaranteed to be valid after the callback has returned. If you wish to use them after the callback returns, you need to make a deep copy.

extern (C) @nogc nothrow __gshared
glfwSetDropCallback

Parameters

window GLFWwindow*

The window whose callback to set.

callback GLFWdropfun

The new file drop callback, or null to remove the currently set callback.

Return Value

The previously set callback, or null if no callback was set or the library had not been initialized.

@callback_signature

void function_name(GLFWwindow* window, int path_count, const char* paths[])

For more information about the callback parameters, see the function pointer type.

Errors: Possible errors include @ref GLFW_NOT_INITIALIZED.

@remark @wayland File drop is currently unimplemented.

Thread Safety

This function must only be called from the main thread.

@sa @ref path_drop

Meta

Since

Added in version 3.1.

Ingroup: input