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

View File

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

View File

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