From c5348bd1c6ec70596675c874fb2e2f060538215b Mon Sep 17 00:00:00 2001 From: b3yond Date: Sat, 13 May 2017 11:00:53 +0200 Subject: [PATCH] added pysdl2 setup. --- PySDL2-0.9.5/AUTHORS.txt | 17 + PySDL2-0.9.5/COPYING.txt | 1 + PySDL2-0.9.5/Makefile | 91 + PySDL2-0.9.5/PKG-INFO | 49 + PySDL2-0.9.5/README.txt | 23 + PySDL2-0.9.5/doc/Makefile | 154 + PySDL2-0.9.5/doc/conf.py | 253 + PySDL2-0.9.5/doc/copying.rst | 60 + PySDL2-0.9.5/doc/faq.rst | 63 + PySDL2-0.9.5/doc/html/.buildinfo | 4 + .../doc/html/_images/copprocessing.png | Bin 0 -> 16539 bytes PySDL2-0.9.5/doc/html/_images/ebs.png | Bin 0 -> 11350 bytes .../doc/html/_images/uiprocessing.png | Bin 0 -> 16200 bytes PySDL2-0.9.5/doc/html/_sources/copying.txt | 60 + PySDL2-0.9.5/doc/html/_sources/faq.txt | 63 + PySDL2-0.9.5/doc/html/_sources/index.txt | 41 + PySDL2-0.9.5/doc/html/_sources/install.txt | 95 + .../doc/html/_sources/integration.txt | 77 + .../doc/html/_sources/modules/index.txt | 16 + .../doc/html/_sources/modules/sdl2.txt | 177 + .../doc/html/_sources/modules/sdl2_sdlgfx.txt | 13 + .../html/_sources/modules/sdl2_sdlimage.txt | 13 + .../html/_sources/modules/sdl2_sdlmixer.txt | 13 + .../doc/html/_sources/modules/sdl2_sdlttf.txt | 13 + .../doc/html/_sources/modules/sdl2ext.txt | 33 + .../_sources/modules/sdl2ext_algorithms.txt | 42 + .../html/_sources/modules/sdl2ext_array.txt | 276 + .../html/_sources/modules/sdl2ext_color.txt | 141 + .../modules/sdl2ext_colorpalettes.txt | 29 + .../html/_sources/modules/sdl2ext_common.txt | 38 + .../html/_sources/modules/sdl2ext_compat.txt | 86 + .../html/_sources/modules/sdl2ext_draw.txt | 44 + .../doc/html/_sources/modules/sdl2ext_ebs.txt | 419 + .../html/_sources/modules/sdl2ext_events.txt | 81 + .../html/_sources/modules/sdl2ext_font.txt | 114 + .../doc/html/_sources/modules/sdl2ext_gui.txt | 284 + .../html/_sources/modules/sdl2ext_image.txt | 27 + .../_sources/modules/sdl2ext_particles.txt | 96 + .../_sources/modules/sdl2ext_pixelaccess.txt | 56 + .../_sources/modules/sdl2ext_resources.txt | 180 + .../html/_sources/modules/sdl2ext_sprite.txt | 383 + .../html/_sources/modules/sdl2ext_surface.txt | 14 + .../html/_sources/modules/sdl2ext_window.txt | 71 + PySDL2-0.9.5/doc/html/_sources/news.txt | 277 + PySDL2-0.9.5/doc/html/_sources/todos.txt | 11 + .../doc/html/_sources/tutorial/helloworld.txt | 128 + .../doc/html/_sources/tutorial/index.txt | 17 + .../doc/html/_sources/tutorial/pong.txt | 590 + .../doc/html/_sources/tutorial/pygamers.txt | 369 + PySDL2-0.9.5/doc/html/_static/ajax-loader.gif | Bin 0 -> 673 bytes PySDL2-0.9.5/doc/html/_static/basic.css | 604 + PySDL2-0.9.5/doc/html/_static/classic.css | 261 + .../doc/html/_static/comment-bright.png | Bin 0 -> 3500 bytes .../doc/html/_static/comment-close.png | Bin 0 -> 3578 bytes PySDL2-0.9.5/doc/html/_static/comment.png | Bin 0 -> 3445 bytes PySDL2-0.9.5/doc/html/_static/default.css | 1 + PySDL2-0.9.5/doc/html/_static/doctools.js | 287 + .../doc/html/_static/down-pressed.png | Bin 0 -> 347 bytes PySDL2-0.9.5/doc/html/_static/down.png | Bin 0 -> 347 bytes PySDL2-0.9.5/doc/html/_static/file.png | Bin 0 -> 358 bytes .../doc/html/_static/jquery-1.11.1.js | 10308 ++++++++++++++++ PySDL2-0.9.5/doc/html/_static/jquery.js | 4 + PySDL2-0.9.5/doc/html/_static/minus.png | Bin 0 -> 173 bytes PySDL2-0.9.5/doc/html/_static/plus.png | Bin 0 -> 173 bytes PySDL2-0.9.5/doc/html/_static/pygments.css | 65 + PySDL2-0.9.5/doc/html/_static/searchtools.js | 651 + PySDL2-0.9.5/doc/html/_static/sidebar.js | 159 + .../doc/html/_static/underscore-1.3.1.js | 999 ++ PySDL2-0.9.5/doc/html/_static/underscore.js | 31 + PySDL2-0.9.5/doc/html/_static/up-pressed.png | Bin 0 -> 345 bytes PySDL2-0.9.5/doc/html/_static/up.png | Bin 0 -> 345 bytes PySDL2-0.9.5/doc/html/_static/websupport.js | 808 ++ PySDL2-0.9.5/doc/html/copying.html | 161 + PySDL2-0.9.5/doc/html/faq.html | 179 + PySDL2-0.9.5/doc/html/genindex.html | 1332 ++ PySDL2-0.9.5/doc/html/index.html | 200 + PySDL2-0.9.5/doc/html/install.html | 218 + PySDL2-0.9.5/doc/html/integration.html | 196 + PySDL2-0.9.5/doc/html/modules/index.html | 154 + PySDL2-0.9.5/doc/html/modules/sdl2.html | 296 + .../doc/html/modules/sdl2_sdlgfx.html | 124 + .../doc/html/modules/sdl2_sdlimage.html | 124 + .../doc/html/modules/sdl2_sdlmixer.html | 124 + .../doc/html/modules/sdl2_sdlttf.html | 124 + PySDL2-0.9.5/doc/html/modules/sdl2ext.html | 145 + .../doc/html/modules/sdl2ext_algorithms.html | 159 + .../doc/html/modules/sdl2ext_array.html | 433 + .../doc/html/modules/sdl2ext_color.html | 299 + .../html/modules/sdl2ext_colorpalettes.html | 168 + .../doc/html/modules/sdl2ext_common.html | 174 + .../doc/html/modules/sdl2ext_compat.html | 235 + .../doc/html/modules/sdl2ext_draw.html | 163 + .../doc/html/modules/sdl2ext_ebs.html | 572 + .../doc/html/modules/sdl2ext_events.html | 209 + .../doc/html/modules/sdl2ext_font.html | 261 + .../doc/html/modules/sdl2ext_gui.html | 435 + .../doc/html/modules/sdl2ext_image.html | 144 + .../doc/html/modules/sdl2ext_particles.html | 233 + .../doc/html/modules/sdl2ext_pixelaccess.html | 176 + .../doc/html/modules/sdl2ext_resources.html | 312 + .../doc/html/modules/sdl2ext_sprite.html | 604 + .../doc/html/modules/sdl2ext_surface.html | 132 + .../doc/html/modules/sdl2ext_window.html | 207 + PySDL2-0.9.5/doc/html/news.html | 418 + PySDL2-0.9.5/doc/html/objects.inv | Bin 0 -> 2920 bytes PySDL2-0.9.5/doc/html/py-modindex.html | 146 + PySDL2-0.9.5/doc/html/search.html | 105 + PySDL2-0.9.5/doc/html/searchindex.js | 1 + PySDL2-0.9.5/doc/html/todos.html | 137 + .../doc/html/tutorial/helloworld.html | 247 + PySDL2-0.9.5/doc/html/tutorial/index.html | 149 + PySDL2-0.9.5/doc/html/tutorial/pong.html | 710 ++ PySDL2-0.9.5/doc/html/tutorial/pygamers.html | 926 ++ PySDL2-0.9.5/doc/index.rst | 41 + PySDL2-0.9.5/doc/install.rst | 95 + PySDL2-0.9.5/doc/integration.rst | 77 + PySDL2-0.9.5/doc/make.bat | 215 + .../doc/modules/images/coordinate_rhs.dia | Bin 0 -> 955 bytes .../doc/modules/images/coordinate_rhs.png | Bin 0 -> 2526 bytes .../doc/modules/images/copprocessing.dia | Bin 0 -> 2407 bytes .../doc/modules/images/copprocessing.png | Bin 0 -> 16539 bytes PySDL2-0.9.5/doc/modules/images/ebs.dia | Bin 0 -> 1834 bytes PySDL2-0.9.5/doc/modules/images/ebs.png | Bin 0 -> 11350 bytes .../doc/modules/images/uiprocessing.dia | Bin 0 -> 1862 bytes .../doc/modules/images/uiprocessing.png | Bin 0 -> 16200 bytes PySDL2-0.9.5/doc/modules/index.rst | 16 + PySDL2-0.9.5/doc/modules/sdl2.rst | 177 + PySDL2-0.9.5/doc/modules/sdl2_sdlgfx.rst | 13 + PySDL2-0.9.5/doc/modules/sdl2_sdlimage.rst | 13 + PySDL2-0.9.5/doc/modules/sdl2_sdlmixer.rst | 13 + PySDL2-0.9.5/doc/modules/sdl2_sdlttf.rst | 13 + PySDL2-0.9.5/doc/modules/sdl2ext.rst | 33 + .../doc/modules/sdl2ext_algorithms.rst | 42 + PySDL2-0.9.5/doc/modules/sdl2ext_array.rst | 276 + PySDL2-0.9.5/doc/modules/sdl2ext_color.rst | 141 + .../doc/modules/sdl2ext_colorpalettes.rst | 29 + PySDL2-0.9.5/doc/modules/sdl2ext_common.rst | 38 + PySDL2-0.9.5/doc/modules/sdl2ext_compat.rst | 86 + PySDL2-0.9.5/doc/modules/sdl2ext_draw.rst | 44 + PySDL2-0.9.5/doc/modules/sdl2ext_ebs.rst | 419 + PySDL2-0.9.5/doc/modules/sdl2ext_events.rst | 81 + PySDL2-0.9.5/doc/modules/sdl2ext_font.rst | 114 + PySDL2-0.9.5/doc/modules/sdl2ext_gui.rst | 284 + PySDL2-0.9.5/doc/modules/sdl2ext_image.rst | 27 + .../doc/modules/sdl2ext_particles.rst | 96 + .../doc/modules/sdl2ext_pixelaccess.rst | 56 + .../doc/modules/sdl2ext_resources.rst | 180 + PySDL2-0.9.5/doc/modules/sdl2ext_sprite.rst | 383 + PySDL2-0.9.5/doc/modules/sdl2ext_surface.rst | 14 + PySDL2-0.9.5/doc/modules/sdl2ext_window.rst | 71 + PySDL2-0.9.5/doc/news.rst | 277 + PySDL2-0.9.5/doc/python.inv | Bin 0 -> 114069 bytes PySDL2-0.9.5/doc/todos.rst | 11 + PySDL2-0.9.5/doc/tutorial/helloworld.rst | 128 + PySDL2-0.9.5/doc/tutorial/index.rst | 17 + PySDL2-0.9.5/doc/tutorial/pong.rst | 590 + PySDL2-0.9.5/doc/tutorial/pygamers.rst | 369 + PySDL2-0.9.5/examples/__init__.py | 5 + PySDL2-0.9.5/examples/colorpalettes.py | 158 + PySDL2-0.9.5/examples/draw.py | 101 + PySDL2-0.9.5/examples/gfxdrawing.py | 342 + PySDL2-0.9.5/examples/gui.py | 155 + PySDL2-0.9.5/examples/helloworld.py | 78 + PySDL2-0.9.5/examples/opengl.py | 57 + PySDL2-0.9.5/examples/particles.py | 234 + PySDL2-0.9.5/examples/pixelaccess.py | 106 + PySDL2-0.9.5/examples/pong.py | 234 + PySDL2-0.9.5/examples/resources/button.bmp | Bin 0 -> 15054 bytes PySDL2-0.9.5/examples/resources/circle.png | Bin 0 -> 355 bytes PySDL2-0.9.5/examples/resources/font.bmp | Bin 0 -> 254790 bytes PySDL2-0.9.5/examples/resources/hello.bmp | Bin 0 -> 1089334 bytes PySDL2-0.9.5/examples/resources/square.png | Bin 0 -> 272 bytes PySDL2-0.9.5/examples/resources/star.png | Bin 0 -> 380 bytes PySDL2-0.9.5/examples/resources/testimage.svg | 1996 +++ PySDL2-0.9.5/examples/resources/textentry.bmp | Bin 0 -> 15054 bytes PySDL2-0.9.5/examples/resources/tuffy.ttf | Bin 0 -> 172324 bytes PySDL2-0.9.5/examples/sdl2hello.py | 37 + PySDL2-0.9.5/examples/transfomations.py | 68 + PySDL2-0.9.5/make.bat | 133 + PySDL2-0.9.5/sdl2/__init__.py | 65 + PySDL2-0.9.5/sdl2/audio.py | 167 + PySDL2-0.9.5/sdl2/blendmode.py | 11 + PySDL2-0.9.5/sdl2/clipboard.py | 10 + PySDL2-0.9.5/sdl2/cpuinfo.py | 26 + PySDL2-0.9.5/sdl2/dll.py | 121 + PySDL2-0.9.5/sdl2/endian.py | 48 + PySDL2-0.9.5/sdl2/error.py | 24 + PySDL2-0.9.5/sdl2/events.py | 406 + PySDL2-0.9.5/sdl2/ext/__init__.py | 22 + PySDL2-0.9.5/sdl2/ext/algorithms.py | 124 + PySDL2-0.9.5/sdl2/ext/array.py | 312 + PySDL2-0.9.5/sdl2/ext/color.py | 589 + PySDL2-0.9.5/sdl2/ext/colorpalettes.py | 214 + PySDL2-0.9.5/sdl2/ext/common.py | 98 + PySDL2-0.9.5/sdl2/ext/compat.py | 106 + PySDL2-0.9.5/sdl2/ext/draw.py | 159 + PySDL2-0.9.5/sdl2/ext/ebs.py | 284 + PySDL2-0.9.5/sdl2/ext/events.py | 97 + PySDL2-0.9.5/sdl2/ext/font.py | 357 + PySDL2-0.9.5/sdl2/ext/gui.py | 352 + PySDL2-0.9.5/sdl2/ext/image.py | 155 + PySDL2-0.9.5/sdl2/ext/particles.py | 126 + PySDL2-0.9.5/sdl2/ext/pixelaccess.py | 181 + PySDL2-0.9.5/sdl2/ext/resources.py | 318 + PySDL2-0.9.5/sdl2/ext/sprite.py | 774 ++ PySDL2-0.9.5/sdl2/ext/surface.py | 19 + PySDL2-0.9.5/sdl2/ext/window.py | 110 + PySDL2-0.9.5/sdl2/filesystem.py | 9 + PySDL2-0.9.5/sdl2/gamecontroller.py | 110 + PySDL2-0.9.5/sdl2/gesture.py | 15 + PySDL2-0.9.5/sdl2/haptic.py | 194 + PySDL2-0.9.5/sdl2/hints.py | 112 + PySDL2-0.9.5/sdl2/joystick.py | 76 + PySDL2-0.9.5/sdl2/keyboard.py | 40 + PySDL2-0.9.5/sdl2/keycode.py | 288 + PySDL2-0.9.5/sdl2/loadso.py | 8 + PySDL2-0.9.5/sdl2/log.py | 72 + PySDL2-0.9.5/sdl2/messagebox.py | 54 + PySDL2-0.9.5/sdl2/mouse.py | 76 + PySDL2-0.9.5/sdl2/pixels.py | 339 + PySDL2-0.9.5/sdl2/platform.py | 6 + PySDL2-0.9.5/sdl2/power.py | 17 + PySDL2-0.9.5/sdl2/rect.py | 75 + PySDL2-0.9.5/sdl2/render.py | 135 + PySDL2-0.9.5/sdl2/rwops.py | 200 + PySDL2-0.9.5/sdl2/scancode.py | 270 + PySDL2-0.9.5/sdl2/sdlgfx.py | 142 + PySDL2-0.9.5/sdl2/sdlimage.py | 105 + PySDL2-0.9.5/sdl2/sdlmixer.py | 208 + PySDL2-0.9.5/sdl2/sdlttf.py | 140 + PySDL2-0.9.5/sdl2/shape.py | 42 + PySDL2-0.9.5/sdl2/stdinc.py | 35 + PySDL2-0.9.5/sdl2/surface.py | 89 + PySDL2-0.9.5/sdl2/syswm.py | 167 + PySDL2-0.9.5/sdl2/test/__init__.py | 12 + PySDL2-0.9.5/sdl2/test/audio_test.py | 319 + PySDL2-0.9.5/sdl2/test/clipboard_test.py | 55 + PySDL2-0.9.5/sdl2/test/cpuinfo_test.py | 73 + PySDL2-0.9.5/sdl2/test/endian_test.py | 98 + PySDL2-0.9.5/sdl2/test/error_test.py | 33 + PySDL2-0.9.5/sdl2/test/events_test.py | 204 + PySDL2-0.9.5/sdl2/test/filesystem_test.py | 28 + PySDL2-0.9.5/sdl2/test/hints_test.py | 91 + PySDL2-0.9.5/sdl2/test/joystick_test.py | 155 + PySDL2-0.9.5/sdl2/test/keyboard_test.py | 188 + PySDL2-0.9.5/sdl2/test/log_test.py | 274 + PySDL2-0.9.5/sdl2/test/mouse_test.py | 59 + PySDL2-0.9.5/sdl2/test/pixels_test.py | 591 + PySDL2-0.9.5/sdl2/test/platform_test.py | 24 + PySDL2-0.9.5/sdl2/test/power_test.py | 34 + PySDL2-0.9.5/sdl2/test/rect_test.py | 439 + PySDL2-0.9.5/sdl2/test/render_test.py | 816 ++ PySDL2-0.9.5/sdl2/test/resources/font.bmp | Bin 0 -> 254790 bytes .../sdl2/test/resources/resources.tar.gz | Bin 0 -> 400 bytes .../sdl2/test/resources/resources.zip | Bin 0 -> 744 bytes .../sdl2/test/resources/rwopstest.txt | 4 + .../sdl2/test/resources/surfacetest.bmp | Bin 0 -> 4150 bytes .../sdl2/test/resources/surfacetest.cur | Bin 0 -> 2238 bytes .../sdl2/test/resources/surfacetest.gif | Bin 0 -> 979 bytes .../sdl2/test/resources/surfacetest.ico | Bin 0 -> 2238 bytes .../sdl2/test/resources/surfacetest.jpg | Bin 0 -> 358 bytes .../sdl2/test/resources/surfacetest.lbm | Bin 0 -> 3132 bytes .../sdl2/test/resources/surfacetest.pbm | Bin 0 -> 160 bytes .../sdl2/test/resources/surfacetest.pcx | Bin 0 -> 672 bytes .../sdl2/test/resources/surfacetest.pgm | Bin 0 -> 1060 bytes .../sdl2/test/resources/surfacetest.png | Bin 0 -> 139 bytes .../sdl2/test/resources/surfacetest.pnm | Bin 0 -> 3085 bytes .../sdl2/test/resources/surfacetest.ppm | Bin 0 -> 3108 bytes .../sdl2/test/resources/surfacetest.tga | Bin 0 -> 3090 bytes .../sdl2/test/resources/surfacetest.tif | Bin 0 -> 3298 bytes .../sdl2/test/resources/surfacetest.webp | Bin 0 -> 104 bytes .../sdl2/test/resources/surfacetest.xcf | Bin 0 -> 1054 bytes .../sdl2/test/resources/surfacetest.xpm | 41 + .../sdl2/test/resources/tuffy.copy.ttf | Bin 0 -> 172324 bytes PySDL2-0.9.5/sdl2/test/resources/tuffy.ttf | Bin 0 -> 172324 bytes PySDL2-0.9.5/sdl2/test/rwops_test.py | 389 + .../sdl2/test/sdl2ext_algorithms_test.py | 26 + PySDL2-0.9.5/sdl2/test/sdl2ext_array_test.py | 365 + PySDL2-0.9.5/sdl2/test/sdl2ext_color_test.py | 777 ++ PySDL2-0.9.5/sdl2/test/sdl2ext_draw_test.py | 80 + PySDL2-0.9.5/sdl2/test/sdl2ext_ebs_test.py | 312 + PySDL2-0.9.5/sdl2/test/sdl2ext_events_test.py | 207 + PySDL2-0.9.5/sdl2/test/sdl2ext_font_test.py | 146 + PySDL2-0.9.5/sdl2/test/sdl2ext_gui_test.py | 85 + PySDL2-0.9.5/sdl2/test/sdl2ext_image_test.py | 71 + .../sdl2/test/sdl2ext_particles_test.py | 125 + .../sdl2/test/sdl2ext_pixelaccess_test.py | 67 + .../sdl2/test/sdl2ext_resources_test.py | 241 + PySDL2-0.9.5/sdl2/test/sdl2ext_sprite_test.py | 715 ++ PySDL2-0.9.5/sdl2/test/sdl2ext_test.py | 60 + PySDL2-0.9.5/sdl2/test/sdl2ext_window_test.py | 90 + PySDL2-0.9.5/sdl2/test/sdl_test.py | 57 + PySDL2-0.9.5/sdl2/test/sdlgfx_test.py | 319 + PySDL2-0.9.5/sdl2/test/sdlimage_test.py | 490 + PySDL2-0.9.5/sdl2/test/sdlmixer_test.py | 25 + PySDL2-0.9.5/sdl2/test/sdlttf_test.py | 311 + PySDL2-0.9.5/sdl2/test/shape_test.py | 101 + PySDL2-0.9.5/sdl2/test/surface_test.py | 690 ++ PySDL2-0.9.5/sdl2/test/syswm_test.py | 39 + PySDL2-0.9.5/sdl2/test/timer_test.py | 91 + PySDL2-0.9.5/sdl2/test/util/__init__.py | 0 PySDL2-0.9.5/sdl2/test/util/runtests.py | 339 + PySDL2-0.9.5/sdl2/test/util/support.py | 61 + PySDL2-0.9.5/sdl2/test/util/testrunner.py | 110 + PySDL2-0.9.5/sdl2/test/util/testutils.py | 42 + PySDL2-0.9.5/sdl2/test/version_test.py | 54 + PySDL2-0.9.5/sdl2/test/video_test.py | 923 ++ PySDL2-0.9.5/sdl2/timer.py | 23 + PySDL2-0.9.5/sdl2/touch.py | 24 + PySDL2-0.9.5/sdl2/version.py | 31 + PySDL2-0.9.5/sdl2/video.py | 320 + PySDL2-0.9.5/setup.py | 58 + PySDL2-0.9.5/util/valgrind.sh | 40 + README.md | 9 +- code/augmentations.pyc | Bin 3373 -> 3373 bytes code/editor.pyc | Bin 29479 -> 29479 bytes code/enemies.pyc | Bin 2454 -> 2454 bytes code/game.pyc | Bin 43340 -> 43340 bytes code/items.pyc | Bin 3802 -> 3802 bytes 319 files changed, 58344 insertions(+), 1 deletion(-) create mode 100644 PySDL2-0.9.5/AUTHORS.txt create mode 100644 PySDL2-0.9.5/COPYING.txt create mode 100644 PySDL2-0.9.5/Makefile create mode 100644 PySDL2-0.9.5/PKG-INFO create mode 100644 PySDL2-0.9.5/README.txt create mode 100644 PySDL2-0.9.5/doc/Makefile create mode 100644 PySDL2-0.9.5/doc/conf.py create mode 100644 PySDL2-0.9.5/doc/copying.rst create mode 100644 PySDL2-0.9.5/doc/faq.rst create mode 100644 PySDL2-0.9.5/doc/html/.buildinfo create mode 100644 PySDL2-0.9.5/doc/html/_images/copprocessing.png create mode 100644 PySDL2-0.9.5/doc/html/_images/ebs.png create mode 100644 PySDL2-0.9.5/doc/html/_images/uiprocessing.png create mode 100644 PySDL2-0.9.5/doc/html/_sources/copying.txt create mode 100644 PySDL2-0.9.5/doc/html/_sources/faq.txt create mode 100644 PySDL2-0.9.5/doc/html/_sources/index.txt create mode 100644 PySDL2-0.9.5/doc/html/_sources/install.txt create mode 100644 PySDL2-0.9.5/doc/html/_sources/integration.txt create mode 100644 PySDL2-0.9.5/doc/html/_sources/modules/index.txt create mode 100644 PySDL2-0.9.5/doc/html/_sources/modules/sdl2.txt create mode 100644 PySDL2-0.9.5/doc/html/_sources/modules/sdl2_sdlgfx.txt create mode 100644 PySDL2-0.9.5/doc/html/_sources/modules/sdl2_sdlimage.txt create mode 100644 PySDL2-0.9.5/doc/html/_sources/modules/sdl2_sdlmixer.txt create mode 100644 PySDL2-0.9.5/doc/html/_sources/modules/sdl2_sdlttf.txt create mode 100644 PySDL2-0.9.5/doc/html/_sources/modules/sdl2ext.txt create mode 100644 PySDL2-0.9.5/doc/html/_sources/modules/sdl2ext_algorithms.txt create mode 100644 PySDL2-0.9.5/doc/html/_sources/modules/sdl2ext_array.txt create mode 100644 PySDL2-0.9.5/doc/html/_sources/modules/sdl2ext_color.txt create mode 100644 PySDL2-0.9.5/doc/html/_sources/modules/sdl2ext_colorpalettes.txt create mode 100644 PySDL2-0.9.5/doc/html/_sources/modules/sdl2ext_common.txt create mode 100644 PySDL2-0.9.5/doc/html/_sources/modules/sdl2ext_compat.txt create mode 100644 PySDL2-0.9.5/doc/html/_sources/modules/sdl2ext_draw.txt create mode 100644 PySDL2-0.9.5/doc/html/_sources/modules/sdl2ext_ebs.txt create mode 100644 PySDL2-0.9.5/doc/html/_sources/modules/sdl2ext_events.txt create mode 100644 PySDL2-0.9.5/doc/html/_sources/modules/sdl2ext_font.txt create mode 100644 PySDL2-0.9.5/doc/html/_sources/modules/sdl2ext_gui.txt create mode 100644 PySDL2-0.9.5/doc/html/_sources/modules/sdl2ext_image.txt create mode 100644 PySDL2-0.9.5/doc/html/_sources/modules/sdl2ext_particles.txt create mode 100644 PySDL2-0.9.5/doc/html/_sources/modules/sdl2ext_pixelaccess.txt create mode 100644 PySDL2-0.9.5/doc/html/_sources/modules/sdl2ext_resources.txt create mode 100644 PySDL2-0.9.5/doc/html/_sources/modules/sdl2ext_sprite.txt create mode 100644 PySDL2-0.9.5/doc/html/_sources/modules/sdl2ext_surface.txt create mode 100644 PySDL2-0.9.5/doc/html/_sources/modules/sdl2ext_window.txt create mode 100644 PySDL2-0.9.5/doc/html/_sources/news.txt create mode 100644 PySDL2-0.9.5/doc/html/_sources/todos.txt create mode 100644 PySDL2-0.9.5/doc/html/_sources/tutorial/helloworld.txt create mode 100644 PySDL2-0.9.5/doc/html/_sources/tutorial/index.txt create mode 100644 PySDL2-0.9.5/doc/html/_sources/tutorial/pong.txt create mode 100644 PySDL2-0.9.5/doc/html/_sources/tutorial/pygamers.txt create mode 100644 PySDL2-0.9.5/doc/html/_static/ajax-loader.gif create mode 100644 PySDL2-0.9.5/doc/html/_static/basic.css create mode 100644 PySDL2-0.9.5/doc/html/_static/classic.css create mode 100644 PySDL2-0.9.5/doc/html/_static/comment-bright.png create mode 100644 PySDL2-0.9.5/doc/html/_static/comment-close.png create mode 100644 PySDL2-0.9.5/doc/html/_static/comment.png create mode 100644 PySDL2-0.9.5/doc/html/_static/default.css create mode 100644 PySDL2-0.9.5/doc/html/_static/doctools.js create mode 100644 PySDL2-0.9.5/doc/html/_static/down-pressed.png create mode 100644 PySDL2-0.9.5/doc/html/_static/down.png create mode 100644 PySDL2-0.9.5/doc/html/_static/file.png create mode 100644 PySDL2-0.9.5/doc/html/_static/jquery-1.11.1.js create mode 100644 PySDL2-0.9.5/doc/html/_static/jquery.js create mode 100644 PySDL2-0.9.5/doc/html/_static/minus.png create mode 100644 PySDL2-0.9.5/doc/html/_static/plus.png create mode 100644 PySDL2-0.9.5/doc/html/_static/pygments.css create mode 100644 PySDL2-0.9.5/doc/html/_static/searchtools.js create mode 100644 PySDL2-0.9.5/doc/html/_static/sidebar.js create mode 100644 PySDL2-0.9.5/doc/html/_static/underscore-1.3.1.js create mode 100644 PySDL2-0.9.5/doc/html/_static/underscore.js create mode 100644 PySDL2-0.9.5/doc/html/_static/up-pressed.png create mode 100644 PySDL2-0.9.5/doc/html/_static/up.png create mode 100644 PySDL2-0.9.5/doc/html/_static/websupport.js create mode 100644 PySDL2-0.9.5/doc/html/copying.html create mode 100644 PySDL2-0.9.5/doc/html/faq.html create mode 100644 PySDL2-0.9.5/doc/html/genindex.html create mode 100644 PySDL2-0.9.5/doc/html/index.html create mode 100644 PySDL2-0.9.5/doc/html/install.html create mode 100644 PySDL2-0.9.5/doc/html/integration.html create mode 100644 PySDL2-0.9.5/doc/html/modules/index.html create mode 100644 PySDL2-0.9.5/doc/html/modules/sdl2.html create mode 100644 PySDL2-0.9.5/doc/html/modules/sdl2_sdlgfx.html create mode 100644 PySDL2-0.9.5/doc/html/modules/sdl2_sdlimage.html create mode 100644 PySDL2-0.9.5/doc/html/modules/sdl2_sdlmixer.html create mode 100644 PySDL2-0.9.5/doc/html/modules/sdl2_sdlttf.html create mode 100644 PySDL2-0.9.5/doc/html/modules/sdl2ext.html create mode 100644 PySDL2-0.9.5/doc/html/modules/sdl2ext_algorithms.html create mode 100644 PySDL2-0.9.5/doc/html/modules/sdl2ext_array.html create mode 100644 PySDL2-0.9.5/doc/html/modules/sdl2ext_color.html create mode 100644 PySDL2-0.9.5/doc/html/modules/sdl2ext_colorpalettes.html create mode 100644 PySDL2-0.9.5/doc/html/modules/sdl2ext_common.html create mode 100644 PySDL2-0.9.5/doc/html/modules/sdl2ext_compat.html create mode 100644 PySDL2-0.9.5/doc/html/modules/sdl2ext_draw.html create mode 100644 PySDL2-0.9.5/doc/html/modules/sdl2ext_ebs.html create mode 100644 PySDL2-0.9.5/doc/html/modules/sdl2ext_events.html create mode 100644 PySDL2-0.9.5/doc/html/modules/sdl2ext_font.html create mode 100644 PySDL2-0.9.5/doc/html/modules/sdl2ext_gui.html create mode 100644 PySDL2-0.9.5/doc/html/modules/sdl2ext_image.html create mode 100644 PySDL2-0.9.5/doc/html/modules/sdl2ext_particles.html create mode 100644 PySDL2-0.9.5/doc/html/modules/sdl2ext_pixelaccess.html create mode 100644 PySDL2-0.9.5/doc/html/modules/sdl2ext_resources.html create mode 100644 PySDL2-0.9.5/doc/html/modules/sdl2ext_sprite.html create mode 100644 PySDL2-0.9.5/doc/html/modules/sdl2ext_surface.html create mode 100644 PySDL2-0.9.5/doc/html/modules/sdl2ext_window.html create mode 100644 PySDL2-0.9.5/doc/html/news.html create mode 100644 PySDL2-0.9.5/doc/html/objects.inv create mode 100644 PySDL2-0.9.5/doc/html/py-modindex.html create mode 100644 PySDL2-0.9.5/doc/html/search.html create mode 100644 PySDL2-0.9.5/doc/html/searchindex.js create mode 100644 PySDL2-0.9.5/doc/html/todos.html create mode 100644 PySDL2-0.9.5/doc/html/tutorial/helloworld.html create mode 100644 PySDL2-0.9.5/doc/html/tutorial/index.html create mode 100644 PySDL2-0.9.5/doc/html/tutorial/pong.html create mode 100644 PySDL2-0.9.5/doc/html/tutorial/pygamers.html create mode 100644 PySDL2-0.9.5/doc/index.rst create mode 100644 PySDL2-0.9.5/doc/install.rst create mode 100644 PySDL2-0.9.5/doc/integration.rst create mode 100644 PySDL2-0.9.5/doc/make.bat create mode 100644 PySDL2-0.9.5/doc/modules/images/coordinate_rhs.dia create mode 100644 PySDL2-0.9.5/doc/modules/images/coordinate_rhs.png create mode 100644 PySDL2-0.9.5/doc/modules/images/copprocessing.dia create mode 100644 PySDL2-0.9.5/doc/modules/images/copprocessing.png create mode 100644 PySDL2-0.9.5/doc/modules/images/ebs.dia create mode 100644 PySDL2-0.9.5/doc/modules/images/ebs.png create mode 100644 PySDL2-0.9.5/doc/modules/images/uiprocessing.dia create mode 100644 PySDL2-0.9.5/doc/modules/images/uiprocessing.png create mode 100644 PySDL2-0.9.5/doc/modules/index.rst create mode 100644 PySDL2-0.9.5/doc/modules/sdl2.rst create mode 100644 PySDL2-0.9.5/doc/modules/sdl2_sdlgfx.rst create mode 100644 PySDL2-0.9.5/doc/modules/sdl2_sdlimage.rst create mode 100644 PySDL2-0.9.5/doc/modules/sdl2_sdlmixer.rst create mode 100644 PySDL2-0.9.5/doc/modules/sdl2_sdlttf.rst create mode 100644 PySDL2-0.9.5/doc/modules/sdl2ext.rst create mode 100644 PySDL2-0.9.5/doc/modules/sdl2ext_algorithms.rst create mode 100644 PySDL2-0.9.5/doc/modules/sdl2ext_array.rst create mode 100644 PySDL2-0.9.5/doc/modules/sdl2ext_color.rst create mode 100644 PySDL2-0.9.5/doc/modules/sdl2ext_colorpalettes.rst create mode 100644 PySDL2-0.9.5/doc/modules/sdl2ext_common.rst create mode 100644 PySDL2-0.9.5/doc/modules/sdl2ext_compat.rst create mode 100644 PySDL2-0.9.5/doc/modules/sdl2ext_draw.rst create mode 100644 PySDL2-0.9.5/doc/modules/sdl2ext_ebs.rst create mode 100644 PySDL2-0.9.5/doc/modules/sdl2ext_events.rst create mode 100644 PySDL2-0.9.5/doc/modules/sdl2ext_font.rst create mode 100644 PySDL2-0.9.5/doc/modules/sdl2ext_gui.rst create mode 100644 PySDL2-0.9.5/doc/modules/sdl2ext_image.rst create mode 100644 PySDL2-0.9.5/doc/modules/sdl2ext_particles.rst create mode 100644 PySDL2-0.9.5/doc/modules/sdl2ext_pixelaccess.rst create mode 100644 PySDL2-0.9.5/doc/modules/sdl2ext_resources.rst create mode 100644 PySDL2-0.9.5/doc/modules/sdl2ext_sprite.rst create mode 100644 PySDL2-0.9.5/doc/modules/sdl2ext_surface.rst create mode 100644 PySDL2-0.9.5/doc/modules/sdl2ext_window.rst create mode 100644 PySDL2-0.9.5/doc/news.rst create mode 100644 PySDL2-0.9.5/doc/python.inv create mode 100644 PySDL2-0.9.5/doc/todos.rst create mode 100644 PySDL2-0.9.5/doc/tutorial/helloworld.rst create mode 100644 PySDL2-0.9.5/doc/tutorial/index.rst create mode 100644 PySDL2-0.9.5/doc/tutorial/pong.rst create mode 100644 PySDL2-0.9.5/doc/tutorial/pygamers.rst create mode 100644 PySDL2-0.9.5/examples/__init__.py create mode 100644 PySDL2-0.9.5/examples/colorpalettes.py create mode 100644 PySDL2-0.9.5/examples/draw.py create mode 100644 PySDL2-0.9.5/examples/gfxdrawing.py create mode 100644 PySDL2-0.9.5/examples/gui.py create mode 100644 PySDL2-0.9.5/examples/helloworld.py create mode 100644 PySDL2-0.9.5/examples/opengl.py create mode 100644 PySDL2-0.9.5/examples/particles.py create mode 100644 PySDL2-0.9.5/examples/pixelaccess.py create mode 100644 PySDL2-0.9.5/examples/pong.py create mode 100644 PySDL2-0.9.5/examples/resources/button.bmp create mode 100644 PySDL2-0.9.5/examples/resources/circle.png create mode 100644 PySDL2-0.9.5/examples/resources/font.bmp create mode 100644 PySDL2-0.9.5/examples/resources/hello.bmp create mode 100644 PySDL2-0.9.5/examples/resources/square.png create mode 100644 PySDL2-0.9.5/examples/resources/star.png create mode 100644 PySDL2-0.9.5/examples/resources/testimage.svg create mode 100644 PySDL2-0.9.5/examples/resources/textentry.bmp create mode 100644 PySDL2-0.9.5/examples/resources/tuffy.ttf create mode 100644 PySDL2-0.9.5/examples/sdl2hello.py create mode 100644 PySDL2-0.9.5/examples/transfomations.py create mode 100644 PySDL2-0.9.5/make.bat create mode 100644 PySDL2-0.9.5/sdl2/__init__.py create mode 100644 PySDL2-0.9.5/sdl2/audio.py create mode 100644 PySDL2-0.9.5/sdl2/blendmode.py create mode 100644 PySDL2-0.9.5/sdl2/clipboard.py create mode 100644 PySDL2-0.9.5/sdl2/cpuinfo.py create mode 100644 PySDL2-0.9.5/sdl2/dll.py create mode 100644 PySDL2-0.9.5/sdl2/endian.py create mode 100644 PySDL2-0.9.5/sdl2/error.py create mode 100644 PySDL2-0.9.5/sdl2/events.py create mode 100644 PySDL2-0.9.5/sdl2/ext/__init__.py create mode 100644 PySDL2-0.9.5/sdl2/ext/algorithms.py create mode 100644 PySDL2-0.9.5/sdl2/ext/array.py create mode 100644 PySDL2-0.9.5/sdl2/ext/color.py create mode 100644 PySDL2-0.9.5/sdl2/ext/colorpalettes.py create mode 100644 PySDL2-0.9.5/sdl2/ext/common.py create mode 100644 PySDL2-0.9.5/sdl2/ext/compat.py create mode 100644 PySDL2-0.9.5/sdl2/ext/draw.py create mode 100644 PySDL2-0.9.5/sdl2/ext/ebs.py create mode 100644 PySDL2-0.9.5/sdl2/ext/events.py create mode 100644 PySDL2-0.9.5/sdl2/ext/font.py create mode 100644 PySDL2-0.9.5/sdl2/ext/gui.py create mode 100644 PySDL2-0.9.5/sdl2/ext/image.py create mode 100644 PySDL2-0.9.5/sdl2/ext/particles.py create mode 100644 PySDL2-0.9.5/sdl2/ext/pixelaccess.py create mode 100644 PySDL2-0.9.5/sdl2/ext/resources.py create mode 100644 PySDL2-0.9.5/sdl2/ext/sprite.py create mode 100644 PySDL2-0.9.5/sdl2/ext/surface.py create mode 100644 PySDL2-0.9.5/sdl2/ext/window.py create mode 100644 PySDL2-0.9.5/sdl2/filesystem.py create mode 100644 PySDL2-0.9.5/sdl2/gamecontroller.py create mode 100644 PySDL2-0.9.5/sdl2/gesture.py create mode 100644 PySDL2-0.9.5/sdl2/haptic.py create mode 100644 PySDL2-0.9.5/sdl2/hints.py create mode 100644 PySDL2-0.9.5/sdl2/joystick.py create mode 100644 PySDL2-0.9.5/sdl2/keyboard.py create mode 100644 PySDL2-0.9.5/sdl2/keycode.py create mode 100644 PySDL2-0.9.5/sdl2/loadso.py create mode 100644 PySDL2-0.9.5/sdl2/log.py create mode 100644 PySDL2-0.9.5/sdl2/messagebox.py create mode 100644 PySDL2-0.9.5/sdl2/mouse.py create mode 100644 PySDL2-0.9.5/sdl2/pixels.py create mode 100644 PySDL2-0.9.5/sdl2/platform.py create mode 100644 PySDL2-0.9.5/sdl2/power.py create mode 100644 PySDL2-0.9.5/sdl2/rect.py create mode 100644 PySDL2-0.9.5/sdl2/render.py create mode 100644 PySDL2-0.9.5/sdl2/rwops.py create mode 100644 PySDL2-0.9.5/sdl2/scancode.py create mode 100644 PySDL2-0.9.5/sdl2/sdlgfx.py create mode 100644 PySDL2-0.9.5/sdl2/sdlimage.py create mode 100644 PySDL2-0.9.5/sdl2/sdlmixer.py create mode 100644 PySDL2-0.9.5/sdl2/sdlttf.py create mode 100644 PySDL2-0.9.5/sdl2/shape.py create mode 100644 PySDL2-0.9.5/sdl2/stdinc.py create mode 100644 PySDL2-0.9.5/sdl2/surface.py create mode 100644 PySDL2-0.9.5/sdl2/syswm.py create mode 100644 PySDL2-0.9.5/sdl2/test/__init__.py create mode 100644 PySDL2-0.9.5/sdl2/test/audio_test.py create mode 100644 PySDL2-0.9.5/sdl2/test/clipboard_test.py create mode 100644 PySDL2-0.9.5/sdl2/test/cpuinfo_test.py create mode 100644 PySDL2-0.9.5/sdl2/test/endian_test.py create mode 100644 PySDL2-0.9.5/sdl2/test/error_test.py create mode 100644 PySDL2-0.9.5/sdl2/test/events_test.py create mode 100644 PySDL2-0.9.5/sdl2/test/filesystem_test.py create mode 100644 PySDL2-0.9.5/sdl2/test/hints_test.py create mode 100644 PySDL2-0.9.5/sdl2/test/joystick_test.py create mode 100644 PySDL2-0.9.5/sdl2/test/keyboard_test.py create mode 100644 PySDL2-0.9.5/sdl2/test/log_test.py create mode 100644 PySDL2-0.9.5/sdl2/test/mouse_test.py create mode 100644 PySDL2-0.9.5/sdl2/test/pixels_test.py create mode 100644 PySDL2-0.9.5/sdl2/test/platform_test.py create mode 100644 PySDL2-0.9.5/sdl2/test/power_test.py create mode 100644 PySDL2-0.9.5/sdl2/test/rect_test.py create mode 100644 PySDL2-0.9.5/sdl2/test/render_test.py create mode 100644 PySDL2-0.9.5/sdl2/test/resources/font.bmp create mode 100644 PySDL2-0.9.5/sdl2/test/resources/resources.tar.gz create mode 100644 PySDL2-0.9.5/sdl2/test/resources/resources.zip create mode 100644 PySDL2-0.9.5/sdl2/test/resources/rwopstest.txt create mode 100644 PySDL2-0.9.5/sdl2/test/resources/surfacetest.bmp create mode 100644 PySDL2-0.9.5/sdl2/test/resources/surfacetest.cur create mode 100644 PySDL2-0.9.5/sdl2/test/resources/surfacetest.gif create mode 100644 PySDL2-0.9.5/sdl2/test/resources/surfacetest.ico create mode 100644 PySDL2-0.9.5/sdl2/test/resources/surfacetest.jpg create mode 100755 PySDL2-0.9.5/sdl2/test/resources/surfacetest.lbm create mode 100644 PySDL2-0.9.5/sdl2/test/resources/surfacetest.pbm create mode 100644 PySDL2-0.9.5/sdl2/test/resources/surfacetest.pcx create mode 100644 PySDL2-0.9.5/sdl2/test/resources/surfacetest.pgm create mode 100644 PySDL2-0.9.5/sdl2/test/resources/surfacetest.png create mode 100644 PySDL2-0.9.5/sdl2/test/resources/surfacetest.pnm create mode 100644 PySDL2-0.9.5/sdl2/test/resources/surfacetest.ppm create mode 100644 PySDL2-0.9.5/sdl2/test/resources/surfacetest.tga create mode 100644 PySDL2-0.9.5/sdl2/test/resources/surfacetest.tif create mode 100644 PySDL2-0.9.5/sdl2/test/resources/surfacetest.webp create mode 100644 PySDL2-0.9.5/sdl2/test/resources/surfacetest.xcf create mode 100644 PySDL2-0.9.5/sdl2/test/resources/surfacetest.xpm create mode 100644 PySDL2-0.9.5/sdl2/test/resources/tuffy.copy.ttf create mode 100644 PySDL2-0.9.5/sdl2/test/resources/tuffy.ttf create mode 100644 PySDL2-0.9.5/sdl2/test/rwops_test.py create mode 100644 PySDL2-0.9.5/sdl2/test/sdl2ext_algorithms_test.py create mode 100644 PySDL2-0.9.5/sdl2/test/sdl2ext_array_test.py create mode 100644 PySDL2-0.9.5/sdl2/test/sdl2ext_color_test.py create mode 100644 PySDL2-0.9.5/sdl2/test/sdl2ext_draw_test.py create mode 100644 PySDL2-0.9.5/sdl2/test/sdl2ext_ebs_test.py create mode 100644 PySDL2-0.9.5/sdl2/test/sdl2ext_events_test.py create mode 100644 PySDL2-0.9.5/sdl2/test/sdl2ext_font_test.py create mode 100644 PySDL2-0.9.5/sdl2/test/sdl2ext_gui_test.py create mode 100644 PySDL2-0.9.5/sdl2/test/sdl2ext_image_test.py create mode 100644 PySDL2-0.9.5/sdl2/test/sdl2ext_particles_test.py create mode 100644 PySDL2-0.9.5/sdl2/test/sdl2ext_pixelaccess_test.py create mode 100644 PySDL2-0.9.5/sdl2/test/sdl2ext_resources_test.py create mode 100644 PySDL2-0.9.5/sdl2/test/sdl2ext_sprite_test.py create mode 100644 PySDL2-0.9.5/sdl2/test/sdl2ext_test.py create mode 100644 PySDL2-0.9.5/sdl2/test/sdl2ext_window_test.py create mode 100644 PySDL2-0.9.5/sdl2/test/sdl_test.py create mode 100644 PySDL2-0.9.5/sdl2/test/sdlgfx_test.py create mode 100644 PySDL2-0.9.5/sdl2/test/sdlimage_test.py create mode 100644 PySDL2-0.9.5/sdl2/test/sdlmixer_test.py create mode 100644 PySDL2-0.9.5/sdl2/test/sdlttf_test.py create mode 100644 PySDL2-0.9.5/sdl2/test/shape_test.py create mode 100644 PySDL2-0.9.5/sdl2/test/surface_test.py create mode 100644 PySDL2-0.9.5/sdl2/test/syswm_test.py create mode 100644 PySDL2-0.9.5/sdl2/test/timer_test.py create mode 100644 PySDL2-0.9.5/sdl2/test/util/__init__.py create mode 100644 PySDL2-0.9.5/sdl2/test/util/runtests.py create mode 100644 PySDL2-0.9.5/sdl2/test/util/support.py create mode 100644 PySDL2-0.9.5/sdl2/test/util/testrunner.py create mode 100644 PySDL2-0.9.5/sdl2/test/util/testutils.py create mode 100644 PySDL2-0.9.5/sdl2/test/version_test.py create mode 100644 PySDL2-0.9.5/sdl2/test/video_test.py create mode 100644 PySDL2-0.9.5/sdl2/timer.py create mode 100644 PySDL2-0.9.5/sdl2/touch.py create mode 100644 PySDL2-0.9.5/sdl2/version.py create mode 100644 PySDL2-0.9.5/sdl2/video.py create mode 100644 PySDL2-0.9.5/setup.py create mode 100755 PySDL2-0.9.5/util/valgrind.sh diff --git a/PySDL2-0.9.5/AUTHORS.txt b/PySDL2-0.9.5/AUTHORS.txt new file mode 100644 index 0000000..2846be5 --- /dev/null +++ b/PySDL2-0.9.5/AUTHORS.txt @@ -0,0 +1,17 @@ +This software packages was created and is maintained and improved by + +* Marcus von Appen + +with contributions from + +* Steven Johnson +* Marcel Rodrigues +* Dan Gillett + +Thanks to everyone else for their assistance, support, fixes and improvements: + +Sven Eckelmann, Marcel Rodrigues, Michael McCandless, Andreas Schiefer, +Franz Schrober, Roger Flores, otus, Mihail Latyshov, Todd Rovito, Bil Bas, +Dan McCombs, William Manire, Radomir Dopieralski, Joe Polak, Jordan F, DR0ID, +Filip M. Nowak, David Farler, Max Bareiss, Kenneth Long, Robert Winkler, +Jones Romao, smea lum, Linus Heckemann, DBLobster diff --git a/PySDL2-0.9.5/COPYING.txt b/PySDL2-0.9.5/COPYING.txt new file mode 100644 index 0000000..f9edeba --- /dev/null +++ b/PySDL2-0.9.5/COPYING.txt @@ -0,0 +1 @@ +See doc/copying.rst diff --git a/PySDL2-0.9.5/Makefile b/PySDL2-0.9.5/Makefile new file mode 100644 index 0000000..f29b32b --- /dev/null +++ b/PySDL2-0.9.5/Makefile @@ -0,0 +1,91 @@ +PYTHON ?= python +top_srcdir := `pwd` +PYTHONPATH ?= $(top_srcdir) +SUBDIRS = \ + $(top_srcdir)/sdl2 \ + $(top_srcdir)/sdl2/ext \ + $(top_srcdir)/sdl2/test \ + $(top_srcdir)/sdl2/test/resources \ + $(top_srcdir)/sdl2/test/util \ + $(top_srcdir)/doc \ + $(top_srcdir)/doc/tutorial \ + $(top_srcdir)/doc/modules \ + $(top_srcdir)/examples + +INTERPRETERS = python2.7 python3.2 python3.3 python3.4 python3.5 pypy + +all: clean build + +dist: clean docs + @echo "Creating dist..." + @$(PYTHON) setup.py sdist --format gztar + @$(PYTHON) setup.py sdist --format zip + +bdist: clean docs + @echo "Creating bdist..." + @$(PYTHON) setup.py bdist + +build: + @echo "Running build" + @$(PYTHON) setup.py build + @echo "Build finished, invoke 'make install' to install." + + +install: + @echo "Installing..." + @$(PYTHON) setup.py install + +clean: + @echo "Cleaning up in $(top_srcdir)/ ..." + @rm -f *.cache *.core *~ MANIFEST *.pyc *.orig *.rej + @rm -rf __pycache__ + @rm -rf build dist doc/html + + @for dir in $(SUBDIRS); do \ + echo "Cleaning up in $$dir ..."; \ + if test -f $$dir/Makefile; then \ + make -C $$dir clean; \ + fi; \ + cd $$dir && rm -f *.cache *.core *~ MANIFEST *.pyc *.orig *.rej; \ + done + +docs: + @echo "Creating docs package" + @rm -rf doc/html + @cd doc && PYTHONPATH=$(PYTHONPATH) make html + @mv doc/_build/html doc/html + @rm -rf doc/_build + @cd doc && make clean + +release: dist + +runtest: + @PYTHONPATH=$(PYTHONPATH) $(PYTHON) -B -m sdl2.test.util.runtests + +testall: + @for interp in $(INTERPRETERS); do \ + PYTHONPATH=$(PYTHONPATH) $$interp -B -m sdl2.test.util.runtests || true; \ + done + +# Do not run these in production environments! They are for testing +# purposes only! + +buildall: clean + @for interp in $(INTERPRETERS); do \ + $$interp setup.py build; \ + done + +installall: + @for interp in $(INTERPRETERS); do \ + $$interp setup.py install; \ + done + +testpackage: + @for interp in $(INTERPRETERS); do \ + $$interp -c "import sdl2.test; sdl2.test.run()" || true \ + done + +purge_installs: + @for interp in $(INTERPRETERS); do \ + rm -rf /usr/local/lib/$$interp/site-packages/sdl2*; \ + done diff --git a/PySDL2-0.9.5/PKG-INFO b/PySDL2-0.9.5/PKG-INFO new file mode 100644 index 0000000..36786d6 --- /dev/null +++ b/PySDL2-0.9.5/PKG-INFO @@ -0,0 +1,49 @@ +Metadata-Version: 1.1 +Name: PySDL2 +Version: 0.9.5 +Summary: Python SDL2 bindings +Home-page: http://bitbucket.org/marcusva/py-sdl2 +Author: Marcus von Appen +Author-email: marcus@sysfault.org +License: Public Domain / zlib +Download-URL: http://bitbucket.org/marcusva/py-sdl2/downloads +Description: About PySDL2 + ============ + PySDL2 is a wrapper around the SDL2 library and as such similar to the + discontinued PySDL project. In contrast to PySDL, it has no licensing + restrictions, nor does it rely on C code, but uses ctypes instead. + + Installation + ============ + PySDL2 is easy to install and integrate within your own projects. Just + follow Python's standard procedure of installing packages or look for a + prebuilt package for your operating system or distribution. + + Documentation + ============= + If you just started with SDL and PySDL2, it is strongly recommended + that you read through the tutorial of the documentation to learn the + basics. You can find the documentation at *doc/html* or online at + http://pysdl2.readthedocs.org. + + License + ======= + This library is given to the public domain. There are no licensing + restrictions. Please see *doc/copying.rst* for further details. + +Platform: UNKNOWN +Classifier: Development Status :: 4 - Beta +Classifier: Intended Audience :: Developers +Classifier: License :: Public Domain +Classifier: License :: OSI Approved :: zlib/libpng License +Classifier: Operating System :: OS Independent +Classifier: Programming Language :: Python +Classifier: Programming Language :: Python :: 2.7 +Classifier: Programming Language :: Python :: 3 +Classifier: Programming Language :: Python :: 3.2 +Classifier: Programming Language :: Python :: 3.3 +Classifier: Programming Language :: Python :: 3.4 +Classifier: Programming Language :: Python :: 3.5 +Classifier: Programming Language :: Python :: Implementation :: CPython +Classifier: Programming Language :: Python :: Implementation :: PyPy +Classifier: Topic :: Software Development :: Libraries :: Python Modules diff --git a/PySDL2-0.9.5/README.txt b/PySDL2-0.9.5/README.txt new file mode 100644 index 0000000..5132ee2 --- /dev/null +++ b/PySDL2-0.9.5/README.txt @@ -0,0 +1,23 @@ +About PySDL2 +============ +PySDL2 is a wrapper around the SDL2 library and as such similar to the +discontinued PySDL project. In contrast to PySDL, it has no licensing +restrictions, nor does it rely on C code, but uses ctypes instead. + +Installation +============ +PySDL2 is easy to install and integrate within your own projects. Just +follow Python's standard procedure of installing packages or look for a +prebuilt package for your operating system or distribution. + +Documentation +============= +If you just started with SDL and PySDL2, it is strongly recommended +that you read through the tutorial of the documentation to learn the +basics. You can find the documentation at *doc/html* or online at +http://pysdl2.readthedocs.org. + +License +======= +This library is given to the public domain. There are no licensing +restrictions. Please see *doc/copying.rst* for further details. diff --git a/PySDL2-0.9.5/doc/Makefile b/PySDL2-0.9.5/doc/Makefile new file mode 100644 index 0000000..2ffe2a8 --- /dev/null +++ b/PySDL2-0.9.5/doc/Makefile @@ -0,0 +1,154 @@ +# Makefile for Sphinx documentation +# + +# You can set these variables from the command line. +SPHINXOPTS = +SPHINXBUILD = sphinx-build +PAPER = +BUILDDIR = _build + +# Internal variables. +PAPEROPT_a4 = -D latex_paper_size=a4 +PAPEROPT_letter = -D latex_paper_size=letter +ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . +# the i18n builder cannot share the environment and doctrees with the others +I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . + +.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext + +help: + @echo "Please use \`make ' where is one of" + @echo " html to make standalone HTML files" + @echo " dirhtml to make HTML files named index.html in directories" + @echo " singlehtml to make a single large HTML file" + @echo " pickle to make pickle files" + @echo " json to make JSON files" + @echo " htmlhelp to make HTML files and a HTML help project" + @echo " qthelp to make HTML files and a qthelp project" + @echo " devhelp to make HTML files and a Devhelp project" + @echo " epub to make an epub" + @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" + @echo " latexpdf to make LaTeX files and run them through pdflatex" + @echo " text to make text files" + @echo " man to make manual pages" + @echo " texinfo to make Texinfo files" + @echo " info to make Texinfo files and run them through makeinfo" + @echo " gettext to make PO message catalogs" + @echo " changes to make an overview of all changed/added/deprecated items" + @echo " linkcheck to check all external links for integrity" + @echo " doctest to run all doctests embedded in the documentation (if enabled)" + +clean: + @rm -rf $(BUILDDIR)/* + @rm -f modules/*~ tutorial/*~ *~ + +html: + $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." + +dirhtml: + $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." + +singlehtml: + $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml + @echo + @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." + +pickle: + $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle + @echo + @echo "Build finished; now you can process the pickle files." + +json: + $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json + @echo + @echo "Build finished; now you can process the JSON files." + +htmlhelp: + $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp + @echo + @echo "Build finished; now you can run HTML Help Workshop with the" \ + ".hhp project file in $(BUILDDIR)/htmlhelp." + +qthelp: + $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp + @echo + @echo "Build finished; now you can run "qcollectiongenerator" with the" \ + ".qhcp project file in $(BUILDDIR)/qthelp, like this:" + @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/PySDL2.qhcp" + @echo "To view the help file:" + @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/PySDL2.qhc" + +devhelp: + $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp + @echo + @echo "Build finished." + @echo "To view the help file:" + @echo "# mkdir -p $$HOME/.local/share/devhelp/PyMule" + @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/PyMule" + @echo "# devhelp" + +epub: + $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub + @echo + @echo "Build finished. The epub file is in $(BUILDDIR)/epub." + +latex: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo + @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." + @echo "Run \`make' in that directory to run these through (pdf)latex" \ + "(use \`make latexpdf' here to do that automatically)." + +latexpdf: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo "Running LaTeX files through pdflatex..." + $(MAKE) -C $(BUILDDIR)/latex all-pdf + @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." + +text: + $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text + @echo + @echo "Build finished. The text files are in $(BUILDDIR)/text." + +man: + $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man + @echo + @echo "Build finished. The manual pages are in $(BUILDDIR)/man." + +texinfo: + $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo + @echo + @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." + @echo "Run \`make' in that directory to run these through makeinfo" \ + "(use \`make info' here to do that automatically)." + +info: + $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo + @echo "Running Texinfo files through makeinfo..." + make -C $(BUILDDIR)/texinfo info + @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." + +gettext: + $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale + @echo + @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." + +changes: + $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes + @echo + @echo "The overview file is in $(BUILDDIR)/changes." + +linkcheck: + $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck + @echo + @echo "Link check complete; look for any errors in the above output " \ + "or in $(BUILDDIR)/linkcheck/output.txt." + +doctest: + $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest + @echo "Testing of doctests in the sources finished, look at the " \ + "results in $(BUILDDIR)/doctest/output.txt." diff --git a/PySDL2-0.9.5/doc/conf.py b/PySDL2-0.9.5/doc/conf.py new file mode 100644 index 0000000..ebd14ba --- /dev/null +++ b/PySDL2-0.9.5/doc/conf.py @@ -0,0 +1,253 @@ +# -*- coding: utf-8 -*- +# +# PySDL2 documentation build configuration file, created by +# sphinx-quickstart on Thu Mar 22 07:51:57 2012. +# +# This file is execfile()d with the current directory set to its containing dir. +# +# Note that not all possible configuration values are present in this +# autogenerated file. +# +# All configuration values have a default; values that are commented out +# serve to show the default. + +import sys, os + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +# sys.path.insert(0, os.path.abspath('.')) + +# -- General configuration ----------------------------------------------------- + +# If your documentation needs a minimal Sphinx version, state it here. +# needs_sphinx = '1.0' + +# Add any Sphinx extension module names here, as strings. They can be extensions +# coming with Sphinx (named 'sphinx.ext.*') or your custom ones. +extensions = ['sphinx.ext.intersphinx', + 'sphinx.ext.todo', + 'sphinx.ext.coverage', + 'sphinx.ext.inheritance_diagram' + ] + +todo_include_todos = True +graphviz_output_format = 'png' + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# The suffix of source filenames. +source_suffix = '.rst' + +# The encoding of source files. +# source_encoding = 'utf-8-sig' + +# The master toctree document. +master_doc = 'index' + +# General information about the project. +project = u'PySDL2' +copyright = u'2013-2016, Marcus von Appen' + +# The version info for the project you're documenting, acts as replacement for +# |version| and |release|, also used in various other places throughout the +# built documents. +# +# The short X.Y version. +version = '0.9' +# The full version, including alpha/beta/rc tags. +release = '0.9.5' + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +# language = None + +# There are two options for replacing |today|: either, you set today to some +# non-false value, then it is used: +# today = '' +# Else, today_fmt is used as the format for a strftime call. +# today_fmt = '%B %d, %Y' + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +exclude_patterns = ['_build'] + +# The reST default role (used for this markup: `text`) to use for all documents. +# default_role = None + +# If true, '()' will be appended to :func: etc. cross-reference text. +# add_function_parentheses = True + +# If true, the current module name will be prepended to all description +# unit titles (such as .. function::). +# add_module_names = True + +# If true, sectionauthor and moduleauthor directives will be shown in the +# output. They are ignored by default. +# show_authors = False + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = 'sphinx' + +# A list of ignored prefixes for module index sorting. +# modindex_common_prefix = [] + + +# -- Options for HTML output --------------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +html_theme = 'default' + +# Theme options are theme-specific and customize the look and feel of a theme +# further. For a list of options available for each theme, see the +# documentation. +# html_theme_options = {} + +# Add any paths that contain custom themes here, relative to this directory. +# html_theme_path = [] + +# The name for this set of Sphinx documents. If None, it defaults to +# " v documentation". +# html_title = None + +# A shorter title for the navigation bar. Default is the same as html_title. +# html_short_title = None + +# The name of an image file (relative to this directory) to place at the top +# of the sidebar. +# html_logo = None + +# The name of an image file (within the static path) to use as favicon of the +# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 +# pixels large. +# html_favicon = None + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['_static'] + +# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, +# using the given strftime format. +# html_last_updated_fmt = '%b %d, %Y' + +# If true, SmartyPants will be used to convert quotes and dashes to +# typographically correct entities. +# html_use_smartypants = True + +# Custom sidebar templates, maps document names to template names. +# html_sidebars = {} + +# Additional templates that should be rendered to pages, maps page names to +# template names. +# html_additional_pages = {} + +# If false, no module index is generated. +# html_domain_indices = True + +# If false, no index is generated. +# html_use_index = True + +# If true, the index is split into individual pages for each letter. +# html_split_index = False + +# If true, links to the reST sources are added to the pages. +# html_show_sourcelink = True + +# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. +# html_show_sphinx = True + +# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. +# html_show_copyright = True + +# If true, an OpenSearch description file will be output, and all pages will +# contain a tag referring to it. The value of this option must be the +# base URL from which the finished HTML is served. +# html_use_opensearch = '' + +# This is the file name suffix for HTML files (e.g. ".xhtml"). +# html_file_suffix = None + +# Output file base name for HTML help builder. +htmlhelp_basename = 'PySDL2Doc' + + +# -- Options for LaTeX output -------------------------------------------------- + +latex_elements = { +# The paper size ('letterpaper' or 'a4paper'). +# 'papersize': 'letterpaper', + +# The font size ('10pt', '11pt' or '12pt'). +# 'pointsize': '10pt', + +# Additional stuff for the LaTeX preamble. +# 'preamble': '', +} + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, author, documentclass [howto/manual]). +latex_documents = [ + ('index', 'PySDL2.tex', u'PySDL2 Documentation', + u'Marcus von Appen', 'manual'), +] + +# The name of an image file (relative to this directory) to place at the top of +# the title page. +# latex_logo = None + +# For "manual" documents, if this is true, then toplevel headings are parts, +# not chapters. +# latex_use_parts = False + +# If true, show page references after internal links. +# latex_show_pagerefs = False + +# If true, show URL addresses after external links. +# latex_show_urls = False + +# Documents to append as an appendix to all manuals. +# latex_appendices = [] + +# If false, no module index is generated. +# latex_domain_indices = True + + +# -- Options for manual page output -------------------------------------------- + +# One entry per manual page. List of tuples +# (source start file, name, description, authors, manual section). +man_pages = [ + ('index', 'pysdl2', u'PySDL2 Documentation', + [u'Marcus von Appen'], 1) +] + +# If true, show URL addresses after external links. +# man_show_urls = False + + +# -- Options for Texinfo output ------------------------------------------------ + +# Grouping the document tree into Texinfo files. List of tuples +# (source start file, target name, title, author, +# dir menu entry, description, category) +texinfo_documents = [ + ('index', 'PySDL2', u'PySDL2 Documentation', + u'Marcus von Appen', 'PySDL2', 'One line description of project.', + 'Miscellaneous'), +] + +# Documents to append as an appendix to all manuals. +# texinfo_appendices = [] + +# If false, no module index is generated. +# texinfo_domain_indices = True + +# How to display URL addresses: 'footnote', 'no', or 'inline'. +# texinfo_show_urls = 'footnote' + + +# Example configuration for intersphinx: refer to the Python standard library. +intersphinx_mapping = {'http://docs.python.org/': "python.inv"} diff --git a/PySDL2-0.9.5/doc/copying.rst b/PySDL2-0.9.5/doc/copying.rst new file mode 100644 index 0000000..40f9f35 --- /dev/null +++ b/PySDL2-0.9.5/doc/copying.rst @@ -0,0 +1,60 @@ +License +======= + +:: + + This software is distributed under the Public Domain. Since it is + not enough anymore to tell people: 'hey, just do with it whatever + you like to do', you can consider this software being distributed + under the CC0 Public Domain Dedication + (http://creativecommons.org/publicdomain/zero/1.0/legalcode.txt). + + In cases, where the law prohibits the recognition of Public Domain + software, this software can be licensed under the zlib license as + stated below: + + Copyright (C) 2012-2014 Marcus von Appen + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgement in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + +Some files are **not** covered by the license above. + +* For ``examples/resources/tuffy.ttf``, + ``examples/resources/tuffy.copy.ttf`` and + ``sdl2/test/resources/tuffy.ttf`` the following terms apply: + + :: + + We, the copyright holders of this work, hereby release it into the + public domain. This applies worldwide. + + In case this is not legally possible, + + We grant any entity the right to use this work for any purpose, without + any conditions, unless such conditions are required by law. + + Thatcher Ulrich http://tulrich.com + Karoly Barta bartakarcsi@gmail.com + Michael Evans http://www.evertype.com + +* doc/python.inv + + An inventory index for linking to the proper places in the Python + documentation, taken from http://docs.python.org/2/. Its copyright and + license information can be found at + http://docs.python.org/2/copyright.html and + http://docs.python.org/2/license.html. diff --git a/PySDL2-0.9.5/doc/faq.rst b/PySDL2-0.9.5/doc/faq.rst new file mode 100644 index 0000000..56a9da3 --- /dev/null +++ b/PySDL2-0.9.5/doc/faq.rst @@ -0,0 +1,63 @@ +.. _faq: + +PySDL2 FAQ +========== +This is a list of Frequently Asked Questions about PySDL2. If you think, +something is missing, please suggest it! + +On importing... +--------------- +... my script fails and complains that a SDL2 library could not be found! + + Do you have the libraries properly installed? Did you follow the operating + system's way of installing or registering libraries? If you placed the + libraries in some folder, make sure that the ``PYSDL2_DLL_PATH`` + environment variable points to the correct location. + +... my script fails complaining that the *found* SDL2 library can't be used! + + Do you use a 64-bit operating system? Please make sure, that the Python + interpreter *and* that the SDL2 libraries are either 64-bit ones *or* + 32-bit ones. A 32-bit Python interpreter can't deal with a 64-bit library + and vice versa. + +Using... +-------- + +... the sdl2 API is weird. Why do you use the SDL\_ prefix all the time? + + The low-level APIs for SDL2, SDL2\_mixer, SDL2\_ttf, ... shall represent a + clean wrapping around the original C API calls. Thus, if you have to search + for documentation or want to make a Python to C conversion (or C to Python), + most of the code cleanly maps to the original API naming and layout and you + do not have to think about whether you had to use SDL\_ or TTF\_ or whatever + as prefix or suffix. + +... the sdl2 API is does not comply to PEP-8. Please make it PEP-8 compatible. + + Most of the API is PEP-8 compatible. The low-level bindings to SDL2 and + related libraries however use the exact naming (including capital letters) + as the functions or structures, they map to. See the previous entry for + the reason of that. + +How do I... +----------- + +... save my surfaces as image files? + + You can use :func:`sdl2.SDL_SaveBMP()` to save them as bitmap files. Other + formats are currently unsupported, but might be added to + the :mod:`sdl2.ext` package in the future. + + +Font handling... +---------------- + +... is too hard. Why can't it work the same way as pygame does? + + The :mod:`sdl2.sdlttf` API does not know about platform-specific font + locations and is unable to resolve font paths based on e.g. the font name + or typeface. It's not its job and PySDL2 likewise does not provide such + functionality. If you need improved font detection support, you might want + to take a look at the sysfont module of the python-utils project, which can + be found at https://bitbucket.org/marcusva/python-utils/. diff --git a/PySDL2-0.9.5/doc/html/.buildinfo b/PySDL2-0.9.5/doc/html/.buildinfo new file mode 100644 index 0000000..d5f3a77 --- /dev/null +++ b/PySDL2-0.9.5/doc/html/.buildinfo @@ -0,0 +1,4 @@ +# Sphinx build info version 1 +# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. +config: 066676e51cb391f44578bf4a12aa1d11 +tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/PySDL2-0.9.5/doc/html/_images/copprocessing.png b/PySDL2-0.9.5/doc/html/_images/copprocessing.png new file mode 100644 index 0000000000000000000000000000000000000000..d9c6f5bc64afb5b0e6c694d1fb1c6b549972ca70 GIT binary patch literal 16539 zcmb7scRbbo`~Q(b3zbmHNEs>0&NxOPGBQrKN`xj*0E_xH!o{dnB>teMVP9p*^5qXOiOf>{{FE5iy`W{RJE>dY#H7!nuP-NOoSSkYJ({yA8rsxJYV?zoFVMRCc9+V-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P#@XTnXtbOVuh zeK!iu>3Hl>(jhqR^YUpz?ht6pdogv}1o{IfZTCut$5y;Z&Lu`BeY*P%B@moV{*O2`@`$W%%@(PuQeCi z_AWbIztG+n&~VqZG!ZLuj6BKUEXA3w^weqQ-@_>UT}BG+gvv=%7;#)Ynai2rmIdzz z`bAAkYr)SJTJpR5iLGz_?i$j6USLv?3rUWP`|SPY&~A^=w=x&ZziGvAfB5}BUqaFe zJeMQ%3g<*lTjp7;pC-smL%Njm`$(oZe7{ngUg5+h=!-{3M^U@?nrhMOED;g$(L`Yj zn(Dw}j(p`!QQv+t;Zkh`@#y=&R8@8LS^oHv=S_Dh2t)7mUNvI!%UwL?^Ua1{@xSc4 zn3jbFYhyyEMVSaQh4f0l*Pgc%ZgJ3M)IpVoc%uH3UTFML`ndu+yy(39GqO#sxPmYqBmkgJ$TPthLrzRUVu?d|JZi_^_d&3tihVEgE| zT%Vttdp2UkyB}0K;JiFi2C=lu+GZ`=H~IbEg%?@*GCBVa`%f|JO5!)aGQotyBaQYqT{*TkMi|oI5d?UX$NzZ!J?$r^7zAhUL z3n*+&tsGmCV&S_;MqZa9wIFG=N%JkYjdlFkT9 z8g*g|>ls~qlNj*BrhJqbSy6paxqKTbCJhHf+DOJWq#HH!v12rlvYqoQq7o~q5DoCt#t+ap_`wejfh`*r*N>(Ry0F1p#xUoOb|Ds-B6~D`5%;f?$(uG z_q+16Gn#veCArhO(x|_`Kg}ql!zxF3*{g2QK|@2s*`fTOvzXJb$wI&UlFob}0ds;bXBtom?hxEivxrUjv$>xf{dBk!;C{5RX-hzRui)8eBLIk}Aw zi-ri|h>tr7{#`JZpNh|2VHwfWy}tdwACvv}wf7ERG9X&QH{5T82ErlQ(Gz_2oDXrV UFYji;L1Bc7f~I_l?1RVu0e32bRR910 literal 0 HcmV?d00001 diff --git a/PySDL2-0.9.5/doc/html/_images/uiprocessing.png b/PySDL2-0.9.5/doc/html/_images/uiprocessing.png new file mode 100644 index 0000000000000000000000000000000000000000..2097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+++ b/PySDL2-0.9.5/doc/html/_sources/copying.txt @@ -0,0 +1,60 @@ +License +======= + +:: + + This software is distributed under the Public Domain. Since it is + not enough anymore to tell people: 'hey, just do with it whatever + you like to do', you can consider this software being distributed + under the CC0 Public Domain Dedication + (http://creativecommons.org/publicdomain/zero/1.0/legalcode.txt). + + In cases, where the law prohibits the recognition of Public Domain + software, this software can be licensed under the zlib license as + stated below: + + Copyright (C) 2012-2014 Marcus von Appen + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgement in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + +Some files are **not** covered by the license above. + +* For ``examples/resources/tuffy.ttf``, + ``examples/resources/tuffy.copy.ttf`` and + ``sdl2/test/resources/tuffy.ttf`` the following terms apply: + + :: + + We, the copyright holders of this work, hereby release it into the + public domain. This applies worldwide. + + In case this is not legally possible, + + We grant any entity the right to use this work for any purpose, without + any conditions, unless such conditions are required by law. + + Thatcher Ulrich http://tulrich.com + Karoly Barta bartakarcsi@gmail.com + Michael Evans http://www.evertype.com + +* doc/python.inv + + An inventory index for linking to the proper places in the Python + documentation, taken from http://docs.python.org/2/. Its copyright and + license information can be found at + http://docs.python.org/2/copyright.html and + http://docs.python.org/2/license.html. diff --git a/PySDL2-0.9.5/doc/html/_sources/faq.txt b/PySDL2-0.9.5/doc/html/_sources/faq.txt new file mode 100644 index 0000000..56a9da3 --- /dev/null +++ b/PySDL2-0.9.5/doc/html/_sources/faq.txt @@ -0,0 +1,63 @@ +.. _faq: + +PySDL2 FAQ +========== +This is a list of Frequently Asked Questions about PySDL2. If you think, +something is missing, please suggest it! + +On importing... +--------------- +... my script fails and complains that a SDL2 library could not be found! + + Do you have the libraries properly installed? Did you follow the operating + system's way of installing or registering libraries? If you placed the + libraries in some folder, make sure that the ``PYSDL2_DLL_PATH`` + environment variable points to the correct location. + +... my script fails complaining that the *found* SDL2 library can't be used! + + Do you use a 64-bit operating system? Please make sure, that the Python + interpreter *and* that the SDL2 libraries are either 64-bit ones *or* + 32-bit ones. A 32-bit Python interpreter can't deal with a 64-bit library + and vice versa. + +Using... +-------- + +... the sdl2 API is weird. Why do you use the SDL\_ prefix all the time? + + The low-level APIs for SDL2, SDL2\_mixer, SDL2\_ttf, ... shall represent a + clean wrapping around the original C API calls. Thus, if you have to search + for documentation or want to make a Python to C conversion (or C to Python), + most of the code cleanly maps to the original API naming and layout and you + do not have to think about whether you had to use SDL\_ or TTF\_ or whatever + as prefix or suffix. + +... the sdl2 API is does not comply to PEP-8. Please make it PEP-8 compatible. + + Most of the API is PEP-8 compatible. The low-level bindings to SDL2 and + related libraries however use the exact naming (including capital letters) + as the functions or structures, they map to. See the previous entry for + the reason of that. + +How do I... +----------- + +... save my surfaces as image files? + + You can use :func:`sdl2.SDL_SaveBMP()` to save them as bitmap files. Other + formats are currently unsupported, but might be added to + the :mod:`sdl2.ext` package in the future. + + +Font handling... +---------------- + +... is too hard. Why can't it work the same way as pygame does? + + The :mod:`sdl2.sdlttf` API does not know about platform-specific font + locations and is unable to resolve font paths based on e.g. the font name + or typeface. It's not its job and PySDL2 likewise does not provide such + functionality. If you need improved font detection support, you might want + to take a look at the sysfont module of the python-utils project, which can + be found at https://bitbucket.org/marcusva/python-utils/. diff --git a/PySDL2-0.9.5/doc/html/_sources/index.txt b/PySDL2-0.9.5/doc/html/_sources/index.txt new file mode 100644 index 0000000..f1fc308 --- /dev/null +++ b/PySDL2-0.9.5/doc/html/_sources/index.txt @@ -0,0 +1,41 @@ +Welcome to PySDL2's documentation! +================================== +PySDL2 is a wrapper around the SDL2 library and as such similar to the +discontinued PySDL project. In contrast to PySDL, it has no licensing +restrictions, nor does it rely on C code, but uses :mod:`ctypes` instead. + +Contents +======== + +.. toctree:: + :maxdepth: 2 + + install.rst + integration.rst + tutorial/index.rst + modules/index.rst + faq.rst + news.rst + +Further readings: + +.. toctree:: + :maxdepth: 1 + + todos.rst + copying.rst + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` + + +Documentation TODOs +=================== + +.. todolist:: + +Last generated on: |today| diff --git a/PySDL2-0.9.5/doc/html/_sources/install.txt b/PySDL2-0.9.5/doc/html/_sources/install.txt new file mode 100644 index 0000000..6c09016 --- /dev/null +++ b/PySDL2-0.9.5/doc/html/_sources/install.txt @@ -0,0 +1,95 @@ +Installing PySDL2 +================= +This section provides an overview and guidance for installing PySDL2 on +various target platforms. + +Getting the sources +------------------- +You can download the official releases of PySDL2 from +https://bitbucket.org/marcusva/py-sdl2/downloads. Download the most +recent release, unpack it and make sure that you installed the relevant +prerequisites before continuing with the installation. + +Prerequisites +------------- +PySDL2 relies on some 3rd party packages to be fully usable and to +provide you full access to all of its features. + +You must have at least one of the following Python versions installed: + +* Python 2.7, 3.2+ (http://www.python.org) +* PyPy 1.8.0+ (http://www.pypy.org) + +Other Python versions or Python implementations might work, but are +(currently) not officially tested or supported by the PySDL2 +distribution. + +You need to have a working SDL2 library on your target system. You can obtain +the source code (to build it yourself) or a prebuilt version at +http://www.libsdl.org. + +PySDL2 also offers support for the following SDL-related libraries: + +* SDL2_image (http://www.libsdl.org/projects/SDL_image/) +* SDL2_mixer (http://www.libsdl.org/projects/SDL_mixer/) +* SDL2_ttf (http://www.libsdl.org/projects/SDL_ttf/) +* SDL2_gfx (http://www.ferzkopp.net/Software/SDL_gfx-2.0/) + +Those are optional though and only necessary, if you want to use +:mod:`sdl2.sdlimage`, :mod:`sdl2.sdlmixer`, :mod:`sdl2.sdlttf` or +:mod:`sdl2.sdlgfx`. + +Installation +------------ +You can either use the python way of installing the package or the make +command using the Makefile on POSIX-compatible platforms, such as Linux +or BSD, or the make.bat batch file on Windows platforms. + +Simply type :: + + python setup.py install + +for the traditional python way or :: + + make install + +for using the Makefile or make.bat. Both will try to perform a default +installation with as many features as possible. + +Trying out +^^^^^^^^^^ +You also can test out PySDL2 without actually installing it. You just +need to set up your ``PYTHONPATH`` to point to the location of the +source distribution package. On Windows-based platforms, you might use +something like :: + + set PYTHONPATH=C:\path\to\pysdl2\:%PYTHONPATH% + +to define the ``PYTHONPATH`` on a command shell. On Linux/Unix, use :: + + export PYTHONPATH=/path/to/pysdl2:$PYTHONPATH + +for bourne shell compatibles or :: + + setenv PYTHONPATH /path/to/pysdl2:$PYTHONPATH + +for C shell compatibles. You can omit the `:$PYTHONPATH``, if you did not use +it so far and if your environment settings do not define it. + +.. note:: + + If you are using IronPython, use ``IRONPYTHONPATH`` instead of + ``PYTHONPATH``. + +.. note:: + + If you did not install SDL2 using the preferred way for your operation + system, please read the information about :ref:`importing-pysdl2` in the + section :doc:`integration`. + +Notes on Mercurial usage +^^^^^^^^^^^^^^^^^^^^^^^^ +The Mercurial version of PySDL2 is not intended to be used in a +production environment. Interfaces may change from one checkin to +another, methods, classes or modules can be broken and so on. If you +want more reliable code, please refer to the official releases. diff --git a/PySDL2-0.9.5/doc/html/_sources/integration.txt b/PySDL2-0.9.5/doc/html/_sources/integration.txt new file mode 100644 index 0000000..9c5be91 --- /dev/null +++ b/PySDL2-0.9.5/doc/html/_sources/integration.txt @@ -0,0 +1,77 @@ +Integrating PySDL2 +================== +PySDL2 consists of two packages, :mod:`sdl2`, which is a plain 1:1 API +wrapper around the SDL2 API, and :mod:`sdl2.ext`, which offers enhanced +functionality for :mod:`sdl2`. + +The :mod:`sdl2` package is implemented in a way that shall make it easy for +you to integrate and deploy it with your own software projects. You can rely +on PySDL2 as third-party package, so that the user needs to install it +before he can use your software. Alternatively, you can just copy the +whole package into your project to ship it within your own project +bundle. + +.. _importing-pysdl2: + +Importing +--------- +The :mod:`sdl2` package relies on an external SDL2 library for creating the +wrapper functions. This means that the user needs to have SDL2 installed or +that you ship a SDL2 library with your project. + +If the user has a SDL2 library installed on the target system, the +:mod:`ctypes` hooks of :mod:`sdl2` try to find it in the OS-specific standard +locations via :func:`ctypes.util.find_library`. If you are going to ship your +own SDL2 library with the project or can not rely on the standard mechanism of +:mod:`ctypes`, it is also possible to set the environment variable +:envvar:`PYSDL2_DLL_PATH`, which shall point to the directory of the SDL2 +library or consist of a list of directories, in which the SDL2 libraries can +be found. + +.. note:: + + :envvar:`PYSDL2_DLL_PATH` is preferred over the standard + mechanism. If the module finds a SDL2 library in :envvar:`PYSDL2_DLL_PATH`, + it will try to use that one in the first place, before using any SDL2 + library installed on the target system. + +Let's assume, you ship your own library *SDL2.dll* within your project +location *fancy_project/third_party*. You can set the environment +variable :envvar:`PYSDL2_DLL_PATH` before starting Python. :: + + # Win32 platforms + set PYSDL2_DLL_PATH=C:\path\to\fancy_project\third_party + + # Unix/Posix-alike environments - bourne shells + export PYSDL2_DLL_PATH=/path/to/fancy_project/third_party + + # Unix/Posix-alike environments - C shells + setenv PYSDL2_DLL_PATH /path/to/fancy_project/third_party + + # Define multiple paths to search for the libraries - Win32 + set PYSDL2_DLL_PATH=C:\first\path;C:\second\path + +You also can set the environment variable within Python using +:data:`os.environ`. :: + + os.environ["PYSDL2_DLL_PATH"] = "C:\\path\\to\\fancy_project\\third_party" + os.environ["PYSDL2_DLL_PATH"] = "/path/to/fancy_project/third_party" + +.. note:: + + If you aim to integrate :mod:`sdl` directly into your software and do + not want or are not allowed to change the environment variables, you + can also change the ``os.getenv("PYSDL2_DLL_PATH")`` query within the + *sdl2/dll.py* (or *sdl2/sdlimage.py*, *sdl2/sdlttf.py*, *sdl2/sdlgfx.py*) + file to point to the directory, in which you keep the DLL. + +Using different SDL2 versions +----------------------------- +PySDL2 tries to provide interfaces to the most recent versions of the +SDL2 libraries. Sometimes this means that PySDL2 tries to test for +functions that might not be available for your very own project or that +are not available on the target system due to a version of the specific +library. To check, if the SDL2 libraries do not provide certain +functions, you can enable the specific warnings for them. + +>>> python -W"module"::ImportWarning:sdl2.dll yourfile.py diff --git a/PySDL2-0.9.5/doc/html/_sources/modules/index.txt b/PySDL2-0.9.5/doc/html/_sources/modules/index.txt new file mode 100644 index 0000000..407011d --- /dev/null +++ b/PySDL2-0.9.5/doc/html/_sources/modules/index.txt @@ -0,0 +1,16 @@ +API reference +============= +This is the core documentation of the various modules, classes and functions +PySDL2 offers. If you want to have a quick overview about the modules, use the +:ref:`modindex`. If you just want to look up a specific class, method or +function, use the :ref:`genindex` or :ref:`search`. + +.. toctree:: + :maxdepth: 2 + + sdl2.rst + sdl2_sdlgfx.rst + sdl2_sdlimage.rst + sdl2_sdlmixer.rst + sdl2_sdlttf.rst + sdl2ext.rst diff --git a/PySDL2-0.9.5/doc/html/_sources/modules/sdl2.txt b/PySDL2-0.9.5/doc/html/_sources/modules/sdl2.txt new file mode 100644 index 0000000..80bce5c --- /dev/null +++ b/PySDL2-0.9.5/doc/html/_sources/modules/sdl2.txt @@ -0,0 +1,177 @@ +.. module:: sdl2 + :synopsis: SDL2 library wrapper + +sdl2 - SDL2 library wrapper +=========================== +The :mod:`sdl2` package is a :mod:`ctypes`-based wrapper around +the SDL2 library. It wraps nearly all publicly accessible structures and +functions of the SDL2 library to be accessible from Python code. + +A detailed documentation about the behaviour of the different functions +can found within the `SDL2 documentation +`_. + +Usage +----- +You can use :mod:`sdl2` in nearly exactly the same way as you would do with +the SDL library and C code. + +.. highlight:: c + +A brief example in C code:: + + #include + + int main(int argc, char *argv[]) { + int running; + SDL_Window *window; + SDL_Surface *windowsurface; + SDL_Surface *image; + SDL_Event event; + + SDL_Init(SDL_INIT_VIDEO); + + window = SDL_CreateWindow("Hello World", + SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, + 592, 460, SDL_WINDOW_SHOWN); + windowsurface = SDL_GetWindowSurface(window); + + image = SDL_LoadBMP("exampleimage.bmp"); + SDL_BlitSurface(image, NULL, windowsurface, NULL); + + SDL_UpdateWindowSurface(window); + SDL_FreeSurface(image); + + running = 1; + while (running) { + while (SDL_PollEvent(&event) != 0) { + if (event.type == SDL_QUIT) { + running = 0; + break; + } + } + } + SDL_DestroyWindow(window); + SDL_Quit(); + return 0; + } + +.. highlight:: python + +Doing the same in Python: :: + + import sys + import ctypes + from sdl2 import * + + def main(): + SDL_Init(SDL_INIT_VIDEO) + window = SDL_CreateWindow(b"Hello World", + SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, + 592, 460, SDL_WINDOW_SHOWN) + windowsurface = SDL_GetWindowSurface(window) + + image = SDL_LoadBMP(b"exampleimage.bmp") + SDL_BlitSurface(image, None, windowsurface, None) + + SDL_UpdateWindowSurface(window) + SDL_FreeSurface(image) + + running = True + event = SDL_Event() + while running: + while SDL_PollEvent(ctypes.byref(event)) != 0: + if event.type == SDL_QUIT: + running = False + break + + SDL_DestroyWindow(window) + SDL_Quit() + return 0 + + if __name__ == "__main__": + sys.exit(main()) + +You can port code in a straightforward manner from one language to the other, +though it is important to know about the limitations and slight differences +mentioned below. Also, PySDL2 offers advanced functionality, which also feels +more *'pythonic'*, via the :mod:`sdl2.ext` package. + +Missing interfaces +------------------ +The following functions, classes, constants and macros of SDL2 are *not* +available within :mod:`sdl2`. + +* :c:data:`SDL_REVISION` and :c:data:`SDL_REVISION_NUMBER` from ``SDL_revision.h`` +* :c:data:`SDL_NAME()` from ``SDL_name.h`` +* :c:func:`SDL_MostSignificantBitIndex32` from ``SDL_bits.h`` +* Everything from ``SDL_main.h`` +* Everything from ``SDL_system.h`` +* Everything from ``SDL_assert.h`` +* Everything from ``SDL_thread.h`` +* Everything from ``SDL_atomic.h`` +* Everything from ``SDL_opengl.h`` +* Everything from ``SDL_mutex.h`` + +Additional interfaces +--------------------- +The following functions, classes, constants and macros are are *not* part of +SDL2, but were introduced by :mod:`sdl2`. + +.. data:: ALL_PIXELFORMATS + + Tuple containing all SDL2 pixel format constants (SDL_PIXELFORMAT_INDEX1LSB, + ..., SDL_PIXELFORMAT_RGB565, ...). + +.. data:: AUDIO_FORMATS + + Set containing all SDL2 audio format constants (AUDIO_U8, AUDIO_S8, + ... AUDIO_F32LSB, ... ). + +.. function:: sdl2.rw_from_object(obj : object) -> SDL_RWops + + Creates a SDL_RWops from any Python object. The Python object must at least + support the following methods: + + read(length) -> data + + length is the size in bytes to be read. A call to len(data) must + return the correct amount of bytes for the data, so that + len(data) / [size in bytes for a single element from data] returns + the amount of elements. Must raise an error on failure. + + seek(offset, whence) -> int + + offset denotes the offset to move the read/write pointer of the + object to. whence indicates the movement behaviour and can be one + of the following values: + + * RW_SEEK_SET - move to offset from the start of the file + * RW_SEEK_CUR - move by offset from the relative location + * RW_SEEK_END - move to offset from the end of the file + + If it could not move read/write pointer to the desired location, + an error must be raised. + + tell() -> int + + Must return the current offset. This method must only be + provided, if seek() does not return any value. + + close() -> None + + Closes the object(or its internal data access methods). Must raise + an error on failure. + + write(data) -> None + + Writes the passed data(which is a string of bytes) to the object. + Must raise an error on failure. + + .. note:: + + The write() method is optional and only necessary, if the passed + object should be able to write data. + + The returned :class:`sdl2.SDL_RWops` is a pure Python object and + **must not** be freed via :func:`sdl2.SDL_FreeRW()`. diff --git a/PySDL2-0.9.5/doc/html/_sources/modules/sdl2_sdlgfx.txt b/PySDL2-0.9.5/doc/html/_sources/modules/sdl2_sdlgfx.txt new file mode 100644 index 0000000..65f3c08 --- /dev/null +++ b/PySDL2-0.9.5/doc/html/_sources/modules/sdl2_sdlgfx.txt @@ -0,0 +1,13 @@ +.. module:: sdl2.sdlgfx + :synopsis: SDL2_gfx library wrapper + +sdl2.sdlgfx - SDL2_gfx library wrapper +====================================== +The :mod:`sdl2.sdlgfx` module is a :mod:`ctypes`-based wrapper +around the SDL2_gfx library. It wraps nearly all publicly accessible +structures and functions of the SDL2_gfx library to be accessible from +Python code. + +A detailed documentation about the behaviour of the different functions +can found on the `SDL2_gfx project website +`_. diff --git a/PySDL2-0.9.5/doc/html/_sources/modules/sdl2_sdlimage.txt b/PySDL2-0.9.5/doc/html/_sources/modules/sdl2_sdlimage.txt new file mode 100644 index 0000000..86c3ca9 --- /dev/null +++ b/PySDL2-0.9.5/doc/html/_sources/modules/sdl2_sdlimage.txt @@ -0,0 +1,13 @@ +.. module:: sdl2.sdlimage + :synopsis: SDL2_image library wrapper + +sdl2.sdlimage - SDL2_image library wrapper +========================================== +The :mod:`sdl2.sdlimage` module is a :mod:`ctypes`-based wrapper +around the SDL2_image library. It wraps nearly all publicly accessible +structures and functions of the SDL2_image library to be accessible from +Python code. + +A detailed documentation about the behaviour of the different functions +can found within the `SDL2_image documentation +`_. diff --git a/PySDL2-0.9.5/doc/html/_sources/modules/sdl2_sdlmixer.txt b/PySDL2-0.9.5/doc/html/_sources/modules/sdl2_sdlmixer.txt new file mode 100644 index 0000000..04ad595 --- /dev/null +++ b/PySDL2-0.9.5/doc/html/_sources/modules/sdl2_sdlmixer.txt @@ -0,0 +1,13 @@ +.. module:: sdl2.sdlmixer + :synopsis: SDL2_mixer library wrapper + +sd2.sdlmixer - SDL2_mixer library wrapper +========================================= +The :mod:`sdl2.sdlmixer` module is a :mod:`ctypes`-based wrapper around +the SDL2_mixer library. It wraps nearly all publicly accessible +structures and functions of the SDL2_mixer library to be accessible from +Python code. + +A detailed documentation about the behaviour of the different functions +can found within the `SDL2_mixer documentation +`_. diff --git a/PySDL2-0.9.5/doc/html/_sources/modules/sdl2_sdlttf.txt b/PySDL2-0.9.5/doc/html/_sources/modules/sdl2_sdlttf.txt new file mode 100644 index 0000000..67711ad --- /dev/null +++ b/PySDL2-0.9.5/doc/html/_sources/modules/sdl2_sdlttf.txt @@ -0,0 +1,13 @@ +.. module:: sdl2.sdlttf + :synopsis: SDL2_ttf library wrapper + +sd2.sdlttf - SDL2_ttf library wrapper +===================================== +The :mod:`sdl2.sdlttf` module is a :mod:`ctypes`-based wrapper +around the SDL2_ttf library. It wraps nearly all publicly accessible +structures and functions of the SDL2_ttf library to be accessible from +Python code. + +A detailed documentation about the behaviour of the different functions +can found within the `SDL2_ttf documentation +`_. diff --git a/PySDL2-0.9.5/doc/html/_sources/modules/sdl2ext.txt b/PySDL2-0.9.5/doc/html/_sources/modules/sdl2ext.txt new file mode 100644 index 0000000..f42c897 --- /dev/null +++ b/PySDL2-0.9.5/doc/html/_sources/modules/sdl2ext.txt @@ -0,0 +1,33 @@ +.. module:: sdl2.ext + :synopsis: Python extensions for SDL2 + +sdl2.ext - Python extensions for SDL2 +===================================== +The :mod:`sdl2.ext` package provides advanced functionality for creating +applications using SDL2 and Python. It offers a rich set of modules, classes +and functions, such as easy image loading, basic user interface elements, +resource management and sprite and (on-screen) scene systems. + +Learn more about + +.. toctree:: + :maxdepth: 1 + + sdl2ext_algorithms.rst + sdl2ext_array.rst + sdl2ext_color.rst + sdl2ext_colorpalettes.rst + sdl2ext_common.rst + sdl2ext_compat.rst + sdl2ext_draw.rst + sdl2ext_ebs.rst + sdl2ext_events.rst + sdl2ext_font.rst + sdl2ext_gui.rst + sdl2ext_image.rst + sdl2ext_particles.rst + sdl2ext_pixelaccess.rst + sdl2ext_resources.rst + sdl2ext_sprite.rst + sdl2ext_surface.rst + sdl2ext_window.rst diff --git a/PySDL2-0.9.5/doc/html/_sources/modules/sdl2ext_algorithms.txt b/PySDL2-0.9.5/doc/html/_sources/modules/sdl2ext_algorithms.txt new file mode 100644 index 0000000..2d43ce3 --- /dev/null +++ b/PySDL2-0.9.5/doc/html/_sources/modules/sdl2ext_algorithms.txt @@ -0,0 +1,42 @@ +.. currentmodule:: sdl2.ext + +Common algorithms +================= + +.. function:: cohensutherland(left : int, top : int, right : int, \ + bottom : int, x1 : int, y1 : int, x2 : int, y2 : int) -> int, int, int, int + + This implements the Cohen-Sutherland line clipping + algorithm. *left*, *top*, *right* and *bottom* denote the + clipping area, into which the line defined by *x1*, *y1* (start + point) and *x2*, *y2* (end point) will be clipped. + + If the line does not intersect with the rectangular clipping area, + four ``None`` values will be returned as tuple. Otherwise a tuple of + the clipped line points will be returned in the form ``(cx1, cy1, + cx2, cy2)``. + +.. function:: liangbarsky(left : int, top : int, right : int, \ + bottom : int, x1 : int, y1 : int, x2 : int, y2 : int) -> int, int, int, int + + This implements the Liang-Barsky line clipping algorithm. *left*, + *top*, *right* and *bottom* denote the clipping area, into + which the line defined by *x1*, *y1* (start point) and *x2*, + *y2* (end point) will be clipped. + + If the line does not intersect with the rectangular clipping area, + four ``None`` values will be returned as tuple. Otherwise a tuple of + the clipped line points will be returned in the form ``(cx1, cy1, + cx2, cy2)``. + +.. function:: clipline(left : int, top : int, right : int, \ + bottom : int, x1 : int, y1 : int, x2 : int, \ + y2 : int[,method=liangbarsky]) -> int, int, int, int + + Clips a line to a rectangular area. + +.. function:: point_on_line(p1 : iterable, p2 : iterable, point : iterable) -> bool + + Checks, if *point*, a two-value tuple, is on the line segment defined by *p1* + and *p2*. + diff --git a/PySDL2-0.9.5/doc/html/_sources/modules/sdl2ext_array.txt b/PySDL2-0.9.5/doc/html/_sources/modules/sdl2ext_array.txt new file mode 100644 index 0000000..c02915a --- /dev/null +++ b/PySDL2-0.9.5/doc/html/_sources/modules/sdl2ext_array.txt @@ -0,0 +1,276 @@ +.. currentmodule:: sdl2.ext + +Converting sequences +==================== +This module provides various functions and classes to access sequences and +buffer-style objects in different ways. It also provides conversion routines +to improve the interoperability of sequences with :mod:`ctypes` data types. + +Providing read-write access for sequential data +----------------------------------------------- +Two classes allow you to access sequential data in different ways. The +:class:`CTypesView` provides byte-wise access to iterable objects and allows +you to convert the object representation to matching byte-widths for +:mod:`ctypes` or other modules. + +Depending on the the underlying object and the chosen size of each particular +item of the object, the :class:`CTypesView` allows you to operate directly +on different representations of the object's contents. :: + + >>> text = bytearray("Hello, I am a simple ASCII string!") + >>> ctview = CTypesView(text, itemsize=1) + >>> ctview.view[0] = 0x61 + >>> print(text) + aello, I am a simple ASCII string!" + >>> ctview.to_uint16()[3] = 0x6554 + >>> print(text) + aello,Te am a simple ASCII string!" + +The snippet above provides a single-byte sized view on a :func:`bytearray` +object. Afterwards, the first item of the view is changed, which causes a +change on the :func:`bytearray`, on the first item as well, since both, the +:class:`CTypesView` and the :func:`bytearray` provide a byte-wise access to +the contents. + +By using :meth:`CTypesView.to_uint16()`, we change the access representation to +a 2-byte unsigned integer :mod:`ctypes` pointer and change the fourth 2-byte +value, *I* to something else. :: + + >>> text = bytearray("Hello, I am a simple ASCII string!") + >>> ctview = CTypesView(text, itemsize=2) + >>> ctview.view[0] = 0x61 + >>> print(text) + aello, I am a simple ASCII string!" + >>> ctview.to_uint16()[3] = 0x6554 + >>> print(text) aello,Te am a simple ASCII string!" + +If the encapsuled object does not provide a (writable) :func:`buffer` +interface, but is iterable, the :class:`CTypesView` will create an +internal copy of the object data using Python's :mod:`array` module and +perform all operations on that copy. :: + + >>> mylist = [18, 52, 86, 120, 154, 188, 222, 240] + >>> ctview = CTypesView(mylist, itemsize=1, docopy=True) + >>> print(ctview.object) + array('B', [18, 52, 86, 120, 154, 188, 222, 240]) + >>> ctview.view[3] = 0xFF + >>> print(mylist) + [18, 52, 86, 120, 154, 188, 222, 240] + >>> print(ctview.object) + array('B', [18, 52, 86, 255, 154, 188, 222, 240]) + +As for directly accessible objects, you can define your own itemsize to +be used. If the iterable does not provide a direct byte access to their +contents, this won't have any effect except for resizing the item +widths. :: + + >>> mylist = [18, 52, 86, 120, 154, 188, 222, 240] + >>> ctview = CTypesView(mylist, itemsize=4, docopy=True) + >>> print(ctview.object) + array('I', [18L, 52L, 86L, 120L, 154L, 188L, 222L, 240L]) + +Accessing data over multiple dimensions +--------------------------------------- +The second class, :class:`MemoryView` provides an interface to access +data over multiple dimensions. You can layout and access a simple +byte stream over e.g. two or more axes, providing a greater flexibility +for functional operations and complex data. + +Let's assume, we are reading image data from a file stream into some buffer +object and want to access and manipulate the image data. Images feature two +axes, one being the width, the other being the height, defining a rectangular +graphics area. + +When we read all data from the file, we have an one-dimensional view of the +image graphics. The :class:`MemoryView` allows us to define a +two-dimensional view over the image graphics, so that we can operate on +both, rows and columns of the image. :: + + >>> imagedata = bytearray("some 1-byte graphics data") + >>> view = MemoryView(imagedata, 1, (5, 5)) + >>> print(view) + [[s, o, m, e, ], [1, -, b, y, t], [e, , g, r, a], [p, h, i, c, s], [ , d, a, t, a]] + >>> for row in view: + ... print(row) + ... + [s, o, m, e, ] + [1, -, b, y, t] + [e, , g, r, a] + [p, h, i, c, s] + [ , d, a, t, a] + >>> for row in view: + ... row[1] = "X" + ... print row + ... + [s, X, m, e, ] + [1, X, b, y, t] + [e, X, g, r, a] + [p, X, i, c, s] + [ , X, a, t, a] + >>> print(imagedata) + sXme 1XbyteXgrapXics Xata + +On accessing a particular dimension of a :class:`MemoryView`, a new +:class:`MemoryView` is created, if it does not access a single +element. :: + + >>> firstrow = view[0] + >>> type(firstrow) + + >>> type(firstrow[0]) + + +A :class:`MemoryView` features, similar to Python's builtin +:class:`memoryview`, dimensions and strides, accessible via the +:attr:`MemoryView.ndim` and :attr:`MemoryView.strides` attributes. + + >>> view.ndim + 2 + >>> view.strides + (5, 5) + +The :attr:`MemoryView.strides`, which have to be passed on creating a +new :class:`MemoryView`, define the layout of the data over different +dimensions. In the example above, we created a 5x5 two-dimensional view +to the image graphics. :: + + >>> twobytes = MemoryView(imagedata, 2, (5, 1)) + >>> print(twobytes) + [[sX, me, 1, Xb, yt], [eX, gr, ap, Xi, cs]] + + +Array API +--------- + +.. class:: CTypesView(obj : iterable[, itemsize=1[, docopy=False[, objsize=None]]]) + + A proxy class for byte-wise accessible data types to be used in + ctypes bindings. The CTypesView provides a read-write access to + arbitrary objects that are iterable. + + In case the object does not provide a :func:`buffer()` interface for + direct access, the CTypesView can copy the object's contents into an + internal buffer, from which data can be retrieved, once the necessary + operations have been performed. + + Depending on the item type stored in the iterable object, you might + need to provide a certain *itemsize*, which denotes the size per + item in bytes. The *objsize* argument might be necessary of iterables, + for which len() does not return the correct amount of objects or is not + implemented. + + .. attribute:: bytesize + + Returns the length of the encapsuled object in bytes. + + .. attribute:: is_shared + + Indicates, if changes on the CTypesView data effect the encapsuled + object directly. if not, this means that the object was copied + internally and needs to be updated by the user code outside of the + CTypesView. + + .. attribute:: object + + The encapsuled object. + + .. attribute:: view + + Provides a read-write aware view of the encapsuled object data + that is suitable for usage from :mod:`ctypes`. + + .. method:: to_bytes() -> ctypes.POINTER + + Returns a byte representation of the encapsuled object. The return + value allows a direct read-write access to the object data, if it + is not copied. The :func:`ctypes.POINTER` points to an array of + :class:`ctypes.c_ubyte`. + + .. method:: to_uint16() -> ctypes.POINTER + + Returns a 16-bit representation of the encapsuled object. The return + value allows a direct read-write access to the object data, if it + is not copied. The :func:`ctypes.POINTER` points to an array of + :class:`ctypes.c_ushort`. + + .. method:: to_uint32() -> ctypes.POINTER + + Returns a 32-bit representation of the encapsuled object. The return + value allows a direct read-write access to the object data, if it + is not copied. The :func:`ctypes.POINTER` points to an array of + :class:`ctypes.c_uint`. + + .. method:: to_uint64() -> ctypes.POINTER + + Returns a 64-bit representation of the encapsuled object. The return + value allows a direct read-write access to the object data, if it + is not copied. The :func:`ctypes.POINTER` points to an array of + :class:`ctypes.c_ulonglong`. + +.. class:: MemoryView(source : object, itemsize : int, strides : tuple[, getfunc=None[, setfunc=None[, srcsize=None]]]) + + The :class:`MemoryView` provides a read-write access to arbitrary + data objects, which can be indexed. + + *itemsize* denotes the size of a single item. *strides* defines + the dimensions and the length (n items * *itemsize*) for each + dimension. *getfunc* and *setfunc* are optional parameters to + provide specialised read and write access to the underlying + *source*. *srcsize* can be used to provide the correct source + size, if ``len(source)`` does not return the absolute size of the + source object in all dimensions. + + .. note:: + + The MemoryView is a pure Python-based implementation and makes + heavy use of recursion for multi-dimensional access. If you aim + for speed on accessing a n-dimensional object, you want to + consider using a specialised library such as numpy. If you need + n-dimensional access support, where such a library is not + supported, or if you need to provide access to objects, which do + not fulfill the requirements of that particular libray, + :class:`MemoryView` can act as solid fallback solution. + + .. attribute:: itemsize + + The size of a single item in bytes. + + .. attribute:: ndim + + The number of dimensions of the :class:`MemoryView`. + + .. attribute:: size + + The size in bytes of the underlying source object. + + .. attribute:: source + + The underlying data source. + + .. attribute:: strides + + A tuple defining the length in bytes for accessing all + elements in each dimension of the :class:`MemoryView`. + +.. function:: to_ctypes(dataseq : iterable, dtype[, mcount=0]) -> array, int + + Converts an arbitrary sequence to a ctypes array of the specified + *dtype* and returns the ctypes array and amount of items as + two-value tuple. + + Raises a :exc:`TypeError`, if one or more elements in the passed + sequence do not match the passed *dtype*. + +.. function:: to_list(dataseq : iterable) -> list + + Converts a ctypes array to a list. + +.. function:: to_tuple(dataseq : iterable) -> tuple + + Converts a ctypes array to a tuple. + +.. function:: create_array(obj : object, itemsize : int) -> array.array + + Creates an :class:`array.array` based copy of the passed object. + *itemsize* denotes the size in bytes for a single element within + *obj*. diff --git a/PySDL2-0.9.5/doc/html/_sources/modules/sdl2ext_color.txt b/PySDL2-0.9.5/doc/html/_sources/modules/sdl2ext_color.txt new file mode 100644 index 0000000..9c4bcb1 --- /dev/null +++ b/PySDL2-0.9.5/doc/html/_sources/modules/sdl2ext_color.txt @@ -0,0 +1,141 @@ +.. currentmodule:: sdl2.ext + +Color handling +============== + +.. class:: Color(r=255, g=255, b=255, a=255) + + A simple RGBA-based color implementation. The Color class uses a + byte-wise representation of the 4 channels red, green, blue and alpha + transparency, so that the values range from 0 to 255. It allows basic + arithmetic operations, e.g. color addition or subtraction and + conversions to other color spaces such as HSV or CMY. + + .. attribute:: r + + The red channel value of the Color. + + .. attribute:: g + + The green channel value of the Color. + + .. attribute:: b + + The blue channel value of the Color. + + .. attribute:: a + + The alpha channel value of the Color. + + .. attribute:: cmy + + The CMY representation of the Color. The CMY components are in the + ranges C = [0, 1], M = [0, 1], Y = [0, 1]. Note that this will not + return the absolutely exact CMY values for the set RGB values in + all cases. Due to the RGB mapping from 0-255 and the CMY mapping + from 0-1 rounding errors may cause the CMY values to differ + slightly from what you might expect. + + .. attribute:: hsla + + The HSLA representation of the Color. The HSLA components are in + the ranges H = [0, 360], S = [0, 100], L = [0, 100], A = [0, + 100]. Note that this will not return the absolutely exact HSL + values for the set RGB values in all cases. Due to the RGB mapping + from 0-255 and the HSL mapping from 0-100 and 0-360 rounding + errors may cause the HSL values to differ slightly from what you + might expect. + + .. attribute:: hsva + + The HSVA representation of the Color. The HSVA components are in + the ranges H = [0, 360], S = [0, 100], V = [0, 100], A = [0, + 100]. Note that this will not return the absolutely exact HSV + values for the set RGB values in all cases. Due to the RGB mapping + from 0-255 and the HSV mapping from 0-100 and 0-360 rounding + errors may cause the HSV values to differ slightly from what you + might expect. + + .. attribute:: i1i2i3 + + The I1I2I3 representation of the Color. The I1I2I3 components are + in the ranges I1 = [0, 1], I2 = [-0.5, 0.5], I3 = [-0.5, + 0.5]. Note that this will not return the absolutely exact I1I2I3 + values for the set RGB values in all cases. Due to the RGB mapping + from 0-255 and the I1I2I3 from 0-1 rounding errors may cause the + I1I2I3 values to differ slightly from what you might expect. + + .. method:: normalize() -> (float, float, float, float) + + Returns the normalised RGBA values of the Color as floating point + values in the range [0, 1]. + + .. method:: __add__(self, color) -> Color + __sub__(self, color) -> Color + __mul__(self, color) -> Color + __div__(self, color) -> Color + __truediv__(self, color) -> Color + __mod__(self, color) -> Color + + Basic arithmetic functions for :class:`Color` values. The arithmetic + operations ``+, -, *, /, %`` are supported by the :class:`Color` class + and work on a per-channel basis. This means, that the operation :: + + color = color1 + color2 + + is the same as :: + + color = Color() + color.r = min(color1.r + color2.r, 255) + color.g = min(color1.g + color2.g, 255) + ... + + The operations guarantee that the channel values stay in the allowed + range of [0, 255]. + +.. function:: argb_to_color(v : int) -> Color + ARGB(v : int) -> Color + + Converts an integer value to a Color, assuming the integer represents + a 32-bit ARGB value. + +.. function:: convert_to_color(v : object) -> Color + COLOR(v : object) -> Color + + Tries to convert the passed value to a Color object. The value can be + an arbitrary Python object, which is passed to the different other + conversion functions. If one of them succeeds, the Color will be + returned to the caller. If none succeeds, a :exc:`ValueError` will be + raised. + + If the color is an integer value, it is assumed to be in ARGB layout. + +.. function:: rgba_to_color(v : int) -> Color + RGBA(v : int) -> Color + + Converts an integer value to a Color, assuming the integer represents + a 32-bit RGBA value. + +.. function:: is_rgb_color(v : object) -> bool + + Checks, if the passed value is an item that could be converted to a + RGB color. + +.. function:: is_rgba_color(v : object) -> bool + + Checks, if the passed value is an item that could be converted to a + RGBA color. + +.. function:: string_to_color(v : string) -> Color + + Converts a hex color string or color name to a Color value. Supported + hex values are: + + * #RGB + * #RGBA + * #RRGGBB + * #RRGGBBAA + * 0xRGB + * 0xRGBA + * 0xRRGGBB + * 0xRRGGBBAA diff --git a/PySDL2-0.9.5/doc/html/_sources/modules/sdl2ext_colorpalettes.txt b/PySDL2-0.9.5/doc/html/_sources/modules/sdl2ext_colorpalettes.txt new file mode 100644 index 0000000..12df700 --- /dev/null +++ b/PySDL2-0.9.5/doc/html/_sources/modules/sdl2ext_colorpalettes.txt @@ -0,0 +1,29 @@ +.. module:: sdl2.ext.colorpalettes + :synopsis: Predefined sets of colors. + +sdl2.ext.colorpalettes - predefined sets of colors +================================================== +Indexed color palettes. Each palette is a tuple of +:class:`sdl2.ext.Color` objects. + +The following palettes are currently available: + +================== =================================================== +Palette Identifier Description +================== =================================================== +MONOPALETTE 1-bit monochrome palette (black and white). + +GRAY2PALETTE 2-bit grayscale palette with black, white and two + shades of gray. +GRAY4PALETTE 4-bit grayscale palette with black, white and 14 + shades shades of gray. +GRAY8PALETTE 8-bit grayscale palette with black, white and 254 + shades shades of gray. +RGB3PALETTE 3-bit RGB color palette with pure red, green and + blue and their complementary colors as well as black + and white. +CGAPALETTE CGA color palette. +EGAPALETTE EGA color palette. +VGAPALETTE 8-bit VGA color palette. +WEBPALETTE "Safe" web color palette with 225 colors. +================== =================================================== diff --git a/PySDL2-0.9.5/doc/html/_sources/modules/sdl2ext_common.txt b/PySDL2-0.9.5/doc/html/_sources/modules/sdl2ext_common.txt new file mode 100644 index 0000000..36416ab --- /dev/null +++ b/PySDL2-0.9.5/doc/html/_sources/modules/sdl2ext_common.txt @@ -0,0 +1,38 @@ +.. currentmodule:: sdl2.ext + +Initialization routines +======================= +TODO + +API +--- + +.. exception:: SDLError(msg=None) + + An SDL2 specific :class:`Exception` class. if no *msg* is provided, + the message will be set to the value of :func:`sdl2.error.SDL_GetError()` + +.. function:: init() -> None + + Initialises the underlying SDL2 video subsystem. Raises a + :exc:`SDLError`, if the SDL2 video subsystem could not be + initialised. + +.. function:: quit() -> None + + Quits the underlying SDL2 video subysystem. If no other SDL2 + subsystems are active, this will also call :func:`quit()`, + :func:`sdl2.sdlttf.TTF_Quit()` and :func:`sdl2.sdlimage.IMG_Quit()`. + +.. function:: get_events() -> [SDL_Event, SDL_Event, ...] + + Gets all SDL events that are currently on the event queue. + +.. class:: TestEventProcessor() + + A simple event processor for testing purposes. + + .. method:: run(window : Window) -> None + + Starts an event loop without actually processing any event. The method + will run endlessly until a ``SDL_QUIT`` event occurs. diff --git a/PySDL2-0.9.5/doc/html/_sources/modules/sdl2ext_compat.txt b/PySDL2-0.9.5/doc/html/_sources/modules/sdl2ext_compat.txt new file mode 100644 index 0000000..f827bbd --- /dev/null +++ b/PySDL2-0.9.5/doc/html/_sources/modules/sdl2ext_compat.txt @@ -0,0 +1,86 @@ +.. module:: sdl2.ext.compat + :synopsis: Python compatibility helpers. + +sdl2.ext.compat - Python compatibility helpers +============================================== +The :mod:`sdl2.ext.compat` module is for internal purposes of the :mod:`sdl2` +package and should not be used outside of the package. Classes, methods and +interfaces might change between versions and there is no guarantee of API +compatibility on different platforms and python implementations or between +releases. + +.. data:: ISPYTHON2 + + ``True``, if executed in a Python 2.x compatible interpreter, ``False`` + otherwise. + +.. data:: ISPYTHON3 + + ``True``, if executed in a Python 3.x compatible interpreter, ``False`` + otherwise. + +.. function:: long([x[, base]]) + + .. note:: + + Only defined for Python 3.x, for which it is the same as :func:`int()`. + +.. function:: unichr(i) + + .. note:: + + Only defined for Python 3.x, for which it is the same as :func:`chr()`. + +.. function:: unicode(string[, encoding[, errors]]) + + .. note:: + + Only defined for Python 3.x, for which it is the same as :func:`str()`. + +.. function:: callable(x) -> bool + + .. note:: + + Only defined for Python 3.x, for which it is the same as + ``isinstance(x, collections.Callable)`` + +.. function:: byteify(x : string, enc : string) -> bytes + + Converts a string to a :func:`bytes` object. + +.. function:: stringify(x : bytes, enc : string) -> string + + Converts a :func:`bytes` to a string object. + +.. function:: isiterable(x) -> bool + + Shortcut for ``isinstance(x, collections.Iterable)``. + +.. function:: platform_is_64bit() -> bool + + Checks, if the interpreter is 64-bit capable. + +.. decorator:: deprecated + + A simple decorator to mark functions and methods as deprecated. This will + print a deprecation message each time the function or method is invoked. + +.. function:: deprecation(message : string) -> None + + Prints a deprecation message using the :func:`warnings.warn()` function. + +.. exception:: UnsupportedError(obj : object[, msg=None]) + + Indicates that a certain class, function or behaviour is not supported in + the specific execution environment. + +.. decorator:: experimental + + A simple decorator to mark functions and methods as + experimental. This will print a warning each time the function or + method is invoked. + +.. exception:: ExperimentalWarning(obj : object[, msg=None]) + + Indicates that a certain class, function or behaviour is in an + experimental state. diff --git a/PySDL2-0.9.5/doc/html/_sources/modules/sdl2ext_draw.txt b/PySDL2-0.9.5/doc/html/_sources/modules/sdl2ext_draw.txt new file mode 100644 index 0000000..830c500 --- /dev/null +++ b/PySDL2-0.9.5/doc/html/_sources/modules/sdl2ext_draw.txt @@ -0,0 +1,44 @@ +.. currentmodule:: sdl2.ext + +2D drawing routines for software surfaces +========================================= + +.. note:: + + The drawing functions within this module are unoptimised and should not be + considered fast. If you want improved drawing of 2D primitives, including + hardware acceleration, you should use the methods of the + :class:`Renderer` instead. + +.. function:: prepare_color(color : object, target : object) -> int + + Prepares the passed *color* for a specific *target*. *color* can be any + object type that can be processed by + :func:`convert_to_color()`. *target* can be any + :class:`sdl2.SDL_PixelFormat`, :class:`sdl2.SDL_Surface` or + :class:`SoftwareSprite` instance. + + The returned integer will be a color value matching the target's pixel + format. + +.. function:: fill(target : object, color : object[, area=None]) -> None + + Fills a certain area on the passed *target* with a *color*. If no *area* is + provided, the entire target will be filled with the passed color. If an + iterable item is provided as *area* (such as a list or tuple), it will be + first checked, if the item denotes a single rectangular area + (4 integer values) before assuming it to be a sequence of rectangular areas + to fill with the color. + + *target* can be any :class:`sdl2.SDL_Surface` or :class:`SoftwareSprite` + instance. + +.. function:: line(target : object, color : object[, width=1]) -> None + + Draws one or multiple lines on the passed *target*. *line* can be a + sequence of four integers for a single line in the form ``(x1, y1, + x2, y2)`` or a sequence of a multiple of 4 for drawing multiple lines + at once, e.g. ``(x1, y1, x2, y2, x3, y3, x4, y4, ...)``. + + *target* can be any :class:`sdl2.SDL_Surface` or :class:`SoftwareSprite` + instance. diff --git a/PySDL2-0.9.5/doc/html/_sources/modules/sdl2ext_ebs.txt b/PySDL2-0.9.5/doc/html/_sources/modules/sdl2ext_ebs.txt new file mode 100644 index 0000000..7257ccd --- /dev/null +++ b/PySDL2-0.9.5/doc/html/_sources/modules/sdl2ext_ebs.txt @@ -0,0 +1,419 @@ +.. currentmodule:: sdl2.ext +.. _ref-ebs: + +Working with component-based entities +===================================== +:mod:`sdl2.ext` supports a component oriented programming pattern to separate +object instances, carried data and processing logic within applications +or games. It uses an entity based approach, in which object instances are +unique identifiers, while their data is managed within components, which +are stored separately. For each individual component type a processing +system will take care of all necessary updates on running the application. + +Component-based patterns +------------------------ +Component-based means that - instead of a traditional OOP approach - object +information are split up into separate data bags for reusability and that those +data bags are separated from any application logic. + +Behavioural design +^^^^^^^^^^^^^^^^^^ +Imagine a car class in traditional OOP, which might look like :: + + class Car: + def __init__(self): + self.color = "red" + self.position = 0, 0 + self.velocity = 0, 0 + self.sprite = get_some_car_image() + ... + def drive(self, timedelta): + self.position[0] = self.velocity[0] * timedelta + self.position[1] = self.velocity[1] * timedelta + ... + def stop(self): + self.velocity = 0, 0 + ... + def render(self, screen): + screen.display(self.sprite) + + mycar = new Car() + mycar.color = "green" + mycar.velocity = 10, 0 + +The car features information stored in attributes (``color``, ``position``, +...) and behaviour (application logic, ``drive()``, ``stop()`` ...). + +A component-based approach aims to split and reduce the car to a set of +information and external systems providing the application logic. :: + + class Car: + def __init__(self): + self.color = "red" + self.position = 0, 0 + self.velocity = 0, 0 + self.sprite = get_some_car_image() + + class CarMovement: + def drive(self, car, timedelta): + car.position[0] = car.velocity[0] * timedelta + car.position[1] = car.velocity[1] * timedelta + ... + def stop(self): + car.velocity = 0, 0 + + class CarRenderer: + def render(self, car, screen): + screen.display(car.sprite) + +At this point of time, there is no notable difference between both approaches, +except that the latter one adds additional overhead. + +The benefit comes in, when you + +* use subclassing in your OOP design +* want to change behavioural patterns on a global scale or based on states +* want to refactor code logic in central locations +* want to cascade application behaviours + +The initial ``Car`` class from above defines, how it should be displayed +on the screen. If you now want to add a feature for rescaling the screen +size after the user activates the magnifier mode, you need to refactor +the ``Car`` and all other classes that render things on the screen, have +to consider all subclasses that override the method and so on. +Refactoring the ``CarRenderer`` code by adding a check for the magnifier +mode sounds quite simple in contrast to that, not? + +The same applies to the movement logic - inverting the movement logic +requires you to refactor all your classes instead of a single piece of +application code. + +Information design +^^^^^^^^^^^^^^^^^^ +Subclassing with traditional OOP for behavioural changes also might +bloat your classes with unnecessary information, causing the memory +footprint for your application to rise without any need. Let's assume +you have a ``Truck`` class that inherits from ``Car``. Let's further +assume that all trucks in your application look the same. Why should any +of those carry a ``sprite`` or ``color`` attribute? You would need to +refactor your ``Car`` class to get rid of those superfluous information, +adding another level of subclassing. If at a later point of time you +decide to give your trucks different colors, you need to refactor +everything again. + +Wouldn't it be easier to deal with colors, if they are available on the +truck and leave them out, if they are not? We initially stated that the +component-based approach aims to separate data (information) from code +logic. That said, if the truck has a color, we can handle it easily, if +it has not, we will do as usual. + +Also, checking for the color of an object (regardless, if it is a truck, +car, aeroplane or death star) allows us to apply the same or similar +behaviour for every object. If the information is available, we will +process it, if it is not, we will not do anything. + +All in all +^^^^^^^^^^ +Once we split up the previously OOP-style classes into pure data containers and +some separate processing code for the behaviour, we are talking about components +and (processing) systems. A component is a data container, ideally grouping +related information on a granular level, so that it is easy to (re)use. +When you combine different components to build your in-application objects and +instantiate those, we are talking about entities. + +.. image:: images/ebs.png + +*Component* + provides information (data bag) + +*Entity* + In-application instance that consists of *component* items + +*System* + Application logic for working with *Entity* items and their + *component* data + +*World* + The environment that contains the different *System* instances and + all *Entity* items with their *component* data + +Within a strict COP design, the application logic (ideally) only knows about +data to process. It does not know anything about entities or complex classes +and only operates on the data. + +.. image:: images/copprocessing.png + +To keep things simple, modular and easy to maintain and change, you usually +create small processing systems, which perform the necessary operations on the +data they shall handle. That said, a ``MovementSystem`` for our car entity would +only operate on the position and velocity component of the car entity. It does +not know anything about the the car's sprite or sounds that the car makes, +since *this is nothing it has to deal with*. + +To display the car on the screen, a ``RenderingSystem`` might pick up the +sprite component of the car, maybe along with the position information (so it +knows, where to place the sprite) and render it on the screen. + +If you want the car to play sounds, you would add an audio playback system, +that can perform the task. Afterwards you can add the necessary audio +information via a sound component to the car and it will make noise. + +Component-based design with sdl2.ext +------------------------------------ + +.. note:: + + This section will deal with the specialities of COP patterns and + provide the bare minimum of information. If you are just starting with + such a design, it is recommended to read through the :ref:`pong-tutorial` + tutorial. + +:mod:`sdl2.ext` provides a :class:`World` class in which all other objects +will reside. The :class:`World` will maintain both, :class:`Entity` and +component items, and allows you to set up the processing logic via +the :class:`System` and :class:`Applicator` classes. :: + + >>> appworld = World() + +Components can be created from any class that inherits from the +:class:`object` type and represent the data bag of information for the +entity and application world. Ideally, they should avoid any +application logic (except from getter and setter properties). :: + + class Position2D(object): + def __init__(self, x=0, y=0): + self.x = x + self.y = y + +:class:`Entity` objects define the in-application objects and only consist of +component-based attributes. They also require a :class:`World` at +object instantiation time. :: + + class CarEntity(Entity): + def __init__(self, world, x=0, y=0): + self.position2d = Position2D(x, y) + +.. note:: + + The *world* argument in ``__init__()`` is necessary. It will be + passed to the internal ``__new__()`` constructor of the + :class:`Entity` and stores a reference to the :class:`World` and also + allows the :class:`Entity` to store its information in the + :class:`World`. + +The :class:`Entity` also requries its attributes to be named exactly as +their component class name, but in lowercase letters. If you name a +component ``MyAbsolutelyAwesomeDataContainer``, an :class:`Entity` will +force you to write the following: :: + + class SomeEntity(Entity): + def __init__(self, world): + self.myabsolutelyawesomedatacontainer = MyAbsolutelyAwesomeDataContainer() + +.. note:: + + This is not entirely true. A reference of the object will be stored on a + per-class-in-mro basis. This means that if ``MyAbsolutelyAwesomeDataContainer`` + inherits from ``ShortName``, you can also do: :: + + class SomeEntity(Entity): + def __init__(self, world): + self.shortname = MyAbsolutelyAwesomeDataContainer() + +Components should be as atomic as possible and avoid complex +inheritance. Since each value of an :class:`Entity` is stored per class +in its mro list, components inheriting from the same class(es) will +overwrite each other on conflicting classes: :: + + class Vector(Position2D): + def __init__(self, x=0, y=0, z=0): + super(Vector, self).__init__(x, y) + + + class SomeEntity(Entity): + def __init__(self, world): + # This will associate self.position2d with the new Position2D + # value, while the previous Vector association is overwritten + self.position2d = Position2D(4, 4) + + # self.vector will also associate a self.position2d attribute + # with the Entity, since Vector inherits from Position2D. The + # original association will vanish, and each call to + # entity.position2d will effectively manipulate the vector! + self.vector = Vector(1,2,3) + +API +--- + +.. class:: Entity(world : World) + + An entity is a specific object living in the application world. It + does not carry any data or application logic, but merely acts as + identifier label for data that is maintained in the application + world itself. + + As such, it is a composition of components, which would not exist + without the entity identifier. The entity itself is non-existent to + the application world as long as it does not carry any data that can + be processed by a system within the application world. + + .. attribute:: id + + The id of the Entity. Every Entity has a unique id, that is + represented by a :class:`uuid.UUID` instance. + + .. attribute:: world + + The :class:`World` the entity resides in. + + .. method:: delete() -> None + + Deletes the :class:`Entity` from its :class:`World`. This + basically calls :meth:`World.delete()` with the :class:`Entity`. + +.. class:: Applicator() + + A processing system for combined data sets. The :class:`Applicator` + is an enhanced :class:`System` that receives combined data sets based + on its set :attr:`System.componenttypes` + + .. attribute:: is_applicator + + A boolean flag indicating that this class operates on combined data sets. + + .. attribute:: componenttypes + + A tuple of class identifiers that shall be processed by the + :class:`Applicator`. + + .. function:: process(world : World, componentsets : iterable) + + Processes tuples of component items. *componentsets* will + contain object tuples, that match the :attr:`componenttypes` + of the :class:`Applicator`. If, for example, the :class:`Applicator` + is defined as :: + + class MyApplicator(Applicator): + def __init__(self): + self.componenttypes = (Foo, Bar) + + its process method will receive ``(Foo, Bar)`` tuples :: + + def process(self, world, componentsets): + for foo_item, bar_item in componentsets: + ... + + Additionally, the :class:`Applicator` will not process all possible + combinations of valid components, but only those, which are associated + with the same :class:`Entity`. That said, an :class:`Entity` *must* + contain a ``Foo`` as well as a ``Bar`` component in order to + have them both processed by the :class:`Applicator` (while a + :class:`System` with the same ``componenttypes`` would pick either of + them, depending on their availability). + +.. class:: System() + + A processing system within an application world consumes the + components of all entities, for which it was set up. At time of + processing, the system does not know about any other component type + that might be bound to any entity. + + Also, the processing system does not know about any specific entity, + but only is aware of the data carried by all entities. + + .. attribute:: componenttypes + + A tuple of class identifiers that shall be processed by the + :class:`System` + + .. method:: process(world : World, components : iterable) + + Processes component items. + + This method has to be implemented by inheriting classes. + + +.. class:: World() + + An application world defines the combination of application data and + processing logic and how the data will be processed. As such, it is a + container object in which the application is defined. + + The application world maintains a set of entities and their related + components as well as a set of systems that process the data of the + entities. Each processing system within the application world only + operates on a certain set of components, but not all components of an + entity at once. + + The order in which data is processed depends on the order of the + added systems. + + .. attribute:: systems + + The processing system objects bound to the world. + + .. method:: add_system(system : object) + + Adds a processing system to the world. The system will be + added as last item in the processing order. + + The passed system does not have to inherit from :class:`System`, but + must feature a ``componenttypes`` attribute and a ``process()`` method, + which match the signatures of the :class:`System` class :: + + class MySystem(object): + def __init__(self): + # componenttypes can be any iterable as long as it + # contains the classes the system should take care of + self.componenttypes = [AClass, AnotherClass, ...] + + def process(self, world, components): + ... + + If the system shall operate on combined component sets as specified + by the :class:`Applicator`, the class instance must contain a + ``is_applicator`` property, that evaluates to ``True`` :: + + class MyApplicator(object): + def __init__(self): + self.is_applicator = True + self.componenttypes = [...] + + def process(self, world, components): + pass + + The behaviour can be changed at run-time. The ``is_applicator`` attribute + is evaluated for every call to :meth:`World.process()`. + + .. method:: delete(entity : Entity) + + Removes an :class:`Entity` from the World, including all its + component data. + + .. method:: delete_entities(entities : iterable) + + Removes a set of :class:`Entity` instances from the World, + including all their component data. + + .. method:: insert_system(index : int, system : System) + + Adds a processing :class:`System` to the world. The system will be + added at the specified position in the processing order. + + .. method:: get_entities(component : object) -> [Entity, ...] + + Gets the entities using the passed component. + + .. note:: + + This will not perform an identity check on the component + but rely on its ``__eq__`` implementation instead. + + .. method:: process() + + Processes all component items within their corresponding + :class:`System` instances. + + .. method:: remove_system(system : System) + + Removes a processing :class:`System` from the world. diff --git a/PySDL2-0.9.5/doc/html/_sources/modules/sdl2ext_events.txt b/PySDL2-0.9.5/doc/html/_sources/modules/sdl2ext_events.txt new file mode 100644 index 0000000..df39591 --- /dev/null +++ b/PySDL2-0.9.5/doc/html/_sources/modules/sdl2ext_events.txt @@ -0,0 +1,81 @@ +.. currentmodule:: sdl2.ext + +General purpose event handling routines +======================================= + +.. class:: EventHandler(sender) + + A simple event handling class, which manages callbacks to be + executed. + + The EventHandler does not need to be kept as separate instance, but + is mainly intended to be used as attribute in event-aware class + objects. :: + + >>> def myfunc(sender): + ... print("event triggered by %s" % sender) + ... + >>> class MyClass(object): + ... def __init__(self): + ... self.anevent = EventHandler(self) + ... + >>> myobj = MyClass() + >>> myobj.anevent += myfunc + >>> myobj.anevent() + event triggered by <__main__.MyClass object at 0x801864e50> + + .. attribute:: callbacks + + A list of callbacks currently bound to the :class:`EventHandler`. + + .. attribute:: sender + + The responsible object that executes the :class:`EventHandler`. + + .. method:: add(callback : Callable) + + Adds a callback to the :class:`EventHandler`. + + .. method:: remove(callback : Callable) + + Removes a callback from the :class:`EventHandler`. + + .. method:: __call__(*args) -> [ ... ] + + Executes all connected callbacks in the order of addition, + passing the :attr:`sender` of the :class:`EventHandler` as first + argument and the optional args as second, third, ... argument to + them. + + This will return a list containing the return values of the callbacks + in the order of their execution. + + +.. class:: MPEventHandler(sender) + + An asynchronous event handling class based on :class:`EventHandler`, + in which callbacks are executed in parallel. It is the responsibility + of the caller code to ensure that every object used maintains a + consistent state. The :class:`MPEventHandler` class will not apply + any locks, synchronous state changes or anything else to the + arguments or callbacks being used. Consider it a "fire-and-forget" event + handling strategy. + + .. note:: + + The :class:`MPEventHandler` relies on the :mod:`multiprocessing` + module. If the module is not available in the target environment, + a :exc:`sdl2.ext.compat.UnsupportedError` is raised. + + Also, please be aware of the restrictions that apply to the + :mod:`multiprocessing` module; arguments and callback functions for + example have to be pickable, etc. + + .. method:: __call__(*args) -> AsyncResult + + Executes all connected callbacks within a + :class:`multiprocessing.pool.Pool`, passing the :attr:`sender` as first + argument and the optional *args* as second, third, ... argument to them. + + This will return a :class:`multiprocessing.pool.AsyncResult` containing + the return values of the callbacks in the order of their execution. diff --git a/PySDL2-0.9.5/doc/html/_sources/modules/sdl2ext_font.txt b/PySDL2-0.9.5/doc/html/_sources/modules/sdl2ext_font.txt new file mode 100644 index 0000000..cea11c2 --- /dev/null +++ b/PySDL2-0.9.5/doc/html/_sources/modules/sdl2ext_font.txt @@ -0,0 +1,114 @@ +.. currentmodule:: sdl2.ext + +Text rendering routines +======================= + +.. class:: BitmapFont(surface : Sprite, size : iterable[, mapping=None) + + A bitmap graphics to character mapping. The :class:`BitmapFont` class + uses an image *surface* to find and render font character glyphs for + text. It requires a mapping table, which denotes the characters + available on the image. + + The mapping table is a list of strings, where each string reflects a + *line* of characters on the image. Each character within each line + has the same size as specified by the size argument. + + A typical mapping table might look like :: + + [ '0123456789', + 'ABCDEFGHIJ', + 'KLMNOPQRST', + 'UVWXYZ ', + 'abcdefghij', + 'klmnopqrst', + 'uvwxyz ', + ',;.:!?+-()' ] + + .. attribute:: surface + + The :class:`sdl2.SDL_Surface` containing the character bitmaps. + + .. attribute:: offsets + + A dict containing the character offsets on the :attr:`surface`. + + .. attribute:: mapping + + The character mapping table, a list of strings. + + .. attribute:: size + + The size of an individual glyph bitmap on the font. + + .. method:: render(text : string[, bpp=None]) -> Sprite + + Renders the passed text on a new :class:`Sprite` and returns it. + If no explicit *bpp* are provided, the bpp settings of the + :attr:`.surface` are used. + + .. method:: render_on(surface : Sprite, text : string[, \ + offset=(0, 0)]) -> (int, int, int, int) + + Renders a text on the passed sprite, starting at a specific + offset. The top-left start position of the text will be the + passed *offset* and a 4-value tuple with the changed area will be + returned. + + .. method:: contains(c : string) -> bool + + Checks, whether a certain character exists in the font. + + .. method:: can_render(text : string) -> bool + + Checks, whether all characters in the passed *text* can be rendered. + +.. class:: FontManager(font_path : str[, alias=None[, size=16[, color=Color(255, 255, 255)[, bg_color=Color(0, 0, 0)[, index=0]]]]]) + + Manage fonts and rendering of text. + + One font path must be given to initialise the FontManager. + :attr:`default_font` will be set to this font. *size* is the default + font size in pixels. *color* and *bg_color* will give the FontManager + a default color. *index* will select a specific font face from a file + containing multiple font faces. The first face is always at index 0. It can + be used for TTC (TrueType Font Collection) fonts. + + .. attribute:: bg_color + + The :class:`sdl2.ext.Color` to be used as background color. + + .. attribute:: color + + The :class:`sdl2.ext.Color` to be used for rendering text. + + .. attribute:: default_font + + Returns the name of the current default font being used by the + :class:`FontManager`. On assigning :attr:`default_font`, + the value must be a loaded font alias. + + .. attribute:: size + + The default font size in pixels. + + .. method:: add(font_path : str[, alias=None[, size=None[, index=0]]])) -> sdl2.sdlttf.TTF_Font + + Add a font to the :class:`FontManager`. *alias* is by default the + font name, any other name can be passed, *size* is the font size + in pixels and defaults to :attr:`size`. *index* selects a specific font + face from a TTC (TrueType Font Collection) file. Returns the font pointer + stored in :attr:`fonts`. + + .. method:: close() + + Closes all fonts used by the :class:`FontManager`. + + .. method:: render(text : str[, alias=None[, size=None[, width=None[, color=None[, bg_color=None[, **kwargs]]]]]]) -> sdl2.SDL_Surface + + Renders text to a surface. This method uses the font designated by + the passed *alias* or, if *alias* is omitted, by the set + :attr:`default_font`. A *size* can be passed even if the font was + not loaded with this size. A *width* can be given for automatic line + wrapping. If no *bg_color* or *color* are given, it will default to + the FontManager's :attr:`bg_color` and :attr:`color`. diff --git a/PySDL2-0.9.5/doc/html/_sources/modules/sdl2ext_gui.txt b/PySDL2-0.9.5/doc/html/_sources/modules/sdl2ext_gui.txt new file mode 100644 index 0000000..02dac17 --- /dev/null +++ b/PySDL2-0.9.5/doc/html/_sources/modules/sdl2ext_gui.txt @@ -0,0 +1,284 @@ +.. currentmodule:: sdl2.ext + +User interface elements +======================= +User interface elements within :mod:`sdl2.ext` are simple +:class:`Sprite` objects, which are enhanced by certain input hooks; as such, +they are not classes on their own, but implemented as mixins. The user input +itself is handled by an :class:`UIProcessor` object, which takes care of +delegating input events, such as mouse movements, clicks and keyboard input, +to the correct UI element. + +Depending on the event type (e.g. pressing a mouse button), the UIProcessor +will execute its matching method (e.g. ``mousedown()``) with only those UI +elements, which support the event type. + +.. image:: images/uiprocessing.png + +.. _ui-elem-types: + +UI element types +---------------- +Every :class:`sdl2.ext` UI element is a simple :class:`Sprite` object, to +which additional attributes and methods are bound. + +Every UI element features the following attributes + +``element.uitype`` + + The ``uitype`` attribute can have one of the following values, + identifying the UI element: + + * ``BUTTON`` - a UI element, which can react on mouse input + * ``CHECKBUTTON`` - as ``BUTTON``, but it retains its state on clicks + * ``TEXTENTRY`` - a UI element that reacts on keyboard input + +``element.events`` + + A dictionary containing the SDL2 event mappings. Each supported SDL2 event + (e.g. ``SDL_MOUSEMOTION``) is associated with a bound + :class:`EventHandler` acting as callback for user code + (e.g. ``mousemotion()``). + +Depending on the exact type of the element, it will feature additional methods +and attributes explained below. + +Button elements +^^^^^^^^^^^^^^^ +``BUTTON`` UI elements feature a ``state`` attribute, which can be one of the +following values. + +======== ===================================================================== +state Description +======== ===================================================================== +RELEASED Indicates that the UI element is not pressed. +HOVERED Indicates that the mouse cursor is currently hovering the UI element. +PRESSED Indicates that a mouse button is pressed on the UI element. +======== ===================================================================== + +``BUTTON`` UI elements react with the following event handlers on events: + +``button.motion(event : sdl2.events.SDL_Event)`` + + An :class:`EventHandler` that is invoked, if the mouse moves around while + being over the ``BUTTON``. + +``button.pressed(event : sdl2.events.SDL_Event)`` + + An :class:`EventHandler` that is invoked, if a mouse button is pressed on + the ``BUTTON``. + +``button.released(event : sdl2.events.SDL_Event)`` + + An :class:`EventHandler` that is invoked, if a mouse button is released on + the ``BUTTON``. + +``button.click(event : sdl2.events.SDL_Event)`` + + An :class:`EventHandler` that is invoked, if a mouse button is pressed and + released on the ``BUTTON``. + +Besides the ``BUTTON`` a special ``CHECKBUTTON`` UI element type exists, +which enhances the ``BUTTON`` bindings by an additional ``checked`` attribute. +The ``checked`` attribute switches its status (``False`` to ``True`` and +``True`` to ``False``) every time the UI element is clicked. + +Text input elements +^^^^^^^^^^^^^^^^^^^ +``TEXTENTRY`` elements react on text input, once they are activated. Text being +input, once a ``TEXTENTRY`` has been activated, is stored in its ``text`` +attribute. + +The ``TEXTENTRY`` reacts with the following event handlers on events: + +``textentry.motion(event : sdl2.events.SDL_Event)`` + + An :class:`EventHandler` that is invoked, if the mouse moves around while + being over the ``TEXTENTRY``. + +``textentry.pressed(event : sdl2.events.SDL_Event)`` + + An :class:`EventHandler` that is invoked, if a mouse button is pressed on + the ``TEXTENTRY``. + +``textentry.released(event : sdl2.events.SDL_Event)`` + + An :class:`EventHandler` that is invoked, if a mouse button is released on + the ``TEXTENTRY``. + +``textentry.keydown(event : sdl2.events.SDL_Event)`` + + An :class:`EventHandler` that is invoked on pressing a key. + +``textentry.keyup(event : sdl2.events.SDL_Event)`` + + An :class:`EventHandler` that is invoked on releasing a key. + +``textentry.input(event : sdl2.events.SDL_Event)`` + + An :class:`EventHandler` that is invoked on text input events. + Text input events are automatically created, once the :class:`UIProcessor` + activates a ``TEXTENTRY`` UI element. + +``textentry.editing(event : sdl2.events.SDL_Event)`` + + An :class:`EventHandler` that is invoked on text editing events. Text + editing events are automatically created, once the :class:`UIProcessor` + activates a ``TEXTENTRY`` UI element. + + Text editing events are however only raised, if an IME system is involved, + which combines glyphs and symbols to characters or word fragments. + +API +--- + +.. class:: UIFactory(spritefactory : SpriteFactory[, **kwargs]) + + A factory class for creating UI elements. The :class:`UIFactory` + allows you to create UI elements based on the + :class:`Sprite` class. To do this, it requires a :class:`SpriteFactory`, + which will create the sprites, to which the :class:`UIFactory` then binds + the additional methods and attributes. + + The additional *kwargs* are used as default arguments for creating + **sprites** within the factory methods. + + .. attribute:: default_args + + A dictionary containing the default arguments to be passed to the + sprite creation methods of the bound :class:`SpriteFactory`. + + .. attribute:: spritefactory + + The :class:`SpriteFactory` being used for creating new :class:`Sprite` + objects. + + .. method:: create_button(**kwargs) -> Sprite + + Creates a new button UI element. + + *kwargs* are the arguments to be passed for the sprite + construction and can vary depending on the sprite type. + See :meth:`SpriteFactory.create_sprite()` for further details. + + .. method:: create_check_button(**kwargs) -> Sprite + + Creates a new checkbutton UI element. + + *kwargs* are the arguments to be passed for the sprite + construction and can vary depending on the sprite type. + See :meth:`SpriteFactory.create_sprite()` for further details. + + .. method:: create_text_entry(**kwargs) -> Sprite + + Creates a new textentry UI element. + + *kwargs* are the arguments to be passed for the sprite + construction and can vary depending on the sprite type. + See :meth:`SpriteFactory.create_sprite()` for further details. + + .. method:: from_color(color : object , size) -> Sprite + + Creates a UI element with a specific color. + + *uitype* must be one of the supported :ref:`ui-elem-types` classifying + the type of UI element to be created. + + .. method:: from_image(uitype : int, fname : str) -> Sprite + + Creates a UI element from an image file. The image must be + loadable via :func:`load_image()`. + + *uitype* must be one of the supported :ref:`ui-elem-types` classifying + the type of UI element to be created. + + .. method:: from_object(uitype : int, obj: object) -> Sprite + + Creates a UI element from an object. The object will be passed through + :func:`sdl2.rwops_from_object()` in order to try to load image data from + it. + + *uitype* must be one of the supported :ref:`ui-elem-types` classifying + the type of UI element to be created. + + .. method:: from_surface(uitype : int, surface : SDL_Surface[, free=False]) -> Sprite + + Creates a UI element from the passed + :class:`sdl2.surface.SDL_Surface`. If *free* is set to + ``True``, the passed *surface* will be freed automatically. + + *uitype* must be one of the supported :ref:`ui-elem-types` classifying + the type of UI element to be created. + +.. class:: UIProcessor() + + A processing system for user interface elements and events. + + .. attribute:: handlers + + A dict containing the mapping of SDL2 events to the available + :class:`EventHandler` bindings of the :class:`UIProcessor`. + + .. method:: activate(component : object) -> None + + Activates a UI control to receive text input. + + .. method:: deactivate(component : object) -> None + + Deactivate the currently active UI control. + + .. method:: passevent(component : object, event : SDL_Event) -> None + + Passes the *event* to a *component* without any additional checks or + restrictions. + + .. method:: mousemotion(component : object, event : SDL_Event) -> None + + Checks, if the event's motion position is on the *component* and + executes the component's event handlers on demand. If the motion event + position is not within the area of the *component*, nothing will be + done. In case the component is a ``BUTTON``, its :attr:`state` will be + adjusted to reflect, if it is currently hovered or not. + + .. method:: mousedown(component : object, event : SDL_Event) -> None + + Checks, if the event's button press position is on the *component* and + executes the component's event handlers on demand. If the button press + position is not within the area of the component, nothing will be done. + + In case the component is a ``BUTTON``, its :attr:`state` + will be adjusted to reflect, if it is currently pressed or not. + + In case the component is a ``TEXTENTRY`` and the pressed button is + the primary mouse button, the component will be marked as the next + control to activate for text input. + + .. method:: mouseup(self, component, event) -> None + + Checks, if the event's button release position is on the *component* and + executes the component's event handlers on demand. If the button release + position is not within the area of the component, nothing will be done. + + In case the component is a ``BUTTON``, its :attr:`state` + will be adjusted to reflect, whether it is hovered or not. + + If the button release followed a button press on the same component and + if the button is the primary button, the ``click()`` event handler is + invoked, if the component is a ``BUTTON``. + + .. method:: dispatch(obj : object, event : SDL_Event) -> None + + Passes an event to the given object. If *obj* is a + :class:`World` object, UI relevant components will receive + the event, if they support the event type. If *obj* is a single object, + ``obj.events`` **must** be a dict consisting of SDL event type + identifiers and :class:`EventHandler` instances bound + to the object. If *obj* is a iterable, such as a list or set, every + item within *obj* **must** feature an ``events`` attribute as + described above. + + .. method:: process(world : World, components : iterable) -> None + + The :class:`UIProcessor` class does not implement the `process()` + method by default. Instead it uses :meth:`dispatch()` to send events + around to components. :meth:`process()` does nothing. diff --git a/PySDL2-0.9.5/doc/html/_sources/modules/sdl2ext_image.txt b/PySDL2-0.9.5/doc/html/_sources/modules/sdl2ext_image.txt new file mode 100644 index 0000000..d85f5d9 --- /dev/null +++ b/PySDL2-0.9.5/doc/html/_sources/modules/sdl2ext_image.txt @@ -0,0 +1,27 @@ +.. currentmodule:: sdl2.ext + +Image loaders +============= + +.. function:: get_image_formats() -> (str, str, ...) + + Gets the formats supported by PySDL2 in the default installation. + +.. function:: load_image(fname : str[, enforce=None]) -> sdl2.SDL_Surface + + Creates a :class:`sdl2.SDL_Surface` from an image file. + + This function makes use of the `Python Imaging Library + `_, if it is available on the + target execution environment. The function will try to load the file via + :mod:`sdl2` first. If the file could not be loaded, it will try to load it + via :mod:`sdl2.sdlimage` and PIL. + + You can force the function to use only one of them, by passing the + *enforce* as either ``"PIL"`` or ``"SDL"``. + + .. note:: + + This will call :func:`sdl2.sdlimage.IMG_Init()` implicitly with the + default arguments, if the module is available and if + :func:`sdl2.SDL_LoadBMP()` failed to load the image. diff --git a/PySDL2-0.9.5/doc/html/_sources/modules/sdl2ext_particles.txt b/PySDL2-0.9.5/doc/html/_sources/modules/sdl2ext_particles.txt new file mode 100644 index 0000000..560bec6 --- /dev/null +++ b/PySDL2-0.9.5/doc/html/_sources/modules/sdl2ext_particles.txt @@ -0,0 +1,96 @@ +.. module:: sdl2.ext.particles + :synopsis: A simple particle system. + +sdl2.ext.particles - A simple particle system +============================================= + +.. class:: ParticleEngine() + + A simple particle processing system. The :class:`ParticleEngine` + takes care of creating, updating and deleting particles via callback + functions. It only decreases the life of the particles by itself and + marks them as dead, once the particle's life attribute has reached 0 + or below. + + .. attribute:: createfunc + + Function for creating new particles. The function needs to take + two arguments, the ``world`` argument passed to :meth:`process()` + and a list of the particles considered dead (:attr:`Particle.life` + <= 0). :: + + def creation_func(world, deadparticles): + ... + + .. attribute:: updatefunc + + Function for updating existing, living particles. The function + needs to take two arguments, the ``world`` argument passed to + :meth:`process()` and a :class:`set` of the still living + particles. :: + + def update_func(world, livingparticles): + ... + + .. attribute:: deletefunc + + Function for deleting dead particles. The function needs to take + two arguments, the ``world`` argument passed to :meth:`process()` + and a list of the particles considered dead (:attr:`Particle.life` + <= 0). :: + + def deletion_func(world, deadparticles): + ... + + .. method:: process(world : World, components : iterable) -> None + + Processes all particle components, decreasing their life by 1. + + Once the life of all particle components has been decreased + properly and the particles considered dead (life <= 0) are + identified, the creation, update and deletion callbacks are + invoked. + + The creation callback takes the passed world as first and the + list of dead particles as second argument. :: + + def particle_createfunc(world, list_of_dead_ones): + ... + + Afterwards the still living particles are passed to the update + callback, which also take the passed world as first and the + living particles as set as second argument. :: + + def particle_updatefunc(world, set_of_living_ones): + ... + + Finally, the dead particles need to be deleted in some way or + another, which is done by the deletion callback, taking the + passed world as first and the list of dead particles as second + argument. :: + + def particle_deletefunc(world, list_of_dead_ones): + ... + +.. class:: Particle(x, y, life : int) + + A simple particle component type. It only contains information about + a x- and y-coordinate and its current life time. The life time will + be decreased by 1, every time the particle is processed by the + :class:`ParticleEngine`. + + .. attribute:: x + + The x coordinate of the particle. + + .. attribute:: y + + The y coordinate of the particle. + + .. attribute:: life + + The remaining life time of the particle. + + .. attribute:: position + + The x- and y-coordinate of the particle as tuple. diff --git a/PySDL2-0.9.5/doc/html/_sources/modules/sdl2ext_pixelaccess.txt b/PySDL2-0.9.5/doc/html/_sources/modules/sdl2ext_pixelaccess.txt new file mode 100644 index 0000000..209b022 --- /dev/null +++ b/PySDL2-0.9.5/doc/html/_sources/modules/sdl2ext_pixelaccess.txt @@ -0,0 +1,56 @@ +.. currentmodule:: sdl2.ext + +2D and 3D direct pixel access +============================= + +.. class:: PixelView(source : object) + + 2D :class:`MemoryView` for :class:`SoftwareSprite` and + :class:`sdl2.SDL_surface` pixel access. + + .. note:: + + If necessary, the *source* surface will be locked for accessing its + pixel data. The lock will be removed once the :class:`PixelView` is + garbage-collected or deleted. + + The :class:`PixelView` uses a y/x-layout. Accessing ``view[N]`` will + operate on the Nth row of the underlying surface. To access a specific + column within that row, ``view[N][C]`` has to be used. + + .. note:: + + :class:`PixelView` is implemented on top of the :class:`MemoryView` + class. As such it makes heavy use of recursion to access rows and + columns and can be considered as slow in contrast to optimised + ndim-array solutions such as :mod:`numpy`. + +.. function:: pixels2d(source : object) + + Creates a 2D pixel array, based on ``numpy.ndarray``, from the passed + *source*. *source* can be a :class:`SoftwareSprite` or + :class:`sdl2.SDL_Surface`. The ``SDL_Surface`` of the *source* will be + locked and unlocked automatically. + + The *source* pixels will be accessed and manipulated directly. + + .. note:: + + :func:`pixels2d` is only usable, if the numpy package is available + within the target environment. If numpy could not be imported, a + :exc:`sdl2.ext.compat.UnsupportedError` will be raised. + +.. function:: pixels3d(source : object) + + Creates a 3D pixel array, based on ``numpy.ndarray``, from the passed + *source*. *source* can be a :class:`SoftwareSprite` + or :class:`sdl2.SDL_Surface`. The ``SDL_Surface`` of the *source* + will be locked and unlocked automatically. + + The *source* pixels will be accessed and manipulated directly. + + .. note:: + + :func:`pixels3d` is only usable, if the numpy package is available + within the target environment. If numpy could not be imported, a + :exc:`sdl2.ext.compat.UnsupportedError` will be raised. diff --git a/PySDL2-0.9.5/doc/html/_sources/modules/sdl2ext_resources.txt b/PySDL2-0.9.5/doc/html/_sources/modules/sdl2ext_resources.txt new file mode 100644 index 0000000..a8db602 --- /dev/null +++ b/PySDL2-0.9.5/doc/html/_sources/modules/sdl2ext_resources.txt @@ -0,0 +1,180 @@ +.. currentmodule:: sdl2.ext + +Resource management +=================== +Every application usually ships with various resources, such as image and data +files, configuration files and so on. Accessing those files in the folder +hierarchy or in a bundled format for various platforms can become a complex +task. The :class:`Resources` class allows you to manage different application +data in a certain directory, providing a dictionary-style access functionality +for your in-application resources. + +Let's assume, your application has the following installation layout :: + + Application Directory + Application.exe + Application.conf + data/ + background.jpg + button1.jpg + button2.jpg + info.dat + +Within the ``Application.exe`` code, you can - completely system-agnostic - +define a new resource that keeps track of all ``data`` items. :: + + apppath = os.path.dirname(os.path.abspath(__file__)) + appresources = Resources(os.path.join(apppath, "data")) + # Access some images + bgimage = appresources.get("background.jpg") + btn1image = appresources.get("button1.jpg") + ... + +To access individual files, you do not need to concat paths the whole +time and regardless of the current directory, your application operates +on, you can access your resource files at any time through the +:class:`Resources` instance, you created initially. + +The :class:`Resources` class is also able to scan an index archived files, +compressed via ZIP or TAR (gzip or bzip2 compression), and subdiectories +automatically. :: + + Application Directory + Application.exe + Application.conf + data/ + audio/ + example.wav + background.jpg + button1.jpg + button2.jpg + graphics.zip + [tileset1.bmp + tileset2.bmp + tileset3.bmp + ] + info.dat + + tilesimage = appresources.get("tileset1.bmp") + audiofile = appresources.get("example.wav") + +If you request an indexed file via :meth:`Resources.get`, you will receive +a :class:`io.BytesIO` stream, containing the file data, for further processing. + +.. note:: + + The scanned files act as keys within the :class:`Resources` class. This + means that two files, that have the same name, but are located in different + directories, will not be indexed. Only one of them will be accessible + through the :class:`Resources` class. + +API +--- + +.. class:: Resources([path=None[, subdir=None[, excludepattern=None]]]) + + The Resources class manages a set of file resources and eases + accessing them by using relative paths, scanning archives + automatically and so on. + + .. method:: add(filename : string) + + Adds a file to the resource container. Depending on the + file type (determined by the file suffix or name) the file will be + automatically scanned (if it is an archive) or checked for + availability (if it is a stream or network resource). + + .. method:: add_archive(filename : string[, typehint="zip"]) + + Adds an archive file to the resource container. This will scan the + passed archive and add its contents to the list of available and + accessible resources. + + .. method:: add_file(filename : string) + + Adds a file to the resource container. This will only add the + passed file and do not scan an archive or check the file for + availability. + + .. method:: get(filename : string) -> BytesIO + + Gets a specific file from the resource container. + + Raises a :exc:`KeyError`, if the *filename* could not be found. + + .. method:: get_filelike(filename : string) -> file object + + Similar to :meth:`get()`, but tries to return the original file + handle, if possible. If the found file is only available within an + archive, a :class:`io.BytesIO` instance will be returned. + + Raises a :exc:`KeyError`, if the *filename* could not be found. + + .. method:: get_path(filename : string) -> string + + Gets the path of the passed *filename*. If *filename* is only + available within an archive, a string in the form + ``filename@archivename`` will be returned. + + Raises a :exc:`KeyError`, if the *filename* could not be found. + + .. method:: scan(path : string[, subdir=None[, excludepattern=None]) + + Scans a path and adds all found files to the resource + container. If a file within the path is a supported archive (ZIP + or TAR), its contents will be indexed aut added automatically. + + The method will consider the directory part (``os.path.dirname``) + of the provided *path* as path to scan, if the path is not a + directory. If *subdir* is provided, it will be appended to the + path and used as starting point for adding files to the resource + container. + + *excludepattern* can be a regular expression to skip + directories, which match the pattern. + +.. function:: open_tarfile(archive : string, filename : string \ + [, directory=None[, ftype=None]]) -> BytesIO + + Opens and reads a certain file from a TAR archive. The result is + returned as :class:`BytesIO` stream. *filename* can be a relative + or absolute path within the TAR archive. The optional *directory* + argument can be used to supply a relative directory path, under which + *filename* will be searched. + + *ftype* is used to supply additional compression information, in + case the system cannot determine the compression type itself, and can + be either **"gz"** for gzip compression or **"bz2"** for bzip2 + compression. + + If the filename could not be found or an error occurred on reading it, + ``None`` will be returned. + + Raises a :exc:`TypeError`, if *archive* is not a valid TAR archive or + if *ftype* is not a valid value of ("gz", "bz2"). + + .. note:: + + If *ftype* is supplied, the compression mode will be enforced for + opening and reading. + +.. function:: open_url(filename : string[, basepath=None]) -> file object + + Opens and reads a certain file from a web or remote location. This + function utilizes the :mod:`urllib2` module for Python 2.7 and + :mod:`urllib` for Python 3.x, which means that it is restricted to + the types of remote locations supported by the module. + + *basepath* can be used to supply an additional location prefix. + +.. function:: open_zipfile(archive : string, filename : string \ + [, directory : string]) -> BytesIO + + Opens and reads a certain file from a ZIP archive. The result is + returned as :class:`BytesIO` stream. *filename* can be a relative + or absolute path within the ZIP archive. The optional *directory* + argument can be used to supply a relative directory path, under which + *filename* will be searched. + + If the filename could not be found, a :exc:`KeyError` will be raised. + Raises a :exc:`TypeError`, if *archive* is not a valid ZIP archive. diff --git a/PySDL2-0.9.5/doc/html/_sources/modules/sdl2ext_sprite.txt b/PySDL2-0.9.5/doc/html/_sources/modules/sdl2ext_sprite.txt new file mode 100644 index 0000000..03be99d --- /dev/null +++ b/PySDL2-0.9.5/doc/html/_sources/modules/sdl2ext_sprite.txt @@ -0,0 +1,383 @@ +.. currentmodule:: sdl2.ext + +Sprite, texture and pixel surface routines +========================================== + +.. data:: TEXTURE + + Indicates that texture-based rendering or sprite creation is wanted. + +.. data:: SOFTWARE + + Indicates that software-based rendering or sprite creation is wanted. + +.. class:: Sprite() + + A simple 2D object, implemented as abstract base class. + + .. attribute:: x + + The top-left horizontal offset at which the :class:`Sprite` + resides. + + .. attribute:: y + + The top-left vertical offset at which the :class:`Sprite` + resides. + + .. attribute:: position + + The top-left position (:attr:`x` and :attr:`y`) as tuple. + + .. attribute:: size + + The width and height of the :class:`Sprite` as tuple. + + .. note:: + + This is an abstract property and needs to be implemented by inheriting + classes. + + .. attribute:: area + + The rectangular area occupied by the :class:`Sprite`. + + .. attribute:: depth + + The layer depth on which to draw the :class:`Sprite`. + :class:`Sprite` objects with higher :attr:`depth` values will be + drawn on top of other :class:`Sprite` values by the + :class:`SpriteRenderSystem`. + +.. class:: SoftwareSprite() + + A simple, visible, pixel-based 2D object, implemented on top of + SDL2 software surfaces. + + .. attribute:: surface + + The :class:`sdl2.SDL_Surface` containing the pixel data. + + .. attribute:: size + + The size of the :class:`SoftwareSprite` as tuple. + + .. method:: subsprite(area : (int, int, int, int)) -> SoftwareSprite + + Creates another :class:`SoftwareSprite` from a part of the + :class:`SoftwareSprite`. The two sprites share pixel data, so if the + parent sprite's surface is not managed by the sprite (``free`` is False), + you will need to keep it alive while the subsprite exists. + +.. class:: TextureSprite() + + A simple, visible, pixel-based 2D object, implemented on top of SDL2 + textures. + + .. attribute:: angle + + The rotation angle for the :class:`TextureSprite`. + + .. attribute:: center + + The center to use for rotating the :class:`TextureSprite`. `None` will + reset the center to the default center of the :class:`TextureSprite`. + + .. attribute:: flip + + Allows the :class:`TextureSprite` to be flipped over its horizontal or + vertical axis via the appropriate SDL_FLIP_* value. + + .. attribute:: size + + The size of the :class:`TextureSprite` as tuple. + + .. attribute:: texture + + The :class:`sdl2.SDL_Texture` containing the texture data. + +.. class:: SpriteRenderSystem() + + A rendering system for :class:`Sprite` components. This is a base class for + rendering systems capable of drawing and displaying :class:`Sprite` based + objects. Inheriting classes need to implement the rendering capability by + overriding the render() method. + + .. attribute:: sortfunc + + Sort function for the component processing order. The default sort order + is based on the depth attribute of every sprite. Lower depth values will + cause sprites to be drawn below sprites with higher depth values. If + :attr:`sortfunc` shall be overridden, it must match the callback + requirements for :func:`sorted()`. + + .. method:: process(world : World, components : iterable) -> None + + Renders the passed :class:`Sprite` objects via the + :meth:`render()` method. The :class:`Sprite` objects are sorted + via :attr:`sortfunc` before they are passed to :meth:`render()`. + + .. method:: render(sprite : iterable) -> None + + Renders the :class:`Sprite` objects. + + .. note:: + + This is a no-op function and needs to be implemented by inheriting + classes. + +.. class:: SoftwareSpriteRenderSystem(window : object) + + A rendering system for :class:`SoftwareSprite` components. The + :class:`SoftwareSpriteRenderSystem` class uses a :class:`sdl2.SDL_Window` as + drawing device to display :class:`SoftwareSprite` surfaces. It uses the + internal SDL surface of the *window* as drawing context, so that GL + operations, such as texture handling or the usage of SDL renderers is not + possible. + + *window* can be either a :class:`sdl2.ext.Window` or + :class:`sdl2.SDL_Window` instance. + + .. attribute:: window + + The :class:`sdl2.SDL_Window` that is used as drawing device. + + .. attribute:: surface + + The :class:`sdl2.SDL_Surface` that acts as drawing context for + :attr:`window`. + + .. method:: render(sprites : object[, x=None[, y=None]]) -> None + + Draws the passed *sprites* on the :class:`sdl2.ext.Window` surface. *x* + and *y* are optional arguments that can be used as relative drawing + location for *sprites*. If set to ``None``, the location information of + the *sprites* are used. If set and *sprites* is an iterable, such as a + list of :class:`SoftwareSprite` objects, *x* and *y* are relative + location values that will be added to each individual sprite's + position. If *sprites* is a single :class:`SoftwareSprite`, *x* and *y* + denote the absolute position of the :class:`SoftwareSprite`, if set. + +.. class:: TextureSpriteRenderSystem(target : object) + + A rendering system for :class:`TextureSprite` components. The + :class:`TextureSpriteRenderSystem` class uses a :class:`sdl2.SDL_Renderer` as + drawing device to display :class:`Sprite` surfaces. + + *target* can be a :class:`sdl2.ext.Window`, :class:`sdl2.SDL_Window`, + a:class:`sdl2.ext.Renderer` or a :class:`sdl2.SDL_Renderer`. If it is a + :class:`sdl2.ext.Window` or :class:`sdl2.SDL_Window` instance, it will try + to create a :class:`sdl2.SDL_Renderer` with hardware acceleration for it. + + .. attribute:: sdlrenderer + + The :class:`sdl2.SDL_Renderer` that is used as drawing context. + + .. attribute:: rendertarget + + The target for which the :attr:`renderer` was created, if any. + + .. method:: render(sprites : object[, x=None[, y=None]]) -> None + + Renders the passed *sprites* via the :attr:`renderer`. *x* and + *y* are optional arguments that can be used as relative drawing + location for *sprites*. If set to ``None``, the location + information of the *sprites* are used. If set and *sprites* is an + iterable, such as a list of :class:`TextureSprite` objects, *x* + and *y* are relative location values that will be added to each + individual sprite's position. If *sprites* is a single + :class:`TextureSprite`, *x* and *y* denote the absolute position of the + :class:`TextureSprite`, if set. + +.. class:: SpriteFactory(sprite_type=TEXTURE, **kwargs) + + A factory class for creating :class:`Sprite` objects. The + :class:`SpriteFactory` can create :class:`TextureSprite` or + :class:`SoftwareSprite` instances, depending on the *sprite_type* + being passed to it, which can be ``SOFTWARE`` or ``TEXTURE``. The + additional *kwargs* are used as default arguments for creating + sprites within the factory methods. + + .. attribute:: sprite_type + + The sprite type created by the factory. This will be either + ``SOFTWARE`` for :class:`SoftwareSprite` or ``TEXTURE`` for + :class:`TextureSprite` objects. + + .. attribute:: default_args + + The default arguments to use for creating new sprites. + + .. method:: create_software_sprite(size, bpp=32, masks=None) -> SoftwareSprite + + Creates a software sprite. A *size* tuple containing the width and + height of the sprite and a *bpp* value, indicating the bits per + pixel to be used, need to be provided. + + .. method:: create_sprite(**kwargs) -> Sprite + + Creates a :class:`Sprite`. Depending on the :attr:`sprite_type`, + this will return a :class:`SoftwareSprite` or + :class:`TextureSprite`. + + *kwargs* are the arguments to be passed for the sprite + construction and can vary depending on the sprite type. Usually + they have to follow the :meth:`create_software_sprite()` and + :meth:`create_texture_sprite()` method signatures. *kwargs* + however will be mixed with the set :attr:`default_args` so that + one does not necessarily have to provide all arguments, if they + are set within the :attr:`default_args`. If *kwargs* and + :attr:`default_args` contain the same keys, the key-value pair of + *kwargs* is chosen. + + .. method:: create_sprite_render_system(*args, **kwargs) -> SpriteRenderSystem + + Creates a new :class:`SpriteRenderSystem`, based on the set + :attr:`sprite_type`. If :attr:`sprite_type` is ``TEXTURE``, a + :class:`TextureSpriteRenderSystem` is created with the the + ``renderer`` from the :attr:`default_args`. Other keyword + arguments are ignored in that case. + + Otherwise a :class:`SoftwareSpriteRenderSystem` is created and *args* + and *kwargs* are passed to it. + + .. method:: create_texture_sprite(renderer : object, size, pformat=sdl2.SDL_PIXELFORMAT_RGBA8888, access=sdl2.SDL_TEXTUREACCESS_STATIC) -> TextureSprite + + Creates a texture sprite. A *size* tuple containing the width and + height of the sprite needs to be provided. + + :class:`TextureSprite` objects are assumed to be static by + default, making it impossible to access their pixel buffer in + favour for faster copy operations. If you need to update the pixel + data frequently or want to use the texture as target for rendering + operations, *access* can be set to the relevant + SDL_TEXTUREACCESS_* flag. + + .. method:: from_color(color : object , size, bpp=32, masks=None) -> Sprite + + Creates a :class:`Sprite` with a certain color. + + .. method:: from_image(fname : str) -> Sprite + + Creates a :class:`Sprite` from an image file. The image must be + loadable via :func:`sdl2.ext.load_image()`. + + .. method:: from_object(obj: object) -> Sprite + + Creates a :class:`Sprite` from an object. The object will be + passed through :func:`sdl2.rwops_from_object()` in + order to try to load image data from it. + + .. method:: from_surface(surface : SDL_Surface[, free=False]) -> Sprite + + Creates a :class:`Sprite` from the passed + :class:`sdl2.SDL_Surface`. If *free* is set to + ``True``, the passed *surface* will be freed automatically. + + .. method:: from_text(text : str[, **kwargs]) -> Sprite + + Creates a :class:`Sprite` from a string of text. This method + requires a :class:`sdl2.ext.FontManager` to be in *kwargs* or + :attr:`default_args`. + +.. class:: Renderer(target : obj[, logical_size=None[, index=-1[, flags=sdl2.SDL_RENDERER_ACCELERATED]]) + + A rendering context for windows and sprites that can use hardware or + software-accelerated graphics drivers. + + If target is a :class:`sdl2.ext.Window` or :class:`sdl2.SDL_Window`, + *index* and *flags* are passed to the relevant + :class:`sdl2.SDL_CreateRenderer()` call. If *target* is a + :class:`SoftwareSprite` or :class:`sdl2.SDL_Surface`, the *index* + and *flags* arguments are ignored. + + .. attribute:: sdlrenderer + + The underlying :class:`sdl2.SDL_Renderer`. + + .. attribute:: rendertarget + + The target for which the :class:`Renderer` was created. + + .. attribute:: logical_size + + The logical size of the renderer. + + Setting this allows you to draw as if your renderer had this size, even + though the target may be larger or smaller. When drawing, the renderer will + automatically scale your contents to the target, creating letter-boxing or + sidebars if necessary. + + To reset your logical size back to the target's, set it to ``(0, 0)``. + + Setting this to a lower value may be useful for low-resolution effects. + + Setting this to a larger value may be useful for antialiasing. + + .. attribute:: color + + The :class:`sdl2.ext.Color` to use for draw and fill operations. + + .. attribute:: blendmode + + The blend mode used for drawing operations (fill and line). This + can be a value of + + * ``SDL_BLENDMODE_NONE`` for no blending + * ``SDL_BLENDMODE_BLEND`` for alpha blending + * ``SDL_BLENDMODE_ADD`` for additive color blending + * ``SDL_BLENDMODE_MOD`` for multiplied color blending + + .. attribute:: scale + + The horizontal and vertical drawing scale as two-value tuple. + + .. method:: clear([color=None]) + + Clears the rendering context with the currently set or passed + *color*. + + .. method:: copy(src : obj[, srcrect=None[, dstrect=None[, angle=0[, center=None[, flip=render.SDL_FLIP_NONE]]]]]) -> None + + Copies (blits) the passed *src*, which can be a :class:`TextureSprite` or + :class:`sdl2.SDL_Texture`, to the target of the + :class:`Renderer`. *srcrect* is the source rectangle to be used for + clipping portions of *src*. *dstrect* is the destination rectangle. + *angle* will cause the texture to be rotated around *center* by the given + degrees. *flip* can be one of the SDL_FLIP_* constants and will flip the + texture over its horizontal or vertical middle axis. If *src* is a + :class:`TextureSprite`, *angle*, *center* and *flip* will be set from + *src*'s attributes, if not provided. + + .. method:: draw_line(points : iterable[, color=None]) -> None + + Draws one or multiple lines on the rendering context. If *line* consists + of four values ``(x1, y1, x2, y2)`` only, a single line is drawn. If + *line* contains more than four values, a series of connected lines is + drawn. + + .. method:: draw_point(points : iterable[, color=None]) -> None + + Draws one or multiple points on the rendering context. The *points* + argument contains the x and y values of the points as simple sequence in + the form ``(point1_x, point1_y, point2_x, point2_y, ...)``. + + .. method:: draw_rect(rects : iterable[, color=None]) -> None + + Draws one or multiple rectangles on the rendering context. *rects* + contains sequences of four values denoting the x and y offset and width + and height of each individual rectangle in the form ``((x1, y1, w1, h1), + (x2, y2, w2, h2), ...)``. + + .. method:: fill(rects : iterable[, color=None]) -> None + + Fills one or multiple rectangular areas on the rendering context with + the current set or passed *color*. *rects* contains sequences of four + values denoting the x and y offset and width and height of each + individual rectangle in the form ``((x1, y1, w1, h1), (x2, y2, w2, h2), + ...)``. + + .. method:: present() -> None + + Refreshes the rendering context, causing changes to the render buffers + to be shown. diff --git a/PySDL2-0.9.5/doc/html/_sources/modules/sdl2ext_surface.txt b/PySDL2-0.9.5/doc/html/_sources/modules/sdl2ext_surface.txt new file mode 100644 index 0000000..e9a822d --- /dev/null +++ b/PySDL2-0.9.5/doc/html/_sources/modules/sdl2ext_surface.txt @@ -0,0 +1,14 @@ +.. currentmodule:: sdl2.ext + +Software Surface manipulation +============================= + +.. function:: subsurface(surface : SDL_Surface, area : (int, int, int, int)) -> SDL_Surface + + Creates a surface from a part of another surface. The two surfaces share + pixel data. + + .. note:: + + The newly created surface *must not* be used after its parent has been + freed! \ No newline at end of file diff --git a/PySDL2-0.9.5/doc/html/_sources/modules/sdl2ext_window.txt b/PySDL2-0.9.5/doc/html/_sources/modules/sdl2ext_window.txt new file mode 100644 index 0000000..972d836 --- /dev/null +++ b/PySDL2-0.9.5/doc/html/_sources/modules/sdl2ext_window.txt @@ -0,0 +1,71 @@ +.. currentmodule:: sdl2.ext + +Window routines to manage on-screen windows +=========================================== + +.. class:: Window(title : string, size : iterable[, position=None[, flags=None]]) + + The Window class represents a visible on-screen object with an optional + border and *title* text. It represents an area on the screen that can be + accessed by the application for displaying graphics and receive and + process user input. + + The position to show the Window at is undefined by default, letting + the operating system or window manager pick the best location. The + behaviour can be adjusted through the ``DEFAULTPOS`` class variable. :: + + Window.DEFAULTPOS = (10, 10) + + The created Window is hidden by default, which can be overridden at + the time of creation by providing other SDL window flags through the + *flags* parameter. The default flags for creating Window instances + can be adjusted through the ``DEFAULTFLAGS`` class variable. :: + + Window.DEFAULTFLAGS = sdl2.SDL_WINDOW_SHOWN + + .. attribute:: window + + The used :class:`sdl2.SDL_Window`. + + .. attribute:: title + + The title of the :class:`Window`. + + .. attribute:: size + + The size of the :class:`Window`. + + .. method:: show() -> None + + Show the :class:`Window` on the display. + + .. method:: hide() -> None + + Hide the :class:`Window`. + + .. method:: maximize() -> None + + Maximizes the :class:`Window` to the display's dimensions. + + .. method:: minimize() -> None + + Minimizes the :class:`Window` to an iconified state in the system tray. + + .. method:: refresh() -> None + + Refreshes the entire :class:`Window` surface. + + .. note:: + + This only needs to be called, if a SDL_Surface was acquired via + :meth:`get_surface()` and is used to display contents. + + .. method:: get_surface() -> SDL_Surface + + Gets the :class:`sdl2.SDL_Surface` used by the :class:`Window` to + display 2D pixel data. + + .. note:: + + Using this method will make the usage of GL operations, such as + texture handling or the usage of SDL renderers impossible. diff --git a/PySDL2-0.9.5/doc/html/_sources/news.txt b/PySDL2-0.9.5/doc/html/_sources/news.txt new file mode 100644 index 0000000..eed35f9 --- /dev/null +++ b/PySDL2-0.9.5/doc/html/_sources/news.txt @@ -0,0 +1,277 @@ +Release News +============ +This describes the latest changes between the PySDL2 releases. + +0.9.5 +----- +Released on 2016-10-20. + +* updated :mod:`sdl2` to include the latest changes of SDL2 (release 2.0.5) +* fixed issue #94: added support for TrueType font collection (TTC) files +* fixed issue #80: added flip and rotation support for TextureSprite objects +* renamed :attr:`sdl2.ext.Renderer.renderer` attribute to + :attr:`sdl2.ext.Renderer.sdlrenderer`. The `renderer` attribute is + deprecated and will be removed in a later version. + +0.9.4 +----- +Released on 2016-07-07. + +* updated :mod:`sdl2` to include the latest changes of SDL2 (release 2.0.4) +* updated :mod:`sdl2.sdlttf` to include the latest changes of SDL_ttf (release 2.0.14) +* new :attr:`sdl2.ext.Renderer.logical_size` attribute to set or retrieve the logical + pixel size of a renderer +* fixed issue #48: be more noisy about DLL loading issues +* fixed issue #65: misleading documentation for :meth:`sdl2.ext.Renderer.draw_line()` +* fixed issue #67: Return a proper error code, when unittests running as subprocesses fail +* fixed issue #72: :func:`sdl2.video.SDL_GL_DrawableSize()` not available on import +* fixed issue #76: define missing SDL_PRESSED and SDL_RELEASED constants +* fixed issue #82: examples/gui.py fails due to an attribute error +* fixed issue #83: fix compatibility with newer PIL versions in + :func:`sdl2.ext.image.load_image()` +* fixed issue #84: The setter of :attr:`sdl2.ext.Renderer.scale` works properly now +* fixed issue #85: fix environment-dependent unit tests +* fixed issue #87: fix incorrect MIX_INIT_* constants in :mod:`sdl2.sdlmixer` +* fixed issue #88: use PILs `Image.tobyte()instead of the deprecated `Image.tostring()` +* fixed horizontical and vertical line drawing in :func:`sdl2.ext.line()` +* fixed a bug in :meth:`sdl2.ext.Renderer.draw_line()` for odd numbers of points +* dropped IronPython support + +0.9.3 +----- +Released on 2014-07-08. + +* updated :mod:`sdl2` to include the latest changes of SDL2 (HG) +* new :attr:`sdl2.ext.Renderer.scale` attribute, which denotes the horizontal + and vertical drawing scale +* new :func:`sdl2.ext.point_on_line()` function to test, if a point lies on a + line segment +* PYSDL2_DLL_PATH can contain multiple paths separated by :attr:`os.pathsep` + to search for the libraries now +* :func:`sdl2.ext.get_image_formats()` only returns BMP image support now, if + SDL2_image and PIL are not found +* :func:`sdl2.ext.load_image()` tries to use :func:`sdl2.SDL_LoadBMP()` now, + if SDL2_image and PIL are not found +* fixed issue #55: :meth:`sdl2.SDL_GameControllerAddMappingsFromFile()` does + not raise a TypeError for Python 3.x anymore +* fixed issue #56: :meth:`sdl2.ext.Renderer.draw_line()` and + :func:`sdl2.ext.Renderer.draw_point()` handle multiple lines (or points) as + arguments properly now +* fixed issue #57: if SDL2_image is not installed and PIL is used, the loaded + pixel buffer of the image file is not referenced anymore after returning + from :func:`sdl2.ext.load_image()`, causing random segmentation faults +* fixed issue #58: raise a proper error, + if :meth:`sdl2.ext.FontManager.render()` could not render a text surface +* fixed issue #59: The :attr:`sdl2.ext.TextureSpriteRenderSystem.sdlrenderer` + attribute is correctly documented now +* fixed a local variable and module name collision in + :meth:`sdl2.ext.FontManager.render()` + +Thanks to Filip M. Nowak for the PYSDL2_DLL_PATH improvement. + +0.9.2 +----- +Released on 2014-04-13. + +* fixed issue #32: the line clipping algorithms do not run into precision + errors anymore +* fixed issue #53 (again): :func:`sdl2.video.SDL_GL_ResetAttributes()` + is properly wrapped now to retain backwards compatibility with previous + SDL2 releases +* fixed issue #54: text input is correctly converted for the text entry + component +* updated the example BMP files, which could not be loaded properly on + some systems with SDL2_image and PIL + +0.9.1 +----- +Released on 2014-04-05. + +* fixed issue #50: corrected the :func:`sdl2.ext.load_image()` + documentation +* fixed issue #52: :meth:`sdl2.ext.Renderer.fill()`, + :meth:`sdl2.ext.Renderer.draw_rect()` and + :meth:`sdl2.ext.Renderer.draw_point()` convert sequences + correctly now +* fixed issue #53: provide backwards compatibility for previous + SDL2 releases by adding a wrapper func for + :func:`sdl2.cpuinfo.SDL_HasAVX()` + +0.9.0 +----- +Released on 2014-03-23. + +**IMPORTANT: This release breaks backwards-compatibility. See the notes +for the issues #36 and #39.** + +* updated :mod:`sdl2` to include the latest changes of SDL2 (release 2.0.3) +* new :func:`sdl2.ext.subsurface()` function to create subsurfaces from + :class:`sdl2.SDL_Surface` objects +* new :func:`sdl2.ext.SoftwareSprite.subsprite()` method to create + :class:`sdl2.ext.SoftwarSprite` objects sharing pixel data +* the unit test runner features a `--logfile` argument now to + safe the unit test output to a file +* issues #36, #39: the different render classes of sdl2.ext.sprite were renamed + + * the ``sdl2.ext.RenderContext`` class was renamed to + :class:`sdl2.ext.Renderer` to be consistent with with SDL2's naming scheme + * ``sdl2.ext.SpriteRenderer`` was renamed to + :class:`sdl2.ext.SpriteRenderSystem` + * ``sdl2.ext.SoftwareSpriteRenderer`` was renamed to + :class:`sdl2.ext.SoftwareSpriteRenderSystem` + * ``sdl2.ext.TextureSpriteRenderer`` was renamed to + :class:`sdl2.ext.TextureSpriteRenderSystem` + * ``sdl2.ext.SpriteFactory.create_sprite_renderer()`` was renamed to + :meth:`sdl2.ext.SpriteFactory.create_sprite_render_system()` + +* fixed :func:`sdl2.audio.SDL_LoadWAV()` macro to provide the correct arguments +* fixed issue #44: use a slightly less confusing ``ValueError``, if a renderer + argument for the :class:`sdl2.ext.SpriteFactory` is not provided +* fixed issue #43: improved the code reference for the improved bouncing + section in the docs +* fixed issue #40: typo in a ``RuntimeWarning`` message on loading the SDL2 + libraries +* fixed issue #38: the points arguments of + :meth:`sdl2.ext.Renderer.draw_points()` are properly documented now +* fixed issue #37: :func:`sdl2.SDL_GetRendererOutputSize()` is now acccessible + via a wildcard import +* fixed issue #35: download location is now mentioned in the docs +* fixed issue #12: remove confusing try/except on import in the examples + + +0.8.0 +----- +Released on 2013-12-30. + +* updated PD information to include the CC0 dedication, since giving + software away is not enough anymore +* updated :mod:`sdl2` to include the latest changes of SDL2 (HG) +* fixed a wrong C mapping of :func:`sdl2.rwops.SDL_FreeRW()` +* fixed various issues within the :class:`sdl2.ext.BitmapFont` class +* issue #26: :attr:`sdl2.SDL_AudioSpec.callback` is a :func:`SDL_AudioCallBack` + now +* issue #30: the SDL_Add/DelHintCallback() unittest works with PyPy now +* issue #31: :func:`sdl2.sdlmixer.SDL_MIXER_VERSION()` returns the proper + version now + +Thanks to Sven Eckelmann, Marcel Rodrigues, Michael McCandless, +Andreas Schiefer and Franz Schrober for providing fixes and +improvements. + +0.7.0 +----- +Released on 2013-10-27. + +* updated :mod:`sdl2` to include the latest changes of SDL2 (release 2.0.1) +* fixed a bug in :meth:`sdl2.ext.FontManager.render()`, which did not apply + the text color correctly +* issue #14: improved the error messages on failing DLL imports +* issue #19: the :meth:`sdl2.ext.TextureSpriteRenderer.render()` and + :meth:`sdl2.ext.SoftwareSpriteRenderer.render()` methods do not + misinterpret x and y arguments anymore, if set to 0 +* issue #21: :func:`sdl2.ext.load_image()` raises a proper + :exc:`UnsupportedError`, if neither SDL_image nor PIL are usable + +Thanks to Marcel Rodrigues, Roger Flores and otus for providing fixes +and improvement ideas. + +0.6.0 +----- +Released on 2013-09-01. + +* new :attr:`sdl2.ext.FontManager.size` attribute, which gives a default size + to be used for adding fonts or rendering text +* updated :mod:`sdl2` to include the latest changes of SDL2 +* :meth:`sdl2.ext.RenderContext.copy()` accepts any 4-value sequence as source + or destination rectangle now +* issue #11: throw an :exc:`ImportError` instead of a + :exc:`RuntimeError`, if a third-party DLL could not be imported + properly +* fixed a bug in the installation code, which caused :mod:`sdl2.examples` not + to install the required resources + +Thanks to Steven Johnson for his enhancements to the FontManager class. +Thanks to Marcel Rodrigues for the improvements to RenderContext.copy(). + +0.5.0 +----- +Released on 2013-08-14. + +* new :class:`sdl2.ext.FontManager` class, which provides simple TTF font + rendering. +* new :meth:`sdl2.ext.SpriteFactory.from_text()` method, which creates + text sprites +* put the SDL2 dll path at the beginning of PATH, if a PYSDL2_DLL_PATH + is provided to avoid loading issues for third party DLLs on Win32 + platforms +* minor documentation fixes + +Thanks to Dan Gillett for providing the FontManager and from_text() +enhancements and his patience regarding all the small change requests. +Thanks to Mihail Latyshov for providing fixes to the documentation. + + +0.4.1 +----- +Released on 2013-07-26. + +* updated :mod:`sdl2` to include the latest changes of SDL2 +* improved DLL detection for DLLs not being in a library path +* fixed a bug in :meth:`sdl2.ext.RenderContext.draw_rect()` for drawing + a single rect +* fixed a bug in the :func:`repr` call for :class:`sdl2.ext.SoftwareSprite` +* issue #4: fixed a bug in :meth:`sdl2.ext.RenderContext.fill()` for filling + a single rect +* issue #5: fixed pip installation support +* issue #6: fixed a bug in :func:`sdl2.ext.get_events()`, which did not handle + more than 10 events in the queue correctly +* issue #8: :meth:`sdl2.ext.SpriteFactory.create_texture_sprite` can + create sprites to be used as rendering targets now +* issue #9: improved error messages on trying to bind non-existent library + functions via ctypes +* minor documentation fixes + +Thanks to Steven Johnson, Todd Rovito, Bil Bas and Dan McCombs for +providing fixes and improvements. + +0.4.0 +----- +Released on 2013-06-08. + +* new :mod:`sdl2.sdlmixer` module, which provides access to the + SDL2_mixer library +* issue #1: fixed libc loading for cases where libc.so is a ld script +* updated :mod:`sdl2` and :mod:`sdl2.sdlimage` to include the latest + changes of the libraries, they wrap + +0.3.0 +----- +Released on 2013-05-07. + +* new :mod:`sdl2.sdlgfx` module, which provides access to the SDL2_gfx library +* new :mod:`sdl2.ext.UIFactory.from_color` method; it creates UI-supportive + sprites from a color +* fixed color argument bugs in :class:`sdl2.ext.RenderContext` methods +* fixed a module namespace issues in :mod:`sdl2.ext.pixelaccess` +* :mod:`sdl2.ext.SpriteFactory` methods do not use a default ``size`` argument + anymore; it has to provided by the caller + +0.2.0 +----- +Released on 2013-05-03. + +* removed sdl2.ext.scene; it now lives in python-utils +* fixed :mod:`sdl2.haptic` module usage for Python 3 +* fixed :func:`sdl2.SDL_WindowGetData` and :func:`sdl2.SDL_WindowSetData` + wrappers +* fixed :meth:`sdl2.ext.RenderContext.copy` +* fixed :mod:`sdl2.ext.font` module usage for Python 3 +* fixed :func:`sdl2.ext.line` +* :mod:`sdl2` imports all submodules now +* improved documentation + +0.1.0 +----- +Released on 2013-04-23. + +* Initial Release diff --git a/PySDL2-0.9.5/doc/html/_sources/todos.txt b/PySDL2-0.9.5/doc/html/_sources/todos.txt new file mode 100644 index 0000000..026e6dd --- /dev/null +++ b/PySDL2-0.9.5/doc/html/_sources/todos.txt @@ -0,0 +1,11 @@ +Todo list for PySDL2 +==================== + +General +------- +* more unit tests + +Windows +------- +* Add support for SDL_SetWindowsMessageHook() +* Add SDL_TOUCH_MOUSEID constant \ No newline at end of file diff --git a/PySDL2-0.9.5/doc/html/_sources/tutorial/helloworld.txt b/PySDL2-0.9.5/doc/html/_sources/tutorial/helloworld.txt new file mode 100644 index 0000000..559fbd7 --- /dev/null +++ b/PySDL2-0.9.5/doc/html/_sources/tutorial/helloworld.txt @@ -0,0 +1,128 @@ +.. _hello_world: + +Hello World +=========== +Ahhh, the great tradition of saying "Hello World" in a programming +language. To whet your appetite, we will do this with a most simple +application, which will display an image. It is not important to understand +everything at once, which will be used by the example. Nearly all parts used +now are explained in later chapters, so do not hesitate, if the one or other +explanation is missing. + +Importing +--------- +Let's start with importing some basic modules, which are necessary to +display a small nice window and to do some basic drawing within that +window. :: + + import sys + import sdl2.ext + + RESOURCES = sdl2.ext.Resources(__file__, "resources") + +We need some resources from the ``resources`` folder, so that we have a test +image around to display on the window later on. In your own applications, it is +unlikely that you will ever need to import them, but we need them here, so we +use the :mod:`sdl2.ext.Resources` class to have them available. + +Window creation and image loading +--------------------------------- +Any graphical application requires access to the screen, mostly in form +of a window, which basically represents a portion of the screen, the +application has access to and the application can manipulate. In most cases +that portion has a border and title bar around it, allowing the user to move +it around on the screen and reorganise everything in a way to fit his needs. + +Once we have imported all necessary parts, let's create a window to have +access to the screen, so we can display the logo and thus represent it +to the user. :: + + sdl2.ext.init() + + window = sdl2.ext.Window("Hello World!", size=(640, 480)) + window.show() + + factory = sdl2.ext.SpriteFactory(sdl2.ext.SOFTWARE) + sprite = factory.from_image(RESOURCES.get_path("hello.bmp")) + + spriterenderer = factory.create_sprite_render_system(window) + spriterenderer.render(sprite) + +First, we initialise the :mod:`sdl2.ext` internals to gain access to the +screen and to be able to create windows on top of it. Once done with that, +:class:`sdl2.ext.Window` will create the window for us and we +supply a title to be shown on the window's border along with its initial size. +Since :class:`sdl2.ext.Window` instances are not shown by default, +we have to tell the operating system and window manager that there is a new +window to display by calling :meth:`sdl2.ext.Window.show()`. + +Afterwards, we get an image from the resources folder and create a +:class:`sdl2.ext.Sprite` from it, which can be easily shown later +on. This is done via a :class:`sdl2.ext.SpriteFactory`, since the +factory allows us to switch between texture-based, hardware-accelerated, and +software-based sprites easily. + +To display the image, we will use a :class:`sdl2.ext.SpriteRenderSystem`, +which supports the sprite type (texture- or software-based) and can copy the +image to the window for display. The :class:`sdl2.ext.SpriteRenderSystem` +needs to know, where to copy to, thus we have to supply the window as target +for copy and display operations. + +All left to do is to initiate the copy process by calling +:class:`sdl2.ext.SpriteRenderSystem.render()` with the image we +created earlier. + +.. tip:: + + You will notice that the sprite used above will always be drawn at the + top-left corner of the :class:`sdl2.ext.Window`. You can change + the position of where to draw it by changing its + :attr:`sdl2.ext.Sprite.position` value. :: + + # will cause the renderer to draw the sprite 10px to the right and + # 20 px to the bottom + sprite.position = 10, 20 + + # will cause the renderer to draw the sprite 55px to the right and + # 10 px to the bottom + sprite.position = 55, 10 + + Experiment with different values to see their effect. Do not forget to do + this *before* ``spriterenderer.render(sprite)`` is called. + +Making the application responsive +--------------------------------- +We are nearly done now. We have an image to display, we have a window, where +the image should be displayed on, so we can execute the written code, not? + +Well, yes, but the only thing that will happen is that we will notice a +short flickering before the application exits. Maybe we can even see +the window with the image for a short moment, but that's not what we +want, do we? + +To keep the window on the screen and to make it responsive to user +input, such as closing the window, react upon the mouse cursor or key +presses, we have to add a so-called event loop. The event loop will deal +with certain types of actions happening on the window or while the +window is focused by the user and - as long as the event loop is +running - will keep the window shown on the screen. :: + + processor = sdl2.ext.TestEventProcessor() + processor.run(window) + +Since this is a very first tutorial, we keep things simple here and use a +dummy class for testing without actually dealing with the event loop magic. +By calling :meth:`sdl2.ext.TestEventProcessor.run()`, we implicitly start an +event loop, which takes care of the most important parts for us. + +And here it ends... +------------------- +The window is shown, the image is shown, great! All left to do is to clean up +everything, once the application finishes. Luckily the +:class:`sdl2.ext.TestEventProcessor` knows when the window is closed, so +it will exit from the event loop. Once it exits, we should clean up the +video internals, we initialised at the beginning. Thus, a final call to :: + + sdl2.ext.quit() + +should be made. diff --git a/PySDL2-0.9.5/doc/html/_sources/tutorial/index.txt b/PySDL2-0.9.5/doc/html/_sources/tutorial/index.txt new file mode 100644 index 0000000..c1b7979 --- /dev/null +++ b/PySDL2-0.9.5/doc/html/_sources/tutorial/index.txt @@ -0,0 +1,17 @@ +Learn to fly - the tutorials +============================ +PySDL2 is easy to learn and a powerful multimedia programming framework. It +features efficient high- and low-level structures and an excellent +object-oriented programming layout. + +The following tutorials will guide you through your first applications +written with PySDL2 and introduces certain parts of the PySDL2 packages to +you. They will most likely *not* cover each single part of PySDL2, but +instead show you the most noteworthy features. + +.. toctree:: + :maxdepth: 2 + + helloworld.rst + pong.rst + pygamers.rst diff --git a/PySDL2-0.9.5/doc/html/_sources/tutorial/pong.txt b/PySDL2-0.9.5/doc/html/_sources/tutorial/pong.txt new file mode 100644 index 0000000..f2d0d91 --- /dev/null +++ b/PySDL2-0.9.5/doc/html/_sources/tutorial/pong.txt @@ -0,0 +1,590 @@ +.. _pong-tutorial: + +The Pong Game +============= +The following tutorial will show you some capabilities of the component-based +approach, PySDL2 features. We will create the basics of a simple Pong game +implementation here. The basics of creating a event loop, dealing with +user input, moving images around and creating a rendering function are +covered in this tutorial. + +Getting started +--------------- +We start with creating the window and add a small event loop, so we are able +to close the window and exit the game. :: + + import sys + import sdl2 + import sdl2.ext + + + def run(): + sdl2.ext.init() + window = sdl2.ext.Window("The Pong Game", size=(800, 600)) + window.show() + running = True + while running: + events = sdl2.ext.get_events() + for event in events: + if event.type == sdl2.SDL_QUIT: + running = False + break + window.refresh() + return 0 + + if __name__ == "__main__": + sys.exit(run()) + +The import statements, video initialisation and window creation were +discussed previously in the :ref:`hello_world` tutorial. We import everything +from the :mod:`sdl2` package here, too, to have all SDL2 functions available. + +Instead of some integrated event processor, a new code fragment is +introduced, though. :: + + running = True + while running: + events = sdl2.ext.get_events() + for event in events: + if event.type == sdl2.SDL_QUIT: + running = False + break + window.refresh() + +The while loop above is the main event loop of our application. It deals with +all kinds of input events that can occur when working with the window, such as +mouse movements, key strokes, resizing operations and so on. SDL handles a lot +for us when it comes to events, so all we need to do is to check, if there are +any events, retrieve each event one by one, and handle it, if necessary. For +now, we will just handle the ``sdl2.SDL_QUIT`` event, which is raised when the +window is about to be closed. + +In any other case we will just refresh the window's graphics buffer, so +it is updated and visible on-screen. + +Adding the game world +--------------------- +The window is available and working. Now let's take care of creating the +game world, which will manage the player paddles, ball, visible elements +and everything else. We are going to use an implementation layout loosely +based on a COP [#f1]_ pattern, which separates data structures and +functionality from each other. This allows us to change or enhance functional +parts easily without having to refactor all classes we are implementing. + +We start with creating the two player paddles and the rendering engine +that will display them. :: + + [...] + + WHITE = sdl2.ext.Color(255, 255, 255) + + class SoftwareRenderer(sdl2.ext.SoftwareSpriteRenderSystem): + def __init__(self, window): + super(SoftwareRenderer, self).__init__(window) + + def render(self, components): + sdl2.ext.fill(self.surface, sdl2.ext.Color(0, 0, 0)) + super(SoftwareRenderer, self).render(components) + + + class Player(sdl2.ext.Entity): + def __init__(self, world, sprite, posx=0, posy=0): + self.sprite = sprite + self.sprite.position = posx, posy + + + def run(): + ... + + world = sdl2.ext.World() + + spriterenderer = SoftwareRenderer(window) + world.add_system(spriterenderer) + + factory = sdl2.ext.SpriteFactory(sdl2.ext.SOFTWARE) + sp_paddle1 = factory.from_color(WHITE, size=(20, 100)) + sp_paddle2 = factory.from_color(WHITE, size=(20, 100)) + + player1 = Player(world, sp_paddle1, 0, 250) + player2 = Player(world, sp_paddle2, 780, 250) + + running = True + while running: + events = sdl2.ext.get_events() + for event in events: + if event.type == sdl2.SDL_QUIT: + running = False + break + world.process() + + if __name__ == "__main__": + sys.exit(run()) + +The first thing to do is to enhance the +:class:`sdl2.ext.SoftwareSpriteRenderSystem` so that it will paint +the whole window screen black on every drawing cycle, before drawing all +sprites on the window. + +Afterwards, the player paddles will be implemented, based on an +:class:`sdl2.ext.Entity` data container. The player paddles are +simple rectangular sprites that can be positioned anywhere on the +window. + +In the main program function, we put those things together by creating a +:class:`sdl2.ext.World`, in which the player paddles and the renderer +can live and operate. + +Within the main event loop, we allow the world to process all attached +systems, which causes it to invoke the ``process()`` methods for all +:class:`sdl2.ext.System` instances added to it. + +Moving the ball +--------------- +We have two static paddles centred vertically on the left and right of +our window. The next thing to do is to add a ball that can move around +within the window boundaries. :: + + [...] + class MovementSystem(sdl2.ext.Applicator): + def __init__(self, minx, miny, maxx, maxy): + super(MovementSystem, self).__init__() + self.componenttypes = Velocity, sdl2.ext.Sprite + self.minx = minx + self.miny = miny + self.maxx = maxx + self.maxy = maxy + + def process(self, world, componentsets): + for velocity, sprite in componentsets: + swidth, sheight = sprite.size + sprite.x += velocity.vx + sprite.y += velocity.vy + + sprite.x = max(self.minx, sprite.x) + sprite.y = max(self.miny, sprite.y) + + pmaxx = sprite.x + swidth + pmaxy = sprite.y + sheight + if pmaxx > self.maxx: + sprite.x = self.maxx - swidth + if pmaxy > self.maxy: + sprite.y = self.maxy - sheight + + + class Velocity(object): + def __init__(self): + super(Velocity, self).__init__() + self.vx = 0 + self.vy = 0 + + + class Player(sdl2.ext.Entity): + def __init__(self, world, posx=0, posy=0): + [...] + self.velocity = Velocity() + + + class Ball(sdl2.ext.Entity): + def __init__(self, world, sprite, posx=0, posy=0): + self.sprite = sprite + self.sprite.position = posx, posy + self.velocity = Velocity() + + + def run(): + [...] + sp_ball = factory.from_color(WHITE, size=(20, 20)) + [...] + movement = MovementSystem(0, 0, 800, 600) + spriterenderer = SoftwareRenderer(window) + + world.add_system(movement) + world.add_system(spriterenderer) + + [...] + + ball = Ball(world, sp_ball, 390, 290) + ball.velocity.vx = -3 + + [...] + +Two new classes are introduced here, ``Velocity`` and +``MovementSystem``. The ``Velocity`` class is a simple data bag. It +does not contain any application logic, but consists of the relevant +information to represent the movement in a certain direction. This +allows us to mark in-game items as being able to move around. + +The ``MovementSystem`` in turn takes care of moving the in-game items around +by applying the velocity to their current position. Thus, we can simply enable +any ``Player`` instance to be movable or not by adding or removing a +velocity attribute to them, which is a ``Velocity`` component instance. + +.. note:: + + The naming is important here. The EBS implementation as described in + :ref:`ref-ebs` requires every in-application or in-game item attribute + bound to a :class:`sdl2.ext.Entity` to be the lowercase class name of its + related component. :: + + Player.vel = Velocity(10, 10) + + for example would raise an exception, since the system expects + ``Player.vel`` to be an instance of a ``Vel`` component. + +The ``MovementSystem`` is a specialised :class:`sdl2.ext.System`, a +:class:`sdl2.ext.Applicator`, which can operate on combined sets of +data. When the :meth:`sdl2.ext.Applicator.process()` method is +called, the passed ``componentsets`` iterable will contain tuples of +objects that belong to an instance and feature a certain type. The +``MovementSystem``'s ``process()`` implementation hence will loop over +sets of ``Velocity`` and ``Sprite`` instances that belong to the same +:class:`sdl2.ext.Entity`. Since we have a ball and two players +currently available, it typically would loop over three tuples, two for +the individual players and one for the ball. + +The :class:`sdl2.ext.Applicator` thus enables us to process combined +data of our in-game items, without creating complex data structures. + +.. note:: + + Only entities that contain *all* attributes (components) are taken + into account. If e.g. the ``Ball`` class would not contain a + ``Velocity`` component, it would not be processed by the + ``MovementSystem``. + +Why do we use this approach? The :class:`sdl2.ext.Sprite` objects carry a +position, which defines the location at which they should be rendered, when +processed by the ``SoftwareRenderer``. If they should move around (which is +a change in the position), we need to apply the velocity to them. + +We also define some more things within the ``MovementSystem``, such as a +simple boundary check, so that the players and ball cannot leave the +visible window area on moving around. + +Bouncing +-------- +We have a ball that can move around as well as the general game logic +for moving things around. In contrast to a classic OO approach we do not +need to implement the movement logic within the ``Ball`` and ``Player`` +class individually, since the basic movement is the same for all (yes, +you could have solved that with inheriting ``Ball`` and ``Player`` from +a ``MovableObject`` class in OO). + +The ball now moves and stays within the bounds, but once it hits the +left side, it will stay there. To make it *bouncy*, we need to add a +simple collision system, which causes the ball to change its direction +on colliding with the walls or the player paddles. :: + + [...] + class CollisionSystem(sdl2.ext.Applicator): + def __init__(self, minx, miny, maxx, maxy): + super(CollisionSystem, self).__init__() + self.componenttypes = Velocity, sdl2.ext.Sprite + self.ball = None + self.minx = minx + self.miny = miny + self.maxx = maxx + self.maxy = maxy + + def _overlap(self, item): + pos, sprite = item + if sprite == self.ball.sprite: + return False + + left, top, right, bottom = sprite.area + bleft, btop, bright, bbottom = self.ball.sprite.area + + return (bleft < right and bright > left and + btop < bottom and bbottom > top) + + def process(self, world, componentsets): + collitems = [comp for comp in componentsets if self._overlap(comp)] + if collitems: + self.ball.velocity.vx = -self.ball.velocity.vx + + + def run(): + [...] + world = World() + + movement = MovementSystem(0, 0, 800, 600) + collision = CollisionSystem(0, 0, 800, 600) + spriterenderer = SoftwareRenderer(window) + + world.add_system(movement) + world.add_system(collision) + world.add_system(spriterenderer) + + [...] + collision.ball = ball + + running = True + while running: + events = sdl2.ext.get_events() + for event in events: + if event.type == sdl2.SDL_QUIT: + running = False + break + sdl2.SDL_Delay(10) + world.process() + + if __name__ == "__main__": + sys.exit(run()) + +The ``CollisionSystem`` only needs to take care of the ball and objects +it collides with, since the ball is the only unpredictable object within our +game world. The player paddles will only be able to move up and down +within the visible window area and we already dealt with that within the +``MovementSystem`` code. + +Whenever the ball collides with one of the paddles, its movement +direction (velocity) should be inverted, so that it *bounces* back. + +Additionally, we won't run at the full processor speed anymore in the +main loop, but instead add a short delay, using the +:func:`sdl2.SDL_Delay` function. This reduces the overall load on the +CPU and makes the game a bit slower. + +Reacting on player input +------------------------ +We have a moving ball that bounces from side to side. The next step +would be to allow moving one of the paddles around, if the player presses a +key. The SDL event routines allow us to deal with a huge variety of user and +system events that could occur for our application, but right now we are only +interested in key strokes for the Up and Down keys to move one of the player +paddles up or down. :: + + [...] + def run(): + [...] + running = True + while running: + events = sdl2.ext.get_events() + for event in events: + if event.type == sdl2.SDL_QUIT: + running = False + break + if event.type == sdl2.SDL_KEYDOWN: + if event.key.keysym.sym == sdl2.SDLK_UP: + player1.velocity.vy = -3 + elif event.key.keysym.sym == sdl2.SDLK_DOWN: + player1.velocity.vy = 3 + elif event.type == sdl2.SDL_KEYUP: + if event.key.keysym.sym in (sdl2.SDLK_UP, sdl2.SDLK_DOWN): + player1.velocity.vy = 0 + sdl2.SDL_Delay(10) + world.process() + + if __name__ == "__main__": + sys.exit(run()) + +Every event that can occur and that is supported by SDL2 can be identified by a +static event type code. This allows us to check for a key stroke, mouse button +press, and so on. First, we have to check for ``sdl2.SDL_KEYDOWN`` and +``sdl2.SDL_KEYUP`` events, so we can start and stop the paddle movement on +demand. Once we identified such events, we need to check, whether the pressed +or released key is actually the Up or Down key, so that we do not start or stop +moving the paddle, if the user presses R or G or whatever. + +Whenever the Up or Down key are pressed down, we allow the left player +paddle to move by changing its velocity information for the vertical +direction. Likewise, if either of those keys is released, we stop moving +the paddle. + +Improved bouncing +----------------- +We have a moving paddle and we have a ball that bounces from one side to +another, which makes the game ... quite boring. If you played Pong before, +you know that most variations of it will cause the ball to bounce in a +certain angle, if it collides with a paddle. Most of those +implementations achieve this by implementing the paddle collision as if +the ball collides with a rounded surface. If it collides with the center +of the paddle, it will bounce back straight, if it hits the paddle near +the center, it will bounce back with a pointed angle and on the corners +of the paddle it will bounce back with some angle close to 90 degrees to +its initial movement direction. :: + + class CollisionSystem(sdl2.ext.Applicator): + [...] + + def process(self, world, componentsets): + collitems = [comp for comp in componentsets if self._overlap(comp)] + if collitems: + self.ball.velocity.vx = -self.ball.velocity.vx + + sprite = collitems[0][1] + ballcentery = self.ball.sprite.y + self.ball.sprite.size[1] // 2 + halfheight = sprite.size[1] // 2 + stepsize = halfheight // 10 + degrees = 0.7 + paddlecentery = sprite.y + halfheight + if ballcentery < paddlecentery: + factor = (paddlecentery - ballcentery) // stepsize + self.ball.velocity.vy = -int(round(factor * degrees)) + elif ballcentery > paddlecentery: + factor = (ballcentery - paddlecentery) // stepsize + self.ball.velocity.vy = int(round(factor * degrees)) + else: + self.ball.velocity.vy = - self.ball.velocity.vy + +The reworked processing code above simulates a curved paddle by +creating segmented areas, which cause the ball to be reflected in +different angles. Instead of doing some complex trigonometry to +calculate an accurate angle and transform it on a x/y plane, we simply +check, where the ball collided with the paddle and adjust the vertical +velocity. + +If the ball now hits a paddle, it can be reflected at different angles, +hitting the top and bottom window boundaries... and will stay there. If it +hits the window boundaries, it should be reflected, too, but not with a +varying angle, but with the exact angle, it hit the boundary with. +This means that we just need to invert the vertical velocity, once the +ball hits the top or bottom. :: + + class CollisionSystem(sdl2.ext.Applicator): + [...] + + def process(self, world, componentsets): + [...] + + if (self.ball.sprite.y <= self.miny or + self.ball.sprite.y + self.ball.sprite.size[1] >= self.maxy): + self.ball.velocity.vy = - self.ball.velocity.vy + + if (self.ball.sprite.x <= self.minx or + self.ball.sprite.x + self.ball.sprite.size[0] >= self.maxx): + self.ball.velocity.vx = - self.ball.velocity.vx + +Creating an enemy +----------------- +Now that we can shoot back the ball in different ways, it would be nice +to have an opponent to play against. We could enhance the main event +loop to recognise two different keys and manipulate the second paddle's +velocity for two people playing against each other. We also could +create a simple computer-controlled player that tries to hit the ball +back to us, which sounds more interesting. :: + + class TrackingAIController(sdl2.ext.Applicator): + def __init__(self, miny, maxy): + super(TrackingAIController, self).__init__() + self.componenttypes = PlayerData, Velocity, sdl2.ext.Sprite + self.miny = miny + self.maxy = maxy + self.ball = None + + def process(self, world, componentsets): + for pdata, vel, sprite in componentsets: + if not pdata.ai: + continue + + centery = sprite.y + sprite.size[1] // 2 + if self.ball.velocity.vx < 0: + # ball is moving away from the AI + if centery < self.maxy // 2: + vel.vy = 3 + elif centery > self.maxy // 2: + vel.vy = -3 + else: + vel.vy = 0 + else: + bcentery = self.ball.sprite.y + self.ball.sprite.size[1] // 2 + if bcentery < centery: + vel.vy = -3 + elif bcentery > centery: + vel.vy = 3 + else: + vel.vy = 0 + + + class PlayerData(object): + def __init__(self): + super(PlayerData, self).__init__() + self.ai = False + + + class Player(sdl2.ext.Entity): + def __init__(self, world, sprite, posx=0, posy=0, ai=False): + self.sprite = sprite + self.sprite.position = posx, posy + self.velocity = Velocity() + self.playerdata = PlayerData() + self.playerdata.ai = ai + + + def run(): + [...] + aicontroller = TrackingAIController(0, 600) + + world.add_system(aicontroller) + world.add_system(movement) + world.add_system(collision) + world.add_system(spriterenderer) + + player1 = Player(world, sp_paddle1, 0, 250) + player2 = Player(world, sp_paddle2, 780, 250, True) + [...] + aicontroller.ball = ball + + [...] + +We start by creating a component ``PlayerData`` that flags a player as +being AI controlled or not. Afterwards, a ``TrackingAIController`` is +implemented, which, depending on the information of the ``PlayerData`` +component, will move the specific player paddle around by manipulating +its velocity information. + +The AI is pretty simple, just following the ball's vertical movement, +trying to hit it at its center, if the ball moves into the direction of +the AI-controlled paddle. As soon as the ball moves away from the +paddle, the paddle will move back to the vertical center. + +.. tip:: + + Add ``True`` as last parameter to the first ``Player()`` constructor to + see two AIs playing against each other. + +Next steps +---------- +We created the basics of a Pong game, which can be found in the +examples folder. However, there are some more things to do, such as + + * resetting the ball to the center with a random vertical velocity, if + it hits either the left or right window bounds + + * adding the ability to track the points made by either player, if the + ball hit the left or right side + + * drawing a dashed line in the middle to make the game field look + nicer + + * displaying the points made by each player + +It is your turn now to implement these features. Go ahead, it is not as +complex as it sounds. + + * you can reset the ball's position in the ``CollisionSystem`` code, + by changing the code for the ``minx`` and ``maxx`` test + + * you could enhance the ``CollisionSystem`` to process ``PlayerData`` + components and add the functionality to add points there (or write a + small processor that keeps track of the ball only and processes only + the ``PlayerData`` and ``video.SoftSprite`` objects of each player for + adding points). Alternatively, you could use the + :class:`sdl2.ext.EventHandler` class to raise a score count + function within the ``CollisionSystem``, if the ball collides with + one of the paddles. + + * write an own render sytem, based on :class:`sdl2.ext.Applicator`, + which takes care of position and sprite sets :: + + StaticRepeatingSprite(Entity): + ... + self.positions = Positions((400, 0), (400, 60), (400, 120), ...) + ... + + * draw some simple images for 0-9 and render them as sprites, + depending on the points a player made. + +.. rubric:: Footnotes + +.. [#f1] Component-Oriented Programming diff --git a/PySDL2-0.9.5/doc/html/_sources/tutorial/pygamers.txt b/PySDL2-0.9.5/doc/html/_sources/tutorial/pygamers.txt new file mode 100644 index 0000000..2150b84 --- /dev/null +++ b/PySDL2-0.9.5/doc/html/_sources/tutorial/pygamers.txt @@ -0,0 +1,369 @@ +PySDL2 for Pygamers +=================== + +Care to move to a newer SDL with your Pygame knowledge? Then you should +know one thing or two about PySDL2 before hacking code, since it is +completely different from Pygame. Do not let that fact scare you away, +the basics with graphics and sound are still the same (as they are +fundamental), but you will not find many similarities to the Pygame API +within PySDL2. + +.. todo:: + + More details, examples, etc. + + +Technical differences +--------------------- +Pygame is implemented as a mixture of Python, C and Assembler code, +wrapping 3rd party libraries with CPython API interfaces. PySDL2 in +contrast is written in pure Python, using :mod:`ctypes` to interface +with the C interfaces of 3rd party libraries. + +API differences +--------------- + +pygame +^^^^^^ +======================= ================================================= +pygame sdl2 +======================= ================================================= +``init()`` :func:`sdl2.SDL_Init()` where appropriate +``quit()`` :func:`sdl2.SDL_Quit()` where appropriate +``error`` No equivalent +``get_error()`` :func:`sdl2.SDL_GetError()` +``set_error()`` :func:`sdl2.SDL_SetError()` +``get_sdl_version()`` :func:`sdl2.SDL_GetVersion()` +``get_sdl_byteorder()`` :data:`sdl2.SDL_BYTEORDER` +``register_quit()`` No equivalent planned +``encode_string()`` No equivalent planned +``encode_file_path()`` No equivalent planned +======================= ================================================= + +pygame.cdrom +^^^^^^^^^^^^ +PySDL2 does not feature any CD-ROM related interfaces. They were +removed in SDL2 and PySDL2 does not provide its own facilities. + +pygame.Color +^^^^^^^^^^^^ +You can find a similar class in :class:`sdl2.ext.Color`. It does +not feature a ``set_length()`` or ``correct_gamma()`` method, though. + +pygame.cursors +^^^^^^^^^^^^^^ +PySDL2 does not feature any pre-defined cursor settings at the moment. + +pygame.display +^^^^^^^^^^^^^^ +======================= ================================================= +pygame.display sdl2 +======================= ================================================= +``init()`` :func:`sdl2.ext.init()` +``quit()`` :func:`sdl2.ext.quit()` +``get_init()`` :func:`sdl2.SDL_WasInit()` +``set_mode()`` :class:`sdl2.ext.Window` +``get_surface()`` :meth:`sdl2.ext.Window.get_surface()` +``flip()`` :meth:`sdl2.ext.Window.refresh()` +``update()`` :meth:`sdl2.ext.Window.refresh()` +``get_driver()`` :func:`sdl2.SDL_GetCurrentVideoDriver()` +``Info`` No equivalent +``get_wm_info()`` :func:`sdl2.SDL_GetWindowWMInfo()` +``list_modes()`` :func:`sdl2.SDL_GetNumDisplayModes()` +``mode_ok()`` :func:`sdl2.SDL_GetClosestDisplayMode()` +``gl_get_attribute()`` :func:`sdl2.SDL_GL_GetAttribute()` +``gl_set_attribute()`` :func:`sdl2.SDL_GL_SetAttribute()` +``get_active()`` No equivalent +``iconify()`` :meth:`sdl2.ext.Window.minimize()` +``toggle_fullscreen()`` :func:`sdl2.SDL_SetWindowFullscreen()` +``set_gamma()`` :func:`sdl2.SDL_SetWindowBrightness()` +``set_gamma_ramp()`` :func:`sdl2.SDL_SetWindowGammaRamp.()` +``set_icon()`` :func:`sdl2.SDL_SetWindowIcon()` +``set_caption()`` :attr:`sdl2.ext.Window.title` +``get_caption()`` :attr:`sdl2.ext.Window.title` +``set_palette()`` :func:`sdl2.SDL_SetSurfacePalette()` +======================= ================================================= + +pygame.draw +^^^^^^^^^^^ +Drawing primitives can be accessed through either the +``sdl2.SDL_RenderDraw*()`` and ``sdl2.SDL_RenderFill*()`` functions or +the more powerful :mod:`sdl2.sdlgfx` module, + +pygame.event +^^^^^^^^^^^^ +================= ================================================= +pygame.event sdl2 +================= ================================================= +``pump()`` :func:`sdl2.SDL_PumpEvents()` +``get()`` :func:`sdl2.SDL_PollEvent()` or :func:`sdl2.ext.get_events()` +``poll()`` :func:`sdl2.SDL_PollEvent()` +``wait()`` :func:`sdl2.SDL_WaitEvent()` +``peek()`` :func:`sdl2.SDL_PeepEvents()` +``clear()`` :func:`sdl2.SDL_FlushEvents()` +``event_name()`` No equivalent +``set_blocked()`` :func:`sdl2.SDL_EventState()` +``get_blocked()`` :func:`sdl2.SDL_EventState()` +``set_allowed()`` :func:`sdl2.SDL_EventState()` +``set_grab()`` :func:`sdl2.SDL_SetWindowGrab()` +``get_grab()`` :func:`sdl2.SDL_GetWindowGrab()` +``post()`` :func:`sdl2.SDL_PeepEvents()` +``Event`` :class:`sdl2.SDL_Event` +================= ================================================= + +pygame.font +^^^^^^^^^^^ +====================== ================================================= +pygame.font sdl2 +====================== ================================================= +``init()`` :func:`sdl2.sdlttf.TTF_Init()` +``quit()`` :func:`sdl2.sdlttf.TTF_Quit()` +``get_init()`` :func:`sdl2.sdlttf.TTF_WasInit()` +``get_default_font()`` No equivalent planned [#f1]_ +``get_fonts()`` No equivalent planned [#f1]_ +``match_font()`` No equivalent planned [#f1]_ +``SysFont`` No equivalent planned [#f1]_ +``Font`` No equivalent planned [#f1]_ +====================== ================================================= + +pygame.freetype +^^^^^^^^^^^^^^^ +PySDL2 does not feature direct FreeType support. + +pygame.gfxdraw +^^^^^^^^^^^^^^ +PySDL2 offers SDL_gfx support through the :mod:`sdl2.sdlgfx` module. + +pygame.image +^^^^^^^^^^^^ +================== ================================================= +pygame.image sdl2 +================== ================================================= +``load()`` :func:`sdl2.sdlimage.IMG_Load()`, + :func:`sdl2.ext.load_image()` +``save()`` :func:`sdl2.surface.SDL_SaveBMP()`, + :func:`sdl2.sdlimage.IMG_SavePNG()` +``get_extended()`` :func:`sdl2.sdlimage.IMG_isBMP()` et al. +``tostring()`` No equivalent yet +``fromstring()`` No equivalent yet +``frombuffer()`` No equivalent yet +================== ================================================= + +pygame.joystick +^^^^^^^^^^^^^^^ +================== ======================================================== +pygame.joystick sdl2 +================== ======================================================== +``init()`` :func:`sdl2.SDL_Init()` +``quit()`` :func:`sdl2.SDL_Quit()` +``get_init()`` :func:`sdl2.SDL_WasInit()` +``get_count()`` :func:`sdl2.joystick.SDL_NumJoysticks()` +``Joystick()`` :class:`sdl2.joystick.SDL_Joystick` and related + functions +================== ======================================================== + +pygame.key +^^^^^^^^^^ +================== ======================================================== +pygame.key sdl2 +================== ======================================================== +``get_focused()`` :func:`sdl2.keyboard.SDL_GetKeyboardFocus()` +``get_pressed()`` :func:`sdl2.keyboard.SDL_GetKeyboardState()` +``get_mods()`` :func:`sdl2.keyboard.SDL_GetModState()` +``set_mods()`` :func:`sdl2.keyboard.SDL_SetModState()` +``set_repeat()`` Based on the OS/WM settings, no equivalent +``get_repeat()`` Based on the OS/WM settings, no equivalent +``name()`` :func:`sdl2.keyboard.SDL_GetKeyName()` +================== ======================================================== + +pygame.locals +^^^^^^^^^^^^^ +Constants in PySDL2 are spread across the different packages and +modules, depending on where they originate from. + +pygame.mixer +^^^^^^^^^^^^ +====================== ==================================================== +pygame.mixer sdl2 +====================== ==================================================== +``init()`` :func:`sdl2.sdlmixer.Mix_Init()` +``quit()`` :func:`sdl2.sdlmixer.Mix_Quit()` +``get_init()`` No equivalent planned +``stop()`` :func:`sdl2.sdlmixer.Mix_HaltChannel()`, + :func:`sdl2.sdlmixer.Mix_HaltGroup()`, + :func:`sdl2.sdlmixer.Mix_HaltMusic()` +``pause()`` :func:`sdl2.sdlmixer.Mix_Pause()`, + :func:`sdl2.sdlmixer.Mix_PauseMusic()` +``unpause()`` :func:`sdl2.sdlmixer.Mix_Resume()`, + :func:`sdl2.sdlmixer.Mix_ResumeMusic()` +``fadeout()`` :func:`sdl2.sdlmixer.Mix_FadeOutChannel()`, + :func:`sdl2.sdlmixer.Mix_FadeOutGroup()`, + :func:`sdl2.sdlmixer.Mix_FadeOutMusic()` +``set_num_channels()`` :func:`sdl2.sdlmixer.Mix_AllocateChannels()` +``get_num_channels()`` :func:`sdl2.sdlmixer.Mix_AllocateChannels()` +``set_reserved()`` :func:`sdl2.sdlmixer.Mix_ReserveChannels()` +``find_channel()`` No equivalent planned +``get_busy()`` :func:`sdl2.sdlmixer.Mix_ChannelFinished` +``Sound`` :class:`sdl2.sdlmixer.Mix_Chunk` +``Channel`` No equivalent, use the channel functions instead +====================== ==================================================== + +pygame.mixer.music +^^^^^^^^^^^^^^^^^^ +See `pygame.mixer`_. + +pygame.mouse +^^^^^^^^^^^^ +================= ==================================================== +pygame.mouse sdl2 +================= ==================================================== +``get_pressed()`` :func:`sdl2.mouse.SDL_GetMouseState()` +``get_pos()`` :func:`sdl2.mouse.SDL_GetMouseState()` +``get_rel()`` :func:`sdl2.mouse.SDL_GetRelativeMouseState()` +``set_pos()`` :func:`sdl2.mouse.SDL_WarpMouseInWindow()` +``set_visible()`` :func:`sdl2.mouse.SDL_ShowCursor()` +``get_focused()`` :func:`sdl2.mouse.SDL_GetMouseFocus()` +``set_cursor()`` :func:`sdl2.mouse.SDL_GetCursor()` +``get_cursor()`` :func:`sdl2.mouse.SDL_SetCursor()` +================= ==================================================== + +pygame.movie +^^^^^^^^^^^^ +No such module is planned for PySDL2. + +pygame.Overlay +^^^^^^^^^^^^^^ +You can work with YUV overlays by using the :mod:`sdl2.render` module +with :class:`sdl2.render.SDL_Texture` objects. + +pygame.PixelArray +^^^^^^^^^^^^^^^^^ +You can access pixel data of sprites and surfaces directly via the +:class:`sdl2.ext.PixelView` class. It does not feature comparison or +extractions methods. + +pygame.Rect +^^^^^^^^^^^ +No such functionality is available for PySDL2. Rectangles are represented +via :class:`sdl2.rect.SDL_Rect` for low-level SDL2 wrappers or 4-value +tuples. + +pygame.scrap +^^^^^^^^^^^^ +PySDL2 offers basic text-based clipboard access via the +:mod:`sdl2.clipboard` module. A feature-rich clipboard API as for Pygame +does not exist yet. + +pygame.sndarray +^^^^^^^^^^^^^^^ +No such module is available for PySDL2 yet. + +pygame.sprite +^^^^^^^^^^^^^ +PySDL2 uses a different approach of rendering and managing sprite +objects via a component-based system and the :class:`sdl2.ext.Sprite` +class. A sprite module as for Pygame is not planned. + +pygame.Surface +^^^^^^^^^^^^^^ +======================= ===================================================== +pygame.Surface sdl2 +======================= ===================================================== +``blit()`` :meth:`sdl2.surface.SDL_BlitSurface()`, + :class:`sdl2.ext.SpriteRenderSystem` +``convert()`` :func:`sdl2.surface.SDL_ConvertSurface()` +``convert_alpha()`` :func:`sdl2.surface.SDL_ConvertSurface()` +``copy()`` :func:`sdl2.surface.SDL_ConvertSurface()` +``fill()`` :func:`sdl2.surface.SDL_FillRect()`, + :func:`sdl2.surface.SDL_FillRects()`, + :func:`sdl2.ext.fill()` +``scroll()`` No equivalent planned +``set_colorkey()`` :func:`sdl2.surface.SDL_SetColorKey()` +``get_colorkey()`` :func:`sdl2.surface.SDL_GetColorKey()` +``set_alpha()`` :func:`sdl2.surface.SDL_SetSurfaceAlphaMod()` +``get_alpha()`` :func:`sdl2.surface.SDL_GetSurfaceAlphaMod()` +``lock()`` :func:`sdl2.surface.SDL_LockSurface()` +``unlock()`` :func:`sdl2.surface.SDL_UnlockSurface()` +``mustlock()`` :func:`sdl2.surface.SDL_MUSTLOCK()` +``get_locked()`` :attr:`sdl2.surface.SDL_Surface.locked` +``get_locks()`` No equivalent planned +``get_at()`` Direct access to the pixels for surfaces can be + achieved via the :class:`sdl2.ext.PixelView` class +``set_at()`` Direct access to the pixels for surfaces can be + achieved via the :class:`sdl2.ext.PixelView` class +``get_at_mapped()`` No equivalent planned +``get_palette()`` via :attr:`sdl2.surface.SDL_Surface.format` and the + :attr:`sdl2.pixels.SDL_PixelFormat.palette` + attribute +``get_palette_at()`` ``sdl2.pixels.SDL_Palette.colors[offset]`` +``set_palette()`` :func:`sdl2.surface.SDL_SetSurfacePalette()` +``set_palette_at()`` ``sdl2.pixels.SDL_Palette.colors[offset]`` +``map_rgb()`` :func:`sdl2.pixels.SDL_MapRGB()` +``unmap_rgb()`` :func:`sdl2.pixels.SDL_GetRGB()` +``set_clip()`` :func:`sdl2.surface.SDL_SetClipRect()` +``get_clip()`` :func:`sdl2.surface.SDL_GetClipRect()` +``subsurface()`` :func:`sdl2.ext.subsurface()` +``get_parent()`` No equivalent yet +``get_abs_parent()`` As for ``get_parent`` +``get_offset()`` As for ``get_parent`` +``get_abs_offset()`` As for ``get_parent`` +``get_size()`` :attr:`sdl2.ext.Sprite.size`, + :attr:`sdl2.surface.SDL_Surface.w`, + :attr:`sdl2.surface.SDL_Surface.h` +``get_width()`` ``sdl2.ext.Sprite.size[0]``, + :attr:`sdl2.surface.SDL_Surface.w`, +``get_height()`` ``sdl2.ext.Sprite.size[1]``, + :attr:`sdl2.surface.SDL_Surface.h` +``get_rect()`` No equivalent planned +``get_bitsize()`` :attr:`sdl2.pixels.SDL_PixelFormat.BitsPerPixel` +``get_bytesize()`` :attr:`sdl2.pixels.SDL_PixelFormat.BytesPerPixel` +``get_flags()`` :attr:`sdl2.surface.SDL_Surface.flags` +``get_pitch()`` :attr:`sdl2.surface.SDL_Surface.pitch` +``get_masks()`` :attr:`sdl2.pixels.SDL_PixelFormat.Rmask`, ... +``get_shifts()`` :attr:`sdl2.pixels.SDL_PixelFormat.Rshift`, ... +``get_losses()`` :attr:`sdl2.pixels.SDL_PixelFormat.Rloss`, ... +``get_bounding_rect()`` No equivalent planned +``get_view()`` :class:`sdl2.ext.PixelView` +``get_buffer()`` :class:`sdl2.ext.PixelView` or + :attr:`sdl2.surface.SDL_Surface.pixels` +======================= ===================================================== + +pygame.surfarray +^^^^^^^^^^^^^^^^ +2D and 3D pixel access can be achieved via the +:class:`sdl2.ext.PixelView` class in environments without +numpy. Simplified numpy-array creation with direct pixel access (similar +to ``pygame.surfarray.pixels2d()`` and ``pygame.surfarray.pixels3d()``) +is available via :func:`sdl2.ext.pixels2d()` and +:func:`sdl2.ext.pixels3d()`. + +pygame.time +^^^^^^^^^^^ +=============== ================================================= +pygame.time sdl2 +=============== ================================================= +``get_ticks()`` :func:`sdl2.timer.SDL_GetTicks()` +``wait()`` :func:`sdl2.timer.SDL_Delay()` +``delay()`` :func:`sdl2.timer.SDL_Delay()` +``Clock`` No equivalent planned +=============== ================================================= + +pygame.transform +^^^^^^^^^^^^^^^^ +The are no transformation helpers in PySDL2 at moment. Those might be +implemented later on via numpy helpers, the Python Imaging Library or +other 3rd party packages. + +pygame.version +^^^^^^^^^^^^^^ +=============== ================================================= +pygame.version sdl2 +=============== ================================================= +``ver`` :attr:`sdl2.__version__` +``vernum`` :attr:`sdl2.version_info` +=============== ================================================= + +.. rubric:: Footnotes + +.. [#f1] Check https://bitbucket.org/marcusva/python-utils for an easy + to use system font detection module diff --git a/PySDL2-0.9.5/doc/html/_static/ajax-loader.gif b/PySDL2-0.9.5/doc/html/_static/ajax-loader.gif new file mode 100644 index 0000000000000000000000000000000000000000..61faf8cab23993bd3e1560bff0668bd628642330 GIT binary patch literal 673 zcmZ?wbhEHb6krfw_{6~Q|Nno%(3)e{?)x>&1u}A`t?OF7Z|1gRivOgXi&7IyQd1Pl zGfOfQ60;I3a`F>X^fL3(@);C=vM_KlFfb_o=k{|A33hf2a5d61U}gjg=>Rd%XaNQW zW@Cw{|b%Y*pl8F?4B9 zlo4Fz*0kZGJabY|>}Okf0}CCg{u4`zEPY^pV?j2@h+|igy0+Kz6p;@SpM4s6)XEMg z#3Y4GX>Hjlml5ftdH$4x0JGdn8~MX(U~_^d!Hi)=HU{V%g+mi8#UGbE-*ao8f#h+S z2a0-5+vc7MU$e-NhmBjLIC1v|)9+Im8x1yacJ7{^tLX(ZhYi^rpmXm0`@ku9b53aN zEXH@Y3JaztblgpxbJt{AtE1ad1Ca>{v$rwwvK(>{m~Gf_=-Ro7Fk{#;i~+{{>QtvI yb2P8Zac~?~=sRA>$6{!(^3;ZP0TPFR(G_-UDU(8Jl0?(IXu$~#4A!880|o%~Al1tN literal 0 HcmV?d00001 diff --git a/PySDL2-0.9.5/doc/html/_static/basic.css b/PySDL2-0.9.5/doc/html/_static/basic.css new file mode 100644 index 0000000..2b513f0 --- /dev/null +++ b/PySDL2-0.9.5/doc/html/_static/basic.css @@ -0,0 +1,604 @@ +/* + * basic.css + * ~~~~~~~~~ + * + * Sphinx stylesheet -- basic theme. + * + * :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ + +/* -- main layout ----------------------------------------------------------- */ + +div.clearer { + clear: both; +} + +/* -- relbar ---------------------------------------------------------------- */ + +div.related { + width: 100%; + font-size: 90%; +} + +div.related h3 { + display: none; +} + +div.related ul { + margin: 0; + padding: 0 0 0 10px; + list-style: none; +} + +div.related li { + display: inline; +} + +div.related li.right { + float: right; + margin-right: 5px; +} + +/* -- sidebar --------------------------------------------------------------- */ + +div.sphinxsidebarwrapper { + padding: 10px 5px 0 10px; +} + +div.sphinxsidebar { + float: left; + width: 230px; + margin-left: -100%; + font-size: 90%; + word-wrap: break-word; + overflow-wrap : break-word; +} + +div.sphinxsidebar ul { + list-style: none; +} + +div.sphinxsidebar ul ul, +div.sphinxsidebar ul.want-points { + margin-left: 20px; + list-style: square; +} + +div.sphinxsidebar ul ul { + margin-top: 0; + margin-bottom: 0; +} + +div.sphinxsidebar form { + margin-top: 10px; +} + +div.sphinxsidebar input { + border: 1px solid #98dbcc; + font-family: sans-serif; + font-size: 1em; +} + +div.sphinxsidebar #searchbox input[type="text"] { + width: 170px; +} + +img { + border: 0; + max-width: 100%; +} + +/* -- search page ----------------------------------------------------------- */ + +ul.search { + margin: 10px 0 0 20px; + padding: 0; +} + +ul.search li { + padding: 5px 0 5px 20px; + background-image: url(file.png); + background-repeat: no-repeat; + background-position: 0 7px; +} + +ul.search li a { + font-weight: bold; +} + +ul.search li div.context { + color: #888; + margin: 2px 0 0 30px; + text-align: left; +} + +ul.keywordmatches li.goodmatch a { + font-weight: bold; +} + +/* -- index page ------------------------------------------------------------ */ + +table.contentstable { + width: 90%; +} + +table.contentstable p.biglink { + line-height: 150%; +} + +a.biglink { + font-size: 1.3em; +} + +span.linkdescr { + font-style: italic; + padding-top: 5px; + font-size: 90%; +} + +/* -- general index --------------------------------------------------------- */ + +table.indextable { + width: 100%; +} + +table.indextable td { + text-align: left; + vertical-align: top; +} + +table.indextable dl, table.indextable dd { + margin-top: 0; + margin-bottom: 0; +} + +table.indextable tr.pcap { + height: 10px; +} + +table.indextable tr.cap { + margin-top: 10px; + background-color: #f2f2f2; +} + +img.toggler { + margin-right: 3px; + margin-top: 3px; + cursor: pointer; +} + +div.modindex-jumpbox { + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + margin: 1em 0 1em 0; + padding: 0.4em; +} + +div.genindex-jumpbox { + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + margin: 1em 0 1em 0; + padding: 0.4em; +} + +/* -- general body styles --------------------------------------------------- */ + +div.body p, div.body dd, div.body li, div.body blockquote { + -moz-hyphens: auto; + -ms-hyphens: auto; + -webkit-hyphens: auto; + hyphens: auto; +} + +a.headerlink { + visibility: hidden; +} + +h1:hover > a.headerlink, +h2:hover > a.headerlink, +h3:hover > a.headerlink, +h4:hover > a.headerlink, +h5:hover > a.headerlink, +h6:hover > a.headerlink, +dt:hover > a.headerlink, +caption:hover > a.headerlink, +p.caption:hover > a.headerlink, +div.code-block-caption:hover > a.headerlink { + visibility: visible; +} + +div.body p.caption { + text-align: inherit; +} + +div.body td { + text-align: left; +} + +.field-list ul { + padding-left: 1em; +} + +.first { + margin-top: 0 !important; +} + +p.rubric { + margin-top: 30px; + font-weight: bold; +} + +img.align-left, .figure.align-left, object.align-left { + clear: left; + float: left; + margin-right: 1em; +} + +img.align-right, .figure.align-right, object.align-right { + clear: right; + float: right; + margin-left: 1em; +} + +img.align-center, .figure.align-center, object.align-center { + display: block; + margin-left: auto; + margin-right: auto; +} + +.align-left { + text-align: left; +} + +.align-center { + text-align: center; +} + +.align-right { + text-align: right; +} + +/* -- sidebars -------------------------------------------------------------- */ + +div.sidebar { + margin: 0 0 0.5em 1em; + border: 1px solid #ddb; + padding: 7px 7px 0 7px; + background-color: #ffe; + width: 40%; + float: right; +} + +p.sidebar-title { + font-weight: bold; +} + +/* -- topics ---------------------------------------------------------------- */ + +div.topic { + border: 1px solid #ccc; + padding: 7px 7px 0 7px; + margin: 10px 0 10px 0; +} + +p.topic-title { + font-size: 1.1em; + font-weight: bold; + margin-top: 10px; +} + +/* -- admonitions ----------------------------------------------------------- */ + +div.admonition { + margin-top: 10px; + margin-bottom: 10px; + padding: 7px; +} + +div.admonition dt { + font-weight: bold; +} + +div.admonition dl { + margin-bottom: 0; +} + +p.admonition-title { + margin: 0px 10px 5px 0px; + font-weight: bold; +} + +div.body p.centered { + text-align: center; + margin-top: 25px; +} + +/* -- tables ---------------------------------------------------------------- */ + +table.docutils { + border: 0; + border-collapse: collapse; +} + +table caption span.caption-number { + font-style: italic; +} + +table caption span.caption-text { +} + +table.docutils td, table.docutils th { + padding: 1px 8px 1px 5px; + border-top: 0; + border-left: 0; + border-right: 0; + border-bottom: 1px solid #aaa; +} + +table.field-list td, table.field-list th { + border: 0 !important; +} + +table.footnote td, table.footnote th { + border: 0 !important; +} + +th { + text-align: left; + padding-right: 5px; +} + +table.citation { + border-left: solid 1px gray; + margin-left: 1px; +} + +table.citation td { + border-bottom: none; +} + +/* -- figures --------------------------------------------------------------- */ + +div.figure { + margin: 0.5em; + padding: 0.5em; +} + +div.figure p.caption { + padding: 0.3em; +} + +div.figure p.caption span.caption-number { + font-style: italic; +} + +div.figure p.caption span.caption-text { +} + + +/* -- other body styles ----------------------------------------------------- */ + +ol.arabic { + list-style: decimal; +} + +ol.loweralpha { + list-style: lower-alpha; +} + +ol.upperalpha { + list-style: upper-alpha; +} + +ol.lowerroman { + list-style: lower-roman; +} + +ol.upperroman { + list-style: upper-roman; +} + +dl { + margin-bottom: 15px; +} + +dd p { + margin-top: 0px; +} + +dd ul, dd table { + margin-bottom: 10px; +} + +dd { + margin-top: 3px; + margin-bottom: 10px; + margin-left: 30px; +} + +dt:target, .highlighted { + background-color: #fbe54e; +} + +dl.glossary dt { + font-weight: bold; + font-size: 1.1em; +} + +.field-list ul { + margin: 0; + padding-left: 1em; +} + +.field-list p { + margin: 0; +} + +.optional { + font-size: 1.3em; +} + +.sig-paren { + font-size: larger; +} + +.versionmodified { + font-style: italic; +} + +.system-message { + background-color: #fda; + padding: 5px; + border: 3px solid red; +} + +.footnote:target { + background-color: #ffa; +} + +.line-block { + display: block; + margin-top: 1em; + margin-bottom: 1em; +} + +.line-block .line-block { + margin-top: 0; + margin-bottom: 0; + margin-left: 1.5em; +} + +.guilabel, .menuselection { + font-family: sans-serif; +} + +.accelerator { + text-decoration: underline; +} + +.classifier { + font-style: oblique; +} + +abbr, acronym { + border-bottom: dotted 1px; + cursor: help; +} + +/* -- code displays --------------------------------------------------------- */ + +pre { + overflow: auto; + overflow-y: hidden; /* fixes display issues on Chrome browsers */ +} + +td.linenos pre { + padding: 5px 0px; + border: 0; + background-color: transparent; + color: #aaa; +} + +table.highlighttable { + margin-left: 0.5em; +} + +table.highlighttable td { + padding: 0 0.5em 0 0.5em; +} + +div.code-block-caption { + padding: 2px 5px; + font-size: small; +} + +div.code-block-caption code { + background-color: transparent; +} + +div.code-block-caption + div > div.highlight > pre { + margin-top: 0; +} + +div.code-block-caption span.caption-number { + padding: 0.1em 0.3em; + font-style: italic; +} + +div.code-block-caption span.caption-text { +} + +div.literal-block-wrapper { + padding: 1em 1em 0; +} + +div.literal-block-wrapper div.highlight { + margin: 0; +} + +code.descname { + background-color: transparent; + font-weight: bold; + font-size: 1.2em; +} + +code.descclassname { + background-color: transparent; +} + +code.xref, a code { + background-color: transparent; + font-weight: bold; +} + +h1 code, h2 code, h3 code, h4 code, h5 code, h6 code { + background-color: transparent; +} + +.viewcode-link { + float: right; +} + +.viewcode-back { + float: right; + font-family: sans-serif; +} + +div.viewcode-block:target { + margin: -1px -10px; + padding: 0 10px; +} + +/* -- math display ---------------------------------------------------------- */ + +img.math { + vertical-align: middle; +} + +div.body div.math p { + text-align: center; +} + +span.eqno { + float: right; +} + +/* -- printout stylesheet --------------------------------------------------- */ + +@media print { + div.document, + div.documentwrapper, + div.bodywrapper { + margin: 0 !important; + width: 100%; + } + + div.sphinxsidebar, + div.related, + div.footer, + #top-link { + display: none; + } +} \ No newline at end of file diff --git a/PySDL2-0.9.5/doc/html/_static/classic.css b/PySDL2-0.9.5/doc/html/_static/classic.css new file mode 100644 index 0000000..d98894b --- /dev/null +++ b/PySDL2-0.9.5/doc/html/_static/classic.css @@ -0,0 +1,261 @@ +/* + * default.css_t + * ~~~~~~~~~~~~~ + * + * Sphinx stylesheet -- default theme. + * + * :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ + +@import url("basic.css"); + +/* -- page layout ----------------------------------------------------------- */ + +body { + font-family: sans-serif; + font-size: 100%; + background-color: #11303d; + color: #000; + margin: 0; + padding: 0; +} + +div.document { + background-color: #1c4e63; +} + +div.documentwrapper { + float: left; + width: 100%; +} + +div.bodywrapper { + margin: 0 0 0 230px; +} + +div.body { + background-color: #ffffff; + color: #000000; + padding: 0 20px 30px 20px; +} + +div.footer { + color: #ffffff; + width: 100%; + padding: 9px 0 9px 0; + text-align: center; + font-size: 75%; +} + +div.footer a { + color: #ffffff; + text-decoration: underline; +} + +div.related { + background-color: #133f52; + line-height: 30px; + color: #ffffff; +} + +div.related a { + color: #ffffff; +} + +div.sphinxsidebar { +} + +div.sphinxsidebar h3 { + font-family: 'Trebuchet MS', sans-serif; + color: #ffffff; + font-size: 1.4em; + font-weight: normal; + margin: 0; + padding: 0; +} + +div.sphinxsidebar h3 a { + color: #ffffff; +} + +div.sphinxsidebar h4 { + font-family: 'Trebuchet MS', sans-serif; + color: #ffffff; + font-size: 1.3em; + font-weight: normal; + margin: 5px 0 0 0; + padding: 0; +} + +div.sphinxsidebar p { + color: #ffffff; +} + +div.sphinxsidebar p.topless { + margin: 5px 10px 10px 10px; +} + +div.sphinxsidebar ul { + margin: 10px; + padding: 0; + color: #ffffff; +} + +div.sphinxsidebar a { + color: #98dbcc; +} + +div.sphinxsidebar input { + border: 1px solid #98dbcc; + font-family: sans-serif; + font-size: 1em; +} + + + +/* -- hyperlink styles ------------------------------------------------------ */ + +a { + color: #355f7c; + text-decoration: none; +} + +a:visited { + color: #355f7c; + text-decoration: none; +} + +a:hover { + text-decoration: underline; +} + + + +/* -- body styles ----------------------------------------------------------- */ + +div.body h1, +div.body h2, +div.body h3, +div.body h4, +div.body h5, +div.body h6 { + font-family: 'Trebuchet MS', sans-serif; + background-color: #f2f2f2; + font-weight: normal; + color: #20435c; + border-bottom: 1px solid #ccc; + margin: 20px -20px 10px -20px; + padding: 3px 0 3px 10px; +} + +div.body h1 { margin-top: 0; font-size: 200%; } +div.body h2 { font-size: 160%; } +div.body h3 { font-size: 140%; } +div.body h4 { font-size: 120%; } +div.body h5 { font-size: 110%; } +div.body h6 { font-size: 100%; } + +a.headerlink { + color: #c60f0f; + font-size: 0.8em; + padding: 0 4px 0 4px; + text-decoration: none; +} + +a.headerlink:hover { + background-color: #c60f0f; + color: white; +} + +div.body p, div.body dd, div.body li, div.body blockquote { + text-align: justify; + line-height: 130%; +} + +div.admonition p.admonition-title + p { + display: inline; +} + +div.admonition p { + margin-bottom: 5px; +} + +div.admonition pre { + margin-bottom: 5px; +} + +div.admonition ul, div.admonition ol { + margin-bottom: 5px; +} + +div.note { + background-color: #eee; + border: 1px solid #ccc; +} + +div.seealso { + background-color: #ffc; + border: 1px solid #ff6; +} + +div.topic { + background-color: #eee; +} + +div.warning { + background-color: #ffe4e4; + border: 1px solid #f66; +} + +p.admonition-title { + display: inline; +} + +p.admonition-title:after { + content: ":"; +} + +pre { + padding: 5px; + background-color: #eeffcc; + color: #333333; + line-height: 120%; + border: 1px solid #ac9; + border-left: none; + border-right: none; +} + +code { + background-color: #ecf0f3; + padding: 0 1px 0 1px; + font-size: 0.95em; +} + +th { + background-color: #ede; +} + +.warning code { + background: #efc2c2; +} + +.note code { + background: #d6d6d6; +} + +.viewcode-back { + font-family: sans-serif; +} + +div.viewcode-block:target { + background-color: #f4debf; + border-top: 1px solid #ac9; + border-bottom: 1px solid #ac9; +} + +div.code-block-caption { + color: #efefef; + background-color: #1c4e63; +} \ No newline at end of file diff --git a/PySDL2-0.9.5/doc/html/_static/comment-bright.png b/PySDL2-0.9.5/doc/html/_static/comment-bright.png new file mode 100644 index 0000000000000000000000000000000000000000..551517b8c83b76f734ff791f847829a760ad1903 GIT binary patch literal 3500 zcmV;d4O8-oP)Oz@Z0f2-7z;ux~O9+4z06=<WDR*FRcSTFz- zW=q650N5=6FiBTtNC2?60Km==3$g$R3;-}uh=nNt1bYBr$Ri_o0EC$U6h`t_Jn<{8 z5a%iY0C<_QJh>z}MS)ugEp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b/PySDL2-0.9.5/doc/html/_static/comment.png new file mode 100644 index 0000000000000000000000000000000000000000..92feb52b8824c6b0f59b658b1196c61de9162a95 GIT binary patch literal 3445 zcmV-*4T|!KP)Oz@Z0f2-7z;ux~O9+4z06=<WDR*FRcSTFz- zW=q650N5=6FiBTtNC2?60Km==3$g$R3;-}uh=nNt1bYBr$Ri_o0EC$U6h`t_Jn<{8 z5a%iY0C<_QJh>z}MS)ugEpZ1|S1ukX&Pf+56gFW3VVXcL!g-k)GJ!M?;PcD?0HBc- z5#WRK{dmp}uFlRjj{U%*%WZ25jX z{P*?XzTzZ-GF^d31o+^>%=Ap99M6&ogks$0k4OBs3;+Bb(;~!4V!2o<6ys46agIcq zjPo+3B8fthDa9qy|77CdEc*jK-!%ZRYCZvbku9iQV*~a}ClFY4z~c7+0P?$U!PF=S z1Au6Q;m>#f??3%Vpd|o+W=WE9003S@Bra6Svp>fO002awfhw>;8}z{#EWidF!3EsG z3;bXU&9EIRU@z1_9W=mEXoiz;4lcq~xDGvV5BgyU zp1~-*fe8db$Osc*A=-!mVv1NJjtCc-h4>-CNCXm#Bp}I%6j35eku^v$Qi@a{RY)E3 zJ#qp$hg?Rwkvqr$GJ^buyhkyVfwECO)C{#lxu`c9ghrwZ&}4KmnvWKso6vH!8a<3Q zq36)6Xb;+tK10Vaz~~qUGsJ8#F2=(`u{bOVlVi)VBCHIn#u~6ztOL7=^<&SmcLWlF zMZgI*1b0FpVIDz9SWH+>*hr`#93(Um+6gxa1B6k+CnA%mOSC4s5&6UzVlpv@SV$}* z))J2sFA#f(L&P^E5{W}HC%KRUNwK6<(h|}}(r!{C=`5+6G)NjFlgZj-YqAG9lq?`C z$c5yc>d>VnA`E_*3F2Qp##d8RZb=H01_mm@+|Cqnc9PsG(F5HIG_C zt)aG3uTh7n6Et<2In9F>NlT@zqLtGcXcuVrX|L#Xx)I%#9!{6gSJKPrN9dR61N3(c z4Tcqi$B1Vr8Jidf7-t!G7_XR2rWwr)$3XQ?}=hpK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Zd?0@)|7iKK^;6KN`;!@ylm7$*nDhK&GcDTy000JJOGiWi{{a60 z|De66lK=n!32;bRa{vGf6951U69E94oEQKA00(qQO+^RV2nzr)JMUJvzW@LNr%6OX zR5;6Zk;`k`RTRfR-*ac2G}PGmXsUu>6ce?Lsn$m^3Q`48f|TwQ+_-Qh=t8Ra7nE)y zf@08(pjZ@22^EVjG*%30TJRMkBUC$WqZ73uoiv&J=APqX;!v%AH}`Vx`999MVjXwy z{f1-vh8P<=plv&cZ>p5jjX~Vt&W0e)wpw1RFRuRdDkwlKb01tp5 zP=trFN0gH^|L4jJkB{6sCV;Q!ewpg-D&4cza%GQ*b>R*=34#dW;ek`FEiB(vnw+U# zpOX5UMJBhIN&;D1!yQoIAySC!9zqJmmfoJqmQp}p&h*HTfMh~u9rKic2oz3sNM^#F zBIq*MRLbsMt%y{EHj8}LeqUUvoxf0=kqji62>ne+U`d#%J)abyK&Y`=eD%oA!36<)baZyK zXJh5im6umkS|_CSGXips$nI)oBHXojzBzyY_M5K*uvb0_9viuBVyV%5VtJ*Am1ag# zczbv4B?u8j68iOz<+)nDu^oWnL+$_G{PZOCcOGQ?!1VCefves~rfpaEZs-PdVYMiV z98ElaJ2}7f;htSXFY#Zv?__sQeckE^HV{ItO=)2hMQs=(_ Xn!ZpXD%P(H00000NkvXXu0mjf= 0 && !jQuery(node.parentNode).hasClass(className)) { + var span = document.createElement("span"); + span.className = className; + span.appendChild(document.createTextNode(val.substr(pos, text.length))); + node.parentNode.insertBefore(span, node.parentNode.insertBefore( + document.createTextNode(val.substr(pos + text.length)), + node.nextSibling)); + node.nodeValue = val.substr(0, pos); + } + } + else if (!jQuery(node).is("button, select, textarea")) { + jQuery.each(node.childNodes, function() { + highlight(this); + }); + } + } + return this.each(function() { + highlight(this); + }); +}; + +/* + * backward compatibility for jQuery.browser + * This will be supported until firefox bug is fixed. + */ +if (!jQuery.browser) { + jQuery.uaMatch = function(ua) { + ua = ua.toLowerCase(); + + var match = /(chrome)[ \/]([\w.]+)/.exec(ua) || + /(webkit)[ \/]([\w.]+)/.exec(ua) || + /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) || + /(msie) ([\w.]+)/.exec(ua) || + ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) || + []; + + return { + browser: match[ 1 ] || "", + version: match[ 2 ] || "0" + }; + }; + jQuery.browser = {}; + jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true; +} + +/** + * Small JavaScript module for the documentation. + */ +var Documentation = { + + init : function() { + this.fixFirefoxAnchorBug(); + this.highlightSearchWords(); + this.initIndexTable(); + + }, + + /** + * i18n support + */ + TRANSLATIONS : {}, + PLURAL_EXPR : function(n) { return n == 1 ? 0 : 1; }, + LOCALE : 'unknown', + + // gettext and ngettext don't access this so that the functions + // can safely bound to a different name (_ = Documentation.gettext) + gettext : function(string) { + var translated = Documentation.TRANSLATIONS[string]; + if (typeof translated == 'undefined') + return string; + return (typeof translated == 'string') ? translated : translated[0]; + }, + + ngettext : function(singular, plural, n) { + var translated = Documentation.TRANSLATIONS[singular]; + if (typeof translated == 'undefined') + return (n == 1) ? singular : plural; + return translated[Documentation.PLURALEXPR(n)]; + }, + + addTranslations : function(catalog) { + for (var key in catalog.messages) + this.TRANSLATIONS[key] = catalog.messages[key]; + this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')'); + this.LOCALE = catalog.locale; + }, + + /** + * add context elements like header anchor links + */ + addContextElements : function() { + $('div[id] > :header:first').each(function() { + $('\u00B6'). + attr('href', '#' + this.id). + attr('title', _('Permalink to this headline')). + appendTo(this); + }); + $('dt[id]').each(function() { + $('\u00B6'). + attr('href', '#' + this.id). + attr('title', _('Permalink to this definition')). + appendTo(this); + }); + }, + + /** + * workaround a firefox stupidity + * see: https://bugzilla.mozilla.org/show_bug.cgi?id=645075 + */ + fixFirefoxAnchorBug : function() { + if (document.location.hash) + window.setTimeout(function() { + document.location.href += ''; + }, 10); + }, + + /** + * highlight the search words provided in the url in the text + */ + highlightSearchWords : function() { + var params = $.getQueryParameters(); + var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : []; + if (terms.length) { + var body = $('div.body'); + if (!body.length) { + body = $('body'); + } + window.setTimeout(function() { + $.each(terms, function() { + body.highlightText(this.toLowerCase(), 'highlighted'); + }); + }, 10); + $('') + .appendTo($('#searchbox')); + } + }, + + /** + * init the domain index toggle buttons + */ + initIndexTable : function() { + var togglers = $('img.toggler').click(function() { + var src = $(this).attr('src'); + var idnum = $(this).attr('id').substr(7); + $('tr.cg-' + idnum).toggle(); + if (src.substr(-9) == 'minus.png') + $(this).attr('src', src.substr(0, src.length-9) + 'plus.png'); + else + $(this).attr('src', src.substr(0, src.length-8) + 'minus.png'); + }).css('display', ''); + if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) { + togglers.click(); + } + }, + + /** + * helper function to hide the search marks again + */ + hideSearchWords : function() { + $('#searchbox .highlight-link').fadeOut(300); + $('span.highlighted').removeClass('highlighted'); + }, + + /** + * make the url absolute + */ + makeURL : function(relativeURL) { + return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL; + }, + + /** + * get the current relative url + */ + getCurrentURL : function() { + var path = document.location.pathname; + var parts = path.split(/\//); + $.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() { + if (this == '..') + parts.pop(); + }); + var url = parts.join('/'); + return path.substring(url.lastIndexOf('/') + 1, path.length - 1); + }, + + initOnKeyListeners: function() { + $(document).keyup(function(event) { + var activeElementType = document.activeElement.tagName; + // don't navigate when in search box or textarea + if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT') { + switch (event.keyCode) { + case 37: // left + var prevHref = $('link[rel="prev"]').prop('href'); + if (prevHref) { + window.location.href = prevHref; + return false; + } + case 39: // right + var nextHref = $('link[rel="next"]').prop('href'); + if (nextHref) { + window.location.href = nextHref; + return false; + } + } + } + }); + } +}; + +// quick alias for translations +_ = Documentation.gettext; + +$(document).ready(function() { + Documentation.init(); +}); \ No newline at end of file diff --git a/PySDL2-0.9.5/doc/html/_static/down-pressed.png b/PySDL2-0.9.5/doc/html/_static/down-pressed.png new file mode 100644 index 0000000000000000000000000000000000000000..7c30d004b71b32bb2fc06b3bd4dc8278baab0946 GIT binary patch literal 347 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJV{wqX6T`Z5GB1G~&H|6fVxZ#d zAk65bF}ngN$X?><>&kwMor^(NtW3yF87Slz;1l8sq&LUMQwy<>&kwMol#tg zK_ydLmzem(vK1>2TzUEGl*lj!N<7$PCrdoWV0 z$w0*Ap!bZ4if7h;-yfL#MC0e;t{xY+$l~DX2EWYIPet1cohf^BdG+jXhtuq&W-0|c zKPmlKv-7OTjb}T)7@fTGd9y~u4{g8An;)c2U=w=nwQ7}zVDc>n+a literal 0 HcmV?d00001 diff --git a/PySDL2-0.9.5/doc/html/_static/file.png b/PySDL2-0.9.5/doc/html/_static/file.png new file mode 100644 index 0000000000000000000000000000000000000000..254c60bfbe2715ae2edca48ebccfd074deb8031d GIT binary patch literal 358 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJXMsm#F#`j)FbFd;%$g$s6l5>) z^mS#w%FV~i&ZxO9L3Zxqw8>dd4I&zcKG){Yx14xKr0

ZQJ$m%mv17-NAAj}g)$7-<-@JMA z_U+TRK=AR}yLa#2zkmPX!-tO_KYsf3>Hq)#%qnY_1Fd8&3GxeO2wSmci|LJf=|BO- zByV>Yl`U*PX977no-U3d5|XS39sLdkFt8q|+|QqL_#ErUf6I%zFA7b%b>3$hFGGFs zc72AL|61pRJ1(+5wNdg|xP#*`gQ~lOnTFKiIjl#S3)+QV=h{~`9{M=hx#5uZ&-tIF sG!8onYS_8EFr8v&@CavkqYey&g)1epR*Fkm0PSV)boFyt=akR{044O6bN~PV literal 0 HcmV?d00001 diff --git a/PySDL2-0.9.5/doc/html/_static/jquery-1.11.1.js b/PySDL2-0.9.5/doc/html/_static/jquery-1.11.1.js new file mode 100644 index 0000000..d4b67f7 --- /dev/null +++ b/PySDL2-0.9.5/doc/html/_static/jquery-1.11.1.js @@ -0,0 +1,10308 @@ +/*! + * jQuery JavaScript Library v1.11.1 + * http://jquery.com/ + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * + * Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors + * Released under the MIT license + * http://jquery.org/license + * + * Date: 2014-05-01T17:42Z + */ + +(function( global, factory ) { + + if ( typeof module === "object" && typeof module.exports === "object" ) { + // For CommonJS and CommonJS-like environments where a proper window is present, + // execute the factory and get jQuery + // For environments that do not inherently posses a window with a document + // (such as Node.js), expose a jQuery-making factory as module.exports + // This accentuates the need for the creation of a real window + // e.g. var jQuery = require("jquery")(window); + // See ticket #14549 for more info + module.exports = global.document ? + factory( global, true ) : + function( w ) { + if ( !w.document ) { + throw new Error( "jQuery requires a window with a document" ); + } + return factory( w ); + }; + } else { + factory( global ); + } + +// Pass this if window is not defined yet +}(typeof window !== "undefined" ? window : this, function( window, noGlobal ) { + +// Can't do this because several apps including ASP.NET trace +// the stack via arguments.caller.callee and Firefox dies if +// you try to trace through "use strict" call chains. (#13335) +// Support: Firefox 18+ +// + +var deletedIds = []; + +var slice = deletedIds.slice; + +var concat = deletedIds.concat; + +var push = deletedIds.push; + +var indexOf = deletedIds.indexOf; + +var class2type = {}; + +var toString = class2type.toString; + +var hasOwn = class2type.hasOwnProperty; + +var support = {}; + + + +var + version = "1.11.1", + + // Define a local copy of jQuery + jQuery = function( selector, context ) { + // The jQuery object is actually just the init constructor 'enhanced' + // Need init if jQuery is called (just allow error to be thrown if not included) + return new jQuery.fn.init( selector, context ); + }, + + // Support: Android<4.1, IE<9 + // Make sure we trim BOM and NBSP + rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, + + // Matches dashed string for camelizing + rmsPrefix = /^-ms-/, + rdashAlpha = /-([\da-z])/gi, + + // Used by jQuery.camelCase as callback to replace() + fcamelCase = function( all, letter ) { + return letter.toUpperCase(); + }; + +jQuery.fn = jQuery.prototype = { + // The current version of jQuery being used + jquery: version, + + constructor: jQuery, + + // Start with an empty selector + selector: "", + + // The default length of a jQuery object is 0 + length: 0, + + toArray: function() { + return slice.call( this ); + }, + + // Get the Nth element in the matched element set OR + // Get the whole matched element set as a clean array + get: function( num ) { + return num != null ? + + // Return just the one element from the set + ( num < 0 ? this[ num + this.length ] : this[ num ] ) : + + // Return all the elements in a clean array + slice.call( this ); + }, + + // Take an array of elements and push it onto the stack + // (returning the new matched element set) + pushStack: function( elems ) { + + // Build a new jQuery matched element set + var ret = jQuery.merge( this.constructor(), elems ); + + // Add the old object onto the stack (as a reference) + ret.prevObject = this; + ret.context = this.context; + + // Return the newly-formed element set + return ret; + }, + + // Execute a callback for every element in the matched set. + // (You can seed the arguments with an array of args, but this is + // only used internally.) + each: function( callback, args ) { + return jQuery.each( this, callback, args ); + }, + + map: function( callback ) { + return this.pushStack( jQuery.map(this, function( elem, i ) { + return callback.call( elem, i, elem ); + })); + }, + + slice: function() { + return this.pushStack( slice.apply( this, arguments ) ); + }, + + first: function() { + return this.eq( 0 ); + }, + + last: function() { + return this.eq( -1 ); + }, + + eq: function( i ) { + var len = this.length, + j = +i + ( i < 0 ? len : 0 ); + return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] ); + }, + + end: function() { + return this.prevObject || this.constructor(null); + }, + + // For internal use only. + // Behaves like an Array's method, not like a jQuery method. + push: push, + sort: deletedIds.sort, + splice: deletedIds.splice +}; + +jQuery.extend = jQuery.fn.extend = function() { + var src, copyIsArray, copy, name, options, clone, + target = arguments[0] || {}, + i = 1, + length = arguments.length, + deep = false; + + // Handle a deep copy situation + if ( typeof target === "boolean" ) { + deep = target; + + // skip the boolean and the target + target = arguments[ i ] || {}; + i++; + } + + // Handle case when target is a string or something (possible in deep copy) + if ( typeof target !== "object" && !jQuery.isFunction(target) ) { + target = {}; + } + + // extend jQuery itself if only one argument is passed + if ( i === length ) { + target = this; + i--; + } + + for ( ; i < length; i++ ) { + // Only deal with non-null/undefined values + if ( (options = arguments[ i ]) != null ) { + // Extend the base object + for ( name in options ) { + src = target[ name ]; + copy = options[ name ]; + + // Prevent never-ending loop + if ( target === copy ) { + continue; + } + + // Recurse if we're merging plain objects or arrays + if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) { + if ( copyIsArray ) { + copyIsArray = false; + clone = src && jQuery.isArray(src) ? src : []; + + } else { + clone = src && jQuery.isPlainObject(src) ? src : {}; + } + + // Never move original objects, clone them + target[ name ] = jQuery.extend( deep, clone, copy ); + + // Don't bring in undefined values + } else if ( copy !== undefined ) { + target[ name ] = copy; + } + } + } + } + + // Return the modified object + return target; +}; + +jQuery.extend({ + // Unique for each copy of jQuery on the page + expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ), + + // Assume jQuery is ready without the ready module + isReady: true, + + error: function( msg ) { + throw new Error( msg ); + }, + + noop: function() {}, + + // See test/unit/core.js for details concerning isFunction. + // Since version 1.3, DOM methods and functions like alert + // aren't supported. They return false on IE (#2968). + isFunction: function( obj ) { + return jQuery.type(obj) === "function"; + }, + + isArray: Array.isArray || function( obj ) { + return jQuery.type(obj) === "array"; + }, + + isWindow: function( obj ) { + /* jshint eqeqeq: false */ + return obj != null && obj == obj.window; + }, + + isNumeric: function( obj ) { + // parseFloat NaNs numeric-cast false positives (null|true|false|"") + // ...but misinterprets leading-number strings, particularly hex literals ("0x...") + // subtraction forces infinities to NaN + return !jQuery.isArray( obj ) && obj - parseFloat( obj ) >= 0; + }, + + isEmptyObject: function( obj ) { + var name; + for ( name in obj ) { + return false; + } + return true; + }, + + isPlainObject: function( obj ) { + var key; + + // Must be an Object. + // Because of IE, we also have to check the presence of the constructor property. + // Make sure that DOM nodes and window objects don't pass through, as well + if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { + return false; + } + + try { + // Not own constructor property must be Object + if ( obj.constructor && + !hasOwn.call(obj, "constructor") && + !hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) { + return false; + } + } catch ( e ) { + // IE8,9 Will throw exceptions on certain host objects #9897 + return false; + } + + // Support: IE<9 + // Handle iteration over inherited properties before own properties. + if ( support.ownLast ) { + for ( key in obj ) { + return hasOwn.call( obj, key ); + } + } + + // Own properties are enumerated firstly, so to speed up, + // if last one is own, then all properties are own. + for ( key in obj ) {} + + return key === undefined || hasOwn.call( obj, key ); + }, + + type: function( obj ) { + if ( obj == null ) { + return obj + ""; + } + return typeof obj === "object" || typeof obj === "function" ? + class2type[ toString.call(obj) ] || "object" : + typeof obj; + }, + + // Evaluates a script in a global context + // Workarounds based on findings by Jim Driscoll + // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context + globalEval: function( data ) { + if ( data && jQuery.trim( data ) ) { + // We use execScript on Internet Explorer + // We use an anonymous function so that context is window + // rather than jQuery in Firefox + ( window.execScript || function( data ) { + window[ "eval" ].call( window, data ); + } )( data ); + } + }, + + // Convert dashed to camelCase; used by the css and data modules + // Microsoft forgot to hump their vendor prefix (#9572) + camelCase: function( string ) { + return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); + }, + + nodeName: function( elem, name ) { + return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); + }, + + // args is for internal usage only + each: function( obj, callback, args ) { + var value, + i = 0, + length = obj.length, + isArray = isArraylike( obj ); + + if ( args ) { + if ( isArray ) { + for ( ; i < length; i++ ) { + value = callback.apply( obj[ i ], args ); + + if ( value === false ) { + break; + } + } + } else { + for ( i in obj ) { + value = callback.apply( obj[ i ], args ); + + if ( value === false ) { + break; + } + } + } + + // A special, fast, case for the most common use of each + } else { + if ( isArray ) { + for ( ; i < length; i++ ) { + value = callback.call( obj[ i ], i, obj[ i ] ); + + if ( value === false ) { + break; + } + } + } else { + for ( i in obj ) { + value = callback.call( obj[ i ], i, obj[ i ] ); + + if ( value === false ) { + break; + } + } + } + } + + return obj; + }, + + // Support: Android<4.1, IE<9 + trim: function( text ) { + return text == null ? + "" : + ( text + "" ).replace( rtrim, "" ); + }, + + // results is for internal usage only + makeArray: function( arr, results ) { + var ret = results || []; + + if ( arr != null ) { + if ( isArraylike( Object(arr) ) ) { + jQuery.merge( ret, + typeof arr === "string" ? + [ arr ] : arr + ); + } else { + push.call( ret, arr ); + } + } + + return ret; + }, + + inArray: function( elem, arr, i ) { + var len; + + if ( arr ) { + if ( indexOf ) { + return indexOf.call( arr, elem, i ); + } + + len = arr.length; + i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0; + + for ( ; i < len; i++ ) { + // Skip accessing in sparse arrays + if ( i in arr && arr[ i ] === elem ) { + return i; + } + } + } + + return -1; + }, + + merge: function( first, second ) { + var len = +second.length, + j = 0, + i = first.length; + + while ( j < len ) { + first[ i++ ] = second[ j++ ]; + } + + // Support: IE<9 + // Workaround casting of .length to NaN on otherwise arraylike objects (e.g., NodeLists) + if ( len !== len ) { + while ( second[j] !== undefined ) { + first[ i++ ] = second[ j++ ]; + } + } + + first.length = i; + + return first; + }, + + grep: function( elems, callback, invert ) { + var callbackInverse, + matches = [], + i = 0, + length = elems.length, + callbackExpect = !invert; + + // Go through the array, only saving the items + // that pass the validator function + for ( ; i < length; i++ ) { + callbackInverse = !callback( elems[ i ], i ); + if ( callbackInverse !== callbackExpect ) { + matches.push( elems[ i ] ); + } + } + + return matches; + }, + + // arg is for internal usage only + map: function( elems, callback, arg ) { + var value, + i = 0, + length = elems.length, + isArray = isArraylike( elems ), + ret = []; + + // Go through the array, translating each of the items to their new values + if ( isArray ) { + for ( ; i < length; i++ ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret.push( value ); + } + } + + // Go through every key on the object, + } else { + for ( i in elems ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret.push( value ); + } + } + } + + // Flatten any nested arrays + return concat.apply( [], ret ); + }, + + // A global GUID counter for objects + guid: 1, + + // Bind a function to a context, optionally partially applying any + // arguments. + proxy: function( fn, context ) { + var args, proxy, tmp; + + if ( typeof context === "string" ) { + tmp = fn[ context ]; + context = fn; + fn = tmp; + } + + // Quick check to determine if target is callable, in the spec + // this throws a TypeError, but we will just return undefined. + if ( !jQuery.isFunction( fn ) ) { + return undefined; + } + + // Simulated bind + args = slice.call( arguments, 2 ); + proxy = function() { + return fn.apply( context || this, args.concat( slice.call( arguments ) ) ); + }; + + // Set the guid of unique handler to the same of original handler, so it can be removed + proxy.guid = fn.guid = fn.guid || jQuery.guid++; + + return proxy; + }, + + now: function() { + return +( new Date() ); + }, + + // jQuery.support is not used in Core but other projects attach their + // properties to it so it needs to exist. + support: support +}); + +// Populate the class2type map +jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) { + class2type[ "[object " + name + "]" ] = name.toLowerCase(); +}); + +function isArraylike( obj ) { + var length = obj.length, + type = jQuery.type( obj ); + + if ( type === "function" || jQuery.isWindow( obj ) ) { + return false; + } + + if ( obj.nodeType === 1 && length ) { + return true; + } + + return type === "array" || length === 0 || + typeof length === "number" && length > 0 && ( length - 1 ) in obj; +} +var Sizzle = +/*! + * Sizzle CSS Selector Engine v1.10.19 + * http://sizzlejs.com/ + * + * Copyright 2013 jQuery Foundation, Inc. and other contributors + * Released under the MIT license + * http://jquery.org/license + * + * Date: 2014-04-18 + */ +(function( window ) { + +var i, + support, + Expr, + getText, + isXML, + tokenize, + compile, + select, + outermostContext, + sortInput, + hasDuplicate, + + // Local document vars + setDocument, + document, + docElem, + documentIsHTML, + rbuggyQSA, + rbuggyMatches, + matches, + contains, + + // Instance-specific data + expando = "sizzle" + -(new Date()), + preferredDoc = window.document, + dirruns = 0, + done = 0, + classCache = createCache(), + tokenCache = createCache(), + compilerCache = createCache(), + sortOrder = function( a, b ) { + if ( a === b ) { + hasDuplicate = true; + } + return 0; + }, + + // General-purpose constants + strundefined = typeof undefined, + MAX_NEGATIVE = 1 << 31, + + // Instance methods + hasOwn = ({}).hasOwnProperty, + arr = [], + pop = arr.pop, + push_native = arr.push, + push = arr.push, + slice = arr.slice, + // Use a stripped-down indexOf if we can't use a native one + indexOf = arr.indexOf || function( elem ) { + var i = 0, + len = this.length; + for ( ; i < len; i++ ) { + if ( this[i] === elem ) { + return i; + } + } + return -1; + }, + + booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", + + // Regular expressions + + // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace + whitespace = "[\\x20\\t\\r\\n\\f]", + // http://www.w3.org/TR/css3-syntax/#characters + characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+", + + // Loosely modeled on CSS identifier characters + // An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors + // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier + identifier = characterEncoding.replace( "w", "w#" ), + + // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors + attributes = "\\[" + whitespace + "*(" + characterEncoding + ")(?:" + whitespace + + // Operator (capture 2) + "*([*^$|!~]?=)" + whitespace + + // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]" + "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace + + "*\\]", + + pseudos = ":(" + characterEncoding + ")(?:\\((" + + // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments: + // 1. quoted (capture 3; capture 4 or capture 5) + "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" + + // 2. simple (capture 6) + "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" + + // 3. anything else (capture 2) + ".*" + + ")\\)|)", + + // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter + rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), + + rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), + rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ), + + rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ), + + rpseudo = new RegExp( pseudos ), + ridentifier = new RegExp( "^" + identifier + "$" ), + + matchExpr = { + "ID": new RegExp( "^#(" + characterEncoding + ")" ), + "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ), + "TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ), + "ATTR": new RegExp( "^" + attributes ), + "PSEUDO": new RegExp( "^" + pseudos ), + "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + + "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), + "bool": new RegExp( "^(?:" + booleans + ")$", "i" ), + // For use in libraries implementing .is() + // We use this for POS matching in `select` + "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + + whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) + }, + + rinputs = /^(?:input|select|textarea|button)$/i, + rheader = /^h\d$/i, + + rnative = /^[^{]+\{\s*\[native \w/, + + // Easily-parseable/retrievable ID or TAG or CLASS selectors + rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, + + rsibling = /[+~]/, + rescape = /'|\\/g, + + // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters + runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ), + funescape = function( _, escaped, escapedWhitespace ) { + var high = "0x" + escaped - 0x10000; + // NaN means non-codepoint + // Support: Firefox<24 + // Workaround erroneous numeric interpretation of +"0x" + return high !== high || escapedWhitespace ? + escaped : + high < 0 ? + // BMP codepoint + String.fromCharCode( high + 0x10000 ) : + // Supplemental Plane codepoint (surrogate pair) + String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); + }; + +// Optimize for push.apply( _, NodeList ) +try { + push.apply( + (arr = slice.call( preferredDoc.childNodes )), + preferredDoc.childNodes + ); + // Support: Android<4.0 + // Detect silently failing push.apply + arr[ preferredDoc.childNodes.length ].nodeType; +} catch ( e ) { + push = { apply: arr.length ? + + // Leverage slice if possible + function( target, els ) { + push_native.apply( target, slice.call(els) ); + } : + + // Support: IE<9 + // Otherwise append directly + function( target, els ) { + var j = target.length, + i = 0; + // Can't trust NodeList.length + while ( (target[j++] = els[i++]) ) {} + target.length = j - 1; + } + }; +} + +function Sizzle( selector, context, results, seed ) { + var match, elem, m, nodeType, + // QSA vars + i, groups, old, nid, newContext, newSelector; + + if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) { + setDocument( context ); + } + + context = context || document; + results = results || []; + + if ( !selector || typeof selector !== "string" ) { + return results; + } + + if ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) { + return []; + } + + if ( documentIsHTML && !seed ) { + + // Shortcuts + if ( (match = rquickExpr.exec( selector )) ) { + // Speed-up: Sizzle("#ID") + if ( (m = match[1]) ) { + if ( nodeType === 9 ) { + elem = context.getElementById( m ); + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document (jQuery #6963) + if ( elem && elem.parentNode ) { + // Handle the case where IE, Opera, and Webkit return items + // by name instead of ID + if ( elem.id === m ) { + results.push( elem ); + return results; + } + } else { + return results; + } + } else { + // Context is not a document + if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) && + contains( context, elem ) && elem.id === m ) { + results.push( elem ); + return results; + } + } + + // Speed-up: Sizzle("TAG") + } else if ( match[2] ) { + push.apply( results, context.getElementsByTagName( selector ) ); + return results; + + // Speed-up: Sizzle(".CLASS") + } else if ( (m = match[3]) && support.getElementsByClassName && context.getElementsByClassName ) { + push.apply( results, context.getElementsByClassName( m ) ); + return results; + } + } + + // QSA path + if ( support.qsa && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) { + nid = old = expando; + newContext = context; + newSelector = nodeType === 9 && selector; + + // qSA works strangely on Element-rooted queries + // We can work around this by specifying an extra ID on the root + // and working up from there (Thanks to Andrew Dupont for the technique) + // IE 8 doesn't work on object elements + if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { + groups = tokenize( selector ); + + if ( (old = context.getAttribute("id")) ) { + nid = old.replace( rescape, "\\$&" ); + } else { + context.setAttribute( "id", nid ); + } + nid = "[id='" + nid + "'] "; + + i = groups.length; + while ( i-- ) { + groups[i] = nid + toSelector( groups[i] ); + } + newContext = rsibling.test( selector ) && testContext( context.parentNode ) || context; + newSelector = groups.join(","); + } + + if ( newSelector ) { + try { + push.apply( results, + newContext.querySelectorAll( newSelector ) + ); + return results; + } catch(qsaError) { + } finally { + if ( !old ) { + context.removeAttribute("id"); + } + } + } + } + } + + // All others + return select( selector.replace( rtrim, "$1" ), context, results, seed ); +} + +/** + * Create key-value caches of limited size + * @returns {Function(string, Object)} Returns the Object data after storing it on itself with + * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) + * deleting the oldest entry + */ +function createCache() { + var keys = []; + + function cache( key, value ) { + // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) + if ( keys.push( key + " " ) > Expr.cacheLength ) { + // Only keep the most recent entries + delete cache[ keys.shift() ]; + } + return (cache[ key + " " ] = value); + } + return cache; +} + +/** + * Mark a function for special use by Sizzle + * @param {Function} fn The function to mark + */ +function markFunction( fn ) { + fn[ expando ] = true; + return fn; +} + +/** + * Support testing using an element + * @param {Function} fn Passed the created div and expects a boolean result + */ +function assert( fn ) { + var div = document.createElement("div"); + + try { + return !!fn( div ); + } catch (e) { + return false; + } finally { + // Remove from its parent by default + if ( div.parentNode ) { + div.parentNode.removeChild( div ); + } + // release memory in IE + div = null; + } +} + +/** + * Adds the same handler for all of the specified attrs + * @param {String} attrs Pipe-separated list of attributes + * @param {Function} handler The method that will be applied + */ +function addHandle( attrs, handler ) { + var arr = attrs.split("|"), + i = attrs.length; + + while ( i-- ) { + Expr.attrHandle[ arr[i] ] = handler; + } +} + +/** + * Checks document order of two siblings + * @param {Element} a + * @param {Element} b + * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b + */ +function siblingCheck( a, b ) { + var cur = b && a, + diff = cur && a.nodeType === 1 && b.nodeType === 1 && + ( ~b.sourceIndex || MAX_NEGATIVE ) - + ( ~a.sourceIndex || MAX_NEGATIVE ); + + // Use IE sourceIndex if available on both nodes + if ( diff ) { + return diff; + } + + // Check if b follows a + if ( cur ) { + while ( (cur = cur.nextSibling) ) { + if ( cur === b ) { + return -1; + } + } + } + + return a ? 1 : -1; +} + +/** + * Returns a function to use in pseudos for input types + * @param {String} type + */ +function createInputPseudo( type ) { + return function( elem ) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && elem.type === type; + }; +} + +/** + * Returns a function to use in pseudos for buttons + * @param {String} type + */ +function createButtonPseudo( type ) { + return function( elem ) { + var name = elem.nodeName.toLowerCase(); + return (name === "input" || name === "button") && elem.type === type; + }; +} + +/** + * Returns a function to use in pseudos for positionals + * @param {Function} fn + */ +function createPositionalPseudo( fn ) { + return markFunction(function( argument ) { + argument = +argument; + return markFunction(function( seed, matches ) { + var j, + matchIndexes = fn( [], seed.length, argument ), + i = matchIndexes.length; + + // Match elements found at the specified indexes + while ( i-- ) { + if ( seed[ (j = matchIndexes[i]) ] ) { + seed[j] = !(matches[j] = seed[j]); + } + } + }); + }); +} + +/** + * Checks a node for validity as a Sizzle context + * @param {Element|Object=} context + * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value + */ +function testContext( context ) { + return context && typeof context.getElementsByTagName !== strundefined && context; +} + +// Expose support vars for convenience +support = Sizzle.support = {}; + +/** + * Detects XML nodes + * @param {Element|Object} elem An element or a document + * @returns {Boolean} True iff elem is a non-HTML XML node + */ +isXML = Sizzle.isXML = function( elem ) { + // documentElement is verified for cases where it doesn't yet exist + // (such as loading iframes in IE - #4833) + var documentElement = elem && (elem.ownerDocument || elem).documentElement; + return documentElement ? documentElement.nodeName !== "HTML" : false; +}; + +/** + * Sets document-related variables once based on the current document + * @param {Element|Object} [doc] An element or document object to use to set the document + * @returns {Object} Returns the current document + */ +setDocument = Sizzle.setDocument = function( node ) { + var hasCompare, + doc = node ? node.ownerDocument || node : preferredDoc, + parent = doc.defaultView; + + // If no document and documentElement is available, return + if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) { + return document; + } + + // Set our document + document = doc; + docElem = doc.documentElement; + + // Support tests + documentIsHTML = !isXML( doc ); + + // Support: IE>8 + // If iframe document is assigned to "document" variable and if iframe has been reloaded, + // IE will throw "permission denied" error when accessing "document" variable, see jQuery #13936 + // IE6-8 do not support the defaultView property so parent will be undefined + if ( parent && parent !== parent.top ) { + // IE11 does not have attachEvent, so all must suffer + if ( parent.addEventListener ) { + parent.addEventListener( "unload", function() { + setDocument(); + }, false ); + } else if ( parent.attachEvent ) { + parent.attachEvent( "onunload", function() { + setDocument(); + }); + } + } + + /* Attributes + ---------------------------------------------------------------------- */ + + // Support: IE<8 + // Verify that getAttribute really returns attributes and not properties (excepting IE8 booleans) + support.attributes = assert(function( div ) { + div.className = "i"; + return !div.getAttribute("className"); + }); + + /* getElement(s)By* + ---------------------------------------------------------------------- */ + + // Check if getElementsByTagName("*") returns only elements + support.getElementsByTagName = assert(function( div ) { + div.appendChild( doc.createComment("") ); + return !div.getElementsByTagName("*").length; + }); + + // Check if getElementsByClassName can be trusted + support.getElementsByClassName = rnative.test( doc.getElementsByClassName ) && assert(function( div ) { + div.innerHTML = "

"; + + // Support: Safari<4 + // Catch class over-caching + div.firstChild.className = "i"; + // Support: Opera<10 + // Catch gEBCN failure to find non-leading classes + return div.getElementsByClassName("i").length === 2; + }); + + // Support: IE<10 + // Check if getElementById returns elements by name + // The broken getElementById methods don't pick up programatically-set names, + // so use a roundabout getElementsByName test + support.getById = assert(function( div ) { + docElem.appendChild( div ).id = expando; + return !doc.getElementsByName || !doc.getElementsByName( expando ).length; + }); + + // ID find and filter + if ( support.getById ) { + Expr.find["ID"] = function( id, context ) { + if ( typeof context.getElementById !== strundefined && documentIsHTML ) { + var m = context.getElementById( id ); + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + return m && m.parentNode ? [ m ] : []; + } + }; + Expr.filter["ID"] = function( id ) { + var attrId = id.replace( runescape, funescape ); + return function( elem ) { + return elem.getAttribute("id") === attrId; + }; + }; + } else { + // Support: IE6/7 + // getElementById is not reliable as a find shortcut + delete Expr.find["ID"]; + + Expr.filter["ID"] = function( id ) { + var attrId = id.replace( runescape, funescape ); + return function( elem ) { + var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id"); + return node && node.value === attrId; + }; + }; + } + + // Tag + Expr.find["TAG"] = support.getElementsByTagName ? + function( tag, context ) { + if ( typeof context.getElementsByTagName !== strundefined ) { + return context.getElementsByTagName( tag ); + } + } : + function( tag, context ) { + var elem, + tmp = [], + i = 0, + results = context.getElementsByTagName( tag ); + + // Filter out possible comments + if ( tag === "*" ) { + while ( (elem = results[i++]) ) { + if ( elem.nodeType === 1 ) { + tmp.push( elem ); + } + } + + return tmp; + } + return results; + }; + + // Class + Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) { + if ( typeof context.getElementsByClassName !== strundefined && documentIsHTML ) { + return context.getElementsByClassName( className ); + } + }; + + /* QSA/matchesSelector + ---------------------------------------------------------------------- */ + + // QSA and matchesSelector support + + // matchesSelector(:active) reports false when true (IE9/Opera 11.5) + rbuggyMatches = []; + + // qSa(:focus) reports false when true (Chrome 21) + // We allow this because of a bug in IE8/9 that throws an error + // whenever `document.activeElement` is accessed on an iframe + // So, we allow :focus to pass through QSA all the time to avoid the IE error + // See http://bugs.jquery.com/ticket/13378 + rbuggyQSA = []; + + if ( (support.qsa = rnative.test( doc.querySelectorAll )) ) { + // Build QSA regex + // Regex strategy adopted from Diego Perini + assert(function( div ) { + // Select is set to empty string on purpose + // This is to test IE's treatment of not explicitly + // setting a boolean content attribute, + // since its presence should be enough + // http://bugs.jquery.com/ticket/12359 + div.innerHTML = ""; + + // Support: IE8, Opera 11-12.16 + // Nothing should be selected when empty strings follow ^= or $= or *= + // The test attribute must be unknown in Opera but "safe" for WinRT + // http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section + if ( div.querySelectorAll("[msallowclip^='']").length ) { + rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); + } + + // Support: IE8 + // Boolean attributes and "value" are not treated correctly + if ( !div.querySelectorAll("[selected]").length ) { + rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); + } + + // Webkit/Opera - :checked should return selected option elements + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked + // IE8 throws error here and will not see later tests + if ( !div.querySelectorAll(":checked").length ) { + rbuggyQSA.push(":checked"); + } + }); + + assert(function( div ) { + // Support: Windows 8 Native Apps + // The type and name attributes are restricted during .innerHTML assignment + var input = doc.createElement("input"); + input.setAttribute( "type", "hidden" ); + div.appendChild( input ).setAttribute( "name", "D" ); + + // Support: IE8 + // Enforce case-sensitivity of name attribute + if ( div.querySelectorAll("[name=d]").length ) { + rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" ); + } + + // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) + // IE8 throws error here and will not see later tests + if ( !div.querySelectorAll(":enabled").length ) { + rbuggyQSA.push( ":enabled", ":disabled" ); + } + + // Opera 10-11 does not throw on post-comma invalid pseudos + div.querySelectorAll("*,:x"); + rbuggyQSA.push(",.*:"); + }); + } + + if ( (support.matchesSelector = rnative.test( (matches = docElem.matches || + docElem.webkitMatchesSelector || + docElem.mozMatchesSelector || + docElem.oMatchesSelector || + docElem.msMatchesSelector) )) ) { + + assert(function( div ) { + // Check to see if it's possible to do matchesSelector + // on a disconnected node (IE 9) + support.disconnectedMatch = matches.call( div, "div" ); + + // This should fail with an exception + // Gecko does not error, returns false instead + matches.call( div, "[s!='']:x" ); + rbuggyMatches.push( "!=", pseudos ); + }); + } + + rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") ); + rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") ); + + /* Contains + ---------------------------------------------------------------------- */ + hasCompare = rnative.test( docElem.compareDocumentPosition ); + + // Element contains another + // Purposefully does not implement inclusive descendent + // As in, an element does not contain itself + contains = hasCompare || rnative.test( docElem.contains ) ? + function( a, b ) { + var adown = a.nodeType === 9 ? a.documentElement : a, + bup = b && b.parentNode; + return a === bup || !!( bup && bup.nodeType === 1 && ( + adown.contains ? + adown.contains( bup ) : + a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 + )); + } : + function( a, b ) { + if ( b ) { + while ( (b = b.parentNode) ) { + if ( b === a ) { + return true; + } + } + } + return false; + }; + + /* Sorting + ---------------------------------------------------------------------- */ + + // Document order sorting + sortOrder = hasCompare ? + function( a, b ) { + + // Flag for duplicate removal + if ( a === b ) { + hasDuplicate = true; + return 0; + } + + // Sort on method existence if only one input has compareDocumentPosition + var compare = !a.compareDocumentPosition - !b.compareDocumentPosition; + if ( compare ) { + return compare; + } + + // Calculate position if both inputs belong to the same document + compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ? + a.compareDocumentPosition( b ) : + + // Otherwise we know they are disconnected + 1; + + // Disconnected nodes + if ( compare & 1 || + (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) { + + // Choose the first element that is related to our preferred document + if ( a === doc || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) { + return -1; + } + if ( b === doc || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) { + return 1; + } + + // Maintain original order + return sortInput ? + ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) : + 0; + } + + return compare & 4 ? -1 : 1; + } : + function( a, b ) { + // Exit early if the nodes are identical + if ( a === b ) { + hasDuplicate = true; + return 0; + } + + var cur, + i = 0, + aup = a.parentNode, + bup = b.parentNode, + ap = [ a ], + bp = [ b ]; + + // Parentless nodes are either documents or disconnected + if ( !aup || !bup ) { + return a === doc ? -1 : + b === doc ? 1 : + aup ? -1 : + bup ? 1 : + sortInput ? + ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) : + 0; + + // If the nodes are siblings, we can do a quick check + } else if ( aup === bup ) { + return siblingCheck( a, b ); + } + + // Otherwise we need full lists of their ancestors for comparison + cur = a; + while ( (cur = cur.parentNode) ) { + ap.unshift( cur ); + } + cur = b; + while ( (cur = cur.parentNode) ) { + bp.unshift( cur ); + } + + // Walk down the tree looking for a discrepancy + while ( ap[i] === bp[i] ) { + i++; + } + + return i ? + // Do a sibling check if the nodes have a common ancestor + siblingCheck( ap[i], bp[i] ) : + + // Otherwise nodes in our document sort first + ap[i] === preferredDoc ? -1 : + bp[i] === preferredDoc ? 1 : + 0; + }; + + return doc; +}; + +Sizzle.matches = function( expr, elements ) { + return Sizzle( expr, null, null, elements ); +}; + +Sizzle.matchesSelector = function( elem, expr ) { + // Set document vars if needed + if ( ( elem.ownerDocument || elem ) !== document ) { + setDocument( elem ); + } + + // Make sure that attribute selectors are quoted + expr = expr.replace( rattributeQuotes, "='$1']" ); + + if ( support.matchesSelector && documentIsHTML && + ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) && + ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) { + + try { + var ret = matches.call( elem, expr ); + + // IE 9's matchesSelector returns false on disconnected nodes + if ( ret || support.disconnectedMatch || + // As well, disconnected nodes are said to be in a document + // fragment in IE 9 + elem.document && elem.document.nodeType !== 11 ) { + return ret; + } + } catch(e) {} + } + + return Sizzle( expr, document, null, [ elem ] ).length > 0; +}; + +Sizzle.contains = function( context, elem ) { + // Set document vars if needed + if ( ( context.ownerDocument || context ) !== document ) { + setDocument( context ); + } + return contains( context, elem ); +}; + +Sizzle.attr = function( elem, name ) { + // Set document vars if needed + if ( ( elem.ownerDocument || elem ) !== document ) { + setDocument( elem ); + } + + var fn = Expr.attrHandle[ name.toLowerCase() ], + // Don't get fooled by Object.prototype properties (jQuery #13807) + val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ? + fn( elem, name, !documentIsHTML ) : + undefined; + + return val !== undefined ? + val : + support.attributes || !documentIsHTML ? + elem.getAttribute( name ) : + (val = elem.getAttributeNode(name)) && val.specified ? + val.value : + null; +}; + +Sizzle.error = function( msg ) { + throw new Error( "Syntax error, unrecognized expression: " + msg ); +}; + +/** + * Document sorting and removing duplicates + * @param {ArrayLike} results + */ +Sizzle.uniqueSort = function( results ) { + var elem, + duplicates = [], + j = 0, + i = 0; + + // Unless we *know* we can detect duplicates, assume their presence + hasDuplicate = !support.detectDuplicates; + sortInput = !support.sortStable && results.slice( 0 ); + results.sort( sortOrder ); + + if ( hasDuplicate ) { + while ( (elem = results[i++]) ) { + if ( elem === results[ i ] ) { + j = duplicates.push( i ); + } + } + while ( j-- ) { + results.splice( duplicates[ j ], 1 ); + } + } + + // Clear input after sorting to release objects + // See https://github.com/jquery/sizzle/pull/225 + sortInput = null; + + return results; +}; + +/** + * Utility function for retrieving the text value of an array of DOM nodes + * @param {Array|Element} elem + */ +getText = Sizzle.getText = function( elem ) { + var node, + ret = "", + i = 0, + nodeType = elem.nodeType; + + if ( !nodeType ) { + // If no nodeType, this is expected to be an array + while ( (node = elem[i++]) ) { + // Do not traverse comment nodes + ret += getText( node ); + } + } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { + // Use textContent for elements + // innerText usage removed for consistency of new lines (jQuery #11153) + if ( typeof elem.textContent === "string" ) { + return elem.textContent; + } else { + // Traverse its children + for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { + ret += getText( elem ); + } + } + } else if ( nodeType === 3 || nodeType === 4 ) { + return elem.nodeValue; + } + // Do not include comment or processing instruction nodes + + return ret; +}; + +Expr = Sizzle.selectors = { + + // Can be adjusted by the user + cacheLength: 50, + + createPseudo: markFunction, + + match: matchExpr, + + attrHandle: {}, + + find: {}, + + relative: { + ">": { dir: "parentNode", first: true }, + " ": { dir: "parentNode" }, + "+": { dir: "previousSibling", first: true }, + "~": { dir: "previousSibling" } + }, + + preFilter: { + "ATTR": function( match ) { + match[1] = match[1].replace( runescape, funescape ); + + // Move the given value to match[3] whether quoted or unquoted + match[3] = ( match[3] || match[4] || match[5] || "" ).replace( runescape, funescape ); + + if ( match[2] === "~=" ) { + match[3] = " " + match[3] + " "; + } + + return match.slice( 0, 4 ); + }, + + "CHILD": function( match ) { + /* matches from matchExpr["CHILD"] + 1 type (only|nth|...) + 2 what (child|of-type) + 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) + 4 xn-component of xn+y argument ([+-]?\d*n|) + 5 sign of xn-component + 6 x of xn-component + 7 sign of y-component + 8 y of y-component + */ + match[1] = match[1].toLowerCase(); + + if ( match[1].slice( 0, 3 ) === "nth" ) { + // nth-* requires argument + if ( !match[3] ) { + Sizzle.error( match[0] ); + } + + // numeric x and y parameters for Expr.filter.CHILD + // remember that false/true cast respectively to 0/1 + match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) ); + match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" ); + + // other types prohibit arguments + } else if ( match[3] ) { + Sizzle.error( match[0] ); + } + + return match; + }, + + "PSEUDO": function( match ) { + var excess, + unquoted = !match[6] && match[2]; + + if ( matchExpr["CHILD"].test( match[0] ) ) { + return null; + } + + // Accept quoted arguments as-is + if ( match[3] ) { + match[2] = match[4] || match[5] || ""; + + // Strip excess characters from unquoted arguments + } else if ( unquoted && rpseudo.test( unquoted ) && + // Get excess from tokenize (recursively) + (excess = tokenize( unquoted, true )) && + // advance to the next closing parenthesis + (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) { + + // excess is a negative index + match[0] = match[0].slice( 0, excess ); + match[2] = unquoted.slice( 0, excess ); + } + + // Return only captures needed by the pseudo filter method (type and argument) + return match.slice( 0, 3 ); + } + }, + + filter: { + + "TAG": function( nodeNameSelector ) { + var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase(); + return nodeNameSelector === "*" ? + function() { return true; } : + function( elem ) { + return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; + }; + }, + + "CLASS": function( className ) { + var pattern = classCache[ className + " " ]; + + return pattern || + (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) && + classCache( className, function( elem ) { + return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== strundefined && elem.getAttribute("class") || "" ); + }); + }, + + "ATTR": function( name, operator, check ) { + return function( elem ) { + var result = Sizzle.attr( elem, name ); + + if ( result == null ) { + return operator === "!="; + } + if ( !operator ) { + return true; + } + + result += ""; + + return operator === "=" ? result === check : + operator === "!=" ? result !== check : + operator === "^=" ? check && result.indexOf( check ) === 0 : + operator === "*=" ? check && result.indexOf( check ) > -1 : + operator === "$=" ? check && result.slice( -check.length ) === check : + operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 : + operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : + false; + }; + }, + + "CHILD": function( type, what, argument, first, last ) { + var simple = type.slice( 0, 3 ) !== "nth", + forward = type.slice( -4 ) !== "last", + ofType = what === "of-type"; + + return first === 1 && last === 0 ? + + // Shortcut for :nth-*(n) + function( elem ) { + return !!elem.parentNode; + } : + + function( elem, context, xml ) { + var cache, outerCache, node, diff, nodeIndex, start, + dir = simple !== forward ? "nextSibling" : "previousSibling", + parent = elem.parentNode, + name = ofType && elem.nodeName.toLowerCase(), + useCache = !xml && !ofType; + + if ( parent ) { + + // :(first|last|only)-(child|of-type) + if ( simple ) { + while ( dir ) { + node = elem; + while ( (node = node[ dir ]) ) { + if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) { + return false; + } + } + // Reverse direction for :only-* (if we haven't yet done so) + start = dir = type === "only" && !start && "nextSibling"; + } + return true; + } + + start = [ forward ? parent.firstChild : parent.lastChild ]; + + // non-xml :nth-child(...) stores cache data on `parent` + if ( forward && useCache ) { + // Seek `elem` from a previously-cached index + outerCache = parent[ expando ] || (parent[ expando ] = {}); + cache = outerCache[ type ] || []; + nodeIndex = cache[0] === dirruns && cache[1]; + diff = cache[0] === dirruns && cache[2]; + node = nodeIndex && parent.childNodes[ nodeIndex ]; + + while ( (node = ++nodeIndex && node && node[ dir ] || + + // Fallback to seeking `elem` from the start + (diff = nodeIndex = 0) || start.pop()) ) { + + // When found, cache indexes on `parent` and break + if ( node.nodeType === 1 && ++diff && node === elem ) { + outerCache[ type ] = [ dirruns, nodeIndex, diff ]; + break; + } + } + + // Use previously-cached element index if available + } else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) { + diff = cache[1]; + + // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...) + } else { + // Use the same loop as above to seek `elem` from the start + while ( (node = ++nodeIndex && node && node[ dir ] || + (diff = nodeIndex = 0) || start.pop()) ) { + + if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) { + // Cache the index of each encountered element + if ( useCache ) { + (node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ]; + } + + if ( node === elem ) { + break; + } + } + } + } + + // Incorporate the offset, then check against cycle size + diff -= last; + return diff === first || ( diff % first === 0 && diff / first >= 0 ); + } + }; + }, + + "PSEUDO": function( pseudo, argument ) { + // pseudo-class names are case-insensitive + // http://www.w3.org/TR/selectors/#pseudo-classes + // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters + // Remember that setFilters inherits from pseudos + var args, + fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || + Sizzle.error( "unsupported pseudo: " + pseudo ); + + // The user may use createPseudo to indicate that + // arguments are needed to create the filter function + // just as Sizzle does + if ( fn[ expando ] ) { + return fn( argument ); + } + + // But maintain support for old signatures + if ( fn.length > 1 ) { + args = [ pseudo, pseudo, "", argument ]; + return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? + markFunction(function( seed, matches ) { + var idx, + matched = fn( seed, argument ), + i = matched.length; + while ( i-- ) { + idx = indexOf.call( seed, matched[i] ); + seed[ idx ] = !( matches[ idx ] = matched[i] ); + } + }) : + function( elem ) { + return fn( elem, 0, args ); + }; + } + + return fn; + } + }, + + pseudos: { + // Potentially complex pseudos + "not": markFunction(function( selector ) { + // Trim the selector passed to compile + // to avoid treating leading and trailing + // spaces as combinators + var input = [], + results = [], + matcher = compile( selector.replace( rtrim, "$1" ) ); + + return matcher[ expando ] ? + markFunction(function( seed, matches, context, xml ) { + var elem, + unmatched = matcher( seed, null, xml, [] ), + i = seed.length; + + // Match elements unmatched by `matcher` + while ( i-- ) { + if ( (elem = unmatched[i]) ) { + seed[i] = !(matches[i] = elem); + } + } + }) : + function( elem, context, xml ) { + input[0] = elem; + matcher( input, null, xml, results ); + return !results.pop(); + }; + }), + + "has": markFunction(function( selector ) { + return function( elem ) { + return Sizzle( selector, elem ).length > 0; + }; + }), + + "contains": markFunction(function( text ) { + return function( elem ) { + return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1; + }; + }), + + // "Whether an element is represented by a :lang() selector + // is based solely on the element's language value + // being equal to the identifier C, + // or beginning with the identifier C immediately followed by "-". + // The matching of C against the element's language value is performed case-insensitively. + // The identifier C does not have to be a valid language name." + // http://www.w3.org/TR/selectors/#lang-pseudo + "lang": markFunction( function( lang ) { + // lang value must be a valid identifier + if ( !ridentifier.test(lang || "") ) { + Sizzle.error( "unsupported lang: " + lang ); + } + lang = lang.replace( runescape, funescape ).toLowerCase(); + return function( elem ) { + var elemLang; + do { + if ( (elemLang = documentIsHTML ? + elem.lang : + elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) { + + elemLang = elemLang.toLowerCase(); + return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; + } + } while ( (elem = elem.parentNode) && elem.nodeType === 1 ); + return false; + }; + }), + + // Miscellaneous + "target": function( elem ) { + var hash = window.location && window.location.hash; + return hash && hash.slice( 1 ) === elem.id; + }, + + "root": function( elem ) { + return elem === docElem; + }, + + "focus": function( elem ) { + return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex); + }, + + // Boolean properties + "enabled": function( elem ) { + return elem.disabled === false; + }, + + "disabled": function( elem ) { + return elem.disabled === true; + }, + + "checked": function( elem ) { + // In CSS3, :checked should return both checked and selected elements + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked + var nodeName = elem.nodeName.toLowerCase(); + return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); + }, + + "selected": function( elem ) { + // Accessing this property makes selected-by-default + // options in Safari work properly + if ( elem.parentNode ) { + elem.parentNode.selectedIndex; + } + + return elem.selected === true; + }, + + // Contents + "empty": function( elem ) { + // http://www.w3.org/TR/selectors/#empty-pseudo + // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5), + // but not by others (comment: 8; processing instruction: 7; etc.) + // nodeType < 6 works because attributes (2) do not appear as children + for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { + if ( elem.nodeType < 6 ) { + return false; + } + } + return true; + }, + + "parent": function( elem ) { + return !Expr.pseudos["empty"]( elem ); + }, + + // Element/input types + "header": function( elem ) { + return rheader.test( elem.nodeName ); + }, + + "input": function( elem ) { + return rinputs.test( elem.nodeName ); + }, + + "button": function( elem ) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && elem.type === "button" || name === "button"; + }, + + "text": function( elem ) { + var attr; + return elem.nodeName.toLowerCase() === "input" && + elem.type === "text" && + + // Support: IE<8 + // New HTML5 attribute values (e.g., "search") appear with elem.type === "text" + ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" ); + }, + + // Position-in-collection + "first": createPositionalPseudo(function() { + return [ 0 ]; + }), + + "last": createPositionalPseudo(function( matchIndexes, length ) { + return [ length - 1 ]; + }), + + "eq": createPositionalPseudo(function( matchIndexes, length, argument ) { + return [ argument < 0 ? argument + length : argument ]; + }), + + "even": createPositionalPseudo(function( matchIndexes, length ) { + var i = 0; + for ( ; i < length; i += 2 ) { + matchIndexes.push( i ); + } + return matchIndexes; + }), + + "odd": createPositionalPseudo(function( matchIndexes, length ) { + var i = 1; + for ( ; i < length; i += 2 ) { + matchIndexes.push( i ); + } + return matchIndexes; + }), + + "lt": createPositionalPseudo(function( matchIndexes, length, argument ) { + var i = argument < 0 ? argument + length : argument; + for ( ; --i >= 0; ) { + matchIndexes.push( i ); + } + return matchIndexes; + }), + + "gt": createPositionalPseudo(function( matchIndexes, length, argument ) { + var i = argument < 0 ? argument + length : argument; + for ( ; ++i < length; ) { + matchIndexes.push( i ); + } + return matchIndexes; + }) + } +}; + +Expr.pseudos["nth"] = Expr.pseudos["eq"]; + +// Add button/input type pseudos +for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { + Expr.pseudos[ i ] = createInputPseudo( i ); +} +for ( i in { submit: true, reset: true } ) { + Expr.pseudos[ i ] = createButtonPseudo( i ); +} + +// Easy API for creating new setFilters +function setFilters() {} +setFilters.prototype = Expr.filters = Expr.pseudos; +Expr.setFilters = new setFilters(); + +tokenize = Sizzle.tokenize = function( selector, parseOnly ) { + var matched, match, tokens, type, + soFar, groups, preFilters, + cached = tokenCache[ selector + " " ]; + + if ( cached ) { + return parseOnly ? 0 : cached.slice( 0 ); + } + + soFar = selector; + groups = []; + preFilters = Expr.preFilter; + + while ( soFar ) { + + // Comma and first run + if ( !matched || (match = rcomma.exec( soFar )) ) { + if ( match ) { + // Don't consume trailing commas as valid + soFar = soFar.slice( match[0].length ) || soFar; + } + groups.push( (tokens = []) ); + } + + matched = false; + + // Combinators + if ( (match = rcombinators.exec( soFar )) ) { + matched = match.shift(); + tokens.push({ + value: matched, + // Cast descendant combinators to space + type: match[0].replace( rtrim, " " ) + }); + soFar = soFar.slice( matched.length ); + } + + // Filters + for ( type in Expr.filter ) { + if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] || + (match = preFilters[ type ]( match ))) ) { + matched = match.shift(); + tokens.push({ + value: matched, + type: type, + matches: match + }); + soFar = soFar.slice( matched.length ); + } + } + + if ( !matched ) { + break; + } + } + + // Return the length of the invalid excess + // if we're just parsing + // Otherwise, throw an error or return tokens + return parseOnly ? + soFar.length : + soFar ? + Sizzle.error( selector ) : + // Cache the tokens + tokenCache( selector, groups ).slice( 0 ); +}; + +function toSelector( tokens ) { + var i = 0, + len = tokens.length, + selector = ""; + for ( ; i < len; i++ ) { + selector += tokens[i].value; + } + return selector; +} + +function addCombinator( matcher, combinator, base ) { + var dir = combinator.dir, + checkNonElements = base && dir === "parentNode", + doneName = done++; + + return combinator.first ? + // Check against closest ancestor/preceding element + function( elem, context, xml ) { + while ( (elem = elem[ dir ]) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + return matcher( elem, context, xml ); + } + } + } : + + // Check against all ancestor/preceding elements + function( elem, context, xml ) { + var oldCache, outerCache, + newCache = [ dirruns, doneName ]; + + // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching + if ( xml ) { + while ( (elem = elem[ dir ]) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + if ( matcher( elem, context, xml ) ) { + return true; + } + } + } + } else { + while ( (elem = elem[ dir ]) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + outerCache = elem[ expando ] || (elem[ expando ] = {}); + if ( (oldCache = outerCache[ dir ]) && + oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) { + + // Assign to newCache so results back-propagate to previous elements + return (newCache[ 2 ] = oldCache[ 2 ]); + } else { + // Reuse newcache so results back-propagate to previous elements + outerCache[ dir ] = newCache; + + // A match means we're done; a fail means we have to keep checking + if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) { + return true; + } + } + } + } + } + }; +} + +function elementMatcher( matchers ) { + return matchers.length > 1 ? + function( elem, context, xml ) { + var i = matchers.length; + while ( i-- ) { + if ( !matchers[i]( elem, context, xml ) ) { + return false; + } + } + return true; + } : + matchers[0]; +} + +function multipleContexts( selector, contexts, results ) { + var i = 0, + len = contexts.length; + for ( ; i < len; i++ ) { + Sizzle( selector, contexts[i], results ); + } + return results; +} + +function condense( unmatched, map, filter, context, xml ) { + var elem, + newUnmatched = [], + i = 0, + len = unmatched.length, + mapped = map != null; + + for ( ; i < len; i++ ) { + if ( (elem = unmatched[i]) ) { + if ( !filter || filter( elem, context, xml ) ) { + newUnmatched.push( elem ); + if ( mapped ) { + map.push( i ); + } + } + } + } + + return newUnmatched; +} + +function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { + if ( postFilter && !postFilter[ expando ] ) { + postFilter = setMatcher( postFilter ); + } + if ( postFinder && !postFinder[ expando ] ) { + postFinder = setMatcher( postFinder, postSelector ); + } + return markFunction(function( seed, results, context, xml ) { + var temp, i, elem, + preMap = [], + postMap = [], + preexisting = results.length, + + // Get initial elements from seed or context + elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ), + + // Prefilter to get matcher input, preserving a map for seed-results synchronization + matcherIn = preFilter && ( seed || !selector ) ? + condense( elems, preMap, preFilter, context, xml ) : + elems, + + matcherOut = matcher ? + // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, + postFinder || ( seed ? preFilter : preexisting || postFilter ) ? + + // ...intermediate processing is necessary + [] : + + // ...otherwise use results directly + results : + matcherIn; + + // Find primary matches + if ( matcher ) { + matcher( matcherIn, matcherOut, context, xml ); + } + + // Apply postFilter + if ( postFilter ) { + temp = condense( matcherOut, postMap ); + postFilter( temp, [], context, xml ); + + // Un-match failing elements by moving them back to matcherIn + i = temp.length; + while ( i-- ) { + if ( (elem = temp[i]) ) { + matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem); + } + } + } + + if ( seed ) { + if ( postFinder || preFilter ) { + if ( postFinder ) { + // Get the final matcherOut by condensing this intermediate into postFinder contexts + temp = []; + i = matcherOut.length; + while ( i-- ) { + if ( (elem = matcherOut[i]) ) { + // Restore matcherIn since elem is not yet a final match + temp.push( (matcherIn[i] = elem) ); + } + } + postFinder( null, (matcherOut = []), temp, xml ); + } + + // Move matched elements from seed to results to keep them synchronized + i = matcherOut.length; + while ( i-- ) { + if ( (elem = matcherOut[i]) && + (temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) { + + seed[temp] = !(results[temp] = elem); + } + } + } + + // Add elements to results, through postFinder if defined + } else { + matcherOut = condense( + matcherOut === results ? + matcherOut.splice( preexisting, matcherOut.length ) : + matcherOut + ); + if ( postFinder ) { + postFinder( null, results, matcherOut, xml ); + } else { + push.apply( results, matcherOut ); + } + } + }); +} + +function matcherFromTokens( tokens ) { + var checkContext, matcher, j, + len = tokens.length, + leadingRelative = Expr.relative[ tokens[0].type ], + implicitRelative = leadingRelative || Expr.relative[" "], + i = leadingRelative ? 1 : 0, + + // The foundational matcher ensures that elements are reachable from top-level context(s) + matchContext = addCombinator( function( elem ) { + return elem === checkContext; + }, implicitRelative, true ), + matchAnyContext = addCombinator( function( elem ) { + return indexOf.call( checkContext, elem ) > -1; + }, implicitRelative, true ), + matchers = [ function( elem, context, xml ) { + return ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( + (checkContext = context).nodeType ? + matchContext( elem, context, xml ) : + matchAnyContext( elem, context, xml ) ); + } ]; + + for ( ; i < len; i++ ) { + if ( (matcher = Expr.relative[ tokens[i].type ]) ) { + matchers = [ addCombinator(elementMatcher( matchers ), matcher) ]; + } else { + matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches ); + + // Return special upon seeing a positional matcher + if ( matcher[ expando ] ) { + // Find the next relative operator (if any) for proper handling + j = ++i; + for ( ; j < len; j++ ) { + if ( Expr.relative[ tokens[j].type ] ) { + break; + } + } + return setMatcher( + i > 1 && elementMatcher( matchers ), + i > 1 && toSelector( + // If the preceding token was a descendant combinator, insert an implicit any-element `*` + tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" }) + ).replace( rtrim, "$1" ), + matcher, + i < j && matcherFromTokens( tokens.slice( i, j ) ), + j < len && matcherFromTokens( (tokens = tokens.slice( j )) ), + j < len && toSelector( tokens ) + ); + } + matchers.push( matcher ); + } + } + + return elementMatcher( matchers ); +} + +function matcherFromGroupMatchers( elementMatchers, setMatchers ) { + var bySet = setMatchers.length > 0, + byElement = elementMatchers.length > 0, + superMatcher = function( seed, context, xml, results, outermost ) { + var elem, j, matcher, + matchedCount = 0, + i = "0", + unmatched = seed && [], + setMatched = [], + contextBackup = outermostContext, + // We must always have either seed elements or outermost context + elems = seed || byElement && Expr.find["TAG"]( "*", outermost ), + // Use integer dirruns iff this is the outermost matcher + dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1), + len = elems.length; + + if ( outermost ) { + outermostContext = context !== document && context; + } + + // Add elements passing elementMatchers directly to results + // Keep `i` a string if there are no elements so `matchedCount` will be "00" below + // Support: IE<9, Safari + // Tolerate NodeList properties (IE: "length"; Safari: ) matching elements by id + for ( ; i !== len && (elem = elems[i]) != null; i++ ) { + if ( byElement && elem ) { + j = 0; + while ( (matcher = elementMatchers[j++]) ) { + if ( matcher( elem, context, xml ) ) { + results.push( elem ); + break; + } + } + if ( outermost ) { + dirruns = dirrunsUnique; + } + } + + // Track unmatched elements for set filters + if ( bySet ) { + // They will have gone through all possible matchers + if ( (elem = !matcher && elem) ) { + matchedCount--; + } + + // Lengthen the array for every element, matched or not + if ( seed ) { + unmatched.push( elem ); + } + } + } + + // Apply set filters to unmatched elements + matchedCount += i; + if ( bySet && i !== matchedCount ) { + j = 0; + while ( (matcher = setMatchers[j++]) ) { + matcher( unmatched, setMatched, context, xml ); + } + + if ( seed ) { + // Reintegrate element matches to eliminate the need for sorting + if ( matchedCount > 0 ) { + while ( i-- ) { + if ( !(unmatched[i] || setMatched[i]) ) { + setMatched[i] = pop.call( results ); + } + } + } + + // Discard index placeholder values to get only actual matches + setMatched = condense( setMatched ); + } + + // Add matches to results + push.apply( results, setMatched ); + + // Seedless set matches succeeding multiple successful matchers stipulate sorting + if ( outermost && !seed && setMatched.length > 0 && + ( matchedCount + setMatchers.length ) > 1 ) { + + Sizzle.uniqueSort( results ); + } + } + + // Override manipulation of globals by nested matchers + if ( outermost ) { + dirruns = dirrunsUnique; + outermostContext = contextBackup; + } + + return unmatched; + }; + + return bySet ? + markFunction( superMatcher ) : + superMatcher; +} + +compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) { + var i, + setMatchers = [], + elementMatchers = [], + cached = compilerCache[ selector + " " ]; + + if ( !cached ) { + // Generate a function of recursive functions that can be used to check each element + if ( !match ) { + match = tokenize( selector ); + } + i = match.length; + while ( i-- ) { + cached = matcherFromTokens( match[i] ); + if ( cached[ expando ] ) { + setMatchers.push( cached ); + } else { + elementMatchers.push( cached ); + } + } + + // Cache the compiled function + cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) ); + + // Save selector and tokenization + cached.selector = selector; + } + return cached; +}; + +/** + * A low-level selection function that works with Sizzle's compiled + * selector functions + * @param {String|Function} selector A selector or a pre-compiled + * selector function built with Sizzle.compile + * @param {Element} context + * @param {Array} [results] + * @param {Array} [seed] A set of elements to match against + */ +select = Sizzle.select = function( selector, context, results, seed ) { + var i, tokens, token, type, find, + compiled = typeof selector === "function" && selector, + match = !seed && tokenize( (selector = compiled.selector || selector) ); + + results = results || []; + + // Try to minimize operations if there is no seed and only one group + if ( match.length === 1 ) { + + // Take a shortcut and set the context if the root selector is an ID + tokens = match[0] = match[0].slice( 0 ); + if ( tokens.length > 2 && (token = tokens[0]).type === "ID" && + support.getById && context.nodeType === 9 && documentIsHTML && + Expr.relative[ tokens[1].type ] ) { + + context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0]; + if ( !context ) { + return results; + + // Precompiled matchers will still verify ancestry, so step up a level + } else if ( compiled ) { + context = context.parentNode; + } + + selector = selector.slice( tokens.shift().value.length ); + } + + // Fetch a seed set for right-to-left matching + i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length; + while ( i-- ) { + token = tokens[i]; + + // Abort if we hit a combinator + if ( Expr.relative[ (type = token.type) ] ) { + break; + } + if ( (find = Expr.find[ type ]) ) { + // Search, expanding context for leading sibling combinators + if ( (seed = find( + token.matches[0].replace( runescape, funescape ), + rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context + )) ) { + + // If seed is empty or no tokens remain, we can return early + tokens.splice( i, 1 ); + selector = seed.length && toSelector( tokens ); + if ( !selector ) { + push.apply( results, seed ); + return results; + } + + break; + } + } + } + } + + // Compile and execute a filtering function if one is not provided + // Provide `match` to avoid retokenization if we modified the selector above + ( compiled || compile( selector, match ) )( + seed, + context, + !documentIsHTML, + results, + rsibling.test( selector ) && testContext( context.parentNode ) || context + ); + return results; +}; + +// One-time assignments + +// Sort stability +support.sortStable = expando.split("").sort( sortOrder ).join("") === expando; + +// Support: Chrome<14 +// Always assume duplicates if they aren't passed to the comparison function +support.detectDuplicates = !!hasDuplicate; + +// Initialize against the default document +setDocument(); + +// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) +// Detached nodes confoundingly follow *each other* +support.sortDetached = assert(function( div1 ) { + // Should return 1, but returns 4 (following) + return div1.compareDocumentPosition( document.createElement("div") ) & 1; +}); + +// Support: IE<8 +// Prevent attribute/property "interpolation" +// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx +if ( !assert(function( div ) { + div.innerHTML = ""; + return div.firstChild.getAttribute("href") === "#" ; +}) ) { + addHandle( "type|href|height|width", function( elem, name, isXML ) { + if ( !isXML ) { + return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 ); + } + }); +} + +// Support: IE<9 +// Use defaultValue in place of getAttribute("value") +if ( !support.attributes || !assert(function( div ) { + div.innerHTML = ""; + div.firstChild.setAttribute( "value", "" ); + return div.firstChild.getAttribute( "value" ) === ""; +}) ) { + addHandle( "value", function( elem, name, isXML ) { + if ( !isXML && elem.nodeName.toLowerCase() === "input" ) { + return elem.defaultValue; + } + }); +} + +// Support: IE<9 +// Use getAttributeNode to fetch booleans when getAttribute lies +if ( !assert(function( div ) { + return div.getAttribute("disabled") == null; +}) ) { + addHandle( booleans, function( elem, name, isXML ) { + var val; + if ( !isXML ) { + return elem[ name ] === true ? name.toLowerCase() : + (val = elem.getAttributeNode( name )) && val.specified ? + val.value : + null; + } + }); +} + +return Sizzle; + +})( window ); + + + +jQuery.find = Sizzle; +jQuery.expr = Sizzle.selectors; +jQuery.expr[":"] = jQuery.expr.pseudos; +jQuery.unique = Sizzle.uniqueSort; +jQuery.text = Sizzle.getText; +jQuery.isXMLDoc = Sizzle.isXML; +jQuery.contains = Sizzle.contains; + + + +var rneedsContext = jQuery.expr.match.needsContext; + +var rsingleTag = (/^<(\w+)\s*\/?>(?:<\/\1>|)$/); + + + +var risSimple = /^.[^:#\[\.,]*$/; + +// Implement the identical functionality for filter and not +function winnow( elements, qualifier, not ) { + if ( jQuery.isFunction( qualifier ) ) { + return jQuery.grep( elements, function( elem, i ) { + /* jshint -W018 */ + return !!qualifier.call( elem, i, elem ) !== not; + }); + + } + + if ( qualifier.nodeType ) { + return jQuery.grep( elements, function( elem ) { + return ( elem === qualifier ) !== not; + }); + + } + + if ( typeof qualifier === "string" ) { + if ( risSimple.test( qualifier ) ) { + return jQuery.filter( qualifier, elements, not ); + } + + qualifier = jQuery.filter( qualifier, elements ); + } + + return jQuery.grep( elements, function( elem ) { + return ( jQuery.inArray( elem, qualifier ) >= 0 ) !== not; + }); +} + +jQuery.filter = function( expr, elems, not ) { + var elem = elems[ 0 ]; + + if ( not ) { + expr = ":not(" + expr + ")"; + } + + return elems.length === 1 && elem.nodeType === 1 ? + jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] : + jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) { + return elem.nodeType === 1; + })); +}; + +jQuery.fn.extend({ + find: function( selector ) { + var i, + ret = [], + self = this, + len = self.length; + + if ( typeof selector !== "string" ) { + return this.pushStack( jQuery( selector ).filter(function() { + for ( i = 0; i < len; i++ ) { + if ( jQuery.contains( self[ i ], this ) ) { + return true; + } + } + }) ); + } + + for ( i = 0; i < len; i++ ) { + jQuery.find( selector, self[ i ], ret ); + } + + // Needed because $( selector, context ) becomes $( context ).find( selector ) + ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret ); + ret.selector = this.selector ? this.selector + " " + selector : selector; + return ret; + }, + filter: function( selector ) { + return this.pushStack( winnow(this, selector || [], false) ); + }, + not: function( selector ) { + return this.pushStack( winnow(this, selector || [], true) ); + }, + is: function( selector ) { + return !!winnow( + this, + + // If this is a positional/relative selector, check membership in the returned set + // so $("p:first").is("p:last") won't return true for a doc with two "p". + typeof selector === "string" && rneedsContext.test( selector ) ? + jQuery( selector ) : + selector || [], + false + ).length; + } +}); + + +// Initialize a jQuery object + + +// A central reference to the root jQuery(document) +var rootjQuery, + + // Use the correct document accordingly with window argument (sandbox) + document = window.document, + + // A simple way to check for HTML strings + // Prioritize #id over to avoid XSS via location.hash (#9521) + // Strict HTML recognition (#11290: must start with <) + rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/, + + init = jQuery.fn.init = function( selector, context ) { + var match, elem; + + // HANDLE: $(""), $(null), $(undefined), $(false) + if ( !selector ) { + return this; + } + + // Handle HTML strings + if ( typeof selector === "string" ) { + if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) { + // Assume that strings that start and end with <> are HTML and skip the regex check + match = [ null, selector, null ]; + + } else { + match = rquickExpr.exec( selector ); + } + + // Match html or make sure no context is specified for #id + if ( match && (match[1] || !context) ) { + + // HANDLE: $(html) -> $(array) + if ( match[1] ) { + context = context instanceof jQuery ? context[0] : context; + + // scripts is true for back-compat + // Intentionally let the error be thrown if parseHTML is not present + jQuery.merge( this, jQuery.parseHTML( + match[1], + context && context.nodeType ? context.ownerDocument || context : document, + true + ) ); + + // HANDLE: $(html, props) + if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) { + for ( match in context ) { + // Properties of context are called as methods if possible + if ( jQuery.isFunction( this[ match ] ) ) { + this[ match ]( context[ match ] ); + + // ...and otherwise set as attributes + } else { + this.attr( match, context[ match ] ); + } + } + } + + return this; + + // HANDLE: $(#id) + } else { + elem = document.getElementById( match[2] ); + + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + if ( elem && elem.parentNode ) { + // Handle the case where IE and Opera return items + // by name instead of ID + if ( elem.id !== match[2] ) { + return rootjQuery.find( selector ); + } + + // Otherwise, we inject the element directly into the jQuery object + this.length = 1; + this[0] = elem; + } + + this.context = document; + this.selector = selector; + return this; + } + + // HANDLE: $(expr, $(...)) + } else if ( !context || context.jquery ) { + return ( context || rootjQuery ).find( selector ); + + // HANDLE: $(expr, context) + // (which is just equivalent to: $(context).find(expr) + } else { + return this.constructor( context ).find( selector ); + } + + // HANDLE: $(DOMElement) + } else if ( selector.nodeType ) { + this.context = this[0] = selector; + this.length = 1; + return this; + + // HANDLE: $(function) + // Shortcut for document ready + } else if ( jQuery.isFunction( selector ) ) { + return typeof rootjQuery.ready !== "undefined" ? + rootjQuery.ready( selector ) : + // Execute immediately if ready is not present + selector( jQuery ); + } + + if ( selector.selector !== undefined ) { + this.selector = selector.selector; + this.context = selector.context; + } + + return jQuery.makeArray( selector, this ); + }; + +// Give the init function the jQuery prototype for later instantiation +init.prototype = jQuery.fn; + +// Initialize central reference +rootjQuery = jQuery( document ); + + +var rparentsprev = /^(?:parents|prev(?:Until|All))/, + // methods guaranteed to produce a unique set when starting from a unique set + guaranteedUnique = { + children: true, + contents: true, + next: true, + prev: true + }; + +jQuery.extend({ + dir: function( elem, dir, until ) { + var matched = [], + cur = elem[ dir ]; + + while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) { + if ( cur.nodeType === 1 ) { + matched.push( cur ); + } + cur = cur[dir]; + } + return matched; + }, + + sibling: function( n, elem ) { + var r = []; + + for ( ; n; n = n.nextSibling ) { + if ( n.nodeType === 1 && n !== elem ) { + r.push( n ); + } + } + + return r; + } +}); + +jQuery.fn.extend({ + has: function( target ) { + var i, + targets = jQuery( target, this ), + len = targets.length; + + return this.filter(function() { + for ( i = 0; i < len; i++ ) { + if ( jQuery.contains( this, targets[i] ) ) { + return true; + } + } + }); + }, + + closest: function( selectors, context ) { + var cur, + i = 0, + l = this.length, + matched = [], + pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ? + jQuery( selectors, context || this.context ) : + 0; + + for ( ; i < l; i++ ) { + for ( cur = this[i]; cur && cur !== context; cur = cur.parentNode ) { + // Always skip document fragments + if ( cur.nodeType < 11 && (pos ? + pos.index(cur) > -1 : + + // Don't pass non-elements to Sizzle + cur.nodeType === 1 && + jQuery.find.matchesSelector(cur, selectors)) ) { + + matched.push( cur ); + break; + } + } + } + + return this.pushStack( matched.length > 1 ? jQuery.unique( matched ) : matched ); + }, + + // Determine the position of an element within + // the matched set of elements + index: function( elem ) { + + // No argument, return index in parent + if ( !elem ) { + return ( this[0] && this[0].parentNode ) ? this.first().prevAll().length : -1; + } + + // index in selector + if ( typeof elem === "string" ) { + return jQuery.inArray( this[0], jQuery( elem ) ); + } + + // Locate the position of the desired element + return jQuery.inArray( + // If it receives a jQuery object, the first element is used + elem.jquery ? elem[0] : elem, this ); + }, + + add: function( selector, context ) { + return this.pushStack( + jQuery.unique( + jQuery.merge( this.get(), jQuery( selector, context ) ) + ) + ); + }, + + addBack: function( selector ) { + return this.add( selector == null ? + this.prevObject : this.prevObject.filter(selector) + ); + } +}); + +function sibling( cur, dir ) { + do { + cur = cur[ dir ]; + } while ( cur && cur.nodeType !== 1 ); + + return cur; +} + +jQuery.each({ + parent: function( elem ) { + var parent = elem.parentNode; + return parent && parent.nodeType !== 11 ? parent : null; + }, + parents: function( elem ) { + return jQuery.dir( elem, "parentNode" ); + }, + parentsUntil: function( elem, i, until ) { + return jQuery.dir( elem, "parentNode", until ); + }, + next: function( elem ) { + return sibling( elem, "nextSibling" ); + }, + prev: function( elem ) { + return sibling( elem, "previousSibling" ); + }, + nextAll: function( elem ) { + return jQuery.dir( elem, "nextSibling" ); + }, + prevAll: function( elem ) { + return jQuery.dir( elem, "previousSibling" ); + }, + nextUntil: function( elem, i, until ) { + return jQuery.dir( elem, "nextSibling", until ); + }, + prevUntil: function( elem, i, until ) { + return jQuery.dir( elem, "previousSibling", until ); + }, + siblings: function( elem ) { + return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem ); + }, + children: function( elem ) { + return jQuery.sibling( elem.firstChild ); + }, + contents: function( elem ) { + return jQuery.nodeName( elem, "iframe" ) ? + elem.contentDocument || elem.contentWindow.document : + jQuery.merge( [], elem.childNodes ); + } +}, function( name, fn ) { + jQuery.fn[ name ] = function( until, selector ) { + var ret = jQuery.map( this, fn, until ); + + if ( name.slice( -5 ) !== "Until" ) { + selector = until; + } + + if ( selector && typeof selector === "string" ) { + ret = jQuery.filter( selector, ret ); + } + + if ( this.length > 1 ) { + // Remove duplicates + if ( !guaranteedUnique[ name ] ) { + ret = jQuery.unique( ret ); + } + + // Reverse order for parents* and prev-derivatives + if ( rparentsprev.test( name ) ) { + ret = ret.reverse(); + } + } + + return this.pushStack( ret ); + }; +}); +var rnotwhite = (/\S+/g); + + + +// String to Object options format cache +var optionsCache = {}; + +// Convert String-formatted options into Object-formatted ones and store in cache +function createOptions( options ) { + var object = optionsCache[ options ] = {}; + jQuery.each( options.match( rnotwhite ) || [], function( _, flag ) { + object[ flag ] = true; + }); + return object; +} + +/* + * Create a callback list using the following parameters: + * + * options: an optional list of space-separated options that will change how + * the callback list behaves or a more traditional option object + * + * By default a callback list will act like an event callback list and can be + * "fired" multiple times. + * + * Possible options: + * + * once: will ensure the callback list can only be fired once (like a Deferred) + * + * memory: will keep track of previous values and will call any callback added + * after the list has been fired right away with the latest "memorized" + * values (like a Deferred) + * + * unique: will ensure a callback can only be added once (no duplicate in the list) + * + * stopOnFalse: interrupt callings when a callback returns false + * + */ +jQuery.Callbacks = function( options ) { + + // Convert options from String-formatted to Object-formatted if needed + // (we check in cache first) + options = typeof options === "string" ? + ( optionsCache[ options ] || createOptions( options ) ) : + jQuery.extend( {}, options ); + + var // Flag to know if list is currently firing + firing, + // Last fire value (for non-forgettable lists) + memory, + // Flag to know if list was already fired + fired, + // End of the loop when firing + firingLength, + // Index of currently firing callback (modified by remove if needed) + firingIndex, + // First callback to fire (used internally by add and fireWith) + firingStart, + // Actual callback list + list = [], + // Stack of fire calls for repeatable lists + stack = !options.once && [], + // Fire callbacks + fire = function( data ) { + memory = options.memory && data; + fired = true; + firingIndex = firingStart || 0; + firingStart = 0; + firingLength = list.length; + firing = true; + for ( ; list && firingIndex < firingLength; firingIndex++ ) { + if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) { + memory = false; // To prevent further calls using add + break; + } + } + firing = false; + if ( list ) { + if ( stack ) { + if ( stack.length ) { + fire( stack.shift() ); + } + } else if ( memory ) { + list = []; + } else { + self.disable(); + } + } + }, + // Actual Callbacks object + self = { + // Add a callback or a collection of callbacks to the list + add: function() { + if ( list ) { + // First, we save the current length + var start = list.length; + (function add( args ) { + jQuery.each( args, function( _, arg ) { + var type = jQuery.type( arg ); + if ( type === "function" ) { + if ( !options.unique || !self.has( arg ) ) { + list.push( arg ); + } + } else if ( arg && arg.length && type !== "string" ) { + // Inspect recursively + add( arg ); + } + }); + })( arguments ); + // Do we need to add the callbacks to the + // current firing batch? + if ( firing ) { + firingLength = list.length; + // With memory, if we're not firing then + // we should call right away + } else if ( memory ) { + firingStart = start; + fire( memory ); + } + } + return this; + }, + // Remove a callback from the list + remove: function() { + if ( list ) { + jQuery.each( arguments, function( _, arg ) { + var index; + while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { + list.splice( index, 1 ); + // Handle firing indexes + if ( firing ) { + if ( index <= firingLength ) { + firingLength--; + } + if ( index <= firingIndex ) { + firingIndex--; + } + } + } + }); + } + return this; + }, + // Check if a given callback is in the list. + // If no argument is given, return whether or not list has callbacks attached. + has: function( fn ) { + return fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length ); + }, + // Remove all callbacks from the list + empty: function() { + list = []; + firingLength = 0; + return this; + }, + // Have the list do nothing anymore + disable: function() { + list = stack = memory = undefined; + return this; + }, + // Is it disabled? + disabled: function() { + return !list; + }, + // Lock the list in its current state + lock: function() { + stack = undefined; + if ( !memory ) { + self.disable(); + } + return this; + }, + // Is it locked? + locked: function() { + return !stack; + }, + // Call all callbacks with the given context and arguments + fireWith: function( context, args ) { + if ( list && ( !fired || stack ) ) { + args = args || []; + args = [ context, args.slice ? args.slice() : args ]; + if ( firing ) { + stack.push( args ); + } else { + fire( args ); + } + } + return this; + }, + // Call all the callbacks with the given arguments + fire: function() { + self.fireWith( this, arguments ); + return this; + }, + // To know if the callbacks have already been called at least once + fired: function() { + return !!fired; + } + }; + + return self; +}; + + +jQuery.extend({ + + Deferred: function( func ) { + var tuples = [ + // action, add listener, listener list, final state + [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ], + [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ], + [ "notify", "progress", jQuery.Callbacks("memory") ] + ], + state = "pending", + promise = { + state: function() { + return state; + }, + always: function() { + deferred.done( arguments ).fail( arguments ); + return this; + }, + then: function( /* fnDone, fnFail, fnProgress */ ) { + var fns = arguments; + return jQuery.Deferred(function( newDefer ) { + jQuery.each( tuples, function( i, tuple ) { + var fn = jQuery.isFunction( fns[ i ] ) && fns[ i ]; + // deferred[ done | fail | progress ] for forwarding actions to newDefer + deferred[ tuple[1] ](function() { + var returned = fn && fn.apply( this, arguments ); + if ( returned && jQuery.isFunction( returned.promise ) ) { + returned.promise() + .done( newDefer.resolve ) + .fail( newDefer.reject ) + .progress( newDefer.notify ); + } else { + newDefer[ tuple[ 0 ] + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments ); + } + }); + }); + fns = null; + }).promise(); + }, + // Get a promise for this deferred + // If obj is provided, the promise aspect is added to the object + promise: function( obj ) { + return obj != null ? jQuery.extend( obj, promise ) : promise; + } + }, + deferred = {}; + + // Keep pipe for back-compat + promise.pipe = promise.then; + + // Add list-specific methods + jQuery.each( tuples, function( i, tuple ) { + var list = tuple[ 2 ], + stateString = tuple[ 3 ]; + + // promise[ done | fail | progress ] = list.add + promise[ tuple[1] ] = list.add; + + // Handle state + if ( stateString ) { + list.add(function() { + // state = [ resolved | rejected ] + state = stateString; + + // [ reject_list | resolve_list ].disable; progress_list.lock + }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock ); + } + + // deferred[ resolve | reject | notify ] + deferred[ tuple[0] ] = function() { + deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments ); + return this; + }; + deferred[ tuple[0] + "With" ] = list.fireWith; + }); + + // Make the deferred a promise + promise.promise( deferred ); + + // Call given func if any + if ( func ) { + func.call( deferred, deferred ); + } + + // All done! + return deferred; + }, + + // Deferred helper + when: function( subordinate /* , ..., subordinateN */ ) { + var i = 0, + resolveValues = slice.call( arguments ), + length = resolveValues.length, + + // the count of uncompleted subordinates + remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0, + + // the master Deferred. If resolveValues consist of only a single Deferred, just use that. + deferred = remaining === 1 ? subordinate : jQuery.Deferred(), + + // Update function for both resolve and progress values + updateFunc = function( i, contexts, values ) { + return function( value ) { + contexts[ i ] = this; + values[ i ] = arguments.length > 1 ? slice.call( arguments ) : value; + if ( values === progressValues ) { + deferred.notifyWith( contexts, values ); + + } else if ( !(--remaining) ) { + deferred.resolveWith( contexts, values ); + } + }; + }, + + progressValues, progressContexts, resolveContexts; + + // add listeners to Deferred subordinates; treat others as resolved + if ( length > 1 ) { + progressValues = new Array( length ); + progressContexts = new Array( length ); + resolveContexts = new Array( length ); + for ( ; i < length; i++ ) { + if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) { + resolveValues[ i ].promise() + .done( updateFunc( i, resolveContexts, resolveValues ) ) + .fail( deferred.reject ) + .progress( updateFunc( i, progressContexts, progressValues ) ); + } else { + --remaining; + } + } + } + + // if we're not waiting on anything, resolve the master + if ( !remaining ) { + deferred.resolveWith( resolveContexts, resolveValues ); + } + + return deferred.promise(); + } +}); + + +// The deferred used on DOM ready +var readyList; + +jQuery.fn.ready = function( fn ) { + // Add the callback + jQuery.ready.promise().done( fn ); + + return this; +}; + +jQuery.extend({ + // Is the DOM ready to be used? Set to true once it occurs. + isReady: false, + + // A counter to track how many items to wait for before + // the ready event fires. See #6781 + readyWait: 1, + + // Hold (or release) the ready event + holdReady: function( hold ) { + if ( hold ) { + jQuery.readyWait++; + } else { + jQuery.ready( true ); + } + }, + + // Handle when the DOM is ready + ready: function( wait ) { + + // Abort if there are pending holds or we're already ready + if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { + return; + } + + // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). + if ( !document.body ) { + return setTimeout( jQuery.ready ); + } + + // Remember that the DOM is ready + jQuery.isReady = true; + + // If a normal DOM Ready event fired, decrement, and wait if need be + if ( wait !== true && --jQuery.readyWait > 0 ) { + return; + } + + // If there are functions bound, to execute + readyList.resolveWith( document, [ jQuery ] ); + + // Trigger any bound ready events + if ( jQuery.fn.triggerHandler ) { + jQuery( document ).triggerHandler( "ready" ); + jQuery( document ).off( "ready" ); + } + } +}); + +/** + * Clean-up method for dom ready events + */ +function detach() { + if ( document.addEventListener ) { + document.removeEventListener( "DOMContentLoaded", completed, false ); + window.removeEventListener( "load", completed, false ); + + } else { + document.detachEvent( "onreadystatechange", completed ); + window.detachEvent( "onload", completed ); + } +} + +/** + * The ready event handler and self cleanup method + */ +function completed() { + // readyState === "complete" is good enough for us to call the dom ready in oldIE + if ( document.addEventListener || event.type === "load" || document.readyState === "complete" ) { + detach(); + jQuery.ready(); + } +} + +jQuery.ready.promise = function( obj ) { + if ( !readyList ) { + + readyList = jQuery.Deferred(); + + // Catch cases where $(document).ready() is called after the browser event has already occurred. + // we once tried to use readyState "interactive" here, but it caused issues like the one + // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15 + if ( document.readyState === "complete" ) { + // Handle it asynchronously to allow scripts the opportunity to delay ready + setTimeout( jQuery.ready ); + + // Standards-based browsers support DOMContentLoaded + } else if ( document.addEventListener ) { + // Use the handy event callback + document.addEventListener( "DOMContentLoaded", completed, false ); + + // A fallback to window.onload, that will always work + window.addEventListener( "load", completed, false ); + + // If IE event model is used + } else { + // Ensure firing before onload, maybe late but safe also for iframes + document.attachEvent( "onreadystatechange", completed ); + + // A fallback to window.onload, that will always work + window.attachEvent( "onload", completed ); + + // If IE and not a frame + // continually check to see if the document is ready + var top = false; + + try { + top = window.frameElement == null && document.documentElement; + } catch(e) {} + + if ( top && top.doScroll ) { + (function doScrollCheck() { + if ( !jQuery.isReady ) { + + try { + // Use the trick by Diego Perini + // http://javascript.nwbox.com/IEContentLoaded/ + top.doScroll("left"); + } catch(e) { + return setTimeout( doScrollCheck, 50 ); + } + + // detach all dom ready events + detach(); + + // and execute any waiting functions + jQuery.ready(); + } + })(); + } + } + } + return readyList.promise( obj ); +}; + + +var strundefined = typeof undefined; + + + +// Support: IE<9 +// Iteration over object's inherited properties before its own +var i; +for ( i in jQuery( support ) ) { + break; +} +support.ownLast = i !== "0"; + +// Note: most support tests are defined in their respective modules. +// false until the test is run +support.inlineBlockNeedsLayout = false; + +// Execute ASAP in case we need to set body.style.zoom +jQuery(function() { + // Minified: var a,b,c,d + var val, div, body, container; + + body = document.getElementsByTagName( "body" )[ 0 ]; + if ( !body || !body.style ) { + // Return for frameset docs that don't have a body + return; + } + + // Setup + div = document.createElement( "div" ); + container = document.createElement( "div" ); + container.style.cssText = "position:absolute;border:0;width:0;height:0;top:0;left:-9999px"; + body.appendChild( container ).appendChild( div ); + + if ( typeof div.style.zoom !== strundefined ) { + // Support: IE<8 + // Check if natively block-level elements act like inline-block + // elements when setting their display to 'inline' and giving + // them layout + div.style.cssText = "display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1"; + + support.inlineBlockNeedsLayout = val = div.offsetWidth === 3; + if ( val ) { + // Prevent IE 6 from affecting layout for positioned elements #11048 + // Prevent IE from shrinking the body in IE 7 mode #12869 + // Support: IE<8 + body.style.zoom = 1; + } + } + + body.removeChild( container ); +}); + + + + +(function() { + var div = document.createElement( "div" ); + + // Execute the test only if not already executed in another module. + if (support.deleteExpando == null) { + // Support: IE<9 + support.deleteExpando = true; + try { + delete div.test; + } catch( e ) { + support.deleteExpando = false; + } + } + + // Null elements to avoid leaks in IE. + div = null; +})(); + + +/** + * Determines whether an object can have data + */ +jQuery.acceptData = function( elem ) { + var noData = jQuery.noData[ (elem.nodeName + " ").toLowerCase() ], + nodeType = +elem.nodeType || 1; + + // Do not set data on non-element DOM nodes because it will not be cleared (#8335). + return nodeType !== 1 && nodeType !== 9 ? + false : + + // Nodes accept data unless otherwise specified; rejection can be conditional + !noData || noData !== true && elem.getAttribute("classid") === noData; +}; + + +var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, + rmultiDash = /([A-Z])/g; + +function dataAttr( elem, key, data ) { + // If nothing was found internally, try to fetch any + // data from the HTML5 data-* attribute + if ( data === undefined && elem.nodeType === 1 ) { + + var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase(); + + data = elem.getAttribute( name ); + + if ( typeof data === "string" ) { + try { + data = data === "true" ? true : + data === "false" ? false : + data === "null" ? null : + // Only convert to a number if it doesn't change the string + +data + "" === data ? +data : + rbrace.test( data ) ? jQuery.parseJSON( data ) : + data; + } catch( e ) {} + + // Make sure we set the data so it isn't changed later + jQuery.data( elem, key, data ); + + } else { + data = undefined; + } + } + + return data; +} + +// checks a cache object for emptiness +function isEmptyDataObject( obj ) { + var name; + for ( name in obj ) { + + // if the public data object is empty, the private is still empty + if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) { + continue; + } + if ( name !== "toJSON" ) { + return false; + } + } + + return true; +} + +function internalData( elem, name, data, pvt /* Internal Use Only */ ) { + if ( !jQuery.acceptData( elem ) ) { + return; + } + + var ret, thisCache, + internalKey = jQuery.expando, + + // We have to handle DOM nodes and JS objects differently because IE6-7 + // can't GC object references properly across the DOM-JS boundary + isNode = elem.nodeType, + + // Only DOM nodes need the global jQuery cache; JS object data is + // attached directly to the object so GC can occur automatically + cache = isNode ? jQuery.cache : elem, + + // Only defining an ID for JS objects if its cache already exists allows + // the code to shortcut on the same path as a DOM node with no cache + id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey; + + // Avoid doing any more work than we need to when trying to get data on an + // object that has no data at all + if ( (!id || !cache[id] || (!pvt && !cache[id].data)) && data === undefined && typeof name === "string" ) { + return; + } + + if ( !id ) { + // Only DOM nodes need a new unique ID for each element since their data + // ends up in the global cache + if ( isNode ) { + id = elem[ internalKey ] = deletedIds.pop() || jQuery.guid++; + } else { + id = internalKey; + } + } + + if ( !cache[ id ] ) { + // Avoid exposing jQuery metadata on plain JS objects when the object + // is serialized using JSON.stringify + cache[ id ] = isNode ? {} : { toJSON: jQuery.noop }; + } + + // An object can be passed to jQuery.data instead of a key/value pair; this gets + // shallow copied over onto the existing cache + if ( typeof name === "object" || typeof name === "function" ) { + if ( pvt ) { + cache[ id ] = jQuery.extend( cache[ id ], name ); + } else { + cache[ id ].data = jQuery.extend( cache[ id ].data, name ); + } + } + + thisCache = cache[ id ]; + + // jQuery data() is stored in a separate object inside the object's internal data + // cache in order to avoid key collisions between internal data and user-defined + // data. + if ( !pvt ) { + if ( !thisCache.data ) { + thisCache.data = {}; + } + + thisCache = thisCache.data; + } + + if ( data !== undefined ) { + thisCache[ jQuery.camelCase( name ) ] = data; + } + + // Check for both converted-to-camel and non-converted data property names + // If a data property was specified + if ( typeof name === "string" ) { + + // First Try to find as-is property data + ret = thisCache[ name ]; + + // Test for null|undefined property data + if ( ret == null ) { + + // Try to find the camelCased property + ret = thisCache[ jQuery.camelCase( name ) ]; + } + } else { + ret = thisCache; + } + + return ret; +} + +function internalRemoveData( elem, name, pvt ) { + if ( !jQuery.acceptData( elem ) ) { + return; + } + + var thisCache, i, + isNode = elem.nodeType, + + // See jQuery.data for more information + cache = isNode ? jQuery.cache : elem, + id = isNode ? elem[ jQuery.expando ] : jQuery.expando; + + // If there is already no cache entry for this object, there is no + // purpose in continuing + if ( !cache[ id ] ) { + return; + } + + if ( name ) { + + thisCache = pvt ? cache[ id ] : cache[ id ].data; + + if ( thisCache ) { + + // Support array or space separated string names for data keys + if ( !jQuery.isArray( name ) ) { + + // try the string as a key before any manipulation + if ( name in thisCache ) { + name = [ name ]; + } else { + + // split the camel cased version by spaces unless a key with the spaces exists + name = jQuery.camelCase( name ); + if ( name in thisCache ) { + name = [ name ]; + } else { + name = name.split(" "); + } + } + } else { + // If "name" is an array of keys... + // When data is initially created, via ("key", "val") signature, + // keys will be converted to camelCase. + // Since there is no way to tell _how_ a key was added, remove + // both plain key and camelCase key. #12786 + // This will only penalize the array argument path. + name = name.concat( jQuery.map( name, jQuery.camelCase ) ); + } + + i = name.length; + while ( i-- ) { + delete thisCache[ name[i] ]; + } + + // If there is no data left in the cache, we want to continue + // and let the cache object itself get destroyed + if ( pvt ? !isEmptyDataObject(thisCache) : !jQuery.isEmptyObject(thisCache) ) { + return; + } + } + } + + // See jQuery.data for more information + if ( !pvt ) { + delete cache[ id ].data; + + // Don't destroy the parent cache unless the internal data object + // had been the only thing left in it + if ( !isEmptyDataObject( cache[ id ] ) ) { + return; + } + } + + // Destroy the cache + if ( isNode ) { + jQuery.cleanData( [ elem ], true ); + + // Use delete when supported for expandos or `cache` is not a window per isWindow (#10080) + /* jshint eqeqeq: false */ + } else if ( support.deleteExpando || cache != cache.window ) { + /* jshint eqeqeq: true */ + delete cache[ id ]; + + // When all else fails, null + } else { + cache[ id ] = null; + } +} + +jQuery.extend({ + cache: {}, + + // The following elements (space-suffixed to avoid Object.prototype collisions) + // throw uncatchable exceptions if you attempt to set expando properties + noData: { + "applet ": true, + "embed ": true, + // ...but Flash objects (which have this classid) *can* handle expandos + "object ": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" + }, + + hasData: function( elem ) { + elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ]; + return !!elem && !isEmptyDataObject( elem ); + }, + + data: function( elem, name, data ) { + return internalData( elem, name, data ); + }, + + removeData: function( elem, name ) { + return internalRemoveData( elem, name ); + }, + + // For internal use only. + _data: function( elem, name, data ) { + return internalData( elem, name, data, true ); + }, + + _removeData: function( elem, name ) { + return internalRemoveData( elem, name, true ); + } +}); + +jQuery.fn.extend({ + data: function( key, value ) { + var i, name, data, + elem = this[0], + attrs = elem && elem.attributes; + + // Special expections of .data basically thwart jQuery.access, + // so implement the relevant behavior ourselves + + // Gets all values + if ( key === undefined ) { + if ( this.length ) { + data = jQuery.data( elem ); + + if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) { + i = attrs.length; + while ( i-- ) { + + // Support: IE11+ + // The attrs elements can be null (#14894) + if ( attrs[ i ] ) { + name = attrs[ i ].name; + if ( name.indexOf( "data-" ) === 0 ) { + name = jQuery.camelCase( name.slice(5) ); + dataAttr( elem, name, data[ name ] ); + } + } + } + jQuery._data( elem, "parsedAttrs", true ); + } + } + + return data; + } + + // Sets multiple values + if ( typeof key === "object" ) { + return this.each(function() { + jQuery.data( this, key ); + }); + } + + return arguments.length > 1 ? + + // Sets one value + this.each(function() { + jQuery.data( this, key, value ); + }) : + + // Gets one value + // Try to fetch any internally stored data first + elem ? dataAttr( elem, key, jQuery.data( elem, key ) ) : undefined; + }, + + removeData: function( key ) { + return this.each(function() { + jQuery.removeData( this, key ); + }); + } +}); + + +jQuery.extend({ + queue: function( elem, type, data ) { + var queue; + + if ( elem ) { + type = ( type || "fx" ) + "queue"; + queue = jQuery._data( elem, type ); + + // Speed up dequeue by getting out quickly if this is just a lookup + if ( data ) { + if ( !queue || jQuery.isArray(data) ) { + queue = jQuery._data( elem, type, jQuery.makeArray(data) ); + } else { + queue.push( data ); + } + } + return queue || []; + } + }, + + dequeue: function( elem, type ) { + type = type || "fx"; + + var queue = jQuery.queue( elem, type ), + startLength = queue.length, + fn = queue.shift(), + hooks = jQuery._queueHooks( elem, type ), + next = function() { + jQuery.dequeue( elem, type ); + }; + + // If the fx queue is dequeued, always remove the progress sentinel + if ( fn === "inprogress" ) { + fn = queue.shift(); + startLength--; + } + + if ( fn ) { + + // Add a progress sentinel to prevent the fx queue from being + // automatically dequeued + if ( type === "fx" ) { + queue.unshift( "inprogress" ); + } + + // clear up the last queue stop function + delete hooks.stop; + fn.call( elem, next, hooks ); + } + + if ( !startLength && hooks ) { + hooks.empty.fire(); + } + }, + + // not intended for public consumption - generates a queueHooks object, or returns the current one + _queueHooks: function( elem, type ) { + var key = type + "queueHooks"; + return jQuery._data( elem, key ) || jQuery._data( elem, key, { + empty: jQuery.Callbacks("once memory").add(function() { + jQuery._removeData( elem, type + "queue" ); + jQuery._removeData( elem, key ); + }) + }); + } +}); + +jQuery.fn.extend({ + queue: function( type, data ) { + var setter = 2; + + if ( typeof type !== "string" ) { + data = type; + type = "fx"; + setter--; + } + + if ( arguments.length < setter ) { + return jQuery.queue( this[0], type ); + } + + return data === undefined ? + this : + this.each(function() { + var queue = jQuery.queue( this, type, data ); + + // ensure a hooks for this queue + jQuery._queueHooks( this, type ); + + if ( type === "fx" && queue[0] !== "inprogress" ) { + jQuery.dequeue( this, type ); + } + }); + }, + dequeue: function( type ) { + return this.each(function() { + jQuery.dequeue( this, type ); + }); + }, + clearQueue: function( type ) { + return this.queue( type || "fx", [] ); + }, + // Get a promise resolved when queues of a certain type + // are emptied (fx is the type by default) + promise: function( type, obj ) { + var tmp, + count = 1, + defer = jQuery.Deferred(), + elements = this, + i = this.length, + resolve = function() { + if ( !( --count ) ) { + defer.resolveWith( elements, [ elements ] ); + } + }; + + if ( typeof type !== "string" ) { + obj = type; + type = undefined; + } + type = type || "fx"; + + while ( i-- ) { + tmp = jQuery._data( elements[ i ], type + "queueHooks" ); + if ( tmp && tmp.empty ) { + count++; + tmp.empty.add( resolve ); + } + } + resolve(); + return defer.promise( obj ); + } +}); +var pnum = (/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/).source; + +var cssExpand = [ "Top", "Right", "Bottom", "Left" ]; + +var isHidden = function( elem, el ) { + // isHidden might be called from jQuery#filter function; + // in that case, element will be second argument + elem = el || elem; + return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem ); + }; + + + +// Multifunctional method to get and set values of a collection +// The value/s can optionally be executed if it's a function +var access = jQuery.access = function( elems, fn, key, value, chainable, emptyGet, raw ) { + var i = 0, + length = elems.length, + bulk = key == null; + + // Sets many values + if ( jQuery.type( key ) === "object" ) { + chainable = true; + for ( i in key ) { + jQuery.access( elems, fn, i, key[i], true, emptyGet, raw ); + } + + // Sets one value + } else if ( value !== undefined ) { + chainable = true; + + if ( !jQuery.isFunction( value ) ) { + raw = true; + } + + if ( bulk ) { + // Bulk operations run against the entire set + if ( raw ) { + fn.call( elems, value ); + fn = null; + + // ...except when executing function values + } else { + bulk = fn; + fn = function( elem, key, value ) { + return bulk.call( jQuery( elem ), value ); + }; + } + } + + if ( fn ) { + for ( ; i < length; i++ ) { + fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) ); + } + } + } + + return chainable ? + elems : + + // Gets + bulk ? + fn.call( elems ) : + length ? fn( elems[0], key ) : emptyGet; +}; +var rcheckableType = (/^(?:checkbox|radio)$/i); + + + +(function() { + // Minified: var a,b,c + var input = document.createElement( "input" ), + div = document.createElement( "div" ), + fragment = document.createDocumentFragment(); + + // Setup + div.innerHTML = "
a"; + + // IE strips leading whitespace when .innerHTML is used + support.leadingWhitespace = div.firstChild.nodeType === 3; + + // Make sure that tbody elements aren't automatically inserted + // IE will insert them into empty tables + support.tbody = !div.getElementsByTagName( "tbody" ).length; + + // Make sure that link elements get serialized correctly by innerHTML + // This requires a wrapper element in IE + support.htmlSerialize = !!div.getElementsByTagName( "link" ).length; + + // Makes sure cloning an html5 element does not cause problems + // Where outerHTML is undefined, this still works + support.html5Clone = + document.createElement( "nav" ).cloneNode( true ).outerHTML !== "<:nav>"; + + // Check if a disconnected checkbox will retain its checked + // value of true after appended to the DOM (IE6/7) + input.type = "checkbox"; + input.checked = true; + fragment.appendChild( input ); + support.appendChecked = input.checked; + + // Make sure textarea (and checkbox) defaultValue is properly cloned + // Support: IE6-IE11+ + div.innerHTML = ""; + support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue; + + // #11217 - WebKit loses check when the name is after the checked attribute + fragment.appendChild( div ); + div.innerHTML = ""; + + // Support: Safari 5.1, iOS 5.1, Android 4.x, Android 2.3 + // old WebKit doesn't clone checked state correctly in fragments + support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked; + + // Support: IE<9 + // Opera does not clone events (and typeof div.attachEvent === undefined). + // IE9-10 clones events bound via attachEvent, but they don't trigger with .click() + support.noCloneEvent = true; + if ( div.attachEvent ) { + div.attachEvent( "onclick", function() { + support.noCloneEvent = false; + }); + + div.cloneNode( true ).click(); + } + + // Execute the test only if not already executed in another module. + if (support.deleteExpando == null) { + // Support: IE<9 + support.deleteExpando = true; + try { + delete div.test; + } catch( e ) { + support.deleteExpando = false; + } + } +})(); + + +(function() { + var i, eventName, + div = document.createElement( "div" ); + + // Support: IE<9 (lack submit/change bubble), Firefox 23+ (lack focusin event) + for ( i in { submit: true, change: true, focusin: true }) { + eventName = "on" + i; + + if ( !(support[ i + "Bubbles" ] = eventName in window) ) { + // Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP) + div.setAttribute( eventName, "t" ); + support[ i + "Bubbles" ] = div.attributes[ eventName ].expando === false; + } + } + + // Null elements to avoid leaks in IE. + div = null; +})(); + + +var rformElems = /^(?:input|select|textarea)$/i, + rkeyEvent = /^key/, + rmouseEvent = /^(?:mouse|pointer|contextmenu)|click/, + rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, + rtypenamespace = /^([^.]*)(?:\.(.+)|)$/; + +function returnTrue() { + return true; +} + +function returnFalse() { + return false; +} + +function safeActiveElement() { + try { + return document.activeElement; + } catch ( err ) { } +} + +/* + * Helper functions for managing events -- not part of the public interface. + * Props to Dean Edwards' addEvent library for many of the ideas. + */ +jQuery.event = { + + global: {}, + + add: function( elem, types, handler, data, selector ) { + var tmp, events, t, handleObjIn, + special, eventHandle, handleObj, + handlers, type, namespaces, origType, + elemData = jQuery._data( elem ); + + // Don't attach events to noData or text/comment nodes (but allow plain objects) + if ( !elemData ) { + return; + } + + // Caller can pass in an object of custom data in lieu of the handler + if ( handler.handler ) { + handleObjIn = handler; + handler = handleObjIn.handler; + selector = handleObjIn.selector; + } + + // Make sure that the handler has a unique ID, used to find/remove it later + if ( !handler.guid ) { + handler.guid = jQuery.guid++; + } + + // Init the element's event structure and main handler, if this is the first + if ( !(events = elemData.events) ) { + events = elemData.events = {}; + } + if ( !(eventHandle = elemData.handle) ) { + eventHandle = elemData.handle = function( e ) { + // Discard the second event of a jQuery.event.trigger() and + // when an event is called after a page has unloaded + return typeof jQuery !== strundefined && (!e || jQuery.event.triggered !== e.type) ? + jQuery.event.dispatch.apply( eventHandle.elem, arguments ) : + undefined; + }; + // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events + eventHandle.elem = elem; + } + + // Handle multiple events separated by a space + types = ( types || "" ).match( rnotwhite ) || [ "" ]; + t = types.length; + while ( t-- ) { + tmp = rtypenamespace.exec( types[t] ) || []; + type = origType = tmp[1]; + namespaces = ( tmp[2] || "" ).split( "." ).sort(); + + // There *must* be a type, no attaching namespace-only handlers + if ( !type ) { + continue; + } + + // If event changes its type, use the special event handlers for the changed type + special = jQuery.event.special[ type ] || {}; + + // If selector defined, determine special event api type, otherwise given type + type = ( selector ? special.delegateType : special.bindType ) || type; + + // Update special based on newly reset type + special = jQuery.event.special[ type ] || {}; + + // handleObj is passed to all event handlers + handleObj = jQuery.extend({ + type: type, + origType: origType, + data: data, + handler: handler, + guid: handler.guid, + selector: selector, + needsContext: selector && jQuery.expr.match.needsContext.test( selector ), + namespace: namespaces.join(".") + }, handleObjIn ); + + // Init the event handler queue if we're the first + if ( !(handlers = events[ type ]) ) { + handlers = events[ type ] = []; + handlers.delegateCount = 0; + + // Only use addEventListener/attachEvent if the special events handler returns false + if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { + // Bind the global event handler to the element + if ( elem.addEventListener ) { + elem.addEventListener( type, eventHandle, false ); + + } else if ( elem.attachEvent ) { + elem.attachEvent( "on" + type, eventHandle ); + } + } + } + + if ( special.add ) { + special.add.call( elem, handleObj ); + + if ( !handleObj.handler.guid ) { + handleObj.handler.guid = handler.guid; + } + } + + // Add to the element's handler list, delegates in front + if ( selector ) { + handlers.splice( handlers.delegateCount++, 0, handleObj ); + } else { + handlers.push( handleObj ); + } + + // Keep track of which events have ever been used, for event optimization + jQuery.event.global[ type ] = true; + } + + // Nullify elem to prevent memory leaks in IE + elem = null; + }, + + // Detach an event or set of events from an element + remove: function( elem, types, handler, selector, mappedTypes ) { + var j, handleObj, tmp, + origCount, t, events, + special, handlers, type, + namespaces, origType, + elemData = jQuery.hasData( elem ) && jQuery._data( elem ); + + if ( !elemData || !(events = elemData.events) ) { + return; + } + + // Once for each type.namespace in types; type may be omitted + types = ( types || "" ).match( rnotwhite ) || [ "" ]; + t = types.length; + while ( t-- ) { + tmp = rtypenamespace.exec( types[t] ) || []; + type = origType = tmp[1]; + namespaces = ( tmp[2] || "" ).split( "." ).sort(); + + // Unbind all events (on this namespace, if provided) for the element + if ( !type ) { + for ( type in events ) { + jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); + } + continue; + } + + special = jQuery.event.special[ type ] || {}; + type = ( selector ? special.delegateType : special.bindType ) || type; + handlers = events[ type ] || []; + tmp = tmp[2] && new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ); + + // Remove matching events + origCount = j = handlers.length; + while ( j-- ) { + handleObj = handlers[ j ]; + + if ( ( mappedTypes || origType === handleObj.origType ) && + ( !handler || handler.guid === handleObj.guid ) && + ( !tmp || tmp.test( handleObj.namespace ) ) && + ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) { + handlers.splice( j, 1 ); + + if ( handleObj.selector ) { + handlers.delegateCount--; + } + if ( special.remove ) { + special.remove.call( elem, handleObj ); + } + } + } + + // Remove generic event handler if we removed something and no more handlers exist + // (avoids potential for endless recursion during removal of special event handlers) + if ( origCount && !handlers.length ) { + if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) { + jQuery.removeEvent( elem, type, elemData.handle ); + } + + delete events[ type ]; + } + } + + // Remove the expando if it's no longer used + if ( jQuery.isEmptyObject( events ) ) { + delete elemData.handle; + + // removeData also checks for emptiness and clears the expando if empty + // so use it instead of delete + jQuery._removeData( elem, "events" ); + } + }, + + trigger: function( event, data, elem, onlyHandlers ) { + var handle, ontype, cur, + bubbleType, special, tmp, i, + eventPath = [ elem || document ], + type = hasOwn.call( event, "type" ) ? event.type : event, + namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split(".") : []; + + cur = tmp = elem = elem || document; + + // Don't do events on text and comment nodes + if ( elem.nodeType === 3 || elem.nodeType === 8 ) { + return; + } + + // focus/blur morphs to focusin/out; ensure we're not firing them right now + if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { + return; + } + + if ( type.indexOf(".") >= 0 ) { + // Namespaced trigger; create a regexp to match event type in handle() + namespaces = type.split("."); + type = namespaces.shift(); + namespaces.sort(); + } + ontype = type.indexOf(":") < 0 && "on" + type; + + // Caller can pass in a jQuery.Event object, Object, or just an event type string + event = event[ jQuery.expando ] ? + event : + new jQuery.Event( type, typeof event === "object" && event ); + + // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) + event.isTrigger = onlyHandlers ? 2 : 3; + event.namespace = namespaces.join("."); + event.namespace_re = event.namespace ? + new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ) : + null; + + // Clean up the event in case it is being reused + event.result = undefined; + if ( !event.target ) { + event.target = elem; + } + + // Clone any incoming data and prepend the event, creating the handler arg list + data = data == null ? + [ event ] : + jQuery.makeArray( data, [ event ] ); + + // Allow special events to draw outside the lines + special = jQuery.event.special[ type ] || {}; + if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { + return; + } + + // Determine event propagation path in advance, per W3C events spec (#9951) + // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) + if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { + + bubbleType = special.delegateType || type; + if ( !rfocusMorph.test( bubbleType + type ) ) { + cur = cur.parentNode; + } + for ( ; cur; cur = cur.parentNode ) { + eventPath.push( cur ); + tmp = cur; + } + + // Only add window if we got to document (e.g., not plain obj or detached DOM) + if ( tmp === (elem.ownerDocument || document) ) { + eventPath.push( tmp.defaultView || tmp.parentWindow || window ); + } + } + + // Fire handlers on the event path + i = 0; + while ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) { + + event.type = i > 1 ? + bubbleType : + special.bindType || type; + + // jQuery handler + handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" ); + if ( handle ) { + handle.apply( cur, data ); + } + + // Native handler + handle = ontype && cur[ ontype ]; + if ( handle && handle.apply && jQuery.acceptData( cur ) ) { + event.result = handle.apply( cur, data ); + if ( event.result === false ) { + event.preventDefault(); + } + } + } + event.type = type; + + // If nobody prevented the default action, do it now + if ( !onlyHandlers && !event.isDefaultPrevented() ) { + + if ( (!special._default || special._default.apply( eventPath.pop(), data ) === false) && + jQuery.acceptData( elem ) ) { + + // Call a native DOM method on the target with the same name name as the event. + // Can't use an .isFunction() check here because IE6/7 fails that test. + // Don't do default actions on window, that's where global variables be (#6170) + if ( ontype && elem[ type ] && !jQuery.isWindow( elem ) ) { + + // Don't re-trigger an onFOO event when we call its FOO() method + tmp = elem[ ontype ]; + + if ( tmp ) { + elem[ ontype ] = null; + } + + // Prevent re-triggering of the same event, since we already bubbled it above + jQuery.event.triggered = type; + try { + elem[ type ](); + } catch ( e ) { + // IE<9 dies on focus/blur to hidden element (#1486,#12518) + // only reproducible on winXP IE8 native, not IE9 in IE8 mode + } + jQuery.event.triggered = undefined; + + if ( tmp ) { + elem[ ontype ] = tmp; + } + } + } + } + + return event.result; + }, + + dispatch: function( event ) { + + // Make a writable jQuery.Event from the native event object + event = jQuery.event.fix( event ); + + var i, ret, handleObj, matched, j, + handlerQueue = [], + args = slice.call( arguments ), + handlers = ( jQuery._data( this, "events" ) || {} )[ event.type ] || [], + special = jQuery.event.special[ event.type ] || {}; + + // Use the fix-ed jQuery.Event rather than the (read-only) native event + args[0] = event; + event.delegateTarget = this; + + // Call the preDispatch hook for the mapped type, and let it bail if desired + if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { + return; + } + + // Determine handlers + handlerQueue = jQuery.event.handlers.call( this, event, handlers ); + + // Run delegates first; they may want to stop propagation beneath us + i = 0; + while ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) { + event.currentTarget = matched.elem; + + j = 0; + while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) { + + // Triggered event must either 1) have no namespace, or + // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace). + if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) { + + event.handleObj = handleObj; + event.data = handleObj.data; + + ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler ) + .apply( matched.elem, args ); + + if ( ret !== undefined ) { + if ( (event.result = ret) === false ) { + event.preventDefault(); + event.stopPropagation(); + } + } + } + } + } + + // Call the postDispatch hook for the mapped type + if ( special.postDispatch ) { + special.postDispatch.call( this, event ); + } + + return event.result; + }, + + handlers: function( event, handlers ) { + var sel, handleObj, matches, i, + handlerQueue = [], + delegateCount = handlers.delegateCount, + cur = event.target; + + // Find delegate handlers + // Black-hole SVG instance trees (#13180) + // Avoid non-left-click bubbling in Firefox (#3861) + if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) { + + /* jshint eqeqeq: false */ + for ( ; cur != this; cur = cur.parentNode || this ) { + /* jshint eqeqeq: true */ + + // Don't check non-elements (#13208) + // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) + if ( cur.nodeType === 1 && (cur.disabled !== true || event.type !== "click") ) { + matches = []; + for ( i = 0; i < delegateCount; i++ ) { + handleObj = handlers[ i ]; + + // Don't conflict with Object.prototype properties (#13203) + sel = handleObj.selector + " "; + + if ( matches[ sel ] === undefined ) { + matches[ sel ] = handleObj.needsContext ? + jQuery( sel, this ).index( cur ) >= 0 : + jQuery.find( sel, this, null, [ cur ] ).length; + } + if ( matches[ sel ] ) { + matches.push( handleObj ); + } + } + if ( matches.length ) { + handlerQueue.push({ elem: cur, handlers: matches }); + } + } + } + } + + // Add the remaining (directly-bound) handlers + if ( delegateCount < handlers.length ) { + handlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) }); + } + + return handlerQueue; + }, + + fix: function( event ) { + if ( event[ jQuery.expando ] ) { + return event; + } + + // Create a writable copy of the event object and normalize some properties + var i, prop, copy, + type = event.type, + originalEvent = event, + fixHook = this.fixHooks[ type ]; + + if ( !fixHook ) { + this.fixHooks[ type ] = fixHook = + rmouseEvent.test( type ) ? this.mouseHooks : + rkeyEvent.test( type ) ? this.keyHooks : + {}; + } + copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; + + event = new jQuery.Event( originalEvent ); + + i = copy.length; + while ( i-- ) { + prop = copy[ i ]; + event[ prop ] = originalEvent[ prop ]; + } + + // Support: IE<9 + // Fix target property (#1925) + if ( !event.target ) { + event.target = originalEvent.srcElement || document; + } + + // Support: Chrome 23+, Safari? + // Target should not be a text node (#504, #13143) + if ( event.target.nodeType === 3 ) { + event.target = event.target.parentNode; + } + + // Support: IE<9 + // For mouse/key events, metaKey==false if it's undefined (#3368, #11328) + event.metaKey = !!event.metaKey; + + return fixHook.filter ? fixHook.filter( event, originalEvent ) : event; + }, + + // Includes some event props shared by KeyEvent and MouseEvent + props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "), + + fixHooks: {}, + + keyHooks: { + props: "char charCode key keyCode".split(" "), + filter: function( event, original ) { + + // Add which for key events + if ( event.which == null ) { + event.which = original.charCode != null ? original.charCode : original.keyCode; + } + + return event; + } + }, + + mouseHooks: { + props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "), + filter: function( event, original ) { + var body, eventDoc, doc, + button = original.button, + fromElement = original.fromElement; + + // Calculate pageX/Y if missing and clientX/Y available + if ( event.pageX == null && original.clientX != null ) { + eventDoc = event.target.ownerDocument || document; + doc = eventDoc.documentElement; + body = eventDoc.body; + + event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 ); + event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 ); + } + + // Add relatedTarget, if necessary + if ( !event.relatedTarget && fromElement ) { + event.relatedTarget = fromElement === event.target ? original.toElement : fromElement; + } + + // Add which for click: 1 === left; 2 === middle; 3 === right + // Note: button is not normalized, so don't use it + if ( !event.which && button !== undefined ) { + event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) ); + } + + return event; + } + }, + + special: { + load: { + // Prevent triggered image.load events from bubbling to window.load + noBubble: true + }, + focus: { + // Fire native event if possible so blur/focus sequence is correct + trigger: function() { + if ( this !== safeActiveElement() && this.focus ) { + try { + this.focus(); + return false; + } catch ( e ) { + // Support: IE<9 + // If we error on focus to hidden element (#1486, #12518), + // let .trigger() run the handlers + } + } + }, + delegateType: "focusin" + }, + blur: { + trigger: function() { + if ( this === safeActiveElement() && this.blur ) { + this.blur(); + return false; + } + }, + delegateType: "focusout" + }, + click: { + // For checkbox, fire native event so checked state will be right + trigger: function() { + if ( jQuery.nodeName( this, "input" ) && this.type === "checkbox" && this.click ) { + this.click(); + return false; + } + }, + + // For cross-browser consistency, don't fire native .click() on links + _default: function( event ) { + return jQuery.nodeName( event.target, "a" ); + } + }, + + beforeunload: { + postDispatch: function( event ) { + + // Support: Firefox 20+ + // Firefox doesn't alert if the returnValue field is not set. + if ( event.result !== undefined && event.originalEvent ) { + event.originalEvent.returnValue = event.result; + } + } + } + }, + + simulate: function( type, elem, event, bubble ) { + // Piggyback on a donor event to simulate a different one. + // Fake originalEvent to avoid donor's stopPropagation, but if the + // simulated event prevents default then we do the same on the donor. + var e = jQuery.extend( + new jQuery.Event(), + event, + { + type: type, + isSimulated: true, + originalEvent: {} + } + ); + if ( bubble ) { + jQuery.event.trigger( e, null, elem ); + } else { + jQuery.event.dispatch.call( elem, e ); + } + if ( e.isDefaultPrevented() ) { + event.preventDefault(); + } + } +}; + +jQuery.removeEvent = document.removeEventListener ? + function( elem, type, handle ) { + if ( elem.removeEventListener ) { + elem.removeEventListener( type, handle, false ); + } + } : + function( elem, type, handle ) { + var name = "on" + type; + + if ( elem.detachEvent ) { + + // #8545, #7054, preventing memory leaks for custom events in IE6-8 + // detachEvent needed property on element, by name of that event, to properly expose it to GC + if ( typeof elem[ name ] === strundefined ) { + elem[ name ] = null; + } + + elem.detachEvent( name, handle ); + } + }; + +jQuery.Event = function( src, props ) { + // Allow instantiation without the 'new' keyword + if ( !(this instanceof jQuery.Event) ) { + return new jQuery.Event( src, props ); + } + + // Event object + if ( src && src.type ) { + this.originalEvent = src; + this.type = src.type; + + // Events bubbling up the document may have been marked as prevented + // by a handler lower down the tree; reflect the correct value. + this.isDefaultPrevented = src.defaultPrevented || + src.defaultPrevented === undefined && + // Support: IE < 9, Android < 4.0 + src.returnValue === false ? + returnTrue : + returnFalse; + + // Event type + } else { + this.type = src; + } + + // Put explicitly provided properties onto the event object + if ( props ) { + jQuery.extend( this, props ); + } + + // Create a timestamp if incoming event doesn't have one + this.timeStamp = src && src.timeStamp || jQuery.now(); + + // Mark it as fixed + this[ jQuery.expando ] = true; +}; + +// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding +// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html +jQuery.Event.prototype = { + isDefaultPrevented: returnFalse, + isPropagationStopped: returnFalse, + isImmediatePropagationStopped: returnFalse, + + preventDefault: function() { + var e = this.originalEvent; + + this.isDefaultPrevented = returnTrue; + if ( !e ) { + return; + } + + // If preventDefault exists, run it on the original event + if ( e.preventDefault ) { + e.preventDefault(); + + // Support: IE + // Otherwise set the returnValue property of the original event to false + } else { + e.returnValue = false; + } + }, + stopPropagation: function() { + var e = this.originalEvent; + + this.isPropagationStopped = returnTrue; + if ( !e ) { + return; + } + // If stopPropagation exists, run it on the original event + if ( e.stopPropagation ) { + e.stopPropagation(); + } + + // Support: IE + // Set the cancelBubble property of the original event to true + e.cancelBubble = true; + }, + stopImmediatePropagation: function() { + var e = this.originalEvent; + + this.isImmediatePropagationStopped = returnTrue; + + if ( e && e.stopImmediatePropagation ) { + e.stopImmediatePropagation(); + } + + this.stopPropagation(); + } +}; + +// Create mouseenter/leave events using mouseover/out and event-time checks +jQuery.each({ + mouseenter: "mouseover", + mouseleave: "mouseout", + pointerenter: "pointerover", + pointerleave: "pointerout" +}, function( orig, fix ) { + jQuery.event.special[ orig ] = { + delegateType: fix, + bindType: fix, + + handle: function( event ) { + var ret, + target = this, + related = event.relatedTarget, + handleObj = event.handleObj; + + // For mousenter/leave call the handler if related is outside the target. + // NB: No relatedTarget if the mouse left/entered the browser window + if ( !related || (related !== target && !jQuery.contains( target, related )) ) { + event.type = handleObj.origType; + ret = handleObj.handler.apply( this, arguments ); + event.type = fix; + } + return ret; + } + }; +}); + +// IE submit delegation +if ( !support.submitBubbles ) { + + jQuery.event.special.submit = { + setup: function() { + // Only need this for delegated form submit events + if ( jQuery.nodeName( this, "form" ) ) { + return false; + } + + // Lazy-add a submit handler when a descendant form may potentially be submitted + jQuery.event.add( this, "click._submit keypress._submit", function( e ) { + // Node name check avoids a VML-related crash in IE (#9807) + var elem = e.target, + form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined; + if ( form && !jQuery._data( form, "submitBubbles" ) ) { + jQuery.event.add( form, "submit._submit", function( event ) { + event._submit_bubble = true; + }); + jQuery._data( form, "submitBubbles", true ); + } + }); + // return undefined since we don't need an event listener + }, + + postDispatch: function( event ) { + // If form was submitted by the user, bubble the event up the tree + if ( event._submit_bubble ) { + delete event._submit_bubble; + if ( this.parentNode && !event.isTrigger ) { + jQuery.event.simulate( "submit", this.parentNode, event, true ); + } + } + }, + + teardown: function() { + // Only need this for delegated form submit events + if ( jQuery.nodeName( this, "form" ) ) { + return false; + } + + // Remove delegated handlers; cleanData eventually reaps submit handlers attached above + jQuery.event.remove( this, "._submit" ); + } + }; +} + +// IE change delegation and checkbox/radio fix +if ( !support.changeBubbles ) { + + jQuery.event.special.change = { + + setup: function() { + + if ( rformElems.test( this.nodeName ) ) { + // IE doesn't fire change on a check/radio until blur; trigger it on click + // after a propertychange. Eat the blur-change in special.change.handle. + // This still fires onchange a second time for check/radio after blur. + if ( this.type === "checkbox" || this.type === "radio" ) { + jQuery.event.add( this, "propertychange._change", function( event ) { + if ( event.originalEvent.propertyName === "checked" ) { + this._just_changed = true; + } + }); + jQuery.event.add( this, "click._change", function( event ) { + if ( this._just_changed && !event.isTrigger ) { + this._just_changed = false; + } + // Allow triggered, simulated change events (#11500) + jQuery.event.simulate( "change", this, event, true ); + }); + } + return false; + } + // Delegated event; lazy-add a change handler on descendant inputs + jQuery.event.add( this, "beforeactivate._change", function( e ) { + var elem = e.target; + + if ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, "changeBubbles" ) ) { + jQuery.event.add( elem, "change._change", function( event ) { + if ( this.parentNode && !event.isSimulated && !event.isTrigger ) { + jQuery.event.simulate( "change", this.parentNode, event, true ); + } + }); + jQuery._data( elem, "changeBubbles", true ); + } + }); + }, + + handle: function( event ) { + var elem = event.target; + + // Swallow native change events from checkbox/radio, we already triggered them above + if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) { + return event.handleObj.handler.apply( this, arguments ); + } + }, + + teardown: function() { + jQuery.event.remove( this, "._change" ); + + return !rformElems.test( this.nodeName ); + } + }; +} + +// Create "bubbling" focus and blur events +if ( !support.focusinBubbles ) { + jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { + + // Attach a single capturing handler on the document while someone wants focusin/focusout + var handler = function( event ) { + jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true ); + }; + + jQuery.event.special[ fix ] = { + setup: function() { + var doc = this.ownerDocument || this, + attaches = jQuery._data( doc, fix ); + + if ( !attaches ) { + doc.addEventListener( orig, handler, true ); + } + jQuery._data( doc, fix, ( attaches || 0 ) + 1 ); + }, + teardown: function() { + var doc = this.ownerDocument || this, + attaches = jQuery._data( doc, fix ) - 1; + + if ( !attaches ) { + doc.removeEventListener( orig, handler, true ); + jQuery._removeData( doc, fix ); + } else { + jQuery._data( doc, fix, attaches ); + } + } + }; + }); +} + +jQuery.fn.extend({ + + on: function( types, selector, data, fn, /*INTERNAL*/ one ) { + var type, origFn; + + // Types can be a map of types/handlers + if ( typeof types === "object" ) { + // ( types-Object, selector, data ) + if ( typeof selector !== "string" ) { + // ( types-Object, data ) + data = data || selector; + selector = undefined; + } + for ( type in types ) { + this.on( type, selector, data, types[ type ], one ); + } + return this; + } + + if ( data == null && fn == null ) { + // ( types, fn ) + fn = selector; + data = selector = undefined; + } else if ( fn == null ) { + if ( typeof selector === "string" ) { + // ( types, selector, fn ) + fn = data; + data = undefined; + } else { + // ( types, data, fn ) + fn = data; + data = selector; + selector = undefined; + } + } + if ( fn === false ) { + fn = returnFalse; + } else if ( !fn ) { + return this; + } + + if ( one === 1 ) { + origFn = fn; + fn = function( event ) { + // Can use an empty set, since event contains the info + jQuery().off( event ); + return origFn.apply( this, arguments ); + }; + // Use same guid so caller can remove using origFn + fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); + } + return this.each( function() { + jQuery.event.add( this, types, fn, data, selector ); + }); + }, + one: function( types, selector, data, fn ) { + return this.on( types, selector, data, fn, 1 ); + }, + off: function( types, selector, fn ) { + var handleObj, type; + if ( types && types.preventDefault && types.handleObj ) { + // ( event ) dispatched jQuery.Event + handleObj = types.handleObj; + jQuery( types.delegateTarget ).off( + handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType, + handleObj.selector, + handleObj.handler + ); + return this; + } + if ( typeof types === "object" ) { + // ( types-object [, selector] ) + for ( type in types ) { + this.off( type, selector, types[ type ] ); + } + return this; + } + if ( selector === false || typeof selector === "function" ) { + // ( types [, fn] ) + fn = selector; + selector = undefined; + } + if ( fn === false ) { + fn = returnFalse; + } + return this.each(function() { + jQuery.event.remove( this, types, fn, selector ); + }); + }, + + trigger: function( type, data ) { + return this.each(function() { + jQuery.event.trigger( type, data, this ); + }); + }, + triggerHandler: function( type, data ) { + var elem = this[0]; + if ( elem ) { + return jQuery.event.trigger( type, data, elem, true ); + } + } +}); + + +function createSafeFragment( document ) { + var list = nodeNames.split( "|" ), + safeFrag = document.createDocumentFragment(); + + if ( safeFrag.createElement ) { + while ( list.length ) { + safeFrag.createElement( + list.pop() + ); + } + } + return safeFrag; +} + +var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" + + "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video", + rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g, + rnoshimcache = new RegExp("<(?:" + nodeNames + ")[\\s/>]", "i"), + rleadingWhitespace = /^\s+/, + rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, + rtagName = /<([\w:]+)/, + rtbody = /\s*$/g, + + // We have to close these tags to support XHTML (#13200) + wrapMap = { + option: [ 1, "" ], + legend: [ 1, "
", "
" ], + area: [ 1, "", "" ], + param: [ 1, "", "" ], + thead: [ 1, "", "
" ], + tr: [ 2, "", "
" ], + col: [ 2, "", "
" ], + td: [ 3, "", "
" ], + + // IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags, + // unless wrapped in a div with non-breaking characters in front of it. + _default: support.htmlSerialize ? [ 0, "", "" ] : [ 1, "X
", "
" ] + }, + safeFragment = createSafeFragment( document ), + fragmentDiv = safeFragment.appendChild( document.createElement("div") ); + +wrapMap.optgroup = wrapMap.option; +wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; +wrapMap.th = wrapMap.td; + +function getAll( context, tag ) { + var elems, elem, + i = 0, + found = typeof context.getElementsByTagName !== strundefined ? context.getElementsByTagName( tag || "*" ) : + typeof context.querySelectorAll !== strundefined ? context.querySelectorAll( tag || "*" ) : + undefined; + + if ( !found ) { + for ( found = [], elems = context.childNodes || context; (elem = elems[i]) != null; i++ ) { + if ( !tag || jQuery.nodeName( elem, tag ) ) { + found.push( elem ); + } else { + jQuery.merge( found, getAll( elem, tag ) ); + } + } + } + + return tag === undefined || tag && jQuery.nodeName( context, tag ) ? + jQuery.merge( [ context ], found ) : + found; +} + +// Used in buildFragment, fixes the defaultChecked property +function fixDefaultChecked( elem ) { + if ( rcheckableType.test( elem.type ) ) { + elem.defaultChecked = elem.checked; + } +} + +// Support: IE<8 +// Manipulating tables requires a tbody +function manipulationTarget( elem, content ) { + return jQuery.nodeName( elem, "table" ) && + jQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ? + + elem.getElementsByTagName("tbody")[0] || + elem.appendChild( elem.ownerDocument.createElement("tbody") ) : + elem; +} + +// Replace/restore the type attribute of script elements for safe DOM manipulation +function disableScript( elem ) { + elem.type = (jQuery.find.attr( elem, "type" ) !== null) + "/" + elem.type; + return elem; +} +function restoreScript( elem ) { + var match = rscriptTypeMasked.exec( elem.type ); + if ( match ) { + elem.type = match[1]; + } else { + elem.removeAttribute("type"); + } + return elem; +} + +// Mark scripts as having already been evaluated +function setGlobalEval( elems, refElements ) { + var elem, + i = 0; + for ( ; (elem = elems[i]) != null; i++ ) { + jQuery._data( elem, "globalEval", !refElements || jQuery._data( refElements[i], "globalEval" ) ); + } +} + +function cloneCopyEvent( src, dest ) { + + if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) { + return; + } + + var type, i, l, + oldData = jQuery._data( src ), + curData = jQuery._data( dest, oldData ), + events = oldData.events; + + if ( events ) { + delete curData.handle; + curData.events = {}; + + for ( type in events ) { + for ( i = 0, l = events[ type ].length; i < l; i++ ) { + jQuery.event.add( dest, type, events[ type ][ i ] ); + } + } + } + + // make the cloned public data object a copy from the original + if ( curData.data ) { + curData.data = jQuery.extend( {}, curData.data ); + } +} + +function fixCloneNodeIssues( src, dest ) { + var nodeName, e, data; + + // We do not need to do anything for non-Elements + if ( dest.nodeType !== 1 ) { + return; + } + + nodeName = dest.nodeName.toLowerCase(); + + // IE6-8 copies events bound via attachEvent when using cloneNode. + if ( !support.noCloneEvent && dest[ jQuery.expando ] ) { + data = jQuery._data( dest ); + + for ( e in data.events ) { + jQuery.removeEvent( dest, e, data.handle ); + } + + // Event data gets referenced instead of copied if the expando gets copied too + dest.removeAttribute( jQuery.expando ); + } + + // IE blanks contents when cloning scripts, and tries to evaluate newly-set text + if ( nodeName === "script" && dest.text !== src.text ) { + disableScript( dest ).text = src.text; + restoreScript( dest ); + + // IE6-10 improperly clones children of object elements using classid. + // IE10 throws NoModificationAllowedError if parent is null, #12132. + } else if ( nodeName === "object" ) { + if ( dest.parentNode ) { + dest.outerHTML = src.outerHTML; + } + + // This path appears unavoidable for IE9. When cloning an object + // element in IE9, the outerHTML strategy above is not sufficient. + // If the src has innerHTML and the destination does not, + // copy the src.innerHTML into the dest.innerHTML. #10324 + if ( support.html5Clone && ( src.innerHTML && !jQuery.trim(dest.innerHTML) ) ) { + dest.innerHTML = src.innerHTML; + } + + } else if ( nodeName === "input" && rcheckableType.test( src.type ) ) { + // IE6-8 fails to persist the checked state of a cloned checkbox + // or radio button. Worse, IE6-7 fail to give the cloned element + // a checked appearance if the defaultChecked value isn't also set + + dest.defaultChecked = dest.checked = src.checked; + + // IE6-7 get confused and end up setting the value of a cloned + // checkbox/radio button to an empty string instead of "on" + if ( dest.value !== src.value ) { + dest.value = src.value; + } + + // IE6-8 fails to return the selected option to the default selected + // state when cloning options + } else if ( nodeName === "option" ) { + dest.defaultSelected = dest.selected = src.defaultSelected; + + // IE6-8 fails to set the defaultValue to the correct value when + // cloning other types of input fields + } else if ( nodeName === "input" || nodeName === "textarea" ) { + dest.defaultValue = src.defaultValue; + } +} + +jQuery.extend({ + clone: function( elem, dataAndEvents, deepDataAndEvents ) { + var destElements, node, clone, i, srcElements, + inPage = jQuery.contains( elem.ownerDocument, elem ); + + if ( support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) { + clone = elem.cloneNode( true ); + + // IE<=8 does not properly clone detached, unknown element nodes + } else { + fragmentDiv.innerHTML = elem.outerHTML; + fragmentDiv.removeChild( clone = fragmentDiv.firstChild ); + } + + if ( (!support.noCloneEvent || !support.noCloneChecked) && + (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) { + + // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2 + destElements = getAll( clone ); + srcElements = getAll( elem ); + + // Fix all IE cloning issues + for ( i = 0; (node = srcElements[i]) != null; ++i ) { + // Ensure that the destination node is not null; Fixes #9587 + if ( destElements[i] ) { + fixCloneNodeIssues( node, destElements[i] ); + } + } + } + + // Copy the events from the original to the clone + if ( dataAndEvents ) { + if ( deepDataAndEvents ) { + srcElements = srcElements || getAll( elem ); + destElements = destElements || getAll( clone ); + + for ( i = 0; (node = srcElements[i]) != null; i++ ) { + cloneCopyEvent( node, destElements[i] ); + } + } else { + cloneCopyEvent( elem, clone ); + } + } + + // Preserve script evaluation history + destElements = getAll( clone, "script" ); + if ( destElements.length > 0 ) { + setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); + } + + destElements = srcElements = node = null; + + // Return the cloned set + return clone; + }, + + buildFragment: function( elems, context, scripts, selection ) { + var j, elem, contains, + tmp, tag, tbody, wrap, + l = elems.length, + + // Ensure a safe fragment + safe = createSafeFragment( context ), + + nodes = [], + i = 0; + + for ( ; i < l; i++ ) { + elem = elems[ i ]; + + if ( elem || elem === 0 ) { + + // Add nodes directly + if ( jQuery.type( elem ) === "object" ) { + jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); + + // Convert non-html into a text node + } else if ( !rhtml.test( elem ) ) { + nodes.push( context.createTextNode( elem ) ); + + // Convert html into DOM nodes + } else { + tmp = tmp || safe.appendChild( context.createElement("div") ); + + // Deserialize a standard representation + tag = (rtagName.exec( elem ) || [ "", "" ])[ 1 ].toLowerCase(); + wrap = wrapMap[ tag ] || wrapMap._default; + + tmp.innerHTML = wrap[1] + elem.replace( rxhtmlTag, "<$1>" ) + wrap[2]; + + // Descend through wrappers to the right content + j = wrap[0]; + while ( j-- ) { + tmp = tmp.lastChild; + } + + // Manually add leading whitespace removed by IE + if ( !support.leadingWhitespace && rleadingWhitespace.test( elem ) ) { + nodes.push( context.createTextNode( rleadingWhitespace.exec( elem )[0] ) ); + } + + // Remove IE's autoinserted from table fragments + if ( !support.tbody ) { + + // String was a , *may* have spurious + elem = tag === "table" && !rtbody.test( elem ) ? + tmp.firstChild : + + // String was a bare or + wrap[1] === "
" && !rtbody.test( elem ) ? + tmp : + 0; + + j = elem && elem.childNodes.length; + while ( j-- ) { + if ( jQuery.nodeName( (tbody = elem.childNodes[j]), "tbody" ) && !tbody.childNodes.length ) { + elem.removeChild( tbody ); + } + } + } + + jQuery.merge( nodes, tmp.childNodes ); + + // Fix #12392 for WebKit and IE > 9 + tmp.textContent = ""; + + // Fix #12392 for oldIE + while ( tmp.firstChild ) { + tmp.removeChild( tmp.firstChild ); + } + + // Remember the top-level container for proper cleanup + tmp = safe.lastChild; + } + } + } + + // Fix #11356: Clear elements from fragment + if ( tmp ) { + safe.removeChild( tmp ); + } + + // Reset defaultChecked for any radios and checkboxes + // about to be appended to the DOM in IE 6/7 (#8060) + if ( !support.appendChecked ) { + jQuery.grep( getAll( nodes, "input" ), fixDefaultChecked ); + } + + i = 0; + while ( (elem = nodes[ i++ ]) ) { + + // #4087 - If origin and destination elements are the same, and this is + // that element, do not do anything + if ( selection && jQuery.inArray( elem, selection ) !== -1 ) { + continue; + } + + contains = jQuery.contains( elem.ownerDocument, elem ); + + // Append to fragment + tmp = getAll( safe.appendChild( elem ), "script" ); + + // Preserve script evaluation history + if ( contains ) { + setGlobalEval( tmp ); + } + + // Capture executables + if ( scripts ) { + j = 0; + while ( (elem = tmp[ j++ ]) ) { + if ( rscriptType.test( elem.type || "" ) ) { + scripts.push( elem ); + } + } + } + } + + tmp = null; + + return safe; + }, + + cleanData: function( elems, /* internal */ acceptData ) { + var elem, type, id, data, + i = 0, + internalKey = jQuery.expando, + cache = jQuery.cache, + deleteExpando = support.deleteExpando, + special = jQuery.event.special; + + for ( ; (elem = elems[i]) != null; i++ ) { + if ( acceptData || jQuery.acceptData( elem ) ) { + + id = elem[ internalKey ]; + data = id && cache[ id ]; + + if ( data ) { + if ( data.events ) { + for ( type in data.events ) { + if ( special[ type ] ) { + jQuery.event.remove( elem, type ); + + // This is a shortcut to avoid jQuery.event.remove's overhead + } else { + jQuery.removeEvent( elem, type, data.handle ); + } + } + } + + // Remove cache only if it was not already removed by jQuery.event.remove + if ( cache[ id ] ) { + + delete cache[ id ]; + + // IE does not allow us to delete expando properties from nodes, + // nor does it have a removeAttribute function on Document nodes; + // we must handle all of these cases + if ( deleteExpando ) { + delete elem[ internalKey ]; + + } else if ( typeof elem.removeAttribute !== strundefined ) { + elem.removeAttribute( internalKey ); + + } else { + elem[ internalKey ] = null; + } + + deletedIds.push( id ); + } + } + } + } + } +}); + +jQuery.fn.extend({ + text: function( value ) { + return access( this, function( value ) { + return value === undefined ? + jQuery.text( this ) : + this.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) ); + }, null, value, arguments.length ); + }, + + append: function() { + return this.domManip( arguments, function( elem ) { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + var target = manipulationTarget( this, elem ); + target.appendChild( elem ); + } + }); + }, + + prepend: function() { + return this.domManip( arguments, function( elem ) { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + var target = manipulationTarget( this, elem ); + target.insertBefore( elem, target.firstChild ); + } + }); + }, + + before: function() { + return this.domManip( arguments, function( elem ) { + if ( this.parentNode ) { + this.parentNode.insertBefore( elem, this ); + } + }); + }, + + after: function() { + return this.domManip( arguments, function( elem ) { + if ( this.parentNode ) { + this.parentNode.insertBefore( elem, this.nextSibling ); + } + }); + }, + + remove: function( selector, keepData /* Internal Use Only */ ) { + var elem, + elems = selector ? jQuery.filter( selector, this ) : this, + i = 0; + + for ( ; (elem = elems[i]) != null; i++ ) { + + if ( !keepData && elem.nodeType === 1 ) { + jQuery.cleanData( getAll( elem ) ); + } + + if ( elem.parentNode ) { + if ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) { + setGlobalEval( getAll( elem, "script" ) ); + } + elem.parentNode.removeChild( elem ); + } + } + + return this; + }, + + empty: function() { + var elem, + i = 0; + + for ( ; (elem = this[i]) != null; i++ ) { + // Remove element nodes and prevent memory leaks + if ( elem.nodeType === 1 ) { + jQuery.cleanData( getAll( elem, false ) ); + } + + // Remove any remaining nodes + while ( elem.firstChild ) { + elem.removeChild( elem.firstChild ); + } + + // If this is a select, ensure that it displays empty (#12336) + // Support: IE<9 + if ( elem.options && jQuery.nodeName( elem, "select" ) ) { + elem.options.length = 0; + } + } + + return this; + }, + + clone: function( dataAndEvents, deepDataAndEvents ) { + dataAndEvents = dataAndEvents == null ? false : dataAndEvents; + deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; + + return this.map(function() { + return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); + }); + }, + + html: function( value ) { + return access( this, function( value ) { + var elem = this[ 0 ] || {}, + i = 0, + l = this.length; + + if ( value === undefined ) { + return elem.nodeType === 1 ? + elem.innerHTML.replace( rinlinejQuery, "" ) : + undefined; + } + + // See if we can take a shortcut and just use innerHTML + if ( typeof value === "string" && !rnoInnerhtml.test( value ) && + ( support.htmlSerialize || !rnoshimcache.test( value ) ) && + ( support.leadingWhitespace || !rleadingWhitespace.test( value ) ) && + !wrapMap[ (rtagName.exec( value ) || [ "", "" ])[ 1 ].toLowerCase() ] ) { + + value = value.replace( rxhtmlTag, "<$1>" ); + + try { + for (; i < l; i++ ) { + // Remove element nodes and prevent memory leaks + elem = this[i] || {}; + if ( elem.nodeType === 1 ) { + jQuery.cleanData( getAll( elem, false ) ); + elem.innerHTML = value; + } + } + + elem = 0; + + // If using innerHTML throws an exception, use the fallback method + } catch(e) {} + } + + if ( elem ) { + this.empty().append( value ); + } + }, null, value, arguments.length ); + }, + + replaceWith: function() { + var arg = arguments[ 0 ]; + + // Make the changes, replacing each context element with the new content + this.domManip( arguments, function( elem ) { + arg = this.parentNode; + + jQuery.cleanData( getAll( this ) ); + + if ( arg ) { + arg.replaceChild( elem, this ); + } + }); + + // Force removal if there was no new content (e.g., from empty arguments) + return arg && (arg.length || arg.nodeType) ? this : this.remove(); + }, + + detach: function( selector ) { + return this.remove( selector, true ); + }, + + domManip: function( args, callback ) { + + // Flatten any nested arrays + args = concat.apply( [], args ); + + var first, node, hasScripts, + scripts, doc, fragment, + i = 0, + l = this.length, + set = this, + iNoClone = l - 1, + value = args[0], + isFunction = jQuery.isFunction( value ); + + // We can't cloneNode fragments that contain checked, in WebKit + if ( isFunction || + ( l > 1 && typeof value === "string" && + !support.checkClone && rchecked.test( value ) ) ) { + return this.each(function( index ) { + var self = set.eq( index ); + if ( isFunction ) { + args[0] = value.call( this, index, self.html() ); + } + self.domManip( args, callback ); + }); + } + + if ( l ) { + fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, this ); + first = fragment.firstChild; + + if ( fragment.childNodes.length === 1 ) { + fragment = first; + } + + if ( first ) { + scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); + hasScripts = scripts.length; + + // Use the original fragment for the last item instead of the first because it can end up + // being emptied incorrectly in certain situations (#8070). + for ( ; i < l; i++ ) { + node = fragment; + + if ( i !== iNoClone ) { + node = jQuery.clone( node, true, true ); + + // Keep references to cloned scripts for later restoration + if ( hasScripts ) { + jQuery.merge( scripts, getAll( node, "script" ) ); + } + } + + callback.call( this[i], node, i ); + } + + if ( hasScripts ) { + doc = scripts[ scripts.length - 1 ].ownerDocument; + + // Reenable scripts + jQuery.map( scripts, restoreScript ); + + // Evaluate executable scripts on first document insertion + for ( i = 0; i < hasScripts; i++ ) { + node = scripts[ i ]; + if ( rscriptType.test( node.type || "" ) && + !jQuery._data( node, "globalEval" ) && jQuery.contains( doc, node ) ) { + + if ( node.src ) { + // Optional AJAX dependency, but won't run scripts if not present + if ( jQuery._evalUrl ) { + jQuery._evalUrl( node.src ); + } + } else { + jQuery.globalEval( ( node.text || node.textContent || node.innerHTML || "" ).replace( rcleanScript, "" ) ); + } + } + } + } + + // Fix #11809: Avoid leaking memory + fragment = first = null; + } + } + + return this; + } +}); + +jQuery.each({ + appendTo: "append", + prependTo: "prepend", + insertBefore: "before", + insertAfter: "after", + replaceAll: "replaceWith" +}, function( name, original ) { + jQuery.fn[ name ] = function( selector ) { + var elems, + i = 0, + ret = [], + insert = jQuery( selector ), + last = insert.length - 1; + + for ( ; i <= last; i++ ) { + elems = i === last ? this : this.clone(true); + jQuery( insert[i] )[ original ]( elems ); + + // Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get() + push.apply( ret, elems.get() ); + } + + return this.pushStack( ret ); + }; +}); + + +var iframe, + elemdisplay = {}; + +/** + * Retrieve the actual display of a element + * @param {String} name nodeName of the element + * @param {Object} doc Document object + */ +// Called only from within defaultDisplay +function actualDisplay( name, doc ) { + var style, + elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ), + + // getDefaultComputedStyle might be reliably used only on attached element + display = window.getDefaultComputedStyle && ( style = window.getDefaultComputedStyle( elem[ 0 ] ) ) ? + + // Use of this method is a temporary fix (more like optmization) until something better comes along, + // since it was removed from specification and supported only in FF + style.display : jQuery.css( elem[ 0 ], "display" ); + + // We don't have any data stored on the element, + // so use "detach" method as fast way to get rid of the element + elem.detach(); + + return display; +} + +/** + * Try to determine the default display value of an element + * @param {String} nodeName + */ +function defaultDisplay( nodeName ) { + var doc = document, + display = elemdisplay[ nodeName ]; + + if ( !display ) { + display = actualDisplay( nodeName, doc ); + + // If the simple way fails, read from inside an iframe + if ( display === "none" || !display ) { + + // Use the already-created iframe if possible + iframe = (iframe || jQuery( "