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