Anonymous avatar Anonymous committed 29a7d65

Merged trunk r1760->r1947

Comments (0)

Files changed (237)

AdvUninstLog.nsh

-;_____________________________ HEADER FILE BEGIN ____________________________
-
-# Advanced Uninstall Log NSIS header
-# Version 1.0 2007-01-31
-# By Red Wine (http://nsis.sf.net/User:Red_Wine)
-# Modified by Tobbe
-
-# Usage: See included examples Uninstall_Log_Default_UI.nsi - Uninstall_Log_Modern_UI.nsi
-
-!verbose push
-!verbose 3
-
-!ifndef ADVANCED_UNINSTALL.LOG_NSH
-	!define ADVANCED_UNINSTALL.LOG_NSH
-
-	!ifndef INSTDIR_REG_ROOT | INSTDIR_REG_KEY
-		!error "You must properly define both INSTDIR_REG_ROOT and INSTDIR_REG_KEY"
-	!endif
-
-	!ifndef UNINSTALL_LOG
-		!define UNINSTALL_LOG "Uninstall"
-	!endif
-
-	!ifndef UNINST_LOG_VERBOSE
-		!define UNINST_LOG_VERBOSE "3"
-	!endif
-
-	!verbose pop
-
-	!echo "Advanced Uninstall Log NSIS header v1.0 2007-01-31 by Red Wine (http://nsis.sf.net/User:Red_Wine)"
-
-	!verbose push
-	!verbose ${UNINST_LOG_VERBOSE}
-
-	var unlog_header
-	var unlog_dat_not_found
-	var unlog_del_file
-	var unlog_del_dir
-	var unlog_empty_dir
-	var unlog_error_log
-	var unlog_error_create
-
-	!define UNINST_EXE "$INSTDIR\${UNINSTALL_LOG}.exe"
-	!define UNINST_DAT "$INSTDIR\${UNINSTALL_LOG}.dat"
-	!define UNLOG_PART "$PLUGINSDIR\part."
-	!define UNLOG_TEMP "$PLUGINSDIR\unlog.tmp"
-	!define EXCLU_LIST "$PLUGINSDIR\exclude.tmp"
-	!define UNLOG_HEAD "$unlog_header"
-
-	var unlog_tmp_0
-	var unlog_tmp_1
-	var unlog_tmp_2
-	var unlog_tmp_3
-	var unlog_error
-
-	!include FileFunc.nsh
-	!include TextFunc.nsh
-	
-	!insertmacro Locate
-	!insertmacro un.Locate
-	!insertmacro DirState
-	!insertmacro un.DirState
-	!insertmacro FileJoin
-	!insertmacro TrimNewLines
-	!insertmacro un.TrimNewLines
-	
-	;.............................. Uninstaller Macros ..............................
-	
-	!macro UNINSTALL.LOG_BEGIN_UNINSTALL
-		!verbose push
-		!verbose ${UNINST_LOG_VERBOSE}
-	
-		IfFileExists "${UNINST_DAT}" +3
-		MessageBox MB_ICONSTOP|MB_OK $unlog_dat_not_found /SD IDOK
-		Quit
-	
-		StrCmp "$PLUGINSDIR" "" 0 +2
-		InitPluginsDir
-	
-		CopyFiles "${UNINST_DAT}" "${UNLOG_TEMP}"
-		FileOpen $unlog_tmp_2 "${UNLOG_TEMP}" r
-	
-		!verbose pop
-	!macroend
-	
-	!macro UNINSTALL.LOG_END_UNINSTALL
-		!verbose push
-		!verbose ${UNINST_LOG_VERBOSE}
-	
-		FileClose $unlog_tmp_2
-		DeleteRegValue ${INSTDIR_REG_ROOT} "${INSTDIR_REG_KEY}" "${UNINSTALL_LOG}.dat"
-		DeleteRegValue ${INSTDIR_REG_ROOT} "${INSTDIR_REG_KEY}" "${UNINSTALL_LOG}Directory"
-	
-		!verbose pop
-	!macroend
-	
-	!macro UNINSTALL.LOG_UNINSTALL TargetDir
-		!verbose push
-		!verbose ${UNINST_LOG_VERBOSE}
-	
-		!ifndef INTERACTIVE_UNINSTALL & UNATTENDED_UNINSTALL
-			!error "You must insert either Interactive or Unattended Uninstall neither both, neither none."
-		!endif
-	
-		!ifdef INTERACTIVE_UNINSTALL
-			GetTempFileName $unlog_tmp_5 "$PLUGINSDIR"
-			FileOpen $unlog_tmp_4 "$unlog_tmp_5" a
-		!endif
-	
-		${PerfomUninstall} "${TargetDir}" "${UnLog_Uninstall_CallBackFunc}"
-	
-		!ifdef INTERACTIVE_UNINSTALL
-			FileClose $unlog_tmp_4
-		!endif
-	
-		!verbose pop
-	!macroend
-	
-	!define PerfomUninstall "!insertmacro PERFORMUNINSTALL"
-	
-	!macro PERFORMUNINSTALL TargetDir UninstCallBackFunc
-		!verbose push
-		!verbose ${UNINST_LOG_VERBOSE}
-	
-		!define ID ${__LINE__}
-	
-		${un.Locate} "${TargetDir}" "/L=F" "${UninstCallBackFunc}"
-	
-		loop_${ID}:
-	
-		StrCpy $unlog_tmp_1 0
-	
-		${un.Locate} "${TargetDir}" "/L=DE" "${UninstCallBackFunc}"
-		StrCmp $unlog_tmp_1 "0" 0 loop_${ID}
-	
-		${un.DirState} "${TargetDir}" $unlog_tmp_0
-		StrCmp "$unlog_tmp_0" "0" 0 +2
-		RmDir "${TargetDir}"
-	
-		IfErrors 0 +2
-		MessageBox MB_ICONEXCLAMATION|MB_OK "$unlog_error_log" /SD IDOK
-	
-		!undef ID
-	
-		!verbose pop
-	!macroend
-	
-	!macro INTERACTIVE_UNINSTALL
-		!verbose push
-		!verbose ${UNINST_LOG_VERBOSE}
-	
-		!ifdef INTERACTIVE_UNINSTALL
-			!error "INTERACTIVE_UNINSTALL is already defined"
-		!endif
-	
-		var unlog_tmp_4
-		var unlog_tmp_5
-	
-		!define INTERACTIVE_UNINSTALL
-	
-		!ifdef INTERACTIVE_UNINSTALL & UNATTENDED_UNINSTALL
-			!error "You must insert either Interactive or Unattended Uninstall neither both, neither none."
-		!endif
-	
-		!ifdef UnLog_Uninstall_CallBackFunc
-			!undef UnLog_Uninstall_CallBackFunc
-		!endif
-	
-		!ifndef UnLog_Uninstall_CallBackFunc
-			!insertmacro UNINSTALL.LOG_UNINSTALL_INTERACTIVE
-			!define UnLog_Uninstall_CallBackFunc "un._LocateCallBack_Function_Interactive"
-		!endif
-	
-		!verbose pop
-	!macroend
-	
-	!macro UNATTENDED_UNINSTALL
-		!verbose push
-		!verbose ${UNINST_LOG_VERBOSE}
-	
-		!ifdef UNATTENDED_UNINSTALL
-			!error "UNATTENDED_UNINSTALL is already defined"
-		!endif
-	
-		!define UNATTENDED_UNINSTALL
-	
-		!ifdef INTERACTIVE_UNINSTALL & UNATTENDED_UNINSTALL
-			!error "You must insert either Interactive or Unattended Uninstall neither both, neither none."
-		!endif
-	
-		!ifdef UnLog_Uninstall_CallBackFunc
-			!undef UnLog_Uninstall_CallBackFunc
-		!endif
-	
-		!ifndef UnLog_Uninstall_CallBackFunc
-			!insertmacro UNINSTALL.LOG_UNINSTALL_UNATTENDED
-			!define UnLog_Uninstall_CallBackFunc "un._LocateCallBack_Function_Unattended"
-		!endif
-	
-		!verbose pop
-	!macroend
-	
-	!macro UNINSTALL.LOG_UNINSTALL_UNATTENDED
-		Function un._LocateCallBack_Function_Unattended
-			start:
-				FileRead $unlog_tmp_2 "$unlog_tmp_3" ${NSIS_MAX_STRLEN}
-				${un.TrimNewLines} "$unlog_tmp_3" "$unlog_tmp_3"
-				StrCmp "$unlog_tmp_3" "$R9" islog
-				IfErrors nolog
-				goto start
-		
-			islog:
-				IfFileExists "$R9\*.*" isdir
-		
-			isfile:
-				Delete "$R9"
-				goto end
-		
-		    isdir:
-				RmDir "$R9"
-				IntOp $unlog_tmp_1 $unlog_tmp_1 + 1
-				goto end
-		
-			nolog:
-				ClearErrors
-				StrCmp "$R9" "${UNINST_EXE}" isfile
-				StrCmp "$R9" "${UNINST_DAT}" isfile
-		
-			end:
-			FileSeek $unlog_tmp_2 0 SET
-			Push $unlog_tmp_0
-		FunctionEnd
-	!macroend
-	
-	!macro UNINSTALL.LOG_UNINSTALL_INTERACTIVE
-		Function un._LocateCallBack_Function_Interactive
-			start:
-				FileRead $unlog_tmp_2 "$unlog_tmp_3" ${NSIS_MAX_STRLEN}
-				${un.TrimNewLines} "$unlog_tmp_3" "$unlog_tmp_3"
-				StrCmp "$unlog_tmp_3" "$R9" islog
-				IfErrors nolog
-				goto start
-	
-			islog:
-				IfFileExists "$R9\*.*" isdir
-	
-			isfile:
-				Delete "$R9"
-				goto end
-	
-			isdir:
-				RmDir "$R9"
-				IntOp $unlog_tmp_1 $unlog_tmp_1 + 1
-				goto end
-	
-			nolog:
-				ClearErrors
-				FileSeek $unlog_tmp_4 0 SET
-			read:
-				FileRead $unlog_tmp_4 "$unlog_tmp_3"
-				${un.TrimNewLines} "$unlog_tmp_3" "$unlog_tmp_3"
-				StrCmp "$unlog_tmp_3" "$R9" end
-				IfErrors +2
-				goto read
-				ClearErrors 
-				StrCmp "$R9" "${UNINST_EXE}" isfile
-				StrCmp "$R9" "${UNINST_DAT}" isfile
-				IfFileExists "$R9\*.*" msgdir
-	
-				MessageBox MB_ICONQUESTION|MB_YESNO "$unlog_del_file" /SD IDNO IDYES isfile IDNO nodel
-				msgdir:
-					MessageBox MB_ICONQUESTION|MB_YESNO "$unlog_del_dir" /SD IDNO IDYES isdir IDNO nodel
-	
-			nodel:
-				FileSeek $unlog_tmp_4 0 END
-				FileWrite $unlog_tmp_4 "$R9$\r$\n"
-	
-			end:
-			FileSeek $unlog_tmp_2 0 SET
-			Push $unlog_tmp_0
-		FunctionEnd
-	!macroend
-	
-	;................................. Installer Macros .................................
-	
-	!macro UNINSTALL.LOG_INSTALL_UNATTENDED
-		Function _LocateCallBack_Function_Install
-			loop:
-				FileRead $unlog_tmp_2 "$unlog_tmp_3" ${NSIS_MAX_STRLEN}
-				${TrimNewLines} "$unlog_tmp_3" "$unlog_tmp_3"
-				IfErrors 0 +4
-				ClearErrors
-				FileSeek $unlog_tmp_2 0 SET
-				goto next
-				StrCmp "$R9" "$unlog_tmp_3" end
-				goto loop
-			next:
-				FileWrite $unlog_tmp_1 "$R9$\r$\n"
-			end:
-			Push $unlog_tmp_0
-		FunctionEnd
-	!macroend
-	
-	!ifdef UnLog_Install_Func_CallBack
-		!undef UnLog_Install_Func_CallBack
-	!endif
-	
-	!ifndef UnLog_Install_Func_CallBack
-		!insertmacro UNINSTALL.LOG_INSTALL_UNATTENDED
-		!define UnLog_Install_Func_CallBack "_LocateCallBack_Function_Install"
-	!endif
-	
-	!macro UNINSTALL.LOG_PREPARE_INSTALL
-		!verbose push
-		!verbose ${UNINST_LOG_VERBOSE}
-	
-		Push $0
-		Push $1
-		ClearErrors
-		ReadRegStr "$0"  ${INSTDIR_REG_ROOT} "${INSTDIR_REG_KEY}" "${UNINSTALL_LOG}Directory"
-		IfErrors next
-		${DirState} "$0" $1
-		StrCmp "$1" "-1" next
-		StrCmp "$1" "0" next
-		IfFileExists "$0\${UNINSTALL_LOG}.dat" next
-		MessageBox MB_ICONEXCLAMATION|MB_OK "$unlog_empty_dir" /SD IDOK
-		StrCpy $unlog_error "error"
-	
-		next:
-		ClearErrors
-		StrCmp "$PLUGINSDIR" "" 0 +2
-			InitPluginsDir
-
-		StrCpy $unlog_header "=========== Uninstaller Log please do not edit this file ==========="
-		StrCpy $unlog_dat_not_found "${UNINST_DAT} not found, unable to perform uninstall."
-		StrCpy $unlog_del_file 'Delete File "$R9"?'
-		StrCpy $unlog_del_dir 'Delete Directory "$R9"?'
-		StrCpy $unlog_empty_dir "Previous installation detected at $0.$\nRequired file ${UNINSTALL_LOG}.dat is missing.$\n$\nIt is highly recommended to select an empty directory and perform a fresh installation."
-		StrCpy $unlog_error_log "Error in log ${UNINSTALL_LOG}."
-		StrCpy $unlog_error_create "Error creating ${UNINSTALL_LOG}."
-
-		!ifdef UNINSTALLOG_LOCALIZE ; Needed to get rid of compiler warnings when not doing any localization
-			StrCmp $(UNLOG_HEADER) "" +2 0
-				StrCpy $unlog_header $(UNLOG_HEADER)
-			StrCmp $(UNLOG_DAT_NOT_FOUND) "" +2 0
-				StrCpy $unlog_dat_not_found $(UNLOG_DAT_NOT_FOUND)
-			StrCmp $(UNLOG_DEL_FILE) "" +2 0
-				StrCpy $unlog_del_file $(UNLOG_DEL_FILE)
-			StrCmp $(UNLOG_DEL_DIR) "" +2 0
-				StrCpy $unlog_del_dir $(UNLOG_DEL_DIR)
-			StrCmp $(UNLOG_EMPTY_DIR) "" +2 0
-				StrCpy $unlog_empty_dir $(UNLOG_EMPTY_DIR)
-			StrCmp $(UNLOG_ERROR_LOG) "" +2 0
-				StrCpy $unlog_error_log $(UNLOG_ERROR_LOG)
-			StrCmp $(UNLOG_ERROR_CREATE) "" +2 0
-				StrCpy $unlog_error_create $(UNLOG_ERROR_CREATE)
-		!endif
-
-		GetTempFileName "$1"
-		FileOpen $0 "$1" w
-		FileWrite $0 "${UNLOG_HEAD}$\r$\n"
-		FileClose $0
-		Rename "$1" "${UNLOG_TEMP}"
-		Pop $1
-		Pop $0
-	
-		!verbose pop
-	!macroend
-	
-	!macro UNINSTALL.LOG_UPDATE_INSTALL
-		!verbose push
-		!verbose ${UNINST_LOG_VERBOSE}
-	
-		Delete "${UNINST_DAT}"
-		Rename "${UNLOG_TEMP}" "${UNINST_DAT}"
-		WriteUninstaller "${UNINST_EXE}"
-		WriteRegStr ${INSTDIR_REG_ROOT} "${INSTDIR_REG_KEY}" "${UNINSTALL_LOG}.dat" "${UNINST_DAT}"
-		WriteRegStr ${INSTDIR_REG_ROOT} "${INSTDIR_REG_KEY}" "${UNINSTALL_LOG}Directory" "$INSTDIR"
-	
-		!verbose pop
-	!macroend
-	
-	!define uninstall.log_install "!insertmacro UNINSTALL.LOG_INSTALL"
-	
-	!macro UNINSTALL.LOG_INSTALL FileOpenWrite FileOpenRead TargetDir
-		!verbose push
-		!verbose ${UNINST_LOG_VERBOSE}
-	
-		FileOpen $unlog_tmp_1 "${FileOpenWrite}" w
-		FileOpen $unlog_tmp_2 "${FileOpenRead}" r
-	
-		${Locate} "${TargetDir}" "/L=FD" "${UnLog_Install_Func_CallBack}"
-	
-		StrCmp $unlog_error "error" 0 +2
-		ClearErrors
-	
-		IfErrors 0 +2
-		MessageBox MB_ICONEXCLAMATION|MB_OK "$unlog_error_create" /SD IDOK
-	
-		FileClose $unlog_tmp_1
-		FileClose $unlog_tmp_2
-	
-		!verbose pop
-	!macroend
-	
-	!define uninstall.log_mergeID "!insertmacro UNINSTALL.LOG_MERGE"
-	
-	!macro UNINSTALL.LOG_MERGE UnlogPart
-		!verbose push
-		!verbose ${UNINST_LOG_VERBOSE}
-	
-		${FileJoin} "${UNLOG_TEMP}" "${UnlogPart}" "${UNLOG_TEMP}"
-	
-		!verbose pop
-	!macroend
-	
-	!macro UNINSTALL.LOG_OPEN_INSTALL
-		!verbose push
-		!verbose ${UNINST_LOG_VERBOSE}
-	
-		StrCmp $unlog_error "error" +2
-		${uninstall.log_install} "${EXCLU_LIST}" "${UNINST_DAT}" "$OUTDIR"
-	
-		!verbose pop
-	!macroend
-	
-	
-	!macro UNINSTALL.LOG_CLOSE_INSTALL
-		!verbose push
-		!verbose ${UNINST_LOG_VERBOSE}
-	
-		!define ID ${__LINE__}
-	
-		${uninstall.log_install} "${UNLOG_PART}${ID}" "${EXCLU_LIST}" "$OUTDIR"
-		${uninstall.log_mergeID} "${UNLOG_PART}${ID}"
-	
-		!undef ID ${__LINE__}
-	
-		!verbose pop
-	!macroend
-!endif
-
-!verbose pop
-;_____________________________ HEADER FILE END ____________________________
-

Default_Setup_Win.in

-# These default macros represent the Pygame 1.8 prebuilt dependencies.
-# This may also be how a Visual Studio built prebuilt would appear.
-SDL = -Iprebuilt/include -Iprebuilt/include/SDL -Lprebuilt/lib -lSDL
-FONT = -lSDL_ttf
-IMAGE = -lSDL_image
-MIXER = -lSDL_mixer
-SMPEG = -Iprebuilt/include/smpeg -lsmpeg
-PNG = -lpng
-JPEG = -ljpeg
-COPYLIB_SDL -Lprebuilt/lib/SDL.dll
-COPYLIB_SDL_ttf -lSDL -lz -Lprebuilt/lib/SDL_ttf.dll
-COPYLIB_SDL_image -lSDL -ljpeg -lpng -ltiff -Lprebuilt/lib/SDL_image.dll
-COPYLIB_SDL_mixer -lSDL -lvorbisfile -lsmpeg -Lprebuilt/lib/SDL_mixer.dll
-COPYLIB_smpeg -lSDL -Lprebuilt/lib/smpeg.dll
-COPYLIB_tiff -ljpeg -lz -Lprebuilt/lib/libtiff.dll
-COPYLIB_png -lz -Lprebuilt/lib/libpng13.dll
-COPYLIB_jpeg -Lprebuilt/lib/jpeg.dll
-COPYLIB_z -Lprebuilt/lib/zlib1.dll
-COPYLIB_vorbisfile -lvorbis -Lprebuilt/lib/libvorbisfile-3.dll
-COPYLIB_vorbis -logg -Lprebuilt/lib/libvorbis-0.dll
-COPYLIB_ogg -Lprebuilt/lib/libogg-0.dll

MakePrebuilt.bat

-@echo off
-rem Make the prebuilt package from the libraries built with
-rem msys_build_deps.py. Takes one optional argument, the
-rem name of the output directory.
-rem
-rem This batch file needs python.exe, pexports.exe
-rem (found in altbinutils-pe at SourceForge,
-rem http://sourceforge.net/projects/mingwrep/) and
-rem Visual C's VCVARS32.BAT in the executables search path.
-rem Otherwise run make_prebuilt.py first, then the batch
-rem files MakeDefs.bat and MakeLibs.bat afterward.
-
-python.exe make_prebuilt.py %1
-if errorlevel 1 goto done
-if "%1"=="" goto useprebuilt
-cd "%1"
-goto domake
-:useprebuilt
-cd prebuilt
-:domake
-cd lib
-CALL Make32.bat
-cd ..\..
-:done
-
-

MakePrebuilt71.bat

+@echo off
+rem Make the prebuilt package from the libraries built with
+rem msys_build_deps.py. Takes one optional argument, the
+rem name of the output directory.
+rem
+rem This batch file needs python.exe, pexports.exe
+rem (found in altbinutils-pe at SourceForge,
+rem http://sourceforge.net/projects/mingwrep/) and
+rem Visual C's VCVARS32.BAT in the executables search path.
+rem Otherwise run make_prebuilt.py first, then the batch
+rem files MakeDefs.bat and MakeLibs.bat afterward.
+
+python.exe make_prebuilt.py %1
+if errorlevel 1 goto done
+if "%1"=="" goto useprebuilt
+copy /Y prebuilt-template\readme71.html "%1\readme.html"
+cd "%1"
+goto domake
+:useprebuilt
+copy /Y prebuilt-template\readme71.html prebuilt\readme.html
+cd prebuilt
+:domake
+cd lib
+CALL Make32.bat
+cd ..\..
+:done
+
+

MakePrebuilt90.bat

+@echo off
+rem Make the Win32 prebuilt file for Pythons 2.6 and up.
+rem Takes an optional argument, the prebuilt directory path.
+rem Requires Visual Studio, with VCVARS32.BAT is on the
+rem executable search path. Python must also be on the search
+rem path. msys_link_VC_2008_dlls.py requires pexports.exe 0.43.
+
+set DESTDIR=%1
+if "%DESTDIR%" == "" set DESTDIR=prebuilt
+
+python make_prebuilt.py %DESTDIR%
+if errorlevel 1 goto aborted
+
+copy /Y prebuilt-template\readme90.html "%DESTDIR%\readme.html"
+
+set DESTDIR=%DESTDIR%\lib
+deltree /Y %DESTDIR%\msvcr71
+python msys_link_VC_2008_dlls.py -d %DESTDIR% --all
+if errorlevel 1 goto aborted
+
+CALL VCVARS32.BAT
+cd %DESTDIR%
+CALL MakeLibs.bat
+if errorlevel 1 goto aborted
+
+echo '
+echo =====================================
+echo Prebuilt directory built successfully
+goto done
+
+:aborted
+echo '
+echo *** Error: failed to complete
+
+:done
 PNG = -lpng
 JPEG = -ljpeg
 SCRAP = -lX11
+PORTMIDI = -lportmidi
+PORTTIME = -lporttime
 #--EndConfig
 
 #DEBUG = -C-W -C-Wall
 _numericsurfarray src/_numericsurfarray.c $(SDL) $(DEBUG)
 _numericsndarray src/_numericsndarray.c $(SDL) $(MIXER) $(DEBUG)
 movie src/movie.c $(SDL) $(SMPEG) $(DEBUG)
-scrap src/scrap.c $(SDL) $(SCRAP) $(DEBUG)
-camera src/camera.c src/camera_v4l2.c src/camera_v4l.c $(SDL) $(DEBUG)
+scrap src/scrap.c $(SDL) $(SCRAP) $(DEBUG)
+_camera src/_camera.c src/camera_v4l2.c src/camera_v4l.c $(SDL) $(DEBUG)
+pypm src/pypm.c $(SDL) $(PORTMIDI) $(PORTTIME) $(DEBUG)
 
 #experimental new movie movie. requires libavcodec and libavformat.
 #add any necessary compile flags to this line and uncomment.
 mask src/mask.c src/bitmask.c $(SDL) $(DEBUG)
 bufferproxy src/bufferproxy.c $(SDL) $(DEBUG)
 pixelarray src/pixelarray.c $(SDL) $(DEBUG)
+_arraysurfarray src/_arraysurfarray.c $(SDL) $(DEBUG)
 
+#This file defines platform specific modules for mac os x
+sdlmain_osx src/sdlmain_osx.m $(SDL) $(DEBUG)
 # BUG    = fixed a bug that was (or could have been) crashing
 #
 #
+[SVN 1820] Jan 11, 2009
+    The Pygame documents and examples are now part of the Pygame package,
+    directories docs and examples respectively.
+
+[SVN 1812:1814] Jan 09, 2009
+    Pygame unit test suite is now the pygame.tests package. For Pygame
+    development the unit tests still run from test in the installation
+    directory without conficts.
 
 Dec 05, 2008
     exposed mask C API from Michael George.  Thanks!

async_sub.py

-################################################################################
-"""
-
-Modification of http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/440554
-
-"""
-
-#################################### IMPORTS ###################################
-
-import os
-import subprocess
-import errno
-import time
-import sys
-import unittest
-import tempfile
-
-if subprocess.mswindows:
-    from win32file import ReadFile, WriteFile
-    from win32pipe import PeekNamedPipe
-    import win32api
-    import msvcrt
-    
-else:
-    from signal import SIGINT, SIGTERM, SIGKILL
-    import select
-    import fcntl
-
-################################### CONSTANTS ##################################
-
-PIPE = subprocess.PIPE
-
-################################################################################
-
-class Popen(subprocess.Popen):
-    def recv(self, maxsize=None):
-        return self._recv('stdout', maxsize)
-    
-    def recv_err(self, maxsize=None):
-        return self._recv('stderr', maxsize)
-
-    def send_recv(self, input='', maxsize=None):
-        return self.send(input), self.recv(maxsize), self.recv_err(maxsize)
-    
-    def read_async(self,  wait=.1, e=1, tr=5, stderr=0):
-        if tr < 1:
-            tr = 1
-        x = time.time()+ wait
-        y = []
-        r = ''
-        pr = self.recv
-        if stderr:
-            pr = self.recv_err
-        while time.time() < x or r:
-            r = pr()
-            if r is None:
-                if e:
-                    raise Exception("Other end disconnected!")
-                else:
-                    break
-            elif r:
-                y.append(r)
-            else:
-                time.sleep(max((x-time.time())/tr, 0))
-        return ''.join(y)
-        
-    def send_all(self, data):
-        while len(data):
-            sent = self.send(data)
-            if sent is None:
-                raise Exception("Other end disconnected!")
-            data = buffer(data, sent)
-    
-    def get_conn_maxsize(self, which, maxsize):
-        if maxsize is None:
-            maxsize = 1024
-        elif maxsize < 1:
-            maxsize = 1
-        return getattr(self, which), maxsize
-    
-    def _close(self, which):
-        getattr(self, which).close()
-        setattr(self, which, None)
-    
-    if subprocess.mswindows:
-        def kill(self):
-            # Recipes
-            #http://me.in-berlin.de/doc/python/faq/windows.html#how-do-i-emulate-os-kill-in-windows
-            #http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/347462
-            
-            """kill function for Win32"""
-            
-            win32api.TerminateProcess(int(self._handle), 0) # returns None
-                                           # handle,  # exit code
-
-        def send(self, input):
-            if not self.stdin:
-                return None
-
-            try:
-                x = msvcrt.get_osfhandle(self.stdin.fileno())
-                (errCode, written) = WriteFile(x, input)
-            except ValueError:
-                return self._close('stdin')
-            except (subprocess.pywintypes.error, Exception), why:
-                if why[0] in (109, errno.ESHUTDOWN):
-                    return self._close('stdin')
-                raise
-
-            return written
-
-        def _recv(self, which, maxsize):
-            conn, maxsize = self.get_conn_maxsize(which, maxsize)
-            if conn is None:
-                return None
-            
-            try:
-                x = msvcrt.get_osfhandle(conn.fileno())
-                (read, nAvail, nMessage) = PeekNamedPipe(x, 0)
-                if maxsize < nAvail:
-                    nAvail = maxsize
-                if nAvail > 0:
-                    (errCode, read) = ReadFile(x, nAvail, None)
-            except ValueError:
-                return self._close(which)
-            except (subprocess.pywintypes.error, Exception), why:
-                if why[0] in (109, errno.ESHUTDOWN):
-                    return self._close(which)
-                raise
-            
-            if self.universal_newlines:
-                read = self._translate_newlines(read)
-            return read
-
-    else:
-        def kill(self):
-            for i, sig in enumerate([SIGTERM, SIGKILL] * 2):
-                if i % 2 == 0: os.kill(self.pid, sig)
-                time.sleep((i * (i % 2) / 5.0)  + 0.01)
-
-                killed_pid, stat = os.waitpid(self.pid, os.WNOHANG)
-                if killed_pid != 0: return
-                
-        def send(self, input):
-            if not self.stdin:
-                return None
-
-            if not select.select([], [self.stdin], [], 0)[1]:
-                return 0
-
-            try:
-                written = os.write(self.stdin.fileno(), input)
-            except OSError, why:
-                if why[0] == errno.EPIPE: #broken pipe
-                    return self._close('stdin')
-                raise
-
-            return written
-
-        def _recv(self, which, maxsize):
-            conn, maxsize = self.get_conn_maxsize(which, maxsize)
-            if conn is None:
-                return None
-            
-            flags = fcntl.fcntl(conn, fcntl.F_GETFL)
-            if not conn.closed:
-                fcntl.fcntl(conn, fcntl.F_SETFL, flags| os.O_NONBLOCK)
-            
-            try:
-                if not select.select([conn], [], [], 0)[0]:
-                    return ''
-                
-                r = conn.read(maxsize)
-                if not r:
-                    return self._close(which)
-    
-                if self.universal_newlines:
-                    r = self._translate_newlines(r)
-                return r
-            finally:
-                if not conn.closed:
-                    fcntl.fcntl(conn, fcntl.F_SETFL, flags)
-
-################################################################################
-
-def proc_in_time_or_kill(cmd, time_out, wd = None, env = None):
-    proc = Popen (
-        cmd, cwd = wd, env = env,
-        stdin = subprocess.PIPE, stdout = subprocess.PIPE, 
-        stderr = subprocess.STDOUT, universal_newlines = 1
-    )
-
-    ret_code = None
-    response = []
-
-    t = time.time()
-    while ret_code is None and ((time.time() -t) < time_out):
-        ret_code = proc.poll()
-        response += [proc.read_async(wait=0.1, e=0)]
-
-    if ret_code is None:
-        ret_code = '"Process timed out (time_out = %s secs) ' % time_out
-        try:
-            proc.kill()
-            ret_code += 'and was successfully terminated"'
-        except Exception, e:
-            ret_code += 'and termination failed (exception: %s)"' % e
-
-    return ret_code, ''.join(response)
-
-################################################################################
-
-class AsyncTest(unittest.TestCase):
-    def test_proc_in_time_or_kill(self):
-        ret_code, response = proc_in_time_or_kill(
-            [sys.executable, '-c', 'while 1: pass'], time_out = 1
-        )
-        
-        self.assert_( 'rocess timed out' in ret_code )
-        self.assert_( 'successfully terminated' in ret_code )
-
-################################################################################
-
-def _example():
-    if sys.platform == 'win32':
-        shell, commands, tail = ('cmd', ('echo "hello"', 'echo "HELLO WORLD"'), '\r\n')
-    else:
-        shell, commands, tail = ('sh', ('ls', 'echo HELLO WORLD'), '\n')
-    
-    a = Popen(shell, stdin=PIPE, stdout=PIPE)
-    print a.read_async(),
-    for cmd in commands:
-        a.send_all(cmd + tail)
-        print a.read_async(),
-    a.send_all('exit' + tail)
-    print a.read_async(e=0)
-    a.wait()
-
-################################################################################
-    
-if __name__ == '__main__':
-    if 1: unittest.main()
-    else: _example()
 skip = set(['pygame.locals', 'pygame.constants',
             'pygame.base', 'pygame.threads'])
 
-sys.path.append('.')
 os.chdir('test')
 test_file = sys.argv[1]
 del sys.argv[1]
     else:
         dep.line = dep.name+' =' + inc + lid + ' ' + dep.cflags + libs
 
-def writesetupfile(deps, basepath):
+def writesetupfile(deps, basepath, additional_lines):
     "create a modified copy of Setup.in"
     origsetup = open('Setup.in', 'r')
     newsetup = open('Setup', 'w')
     for d in deps:
         newsetup.write(d.line + '\n')
 
-    while line:
-        line = origsetup.readline()
+    lines = origsetup.readlines()
+    lines.extend(additional_lines)
+    for line in lines:
         useit = 1
         if not line.startswith('COPYLIB'):
             for d in deps:
                     newsetup.write('#'+line)
                     break
         if useit:
-            newsetup.write(line)
+            newsetup.write(line)        
 
 def main():
+    additional_platform_setup = []
     if sys.platform == 'win32' and not is_msys_mingw():
         print_('Using WINDOWS configuration...\n')
         import config_win as CFG
     elif sys.platform == 'darwin':
         print_('Using Darwin configuration...\n')
         import config_darwin as CFG
+        additional_platform_setup = file("Setup_Darwin.in", "r").readlines()
     else:
         print_('Using UNIX configuration...\n')
         import config_unix as CFG
         basepath = None
         for d in deps:
             prepdep(d, basepath)
-        writesetupfile(deps, basepath)
+        writesetupfile(deps, basepath, additional_platform_setup)
         print_("""\nIf you get compiler errors during install, doublecheck
 the compiler flags in the "Setup" file.\n""")
     else:
     FrameworkDependency('SMPEG', 'smpeg.h', 'libsmpeg', 'smpeg'),
     Dependency('PNG', 'png.h', 'libpng', ['png']),
     Dependency('JPEG', 'jpeglib.h', 'libjpeg', ['jpeg']),
-    Dependency('SCRAP', '','',[])
+    Dependency('SCRAP', '','',[]),
+    Dependency('PORTMIDI', 'portmidi.h', 'libportmidi', ['portmidi']),
+    FrameworkDependency('PORTTIME', 'CoreMidi.h', 'CoreMidi', 'CoreMidi'),
 ]
 
 
     for d in DEPS:
         d.configure(incdirs, libdirs)
     DEPS[0].cflags = '-Ddarwin '+ DEPS[0].cflags
-    try:
-        import objc
-    except ImportError:
-        raise SystemExit, "Pygame requires PyObjC version 1.1 or above."
     return DEPS
 
 
         DependencyProg('SMPEG', 'SMPEG_CONFIG', 'smpeg-config', '0.4.3', m),
         Dependency('PNG', 'png.h', 'libpng12.dll.a'),
         Dependency('JPEG', 'jpeglib.h', 'libjpeg.dll.a'),
+        Dependency('PORTMIDI', 'portmidi.h', 'libportmidi.dll.a'),
+        Dependency('PORTTIME', 'portmidi.h', 'libportmidi.dll.a'),
         DependencyDLL('TIFF'),
         DependencyDLL('VORBISFILE'),
         DependencyDLL('VORBIS'),
         Dependency('PNG', 'png.h', 'libpng', ['png']),
         Dependency('JPEG', 'jpeglib.h', 'libjpeg', ['jpeg']),
         Dependency('SCRAP', '', 'libX11', ['X11']),
+        Dependency('PORTMIDI', 'portmidi.h', 'libportmidi.so', ['portmidi']),
+        Dependency('PORTTIME', 'porttime.h', 'libporttime.so', ['porttime']),
     ]
 
     if not DEPS[0].found:
 DEPS.add('SMPEG', 'smpeg', ['smpeg-[0-9].*', 'smpeg'], r'smpeg\.dll$', ['SDL'])
 DEPS.add('PNG', 'png', ['libpng-[1-9].*'], r'(png|libpng13)\.dll$', ['z'])
 DEPS.add('JPEG', 'jpeg', ['jpeg-[6-9]*'], r'(lib){0,1}jpeg\.dll$')
+DEPS.add('PORTMIDI', 'portmidi', ['portmidi'], r'portmidi\.dll$')
+#DEPS.add('PORTTIME', 'porttime', ['porttime'], r'porttime\.dll$')
 DEPS.add_dll(r'(lib){0,1}tiff\.dll$', 'tiff', ['tiff-[3-9].*'], ['jpeg', 'z'])
 DEPS.add_dll(r'(z|zlib1)\.dll$', 'z', ['zlib-[1-9].*'])
 DEPS.add_dll(r'(libvorbis-0|vorbis)\.dll$', 'vorbis', ['libvorbis-[1-9].*'],
         try:
             setup_win_in = open(os.path.join('prebuilt', 'Setup_Win.in'))
         except IOError:
-            # prebuilt lacks a Setup_Win.in. Use defaults.
-            setup_win_in = open('Default_Setup_Win.in')
+            raise IOError("prebuilt missing required Setup_Win.in")
 
         # Copy Setup.in to Setup, replacing the BeginConfig/EndConfig
         # block with prebuilt\Setup_Win.in .
     ('FONT', 'SDL_ttf', r'SDL_ttf\.dll$', ['SDL']),
     ('FREETYPE', 'freetype', r'libfreetype-6\.dll$', ['Z']),
     ('Z', 'z', r'zlib1\.dll$', []),
-    ('SDL', 'SDL', r'SDL\.dll$', [])
+    ('SDL', 'SDL', r'SDL\.dll$', []),
+    ('PORTMIDI', 'portmidi', r'portmidi\.dll', []),
+    ('PORTTIME', 'portmidi', r'portmidi\.dll', []),
 ]
 
 # regexs: Maps name to DLL file name regex.
       <a href="ref/display.html">Display</a>&nbsp;||&nbsp;
       <a href="ref/draw.html">Draw</a>&nbsp;||&nbsp;
       <a href="ref/event.html">Event</a>&nbsp;||&nbsp;
+      <a href="ref/examples.html">Examples</a>&nbsp;||&nbsp;
       <a href="ref/font.html">Font</a>&nbsp;||&nbsp;
       <a href="ref/image.html">Image</a>&nbsp;||&nbsp;
       <a href="ref/joystick.html">Joystick</a>&nbsp;||&nbsp;
       <a href="ref/sprite.html">Sprite</a>&nbsp;||&nbsp;
       <a href="ref/surface.html">Surface</a>&nbsp;||&nbsp;
       <a href="ref/surfarray.html">Surfarray</a>&nbsp;||&nbsp;
+      <a href="ref/tests.html">Tests</a>&nbsp;||&nbsp;
       <a href="ref/time.html">Time</a>&nbsp;||&nbsp;
       <a href="ref/transform.html">Transform</a>
       
   <dt><a href="ref/display.html">Display</a></dt><dd> Configuring the display surface.</dd>
   <dt><a href="ref/draw.html">Draw</a></dt><dd> Drawing simple shapes like lines and ellipses to surfaces.</dd>
   <dt><a href="ref/event.html">Event</a></dt><dd> Manage the incoming events from various input devices and the windowing platform.</dd>
+  <dt><a href="ref/examples.html">Examples</a></dt><dd> Various programs demonstrating the use of individual pygame modules.</dd>
   <dt><a href="ref/font.html">Font</a></dt><dd> Loading and rendering Truetype fonts.</dd>
   <dt><a href="ref/image.html">Image</a></dt><dd> Loading, saving, and transferring of surfaces.</dd>
   <dt><a href="ref/joystick.html">Joystick</a></dt><dd> Manage the joystick devices.</dd>
   <dt><a href="ref/sprite.html">Sprite</a></dt><dd> Higher level objects to represent game images.</dd>
   <dt><a href="ref/surface.html">Surface</a></dt><dd> Objects for images and the screen.</dd>
   <dt><a href="ref/surfarray.html">Surfarray</a></dt><dd> Manipulate image pixel data.</dd>
+  <dt><a href="ref/tests.html">Tests</a></dt><dd> Test Pygame.</dd>
   <dt><a href="ref/time.html">Time</a></dt><dd> Manage timing and framerate.</dd>
   <dt><a href="ref/transform.html">Transform</a></dt><dd> Resize and move images.</dd>
 </dl>

docs/ref/camera.html

 <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="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>

docs/ref/cdrom.html

 <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="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>

docs/ref/color.html

 <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="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>
 </table></small></ul>
 <p>The Color class represents <tt>RGBA</tt> color values using a value range of 0-255. It allows basic arithmetic operations to create new colors, supports conversions to other color spaces such as <tt>HSV</tt> or <tt>HSL</tt> and lets you adjust single color channels. Alpha defaults to 255 when not given. </p>
 <p>'rgbvalue' can be either a color name, an <tt>HTML</tt> color format string, a hex number string, or an integer pixel value. The <tt>HTML</tt> format is '#rrggbbaa', where rr, gg, bb, and aa are 2 digit hex numbers. The alpha aa is optional. <tt>A</tt> hex number string has the form '0xrrggbbaa', where aa is optional. </p>
-<p>Color objects support equality comparison with other color objects, 3 or 4 element integer sequences, <tt>HTML</tt> color format strings, '0xrrggbbaa' strings, and integer pixel values. </p>
+<p>Color objects support equality comparison with other color objects and 3 or 4 element tuples of integers (New in <tt>1.9.0)</tt>. </p>
 <p>New in pygame <tt>1.8.1</tt>. </p>
 <!--COMMENTS:pygame.Color--> &nbsp;<br> 
 

docs/ref/cursors.html

 <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="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>

docs/ref/display.html

 <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="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>

docs/ref/draw.html

 <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="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>

docs/ref/event.html

 <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="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>

docs/ref/examples.html

+
+<html>
+<title>examples - 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.examples">
+<big><b>pygame.examples</big></b><br><ul>
+  <i>module of example programs</i><br>
+<ul><small><table>
+  <tr><td><a href="examples.html#pygame.examples.aliens.main">pygame.examples.aliens.main</a> - <font size=-1>play the full aliens example</font></td><td>play the full aliens example</td></tr>
+  <tr><td><a href="examples.html#pygame.examples.oldalien.main">pygame.examples.oldalien.main</a> - <font size=-1>play the original aliens example</font></td><td>play the original aliens example</td></tr>
+  <tr><td><a href="examples.html#pygame.examples.stars.main">pygame.examples.stars.main</a> - <font size=-1>run a simple starfield example</font></td><td>run a simple starfield example</td></tr>
+  <tr><td><a href="examples.html#pygame.examples.chimp.main">pygame.examples.chimp.main</a> - <font size=-1>hit the moving chimp</font></td><td>hit the moving chimp</td></tr>
+  <tr><td><a href="examples.html#pygame.examples.moveit.main">pygame.examples.moveit.main</a> - <font size=-1>display animated objects on the screen</font></td><td>display animated objects on the screen</td></tr>
+  <tr><td><a href="examples.html#pygame.examples.fonty.main">pygame.examples.fonty.main</a> - <font size=-1>run a font rendering example</font></td><td>run a font rendering example</td></tr>
+  <tr><td><a href="examples.html#pygame.examples.vgrade.main">pygame.examples.vgrade.main</a> - <font size=-1>display a vertical gradient</font></td><td>display a vertical gradient</td></tr>
+  <tr><td><a href="examples.html#pygame.examples.eventlist.main">pygame.examples.eventlist.main</a> - <font size=-1>display pygame events</font></td><td>display pygame events</td></tr>
+  <tr><td><a href="examples.html#pygame.examples.arraydemo.main">pygame.examples.arraydemo.main</a> - <font size=-1>show various surfarray effects</font></td><td>show various surfarray effects</td></tr>
+  <tr><td><a href="examples.html#pygame.examples.sound.main">pygame.examples.sound.main</a> - <font size=-1>load and play a sound</font></td><td>load and play a sound</td></tr>
+  <tr><td><a href="examples.html#pygame.examples.sound_array_demos.main">pygame.examples.sound_array_demos.main</a> - <font size=-1>play various sndarray effects</font></td><td>play various sndarray effects</td></tr>
+  <tr><td><a href="examples.html#pygame.examples.liquid.main">pygame.examples.liquid.main</a> - <font size=-1>display an animated liquid effect</font></td><td>display an animated liquid effect</td></tr>
+  <tr><td><a href="examples.html#pygame.examples.glcube.main">pygame.examples.glcube.main</a> - <font size=-1>display an animated 3D cube using OpenGL</font></td><td>display an animated 3D cube using OpenGL</td></tr>
+  <tr><td><a href="examples.html#pygame.examples.scrap_clipboard.main">pygame.examples.scrap_clipboard.main</a> - <font size=-1>access the clipboard</font></td><td>access the clipboard</td></tr>
+  <tr><td><a href="examples.html#pygame.examples.mask.main">pygame.examples.mask.main</a> - <font size=-1>display multiple images bounce off each other using collision detection</font></td><td>display multiple images bounce off each other using collision detection</td></tr>
+  <tr><td><a href="examples.html#pygame.examples.testsprite.main">pygame.examples.testsprite.main</a> - <font size=-1>show lots of sprites moving around</font></td><td>show lots of sprites moving around</td></tr>
+  <tr><td><a href="examples.html#pygame.examples.headless_no_windows_needed.main">pygame.examples.headless_no_windows_needed.main</a> - <font size=-1>write an image file that is smoothscaled copy of an input file</font></td><td>write an image file that is smoothscaled copy of an input file</td></tr>
+  <tr><td><a href="examples.html#pygame.examples.fastevents.main">pygame.examples.fastevents.main</a> - <font size=-1>stress test the fastevents module</font></td><td>stress test the fastevents module</td></tr>
+  <tr><td><a href="examples.html#pygame.examples.overlay.main">pygame.examples.overlay.main</a> - <font size=-1>play a .pgm video using overlays</font></td><td>play a .pgm video using overlays</td></tr>
+  <tr><td><a href="examples.html#pygame.examples.blend_fill.main">pygame.examples.blend_fill.main</a> - <font size=-1>demonstrate the various surface.fill method blend options</font></td><td>demonstrate the various surface.fill method blend options</td></tr>
+  <tr><td><a href="examples.html#pygame.examples.cursors.main">pygame.examples.cursors.main</a> - <font size=-1>display two different custom cursors</font></td><td>display two different custom cursors</td></tr>
+  <tr><td><a href="examples.html#pygame.examples.pixelarray.main">pygame.examples.pixelarray.main</a> - <font size=-1>display various pixelarray generated effects</font></td><td>display various pixelarray generated effects</td></tr>
+  <tr><td><a href="examples.html#pygame.examples.scaletest.main">pygame.examples.scaletest.main</a> - <font size=-1>interactively scale an image using smoothscale</font></td><td>interactively scale an image using smoothscale</td></tr>
+  <tr><td><a href="examples.html#pygame.examples.midi.main">pygame.examples.midi.main</a> - <font size=-1>run a midi example</font></td><td>run a midi example</td></tr>
+</table></small></ul>
+<p>These examples should help get you started with pygame. Here is a brief rundown of what you get. The source code for these examples is in the public domain. Feel free to use for your own projects. </p>
+<p>These examples can be run as stand-alone programs, or as described below, by importing the module and calling its main(). </p>
+<p>Resources for the examples are found in the pygame/examples/data subdirectory. </p>
+<p>We're always on the lookout for more examples and/or example requests. Code like this is probably the best way to start getting involved with python gaming. </p>
+<p>This page is adapted from the original examples <tt>readme.txt</tt> by: </p>
+<pre>    Pete Shinners
+    shredwheat@mediaone.net
+</pre><p>Further references </p>
+<pre>  pySDL    : <a href="http://pysdl.sourceforge.net">http://pysdl.sourceforge.net<a/>
+  SDL      : <a href="http://www.libsdl.org">http://www.libsdl.org<a/>
+  aliens.c : <a href="http://www.libsdl.org/projects/aliens">http://www.libsdl.org/projects/aliens<a/>
+</pre><p>examples as a package is new to pygame <tt>1.9.0</tt>. </p>
+<!--COMMENTS:pygame.examples--> &nbsp;<br> 
+
+
+<a name="pygame.examples.aliens.main">
+<big><b>pygame.examples.aliens.main</big></b><br><ul>
+  <i>play the full aliens example</i><br>
+  <tt>pygame.aliens.main(): return None</tt><br>
+<p>This started off as a port of the <tt>SDL</tt> demonstration, Aliens. Now it has evolved into something sort of resembling fun. This demonstrates a lot of different uses of sprites and optimized blitting. Also transparency, colorkeys, fonts, sound, music, joystick, and more. <tt>(PS</tt>, my high score is 117! goodluck) </p>
+<!--COMMENTS:pygame.examples.aliens.main--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.examples.oldalien.main">
+<big><b>pygame.examples.oldalien.main</big></b><br><ul>
+  <i>play the original aliens example</i><br>
+  <tt>pygame.examples.oldalien.main(): return None</tt><br>
+<p>This more closely resembles a port of the <tt>SDL</tt> Aliens demo. The code is a lot simpler, so it makes a better starting point for people looking at code for the first times. These blitting routines are not as optimized as they should/could be, but the code is easier to follow, and it plays quick enough. </p>
+<!--COMMENTS:pygame.examples.oldalien.main--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.examples.stars.main">
+<big><b>pygame.examples.stars.main</big></b><br><ul>
+  <i>run a simple starfield example</i><br>
+  <tt>pygame.examples.stars.main(): return None</tt><br>
+<p><tt>A</tt> simple starfield example. You can change the center of perspective by leftclicking the mouse on the screen. </p>
+<!--COMMENTS:pygame.examples.stars.main--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.examples.chimp.main">
+<big><b>pygame.examples.chimp.main</big></b><br><ul>
+  <i>hit the moving chimp</i><br>
+  <tt>pygame.examples.chimp.main(): return None</tt><br>
+<p>This simple example is derived from the line-by-line tutorial that comes with pygame. It is based on a 'popular' web banner. Note there are comments here, but for the full explanation, follow along in the tutorial. </p>
+<!--COMMENTS:pygame.examples.chimp.main--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.examples.moveit.main">
+<big><b>pygame.examples.moveit.main</big></b><br><ul>
+  <i>display animated objects on the screen</i><br>
+  <tt>pygame.examples.moveit.main(): return None</tt><br>
+<p>This is the full and final example from the Pygame Tutorial, "How Do <tt>I</tt> Make It Move". It creates 10 objects and animates them on the screen. </p>
+<p>Note it's a bit scant on error checking, but it's easy to read. :] Fortunately, this is python, and we needn't wrestle with a pile of error codes. </p>
+<!--COMMENTS:pygame.examples.moveit.main--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.examples.fonty.main">
+<big><b>pygame.examples.fonty.main</big></b><br><ul>
+  <i>run a font rendering example</i><br>
+  <tt>pygame.examples.fonty.main(): return None</tt><br>
+<p>Super quick, super simple application demonstrating the different ways to render fonts with the font module </p>
+<!--COMMENTS:pygame.examples.fonty.main--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.examples.vgrade.main">
+<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>
+<!--COMMENTS:pygame.examples.vgrade.main--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.examples.eventlist.main">
+<big><b>pygame.examples.eventlist.main</big></b><br><ul>
+  <i>display pygame events</i><br>
+  <tt>pygame.examples.eventlist.main(): return None</tt><br>
+<p>Eventlist is a sloppy style of pygame, but is a handy tool for learning about pygame events and input. At the top of the screen are the state of several device values, and a scrolling list of events are displayed on the bottom. </p>
+<p>This is not quality 'ui' code at all, but you can see how to implement very non-interactive status displays, or even a crude text output control. </p>
+<!--COMMENTS:pygame.examples.eventlist.main--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.examples.arraydemo.main">
+<big><b>pygame.examples.arraydemo.main</big></b><br><ul>
+  <i>show various surfarray effects</i><br>
+  <tt>pygame.examples.arraydemo.main(arraytype=None): return None</tt><br>
+<p>Another example filled with various surfarray effects. It requires the surfarray and image modules to be installed. This little demo can also make a good starting point for any of your own tests with surfarray </p>
+<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. As a program <tt>surfarray.py</tt> accepts an optional --numeric or --numpy flag. (New pygame <tt>1.9.0)</tt> </p>
+<!--COMMENTS:pygame.examples.arraydemo.main--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.examples.sound.main">
+<big><b>pygame.examples.sound.main</big></b><br><ul>
+  <i>load and play a sound</i><br>
+  <tt>pygame.examples.sound.main(file_path=None): return None</tt><br>
+<p>Extremely basic testing of the mixer module. Load a sound and play it. All from the command shell, no graphics. </p>
+<p>If provided, use the audio file 'file_path', otherwise use a default file. </p>
+<p><tt>sound.py</tt> optional command line argument: an audio file </p>
+<!--COMMENTS:pygame.examples.sound.main--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.examples.sound_array_demos.main">
+<big><b>pygame.examples.sound_array_demos.main</big></b><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>
+<!--COMMENTS:pygame.examples.sound_array_demos.main--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.examples.liquid.main">
+<big><b>pygame.examples.liquid.main</big></b><br><ul>
+  <i>display an animated liquid effect</i><br>
+  <tt>pygame.examples.liquid.main(): return None</tt><br>
+<p>This example was created in a quick comparison with the BlitzBasic gaming language. Nonetheless, it demonstrates a quick 8-bit setup (with colormap). </p>
+<!--COMMENTS:pygame.examples.liquid.main--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.examples.glcube.main">
+<big><b>pygame.examples.glcube.main</big></b><br><ul>
+  <i>display an animated 3D cube using OpenGL</i><br>
+  <tt>pygame.examples.glcube.main(): return None</tt><br>
+<p>Using PyOpenGL and pygame, this creates a spinning <tt>3D</tt> multicolored cube. </p>
+<!--COMMENTS:pygame.examples.glcube.main--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.examples.scrap_clipboard.main">
+<big><b>pygame.examples.scrap_clipboard.main</big></b><br><ul>
+  <i>access the clipboard</i><br>
+  <tt>pygame.examples.scrap_clipboard.main(): return None</tt><br>
+<p><tt>A</tt> simple demonstration example for the clipboard support. </p>
+<!--COMMENTS:pygame.examples.scrap_clipboard.main--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.examples.mask.main">
+<big><b>pygame.examples.mask.main</big></b><br><ul>
+  <i>display multiple images bounce off each other using collision detection</i><br>
+  <tt>pygame.examples.mask.main(*args): return None</tt><br>
+<p>Positional arguments: </p>
+<pre>    one or more image file names.
+</pre><p>This <tt>pygame.masks</tt> demo will display multiple moving sprites bouncing off each other. More than one sprite image can be provided. </p>
+<p>If run as a program then <tt>mask.py</tt> takes one or more image files as command line arguments. </p>
+<!--COMMENTS:pygame.examples.mask.main--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.examples.testsprite.main">
+<big><b>pygame.examples.testsprite.main</big></b><br><ul>
+  <i>show lots of sprites moving around</i><br>
+  <tt>pygame.examples.testsprite.main(update_rects = True, use_static = False, use_FastRenderGroup = False, screen_dims = [640, 480], use_alpha = False, flags = 0): return None</tt><br>
+<p>Optional keyword arguments: </p>
+<pre>    update_rects - use the RenderUpdate sprite group class
+    use_static - include non-moving images
+    use_FastRenderGroup - Use the FastRenderGroup sprite group
+    screen_dims - pygame window dimensions
+    use_alpha - use alpha blending
+    flags - additional display mode flags
+</pre><p>Like the <tt>testsprite.c</tt> that comes with sdl, this pygame version shows lots of sprites moving around. </p>
+<p>If run as a stand-alone program then no command line arguments are taken. </p>
+<!--COMMENTS:pygame.examples.testsprite.main--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.examples.headless_no_windows_needed.main">
+<big><b>pygame.examples.headless_no_windows_needed.main</big></b><br><ul>
+  <i>write an image file that is smoothscaled copy of an input file</i><br>
+  <tt>pygame.examples.headless_no_windows_needed.main(fin, fout, w, h): return None</tt><br>
+<p>arguments: </p>
+<pre>    fin - name of an input image file
+    fout - name of the output file to create/overwrite
+    w, h - size of the rescaled image, as integer width and height
+</pre><p>How to use pygame with no windowing system, like on headless servers. </p>
+<p>Thumbnail generation with scaling is an example of what you can do with pygame. </p>
+<p><tt>NOTE:</tt> the pygame scale function uses mmx/sse if available, and can be run in multiple threads. </p>
+<p>If <tt>headless_no_windows_needed.py</tt> is run as a program it takes the following command line arguments: </p>
+<pre>    -scale inputimage outputimage new_width new_height
+    eg. -scale in.png outpng 50 50
+</pre>
+<!--COMMENTS:pygame.examples.headless_no_windows_needed.main--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.examples.fastevents.main">
+<big><b>pygame.examples.fastevents.main</big></b><br><ul>
+  <i>stress test the fastevents module</i><br>
+  <tt>pygame.examples.fastevents.main(): return None</tt><br>
+<p>This is a stress test for the fastevents module. </p>
+<ul>
+ <li>Fast events does not appear faster!</li>
+ <li> </li>
+</ul>
+<p>So far it looks like normal <tt>pygame.event</tt> is faster by up to two times. So maybe fastevent isn't fast at all. </p>
+<p>Tested on windowsXP sp2 athlon, and freebsd. </p>
+<p><tt>However..</tt>. on my debian duron 850 machine fastevents is faster. </p>
+<!--COMMENTS:pygame.examples.fastevents.main--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.examples.overlay.main">
+<big><b>pygame.examples.overlay.main</big></b><br><ul>
+  <i>play a .pgm video using overlays</i><br>
+  <tt>pygame.examples.overlay.main(fname): return None</tt><br>
+<p>Play the .pgm video fila a path fname. </p>
+<p>If run as a program <tt>overlay.py</tt> takes the file name as a command line argument. </p>
+<!--COMMENTS:pygame.examples.overlay.main--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.examples.blend_fill.main">
+<big><b>pygame.examples.blend_fill.main</big></b><br><ul>
+  <i>demonstrate the various surface.fill method blend options</i><br>
+  <tt>pygame.examples.blend_fill.main(): return None</tt><br>
+<p><tt>A</tt> interactive demo that lets one choose which BLEND_xxx option to apply to a surface. </p>
+<!--COMMENTS:pygame.examples.blend_fill.main--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.examples.cursors.main">
+<big><b>pygame.examples.cursors.main</big></b><br><ul>
+  <i>display two different custom cursors</i><br>
+  <tt>pygame.examples.cursors.main(): return None</tt><br>
+<p>Display an arrow or circle with crossbar cursor. </p>
+<!--COMMENTS:pygame.examples.cursors.main--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.examples.pixelarray.main">
+<big><b>pygame.examples.pixelarray.main</big></b><br><ul>
+  <i>display various pixelarray generated effects</i><br>
+  <tt>pygame.examples.pixelarray.main(): return None</tt><br>
+<p>Display various pixelarray generated effects. </p>
+<!--COMMENTS:pygame.examples.pixelarray.main--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.examples.scaletest.main">
+<big><b>pygame.examples.scaletest.main</big></b><br><ul>
+  <i>interactively scale an image using smoothscale</i><br>
+  <tt>pygame.examples.scaletest.main(imagefile, convert_alpha=False, run_speed_test=True): return None</tt><br>
+<p>arguments: </p>
+<pre>    imagefile - file name of source image (required)
+    convert_alpha - use convert_alpha() on the surf (default False)
+    run_speed_test - (default False)
+</pre><p><tt>A</tt> smoothscale example that resized an image on the screen. Vertical and horizontal arrow keys are used to change the width and height of the displayed image. If the convert_alpha option is True then the source image is forced to have source alpha, whether or not the original images does. If run_speed_test is True then a background timing test is performed instead of the interactive scaler. </p>
+<p>If <tt>scaletest.py</tt> is run as a program then the command line options are: </p>
+<pre>    ImageFile [-t] [-convert_alpha]
+    [-t] = Run Speed Test
+    [-convert_alpha] = Use convert_alpha() on the surf.
+</pre>
+<!--COMMENTS:pygame.examples.scaletest.main--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.examples.midi.main">
+<big><b>pygame.examples.midi.main</big></b><br><ul>
+  <i>run a midi example</i><br>
+  <tt>pygame.examples.midi.main(mode='output', device_id=None): return None</tt><br>
+<p>Arguments: </p>
+<pre>    mode - if 'output' run a midi keyboard output example
+              'input' run a midi event logger input example
+              'list' list available midi devices
+           (default 'output')
+    device_id - midi device number; if None then use the default midi input or
+                output device for the system
+</pre><p>The output example shows how to translate mouse clicks or computer keyboard events into midi notes. It implements a rudimentary button widget and state machine. </p>
+<p>The input example shows how to translate midi input to pygame events. </p>
+<p>With the use of a virtual midi patch cord the output and input examples can be run as separate processes and connected so the keyboard output is displayed on a console. </p>
+<p>new to pygame <tt>1.9.0</tt> </p>
+<!--COMMENTS:pygame.examples.midi.main--> &nbsp;<br> 
+<br></ul>
+<br></ul>
+
+</body></html>

docs/ref/font.html

 <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="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>

docs/ref/image.html

 <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="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>

docs/ref/index.html

 <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="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>
 <li><a href="event.html#pygame.event.set_grab">pygame.event.set_grab</a> - <font size=-1>control the sharing of input devices with other applications</font></li>
 <li><a href="event.html#pygame.event.wait">pygame.event.wait</a> - <font size=-1>wait for a single event from the queue</font></li>
 </ul>
+<li><a href="examples.html#pygame.examples">pygame.examples</a> - <font size=-1>module of example programs</font></li>
+<ul>
+<li><a href="examples.html#pygame.examples.aliens.main">pygame.examples.aliens.main</a> - <font size=-1>play the full aliens example</font></li>
+<li><a href="examples.html#pygame.examples.arraydemo.main">pygame.examples.arraydemo.main</a> - <font size=-1>show various surfarray effects</font></li>
+<li><a href="examples.html#pygame.examples.blend_fill.main">pygame.examples.blend_fill.main</a> - <font size=-1>demonstrate the various surface.fill method blend options</font></li>
+<li><a href="examples.html#pygame.examples.chimp.main">pygame.examples.chimp.main</a> - <font size=-1>hit the moving chimp</font></li>
+<li><a href="examples.html#pygame.examples.cursors.main">pygame.examples.cursors.main</a> - <font size=-1>display two different custom cursors</font></li>
+<li><a href="examples.html#pygame.examples.eventlist.main">pygame.examples.eventlist.main</a> - <font size=-1>display pygame events</font></li>
+<li><a href="examples.html#pygame.examples.fastevents.main">pygame.examples.fastevents.main</a> - <font size=-1>stress test the fastevents module</font></li>
+<li><a href="examples.html#pygame.examples.fonty.main">pygame.examples.fonty.main</a> - <font size=-1>run a font rendering example</font></li>
+<li><a href="examples.html#pygame.examples.glcube.main">pygame.examples.glcube.main</a> - <font size=-1>display an animated 3D cube using OpenGL</font></li>
+<li><a href="examples.html#pygame.examples.headless_no_windows_needed.main">pygame.examples.headless_no_windows_needed.main</a> - <font size=-1>write an image file that is smoothscaled copy of an input file</font></li>
+<li><a href="examples.html#pygame.examples.liquid.main">pygame.examples.liquid.main</a> - <font size=-1>display an animated liquid effect</font></li>
+<li><a href="examples.html#pygame.examples.mask.main">pygame.examples.mask.main</a> - <font size=-1>display multiple images bounce off each other using collision detection</font></li>
+<li><a href="examples.html#pygame.examples.midi.main">pygame.examples.midi.main</a> - <font size=-1>run a midi example</font></li>
+<li><a href="examples.html#pygame.examples.moveit.main">pygame.examples.moveit.main</a> - <font size=-1>display animated objects on the screen</font></li>
+<li><a href="examples.html#pygame.examples.oldalien.main">pygame.examples.oldalien.main</a> - <font size=-1>play the original aliens example</font></li>
+<li><a href="examples.html#pygame.examples.overlay.main">pygame.examples.overlay.main</a> - <font size=-1>play a .pgm video using overlays</font></li>
+<li><a href="examples.html#pygame.examples.pixelarray.main">pygame.examples.pixelarray.main</a> - <font size=-1>display various pixelarray generated effects</font></li>
+<li><a href="examples.html#pygame.examples.scaletest.main">pygame.examples.scaletest.main</a> - <font size=-1>interactively scale an image using smoothscale</font></li>
+<li><a href="examples.html#pygame.examples.scrap_clipboard.main">pygame.examples.scrap_clipboard.main</a> - <font size=-1>access the clipboard</font></li>
+<li><a href="examples.html#pygame.examples.sound.main">pygame.examples.sound.main</a> - <font size=-1>load and play a sound</font></li>
+<li><a href="examples.html#pygame.examples.sound_array_demos.main">pygame.examples.sound_array_demos.main</a> - <font size=-1>play various sndarray effects</font></li>
+<li><a href="examples.html#pygame.examples.stars.main">pygame.examples.stars.main</a> - <font size=-1>run a simple starfield example</font></li>
+<li><a href="examples.html#pygame.examples.testsprite.main">pygame.examples.testsprite.main</a> - <font size=-1>show lots of sprites moving around</font></li>
+<li><a href="examples.html#pygame.examples.vgrade.main">pygame.examples.vgrade.main</a> - <font size=-1>display a vertical gradient</font></li>
+</ul>
 <li><a href="font.html#pygame.font">pygame.font</a> - <font size=-1>pygame module for loading and rendering fonts</font></li>
 <ul>
 <li><a href="font.html#pygame.font.Font">pygame.font.Font</a> - <font size=-1>create a new Font object from a file</font></li>
 <li><a href="mask.html#Mask.clear">Mask.clear</a> - <font size=-1>Sets all bits to 0</font></li>
 <li><a href="mask.html#Mask.connected_component">Mask.connected_component</a> - <font size=-1>Returns a mask of a connected region of pixels.</font></li>
 <li><a href="mask.html#Mask.connected_components">Mask.connected_components</a> - <font size=-1>Returns a list of masks of connected regions of pixels.</font></li>
+<li><a href="mask.html#Mask.convolve">Mask.convolve</a> - <font size=-1>Return the convolution of self with another mask.</font></li>
 <li><a href="mask.html#Mask.count">Mask.count</a> - <font size=-1>Returns the number of set pixels</font></li>
 <li><a href="mask.html#Mask.draw">Mask.draw</a> - <font size=-1>Draws a mask onto another</font></li>
 <li><a href="mask.html#Mask.erase">Mask.erase</a> - <font size=-1>Erases a mask from another</font></li>
 <li><a href="rect.html#Rect.collidepoint">Rect.collidepoint</a> - <font size=-1>test if a point is inside a rectangle</font></li>
 <li><a href="rect.html#Rect.colliderect">Rect.colliderect</a> - <font size=-1>test if two rectangles overlap</font></li>
 <li><a href="rect.html#Rect.contains">Rect.contains</a> - <font size=-1>test if one rectangle is inside another</font></li>
+<li><a href="rect.html#Rect.copy">Rect.copy</a> - <font size=-1>copy the rectangle</font></li>
 <li><a href="rect.html#Rect.fit">Rect.fit</a> - <font size=-1>resize and move a rectangle with aspect ratio</font></li>
 <li><a href="rect.html#Rect.inflate">Rect.inflate</a> - <font size=-1>grow or shrink the rectangle size</font></li>
 <li><a href="rect.html#Rect.inflate_ip">Rect.inflate_ip</a> - <font size=-1>grow or shrink the rectangle size, in place</font></li>
 <li><a href="surfarray.html#pygame.surfarray.pixels_alpha">pygame.surfarray.pixels_alpha</a> - <font size=-1>Reference pixel alphas into a 2d array</font></li>
 <li><a href="surfarray.html#pygame.surfarray.use_arraytype">pygame.surfarray.use_arraytype</a> - <font size=-1>Sets the array system to be used for surface arrays</font></li>
 </ul>
+<li><a href="tests.html#pygame.tests">pygame.tests</a> - <font size=-1>Pygame unit test suite package</font></li>
+<ul>
+<li><a href="tests.html#pygame.tests.run">pygame.tests.run</a> - <font size=-1>Run the Pygame unit test suite</font></li>
+</ul>
 <li><a href="time.html#pygame.time">pygame.time</a> - <font size=-1>pygame module for monitoring time</font></li>
 <ul>
 <li><a href="time.html#pygame.time.Clock">pygame.time.Clock</a> - <font size=-1>create an object to help track time</font></li>

docs/ref/joystick.html

 <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="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>

docs/ref/key.html

 <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="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>

docs/ref/locals.html

 <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="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>

docs/ref/mask.html

 <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="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>
   <tr><td><a href="mask.html#Mask.centroid">Mask.centroid</a> - <font size=-1>Returns the centroid of the pixels in a Mask</font></td><td>Returns the centroid of the pixels in a Mask</td></tr>
   <tr><td><a href="mask.html#Mask.angle">Mask.angle</a> - <font size=-1>Returns the orientation of the pixels</font></td><td>Returns the orientation of the pixels</td></tr>
   <tr><td><a href="mask.html#Mask.outline">Mask.outline</a> - <font size=-1>list of points outlining an object</font></td><td>list of points outlining an object</td></tr>
+  <tr><td><a href="mask.html#Mask.convolve">Mask.convolve</a> - <font size=-1>Return the convolution of self with another mask.</font></td><td>Return the convolution of self with another mask.</td></tr>
   <tr><td><a href="mask.html#Mask.connected_component">Mask.connected_component</a> - <font size=-1>Returns a mask of a connected region of pixels.</font></td><td>Returns a mask of a connected region of pixels.</td></tr>
   <tr><td><a href="mask.html#Mask.connected_components">Mask.connected_components</a> - <font size=-1>Returns a list of masks of connected regions of pixels.</font></td><td>Returns a list of masks of connected regions of pixels.</td></tr>
   <tr><td><a href="mask.html#Mask.get_bounding_rects">Mask.get_bounding_rects</a> - <font size=-1>Returns a list of bounding rects of regions of set pixels.</font></td><td>Returns a list of bounding rects of regions of set pixels.</td></tr>
 <br></ul>
 
 
+<a name="Mask.convolve">
+<big><b>Mask.convolve</big></b><br><ul>
+  <i>Return the convolution of self with another mask.</i><br>
+  <tt>Mask.convolve(othermask, outputmask = None, offset = (0,0)) -> Mask</tt><br>
+<p>Returns a mask with the (i-offset[0],j-offset[1]) bit set if shifting othermask so that it's lower right corner pixel is at (i,j) would cause it to overlap with self. </p>
+<p>If an outputmask is specified, the output is drawn onto outputmask and outputmask is returned. Otherwise a mask of size <tt>self.get_size()</tt> + <tt>othermask.get_size()</tt> - (1,1) is created. </p>
+<!--COMMENTS:Mask.convolve--> &nbsp;<br> 
+<br></ul>
+
+
 <a name="Mask.connected_component">
 <big><b>Mask.connected_component</big></b><br><ul>
   <i>Returns a mask of a connected region of pixels.</i><br>

docs/ref/mixer.html

 <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="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>
 <a name="pygame.mixer.init">
 <big><b>pygame.mixer.init</big></b><br><ul>
   <i>initialize the mixer module</i><br>
-  <tt>pygame.mixer.init(frequency=22050, size=-16, channels=2, buffer=3072): return None</tt><br>
-<p>Initialize the mixer module for Sound loading and playback. The default arguments can be overridden to provide specific audio mixing. The size argument represents how many bits are used for each audio sample. If the value is negative then signed sample values will be used. Positive values mean unsigned audio samples will be used. </p>
-<p>The channels argument is used to specify whether to use mono or stereo. 1 for mono and 2 for stereo. No other values are supported. </p>
-<p>The buffer argument controls the number of internal samples used in the sound mixer. The default value should work for most cases. It can be lowered to reduce latency, but sound dropout may occur. It can be raised to larger values to ensure playback never skips, but it will impose latency on sound playback. The buffer size must be a power of two. </p>
+  <tt>pygame.mixer.init(frequency=22050, size=-16, channels=2, buffer=4096): return None</tt><br>
+<p>Initialize the mixer module for Sound loading and playback. The default arguments can be overridden to provide specific audio mixing. Keyword arguments are accepted. For backward compatibility where an argument is set zero the default value is used (possible changed by a pre_init call). </p>
+<p>The size argument represents how many bits are used for each audio sample. If the value is negative then signed sample values will be used. Positive values mean unsigned audio samples will be used. An invalid value raises an exception. </p>
+<p>The channels argument is used to specify whether to use mono or stereo. 1 for mono and 2 for stereo. No other values are supported (negative values are treated as 1, values greater than 2 as 2). </p>
+<p>The buffer argument controls the number of internal samples used in the sound mixer. The default value should work for most cases. It can be lowered to reduce latency, but sound dropout may occur. It can be raised to larger values to ensure playback never skips, but it will impose latency on sound playback. The buffer size must be a power of two (if not it is rounded up to the next nearest power of 2). </p>
 <p>Some platforms require the <tt>pygame.mixer</tt> module to be initialized after the display modules have initialized. The top level <tt><a href="pygame.html#pygame.init">pygame.init</a> - <font size=-1>initialize all imported pygame modules</font></tt> takes care of this automatically, but cannot pass any arguments to the mixer init. To solve this, mixer has a function <tt><a href="mixer.html#pygame.mixer.pre_init">pygame.mixer.pre_init</a> - <font size=-1>preset the mixer init arguments</font></tt> to set the proper defaults before the toplevel init is used. </p>
 <p>It is safe to call this more than once, but after the mixer is initialized you cannot change the playback arguments without first calling <tt><a href="mixer.html#pygame.mixer.quit">pygame.mixer.quit</a> - <font size=-1>uninitialize the mixer</font></tt>. </p>
 <!--COMMENTS:pygame.mixer.init--> &nbsp;<br> 
 <a name="pygame.mixer.pre_init">
 <big><b>pygame.mixer.pre_init</big></b><br><ul>
   <i>preset the mixer init arguments</i><br>
-  <tt>pygame.mixer.pre_init(frequency=0, size=0, channels=0, buffersize=0): return None</tt><br>
-<p>Any nonzero arguments change the default values used when the real <tt><a href="mixer.html#pygame.mixer.init">pygame.mixer.init</a> - <font size=-1>initialize the mixer module</font></tt> is called. The best way to set custom mixer playback values is to call <tt><a href="mixer.html#pygame.mixer.pre_init">pygame.mixer.pre_init</a> - <font size=-1>preset the mixer init arguments</font></tt> before calling the top level <tt><a href="pygame.html#pygame.init">pygame.init</a> - <font size=-1>initialize all imported pygame modules</font></tt>. </p>
+  <tt>pygame.mixer.pre_init(frequency=22050, size=-16, channels=2, buffersize=4096): return None</tt><br>
+<p>Call pre_init to change the defaults used when the real <tt><a href="mixer.html#pygame.mixer.init">pygame.mixer.init</a> - <font size=-1>initialize the mixer module</font></tt> is called. Keyword arguments are accepted. The best way to set custom mixer playback values is to call <tt><a href="mixer.html#pygame.mixer.pre_init">pygame.mixer.pre_init</a> - <font size=-1>preset the mixer init arguments</font></tt> before calling the top level <tt><a href="pygame.html#pygame.init">pygame.init</a> - <font size=-1>initialize all imported pygame modules</font></tt>. For backward compatibility argument values of zero is replaced with the startup defaults. </p>
 <!--COMMENTS:pygame.mixer.pre_init--> &nbsp;<br> 
 <br></ul>
 
 <big><b>pygame.mixer.quit</big></b><br><ul>
   <i>uninitialize the mixer</i><br>
   <tt>pygame.mixer.quit(): return None</tt><br>
-<p>This will uninitialize <tt>pygame.mixer</tt>. All playback will stop and any loaded Sound objects may not be compatable with the mixer if it is reinitialized later. </p>
+<p>This will uninitialize <tt>pygame.mixer</tt>. All playback will stop and any loaded Sound objects may not be compatible with the mixer if it is reinitialized later. </p>
 <!--COMMENTS:pygame.mixer.quit--> &nbsp;<br> 
 <br></ul>
 

docs/ref/mouse.html

 <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="sprite.html">Sprite</a>&nbsp;||&nbsp;
 <a href="surface.html">Surface</a>&nbsp;||&nbsp;
 <a href="surfarray.html">Surfarray</a>&nbsp;||&nbsp;