// WaitEvents is used for waiting for events, such as user input and window // resize events. Upon calling this function, the calling thread will be put to // sleep until any event appears in the event queue. When events are available, // they will be processed just as they are processed by glfw.PollEvents. // // Note: It is guaranteed that glfw.WaitEvents will wake up on any event that // can be processed by glfw.PollEvents. However, GLFW receives many events that // are only processed internally and the function may behave differently on // different systems. Do not make any assumptions about when or why // glfw.WaitEvents will return. func WaitEvents() { C.glfwWaitEvents() }
// WaitEvents puts the calling thread to sleep until at least one event has been // received. Once one or more events have been recevied, it behaves as if // PollEvents was called, i.e. the events are processed and the function then // returns immediately. Processing events will cause the window and input // callbacks associated with those events to be called. // // Since not all events are associated with callbacks, this function may return // without a callback having been called even if you are monitoring all // callbacks. // // This function may not be called from a callback. // // This function may only be called from the main thread. func WaitEvents() { C.glfwWaitEvents() panicError() }