diff --git a/bindings/c/include/SFML/Graphics/RenderWindow.h b/bindings/c/include/SFML/Graphics/RenderWindow.h index c283f440..e17e81db 100644 --- a/bindings/c/include/SFML/Graphics/RenderWindow.h +++ b/bindings/c/include/SFML/Graphics/RenderWindow.h @@ -121,7 +121,7 @@ CSFML_API sfContextSettings sfRenderWindow_GetSettings(const sfRenderWindow* ren /// \return sfTrue if an event was returned, sfFalse if events stack was empty /// //////////////////////////////////////////////////////////// -CSFML_API sfBool sfRenderWindow_GetEvent(sfRenderWindow* renderWindow, sfEvent* event); +CSFML_API sfBool sfRenderWindow_PollEvent(sfRenderWindow* renderWindow, sfEvent* event); //////////////////////////////////////////////////////////// /// Wait for an event and return it diff --git a/bindings/c/include/SFML/Window/Window.h b/bindings/c/include/SFML/Window/Window.h index 60d905ee..b2dd42c9 100644 --- a/bindings/c/include/SFML/Window/Window.h +++ b/bindings/c/include/SFML/Window/Window.h @@ -146,7 +146,7 @@ CSFML_API sfContextSettings sfWindow_GetSettings(const sfWindow* window); /// \return sfTrue if an event was returned, sfFalse if events stack was empty /// //////////////////////////////////////////////////////////// -CSFML_API sfBool sfWindow_GetEvent(sfWindow* window, sfEvent* event); +CSFML_API sfBool sfWindow_PollEvent(sfWindow* window, sfEvent* event); //////////////////////////////////////////////////////////// /// Wait for an event and return it diff --git a/bindings/c/src/SFML/Graphics/RenderWindow.cpp b/bindings/c/src/SFML/Graphics/RenderWindow.cpp index 0d78cba3..866d9ce2 100644 --- a/bindings/c/src/SFML/Graphics/RenderWindow.cpp +++ b/bindings/c/src/SFML/Graphics/RenderWindow.cpp @@ -158,14 +158,14 @@ sfContextSettings sfRenderWindow_GetSettings(const sfRenderWindow* renderWindow) //////////////////////////////////////////////////////////// /// Get the event on top of events stack of a window, if any, and pop it //////////////////////////////////////////////////////////// -sfBool sfRenderWindow_GetEvent(sfRenderWindow* renderWindow, sfEvent* event) +sfBool sfRenderWindow_PollEvent(sfRenderWindow* renderWindow, sfEvent* event) { CSFML_CHECK_RETURN(renderWindow, sfFalse); CSFML_CHECK_RETURN(event, sfFalse); // Get the event sf::Event SFMLEvent; - sfBool ret = renderWindow->This.GetEvent(SFMLEvent); + sfBool ret = renderWindow->This.PollEvent(SFMLEvent); // No event, return if (!ret) diff --git a/bindings/c/src/SFML/Window/Window.cpp b/bindings/c/src/SFML/Window/Window.cpp index 51c22a0a..3b9cf86d 100644 --- a/bindings/c/src/SFML/Window/Window.cpp +++ b/bindings/c/src/SFML/Window/Window.cpp @@ -150,14 +150,14 @@ sfContextSettings sfWindow_GetSettings(const sfWindow* window) //////////////////////////////////////////////////////////// /// Get the event on top of events stack of a window, if any, and pop it //////////////////////////////////////////////////////////// -sfBool sfWindow_GetEvent(sfWindow* window, sfEvent* event) +sfBool sfWindow_PollEvent(sfWindow* window, sfEvent* event) { CSFML_CHECK_RETURN(window, sfFalse); CSFML_CHECK_RETURN(event, sfFalse); // Get the event sf::Event SFMLEvent; - sfBool ret = window->This.GetEvent(SFMLEvent); + sfBool ret = window->This.PollEvent(SFMLEvent); // No event, return if (!ret) diff --git a/bindings/dotnet/extlibs/x64/csfml-audio-2.dll b/bindings/dotnet/extlibs/x64/csfml-audio-2.dll index 37e3315c..5217ada8 100644 Binary files a/bindings/dotnet/extlibs/x64/csfml-audio-2.dll and b/bindings/dotnet/extlibs/x64/csfml-audio-2.dll differ diff --git a/bindings/dotnet/extlibs/x64/csfml-graphics-2.dll b/bindings/dotnet/extlibs/x64/csfml-graphics-2.dll index 222097e1..d3b31eab 100644 Binary files a/bindings/dotnet/extlibs/x64/csfml-graphics-2.dll and b/bindings/dotnet/extlibs/x64/csfml-graphics-2.dll differ diff --git a/bindings/dotnet/extlibs/x64/csfml-window-2.dll b/bindings/dotnet/extlibs/x64/csfml-window-2.dll index 478fc640..6e8e5d95 100644 Binary files a/bindings/dotnet/extlibs/x64/csfml-window-2.dll and b/bindings/dotnet/extlibs/x64/csfml-window-2.dll differ diff --git a/bindings/dotnet/extlibs/x86/csfml-audio-2.dll b/bindings/dotnet/extlibs/x86/csfml-audio-2.dll index 99726798..f731f385 100644 Binary files a/bindings/dotnet/extlibs/x86/csfml-audio-2.dll and b/bindings/dotnet/extlibs/x86/csfml-audio-2.dll differ diff --git a/bindings/dotnet/extlibs/x86/csfml-graphics-2.dll b/bindings/dotnet/extlibs/x86/csfml-graphics-2.dll index 045e75fc..28293f8f 100644 Binary files a/bindings/dotnet/extlibs/x86/csfml-graphics-2.dll and b/bindings/dotnet/extlibs/x86/csfml-graphics-2.dll differ diff --git a/bindings/dotnet/extlibs/x86/csfml-window-2.dll b/bindings/dotnet/extlibs/x86/csfml-window-2.dll index f8e4e80b..48865ceb 100644 Binary files a/bindings/dotnet/extlibs/x86/csfml-window-2.dll and b/bindings/dotnet/extlibs/x86/csfml-window-2.dll differ diff --git a/bindings/dotnet/src/Graphics/RenderWindow.cs b/bindings/dotnet/src/Graphics/RenderWindow.cs index 76f9066d..709572f8 100644 --- a/bindings/dotnet/src/Graphics/RenderWindow.cs +++ b/bindings/dotnet/src/Graphics/RenderWindow.cs @@ -480,9 +480,9 @@ namespace SFML /// Variable to fill with the raw pointer to the event structure /// True if there was an event, false otherwise //////////////////////////////////////////////////////////// - protected override bool GetEvent(out Event eventToFill) + protected override bool PollEvent(out Event eventToFill) { - return sfRenderWindow_GetEvent(This, out eventToFill); + return sfRenderWindow_PollEvent(This, out eventToFill); } //////////////////////////////////////////////////////////// @@ -545,7 +545,7 @@ namespace SFML static extern void sfRenderWindow_Close(IntPtr This); [DllImport("csfml-graphics-2", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] - static extern bool sfRenderWindow_GetEvent(IntPtr This, out Event Evt); + static extern bool sfRenderWindow_PollEvent(IntPtr This, out Event Evt); [DllImport("csfml-graphics-2", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] static extern bool sfRenderWindow_WaitEvent(IntPtr This, out Event Evt); diff --git a/bindings/dotnet/src/Window/Window.cs b/bindings/dotnet/src/Window/Window.cs index 99239f78..ce428a00 100644 --- a/bindings/dotnet/src/Window/Window.cs +++ b/bindings/dotnet/src/Window/Window.cs @@ -383,7 +383,7 @@ namespace SFML public void DispatchEvents() { Event e; - while (GetEvent(out e)) + while (PollEvent(out e)) CallEventHandler(e); } @@ -421,9 +421,9 @@ namespace SFML /// Variable to fill with the raw pointer to the event structure /// True if there was an event, false otherwise //////////////////////////////////////////////////////////// - protected virtual bool GetEvent(out Event eventToFill) + protected virtual bool PollEvent(out Event eventToFill) { - return sfWindow_GetEvent(This, out eventToFill); + return sfWindow_PollEvent(This, out eventToFill); } //////////////////////////////////////////////////////////// @@ -611,7 +611,7 @@ namespace SFML static extern void sfWindow_Close(IntPtr This); [DllImport("csfml-window-2", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] - static extern bool sfWindow_GetEvent(IntPtr This, out Event Evt); + static extern bool sfWindow_PollEvent(IntPtr This, out Event Evt); [DllImport("csfml-window-2", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] static extern bool sfWindow_WaitEvent(IntPtr This, out Event Evt); diff --git a/examples/opengl/OpenGL.cpp b/examples/opengl/OpenGL.cpp index 251bda8e..367b6b03 100644 --- a/examples/opengl/OpenGL.cpp +++ b/examples/opengl/OpenGL.cpp @@ -61,7 +61,7 @@ int main() { // Process events sf::Event event; - while (window.GetEvent(event)) + while (window.PollEvent(event)) { // Close window : exit if (event.Type == sf::Event::Closed) diff --git a/examples/pong/Pong.cpp b/examples/pong/Pong.cpp index 747fbe85..adc9265e 100644 --- a/examples/pong/Pong.cpp +++ b/examples/pong/Pong.cpp @@ -81,7 +81,7 @@ int main() { // Handle events sf::Event event; - while (window.GetEvent(event)) + while (window.PollEvent(event)) { // Window closed or escape key pressed : exit if ((event.Type == sf::Event::Closed) || diff --git a/examples/shader/Shader.cpp b/examples/shader/Shader.cpp index bd5b134b..a145c087 100644 --- a/examples/shader/Shader.cpp +++ b/examples/shader/Shader.cpp @@ -173,7 +173,7 @@ test.Create(800, 600); { // Process events sf::Event event; - while (window.GetEvent(event)) + while (window.PollEvent(event)) { // Close window : exit if (event.Type == sf::Event::Closed) @@ -261,7 +261,7 @@ void DisplayError() { // Process events sf::Event event; - while (window.GetEvent(event)) + while (window.PollEvent(event)) { // Close window : exit if (event.Type == sf::Event::Closed) diff --git a/examples/window/Window.cpp b/examples/window/Window.cpp index 89a17f17..304fffcb 100644 --- a/examples/window/Window.cpp +++ b/examples/window/Window.cpp @@ -38,7 +38,7 @@ int main() { // Process events sf::Event event; - while (window.GetEvent(event)) + while (window.PollEvent(event)) { // Close window : exit if (event.Type == sf::Event::Closed) diff --git a/include/SFML/Graphics/RenderWindow.hpp b/include/SFML/Graphics/RenderWindow.hpp index 3b81183c..3fddc60a 100644 --- a/include/SFML/Graphics/RenderWindow.hpp +++ b/include/SFML/Graphics/RenderWindow.hpp @@ -194,7 +194,7 @@ private : /// { /// // Event processing /// sf::Event event; -/// while (window.GetEvent(event)) +/// while (window.PollEvent(event)) /// { /// // Request for closing the window /// if (event.Type == sf::Event::Closed) diff --git a/include/SFML/Window/Event.hpp b/include/SFML/Window/Event.hpp index 9a66e637..078da4d8 100644 --- a/include/SFML/Window/Event.hpp +++ b/include/SFML/Window/Event.hpp @@ -347,7 +347,7 @@ public : /// /// sf::Event holds all the informations about a system event /// that just happened. Events are retrieved using the -/// sf::Window::GetEvent function. +/// sf::Window::PollEvent and sf::Window::WaitEvent functions. /// /// A sf::Event instance contains the type of the event /// (mouse moved, key pressed, window closed, ...) as well @@ -363,7 +363,7 @@ public : /// Usage example: /// \code /// sf::Event event; -/// while (window.GetEvent(event)) +/// while (window.PollEvent(event)) /// { /// // Request for closing the window /// if (event.Type == sf::Event::Closed) diff --git a/include/SFML/Window/Window.hpp b/include/SFML/Window/Window.hpp index 726707bc..0a28d149 100644 --- a/include/SFML/Window/Window.hpp +++ b/include/SFML/Window/Window.hpp @@ -144,7 +144,7 @@ public : /// /// After calling this function, the sf::Window instance remains /// valid and you can call Create() to recreate the window. - /// All other functions such as GetEvent() or Display() will + /// All other functions such as PollEvent() or Display() will /// still work (i.e. you don't have to test IsOpened() every time), /// and will have no effect on closed windows. /// @@ -206,12 +206,12 @@ public : /// /// This function is not blocking: if there's no pending event then /// it will return false and leave \a event unmodified. - /// Note that more than event may be present in the events stack, + /// Note that more than one event may be present in the events stack, /// thus you should always call this function in a loop /// to make sure that you process every pending event. /// \code /// sf::Event event; - /// while (window.GetEvent(event)) + /// while (window.PollEvent(event)) /// { /// // process event... /// } @@ -224,7 +224,7 @@ public : /// \see WaitEvent /// //////////////////////////////////////////////////////////// - bool GetEvent(Event& event); + bool PollEvent(Event& event); //////////////////////////////////////////////////////////// /// \brief Wait for an event and return it @@ -248,7 +248,7 @@ public : /// /// \return False if any error occured /// - /// \see GetEvent + /// \see PollEvent /// //////////////////////////////////////////////////////////// bool WaitEvent(Event& event); @@ -472,7 +472,7 @@ private : /// \brief Processes an event before it is sent to the user /// /// This function is called every time an event is received - /// from the internal window (through GetEvent or WaitEvent). + /// from the internal window (through PollEvent or WaitEvent). /// It filters out unwanted events, and performs whatever internal /// stuff the window needs before the event is returned to the /// user. @@ -524,9 +524,9 @@ private : /// /// The sf::Window class provides a simple interface for manipulating /// the window: move, resize, show/hide, control mouse cursor, etc. -/// It also provides event handling through its GetEvent() function, -/// and real-time state handling with its attached sf::Input object -/// (see GetInput()). +/// It also provides event handling through its PollEvent() and WaitEvent() +/// functions, and real-time state handling with its attached sf::Input +/// object (see GetInput()). /// /// Note that OpenGL experts can pass their own parameters (antialiasing /// level, bits for the depth and stencil buffers, etc.) to the @@ -547,7 +547,7 @@ private : /// { /// // Event processing /// sf::Event event; -/// while (window.GetEvent(event)) +/// while (window.PollEvent(event)) /// { /// // Request for closing the window /// if (event.Type == sf::Event::Closed) diff --git a/src/SFML/Window/Window.cpp b/src/SFML/Window/Window.cpp index 944b0b9d..7e7912ce 100644 --- a/src/SFML/Window/Window.cpp +++ b/src/SFML/Window/Window.cpp @@ -204,7 +204,7 @@ const ContextSettings& Window::GetSettings() const //////////////////////////////////////////////////////////// -bool Window::GetEvent(Event& event) +bool Window::PollEvent(Event& event) { if (myWindow && myWindow->PopEvent(event, false)) {