Documentation de SFML 2.1

Attention: cette page se réfère à une ancienne version de SFML. Cliquez ici pour passer à la dernière version.
Event.hpp
1 
2 //
3 // SFML - Simple and Fast Multimedia Library
4 // Copyright (C) 2007-2013 Laurent Gomila (laurent.gom@gmail.com)
5 //
6 // This software is provided 'as-is', without any express or implied warranty.
7 // In no event will the authors be held liable for any damages arising from the use of this software.
8 //
9 // Permission is granted to anyone to use this software for any purpose,
10 // including commercial applications, and to alter it and redistribute it freely,
11 // subject to the following restrictions:
12 //
13 // 1. The origin of this software must not be misrepresented;
14 // you must not claim that you wrote the original software.
15 // If you use this software in a product, an acknowledgment
16 // in the product documentation would be appreciated but is not required.
17 //
18 // 2. Altered source versions must be plainly marked as such,
19 // and must not be misrepresented as being the original software.
20 //
21 // 3. This notice may not be removed or altered from any source distribution.
22 //
24 
25 #ifndef SFML_EVENT_HPP
26 #define SFML_EVENT_HPP
27 
29 // Headers
31 #include <SFML/Config.hpp>
32 #include <SFML/Window/Joystick.hpp>
33 #include <SFML/Window/Keyboard.hpp>
34 #include <SFML/Window/Mouse.hpp>
35 
36 
37 namespace sf
38 {
43 class Event
44 {
45 public :
46 
51  struct SizeEvent
52  {
53  unsigned int width;
54  unsigned int height;
55  };
56 
61  struct KeyEvent
62  {
64  bool alt;
65  bool control;
66  bool shift;
67  bool system;
68  };
69 
74  struct TextEvent
75  {
76  Uint32 unicode;
77  };
78 
84  {
85  int x;
86  int y;
87  };
88 
95  {
97  int x;
98  int y;
99  };
100 
106  {
107  int delta;
108  int x;
109  int y;
110  };
111 
118  {
119  unsigned int joystickId;
120  };
121 
127  {
128  unsigned int joystickId;
130  float position;
131  };
132 
139  {
140  unsigned int joystickId;
141  unsigned int button;
142  };
143 
149  {
168 
170  };
171 
173  // Member data
176 
177  union
178  {
188  };
189 };
190 
191 } // namespace sf
192 
193 
194 #endif // SFML_EVENT_HPP
195 
196