Mercurial > sdl-ios-xcode
annotate docs/html/sdlcdtrack.html @ 1629:ef4a796e7f24
Fixed bug #55
From Christian Walther:
When writing my patch for #12, I ended up doing all sorts of changes to the way
application/window activating/deactivating is handled in the Quartz backend,
resulting in the attached patch. It does make the code a bit cleaner IMHO, but
as it might be regarded as a case of "if it ain't broken, don't fix it" I'd
like to hear other people's opinion about it. Please shout if some change
strikes you as unnecessary or wrong, and I'll explain the reasons behind it. As
far as I tested it, it does not introduce any new bugs, but I may well have
missed some.
- The most fundamental change (that triggered most of the others) is irrelevant
for the usual single-window SDL applications, it only affects the people who
are crazy enough to display other Cocoa windows alongside the SDL window (I'm
actually doing this currently, although the additional window only displays
debugging info and won't be present in the final product): Before, some things
were done on the application becoming active, some on the window becoming key,
and some on the window becoming main. Conceptually, all these actions belong to
the window becoming key, so that's what I implemented. However, since in a
single-window application these three events always happen together, the
previous implementation "ain't broken".
- This slightly changed the meaning of the SDL_APPMOUSEFOCUS flag from
SDL_GetAppState(): Before, it meant "window is main and mouse is inside window
(or mode is fullscreen)". Now, it means "window is key and mouse is inside
window (or mode is fullscreen)". It makes more sense to me that way. (See
http://developer.apple.com/documentation/Cocoa/Conceptual/WinPanel/Concepts/ChangingMainKeyWindow.html
for a discussion of what key and main windows are.) The other two flags are
unchanged: SDL_APPACTIVE = application is not hidden and window is not
minimized, SDL_APPINPUTFOCUS = window is key (or mode is fullscreen).
- As a side effect, the reorganization fixes the following two issues (and
maybe others) (but they could also be fixed in less invasive ways):
* A regression that was introduced in revision 1.42 of SDL_QuartzVideo.m
(http://libsdl.org/cgi/cvsweb.cgi/SDL12/src/video/quartz/SDL_QuartzVideo.m.diff?r1=1.41&r2=1.42)
(from half-desirable to undesirable behavior):
Situation: While in windowed mode, hide the cursor using
SDL_ShowCursor(SDL_DISABLE), move the mouse outside of the window so that the
cursor becomes visible again, and SDL_SetVideoMode() to a fullscreen mode.
What happened before revision 1.42: The cursor is visible, but becomes
invisible as soon as the mouse is moved (half-desirable).
What happens in revision 1.42 and after (including current CVS): The cursor is
visible and stays visible (undesirable).
What happens after my patch: The cursor is invisible from the beginning
(desirable).
* When the cursor is hidden and grabbed, switch away from the application using
cmd-tab (which ungrabs and makes the cursor visible), move the cursor outside
of the SDL window, then cmd-tab back to the application. In 1.2.8 and in the
current CVS, the cursor is re-grabbed, but it stays visible (immovable in the
middle of the window). With my patch, the cursor is correctly re-grabbed and
hidden. (For some reason, it still doesn't work correctly if you switch back to
the application using the dock instead of cmd-tab. I haven't been able to
figure out why. I can step over [NSCursor hide] being called in the debugger,
but it seems to have no effect.)
- The patch includes my patch for #12 (it was easier to obtain using cvs diff
that way). If you apply both of them, you will end up with 6 duplicate lines in
SDL_QuartzEvents.m.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Thu, 13 Apr 2006 14:17:48 +0000 |
parents | 355632dca928 |
children |
rev | line source |
---|---|
0 | 1 <HTML |
2 ><HEAD | |
3 ><TITLE | |
4 >SDL_CDtrack</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="CD-ROM" | |
14 HREF="cdrom.html"><LINK | |
15 REL="PREVIOUS" | |
16 TITLE="SDL_CD" | |
17 HREF="sdlcd.html"><LINK | |
18 REL="NEXT" | |
19 TITLE="Multi-threaded Programming" | |
20 HREF="thread.html"></HEAD | |
21 ><BODY | |
22 CLASS="REFENTRY" | |
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="sdlcd.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 ></TD | |
57 ><TD | |
58 WIDTH="10%" | |
59 ALIGN="right" | |
60 VALIGN="bottom" | |
61 ><A | |
62 HREF="thread.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 ><H1 | |
72 ><A | |
73 NAME="SDLCDTRACK" | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
74 ></A |
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
75 >SDL_CDtrack</H1 |
0 | 76 ><DIV |
77 CLASS="REFNAMEDIV" | |
78 ><A | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
79 NAME="AEN7628" |
0 | 80 ></A |
81 ><H2 | |
82 >Name</H2 | |
83 >SDL_CDtrack -- CD Track Information Structure</DIV | |
84 ><DIV | |
85 CLASS="REFSECT1" | |
86 ><A | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
87 NAME="AEN7631" |
0 | 88 ></A |
89 ><H2 | |
90 >Structure Definition</H2 | |
91 ><PRE | |
92 CLASS="PROGRAMLISTING" | |
93 >typedef struct{ | |
94 Uint8 id; | |
95 Uint8 type; | |
96 Uint32 length; | |
97 Uint32 offset; | |
98 } SDL_CDtrack;</PRE | |
99 ></DIV | |
100 ><DIV | |
101 CLASS="REFSECT1" | |
102 ><A | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
103 NAME="AEN7634" |
0 | 104 ></A |
105 ><H2 | |
106 >Structure Data</H2 | |
107 ><DIV | |
108 CLASS="INFORMALTABLE" | |
109 ><A | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
110 NAME="AEN7636" |
0 | 111 ></A |
112 ><P | |
113 ></P | |
114 ><TABLE | |
115 BORDER="0" | |
116 CLASS="CALSTABLE" | |
117 ><TBODY | |
118 ><TR | |
119 ><TD | |
120 ALIGN="LEFT" | |
121 VALIGN="TOP" | |
122 ><TT | |
123 CLASS="STRUCTFIELD" | |
124 ><I | |
125 >id</I | |
126 ></TT | |
127 ></TD | |
128 ><TD | |
129 ALIGN="LEFT" | |
130 VALIGN="TOP" | |
131 >Track number (0-99)</TD | |
132 ></TR | |
133 ><TR | |
134 ><TD | |
135 ALIGN="LEFT" | |
136 VALIGN="TOP" | |
137 ><TT | |
138 CLASS="STRUCTFIELD" | |
139 ><I | |
140 >type</I | |
141 ></TT | |
142 ></TD | |
143 ><TD | |
144 ALIGN="LEFT" | |
145 VALIGN="TOP" | |
146 ><TT | |
147 CLASS="LITERAL" | |
148 >SDL_AUDIO_TRACK</TT | |
149 > or <TT | |
150 CLASS="LITERAL" | |
151 >SDL_DATA_TRACK</TT | |
152 ></TD | |
153 ></TR | |
154 ><TR | |
155 ><TD | |
156 ALIGN="LEFT" | |
157 VALIGN="TOP" | |
158 ><TT | |
159 CLASS="STRUCTFIELD" | |
160 ><I | |
161 >length</I | |
162 ></TT | |
163 ></TD | |
164 ><TD | |
165 ALIGN="LEFT" | |
166 VALIGN="TOP" | |
167 >Length, in frames, of this track</TD | |
168 ></TR | |
169 ><TR | |
170 ><TD | |
171 ALIGN="LEFT" | |
172 VALIGN="TOP" | |
173 ><TT | |
174 CLASS="STRUCTFIELD" | |
175 ><I | |
176 >offset</I | |
177 ></TT | |
178 ></TD | |
179 ><TD | |
180 ALIGN="LEFT" | |
181 VALIGN="TOP" | |
182 >Frame offset to the beginning of this track</TD | |
183 ></TR | |
184 ></TBODY | |
185 ></TABLE | |
186 ><P | |
187 ></P | |
188 ></DIV | |
189 ></DIV | |
190 ><DIV | |
191 CLASS="REFSECT1" | |
192 ><A | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
193 NAME="AEN7657" |
0 | 194 ></A |
195 ><H2 | |
196 >Description</H2 | |
197 ><P | |
198 ><SPAN | |
199 CLASS="STRUCTNAME" | |
200 >SDL_CDtrack</SPAN | |
201 > stores data on each track on a CD, its fields should be pretty self explainatory. It is a member a the <A | |
202 HREF="sdlcd.html" | |
203 ><SPAN | |
204 CLASS="STRUCTNAME" | |
205 >SDL_CD</SPAN | |
206 ></A | |
207 > structure.</P | |
208 ><DIV | |
209 CLASS="NOTE" | |
210 ><BLOCKQUOTE | |
211 CLASS="NOTE" | |
212 ><P | |
213 ><B | |
214 >Note: </B | |
215 >Frames can be converted to standard timings. There are <TT | |
216 CLASS="LITERAL" | |
217 >CD_FPS</TT | |
218 > frames per second, so <SPAN | |
219 CLASS="STRUCTNAME" | |
220 >SDL_CDtrack</SPAN | |
221 >.<TT | |
222 CLASS="STRUCTFIELD" | |
223 ><I | |
224 >length</I | |
225 ></TT | |
226 >/<TT | |
227 CLASS="LITERAL" | |
228 >CD_FPS</TT | |
229 >=length_in_seconds.</P | |
230 ></BLOCKQUOTE | |
231 ></DIV | |
232 ></DIV | |
233 ><DIV | |
234 CLASS="REFSECT1" | |
235 ><A | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
236 NAME="AEN7669" |
0 | 237 ></A |
238 ><H2 | |
239 >See Also</H2 | |
240 ><P | |
241 ><A | |
242 HREF="sdlcd.html" | |
243 ><SPAN | |
244 CLASS="STRUCTNAME" | |
245 >SDL_CD</SPAN | |
246 ></A | |
247 ></P | |
248 ></DIV | |
249 ><DIV | |
250 CLASS="NAVFOOTER" | |
251 ><HR | |
252 ALIGN="LEFT" | |
253 WIDTH="100%"><TABLE | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
254 SUMMARY="Footer navigation table" |
0 | 255 WIDTH="100%" |
256 BORDER="0" | |
257 CELLPADDING="0" | |
258 CELLSPACING="0" | |
259 ><TR | |
260 ><TD | |
261 WIDTH="33%" | |
262 ALIGN="left" | |
263 VALIGN="top" | |
264 ><A | |
265 HREF="sdlcd.html" | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
266 ACCESSKEY="P" |
0 | 267 >Prev</A |
268 ></TD | |
269 ><TD | |
270 WIDTH="34%" | |
271 ALIGN="center" | |
272 VALIGN="top" | |
273 ><A | |
274 HREF="index.html" | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
275 ACCESSKEY="H" |
0 | 276 >Home</A |
277 ></TD | |
278 ><TD | |
279 WIDTH="33%" | |
280 ALIGN="right" | |
281 VALIGN="top" | |
282 ><A | |
283 HREF="thread.html" | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
284 ACCESSKEY="N" |
0 | 285 >Next</A |
286 ></TD | |
287 ></TR | |
288 ><TR | |
289 ><TD | |
290 WIDTH="33%" | |
291 ALIGN="left" | |
292 VALIGN="top" | |
293 >SDL_CD</TD | |
294 ><TD | |
295 WIDTH="34%" | |
296 ALIGN="center" | |
297 VALIGN="top" | |
298 ><A | |
299 HREF="cdrom.html" | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
300 ACCESSKEY="U" |
0 | 301 >Up</A |
302 ></TD | |
303 ><TD | |
304 WIDTH="33%" | |
305 ALIGN="right" | |
306 VALIGN="top" | |
307 >Multi-threaded Programming</TD | |
308 ></TR | |
309 ></TABLE | |
310 ></DIV | |
311 ></BODY | |
312 ></HTML | |
313 > |