Moved Polling methods to SDL2pp::Event namespace

This commit is contained in:
Vraiment 2017-07-22 15:13:12 -07:00
parent 902075453f
commit b7e977638b
3 changed files with 110 additions and 105 deletions

View File

@ -22,6 +22,7 @@
#include <SDL2pp/EventPolling.hh>
namespace SDL2pp {
namespace Event {
bool PollEvent() {
SDL_Event event;
auto result = SDL_PollEvent(&event);
@ -37,3 +38,4 @@ namespace SDL2pp {
return result;
}
}
}

View File

@ -27,6 +27,7 @@
#include <SDL2pp/Export.hh>
namespace SDL2pp {
namespace Event {
////////////////////////////////////////////////////////////
/// \brief Polls a single event
///
@ -125,5 +126,6 @@ namespace SDL2pp {
return result;
}
}
}
#endif

View File

@ -8,6 +8,7 @@
#include <vector>
using namespace SDL2pp;
using namespace SDL2pp::Event;
using namespace std;
inline SDL_Event PushUserEvent(Sint32 userCode = 0, void *data1 = nullptr, void *data2 = nullptr) {