1 #ifndef BLOBS_TEST_EVENT_HPP_
2 #define BLOBS_TEST_EVENT_HPP_
10 inline void FakeKeyDown(int sym) {
13 e.key.keysym.sym = sym;
17 inline void FakeKeyUp(int sym) {
20 e.key.keysym.sym = sym;
24 inline void FakeKeyPress(int sym) {
29 inline void FakeMouseDown(int button = SDL_BUTTON_LEFT, int x = 0, int y = 0) {
31 e.type = SDL_MOUSEBUTTONDOWN;
32 e.button.button = button;
38 inline void FakeMouseUp(int button = SDL_BUTTON_LEFT, int x = 0, int y = 0) {
40 e.type = SDL_MOUSEBUTTONUP;
41 e.button.button = button;
47 inline void FakeMouseClick(int button = SDL_BUTTON_LEFT, int x = 0, int y = 0) {
48 FakeMouseDown(button, x, y);
49 FakeMouseUp(button, x, y);
52 inline void FakeMouseMotion(int xrel = 0, int yrel = 0) {
54 e.type = SDL_MOUSEMOTION;
60 inline void FakeMouseWheel(int y = 0, int x = 0) {
62 e.type = SDL_MOUSEWHEEL;
68 inline void FakeQuit() {