Event#

Enums

enum sfEventType#

Definition of all the event types.

Values:

enumerator sfEvtClosed#

The window requested to be closed (no data)

enumerator sfEvtResized#

The window was resized (data in event.size)

enumerator sfEvtLostFocus#

The window lost the focus (no data)

enumerator sfEvtGainedFocus#

The window gained the focus (no data)

enumerator sfEvtTextEntered#

A character was entered (data in event.text)

enumerator sfEvtKeyPressed#

A key was pressed (data in event.key)

enumerator sfEvtKeyReleased#

A key was released (data in event.key)

enumerator sfEvtMouseWheelMoved#

The mouse wheel was scrolled (data in event.mouseWheel) (deprecated)

enumerator sfEvtMouseWheelScrolled#

The mouse wheel was scrolled (data in event.mouseWheelScroll)

enumerator sfEvtMouseButtonPressed#

A mouse button was pressed (data in event.mouseButton)

enumerator sfEvtMouseButtonReleased#

A mouse button was released (data in event.mouseButton)

enumerator sfEvtMouseMoved#

The mouse cursor moved (data in event.mouseMove)

enumerator sfEvtMouseEntered#

The mouse cursor entered the area of the window (no data)

enumerator sfEvtMouseLeft#

The mouse cursor left the area of the window (no data)

enumerator sfEvtJoystickButtonPressed#

A joystick button was pressed (data in event.joystickButton)

enumerator sfEvtJoystickButtonReleased#

A joystick button was released (data in event.joystickButton)

enumerator sfEvtJoystickMoved#

The joystick moved along an axis (data in event.joystickMove)

enumerator sfEvtJoystickConnected#

A joystick was connected (data in event.joystickConnect)

enumerator sfEvtJoystickDisconnected#

A joystick was disconnected (data in event.joystickConnect)

enumerator sfEvtTouchBegan#

A touch event began (data in event.touch)

enumerator sfEvtTouchMoved#

A touch moved (data in event.touch)

enumerator sfEvtTouchEnded#

A touch event ended (data in event.touch)

enumerator sfEvtSensorChanged#

A sensor value changed (data in event.sensor)

enumerator sfEvtCount#

Keep last — the total number of event types.

struct sfKeyEvent#
#include <Event.h>

Keyboard event parameters.

Public Members

sfEventType type#
sfKeyCode code#
sfBool alt#
sfBool control#
sfBool shift#
sfBool system#
struct sfTextEvent#
#include <Event.h>

Text event parameters.

Public Members

sfEventType type#
sfUint32 unicode#
struct sfMouseMoveEvent#
#include <Event.h>

Mouse move event parameters.

Public Members

sfEventType type#
int x#
int y#
struct sfMouseButtonEvent#
#include <Event.h>

Mouse buttons events parameters.

Public Members

sfEventType type#
sfMouseButton button#
int x#
int y#
struct sfMouseWheelEvent#
#include <Event.h>

Mouse wheel events parameters.

Deprecated:

Use sfMouseWheelScrollEvent instead.

Public Members

sfEventType type#
int delta#
int x#
int y#
struct sfMouseWheelScrollEvent#
#include <Event.h>

Mouse wheel events parameters.

Public Members

sfEventType type#
sfMouseWheel wheel#
float delta#
int x#
int y#
struct sfJoystickMoveEvent#
#include <Event.h>

Joystick axis move event parameters.

Public Members

sfEventType type#
unsigned int joystickId#
sfJoystickAxis axis#
float position#
struct sfJoystickButtonEvent#
#include <Event.h>

Joystick buttons events parameters.

Public Members

sfEventType type#
unsigned int joystickId#
unsigned int button#
struct sfJoystickConnectEvent#
#include <Event.h>

Joystick connection/disconnection event parameters.

Public Members

sfEventType type#
unsigned int joystickId#
struct sfSizeEvent#
#include <Event.h>

Size events parameters.

Public Members

sfEventType type#
unsigned int width#
unsigned int height#
struct sfTouchEvent#
#include <Event.h>

Touch events parameters.

Public Members

sfEventType type#
unsigned int finger#
int x#
int y#
struct sfSensorEvent#
#include <Event.h>

Sensor event parameters.

Public Members

sfEventType type#
sfSensorType sensorType#
float x#
float y#
float z#
union sfEvent#
#include <Event.h>

sfEvent defines a system event and its parameters

Public Members

sfEventType type#

Type of the event.

sfSizeEvent size#

Size event parameters.

sfKeyEvent key#

Key event parameters.

sfTextEvent text#

Text event parameters.

sfMouseMoveEvent mouseMove#

Mouse move event parameters.

sfMouseButtonEvent mouseButton#

Mouse button event parameters.

sfMouseWheelEvent mouseWheel#

Mouse wheel event parameters (deprecated)

sfMouseWheelScrollEvent mouseWheelScroll#

Mouse wheel event parameters.

sfJoystickMoveEvent joystickMove#

Joystick move event parameters.

sfJoystickButtonEvent joystickButton#

Joystick button event parameters.

sfJoystickConnectEvent joystickConnect#

Joystick (dis)connect event parameters.

sfTouchEvent touch#

Touch events parameters.

sfSensorEvent sensor#

Sensor event parameters.