Mercurial > sdl-ios-xcode
comparison include/SDL_events.h @ 3132:88861448961f gsoc2009_IME
Add SDL_TEXTEDTING event to inform application about marked text.
author | Jiang Jiang <gzjjgod@gmail.com> |
---|---|
date | Wed, 01 Jul 2009 07:33:58 +0000 |
parents | 9da8f57ab92c |
children |
comparison
equal
deleted
inserted
replaced
3131:009bd8f81947 | 3132:88861448961f |
---|---|
72 SDL_JOYBUTTONUP, /**< Joystick button released */ | 72 SDL_JOYBUTTONUP, /**< Joystick button released */ |
73 SDL_QUIT, /**< User-requested quit */ | 73 SDL_QUIT, /**< User-requested quit */ |
74 SDL_SYSWMEVENT, /**< System specific event */ | 74 SDL_SYSWMEVENT, /**< System specific event */ |
75 SDL_PROXIMITYIN, /**< Proximity In event */ | 75 SDL_PROXIMITYIN, /**< Proximity In event */ |
76 SDL_PROXIMITYOUT, /**< Proximity Out event */ | 76 SDL_PROXIMITYOUT, /**< Proximity Out event */ |
77 SDL_EVENT_RESERVED1, /**< Reserved for future use... */ | 77 SDL_EVENT_RESERVED1, |
78 SDL_EVENT_RESERVED2, | 78 SDL_EVENT_RESERVED2, |
79 SDL_EVENT_RESERVED3, | 79 SDL_EVENT_RESERVED3, |
80 SDL_TEXTEDITING, /**< Reserved for future use... */ | |
80 /* Events SDL_USEREVENT through SDL_MAXEVENTS-1 are for your use */ | 81 /* Events SDL_USEREVENT through SDL_MAXEVENTS-1 are for your use */ |
81 SDL_USEREVENT = 24, | 82 SDL_USEREVENT = 24, |
82 /* This last event is only for bounding internal arrays | 83 /* This last event is only for bounding internal arrays |
83 It is the number of bits in the event mask datatype -- Uint32 | 84 It is the number of bits in the event mask datatype -- Uint32 |
84 */ | 85 */ |
114 SDL_EVENTMASK(SDL_JOYHATMOTION) | | 115 SDL_EVENTMASK(SDL_JOYHATMOTION) | |
115 SDL_EVENTMASK(SDL_JOYBUTTONDOWN) | SDL_EVENTMASK(SDL_JOYBUTTONUP), | 116 SDL_EVENTMASK(SDL_JOYBUTTONDOWN) | SDL_EVENTMASK(SDL_JOYBUTTONUP), |
116 SDL_QUITMASK = SDL_EVENTMASK(SDL_QUIT), | 117 SDL_QUITMASK = SDL_EVENTMASK(SDL_QUIT), |
117 SDL_SYSWMEVENTMASK = SDL_EVENTMASK(SDL_SYSWMEVENT), | 118 SDL_SYSWMEVENTMASK = SDL_EVENTMASK(SDL_SYSWMEVENT), |
118 SDL_PROXIMITYINMASK = SDL_EVENTMASK(SDL_PROXIMITYIN), | 119 SDL_PROXIMITYINMASK = SDL_EVENTMASK(SDL_PROXIMITYIN), |
119 SDL_PROXIMITYOUTMASK = SDL_EVENTMASK(SDL_PROXIMITYOUT) | 120 SDL_PROXIMITYOUTMASK = SDL_EVENTMASK(SDL_PROXIMITYOUT), |
121 SDL_TEXTEDITINGMASK = SDL_EVENTMASK(SDL_TEXTEDITING) | |
120 } SDL_EventMask; | 122 } SDL_EventMask; |
121 #define SDL_ALLEVENTS 0xFFFFFFFF | 123 #define SDL_ALLEVENTS 0xFFFFFFFF |
122 | 124 |
123 /** | 125 /** |
124 * \struct SDL_WindowEvent | 126 * \struct SDL_WindowEvent |
159 Uint8 type; /**< SDL_TEXTINPUT */ | 161 Uint8 type; /**< SDL_TEXTINPUT */ |
160 Uint8 which; /**< The keyboard device index */ | 162 Uint8 which; /**< The keyboard device index */ |
161 char text[SDL_TEXTINPUTEVENT_TEXT_SIZE]; /**< The input text */ | 163 char text[SDL_TEXTINPUTEVENT_TEXT_SIZE]; /**< The input text */ |
162 SDL_WindowID windowID; /**< The window with keyboard focus, if any */ | 164 SDL_WindowID windowID; /**< The window with keyboard focus, if any */ |
163 } SDL_TextInputEvent; | 165 } SDL_TextInputEvent; |
166 | |
167 /** | |
168 * \struct SDL_TextEditingEvent | |
169 * | |
170 * \brief Keyboard text editing event structure (event.edit.*) | |
171 */ | |
172 #define SDL_TEXTEDITINGEVENT_TEXT_SIZE (32) | |
173 typedef struct SDL_TextEditingEvent | |
174 { | |
175 Uint8 type; /**< SDL_TEXTEDITING */ | |
176 char text[SDL_TEXTEDITINGEVENT_TEXT_SIZE]; /**< The editing text */ | |
177 int start; /**< The start cursor of selected editing text */ | |
178 int length; /**< The length of selected editing text */ | |
179 } SDL_TextEditingEvent; | |
164 | 180 |
165 /** | 181 /** |
166 * \struct SDL_MouseMotionEvent | 182 * \struct SDL_MouseMotionEvent |
167 * | 183 * |
168 * \brief Mouse motion event structure (event.motion.*) | 184 * \brief Mouse motion event structure (event.motion.*) |
356 SDL_JoyButtonEvent jbutton; /**< Joystick button event data */ | 372 SDL_JoyButtonEvent jbutton; /**< Joystick button event data */ |
357 SDL_QuitEvent quit; /**< Quit request event data */ | 373 SDL_QuitEvent quit; /**< Quit request event data */ |
358 SDL_UserEvent user; /**< Custom event data */ | 374 SDL_UserEvent user; /**< Custom event data */ |
359 SDL_SysWMEvent syswm; /**< System dependent window event data */ | 375 SDL_SysWMEvent syswm; /**< System dependent window event data */ |
360 SDL_ProximityEvent proximity; /**< Proximity In or Out event */ | 376 SDL_ProximityEvent proximity; /**< Proximity In or Out event */ |
377 SDL_TextEditingEvent edit; /**< Text editing event data */ | |
361 | 378 |
362 /* Temporarily here for backwards compatibility */ | 379 /* Temporarily here for backwards compatibility */ |
363 SDL_ActiveEvent active; | 380 SDL_ActiveEvent active; |
364 SDL_ResizeEvent resize; | 381 SDL_ResizeEvent resize; |
365 } SDL_Event; | 382 } SDL_Event; |