Mercurial > sdl-ios-xcode
annotate docs/html/eventstructures.html @ 3978:b966761fef6c SDL-1.2
Significantly improved XIM support.
Fixes Bugzilla #429.
Selected notes from the patch's README:
= FIXES =
This patch fixes the above issues as follows.
== X11 events ==
Moved XFilterEvent just after XNextEvent so that all events are passed
to it. Also, XFilterEvent will receive masks indicated by IM through
XNFilterEvents IC value as well as masks surpplied by SDL.
X11_KeyRepeat is called between XNextEvent and XFilterEvent, after
testing an event is a KeyRelease. I'm not 100% comfortable to do so,
but I couldn't find a better timing to call it, and use of the
function is inevitable.
== Xutf8LookupString ==
Used a longer buffer to receive UTF-8 string. If it is insufficient,
a dynamic storage of the requested size will be allocated. The
initial size of the buffer is set to 32, because the Japanese text
converted from the most widely used benchmark key sequence for
Japanese IM, "WATASHINONAMAEHANAKANODESU." has ten Japanese characters
in it, that occupies 30 bytes when encoded in UTF-8.
== SDL_keysym.unicode ==
On Windows version of SDL implementation, SDL_keysym.unicode stores
UTF-16 encoded unicode characters, one UTF-16 encoding unit per an SDL
event. A Unicode supplementary characters are sent to an application
as two events. (One with a high surrogate and another with a low
surrogate.) The behavior seems reasonable since it is upward
compatible with existing handling of BMP characters.
I wrote a UTF-8 to UTF-16 conversion function for the purpose. It is
designed with the execution speed in mind, having a minimum set of
features that my patch requires.
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Mon, 25 Jun 2007 19:58:32 +0000 |
parents | 355632dca928 |
children |
rev | line source |
---|---|
0 | 1 <HTML |
2 ><HEAD | |
3 ><TITLE | |
4 >SDL Event Structures.</TITLE | |
5 ><META | |
6 NAME="GENERATOR" | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
7 CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+ |
0 | 8 "><LINK |
9 REL="HOME" | |
10 TITLE="SDL Library Documentation" | |
11 HREF="index.html"><LINK | |
12 REL="UP" | |
13 TITLE="Events" | |
14 HREF="event.html"><LINK | |
15 REL="PREVIOUS" | |
16 TITLE="Events" | |
17 HREF="event.html"><LINK | |
18 REL="NEXT" | |
19 TITLE="SDL_Event" | |
20 HREF="sdlevent.html"></HEAD | |
21 ><BODY | |
22 CLASS="SECT1" | |
23 BGCOLOR="#FFF8DC" | |
24 TEXT="#000000" | |
25 LINK="#0000ee" | |
26 VLINK="#551a8b" | |
27 ALINK="#ff0000" | |
28 ><DIV | |
29 CLASS="NAVHEADER" | |
30 ><TABLE | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
31 SUMMARY="Header navigation table" |
0 | 32 WIDTH="100%" |
33 BORDER="0" | |
34 CELLPADDING="0" | |
35 CELLSPACING="0" | |
36 ><TR | |
37 ><TH | |
38 COLSPAN="3" | |
39 ALIGN="center" | |
40 >SDL Library Documentation</TH | |
41 ></TR | |
42 ><TR | |
43 ><TD | |
44 WIDTH="10%" | |
45 ALIGN="left" | |
46 VALIGN="bottom" | |
47 ><A | |
48 HREF="event.html" | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
49 ACCESSKEY="P" |
0 | 50 >Prev</A |
51 ></TD | |
52 ><TD | |
53 WIDTH="80%" | |
54 ALIGN="center" | |
55 VALIGN="bottom" | |
56 >Chapter 8. Events</TD | |
57 ><TD | |
58 WIDTH="10%" | |
59 ALIGN="right" | |
60 VALIGN="bottom" | |
61 ><A | |
62 HREF="sdlevent.html" | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
63 ACCESSKEY="N" |
0 | 64 >Next</A |
65 ></TD | |
66 ></TR | |
67 ></TABLE | |
68 ><HR | |
69 ALIGN="LEFT" | |
70 WIDTH="100%"></DIV | |
71 ><DIV | |
72 CLASS="SECT1" | |
73 ><H1 | |
74 CLASS="SECT1" | |
75 ><A | |
76 NAME="EVENTSTRUCTURES" | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
77 ></A |
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
78 >SDL Event Structures.</H1 |
0 | 79 ><DIV |
80 CLASS="TOC" | |
81 ><DL | |
82 ><DT | |
83 ><B | |
84 >Table of Contents</B | |
85 ></DT | |
86 ><DT | |
87 ><A | |
88 HREF="sdlevent.html" | |
89 >SDL_Event</A | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
90 > -- General event structure</DT |
0 | 91 ><DT |
92 ><A | |
93 HREF="sdlactiveevent.html" | |
94 >SDL_ActiveEvent</A | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
95 > -- Application visibility event structure</DT |
0 | 96 ><DT |
97 ><A | |
98 HREF="sdlkeyboardevent.html" | |
99 >SDL_KeyboardEvent</A | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
100 > -- Keyboard event structure</DT |
0 | 101 ><DT |
102 ><A | |
103 HREF="sdlmousemotionevent.html" | |
104 >SDL_MouseMotionEvent</A | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
105 > -- Mouse motion event structure</DT |
0 | 106 ><DT |
107 ><A | |
108 HREF="sdlmousebuttonevent.html" | |
109 >SDL_MouseButtonEvent</A | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
110 > -- Mouse button event structure</DT |
0 | 111 ><DT |
112 ><A | |
113 HREF="sdljoyaxisevent.html" | |
114 >SDL_JoyAxisEvent</A | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
115 > -- Joystick axis motion event structure</DT |
0 | 116 ><DT |
117 ><A | |
118 HREF="sdljoybuttonevent.html" | |
119 >SDL_JoyButtonEvent</A | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
120 > -- Joystick button event structure</DT |
0 | 121 ><DT |
122 ><A | |
123 HREF="sdljoyhatevent.html" | |
124 >SDL_JoyHatEvent</A | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
125 > -- Joystick hat position change event structure</DT |
0 | 126 ><DT |
127 ><A | |
128 HREF="sdljoyballevent.html" | |
129 >SDL_JoyBallEvent</A | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
130 > -- Joystick trackball motion event structure</DT |
0 | 131 ><DT |
132 ><A | |
133 HREF="sdlresizeevent.html" | |
134 >SDL_ResizeEvent</A | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
135 > -- Window resize event structure</DT |
0 | 136 ><DT |
137 ><A | |
181
e5bc29de3f0a
Updated from the SDL Documentation Project
Sam Lantinga <slouken@libsdl.org>
parents:
55
diff
changeset
|
138 HREF="sdlexposeevent.html" |
e5bc29de3f0a
Updated from the SDL Documentation Project
Sam Lantinga <slouken@libsdl.org>
parents:
55
diff
changeset
|
139 >SDL_ExposeEvent</A |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
140 > -- Quit requested event</DT |
181
e5bc29de3f0a
Updated from the SDL Documentation Project
Sam Lantinga <slouken@libsdl.org>
parents:
55
diff
changeset
|
141 ><DT |
e5bc29de3f0a
Updated from the SDL Documentation Project
Sam Lantinga <slouken@libsdl.org>
parents:
55
diff
changeset
|
142 ><A |
0 | 143 HREF="sdlsyswmevent.html" |
144 >SDL_SysWMEvent</A | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
145 > -- Platform-dependent window manager event.</DT |
0 | 146 ><DT |
147 ><A | |
148 HREF="sdluserevent.html" | |
149 >SDL_UserEvent</A | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
150 > -- A user-defined event type</DT |
0 | 151 ><DT |
152 ><A | |
153 HREF="sdlquitevent.html" | |
154 >SDL_QuitEvent</A | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
155 > -- Quit requested event</DT |
0 | 156 ><DT |
157 ><A | |
158 HREF="sdlkeysym.html" | |
159 >SDL_keysym</A | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
160 > -- Keysym structure</DT |
0 | 161 ><DT |
162 ><A | |
163 HREF="sdlkey.html" | |
164 >SDLKey</A | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
165 > -- Keysym definitions.</DT |
0 | 166 ></DL |
167 ></DIV | |
168 ></DIV | |
169 ><DIV | |
170 CLASS="NAVFOOTER" | |
171 ><HR | |
172 ALIGN="LEFT" | |
173 WIDTH="100%"><TABLE | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
174 SUMMARY="Footer navigation table" |
0 | 175 WIDTH="100%" |
176 BORDER="0" | |
177 CELLPADDING="0" | |
178 CELLSPACING="0" | |
179 ><TR | |
180 ><TD | |
181 WIDTH="33%" | |
182 ALIGN="left" | |
183 VALIGN="top" | |
184 ><A | |
185 HREF="event.html" | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
186 ACCESSKEY="P" |
0 | 187 >Prev</A |
188 ></TD | |
189 ><TD | |
190 WIDTH="34%" | |
191 ALIGN="center" | |
192 VALIGN="top" | |
193 ><A | |
194 HREF="index.html" | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
195 ACCESSKEY="H" |
0 | 196 >Home</A |
197 ></TD | |
198 ><TD | |
199 WIDTH="33%" | |
200 ALIGN="right" | |
201 VALIGN="top" | |
202 ><A | |
203 HREF="sdlevent.html" | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
204 ACCESSKEY="N" |
0 | 205 >Next</A |
206 ></TD | |
207 ></TR | |
208 ><TR | |
209 ><TD | |
210 WIDTH="33%" | |
211 ALIGN="left" | |
212 VALIGN="top" | |
213 >Events</TD | |
214 ><TD | |
215 WIDTH="34%" | |
216 ALIGN="center" | |
217 VALIGN="top" | |
218 ><A | |
219 HREF="event.html" | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
220 ACCESSKEY="U" |
0 | 221 >Up</A |
222 ></TD | |
223 ><TD | |
224 WIDTH="33%" | |
225 ALIGN="right" | |
226 VALIGN="top" | |
227 >SDL_Event</TD | |
228 ></TR | |
229 ></TABLE | |
230 ></DIV | |
231 ></BODY | |
232 ></HTML | |
233 > |