include/SDL_events.h
branchgsoc2009_IME
changeset 3132 88861448961f
parent 3072 9da8f57ab92c
     1.1 --- a/include/SDL_events.h	Wed Jul 01 05:52:17 2009 +0000
     1.2 +++ b/include/SDL_events.h	Wed Jul 01 07:33:58 2009 +0000
     1.3 @@ -74,9 +74,10 @@
     1.4      SDL_SYSWMEVENT,             /**< System specific event */
     1.5      SDL_PROXIMITYIN,            /**< Proximity In event */
     1.6      SDL_PROXIMITYOUT,           /**< Proximity Out event */
     1.7 -    SDL_EVENT_RESERVED1,        /**< Reserved for future use... */
     1.8 +    SDL_EVENT_RESERVED1,
     1.9      SDL_EVENT_RESERVED2,
    1.10      SDL_EVENT_RESERVED3,
    1.11 +    SDL_TEXTEDITING,            /**< Reserved for future use... */
    1.12      /* Events SDL_USEREVENT through SDL_MAXEVENTS-1 are for your use */
    1.13      SDL_USEREVENT = 24,
    1.14      /* This last event is only for bounding internal arrays
    1.15 @@ -116,7 +117,8 @@
    1.16      SDL_QUITMASK = SDL_EVENTMASK(SDL_QUIT),
    1.17      SDL_SYSWMEVENTMASK = SDL_EVENTMASK(SDL_SYSWMEVENT),
    1.18      SDL_PROXIMITYINMASK = SDL_EVENTMASK(SDL_PROXIMITYIN),
    1.19 -    SDL_PROXIMITYOUTMASK = SDL_EVENTMASK(SDL_PROXIMITYOUT)
    1.20 +    SDL_PROXIMITYOUTMASK = SDL_EVENTMASK(SDL_PROXIMITYOUT),
    1.21 +    SDL_TEXTEDITINGMASK = SDL_EVENTMASK(SDL_TEXTEDITING)
    1.22  } SDL_EventMask;
    1.23  #define SDL_ALLEVENTS		0xFFFFFFFF
    1.24  
    1.25 @@ -163,6 +165,20 @@
    1.26  } SDL_TextInputEvent;
    1.27  
    1.28  /**
    1.29 + * \struct SDL_TextEditingEvent
    1.30 + *
    1.31 + * \brief Keyboard text editing event structure (event.edit.*)
    1.32 + */
    1.33 +#define SDL_TEXTEDITINGEVENT_TEXT_SIZE (32)
    1.34 +typedef struct SDL_TextEditingEvent
    1.35 +{
    1.36 +    Uint8 type;                                 /**< SDL_TEXTEDITING */
    1.37 +    char text[SDL_TEXTEDITINGEVENT_TEXT_SIZE];  /**< The editing text */
    1.38 +    int start;                                  /**< The start cursor of selected editing text */
    1.39 +    int length;                                 /**< The length of selected editing text */
    1.40 +} SDL_TextEditingEvent;
    1.41 +
    1.42 +/**
    1.43   * \struct SDL_MouseMotionEvent
    1.44   *
    1.45   * \brief Mouse motion event structure (event.motion.*)
    1.46 @@ -358,6 +374,7 @@
    1.47      SDL_UserEvent user;             /**< Custom event data */
    1.48      SDL_SysWMEvent syswm;           /**< System dependent window event data */
    1.49      SDL_ProximityEvent proximity;   /**< Proximity In or Out event */
    1.50 +    SDL_TextEditingEvent edit;      /**< Text editing event data */
    1.51  
    1.52      /* Temporarily here for backwards compatibility */
    1.53      SDL_ActiveEvent active;