summaryrefslogtreecommitdiff
path: root/include/SDL_events.h
diff options
context:
space:
mode:
authorBob Pendleton <bob@pendleton.com>2008-01-15 22:37:17 +0000
committerBob Pendleton <bob@pendleton.com>2008-01-15 22:37:17 +0000
commit79041b0a87b5c7906fbb1e03705b74b8bbcadd2b (patch)
treefe4108f800576a477bda1b1d83f36345db83f8df /include/SDL_events.h
parent05ad8bbf5139114ddfe6d429347a5e1a1b45e4b7 (diff)
Minimal implementation of textinput events for x11. It only works for latin-1.
--HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%402709
Diffstat (limited to 'include/SDL_events.h')
-rw-r--r--include/SDL_events.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/include/SDL_events.h b/include/SDL_events.h
index f06a8ba3..d26cf09d 100644
--- a/include/SDL_events.h
+++ b/include/SDL_events.h
@@ -149,12 +149,13 @@ typedef struct SDL_KeyboardEvent
*
* \brief Keyboard text input event structure (event.text.*)
*/
+#define SDL_TEXTINPUTEVENT_TEXT_SIZE (32)
typedef struct SDL_TextInputEvent
{
- Uint8 type; /**< SDL_TEXTINPUT */
- Uint8 which; /**< The keyboard device index */
- char text[32]; /**< The input text */
- SDL_WindowID windowID; /**< The window with keyboard focus, if any */
+ Uint8 type; /**< SDL_TEXTINPUT */
+ Uint8 which; /**< The keyboard device index */
+ char text[SDL_TEXTINPUTEVENT_TEXT_SIZE]; /**< The input text */
+ SDL_WindowID windowID; /**< The window with keyboard focus, if any */
} SDL_TextInputEvent;
/**
@@ -325,10 +326,10 @@ typedef union SDL_Event
Uint8 type; /**< Event type, shared with all events */
SDL_WindowEvent window; /**< Window event data */
SDL_KeyboardEvent key; /**< Keyboard event data */
- SDL_TextInputEvent text; /**< Text input event data */
+ SDL_TextInputEvent text; /**< Text input event data */
SDL_MouseMotionEvent motion; /**< Mouse motion event data */
SDL_MouseButtonEvent button; /**< Mouse button event data */
- SDL_MouseWheelEvent wheel; /**< Mouse wheel event data */
+ SDL_MouseWheelEvent wheel; /**< Mouse wheel event data */
SDL_JoyAxisEvent jaxis; /**< Joystick axis event data */
SDL_JoyBallEvent jball; /**< Joystick ball event data */
SDL_JoyHatEvent jhat; /**< Joystick hat event data */