blob: f034690983db5c701f4bb8e1eb7894b943ba6610 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
#ifndef __FLATSERIAL_H__
#define __FLATSERIAL_H__
#include "types.h"
#include <vector>
#include "SDL2/SDL.h"
union SDL_Event;
class task_s;
struct SDL_EventCollector
{
task_s * checker;
task_s * eraser;
/* Keyboard event */
std::vector<SDL_Event> keyboard;
/* Window resize or iconize event */
std::vector<SDL_Event> window;
/* Quit notification */
std::vector<SDL_Event> quit;
/* Custom events: useful for signals */
std::vector<SDL_Event> user;
// TODO other events
SDL_EventCollector();
~SDL_EventCollector();
void collect(void*);
void erase(void*);
const std::vector<SDL_Event>& getStack(Uint32 id) const;
};
namespace FlatSerial {
extern SDL_EventCollector * collector;
}
#endif
|