From 8429402f9e285b94a95b2193b61f36d87f4e475f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Thu, 14 Sep 2017 15:04:24 +0200 Subject: [PATCH] Documentation work --- README.md | 2 ++ include/GLFW/glfw3.h | 14 +++++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 5c5fe473..1abf641e 100644 --- a/README.md +++ b/README.md @@ -138,6 +138,8 @@ information on what to include when reporting a bug. for retrieving gamepad input state (#900) - Added `glfwRequestWindowAttention` function for requesting attention from the user (#732,#988) +- Added `glfwGetEventTime` function for querying the time of the last input + event (#1012) - Added `glfwGetKeyScancode` function that allows retrieving platform dependent scancodes for keys (#830) - Added `glfwSetWindowMaximizeCallback` and `GLFWwindowmaximizefun` for diff --git a/include/GLFW/glfw3.h b/include/GLFW/glfw3.h index 07bad760..5004f4c3 100644 --- a/include/GLFW/glfw3.h +++ b/include/GLFW/glfw3.h @@ -3368,15 +3368,19 @@ GLFWAPI GLFWframebuffersizefun glfwSetFramebufferSizeCallback(GLFWwindow* window /*! @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. + * This function returns the time, in seconds, that the last input event + * occurred. The time is collected for key, mouse button, scrolling and cursor + * position events including enter and leave. The function is intended to be + * called from the relevant event callback. * - * @return The value, in seconds, of the last input event occurence. + * @return The time of the input event, in seconds, or zero if an + * [error](@ref error_handling) occurred. * * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. * + * @remarks The event timestamps provided by most platforms have much lower + * resolution than the GLFW timer. + * * @thread_safety This function must only be called from the main thread. * * @sa @ref events