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/config.py
ADDED
|
@@ -0,0 +1,1004 @@
|
|
|
1
|
+
'''
|
|
2
|
+
Configuration object
|
|
3
|
+
====================
|
|
4
|
+
|
|
5
|
+
The :class:`Config` object is an instance of a modified Python ConfigParser.
|
|
6
|
+
See the `ConfigParser documentation
|
|
7
|
+
<http://docs.python.org/library/configparser.html>`_ for more information.
|
|
8
|
+
|
|
9
|
+
Kivy has a configuration file which determines the default settings. In
|
|
10
|
+
order to change these settings, you can alter this file manually or use
|
|
11
|
+
the Config object. Please see the :ref:`Configure Kivy` section for more
|
|
12
|
+
information.
|
|
13
|
+
|
|
14
|
+
Applying configurations
|
|
15
|
+
-----------------------
|
|
16
|
+
|
|
17
|
+
Configuration options control the initialization of the :class:`~kivy.app.App`.
|
|
18
|
+
In order to avoid situations where the config settings do not work or are not
|
|
19
|
+
applied before window creation (like setting an initial window size),
|
|
20
|
+
:meth:`Config.set <kivy.config.ConfigParser.set>` should be used before
|
|
21
|
+
importing any other Kivy modules. Ideally, this means setting them right at
|
|
22
|
+
the start of your main.py script.
|
|
23
|
+
|
|
24
|
+
Alternatively, you can save these settings permanently using
|
|
25
|
+
:meth:`Config.set <ConfigParser.set>` then
|
|
26
|
+
:meth:`Config.write <ConfigParser.write>`. In this case, you will need to
|
|
27
|
+
restart the app for the changes to take effect. Note that this approach will
|
|
28
|
+
effect all Kivy apps system wide.
|
|
29
|
+
|
|
30
|
+
Please note that no underscores (`_`) are allowed in the section name.
|
|
31
|
+
|
|
32
|
+
Usage of the Config object
|
|
33
|
+
--------------------------
|
|
34
|
+
|
|
35
|
+
To read a configuration token from a particular section::
|
|
36
|
+
|
|
37
|
+
>>> from kivy.config import Config
|
|
38
|
+
>>> Config.getint('kivy', 'show_fps')
|
|
39
|
+
0
|
|
40
|
+
|
|
41
|
+
Change the configuration and save it::
|
|
42
|
+
|
|
43
|
+
>>> Config.set('postproc', 'retain_time', '50')
|
|
44
|
+
>>> Config.write()
|
|
45
|
+
|
|
46
|
+
For information on configuring your :class:`~kivy.app.App`, please see the
|
|
47
|
+
:ref:`Application configuration` section.
|
|
48
|
+
|
|
49
|
+
.. versionchanged:: 1.7.1
|
|
50
|
+
The ConfigParser should work correctly with utf-8 now. The values are
|
|
51
|
+
converted from ascii to unicode only when needed. The method get() returns
|
|
52
|
+
utf-8 strings.
|
|
53
|
+
|
|
54
|
+
Changing configuration with environment variables
|
|
55
|
+
-------------------------------------------------
|
|
56
|
+
|
|
57
|
+
Since 1.11.0, it is now possible to change the configuration using
|
|
58
|
+
environment variables. They take precedence on the loaded config.ini.
|
|
59
|
+
The format is::
|
|
60
|
+
|
|
61
|
+
KCFG_<section>_<key> = <value>
|
|
62
|
+
|
|
63
|
+
For example:
|
|
64
|
+
|
|
65
|
+
KCFG_GRAPHICS_FULLSCREEN=auto ...
|
|
66
|
+
KCFG_KIVY_LOG_LEVEL=warning ...
|
|
67
|
+
|
|
68
|
+
Or in your file before any kivy import:
|
|
69
|
+
|
|
70
|
+
import os
|
|
71
|
+
os.environ["KCFG_KIVY_LOG_LEVEL"] = "warning"
|
|
72
|
+
|
|
73
|
+
If you don't want to map any environment variables, you can disable
|
|
74
|
+
the behavior::
|
|
75
|
+
|
|
76
|
+
os.environ["KIVY_NO_ENV_CONFIG"] = "1"
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
.. _configuration-tokens:
|
|
80
|
+
|
|
81
|
+
Available configuration tokens
|
|
82
|
+
------------------------------
|
|
83
|
+
|
|
84
|
+
.. |log_levels| replace::
|
|
85
|
+
'trace', 'debug', 'info', 'warning', 'error' or 'critical'
|
|
86
|
+
|
|
87
|
+
:kivy:
|
|
88
|
+
|
|
89
|
+
`default_font`: list
|
|
90
|
+
Default fonts used for widgets displaying any text. It defaults to
|
|
91
|
+
['Roboto', 'data/fonts/Roboto-Regular.ttf',
|
|
92
|
+
'data/fonts/Roboto-Italic.ttf', 'data/fonts/Roboto-Bold.ttf',
|
|
93
|
+
'data/fonts/Roboto-BoldItalic.ttf'].
|
|
94
|
+
`desktop`: int, 0 or 1
|
|
95
|
+
This option controls desktop OS specific features, such as enabling
|
|
96
|
+
drag-able scroll-bar in scroll views, disabling of bubbles in
|
|
97
|
+
TextInput etc. 0 is disabled, 1 is enabled.
|
|
98
|
+
`exit_on_escape`: int, 0 or 1
|
|
99
|
+
Enables exiting kivy when escape is pressed.
|
|
100
|
+
0 is disabled, 1 is enabled.
|
|
101
|
+
`pause_on_minimize`: int, 0 or 1
|
|
102
|
+
If set to `1`, the main loop is paused and the `on_pause` event
|
|
103
|
+
is dispatched when the window is minimized. This option is intended
|
|
104
|
+
for desktop use only. Defaults to `0`.
|
|
105
|
+
`keyboard_layout`: string
|
|
106
|
+
Identifier of the layout to use.
|
|
107
|
+
`keyboard_mode`: string
|
|
108
|
+
Specifies the keyboard mode to use. If can be one of the following:
|
|
109
|
+
|
|
110
|
+
* '' - Let Kivy choose the best option for your current platform.
|
|
111
|
+
* 'system' - real keyboard.
|
|
112
|
+
* 'dock' - one virtual keyboard docked to a screen side.
|
|
113
|
+
* 'multi' - one virtual keyboard for every widget request.
|
|
114
|
+
* 'systemanddock' - virtual docked keyboard plus input from real
|
|
115
|
+
keyboard.
|
|
116
|
+
* 'systemandmulti' - analogous.
|
|
117
|
+
`kivy_clock`: one of `default`, `interrupt`, `free_all`, `free_only`
|
|
118
|
+
The clock type to use with kivy. See :mod:`kivy.clock`.
|
|
119
|
+
`log_dir`: string
|
|
120
|
+
Path of log directory.
|
|
121
|
+
`log_enable`: int, 0 or 1
|
|
122
|
+
Activate file logging. 0 is disabled, 1 is enabled.
|
|
123
|
+
|
|
124
|
+
.. note::
|
|
125
|
+
Logging output can also be controlled by the environment variables
|
|
126
|
+
``KIVY_LOG_MODE``, ``KIVY_NO_FILELOG`` and ``KIVY_NO_CONSOLELOG``.
|
|
127
|
+
More information is provided in the :mod:`kivy.logger` module.
|
|
128
|
+
|
|
129
|
+
`log_level`: string, one of |log_levels|
|
|
130
|
+
Set the minimum log level to use.
|
|
131
|
+
`log_name`: string
|
|
132
|
+
Format string to use for the filename of log file.
|
|
133
|
+
|
|
134
|
+
`log_maxfiles`: int
|
|
135
|
+
Keep log_maxfiles recent logfiles while purging the log directory. Set
|
|
136
|
+
'log_maxfiles' to -1 to disable logfile purging (eg keep all logfiles).
|
|
137
|
+
|
|
138
|
+
.. note::
|
|
139
|
+
You end up with 'log_maxfiles + 1' logfiles because the logger
|
|
140
|
+
adds a new one after purging.
|
|
141
|
+
|
|
142
|
+
`window_icon`: string
|
|
143
|
+
Path of the window icon. Use this if you want to replace the default
|
|
144
|
+
pygame icon.
|
|
145
|
+
|
|
146
|
+
:postproc:
|
|
147
|
+
|
|
148
|
+
`double_tap_distance`: float
|
|
149
|
+
Maximum distance allowed for a double tap, normalized inside the range
|
|
150
|
+
0 - 1000.
|
|
151
|
+
`double_tap_time`: int
|
|
152
|
+
Time allowed for the detection of double tap, in milliseconds.
|
|
153
|
+
`ignore`: list of tuples
|
|
154
|
+
List of regions where new touches are ignored.
|
|
155
|
+
This configuration token can be used to resolve hotspot problems
|
|
156
|
+
with DIY hardware. The format of the list must be::
|
|
157
|
+
|
|
158
|
+
ignore = [(xmin, ymin, xmax, ymax), ...]
|
|
159
|
+
|
|
160
|
+
All the values must be inside the range 0 - 1.
|
|
161
|
+
`jitter_distance`: int
|
|
162
|
+
Maximum distance for jitter detection, normalized inside the range 0
|
|
163
|
+
- 1000.
|
|
164
|
+
`jitter_ignore_devices`: string, separated with commas
|
|
165
|
+
List of devices to ignore from jitter detection.
|
|
166
|
+
`retain_distance`: int
|
|
167
|
+
If the touch moves more than is indicated by retain_distance, it will
|
|
168
|
+
not be retained. Argument should be an int between 0 and 1000.
|
|
169
|
+
`retain_time`: int
|
|
170
|
+
Time allowed for a retain touch, in milliseconds.
|
|
171
|
+
`triple_tap_distance`: float
|
|
172
|
+
Maximum distance allowed for a triple tap, normalized inside the range
|
|
173
|
+
0 - 1000.
|
|
174
|
+
`triple_tap_time`: int
|
|
175
|
+
Time allowed for the detection of triple tap, in milliseconds.
|
|
176
|
+
|
|
177
|
+
:graphics:
|
|
178
|
+
`borderless`: int, one of 0 or 1
|
|
179
|
+
If set to `1`, removes the window border/decoration. Window resizing
|
|
180
|
+
must also be disabled to hide the resizing border.
|
|
181
|
+
`custom_titlebar`: int, one of 0 or 1
|
|
182
|
+
If set to `1`, removes the window border and allows user to set a Widget
|
|
183
|
+
as a titlebar
|
|
184
|
+
see :meth:`~kivy.core.window.WindowBase.set_custom_titlebar`
|
|
185
|
+
for detailed usage
|
|
186
|
+
`custom_titlebar_border`: int, defaults to 5
|
|
187
|
+
sets the how many pixles off the border should be used as the
|
|
188
|
+
rezising frame
|
|
189
|
+
`window_state`: string , one of 'visible', 'hidden', 'maximized'
|
|
190
|
+
or 'minimized'
|
|
191
|
+
|
|
192
|
+
Sets the window state, defaults to 'visible'. This option is available
|
|
193
|
+
only for the SDL2 window provider and it should be used on desktop
|
|
194
|
+
OSes.
|
|
195
|
+
`fbo`: string, one of 'hardware', 'software' or 'force-hardware'
|
|
196
|
+
Selects the FBO backend to use.
|
|
197
|
+
`fullscreen`: int or string, one of 0, 1, 'fake' or 'auto'
|
|
198
|
+
Activate fullscreen. If set to `1`, a resolution of `width`
|
|
199
|
+
times `height` pixels will be used.
|
|
200
|
+
If set to `auto`, your current display's resolution will be
|
|
201
|
+
used instead. This is most likely what you want.
|
|
202
|
+
If you want to place the window in another display,
|
|
203
|
+
use `fake`, or set the `borderless` option from the graphics section,
|
|
204
|
+
then adjust `width`, `height`, `top` and `left`.
|
|
205
|
+
`height`: int
|
|
206
|
+
Height of the :class:`~kivy.core.window.Window`, not used if
|
|
207
|
+
`fullscreen` is set to `auto`.
|
|
208
|
+
`left`: int
|
|
209
|
+
Left position of the :class:`~kivy.core.window.Window`.
|
|
210
|
+
`maxfps`: int, defaults to 60
|
|
211
|
+
Maximum FPS allowed.
|
|
212
|
+
|
|
213
|
+
.. warning::
|
|
214
|
+
Setting maxfps to 0 will lead to max CPU usage.
|
|
215
|
+
|
|
216
|
+
'multisamples': int, defaults to 2
|
|
217
|
+
Sets the `MultiSample Anti-Aliasing (MSAA)
|
|
218
|
+
<http://en.wikipedia.org/wiki/Multisample_anti-aliasing>`_ level.
|
|
219
|
+
Increasing this value results in smoother graphics but at the cost of
|
|
220
|
+
processing time.
|
|
221
|
+
|
|
222
|
+
.. note::
|
|
223
|
+
This feature is limited by device hardware support and will have no
|
|
224
|
+
effect on devices which do not support the level of MSAA requested.
|
|
225
|
+
|
|
226
|
+
`position`: string, one of 'auto' or 'custom'
|
|
227
|
+
Position of the window on your display. If `auto` is used, you have no
|
|
228
|
+
control of the initial position: `top` and `left` are ignored.
|
|
229
|
+
`show_cursor`: int, one of 0 or 1
|
|
230
|
+
Set whether or not the cursor is shown on the window.
|
|
231
|
+
`top`: int
|
|
232
|
+
Top position of the :class:`~kivy.core.window.Window`.
|
|
233
|
+
`resizable`: int, one of 0 or 1
|
|
234
|
+
If 0, the window will have a fixed size. If 1, the window will be
|
|
235
|
+
resizable.
|
|
236
|
+
`rotation`: int, one of 0, 90, 180 or 270
|
|
237
|
+
Rotation of the :class:`~kivy.core.window.Window`.
|
|
238
|
+
`width`: int
|
|
239
|
+
Width of the :class:`~kivy.core.window.Window`, not used if
|
|
240
|
+
`fullscreen` is set to `auto`.
|
|
241
|
+
`minimum_width`: int
|
|
242
|
+
Minimum width to restrict the window to. (sdl2 only)
|
|
243
|
+
`minimum_height`: int
|
|
244
|
+
Minimum height to restrict the window to. (sdl2 only)
|
|
245
|
+
`min_state_time`: float, defaults to .035
|
|
246
|
+
Minimum time for widgets to display a given visual state.
|
|
247
|
+
This attrib is currently used by widgets like
|
|
248
|
+
:class:`~kivy.uix.dropdown.DropDown` &
|
|
249
|
+
:class:`~kivy.uix.behaviors.buttonbehavior.ButtonBehavior` to
|
|
250
|
+
make sure they display their current visual state for the given
|
|
251
|
+
time.
|
|
252
|
+
`always_on_top`: int, one of ``0`` or ``1``, defaults to ``0``
|
|
253
|
+
When enabled, the window will be brought to the front and will keep
|
|
254
|
+
the window above the rest. Only works for the sdl2 window provider.
|
|
255
|
+
``0`` is disabled, ``1`` is enabled.
|
|
256
|
+
`show_taskbar_icon`: int, one of ``0`` or ``1``, defaults to ``1``
|
|
257
|
+
Determines whether the app's icon will be added to the taskbar. Only
|
|
258
|
+
applicable for the SDL2 window provider.
|
|
259
|
+
``0`` means the icon will not be shown in the taskbar and ``1`` means
|
|
260
|
+
it will.
|
|
261
|
+
`allow_screensaver`: int, one of 0 or 1, defaults to 1
|
|
262
|
+
Allow the device to show a screen saver, or to go to sleep
|
|
263
|
+
on mobile devices. Only works for the sdl2 window provider.
|
|
264
|
+
`vsync`: `none`, empty value, or integers
|
|
265
|
+
Whether vsync is enabled, currently only used with sdl2 window.
|
|
266
|
+
Possible values are `none` or empty value -- leaves it unchanged,
|
|
267
|
+
``0`` -- disables vsync, ``1`` or larger -- sets vsync interval,
|
|
268
|
+
``-1`` sets adaptive vsync. It falls back to 1 if setting to ``2+``
|
|
269
|
+
or ``-1`` failed. See ``SDL_GL_SetSwapInterval``.
|
|
270
|
+
`verify_gl_main_thread`: int, 1 or 0, defaults to 1
|
|
271
|
+
Whether to check if code that changes any gl instructions is
|
|
272
|
+
running outside the main thread and then raise an error.
|
|
273
|
+
|
|
274
|
+
:input:
|
|
275
|
+
|
|
276
|
+
You can create new input devices using this syntax::
|
|
277
|
+
|
|
278
|
+
# example of input provider instance
|
|
279
|
+
yourid = providerid,parameters
|
|
280
|
+
|
|
281
|
+
# example for tuio provider
|
|
282
|
+
default = tuio,127.0.0.1:3333
|
|
283
|
+
mytable = tuio,192.168.0.1:3334
|
|
284
|
+
|
|
285
|
+
.. seealso::
|
|
286
|
+
|
|
287
|
+
Check the providers in :mod:`kivy.input.providers` for the syntax to
|
|
288
|
+
use inside the configuration file.
|
|
289
|
+
|
|
290
|
+
:widgets:
|
|
291
|
+
|
|
292
|
+
`scroll_distance`: int
|
|
293
|
+
Default value of the
|
|
294
|
+
:attr:`~kivy.uix.scrollview.ScrollView.scroll_distance`
|
|
295
|
+
property used by the :class:`~kivy.uix.scrollview.ScrollView` widget.
|
|
296
|
+
Check the widget documentation for more information.
|
|
297
|
+
|
|
298
|
+
`scroll_friction`: float
|
|
299
|
+
Default value of the
|
|
300
|
+
:attr:`~kivy.uix.scrollview.ScrollView.scroll_friction`
|
|
301
|
+
property used by the :class:`~kivy.uix.scrollview.ScrollView` widget.
|
|
302
|
+
Check the widget documentation for more information.
|
|
303
|
+
|
|
304
|
+
.. deprecated:: 1.7.0
|
|
305
|
+
Please use
|
|
306
|
+
:class:`~kivy.uix.scrollview.ScrollView.effect_cls` instead.
|
|
307
|
+
|
|
308
|
+
`scroll_timeout`: int
|
|
309
|
+
Default value of the
|
|
310
|
+
:attr:`~kivy.uix.scrollview.ScrollView.scroll_timeout`
|
|
311
|
+
property used by the :class:`~kivy.uix.scrollview.ScrollView` widget.
|
|
312
|
+
Check the widget documentation for more information.
|
|
313
|
+
|
|
314
|
+
`scroll_stoptime`: int
|
|
315
|
+
Default value of the
|
|
316
|
+
:attr:`~kivy.uix.scrollview.ScrollView.scroll_stoptime`
|
|
317
|
+
property used by the :class:`~kivy.uix.scrollview.ScrollView` widget.
|
|
318
|
+
Check the widget documentation for more information.
|
|
319
|
+
|
|
320
|
+
.. deprecated:: 1.7.0
|
|
321
|
+
Please use
|
|
322
|
+
:class:`~kivy.uix.scrollview.ScrollView.effect_cls` instead.
|
|
323
|
+
|
|
324
|
+
`scroll_moves`: int
|
|
325
|
+
Default value of the
|
|
326
|
+
:attr:`~kivy.uix.scrollview.ScrollView.scroll_moves`
|
|
327
|
+
property used by the :class:`~kivy.uix.scrollview.ScrollView` widget.
|
|
328
|
+
Check the widget documentation for more information.
|
|
329
|
+
|
|
330
|
+
.. deprecated:: 1.7.0
|
|
331
|
+
Please use
|
|
332
|
+
:class:`~kivy.uix.scrollview.ScrollView.effect_cls` instead.
|
|
333
|
+
|
|
334
|
+
:modules:
|
|
335
|
+
|
|
336
|
+
You can activate modules with this syntax::
|
|
337
|
+
|
|
338
|
+
modulename =
|
|
339
|
+
|
|
340
|
+
Anything after the = will be passed to the module as arguments.
|
|
341
|
+
Check the specific module's documentation for a list of accepted
|
|
342
|
+
arguments.
|
|
343
|
+
|
|
344
|
+
.. versionadded:: 2.2.0
|
|
345
|
+
`always_on_top` have been added to the `graphics` section.
|
|
346
|
+
`show_taskbar_icon` have been added to the `graphics` section.
|
|
347
|
+
|
|
348
|
+
.. versionchanged:: 2.2.0
|
|
349
|
+
`implementation` has been added to the network section.
|
|
350
|
+
|
|
351
|
+
.. versionchanged:: 2.1.0
|
|
352
|
+
`vsync` has been added to the graphics section.
|
|
353
|
+
`verify_gl_main_thread` has been added to the graphics section.
|
|
354
|
+
|
|
355
|
+
.. versionchanged:: 1.10.0
|
|
356
|
+
`min_state_time` and `allow_screensaver` have been added
|
|
357
|
+
to the `graphics` section.
|
|
358
|
+
`kivy_clock` has been added to the kivy section.
|
|
359
|
+
`default_font` has beed added to the kivy section.
|
|
360
|
+
`useragent` has been added to the network section.
|
|
361
|
+
|
|
362
|
+
.. versionchanged:: 1.9.0
|
|
363
|
+
`borderless` and `window_state` have been added to the graphics section.
|
|
364
|
+
The `fake` setting of the `fullscreen` option has been deprecated,
|
|
365
|
+
use the `borderless` option instead.
|
|
366
|
+
`pause_on_minimize` has been added to the kivy section.
|
|
367
|
+
|
|
368
|
+
.. versionchanged:: 1.8.0
|
|
369
|
+
`systemanddock` and `systemandmulti` has been added as possible values for
|
|
370
|
+
`keyboard_mode` in the kivy section. `exit_on_escape` has been added
|
|
371
|
+
to the kivy section.
|
|
372
|
+
|
|
373
|
+
.. versionchanged:: 1.2.0
|
|
374
|
+
`resizable` has been added to graphics section.
|
|
375
|
+
|
|
376
|
+
.. versionchanged:: 1.1.0
|
|
377
|
+
tuio no longer listens by default. Window icons are not copied to
|
|
378
|
+
user directory anymore. You can still set a new window icon by using the
|
|
379
|
+
``window_icon`` config setting.
|
|
380
|
+
|
|
381
|
+
.. versionchanged:: 1.0.8
|
|
382
|
+
`scroll_timeout`, `scroll_distance` and `scroll_friction` have been added.
|
|
383
|
+
`list_friction`, `list_trigger_distance` and `list_friction_bound`
|
|
384
|
+
have been removed. `keyboard_type` and `keyboard_layout` have been
|
|
385
|
+
removed from the widget. `keyboard_mode` and `keyboard_layout` have
|
|
386
|
+
been added to the kivy section.
|
|
387
|
+
'''
|
|
388
|
+
|
|
389
|
+
__all__ = ('Config', 'ConfigParser')
|
|
390
|
+
|
|
391
|
+
try:
|
|
392
|
+
from ConfigParser import ConfigParser as PythonConfigParser
|
|
393
|
+
except ImportError:
|
|
394
|
+
from configparser import RawConfigParser as PythonConfigParser
|
|
395
|
+
from collections import OrderedDict
|
|
396
|
+
from os import environ
|
|
397
|
+
from os.path import exists
|
|
398
|
+
from weakref import ref
|
|
399
|
+
|
|
400
|
+
from kivy import kivy_config_fn
|
|
401
|
+
from kivy.compat import PY2, string_types
|
|
402
|
+
from kivy.logger import Logger, logger_config_update
|
|
403
|
+
from kivy.utils import platform
|
|
404
|
+
|
|
405
|
+
_is_rpi = exists('/opt/vc/include/bcm_host.h')
|
|
406
|
+
|
|
407
|
+
# Version number of current configuration format
|
|
408
|
+
KIVY_CONFIG_VERSION = 27
|
|
409
|
+
|
|
410
|
+
Config = None
|
|
411
|
+
'''The default Kivy configuration object. This is a :class:`ConfigParser`
|
|
412
|
+
instance with the :attr:`~kivy.config.ConfigParser.name` set to 'kivy'.
|
|
413
|
+
|
|
414
|
+
.. code-block:: python
|
|
415
|
+
|
|
416
|
+
Config = ConfigParser(name='kivy')
|
|
417
|
+
|
|
418
|
+
'''
|
|
419
|
+
|
|
420
|
+
|
|
421
|
+
class ConfigParser(PythonConfigParser, object):
|
|
422
|
+
'''Enhanced ConfigParser class that supports the addition of default
|
|
423
|
+
sections and default values.
|
|
424
|
+
|
|
425
|
+
By default, the kivy ConfigParser instance, :attr:`~kivy.config.Config`,
|
|
426
|
+
is named `'kivy'` and the ConfigParser instance used by the
|
|
427
|
+
:meth:`App.build_settings <~kivy.app.App.build_settings>` method is named
|
|
428
|
+
`'app'`.
|
|
429
|
+
|
|
430
|
+
:Parameters:
|
|
431
|
+
`name`: string
|
|
432
|
+
The name of the instance. See :attr:`name`. Defaults to `''`.
|
|
433
|
+
|
|
434
|
+
.. versionchanged:: 1.9.0
|
|
435
|
+
Each ConfigParser can now be :attr:`named <name>`. You can get the
|
|
436
|
+
ConfigParser associated with a name using :meth:`get_configparser`.
|
|
437
|
+
In addition, you can now control the config values with
|
|
438
|
+
:class:`~kivy.properties.ConfigParserProperty`.
|
|
439
|
+
|
|
440
|
+
.. versionadded:: 1.0.7
|
|
441
|
+
'''
|
|
442
|
+
|
|
443
|
+
def __init__(self, name='', **kwargs):
|
|
444
|
+
PythonConfigParser.__init__(self, **kwargs)
|
|
445
|
+
self._sections = OrderedDict()
|
|
446
|
+
self.filename = None
|
|
447
|
+
self._callbacks = []
|
|
448
|
+
self.name = name
|
|
449
|
+
|
|
450
|
+
def add_callback(self, callback, section=None, key=None):
|
|
451
|
+
'''Add a callback to be called when a specific section or key has
|
|
452
|
+
changed. If you don't specify a section or key, it will call the
|
|
453
|
+
callback for all section/key changes.
|
|
454
|
+
|
|
455
|
+
Callbacks will receive 3 arguments: the section, key and value.
|
|
456
|
+
|
|
457
|
+
.. versionadded:: 1.4.1
|
|
458
|
+
'''
|
|
459
|
+
if section is None and key is not None:
|
|
460
|
+
raise Exception('You cannot specify a key without a section')
|
|
461
|
+
self._callbacks.append((callback, section, key))
|
|
462
|
+
|
|
463
|
+
def remove_callback(self, callback, section=None, key=None):
|
|
464
|
+
'''Removes a callback added with :meth:`add_callback`.
|
|
465
|
+
:meth:`remove_callback` must be called with the same parameters as
|
|
466
|
+
:meth:`add_callback`.
|
|
467
|
+
|
|
468
|
+
Raises a `ValueError` if not found.
|
|
469
|
+
|
|
470
|
+
.. versionadded:: 1.9.0
|
|
471
|
+
'''
|
|
472
|
+
self._callbacks.remove((callback, section, key))
|
|
473
|
+
|
|
474
|
+
def _do_callbacks(self, section, key, value):
|
|
475
|
+
for callback, csection, ckey in self._callbacks:
|
|
476
|
+
if csection is not None and csection != section:
|
|
477
|
+
continue
|
|
478
|
+
elif ckey is not None and ckey != key:
|
|
479
|
+
continue
|
|
480
|
+
callback(section, key, value)
|
|
481
|
+
|
|
482
|
+
def read(self, filename):
|
|
483
|
+
'''Read only one filename. In contrast to the original ConfigParser of
|
|
484
|
+
Python, this one is able to read only one file at a time. The last
|
|
485
|
+
read file will be used for the :meth:`write` method.
|
|
486
|
+
|
|
487
|
+
.. versionchanged:: 1.9.0
|
|
488
|
+
:meth:`read` now calls the callbacks if read changed any values.
|
|
489
|
+
|
|
490
|
+
'''
|
|
491
|
+
if not isinstance(filename, string_types):
|
|
492
|
+
raise Exception('Only one filename is accepted ({})'.format(
|
|
493
|
+
string_types.__name__))
|
|
494
|
+
self.filename = filename
|
|
495
|
+
# If we try to open directly the configuration file in utf-8,
|
|
496
|
+
# we correctly get the unicode value by default.
|
|
497
|
+
# But, when we try to save it again, all the values we didn't changed
|
|
498
|
+
# are still unicode, and then the PythonConfigParser internal do
|
|
499
|
+
# a str() conversion -> fail.
|
|
500
|
+
# Instead we currently to the conversion to utf-8 when value are
|
|
501
|
+
# "get()", but we internally store them in ascii.
|
|
502
|
+
# with codecs.open(filename, 'r', encoding='utf-8') as f:
|
|
503
|
+
# self.readfp(f)
|
|
504
|
+
old_vals = {sect: {k: v for k, v in self.items(sect)} for sect in
|
|
505
|
+
self.sections()}
|
|
506
|
+
PythonConfigParser.read(self, filename, encoding="utf-8-sig")
|
|
507
|
+
|
|
508
|
+
# when reading new file, sections/keys are only increased, not removed
|
|
509
|
+
f = self._do_callbacks
|
|
510
|
+
for section in self.sections():
|
|
511
|
+
if section not in old_vals: # new section
|
|
512
|
+
for k, v in self.items(section):
|
|
513
|
+
f(section, k, v)
|
|
514
|
+
continue
|
|
515
|
+
|
|
516
|
+
old_keys = old_vals[section]
|
|
517
|
+
for k, v in self.items(section): # just update new/changed keys
|
|
518
|
+
if k not in old_keys or v != old_keys[k]:
|
|
519
|
+
f(section, k, v)
|
|
520
|
+
|
|
521
|
+
def set(self, section, option, value):
|
|
522
|
+
'''Functions similarly to PythonConfigParser's set method, except that
|
|
523
|
+
the value is implicitly converted to a string.
|
|
524
|
+
'''
|
|
525
|
+
e_value = value
|
|
526
|
+
if not isinstance(value, string_types):
|
|
527
|
+
# might be boolean, int, etc.
|
|
528
|
+
e_value = str(value)
|
|
529
|
+
ret = PythonConfigParser.set(self, section, option, e_value)
|
|
530
|
+
self._do_callbacks(section, option, value)
|
|
531
|
+
return ret
|
|
532
|
+
|
|
533
|
+
def setall(self, section, keyvalues):
|
|
534
|
+
'''Sets multiple key-value pairs in a section. keyvalues should be a
|
|
535
|
+
dictionary containing the key-value pairs to be set.
|
|
536
|
+
'''
|
|
537
|
+
for key, value in keyvalues.items():
|
|
538
|
+
self.set(section, key, value)
|
|
539
|
+
|
|
540
|
+
def get(self, section, option, **kwargs):
|
|
541
|
+
value = PythonConfigParser.get(self, section, option, **kwargs)
|
|
542
|
+
if PY2:
|
|
543
|
+
if type(value) is str:
|
|
544
|
+
return value.decode('utf-8')
|
|
545
|
+
return value
|
|
546
|
+
|
|
547
|
+
def setdefaults(self, section, keyvalues):
|
|
548
|
+
'''Set multiple key-value defaults in a section. keyvalues should be
|
|
549
|
+
a dictionary containing the new key-value defaults.
|
|
550
|
+
'''
|
|
551
|
+
self.adddefaultsection(section)
|
|
552
|
+
for key, value in keyvalues.items():
|
|
553
|
+
self.setdefault(section, key, value)
|
|
554
|
+
|
|
555
|
+
def setdefault(self, section, option, value):
|
|
556
|
+
'''Set the default value for an option in the specified section.
|
|
557
|
+
'''
|
|
558
|
+
if self.has_option(section, option):
|
|
559
|
+
return
|
|
560
|
+
self.set(section, option, value)
|
|
561
|
+
|
|
562
|
+
def getdefault(self, section, option, defaultvalue):
|
|
563
|
+
'''Get the value of an option in the specified section. If not found,
|
|
564
|
+
it will return the default value.
|
|
565
|
+
'''
|
|
566
|
+
if not self.has_section(section):
|
|
567
|
+
return defaultvalue
|
|
568
|
+
if not self.has_option(section, option):
|
|
569
|
+
return defaultvalue
|
|
570
|
+
return self.get(section, option)
|
|
571
|
+
|
|
572
|
+
def getdefaultint(self, section, option, defaultvalue):
|
|
573
|
+
'''Get the value of an option in the specified section. If not found,
|
|
574
|
+
it will return the default value. The value will always be
|
|
575
|
+
returned as an integer.
|
|
576
|
+
|
|
577
|
+
.. versionadded:: 1.6.0
|
|
578
|
+
'''
|
|
579
|
+
return int(self.getdefault(section, option, defaultvalue))
|
|
580
|
+
|
|
581
|
+
def adddefaultsection(self, section):
|
|
582
|
+
'''Add a section if the section is missing.
|
|
583
|
+
'''
|
|
584
|
+
assert "_" not in section
|
|
585
|
+
if self.has_section(section):
|
|
586
|
+
return
|
|
587
|
+
self.add_section(section)
|
|
588
|
+
|
|
589
|
+
def write(self):
|
|
590
|
+
'''Write the configuration to the last file opened using the
|
|
591
|
+
:meth:`read` method.
|
|
592
|
+
|
|
593
|
+
Return True if the write finished successfully, False otherwise.
|
|
594
|
+
'''
|
|
595
|
+
if self.filename is None:
|
|
596
|
+
return False
|
|
597
|
+
try:
|
|
598
|
+
with open(self.filename, 'w', encoding="utf-8") as fd:
|
|
599
|
+
PythonConfigParser.write(self, fd)
|
|
600
|
+
except IOError:
|
|
601
|
+
Logger.exception('Unable to write the config <%s>' % self.filename)
|
|
602
|
+
return False
|
|
603
|
+
return True
|
|
604
|
+
|
|
605
|
+
def update_config(self, filename, overwrite=False):
|
|
606
|
+
'''Upgrade the configuration based on a new default config file.
|
|
607
|
+
Overwrite any existing values if overwrite is True.
|
|
608
|
+
'''
|
|
609
|
+
pcp = PythonConfigParser()
|
|
610
|
+
pcp.read(filename)
|
|
611
|
+
confset = self.setall if overwrite else self.setdefaults
|
|
612
|
+
for section in pcp.sections():
|
|
613
|
+
confset(section, dict(pcp.items(section)))
|
|
614
|
+
self.write()
|
|
615
|
+
|
|
616
|
+
@staticmethod
|
|
617
|
+
def _register_named_property(name, widget_ref, *largs):
|
|
618
|
+
''' Called by the ConfigParserProperty to register a property which
|
|
619
|
+
was created with a config name instead of a config object.
|
|
620
|
+
|
|
621
|
+
When a ConfigParser with this name is later created, the properties
|
|
622
|
+
are then notified that this parser now exists so they can use it.
|
|
623
|
+
If the parser already exists, the property is notified here. See
|
|
624
|
+
:meth:`~kivy.properties.ConfigParserProperty.set_config`.
|
|
625
|
+
|
|
626
|
+
:Parameters:
|
|
627
|
+
`name`: a non-empty string
|
|
628
|
+
The name of the ConfigParser that is associated with the
|
|
629
|
+
property. See :attr:`name`.
|
|
630
|
+
`widget_ref`: 2-tuple.
|
|
631
|
+
The first element is a reference to the widget containing the
|
|
632
|
+
property, the second element is the name of the property. E.g.:
|
|
633
|
+
|
|
634
|
+
class House(Widget):
|
|
635
|
+
address = ConfigParserProperty('', 'info', 'street',
|
|
636
|
+
'directory')
|
|
637
|
+
|
|
638
|
+
Then, the first element is a ref to a House instance, and the
|
|
639
|
+
second is `'address'`.
|
|
640
|
+
'''
|
|
641
|
+
configs = ConfigParser._named_configs
|
|
642
|
+
try:
|
|
643
|
+
config, props = configs[name]
|
|
644
|
+
except KeyError:
|
|
645
|
+
configs[name] = (None, [widget_ref])
|
|
646
|
+
return
|
|
647
|
+
|
|
648
|
+
props.append(widget_ref)
|
|
649
|
+
if config:
|
|
650
|
+
config = config()
|
|
651
|
+
widget = widget_ref[0]()
|
|
652
|
+
|
|
653
|
+
if config and widget: # associate this config with property
|
|
654
|
+
widget.property(widget_ref[1]).set_config(config)
|
|
655
|
+
|
|
656
|
+
@staticmethod
|
|
657
|
+
def get_configparser(name):
|
|
658
|
+
'''Returns the :class:`ConfigParser` instance whose name is `name`, or
|
|
659
|
+
None if not found.
|
|
660
|
+
|
|
661
|
+
:Parameters:
|
|
662
|
+
`name`: string
|
|
663
|
+
The name of the :class:`ConfigParser` instance to return.
|
|
664
|
+
'''
|
|
665
|
+
try:
|
|
666
|
+
config = ConfigParser._named_configs[name][0]
|
|
667
|
+
if config is not None:
|
|
668
|
+
config = config()
|
|
669
|
+
if config is not None:
|
|
670
|
+
return config
|
|
671
|
+
del ConfigParser._named_configs[name]
|
|
672
|
+
except KeyError:
|
|
673
|
+
return None
|
|
674
|
+
|
|
675
|
+
# keys are configparser names, values are 2-tuple of (ref(configparser),
|
|
676
|
+
# widget_ref), where widget_ref is same as in _register_named_property
|
|
677
|
+
_named_configs = {}
|
|
678
|
+
_name = ''
|
|
679
|
+
|
|
680
|
+
@property
|
|
681
|
+
def name(self):
|
|
682
|
+
''' The name associated with this ConfigParser instance, if not `''`.
|
|
683
|
+
Defaults to `''`. It can be safely changed dynamically or set to `''`.
|
|
684
|
+
|
|
685
|
+
When a ConfigParser is given a name, that config object can be
|
|
686
|
+
retrieved using :meth:`get_configparser`. In addition, that config
|
|
687
|
+
instance can also be used with a
|
|
688
|
+
:class:`~kivy.properties.ConfigParserProperty` instance that set its
|
|
689
|
+
`config` value to this name.
|
|
690
|
+
|
|
691
|
+
Setting more than one ConfigParser with the same name will raise a
|
|
692
|
+
`ValueError`.
|
|
693
|
+
'''
|
|
694
|
+
return self._name
|
|
695
|
+
|
|
696
|
+
@name.setter
|
|
697
|
+
def name(self, value):
|
|
698
|
+
old_name = self._name
|
|
699
|
+
if value is old_name:
|
|
700
|
+
return
|
|
701
|
+
self._name = value
|
|
702
|
+
configs = ConfigParser._named_configs
|
|
703
|
+
|
|
704
|
+
if old_name: # disconnect this parser from previously connected props
|
|
705
|
+
_, props = configs.get(old_name, (None, []))
|
|
706
|
+
for widget, prop in props:
|
|
707
|
+
widget = widget()
|
|
708
|
+
if widget:
|
|
709
|
+
widget.property(prop).set_config(None)
|
|
710
|
+
configs[old_name] = (None, props)
|
|
711
|
+
|
|
712
|
+
if not value:
|
|
713
|
+
return
|
|
714
|
+
|
|
715
|
+
# if given new name, connect it with property that used this name
|
|
716
|
+
try:
|
|
717
|
+
config, props = configs[value]
|
|
718
|
+
except KeyError:
|
|
719
|
+
configs[value] = (ref(self), [])
|
|
720
|
+
return
|
|
721
|
+
|
|
722
|
+
if config is not None and config() is not None:
|
|
723
|
+
raise ValueError('A parser named {} already exists'.format(value))
|
|
724
|
+
for widget, prop in props:
|
|
725
|
+
widget = widget()
|
|
726
|
+
if widget:
|
|
727
|
+
widget.property(prop).set_config(self)
|
|
728
|
+
configs[value] = (ref(self), props)
|
|
729
|
+
|
|
730
|
+
|
|
731
|
+
if not environ.get('KIVY_DOC_INCLUDE'):
|
|
732
|
+
|
|
733
|
+
#
|
|
734
|
+
# Read, analyse configuration file
|
|
735
|
+
# Support upgrade of older config file versions
|
|
736
|
+
#
|
|
737
|
+
|
|
738
|
+
# Create default configuration
|
|
739
|
+
Config = ConfigParser(name='kivy')
|
|
740
|
+
Config.add_callback(logger_config_update, 'kivy', 'log_level')
|
|
741
|
+
|
|
742
|
+
# Read config file if exist
|
|
743
|
+
if (exists(kivy_config_fn) and
|
|
744
|
+
'KIVY_USE_DEFAULTCONFIG' not in environ and
|
|
745
|
+
'KIVY_NO_CONFIG' not in environ):
|
|
746
|
+
try:
|
|
747
|
+
Config.read(kivy_config_fn)
|
|
748
|
+
except Exception:
|
|
749
|
+
Logger.exception('Core: error while reading local'
|
|
750
|
+
'configuration')
|
|
751
|
+
|
|
752
|
+
version = Config.getdefaultint('kivy', 'config_version', 0)
|
|
753
|
+
|
|
754
|
+
# Add defaults section
|
|
755
|
+
Config.adddefaultsection('kivy')
|
|
756
|
+
Config.adddefaultsection('graphics')
|
|
757
|
+
Config.adddefaultsection('input')
|
|
758
|
+
Config.adddefaultsection('postproc')
|
|
759
|
+
Config.adddefaultsection('widgets')
|
|
760
|
+
Config.adddefaultsection('modules')
|
|
761
|
+
Config.adddefaultsection('network')
|
|
762
|
+
|
|
763
|
+
# Upgrade default configuration until we have the current version
|
|
764
|
+
need_save = False
|
|
765
|
+
if version != KIVY_CONFIG_VERSION and 'KIVY_NO_CONFIG' not in environ:
|
|
766
|
+
Logger.warning('Config: Older configuration version detected'
|
|
767
|
+
' ({0} instead of {1})'.format(
|
|
768
|
+
version, KIVY_CONFIG_VERSION))
|
|
769
|
+
Logger.warning('Config: Upgrading configuration in progress.')
|
|
770
|
+
need_save = True
|
|
771
|
+
|
|
772
|
+
while version < KIVY_CONFIG_VERSION:
|
|
773
|
+
Logger.debug('Config: Upgrading from %d to %d' %
|
|
774
|
+
(version, version + 1))
|
|
775
|
+
|
|
776
|
+
if version == 0:
|
|
777
|
+
|
|
778
|
+
# log level
|
|
779
|
+
Config.setdefault('kivy', 'keyboard_repeat_delay', '300')
|
|
780
|
+
Config.setdefault('kivy', 'keyboard_repeat_rate', '30')
|
|
781
|
+
Config.setdefault('kivy', 'log_dir', 'logs')
|
|
782
|
+
Config.setdefault('kivy', 'log_enable', '1')
|
|
783
|
+
Config.setdefault('kivy', 'log_level', 'info')
|
|
784
|
+
Config.setdefault('kivy', 'log_name', 'kivy_%y-%m-%d_%_.txt')
|
|
785
|
+
Config.setdefault('kivy', 'window_icon', '')
|
|
786
|
+
|
|
787
|
+
# default graphics parameters
|
|
788
|
+
Config.setdefault('graphics', 'display', '-1')
|
|
789
|
+
Config.setdefault('graphics', 'fullscreen', 'no')
|
|
790
|
+
Config.setdefault('graphics', 'height', '600')
|
|
791
|
+
Config.setdefault('graphics', 'left', '0')
|
|
792
|
+
Config.setdefault('graphics', 'maxfps', '0')
|
|
793
|
+
Config.setdefault('graphics', 'multisamples', '2')
|
|
794
|
+
Config.setdefault('graphics', 'position', 'auto')
|
|
795
|
+
Config.setdefault('graphics', 'rotation', '0')
|
|
796
|
+
Config.setdefault('graphics', 'show_cursor', '1')
|
|
797
|
+
Config.setdefault('graphics', 'top', '0')
|
|
798
|
+
Config.setdefault('graphics', 'width', '800')
|
|
799
|
+
|
|
800
|
+
# input configuration
|
|
801
|
+
Config.setdefault('input', 'mouse', 'mouse')
|
|
802
|
+
|
|
803
|
+
# activate native input provider in configuration
|
|
804
|
+
# from 1.0.9, don't activate mactouch by default, or app are
|
|
805
|
+
# unusable.
|
|
806
|
+
if platform == 'win':
|
|
807
|
+
Config.setdefault('input', 'wm_touch', 'wm_touch')
|
|
808
|
+
Config.setdefault('input', 'wm_pen', 'wm_pen')
|
|
809
|
+
elif platform == 'linux':
|
|
810
|
+
probesysfs = 'probesysfs'
|
|
811
|
+
if _is_rpi:
|
|
812
|
+
probesysfs += ',provider=hidinput'
|
|
813
|
+
Config.setdefault('input', '%(name)s', probesysfs)
|
|
814
|
+
|
|
815
|
+
# input postprocessing configuration
|
|
816
|
+
Config.setdefault('postproc', 'double_tap_distance', '20')
|
|
817
|
+
Config.setdefault('postproc', 'double_tap_time', '250')
|
|
818
|
+
Config.setdefault('postproc', 'ignore', '[]')
|
|
819
|
+
Config.setdefault('postproc', 'jitter_distance', '0')
|
|
820
|
+
Config.setdefault('postproc', 'jitter_ignore_devices',
|
|
821
|
+
'mouse,mactouch,')
|
|
822
|
+
Config.setdefault('postproc', 'retain_distance', '50')
|
|
823
|
+
Config.setdefault('postproc', 'retain_time', '0')
|
|
824
|
+
|
|
825
|
+
# default configuration for keyboard repetition
|
|
826
|
+
Config.setdefault('widgets', 'keyboard_layout', 'qwerty')
|
|
827
|
+
Config.setdefault('widgets', 'keyboard_type', '')
|
|
828
|
+
Config.setdefault('widgets', 'list_friction', '10')
|
|
829
|
+
Config.setdefault('widgets', 'list_friction_bound', '20')
|
|
830
|
+
Config.setdefault('widgets', 'list_trigger_distance', '5')
|
|
831
|
+
|
|
832
|
+
elif version == 1:
|
|
833
|
+
Config.set('graphics', 'maxfps', '60')
|
|
834
|
+
|
|
835
|
+
elif version == 2:
|
|
836
|
+
# was a version to automatically copy windows icon in the user
|
|
837
|
+
# directory, but it's now not used anymore. User can still change
|
|
838
|
+
# the window icon by touching the config.
|
|
839
|
+
pass
|
|
840
|
+
|
|
841
|
+
elif version == 3:
|
|
842
|
+
# add token for scrollview
|
|
843
|
+
Config.setdefault('widgets', 'scroll_timeout', '55')
|
|
844
|
+
Config.setdefault('widgets', 'scroll_distance', '20')
|
|
845
|
+
Config.setdefault('widgets', 'scroll_friction', '1.')
|
|
846
|
+
|
|
847
|
+
# remove old list_* token
|
|
848
|
+
Config.remove_option('widgets', 'list_friction')
|
|
849
|
+
Config.remove_option('widgets', 'list_friction_bound')
|
|
850
|
+
Config.remove_option('widgets', 'list_trigger_distance')
|
|
851
|
+
|
|
852
|
+
elif version == 4:
|
|
853
|
+
Config.remove_option('widgets', 'keyboard_type')
|
|
854
|
+
Config.remove_option('widgets', 'keyboard_layout')
|
|
855
|
+
|
|
856
|
+
# add keyboard token
|
|
857
|
+
Config.setdefault('kivy', 'keyboard_mode', '')
|
|
858
|
+
Config.setdefault('kivy', 'keyboard_layout', 'qwerty')
|
|
859
|
+
|
|
860
|
+
elif version == 5:
|
|
861
|
+
Config.setdefault('graphics', 'resizable', '1')
|
|
862
|
+
|
|
863
|
+
elif version == 6:
|
|
864
|
+
# if the timeout is still the default value, change it
|
|
865
|
+
Config.setdefault('widgets', 'scroll_stoptime', '300')
|
|
866
|
+
Config.setdefault('widgets', 'scroll_moves', '5')
|
|
867
|
+
|
|
868
|
+
elif version == 7:
|
|
869
|
+
# desktop bool indicating whether to use desktop specific features
|
|
870
|
+
is_desktop = int(platform in ('win', 'macosx', 'linux'))
|
|
871
|
+
Config.setdefault('kivy', 'desktop', is_desktop)
|
|
872
|
+
Config.setdefault('postproc', 'triple_tap_distance', '20')
|
|
873
|
+
Config.setdefault('postproc', 'triple_tap_time', '375')
|
|
874
|
+
|
|
875
|
+
elif version == 8:
|
|
876
|
+
if Config.getint('widgets', 'scroll_timeout') == 55:
|
|
877
|
+
Config.set('widgets', 'scroll_timeout', '250')
|
|
878
|
+
|
|
879
|
+
elif version == 9:
|
|
880
|
+
Config.setdefault('kivy', 'exit_on_escape', '1')
|
|
881
|
+
|
|
882
|
+
elif version == 10:
|
|
883
|
+
Config.set('graphics', 'fullscreen', '0')
|
|
884
|
+
Config.setdefault('graphics', 'borderless', '0')
|
|
885
|
+
|
|
886
|
+
elif version == 11:
|
|
887
|
+
Config.setdefault('kivy', 'pause_on_minimize', '0')
|
|
888
|
+
|
|
889
|
+
elif version == 12:
|
|
890
|
+
Config.setdefault('graphics', 'window_state', 'visible')
|
|
891
|
+
|
|
892
|
+
elif version == 13:
|
|
893
|
+
Config.setdefault('graphics', 'minimum_width', '0')
|
|
894
|
+
Config.setdefault('graphics', 'minimum_height', '0')
|
|
895
|
+
|
|
896
|
+
elif version == 14:
|
|
897
|
+
Config.setdefault('graphics', 'min_state_time', '.035')
|
|
898
|
+
|
|
899
|
+
elif version == 15:
|
|
900
|
+
Config.setdefault('kivy', 'kivy_clock', 'default')
|
|
901
|
+
|
|
902
|
+
elif version == 16:
|
|
903
|
+
Config.setdefault('kivy', 'default_font', [
|
|
904
|
+
'Roboto',
|
|
905
|
+
'data/fonts/Roboto-Regular.ttf',
|
|
906
|
+
'data/fonts/Roboto-Italic.ttf',
|
|
907
|
+
'data/fonts/Roboto-Bold.ttf',
|
|
908
|
+
'data/fonts/Roboto-BoldItalic.ttf'])
|
|
909
|
+
|
|
910
|
+
elif version == 17:
|
|
911
|
+
Config.setdefault('graphics', 'allow_screensaver', '1')
|
|
912
|
+
|
|
913
|
+
elif version == 18:
|
|
914
|
+
Config.setdefault('kivy', 'log_maxfiles', '100')
|
|
915
|
+
|
|
916
|
+
elif version == 19:
|
|
917
|
+
Config.setdefault('graphics', 'shaped', '0')
|
|
918
|
+
Config.setdefault(
|
|
919
|
+
'kivy', 'window_shape',
|
|
920
|
+
'data/images/defaultshape.png'
|
|
921
|
+
)
|
|
922
|
+
|
|
923
|
+
elif version == 20:
|
|
924
|
+
Config.setdefault('network', 'useragent', 'curl')
|
|
925
|
+
|
|
926
|
+
elif version == 21:
|
|
927
|
+
Config.setdefault('graphics', 'vsync', '')
|
|
928
|
+
|
|
929
|
+
elif version == 22:
|
|
930
|
+
Config.setdefault('graphics', 'verify_gl_main_thread', '1')
|
|
931
|
+
|
|
932
|
+
elif version == 23:
|
|
933
|
+
Config.setdefault('graphics', 'custom_titlebar', '0')
|
|
934
|
+
Config.setdefault('graphics', 'custom_titlebar_border', '5')
|
|
935
|
+
|
|
936
|
+
elif version == 24:
|
|
937
|
+
Config.setdefault("network", "implementation", "default")
|
|
938
|
+
|
|
939
|
+
elif version == 25:
|
|
940
|
+
Config.setdefault('graphics', 'always_on_top', '0')
|
|
941
|
+
|
|
942
|
+
elif version == 26:
|
|
943
|
+
Config.setdefault("graphics", "show_taskbar_icon", "1")
|
|
944
|
+
|
|
945
|
+
# WARNING: When adding a new version migration here,
|
|
946
|
+
# don't forget to increment KIVY_CONFIG_VERSION !
|
|
947
|
+
else:
|
|
948
|
+
# for future.
|
|
949
|
+
break
|
|
950
|
+
|
|
951
|
+
# Pass to the next version
|
|
952
|
+
version += 1
|
|
953
|
+
|
|
954
|
+
# Indicate to the Config that we've upgrade to the latest version.
|
|
955
|
+
Config.set('kivy', 'config_version', KIVY_CONFIG_VERSION)
|
|
956
|
+
|
|
957
|
+
# Now, activate log file
|
|
958
|
+
Logger.logfile_activated = bool(Config.getint('kivy', 'log_enable'))
|
|
959
|
+
|
|
960
|
+
# If no configuration exist, write the default one.
|
|
961
|
+
if ((not exists(kivy_config_fn) or need_save) and
|
|
962
|
+
'KIVY_NO_CONFIG' not in environ):
|
|
963
|
+
try:
|
|
964
|
+
Config.filename = kivy_config_fn
|
|
965
|
+
Config.write()
|
|
966
|
+
except Exception:
|
|
967
|
+
Logger.exception('Core: Error while saving default config file')
|
|
968
|
+
|
|
969
|
+
# Load configuration from env
|
|
970
|
+
if environ.get('KIVY_NO_ENV_CONFIG', '0') != '1':
|
|
971
|
+
for key, value in environ.items():
|
|
972
|
+
if not key.startswith("KCFG_"):
|
|
973
|
+
continue
|
|
974
|
+
try:
|
|
975
|
+
_, section, name = key.split("_", 2)
|
|
976
|
+
except ValueError:
|
|
977
|
+
Logger.warning((
|
|
978
|
+
"Config: Environ `{}` invalid format, "
|
|
979
|
+
"must be KCFG_section_name").format(key))
|
|
980
|
+
continue
|
|
981
|
+
|
|
982
|
+
# extract and check section
|
|
983
|
+
section = section.lower()
|
|
984
|
+
if not Config.has_section(section):
|
|
985
|
+
Logger.warning(
|
|
986
|
+
"Config: Environ `{}`: unknown section `{}`".format(
|
|
987
|
+
key, section))
|
|
988
|
+
continue
|
|
989
|
+
|
|
990
|
+
# extract and check the option name
|
|
991
|
+
name = name.lower()
|
|
992
|
+
sections_to_check = {
|
|
993
|
+
"kivy", "graphics", "widgets", "postproc", "network"}
|
|
994
|
+
if (section in sections_to_check and
|
|
995
|
+
not Config.has_option(section, name)):
|
|
996
|
+
Logger.warning((
|
|
997
|
+
"Config: Environ `{}` unknown `{}` "
|
|
998
|
+
"option in `{}` section.").format(
|
|
999
|
+
key, name, section))
|
|
1000
|
+
# we don't avoid to set an unknown option, because maybe
|
|
1001
|
+
# an external modules or widgets (in garden?) may want to
|
|
1002
|
+
# save its own configuration here.
|
|
1003
|
+
|
|
1004
|
+
Config.set(section, name, value)
|