pygamedocs.h 119 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319
  1. /* Auto generated file: with makeref.py . Docs go in src/ *.doc . */
  2. #define DOC_PYGAME "the top level pygame package"
  3. #define DOC_PYGAMEINIT "pygame.init(): return (numpass, numfail)\ninitialize all imported pygame modules"
  4. #define DOC_PYGAMEQUIT "pygame.quit(): return None\nuninitialize all pygame modules"
  5. #define DOC_PYGAMEERROR "raise pygame.error, message\nstandard pygame exception"
  6. #define DOC_PYGAMEGETERROR "pygame.get_error(): return errorstr\nget the current error message"
  7. #define DOC_PYGAMESETERROR "pygame.set_error(error_msg): return None\nset the current error message"
  8. #define DOC_PYGAMEGETSDLVERSION "pygame.get_sdl_version(): return major, minor, patch\nget the version number of SDL"
  9. #define DOC_PYGAMEGETSDLBYTEORDER "pygame.get_sdl_byteorder(): return int\nget the byte order of SDL"
  10. #define DOC_PYGAMEREGISTERQUIT "register_quit(callable): return None\nregister a function to be called when pygame quits"
  11. #define DOC_PYGAMEVERSION "module pygame.version\nsmall module containing version information"
  12. #define DOC_PYGAMEVERSIONVER "pygame.version.ver = '1.2'\nversion number as a string"
  13. #define DOC_PYGAMEVERSIONVERNUM "pygame.version.vernum = (1, 5, 3)\ntupled integers of the version"
  14. #define DOC_PYGAMECAMERA "pygame module for camera use"
  15. #define DOC_PYGAMECAMERACOLORSPACE "pygame.camera.colorspace(Surface, format, DestSurface = None): return Surface\nSurface colorspace conversion"
  16. #define DOC_PYGAMECAMERALISTCAMERAS "pygame.camera.list_cameras(): return [cameras]\nreturns a list of available cameras"
  17. #define DOC_PYGAMECAMERACAMERA "pygame.camera.Camera(device, (width, height), format): return Camera\nload a camera"
  18. #define DOC_CAMERASTART "Camera.start(): return None\nopens, initializes, and starts capturing"
  19. #define DOC_CAMERASTOP "Camera.stop(): return None\nstops, uninitializes, and closes the camera"
  20. #define DOC_CAMERAGETCONTROLS "Camera.get_controls(): return (hflip = bool, vflip = bool, brightness)\ngets current values of user controls"
  21. #define DOC_CAMERASETCONTROLS "Camera.set_controls(hflip = bool, vflip = bool, brightness): return (hflip = bool, vflip = bool, brightness)\nchanges camera settings if supported by the camera"
  22. #define DOC_CAMERAGETSIZE "Camera.get_size(): return (width, height)\nreturns the dimensions of the images being recorded"
  23. #define DOC_CAMERAQUERYIMAGE "Camera.query_image(): return bool\nchecks if a frame is ready"
  24. #define DOC_CAMERAGETIMAGE "Camera.get_image(Surface = None): return Surface\ncaptures an image as a Surface"
  25. #define DOC_CAMERAGETRAW "Camera.get_raw(): return string\nreturns an unmodified image as a string"
  26. #define DOC_PYGAMECDROM "pygame module for audio cdrom control"
  27. #define DOC_PYGAMECDROMINIT "pygame.cdrom.init(): return None\ninitialize the cdrom module"
  28. #define DOC_PYGAMECDROMQUIT "pygame.cdrom.quit(): return None\nuninitialize the cdrom module"
  29. #define DOC_PYGAMECDROMGETINIT "pygame.cdrom.get_init(): return bool\ntrue if the cdrom module is initialized"
  30. #define DOC_PYGAMECDROMGETCOUNT "pygame.cdrom.get_count(): return count\nnumber of cd drives on the system"
  31. #define DOC_PYGAMECDROMCD "pygame.cdrom.CD(id): return CD\nclass to manage a cdrom drive"
  32. #define DOC_CDINIT "CD.init(): return None\ninitialize a cdrom drive for use"
  33. #define DOC_CDQUIT "CD.quit(): return None\nuninitialize a cdrom drive for use"
  34. #define DOC_CDGETINIT "CD.get_init(): return bool\ntrue if this cd device initialized"
  35. #define DOC_CDPLAY "CD.play(track, start=None, end=None): return None\nstart playing audio"
  36. #define DOC_CDSTOP "CD.stop(): return None\nstop audio playback"
  37. #define DOC_CDPAUSE "CD.pause(): return None\ntemporarily stop audio playback"
  38. #define DOC_CDRESUME "CD.resume(): return None\nunpause audio playback"
  39. #define DOC_CDEJECT "CD.eject(): return None\neject or open the cdrom drive"
  40. #define DOC_CDGETID "CD.get_id(): return id\nthe index of the cdrom drive"
  41. #define DOC_CDGETNAME "CD.get_name(): return name\nthe system name of the cdrom drive"
  42. #define DOC_CDGETBUSY "CD.get_busy(): return bool\ntrue if the drive is playing audio"
  43. #define DOC_CDGETPAUSED "CD.get_paused(): return bool\ntrue if the drive is paused"
  44. #define DOC_CDGETCURRENT "CD.get_current(): return track, seconds\nthe current audio playback position"
  45. #define DOC_CDGETEMPTY "CD.get_empty(): return bool\nFalse if a cdrom is in the drive"
  46. #define DOC_CDGETNUMTRACKS "CD.get_numtracks(): return count\nthe number of tracks on the cdrom"
  47. #define DOC_CDGETTRACKAUDIO "CD.get_track_audio(track): return bool\ntrue if the cdrom track has audio data"
  48. #define DOC_CDGETALL "CD.get_all(): return [(audio, start, end, lenth), ...]\nget all track information"
  49. #define DOC_CDGETTRACKSTART "CD.get_track_start(track): return seconds\nstart time of a cdrom track"
  50. #define DOC_CDGETTRACKLENGTH "CD.get_track_length(track): return seconds\nlength of a cdrom track"
  51. #define DOC_PYGAMECOLOR "pygame.Color(name): Return Color\npygame.Color(r, g, b, a): Return Color\npygame.Color(rgbvalue): Return Color\npygame object for color representations"
  52. #define DOC_COLORR "Color.r: Return int\nGets or sets the red value of the Color."
  53. #define DOC_COLORG "Color.g: Return int\nGets or sets the green value of the Color."
  54. #define DOC_COLORB "Color.b: Return int\nGets or sets the blue value of the Color."
  55. #define DOC_COLORA "Color.a: Return int\nGets or sets the alpha value of the Color."
  56. #define DOC_COLORCMY "Color.cmy: Return tuple\nGets or sets the CMY representation of the Color."
  57. #define DOC_COLORHSVA "Color.hsva: Return tuple\nGets or sets the HSVA representation of the Color."
  58. #define DOC_COLORHSLA "Color.hsla: Return tuple\nGets or sets the HSLA representation of the Color."
  59. #define DOC_COLORI1I2I3 "Color.i1i2i3: Return tuple\nGets or sets the I1I2I3 representation of the Color."
  60. #define DOC_COLORNORMALIZE "Color.normalize(): Return tuple\nReturns the normalized RGBA values of the Color."
  61. #define DOC_COLORCORRECTGAMMA "Color.correct_gamma (gamma): Return Color\nApplies a certain gamma value to the Color."
  62. #define DOC_COLORSETLENGTH "Color.set_length(len)\nSet the number of elements in the Color to 1,2,3, or 4."
  63. #define DOC_PYGAMECURSORS "pygame module for cursor resources"
  64. #define DOC_PYGAMECURSORSCOMPILE "pygame.cursor.compile(strings, black='X', white='.', xor='o'): return data, mask\ncreate binary cursor data from simple strings"
  65. #define DOC_PYGAMECURSORSLOADXBM "pygame.cursors.load_xbm(cursorfile): return cursor_args\npygame.cursors.load_xbm(cursorfile, maskfile): return cursor_args\nload cursor data from an xbm file"
  66. #define DOC_PYGAMEDISPLAY "pygame module to control the display window and screen"
  67. #define DOC_PYGAMEDISPLAYINIT "pygame.display.init(): return None\ninitialize the display module"
  68. #define DOC_PYGAMEDISPLAYQUIT "pygame.display.quit(): return None\nuninitialize the display module"
  69. #define DOC_PYGAMEDISPLAYGETINIT "pygame.display.get_init(): return bool\ntrue if the display module is initialized"
  70. #define DOC_PYGAMEDISPLAYSETMODE "pygame.display.set_mode(resolution=(0,0), flags=0, depth=0): return Surface\ninitialize a window or screen for display"
  71. #define DOC_PYGAMEDISPLAYGETSURFACE "pygame.display.get_surface(): return Surface\nget a reference to the currently set display surface"
  72. #define DOC_PYGAMEDISPLAYFLIP "pygame.display.flip(): return None\nupdate the full display Surface to the screen"
  73. #define DOC_PYGAMEDISPLAYUPDATE "pygame.display.update(rectangle=None): return None\npygame.display.update(rectangle_list): return None\nupdate portions of the screen for software displays"
  74. #define DOC_PYGAMEDISPLAYGETDRIVER "pygame.display.get_driver(): return name\nget the name of the pygame display backend"
  75. #define DOC_PYGAMEDISPLAYINFO "pygame.display.Info(): return VideoInfo\nCreate a video display information object"
  76. #define DOC_PYGAMEDISPLAYGETWMINFO "pygame.display.get_wm_info(): return dict\nGet information about the current windowing system"
  77. #define DOC_PYGAMEDISPLAYLISTMODES "pygame.display.list_modes(depth=0, flags=pygame.FULLSCREEN): return list\nget list of available fullscreen modes"
  78. #define DOC_PYGAMEDISPLAYMODEOK "pygame.display.mode_ok(size, flags=0, depth=0): return depth\npick the best color depth for a display mode"
  79. #define DOC_PYGAMEDISPLAYGLGETATTRIBUTE "pygame.display.gl_get_attribute(flag): return value\nget the value for an opengl flag for the current display"
  80. #define DOC_PYGAMEDISPLAYGLSETATTRIBUTE "pygame.display.gl_set_attribute(flag, value): return None\nrequest an opengl display attribute for the display mode"
  81. #define DOC_PYGAMEDISPLAYGETACTIVE "pygame.display.get_active(): return bool\ntrue when the display is active on the display"
  82. #define DOC_PYGAMEDISPLAYICONIFY "pygame.display.iconify(): return bool\niconify the display surface"
  83. #define DOC_PYGAMEDISPLAYTOGGLEFULLSCREEN "pygame.display.toggle_fullscreen(): return bool\nswitch between fullscreen and windowed displays"
  84. #define DOC_PYGAMEDISPLAYSETGAMMA "pygame.display.set_gamma(red, green=None, blue=None): return bool\nchange the hardware gamma ramps"
  85. #define DOC_PYGAMEDISPLAYSETGAMMARAMP "change the hardware gamma ramps with a custom lookup\npygame.display.set_gamma_ramp(red, green, blue): return bool\nset_gamma_ramp(red, green, blue): return bool"
  86. #define DOC_PYGAMEDISPLAYSETICON "pygame.display.set_icon(Surface): return None\nchange the system image for the display window"
  87. #define DOC_PYGAMEDISPLAYSETCAPTION "pygame.display.set_caption(title, icontitle=None): return None\nset the current window caption"
  88. #define DOC_PYGAMEDISPLAYGETCAPTION "pygame.display.get_caption(): return (title, icontitle)\nget the current window caption"
  89. #define DOC_PYGAMEDISPLAYSETPALETTE "pygame.display.set_palette(palette=None): return None\nset the display color palette for indexed displays"
  90. #define DOC_PYGAMEDRAW "pygame module for drawing shapes"
  91. #define DOC_PYGAMEDRAWRECT "pygame.draw.rect(Surface, color, Rect, width=0): return Rect\ndraw a rectangle shape"
  92. #define DOC_PYGAMEDRAWPOLYGON "pygame.draw.polygon(Surface, color, pointlist, width=0): return Rect\ndraw a shape with any number of sides"
  93. #define DOC_PYGAMEDRAWCIRCLE "pygame.draw.circle(Surface, color, pos, radius, width=0): return Rect\ndraw a circle around a point"
  94. #define DOC_PYGAMEDRAWELLIPSE "pygame.draw.ellipse(Surface, color, Rect, width=0): return Rect\ndraw a round shape inside a rectangle"
  95. #define DOC_PYGAMEDRAWARC "pygame.draw.arc(Surface, color, Rect, start_angle, stop_angle, width=1): return Rect\ndraw a partial section of an ellipse"
  96. #define DOC_PYGAMEDRAWLINE "pygame.draw.line(Surface, color, start_pos, end_pos, width=1): return Rect\ndraw a straight line segment"
  97. #define DOC_PYGAMEDRAWLINES "pygame.draw.lines(Surface, color, closed, pointlist, width=1): return Rect\ndraw multiple contiguous line segments"
  98. #define DOC_PYGAMEDRAWAALINE "pygame.draw.aaline(Surface, color, startpos, endpos, blend=1): return Rect\ndraw fine antialiased lines"
  99. #define DOC_PYGAMEDRAWAALINES "pygame.draw.aalines(Surface, color, closed, pointlist, blend=1): return Rect"
  100. #define DOC_PYGAMEEVENT "pygame module for interacting with events and queues"
  101. #define DOC_PYGAMEEVENTPUMP "pygame.event.pump(): return None\ninternally process pygame event handlers"
  102. #define DOC_PYGAMEEVENTGET "pygame.event.get(): return Eventlist\npygame.event.get(type): return Eventlist\npygame.event.get(typelist): return Eventlist\nget events from the queue"
  103. #define DOC_PYGAMEEVENTPOLL "pygame.event.poll(): return Event\nget a single event from the queue"
  104. #define DOC_PYGAMEEVENTWAIT "pygame.event.wait(): return Event\nwait for a single event from the queue"
  105. #define DOC_PYGAMEEVENTPEEK "pygame.event.peek(type): return bool\npygame.event.peek(typelist): return bool\ntest if event types are waiting on the queue"
  106. #define DOC_PYGAMEEVENTCLEAR "pygame.event.clear(): return None\npygame.event.clear(type): return None\npygame.event.clear(typelist): return None\nremove all events from the queue"
  107. #define DOC_PYGAMEEVENTEVENTNAME "pygame.event.event_name(type): return string\nget the string name from and event id"
  108. #define DOC_PYGAMEEVENTSETBLOCKED "pygame.event.set_blocked(type): return None\npygame.event.set_blocked(typelist): return None\npygame.event.set_blocked(None): return None\ncontrol which events are allowed on the queue"
  109. #define DOC_PYGAMEEVENTSETALLOWED "pygame.event.set_allowed(type): return None\npygame.event.set_allowed(typelist): return None\npygame.event.set_allowed(None): return None\ncontrol which events are allowed on the queue"
  110. #define DOC_PYGAMEEVENTGETBLOCKED "pygame.event.get_blocked(type): return bool\ntest if a type of event is blocked from the queue"
  111. #define DOC_PYGAMEEVENTSETGRAB "pygame.event.set_grab(bool): return None\ncontrol the sharing of input devices with other applications"
  112. #define DOC_PYGAMEEVENTGETGRAB "pygame.event.get_grab(): return bool\ntest if the program is sharing input devices"
  113. #define DOC_PYGAMEEVENTPOST "pygame.event.post(Event): return None\nplace a new event on the queue"
  114. #define DOC_PYGAMEEVENTEVENT "pygame.event.Event(type, dict): return Event\npygame.event.Event(type, **attributes): return Event\ncreate a new event object"
  115. #define DOC_PYGAMEEXAMPLES "module of example programs"
  116. #define DOC_PYGAMEEXAMPLESALIENSMAIN "pygame.aliens.main(): return None\nplay the full aliens example"
  117. #define DOC_PYGAMEEXAMPLESOLDALIENMAIN "pygame.examples.oldalien.main(): return None\nplay the original aliens example"
  118. #define DOC_PYGAMEEXAMPLESSTARSMAIN "pygame.examples.stars.main(): return None\nrun a simple starfield example"
  119. #define DOC_PYGAMEEXAMPLESCHIMPMAIN "pygame.examples.chimp.main(): return None\nhit the moving chimp"
  120. #define DOC_PYGAMEEXAMPLESMOVEITMAIN "pygame.examples.moveit.main(): return None\ndisplay animated objects on the screen"
  121. #define DOC_PYGAMEEXAMPLESFONTYMAIN "pygame.examples.fonty.main(): return None\nrun a font rendering example"
  122. #define DOC_PYGAMEEXAMPLESVGRADEMAIN "pygame.examples.vgrade.main(): return None\ndisplay a vertical gradient"
  123. #define DOC_PYGAMEEXAMPLESEVENTLISTMAIN "pygame.examples.eventlist.main(): return None\ndisplay pygame events"
  124. #define DOC_PYGAMEEXAMPLESARRAYDEMOMAIN "pygame.examples.arraydemo.main(arraytype=None): return None\nshow various surfarray effects"
  125. #define DOC_PYGAMEEXAMPLESSOUNDMAIN "pygame.examples.sound.main(file_path=None): return None\nload and play a sound"
  126. #define DOC_PYGAMEEXAMPLESSOUNDARRAYDEMOSMAIN "pygame.examples.sound_array_demos.main(arraytype=None): return None\nplay various sndarray effects"
  127. #define DOC_PYGAMEEXAMPLESLIQUIDMAIN "pygame.examples.liquid.main(): return None\ndisplay an animated liquid effect"
  128. #define DOC_PYGAMEEXAMPLESGLCUBEMAIN "pygame.examples.glcube.main(): return None\ndisplay an animated 3D cube using OpenGL"
  129. #define DOC_PYGAMEEXAMPLESSCRAPCLIPBOARDMAIN "pygame.examples.scrap_clipboard.main(): return None\naccess the clipboard"
  130. #define DOC_PYGAMEEXAMPLESMASKMAIN "pygame.examples.mask.main(*args): return None\ndisplay multiple images bounce off each other using collision detection"
  131. #define DOC_PYGAMEEXAMPLESTESTSPRITEMAIN "pygame.examples.testsprite.main(update_rects = True, use_static = False, use_FastRenderGroup = False, screen_dims = [640, 480], use_alpha = False, flags = 0): return None\nshow lots of sprites moving around"
  132. #define DOC_PYGAMEEXAMPLESHEADLESSNOWINDOWSNEEDEDMAIN "pygame.examples.headless_no_windows_needed.main(fin, fout, w, h): return None\nwrite an image file that is smoothscaled copy of an input file"
  133. #define DOC_PYGAMEEXAMPLESFASTEVENTSMAIN "pygame.examples.fastevents.main(): return None\nstress test the fastevents module"
  134. #define DOC_PYGAMEEXAMPLESOVERLAYMAIN "pygame.examples.overlay.main(fname): return None\nplay a .pgm video using overlays"
  135. #define DOC_PYGAMEEXAMPLESBLENDFILLMAIN "pygame.examples.blend_fill.main(): return None\ndemonstrate the various surface.fill method blend options"
  136. #define DOC_PYGAMEEXAMPLESCURSORSMAIN "pygame.examples.cursors.main(): return None\ndisplay two different custom cursors"
  137. #define DOC_PYGAMEEXAMPLESPIXELARRAYMAIN "pygame.examples.pixelarray.main(): return None\ndisplay various pixelarray generated effects"
  138. #define DOC_PYGAMEEXAMPLESSCALETESTMAIN "pygame.examples.scaletest.main(imagefile, convert_alpha=False, run_speed_test=True): return None\ninteractively scale an image using smoothscale"
  139. #define DOC_PYGAMEEXAMPLESMIDIMAIN "pygame.examples.midi.main(mode='output', device_id=None): return None\nrun a midi example"
  140. #define DOC_PYGAMEEXAMPLESSCROLLMAIN "pygame.examples.scroll.main(image_file=None): return None\nrun a Surface.scroll example that shows a magnified image"
  141. #define DOC_PYGAMEEXAMPLESMOVIEPLAYERMAIN "pygame.examples.moveplayer.main(filepath): return None\nplay an MPEG movie"
  142. #define DOC_PYGAMEFONT "pygame module for loading and rendering fonts"
  143. #define DOC_PYGAMEFONTINIT "pygame.font.init(): return None\ninitialize the font module"
  144. #define DOC_PYGAMEFONTQUIT "pygame.font.quit(): return None\nuninitialize the font module"
  145. #define DOC_PYGAMEFONTGETINIT "pygame.font.get_init(): return bool\ntrue if the font module is initialized"
  146. #define DOC_PYGAMEFONTGETDEFAULTFONT "pygame.font.get_default_font(): return string\nget the filename of the default font"
  147. #define DOC_PYGAMEFONTGETFONTS "pygame.font.get_fonts(): return list of strings\nget all available fonts"
  148. #define DOC_PYGAMEFONTMATCHFONT "pygame.font.match_font(name, bold=False, italic=False): return path\nfind a specific font on the system"
  149. #define DOC_PYGAMEFONTSYSFONT "pygame.font.SysFont(name, size, bold=False, italic=False): return Font\ncreate a Font object from the system fonts"
  150. #define DOC_PYGAMEFONTFONT "pygame.font.Font(filename, size): return Font\npygame.font.Font(object, size): return Font\ncreate a new Font object from a file"
  151. #define DOC_FONTRENDER "Font.render(text, antialias, color, background=None): return Surface\ndraw text on a new Surface"
  152. #define DOC_FONTSIZE "Font.size(text): return (width, height)\ndetermine the amount of space needed to render text"
  153. #define DOC_FONTSETUNDERLINE "Font.set_underline(bool): return None\ncontrol if text is rendered with an underline"
  154. #define DOC_FONTGETUNDERLINE "Font.get_underline(): return bool\ncheck if text will be rendered with an underline"
  155. #define DOC_FONTSETBOLD "Font.set_bold(bool): return None\nenable fake rendering of bold text"
  156. #define DOC_FONTGETBOLD "Font.get_bold(): return bool\ncheck if text will be rendered bold"
  157. #define DOC_FONTSETITALIC "Font.set_bold(bool): return None\nenable fake rendering of italic text"
  158. #define DOC_FONTMETRICS "Font.metrics(text): return list\nGets the metrics for each character in the pased string."
  159. #define DOC_FONTGETITALIC "Font.get_italic(): return bool\ncheck if the text will be rendered italic"
  160. #define DOC_FONTGETLINESIZE "Font.get_linesize(): return int\nget the line space of the font text"
  161. #define DOC_FONTGETHEIGHT "Font.get_height(): return int\nget the height of the font"
  162. #define DOC_FONTGETASCENT "Font.get_ascent(): return int\nget the ascent of the font"
  163. #define DOC_FONTGETDESCENT "Font.get_descent(): return int\nget the descent of the font"
  164. #define DOC_PYGAMEGFXDRAW "pygame module for drawing shapes"
  165. #define DOC_PYGAMEGFXDRAWPIXEL "pygame.gfxdraw.pixel(surface, x, y, color): return None\nplace a pixel"
  166. #define DOC_PYGAMEGFXDRAWHLINE "pygame.gfxdraw.hline(surface, x1, x2, y, color): return None\ndraw a horizontal line"
  167. #define DOC_PYGAMEGFXDRAWVLINE "pgyame.gfxdraw.vline(surface, x, y1, y2, color): return None\ndraw a vertical line"
  168. #define DOC_PYGAMEGFXDRAWRECTANGLE "pgyame.gfxdraw.rectangle(surface, rect, color): return None\ndraw a rectangle"
  169. #define DOC_PYGAMEGFXDRAWBOX "pgyame.gfxdraw.box(surface, rect, color): return None\ndraw a box"
  170. #define DOC_PYGAMEGFXDRAWLINE "pgyame.gfxdraw.line(surface, x1, y1, x2, y2, color): return None\ndraw a line"
  171. #define DOC_PYGAMEGFXDRAWCIRCLE "pgyame.gfxdraw.circle(surface, x, y, r, color): return None\ndraw a circle"
  172. #define DOC_PYGAMEGFXDRAWARC "pgyame.gfxdraw.arc(surface, x, y, r, start, end, color): return None\ndraw an arc"
  173. #define DOC_PYGAMEGFXDRAWAACIRCLE "pgyame.gfxdraw.aacircle(surface, x, y, r, color): return None\ndraw an anti-aliased circle"
  174. #define DOC_PYGAMEGFXDRAWFILLEDCIRCLE "pgyame.gfxdraw.filled_circle(surface, x, y, r, color): return None\ndraw a filled circle"
  175. #define DOC_PYGAMEGFXDRAWELLIPSE "pgyame.gfxdraw.ellipse(surface, x, y, rx, ry, color): return None\ndraw an ellipse"
  176. #define DOC_PYGAMEGFXDRAWAAELLIPSE "pgyame.gfxdraw.aaellipse(surface, x, y, rx, ry, color): return None\ndraw an anti-aliased ellipse"
  177. #define DOC_PYGAMEGFXDRAWFILLEDELLIPSE "pgyame.gfxdraw.filled_ellipse(surface, x, y, rx, ry, color): return None\ndraw a filled ellipse"
  178. #define DOC_PYGAMEGFXDRAWPIE "pgyame.gfxdraw.pie(surface, x, y, r, start, end, color): return None\ndraw a pie"
  179. #define DOC_PYGAMEGFXDRAWTRIGON "pgyame.gfxdraw.trigon(surface, x1, y1, x2, y2, x3, y3, color): return None\ndraw a triangle"
  180. #define DOC_PYGAMEGFXDRAWAATRIGON "pgyame.gfxdraw.aatrigon(surface, x1, y1, x2, y2, x3, y3, color): return None\ndraw an anti-aliased triangle"
  181. #define DOC_PYGAMEGFXDRAWFILLEDTRIGON "pgyame.gfxdraw.filled_trigon(surface, x1, y1, x3, y2, x3, y3, color): return None\ndraw a filled trigon"
  182. #define DOC_PYGAMEGFXDRAWPOLYGON "pgyame.gfxdraw.polygon(surface, points, color): return None\ndraw a polygon"
  183. #define DOC_PYGAMEGFXDRAWAAPOLYGON "pgyame.gfxdraw.aapolygon(surface, points, color): return None\ndraw an anti-aliased polygon"
  184. #define DOC_PYGAMEGFXDRAWFILLEDPOLYGON "pgyame.gfxdraw.filled_polygon(surface, points, color): return None\ndraw a filled polygon"
  185. #define DOC_PYGAMEGFXDRAWTEXTUREDPOLYGON "pgyame.gfxdraw.textured_polygon(surface, points, texture, tx, ty): return None\ndraw a textured polygon"
  186. #define DOC_PYGAMEGFXDRAWBEZIER "pgyame.gfxdraw.bezier(surface, points, steps, color): return None\ndraw a bezier curve"
  187. #define DOC_PYGAMEIMAGE "pygame module for image transfer"
  188. #define DOC_PYGAMEIMAGELOAD "pygame.image.load(filename): return Surface\npygame.image.load(fileobj, namehint=""): return Surface\nload new image from a file"
  189. #define DOC_PYGAMEIMAGESAVE "pygame.image.save(Surface, filename): return None\nsave an image to disk"
  190. #define DOC_PYGAMEIMAGEGETEXTENDED "pygame.image.get_extended(): return bool\ntest if extended image formats can be loaded"
  191. #define DOC_PYGAMEIMAGETOSTRING "pygame.image.tostring(Surface, format, flipped=False): return string\ntransfer image to string buffer"
  192. #define DOC_PYGAMEIMAGEFROMSTRING "pygame.image.fromstring(string, size, format, flipped=False): return Surface\ncreate new Surface from a string buffer"
  193. #define DOC_PYGAMEIMAGEFROMBUFFER "pygame.image.frombuffer(string, size, format): return Surface\ncreate a new Surface that shares data inside a string buffer"
  194. #define DOC_PYGAMEJOYSTICK "pygame module for interacting with joystick devices"
  195. #define DOC_PYGAMEJOYSTICKINIT "pygame.joystick.init(): return None\ninitialize the joystick module"
  196. #define DOC_PYGAMEJOYSTICKQUIT "pygame.joystick.quit(): return None\nuninitialize the joystick module"
  197. #define DOC_PYGAMEJOYSTICKGETINIT "pygame.joystick.get_init(): return bool\ntrue if the joystick module is initialized"
  198. #define DOC_PYGAMEJOYSTICKGETCOUNT "pygame.joystick.get_count(): return count\nnumber of joysticks on the system"
  199. #define DOC_PYGAMEJOYSTICKJOYSTICK "pygame.joystick.Joystick(id): return Joystick\ncreate a new Joystick object"
  200. #define DOC_JOYSTICKINIT "Joystick.init(): return None\ninitialize the Joystick"
  201. #define DOC_JOYSTICKQUIT "Joystick.quit(): return None\nuninitialize the Joystick"
  202. #define DOC_JOYSTICKGETINIT "Joystick.get_init(): return bool\ncheck if the Joystick is initialized"
  203. #define DOC_JOYSTICKGETID "Joystick.get_id(): return int\nget the Joystick ID"
  204. #define DOC_JOYSTICKGETNAME "Joystick.get_name(): return string\nget the Joystick system name"
  205. #define DOC_JOYSTICKGETNUMAXES "Joystick.get_numaxes(): return int\nget the number of axes on a Joystick"
  206. #define DOC_JOYSTICKGETAXIS "Joystick.get_axis(axis_number): return float\nget the current position of an axis"
  207. #define DOC_JOYSTICKGETNUMBALLS "Joystick.get_numballs(): return int\nget the number of trackballs on a Joystick"
  208. #define DOC_JOYSTICKGETBALL "Joystick.get_ball(ball_number): return x, y\nget the relative position of a trackball"
  209. #define DOC_JOYSTICKGETNUMBUTTONS "Joystick.get_numbuttons(): return int\nget the number of buttons on a Joystick"
  210. #define DOC_JOYSTICKGETBUTTON "Joystick.get_button(button): return bool\nget the current button state"
  211. #define DOC_JOYSTICKGETNUMHATS "Joystick.get_numhats(): return int\nget the number of hat controls on a Joystick"
  212. #define DOC_JOYSTICKGETHAT "Joystick.get_hat(hat_number): return x, y\nget the position of a joystick hat"
  213. #define DOC_PYGAMEKEY "pygame module to work with the keyboard"
  214. #define DOC_PYGAMEKEYGETFOCUSED "pygame.key.get_focused(): return bool\ntrue if the display is receiving keyboard input from the system"
  215. #define DOC_PYGAMEKEYGETPRESSED "pygame.key.get_pressed(): return bools\nget the state of all keyboard buttons"
  216. #define DOC_PYGAMEKEYGETMODS "pygame.key.get_mods(): return int\ndetermine which modifier keys are being held"
  217. #define DOC_PYGAMEKEYSETMODS "pygame.key.set_mods(int): return None\ntemporarily set which modifier keys are pressed"
  218. #define DOC_PYGAMEKEYSETREPEAT "pygame.key.set_repeat(): return None\npygame.key.set_repeat(delay, interval): return None\ncontrol how held keys are repeated"
  219. #define DOC_PYGAMEKEYGETREPEAT "pygame.key.get_repeat(): return (delay, interval)\nsee how held keys are repeated"
  220. #define DOC_PYGAMEKEYNAME "pygame.key.name(key): return string\nget the name of a key identifier"
  221. #define DOC_PYGAMELOCALS "pygame constants"
  222. #define DOC_PYGAMEMASK "pygame module for image masks."
  223. #define DOC_PYGAMEMASKFROMSURFACE "pygame.mask.from_surface(Surface, threshold = 127) -> Mask\nReturns a Mask from the given surface."
  224. #define DOC_PYGAMEMASKFROMTHRESHOLD "pygame.mask.from_surface(Surface, color, threshold = (0,0,0,255), othersurface = None, palette_colors = 1) -> Mask\nCreates a mask by thresholding Surfaces"
  225. #define DOC_PYGAMEMASKMASK "pygame.Mask((width, height)): return Mask\npygame object for representing 2d bitmasks"
  226. #define DOC_MASKGETSIZE "Mask.get_size() -> width,height\nReturns the size of the mask."
  227. #define DOC_MASKGETAT "Mask.get_at((x,y)) -> int\nReturns nonzero if the bit at (x,y) is set."
  228. #define DOC_MASKSETAT "Mask.set_at((x,y),value)\nSets the position in the mask given by x and y."
  229. #define DOC_MASKOVERLAP "Mask.overlap(othermask, offset) -> x,y\nReturns the point of intersection if the masks overlap with the given offset - or None if it does not overlap."
  230. #define DOC_MASKOVERLAPAREA "Mask.overlap_area(othermask, offset) -> numpixels\nReturns the number of overlapping 'pixels'."
  231. #define DOC_MASKOVERLAPMASK "Mask.overlap_mask(othermask, offset) -> Mask\nReturns a mask of the overlapping pixels"
  232. #define DOC_MASKFILL "Mask.fill()\nSets all bits to 1"
  233. #define DOC_MASKCLEAR "Mask.clear()\nSets all bits to 0"
  234. #define DOC_MASKINVERT "Mask.invert()\nFlips the bits in a Mask"
  235. #define DOC_MASKSCALE "Mask.scale((x, y)) -> Mask\nResizes a mask"
  236. #define DOC_MASKDRAW "Mask.draw(othermask, offset)\nDraws a mask onto another"
  237. #define DOC_MASKERASE "Mask.erase(othermask, offset)\nErases a mask from another"
  238. #define DOC_MASKCOUNT "Mask.count() -> pixels\nReturns the number of set pixels"
  239. #define DOC_MASKCENTROID "Mask.centroid() -> (x, y)\nReturns the centroid of the pixels in a Mask"
  240. #define DOC_MASKANGLE "Mask.angle() -> theta\nReturns the orientation of the pixels"
  241. #define DOC_MASKOUTLINE "Mask.outline(every = 1) -> [(x,y), (x,y) ...]\nlist of points outlining an object"
  242. #define DOC_MASKCONVOLVE "Mask.convolve(othermask, outputmask = None, offset = (0,0)) -> Mask\nReturn the convolution of self with another mask."
  243. #define DOC_MASKCONNECTEDCOMPONENT "Mask.connected_component((x,y) = None) -> Mask\nReturns a mask of a connected region of pixels."
  244. #define DOC_MASKCONNECTEDCOMPONENTS "Mask.connected_components(min = 0) -> [Masks]\nReturns a list of masks of connected regions of pixels."
  245. #define DOC_MASKGETBOUNDINGRECTS "Mask.get_bounding_rects() -> Rects\nReturns a list of bounding rects of regions of set pixels."
  246. #define DOC_PYGAMEMIDI "pygame module for interacting with midi input and output."
  247. #define DOC_PYGAMEMIDIINPUT "Input(device_id)\nInput(device_id, buffer_size)\nInput is used to get midi input from midi devices."
  248. #define DOC_INPUTCLOSE "Input.close(): return None\n closes a midi stream, flushing any pending buffers."
  249. #define DOC_INPUTPOLL "Input.poll(): return Bool\nreturns true if there's data, or false if not."
  250. #define DOC_INPUTREAD "Input.read(num_events): return midi_event_list\nreads num_events midi events from the buffer."
  251. #define DOC_PYGAMEMIDIMIDIEXCEPTION "MidiException(errno)\nexception that pygame.midi functions and classes can raise"
  252. #define DOC_PYGAMEMIDIOUTPUT "Output(device_id)\nOutput(device_id, latency = 0)\nOutput(device_id, buffer_size = 4096)\nOutput(device_id, latency, buffer_size)\nOutput is used to send midi to an output device"
  253. #define DOC_OUTPUTABORT "Output.abort(): return None\n terminates outgoing messages immediately"
  254. #define DOC_OUTPUTCLOSE "Output.close(): return None\n closes a midi stream, flushing any pending buffers."
  255. #define DOC_OUTPUTNOTEOFF "Output.note_off(note, velocity=None, channel = 0)\nturns a midi note off. Note must be on."
  256. #define DOC_OUTPUTNOTEON "Output.note_on(note, velocity=None, channel = 0)\nturns a midi note on. Note must be off."
  257. #define DOC_OUTPUTSETINSTRUMENT "Output.set_instrument(instrument_id, channel = 0)\nselect an instrument, with a value between 0 and 127"
  258. #define DOC_OUTPUTWRITE "Output.write(data)\nwrites a list of midi data to the Output"
  259. #define DOC_OUTPUTWRITESHORT "Output.write_short(status)\nOutput.write_short(status, data1 = 0, data2 = 0)\nwrite_short(status <, data1><, data2>)"
  260. #define DOC_OUTPUTWRITESYSEX "Output.write_sys_ex(when, msg)\nwrites a timestamped system-exclusive midi message."
  261. #define DOC_PYGAMEMIDIGETCOUNT "pygame.midi.get_count(): return num_devices\ngets the number of devices."
  262. #define DOC_PYGAMEMIDIGETDEFAULTINPUTID "pygame.midi.get_default_input_id(): return default_id\ngets default input device number"
  263. #define DOC_PYGAMEMIDIGETDEFAULTOUTPUTID "pygame.midi.get_default_output_id(): return default_id\ngets default output device number"
  264. #define DOC_PYGAMEMIDIGETDEVICEINFO "pygame.midi.get_device_info(an_id): return (interf, name, input, output, opened)\n returns information about a midi device"
  265. #define DOC_PYGAMEMIDIINIT "pygame.midi.init(): return None\ninitialize the midi module"
  266. #define DOC_PYGAMEMIDIMIDIS2EVENTS "pygame.midi.midis2events(midis, device_id): return [Event, ...]\nconverts midi events to pygame events"
  267. #define DOC_PYGAMEMIDIQUIT "pygame.midi.quit(): return None\nuninitialize the midi module"
  268. #define DOC_PYGAMEMIDITIME "pygame.midi.time(): return time\nreturns the current time in ms of the PortMidi timer"
  269. #define DOC_PYGAMEMIXER "pygame module for loading and playing sounds"
  270. #define DOC_PYGAMEMIXERINIT "pygame.mixer.init(frequency=22050, size=-16, channels=2, buffer=4096): return None\ninitialize the mixer module"
  271. #define DOC_PYGAMEMIXERPREINIT "pygame.mixer.pre_init(frequency=22050, size=-16, channels=2, buffersize=4096): return None\npreset the mixer init arguments"
  272. #define DOC_PYGAMEMIXERQUIT "pygame.mixer.quit(): return None\nuninitialize the mixer"
  273. #define DOC_PYGAMEMIXERGETINIT "pygame.mixer.get_init(): return (frequency, format, channels)\ntest if the mixer is initialized"
  274. #define DOC_PYGAMEMIXERSTOP "pygame.mixer.stop(): return None\nstop playback of all sound channels"
  275. #define DOC_PYGAMEMIXERPAUSE "pygame.mixer.pause(): return None\ntemporarily stop playback of all sound channels"
  276. #define DOC_PYGAMEMIXERUNPAUSE "pygame.mixer.unpause(): return None\nresume paused playback of sound channels"
  277. #define DOC_PYGAMEMIXERFADEOUT "pygame.mixer.fadeout(time): return None\nfade out the volume on all sounds before stopping"
  278. #define DOC_PYGAMEMIXERSETNUMCHANNELS "pygame.mixer.set_num_channels(count): return None\nset the total number of playback channels"
  279. #define DOC_PYGAMEMIXERGETNUMCHANNELS "get the total number of playback channels"
  280. #define DOC_PYGAMEMIXERSETRESERVED "pygame.mixer.set_reserved(count): return None\nreserve channels from being automatically used"
  281. #define DOC_PYGAMEMIXERFINDCHANNEL "pygame.mixer.find_channel(force=False): return Channel\nfind an unused channel"
  282. #define DOC_PYGAMEMIXERGETBUSY "pygame.mixer.get_busy(): return bool\ntest if any sound is being mixed"
  283. #define DOC_PYGAMEMIXERSOUND "pygame.mixer.Sound(filename): return Sound\npygame.mixer.Sound(buffer): return Sound\npygame.mixer.Sound(object): return Sound\nCreate a new Sound object from a file"
  284. #define DOC_SOUNDPLAY "Sound.play(loops=0, maxtime=0, fade_ms=0): return Channel\nbegin sound playback"
  285. #define DOC_SOUNDSTOP "Sound.stop(): return None\nstop sound playback"
  286. #define DOC_SOUNDFADEOUT "Sound.fadeout(time): return None\nstop sound playback after fading out"
  287. #define DOC_SOUNDSETVOLUME "Sound.set_volume(value): return None\nset the playback volume for this Sound"
  288. #define DOC_SOUNDGETVOLUME "Sound.get_volume(): return value\nget the playback volume"
  289. #define DOC_SOUNDGETNUMCHANNELS "Sound.get_num_channels(): return count\ncount how many times this Sound is playing"
  290. #define DOC_SOUNDGETLENGTH "Sound.get_length(): return seconds\nget the length of the Sound"
  291. #define DOC_SOUNDGETBUFFER "Sound.get_buffer(): return BufferProxy\nacquires a buffer object for the sameples of the Sound."
  292. #define DOC_PYGAMEMIXERCHANNEL "pygame.mixer.Channel(id): return Channel\nCreate a Channel object for controlling playback"
  293. #define DOC_CHANNELPLAY "Channel.play(Sound, loops=0, maxtime=0, fade_ms=0): return None\nplay a Sound on a specific Channel"
  294. #define DOC_CHANNELSTOP "Channel.stop(): return None\nstop playback on a Channel"
  295. #define DOC_CHANNELPAUSE "Channel.pause(): return None\ntemporarily stop playback of a channel"
  296. #define DOC_CHANNELUNPAUSE "Channel.unpause(): return None\nresume pause playback of a channel"
  297. #define DOC_CHANNELFADEOUT "Channel.fadeout(time): return None\nstop playback after fading channel out"
  298. #define DOC_CHANNELSETVOLUME "Channel.set_volume(value): return None\nChannel.set_volume(left, right): return None\nset the volume of a playing channel"
  299. #define DOC_CHANNELGETVOLUME "Channel.get_volume(): return value\nget the volume of the playing channel"
  300. #define DOC_CHANNELGETBUSY "Channel.get_busy(): return bool\ncheck if the channel is active"
  301. #define DOC_CHANNELGETSOUND "Channel.get_sound(): return Sound\nget the currently playing Sound"
  302. #define DOC_CHANNELQUEUE "Channel.queue(Sound): return None\nqueue a Sound object to follow the current"
  303. #define DOC_CHANNELGETQUEUE "Channel.get_queue(): return Sound\nreturn any Sound that is queued"
  304. #define DOC_CHANNELSETENDEVENT "Channel.set_endevent(): return None\nChannel.set_endevent(type): return None\nhave the channel send an event when playback stops"
  305. #define DOC_CHANNELGETENDEVENT "Channel.get_endevent(): return type\nget the event a channel sends when playback stops"
  306. #define DOC_PYGAMEMOUSE "pygame module to work with the mouse"
  307. #define DOC_PYGAMEMOUSEGETPRESSED "pygame.moouse.get_pressed(): return (button1, button2, button3)\nget the state of the mouse buttons"
  308. #define DOC_PYGAMEMOUSEGETPOS "pygame.mouse.get_pos(): return (x, y)\nget the mouse cursor position"
  309. #define DOC_PYGAMEMOUSEGETREL "pygame.mouse.get_rel(): return (x, y)\nget the amount of mouse movement"
  310. #define DOC_PYGAMEMOUSESETPOS "pygame.mouse.set_pos([x, y]): return None\nset the mouse cursor position"
  311. #define DOC_PYGAMEMOUSESETVISIBLE "pygame.mouse.set_visible(bool): return bool\nhide or show the mouse cursor"
  312. #define DOC_PYGAMEMOUSEGETFOCUSED "pygame.mouse.get_focused(): return bool\ncheck if the display is receiving mouse input"
  313. #define DOC_PYGAMEMOUSESETCURSOR "pygame.mouse.set_cursor(size, hotspot, xormasks, andmasks): return None\nset the image for the system mouse cursor"
  314. #define DOC_PYGAMEMOUSEGETCURSOR "pygame.mouse.get_cursor(): return (size, hotspot, xormasks, andmasks)\nget the image for the system mouse cursor"
  315. #define DOC_PYGAMEMOVIE "pygame module for playback of mpeg video"
  316. #define DOC_PYGAMEMOVIEMOVIE "pygame.movie.Movie(filename): return Movie\npygame.movie.Movie(object): return Movie\nload an mpeg movie file"
  317. #define DOC_MOVIEPLAY "Movie.play(loops=0): return None\nstart playback of a movie"
  318. #define DOC_MOVIESTOP "Movie.stop(): return None\nstop movie playback"
  319. #define DOC_MOVIEPAUSE "Movie.pause(): return None\ntemporarily stop and resume playback"
  320. #define DOC_MOVIESKIP "Movie.skip(seconds): return None\nadvance the movie playback position"
  321. #define DOC_MOVIEREWIND "Movie.rewind(): return None\nrestart the movie playback"
  322. #define DOC_MOVIERENDERFRAME "Movie.render_frame(frame_number): return frame_number\nset the current video frame"
  323. #define DOC_MOVIEGETFRAME "Movie.get_frame(): return frame_number\nget the current video frame"
  324. #define DOC_MOVIEGETTIME "Movie.get_time(): return seconds\nget the current vide playback time"
  325. #define DOC_MOVIEGETBUSY "Movie.get_busy(): return bool\ncheck if the movie is currently playing"
  326. #define DOC_MOVIEGETLENGTH "Movie.get_length(): return seconds\nthe total length of the movie in seconds"
  327. #define DOC_MOVIEGETSIZE "Movie.get_size(): return (width, height)\nget the resolution of the video"
  328. #define DOC_MOVIEHASVIDEO "Movie.get_video(): return bool\ncheck if the movie file contains video"
  329. #define DOC_MOVIEHASAUDIO "Movie.get_audio(): return bool\ncheck if the movie file contains audio"
  330. #define DOC_MOVIESETVOLUME "Movie.set_volume(value): return None\nset the audio playback volume"
  331. #define DOC_MOVIESETDISPLAY "Movie.set_display(Surface, rect=None): return None\nset the video target Surface"
  332. #define DOC_PYGAMEMIXERMUSIC "pygame module for controlling streamed audio"
  333. #define DOC_PYGAMEMIXERMUSICLOAD "pygame.mixer.music.load(filename): return None\npygame.mixer.music.load(object): return None\nLoad a music file for playback"
  334. #define DOC_PYGAMEMIXERMUSICPLAY "pygame.mixer.music.play(loops=0, start=0.0): return None\nStart the playback of the music stream"
  335. #define DOC_PYGAMEMIXERMUSICREWIND "pygame.mixer.music.rewind(): return None\nrestart music"
  336. #define DOC_PYGAMEMIXERMUSICSTOP "pygame.mixer.music.stop(): return None\nstop the music playback"
  337. #define DOC_PYGAMEMIXERMUSICPAUSE "pygame.mixer.music.pause(): return None\ntemporarily stop music playback"
  338. #define DOC_PYGAMEMIXERMUSICUNPAUSE "pygame.mixer.music.unpause(): return None\nresume paused music"
  339. #define DOC_PYGAMEMIXERMUSICFADEOUT "pygame.mixer.music.fadeout(time): return None\nstop music playback after fading out"
  340. #define DOC_PYGAMEMIXERMUSICSETVOLUME "pygame.mixer.music.set_volume(value): return None\nset the music volume"
  341. #define DOC_PYGAMEMIXERMUSICGETVOLUME "pygame.mixer.music.get_volume(): return value\nget the music volume"
  342. #define DOC_PYGAMEMIXERMUSICGETBUSY "pygame.mixer.music.get_busy(): return bool\ncheck if the music stream is playing"
  343. #define DOC_PYGAMEMIXERMUSICGETPOS "pygame.mixer.music.get_pos(): return time\nget the music play time"
  344. #define DOC_PYGAMEMIXERMUSICQUEUE "pygame.mixer.music.queue(filename): return None\nqueue a music file to follow the current"
  345. #define DOC_PYGAMEMIXERMUSICSETENDEVENT "pygame.mixer.music.set_endevent(): return None\npygame.mixer.music.set_endevent(type): return None\nhave the music send an event when playback stops"
  346. #define DOC_PYGAMEMIXERMUSICGETENDEVENT "pygame.mixer.music.get_endevent(): return type\nget the event a channel sends when playback stops"
  347. #define DOC_PYGAMEOVERLAY "pygame.Overlay(format, (width, height)): return Overlay\npygame object for video overlay graphics"
  348. #define DOC_OVERLAYDISPLAY "Overlay.display((y, u, v)): return None\nOverlay.display(): return None\nset the overlay pixel data"
  349. #define DOC_OVERLAYSETLOCATION "Overlay.set_location(rect): return None\ncontrol where the overlay is displayed"
  350. #define DOC_OVERLAYGETHARDWARE "Overlay.get_hardware(rect): return int\ntest if the Overlay is hardware accelerated"
  351. #define DOC_PYGAMEPIXELARRAY "pygame.PixelArray(Surface): return PixelArray\npygame object for direct pixel access of surfaces"
  352. #define DOC_PIXELARRAYSURFACE "PixelArray.surface: Return Surface\nGets the Surface the PixelArray uses."
  353. #define DOC_PIXELARRAYMAKESURFACE "PixelArray.make_surface (): Return Surface\nCreates a new Surface from the current PixelArray."
  354. #define DOC_PIXELARRAYREPLACE "PixelArray.replace (color, repcolor, distance=0, weights=(0.299, 0.587, 0.114)): Return None\nReplaces the passed color in the PixelArray with another one."
  355. #define DOC_PIXELARRAYEXTRACT "PixelArray.extract (color, distance=0, weights=(0.299, 0.587, 0.114)): Return PixelArray\nExtracts the passed color from the PixelArray."
  356. #define DOC_PIXELARRAYCOMPARE "PixelArray.compare (array, distance=0, weights=(0.299, 0.587, 0.114)): Return PixelArray\nCompares the PixelArray with another one."
  357. #define DOC_PYGAMERECT "pygame.Rect(left, top, width, height): return Rect\npygame.Rect((left, top), (width, height)): return Rect\npygame.Rect(object): return Rect\npygame object for storing rectangular coordinates"
  358. #define DOC_RECTCOPY "Rect.copy(): return Rect\ncopy the rectangle"
  359. #define DOC_RECTMOVE "Rect.move(x, y): return Rect\nmoves the rectangle"
  360. #define DOC_RECTMOVEIP "Rect.move_ip(x, y): return None\nmoves the rectangle, in place"
  361. #define DOC_RECTINFLATE "Rect.inflate(x, y): return Rect\ngrow or shrink the rectangle size"
  362. #define DOC_RECTINFLATEIP "Rect.inflate_ip(x, y): return None\ngrow or shrink the rectangle size, in place"
  363. #define DOC_RECTCLAMP "Rect.clamp(Rect): return Rect\nmoves the rectangle inside another"
  364. #define DOC_RECTCLAMPIP "Rect.clamp_ip(Rect): return None\nmoves the rectangle inside another, in place"
  365. #define DOC_RECTCLIP "Rect.clip(Rect): return Rect\ncrops a rectangle inside another"
  366. #define DOC_RECTUNION "Rect.union(Rect): return Rect\njoins two rectangles into one"
  367. #define DOC_RECTUNIONIP "Rect.union_ip(Rect): return None\njoins two rectangles into one, in place"
  368. #define DOC_RECTUNIONALL "Rect.unionall(Rect_sequence): return Rect\nthe union of many rectangles"
  369. #define DOC_RECTUNIONALLIP "Rect.unionall_ip(Rect_sequence): return None\nthe union of many rectangles, in place"
  370. #define DOC_RECTFIT "Rect.fit(Rect): return Rect\nresize and move a rectangle with aspect ratio"
  371. #define DOC_RECTNORMALIZE "Rect.normalize(): return None\ncorrect negative sizes"
  372. #define DOC_RECTCONTAINS "Rect.contains(Rect): return bool\ntest if one rectangle is inside another"
  373. #define DOC_RECTCOLLIDEPOINT "Rect.collidepoint(x, y): return bool\nRect.collidepoint((x,y)): return bool\ntest if a point is inside a rectangle"
  374. #define DOC_RECTCOLLIDERECT "Rect.colliderect(Rect): return bool\ntest if two rectangles overlap"
  375. #define DOC_RECTCOLLIDELIST "Rect.collidelist(list): return index\ntest if one rectangle in a list intersects"
  376. #define DOC_RECTCOLLIDELISTALL "Rect.collidelistall(list): return indices\ntest if all rectangles in a list intersect"
  377. #define DOC_RECTCOLLIDEDICT "Rect.collidedict(dict): return (key, value)\ntest if one rectangle in a dictionary intersects"
  378. #define DOC_RECTCOLLIDEDICTALL "Rect.collidedictall(dict): return [(key, value), ...]\ntest if all rectangles in a dictionary intersect"
  379. #define DOC_PYGAMESCRAP "pygame module for clipboard support."
  380. #define DOC_PYGAMESCRAPINIT "scrap.init () -> None\nInitializes the scrap module."
  381. #define DOC_PYGAMESCRAPGET "scrap.get (type) -> string\nGets the data for the specified type from the clipboard."
  382. #define DOC_PYGAMESCRAPGETTYPES "scrap.get_types () -> list\nGets a list of the available clipboard types."
  383. #define DOC_PYGAMESCRAPPUT "scrap.put(type, data) -> None\nPlaces data into the clipboard."
  384. #define DOC_PYGAMESCRAPCONTAINS "scrap.contains (type) -> bool\nChecks, whether a certain type is available in the clipboard."
  385. #define DOC_PYGAMESCRAPLOST "scrap.lost() -> bool\nChecks whether the clipboard is currently owned by the application."
  386. #define DOC_PYGAMESCRAPSETMODE "scrap.set_mode(mode) -> None\nSets the clipboard access mode."
  387. #define DOC_PYGAMESNDARRAY "pygame module for accessing sound sample data"
  388. #define DOC_PYGAMESNDARRAYARRAY "pygame.sndarray.array(Sound): return array\ncopy Sound samples into an array"
  389. #define DOC_PYGAMESNDARRAYSAMPLES "pygame.sndarray.samples(Sound): return array\nreference Sound samples into an array"
  390. #define DOC_PYGAMESNDARRAYMAKESOUND "pygame.sndarray.make_sound(array): return Sound\nconvert an array into a Sound object"
  391. #define DOC_PYGAMESNDARRAYUSEARRAYTYPE "pygame.sndarray.use_arraytype (arraytype): return None\nSets the array system to be used for sound arrays"
  392. #define DOC_PYGAMESNDARRAYGETARRAYTYPE "pygame.sndarray.get_arraytype (): return str\nGets the currently active array type."
  393. #define DOC_PYGAMESNDARRAYGETARRAYTYPES "pygame.sndarray.get_arraytypes (): return tuple\nGets the array system types currently supported."
  394. #define DOC_PYGAMESPRITE "pygame module with basic game object classes"
  395. #define DOC_PYGAMESPRITESPRITE "pygame.sprite.Sprite(*groups): return Sprite\nsimple base class for visible game objects"
  396. #define DOC_SPRITEUPDATE "Sprite.update(*args):\nmethod to control sprite behavior"
  397. #define DOC_SPRITEADD "Sprite.add(*groups): return None\nadd the sprite to groups"
  398. #define DOC_SPRITEREMOVE "Sprite.remove(*groups): return None\nremove the sprite from groups"
  399. #define DOC_SPRITEKILL "Sprite.kill(): return None\nremove the Sprite from all Groups"
  400. #define DOC_SPRITEALIVE "Sprite.alive(): return bool\ndoes the sprite belong to any groups"
  401. #define DOC_SPRITEGROUPS "Sprite.groups(): return group_list\nlist of Groups that contain this Sprite"
  402. #define DOC_PYGAMESPRITEDIRTYSPRITE "pygame.sprite.DirtySprite(*groups): return DirtySprite\na more featureful subclass of Sprite with more attributes"
  403. #define DOC_ ""
  404. #define DOC_PYGAMESPRITEGROUP "pygame.sprite.Group(*sprites): return Group\ncontainer class for many Sprites"
  405. #define DOC_GROUPSPRITES "Group.sprites(): return sprite_list\nlist of the Sprites this Group contains"
  406. #define DOC_GROUPCOPY "Group.copy(): return Group\nduplicate the Group"
  407. #define DOC_GROUPADD "Group.add(*sprites): return None\nadd Sprites to this Group"
  408. #define DOC_GROUPREMOVE "Group.remove(*sprites): return None\nremove Sprites from the Group"
  409. #define DOC_GROUPHAS "Group.has(*sprites): return None\ntest if a Group contains Sprites"
  410. #define DOC_GROUPUPDATE "Group.update(*args): return None\ncall the update method on contained Sprites"
  411. #define DOC_GROUPDRAW "Group.draw(Surface): return None\nblit the Sprite images"
  412. #define DOC_GROUPCLEAR "Group.clear(Surface_dest, background): return None\ndraw a background over the Sprites"
  413. #define DOC_GROUPEMPTY "Group.empty(): return None\nremove all Sprites"
  414. #define DOC_PYGAMESPRITERENDERUPDATES "pygame.sprite.RenderUpdates(*sprites): return RenderUpdates\nGroup class that tracks dirty updates"
  415. #define DOC_RENDERUPDATESDRAW "RenderUpdates.draw(surface): return Rect_list\nblit the Sprite images and track changed areas"
  416. #define DOC_PYGAMESPRITEORDEREDUPDATES "pygame.sprite.OrderedUpdates(*spites): return OrderedUpdates\nRenderUpdates class that draws Sprites in order of addition"
  417. #define DOC_PYGAMESPRITELAYEREDUPDATES "pygame.sprite.LayeredUpdates(*spites, **kwargs): return LayeredUpdates\nLayeredUpdates Group handles layers, that draws like OrderedUpdates."
  418. #define DOC_LAYEREDUPDATESADD "LayeredUpdates.add(*sprites, **kwargs): return None\nadd a sprite or sequence of sprites to a group"
  419. #define DOC_LAYEREDUPDATESSPRITES "LayeredUpdates.sprites(): return sprites\nreturns a ordered list of sprites (first back, last top)."
  420. #define DOC_LAYEREDUPDATESDRAW "LayeredUpdates.draw(surface): return Rect_list\ndraw all sprites in the right order onto the passed surface."
  421. #define DOC_LAYEREDUPDATESGETSPRITESAT "LayeredUpdates.get_sprites_at(pos): return colliding_sprites\nreturns a list with all sprites at that position."
  422. #define DOC_LAYEREDUPDATESGETSPRITE "LayeredUpdates.get_sprite(idx): return sprite\nreturns the sprite at the index idx from the groups sprites"
  423. #define DOC_LAYEREDUPDATESREMOVESPRITESOFLAYER "LayeredUpdates.remove_sprites_of_layer(layer_nr): return sprites\nremoves all sprites from a layer and returns them as a list."
  424. #define DOC_LAYEREDUPDATESLAYERS "LayeredUpdates.layers(): return layers\nreturns a list of layers defined (unique), sorted from botton up."
  425. #define DOC_LAYEREDUPDATESCHANGELAYER "LayeredUpdates.change_layer(sprite, new_layer): return None\nchanges the layer of the sprite"
  426. #define DOC_LAYEREDUPDATESGETLAYEROFSPRITE "LayeredUpdates.get_layer_of_sprite(sprite): return layer\nreturns the layer that sprite is currently in."
  427. #define DOC_LAYEREDUPDATESGETTOPLAYER "LayeredUpdates.get_top_layer(): return layer\nreturns the top layer"
  428. #define DOC_LAYEREDUPDATESGETBOTTOMLAYER "LayeredUpdates.get_bottom_layer(): return layer\nreturns the bottom layer"
  429. #define DOC_LAYEREDUPDATESMOVETOFRONT "LayeredUpdates.move_to_front(sprite): return None\nbrings the sprite to front layer"
  430. #define DOC_LAYEREDUPDATESMOVETOBACK "LayeredUpdates.move_to_back(sprite): return None\nmoves the sprite to the bottom layer"
  431. #define DOC_LAYEREDUPDATESGETTOPSPRITE "LayeredUpdates.get_top_sprite(): return Sprite\nreturns the topmost sprite"
  432. #define DOC_LAYEREDUPDATESGETSPRITESFROMLAYER "LayeredUpdates.get_sprites_from_layer(layer): return sprites\nreturns all sprites from a layer, ordered by how they where added"
  433. #define DOC_LAYEREDUPDATESSWITCHLAYER "LayeredUpdates.switch_layer(layer1_nr, layer2_nr): return None\nswitches the sprites from layer1 to layer2"
  434. #define DOC_PYGAMESPRITELAYEREDDIRTY "pygame.sprite.LayeredDirty(*spites, **kwargs): return LayeredDirty\nLayeredDirty Group is for DirtySprites. Subclasses LayeredUpdates."
  435. #define DOC_LAYEREDDIRTYDRAW "LayeredDirty.draw(surface, bgd=None): return Rect_list\ndraw all sprites in the right order onto the passed surface."
  436. #define DOC_LAYEREDDIRTYCLEAR "LayeredDirty.clear(surface, bgd): return None\nused to set background"
  437. #define DOC_LAYEREDDIRTYREPAINTRECT "LayeredDirty.repaint_rect(screen_rect): return None\nrepaints the given area"
  438. #define DOC_LAYEREDDIRTYSETCLIP "LayeredDirty.set_clip(screen_rect=None): return None\nclip the area where to draw. Just pass None (default) to reset the clip"
  439. #define DOC_LAYEREDDIRTYGETCLIP "LayeredDirty.get_clip(): return Rect\nclip the area where to draw. Just pass None (default) to reset the clip"
  440. #define DOC_LAYEREDDIRTYCHANGELAYER "change_layer(sprite, new_layer): return None\nchanges the layer of the sprite"
  441. #define DOC_LAYEREDDIRTYSETTIMINGTRESHOLD "set_timing_treshold(time_ms): return None\nsets the treshold in milliseconds"
  442. #define DOC_PYGAMESPRITEGROUPSINGLE "pygame.sprite.GroupSingle(sprite=None): return GroupSingle\nGroup container that holds a single Sprite"
  443. #define DOC_PYGAMESPRITESPRITECOLLIDE "pygame.sprite.spritecollide(sprite, group, dokill, collided = None): return Sprite_list\nfind Sprites in a Group that intersect another Sprite"
  444. #define DOC_PYGAMESPRITECOLLIDERECT "pygame.sprite.collide_rect(left, right): return bool\ncollision detection between two sprites, using rects."
  445. #define DOC_PYGAMESPRITECOLLIDERECTRATIO "pygame.sprite.collide_rect_ratio(ratio): return collided_callable\ncollision detection between two sprites, using rects scaled to a ratio."
  446. #define DOC_PYGAMESPRITECOLLIDECIRCLE "pygame.sprite.collide_circle(left, right): return bool\ncollision detection between two sprites, using circles."
  447. #define DOC_PYGAMESPRITECOLLIDECIRCLERATIO "pygame.sprite.collide_circle_ratio(ratio): return collided_callable\ncollision detection between two sprites, using circles scaled to a ratio."
  448. #define DOC_PYGAMESPRITECOLLIDEMASK "pygame.sprite.collide_mask(SpriteLeft, SpriteRight): return bool\ncollision detection between two sprites, using masks."
  449. #define DOC_PYGAMESPRITEGROUPCOLLIDE "pygame.sprite.groupcollide(group1, group2, dokill1, dokill2): return Sprite_dict\nfind all Sprites that collide between two Groups"
  450. #define DOC_PYGAMESPRITESPRITECOLLIDEANY "pygame.sprite.spritecollideany(sprite, group): return bool\nsimple test if a Sprite intersects anything in a Group"
  451. #define DOC_ ""
  452. #define DOC_PYGAMESURFACE "pygame.Surface((width, height), flags=0, depth=0, masks=None): return Surface\npygame.Surface((width, height), flags=0, Surface): return Surface\npygame object for representing images"
  453. #define DOC_SURFACEBLIT "Surface.blit(source, dest, area=None, special_flags = 0): return Rect\ndraw one image onto another"
  454. #define DOC_SURFACECONVERT "Surface.convert(Surface): return Surface\nSurface.convert(depth, flags=0): return Surface\nSurface.convert(masks, flags=0): return Surface\nSurface.convert(): return Surface\nchange the pixel format of an image"
  455. #define DOC_SURFACECONVERTALPHA "Surface.convert_alpha(Surface): return Surface\nSurface.convert_alpha(): return Surface\nchange the pixel format of an image including per pixel alphas"
  456. #define DOC_SURFACECOPY "Surface.copy(): return Surface\ncreate a new copy of a Surface"
  457. #define DOC_SURFACEFILL "Surface.fill(color, rect=None, special_flags=0): return Rect\nfill Surface with a solid color"
  458. #define DOC_SURFACESCROLL "Surface.scroll(dx=0, dy=0): return None\nShift the surface image in place"
  459. #define DOC_SURFACESETCOLORKEY "Surface.set_colorkey(Color, flags=0): return None\nSurface.set_colorkey(None): return None\nSet the transparent colorkey"
  460. #define DOC_SURFACEGETCOLORKEY "Surface.get_colorkey(): return RGB or None\nGet the current transparent colorkey"
  461. #define DOC_SURFACESETALPHA "Surface.set_alpha(value, flags=0): return None\nSurface.set_alpha(None): return None\nset the alpha value for the full Surface image"
  462. #define DOC_SURFACEGETALPHA "Surface.get_alpha(): return int_value or None\nget the current Surface transparency value"
  463. #define DOC_SURFACELOCK "Surface.lock(): return None\nlock the Surface memory for pixel access"
  464. #define DOC_SURFACEUNLOCK "Surface.unlock(): return None\nunlock the Surface memory from pixel access"
  465. #define DOC_SURFACEMUSTLOCK "Surface.mustlock(): return bool\ntest if the Surface requires locking"
  466. #define DOC_SURFACEGETLOCKED "Surface.get_locked(): return bool\ntest if the Surface is current locked"
  467. #define DOC_SURFACEGETLOCKS "Surface.get_locks(): return tuple\nGets the locks for the Surface"
  468. #define DOC_SURFACEGETAT "Surface.get_at((x, y)): return Color\nget the color value at a single pixel"
  469. #define DOC_SURFACESETAT "Surface.set_at((x, y), Color): return None\nset the color value for a single pixel"
  470. #define DOC_SURFACEGETPALETTE "Surface.get_palette(): return [RGB, RGB, RGB, ...]\nget the color index palette for an 8bit Surface"
  471. #define DOC_SURFACEGETPALETTEAT "Surface.get_palette_at(index): return RGB\nget the color for a single entry in a palette"
  472. #define DOC_SURFACESETPALETTE "Surface.set_palette([RGB, RGB, RGB, ...]): return None\nset the color palette for an 8bit Surface"
  473. #define DOC_SURFACESETPALETTEAT "Surface.set_at(index, RGB): return None\nset the color for a single index in an 8bit Surface palette"
  474. #define DOC_SURFACEMAPRGB "Surface.map_rgb(Color): return mapped_int\nconvert a color into a mapped color value"
  475. #define DOC_SURFACEUNMAPRGB "Surface.map_rgb(mapped_int): return Color\nconvert a mapped integer color value into a Color"
  476. #define DOC_SURFACESETCLIP "Surface.set_clip(rect): return None\nSurface.set_clip(None): return None\nset the current clipping area of the Surface"
  477. #define DOC_SURFACEGETCLIP "Surface.get_clip(): return Rect\nget the current clipping area of the Surface"
  478. #define DOC_SURFACESUBSURFACE "Surface.subsurface(Rect): return Surface\ncreate a new surface that references its parent"
  479. #define DOC_SURFACEGETPARENT "Surface.get_parent(): return Surface\nfind the parent of a subsurface"
  480. #define DOC_SURFACEGETABSPARENT "Surface.get_abs_parent(): return Surface\nfind the top level parent of a subsurface"
  481. #define DOC_SURFACEGETOFFSET "Surface.get_offset(): return (x, y)\nfind the position of a child subsurface inside a parent"
  482. #define DOC_SURFACEGETABSOFFSET "Surface.get_abs_offset(): return (x, y)\nfind the absolute position of a child subsurface inside its top level parent"
  483. #define DOC_SURFACEGETSIZE "Surface.get_size(): return (width, height)\nget the dimensions of the Surface"
  484. #define DOC_SURFACEGETWIDTH "Surface.get_width(): return width\nget the width of the Surface"
  485. #define DOC_SURFACEGETHEIGHT "Surface.get_height(): return height\nget the height of the Surface"
  486. #define DOC_SURFACEGETRECT "Surface.get_rect(**kwargs): return Rect\nget the rectangular area of the Surface"
  487. #define DOC_SURFACEGETBITSIZE "Surface.get_bitsize(): return int\nget the bit depth of the Surface pixel format"
  488. #define DOC_SURFACEGETBYTESIZE "Surface.get_bytesize(): return int\nget the bytes used per Surface pixel"
  489. #define DOC_SURFACEGETFLAGS "Surface.get_flags(): return int\nget the additional flags used for the Surface"
  490. #define DOC_SURFACEGETPITCH "Surface.get_pitch(): return int\nget the number of bytes used per Surface row"
  491. #define DOC_SURFACEGETMASKS "Surface.get_masks(): return (R, G, B, A)\nthe bitmasks needed to convert between a color and a mapped integer"
  492. #define DOC_SURFACESETMASKS "Surface.set_masks((r,g,b,a)): return None\nset the bitmasks needed to convert between a color and a mapped integer"
  493. #define DOC_SURFACEGETSHIFTS "Surface.get_shifts(): return (R, G, B, A)\nthe bit shifts needed to convert between a color and a mapped integer"
  494. #define DOC_SURFACESETSHIFTS "Surface.get_shifts((r,g,b,a)): return None\nsets the bit shifts needed to convert between a color and a mapped integer"
  495. #define DOC_SURFACEGETLOSSES "Surface.get_losses(): return (R, G, B, A)\nthe significant bits used to convert between a color and a mapped integer"
  496. #define DOC_SURFACEGETBOUNDINGRECT "Surface.get_bounding_rect(min_alpha = 1): return Rect\nfind the smallest rect containing data"
  497. #define DOC_SURFACEGETBUFFER "Surface.get_buffer(): return BufferProxy\nacquires a buffer object for the pixels of the Surface."
  498. #define DOC_PYGAMESURFARRAY "pygame module for accessing surface pixel data using array interfaces"
  499. #define DOC_PYGAMESURFARRAYARRAY2D "pygame.surfarray.array2d(Surface): return array\nCopy pixels into a 2d array"
  500. #define DOC_PYGAMESURFARRAYPIXELS2D "pygame.surfarray.pixels2d(Surface): return array\nReference pixels into a 2d array"
  501. #define DOC_PYGAMESURFARRAYARRAY3D "pygame.surfarray.array3d(Surface): return array\nCopy pixels into a 3d array"
  502. #define DOC_PYGAMESURFARRAYPIXELS3D "pygame.surfarray.pixels3d(Surface): return array\nReference pixels into a 3d array"
  503. #define DOC_PYGAMESURFARRAYARRAYALPHA "pygame.surfarray.array_alpha(Surface): return array\nCopy pixel alphas into a 2d array"
  504. #define DOC_PYGAMESURFARRAYPIXELSALPHA "pygame.surfarray.pixels_alpha(Surface): return array\nReference pixel alphas into a 2d array"
  505. #define DOC_PYGAMESURFARRAYARRAYCOLORKEY "pygame.surfarray.array_colorkey(Surface): return array\nCopy the colorkey values into a 2d array"
  506. #define DOC_PYGAMESURFARRAYMAKESURFACE "pygame.surfarray.make_surface(array): return Surface\nCopy an array to a new surface"
  507. #define DOC_PYGAMESURFARRAYBLITARRAY "pygame.surfarray.blit_array(Surface, array): return None\nBlit directly from a array values"
  508. #define DOC_PYGAMESURFARRAYMAPARRAY "pygame.surfarray.map_array(Surface, array3d): return array2d\nMap a 3d array into a 2d array"
  509. #define DOC_PYGAMESURFARRAYUSEARRAYTYPE "pygame.surfarray.use_arraytype (arraytype): return None\nSets the array system to be used for surface arrays"
  510. #define DOC_PYGAMESURFARRAYGETARRAYTYPE "pygame.surfarray.get_arraytype (): return str\nGets the currently active array type."
  511. #define DOC_PYGAMESURFARRAYGETARRAYTYPES "pygame.surfarray.get_arraytypes (): return tuple\nGets the array system types currently supported."
  512. #define DOC_PYGAMETESTS "Pygame unit test suite package"
  513. #define DOC_PYGAMETESTSRUN "pygame.tests.run(*args, **kwds): return tuple\nRun the Pygame unit test suite"
  514. #define DOC_PYGAMETIME "pygame module for monitoring time"
  515. #define DOC_PYGAMETIMEGETTICKS "pygame.time.get_ticks(): return milliseconds\nget the time in milliseconds"
  516. #define DOC_PYGAMETIMEWAIT "pygame.time.wait(milliseconds): return time\npause the program for an amount of time"
  517. #define DOC_PYGAMETIMEDELAY "pygame.time.delay(milliseconds): return time\npause the program for an amount of time"
  518. #define DOC_PYGAMETIMESETTIMER "pygame.time.set_timer(eventid, milliseconds): return None\nrepeatedly create an event on the event queue"
  519. #define DOC_PYGAMETIMECLOCK "pygame.time.Clock(): return Clock\ncreate an object to help track time"
  520. #define DOC_CLOCKTICK "Clock.tick(framerate=0): return milliseconds\ncontrol timer events\nupdate the clock"
  521. #define DOC_CLOCKTICKBUSYLOOP "Clock.tick_busy_loop(framerate=0): return milliseconds\ncontrol timer events\nupdate the clock"
  522. #define DOC_CLOCKGETTIME "Clock.get_time(): return milliseconds\ntime used in the previous tick"
  523. #define DOC_CLOCKGETRAWTIME "Clock.get_rawtime(): return milliseconds\nactual time used in the previous tick"
  524. #define DOC_CLOCKGETFPS "Clock.get_fps(): return float\ncompute the clock framerate"
  525. #define DOC_PYGAMETRANSFORM "pygame module to transform surfaces"
  526. #define DOC_PYGAMETRANSFORMFLIP "pygame.transform.flip(Surface, xbool, ybool): return Surface\nflip vertically and horizontally"
  527. #define DOC_PYGAMETRANSFORMSCALE "pygame.transform.scale(Surface, (width, height), DestSurface = None): return Surface\nresize to new resolution"
  528. #define DOC_PYGAMETRANSFORMROTATE "pygame.transform.rotate(Surface, angle): return Surface\nrotate an image"
  529. #define DOC_PYGAMETRANSFORMROTOZOOM "pygame.transform.rotozoom(Surface, angle, scale): return Surface\nfiltered scale and rotation"
  530. #define DOC_PYGAMETRANSFORMSCALE2X "pygame.transform.scale2x(Surface, DestSurface = None): Surface\nspecialized image doubler"
  531. #define DOC_PYGAMETRANSFORMSMOOTHSCALE "pygame.transform.smoothscale(Surface, (width, height), DestSurface = None): return Surface\nscale a surface to an arbitrary size smoothly"
  532. #define DOC_PYGAMETRANSFORMGETSMOOTHSCALEBACKEND "pygame.transform.get_smoothscale_backend(): return String\nreturn smoothscale filter version in use: 'GENERIC', 'MMX', or 'SSE'"
  533. #define DOC_PYGAMETRANSFORMSETSMOOTHSCALEBACKEND "pygame.transform.get_smoothscale_backend(type): return None\nset smoothscale filter version to one of: 'GENERIC', 'MMX', or 'SSE'"
  534. #define DOC_PYGAMETRANSFORMCHOP "pygame.transform.chop(Surface, rect): return Surface\ngets a copy of an image with an interior area removed"
  535. #define DOC_PYGAMETRANSFORMLAPLACIAN "pygame.transform.laplacian(Surface, DestSurface = None): return Surface\nfind edges in a surface"
  536. #define DOC_PYGAMETRANSFORMAVERAGESURFACES "pygame.transform.average_surfaces(Surfaces, DestSurface = None, palette_colors = 1): return Surface\nfind the average surface from many surfaces."
  537. #define DOC_PYGAMETRANSFORMAVERAGECOLOR "pygame.transform.average_color(Surface, Rect = None): return Color\nfinds the average color of a surface"
  538. #define DOC_PYGAMETRANSFORMTHRESHOLD "pygame.transform.threshold(DestSurface, Surface, color, threshold = (0,0,0,0), diff_color = (0,0,0,0), change_return = 1, Surface = None, inverse = False): return num_threshold_pixels\nfinds which, and how many pixels in a surface are within a threshold of a color."
  539. /* Docs in a comments... slightly easier to read. */
  540. /*
  541. pygame
  542. the top level pygame package
  543. pygame.init
  544. pygame.init(): return (numpass, numfail)
  545. initialize all imported pygame modules
  546. pygame.quit
  547. pygame.quit(): return None
  548. uninitialize all pygame modules
  549. pygame.error
  550. raise pygame.error, message
  551. standard pygame exception
  552. pygame.get_error
  553. pygame.get_error(): return errorstr
  554. get the current error message
  555. pygame.set_error
  556. pygame.set_error(error_msg): return None
  557. set the current error message
  558. pygame.get_sdl_version
  559. pygame.get_sdl_version(): return major, minor, patch
  560. get the version number of SDL
  561. pygame.get_sdl_byteorder
  562. pygame.get_sdl_byteorder(): return int
  563. get the byte order of SDL
  564. pygame.register_quit
  565. register_quit(callable): return None
  566. register a function to be called when pygame quits
  567. pygame.version
  568. module pygame.version
  569. small module containing version information
  570. pygame.version.ver
  571. pygame.version.ver = '1.2'
  572. version number as a string
  573. pygame.version.vernum
  574. pygame.version.vernum = (1, 5, 3)
  575. tupled integers of the version
  576. pygame.camera
  577. pygame module for camera use
  578. pygame.camera.colorspace
  579. pygame.camera.colorspace(Surface, format, DestSurface = None): return Surface
  580. Surface colorspace conversion
  581. pygame.camera.list_cameras
  582. pygame.camera.list_cameras(): return [cameras]
  583. returns a list of available cameras
  584. pygame.camera.Camera
  585. pygame.camera.Camera(device, (width, height), format): return Camera
  586. load a camera
  587. Camera.start
  588. Camera.start(): return None
  589. opens, initializes, and starts capturing
  590. Camera.stop
  591. Camera.stop(): return None
  592. stops, uninitializes, and closes the camera
  593. Camera.get_controls
  594. Camera.get_controls(): return (hflip = bool, vflip = bool, brightness)
  595. gets current values of user controls
  596. Camera.set_controls
  597. Camera.set_controls(hflip = bool, vflip = bool, brightness): return (hflip = bool, vflip = bool, brightness)
  598. changes camera settings if supported by the camera
  599. Camera.get_size
  600. Camera.get_size(): return (width, height)
  601. returns the dimensions of the images being recorded
  602. Camera.query_image
  603. Camera.query_image(): return bool
  604. checks if a frame is ready
  605. Camera.get_image
  606. Camera.get_image(Surface = None): return Surface
  607. captures an image as a Surface
  608. Camera.get_raw
  609. Camera.get_raw(): return string
  610. returns an unmodified image as a string
  611. pygame.cdrom
  612. pygame module for audio cdrom control
  613. pygame.cdrom.init
  614. pygame.cdrom.init(): return None
  615. initialize the cdrom module
  616. pygame.cdrom.quit
  617. pygame.cdrom.quit(): return None
  618. uninitialize the cdrom module
  619. pygame.cdrom.get_init
  620. pygame.cdrom.get_init(): return bool
  621. true if the cdrom module is initialized
  622. pygame.cdrom.get_count
  623. pygame.cdrom.get_count(): return count
  624. number of cd drives on the system
  625. pygame.cdrom.CD
  626. pygame.cdrom.CD(id): return CD
  627. class to manage a cdrom drive
  628. CD.init
  629. CD.init(): return None
  630. initialize a cdrom drive for use
  631. CD.quit
  632. CD.quit(): return None
  633. uninitialize a cdrom drive for use
  634. CD.get_init
  635. CD.get_init(): return bool
  636. true if this cd device initialized
  637. CD.play
  638. CD.play(track, start=None, end=None): return None
  639. start playing audio
  640. CD.stop
  641. CD.stop(): return None
  642. stop audio playback
  643. CD.pause
  644. CD.pause(): return None
  645. temporarily stop audio playback
  646. CD.resume
  647. CD.resume(): return None
  648. unpause audio playback
  649. CD.eject
  650. CD.eject(): return None
  651. eject or open the cdrom drive
  652. CD.get_id
  653. CD.get_id(): return id
  654. the index of the cdrom drive
  655. CD.get_name
  656. CD.get_name(): return name
  657. the system name of the cdrom drive
  658. CD.get_busy
  659. CD.get_busy(): return bool
  660. true if the drive is playing audio
  661. CD.get_paused
  662. CD.get_paused(): return bool
  663. true if the drive is paused
  664. CD.get_current
  665. CD.get_current(): return track, seconds
  666. the current audio playback position
  667. CD.get_empty
  668. CD.get_empty(): return bool
  669. False if a cdrom is in the drive
  670. CD.get_numtracks
  671. CD.get_numtracks(): return count
  672. the number of tracks on the cdrom
  673. CD.get_track_audio
  674. CD.get_track_audio(track): return bool
  675. true if the cdrom track has audio data
  676. CD.get_all
  677. CD.get_all(): return [(audio, start, end, lenth), ...]
  678. get all track information
  679. CD.get_track_start
  680. CD.get_track_start(track): return seconds
  681. start time of a cdrom track
  682. CD.get_track_length
  683. CD.get_track_length(track): return seconds
  684. length of a cdrom track
  685. pygame.Color
  686. pygame.Color(name): Return Color
  687. pygame.Color(r, g, b, a): Return Color
  688. pygame.Color(rgbvalue): Return Color
  689. pygame object for color representations
  690. Color.r
  691. Color.r: Return int
  692. Gets or sets the red value of the Color.
  693. Color.g
  694. Color.g: Return int
  695. Gets or sets the green value of the Color.
  696. Color.b
  697. Color.b: Return int
  698. Gets or sets the blue value of the Color.
  699. Color.a
  700. Color.a: Return int
  701. Gets or sets the alpha value of the Color.
  702. Color.cmy
  703. Color.cmy: Return tuple
  704. Gets or sets the CMY representation of the Color.
  705. Color.hsva
  706. Color.hsva: Return tuple
  707. Gets or sets the HSVA representation of the Color.
  708. Color.hsla
  709. Color.hsla: Return tuple
  710. Gets or sets the HSLA representation of the Color.
  711. Color.i1i2i3
  712. Color.i1i2i3: Return tuple
  713. Gets or sets the I1I2I3 representation of the Color.
  714. Color.normalize
  715. Color.normalize(): Return tuple
  716. Returns the normalized RGBA values of the Color.
  717. Color.correct_gamma
  718. Color.correct_gamma (gamma): Return Color
  719. Applies a certain gamma value to the Color.
  720. Color.set_length
  721. Color.set_length(len)
  722. Set the number of elements in the Color to 1,2,3, or 4.
  723. pygame.cursors
  724. pygame module for cursor resources
  725. pygame.cursors.compile
  726. pygame.cursor.compile(strings, black='X', white='.', xor='o'): return data, mask
  727. create binary cursor data from simple strings
  728. pygame.cursors.load_xbm
  729. pygame.cursors.load_xbm(cursorfile): return cursor_args
  730. pygame.cursors.load_xbm(cursorfile, maskfile): return cursor_args
  731. load cursor data from an xbm file
  732. pygame.display
  733. pygame module to control the display window and screen
  734. pygame.display.init
  735. pygame.display.init(): return None
  736. initialize the display module
  737. pygame.display.quit
  738. pygame.display.quit(): return None
  739. uninitialize the display module
  740. pygame.display.get_init
  741. pygame.display.get_init(): return bool
  742. true if the display module is initialized
  743. pygame.display.set_mode
  744. pygame.display.set_mode(resolution=(0,0), flags=0, depth=0): return Surface
  745. initialize a window or screen for display
  746. pygame.display.get_surface
  747. pygame.display.get_surface(): return Surface
  748. get a reference to the currently set display surface
  749. pygame.display.flip
  750. pygame.display.flip(): return None
  751. update the full display Surface to the screen
  752. pygame.display.update
  753. pygame.display.update(rectangle=None): return None
  754. pygame.display.update(rectangle_list): return None
  755. update portions of the screen for software displays
  756. pygame.display.get_driver
  757. pygame.display.get_driver(): return name
  758. get the name of the pygame display backend
  759. pygame.display.Info
  760. pygame.display.Info(): return VideoInfo
  761. Create a video display information object
  762. pygame.display.get_wm_info
  763. pygame.display.get_wm_info(): return dict
  764. Get information about the current windowing system
  765. pygame.display.list_modes
  766. pygame.display.list_modes(depth=0, flags=pygame.FULLSCREEN): return list
  767. get list of available fullscreen modes
  768. pygame.display.mode_ok
  769. pygame.display.mode_ok(size, flags=0, depth=0): return depth
  770. pick the best color depth for a display mode
  771. pygame.display.gl_get_attribute
  772. pygame.display.gl_get_attribute(flag): return value
  773. get the value for an opengl flag for the current display
  774. pygame.display.gl_set_attribute
  775. pygame.display.gl_set_attribute(flag, value): return None
  776. request an opengl display attribute for the display mode
  777. pygame.display.get_active
  778. pygame.display.get_active(): return bool
  779. true when the display is active on the display
  780. pygame.display.iconify
  781. pygame.display.iconify(): return bool
  782. iconify the display surface
  783. pygame.display.toggle_fullscreen
  784. pygame.display.toggle_fullscreen(): return bool
  785. switch between fullscreen and windowed displays
  786. pygame.display.set_gamma
  787. pygame.display.set_gamma(red, green=None, blue=None): return bool
  788. change the hardware gamma ramps
  789. pygame.display.set_gamma_ramp
  790. change the hardware gamma ramps with a custom lookup
  791. pygame.display.set_gamma_ramp(red, green, blue): return bool
  792. set_gamma_ramp(red, green, blue): return bool
  793. pygame.display.set_icon
  794. pygame.display.set_icon(Surface): return None
  795. change the system image for the display window
  796. pygame.display.set_caption
  797. pygame.display.set_caption(title, icontitle=None): return None
  798. set the current window caption
  799. pygame.display.get_caption
  800. pygame.display.get_caption(): return (title, icontitle)
  801. get the current window caption
  802. pygame.display.set_palette
  803. pygame.display.set_palette(palette=None): return None
  804. set the display color palette for indexed displays
  805. pygame.draw
  806. pygame module for drawing shapes
  807. pygame.draw.rect
  808. pygame.draw.rect(Surface, color, Rect, width=0): return Rect
  809. draw a rectangle shape
  810. pygame.draw.polygon
  811. pygame.draw.polygon(Surface, color, pointlist, width=0): return Rect
  812. draw a shape with any number of sides
  813. pygame.draw.circle
  814. pygame.draw.circle(Surface, color, pos, radius, width=0): return Rect
  815. draw a circle around a point
  816. pygame.draw.ellipse
  817. pygame.draw.ellipse(Surface, color, Rect, width=0): return Rect
  818. draw a round shape inside a rectangle
  819. pygame.draw.arc
  820. pygame.draw.arc(Surface, color, Rect, start_angle, stop_angle, width=1): return Rect
  821. draw a partial section of an ellipse
  822. pygame.draw.line
  823. pygame.draw.line(Surface, color, start_pos, end_pos, width=1): return Rect
  824. draw a straight line segment
  825. pygame.draw.lines
  826. pygame.draw.lines(Surface, color, closed, pointlist, width=1): return Rect
  827. draw multiple contiguous line segments
  828. pygame.draw.aaline
  829. pygame.draw.aaline(Surface, color, startpos, endpos, blend=1): return Rect
  830. draw fine antialiased lines
  831. pygame.draw.aalines
  832. pygame.draw.aalines(Surface, color, closed, pointlist, blend=1): return Rect
  833. pygame.event
  834. pygame module for interacting with events and queues
  835. pygame.event.pump
  836. pygame.event.pump(): return None
  837. internally process pygame event handlers
  838. pygame.event.get
  839. pygame.event.get(): return Eventlist
  840. pygame.event.get(type): return Eventlist
  841. pygame.event.get(typelist): return Eventlist
  842. get events from the queue
  843. pygame.event.poll
  844. pygame.event.poll(): return Event
  845. get a single event from the queue
  846. pygame.event.wait
  847. pygame.event.wait(): return Event
  848. wait for a single event from the queue
  849. pygame.event.peek
  850. pygame.event.peek(type): return bool
  851. pygame.event.peek(typelist): return bool
  852. test if event types are waiting on the queue
  853. pygame.event.clear
  854. pygame.event.clear(): return None
  855. pygame.event.clear(type): return None
  856. pygame.event.clear(typelist): return None
  857. remove all events from the queue
  858. pygame.event.event_name
  859. pygame.event.event_name(type): return string
  860. get the string name from and event id
  861. pygame.event.set_blocked
  862. pygame.event.set_blocked(type): return None
  863. pygame.event.set_blocked(typelist): return None
  864. pygame.event.set_blocked(None): return None
  865. control which events are allowed on the queue
  866. pygame.event.set_allowed
  867. pygame.event.set_allowed(type): return None
  868. pygame.event.set_allowed(typelist): return None
  869. pygame.event.set_allowed(None): return None
  870. control which events are allowed on the queue
  871. pygame.event.get_blocked
  872. pygame.event.get_blocked(type): return bool
  873. test if a type of event is blocked from the queue
  874. pygame.event.set_grab
  875. pygame.event.set_grab(bool): return None
  876. control the sharing of input devices with other applications
  877. pygame.event.get_grab
  878. pygame.event.get_grab(): return bool
  879. test if the program is sharing input devices
  880. pygame.event.post
  881. pygame.event.post(Event): return None
  882. place a new event on the queue
  883. pygame.event.Event
  884. pygame.event.Event(type, dict): return Event
  885. pygame.event.Event(type, **attributes): return Event
  886. create a new event object
  887. pygame.examples
  888. module of example programs
  889. pygame.examples.aliens.main
  890. pygame.aliens.main(): return None
  891. play the full aliens example
  892. pygame.examples.oldalien.main
  893. pygame.examples.oldalien.main(): return None
  894. play the original aliens example
  895. pygame.examples.stars.main
  896. pygame.examples.stars.main(): return None
  897. run a simple starfield example
  898. pygame.examples.chimp.main
  899. pygame.examples.chimp.main(): return None
  900. hit the moving chimp
  901. pygame.examples.moveit.main
  902. pygame.examples.moveit.main(): return None
  903. display animated objects on the screen
  904. pygame.examples.fonty.main
  905. pygame.examples.fonty.main(): return None
  906. run a font rendering example
  907. pygame.examples.vgrade.main
  908. pygame.examples.vgrade.main(): return None
  909. display a vertical gradient
  910. pygame.examples.eventlist.main
  911. pygame.examples.eventlist.main(): return None
  912. display pygame events
  913. pygame.examples.arraydemo.main
  914. pygame.examples.arraydemo.main(arraytype=None): return None
  915. show various surfarray effects
  916. pygame.examples.sound.main
  917. pygame.examples.sound.main(file_path=None): return None
  918. load and play a sound
  919. pygame.examples.sound_array_demos.main
  920. pygame.examples.sound_array_demos.main(arraytype=None): return None
  921. play various sndarray effects
  922. pygame.examples.liquid.main
  923. pygame.examples.liquid.main(): return None
  924. display an animated liquid effect
  925. pygame.examples.glcube.main
  926. pygame.examples.glcube.main(): return None
  927. display an animated 3D cube using OpenGL
  928. pygame.examples.scrap_clipboard.main
  929. pygame.examples.scrap_clipboard.main(): return None
  930. access the clipboard
  931. pygame.examples.mask.main
  932. pygame.examples.mask.main(*args): return None
  933. display multiple images bounce off each other using collision detection
  934. pygame.examples.testsprite.main
  935. pygame.examples.testsprite.main(update_rects = True, use_static = False, use_FastRenderGroup = False, screen_dims = [640, 480], use_alpha = False, flags = 0): return None
  936. show lots of sprites moving around
  937. pygame.examples.headless_no_windows_needed.main
  938. pygame.examples.headless_no_windows_needed.main(fin, fout, w, h): return None
  939. write an image file that is smoothscaled copy of an input file
  940. pygame.examples.fastevents.main
  941. pygame.examples.fastevents.main(): return None
  942. stress test the fastevents module
  943. pygame.examples.overlay.main
  944. pygame.examples.overlay.main(fname): return None
  945. play a .pgm video using overlays
  946. pygame.examples.blend_fill.main
  947. pygame.examples.blend_fill.main(): return None
  948. demonstrate the various surface.fill method blend options
  949. pygame.examples.cursors.main
  950. pygame.examples.cursors.main(): return None
  951. display two different custom cursors
  952. pygame.examples.pixelarray.main
  953. pygame.examples.pixelarray.main(): return None
  954. display various pixelarray generated effects
  955. pygame.examples.scaletest.main
  956. pygame.examples.scaletest.main(imagefile, convert_alpha=False, run_speed_test=True): return None
  957. interactively scale an image using smoothscale
  958. pygame.examples.midi.main
  959. pygame.examples.midi.main(mode='output', device_id=None): return None
  960. run a midi example
  961. pygame.examples.scroll.main
  962. pygame.examples.scroll.main(image_file=None): return None
  963. run a Surface.scroll example that shows a magnified image
  964. pygame.examples.movieplayer.main
  965. pygame.examples.moveplayer.main(filepath): return None
  966. play an MPEG movie
  967. pygame.font
  968. pygame module for loading and rendering fonts
  969. pygame.font.init
  970. pygame.font.init(): return None
  971. initialize the font module
  972. pygame.font.quit
  973. pygame.font.quit(): return None
  974. uninitialize the font module
  975. pygame.font.get_init
  976. pygame.font.get_init(): return bool
  977. true if the font module is initialized
  978. pygame.font.get_default_font
  979. pygame.font.get_default_font(): return string
  980. get the filename of the default font
  981. pygame.font.get_fonts
  982. pygame.font.get_fonts(): return list of strings
  983. get all available fonts
  984. pygame.font.match_font
  985. pygame.font.match_font(name, bold=False, italic=False): return path
  986. find a specific font on the system
  987. pygame.font.SysFont
  988. pygame.font.SysFont(name, size, bold=False, italic=False): return Font
  989. create a Font object from the system fonts
  990. pygame.font.Font
  991. pygame.font.Font(filename, size): return Font
  992. pygame.font.Font(object, size): return Font
  993. create a new Font object from a file
  994. Font.render
  995. Font.render(text, antialias, color, background=None): return Surface
  996. draw text on a new Surface
  997. Font.size
  998. Font.size(text): return (width, height)
  999. determine the amount of space needed to render text
  1000. Font.set_underline
  1001. Font.set_underline(bool): return None
  1002. control if text is rendered with an underline
  1003. Font.get_underline
  1004. Font.get_underline(): return bool
  1005. check if text will be rendered with an underline
  1006. Font.set_bold
  1007. Font.set_bold(bool): return None
  1008. enable fake rendering of bold text
  1009. Font.get_bold
  1010. Font.get_bold(): return bool
  1011. check if text will be rendered bold
  1012. Font.set_italic
  1013. Font.set_bold(bool): return None
  1014. enable fake rendering of italic text
  1015. Font.metrics
  1016. Font.metrics(text): return list
  1017. Gets the metrics for each character in the pased string.
  1018. Font.get_italic
  1019. Font.get_italic(): return bool
  1020. check if the text will be rendered italic
  1021. Font.get_linesize
  1022. Font.get_linesize(): return int
  1023. get the line space of the font text
  1024. Font.get_height
  1025. Font.get_height(): return int
  1026. get the height of the font
  1027. Font.get_ascent
  1028. Font.get_ascent(): return int
  1029. get the ascent of the font
  1030. Font.get_descent
  1031. Font.get_descent(): return int
  1032. get the descent of the font
  1033. pygame.gfxdraw
  1034. pygame module for drawing shapes
  1035. pygame.gfxdraw.pixel
  1036. pygame.gfxdraw.pixel(surface, x, y, color): return None
  1037. place a pixel
  1038. pygame.gfxdraw.hline
  1039. pygame.gfxdraw.hline(surface, x1, x2, y, color): return None
  1040. draw a horizontal line
  1041. pygame.gfxdraw.vline
  1042. pgyame.gfxdraw.vline(surface, x, y1, y2, color): return None
  1043. draw a vertical line
  1044. pygame.gfxdraw.rectangle
  1045. pgyame.gfxdraw.rectangle(surface, rect, color): return None
  1046. draw a rectangle
  1047. pygame.gfxdraw.box
  1048. pgyame.gfxdraw.box(surface, rect, color): return None
  1049. draw a box
  1050. pygame.gfxdraw.line
  1051. pgyame.gfxdraw.line(surface, x1, y1, x2, y2, color): return None
  1052. draw a line
  1053. pygame.gfxdraw.circle
  1054. pgyame.gfxdraw.circle(surface, x, y, r, color): return None
  1055. draw a circle
  1056. pygame.gfxdraw.arc
  1057. pgyame.gfxdraw.arc(surface, x, y, r, start, end, color): return None
  1058. draw an arc
  1059. pygame.gfxdraw.aacircle
  1060. pgyame.gfxdraw.aacircle(surface, x, y, r, color): return None
  1061. draw an anti-aliased circle
  1062. pygame.gfxdraw.filled_circle
  1063. pgyame.gfxdraw.filled_circle(surface, x, y, r, color): return None
  1064. draw a filled circle
  1065. pygame.gfxdraw.ellipse
  1066. pgyame.gfxdraw.ellipse(surface, x, y, rx, ry, color): return None
  1067. draw an ellipse
  1068. pygame.gfxdraw.aaellipse
  1069. pgyame.gfxdraw.aaellipse(surface, x, y, rx, ry, color): return None
  1070. draw an anti-aliased ellipse
  1071. pygame.gfxdraw.filled_ellipse
  1072. pgyame.gfxdraw.filled_ellipse(surface, x, y, rx, ry, color): return None
  1073. draw a filled ellipse
  1074. pygame.gfxdraw.pie
  1075. pgyame.gfxdraw.pie(surface, x, y, r, start, end, color): return None
  1076. draw a pie
  1077. pygame.gfxdraw.trigon
  1078. pgyame.gfxdraw.trigon(surface, x1, y1, x2, y2, x3, y3, color): return None
  1079. draw a triangle
  1080. pygame.gfxdraw.aatrigon
  1081. pgyame.gfxdraw.aatrigon(surface, x1, y1, x2, y2, x3, y3, color): return None
  1082. draw an anti-aliased triangle
  1083. pygame.gfxdraw.filled_trigon
  1084. pgyame.gfxdraw.filled_trigon(surface, x1, y1, x3, y2, x3, y3, color): return None
  1085. draw a filled trigon
  1086. pygame.gfxdraw.polygon
  1087. pgyame.gfxdraw.polygon(surface, points, color): return None
  1088. draw a polygon
  1089. pygame.gfxdraw.aapolygon
  1090. pgyame.gfxdraw.aapolygon(surface, points, color): return None
  1091. draw an anti-aliased polygon
  1092. pygame.gfxdraw.filled_polygon
  1093. pgyame.gfxdraw.filled_polygon(surface, points, color): return None
  1094. draw a filled polygon
  1095. pygame.gfxdraw.textured_polygon
  1096. pgyame.gfxdraw.textured_polygon(surface, points, texture, tx, ty): return None
  1097. draw a textured polygon
  1098. pygame.gfxdraw.bezier
  1099. pgyame.gfxdraw.bezier(surface, points, steps, color): return None
  1100. draw a bezier curve
  1101. pygame.image
  1102. pygame module for image transfer
  1103. pygame.image.load
  1104. pygame.image.load(filename): return Surface
  1105. pygame.image.load(fileobj, namehint=""): return Surface
  1106. load new image from a file
  1107. pygame.image.save
  1108. pygame.image.save(Surface, filename): return None
  1109. save an image to disk
  1110. pygame.image.get_extended
  1111. pygame.image.get_extended(): return bool
  1112. test if extended image formats can be loaded
  1113. pygame.image.tostring
  1114. pygame.image.tostring(Surface, format, flipped=False): return string
  1115. transfer image to string buffer
  1116. pygame.image.fromstring
  1117. pygame.image.fromstring(string, size, format, flipped=False): return Surface
  1118. create new Surface from a string buffer
  1119. pygame.image.frombuffer
  1120. pygame.image.frombuffer(string, size, format): return Surface
  1121. create a new Surface that shares data inside a string buffer
  1122. pygame.joystick
  1123. pygame module for interacting with joystick devices
  1124. pygame.joystick.init
  1125. pygame.joystick.init(): return None
  1126. initialize the joystick module
  1127. pygame.joystick.quit
  1128. pygame.joystick.quit(): return None
  1129. uninitialize the joystick module
  1130. pygame.joystick.get_init
  1131. pygame.joystick.get_init(): return bool
  1132. true if the joystick module is initialized
  1133. pygame.joystick.get_count
  1134. pygame.joystick.get_count(): return count
  1135. number of joysticks on the system
  1136. pygame.joystick.Joystick
  1137. pygame.joystick.Joystick(id): return Joystick
  1138. create a new Joystick object
  1139. Joystick.init
  1140. Joystick.init(): return None
  1141. initialize the Joystick
  1142. Joystick.quit
  1143. Joystick.quit(): return None
  1144. uninitialize the Joystick
  1145. Joystick.get_init
  1146. Joystick.get_init(): return bool
  1147. check if the Joystick is initialized
  1148. Joystick.get_id
  1149. Joystick.get_id(): return int
  1150. get the Joystick ID
  1151. Joystick.get_name
  1152. Joystick.get_name(): return string
  1153. get the Joystick system name
  1154. Joystick.get_numaxes
  1155. Joystick.get_numaxes(): return int
  1156. get the number of axes on a Joystick
  1157. Joystick.get_axis
  1158. Joystick.get_axis(axis_number): return float
  1159. get the current position of an axis
  1160. Joystick.get_numballs
  1161. Joystick.get_numballs(): return int
  1162. get the number of trackballs on a Joystick
  1163. Joystick.get_ball
  1164. Joystick.get_ball(ball_number): return x, y
  1165. get the relative position of a trackball
  1166. Joystick.get_numbuttons
  1167. Joystick.get_numbuttons(): return int
  1168. get the number of buttons on a Joystick
  1169. Joystick.get_button
  1170. Joystick.get_button(button): return bool
  1171. get the current button state
  1172. Joystick.get_numhats
  1173. Joystick.get_numhats(): return int
  1174. get the number of hat controls on a Joystick
  1175. Joystick.get_hat
  1176. Joystick.get_hat(hat_number): return x, y
  1177. get the position of a joystick hat
  1178. pygame.key
  1179. pygame module to work with the keyboard
  1180. pygame.key.get_focused
  1181. pygame.key.get_focused(): return bool
  1182. true if the display is receiving keyboard input from the system
  1183. pygame.key.get_pressed
  1184. pygame.key.get_pressed(): return bools
  1185. get the state of all keyboard buttons
  1186. pygame.key.get_mods
  1187. pygame.key.get_mods(): return int
  1188. determine which modifier keys are being held
  1189. pygame.key.set_mods
  1190. pygame.key.set_mods(int): return None
  1191. temporarily set which modifier keys are pressed
  1192. pygame.key.set_repeat
  1193. pygame.key.set_repeat(): return None
  1194. pygame.key.set_repeat(delay, interval): return None
  1195. control how held keys are repeated
  1196. pygame.key.get_repeat
  1197. pygame.key.get_repeat(): return (delay, interval)
  1198. see how held keys are repeated
  1199. pygame.key.name
  1200. pygame.key.name(key): return string
  1201. get the name of a key identifier
  1202. pygame.locals
  1203. pygame constants
  1204. pygame.mask
  1205. pygame module for image masks.
  1206. pygame.mask.from_surface
  1207. pygame.mask.from_surface(Surface, threshold = 127) -> Mask
  1208. Returns a Mask from the given surface.
  1209. pygame.mask.from_threshold
  1210. pygame.mask.from_surface(Surface, color, threshold = (0,0,0,255), othersurface = None, palette_colors = 1) -> Mask
  1211. Creates a mask by thresholding Surfaces
  1212. pygame.mask.Mask
  1213. pygame.Mask((width, height)): return Mask
  1214. pygame object for representing 2d bitmasks
  1215. Mask.get_size
  1216. Mask.get_size() -> width,height
  1217. Returns the size of the mask.
  1218. Mask.get_at
  1219. Mask.get_at((x,y)) -> int
  1220. Returns nonzero if the bit at (x,y) is set.
  1221. Mask.set_at
  1222. Mask.set_at((x,y),value)
  1223. Sets the position in the mask given by x and y.
  1224. Mask.overlap
  1225. Mask.overlap(othermask, offset) -> x,y
  1226. Returns the point of intersection if the masks overlap with the given offset - or None if it does not overlap.
  1227. Mask.overlap_area
  1228. Mask.overlap_area(othermask, offset) -> numpixels
  1229. Returns the number of overlapping 'pixels'.
  1230. Mask.overlap_mask
  1231. Mask.overlap_mask(othermask, offset) -> Mask
  1232. Returns a mask of the overlapping pixels
  1233. Mask.fill
  1234. Mask.fill()
  1235. Sets all bits to 1
  1236. Mask.clear
  1237. Mask.clear()
  1238. Sets all bits to 0
  1239. Mask.invert
  1240. Mask.invert()
  1241. Flips the bits in a Mask
  1242. Mask.scale
  1243. Mask.scale((x, y)) -> Mask
  1244. Resizes a mask
  1245. Mask.draw
  1246. Mask.draw(othermask, offset)
  1247. Draws a mask onto another
  1248. Mask.erase
  1249. Mask.erase(othermask, offset)
  1250. Erases a mask from another
  1251. Mask.count
  1252. Mask.count() -> pixels
  1253. Returns the number of set pixels
  1254. Mask.centroid
  1255. Mask.centroid() -> (x, y)
  1256. Returns the centroid of the pixels in a Mask
  1257. Mask.angle
  1258. Mask.angle() -> theta
  1259. Returns the orientation of the pixels
  1260. Mask.outline
  1261. Mask.outline(every = 1) -> [(x,y), (x,y) ...]
  1262. list of points outlining an object
  1263. Mask.convolve
  1264. Mask.convolve(othermask, outputmask = None, offset = (0,0)) -> Mask
  1265. Return the convolution of self with another mask.
  1266. Mask.connected_component
  1267. Mask.connected_component((x,y) = None) -> Mask
  1268. Returns a mask of a connected region of pixels.
  1269. Mask.connected_components
  1270. Mask.connected_components(min = 0) -> [Masks]
  1271. Returns a list of masks of connected regions of pixels.
  1272. Mask.get_bounding_rects
  1273. Mask.get_bounding_rects() -> Rects
  1274. Returns a list of bounding rects of regions of set pixels.
  1275. pygame.midi
  1276. pygame module for interacting with midi input and output.
  1277. pygame.midi.Input
  1278. Input(device_id)
  1279. Input(device_id, buffer_size)
  1280. Input is used to get midi input from midi devices.
  1281. Input.close
  1282. Input.close(): return None
  1283. closes a midi stream, flushing any pending buffers.
  1284. Input.poll
  1285. Input.poll(): return Bool
  1286. returns true if there's data, or false if not.
  1287. Input.read
  1288. Input.read(num_events): return midi_event_list
  1289. reads num_events midi events from the buffer.
  1290. pygame.midi.MidiException
  1291. MidiException(errno)
  1292. exception that pygame.midi functions and classes can raise
  1293. pygame.midi.Output
  1294. Output(device_id)
  1295. Output(device_id, latency = 0)
  1296. Output(device_id, buffer_size = 4096)
  1297. Output(device_id, latency, buffer_size)
  1298. Output is used to send midi to an output device
  1299. Output.abort
  1300. Output.abort(): return None
  1301. terminates outgoing messages immediately
  1302. Output.close
  1303. Output.close(): return None
  1304. closes a midi stream, flushing any pending buffers.
  1305. Output.note_off
  1306. Output.note_off(note, velocity=None, channel = 0)
  1307. turns a midi note off. Note must be on.
  1308. Output.note_on
  1309. Output.note_on(note, velocity=None, channel = 0)
  1310. turns a midi note on. Note must be off.
  1311. Output.set_instrument
  1312. Output.set_instrument(instrument_id, channel = 0)
  1313. select an instrument, with a value between 0 and 127
  1314. Output.write
  1315. Output.write(data)
  1316. writes a list of midi data to the Output
  1317. Output.write_short
  1318. Output.write_short(status)
  1319. Output.write_short(status, data1 = 0, data2 = 0)
  1320. write_short(status <, data1><, data2>)
  1321. Output.write_sys_ex
  1322. Output.write_sys_ex(when, msg)
  1323. writes a timestamped system-exclusive midi message.
  1324. pygame.midi.get_count
  1325. pygame.midi.get_count(): return num_devices
  1326. gets the number of devices.
  1327. pygame.midi.get_default_input_id
  1328. pygame.midi.get_default_input_id(): return default_id
  1329. gets default input device number
  1330. pygame.midi.get_default_output_id
  1331. pygame.midi.get_default_output_id(): return default_id
  1332. gets default output device number
  1333. pygame.midi.get_device_info
  1334. pygame.midi.get_device_info(an_id): return (interf, name, input, output, opened)
  1335. returns information about a midi device
  1336. pygame.midi.init
  1337. pygame.midi.init(): return None
  1338. initialize the midi module
  1339. pygame.midi.midis2events
  1340. pygame.midi.midis2events(midis, device_id): return [Event, ...]
  1341. converts midi events to pygame events
  1342. pygame.midi.quit
  1343. pygame.midi.quit(): return None
  1344. uninitialize the midi module
  1345. pygame.midi.time
  1346. pygame.midi.time(): return time
  1347. returns the current time in ms of the PortMidi timer
  1348. pygame.mixer
  1349. pygame module for loading and playing sounds
  1350. pygame.mixer.init
  1351. pygame.mixer.init(frequency=22050, size=-16, channels=2, buffer=4096): return None
  1352. initialize the mixer module
  1353. pygame.mixer.pre_init
  1354. pygame.mixer.pre_init(frequency=22050, size=-16, channels=2, buffersize=4096): return None
  1355. preset the mixer init arguments
  1356. pygame.mixer.quit
  1357. pygame.mixer.quit(): return None
  1358. uninitialize the mixer
  1359. pygame.mixer.get_init
  1360. pygame.mixer.get_init(): return (frequency, format, channels)
  1361. test if the mixer is initialized
  1362. pygame.mixer.stop
  1363. pygame.mixer.stop(): return None
  1364. stop playback of all sound channels
  1365. pygame.mixer.pause
  1366. pygame.mixer.pause(): return None
  1367. temporarily stop playback of all sound channels
  1368. pygame.mixer.unpause
  1369. pygame.mixer.unpause(): return None
  1370. resume paused playback of sound channels
  1371. pygame.mixer.fadeout
  1372. pygame.mixer.fadeout(time): return None
  1373. fade out the volume on all sounds before stopping
  1374. pygame.mixer.set_num_channels
  1375. pygame.mixer.set_num_channels(count): return None
  1376. set the total number of playback channels
  1377. pygame.mixer.get_num_channels
  1378. get the total number of playback channels
  1379. pygame.mixer.set_reserved
  1380. pygame.mixer.set_reserved(count): return None
  1381. reserve channels from being automatically used
  1382. pygame.mixer.find_channel
  1383. pygame.mixer.find_channel(force=False): return Channel
  1384. find an unused channel
  1385. pygame.mixer.get_busy
  1386. pygame.mixer.get_busy(): return bool
  1387. test if any sound is being mixed
  1388. pygame.mixer.Sound
  1389. pygame.mixer.Sound(filename): return Sound
  1390. pygame.mixer.Sound(buffer): return Sound
  1391. pygame.mixer.Sound(object): return Sound
  1392. Create a new Sound object from a file
  1393. Sound.play
  1394. Sound.play(loops=0, maxtime=0, fade_ms=0): return Channel
  1395. begin sound playback
  1396. Sound.stop
  1397. Sound.stop(): return None
  1398. stop sound playback
  1399. Sound.fadeout
  1400. Sound.fadeout(time): return None
  1401. stop sound playback after fading out
  1402. Sound.set_volume
  1403. Sound.set_volume(value): return None
  1404. set the playback volume for this Sound
  1405. Sound.get_volume
  1406. Sound.get_volume(): return value
  1407. get the playback volume
  1408. Sound.get_num_channels
  1409. Sound.get_num_channels(): return count
  1410. count how many times this Sound is playing
  1411. Sound.get_length
  1412. Sound.get_length(): return seconds
  1413. get the length of the Sound
  1414. Sound.get_buffer
  1415. Sound.get_buffer(): return BufferProxy
  1416. acquires a buffer object for the sameples of the Sound.
  1417. pygame.mixer.Channel
  1418. pygame.mixer.Channel(id): return Channel
  1419. Create a Channel object for controlling playback
  1420. Channel.play
  1421. Channel.play(Sound, loops=0, maxtime=0, fade_ms=0): return None
  1422. play a Sound on a specific Channel
  1423. Channel.stop
  1424. Channel.stop(): return None
  1425. stop playback on a Channel
  1426. Channel.pause
  1427. Channel.pause(): return None
  1428. temporarily stop playback of a channel
  1429. Channel.unpause
  1430. Channel.unpause(): return None
  1431. resume pause playback of a channel
  1432. Channel.fadeout
  1433. Channel.fadeout(time): return None
  1434. stop playback after fading channel out
  1435. Channel.set_volume
  1436. Channel.set_volume(value): return None
  1437. Channel.set_volume(left, right): return None
  1438. set the volume of a playing channel
  1439. Channel.get_volume
  1440. Channel.get_volume(): return value
  1441. get the volume of the playing channel
  1442. Channel.get_busy
  1443. Channel.get_busy(): return bool
  1444. check if the channel is active
  1445. Channel.get_sound
  1446. Channel.get_sound(): return Sound
  1447. get the currently playing Sound
  1448. Channel.queue
  1449. Channel.queue(Sound): return None
  1450. queue a Sound object to follow the current
  1451. Channel.get_queue
  1452. Channel.get_queue(): return Sound
  1453. return any Sound that is queued
  1454. Channel.set_endevent
  1455. Channel.set_endevent(): return None
  1456. Channel.set_endevent(type): return None
  1457. have the channel send an event when playback stops
  1458. Channel.get_endevent
  1459. Channel.get_endevent(): return type
  1460. get the event a channel sends when playback stops
  1461. pygame.mouse
  1462. pygame module to work with the mouse
  1463. pygame.mouse.get_pressed
  1464. pygame.moouse.get_pressed(): return (button1, button2, button3)
  1465. get the state of the mouse buttons
  1466. pygame.mouse.get_pos
  1467. pygame.mouse.get_pos(): return (x, y)
  1468. get the mouse cursor position
  1469. pygame.mouse.get_rel
  1470. pygame.mouse.get_rel(): return (x, y)
  1471. get the amount of mouse movement
  1472. pygame.mouse.set_pos
  1473. pygame.mouse.set_pos([x, y]): return None
  1474. set the mouse cursor position
  1475. pygame.mouse.set_visible
  1476. pygame.mouse.set_visible(bool): return bool
  1477. hide or show the mouse cursor
  1478. pygame.mouse.get_focused
  1479. pygame.mouse.get_focused(): return bool
  1480. check if the display is receiving mouse input
  1481. pygame.mouse.set_cursor
  1482. pygame.mouse.set_cursor(size, hotspot, xormasks, andmasks): return None
  1483. set the image for the system mouse cursor
  1484. pygame.mouse.get_cursor
  1485. pygame.mouse.get_cursor(): return (size, hotspot, xormasks, andmasks)
  1486. get the image for the system mouse cursor
  1487. pygame.movie
  1488. pygame module for playback of mpeg video
  1489. pygame.movie.Movie
  1490. pygame.movie.Movie(filename): return Movie
  1491. pygame.movie.Movie(object): return Movie
  1492. load an mpeg movie file
  1493. Movie.play
  1494. Movie.play(loops=0): return None
  1495. start playback of a movie
  1496. Movie.stop
  1497. Movie.stop(): return None
  1498. stop movie playback
  1499. Movie.pause
  1500. Movie.pause(): return None
  1501. temporarily stop and resume playback
  1502. Movie.skip
  1503. Movie.skip(seconds): return None
  1504. advance the movie playback position
  1505. Movie.rewind
  1506. Movie.rewind(): return None
  1507. restart the movie playback
  1508. Movie.render_frame
  1509. Movie.render_frame(frame_number): return frame_number
  1510. set the current video frame
  1511. Movie.get_frame
  1512. Movie.get_frame(): return frame_number
  1513. get the current video frame
  1514. Movie.get_time
  1515. Movie.get_time(): return seconds
  1516. get the current vide playback time
  1517. Movie.get_busy
  1518. Movie.get_busy(): return bool
  1519. check if the movie is currently playing
  1520. Movie.get_length
  1521. Movie.get_length(): return seconds
  1522. the total length of the movie in seconds
  1523. Movie.get_size
  1524. Movie.get_size(): return (width, height)
  1525. get the resolution of the video
  1526. Movie.has_video
  1527. Movie.get_video(): return bool
  1528. check if the movie file contains video
  1529. Movie.has_audio
  1530. Movie.get_audio(): return bool
  1531. check if the movie file contains audio
  1532. Movie.set_volume
  1533. Movie.set_volume(value): return None
  1534. set the audio playback volume
  1535. Movie.set_display
  1536. Movie.set_display(Surface, rect=None): return None
  1537. set the video target Surface
  1538. pygame.mixer.music
  1539. pygame module for controlling streamed audio
  1540. pygame.mixer.music.load
  1541. pygame.mixer.music.load(filename): return None
  1542. pygame.mixer.music.load(object): return None
  1543. Load a music file for playback
  1544. pygame.mixer.music.play
  1545. pygame.mixer.music.play(loops=0, start=0.0): return None
  1546. Start the playback of the music stream
  1547. pygame.mixer.music.rewind
  1548. pygame.mixer.music.rewind(): return None
  1549. restart music
  1550. pygame.mixer.music.stop
  1551. pygame.mixer.music.stop(): return None
  1552. stop the music playback
  1553. pygame.mixer.music.pause
  1554. pygame.mixer.music.pause(): return None
  1555. temporarily stop music playback
  1556. pygame.mixer.music.unpause
  1557. pygame.mixer.music.unpause(): return None
  1558. resume paused music
  1559. pygame.mixer.music.fadeout
  1560. pygame.mixer.music.fadeout(time): return None
  1561. stop music playback after fading out
  1562. pygame.mixer.music.set_volume
  1563. pygame.mixer.music.set_volume(value): return None
  1564. set the music volume
  1565. pygame.mixer.music.get_volume
  1566. pygame.mixer.music.get_volume(): return value
  1567. get the music volume
  1568. pygame.mixer.music.get_busy
  1569. pygame.mixer.music.get_busy(): return bool
  1570. check if the music stream is playing
  1571. pygame.mixer.music.get_pos
  1572. pygame.mixer.music.get_pos(): return time
  1573. get the music play time
  1574. pygame.mixer.music.queue
  1575. pygame.mixer.music.queue(filename): return None
  1576. queue a music file to follow the current
  1577. pygame.mixer.music.set_endevent
  1578. pygame.mixer.music.set_endevent(): return None
  1579. pygame.mixer.music.set_endevent(type): return None
  1580. have the music send an event when playback stops
  1581. pygame.mixer.music.get_endevent
  1582. pygame.mixer.music.get_endevent(): return type
  1583. get the event a channel sends when playback stops
  1584. pygame.Overlay
  1585. pygame.Overlay(format, (width, height)): return Overlay
  1586. pygame object for video overlay graphics
  1587. Overlay.display
  1588. Overlay.display((y, u, v)): return None
  1589. Overlay.display(): return None
  1590. set the overlay pixel data
  1591. Overlay.set_location
  1592. Overlay.set_location(rect): return None
  1593. control where the overlay is displayed
  1594. Overlay.get_hardware
  1595. Overlay.get_hardware(rect): return int
  1596. test if the Overlay is hardware accelerated
  1597. pygame.PixelArray
  1598. pygame.PixelArray(Surface): return PixelArray
  1599. pygame object for direct pixel access of surfaces
  1600. PixelArray.surface
  1601. PixelArray.surface: Return Surface
  1602. Gets the Surface the PixelArray uses.
  1603. PixelArray.make_surface
  1604. PixelArray.make_surface (): Return Surface
  1605. Creates a new Surface from the current PixelArray.
  1606. PixelArray.replace
  1607. PixelArray.replace (color, repcolor, distance=0, weights=(0.299, 0.587, 0.114)): Return None
  1608. Replaces the passed color in the PixelArray with another one.
  1609. PixelArray.extract
  1610. PixelArray.extract (color, distance=0, weights=(0.299, 0.587, 0.114)): Return PixelArray
  1611. Extracts the passed color from the PixelArray.
  1612. PixelArray.compare
  1613. PixelArray.compare (array, distance=0, weights=(0.299, 0.587, 0.114)): Return PixelArray
  1614. Compares the PixelArray with another one.
  1615. pygame.Rect
  1616. pygame.Rect(left, top, width, height): return Rect
  1617. pygame.Rect((left, top), (width, height)): return Rect
  1618. pygame.Rect(object): return Rect
  1619. pygame object for storing rectangular coordinates
  1620. Rect.copy
  1621. Rect.copy(): return Rect
  1622. copy the rectangle
  1623. Rect.move
  1624. Rect.move(x, y): return Rect
  1625. moves the rectangle
  1626. Rect.move_ip
  1627. Rect.move_ip(x, y): return None
  1628. moves the rectangle, in place
  1629. Rect.inflate
  1630. Rect.inflate(x, y): return Rect
  1631. grow or shrink the rectangle size
  1632. Rect.inflate_ip
  1633. Rect.inflate_ip(x, y): return None
  1634. grow or shrink the rectangle size, in place
  1635. Rect.clamp
  1636. Rect.clamp(Rect): return Rect
  1637. moves the rectangle inside another
  1638. Rect.clamp_ip
  1639. Rect.clamp_ip(Rect): return None
  1640. moves the rectangle inside another, in place
  1641. Rect.clip
  1642. Rect.clip(Rect): return Rect
  1643. crops a rectangle inside another
  1644. Rect.union
  1645. Rect.union(Rect): return Rect
  1646. joins two rectangles into one
  1647. Rect.union_ip
  1648. Rect.union_ip(Rect): return None
  1649. joins two rectangles into one, in place
  1650. Rect.unionall
  1651. Rect.unionall(Rect_sequence): return Rect
  1652. the union of many rectangles
  1653. Rect.unionall_ip
  1654. Rect.unionall_ip(Rect_sequence): return None
  1655. the union of many rectangles, in place
  1656. Rect.fit
  1657. Rect.fit(Rect): return Rect
  1658. resize and move a rectangle with aspect ratio
  1659. Rect.normalize
  1660. Rect.normalize(): return None
  1661. correct negative sizes
  1662. Rect.contains
  1663. Rect.contains(Rect): return bool
  1664. test if one rectangle is inside another
  1665. Rect.collidepoint
  1666. Rect.collidepoint(x, y): return bool
  1667. Rect.collidepoint((x,y)): return bool
  1668. test if a point is inside a rectangle
  1669. Rect.colliderect
  1670. Rect.colliderect(Rect): return bool
  1671. test if two rectangles overlap
  1672. Rect.collidelist
  1673. Rect.collidelist(list): return index
  1674. test if one rectangle in a list intersects
  1675. Rect.collidelistall
  1676. Rect.collidelistall(list): return indices
  1677. test if all rectangles in a list intersect
  1678. Rect.collidedict
  1679. Rect.collidedict(dict): return (key, value)
  1680. test if one rectangle in a dictionary intersects
  1681. Rect.collidedictall
  1682. Rect.collidedictall(dict): return [(key, value), ...]
  1683. test if all rectangles in a dictionary intersect
  1684. pygame.scrap
  1685. pygame module for clipboard support.
  1686. pygame.scrap.init
  1687. scrap.init () -> None
  1688. Initializes the scrap module.
  1689. pygame.scrap.get
  1690. scrap.get (type) -> string
  1691. Gets the data for the specified type from the clipboard.
  1692. pygame.scrap.get_types
  1693. scrap.get_types () -> list
  1694. Gets a list of the available clipboard types.
  1695. pygame.scrap.put
  1696. scrap.put(type, data) -> None
  1697. Places data into the clipboard.
  1698. pygame.scrap.contains
  1699. scrap.contains (type) -> bool
  1700. Checks, whether a certain type is available in the clipboard.
  1701. pygame.scrap.lost
  1702. scrap.lost() -> bool
  1703. Checks whether the clipboard is currently owned by the application.
  1704. pygame.scrap.set_mode
  1705. scrap.set_mode(mode) -> None
  1706. Sets the clipboard access mode.
  1707. pygame.sndarray
  1708. pygame module for accessing sound sample data
  1709. pygame.sndarray.array
  1710. pygame.sndarray.array(Sound): return array
  1711. copy Sound samples into an array
  1712. pygame.sndarray.samples
  1713. pygame.sndarray.samples(Sound): return array
  1714. reference Sound samples into an array
  1715. pygame.sndarray.make_sound
  1716. pygame.sndarray.make_sound(array): return Sound
  1717. convert an array into a Sound object
  1718. pygame.sndarray.use_arraytype
  1719. pygame.sndarray.use_arraytype (arraytype): return None
  1720. Sets the array system to be used for sound arrays
  1721. pygame.sndarray.get_arraytype
  1722. pygame.sndarray.get_arraytype (): return str
  1723. Gets the currently active array type.
  1724. pygame.sndarray.get_arraytypes
  1725. pygame.sndarray.get_arraytypes (): return tuple
  1726. Gets the array system types currently supported.
  1727. pygame.sprite
  1728. pygame module with basic game object classes
  1729. pygame.sprite.Sprite
  1730. pygame.sprite.Sprite(*groups): return Sprite
  1731. simple base class for visible game objects
  1732. Sprite.update
  1733. Sprite.update(*args):
  1734. method to control sprite behavior
  1735. Sprite.add
  1736. Sprite.add(*groups): return None
  1737. add the sprite to groups
  1738. Sprite.remove
  1739. Sprite.remove(*groups): return None
  1740. remove the sprite from groups
  1741. Sprite.kill
  1742. Sprite.kill(): return None
  1743. remove the Sprite from all Groups
  1744. Sprite.alive
  1745. Sprite.alive(): return bool
  1746. does the sprite belong to any groups
  1747. Sprite.groups
  1748. Sprite.groups(): return group_list
  1749. list of Groups that contain this Sprite
  1750. pygame.sprite.DirtySprite
  1751. pygame.sprite.DirtySprite(*groups): return DirtySprite
  1752. a more featureful subclass of Sprite with more attributes
  1753. pygame.sprite.Group
  1754. pygame.sprite.Group(*sprites): return Group
  1755. container class for many Sprites
  1756. Group.sprites
  1757. Group.sprites(): return sprite_list
  1758. list of the Sprites this Group contains
  1759. Group.copy
  1760. Group.copy(): return Group
  1761. duplicate the Group
  1762. Group.add
  1763. Group.add(*sprites): return None
  1764. add Sprites to this Group
  1765. Group.remove
  1766. Group.remove(*sprites): return None
  1767. remove Sprites from the Group
  1768. Group.has
  1769. Group.has(*sprites): return None
  1770. test if a Group contains Sprites
  1771. Group.update
  1772. Group.update(*args): return None
  1773. call the update method on contained Sprites
  1774. Group.draw
  1775. Group.draw(Surface): return None
  1776. blit the Sprite images
  1777. Group.clear
  1778. Group.clear(Surface_dest, background): return None
  1779. draw a background over the Sprites
  1780. Group.empty
  1781. Group.empty(): return None
  1782. remove all Sprites
  1783. pygame.sprite.RenderUpdates
  1784. pygame.sprite.RenderUpdates(*sprites): return RenderUpdates
  1785. Group class that tracks dirty updates
  1786. RenderUpdates.draw
  1787. RenderUpdates.draw(surface): return Rect_list
  1788. blit the Sprite images and track changed areas
  1789. pygame.sprite.OrderedUpdates
  1790. pygame.sprite.OrderedUpdates(*spites): return OrderedUpdates
  1791. RenderUpdates class that draws Sprites in order of addition
  1792. pygame.sprite.LayeredUpdates
  1793. pygame.sprite.LayeredUpdates(*spites, **kwargs): return LayeredUpdates
  1794. LayeredUpdates Group handles layers, that draws like OrderedUpdates.
  1795. LayeredUpdates.add
  1796. LayeredUpdates.add(*sprites, **kwargs): return None
  1797. add a sprite or sequence of sprites to a group
  1798. LayeredUpdates.sprites
  1799. LayeredUpdates.sprites(): return sprites
  1800. returns a ordered list of sprites (first back, last top).
  1801. LayeredUpdates.draw
  1802. LayeredUpdates.draw(surface): return Rect_list
  1803. draw all sprites in the right order onto the passed surface.
  1804. LayeredUpdates.get_sprites_at
  1805. LayeredUpdates.get_sprites_at(pos): return colliding_sprites
  1806. returns a list with all sprites at that position.
  1807. LayeredUpdates.get_sprite
  1808. LayeredUpdates.get_sprite(idx): return sprite
  1809. returns the sprite at the index idx from the groups sprites
  1810. LayeredUpdates.remove_sprites_of_layer
  1811. LayeredUpdates.remove_sprites_of_layer(layer_nr): return sprites
  1812. removes all sprites from a layer and returns them as a list.
  1813. LayeredUpdates.layers
  1814. LayeredUpdates.layers(): return layers
  1815. returns a list of layers defined (unique), sorted from botton up.
  1816. LayeredUpdates.change_layer
  1817. LayeredUpdates.change_layer(sprite, new_layer): return None
  1818. changes the layer of the sprite
  1819. LayeredUpdates.get_layer_of_sprite
  1820. LayeredUpdates.get_layer_of_sprite(sprite): return layer
  1821. returns the layer that sprite is currently in.
  1822. LayeredUpdates.get_top_layer
  1823. LayeredUpdates.get_top_layer(): return layer
  1824. returns the top layer
  1825. LayeredUpdates.get_bottom_layer
  1826. LayeredUpdates.get_bottom_layer(): return layer
  1827. returns the bottom layer
  1828. LayeredUpdates.move_to_front
  1829. LayeredUpdates.move_to_front(sprite): return None
  1830. brings the sprite to front layer
  1831. LayeredUpdates.move_to_back
  1832. LayeredUpdates.move_to_back(sprite): return None
  1833. moves the sprite to the bottom layer
  1834. LayeredUpdates.get_top_sprite
  1835. LayeredUpdates.get_top_sprite(): return Sprite
  1836. returns the topmost sprite
  1837. LayeredUpdates.get_sprites_from_layer
  1838. LayeredUpdates.get_sprites_from_layer(layer): return sprites
  1839. returns all sprites from a layer, ordered by how they where added
  1840. LayeredUpdates.switch_layer
  1841. LayeredUpdates.switch_layer(layer1_nr, layer2_nr): return None
  1842. switches the sprites from layer1 to layer2
  1843. pygame.sprite.LayeredDirty
  1844. pygame.sprite.LayeredDirty(*spites, **kwargs): return LayeredDirty
  1845. LayeredDirty Group is for DirtySprites. Subclasses LayeredUpdates.
  1846. LayeredDirty.draw
  1847. LayeredDirty.draw(surface, bgd=None): return Rect_list
  1848. draw all sprites in the right order onto the passed surface.
  1849. LayeredDirty.clear
  1850. LayeredDirty.clear(surface, bgd): return None
  1851. used to set background
  1852. LayeredDirty.repaint_rect
  1853. LayeredDirty.repaint_rect(screen_rect): return None
  1854. repaints the given area
  1855. LayeredDirty.set_clip
  1856. LayeredDirty.set_clip(screen_rect=None): return None
  1857. clip the area where to draw. Just pass None (default) to reset the clip
  1858. LayeredDirty.get_clip
  1859. LayeredDirty.get_clip(): return Rect
  1860. clip the area where to draw. Just pass None (default) to reset the clip
  1861. LayeredDirty.change_layer
  1862. change_layer(sprite, new_layer): return None
  1863. changes the layer of the sprite
  1864. LayeredDirty.set_timing_treshold
  1865. set_timing_treshold(time_ms): return None
  1866. sets the treshold in milliseconds
  1867. pygame.sprite.GroupSingle
  1868. pygame.sprite.GroupSingle(sprite=None): return GroupSingle
  1869. Group container that holds a single Sprite
  1870. pygame.sprite.spritecollide
  1871. pygame.sprite.spritecollide(sprite, group, dokill, collided = None): return Sprite_list
  1872. find Sprites in a Group that intersect another Sprite
  1873. pygame.sprite.collide_rect
  1874. pygame.sprite.collide_rect(left, right): return bool
  1875. collision detection between two sprites, using rects.
  1876. pygame.sprite.collide_rect_ratio
  1877. pygame.sprite.collide_rect_ratio(ratio): return collided_callable
  1878. collision detection between two sprites, using rects scaled to a ratio.
  1879. pygame.sprite.collide_circle
  1880. pygame.sprite.collide_circle(left, right): return bool
  1881. collision detection between two sprites, using circles.
  1882. pygame.sprite.collide_circle_ratio
  1883. pygame.sprite.collide_circle_ratio(ratio): return collided_callable
  1884. collision detection between two sprites, using circles scaled to a ratio.
  1885. pygame.sprite.collide_mask
  1886. pygame.sprite.collide_mask(SpriteLeft, SpriteRight): return bool
  1887. collision detection between two sprites, using masks.
  1888. pygame.sprite.groupcollide
  1889. pygame.sprite.groupcollide(group1, group2, dokill1, dokill2): return Sprite_dict
  1890. find all Sprites that collide between two Groups
  1891. pygame.sprite.spritecollideany
  1892. pygame.sprite.spritecollideany(sprite, group): return bool
  1893. simple test if a Sprite intersects anything in a Group
  1894. pygame.Surface
  1895. pygame.Surface((width, height), flags=0, depth=0, masks=None): return Surface
  1896. pygame.Surface((width, height), flags=0, Surface): return Surface
  1897. pygame object for representing images
  1898. Surface.blit
  1899. Surface.blit(source, dest, area=None, special_flags = 0): return Rect
  1900. draw one image onto another
  1901. Surface.convert
  1902. Surface.convert(Surface): return Surface
  1903. Surface.convert(depth, flags=0): return Surface
  1904. Surface.convert(masks, flags=0): return Surface
  1905. Surface.convert(): return Surface
  1906. change the pixel format of an image
  1907. Surface.convert_alpha
  1908. Surface.convert_alpha(Surface): return Surface
  1909. Surface.convert_alpha(): return Surface
  1910. change the pixel format of an image including per pixel alphas
  1911. Surface.copy
  1912. Surface.copy(): return Surface
  1913. create a new copy of a Surface
  1914. Surface.fill
  1915. Surface.fill(color, rect=None, special_flags=0): return Rect
  1916. fill Surface with a solid color
  1917. Surface.scroll
  1918. Surface.scroll(dx=0, dy=0): return None
  1919. Shift the surface image in place
  1920. Surface.set_colorkey
  1921. Surface.set_colorkey(Color, flags=0): return None
  1922. Surface.set_colorkey(None): return None
  1923. Set the transparent colorkey
  1924. Surface.get_colorkey
  1925. Surface.get_colorkey(): return RGB or None
  1926. Get the current transparent colorkey
  1927. Surface.set_alpha
  1928. Surface.set_alpha(value, flags=0): return None
  1929. Surface.set_alpha(None): return None
  1930. set the alpha value for the full Surface image
  1931. Surface.get_alpha
  1932. Surface.get_alpha(): return int_value or None
  1933. get the current Surface transparency value
  1934. Surface.lock
  1935. Surface.lock(): return None
  1936. lock the Surface memory for pixel access
  1937. Surface.unlock
  1938. Surface.unlock(): return None
  1939. unlock the Surface memory from pixel access
  1940. Surface.mustlock
  1941. Surface.mustlock(): return bool
  1942. test if the Surface requires locking
  1943. Surface.get_locked
  1944. Surface.get_locked(): return bool
  1945. test if the Surface is current locked
  1946. Surface.get_locks
  1947. Surface.get_locks(): return tuple
  1948. Gets the locks for the Surface
  1949. Surface.get_at
  1950. Surface.get_at((x, y)): return Color
  1951. get the color value at a single pixel
  1952. Surface.set_at
  1953. Surface.set_at((x, y), Color): return None
  1954. set the color value for a single pixel
  1955. Surface.get_palette
  1956. Surface.get_palette(): return [RGB, RGB, RGB, ...]
  1957. get the color index palette for an 8bit Surface
  1958. Surface.get_palette_at
  1959. Surface.get_palette_at(index): return RGB
  1960. get the color for a single entry in a palette
  1961. Surface.set_palette
  1962. Surface.set_palette([RGB, RGB, RGB, ...]): return None
  1963. set the color palette for an 8bit Surface
  1964. Surface.set_palette_at
  1965. Surface.set_at(index, RGB): return None
  1966. set the color for a single index in an 8bit Surface palette
  1967. Surface.map_rgb
  1968. Surface.map_rgb(Color): return mapped_int
  1969. convert a color into a mapped color value
  1970. Surface.unmap_rgb
  1971. Surface.map_rgb(mapped_int): return Color
  1972. convert a mapped integer color value into a Color
  1973. Surface.set_clip
  1974. Surface.set_clip(rect): return None
  1975. Surface.set_clip(None): return None
  1976. set the current clipping area of the Surface
  1977. Surface.get_clip
  1978. Surface.get_clip(): return Rect
  1979. get the current clipping area of the Surface
  1980. Surface.subsurface
  1981. Surface.subsurface(Rect): return Surface
  1982. create a new surface that references its parent
  1983. Surface.get_parent
  1984. Surface.get_parent(): return Surface
  1985. find the parent of a subsurface
  1986. Surface.get_abs_parent
  1987. Surface.get_abs_parent(): return Surface
  1988. find the top level parent of a subsurface
  1989. Surface.get_offset
  1990. Surface.get_offset(): return (x, y)
  1991. find the position of a child subsurface inside a parent
  1992. Surface.get_abs_offset
  1993. Surface.get_abs_offset(): return (x, y)
  1994. find the absolute position of a child subsurface inside its top level parent
  1995. Surface.get_size
  1996. Surface.get_size(): return (width, height)
  1997. get the dimensions of the Surface
  1998. Surface.get_width
  1999. Surface.get_width(): return width
  2000. get the width of the Surface
  2001. Surface.get_height
  2002. Surface.get_height(): return height
  2003. get the height of the Surface
  2004. Surface.get_rect
  2005. Surface.get_rect(**kwargs): return Rect
  2006. get the rectangular area of the Surface
  2007. Surface.get_bitsize
  2008. Surface.get_bitsize(): return int
  2009. get the bit depth of the Surface pixel format
  2010. Surface.get_bytesize
  2011. Surface.get_bytesize(): return int
  2012. get the bytes used per Surface pixel
  2013. Surface.get_flags
  2014. Surface.get_flags(): return int
  2015. get the additional flags used for the Surface
  2016. Surface.get_pitch
  2017. Surface.get_pitch(): return int
  2018. get the number of bytes used per Surface row
  2019. Surface.get_masks
  2020. Surface.get_masks(): return (R, G, B, A)
  2021. the bitmasks needed to convert between a color and a mapped integer
  2022. Surface.set_masks
  2023. Surface.set_masks((r,g,b,a)): return None
  2024. set the bitmasks needed to convert between a color and a mapped integer
  2025. Surface.get_shifts
  2026. Surface.get_shifts(): return (R, G, B, A)
  2027. the bit shifts needed to convert between a color and a mapped integer
  2028. Surface.set_shifts
  2029. Surface.get_shifts((r,g,b,a)): return None
  2030. sets the bit shifts needed to convert between a color and a mapped integer
  2031. Surface.get_losses
  2032. Surface.get_losses(): return (R, G, B, A)
  2033. the significant bits used to convert between a color and a mapped integer
  2034. Surface.get_bounding_rect
  2035. Surface.get_bounding_rect(min_alpha = 1): return Rect
  2036. find the smallest rect containing data
  2037. Surface.get_buffer
  2038. Surface.get_buffer(): return BufferProxy
  2039. acquires a buffer object for the pixels of the Surface.
  2040. pygame.surfarray
  2041. pygame module for accessing surface pixel data using array interfaces
  2042. pygame.surfarray.array2d
  2043. pygame.surfarray.array2d(Surface): return array
  2044. Copy pixels into a 2d array
  2045. pygame.surfarray.pixels2d
  2046. pygame.surfarray.pixels2d(Surface): return array
  2047. Reference pixels into a 2d array
  2048. pygame.surfarray.array3d
  2049. pygame.surfarray.array3d(Surface): return array
  2050. Copy pixels into a 3d array
  2051. pygame.surfarray.pixels3d
  2052. pygame.surfarray.pixels3d(Surface): return array
  2053. Reference pixels into a 3d array
  2054. pygame.surfarray.array_alpha
  2055. pygame.surfarray.array_alpha(Surface): return array
  2056. Copy pixel alphas into a 2d array
  2057. pygame.surfarray.pixels_alpha
  2058. pygame.surfarray.pixels_alpha(Surface): return array
  2059. Reference pixel alphas into a 2d array
  2060. pygame.surfarray.array_colorkey
  2061. pygame.surfarray.array_colorkey(Surface): return array
  2062. Copy the colorkey values into a 2d array
  2063. pygame.surfarray.make_surface
  2064. pygame.surfarray.make_surface(array): return Surface
  2065. Copy an array to a new surface
  2066. pygame.surfarray.blit_array
  2067. pygame.surfarray.blit_array(Surface, array): return None
  2068. Blit directly from a array values
  2069. pygame.surfarray.map_array
  2070. pygame.surfarray.map_array(Surface, array3d): return array2d
  2071. Map a 3d array into a 2d array
  2072. pygame.surfarray.use_arraytype
  2073. pygame.surfarray.use_arraytype (arraytype): return None
  2074. Sets the array system to be used for surface arrays
  2075. pygame.surfarray.get_arraytype
  2076. pygame.surfarray.get_arraytype (): return str
  2077. Gets the currently active array type.
  2078. pygame.surfarray.get_arraytypes
  2079. pygame.surfarray.get_arraytypes (): return tuple
  2080. Gets the array system types currently supported.
  2081. pygame.tests
  2082. Pygame unit test suite package
  2083. pygame.tests.run
  2084. pygame.tests.run(*args, **kwds): return tuple
  2085. Run the Pygame unit test suite
  2086. pygame.time
  2087. pygame module for monitoring time
  2088. pygame.time.get_ticks
  2089. pygame.time.get_ticks(): return milliseconds
  2090. get the time in milliseconds
  2091. pygame.time.wait
  2092. pygame.time.wait(milliseconds): return time
  2093. pause the program for an amount of time
  2094. pygame.time.delay
  2095. pygame.time.delay(milliseconds): return time
  2096. pause the program for an amount of time
  2097. pygame.time.set_timer
  2098. pygame.time.set_timer(eventid, milliseconds): return None
  2099. repeatedly create an event on the event queue
  2100. pygame.time.Clock
  2101. pygame.time.Clock(): return Clock
  2102. create an object to help track time
  2103. Clock.tick
  2104. Clock.tick(framerate=0): return milliseconds
  2105. control timer events
  2106. update the clock
  2107. Clock.tick_busy_loop
  2108. Clock.tick_busy_loop(framerate=0): return milliseconds
  2109. control timer events
  2110. update the clock
  2111. Clock.get_time
  2112. Clock.get_time(): return milliseconds
  2113. time used in the previous tick
  2114. Clock.get_rawtime
  2115. Clock.get_rawtime(): return milliseconds
  2116. actual time used in the previous tick
  2117. Clock.get_fps
  2118. Clock.get_fps(): return float
  2119. compute the clock framerate
  2120. pygame.transform
  2121. pygame module to transform surfaces
  2122. pygame.transform.flip
  2123. pygame.transform.flip(Surface, xbool, ybool): return Surface
  2124. flip vertically and horizontally
  2125. pygame.transform.scale
  2126. pygame.transform.scale(Surface, (width, height), DestSurface = None): return Surface
  2127. resize to new resolution
  2128. pygame.transform.rotate
  2129. pygame.transform.rotate(Surface, angle): return Surface
  2130. rotate an image
  2131. pygame.transform.rotozoom
  2132. pygame.transform.rotozoom(Surface, angle, scale): return Surface
  2133. filtered scale and rotation
  2134. pygame.transform.scale2x
  2135. pygame.transform.scale2x(Surface, DestSurface = None): Surface
  2136. specialized image doubler
  2137. pygame.transform.smoothscale
  2138. pygame.transform.smoothscale(Surface, (width, height), DestSurface = None): return Surface
  2139. scale a surface to an arbitrary size smoothly
  2140. pygame.transform.get_smoothscale_backend
  2141. pygame.transform.get_smoothscale_backend(): return String
  2142. return smoothscale filter version in use: 'GENERIC', 'MMX', or 'SSE'
  2143. pygame.transform.set_smoothscale_backend
  2144. pygame.transform.get_smoothscale_backend(type): return None
  2145. set smoothscale filter version to one of: 'GENERIC', 'MMX', or 'SSE'
  2146. pygame.transform.chop
  2147. pygame.transform.chop(Surface, rect): return Surface
  2148. gets a copy of an image with an interior area removed
  2149. pygame.transform.laplacian
  2150. pygame.transform.laplacian(Surface, DestSurface = None): return Surface
  2151. find edges in a surface
  2152. pygame.transform.average_surfaces
  2153. pygame.transform.average_surfaces(Surfaces, DestSurface = None, palette_colors = 1): return Surface
  2154. find the average surface from many surfaces.
  2155. pygame.transform.average_color
  2156. pygame.transform.average_color(Surface, Rect = None): return Color
  2157. finds the average color of a surface
  2158. pygame.transform.threshold
  2159. pygame.transform.threshold(DestSurface, Surface, color, threshold = (0,0,0,0), diff_color = (0,0,0,0), change_return = 1, Surface = None, inverse = False): return num_threshold_pixels
  2160. finds which, and how many pixels in a surface are within a threshold of a color.
  2161. */