-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy patheventHandler.h
executable file
·42 lines (32 loc) · 1.01 KB
/
eventHandler.h
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
#pragma once
#include <map>
#include "opengl.h"
#include <set>
#include <string>
#include "config.h"
#include "Logger.h"
#include "Universe.h"
#include "Game.h"
#include "KeyboardEvent.h"
#include "MouseEvent.h"
#include "RefreshEvent.h"
#define repeatKey if (keysPressed[key])\
glutTimerFunc(KEY_REPEAT_PERIOD, keyboardHandler, key);
class Game;
void setGame(Game* _game);
// Window and display handling
void displayHandler();
void windowResizingHandler(const int width, const int height);
void windowStatusHandler(const int state);
#ifdef __APPLE__
void windowClosingHandler();
#endif
// Keyboard handling
void keyboard(const int value);
void keyDown(const unsigned char key, const int x, const int y);
void specialKeyDown(const int key, const int x, const int y);
void keyUp(const unsigned char key, const int x, const int y);
// Mouse handling
void mouseHandler(const int button, const int state, const int x, const int y);
void motionHandler(const int width, const int height);
void tick();