Anonymous avatar Anonymous committed 71d0a16

threading improved, timers added, docs boosted

Comments (0)

Files changed (38)

-
-PyGame CREDITS
+pygame credits
 Thanks to everyone who made this possible, including:
 
-- Python and all the members behind it, headed by Guido van Rossum
-
-- SDL and all the people behind it, headed by Sam Lantinga
-
 - Jan Ekhol, Ray Kelm, and Peter Nicolai for initial design help
 
-- Mark Baker for his efforts with the pysdl library
+- David Clark for packaging and help with releases
 
-- David Clark for his great pysdl documentation and help
+- Python and the team behind it, headed by Guido van Rossum
+  http://www.python.org
 
+- SDL and all the folks behind it, headed by Sam Lantinga
+  http://www.libsdl.org
 
 
 
- And a big hand to everyone else who gave me appreciation, advice,
- and suggestions, especially the good folks on the PySDL mailing list.
+
+
+ And a big hand to everyone else who gave me appreciation,
+ advice, and suggestions, especially the good folks on the
+ old PySDL mailing list.
 
 THANKS!
 
 This is a list of changes in pygame's history.
 
+     Nov 14, 2000
+	Release the Python Global Interpreter Lock on delays and IO
+	Added timer events to pygame.time (vgrade example demonstrates)
+	Event module documentation expanded
+
      Nov 11, 2000
-	BUG: pygame.display.set_mode() uses int, not short, for
-		width and height fields.
+	BUG: pygame.display.set_mode() uses int, not short, for size
 
      Nov 10, 2000
 	Committed to CVS and documentation expanded
 <body bgcolor=#dddddd text=#333377 link=#7777bb vlink=#7777bb>
 
 <table border=0 width=100% cellpadding=0 cellspacing=0 bgcolor=#f5f5f5><tr valign=top>
-<td rowspan=2 width=60%><table border=0 cellpadding=5 cellspacing=0 bgcolor=#333377>
+<td rowspan=2><table border=0 cellpadding=5 cellspacing=0 bgcolor=#333377>
 <tr height=86 align=left><td valign=middle><font color=#ffffff size=+5>
 	<a href=../><font size=+5 color=#ffffff><i><b>
       pygame</b></i></font></a>&nbsp;&nbsp;</td>
 <td valign=middle><tt><font color=#dddddd><br>
 	PyGame<br>Documentation</font>
-</td></tr></table></td><td width=100% height=100% align=center valign=middle>
+</td></tr></table></td><td width=100% align=center valign=middle>
 
 	||&nbsp;
 	<a href=../>Home</a> &nbsp;||&nbsp;
 <a href=Font.html>Font</a> || 
 <a href=Joystick.html>Joystick</a> || 
 <a href=Rect.html>Rect</a> ||<br>
-|| <a href=Sound.html>Sound</a> || 
-<a href=Surface.html>Surface</a> || 
-<a href=pygame.html>pygame</a> || 
+|| <a href=pygame.html>pygame</a> || 
 <a href=pygame_cdrom.html>cdrom</a> || 
-<a href=pygame_constants.html>constants</a> ||<br>
-|| <a href=pygame_display.html>display</a> || 
-<a href=pygame_event.html>event</a> || 
-<a href=pygame_font.html>font</a> || 
-<a href=pygame_image.html>image</a> || 
-<a href=pygame_joystick.html>joystick</a> ||<br>
-|| <a href=pygame_key.html>key</a> || 
+<a href=pygame_constants.html>constants</a> || 
+<a href=pygame_display.html>display</a> || 
+<a href=pygame_event.html>event</a> ||<br>
+|| <a href=pygame_joystick.html>joystick</a> || 
+<a href=pygame_key.html>key</a> || 
 <a href=pygame_mixer.html>mixer</a> || 
 <a href=pygame_mouse.html>mouse</a> || 
-<a href=pygame_music.html>music</a> || 
-<a href=pygame_surfarray.html>surfarray</a> ||<br>
-|| <a href=pygame_time.html>time</a> ||<br>
+<a href=pygame_music.html>music</a> ||<br>
 
 
 </td></tr></table>

docs/Channel.html

 <body bgcolor=#dddddd text=#333377 link=#7777bb vlink=#7777bb>
 
 <table border=0 width=100% cellpadding=0 cellspacing=0 bgcolor=#f5f5f5><tr valign=top>
-<td rowspan=2 width=60%><table border=0 cellpadding=5 cellspacing=0 bgcolor=#333377>
+<td rowspan=2><table border=0 cellpadding=5 cellspacing=0 bgcolor=#333377>
 <tr height=86 align=left><td valign=middle><font color=#ffffff size=+5>
 	<a href=../><font size=+5 color=#ffffff><i><b>
       pygame</b></i></font></a>&nbsp;&nbsp;</td>
 <td valign=middle><tt><font color=#dddddd><br>
 	PyGame<br>Documentation</font>
-</td></tr></table></td><td width=100% height=100% align=center valign=middle>
+</td></tr></table></td><td width=100% align=center valign=middle>
 
 	||&nbsp;
 	<a href=../>Home</a> &nbsp;||&nbsp;
 <a href=Font.html>Font</a> || 
 <a href=Joystick.html>Joystick</a> || 
 <a href=Rect.html>Rect</a> ||<br>
-|| <a href=Sound.html>Sound</a> || 
-<a href=Surface.html>Surface</a> || 
-<a href=pygame.html>pygame</a> || 
+|| <a href=pygame.html>pygame</a> || 
 <a href=pygame_cdrom.html>cdrom</a> || 
-<a href=pygame_constants.html>constants</a> ||<br>
-|| <a href=pygame_display.html>display</a> || 
-<a href=pygame_event.html>event</a> || 
-<a href=pygame_font.html>font</a> || 
-<a href=pygame_image.html>image</a> || 
-<a href=pygame_joystick.html>joystick</a> ||<br>
-|| <a href=pygame_key.html>key</a> || 
+<a href=pygame_constants.html>constants</a> || 
+<a href=pygame_display.html>display</a> || 
+<a href=pygame_event.html>event</a> ||<br>
+|| <a href=pygame_joystick.html>joystick</a> || 
+<a href=pygame_key.html>key</a> || 
 <a href=pygame_mixer.html>mixer</a> || 
 <a href=pygame_mouse.html>mouse</a> || 
-<a href=pygame_music.html>music</a> || 
-<a href=pygame_surfarray.html>surfarray</a> ||<br>
-|| <a href=pygame_time.html>time</a> ||<br>
+<a href=pygame_music.html>music</a> ||<br>
 
 
 </td></tr></table>
 <body bgcolor=#dddddd text=#333377 link=#7777bb vlink=#7777bb>
 
 <table border=0 width=100% cellpadding=0 cellspacing=0 bgcolor=#f5f5f5><tr valign=top>
-<td rowspan=2 width=60%><table border=0 cellpadding=5 cellspacing=0 bgcolor=#333377>
+<td rowspan=2><table border=0 cellpadding=5 cellspacing=0 bgcolor=#333377>
 <tr height=86 align=left><td valign=middle><font color=#ffffff size=+5>
 	<a href=../><font size=+5 color=#ffffff><i><b>
       pygame</b></i></font></a>&nbsp;&nbsp;</td>
 <td valign=middle><tt><font color=#dddddd><br>
 	PyGame<br>Documentation</font>
-</td></tr></table></td><td width=100% height=100% align=center valign=middle>
+</td></tr></table></td><td width=100% align=center valign=middle>
 
 	||&nbsp;
 	<a href=../>Home</a> &nbsp;||&nbsp;
 <a href=Font.html>Font</a> || 
 <a href=Joystick.html>Joystick</a> || 
 <a href=Rect.html>Rect</a> ||<br>
-|| <a href=Sound.html>Sound</a> || 
-<a href=Surface.html>Surface</a> || 
-<a href=pygame.html>pygame</a> || 
+|| <a href=pygame.html>pygame</a> || 
 <a href=pygame_cdrom.html>cdrom</a> || 
-<a href=pygame_constants.html>constants</a> ||<br>
-|| <a href=pygame_display.html>display</a> || 
-<a href=pygame_event.html>event</a> || 
-<a href=pygame_font.html>font</a> || 
-<a href=pygame_image.html>image</a> || 
-<a href=pygame_joystick.html>joystick</a> ||<br>
-|| <a href=pygame_key.html>key</a> || 
+<a href=pygame_constants.html>constants</a> || 
+<a href=pygame_display.html>display</a> || 
+<a href=pygame_event.html>event</a> ||<br>
+|| <a href=pygame_joystick.html>joystick</a> || 
+<a href=pygame_key.html>key</a> || 
 <a href=pygame_mixer.html>mixer</a> || 
 <a href=pygame_mouse.html>mouse</a> || 
-<a href=pygame_music.html>music</a> || 
-<a href=pygame_surfarray.html>surfarray</a> ||<br>
-|| <a href=pygame_time.html>time</a> ||<br>
+<a href=pygame_music.html>music</a> ||<br>
 
 
 </td></tr></table>

docs/Joystick.html

 <body bgcolor=#dddddd text=#333377 link=#7777bb vlink=#7777bb>
 
 <table border=0 width=100% cellpadding=0 cellspacing=0 bgcolor=#f5f5f5><tr valign=top>
-<td rowspan=2 width=60%><table border=0 cellpadding=5 cellspacing=0 bgcolor=#333377>
+<td rowspan=2><table border=0 cellpadding=5 cellspacing=0 bgcolor=#333377>
 <tr height=86 align=left><td valign=middle><font color=#ffffff size=+5>
 	<a href=../><font size=+5 color=#ffffff><i><b>
       pygame</b></i></font></a>&nbsp;&nbsp;</td>
 <td valign=middle><tt><font color=#dddddd><br>
 	PyGame<br>Documentation</font>
-</td></tr></table></td><td width=100% height=100% align=center valign=middle>
+</td></tr></table></td><td width=100% align=center valign=middle>
 
 	||&nbsp;
 	<a href=../>Home</a> &nbsp;||&nbsp;
 <a href=Font.html>Font</a> || 
 <a href=Joystick.html>Joystick</a> || 
 <a href=Rect.html>Rect</a> ||<br>
-|| <a href=Sound.html>Sound</a> || 
-<a href=Surface.html>Surface</a> || 
-<a href=pygame.html>pygame</a> || 
+|| <a href=pygame.html>pygame</a> || 
 <a href=pygame_cdrom.html>cdrom</a> || 
-<a href=pygame_constants.html>constants</a> ||<br>
-|| <a href=pygame_display.html>display</a> || 
-<a href=pygame_event.html>event</a> || 
-<a href=pygame_font.html>font</a> || 
-<a href=pygame_image.html>image</a> || 
-<a href=pygame_joystick.html>joystick</a> ||<br>
-|| <a href=pygame_key.html>key</a> || 
+<a href=pygame_constants.html>constants</a> || 
+<a href=pygame_display.html>display</a> || 
+<a href=pygame_event.html>event</a> ||<br>
+|| <a href=pygame_joystick.html>joystick</a> || 
+<a href=pygame_key.html>key</a> || 
 <a href=pygame_mixer.html>mixer</a> || 
 <a href=pygame_mouse.html>mouse</a> || 
-<a href=pygame_music.html>music</a> || 
-<a href=pygame_surfarray.html>surfarray</a> ||<br>
-|| <a href=pygame_time.html>time</a> ||<br>
+<a href=pygame_music.html>music</a> ||<br>
 
 
 </td></tr></table>
 <body bgcolor=#dddddd text=#333377 link=#7777bb vlink=#7777bb>
 
 <table border=0 width=100% cellpadding=0 cellspacing=0 bgcolor=#f5f5f5><tr valign=top>
-<td rowspan=2 width=60%><table border=0 cellpadding=5 cellspacing=0 bgcolor=#333377>
+<td rowspan=2><table border=0 cellpadding=5 cellspacing=0 bgcolor=#333377>
 <tr height=86 align=left><td valign=middle><font color=#ffffff size=+5>
 	<a href=../><font size=+5 color=#ffffff><i><b>
       pygame</b></i></font></a>&nbsp;&nbsp;</td>
 <td valign=middle><tt><font color=#dddddd><br>
 	PyGame<br>Documentation</font>
-</td></tr></table></td><td width=100% height=100% align=center valign=middle>
+</td></tr></table></td><td width=100% align=center valign=middle>
 
 	||&nbsp;
 	<a href=../>Home</a> &nbsp;||&nbsp;
 <a href=Font.html>Font</a> || 
 <a href=Joystick.html>Joystick</a> || 
 <a href=Rect.html>Rect</a> ||<br>
-|| <a href=Sound.html>Sound</a> || 
-<a href=Surface.html>Surface</a> || 
-<a href=pygame.html>pygame</a> || 
+|| <a href=pygame.html>pygame</a> || 
 <a href=pygame_cdrom.html>cdrom</a> || 
-<a href=pygame_constants.html>constants</a> ||<br>
-|| <a href=pygame_display.html>display</a> || 
-<a href=pygame_event.html>event</a> || 
-<a href=pygame_font.html>font</a> || 
-<a href=pygame_image.html>image</a> || 
-<a href=pygame_joystick.html>joystick</a> ||<br>
-|| <a href=pygame_key.html>key</a> || 
+<a href=pygame_constants.html>constants</a> || 
+<a href=pygame_display.html>display</a> || 
+<a href=pygame_event.html>event</a> ||<br>
+|| <a href=pygame_joystick.html>joystick</a> || 
+<a href=pygame_key.html>key</a> || 
 <a href=pygame_mixer.html>mixer</a> || 
 <a href=pygame_mouse.html>mouse</a> || 
-<a href=pygame_music.html>music</a> || 
-<a href=pygame_surfarray.html>surfarray</a> ||<br>
-|| <a href=pygame_time.html>time</a> ||<br>
+<a href=pygame_music.html>music</a> ||<br>
 
 
 </td></tr></table>
 <body bgcolor=#dddddd text=#333377 link=#7777bb vlink=#7777bb>
 
 <table border=0 width=100% cellpadding=0 cellspacing=0 bgcolor=#f5f5f5><tr valign=top>
-<td rowspan=2 width=60%><table border=0 cellpadding=5 cellspacing=0 bgcolor=#333377>
+<td rowspan=2><table border=0 cellpadding=5 cellspacing=0 bgcolor=#333377>
 <tr height=86 align=left><td valign=middle><font color=#ffffff size=+5>
 	<a href=../><font size=+5 color=#ffffff><i><b>
       pygame</b></i></font></a>&nbsp;&nbsp;</td>
 <td valign=middle><tt><font color=#dddddd><br>
 	PyGame<br>Documentation</font>
-</td></tr></table></td><td width=100% height=100% align=center valign=middle>
+</td></tr></table></td><td width=100% align=center valign=middle>
 
 	||&nbsp;
 	<a href=../>Home</a> &nbsp;||&nbsp;
 <a href=Font.html>Font</a> || 
 <a href=Joystick.html>Joystick</a> || 
 <a href=Rect.html>Rect</a> ||<br>
-|| <a href=Sound.html>Sound</a> || 
-<a href=Surface.html>Surface</a> || 
-<a href=pygame.html>pygame</a> || 
+|| <a href=pygame.html>pygame</a> || 
 <a href=pygame_cdrom.html>cdrom</a> || 
-<a href=pygame_constants.html>constants</a> ||<br>
-|| <a href=pygame_display.html>display</a> || 
-<a href=pygame_event.html>event</a> || 
-<a href=pygame_font.html>font</a> || 
-<a href=pygame_image.html>image</a> || 
-<a href=pygame_joystick.html>joystick</a> ||<br>
-|| <a href=pygame_key.html>key</a> || 
+<a href=pygame_constants.html>constants</a> || 
+<a href=pygame_display.html>display</a> || 
+<a href=pygame_event.html>event</a> ||<br>
+|| <a href=pygame_joystick.html>joystick</a> || 
+<a href=pygame_key.html>key</a> || 
 <a href=pygame_mixer.html>mixer</a> || 
 <a href=pygame_mouse.html>mouse</a> || 
-<a href=pygame_music.html>music</a> || 
-<a href=pygame_surfarray.html>surfarray</a> ||<br>
-|| <a href=pygame_time.html>time</a> ||<br>
+<a href=pygame_music.html>music</a> ||<br>
 
 
 </td></tr></table>

docs/Surface.html

 <body bgcolor=#dddddd text=#333377 link=#7777bb vlink=#7777bb>
 
 <table border=0 width=100% cellpadding=0 cellspacing=0 bgcolor=#f5f5f5><tr valign=top>
-<td rowspan=2 width=60%><table border=0 cellpadding=5 cellspacing=0 bgcolor=#333377>
+<td rowspan=2><table border=0 cellpadding=5 cellspacing=0 bgcolor=#333377>
 <tr height=86 align=left><td valign=middle><font color=#ffffff size=+5>
 	<a href=../><font size=+5 color=#ffffff><i><b>
       pygame</b></i></font></a>&nbsp;&nbsp;</td>
 <td valign=middle><tt><font color=#dddddd><br>
 	PyGame<br>Documentation</font>
-</td></tr></table></td><td width=100% height=100% align=center valign=middle>
+</td></tr></table></td><td width=100% align=center valign=middle>
 
 	||&nbsp;
 	<a href=../>Home</a> &nbsp;||&nbsp;
 <a href=Font.html>Font</a> || 
 <a href=Joystick.html>Joystick</a> || 
 <a href=Rect.html>Rect</a> ||<br>
-|| <a href=Sound.html>Sound</a> || 
-<a href=Surface.html>Surface</a> || 
-<a href=pygame.html>pygame</a> || 
+|| <a href=pygame.html>pygame</a> || 
 <a href=pygame_cdrom.html>cdrom</a> || 
-<a href=pygame_constants.html>constants</a> ||<br>
-|| <a href=pygame_display.html>display</a> || 
-<a href=pygame_event.html>event</a> || 
-<a href=pygame_font.html>font</a> || 
-<a href=pygame_image.html>image</a> || 
-<a href=pygame_joystick.html>joystick</a> ||<br>
-|| <a href=pygame_key.html>key</a> || 
+<a href=pygame_constants.html>constants</a> || 
+<a href=pygame_display.html>display</a> || 
+<a href=pygame_event.html>event</a> ||<br>
+|| <a href=pygame_joystick.html>joystick</a> || 
+<a href=pygame_key.html>key</a> || 
 <a href=pygame_mixer.html>mixer</a> || 
 <a href=pygame_mouse.html>mouse</a> || 
-<a href=pygame_music.html>music</a> || 
-<a href=pygame_surfarray.html>surfarray</a> ||<br>
-|| <a href=pygame_time.html>time</a> ||<br>
+<a href=pygame_music.html>music</a> ||<br>
 
 
 </td></tr></table>
 get a pixel color</td></tr>
 
 
-<tr><td><a href=#get_at>get_at</a></td><td> -
-get a pixel color</td></tr>
-
-
 <tr><td><a href=#get_bitsize>get_bitsize</a></td><td> -
 query size of pixel</td></tr>
 
 locks Surface for pixel access</td></tr>
 
 
+<tr><td><a href=#map_rgb>map_rgb</a></td><td> -
+convert RGB into a mapped color</td></tr>
+
+
 <tr><td><a href=#map_rgba>map_rgba</a></td><td> -
 convert RGBA into a mapped color</td></tr>
 
 given point.
 </ul><br>&nbsp;<br>
 
-<a name=get_at><font size=+2><b>get_at
-</b></font><br><font size=+1><tt>
-Surface.get_at([x, y]) -> int
-</tt></font><ul>
-Returns the mapped pixel color at the coordinates given point.
-</ul><br>&nbsp;<br>
-
 <a name=get_bitsize><font size=+2><b>get_bitsize
 </b></font><br><font size=+1><tt>
 Surface.get_bitsize() -> int
 lazy.
 </ul><br>&nbsp;<br>
 
+<a name=map_rgb><font size=+2><b>map_rgb
+</b></font><br><font size=+1><tt>
+Surface.map_rgb([r, g, b]) -> int
+</tt></font><ul>
+Uses the Surface format to convert RGB into a mapped color value.
+Note that this will work if the RGB is passed as three arguments
+instead of a sequence.
+</ul><br>&nbsp;<br>
+
 <a name=map_rgba><font size=+2><b>map_rgba
 </b></font><br><font size=+1><tt>
 Surface.map_rgba([r, g, b, a]) -> int
 <html>
-<title>Font</title>
+<title>CD</title>
 <body bgcolor=#dddddd text=#333377 link=#7777bb vlink=#7777bb>
 
 <table border=0 width=100% cellpadding=0 cellspacing=0 bgcolor=#f5f5f5><tr valign=top>
 <td rowspan=2 width=60%><table border=0 cellpadding=5 cellspacing=0 bgcolor=#333377>
-<tr height=86 align=left><td valign=top><font color=#ffffff size=+5>
-	<a href=../>
-        <img src=mainlogo.gif width=300 height=100 alt="PyGame Logo" border=0></a></td>
+<tr height=86 align=left><td valign=middle><font color=#ffffff size=+5>
+	<a href=../><font size=+5 color=#ffffff><i><b>
+      pygame</b></i></font></a>&nbsp;&nbsp;</td>
 <td valign=middle><tt><font color=#dddddd><br>
 	PyGame<br>Documentation</font>
 </td></tr></table></td><td width=100% height=100% align=center valign=middle>
 <body bgcolor=#dddddd text=#333377 link=#7777bb vlink=#7777bb>
 
 <table border=0 width=100% cellpadding=0 cellspacing=0 bgcolor=#f5f5f5><tr valign=top>
-<td rowspan=2 width=60%><table border=0 cellpadding=5 cellspacing=0 bgcolor=#333377>
+<td rowspan=2><table border=0 cellpadding=5 cellspacing=0 bgcolor=#333377>
 <tr height=86 align=left><td valign=middle><font color=#ffffff size=+5>
 	<a href=../><font size=+5 color=#ffffff><i><b>
       pygame</b></i></font></a>&nbsp;&nbsp;</td>
 <td valign=middle><tt><font color=#dddddd><br>
 	PyGame<br>Documentation</font>
-</td></tr></table></td><td width=100% height=100% align=center valign=middle>
+</td></tr></table></td><td width=100% align=center valign=middle>
 
 	||&nbsp;
 	<a href=../>Home</a> &nbsp;||&nbsp;
 <a href=Font.html>Font</a> || 
 <a href=Joystick.html>Joystick</a> || 
 <a href=Rect.html>Rect</a> ||<br>
-|| <a href=Sound.html>Sound</a> || 
-<a href=Surface.html>Surface</a> || 
-<a href=pygame.html>pygame</a> || 
+|| <a href=pygame.html>pygame</a> || 
 <a href=pygame_cdrom.html>cdrom</a> || 
-<a href=pygame_constants.html>constants</a> ||<br>
-|| <a href=pygame_display.html>display</a> || 
-<a href=pygame_event.html>event</a> || 
-<a href=pygame_font.html>font</a> || 
-<a href=pygame_image.html>image</a> || 
-<a href=pygame_joystick.html>joystick</a> ||<br>
-|| <a href=pygame_key.html>key</a> || 
+<a href=pygame_constants.html>constants</a> || 
+<a href=pygame_display.html>display</a> || 
+<a href=pygame_event.html>event</a> ||<br>
+|| <a href=pygame_joystick.html>joystick</a> || 
+<a href=pygame_key.html>key</a> || 
 <a href=pygame_mixer.html>mixer</a> || 
 <a href=pygame_mouse.html>mouse</a> || 
-<a href=pygame_music.html>music</a> || 
-<a href=pygame_surfarray.html>surfarray</a> ||<br>
-|| <a href=pygame_time.html>time</a> ||<br>
+<a href=pygame_music.html>music</a> ||<br>
 
 
 </td></tr></table>
 Object constructors also get placed into this namespace, you can
 call functions like rect() and surface() to create objects of
 that type. As a convenience, you can import the members of
-pygame.locals directly into your module's namespace with "from
-pygame.locals import *". Most of the pygame examples do this if
+pygame.locals directly into your module's namespace with 'from
+pygame.locals import *'. Most of the pygame examples do this if
 you'd like to take a look.
 
 <hr>
 </b></font><br><font size=+1><tt>
 pygame.get_grab() -> bool
 </tt></font><ul>
-Returns true if the input is currently grabbed to
-your application.
+Returns true if the input is currently grabbed to your
+application.
 </ul><br>&nbsp;<br>
 
 <a name=init><font size=+2><b>init

docs/pygame_cdrom.html

 <body bgcolor=#dddddd text=#333377 link=#7777bb vlink=#7777bb>
 
 <table border=0 width=100% cellpadding=0 cellspacing=0 bgcolor=#f5f5f5><tr valign=top>
-<td rowspan=2 width=60%><table border=0 cellpadding=5 cellspacing=0 bgcolor=#333377>
+<td rowspan=2><table border=0 cellpadding=5 cellspacing=0 bgcolor=#333377>
 <tr height=86 align=left><td valign=middle><font color=#ffffff size=+5>
 	<a href=../><font size=+5 color=#ffffff><i><b>
       pygame</b></i></font></a>&nbsp;&nbsp;</td>
 <td valign=middle><tt><font color=#dddddd><br>
 	PyGame<br>Documentation</font>
-</td></tr></table></td><td width=100% height=100% align=center valign=middle>
+</td></tr></table></td><td width=100% align=center valign=middle>
 
 	||&nbsp;
 	<a href=../>Home</a> &nbsp;||&nbsp;
 <a href=Font.html>Font</a> || 
 <a href=Joystick.html>Joystick</a> || 
 <a href=Rect.html>Rect</a> ||<br>
-|| <a href=Sound.html>Sound</a> || 
-<a href=Surface.html>Surface</a> || 
-<a href=pygame.html>pygame</a> || 
+|| <a href=pygame.html>pygame</a> || 
 <a href=pygame_cdrom.html>cdrom</a> || 
-<a href=pygame_constants.html>constants</a> ||<br>
-|| <a href=pygame_display.html>display</a> || 
-<a href=pygame_event.html>event</a> || 
-<a href=pygame_font.html>font</a> || 
-<a href=pygame_image.html>image</a> || 
-<a href=pygame_joystick.html>joystick</a> ||<br>
-|| <a href=pygame_key.html>key</a> || 
+<a href=pygame_constants.html>constants</a> || 
+<a href=pygame_display.html>display</a> || 
+<a href=pygame_event.html>event</a> ||<br>
+|| <a href=pygame_joystick.html>joystick</a> || 
+<a href=pygame_key.html>key</a> || 
 <a href=pygame_mixer.html>mixer</a> || 
 <a href=pygame_mouse.html>mouse</a> || 
-<a href=pygame_music.html>music</a> || 
-<a href=pygame_surfarray.html>surfarray</a> ||<br>
-|| <a href=pygame_time.html>time</a> ||<br>
+<a href=pygame_music.html>music</a> ||<br>
 
 
 </td></tr></table>

docs/pygame_constants.html

 <body bgcolor=#dddddd text=#333377 link=#7777bb vlink=#7777bb>
 
 <table border=0 width=100% cellpadding=0 cellspacing=0 bgcolor=#f5f5f5><tr valign=top>
-<td rowspan=2 width=60%><table border=0 cellpadding=5 cellspacing=0 bgcolor=#333377>
+<td rowspan=2><table border=0 cellpadding=5 cellspacing=0 bgcolor=#333377>
 <tr height=86 align=left><td valign=middle><font color=#ffffff size=+5>
 	<a href=../><font size=+5 color=#ffffff><i><b>
       pygame</b></i></font></a>&nbsp;&nbsp;</td>
 <td valign=middle><tt><font color=#dddddd><br>
 	PyGame<br>Documentation</font>
-</td></tr></table></td><td width=100% height=100% align=center valign=middle>
+</td></tr></table></td><td width=100% align=center valign=middle>
 
 	||&nbsp;
 	<a href=../>Home</a> &nbsp;||&nbsp;
 <a href=Font.html>Font</a> || 
 <a href=Joystick.html>Joystick</a> || 
 <a href=Rect.html>Rect</a> ||<br>
-|| <a href=Sound.html>Sound</a> || 
-<a href=Surface.html>Surface</a> || 
-<a href=pygame.html>pygame</a> || 
+|| <a href=pygame.html>pygame</a> || 
 <a href=pygame_cdrom.html>cdrom</a> || 
-<a href=pygame_constants.html>constants</a> ||<br>
-|| <a href=pygame_display.html>display</a> || 
-<a href=pygame_event.html>event</a> || 
-<a href=pygame_font.html>font</a> || 
-<a href=pygame_image.html>image</a> || 
-<a href=pygame_joystick.html>joystick</a> ||<br>
-|| <a href=pygame_key.html>key</a> || 
+<a href=pygame_constants.html>constants</a> || 
+<a href=pygame_display.html>display</a> || 
+<a href=pygame_event.html>event</a> ||<br>
+|| <a href=pygame_joystick.html>joystick</a> || 
+<a href=pygame_key.html>key</a> || 
 <a href=pygame_mixer.html>mixer</a> || 
 <a href=pygame_mouse.html>mouse</a> || 
-<a href=pygame_music.html>music</a> || 
-<a href=pygame_surfarray.html>surfarray</a> ||<br>
-|| <a href=pygame_time.html>time</a> ||<br>
+<a href=pygame_music.html>music</a> ||<br>
 
 
 </td></tr></table>

docs/pygame_display.html

 <body bgcolor=#dddddd text=#333377 link=#7777bb vlink=#7777bb>
 
 <table border=0 width=100% cellpadding=0 cellspacing=0 bgcolor=#f5f5f5><tr valign=top>
-<td rowspan=2 width=60%><table border=0 cellpadding=5 cellspacing=0 bgcolor=#333377>
+<td rowspan=2><table border=0 cellpadding=5 cellspacing=0 bgcolor=#333377>
 <tr height=86 align=left><td valign=middle><font color=#ffffff size=+5>
 	<a href=../><font size=+5 color=#ffffff><i><b>
       pygame</b></i></font></a>&nbsp;&nbsp;</td>
 <td valign=middle><tt><font color=#dddddd><br>
 	PyGame<br>Documentation</font>
-</td></tr></table></td><td width=100% height=100% align=center valign=middle>
+</td></tr></table></td><td width=100% align=center valign=middle>
 
 	||&nbsp;
 	<a href=../>Home</a> &nbsp;||&nbsp;
 <a href=Font.html>Font</a> || 
 <a href=Joystick.html>Joystick</a> || 
 <a href=Rect.html>Rect</a> ||<br>
-|| <a href=Sound.html>Sound</a> || 
-<a href=Surface.html>Surface</a> || 
-<a href=pygame.html>pygame</a> || 
+|| <a href=pygame.html>pygame</a> || 
 <a href=pygame_cdrom.html>cdrom</a> || 
-<a href=pygame_constants.html>constants</a> ||<br>
-|| <a href=pygame_display.html>display</a> || 
-<a href=pygame_event.html>event</a> || 
-<a href=pygame_font.html>font</a> || 
-<a href=pygame_image.html>image</a> || 
-<a href=pygame_joystick.html>joystick</a> ||<br>
-|| <a href=pygame_key.html>key</a> || 
+<a href=pygame_constants.html>constants</a> || 
+<a href=pygame_display.html>display</a> || 
+<a href=pygame_event.html>event</a> ||<br>
+|| <a href=pygame_joystick.html>joystick</a> || 
+<a href=pygame_key.html>key</a> || 
 <a href=pygame_mixer.html>mixer</a> || 
 <a href=pygame_mouse.html>mouse</a> || 
-<a href=pygame_music.html>music</a> || 
-<a href=pygame_surfarray.html>surfarray</a> ||<br>
-|| <a href=pygame_time.html>time</a> ||<br>
+<a href=pygame_music.html>music</a> ||<br>
 
 
 </td></tr></table>
 <br>&nbsp;<br>
 Pygame currently supports any but depth >= 8 bits per pixl. 8bpp
 formats are considered to be 8-bit palettized modes, while 12,
-15, 16, 24, and 32 bits per pixel are considered "packed pixel"
+15, 16, 24, and 32 bits per pixel are considered 'packed pixel'
 modes, meaning each pixel contains the RGB color componsents
 packed into the bits of the pixel.
 <br>&nbsp;<br>

docs/pygame_event.html

 <body bgcolor=#dddddd text=#333377 link=#7777bb vlink=#7777bb>
 
 <table border=0 width=100% cellpadding=0 cellspacing=0 bgcolor=#f5f5f5><tr valign=top>
-<td rowspan=2 width=60%><table border=0 cellpadding=5 cellspacing=0 bgcolor=#333377>
+<td rowspan=2><table border=0 cellpadding=5 cellspacing=0 bgcolor=#333377>
 <tr height=86 align=left><td valign=middle><font color=#ffffff size=+5>
 	<a href=../><font size=+5 color=#ffffff><i><b>
       pygame</b></i></font></a>&nbsp;&nbsp;</td>
 <td valign=middle><tt><font color=#dddddd><br>
 	PyGame<br>Documentation</font>
-</td></tr></table></td><td width=100% height=100% align=center valign=middle>
+</td></tr></table></td><td width=100% align=center valign=middle>
 
 	||&nbsp;
 	<a href=../>Home</a> &nbsp;||&nbsp;
 <a href=Font.html>Font</a> || 
 <a href=Joystick.html>Joystick</a> || 
 <a href=Rect.html>Rect</a> ||<br>
-|| <a href=Sound.html>Sound</a> || 
-<a href=Surface.html>Surface</a> || 
-<a href=pygame.html>pygame</a> || 
+|| <a href=pygame.html>pygame</a> || 
 <a href=pygame_cdrom.html>cdrom</a> || 
-<a href=pygame_constants.html>constants</a> ||<br>
-|| <a href=pygame_display.html>display</a> || 
-<a href=pygame_event.html>event</a> || 
-<a href=pygame_font.html>font</a> || 
-<a href=pygame_image.html>image</a> || 
-<a href=pygame_joystick.html>joystick</a> ||<br>
-|| <a href=pygame_key.html>key</a> || 
+<a href=pygame_constants.html>constants</a> || 
+<a href=pygame_display.html>display</a> || 
+<a href=pygame_event.html>event</a> ||<br>
+|| <a href=pygame_joystick.html>joystick</a> || 
+<a href=pygame_key.html>key</a> || 
 <a href=pygame_mixer.html>mixer</a> || 
 <a href=pygame_mouse.html>mouse</a> || 
-<a href=pygame_music.html>music</a> || 
-<a href=pygame_surfarray.html>surfarray</a> ||<br>
-|| <a href=pygame_time.html>time</a> ||<br>
+<a href=pygame_music.html>music</a> ||<br>
 
 
 </td></tr></table>
 <br>
 <h2 align=center>pygame.event</h2>
-Contains event routines and object.
+Pygame handles all it's event messaging through an event queue.
+The routines in this module help you manage that event queue. The
+input queue is heavily dependent on the pygame display module. If
+the display has not been initialized and a video mode not set,
+the event queue will not really work.
+<br>&nbsp;<br>
+The queue is a stack of Event objects, there are a variety of
+ways to access the data on the queue. From simply checking for
+the existance of events, to grabbing them directly off the stack.
+<br>&nbsp;<br>
+All events have a type identifier. This event type is in between
+the values of NOEVENT and NUMEVENTS. All user defined events can
+have the value of USEREVENT or higher. It is recommended make
+sure your event id's follow this system.
+<br>&nbsp;<br>
+To get the state of various input devices, you can forego the
+event queue and access the input devices directly with their
+appropriate modules; mouse, key, and joystick. If you use this
+method, remember that pygame requires some form of communication
+with the system window manager and other parts of the platform.
+To keep pygame in synch with the system, you will need to call
+pygame.event.pump() to keep everything current. You'll want to
+call this function usually once per game loop.
+<br>&nbsp;<br>
+The event queue offers some simple filtering. This can help
+performance slightly by blocking certain event types from the
+queue, use the pygame.event.set_allowed() and
+pygame.event.set_blocked() to work with this filtering. All
+events default to allowed.
+<br>&nbsp;<br>
+Also know that you will not receive any events from a joystick
+device, until you have opened that joystick from the joystick
+module.<p>&nbsp;</p>An Event object contains an event type and a readonly set of
+member data. The Event object contains no method functions, just
+member data. Event objects are retrieved from the pygame event
+queue. You can create your own new events with the
+pygame.event.event() function.
+<br>&nbsp;<br>
+All Event objects contain an event type identifier in the
+Event.type member. You may also get full access to the Event's
+member data through the Event.dict method. All other member
+lookups will be passed through to the Event's dictionary values.
+<br>&nbsp;<br>
+While debugging and experimenting, you can print the Event
+objects for a quick display of its type and members.
 
 <hr>
 
 </b></font><br><font size=+1><tt>
 pygame.event.event_name(event type) -> string
 </tt></font><ul>
-Returns the standard SDL name for an event type.
-Mainly helpful for debugging, when trying to
-determine what the type of an event is.
+Returns the standard SDL name for an event type. Mainly helpful
+for debugging, when trying to determine what the type of an event
+is.
 </ul><br>&nbsp;<br>
 
 <a name=get><font size=+2><b>get
 </b></font><br><font size=+1><tt>
 pygame.event.set_grab(bool) -> None
 </tt></font><ul>
-Grabs all mouse and keyboard input for the
-display. Grabbing the input is not neccessary to
-receive keyboard and mouse events, but it ensures
-all input will go to your application. It also
-keeps the mouse locked inside your window. Set the
-grabbing on or off with the boolean argument. It
-is best to not always grab the input, since it
-prevents the end user from doing anything else on
+Grabs all mouse and keyboard input for the display. Grabbing the
+input is not neccessary to receive keyboard and mouse events, but
+it ensures all input will go to your application. It also keeps
+the mouse locked inside your window. Set the grabbing on or off
+with the boolean argument. It is best to not always grab the
+input, since it prevents the end user from doing anything else on
 their system.
 </ul><br>&nbsp;<br>
 

docs/pygame_font.html

 <body bgcolor=#dddddd text=#333377 link=#7777bb vlink=#7777bb>
 
 <table border=0 width=100% cellpadding=0 cellspacing=0 bgcolor=#f5f5f5><tr valign=top>
-<td rowspan=2 width=60%><table border=0 cellpadding=5 cellspacing=0 bgcolor=#333377>
+<td rowspan=2><table border=0 cellpadding=5 cellspacing=0 bgcolor=#333377>
 <tr height=86 align=left><td valign=middle><font color=#ffffff size=+5>
 	<a href=../><font size=+5 color=#ffffff><i><b>
       pygame</b></i></font></a>&nbsp;&nbsp;</td>
 <td valign=middle><tt><font color=#dddddd><br>
 	PyGame<br>Documentation</font>
-</td></tr></table></td><td width=100% height=100% align=center valign=middle>
+</td></tr></table></td><td width=100% align=center valign=middle>
 
 	||&nbsp;
 	<a href=../>Home</a> &nbsp;||&nbsp;
 <a href=Font.html>Font</a> || 
 <a href=Joystick.html>Joystick</a> || 
 <a href=Rect.html>Rect</a> ||<br>
-|| <a href=Sound.html>Sound</a> || 
-<a href=Surface.html>Surface</a> || 
-<a href=pygame.html>pygame</a> || 
+|| <a href=pygame.html>pygame</a> || 
 <a href=pygame_cdrom.html>cdrom</a> || 
-<a href=pygame_constants.html>constants</a> ||<br>
-|| <a href=pygame_display.html>display</a> || 
-<a href=pygame_event.html>event</a> || 
-<a href=pygame_font.html>font</a> || 
-<a href=pygame_image.html>image</a> || 
-<a href=pygame_joystick.html>joystick</a> ||<br>
-|| <a href=pygame_key.html>key</a> || 
+<a href=pygame_constants.html>constants</a> || 
+<a href=pygame_display.html>display</a> || 
+<a href=pygame_event.html>event</a> ||<br>
+|| <a href=pygame_joystick.html>joystick</a> || 
+<a href=pygame_key.html>key</a> || 
 <a href=pygame_mixer.html>mixer</a> || 
 <a href=pygame_mouse.html>mouse</a> || 
-<a href=pygame_music.html>music</a> || 
-<a href=pygame_surfarray.html>surfarray</a> ||<br>
-|| <a href=pygame_time.html>time</a> ||<br>
+<a href=pygame_music.html>music</a> ||<br>
 
 
 </td></tr></table>

docs/pygame_image.html

 <body bgcolor=#dddddd text=#333377 link=#7777bb vlink=#7777bb>
 
 <table border=0 width=100% cellpadding=0 cellspacing=0 bgcolor=#f5f5f5><tr valign=top>
-<td rowspan=2 width=60%><table border=0 cellpadding=5 cellspacing=0 bgcolor=#333377>
+<td rowspan=2><table border=0 cellpadding=5 cellspacing=0 bgcolor=#333377>
 <tr height=86 align=left><td valign=middle><font color=#ffffff size=+5>
 	<a href=../><font size=+5 color=#ffffff><i><b>
       pygame</b></i></font></a>&nbsp;&nbsp;</td>
 <td valign=middle><tt><font color=#dddddd><br>
 	PyGame<br>Documentation</font>
-</td></tr></table></td><td width=100% height=100% align=center valign=middle>
+</td></tr></table></td><td width=100% align=center valign=middle>
 
 	||&nbsp;
 	<a href=../>Home</a> &nbsp;||&nbsp;
 <a href=Font.html>Font</a> || 
 <a href=Joystick.html>Joystick</a> || 
 <a href=Rect.html>Rect</a> ||<br>
-|| <a href=Sound.html>Sound</a> || 
-<a href=Surface.html>Surface</a> || 
-<a href=pygame.html>pygame</a> || 
+|| <a href=pygame.html>pygame</a> || 
 <a href=pygame_cdrom.html>cdrom</a> || 
-<a href=pygame_constants.html>constants</a> ||<br>
-|| <a href=pygame_display.html>display</a> || 
-<a href=pygame_event.html>event</a> || 
-<a href=pygame_font.html>font</a> || 
-<a href=pygame_image.html>image</a> || 
-<a href=pygame_joystick.html>joystick</a> ||<br>
-|| <a href=pygame_key.html>key</a> || 
+<a href=pygame_constants.html>constants</a> || 
+<a href=pygame_display.html>display</a> || 
+<a href=pygame_event.html>event</a> ||<br>
+|| <a href=pygame_joystick.html>joystick</a> || 
+<a href=pygame_key.html>key</a> || 
 <a href=pygame_mixer.html>mixer</a> || 
 <a href=pygame_mouse.html>mouse</a> || 
-<a href=pygame_music.html>music</a> || 
-<a href=pygame_surfarray.html>surfarray</a> ||<br>
-|| <a href=pygame_time.html>time</a> ||<br>
+<a href=pygame_music.html>music</a> ||<br>
 
 
 </td></tr></table>

docs/pygame_joystick.html

 <body bgcolor=#dddddd text=#333377 link=#7777bb vlink=#7777bb>
 
 <table border=0 width=100% cellpadding=0 cellspacing=0 bgcolor=#f5f5f5><tr valign=top>
-<td rowspan=2 width=60%><table border=0 cellpadding=5 cellspacing=0 bgcolor=#333377>
+<td rowspan=2><table border=0 cellpadding=5 cellspacing=0 bgcolor=#333377>
 <tr height=86 align=left><td valign=middle><font color=#ffffff size=+5>
 	<a href=../><font size=+5 color=#ffffff><i><b>
       pygame</b></i></font></a>&nbsp;&nbsp;</td>
 <td valign=middle><tt><font color=#dddddd><br>
 	PyGame<br>Documentation</font>
-</td></tr></table></td><td width=100% height=100% align=center valign=middle>
+</td></tr></table></td><td width=100% align=center valign=middle>
 
 	||&nbsp;
 	<a href=../>Home</a> &nbsp;||&nbsp;
 <a href=Font.html>Font</a> || 
 <a href=Joystick.html>Joystick</a> || 
 <a href=Rect.html>Rect</a> ||<br>
-|| <a href=Sound.html>Sound</a> || 
-<a href=Surface.html>Surface</a> || 
-<a href=pygame.html>pygame</a> || 
+|| <a href=pygame.html>pygame</a> || 
 <a href=pygame_cdrom.html>cdrom</a> || 
-<a href=pygame_constants.html>constants</a> ||<br>
-|| <a href=pygame_display.html>display</a> || 
-<a href=pygame_event.html>event</a> || 
-<a href=pygame_font.html>font</a> || 
-<a href=pygame_image.html>image</a> || 
-<a href=pygame_joystick.html>joystick</a> ||<br>
-|| <a href=pygame_key.html>key</a> || 
+<a href=pygame_constants.html>constants</a> || 
+<a href=pygame_display.html>display</a> || 
+<a href=pygame_event.html>event</a> ||<br>
+|| <a href=pygame_joystick.html>joystick</a> || 
+<a href=pygame_key.html>key</a> || 
 <a href=pygame_mixer.html>mixer</a> || 
 <a href=pygame_mouse.html>mouse</a> || 
-<a href=pygame_music.html>music</a> || 
-<a href=pygame_surfarray.html>surfarray</a> ||<br>
-|| <a href=pygame_time.html>time</a> ||<br>
+<a href=pygame_music.html>music</a> ||<br>
 
 
 </td></tr></table>

docs/pygame_key.html

 <body bgcolor=#dddddd text=#333377 link=#7777bb vlink=#7777bb>
 
 <table border=0 width=100% cellpadding=0 cellspacing=0 bgcolor=#f5f5f5><tr valign=top>
-<td rowspan=2 width=60%><table border=0 cellpadding=5 cellspacing=0 bgcolor=#333377>
+<td rowspan=2><table border=0 cellpadding=5 cellspacing=0 bgcolor=#333377>
 <tr height=86 align=left><td valign=middle><font color=#ffffff size=+5>
 	<a href=../><font size=+5 color=#ffffff><i><b>
       pygame</b></i></font></a>&nbsp;&nbsp;</td>
 <td valign=middle><tt><font color=#dddddd><br>
 	PyGame<br>Documentation</font>
-</td></tr></table></td><td width=100% height=100% align=center valign=middle>
+</td></tr></table></td><td width=100% align=center valign=middle>
 
 	||&nbsp;
 	<a href=../>Home</a> &nbsp;||&nbsp;
 <a href=Font.html>Font</a> || 
 <a href=Joystick.html>Joystick</a> || 
 <a href=Rect.html>Rect</a> ||<br>
-|| <a href=Sound.html>Sound</a> || 
-<a href=Surface.html>Surface</a> || 
-<a href=pygame.html>pygame</a> || 
+|| <a href=pygame.html>pygame</a> || 
 <a href=pygame_cdrom.html>cdrom</a> || 
-<a href=pygame_constants.html>constants</a> ||<br>
-|| <a href=pygame_display.html>display</a> || 
-<a href=pygame_event.html>event</a> || 
-<a href=pygame_font.html>font</a> || 
-<a href=pygame_image.html>image</a> || 
-<a href=pygame_joystick.html>joystick</a> ||<br>
-|| <a href=pygame_key.html>key</a> || 
+<a href=pygame_constants.html>constants</a> || 
+<a href=pygame_display.html>display</a> || 
+<a href=pygame_event.html>event</a> ||<br>
+|| <a href=pygame_joystick.html>joystick</a> || 
+<a href=pygame_key.html>key</a> || 
 <a href=pygame_mixer.html>mixer</a> || 
 <a href=pygame_mouse.html>mouse</a> || 
-<a href=pygame_music.html>music</a> || 
-<a href=pygame_surfarray.html>surfarray</a> ||<br>
-|| <a href=pygame_time.html>time</a> ||<br>
+<a href=pygame_music.html>music</a> ||<br>
 
 
 </td></tr></table>

docs/pygame_mixer.html

 <body bgcolor=#dddddd text=#333377 link=#7777bb vlink=#7777bb>
 
 <table border=0 width=100% cellpadding=0 cellspacing=0 bgcolor=#f5f5f5><tr valign=top>
-<td rowspan=2 width=60%><table border=0 cellpadding=5 cellspacing=0 bgcolor=#333377>
+<td rowspan=2><table border=0 cellpadding=5 cellspacing=0 bgcolor=#333377>
 <tr height=86 align=left><td valign=middle><font color=#ffffff size=+5>
 	<a href=../><font size=+5 color=#ffffff><i><b>
       pygame</b></i></font></a>&nbsp;&nbsp;</td>
 <td valign=middle><tt><font color=#dddddd><br>
 	PyGame<br>Documentation</font>
-</td></tr></table></td><td width=100% height=100% align=center valign=middle>
+</td></tr></table></td><td width=100% align=center valign=middle>
 
 	||&nbsp;
 	<a href=../>Home</a> &nbsp;||&nbsp;
 <a href=Font.html>Font</a> || 
 <a href=Joystick.html>Joystick</a> || 
 <a href=Rect.html>Rect</a> ||<br>
-|| <a href=Sound.html>Sound</a> || 
-<a href=Surface.html>Surface</a> || 
-<a href=pygame.html>pygame</a> || 
+|| <a href=pygame.html>pygame</a> || 
 <a href=pygame_cdrom.html>cdrom</a> || 
-<a href=pygame_constants.html>constants</a> ||<br>
-|| <a href=pygame_display.html>display</a> || 
-<a href=pygame_event.html>event</a> || 
-<a href=pygame_font.html>font</a> || 
-<a href=pygame_image.html>image</a> || 
-<a href=pygame_joystick.html>joystick</a> ||<br>
-|| <a href=pygame_key.html>key</a> || 
+<a href=pygame_constants.html>constants</a> || 
+<a href=pygame_display.html>display</a> || 
+<a href=pygame_event.html>event</a> ||<br>
+|| <a href=pygame_joystick.html>joystick</a> || 
+<a href=pygame_key.html>key</a> || 
 <a href=pygame_mixer.html>mixer</a> || 
 <a href=pygame_mouse.html>mouse</a> || 
-<a href=pygame_music.html>music</a> || 
-<a href=pygame_surfarray.html>surfarray</a> ||<br>
-|| <a href=pygame_time.html>time</a> ||<br>
+<a href=pygame_music.html>music</a> ||<br>
 
 
 </td></tr></table>

docs/pygame_mouse.html

 <body bgcolor=#dddddd text=#333377 link=#7777bb vlink=#7777bb>
 
 <table border=0 width=100% cellpadding=0 cellspacing=0 bgcolor=#f5f5f5><tr valign=top>
-<td rowspan=2 width=60%><table border=0 cellpadding=5 cellspacing=0 bgcolor=#333377>
+<td rowspan=2><table border=0 cellpadding=5 cellspacing=0 bgcolor=#333377>
 <tr height=86 align=left><td valign=middle><font color=#ffffff size=+5>
 	<a href=../><font size=+5 color=#ffffff><i><b>
       pygame</b></i></font></a>&nbsp;&nbsp;</td>
 <td valign=middle><tt><font color=#dddddd><br>
 	PyGame<br>Documentation</font>
-</td></tr></table></td><td width=100% height=100% align=center valign=middle>
+</td></tr></table></td><td width=100% align=center valign=middle>
 
 	||&nbsp;
 	<a href=../>Home</a> &nbsp;||&nbsp;
 <a href=Font.html>Font</a> || 
 <a href=Joystick.html>Joystick</a> || 
 <a href=Rect.html>Rect</a> ||<br>
-|| <a href=Sound.html>Sound</a> || 
-<a href=Surface.html>Surface</a> || 
-<a href=pygame.html>pygame</a> || 
+|| <a href=pygame.html>pygame</a> || 
 <a href=pygame_cdrom.html>cdrom</a> || 
-<a href=pygame_constants.html>constants</a> ||<br>
-|| <a href=pygame_display.html>display</a> || 
-<a href=pygame_event.html>event</a> || 
-<a href=pygame_font.html>font</a> || 
-<a href=pygame_image.html>image</a> || 
-<a href=pygame_joystick.html>joystick</a> ||<br>
-|| <a href=pygame_key.html>key</a> || 
+<a href=pygame_constants.html>constants</a> || 
+<a href=pygame_display.html>display</a> || 
+<a href=pygame_event.html>event</a> ||<br>
+|| <a href=pygame_joystick.html>joystick</a> || 
+<a href=pygame_key.html>key</a> || 
 <a href=pygame_mixer.html>mixer</a> || 
 <a href=pygame_mouse.html>mouse</a> || 
-<a href=pygame_music.html>music</a> || 
-<a href=pygame_surfarray.html>surfarray</a> ||<br>
-|| <a href=pygame_time.html>time</a> ||<br>
+<a href=pygame_music.html>music</a> ||<br>
 
 
 </td></tr></table>

docs/pygame_music.html

 <body bgcolor=#dddddd text=#333377 link=#7777bb vlink=#7777bb>
 
 <table border=0 width=100% cellpadding=0 cellspacing=0 bgcolor=#f5f5f5><tr valign=top>
-<td rowspan=2 width=60%><table border=0 cellpadding=5 cellspacing=0 bgcolor=#333377>
+<td rowspan=2><table border=0 cellpadding=5 cellspacing=0 bgcolor=#333377>
 <tr height=86 align=left><td valign=middle><font color=#ffffff size=+5>
 	<a href=../><font size=+5 color=#ffffff><i><b>
       pygame</b></i></font></a>&nbsp;&nbsp;</td>
 <td valign=middle><tt><font color=#dddddd><br>
 	PyGame<br>Documentation</font>
-</td></tr></table></td><td width=100% height=100% align=center valign=middle>
+</td></tr></table></td><td width=100% align=center valign=middle>
 
 	||&nbsp;
 	<a href=../>Home</a> &nbsp;||&nbsp;
 <a href=Font.html>Font</a> || 
 <a href=Joystick.html>Joystick</a> || 
 <a href=Rect.html>Rect</a> ||<br>
-|| <a href=Sound.html>Sound</a> || 
-<a href=Surface.html>Surface</a> || 
-<a href=pygame.html>pygame</a> || 
+|| <a href=pygame.html>pygame</a> || 
 <a href=pygame_cdrom.html>cdrom</a> || 
-<a href=pygame_constants.html>constants</a> ||<br>
-|| <a href=pygame_display.html>display</a> || 
-<a href=pygame_event.html>event</a> || 
-<a href=pygame_font.html>font</a> || 
-<a href=pygame_image.html>image</a> || 
-<a href=pygame_joystick.html>joystick</a> ||<br>
-|| <a href=pygame_key.html>key</a> || 
+<a href=pygame_constants.html>constants</a> || 
+<a href=pygame_display.html>display</a> || 
+<a href=pygame_event.html>event</a> ||<br>
+|| <a href=pygame_joystick.html>joystick</a> || 
+<a href=pygame_key.html>key</a> || 
 <a href=pygame_mixer.html>mixer</a> || 
 <a href=pygame_mouse.html>mouse</a> || 
-<a href=pygame_music.html>music</a> || 
-<a href=pygame_surfarray.html>surfarray</a> ||<br>
-|| <a href=pygame_time.html>time</a> ||<br>
+<a href=pygame_music.html>music</a> ||<br>
 
 
 </td></tr></table>

docs/pygame_surfarray.html

 <body bgcolor=#dddddd text=#333377 link=#7777bb vlink=#7777bb>
 
 <table border=0 width=100% cellpadding=0 cellspacing=0 bgcolor=#f5f5f5><tr valign=top>
-<td rowspan=2 width=60%><table border=0 cellpadding=5 cellspacing=0 bgcolor=#333377>
+<td rowspan=2><table border=0 cellpadding=5 cellspacing=0 bgcolor=#333377>
 <tr height=86 align=left><td valign=middle><font color=#ffffff size=+5>
 	<a href=../><font size=+5 color=#ffffff><i><b>
       pygame</b></i></font></a>&nbsp;&nbsp;</td>
 <td valign=middle><tt><font color=#dddddd><br>
 	PyGame<br>Documentation</font>
-</td></tr></table></td><td width=100% height=100% align=center valign=middle>
+</td></tr></table></td><td width=100% align=center valign=middle>
 
 	||&nbsp;
 	<a href=../>Home</a> &nbsp;||&nbsp;
 <a href=Font.html>Font</a> || 
 <a href=Joystick.html>Joystick</a> || 
 <a href=Rect.html>Rect</a> ||<br>
-|| <a href=Sound.html>Sound</a> || 
-<a href=Surface.html>Surface</a> || 
-<a href=pygame.html>pygame</a> || 
+|| <a href=pygame.html>pygame</a> || 
 <a href=pygame_cdrom.html>cdrom</a> || 
-<a href=pygame_constants.html>constants</a> ||<br>
-|| <a href=pygame_display.html>display</a> || 
-<a href=pygame_event.html>event</a> || 
-<a href=pygame_font.html>font</a> || 
-<a href=pygame_image.html>image</a> || 
-<a href=pygame_joystick.html>joystick</a> ||<br>
-|| <a href=pygame_key.html>key</a> || 
+<a href=pygame_constants.html>constants</a> || 
+<a href=pygame_display.html>display</a> || 
+<a href=pygame_event.html>event</a> ||<br>
+|| <a href=pygame_joystick.html>joystick</a> || 
+<a href=pygame_key.html>key</a> || 
 <a href=pygame_mixer.html>mixer</a> || 
 <a href=pygame_mouse.html>mouse</a> || 
-<a href=pygame_music.html>music</a> || 
-<a href=pygame_surfarray.html>surfarray</a> ||<br>
-|| <a href=pygame_time.html>time</a> ||<br>
+<a href=pygame_music.html>music</a> ||<br>
 
 
 </td></tr></table>

docs/pygame_time.html

 <body bgcolor=#dddddd text=#333377 link=#7777bb vlink=#7777bb>
 
 <table border=0 width=100% cellpadding=0 cellspacing=0 bgcolor=#f5f5f5><tr valign=top>
-<td rowspan=2 width=60%><table border=0 cellpadding=5 cellspacing=0 bgcolor=#333377>
+<td rowspan=2><table border=0 cellpadding=5 cellspacing=0 bgcolor=#333377>
 <tr height=86 align=left><td valign=middle><font color=#ffffff size=+5>
 	<a href=../><font size=+5 color=#ffffff><i><b>
       pygame</b></i></font></a>&nbsp;&nbsp;</td>
 <td valign=middle><tt><font color=#dddddd><br>
 	PyGame<br>Documentation</font>
-</td></tr></table></td><td width=100% height=100% align=center valign=middle>
+</td></tr></table></td><td width=100% align=center valign=middle>
 
 	||&nbsp;
 	<a href=../>Home</a> &nbsp;||&nbsp;
 <a href=Font.html>Font</a> || 
 <a href=Joystick.html>Joystick</a> || 
 <a href=Rect.html>Rect</a> ||<br>
-|| <a href=Sound.html>Sound</a> || 
-<a href=Surface.html>Surface</a> || 
-<a href=pygame.html>pygame</a> || 
+|| <a href=pygame.html>pygame</a> || 
 <a href=pygame_cdrom.html>cdrom</a> || 
-<a href=pygame_constants.html>constants</a> ||<br>
-|| <a href=pygame_display.html>display</a> || 
-<a href=pygame_event.html>event</a> || 
-<a href=pygame_font.html>font</a> || 
-<a href=pygame_image.html>image</a> || 
-<a href=pygame_joystick.html>joystick</a> ||<br>
-|| <a href=pygame_key.html>key</a> || 
+<a href=pygame_constants.html>constants</a> || 
+<a href=pygame_display.html>display</a> || 
+<a href=pygame_event.html>event</a> ||<br>
+|| <a href=pygame_joystick.html>joystick</a> || 
+<a href=pygame_key.html>key</a> || 
 <a href=pygame_mixer.html>mixer</a> || 
 <a href=pygame_mouse.html>mouse</a> || 
-<a href=pygame_music.html>music</a> || 
-<a href=pygame_surfarray.html>surfarray</a> ||<br>
-|| <a href=pygame_time.html>time</a> ||<br>
+<a href=pygame_music.html>music</a> ||<br>
 
 
 </td></tr></table>
 milliseconds since startup</td></tr>
 
 
+<tr><td><a href=#set_timer>set_timer</a></td><td> -
+control timer events</td></tr>
+
+
 </table>
 
 <hr>
 imported.
 </ul><br>&nbsp;<br>
 
+<a name=set_timer><font size=+2><b>set_timer
+</b></font><br><font size=+1><tt>
+pygame.time.set_timer([millseconds, eventid]) -> int
+</tt></font><ul>
+Every given number of milliseconds, a new event with
+the given event id will be placed on the event queue.
+The timer will run indefinitely, until <u>set_timer()</u> is
+called with no arguments. Calling with no arguments stops
+the running timer.
+</ul><br>&nbsp;<br>
+
 
 <hr>
 

docs/util/makedocs.py

         l.append(str)
     l.sort()
     str = ''
-    for x in range(0, len(l), 5):
+    for x in range(0, len(l), 7):
         row = l[x:x+5]
         str += '|| ' + ' || \n'.join(row) + ' ||<br>\n'
     global MODULETOC
         modinfo = modules.get(cat, '')
         extrainfo = extras.get(cat, None)
         if extrainfo:
-            modinfo += '<br>&nbsp;<br>' + extrainfo
+            modinfo += '<p>&nbsp;</p>' + extrainfo
 
         finalinfo = {'title': cat.replace('_', '.'),
                      'docs': '\n'.join(htmldocs),

docs/util/pagelate.html

 <body bgcolor=#dddddd text=#333377 link=#7777bb vlink=#7777bb>
 
 <table border=0 width=100% cellpadding=0 cellspacing=0 bgcolor=#f5f5f5><tr valign=top>
-<td rowspan=2 width=60%><table border=0 cellpadding=5 cellspacing=0 bgcolor=#333377>
+<td rowspan=2><table border=0 cellpadding=5 cellspacing=0 bgcolor=#333377>
 <tr height=86 align=left><td valign=middle><font color=#ffffff size=+5>
 	<a href=../><font size=+5 color=#ffffff><i><b>
       pygame</b></i></font></a>&nbsp;&nbsp;</td>
 <td valign=middle><tt><font color=#dddddd><br>
 	PyGame<br>Documentation</font>
-</td></tr></table></td><td width=100% height=100% align=center valign=middle>
+</td></tr></table></td><td width=100% align=center valign=middle>
 	
 	||&nbsp;
 	<a href=../>Home</a> &nbsp;||&nbsp;
Add a comment to this file

examples/data/house_lo.wav

Binary file added.

Binary file modified.

examples/vgrade.py

 not be self explanatory, nonetheless it may still seem a bit
 strange. Learning to use numeric for images like this takes a
 bit of learning, but the payoff is extremely fast image
-manipulation in python."""
+manipulation in python.
+The code also demonstrates use of the timer events."""
 
 
 import pygame
     screen = pygame.display.set_mode(size, 0, 32)
     finished = 0
     pygame.event.set_blocked(MOUSEMOTION) #keep our queue cleaner
+    pygame.time.set_timer(500, USEREVENT+5)
     while 1:
-        if pygame.event.poll().type in (QUIT, KEYDOWN, MOUSEBUTTONDOWN):
+        event = pygame.event.poll()
+        if event.type in (QUIT, KEYDOWN, MOUSEBUTTONDOWN):
             break
-        DisplayGradient(screen)
-        pygame.time.delay(500)
+        elif event.type == USEREVENT+5:
+            DisplayGradient(screen)
 
     
 
 {
 	if(!SDL_WasInit(SDL_INIT_VIDEO))
 	{
-		if(SDL_InitSubSystem(SDL_INIT_VIDEO))
+		int status;
+
+		Py_BEGIN_ALLOW_THREADS
+		status = SDL_InitSubSystem(SDL_INIT_VIDEO);
+		Py_END_ALLOW_THREADS
+		
+		if(status)
 			return 0;
 		SDL_EnableUNICODE(1); /*the controversy!*/
 		PyGame_RegisterQuit(PyGame_Video_AutoQuit);
 	if(!initialized_once)
 	{
 #ifdef MS_WIN32
-		SDL_RegisterApp("PySDLWindow", 0, GetModuleHandle(NULL));
+		SDL_RegisterApp("pygame window", 0, GetModuleHandle(NULL));
 #endif
-		SDL_Init(0);
+		SDL_Init(SDL_INIT_TIMER);
 		initialized_once = 1;
 		Py_AtExit(atexit_quit);
 	}
 }
 
 
+    /*DOC*/ static char doc_pygame_event_EXTRA[] =
+    /*DOC*/    "An Event object contains an event type and a readonly set of\n"
+    /*DOC*/    "member data. The Event object contains no method functions, just\n"
+    /*DOC*/    "member data. Event objects are retrieved from the pygame event\n"
+    /*DOC*/    "queue. You can create your own new events with the\n"
+    /*DOC*/    "pygame.event.event() function.\n"
+    /*DOC*/    "\n"
+    /*DOC*/    "All Event objects contain an event type identifier in the\n"
+    /*DOC*/    "Event.type member. You may also get full access to the Event's\n"
+    /*DOC*/    "member data through the Event.dict method. All other member\n"
+    /*DOC*/    "lookups will be passed through to the Event's dictionary values.\n"
+    /*DOC*/    "\n"
+    /*DOC*/    "While debugging and experimenting, you can print the Event\n"
+    /*DOC*/    "objects for a quick display of its type and members.\n"
+    /*DOC*/ ;
+
+
 static PyTypeObject PyEvent_Type =
 {
 	PyObject_HEAD_INIT(NULL)
     /*DOC*/    "pygame.event.event_name(event type) -> string\n"
     /*DOC*/    "name for event type\n"
     /*DOC*/    "\n"
-    /*DOC*/    "Returns the standard SDL name for an event type.\n"
-    /*DOC*/    "Mainly helpful for debugging, when trying to\n"
-    /*DOC*/    "determine what the type of an event is.\n"
+    /*DOC*/    "Returns the standard SDL name for an event type. Mainly helpful\n"
+    /*DOC*/    "for debugging, when trying to determine what the type of an event\n"
+    /*DOC*/    "is.\n"
     /*DOC*/ ;
 
 static PyObject* event_name(PyObject* self, PyObject* arg)
     /*DOC*/    "pygame.event.set_grab(bool) -> None\n"
     /*DOC*/    "grab all input events\n"
     /*DOC*/    "\n"
-    /*DOC*/    "Grabs all mouse and keyboard input for the\n"
-    /*DOC*/    "display. Grabbing the input is not neccessary to\n"
-    /*DOC*/    "receive keyboard and mouse events, but it ensures\n"
-    /*DOC*/    "all input will go to your application. It also\n"
-    /*DOC*/    "keeps the mouse locked inside your window. Set the\n"
-    /*DOC*/    "grabbing on or off with the boolean argument. It\n"
-    /*DOC*/    "is best to not always grab the input, since it\n"
-    /*DOC*/    "prevents the end user from doing anything else on\n"
+    /*DOC*/    "Grabs all mouse and keyboard input for the display. Grabbing the\n"
+    /*DOC*/    "input is not neccessary to receive keyboard and mouse events, but\n"
+    /*DOC*/    "it ensures all input will go to your application. It also keeps\n"
+    /*DOC*/    "the mouse locked inside your window. Set the grabbing on or off\n"
+    /*DOC*/    "with the boolean argument. It is best to not always grab the\n"
+    /*DOC*/    "input, since it prevents the end user from doing anything else on\n"
     /*DOC*/    "their system.\n"
     /*DOC*/ ;
 
     /*DOC*/    "pygame.get_grab() -> bool\n"
     /*DOC*/    "query the state of input grabbing\n"
     /*DOC*/    "\n"
-    /*DOC*/    "Returns true if the input is currently grabbed to\n"
-    /*DOC*/    "your application.\n"
+    /*DOC*/    "Returns true if the input is currently grabbed to your\n"
+    /*DOC*/    "application.\n"
     /*DOC*/ ;
 
 static PyObject* get_grab(PyObject* self, PyObject* arg)
 static PyObject* wait(PyObject* self, PyObject* args)
 {
 	SDL_Event event;
+	int status;
 
 	if(!PyArg_ParseTuple(args, ""))
 		return NULL;
 
 	VIDEO_INIT_CHECK();
 
-	if(!SDL_WaitEvent(&event))
+	Py_BEGIN_ALLOW_THREADS
+	status = SDL_WaitEvent(&event);
+	Py_END_ALLOW_THREADS
+
+	if(!status)
 		return RAISE(PyExc_SDLError, SDL_GetError());
 
 	return PyEvent_New(&event);
 
 
     /*DOC*/ static char doc_pygame_event_MODULE[] =
-    /*DOC*/    "Contains event routines and object.\n"
+    /*DOC*/    "Pygame handles all it's event messaging through an event queue.\n"
+    /*DOC*/    "The routines in this module help you manage that event queue. The\n"
+    /*DOC*/    "input queue is heavily dependent on the pygame display module. If\n"
+    /*DOC*/    "the display has not been initialized and a video mode not set,\n"
+    /*DOC*/    "the event queue will not really work.\n"
+    /*DOC*/    "\n"
+    /*DOC*/    "The queue is a stack of Event objects, there are a variety of\n"
+    /*DOC*/    "ways to access the data on the queue. From simply checking for\n"
+    /*DOC*/    "the existance of events, to grabbing them directly off the stack.\n"
+    /*DOC*/    "\n"
+    /*DOC*/    "All events have a type identifier. This event type is in between\n"
+    /*DOC*/    "the values of NOEVENT and NUMEVENTS. All user defined events can\n"
+    /*DOC*/    "have the value of USEREVENT or higher. It is recommended make\n"
+    /*DOC*/    "sure your event id's follow this system.\n"
+    /*DOC*/    "\n"
+    /*DOC*/    "To get the state of various input devices, you can forego the\n"
+    /*DOC*/    "event queue and access the input devices directly with their\n"
+    /*DOC*/    "appropriate modules; mouse, key, and joystick. If you use this\n"
+    /*DOC*/    "method, remember that pygame requires some form of communication\n"
+    /*DOC*/    "with the system window manager and other parts of the platform.\n"
+    /*DOC*/    "To keep pygame in synch with the system, you will need to call\n"
+    /*DOC*/    "pygame.event.pump() to keep everything current. You'll want to\n"
+    /*DOC*/    "call this function usually once per game loop.\n"
+    /*DOC*/    "\n"
+    /*DOC*/    "The event queue offers some simple filtering. This can help\n"
+    /*DOC*/    "performance slightly by blocking certain event types from the\n"
+    /*DOC*/    "queue, use the pygame.event.set_allowed() and\n"
+    /*DOC*/    "pygame.event.set_blocked() to work with this filtering. All\n"
+    /*DOC*/    "events default to allowed.\n"
+    /*DOC*/    "\n"
+    /*DOC*/    "Also know that you will not receive any events from a joystick\n"
+    /*DOC*/    "device, until you have opened that joystick from the joystick\n"
+    /*DOC*/    "module.\n"
     /*DOC*/ ;
 
 void initevent()
 	import_pygame_base();
 }
 
+
+
 	if(!font_initialized)
 		return RAISE(PyExc_SDLError, "font not initialized");
 
+	Py_BEGIN_ALLOW_THREADS
 	font = TTF_OpenFont(filename, fontsize);
+	Py_END_ALLOW_THREADS
+	
 	if(!font)
 		return RAISE(PyExc_RuntimeError, SDL_GetError());
 	fontobj = PyFont_New(font);
 
 		if(!(rw = RWopsFromPython(file)))
 			return NULL;
+		Py_BEGIN_ALLOW_THREADS
 		surf = IMG_LoadTyped_RW(rw, 1, find_extension(name));
+		Py_END_ALLOW_THREADS
 	}
 	if(!surf)
 		return RAISE(PyExc_SDLError, IMG_GetError());
 
 static PyObject* joy_getattr(PyObject* self, char* attrname)
 {
-	if(_pysdl_sdl_is_initialized && _pysdl_joy_is_initialized)
-		return Py_FindMethod(joy__builtins__, self, attrname);
+	return Py_FindMethod(joy__builtins__, self, attrname);
 
 	PyErr_SetString(PyExc_NameError,	attrname);
 	return NULL;
 	if(PyString_Check(file))
 	{
 		name = PyString_AsString(file);
+		Py_BEGIN_ALLOW_THREADS
 		chunk = Mix_LoadWAV(name);
+		Py_END_ALLOW_THREADS
 	}
 	else
 	{
 		if(!(rw = RWopsFromPython(file)))
 			return NULL;
+		Py_BEGIN_ALLOW_THREADS
 		chunk = Mix_LoadWAV_RW(rw, 1);
+		Py_END_ALLOW_THREADS
 	}
 
 	if(!chunk)
 		current_music = NULL;
 	}
 
+	Py_BEGIN_ALLOW_THREADS
 	current_music = Mix_LoadMUS(filename);
+	Py_END_ALLOW_THREADS
+	
 	if(!current_music)
 		return RAISE(PyExc_SDLError, SDL_GetError());
 
 static PyObject* surf_get_rect(PyObject* self, PyObject* args)
 {
 	SDL_Surface* surf = PySurface_AsSurface(self);
-	return PyRect_New4(0, 0, surf->w, surf->h);
+	return PyRect_New4(0, 0, (short)surf->w, (short)surf->h);
 }
 
 
 #include "pygame.h"
 
 
+static int timer_event = SDL_NOEVENT;
+static Uint32 timer_callback(Uint32 interval)
+{
+	if(SDL_WasInit(SDL_INIT_VIDEO))
+	{
+		SDL_Event event = {timer_event};
+		SDL_PushEvent(&event);
+	}
+	return interval;
+}
+
+
+
+
 
     /*DOC*/ static char doc_get_ticks[] =
     /*DOC*/    "pygame.time.get_ticks() -> int\n"
 	if(!PyArg_ParseTuple(arg, "i", &ticks))
 		return NULL;
 
+	Py_BEGIN_ALLOW_THREADS
 	SDL_Delay(ticks);
+	Py_END_ALLOW_THREADS
+
+	RETURN_NONE
+}
+
+
+
+    /*DOC*/ static char doc_set_timer[] =
+    /*DOC*/    "pygame.time.set_timer([millseconds, eventid]) -> int\n"
+    /*DOC*/    "control timer events\n"
+    /*DOC*/    "\n"
+    /*DOC*/    "Every given number of milliseconds, a new event with\n"
+	/*DOC*/	   "the given event id will be placed on the event queue.\n"
+    /*DOC*/    "The timer will run indefinitely, until set_timer() is\n"
+    /*DOC*/    "called with no arguments. Calling with no arguments stops\n"
+    /*DOC*/    "the running timer.\n"
+    /*DOC*/ ;
+
+static PyObject* set_timer(PyObject* self, PyObject* arg)
+{
+	int ticks = 0, event = SDL_NOEVENT;
+	if(!PyArg_ParseTuple(arg, "ii", &ticks, &event))
+		return NULL;
+
+
+	/*just doublecheck that timer is initialized*/
+	if(!SDL_WasInit(SDL_INIT_TIMER))
+	{
+		if(SDL_Init(SDL_INIT_TIMER))
+			return RAISE(PyExc_SDLError, SDL_GetError());
+	}
+
+	if(!ticks || event == SDL_NOEVENT)
+		SDL_SetTimer(0, NULL);
+	else
+	{
+		timer_event = event;
+		SDL_SetTimer(ticks, timer_callback);
+	}
 
 	RETURN_NONE
 }
 {
 	{ "get_ticks", get_ticks, 1, doc_get_ticks },
 	{ "delay", delay, 1, doc_delay },
+	{ "set_timer", set_timer, 1, doc_set_timer },
 
 	{ NULL, NULL }
 };
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.