Commits

Lenard Lindstrom committed 9379bda

add event object comparison as per mailing list request

  • Participants
  • Parent commits f4e8669

Comments (0)

Files changed (37)

docs/ref/camera.html

-
-<html>
-<title>camera - Pygame Documentation</title>
-<body bgcolor=#aaeebb text=#000000 link=#331111 vlink=#331111>
-
-
-<table cellpadding=0 cellspacing=0 border=0 style='border: 3px solid black;' width='100%'>
-<tr>
-<td bgcolor='#c2fc20' style='padding: 6px;' align=center valign=center><a href='http://www.pygame.org/'><img src='../pygame_tiny.gif' border=0 width=200 height=60></a><br><b>pygame documentation</b></td>
-<td bgcolor='#6aee28' style='border-left: 3px solid black; padding: 6px;' align=center valign=center>
-	||&nbsp;
-	<a href=http://www.pygame.org>Pygame Home</a> &nbsp;||&nbsp;
-	<a href=../index.html>Help Contents</a> &nbsp;||
-	<a href=index.html>Reference Index</a> &nbsp;||
-	<br>&nbsp;<br>
-	
-<a href="camera.html">Camera</a>&nbsp;||&nbsp;
-<a href="cdrom.html">Cdrom</a>&nbsp;||&nbsp;
-<a href="color.html">Color</a>&nbsp;||&nbsp;
-<a href="cursors.html">Cursors</a>&nbsp;||&nbsp;
-<a href="display.html">Display</a>&nbsp;||&nbsp;
-<a href="draw.html">Draw</a>&nbsp;||&nbsp;
-<a href="event.html">Event</a>&nbsp;||&nbsp;
-<a href="examples.html">Examples</a>&nbsp;||&nbsp;
-<a href="font.html">Font</a>&nbsp;||&nbsp;
-<a href="image.html">Image</a>&nbsp;||&nbsp;
-<a href="joystick.html">Joystick</a>&nbsp;||&nbsp;
-<a href="key.html">Key</a>&nbsp;||&nbsp;
-<a href="locals.html">Locals</a>&nbsp;||&nbsp;
-<a href="mask.html">Mask</a>&nbsp;||&nbsp;
-<a href="mixer.html">Mixer</a>&nbsp;||&nbsp;
-<a href="mouse.html">Mouse</a>&nbsp;||&nbsp;
-<a href="movie.html">Movie</a>&nbsp;||&nbsp;
-<a href="music.html">Music</a>&nbsp;||&nbsp;
-<a href="overlay.html">Overlay</a>&nbsp;||&nbsp;
-<a href="pixelarray.html">Pixelarray</a>&nbsp;||&nbsp;
-<a href="pygame.html">Pygame</a>&nbsp;||&nbsp;
-<a href="rect.html">Rect</a>&nbsp;||&nbsp;
-<a href="scrap.html">Scrap</a>&nbsp;||&nbsp;
-<a href="sndarray.html">Sndarray</a>&nbsp;||&nbsp;
-<a href="sprite.html">Sprite</a>&nbsp;||&nbsp;
-<a href="surface.html">Surface</a>&nbsp;||&nbsp;
-<a href="surfarray.html">Surfarray</a>&nbsp;||&nbsp;
-<a href="tests.html">Tests</a>&nbsp;||&nbsp;
-<a href="time.html">Time</a>&nbsp;||&nbsp;
-<a href="transform.html">Transform</a>
-</td></tr></table>
-<br>
-
-
-<a name="pygame.camera">
-<big><b>pygame.camera</big></b><br><ul>
-  <i>pygame module for camera use</i><br>
-<ul><small><table>
-  <tr><td><a href="camera.html#pygame.camera.colorspace">pygame.camera.colorspace</a> - <font size=-1>Surface colorspace conversion</font></td><td>Surface colorspace conversion</td></tr>
-  <tr><td><a href="camera.html#pygame.camera.list_cameras">pygame.camera.list_cameras</a> - <font size=-1>returns a list of available cameras</font></td><td>returns a list of available cameras</td></tr>
-  <tr><td><a href="camera.html#pygame.camera.Camera">pygame.camera.Camera</a> - <font size=-1>load a camera</font></td><td>load a camera</td></tr>
-</table></small></ul>
-<p>Pygame currently supports only Linux and v4l2 cameras. </p>
-<p>The Bayer to <tt>RGB</tt> function is based on: </p>
-<pre> Sonix SN9C101 based webcam basic I/F routines
- Copyright (C) 2004 Takafumi Mizuno <taka-qce@ls-a.jp>
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
- 1. Redistributions of source code must retain the above copyright
-    notice, this list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above copyright
-    notice, this list of conditions and the following disclaimer in the
-    documentation and/or other materials provided with the distribution.
- THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- SUCH DAMAGE.
-</pre>
-<!--COMMENTS:pygame.camera--> &nbsp;<br> 
-
-
-<a name="pygame.camera.colorspace">
-<big><b>pygame.camera.colorspace</big></b><br><ul>
-  <i>Surface colorspace conversion</i><br>
-  <tt>pygame.camera.colorspace(Surface, format, DestSurface = None): return Surface</tt><br>
-<p>Allows for conversion from <tt>"RGB"</tt> to a destination colorspace of <tt>"HSV"</tt> or <tt>"YUV"</tt>. The source and destination surfaces must be the same size and pixel depth. This is useful for computer vision on devices with limited processing power. Capture as small of an image as possible, <tt>transform.scale()</tt> it even smaller, and then convert the colorspace to <tt>YUV</tt> or <tt>HSV</tt> before doing any processing on it. </p>
-<!--COMMENTS:pygame.camera.colorspace--> &nbsp;<br> 
-<br></ul>
-
-
-<a name="pygame.camera.list_cameras">
-<big><b>pygame.camera.list_cameras</big></b><br><ul>
-  <i>returns a list of available cameras</i><br>
-  <tt>pygame.camera.list_cameras(): return [cameras]</tt><br>
-<p>Checks the computer for available cameras and returns a list of strings of camera names, ready to be fed into <tt>pygame.camera.Camera</tt>. </p>
-<!--COMMENTS:pygame.camera.list_cameras--> &nbsp;<br> 
-<br></ul>
-
-
-<a name="pygame.camera.Camera">
-<big><b>pygame.camera.Camera</big></b><br><ul>
-  <i>load a camera</i><br>
-  <tt>pygame.camera.Camera(device, (width, height), format): return Camera</tt><br>
-<ul><small><table>
-  <tr><td><a href="camera.html#Camera.start">Camera.start</a> - <font size=-1>opens, initializes, and starts capturing</font></td><td>opens, initializes, and starts capturing</td></tr>
-  <tr><td><a href="camera.html#Camera.stop">Camera.stop</a> - <font size=-1>stops, uninitializes, and closes the camera</font></td><td>stops, uninitializes, and closes the camera</td></tr>
-  <tr><td><a href="camera.html#Camera.get_controls">Camera.get_controls</a> - <font size=-1>gets current values of user controls</font></td><td>gets current values of user controls</td></tr>
-  <tr><td><a href="camera.html#Camera.set_controls">Camera.set_controls</a> - <font size=-1>changes camera settings if supported by the camera</font></td><td>changes camera settings if supported by the camera</td></tr>
-  <tr><td><a href="camera.html#Camera.get_size">Camera.get_size</a> - <font size=-1>returns the dimensions of the images being recorded</font></td><td>returns the dimensions of the images being recorded</td></tr>
-  <tr><td><a href="camera.html#Camera.query_image">Camera.query_image</a> - <font size=-1>checks if a frame is ready</font></td><td>checks if a frame is ready</td></tr>
-  <tr><td><a href="camera.html#Camera.get_image">Camera.get_image</a> - <font size=-1>captures an image as a Surface</font></td><td>captures an image as a Surface</td></tr>
-  <tr><td><a href="camera.html#Camera.get_raw">Camera.get_raw</a> - <font size=-1>returns an unmodified image as a string</font></td><td>returns an unmodified image as a string</td></tr>
-</table></small></ul>
-<p>Loads a v4l2 camera. The device is typically something like "/dev/video0". Default width and height are 640 by 480. Format is the desired colorspace of the output. This is useful for computer vision purposes. The following are supported: </p>
-<ul>
- <li> RGB - Red, Green, Blue </li>
- <li> YUV - Luma, Blue Chrominance, Red Chrominance </li>
- <li> HSV - Hue, Saturation, Value </li>
-</ul>
-<!--COMMENTS:pygame.camera.Camera--> &nbsp;<br> 
-
-
-<a name="Camera.start">
-<big><b>Camera.start</big></b><br><ul>
-  <i>opens, initializes, and starts capturing</i><br>
-  <tt>Camera.start(): return None</tt><br>
-<p>Opens the camera device, attempts to initialize it, and begins recording images to a buffer. </p>
-<!--COMMENTS:Camera.start--> &nbsp;<br> 
-<br></ul>
-
-
-<a name="Camera.stop">
-<big><b>Camera.stop</big></b><br><ul>
-  <i>stops, uninitializes, and closes the camera</i><br>
-  <tt>Camera.stop(): return None</tt><br>
-<p>Stops recording, uninitializes the camera, and closes it. </p>
-<!--COMMENTS:Camera.stop--> &nbsp;<br> 
-<br></ul>
-
-
-<a name="Camera.get_controls">
-<big><b>Camera.get_controls</big></b><br><ul>
-  <i>gets current values of user controls</i><br>
-  <tt>Camera.get_controls(): return (hflip = bool, vflip = bool)</tt><br>
-<p>If the camera supports it, get_controls will return the current settings for horizontal and vertical image flip as bools. If unsupported, it will return the default values of (0, 0). Note that the return values here may be different than those returned by set_controls, though these are more likely to be correct. </p>
-<!--COMMENTS:Camera.get_controls--> &nbsp;<br> 
-<br></ul>
-
-
-<a name="Camera.set_controls">
-<big><b>Camera.set_controls</big></b><br><ul>
-  <i>changes camera settings if supported by the camera</i><br>
-  <tt>Camera.set_controls(hflip = bool, vflip = bool): return (hflip = bool, vflip = bool)</tt><br>
-<p>Allows you to change camera settings if the camera supports it. The return values will be the input values if the camera claims it succeeded or the values previously in use if not. Each argument is optional, and the desired one can be chosen by supplying the keyword, like hflip. Note that the actual settings being used by the camera may not be the same as those returned by set_controls. </p>
-<!--COMMENTS:Camera.set_controls--> &nbsp;<br> 
-<br></ul>
-
-
-<a name="Camera.get_size">
-<big><b>Camera.get_size</big></b><br><ul>
-  <i>returns the dimensions of the images being recorded</i><br>
-  <tt>Camera.get_size(): return (width, height)</tt><br>
-<p>Returns the current dimensions of the images being captured by the camera. </p>
-<!--COMMENTS:Camera.get_size--> &nbsp;<br> 
-<br></ul>
-
-
-<a name="Camera.query_image">
-<big><b>Camera.query_image</big></b><br><ul>
-  <i>checks if a frame is ready</i><br>
-  <tt>Camera.query_image(): return bool</tt><br>
-<p>If an image is ready to get, it returns true. Otherwise it returns false. Note that some webcams will always return False and will only queue a frame when called with a blocking function like get_image(). </p>
-<!--COMMENTS:Camera.query_image--> &nbsp;<br> 
-<br></ul>
-
-
-<a name="Camera.get_image">
-<big><b>Camera.get_image</big></b><br><ul>
-  <i>captures an image as a Surface</i><br>
-  <tt>Camera.get_image(Surface = None): return Surface</tt><br>
-<p>Pulls an image off of the buffer as an <tt>RGB</tt> Surface. It can optionally reuse an existing Surface to save time. The bit depth of the surface is either 24bits or the same as the optionally supplied Surface. </p>
-<!--COMMENTS:Camera.get_image--> &nbsp;<br> 
-<br></ul>
-
-
-<a name="Camera.get_raw">
-<big><b>Camera.get_raw</big></b><br><ul>
-  <i>returns an unmodified image as a string</i><br>
-  <tt>Camera.get_raw(): return string</tt><br>
-<p>Gets an image from a camera as a string in the native pixelformat of the camera. Useful for integration with other libraries. </p>
-<!--COMMENTS:Camera.get_raw--> &nbsp;<br> 
-<br></ul>
-<br></ul>
-<br></ul>
-
-</body></html>
+
+<html>
+<title>camera - Pygame Documentation</title>
+<body bgcolor=#aaeebb text=#000000 link=#331111 vlink=#331111>
+
+
+<table cellpadding=0 cellspacing=0 border=0 style='border: 3px solid black;' width='100%'>
+<tr>
+<td bgcolor='#c2fc20' style='padding: 6px;' align=center valign=center><a href='http://www.pygame.org/'><img src='../pygame_tiny.gif' border=0 width=200 height=60></a><br><b>pygame documentation</b></td>
+<td bgcolor='#6aee28' style='border-left: 3px solid black; padding: 6px;' align=center valign=center>
+	||&nbsp;
+	<a href=http://www.pygame.org>Pygame Home</a> &nbsp;||&nbsp;
+	<a href=../index.html>Help Contents</a> &nbsp;||
+	<a href=index.html>Reference Index</a> &nbsp;||
+	<br>&nbsp;<br>
+	
+<a href="camera.html">Camera</a>&nbsp;||&nbsp;
+<a href="cdrom.html">Cdrom</a>&nbsp;||&nbsp;
+<a href="color.html">Color</a>&nbsp;||&nbsp;
+<a href="cursors.html">Cursors</a>&nbsp;||&nbsp;
+<a href="display.html">Display</a>&nbsp;||&nbsp;
+<a href="draw.html">Draw</a>&nbsp;||&nbsp;
+<a href="event.html">Event</a>&nbsp;||&nbsp;
+<a href="examples.html">Examples</a>&nbsp;||&nbsp;
+<a href="font.html">Font</a>&nbsp;||&nbsp;
+<a href="image.html">Image</a>&nbsp;||&nbsp;
+<a href="joystick.html">Joystick</a>&nbsp;||&nbsp;
+<a href="key.html">Key</a>&nbsp;||&nbsp;
+<a href="locals.html">Locals</a>&nbsp;||&nbsp;
+<a href="mask.html">Mask</a>&nbsp;||&nbsp;
+<a href="midi.html">Midi</a>&nbsp;||&nbsp;
+<a href="mixer.html">Mixer</a>&nbsp;||&nbsp;
+<a href="mouse.html">Mouse</a>&nbsp;||&nbsp;
+<a href="movie.html">Movie</a>&nbsp;||&nbsp;
+<a href="music.html">Music</a>&nbsp;||&nbsp;
+<a href="overlay.html">Overlay</a>&nbsp;||&nbsp;
+<a href="pixelarray.html">Pixelarray</a>&nbsp;||&nbsp;
+<a href="pygame.html">Pygame</a>&nbsp;||&nbsp;
+<a href="rect.html">Rect</a>&nbsp;||&nbsp;
+<a href="scrap.html">Scrap</a>&nbsp;||&nbsp;
+<a href="sndarray.html">Sndarray</a>&nbsp;||&nbsp;
+<a href="sprite.html">Sprite</a>&nbsp;||&nbsp;
+<a href="surface.html">Surface</a>&nbsp;||&nbsp;
+<a href="surfarray.html">Surfarray</a>&nbsp;||&nbsp;
+<a href="tests.html">Tests</a>&nbsp;||&nbsp;
+<a href="time.html">Time</a>&nbsp;||&nbsp;
+<a href="transform.html">Transform</a>
+</td></tr></table>
+<br>
+
+
+<a name="pygame.camera">
+<big><b>pygame.camera</big></b><br><ul>
+  <i>pygame module for camera use</i><br>
+<ul><small><table>
+  <tr><td><a href="camera.html#pygame.camera.colorspace">pygame.camera.colorspace</a> - <font size=-1>Surface colorspace conversion</font></td><td>Surface colorspace conversion</td></tr>
+  <tr><td><a href="camera.html#pygame.camera.list_cameras">pygame.camera.list_cameras</a> - <font size=-1>returns a list of available cameras</font></td><td>returns a list of available cameras</td></tr>
+  <tr><td><a href="camera.html#pygame.camera.Camera">pygame.camera.Camera</a> - <font size=-1>load a camera</font></td><td>load a camera</td></tr>
+</table></small></ul>
+<p>Pygame currently supports only Linux and v4l2 cameras. </p>
+<p>The Bayer to <tt>RGB</tt> function is based on: </p>
+<pre> Sonix SN9C101 based webcam basic I/F routines
+ Copyright (C) 2004 Takafumi Mizuno <taka-qce@ls-a.jp>
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ 1. Redistributions of source code must retain the above copyright
+    notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in the
+    documentation and/or other materials provided with the distribution.
+ THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ SUCH DAMAGE.
+</pre>
+<!--COMMENTS:pygame.camera--> &nbsp;<br> 
+
+
+<a name="pygame.camera.colorspace">
+<big><b>pygame.camera.colorspace</big></b><br><ul>
+  <i>Surface colorspace conversion</i><br>
+  <tt>pygame.camera.colorspace(Surface, format, DestSurface = None): return Surface</tt><br>
+<p>Allows for conversion from <tt>"RGB"</tt> to a destination colorspace of <tt>"HSV"</tt> or <tt>"YUV"</tt>. The source and destination surfaces must be the same size and pixel depth. This is useful for computer vision on devices with limited processing power. Capture as small of an image as possible, <tt>transform.scale()</tt> it even smaller, and then convert the colorspace to <tt>YUV</tt> or <tt>HSV</tt> before doing any processing on it. </p>
+<!--COMMENTS:pygame.camera.colorspace--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.camera.list_cameras">
+<big><b>pygame.camera.list_cameras</big></b><br><ul>
+  <i>returns a list of available cameras</i><br>
+  <tt>pygame.camera.list_cameras(): return [cameras]</tt><br>
+<p>Checks the computer for available cameras and returns a list of strings of camera names, ready to be fed into <tt>pygame.camera.Camera</tt>. </p>
+<!--COMMENTS:pygame.camera.list_cameras--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.camera.Camera">
+<big><b>pygame.camera.Camera</big></b><br><ul>
+  <i>load a camera</i><br>
+  <tt>pygame.camera.Camera(device, (width, height), format): return Camera</tt><br>
+<ul><small><table>
+  <tr><td><a href="camera.html#Camera.start">Camera.start</a> - <font size=-1>opens, initializes, and starts capturing</font></td><td>opens, initializes, and starts capturing</td></tr>
+  <tr><td><a href="camera.html#Camera.stop">Camera.stop</a> - <font size=-1>stops, uninitializes, and closes the camera</font></td><td>stops, uninitializes, and closes the camera</td></tr>
+  <tr><td><a href="camera.html#Camera.get_controls">Camera.get_controls</a> - <font size=-1>gets current values of user controls</font></td><td>gets current values of user controls</td></tr>
+  <tr><td><a href="camera.html#Camera.set_controls">Camera.set_controls</a> - <font size=-1>changes camera settings if supported by the camera</font></td><td>changes camera settings if supported by the camera</td></tr>
+  <tr><td><a href="camera.html#Camera.get_size">Camera.get_size</a> - <font size=-1>returns the dimensions of the images being recorded</font></td><td>returns the dimensions of the images being recorded</td></tr>
+  <tr><td><a href="camera.html#Camera.query_image">Camera.query_image</a> - <font size=-1>checks if a frame is ready</font></td><td>checks if a frame is ready</td></tr>
+  <tr><td><a href="camera.html#Camera.get_image">Camera.get_image</a> - <font size=-1>captures an image as a Surface</font></td><td>captures an image as a Surface</td></tr>
+  <tr><td><a href="camera.html#Camera.get_raw">Camera.get_raw</a> - <font size=-1>returns an unmodified image as a string</font></td><td>returns an unmodified image as a string</td></tr>
+</table></small></ul>
+<p>Loads a v4l2 camera. The device is typically something like "/dev/video0". Default width and height are 640 by 480. Format is the desired colorspace of the output. This is useful for computer vision purposes. The following are supported: </p>
+<ul>
+ <li> RGB - Red, Green, Blue </li>
+ <li> YUV - Luma, Blue Chrominance, Red Chrominance </li>
+ <li> HSV - Hue, Saturation, Value </li>
+</ul>
+<!--COMMENTS:pygame.camera.Camera--> &nbsp;<br> 
+
+
+<a name="Camera.start">
+<big><b>Camera.start</big></b><br><ul>
+  <i>opens, initializes, and starts capturing</i><br>
+  <tt>Camera.start(): return None</tt><br>
+<p>Opens the camera device, attempts to initialize it, and begins recording images to a buffer. </p>
+<!--COMMENTS:Camera.start--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="Camera.stop">
+<big><b>Camera.stop</big></b><br><ul>
+  <i>stops, uninitializes, and closes the camera</i><br>
+  <tt>Camera.stop(): return None</tt><br>
+<p>Stops recording, uninitializes the camera, and closes it. </p>
+<!--COMMENTS:Camera.stop--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="Camera.get_controls">
+<big><b>Camera.get_controls</big></b><br><ul>
+  <i>gets current values of user controls</i><br>
+  <tt>Camera.get_controls(): return (hflip = bool, vflip = bool)</tt><br>
+<p>If the camera supports it, get_controls will return the current settings for horizontal and vertical image flip as bools. If unsupported, it will return the default values of (0, 0). Note that the return values here may be different than those returned by set_controls, though these are more likely to be correct. </p>
+<!--COMMENTS:Camera.get_controls--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="Camera.set_controls">
+<big><b>Camera.set_controls</big></b><br><ul>
+  <i>changes camera settings if supported by the camera</i><br>
+  <tt>Camera.set_controls(hflip = bool, vflip = bool): return (hflip = bool, vflip = bool)</tt><br>
+<p>Allows you to change camera settings if the camera supports it. The return values will be the input values if the camera claims it succeeded or the values previously in use if not. Each argument is optional, and the desired one can be chosen by supplying the keyword, like hflip. Note that the actual settings being used by the camera may not be the same as those returned by set_controls. </p>
+<!--COMMENTS:Camera.set_controls--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="Camera.get_size">
+<big><b>Camera.get_size</big></b><br><ul>
+  <i>returns the dimensions of the images being recorded</i><br>
+  <tt>Camera.get_size(): return (width, height)</tt><br>
+<p>Returns the current dimensions of the images being captured by the camera. </p>
+<!--COMMENTS:Camera.get_size--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="Camera.query_image">
+<big><b>Camera.query_image</big></b><br><ul>
+  <i>checks if a frame is ready</i><br>
+  <tt>Camera.query_image(): return bool</tt><br>
+<p>If an image is ready to get, it returns true. Otherwise it returns false. Note that some webcams will always return False and will only queue a frame when called with a blocking function like get_image(). </p>
+<!--COMMENTS:Camera.query_image--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="Camera.get_image">
+<big><b>Camera.get_image</big></b><br><ul>
+  <i>captures an image as a Surface</i><br>
+  <tt>Camera.get_image(Surface = None): return Surface</tt><br>
+<p>Pulls an image off of the buffer as an <tt>RGB</tt> Surface. It can optionally reuse an existing Surface to save time. The bit depth of the surface is either 24bits or the same as the optionally supplied Surface. </p>
+<!--COMMENTS:Camera.get_image--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="Camera.get_raw">
+<big><b>Camera.get_raw</big></b><br><ul>
+  <i>returns an unmodified image as a string</i><br>
+  <tt>Camera.get_raw(): return string</tt><br>
+<p>Gets an image from a camera as a string in the native pixelformat of the camera. Useful for integration with other libraries. </p>
+<!--COMMENTS:Camera.get_raw--> &nbsp;<br> 
+<br></ul>
+<br></ul>
+<br></ul>
+
+</body></html>

docs/ref/cdrom.html

 <a href="key.html">Key</a>&nbsp;||&nbsp;
 <a href="locals.html">Locals</a>&nbsp;||&nbsp;
 <a href="mask.html">Mask</a>&nbsp;||&nbsp;
+<a href="midi.html">Midi</a>&nbsp;||&nbsp;
 <a href="mixer.html">Mixer</a>&nbsp;||&nbsp;
 <a href="mouse.html">Mouse</a>&nbsp;||&nbsp;
 <a href="movie.html">Movie</a>&nbsp;||&nbsp;

docs/ref/color.html

 <a href="key.html">Key</a>&nbsp;||&nbsp;
 <a href="locals.html">Locals</a>&nbsp;||&nbsp;
 <a href="mask.html">Mask</a>&nbsp;||&nbsp;
+<a href="midi.html">Midi</a>&nbsp;||&nbsp;
 <a href="mixer.html">Mixer</a>&nbsp;||&nbsp;
 <a href="mouse.html">Mouse</a>&nbsp;||&nbsp;
 <a href="movie.html">Movie</a>&nbsp;||&nbsp;

docs/ref/cursors.html

 <a href="key.html">Key</a>&nbsp;||&nbsp;
 <a href="locals.html">Locals</a>&nbsp;||&nbsp;
 <a href="mask.html">Mask</a>&nbsp;||&nbsp;
+<a href="midi.html">Midi</a>&nbsp;||&nbsp;
 <a href="mixer.html">Mixer</a>&nbsp;||&nbsp;
 <a href="mouse.html">Mouse</a>&nbsp;||&nbsp;
 <a href="movie.html">Movie</a>&nbsp;||&nbsp;

docs/ref/display.html

 <a href="key.html">Key</a>&nbsp;||&nbsp;
 <a href="locals.html">Locals</a>&nbsp;||&nbsp;
 <a href="mask.html">Mask</a>&nbsp;||&nbsp;
+<a href="midi.html">Midi</a>&nbsp;||&nbsp;
 <a href="mixer.html">Mixer</a>&nbsp;||&nbsp;
 <a href="mouse.html">Mouse</a>&nbsp;||&nbsp;
 <a href="movie.html">Movie</a>&nbsp;||&nbsp;

docs/ref/draw.html

 <a href="key.html">Key</a>&nbsp;||&nbsp;
 <a href="locals.html">Locals</a>&nbsp;||&nbsp;
 <a href="mask.html">Mask</a>&nbsp;||&nbsp;
+<a href="midi.html">Midi</a>&nbsp;||&nbsp;
 <a href="mixer.html">Mixer</a>&nbsp;||&nbsp;
 <a href="mouse.html">Mouse</a>&nbsp;||&nbsp;
 <a href="movie.html">Movie</a>&nbsp;||&nbsp;

docs/ref/event.html

 <a href="key.html">Key</a>&nbsp;||&nbsp;
 <a href="locals.html">Locals</a>&nbsp;||&nbsp;
 <a href="mask.html">Mask</a>&nbsp;||&nbsp;
+<a href="midi.html">Midi</a>&nbsp;||&nbsp;
 <a href="mixer.html">Mixer</a>&nbsp;||&nbsp;
 <a href="mouse.html">Mouse</a>&nbsp;||&nbsp;
 <a href="movie.html">Movie</a>&nbsp;||&nbsp;
     VIDEORESIZE      size, w, h
     VIDEOEXPOSE      none
     USEREVENT        code
-</pre>
+</pre><p>Events support equality comparison. Two events are equal if they are the same type and have identical attribute values. Inequality checks also work. </p>
 <!--COMMENTS:pygame.event--> &nbsp;<br> 
 
 

docs/ref/examples.html

 <a href="key.html">Key</a>&nbsp;||&nbsp;
 <a href="locals.html">Locals</a>&nbsp;||&nbsp;
 <a href="mask.html">Mask</a>&nbsp;||&nbsp;
+<a href="midi.html">Midi</a>&nbsp;||&nbsp;
 <a href="mixer.html">Mixer</a>&nbsp;||&nbsp;
 <a href="mouse.html">Mouse</a>&nbsp;||&nbsp;
 <a href="movie.html">Movie</a>&nbsp;||&nbsp;
 <big><b>pygame.examples.vgrade.main</big></b><br><ul>
   <i>display a vertical gradient</i><br>
   <tt>pygame.examples.vgrade.main(): return None</tt><br>
-<p>Demonstrates creating a vertical gradient with Numeric python. The app will create a new gradient every half second and report the time needed to create and display the image. If you're not prepared to start working with the Numeric arrays, don't worry about the source for this one :] </p>
+<p>Demonstrates creating a vertical gradient with NumPy python. The app will create a new gradient every half second and report the time needed to create and display the image. If you're not prepared to start working with the NumPy arrays, don't worry about the source for this one :] </p>
 <!--COMMENTS:pygame.examples.vgrade.main--> &nbsp;<br> 
 <br></ul>
 
   <i>play various sndarray effects</i><br>
   <tt>pygame.examples.sound_array_demos.main(arraytype=None): return None</tt><br>
 <p>If arraytype is provided then use that array package. Valid values are 'numeric' or 'numpy'. Otherwise default to NumPy, or fall back on Numeric if NumPy is not installed. </p>
-<p>Uses sndarray and MumPy ( or Numeric) to create offset faded copies of the original sound. Currently it just uses hardcoded values for the number of echos and the delay. Easy for you to recreate as needed. Run as a program <tt>sound_array_demos.py</tt> takes an optional command line option, --numpy or --numeric, specifying which array package to use. </p>
+<p>Uses sndarray and NumPy ( or Numeric) to create offset faded copies of the original sound. Currently it just uses hardcoded values for the number of echos and the delay. Easy for you to recreate as needed. Run as a program <tt>sound_array_demos.py</tt> takes an optional command line option, --numpy or --numeric, specifying which array package to use. </p>
 <!--COMMENTS:pygame.examples.sound_array_demos.main--> &nbsp;<br> 
 <br></ul>
 

docs/ref/font.html

 <a href="key.html">Key</a>&nbsp;||&nbsp;
 <a href="locals.html">Locals</a>&nbsp;||&nbsp;
 <a href="mask.html">Mask</a>&nbsp;||&nbsp;
+<a href="midi.html">Midi</a>&nbsp;||&nbsp;
 <a href="mixer.html">Mixer</a>&nbsp;||&nbsp;
 <a href="mouse.html">Mouse</a>&nbsp;||&nbsp;
 <a href="movie.html">Movie</a>&nbsp;||&nbsp;

docs/ref/image.html

 <a href="key.html">Key</a>&nbsp;||&nbsp;
 <a href="locals.html">Locals</a>&nbsp;||&nbsp;
 <a href="mask.html">Mask</a>&nbsp;||&nbsp;
+<a href="midi.html">Midi</a>&nbsp;||&nbsp;
 <a href="mixer.html">Mixer</a>&nbsp;||&nbsp;
 <a href="mouse.html">Mouse</a>&nbsp;||&nbsp;
 <a href="movie.html">Movie</a>&nbsp;||&nbsp;

docs/ref/index.html

 <a href="key.html">Key</a>&nbsp;||&nbsp;
 <a href="locals.html">Locals</a>&nbsp;||&nbsp;
 <a href="mask.html">Mask</a>&nbsp;||&nbsp;
+<a href="midi.html">Midi</a>&nbsp;||&nbsp;
 <a href="mixer.html">Mixer</a>&nbsp;||&nbsp;
 <a href="mouse.html">Mouse</a>&nbsp;||&nbsp;
 <a href="movie.html">Movie</a>&nbsp;||&nbsp;
 <li><a href="mask.html#Mask.set_at">Mask.set_at</a> - <font size=-1>Sets the position in the mask given by x and y.</font></li>
 </ul>
 </ul>
+<li><a href="midi.html#pygame.midi">pygame.midi</a> - <font size=-1>send and receive midi messages</font></li>
 <li><a href="mixer.html#pygame.mixer">pygame.mixer</a> - <font size=-1>pygame module for loading and playing sounds</font></li>
 <ul>
 <li><a href="mixer.html#pygame.mixer.Channel">pygame.mixer.Channel</a> - <font size=-1>Create a Channel object for controlling playback</font></li>

docs/ref/joystick.html

 <a href="key.html">Key</a>&nbsp;||&nbsp;
 <a href="locals.html">Locals</a>&nbsp;||&nbsp;
 <a href="mask.html">Mask</a>&nbsp;||&nbsp;
+<a href="midi.html">Midi</a>&nbsp;||&nbsp;
 <a href="mixer.html">Mixer</a>&nbsp;||&nbsp;
 <a href="mouse.html">Mouse</a>&nbsp;||&nbsp;
 <a href="movie.html">Movie</a>&nbsp;||&nbsp;

docs/ref/key.html

 <a href="key.html">Key</a>&nbsp;||&nbsp;
 <a href="locals.html">Locals</a>&nbsp;||&nbsp;
 <a href="mask.html">Mask</a>&nbsp;||&nbsp;
+<a href="midi.html">Midi</a>&nbsp;||&nbsp;
 <a href="mixer.html">Mixer</a>&nbsp;||&nbsp;
 <a href="mouse.html">Mouse</a>&nbsp;||&nbsp;
 <a href="movie.html">Movie</a>&nbsp;||&nbsp;

docs/ref/locals.html

 <a href="key.html">Key</a>&nbsp;||&nbsp;
 <a href="locals.html">Locals</a>&nbsp;||&nbsp;
 <a href="mask.html">Mask</a>&nbsp;||&nbsp;
+<a href="midi.html">Midi</a>&nbsp;||&nbsp;
 <a href="mixer.html">Mixer</a>&nbsp;||&nbsp;
 <a href="mouse.html">Mouse</a>&nbsp;||&nbsp;
 <a href="movie.html">Movie</a>&nbsp;||&nbsp;

docs/ref/mask.html

 <a href="key.html">Key</a>&nbsp;||&nbsp;
 <a href="locals.html">Locals</a>&nbsp;||&nbsp;
 <a href="mask.html">Mask</a>&nbsp;||&nbsp;
+<a href="midi.html">Midi</a>&nbsp;||&nbsp;
 <a href="mixer.html">Mixer</a>&nbsp;||&nbsp;
 <a href="mouse.html">Mouse</a>&nbsp;||&nbsp;
 <a href="movie.html">Movie</a>&nbsp;||&nbsp;

docs/ref/midi.html

+
+<html>
+<title>midi - Pygame Documentation</title>
+<body bgcolor=#aaeebb text=#000000 link=#331111 vlink=#331111>
+
+
+<table cellpadding=0 cellspacing=0 border=0 style='border: 3px solid black;' width='100%'>
+<tr>
+<td bgcolor='#c2fc20' style='padding: 6px;' align=center valign=center><a href='http://www.pygame.org/'><img src='../pygame_tiny.gif' border=0 width=200 height=60></a><br><b>pygame documentation</b></td>
+<td bgcolor='#6aee28' style='border-left: 3px solid black; padding: 6px;' align=center valign=center>
+	||&nbsp;
+	<a href=http://www.pygame.org>Pygame Home</a> &nbsp;||&nbsp;
+	<a href=../index.html>Help Contents</a> &nbsp;||
+	<a href=index.html>Reference Index</a> &nbsp;||
+	<br>&nbsp;<br>
+	
+<a href="camera.html">Camera</a>&nbsp;||&nbsp;
+<a href="cdrom.html">Cdrom</a>&nbsp;||&nbsp;
+<a href="color.html">Color</a>&nbsp;||&nbsp;
+<a href="cursors.html">Cursors</a>&nbsp;||&nbsp;
+<a href="display.html">Display</a>&nbsp;||&nbsp;
+<a href="draw.html">Draw</a>&nbsp;||&nbsp;
+<a href="event.html">Event</a>&nbsp;||&nbsp;
+<a href="examples.html">Examples</a>&nbsp;||&nbsp;
+<a href="font.html">Font</a>&nbsp;||&nbsp;
+<a href="image.html">Image</a>&nbsp;||&nbsp;
+<a href="joystick.html">Joystick</a>&nbsp;||&nbsp;
+<a href="key.html">Key</a>&nbsp;||&nbsp;
+<a href="locals.html">Locals</a>&nbsp;||&nbsp;
+<a href="mask.html">Mask</a>&nbsp;||&nbsp;
+<a href="midi.html">Midi</a>&nbsp;||&nbsp;
+<a href="mixer.html">Mixer</a>&nbsp;||&nbsp;
+<a href="mouse.html">Mouse</a>&nbsp;||&nbsp;
+<a href="movie.html">Movie</a>&nbsp;||&nbsp;
+<a href="music.html">Music</a>&nbsp;||&nbsp;
+<a href="overlay.html">Overlay</a>&nbsp;||&nbsp;
+<a href="pixelarray.html">Pixelarray</a>&nbsp;||&nbsp;
+<a href="pygame.html">Pygame</a>&nbsp;||&nbsp;
+<a href="rect.html">Rect</a>&nbsp;||&nbsp;
+<a href="scrap.html">Scrap</a>&nbsp;||&nbsp;
+<a href="sndarray.html">Sndarray</a>&nbsp;||&nbsp;
+<a href="sprite.html">Sprite</a>&nbsp;||&nbsp;
+<a href="surface.html">Surface</a>&nbsp;||&nbsp;
+<a href="surfarray.html">Surfarray</a>&nbsp;||&nbsp;
+<a href="tests.html">Tests</a>&nbsp;||&nbsp;
+<a href="time.html">Time</a>&nbsp;||&nbsp;
+<a href="transform.html">Transform</a>
+</td></tr></table>
+<br>
+
+
+<a name="pygame.midi">
+<big><b>pygame.midi</big></b><br><ul>
+  <i>send and receive midi messages</i><br>
+<p>=== Under Development === </p>
+<p>See <tt>examples\midi.py</tt> for the current status the midi module api. </p>
+<!--COMMENTS:pygame.midi--> &nbsp;<br> 
+<br></ul>
+
+</body></html>

docs/ref/mixer.html

 <a href="key.html">Key</a>&nbsp;||&nbsp;
 <a href="locals.html">Locals</a>&nbsp;||&nbsp;
 <a href="mask.html">Mask</a>&nbsp;||&nbsp;
+<a href="midi.html">Midi</a>&nbsp;||&nbsp;
 <a href="mixer.html">Mixer</a>&nbsp;||&nbsp;
 <a href="mouse.html">Mouse</a>&nbsp;||&nbsp;
 <a href="movie.html">Movie</a>&nbsp;||&nbsp;

docs/ref/mouse.html

 <a href="key.html">Key</a>&nbsp;||&nbsp;
 <a href="locals.html">Locals</a>&nbsp;||&nbsp;
 <a href="mask.html">Mask</a>&nbsp;||&nbsp;
+<a href="midi.html">Midi</a>&nbsp;||&nbsp;
 <a href="mixer.html">Mixer</a>&nbsp;||&nbsp;
 <a href="mouse.html">Mouse</a>&nbsp;||&nbsp;
 <a href="movie.html">Movie</a>&nbsp;||&nbsp;

docs/ref/movie.html

 <a href="key.html">Key</a>&nbsp;||&nbsp;
 <a href="locals.html">Locals</a>&nbsp;||&nbsp;
 <a href="mask.html">Mask</a>&nbsp;||&nbsp;
+<a href="midi.html">Midi</a>&nbsp;||&nbsp;
 <a href="mixer.html">Mixer</a>&nbsp;||&nbsp;
 <a href="mouse.html">Mouse</a>&nbsp;||&nbsp;
 <a href="movie.html">Movie</a>&nbsp;||&nbsp;

docs/ref/music.html

 <a href="key.html">Key</a>&nbsp;||&nbsp;
 <a href="locals.html">Locals</a>&nbsp;||&nbsp;
 <a href="mask.html">Mask</a>&nbsp;||&nbsp;
+<a href="midi.html">Midi</a>&nbsp;||&nbsp;
 <a href="mixer.html">Mixer</a>&nbsp;||&nbsp;
 <a href="mouse.html">Mouse</a>&nbsp;||&nbsp;
 <a href="movie.html">Movie</a>&nbsp;||&nbsp;

docs/ref/overlay.html

 <a href="key.html">Key</a>&nbsp;||&nbsp;
 <a href="locals.html">Locals</a>&nbsp;||&nbsp;
 <a href="mask.html">Mask</a>&nbsp;||&nbsp;
+<a href="midi.html">Midi</a>&nbsp;||&nbsp;
 <a href="mixer.html">Mixer</a>&nbsp;||&nbsp;
 <a href="mouse.html">Mouse</a>&nbsp;||&nbsp;
 <a href="movie.html">Movie</a>&nbsp;||&nbsp;

docs/ref/pixelarray.html

 <a href="key.html">Key</a>&nbsp;||&nbsp;
 <a href="locals.html">Locals</a>&nbsp;||&nbsp;
 <a href="mask.html">Mask</a>&nbsp;||&nbsp;
+<a href="midi.html">Midi</a>&nbsp;||&nbsp;
 <a href="mixer.html">Mixer</a>&nbsp;||&nbsp;
 <a href="mouse.html">Mouse</a>&nbsp;||&nbsp;
 <a href="movie.html">Movie</a>&nbsp;||&nbsp;

docs/ref/pygame.html

 <a href="key.html">Key</a>&nbsp;||&nbsp;
 <a href="locals.html">Locals</a>&nbsp;||&nbsp;
 <a href="mask.html">Mask</a>&nbsp;||&nbsp;
+<a href="midi.html">Midi</a>&nbsp;||&nbsp;
 <a href="mixer.html">Mixer</a>&nbsp;||&nbsp;
 <a href="mouse.html">Mouse</a>&nbsp;||&nbsp;
 <a href="movie.html">Movie</a>&nbsp;||&nbsp;

docs/ref/rect.html

 <a href="key.html">Key</a>&nbsp;||&nbsp;
 <a href="locals.html">Locals</a>&nbsp;||&nbsp;
 <a href="mask.html">Mask</a>&nbsp;||&nbsp;
+<a href="midi.html">Midi</a>&nbsp;||&nbsp;
 <a href="mixer.html">Mixer</a>&nbsp;||&nbsp;
 <a href="mouse.html">Mouse</a>&nbsp;||&nbsp;
 <a href="movie.html">Movie</a>&nbsp;||&nbsp;

docs/ref/scrap.html

 <a href="key.html">Key</a>&nbsp;||&nbsp;
 <a href="locals.html">Locals</a>&nbsp;||&nbsp;
 <a href="mask.html">Mask</a>&nbsp;||&nbsp;
+<a href="midi.html">Midi</a>&nbsp;||&nbsp;
 <a href="mixer.html">Mixer</a>&nbsp;||&nbsp;
 <a href="mouse.html">Mouse</a>&nbsp;||&nbsp;
 <a href="movie.html">Movie</a>&nbsp;||&nbsp;

docs/ref/sndarray.html

 <a href="key.html">Key</a>&nbsp;||&nbsp;
 <a href="locals.html">Locals</a>&nbsp;||&nbsp;
 <a href="mask.html">Mask</a>&nbsp;||&nbsp;
+<a href="midi.html">Midi</a>&nbsp;||&nbsp;
 <a href="mixer.html">Mixer</a>&nbsp;||&nbsp;
 <a href="mouse.html">Mouse</a>&nbsp;||&nbsp;
 <a href="movie.html">Movie</a>&nbsp;||&nbsp;

docs/ref/sprite.html

 <a href="key.html">Key</a>&nbsp;||&nbsp;
 <a href="locals.html">Locals</a>&nbsp;||&nbsp;
 <a href="mask.html">Mask</a>&nbsp;||&nbsp;
+<a href="midi.html">Midi</a>&nbsp;||&nbsp;
 <a href="mixer.html">Mixer</a>&nbsp;||&nbsp;
 <a href="mouse.html">Mouse</a>&nbsp;||&nbsp;
 <a href="movie.html">Movie</a>&nbsp;||&nbsp;

docs/ref/surface.html

 <a href="key.html">Key</a>&nbsp;||&nbsp;
 <a href="locals.html">Locals</a>&nbsp;||&nbsp;
 <a href="mask.html">Mask</a>&nbsp;||&nbsp;
+<a href="midi.html">Midi</a>&nbsp;||&nbsp;
 <a href="mixer.html">Mixer</a>&nbsp;||&nbsp;
 <a href="mouse.html">Mouse</a>&nbsp;||&nbsp;
 <a href="movie.html">Movie</a>&nbsp;||&nbsp;

docs/ref/surfarray.html

 <a href="key.html">Key</a>&nbsp;||&nbsp;
 <a href="locals.html">Locals</a>&nbsp;||&nbsp;
 <a href="mask.html">Mask</a>&nbsp;||&nbsp;
+<a href="midi.html">Midi</a>&nbsp;||&nbsp;
 <a href="mixer.html">Mixer</a>&nbsp;||&nbsp;
 <a href="mouse.html">Mouse</a>&nbsp;||&nbsp;
 <a href="movie.html">Movie</a>&nbsp;||&nbsp;

docs/ref/tests.html

 <a href="key.html">Key</a>&nbsp;||&nbsp;
 <a href="locals.html">Locals</a>&nbsp;||&nbsp;
 <a href="mask.html">Mask</a>&nbsp;||&nbsp;
+<a href="midi.html">Midi</a>&nbsp;||&nbsp;
 <a href="mixer.html">Mixer</a>&nbsp;||&nbsp;
 <a href="mouse.html">Mouse</a>&nbsp;||&nbsp;
 <a href="movie.html">Movie</a>&nbsp;||&nbsp;

docs/ref/time.html

 <a href="key.html">Key</a>&nbsp;||&nbsp;
 <a href="locals.html">Locals</a>&nbsp;||&nbsp;
 <a href="mask.html">Mask</a>&nbsp;||&nbsp;
+<a href="midi.html">Midi</a>&nbsp;||&nbsp;
 <a href="mixer.html">Mixer</a>&nbsp;||&nbsp;
 <a href="mouse.html">Mouse</a>&nbsp;||&nbsp;
 <a href="movie.html">Movie</a>&nbsp;||&nbsp;

docs/ref/transform.html

 <a href="key.html">Key</a>&nbsp;||&nbsp;
 <a href="locals.html">Locals</a>&nbsp;||&nbsp;
 <a href="mask.html">Mask</a>&nbsp;||&nbsp;
+<a href="midi.html">Midi</a>&nbsp;||&nbsp;
 <a href="mixer.html">Mixer</a>&nbsp;||&nbsp;
 <a href="mouse.html">Mouse</a>&nbsp;||&nbsp;
 <a href="movie.html">Movie</a>&nbsp;||&nbsp;
+pygame.midi
+send and receive midi messages
+
+=== Under Development ===
+
+See examples\midi.py for the current status the midi module api.
+<END>
     (unaryfunc)NULL,		/*hex*/
 };
 
+/*
+ * eventA == eventB
+ * eventA != eventB
+ */
+static PyObject*
+event_richcompare(PyObject *o1, PyObject *o2, int opid)
+{
+    PyEventObject *e1, *e2;
+
+    if (!PyEvent_Check(o1) || !PyEvent_Check(o2))
+    {
+	goto Unimplemented;
+    }
+
+    e1 = (PyEventObject *) o1;
+    e2 = (PyEventObject *) o2;
+    switch (opid)
+    {
+    case Py_EQ:
+        return PyBool_FromLong (e1->type == e2->type &&
+				PyObject_RichCompareBool (e1->dict,
+						          e2->dict,
+						          Py_EQ) == 1);
+    case Py_NE:
+        return PyBool_FromLong (e1->type != e2->type ||
+				PyObject_RichCompareBool (e1->dict,
+						          e2->dict,
+						          Py_NE) == 1);
+    default:
+        break;
+    }
+
+Unimplemented:
+    Py_INCREF (Py_NotImplemented);
+    return Py_NotImplemented;
+}
+
 
 static PyTypeObject PyEvent_Type =
 {
     (hashfunc)NULL, 		/*hash*/
     (ternaryfunc)NULL,		/*call*/
     (reprfunc)NULL, 		/*str*/
-    0L,0L,0L,0L,
-    DOC_PYGAMEEVENTEVENT /* Documentation string */
+    0,                          /* tp_getattro */
+    0,                          /* tp_setattro */
+    0,                          /* tp_as_buffer */
+    Py_TPFLAGS_HAVE_RICHCOMPARE,
+    DOC_PYGAMEEVENTEVENT, /* Documentation string */
+    0,                          /* tp_traverse */
+    0,                          /* tp_clear */
+    event_richcompare,         /* tp_richcompare */
 };
 
 static PyObject*
     VIDEOEXPOSE      none
     USEREVENT        code
 
+Events support equality comparison. Two events are equal if they are the same
+type and have identical attribute values. Inequality checks also work.
 <SECTION>
 
 
 
 #define DOC_MASKGETBOUNDINGRECTS "Mask.get_bounding_rects() -> Rects\nReturns a list of bounding rects of regions of set pixels."
 
+#define DOC_PYGAMEMIDI "send and receive midi messages"
+
 #define DOC_PYGAMEMIXER "pygame module for loading and playing sounds"
 
 #define DOC_PYGAMEMIXERINIT "pygame.mixer.init(frequency=22050, size=-16, channels=2, buffer=4096): return None\ninitialize the mixer module"
 
 
 
+pygame.midi
+ send and receive midi messages
+
+
+
 pygame.mixer
  pygame module for loading and playing sounds
 

test/event_test.py

         pygame.event.set_grab(False)
         self.assert_(not pygame.event.get_grab())
 
+    def test_event_equality(self):
+        a = pygame.event.Event(1, a=1)
+        b = pygame.event.Event(1, a=1)
+        c = pygame.event.Event(2, a=1)
+        d = pygame.event.Event(1, a=2)
+
+        self.failUnless(a == a)
+        self.failIf(a != a)
+        self.failUnless(a == b)
+        self.failIf(a != b)
+        self.failUnless(a !=  c)
+        self.failIf(a == c)
+        self.failUnless(a != d)
+        self.failIf(a == d)
+        
     def todo_test_get_blocked(self):
 
         # __doc__ (as of 2008-08-02) for pygame.event.get_blocked: