Kivy-examples 2.3.1.dev0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/3Drendering/main.py +77 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/3Drendering/monkey.obj +7966 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/3Drendering/objloader.py +147 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/3Drendering/simple.glsl +47 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/RST_Editor/editor.kv +72 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/RST_Editor/main.py +64 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/android/compass/android.txt +3 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/android/compass/compass.kv +25 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/android/compass/main.py +77 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/android/compass/needle.png +0 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/android/compass/rose.png +0 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/android/takepicture/android.txt +3 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/android/takepicture/main.py +80 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/android/takepicture/shadow32.png +0 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/android/takepicture/takepicture.kv +40 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/animation/animate.py +42 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/application/app_suite.py +152 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/application/app_suite_data/testkvdir.kv +4 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/application/app_with_build.py +24 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/application/app_with_config.py +49 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/application/app_with_kv.py +25 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/application/app_with_kv_in_template1.py +27 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/application/template1/test.kv +4 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/application/test.kv +4 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/application/testkvfile.kv +4 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/async/asyncio_advanced.py +90 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/async/asyncio_basic.py +59 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/async/trio_advanced.py +93 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/async/trio_basic.py +58 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/audio/12908_sweet_trip_mm_clap_hi.wav +0 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/audio/12909_sweet_trip_mm_clap_lo.wav +0 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/audio/12910_sweet_trip_mm_clap_mid.wav +0 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/audio/12911_sweet_trip_mm_hat_cl.wav +0 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/audio/12913_sweet_trip_mm_kick_hi.wav +0 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/audio/12914_sweet_trip_mm_kick_lo.wav +0 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/audio/12915_sweet_trip_mm_kick_mid.wav +0 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/audio/12916_sweet_trip_mm_kwik_mod_01.wav +0 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/audio/12917_sweet_trip_mm_kwik_mod_02.wav +0 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/audio/12918_sweet_trip_mm_kwik_mod_03.wav +0 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/audio/12919_sweet_trip_mm_kwik_mod_04.wav +0 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/audio/12920_sweet_trip_mm_kwik_mod_05.wav +0 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/audio/12921_sweet_trip_mm_kwik_mod_06.wav +0 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/audio/12922_sweet_trip_mm_kwik_mod_07.wav +0 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/audio/12923_sweet_trip_mm_metal_clave.wav +0 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/audio/12925_sweet_trip_mm_sweep_x.wav +0 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/audio/12926_sweet_trip_mm_sweep_y.wav +0 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/audio/12927_sweet_trip_mm_sweep_z.wav +0 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/audio/audio.kv +59 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/audio/main.py +81 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/audio/pitch.py +42 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/camera/main.py +59 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/canvas/bezier.py +105 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/canvas/canvas_stress.py +72 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/canvas/circle.py +84 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/canvas/fbo_canvas.py +91 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/canvas/kiwi.jpg +0 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/canvas/lines.py +296 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/canvas/lines_extended.py +183 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/canvas/mesh.py +57 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/canvas/mesh_manipulation.py +101 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/canvas/mtexture1.png +0 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/canvas/mtexture2.png +0 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/canvas/multitexture.py +110 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/canvas/repeat_texture.py +65 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/canvas/rotation.py +35 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/canvas/rounded_rectangle.py +153 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/canvas/scale.py +37 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/canvas/stencil_canvas.py +85 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/canvas/tesselate.py +146 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/canvas/texture.py +143 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/canvas/texture_example_image.png +0 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/container/kv/1.kv +28 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/container/kv/2.kv +28 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/container/kv/3.kv +28 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/container/kv/root.kv +32 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/container/main.py +63 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/cover/cover_image.py +25 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/cover/cover_video.py +31 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/demo/camera_puzzle.py +98 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/demo/kivycatalog/container_kvs/AnchorLayoutContainer.kv +15 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/demo/kivycatalog/container_kvs/BoxLayoutContainer.kv +14 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/demo/kivycatalog/container_kvs/ButtonContainer.kv +27 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/demo/kivycatalog/container_kvs/CheckBoxContainer.kv +28 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/demo/kivycatalog/container_kvs/FileChooserContainer.kv +19 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/demo/kivycatalog/container_kvs/FloatLayoutContainer.kv +16 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/demo/kivycatalog/container_kvs/GridLayoutContainer.kv +20 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/demo/kivycatalog/container_kvs/LabelContainer.kv +62 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/demo/kivycatalog/container_kvs/MediaContainer.kv +9 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/demo/kivycatalog/container_kvs/PlaygroundContainer.kv +4 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/demo/kivycatalog/container_kvs/PopupContainer.kv +39 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/demo/kivycatalog/container_kvs/ProgressBarContainer.kv +17 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/demo/kivycatalog/container_kvs/RestContainer.kv +5 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/demo/kivycatalog/container_kvs/ScatterContainer.kv +16 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/demo/kivycatalog/container_kvs/SelectorsContainer.kv +10 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/demo/kivycatalog/container_kvs/StackLayoutContainer.kv +25 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/demo/kivycatalog/container_kvs/TextContainer.kv +20 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/demo/kivycatalog/kivycatalog.kv +144 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/demo/kivycatalog/main.py +192 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/demo/multistroke/gesturedatabase.kv +117 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/demo/multistroke/gesturedatabase.py +180 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/demo/multistroke/helpers.py +30 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/demo/multistroke/historymanager.kv +164 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/demo/multistroke/historymanager.py +276 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/demo/multistroke/main.py +144 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/demo/multistroke/multistroke.kv +101 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/demo/multistroke/settings.kv +110 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/demo/multistroke/settings.py +97 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/demo/pictures/android.txt +3 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/demo/pictures/images/Bubbles.jpg +0 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/demo/pictures/images/Ill1.jpg +0 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/demo/pictures/images/Wall.jpg +0 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/demo/pictures/images/faust_github.jpg +0 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/demo/pictures/main.py +73 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/demo/pictures/pictures.kv +57 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/demo/pictures/shadow32.png +0 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/demo/shadereditor/main.py +147 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/demo/shadereditor/shadereditor.kv +39 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/demo/showcase/README.txt +11 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/demo/showcase/android.txt +3 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/demo/showcase/data/background.png +0 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/demo/showcase/data/faust_github.jpg +0 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/demo/showcase/data/icons/README +4 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/demo/showcase/data/icons/bug.png +0 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/demo/showcase/data/icons/chevron-left.png +0 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/demo/showcase/data/icons/chevron-right.png +0 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/demo/showcase/data/screens/accordions.kv +39 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/demo/showcase/data/screens/bubbles.kv +33 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/demo/showcase/data/screens/buttons.kv +26 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/demo/showcase/data/screens/carousel.kv +51 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/demo/showcase/data/screens/checkboxes.kv +33 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/demo/showcase/data/screens/codeinput.kv +9 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/demo/showcase/data/screens/dropdown.kv +40 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/demo/showcase/data/screens/filechoosers.kv +24 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/demo/showcase/data/screens/popups.kv +17 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/demo/showcase/data/screens/progressbar.kv +15 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/demo/showcase/data/screens/rstdocument.kv +24 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/demo/showcase/data/screens/scatter.kv +14 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/demo/showcase/data/screens/screenmanager.kv +46 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/demo/showcase/data/screens/sliders.kv +55 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/demo/showcase/data/screens/spinner.kv +11 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/demo/showcase/data/screens/splitter.kv +13 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/demo/showcase/data/screens/switches.kv +39 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/demo/showcase/data/screens/tabbedpanel + layouts.kv +69 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/demo/showcase/data/screens/textinputs.kv +48 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/demo/showcase/data/screens/togglebutton.kv +39 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/demo/showcase/main.py +243 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/demo/showcase/showcase.kv +100 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/demo/touchtracer/README.txt +12 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/demo/touchtracer/android.txt +3 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/demo/touchtracer/icon.png +0 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/demo/touchtracer/main.py +170 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/demo/touchtracer/particle.png +0 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/demo/touchtracer/touchtracer.kv +29 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/frameworks/twisted/echo_client_app.py +82 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/frameworks/twisted/echo_server_app.py +49 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/frameworks/twisted/twistd_app.py +66 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/gestures/gesture_board.py +95 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/gestures/my_gestures.py +90 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/guide/designwithkv/controller.kv +16 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/guide/designwithkv/main.py +29 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/guide/firstwidget/1_skeleton.py +15 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/guide/firstwidget/2_print_touch.py +16 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/guide/firstwidget/3_draw_ellipse.py +22 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/guide/firstwidget/4_draw_line.py +26 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/guide/firstwidget/5_random_colors.py +28 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/guide/firstwidget/6_button.py +38 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/guide/quickstart/main.py +15 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/includes/button.kv +9 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/includes/layout.kv +6 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/includes/main.py +19 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/includes/test.kv +5 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/keyboard/android.txt +3 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/keyboard/main.py +226 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/keyboard/numeric.json +38 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/kinect/README.txt +13 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/kinect/kinectviewer.py +283 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/kv/app_button.kv +9 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/kv/app_camera.kv +25 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/kv/app_fbo.kv +11 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/kv/app_layout.kv +23 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/kv/app_logo.kv +36 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/kv/app_scatter.kv +6 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/kv/app_stencil.kv +27 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/kv/app_video.kv +42 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/kv/builder_template.py +28 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/kv/ids/id_in_kv/id_in_kv.py +20 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/kv/ids/id_in_kv/test.kv +11 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/kv/ids/kv_and_py/kv_and_py.py +34 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/kv/ids/kv_and_py/test.kv +11 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/kv/kivy.jpg +0 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/kv/kvrun.py +38 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/miscellaneous/clipboard.py +63 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/miscellaneous/custom_titlebar.py +56 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/miscellaneous/imagesave.py +14 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/miscellaneous/joystick.py +83 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/miscellaneous/multiple_dropfile.py +51 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/miscellaneous/on_textedit_event.py +104 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/miscellaneous/opacitywindow.py +28 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/miscellaneous/shapecollisions.py +397 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/miscellaneous/shapedwindow.py +98 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/miscellaneous/two_panes.py +47 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/miscellaneous/urlrequest.py +128 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/settings/android.txt +3 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/settings/main.py +122 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/shader/plasma.kv +9 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/shader/plasma.py +86 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/shader/rotated.kv +91 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/shader/rotated.py +102 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/shader/shadertree.kv +29 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/shader/shadertree.py +193 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/shader/tex3.jpg +0 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/svg/benchmark.py +19 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/svg/cloud.svg +25 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/svg/main-smaa.py +155 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/svg/main.py +50 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/svg/music.svg +68 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/svg/rotated.svg +23 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/svg/ship.svg +181 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/svg/sun.svg +35 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/svg/tiger.svg +813 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/text/pango_demo.py +296 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/tutorials/notes/final/data/icon.png +0 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/tutorials/notes/final/main.py +163 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/tutorials/notes/final/note.kv +154 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/tutorials/pong/main.py +82 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/tutorials/pong/pong.kv +53 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/tutorials/pong/steps/step1/main.py +15 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/tutorials/pong/steps/step1/pong.kv +2 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/tutorials/pong/steps/step2/main.py +15 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/tutorials/pong/steps/step2/pong.kv +21 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/tutorials/pong/steps/step3/main.py +26 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/tutorials/pong/steps/step3/pong.kv +31 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/tutorials/pong/steps/step4/main.py +48 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/tutorials/pong/steps/step4/pong.kv +34 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/tutorials/pong/steps/step5/main.py +75 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/tutorials/pong/steps/step5/pong.kv +53 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/widgets/accordion_1.py +17 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/widgets/actionbar.py +32 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/widgets/asyncimage.py +35 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/widgets/boxlayout_poshint.py +54 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/widgets/bubble_test.py +63 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/widgets/camera.py +33 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/widgets/carousel_buttons.py +50 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/widgets/cityCC0.mpg +0 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/widgets/cityCC0.png +0 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/widgets/codeinput.py +225 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/widgets/codeinputtest.kv +53 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/widgets/colorpicker.py +234 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/widgets/colorusage.py +62 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/widgets/compound_selection.py +83 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/widgets/customcollide.py +82 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/widgets/effectwidget.py +193 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/widgets/effectwidget2.py +47 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/widgets/effectwidget3_advanced.py +62 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/widgets/fbowidget.py +111 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/widgets/focus_behavior.py +98 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/widgets/image_mipmap.py +31 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/widgets/keyboardlistener.py +42 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/widgets/label_mipmap.py +28 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/widgets/label_sizing.py +193 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/widgets/label_text_size.py +49 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/widgets/label_with_markup.py +21 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/widgets/lang_dynamic_classes.py +18 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/widgets/pagelayout.py +64 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/widgets/popup_with_kv.py +35 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/widgets/recycleview/basic_data.py +124 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/widgets/recycleview/infinite_scrolling.py +143 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/widgets/recycleview/key_viewclass.py +149 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/widgets/recycleview/messenger.py +196 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/widgets/recycleview/pull_to_refresh.py +95 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/widgets/recycleview/rv_animate_items.py +109 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/widgets/rstexample.py +128 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/widgets/scatter.kv +53 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/widgets/scatter.py +16 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/widgets/screenmanager.py +106 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/widgets/scrollview.kv +16 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/widgets/scrollview.py +40 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/widgets/sequenced_images/android.txt +3 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/widgets/sequenced_images/data/images/bird.zip +0 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/widgets/sequenced_images/data/images/button_white.png +0 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/widgets/sequenced_images/data/images/button_white_animated.zip +0 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/widgets/sequenced_images/data/images/cube.zip +0 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/widgets/sequenced_images/data/images/info.png +0 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/widgets/sequenced_images/data/images/info.zip +0 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/widgets/sequenced_images/data/images/simple_cv_joint_animated.gif +0 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/widgets/sequenced_images/main.kv +63 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/widgets/sequenced_images/main.py +150 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/widgets/sequenced_images/uix/__init__.py +7 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/widgets/sequenced_images/uix/custom_button.py +98 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/widgets/settings.py +93 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/widgets/shorten_text.py +80 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/widgets/spinner.py +17 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/widgets/splitter.py +74 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/widgets/tabbed_panel_showcase.py +316 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/widgets/tabbedpanel.py +50 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/widgets/textalign.kv +49 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/widgets/textalign.py +48 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/widgets/textinput.py +59 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/widgets/unicode_textinput.py +244 -0
- Kivy_examples-2.3.1.dev0.data/data/share/kivy-examples/widgets/videoplayer.py +26 -0
- Kivy_examples-2.3.1.dev0.dist-info/AUTHORS +66 -0
- Kivy_examples-2.3.1.dev0.dist-info/LICENSE +21 -0
- Kivy_examples-2.3.1.dev0.dist-info/METADATA +382 -0
- Kivy_examples-2.3.1.dev0.dist-info/RECORD +624 -0
- Kivy_examples-2.3.1.dev0.dist-info/WHEEL +5 -0
- Kivy_examples-2.3.1.dev0.dist-info/dependency_links.txt +1 -0
- Kivy_examples-2.3.1.dev0.dist-info/top_level.txt +1 -0
- kivy/__init__.py +519 -0
- kivy/_version.py +18 -0
- kivy/animation.py +831 -0
- kivy/app.py +1213 -0
- kivy/atlas.py +456 -0
- kivy/base.py +617 -0
- kivy/cache.py +262 -0
- kivy/clock.py +1172 -0
- kivy/compat.py +82 -0
- kivy/config.py +1004 -0
- kivy/context.py +102 -0
- kivy/core/__init__.py +247 -0
- kivy/core/audio/__init__.py +223 -0
- kivy/core/audio/audio_android.py +104 -0
- kivy/core/audio/audio_avplayer.py +82 -0
- kivy/core/audio/audio_ffpyplayer.py +185 -0
- kivy/core/audio/audio_gstplayer.py +101 -0
- kivy/core/audio/audio_pygame.py +127 -0
- kivy/core/camera/__init__.py +151 -0
- kivy/core/camera/camera_android.py +206 -0
- kivy/core/camera/camera_gi.py +170 -0
- kivy/core/camera/camera_opencv.py +163 -0
- kivy/core/camera/camera_picamera.py +96 -0
- kivy/core/clipboard/__init__.py +157 -0
- kivy/core/clipboard/_clipboard_ext.py +36 -0
- kivy/core/clipboard/clipboard_android.py +91 -0
- kivy/core/clipboard/clipboard_dbusklipper.py +41 -0
- kivy/core/clipboard/clipboard_dummy.py +26 -0
- kivy/core/clipboard/clipboard_gtk3.py +47 -0
- kivy/core/clipboard/clipboard_nspaste.py +44 -0
- kivy/core/clipboard/clipboard_pygame.py +67 -0
- kivy/core/clipboard/clipboard_sdl2.py +36 -0
- kivy/core/clipboard/clipboard_winctypes.py +107 -0
- kivy/core/clipboard/clipboard_xclip.py +29 -0
- kivy/core/clipboard/clipboard_xsel.py +26 -0
- kivy/core/gl/__init__.py +90 -0
- kivy/core/image/__init__.py +996 -0
- kivy/core/image/img_dds.py +40 -0
- kivy/core/image/img_ffpyplayer.py +87 -0
- kivy/core/image/img_pil.py +123 -0
- kivy/core/image/img_pygame.py +119 -0
- kivy/core/image/img_sdl2.py +66 -0
- kivy/core/image/img_tex.py +58 -0
- kivy/core/spelling/__init__.py +135 -0
- kivy/core/spelling/spelling_enchant.py +50 -0
- kivy/core/spelling/spelling_osxappkit.py +64 -0
- kivy/core/text/__init__.py +1090 -0
- kivy/core/text/markup.py +893 -0
- kivy/core/text/text_pango.py +145 -0
- kivy/core/text/text_pil.py +84 -0
- kivy/core/text/text_pygame.py +117 -0
- kivy/core/text/text_sdl2.py +50 -0
- kivy/core/video/__init__.py +219 -0
- kivy/core/video/video_ffmpeg.py +106 -0
- kivy/core/video/video_ffpyplayer.py +449 -0
- kivy/core/video/video_gstplayer.py +140 -0
- kivy/core/video/video_null.py +12 -0
- kivy/core/window/__init__.py +2515 -0
- kivy/core/window/window_egl_rpi.py +86 -0
- kivy/core/window/window_pygame.py +441 -0
- kivy/core/window/window_sdl2.py +999 -0
- kivy/deps/__init__.py +6 -0
- kivy/effects/__init__.py +23 -0
- kivy/effects/dampedscroll.py +114 -0
- kivy/effects/kinetic.py +193 -0
- kivy/effects/opacityscroll.py +27 -0
- kivy/effects/scroll.py +126 -0
- kivy/event.py +12 -0
- kivy/eventmanager/__init__.py +185 -0
- kivy/extras/__init__.py +0 -0
- kivy/extras/highlight.py +52 -0
- kivy/factory.py +190 -0
- kivy/factory_registers.py +201 -0
- kivy/garden/__init__.py +186 -0
- kivy/geometry.py +121 -0
- kivy/gesture.py +424 -0
- kivy/graphics/__init__.py +126 -0
- kivy/graphics/cgl_backend/__init__.py +0 -0
- kivy/input/__init__.py +39 -0
- kivy/input/factory.py +35 -0
- kivy/input/motionevent.py +587 -0
- kivy/input/postproc/__init__.py +27 -0
- kivy/input/postproc/calibration.py +200 -0
- kivy/input/postproc/dejitter.py +74 -0
- kivy/input/postproc/doubletap.py +101 -0
- kivy/input/postproc/ignorelist.py +47 -0
- kivy/input/postproc/retaintouch.py +93 -0
- kivy/input/postproc/tripletap.py +106 -0
- kivy/input/provider.py +40 -0
- kivy/input/providers/__init__.py +68 -0
- kivy/input/providers/androidjoystick.py +117 -0
- kivy/input/providers/hidinput.py +778 -0
- kivy/input/providers/leapfinger.py +113 -0
- kivy/input/providers/linuxwacom.py +396 -0
- kivy/input/providers/mactouch.py +220 -0
- kivy/input/providers/mouse.py +424 -0
- kivy/input/providers/mtdev.py +380 -0
- kivy/input/providers/probesysfs.py +254 -0
- kivy/input/providers/tuio.py +326 -0
- kivy/input/providers/wm_common.py +162 -0
- kivy/input/providers/wm_pen.py +121 -0
- kivy/input/providers/wm_touch.py +157 -0
- kivy/input/recorder.py +335 -0
- kivy/input/shape.py +27 -0
- kivy/interactive.py +335 -0
- kivy/lang/__init__.py +883 -0
- kivy/lang/builder.py +1004 -0
- kivy/lang/parser.py +822 -0
- kivy/lib/__init__.py +21 -0
- kivy/lib/ddsfile.py +419 -0
- kivy/lib/gstplayer/__init__.py +27 -0
- kivy/lib/mtdev.py +254 -0
- kivy/lib/vidcore_lite/__init__.py +0 -0
- kivy/loader.py +579 -0
- kivy/logger.py +646 -0
- kivy/metrics.py +421 -0
- kivy/modules/__init__.py +300 -0
- kivy/modules/_webdebugger.py +200 -0
- kivy/modules/console.py +1059 -0
- kivy/modules/cursor.py +75 -0
- kivy/modules/inspector.py +755 -0
- kivy/modules/joycursor.py +299 -0
- kivy/modules/keybinding.py +64 -0
- kivy/modules/monitor.py +90 -0
- kivy/modules/recorder.py +94 -0
- kivy/modules/screen.py +183 -0
- kivy/modules/showborder.py +33 -0
- kivy/modules/touchring.py +97 -0
- kivy/modules/webdebugger.py +30 -0
- kivy/multistroke.py +1477 -0
- kivy/network/__init__.py +7 -0
- kivy/network/urlrequest.py +794 -0
- kivy/parser.py +154 -0
- kivy/resources.py +102 -0
- kivy/storage/__init__.py +405 -0
- kivy/storage/dictstore.py +98 -0
- kivy/storage/jsonstore.py +92 -0
- kivy/storage/redisstore.py +103 -0
- kivy/support.py +267 -0
- kivy/tests/__init__.py +11 -0
- kivy/tests/async_common.py +568 -0
- kivy/tests/common.py +524 -0
- kivy/tests/conftest.py +33 -0
- kivy/tests/fixtures.py +169 -0
- kivy/tests/perf_test_textinput.py +195 -0
- kivy/tests/pyinstaller/simple_widget/main.py +12 -0
- kivy/tests/pyinstaller/simple_widget/project/__init__.py +0 -0
- kivy/tests/pyinstaller/simple_widget/project/widget.py +12 -0
- kivy/tests/pyinstaller/test_pyinstaller.py +115 -0
- kivy/tests/pyinstaller/video_widget/main.py +6 -0
- kivy/tests/pyinstaller/video_widget/project/__init__.py +38 -0
- kivy/tests/test_animations.py +415 -0
- kivy/tests/test_app.py +216 -0
- kivy/tests/test_audio.py +69 -0
- kivy/tests/test_benchmark.py +292 -0
- kivy/tests/test_clipboard.py +48 -0
- kivy/tests/test_clock.py +292 -0
- kivy/tests/test_compat.py +6 -0
- kivy/tests/test_config.py +35 -0
- kivy/tests/test_coverage.py +83 -0
- kivy/tests/test_doc_gallery.py +38 -0
- kivy/tests/test_environ_cli.py +50 -0
- kivy/tests/test_fbo_py2py3.py +74 -0
- kivy/tests/test_filechooser.py +11 -0
- kivy/tests/test_filechooser_unicode.py +82 -0
- kivy/tests/test_fonts.py +42 -0
- kivy/tests/test_garden.py +23 -0
- kivy/tests/test_graphics.py +1149 -0
- kivy/tests/test_graphics_svg.py +84 -0
- kivy/tests/test_image.py +74 -0
- kivy/tests/test_imageloader.py +485 -0
- kivy/tests/test_invalid_lang.py +42 -0
- kivy/tests/test_issues/test_6315.py +55 -0
- kivy/tests/test_issues/test_issue_1084.py +47 -0
- kivy/tests/test_issues/test_issue_1091.py +19 -0
- kivy/tests/test_issues/test_issue_599.py +21 -0
- kivy/tests/test_issues/test_issue_609.py +19 -0
- kivy/tests/test_issues/test_issue_6909.py +28 -0
- kivy/tests/test_issues/test_issue_883.py +12 -0
- kivy/tests/test_kivy_init.py +30 -0
- kivy/tests/test_knspace.py +247 -0
- kivy/tests/test_lang.py +431 -0
- kivy/tests/test_lang_complex.py +87 -0
- kivy/tests/test_lang_pre_process_and_post_process.py +394 -0
- kivy/tests/test_logger.py +516 -0
- kivy/tests/test_metrics.py +30 -0
- kivy/tests/test_module_inspector.py +382 -0
- kivy/tests/test_motion_event.py +44 -0
- kivy/tests/test_mouse_hover_event.py +249 -0
- kivy/tests/test_mouse_multitouchsim.py +554 -0
- kivy/tests/test_multistroke.py +389 -0
- kivy/tests/test_properties.py +1332 -0
- kivy/tests/test_resources.py +79 -0
- kivy/tests/test_rst_replace.py +63 -0
- kivy/tests/test_screen.py +38 -0
- kivy/tests/test_storage.py +135 -0
- kivy/tests/test_uix_actionbar.py +363 -0
- kivy/tests/test_uix_anchorlayout.py +79 -0
- kivy/tests/test_uix_asyncimage.py +133 -0
- kivy/tests/test_uix_boxlayout.py +94 -0
- kivy/tests/test_uix_bubble.py +425 -0
- kivy/tests/test_uix_carousel.py +93 -0
- kivy/tests/test_uix_colorpicker.py +77 -0
- kivy/tests/test_uix_dropdown.py +91 -0
- kivy/tests/test_uix_gridlayout.py +244 -0
- kivy/tests/test_uix_layout.py +16 -0
- kivy/tests/test_uix_modal.py +101 -0
- kivy/tests/test_uix_recyclegridlayout.py +383 -0
- kivy/tests/test_uix_relativelayout.py +30 -0
- kivy/tests/test_uix_scrollview.py +358 -0
- kivy/tests/test_uix_settings.py +33 -0
- kivy/tests/test_uix_slider.py +156 -0
- kivy/tests/test_uix_stacklayout.py +120 -0
- kivy/tests/test_uix_textinput.py +577 -0
- kivy/tests/test_uix_translate_coordinates.py +72 -0
- kivy/tests/test_uix_videoplayer.py +112 -0
- kivy/tests/test_uix_widget.py +137 -0
- kivy/tests/test_urlrequest/test_urlrequest_requests.py +378 -0
- kivy/tests/test_urlrequest/test_urlrequest_urllib.py +155 -0
- kivy/tests/test_utils.py +237 -0
- kivy/tests/test_vector.py +256 -0
- kivy/tests/test_video.py +25 -0
- kivy/tests/test_weakmethod.py +44 -0
- kivy/tests/test_widget.py +127 -0
- kivy/tests/test_widget_walk.py +70 -0
- kivy/tests/test_window_base.py +60 -0
- kivy/tests/test_window_info.py +29 -0
- kivy/tests/visual_test_label.py +291 -0
- kivy/tools/__init__.py +44 -0
- kivy/tools/benchmark.py +286 -0
- kivy/tools/changelog_parser.py +120 -0
- kivy/tools/coverage.py +135 -0
- kivy/tools/gallery.py +323 -0
- kivy/tools/generate-icons.py +117 -0
- kivy/tools/gles_compat/subset_gles.py +125 -0
- kivy/tools/highlight/__init__.py +9 -0
- kivy/tools/kviewer.py +80 -0
- kivy/tools/packaging/__init__.py +12 -0
- kivy/tools/packaging/cython_cfg.py +82 -0
- kivy/tools/packaging/factory.py +105 -0
- kivy/tools/packaging/pyinstaller_hooks/__init__.py +381 -0
- kivy/tools/packaging/pyinstaller_hooks/__main__.py +29 -0
- kivy/tools/packaging/pyinstaller_hooks/hook-kivy.py +9 -0
- kivy/tools/packaging/pyinstaller_hooks/pyi_rth_kivy.py +17 -0
- kivy/tools/pep8checker/pep8.py +2316 -0
- kivy/tools/pep8checker/pep8kivy.py +109 -0
- kivy/tools/report.py +223 -0
- kivy/tools/stub-gl-debug.py +201 -0
- kivy/tools/texturecompress.py +233 -0
- kivy/uix/__init__.py +56 -0
- kivy/uix/accordion.py +484 -0
- kivy/uix/actionbar.py +934 -0
- kivy/uix/anchorlayout.py +122 -0
- kivy/uix/behaviors/__init__.py +95 -0
- kivy/uix/behaviors/button.py +212 -0
- kivy/uix/behaviors/codenavigation.py +167 -0
- kivy/uix/behaviors/compoundselection.py +688 -0
- kivy/uix/behaviors/cover.py +160 -0
- kivy/uix/behaviors/drag.py +234 -0
- kivy/uix/behaviors/emacs.py +140 -0
- kivy/uix/behaviors/focus.py +595 -0
- kivy/uix/behaviors/knspace.py +590 -0
- kivy/uix/behaviors/togglebutton.py +156 -0
- kivy/uix/behaviors/touchripple.py +318 -0
- kivy/uix/boxlayout.py +331 -0
- kivy/uix/bubble.py +576 -0
- kivy/uix/button.py +137 -0
- kivy/uix/camera.py +118 -0
- kivy/uix/carousel.py +695 -0
- kivy/uix/checkbox.py +197 -0
- kivy/uix/codeinput.py +238 -0
- kivy/uix/colorpicker.py +486 -0
- kivy/uix/dropdown.py +391 -0
- kivy/uix/effectwidget.py +772 -0
- kivy/uix/filechooser.py +1134 -0
- kivy/uix/floatlayout.py +148 -0
- kivy/uix/gesturesurface.py +625 -0
- kivy/uix/gridlayout.py +629 -0
- kivy/uix/image.py +528 -0
- kivy/uix/label.py +1200 -0
- kivy/uix/layout.py +322 -0
- kivy/uix/modalview.py +339 -0
- kivy/uix/pagelayout.py +233 -0
- kivy/uix/popup.py +266 -0
- kivy/uix/progressbar.py +95 -0
- kivy/uix/recycleboxlayout.py +183 -0
- kivy/uix/recyclegridlayout.py +255 -0
- kivy/uix/recyclelayout.py +446 -0
- kivy/uix/recycleview/__init__.py +624 -0
- kivy/uix/recycleview/datamodel.py +194 -0
- kivy/uix/recycleview/layout.py +253 -0
- kivy/uix/recycleview/views.py +423 -0
- kivy/uix/relativelayout.py +324 -0
- kivy/uix/rst.py +1492 -0
- kivy/uix/sandbox.py +198 -0
- kivy/uix/scatter.py +645 -0
- kivy/uix/scatterlayout.py +93 -0
- kivy/uix/screenmanager.py +1275 -0
- kivy/uix/scrollview.py +1288 -0
- kivy/uix/settings.py +1343 -0
- kivy/uix/slider.py +421 -0
- kivy/uix/spinner.py +221 -0
- kivy/uix/splitter.py +430 -0
- kivy/uix/stacklayout.py +331 -0
- kivy/uix/stencilview.py +40 -0
- kivy/uix/switch.py +122 -0
- kivy/uix/tabbedpanel.py +880 -0
- kivy/uix/textinput.py +4049 -0
- kivy/uix/togglebutton.py +37 -0
- kivy/uix/treeview.py +665 -0
- kivy/uix/video.py +302 -0
- kivy/uix/videoplayer.py +697 -0
- kivy/uix/vkeyboard.py +879 -0
- kivy/uix/widget.py +1629 -0
- kivy/utils.py +550 -0
- kivy/vector.py +412 -0
- kivy/weakmethod.py +72 -0
kivy/context.py
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
'''
|
|
2
|
+
Context
|
|
3
|
+
=======
|
|
4
|
+
|
|
5
|
+
.. versionadded:: 1.8.0
|
|
6
|
+
|
|
7
|
+
.. warning::
|
|
8
|
+
|
|
9
|
+
This is experimental and subject to change as long as this warning notice
|
|
10
|
+
is present.
|
|
11
|
+
|
|
12
|
+
Kivy has a few "global" instances that are used directly by many pieces of the
|
|
13
|
+
framework: `Cache`, `Builder`, `Clock`.
|
|
14
|
+
|
|
15
|
+
TODO: document this module.
|
|
16
|
+
|
|
17
|
+
'''
|
|
18
|
+
|
|
19
|
+
__all__ = ('Context', 'ProxyContext', 'register_context',
|
|
20
|
+
'get_current_context')
|
|
21
|
+
|
|
22
|
+
_contexts = {}
|
|
23
|
+
_default_context = None
|
|
24
|
+
_context_stack = []
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class ProxyContext(object):
|
|
28
|
+
|
|
29
|
+
__slots__ = ['_obj']
|
|
30
|
+
|
|
31
|
+
def __init__(self, obj):
|
|
32
|
+
object.__init__(self)
|
|
33
|
+
object.__setattr__(self, '_obj', obj)
|
|
34
|
+
|
|
35
|
+
def __getattribute__(self, name):
|
|
36
|
+
return getattr(object.__getattribute__(self, '_obj'), name)
|
|
37
|
+
|
|
38
|
+
def __delattr__(self, name):
|
|
39
|
+
delattr(object.__getattribute__(self, '_obj'), name)
|
|
40
|
+
|
|
41
|
+
def __setattr__(self, name, value):
|
|
42
|
+
setattr(object.__getattribute__(self, '_obj'), name, value)
|
|
43
|
+
|
|
44
|
+
def __bool__(self):
|
|
45
|
+
return bool(object.__getattribute__(self, '_obj'))
|
|
46
|
+
|
|
47
|
+
def __str__(self):
|
|
48
|
+
return str(object.__getattribute__(self, '_obj'))
|
|
49
|
+
|
|
50
|
+
def __repr__(self):
|
|
51
|
+
return repr(object.__getattribute__(self, '_obj'))
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
class Context(dict):
|
|
55
|
+
|
|
56
|
+
def __init__(self, init=False):
|
|
57
|
+
dict.__init__(self)
|
|
58
|
+
self.sandbox = None
|
|
59
|
+
if not init:
|
|
60
|
+
return
|
|
61
|
+
|
|
62
|
+
for name in _contexts:
|
|
63
|
+
context = _contexts[name]
|
|
64
|
+
instance = context['cls'](*context['args'], **context['kwargs'])
|
|
65
|
+
self[name] = instance
|
|
66
|
+
|
|
67
|
+
def push(self):
|
|
68
|
+
_context_stack.append(self)
|
|
69
|
+
for name, instance in self.items():
|
|
70
|
+
object.__setattr__(_contexts[name]['proxy'], '_obj', instance)
|
|
71
|
+
|
|
72
|
+
def pop(self):
|
|
73
|
+
# After popping context from stack. Update proxy's _obj with
|
|
74
|
+
# instances in current context
|
|
75
|
+
_context_stack.pop(-1)
|
|
76
|
+
for name, instance in get_current_context().items():
|
|
77
|
+
object.__setattr__(_contexts[name]['proxy'], '_obj', instance)
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
def register_context(name, cls, *args, **kwargs):
|
|
81
|
+
'''Register a new context.
|
|
82
|
+
'''
|
|
83
|
+
instance = cls(*args, **kwargs)
|
|
84
|
+
proxy = ProxyContext(instance)
|
|
85
|
+
_contexts[name] = {
|
|
86
|
+
'cls': cls,
|
|
87
|
+
'args': args,
|
|
88
|
+
'kwargs': kwargs,
|
|
89
|
+
'proxy': proxy}
|
|
90
|
+
_default_context[name] = instance
|
|
91
|
+
return proxy
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
def get_current_context():
|
|
95
|
+
'''Return the current context.
|
|
96
|
+
'''
|
|
97
|
+
if not _context_stack:
|
|
98
|
+
return _default_context
|
|
99
|
+
return _context_stack[-1]
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
_default_context = Context(init=False)
|
kivy/core/__init__.py
ADDED
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
'''
|
|
2
|
+
Core Abstraction
|
|
3
|
+
================
|
|
4
|
+
|
|
5
|
+
This module defines the abstraction layers for our core providers and their
|
|
6
|
+
implementations. For further information, please refer to
|
|
7
|
+
:ref:`architecture` and the :ref:`providers` section of the documentation.
|
|
8
|
+
|
|
9
|
+
In most cases, you shouldn't directly use a library that's already covered
|
|
10
|
+
by the core abstraction. Always try to use our providers first.
|
|
11
|
+
In case we are missing a feature or method, please let us know by
|
|
12
|
+
opening a new Bug report instead of relying on your library.
|
|
13
|
+
|
|
14
|
+
.. warning::
|
|
15
|
+
These are **not** widgets! These are just abstractions of the respective
|
|
16
|
+
functionality. For example, you cannot add a core image to your window.
|
|
17
|
+
You have to use the image **widget** class instead. If you're really
|
|
18
|
+
looking for widgets, please refer to :mod:`kivy.uix` instead.
|
|
19
|
+
'''
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
import os
|
|
23
|
+
import sysconfig
|
|
24
|
+
import sys
|
|
25
|
+
import traceback
|
|
26
|
+
import tempfile
|
|
27
|
+
import subprocess
|
|
28
|
+
import importlib
|
|
29
|
+
import kivy
|
|
30
|
+
from kivy.logger import Logger
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class CoreCriticalException(Exception):
|
|
34
|
+
pass
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def core_select_lib(category, llist, create_instance=False,
|
|
38
|
+
base='kivy.core', basemodule=None):
|
|
39
|
+
if 'KIVY_DOC' in os.environ:
|
|
40
|
+
return
|
|
41
|
+
category = category.lower()
|
|
42
|
+
basemodule = basemodule or category
|
|
43
|
+
libs_ignored = []
|
|
44
|
+
errs = []
|
|
45
|
+
for option, modulename, classname in llist:
|
|
46
|
+
try:
|
|
47
|
+
# module activated in config ?
|
|
48
|
+
try:
|
|
49
|
+
if option not in kivy.kivy_options[category]:
|
|
50
|
+
libs_ignored.append(modulename)
|
|
51
|
+
Logger.debug(
|
|
52
|
+
'{0}: Provider <{1}> ignored by config'.format(
|
|
53
|
+
category.capitalize(), option))
|
|
54
|
+
continue
|
|
55
|
+
except KeyError:
|
|
56
|
+
pass
|
|
57
|
+
|
|
58
|
+
# import module
|
|
59
|
+
mod = importlib.__import__(name='{2}.{0}.{1}'.format(
|
|
60
|
+
basemodule, modulename, base),
|
|
61
|
+
globals=globals(),
|
|
62
|
+
locals=locals(),
|
|
63
|
+
fromlist=[modulename], level=0)
|
|
64
|
+
cls = mod.__getattribute__(classname)
|
|
65
|
+
|
|
66
|
+
# ok !
|
|
67
|
+
Logger.info('{0}: Provider: {1}{2}'.format(
|
|
68
|
+
category.capitalize(), option,
|
|
69
|
+
'({0} ignored)'.format(libs_ignored) if libs_ignored else ''))
|
|
70
|
+
if create_instance:
|
|
71
|
+
cls = cls()
|
|
72
|
+
return cls
|
|
73
|
+
|
|
74
|
+
except ImportError as e:
|
|
75
|
+
errs.append((option, e, sys.exc_info()[2]))
|
|
76
|
+
libs_ignored.append(modulename)
|
|
77
|
+
Logger.debug('{0}: Ignored <{1}> (import error)'.format(
|
|
78
|
+
category.capitalize(), option))
|
|
79
|
+
Logger.trace('', exc_info=e)
|
|
80
|
+
|
|
81
|
+
except CoreCriticalException as e:
|
|
82
|
+
errs.append((option, e, sys.exc_info()[2]))
|
|
83
|
+
Logger.error('{0}: Unable to use {1}'.format(
|
|
84
|
+
category.capitalize(), option))
|
|
85
|
+
Logger.error(
|
|
86
|
+
'{0}: The module raised an important error: {1!r}'.format(
|
|
87
|
+
category.capitalize(), e.message))
|
|
88
|
+
raise
|
|
89
|
+
|
|
90
|
+
except Exception as e:
|
|
91
|
+
errs.append((option, e, sys.exc_info()[2]))
|
|
92
|
+
libs_ignored.append(modulename)
|
|
93
|
+
Logger.trace('{0}: Unable to use {1}'.format(
|
|
94
|
+
category.capitalize(), option))
|
|
95
|
+
Logger.trace('', exc_info=e)
|
|
96
|
+
|
|
97
|
+
err = '\n'.join(['{} - {}: {}\n{}'.format(opt, e.__class__.__name__, e,
|
|
98
|
+
''.join(traceback.format_tb(tb))) for opt, e, tb in errs])
|
|
99
|
+
Logger.critical(
|
|
100
|
+
'{0}: Unable to find any valuable {0} provider. Please enable '
|
|
101
|
+
'debug logging (e.g. add -d if running from the command line, or '
|
|
102
|
+
'change the log level in the config) and re-run your app to '
|
|
103
|
+
'identify potential causes\n{1}'.format(category.capitalize(), err))
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
def core_register_libs(category, libs, base='kivy.core'):
|
|
107
|
+
if 'KIVY_DOC' in os.environ:
|
|
108
|
+
return
|
|
109
|
+
category = category.lower()
|
|
110
|
+
kivy_options = kivy.kivy_options[category]
|
|
111
|
+
libs_loadable = {}
|
|
112
|
+
libs_ignored = []
|
|
113
|
+
|
|
114
|
+
for option, lib in libs:
|
|
115
|
+
# module activated in config ?
|
|
116
|
+
if option not in kivy_options:
|
|
117
|
+
Logger.debug('{0}: option <{1}> ignored by config'.format(
|
|
118
|
+
category.capitalize(), option))
|
|
119
|
+
libs_ignored.append(lib)
|
|
120
|
+
continue
|
|
121
|
+
libs_loadable[option] = lib
|
|
122
|
+
|
|
123
|
+
libs_loaded = []
|
|
124
|
+
for item in kivy_options:
|
|
125
|
+
try:
|
|
126
|
+
# import module
|
|
127
|
+
try:
|
|
128
|
+
lib = libs_loadable[item]
|
|
129
|
+
except KeyError:
|
|
130
|
+
continue
|
|
131
|
+
importlib.__import__(name='{2}.{0}.{1}'.format(category, lib, base),
|
|
132
|
+
globals=globals(),
|
|
133
|
+
locals=locals(),
|
|
134
|
+
fromlist=[lib],
|
|
135
|
+
level=0)
|
|
136
|
+
|
|
137
|
+
libs_loaded.append(lib)
|
|
138
|
+
|
|
139
|
+
except Exception as e:
|
|
140
|
+
Logger.trace('{0}: Unable to use <{1}> as loader!'.format(
|
|
141
|
+
category.capitalize(), option))
|
|
142
|
+
Logger.trace('', exc_info=e)
|
|
143
|
+
libs_ignored.append(lib)
|
|
144
|
+
|
|
145
|
+
Logger.info('{0}: Providers: {1} {2}'.format(
|
|
146
|
+
category.capitalize(),
|
|
147
|
+
', '.join(libs_loaded),
|
|
148
|
+
'({0} ignored)'.format(
|
|
149
|
+
', '.join(libs_ignored)) if libs_ignored else ''))
|
|
150
|
+
return libs_loaded
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
def handle_win_lib_import_error(category, provider, mod_name):
|
|
154
|
+
if sys.platform != 'win32':
|
|
155
|
+
return
|
|
156
|
+
|
|
157
|
+
assert mod_name.startswith('kivy.')
|
|
158
|
+
kivy_root = os.path.dirname(kivy.__file__)
|
|
159
|
+
dirs = mod_name[5:].split('.')
|
|
160
|
+
mod_path = os.path.join(kivy_root, *dirs)
|
|
161
|
+
|
|
162
|
+
# get the full expected path to the compiled pyd file
|
|
163
|
+
# filename is <debug>.cp<major><minor>-<platform>.pyd
|
|
164
|
+
# https://github.com/python/cpython/blob/master/Doc/whatsnew/3.5.rst
|
|
165
|
+
if hasattr(sys, 'gettotalrefcount'): # debug
|
|
166
|
+
mod_path += '._d'
|
|
167
|
+
mod_path += '.cp{}{}-{}.pyd'.format(
|
|
168
|
+
sys.version_info.major, sys.version_info.minor,
|
|
169
|
+
sysconfig.get_platform().replace('-', '_'))
|
|
170
|
+
|
|
171
|
+
# does the compiled pyd exist at all?
|
|
172
|
+
if not os.path.exists(mod_path):
|
|
173
|
+
Logger.debug(
|
|
174
|
+
'{}: Failed trying to import "{}" for provider {}. Compiled file '
|
|
175
|
+
'does not exist. Have you perhaps forgotten to compile Kivy, or '
|
|
176
|
+
'did not install all required dependencies?'.format(
|
|
177
|
+
category, provider, mod_path))
|
|
178
|
+
return
|
|
179
|
+
|
|
180
|
+
# tell user to provide dependency walker
|
|
181
|
+
env_var = 'KIVY_{}_DEPENDENCY_WALKER'.format(provider.upper())
|
|
182
|
+
if env_var not in os.environ:
|
|
183
|
+
Logger.debug(
|
|
184
|
+
'{0}: Failed trying to import the "{1}" provider from "{2}". '
|
|
185
|
+
'This error is often encountered when a dependency is missing,'
|
|
186
|
+
' or if there are multiple copies of the same dependency dll on '
|
|
187
|
+
'the Windows PATH and they are incompatible with each other. '
|
|
188
|
+
'This can occur if you are mixing installations (such as different'
|
|
189
|
+
' python installations, like anaconda python and a system python) '
|
|
190
|
+
'or if another unrelated program added its directory to the PATH. '
|
|
191
|
+
'Please examine your PATH and python installation for potential '
|
|
192
|
+
'issues. To further troubleshoot a "DLL load failed" error, '
|
|
193
|
+
'please download '
|
|
194
|
+
'"Dependency Walker" (64 or 32 bit version - matching your python '
|
|
195
|
+
'bitness) from dependencywalker.com and set the environment '
|
|
196
|
+
'variable {3} to the full path of the downloaded depends.exe file '
|
|
197
|
+
'and rerun your application to generate an error report'.
|
|
198
|
+
format(category, provider, mod_path, env_var))
|
|
199
|
+
return
|
|
200
|
+
|
|
201
|
+
depends_bin = os.environ[env_var]
|
|
202
|
+
if not os.path.exists(depends_bin):
|
|
203
|
+
raise ValueError('"{}" provided in {} does not exist'.format(
|
|
204
|
+
depends_bin, env_var))
|
|
205
|
+
|
|
206
|
+
# make file for the resultant log
|
|
207
|
+
fd, temp_file = tempfile.mkstemp(
|
|
208
|
+
suffix='.dwi', prefix='kivy_depends_{}_log_'.format(provider),
|
|
209
|
+
dir=os.path.expanduser('~/'))
|
|
210
|
+
os.close(fd)
|
|
211
|
+
|
|
212
|
+
Logger.info(
|
|
213
|
+
'{}: Running dependency walker "{}" on "{}" to generate '
|
|
214
|
+
'troubleshooting log. Please wait for it to complete'.format(
|
|
215
|
+
category, depends_bin, mod_path))
|
|
216
|
+
Logger.debug(
|
|
217
|
+
'{}: Dependency walker command is "{}"'.format(
|
|
218
|
+
category,
|
|
219
|
+
[depends_bin, '/c', '/od:{}'.format(temp_file), mod_path]))
|
|
220
|
+
|
|
221
|
+
try:
|
|
222
|
+
subprocess.check_output([
|
|
223
|
+
depends_bin, '/c', '/od:{}'.format(temp_file), mod_path])
|
|
224
|
+
except subprocess.CalledProcessError as exc:
|
|
225
|
+
if exc.returncode >= 0x00010000:
|
|
226
|
+
Logger.error(
|
|
227
|
+
'{}: Dependency walker failed with error code "{}". No '
|
|
228
|
+
'error report was generated'.
|
|
229
|
+
format(category, exc.returncode))
|
|
230
|
+
return
|
|
231
|
+
|
|
232
|
+
Logger.info(
|
|
233
|
+
'{}: dependency walker generated "{}" containing troubleshooting '
|
|
234
|
+
'information about provider {} and its failing file "{} ({})". You '
|
|
235
|
+
'can open the file in dependency walker to view any potential issues '
|
|
236
|
+
'and troubleshoot it yourself. '
|
|
237
|
+
'To share the file with the Kivy developers and request support, '
|
|
238
|
+
'please contact us at our support channels '
|
|
239
|
+
'https://kivy.org/doc/master/contact.html (not on github, unless '
|
|
240
|
+
'it\'s truly a bug). Make sure to provide the generated file as well '
|
|
241
|
+
'as the *complete* Kivy log being printed here. Keep in mind the '
|
|
242
|
+
'generated dependency walker log file contains paths to dlls on your '
|
|
243
|
+
'system used by kivy or its dependencies to help troubleshoot them, '
|
|
244
|
+
'and these paths may include your name in them. Please view the '
|
|
245
|
+
'log file in dependency walker before sharing to ensure you are not '
|
|
246
|
+
'sharing sensitive paths'.format(
|
|
247
|
+
category, temp_file, provider, mod_name, mod_path))
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
'''
|
|
2
|
+
Audio
|
|
3
|
+
=====
|
|
4
|
+
|
|
5
|
+
Load an audio sound and play it with::
|
|
6
|
+
|
|
7
|
+
from kivy.core.audio import SoundLoader
|
|
8
|
+
|
|
9
|
+
sound = SoundLoader.load('mytest.wav')
|
|
10
|
+
if sound:
|
|
11
|
+
print("Sound found at %s" % sound.source)
|
|
12
|
+
print("Sound is %.3f seconds" % sound.length)
|
|
13
|
+
sound.play()
|
|
14
|
+
|
|
15
|
+
You should not use the Sound class directly. The class returned by
|
|
16
|
+
:func:`SoundLoader.load` will be the best sound provider for that particular
|
|
17
|
+
file type, so it might return different Sound classes depending the file type.
|
|
18
|
+
|
|
19
|
+
Event dispatching and state changes
|
|
20
|
+
-----------------------------------
|
|
21
|
+
|
|
22
|
+
Audio is often processed in parallel to your code. This means you often need to
|
|
23
|
+
enter the Kivy :func:`eventloop <kivy.base.EventLoopBase>` in order to allow
|
|
24
|
+
events and state changes to be dispatched correctly.
|
|
25
|
+
|
|
26
|
+
You seldom need to worry about this as Kivy apps typically always
|
|
27
|
+
require this event loop for the GUI to remain responsive, but it is good to
|
|
28
|
+
keep this in mind when debugging or running in a
|
|
29
|
+
`REPL <https://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print_loop>`_
|
|
30
|
+
(Read-eval-print loop).
|
|
31
|
+
|
|
32
|
+
.. versionchanged:: 1.10.0
|
|
33
|
+
The pygst and gi providers have been removed.
|
|
34
|
+
|
|
35
|
+
.. versionchanged:: 1.8.0
|
|
36
|
+
There are now 2 distinct Gstreamer implementations: one using Gi/Gst
|
|
37
|
+
working for both Python 2+3 with Gstreamer 1.0, and one using PyGST
|
|
38
|
+
working only for Python 2 + Gstreamer 0.10.
|
|
39
|
+
|
|
40
|
+
.. note::
|
|
41
|
+
|
|
42
|
+
The core audio library does not support recording audio. If you require
|
|
43
|
+
this functionality, please refer to the
|
|
44
|
+
`audiostream <https://github.com/kivy/audiostream>`_ extension.
|
|
45
|
+
|
|
46
|
+
'''
|
|
47
|
+
|
|
48
|
+
__all__ = ('Sound', 'SoundLoader')
|
|
49
|
+
|
|
50
|
+
from kivy.logger import Logger
|
|
51
|
+
from kivy.event import EventDispatcher
|
|
52
|
+
from kivy.core import core_register_libs
|
|
53
|
+
from kivy.resources import resource_find
|
|
54
|
+
from kivy.properties import StringProperty, NumericProperty, OptionProperty, \
|
|
55
|
+
AliasProperty, BooleanProperty, BoundedNumericProperty
|
|
56
|
+
from kivy.utils import platform
|
|
57
|
+
from kivy.setupconfig import USE_SDL2
|
|
58
|
+
|
|
59
|
+
from sys import float_info
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
class SoundLoader:
|
|
63
|
+
'''Load a sound, using the best loader for the given file type.
|
|
64
|
+
'''
|
|
65
|
+
|
|
66
|
+
_classes = []
|
|
67
|
+
|
|
68
|
+
@staticmethod
|
|
69
|
+
def register(classobj):
|
|
70
|
+
'''Register a new class to load the sound.'''
|
|
71
|
+
Logger.debug('Audio: register %s' % classobj.__name__)
|
|
72
|
+
SoundLoader._classes.append(classobj)
|
|
73
|
+
|
|
74
|
+
@staticmethod
|
|
75
|
+
def load(filename):
|
|
76
|
+
'''Load a sound, and return a Sound() instance.'''
|
|
77
|
+
rfn = resource_find(filename)
|
|
78
|
+
if rfn is not None:
|
|
79
|
+
filename = rfn
|
|
80
|
+
ext = filename.split('.')[-1].lower()
|
|
81
|
+
if '?' in ext:
|
|
82
|
+
ext = ext.split('?')[0]
|
|
83
|
+
for classobj in SoundLoader._classes:
|
|
84
|
+
if ext in classobj.extensions():
|
|
85
|
+
return classobj(source=filename)
|
|
86
|
+
Logger.warning('Audio: Unable to find a loader for <%s>' %
|
|
87
|
+
filename)
|
|
88
|
+
return None
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
class Sound(EventDispatcher):
|
|
92
|
+
'''Represents a sound to play. This class is abstract, and cannot be used
|
|
93
|
+
directly.
|
|
94
|
+
|
|
95
|
+
Use SoundLoader to load a sound.
|
|
96
|
+
|
|
97
|
+
:Events:
|
|
98
|
+
`on_play`: None
|
|
99
|
+
Fired when the sound is played.
|
|
100
|
+
`on_stop`: None
|
|
101
|
+
Fired when the sound is stopped.
|
|
102
|
+
'''
|
|
103
|
+
|
|
104
|
+
source = StringProperty(None)
|
|
105
|
+
'''Filename / source of your audio file.
|
|
106
|
+
|
|
107
|
+
.. versionadded:: 1.3.0
|
|
108
|
+
|
|
109
|
+
:attr:`source` is a :class:`~kivy.properties.StringProperty` that defaults
|
|
110
|
+
to None and is read-only. Use the :meth:`SoundLoader.load` for loading
|
|
111
|
+
audio.
|
|
112
|
+
'''
|
|
113
|
+
|
|
114
|
+
volume = NumericProperty(1.)
|
|
115
|
+
'''Volume, in the range 0-1. 1 means full volume, 0 means mute.
|
|
116
|
+
|
|
117
|
+
.. versionadded:: 1.3.0
|
|
118
|
+
|
|
119
|
+
:attr:`volume` is a :class:`~kivy.properties.NumericProperty` and defaults
|
|
120
|
+
to 1.
|
|
121
|
+
'''
|
|
122
|
+
|
|
123
|
+
pitch = BoundedNumericProperty(1., min=float_info.epsilon)
|
|
124
|
+
'''Pitch of a sound. 2 is an octave higher, .5 one below. This is only
|
|
125
|
+
implemented for SDL2 audio provider yet.
|
|
126
|
+
|
|
127
|
+
.. versionadded:: 1.10.0
|
|
128
|
+
|
|
129
|
+
:attr:`pitch` is a :class:`~kivy.properties.NumericProperty` and defaults
|
|
130
|
+
to 1.
|
|
131
|
+
'''
|
|
132
|
+
|
|
133
|
+
state = OptionProperty('stop', options=('stop', 'play'))
|
|
134
|
+
'''State of the sound, one of 'stop' or 'play'.
|
|
135
|
+
|
|
136
|
+
.. versionadded:: 1.3.0
|
|
137
|
+
|
|
138
|
+
:attr:`state` is a read-only :class:`~kivy.properties.OptionProperty`.'''
|
|
139
|
+
|
|
140
|
+
loop = BooleanProperty(False)
|
|
141
|
+
'''Set to True if the sound should automatically loop when it finishes.
|
|
142
|
+
|
|
143
|
+
.. versionadded:: 1.8.0
|
|
144
|
+
|
|
145
|
+
:attr:`loop` is a :class:`~kivy.properties.BooleanProperty` and defaults to
|
|
146
|
+
False.'''
|
|
147
|
+
|
|
148
|
+
__events__ = ('on_play', 'on_stop')
|
|
149
|
+
|
|
150
|
+
def on_source(self, instance, filename):
|
|
151
|
+
self.unload()
|
|
152
|
+
if filename is None:
|
|
153
|
+
return
|
|
154
|
+
self.load()
|
|
155
|
+
|
|
156
|
+
def get_pos(self):
|
|
157
|
+
'''
|
|
158
|
+
Returns the current position of the audio file.
|
|
159
|
+
Returns 0 if not playing.
|
|
160
|
+
|
|
161
|
+
.. versionadded:: 1.4.1
|
|
162
|
+
'''
|
|
163
|
+
return 0
|
|
164
|
+
|
|
165
|
+
def _get_length(self):
|
|
166
|
+
return 0
|
|
167
|
+
|
|
168
|
+
length = property(lambda self: self._get_length(),
|
|
169
|
+
doc='Get length of the sound (in seconds).')
|
|
170
|
+
|
|
171
|
+
def load(self):
|
|
172
|
+
'''Load the file into memory.'''
|
|
173
|
+
pass
|
|
174
|
+
|
|
175
|
+
def unload(self):
|
|
176
|
+
'''Unload the file from memory.'''
|
|
177
|
+
pass
|
|
178
|
+
|
|
179
|
+
def play(self):
|
|
180
|
+
'''Play the file.'''
|
|
181
|
+
self.state = 'play'
|
|
182
|
+
self.dispatch('on_play')
|
|
183
|
+
|
|
184
|
+
def stop(self):
|
|
185
|
+
'''Stop playback.'''
|
|
186
|
+
self.state = 'stop'
|
|
187
|
+
self.dispatch('on_stop')
|
|
188
|
+
|
|
189
|
+
def seek(self, position):
|
|
190
|
+
'''Go to the <position> (in seconds).
|
|
191
|
+
|
|
192
|
+
.. note::
|
|
193
|
+
Most sound providers cannot seek when the audio is stopped.
|
|
194
|
+
Play then seek.
|
|
195
|
+
'''
|
|
196
|
+
pass
|
|
197
|
+
|
|
198
|
+
def on_play(self):
|
|
199
|
+
pass
|
|
200
|
+
|
|
201
|
+
def on_stop(self):
|
|
202
|
+
pass
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
# Little trick here, don't activate gstreamer on window
|
|
206
|
+
# seem to have lot of crackle or something...
|
|
207
|
+
audio_libs = []
|
|
208
|
+
if platform == 'android':
|
|
209
|
+
audio_libs += [('android', 'audio_android')]
|
|
210
|
+
elif platform in ('macosx', 'ios'):
|
|
211
|
+
audio_libs += [('avplayer', 'audio_avplayer')]
|
|
212
|
+
try:
|
|
213
|
+
from kivy.lib.gstplayer import GstPlayer # NOQA
|
|
214
|
+
audio_libs += [('gstplayer', 'audio_gstplayer')]
|
|
215
|
+
except ImportError:
|
|
216
|
+
pass
|
|
217
|
+
audio_libs += [('ffpyplayer', 'audio_ffpyplayer')]
|
|
218
|
+
if USE_SDL2:
|
|
219
|
+
audio_libs += [('sdl2', 'audio_sdl2')]
|
|
220
|
+
else:
|
|
221
|
+
audio_libs += [('pygame', 'audio_pygame')]
|
|
222
|
+
|
|
223
|
+
libs_loaded = core_register_libs('audio', audio_libs)
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"""
|
|
2
|
+
AudioAndroid: Kivy audio implementation for Android using native API
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
__all__ = ("SoundAndroidPlayer", )
|
|
6
|
+
|
|
7
|
+
from jnius import autoclass, java_method, PythonJavaClass
|
|
8
|
+
from android import api_version
|
|
9
|
+
from kivy.core.audio import Sound, SoundLoader
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
MediaPlayer = autoclass("android.media.MediaPlayer")
|
|
13
|
+
AudioManager = autoclass("android.media.AudioManager")
|
|
14
|
+
if api_version >= 21:
|
|
15
|
+
AudioAttributesBuilder = autoclass("android.media.AudioAttributes$Builder")
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class OnCompletionListener(PythonJavaClass):
|
|
19
|
+
__javainterfaces__ = ["android/media/MediaPlayer$OnCompletionListener"]
|
|
20
|
+
__javacontext__ = "app"
|
|
21
|
+
|
|
22
|
+
def __init__(self, callback, **kwargs):
|
|
23
|
+
super(OnCompletionListener, self).__init__(**kwargs)
|
|
24
|
+
self.callback = callback
|
|
25
|
+
|
|
26
|
+
@java_method("(Landroid/media/MediaPlayer;)V")
|
|
27
|
+
def onCompletion(self, mp):
|
|
28
|
+
self.callback()
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class SoundAndroidPlayer(Sound):
|
|
32
|
+
@staticmethod
|
|
33
|
+
def extensions():
|
|
34
|
+
return ("mp3", "mp4", "aac", "3gp", "flac", "mkv", "wav", "ogg", "m4a",
|
|
35
|
+
"gsm", "mid", "xmf", "mxmf", "rtttl", "rtx", "ota", "imy")
|
|
36
|
+
|
|
37
|
+
def __init__(self, **kwargs):
|
|
38
|
+
self._mediaplayer = None
|
|
39
|
+
self._completion_listener = None
|
|
40
|
+
super(SoundAndroidPlayer, self).__init__(**kwargs)
|
|
41
|
+
|
|
42
|
+
def load(self):
|
|
43
|
+
self.unload()
|
|
44
|
+
self._mediaplayer = MediaPlayer()
|
|
45
|
+
if api_version >= 21:
|
|
46
|
+
self._mediaplayer.setAudioAttributes(
|
|
47
|
+
AudioAttributesBuilder()
|
|
48
|
+
.setLegacyStreamType(AudioManager.STREAM_MUSIC)
|
|
49
|
+
.build())
|
|
50
|
+
else:
|
|
51
|
+
self._mediaplayer.setAudioStreamType(AudioManager.STREAM_MUSIC)
|
|
52
|
+
self._mediaplayer.setDataSource(self.source)
|
|
53
|
+
self._completion_listener = OnCompletionListener(
|
|
54
|
+
self._completion_callback
|
|
55
|
+
)
|
|
56
|
+
self._mediaplayer.setOnCompletionListener(self._completion_listener)
|
|
57
|
+
self._mediaplayer.prepare()
|
|
58
|
+
|
|
59
|
+
def unload(self):
|
|
60
|
+
if self._mediaplayer:
|
|
61
|
+
self._mediaplayer.release()
|
|
62
|
+
self._mediaplayer = None
|
|
63
|
+
|
|
64
|
+
def play(self):
|
|
65
|
+
if not self._mediaplayer:
|
|
66
|
+
return
|
|
67
|
+
self._mediaplayer.start()
|
|
68
|
+
super(SoundAndroidPlayer, self).play()
|
|
69
|
+
|
|
70
|
+
def stop(self):
|
|
71
|
+
if not self._mediaplayer:
|
|
72
|
+
return
|
|
73
|
+
self._mediaplayer.stop()
|
|
74
|
+
self._mediaplayer.prepare()
|
|
75
|
+
|
|
76
|
+
def seek(self, position):
|
|
77
|
+
if not self._mediaplayer:
|
|
78
|
+
return
|
|
79
|
+
self._mediaplayer.seekTo(float(position) * 1000)
|
|
80
|
+
|
|
81
|
+
def get_pos(self):
|
|
82
|
+
if self._mediaplayer:
|
|
83
|
+
return self._mediaplayer.getCurrentPosition() / 1000.
|
|
84
|
+
return super(SoundAndroidPlayer, self).get_pos()
|
|
85
|
+
|
|
86
|
+
def on_volume(self, instance, volume):
|
|
87
|
+
if self._mediaplayer:
|
|
88
|
+
volume = float(volume)
|
|
89
|
+
self._mediaplayer.setVolume(volume, volume)
|
|
90
|
+
|
|
91
|
+
def _completion_callback(self):
|
|
92
|
+
super(SoundAndroidPlayer, self).stop()
|
|
93
|
+
|
|
94
|
+
def _get_length(self):
|
|
95
|
+
if self._mediaplayer:
|
|
96
|
+
return self._mediaplayer.getDuration() / 1000.
|
|
97
|
+
return super(SoundAndroidPlayer, self)._get_length()
|
|
98
|
+
|
|
99
|
+
def on_loop(self, instance, loop):
|
|
100
|
+
if self._mediaplayer:
|
|
101
|
+
self._mediaplayer.setLooping(loop)
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
SoundLoader.register(SoundAndroidPlayer)
|