hx3d  1
2D/3D Simple Game Framework
events.hpp
1 /*
2  Event management.
3  Copyright (C) 2015 Denis BOURGE
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Lesser General Public
7  License as published by the Free Software Foundation; either
8  version 2.1 of the License, or (at your option) any later version.
9 
10  This library is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public
16  License along with this library; if not, write to the Free Software
17  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
18  USA
19 
20 
21  TODO
22  > Multi-touch management
23  > Gesture management
24 */
25 
26 #ifndef HX3D_WINDOW_EVENTS
27 #define HX3D_WINDOW_EVENTS
28 
29 namespace hx3d {
30 namespace window {
31 
35  class KeyEvent {
36  public:
40  enum class Type {
42  Pressed = 0,
44  Released,
45  None
46  };
47 
51  enum class Key {
52  A = 0, B, C, D, E,
53  F, G, H, I, J,
54  K, L, M, N, O,
55  P, Q, R, S, T,
56  U, V, W, X, Y, Z,
57  Space, Escape, Return,
58  AndroidBack, AndroidMenu,
59  None
60  };
61  };
62 
66  class WindowEvent {
67  public:
71  enum class Type {
73  Closed = 0,
75  Shown,
77  Moved,
78  None
79  };
80  };
81 
86  public:
90  enum class Type {
92  Clicked = 0,
94  Released,
95  None
96  };
97 
101  enum class Button {
103  Left = 0,
105  Middle,
107  Right,
109  Special1,
111  Special2,
112  None
113  };
114  };
115 
120  public:
124  enum class Direction {
126  Left = 0,
128  Right,
130  Up,
132  Down,
133  None
134  };
135  };
136 
140  class TouchEvent {
141  public:
145  enum class Type {
147  Touched = 0,
149  Released,
150  None
151  };
152  };
153 
154 } /* window */
155 } /* hx3d */
156 
157 #endif /* HX3D_WINDOW_EVENTS */
Mouse wheel event.
Definition: events.hpp:119
Type
Key event type.
Definition: events.hpp:40
Window event.
Definition: events.hpp:66
hx3d framework namespace
Definition: audio.hpp:26
Mouse button event.
Definition: events.hpp:85
Button
Mouse button value.
Definition: events.hpp:101
Direction
Mouse wheel direction.
Definition: events.hpp:124
Type
Window event type.
Definition: events.hpp:71
Type
Mouse action type.
Definition: events.hpp:90