Typedef'd structures in Event.h

This commit is contained in:
Laurent Gomila committed 2012-09-29 22:39:34 +02:00
1 parent 9ee38bd681
commit 5a60afa475
1 file changed
+28 -28
+28 -28
View File
@@ -64,7 +64,7 @@ typedef enum
/// \brief Keyboard event parameters /// \brief Keyboard event parameters
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
struct sfKeyEvent typedef struct
{ {
sfEventType type; sfEventType type;
sfKeyCode code; sfKeyCode code;
@@ -72,96 +72,96 @@ struct sfKeyEvent
sfBool control; sfBool control;
sfBool shift; sfBool shift;
sfBool system; sfBool system;
}; } sfKeyEvent;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Text event parameters /// \brief Text event parameters
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
struct sfTextEvent typedef struct
{ {
sfEventType type; sfEventType type;
sfUint32 unicode; sfUint32 unicode;
}; } sfTextEvent;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Mouse move event parameters /// \brief Mouse move event parameters
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
struct sfMouseMoveEvent typedef struct
{ {
sfEventType type; sfEventType type;
int x; int x;
int y; int y;
}; } sfMouseMoveEvent;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Mouse buttons events parameters /// \brief Mouse buttons events parameters
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
struct sfMouseButtonEvent typedef struct
{ {
sfEventType type; sfEventType type;
sfMouseButton button; sfMouseButton button;
int x; int x;
int y; int y;
}; } sfMouseButtonEvent;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Mouse wheel events parameters /// \brief Mouse wheel events parameters
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
struct sfMouseWheelEvent typedef struct
{ {
sfEventType type; sfEventType type;
int delta; int delta;
int x; int x;
int y; int y;
}; } sfMouseWheelEvent;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Joystick axis move event parameters /// \brief Joystick axis move event parameters
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
struct sfJoystickMoveEvent typedef struct
{ {
sfEventType type; sfEventType type;
unsigned int joystickId; unsigned int joystickId;
sfJoystickAxis axis; sfJoystickAxis axis;
float position; float position;
}; } sfJoystickMoveEvent;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Joystick buttons events parameters /// \brief Joystick buttons events parameters
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
struct sfJoystickButtonEvent typedef struct
{ {
sfEventType type; sfEventType type;
unsigned int joystickId; unsigned int joystickId;
unsigned int button; unsigned int button;
}; } sfJoystickButtonEvent;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Joystick connection/disconnection event parameters /// \brief Joystick connection/disconnection event parameters
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
struct sfJoystickConnectEvent typedef struct
{ {
sfEventType type; sfEventType type;
unsigned int joystickId; unsigned int joystickId;
}; } sfJoystickConnectEvent;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Size events parameters /// \brief Size events parameters
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
struct sfSizeEvent typedef struct
{ {
sfEventType type; sfEventType type;
unsigned int width; unsigned int width;
unsigned int height; unsigned int height;
}; } sfSizeEvent;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
@@ -173,16 +173,16 @@ typedef union
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Member data // Member data
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
sfEventType type; ///< Type of the event sfEventType type; ///< Type of the event
struct sfSizeEvent size; sfSizeEvent size;
struct sfKeyEvent key; sfKeyEvent key;
struct sfTextEvent text; sfTextEvent text;
struct sfMouseMoveEvent mouseMove; sfMouseMoveEvent mouseMove;
struct sfMouseButtonEvent mouseButton; sfMouseButtonEvent mouseButton;
struct sfMouseWheelEvent mouseWheel; sfMouseWheelEvent mouseWheel;
struct sfJoystickMoveEvent joystickMove; sfJoystickMoveEvent joystickMove;
struct sfJoystickButtonEvent joystickButton; sfJoystickButtonEvent joystickButton;
struct sfJoystickConnectEvent joystickConnect; sfJoystickConnectEvent joystickConnect;
} sfEvent; } sfEvent;