Add glfwGetEventTime for querying input event time

Fixes #1012.
This commit is contained in:
Felipe Ferreira da Silva
2017-05-11 17:15:16 -03:00
committed by Camilla Löwy
parent 16ae02ab85
commit c577ae4b0e
16 changed files with 135 additions and 12 deletions
+21
View File
@@ -3366,6 +3366,27 @@ GLFWAPI GLFWwindowmaximizefun glfwSetWindowMaximizeCallback(GLFWwindow* window,
*/
GLFWAPI GLFWframebuffersizefun glfwSetFramebufferSizeCallback(GLFWwindow* window, GLFWframebuffersizefun cbfun);
/*! @brief Returns the time of the last input event.
*
* This function returns the time, in seconds, of the last event occurence. The
* only events queried are the input events button-press, button-release,
* key-press, key-release and cursor motion, and the proper place to call this
* function is in one of the input callbacks.
*
* @return The value, in seconds, of the last input event occurence.
*
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
*
* @thread_safety This function must only be called from the main thread.
*
* @sa @ref events
*
* @since Added in version 3.3.
*
* @ingroup window
*/
GLFWAPI double glfwGetEventTime(void);
/*! @brief Processes all pending events.
*
* This function processes only those events that are already in the event