Renamed Window::GetEvent to PollEvent

This commit is contained in:
Laurent Gomila 2011-04-11 18:20:21 +02:00
parent bacb698f1a
commit df6874273a
20 changed files with 32 additions and 32 deletions

View file

@ -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

View file

@ -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

View file

@ -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)

View file

@ -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)

View file

@ -480,9 +480,9 @@ namespace SFML
/// <param name="eventToFill">Variable to fill with the raw pointer to the event structure</param>
/// <returns>True if there was an event, false otherwise</returns>
////////////////////////////////////////////////////////////
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);

View file

@ -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
/// <param name="eventToFill">Variable to fill with the raw pointer to the event structure</param>
/// <returns>True if there was an event, false otherwise</returns>
////////////////////////////////////////////////////////////
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);