25 #ifndef SFML_EVENT_HPP
26 #define SFML_EVENT_HPP
31 #include <SFML/Config.hpp>
32 #include <SFML/Window/Joystick.hpp>
33 #include <SFML/Window/Keyboard.hpp>
34 #include <SFML/Window/Mouse.hpp>
35 #include <SFML/Window/Sensor.hpp>
241 #endif // SFML_EVENT_HPP
A key was pressed (data in event.key)
float z
Current value of the sensor on Z axis.
A key was released (data in event.key)
The joystick moved along an axis (data in event.joystickMove)
Joystick connection events parameters (JoystickConnected, JoystickDisconnected)
The mouse cursor left the area of the window (no data)
EventType
Enumeration of the different types of events.
bool control
Is the Control key pressed?
Text event parameters (TextEntered)
The window lost the focus (no data)
bool system
Is the System key pressed?
Mouse wheel events parameters (MouseWheelMoved)
unsigned int width
New width, in pixels.
The mouse cursor entered the area of the window (no data)
A joystick button was pressed (data in event.joystickButton)
Sensor::Type type
Type of the sensor.
A sensor value changed (data in event.sensor)
A mouse button was pressed (data in event.mouseButton)
A touch event ended (data in event.touch)
The mouse cursor moved (data in event.mouseMove)
unsigned int height
New height, in pixels.
The mouse wheel was scrolled (data in event.mouseWheel) (deprecated)
The window gained the focus (no data)
int x
X position of the mouse pointer, relative to the left of the owner window.
int x
X position of the mouse pointer, relative to the left of the owner window.
A touch moved (data in event.touch)
bool shift
Is the Shift key pressed?
float y
Current value of the sensor on Y axis.
Defines a system event and its parameters.
Touch events parameters (TouchBegan, TouchMoved, TouchEnded)
unsigned int joystickId
Index of the joystick (in range [0 .. Joystick::Count - 1])
Keyboard::Key code
Code of the key that has been pressed.
Axis
Axes supported by SFML joysticks.
Keyboard event parameters (KeyPressed, KeyReleased)
int y
Y position of the touch, relative to the top of the owner window.
Joystick::Axis axis
Axis on which the joystick moved.
JoystickButtonEvent joystickButton
Joystick button event parameters (Event::JoystickButtonPressed, Event::JoystickButtonReleased) ...
Size events parameters (Resized)
The window requested to be closed (no data)
The mouse wheel was scrolled (data in event.mouseWheelScroll)
unsigned int joystickId
Index of the joystick (in range [0 .. Joystick::Count - 1])
Uint32 unicode
UTF-32 Unicode value of the character.
MouseWheelEvent mouseWheel
Mouse wheel event parameters (Event::MouseWheelMoved) (deprecated)
Mouse move event parameters (MouseMoved)
int x
X position of the touch, relative to the left of the owner window.
A character was entered (data in event.text)
The window was resized (data in event.size)
TextEvent text
Text event parameters (Event::TextEntered)
MouseMoveEvent mouseMove
Mouse move event parameters (Event::MouseMoved)
MouseButtonEvent mouseButton
Mouse button event parameters (Event::MouseButtonPressed, Event::MouseButtonReleased) ...
unsigned int finger
Index of the finger in case of multi-touch events.
A joystick button was released (data in event.joystickButton)
Sensor event parameters (SensorChanged)
JoystickMoveEvent joystickMove
Joystick move event parameters (Event::JoystickMoved)
float x
Current value of the sensor on X axis.
MouseWheelScrollEvent mouseWheelScroll
Mouse wheel event parameters (Event::MouseWheelScrolled)
float position
New position on the axis (in range [-100 .. 100])
EventType type
Type of the event.
SensorEvent sensor
Sensor event parameters (Event::SensorChanged)
KeyEvent key
Key event parameters (Event::KeyPressed, Event::KeyReleased)
A mouse button was released (data in event.mouseButton)
int y
Y position of the mouse pointer, relative to the top of the owner window.
JoystickConnectEvent joystickConnect
Joystick (dis)connect event parameters (Event::JoystickConnected, Event::JoystickDisconnected) ...
A joystick was connected (data in event.joystickConnect)
TouchEvent touch
Touch events parameters (Event::TouchBegan, Event::TouchMoved, Event::TouchEnded) ...
int delta
Number of ticks the wheel has moved (positive is up, negative is down)
A touch event began (data in event.touch)
A joystick was disconnected (data in event.joystickConnect)
Keep last – the total number of event types.
SizeEvent size
Size event parameters (Event::Resized)
bool alt
Is the Alt key pressed?
Joystick axis move event parameters (JoystickMoved)
int y
Y position of the mouse pointer, relative to the top of the owner window.