include/SDL_events.h
changeset 3280 00cace2d9080
parent 3191 91b335df6fc8
child 3407 d3baf5ac4e37
     1.1 --- a/include/SDL_events.h	Sat Sep 19 12:48:52 2009 +0000
     1.2 +++ b/include/SDL_events.h	Sat Sep 19 13:29:40 2009 +0000
     1.3 @@ -60,6 +60,7 @@
     1.4      SDL_WINDOWEVENT,            /**< Window state change */
     1.5      SDL_KEYDOWN,                /**< Keys pressed */
     1.6      SDL_KEYUP,                  /**< Keys released */
     1.7 +    SDL_TEXTEDITING,            /**< Keyboard text editing (composition) */
     1.8      SDL_TEXTINPUT,              /**< Keyboard text input */
     1.9      SDL_MOUSEMOTION,            /**< Mouse moved */
    1.10      SDL_MOUSEBUTTONDOWN,        /**< Mouse button pressed */
    1.11 @@ -97,6 +98,7 @@
    1.12      SDL_KEYDOWNMASK = SDL_EVENTMASK(SDL_KEYDOWN),
    1.13      SDL_KEYUPMASK = SDL_EVENTMASK(SDL_KEYUP),
    1.14      SDL_KEYEVENTMASK = SDL_EVENTMASK(SDL_KEYDOWN) | SDL_EVENTMASK(SDL_KEYUP),
    1.15 +    SDL_TEXTEDITINGMASK = SDL_EVENTMASK(SDL_TEXTEDITING),
    1.16      SDL_TEXTINPUTMASK = SDL_EVENTMASK(SDL_TEXTINPUT),
    1.17      SDL_MOUSEMOTIONMASK = SDL_EVENTMASK(SDL_MOUSEMOTION),
    1.18      SDL_MOUSEBUTTONDOWNMASK = SDL_EVENTMASK(SDL_MOUSEBUTTONDOWN),
    1.19 @@ -149,6 +151,20 @@
    1.20  } SDL_KeyboardEvent;
    1.21  
    1.22  /**
    1.23 + * \struct SDL_TextEditingEvent
    1.24 + *
    1.25 + * \brief Keyboard text editing event structure (event.edit.*)
    1.26 + */
    1.27 +#define SDL_TEXTEDITINGEVENT_TEXT_SIZE (32)
    1.28 +typedef struct SDL_TextEditingEvent
    1.29 +{
    1.30 +    Uint8 type;                                 /**< SDL_TEXTEDITING */
    1.31 +    char text[SDL_TEXTEDITINGEVENT_TEXT_SIZE];  /**< The editing text */
    1.32 +    int start;                                  /**< The start cursor of selected editing text */
    1.33 +    int length;                                 /**< The length of selected editing text */
    1.34 +} SDL_TextEditingEvent;
    1.35 +
    1.36 +/**
    1.37   * \struct SDL_TextInputEvent
    1.38   *
    1.39   * \brief Keyboard text input event structure (event.text.*)
    1.40 @@ -350,6 +366,7 @@
    1.41      Uint8 type;                     /**< Event type, shared with all events */
    1.42      SDL_WindowEvent window;         /**< Window event data */
    1.43      SDL_KeyboardEvent key;          /**< Keyboard event data */
    1.44 +    SDL_TextEditingEvent edit;      /**< Text editing event data */
    1.45      SDL_TextInputEvent text;        /**< Text input event data */
    1.46      SDL_MouseMotionEvent motion;    /**< Mouse motion event data */
    1.47      SDL_MouseButtonEvent button;    /**< Mouse button event data */