diff include/SDL_events.h @ 2300:c97ad1abe05b

Minimal implementation of textinput events for x11. It only works for latin-1.
author Bob Pendleton <bob@pendleton.com>
date Tue, 15 Jan 2008 22:37:17 +0000
parents 003c1b5b07da
children f1d07ba2e275 44e49d3fa6cf 64f346a83ed3
line wrap: on
line diff
--- a/include/SDL_events.h	Sat Jan 12 18:07:06 2008 +0000
+++ b/include/SDL_events.h	Tue Jan 15 22:37:17 2008 +0000
@@ -149,12 +149,13 @@
  *
  * \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 @@
     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 */