Mercurial > sdl-ios-xcode
annotate docs/html/sdlresizeevent.html @ 1157:baf35853ad54
Date: Mon, 10 Oct 2005 13:09:32 +0300
From: Tommi Kyntola <tommi.kyntola@ray.fi>
To: sdl@libsdl.org
Subject: [SDL] [RFC] get_ticks broken on linux
It uses gettimeofday to calculate the timedifference.
Gettimeofday returns current time which is seldom monotonous.
This breaks SDL timer subsystem. (time callbacks and all that
get borked when the time difference ms is suddenly ~ 2^32)
I posted a message about this earlier but got no response.
Some thoughts on this matter would be appreciated.
(Or even an explanation for the lack of interest.)
A patch below would use the posix timers that have been around
since posix 93 and do provide a good source of monotonous time
on linux boxes (and on few others too).
The following patch is also availabe at:
http://www.hut.fi/u/tkyntola/SDL-1.2.9-clockfix.patch
It's against 1.2.9, but I can easily rediffit against
the cvs branch is needed.
cheers,
Tommi Kyntola tommi.kyntola@ray.fi
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Tue, 11 Oct 2005 18:16:12 +0000 |
parents | 355632dca928 |
children |
rev | line source |
---|---|
0 | 1 <HTML |
2 ><HEAD | |
3 ><TITLE | |
4 >SDL_ResizeEvent</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="SDL Event Structures." | |
14 HREF="eventstructures.html"><LINK | |
15 REL="PREVIOUS" | |
16 TITLE="SDL_JoyBallEvent" | |
17 HREF="sdljoyballevent.html"><LINK | |
18 REL="NEXT" | |
181
e5bc29de3f0a
Updated from the SDL Documentation Project
Sam Lantinga <slouken@libsdl.org>
parents:
55
diff
changeset
|
19 TITLE="SDL_ExposeEvent" |
e5bc29de3f0a
Updated from the SDL Documentation Project
Sam Lantinga <slouken@libsdl.org>
parents:
55
diff
changeset
|
20 HREF="sdlexposeevent.html"></HEAD |
0 | 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="sdljoyballevent.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 | |
181
e5bc29de3f0a
Updated from the SDL Documentation Project
Sam Lantinga <slouken@libsdl.org>
parents:
55
diff
changeset
|
62 HREF="sdlexposeevent.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="SDLRESIZEEVENT" | |
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_ResizeEvent</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="AEN4453" |
0 | 80 ></A |
81 ><H2 | |
82 >Name</H2 | |
83 >SDL_ResizeEvent -- Window resize event 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="AEN4456" |
0 | 88 ></A |
89 ><H2 | |
90 >Structure Definition</H2 | |
91 ><PRE | |
92 CLASS="PROGRAMLISTING" | |
93 >typedef struct{ | |
94 Uint8 type; | |
95 int w, h; | |
96 } SDL_ResizeEvent;</PRE | |
97 ></DIV | |
98 ><DIV | |
99 CLASS="REFSECT1" | |
100 ><A | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
101 NAME="AEN4459" |
0 | 102 ></A |
103 ><H2 | |
104 >Structure Data</H2 | |
105 ><DIV | |
106 CLASS="INFORMALTABLE" | |
107 ><A | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
108 NAME="AEN4461" |
0 | 109 ></A |
110 ><P | |
111 ></P | |
112 ><TABLE | |
113 BORDER="0" | |
114 CLASS="CALSTABLE" | |
115 ><TBODY | |
116 ><TR | |
117 ><TD | |
118 ALIGN="LEFT" | |
119 VALIGN="TOP" | |
120 ><TT | |
121 CLASS="STRUCTFIELD" | |
122 ><I | |
123 >type</I | |
124 ></TT | |
125 ></TD | |
126 ><TD | |
127 ALIGN="LEFT" | |
128 VALIGN="TOP" | |
129 ><TT | |
130 CLASS="LITERAL" | |
131 >SDL_VIDEORESIZE</TT | |
132 ></TD | |
133 ></TR | |
134 ><TR | |
135 ><TD | |
136 ALIGN="LEFT" | |
137 VALIGN="TOP" | |
138 ><TT | |
139 CLASS="STRUCTFIELD" | |
140 ><I | |
141 >w</I | |
142 ></TT | |
143 >, <TT | |
144 CLASS="STRUCTFIELD" | |
145 ><I | |
146 >h</I | |
147 ></TT | |
148 ></TD | |
149 ><TD | |
150 ALIGN="LEFT" | |
151 VALIGN="TOP" | |
152 >New width and height of the window</TD | |
153 ></TR | |
154 ></TBODY | |
155 ></TABLE | |
156 ><P | |
157 ></P | |
158 ></DIV | |
159 ></DIV | |
160 ><DIV | |
161 CLASS="REFSECT1" | |
162 ><A | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
163 NAME="AEN4474" |
0 | 164 ></A |
165 ><H2 | |
166 >Description</H2 | |
167 ><P | |
168 ><SPAN | |
169 CLASS="STRUCTNAME" | |
170 >SDL_ResizeEvent</SPAN | |
171 > is a member of the <A | |
172 HREF="sdlevent.html" | |
173 ><SPAN | |
174 CLASS="STRUCTNAME" | |
175 >SDL_Event</SPAN | |
176 ></A | |
177 > union and is used when an event of type <TT | |
178 CLASS="LITERAL" | |
179 >SDL_VIDEORESIZE</TT | |
180 > is reported.</P | |
181 ><P | |
182 >When <TT | |
183 CLASS="LITERAL" | |
184 >SDL_RESIZABLE</TT | |
185 > is passed as a <TT | |
186 CLASS="PARAMETER" | |
187 ><I | |
188 >flag</I | |
189 ></TT | |
190 > to <A | |
191 HREF="sdlsetvideomode.html" | |
192 ><TT | |
193 CLASS="FUNCTION" | |
194 >SDL_SetVideoMode</TT | |
195 ></A | |
196 > the user is allowed to resize the applications window. When the window is resized an <TT | |
197 CLASS="LITERAL" | |
198 >SDL_VIDEORESIZE</TT | |
199 > is report, with the new window width and height values stored in <TT | |
200 CLASS="STRUCTFIELD" | |
201 ><I | |
202 >w</I | |
203 ></TT | |
204 > and <TT | |
205 CLASS="STRUCTFIELD" | |
206 ><I | |
207 >h</I | |
208 ></TT | |
209 >, respectively. When an <TT | |
210 CLASS="LITERAL" | |
211 >SDL_VIDEORESIZE</TT | |
212 > is recieved the window should be resized to the new dimensions using <A | |
213 HREF="sdlsetvideomode.html" | |
214 ><TT | |
215 CLASS="FUNCTION" | |
216 >SDL_SetVideoMode</TT | |
217 ></A | |
218 >.</P | |
219 ></DIV | |
220 ><DIV | |
221 CLASS="REFSECT1" | |
222 ><A | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
223 NAME="AEN4492" |
0 | 224 ></A |
225 ><H2 | |
226 >See Also</H2 | |
227 ><P | |
228 ><A | |
229 HREF="sdlevent.html" | |
230 ><SPAN | |
231 CLASS="STRUCTNAME" | |
232 >SDL_Event</SPAN | |
233 ></A | |
234 >, | |
235 <A | |
236 HREF="sdlsetvideomode.html" | |
237 ><TT | |
238 CLASS="FUNCTION" | |
239 >SDL_SetVideoMode</TT | |
240 ></A | |
241 ></P | |
242 ></DIV | |
243 ><DIV | |
244 CLASS="NAVFOOTER" | |
245 ><HR | |
246 ALIGN="LEFT" | |
247 WIDTH="100%"><TABLE | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
248 SUMMARY="Footer navigation table" |
0 | 249 WIDTH="100%" |
250 BORDER="0" | |
251 CELLPADDING="0" | |
252 CELLSPACING="0" | |
253 ><TR | |
254 ><TD | |
255 WIDTH="33%" | |
256 ALIGN="left" | |
257 VALIGN="top" | |
258 ><A | |
259 HREF="sdljoyballevent.html" | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
260 ACCESSKEY="P" |
0 | 261 >Prev</A |
262 ></TD | |
263 ><TD | |
264 WIDTH="34%" | |
265 ALIGN="center" | |
266 VALIGN="top" | |
267 ><A | |
268 HREF="index.html" | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
269 ACCESSKEY="H" |
0 | 270 >Home</A |
271 ></TD | |
272 ><TD | |
273 WIDTH="33%" | |
274 ALIGN="right" | |
275 VALIGN="top" | |
276 ><A | |
181
e5bc29de3f0a
Updated from the SDL Documentation Project
Sam Lantinga <slouken@libsdl.org>
parents:
55
diff
changeset
|
277 HREF="sdlexposeevent.html" |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
278 ACCESSKEY="N" |
0 | 279 >Next</A |
280 ></TD | |
281 ></TR | |
282 ><TR | |
283 ><TD | |
284 WIDTH="33%" | |
285 ALIGN="left" | |
286 VALIGN="top" | |
287 >SDL_JoyBallEvent</TD | |
288 ><TD | |
289 WIDTH="34%" | |
290 ALIGN="center" | |
291 VALIGN="top" | |
292 ><A | |
293 HREF="eventstructures.html" | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
294 ACCESSKEY="U" |
0 | 295 >Up</A |
296 ></TD | |
297 ><TD | |
298 WIDTH="33%" | |
299 ALIGN="right" | |
300 VALIGN="top" | |
181
e5bc29de3f0a
Updated from the SDL Documentation Project
Sam Lantinga <slouken@libsdl.org>
parents:
55
diff
changeset
|
301 >SDL_ExposeEvent</TD |
0 | 302 ></TR |
303 ></TABLE | |
304 ></DIV | |
305 ></BODY | |
306 ></HTML | |
307 > |