mirror of
https://github.com/glfw/glfw.git
synced 2025-10-03 13:20:58 +00:00
Added glfwPostEmptyEvent.
This commit is contained in:
parent
69e10b88b0
commit
271ce11509
@ -47,6 +47,8 @@ The following dependencies are needed by the examples and test programs:
|
||||
|
||||
- Added native monitor handle access to native API
|
||||
- Added `glfwSetDropCallback` and `GLFWdropfun` for receiving dropped files
|
||||
- Added `glfwPostEmptyEvent` for allowing secondary threads to cause
|
||||
`glfwWaitEvents` to return
|
||||
- [Cocoa] Added `_GLFW_USE_RETINA` to control whether windows will use the full
|
||||
resolution on Retina displays
|
||||
- [Cocoa] Bugfix: Using a 1x1 cursor for hidden mode caused some screen
|
||||
|
@ -13,6 +13,13 @@ GLFW now provides a callback for receiving the paths of files dropped onto GLFW
|
||||
windows. The callback is set with the @ref glfwSetDropCallback function.
|
||||
|
||||
|
||||
@subsection news_31_emptyevent Empty event support
|
||||
|
||||
GLFW now provides the @ref glfwPostEmptyEvent function for posting an empty
|
||||
event from a secondary thread to the main thread event queue, causing @ref
|
||||
glfwWaitEvents to return.
|
||||
|
||||
|
||||
@section news_30 New features in version 3.0
|
||||
|
||||
@subsection news_30_cmake CMake build system
|
||||
|
@ -1758,6 +1758,19 @@ GLFWAPI void glfwPollEvents(void);
|
||||
*/
|
||||
GLFWAPI void glfwWaitEvents(void);
|
||||
|
||||
/*! @brief Posts an empty event to the event queue.
|
||||
*
|
||||
* This function posts an empty event from the current thread to the main
|
||||
* thread event queue, causing @ref glfwWaitEvents to return.
|
||||
*
|
||||
* @remarks This function may be called from secondary threads.
|
||||
*
|
||||
* @sa glfwWaitEvents
|
||||
*
|
||||
* @ingroup window
|
||||
*/
|
||||
GLFWAPI void glfwPostEmptyEvent(void);
|
||||
|
||||
/*! @brief Returns the value of an input option for the specified window.
|
||||
*
|
||||
* @param[in] window The window to query.
|
||||
|
@ -1148,6 +1148,10 @@ void _glfwPlatformWaitEvents(void)
|
||||
_glfwPlatformPollEvents();
|
||||
}
|
||||
|
||||
void _glfwPlatformPostEmptyEvent(void)
|
||||
{
|
||||
}
|
||||
|
||||
void _glfwPlatformSetCursorPos(_GLFWwindow* window, double x, double y)
|
||||
{
|
||||
setModeCursor(window);
|
||||
|
@ -523,6 +523,11 @@ void _glfwPlatformPollEvents(void);
|
||||
*/
|
||||
void _glfwPlatformWaitEvents(void);
|
||||
|
||||
/*! @copydoc glfwPostEmptyEvent
|
||||
* @ingroup platform
|
||||
*/
|
||||
void _glfwPlatformPostEmptyEvent(void);
|
||||
|
||||
/*! @copydoc glfwMakeContextCurrent
|
||||
* @ingroup platform
|
||||
*/
|
||||
|
@ -1179,6 +1179,10 @@ void _glfwPlatformWaitEvents(void)
|
||||
_glfwPlatformPollEvents();
|
||||
}
|
||||
|
||||
void _glfwPlatformPostEmptyEvent(void)
|
||||
{
|
||||
}
|
||||
|
||||
void _glfwPlatformSetCursorPos(_GLFWwindow* window, double xpos, double ypos)
|
||||
{
|
||||
POINT pos = { (int) xpos, (int) ypos };
|
||||
|
@ -672,3 +672,9 @@ GLFWAPI void glfwWaitEvents(void)
|
||||
_glfwPlatformWaitEvents();
|
||||
}
|
||||
|
||||
GLFWAPI void glfwPostEmptyEvent(void)
|
||||
{
|
||||
_GLFW_REQUIRE_INIT();
|
||||
_glfwPlatformPostEmptyEvent();
|
||||
}
|
||||
|
||||
|
@ -1297,6 +1297,10 @@ void _glfwPlatformWaitEvents(void)
|
||||
_glfwPlatformPollEvents();
|
||||
}
|
||||
|
||||
void _glfwPlatformPostEmptyEvent(void)
|
||||
{
|
||||
}
|
||||
|
||||
void _glfwPlatformSetCursorPos(_GLFWwindow* window, double x, double y)
|
||||
{
|
||||
// Store the new position so it can be recognized later
|
||||
|
Loading…
Reference in New Issue
Block a user