#ifndef __FLATSERIAL_H__ #define __FLATSERIAL_H__ #include "types.hpp" #include #include "SDL2/SDL.h" union SDL_Event; class task_s; struct SDL_EventCollector { task_s * checker; task_s * eraser; /* Keyboard event */ std::vector keyboard; /* Window resize or iconize event */ std::vector window; /* Quit notification */ std::vector quit; /* Custom events: useful for signals */ std::vector user; // TODO other events SDL_EventCollector(); ~SDL_EventCollector(); void collect(void*); void erase(void*); const std::vector& getStack(uint32_t id) const; }; namespace FlatSerial { extern SDL_EventCollector * collector; } #endif