Showing preview only (3,246K chars total). Download the full file or copy to clipboard to get everything.
Repository: kunitoki/popsicle
Branch: master
Commit: f58a076f95c5
Files: 264
Total size: 3.0 MB
Directory structure:
gitextract_7477lgzj/
├── .gitattributes
├── .github/
│ ├── FUNDING.yml
│ └── workflows/
│ ├── build_linux.yml
│ ├── build_macos.yml
│ ├── build_windows.yml
│ ├── coverage.yml
│ └── wheels.yml
├── .gitignore
├── .gitmodules
├── CHANGES.md
├── CMakeLists.txt
├── LICENSE
├── LICENSE.COMMERCIAL
├── LICENSE.GPLv3
├── MANIFEST.in
├── README.rst
├── cmake/
│ ├── ArchivePythonStdlib.py
│ └── CodeCoverage.cmake
├── demos/
│ ├── plugin/
│ │ ├── CMakeLists.txt
│ │ ├── PopsiclePluginEditor.cpp
│ │ ├── PopsiclePluginEditor.h
│ │ ├── PopsiclePluginProcessor.cpp
│ │ └── PopsiclePluginProcessor.h
│ └── standalone/
│ ├── CMakeLists.txt
│ ├── Main.cpp
│ ├── PopsicleDemo.cpp
│ └── PopsicleDemo.h
├── docs/
│ ├── EmbeddingTutorial.rst
│ ├── QuickStartGuide.rst
│ └── conf.py
├── examples/
│ ├── .gitignore
│ ├── __init__.py
│ ├── animated_component.py
│ ├── audio_device.py
│ ├── audio_player.py
│ ├── audio_player_waveform.py
│ ├── docs.py
│ ├── drawables.py
│ ├── emojis_component.py
│ ├── emojis_font_component.py
│ ├── hotreload_component.py
│ ├── hotreload_main.py
│ ├── juce_init.py
│ ├── juce_o_matic.py
│ ├── layout_flexgrid.py
│ ├── layout_rectangles.py
│ ├── matplotlib_integration.py
│ ├── nim_audio.nim
│ ├── nim_audio_integration.py
│ ├── numpy_audio.py
│ ├── opencv_integration.py
│ ├── opencv_video.py
│ ├── opencv_video.xml
│ ├── pil_image.py
│ ├── radio_buttons_checkboxes.py
│ ├── slider_decibels.py
│ ├── slider_values.py
│ ├── table_list_box.py
│ ├── table_list_box.xml
│ ├── wavetable_oscillator.py
│ ├── wavetable_oscillator_numpy.py
│ ├── webgpu/
│ │ ├── __init__.py
│ │ ├── cube_popsicle.py
│ │ ├── pbr2.py
│ │ ├── pbr2_embed.py
│ │ ├── pop.py
│ │ ├── triangle.py
│ │ ├── triangle_popsicle.py
│ │ └── triangle_popsicle_embed.py
│ └── wip/
│ ├── audio_callback_cpp.py
│ ├── audio_player_cpp.py
│ ├── copy_image_pixels.py
│ └── synth_midi_input.py
├── icons/
│ └── popsicle.icns
├── justfile
├── modules/
│ ├── CMakeLists.txt
│ └── juce_python/
│ ├── bindings/
│ │ ├── ScriptJuceAudioBasicsBindings.cpp
│ │ ├── ScriptJuceAudioBasicsBindings.h
│ │ ├── ScriptJuceAudioDevicesBindings.cpp
│ │ ├── ScriptJuceAudioDevicesBindings.h
│ │ ├── ScriptJuceAudioFormatsBindings.cpp
│ │ ├── ScriptJuceAudioFormatsBindings.h
│ │ ├── ScriptJuceAudioProcessorsBindings.cpp
│ │ ├── ScriptJuceAudioProcessorsBindings.h
│ │ ├── ScriptJuceAudioUtilsBindings.cpp
│ │ ├── ScriptJuceAudioUtilsBindings.h
│ │ ├── ScriptJuceBindings.cpp
│ │ ├── ScriptJuceCoreBindings.cpp
│ │ ├── ScriptJuceCoreBindings.h
│ │ ├── ScriptJuceDataStructuresBindings.cpp
│ │ ├── ScriptJuceDataStructuresBindings.h
│ │ ├── ScriptJuceEventsBindings.cpp
│ │ ├── ScriptJuceEventsBindings.h
│ │ ├── ScriptJuceGraphicsBindings.cpp
│ │ ├── ScriptJuceGraphicsBindings.h
│ │ ├── ScriptJuceGuiBasicsBindings.cpp
│ │ ├── ScriptJuceGuiBasicsBindings.h
│ │ ├── ScriptJuceGuiEntryPointsBindings.cpp
│ │ ├── ScriptJuceGuiEntryPointsBindings.h
│ │ ├── ScriptJuceGuiExtraBindings.cpp
│ │ ├── ScriptJuceGuiExtraBindings.h
│ │ ├── ScriptJuceOptionsBindings.cpp
│ │ └── ScriptJuceOptionsBindings.h
│ ├── juce_python.cpp
│ ├── juce_python.h
│ ├── juce_python.mm
│ ├── juce_python_audio_basics.cpp
│ ├── juce_python_audio_devices.cpp
│ ├── juce_python_audio_formats.cpp
│ ├── juce_python_audio_processors.cpp
│ ├── juce_python_audio_utils.cpp
│ ├── juce_python_bindings.cpp
│ ├── juce_python_core.cpp
│ ├── juce_python_data_structures.cpp
│ ├── juce_python_events.cpp
│ ├── juce_python_graphics.cpp
│ ├── juce_python_gui_basics.cpp
│ ├── juce_python_gui_entry.cpp
│ ├── juce_python_gui_extra.cpp
│ ├── juce_python_modules.cpp
│ ├── juce_python_options.cpp
│ ├── modules/
│ │ └── ScriptPopsicleModule.cpp
│ ├── pybind11/
│ │ ├── attr.h
│ │ ├── buffer_info.h
│ │ ├── cast.h
│ │ ├── chrono.h
│ │ ├── common.h
│ │ ├── complex.h
│ │ ├── detail/
│ │ │ ├── class.h
│ │ │ ├── common.h
│ │ │ ├── descr.h
│ │ │ ├── init.h
│ │ │ ├── internals.h
│ │ │ ├── type_caster_base.h
│ │ │ └── typeid.h
│ │ ├── eigen/
│ │ │ ├── common.h
│ │ │ ├── matrix.h
│ │ │ └── tensor.h
│ │ ├── eigen.h
│ │ ├── embed.h
│ │ ├── eval.h
│ │ ├── functional.h
│ │ ├── gil.h
│ │ ├── iostream.h
│ │ ├── numpy.h
│ │ ├── operators.h
│ │ ├── options.h
│ │ ├── pybind11.h
│ │ ├── pytypes.h
│ │ ├── stl/
│ │ │ └── filesystem.h
│ │ ├── stl.h
│ │ ├── stl_bind.h
│ │ └── type_caster_pyobject_ptr.h
│ ├── scripting/
│ │ ├── ScriptBindings.cpp
│ │ ├── ScriptBindings.h
│ │ ├── ScriptEngine.cpp
│ │ ├── ScriptEngine.h
│ │ ├── ScriptException.h
│ │ ├── ScriptUtilities.cpp
│ │ └── ScriptUtilities.h
│ └── utilities/
│ ├── ClassDemangling.cpp
│ ├── ClassDemangling.h
│ ├── CrashHandling.cpp
│ ├── CrashHandling.h
│ ├── MacroHelpers.h
│ ├── PyBind11Includes.h
│ ├── PythonInterop.h
│ ├── PythonTypes.h
│ └── WindowsIncludes.h
├── pyproject.toml
├── scripts/
│ ├── build_wheel.sh
│ ├── install_wheel.sh
│ ├── pull_upstream.sh
│ └── upload_wheel.sh
├── setup.py
└── tests/
├── __init__.py
├── common.py
├── compare_data/
│ └── .gitignore
├── conftest.py
├── runtime_data/
│ └── .gitignore
├── test_juce_core/
│ ├── __init__.py
│ ├── data/
│ │ ├── somefile.txt
│ │ ├── test.xml
│ │ └── test_broken.xml
│ ├── test_Array.py
│ ├── test_Base64.py
│ ├── test_BigInteger.py
│ ├── test_ByteOrder.py
│ ├── test_Cast.py
│ ├── test_CriticalSection.py
│ ├── test_File.py
│ ├── test_FileFilter.py
│ ├── test_FileInputStream.py
│ ├── test_FileOutputStream.py
│ ├── test_Identifier.py
│ ├── test_InputStream.py
│ ├── test_Ints.py
│ ├── test_JSON.py
│ ├── test_MemoryBlock.py
│ ├── test_MemoryInputStream.py
│ ├── test_MemoryMappedFile.py
│ ├── test_NamedValueSet.py
│ ├── test_NormalisableRange.py
│ ├── test_PropertySet.py
│ ├── test_Random.py
│ ├── test_Range.py
│ ├── test_RangedDirectoryIterator.py
│ ├── test_RelativeTime.py
│ ├── test_Result.py
│ ├── test_StringArray.py
│ ├── test_StringPairArray.py
│ ├── test_SubregionStream.py
│ ├── test_TemporaryFile.py
│ ├── test_Thread.py
│ ├── test_ThreadPool.py
│ ├── test_Time.py
│ ├── test_URLInputSource.py
│ ├── test_Uuid.py
│ ├── test_WildcardFileFilter.py
│ ├── test_XmlDocument.py
│ ├── test_XmlElement.py
│ └── test_ZipFile.py
├── test_juce_data_structures/
│ ├── __init__.py
│ ├── test_CachedValue.py
│ ├── test_PropertiesFile.py
│ ├── test_UndoManager.py
│ ├── test_Value.py
│ ├── test_ValueTree.py
│ └── test_ValueTreeSynchroniser.py
├── test_juce_events/
│ ├── __init__.py
│ ├── test_ActionBroadcaster.py
│ ├── test_AsyncUpdater.py
│ ├── test_ChangeBroadcaster.py
│ ├── test_LockingAsyncUpdater.py
│ ├── test_Message.py
│ ├── test_MessageListener.py
│ ├── test_MessageManager.py
│ ├── test_MultiTimer.py
│ └── test_Timer.py
├── test_juce_graphics/
│ ├── __init__.py
│ ├── test_AffineTransform.py
│ ├── test_BorderSize.py
│ ├── test_Colour.py
│ ├── test_ColourGradient.py
│ ├── test_FillType.py
│ ├── test_Graphics.py
│ ├── test_Justification.py
│ ├── test_Line.py
│ ├── test_Parallelogram.py
│ ├── test_Path.py
│ ├── test_PathStrokeType.py
│ ├── test_PixelARGB.py
│ ├── test_PixelAlpha.py
│ ├── test_PixelRGB.py
│ ├── test_Point.py
│ ├── test_Rectangle.py
│ ├── test_RectangleList.py
│ └── utilities.py
├── test_juce_gui_basics/
│ ├── __init__.py
│ ├── test_Button.py
│ ├── test_DocumentWindow.py
│ ├── test_JUCEApplication.py
│ └── test_KeyPress.py
└── utilities.py
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitattributes
================================================
* text=auto eol=lf
================================================
FILE: .github/FUNDING.yml
================================================
# These are supported funding model platforms
github: kunitoki
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
================================================
FILE: .github/workflows/build_linux.yml
================================================
name: Linux Builds
on:
push:
branches:
- '**'
paths:
- "**/workflows/build_linux.yml"
- "**/cmake/**"
- "**/JUCE/**"
- "**/modules/**"
- "**/tests/**"
- ".gitmodules"
- "CMakeLists.txt"
- "MANIFEST.in"
- "pyproject.toml"
- "setup.py"
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build-linux:
name: Build cp${{matrix.python}}-${{ matrix.platform_id }}
runs-on: ${{ matrix.os }}
continue-on-error: false
strategy:
fail-fast: true
matrix:
include:
- { os: ubuntu-latest, python: 310, platform_id: manylinux_x86_64, cibw_archs: x86_64 }
- { os: ubuntu-latest, python: 310, platform_id: manylinux_aarch64, cibw_archs: aarch64 }
steps:
- name: Checkout the repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up QEMU
if: matrix.cibw_archs == 'aarch64'
uses: docker/setup-qemu-action@v3
with:
platforms: arm64
- name: Setup and install python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Build wheels
uses: pypa/cibuildwheel@v2.19.1
env:
CIBW_ARCHS: ${{matrix.cibw_archs}}
CIBW_BUILD: cp${{ matrix.python }}-${{ matrix.platform_id }}
CIBW_TEST_SKIP: "*-manylinux_aarch64"
- name: Store failures artifacts
if: failure()
uses: actions/upload-artifact@v4
with:
name: compare-data
path: |
./wheelhouse/compare_data/
!./wheelhouse/compare_data/.gitignore
if-no-files-found: ignore
retention-days: 5
compression-level: 0
overwrite: true
================================================
FILE: .github/workflows/build_macos.yml
================================================
name: macOS Builds
on:
push:
branches:
- '**'
paths:
- "**/workflows/build_macos.yml"
- "**/cmake/**"
- "**/JUCE/**"
- "**/modules/**"
- "**/tests/**"
- ".gitmodules"
- "CMakeLists.txt"
- "MANIFEST.in"
- "pyproject.toml"
- "setup.py"
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build-macos:
name: Build cp${{matrix.python}}-${{ matrix.platform_id }}
runs-on: ${{ matrix.os }}
continue-on-error: false
strategy:
fail-fast: true
matrix:
include:
- { os: macos-latest, python: 310, platform_id: macosx_universal2, cibw_archs: universal2 }
steps:
- name: Checkout the repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup and install python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Build wheels
uses: pypa/cibuildwheel@v2.19.1
env:
CIBW_ARCHS: ${{matrix.cibw_archs}}
CIBW_BUILD: cp${{ matrix.python }}-${{ matrix.platform_id }}
CIBW_TEST_SKIP: "*-macosx_universal2:arm64"
CIBW_ENVIRONMENT: MACOSX_DEPLOYMENT_TARGET=10.15
- name: Store failures artifacts
if: failure()
uses: actions/upload-artifact@v4
with:
name: compare-data
path: |
tests/compare_data/
!tests/compare_data/.gitignore
if-no-files-found: ignore
retention-days: 5
compression-level: 0
overwrite: true
================================================
FILE: .github/workflows/build_windows.yml
================================================
name: Windows Builds
on:
push:
branches:
- '**'
paths:
- "**/workflows/build_windows.yml"
- "**/cmake/**"
- "**/JUCE/**"
- "**/modules/**"
- "**/tests/**"
- ".gitmodules"
- "CMakeLists.txt"
- "MANIFEST.in"
- "pyproject.toml"
- "setup.py"
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build-windows:
name: Build cp${{matrix.python}}-${{ matrix.platform_id }}
runs-on: ${{ matrix.os }}
continue-on-error: false
strategy:
fail-fast: true
matrix:
include:
- { os: windows-latest, python: 310, platform_id: win_amd64, cibw_archs: AMD64 }
- { os: windows-latest, python: 310, platform_id: win_arm64, cibw_archs: ARM64 }
steps:
- name: Checkout the repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup and install python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Build wheels
uses: pypa/cibuildwheel@v2.19.1
env:
CIBW_ARCHS: ${{matrix.cibw_archs}}
CIBW_BUILD: cp${{ matrix.python }}-${{ matrix.platform_id }}
CIBW_TEST_SKIP: "*-win_arm64"
- name: Store failures artifacts
if: failure()
uses: actions/upload-artifact@v4
with:
name: compare-data
path: |
tests/compare_data/
!tests/compare_data/.gitignore
if-no-files-found: ignore
retention-days: 5
compression-level: 0
overwrite: true
================================================
FILE: .github/workflows/coverage.yml
================================================
name: Code Coverage
on:
push:
branches:
- '**'
paths:
- "**/workflows/coverage.yml"
- "**/cmake/**"
- "**/JUCE/**"
- "**/modules/**"
- "**/tests/**"
- ".gitmodules"
- "CMakeLists.txt"
- "MANIFEST.in"
- "pyproject.toml"
- "setup.py"
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
code-coverage:
name: Code Coverage
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup and install python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Build wheels and test
uses: pypa/cibuildwheel@v2.19.1
env:
CIBW_ARCHS: x86_64
CIBW_BUILD: cp311-manylinux_x86_64
CIBW_TEST_SKIP: "*manylinux*"
CIBW_ENVIRONMENT: POPSICLE_COVERAGE=1
- name: Coveralls
uses: coverallsapp/github-action@v2
with:
path-to-lcov: ./wheelhouse/lcov.info
github-token: ${{ secrets.GITHUB_TOKEN }}
#debug: true
================================================
FILE: .github/workflows/wheels.yml
================================================
name: Wheels Deploy
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
build-wheels:
name: Build cp${{matrix.python}}-${{ matrix.platform_id }}
runs-on: ${{ matrix.os }}
continue-on-error: false
strategy:
fail-fast: false
matrix:
include:
- { os: macos-latest, python: 310, platform_id: macosx_universal2, cibw_archs: universal2, lto: 1 }
- { os: macos-latest, python: 311, platform_id: macosx_universal2, cibw_archs: universal2, lto: 1 }
- { os: macos-latest, python: 312, platform_id: macosx_universal2, cibw_archs: universal2, lto: 1 }
- { os: windows-latest, python: 310, platform_id: win_amd64, cibw_archs: AMD64, lto: 1 }
- { os: windows-latest, python: 311, platform_id: win_amd64, cibw_archs: AMD64, lto: 1 }
- { os: windows-latest, python: 312, platform_id: win_amd64, cibw_archs: AMD64, lto: 1 }
- { os: windows-latest, python: 310, platform_id: win_arm64, cibw_archs: ARM64, lto: 1 }
- { os: windows-latest, python: 311, platform_id: win_arm64, cibw_archs: ARM64, lto: 1 }
- { os: windows-latest, python: 312, platform_id: win_arm64, cibw_archs: ARM64, lto: 1 }
- { os: ubuntu-latest, python: 310, platform_id: manylinux_x86_64, cibw_archs: x86_64, lto: 1 }
- { os: ubuntu-latest, python: 311, platform_id: manylinux_x86_64, cibw_archs: x86_64, lto: 1 }
- { os: ubuntu-latest, python: 312, platform_id: manylinux_x86_64, cibw_archs: x86_64, lto: 1 }
- { os: ubuntu-latest, python: 310, platform_id: manylinux_aarch64, cibw_archs: aarch64, lto: 0 }
- { os: ubuntu-latest, python: 311, platform_id: manylinux_aarch64, cibw_archs: aarch64, lto: 0 }
- { os: ubuntu-latest, python: 312, platform_id: manylinux_aarch64, cibw_archs: aarch64, lto: 0 }
steps:
- name: Checkout the repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up QEMU
if: matrix.cibw_archs == 'aarch64'
uses: docker/setup-qemu-action@v3
with:
platforms: arm64
- name: Setup and install python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Build wheels
uses: pypa/cibuildwheel@v2.19.1
env:
CIBW_ARCHS: ${{matrix.cibw_archs}}
CIBW_BUILD: cp${{ matrix.python }}-${{ matrix.platform_id }}
CIBW_TEST_SKIP: "*-manylinux_aarch64 *-macosx_universal2:arm64 *-win_arm64"
CIBW_ENVIRONMENT: POPSICLE_LTO=${{matrix.lto}} POPSICLE_DISTRIBUTION=1
- name: Upload all the dists
uses: actions/upload-artifact@v4
with:
name: artifact-cp${{ matrix.python }}-${{ matrix.platform_id }}
path: ./wheelhouse/*.whl
upload-test-pypi:
name: Publish Wheels To Test PyPI
needs: [build-wheels]
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- name: Download all the dists
uses: actions/download-artifact@v4
with:
path: dist/
merge-multiple: true
- name: Publish distribution to Test PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
upload-pypi:
name: Publish Wheels To PyPI
needs: [upload-test-pypi]
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- name: Download all the dists
uses: actions/download-artifact@v4
with:
path: dist/
merge-multiple: true
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
github-release:
name: Sign And Upload Github Release
needs: [upload-pypi]
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- name: Download all the dists
uses: actions/download-artifact@v4
with:
path: dist/
merge-multiple: true
- name: Sign the dists with Sigstore
uses: sigstore/gh-action-sigstore-python@v1.2.3
with:
inputs: ./dist/*.whl
- name: Create GitHub Release
env:
GITHUB_TOKEN: ${{ github.token }}
run: gh release create '${{ github.ref_name }}' --repo '${{ github.repository }}' --notes ""
- name: Upload artifact signatures to GitHub Release
env:
GITHUB_TOKEN: ${{ github.token }}
run: gh release upload '${{ github.ref_name }}' dist/** --repo '${{ github.repository }}'
================================================
FILE: .gitignore
================================================
__pycache__/
.eggs/
.vscode/
coverage/
dist/
build/
popsicle/
*.egg-info/
.DS_Store
*.pyc
*.pyi
================================================
FILE: .gitmodules
================================================
[submodule "JUCE"]
path = JUCE
url = https://github.com/juce-framework/JUCE.git
================================================
FILE: CHANGES.md
================================================
## Master
================================================
FILE: CMakeLists.txt
================================================
cmake_minimum_required (VERSION 3.21)
set (PROJECT_NAME popsicle)
get_filename_component (ROOT_PATH "${CMAKE_CURRENT_LIST_DIR}" ABSOLUTE)
file (STRINGS "${ROOT_PATH}/modules/juce_python/juce_python.h" JUCE_PYTHON_MODULE)
string (REGEX REPLACE "(.*)([0-9]+\.[0-9]+\.[0-9]+)(.*)" "\\2" VERSION_NUMBER ${JUCE_PYTHON_MODULE})
project (${PROJECT_NAME} VERSION ${VERSION_NUMBER})
# Find python
if ("${Python_INCLUDE_DIRS}" STREQUAL "")
#set (Python_ROOT_DIR "/Library/Frameworks/Python.framework/Versions/Current")
set (Python_USE_STATIC_LIBS TRUE)
find_package (Python REQUIRED Development)
else()
message(STATUS "${PROJECT_NAME} - Using python includes (provided): ${Python_INCLUDE_DIRS}")
endif()
# Fix linux issue
if (UNIX AND NOT APPLE)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -I/usr/include/freetype2")
endif()
# Fetch/Include juce (set browsable modules in IDE)
set_property (GLOBAL PROPERTY USE_FOLDERS YES)
option (JUCE_ENABLE_MODULE_SOURCE_GROUPS "Enable Module Source Groups" ON)
add_subdirectory (JUCE)
#include (FetchContent)
#set (FETCHCONTENT_UPDATES_DISCONNECTED TRUE)
#FetchContent_Declare (JUCE
# GIT_REPOSITORY https://github.com/juce-framework/JUCE.git
# GIT_TAG origin/master
# GIT_SHALLOW TRUE
# GIT_PROGRESS TRUE
# SOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR}/JUCE)
#FetchContent_MakeAvailable (JUCE)
# Add the internal modules
add_subdirectory (modules)
# Configure the wheel library
add_library (${PROJECT_NAME} MODULE)
set_target_properties (${PROJECT_NAME} PROPERTIES JUCE_TARGET_KIND_STRING "App")
set_target_properties (${PROJECT_NAME} PROPERTIES CXX_STANDARD 17)
set_target_properties (${PROJECT_NAME} PROPERTIES CXX_VISIBILITY_PRESET "hidden")
set_target_properties (${PROJECT_NAME} PROPERTIES VISIBILITY_INLINES_HIDDEN TRUE)
set_target_properties (${PROJECT_NAME} PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
set_target_properties (${PROJECT_NAME} PROPERTIES OUTPUT_NAME "${PROJECT_NAME}")
set_target_properties (${PROJECT_NAME} PROPERTIES PREFIX "")
if (APPLE)
set_target_properties (${PROJECT_NAME} PROPERTIES LINK_FLAGS "-undefined dynamic_lookup")
target_link_options (${PROJECT_NAME} PRIVATE "-Wl,-weak_reference_mismatches,weak")
elseif (WIN32)
target_compile_definitions (${PROJECT_NAME} PUBLIC $<$<CONFIG:Debug>:Py_DEBUG>)
set_target_properties (${PROJECT_NAME} PROPERTIES SUFFIX ".pyd")
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
set_target_properties (${PROJECT_NAME} PROPERTIES OUTPUT_NAME "${PROJECT_NAME}_d")
endif()
endif()
if (ENABLE_DISTRIBUTION)
if (APPLE)
add_custom_command(
TARGET "${PROJECT_NAME}" POST_BUILD DEPENDS "${PROJECT_NAME}"
COMMAND $<$<CONFIG:release>:${CMAKE_STRIP}>
ARGS -x $<TARGET_FILE:${PROJECT_NAME}>)
elseif (UNIX)
add_custom_command(
TARGET "${PROJECT_NAME}" POST_BUILD DEPENDS "${PROJECT_NAME}"
COMMAND $<$<CONFIG:release>:${CMAKE_STRIP}>
ARGS --strip-all $<TARGET_FILE:${PROJECT_NAME}>)
endif()
endif()
if (ENABLE_LTO)
set (LTO_CONFIGURATION "juce::juce_recommended_lto_flags")
else()
set (LTO_CONFIGURATION "")
endif()
target_include_directories (${PROJECT_NAME} PRIVATE "${Python_INCLUDE_DIRS}")
if (NOT "${Python_LIBRARY_DIRS}" STREQUAL "")
target_link_directories (${PROJECT_NAME} PRIVATE "${Python_LIBRARY_DIRS}")
endif()
target_compile_definitions (${PROJECT_NAME} PRIVATE
JUCE_STANDALONE_APPLICATION=1
JUCE_DISABLE_JUCE_VERSION_PRINTING=1
JUCE_MODAL_LOOPS_PERMITTED=1
JUCE_CATCH_UNHANDLED_EXCEPTIONS=1
JUCE_LOG_ASSERTIONS=1
JUCE_ALLOW_STATIC_NULL_VARIABLES=0
JUCE_STRICT_REFCOUNTEDPOINTER=1
JUCE_WEB_BROWSER=0
JUCE_LOAD_CURL_SYMBOLS_LAZILY=1
#JUCE_GUI_BASICS_INCLUDE_XHEADERS=1
JUCE_SILENCE_XCODE_15_LINKER_WARNING=1
JUCE_PYTHON_EMBEDDED_INTERPRETER=0
JUCE_PYTHON_SCRIPT_CATCH_EXCEPTION=0
PYBIND11_DETAILED_ERROR_MESSAGES=1)
target_link_libraries (${PROJECT_NAME} PRIVATE
#juce::juce_analytics
juce::juce_audio_basics
juce::juce_audio_devices
juce::juce_audio_formats
juce::juce_audio_processors
juce::juce_audio_utils
juce::juce_core
#juce::juce_cryptography
juce::juce_data_structures
#juce::juce_dsp
juce::juce_events
juce::juce_graphics
juce::juce_gui_basics
juce::juce_gui_extra
#juce::juce_opengl
#juce::juce_osc
#juce::juce_video
juce::juce_recommended_config_flags
juce::juce_recommended_warning_flags
popsicle::juce_python
popsicle::juce_python_recommended_warning_flags
${LTO_CONFIGURATION})
_juce_initialise_target (${PROJECT_NAME} VERSION "${VERSION_NUMBER}")
_juce_set_output_name (${PROJECT_NAME} $<TARGET_PROPERTY:${PROJECT_NAME},JUCE_PRODUCT_NAME>)
# Configure code coverage
if (ENABLE_COVERAGE)
include (cmake/CodeCoverage.cmake)
append_coverage_compiler_flags()
set (COVERAGE_TARGET ${PROJECT_NAME}_coverage)
set (COVERAGE_EXCLUDES
"*_mac.*"
"*_windows.*"
"*_android.*"
"*_ios.*"
"*/juce_audio_basics/juce_audio_basics.*"
"*/juce_audio_devices/juce_audio_devices.*"
"*/juce_core/juce_core.*"
"*/juce_data_structures/juce_data_structures.*"
"*/juce_events/juce_events.*"
"*/juce_graphics/juce_graphics.*"
"*/juce_gui_basics/juce_gui_basics.*"
"*/juce_python/pybind11/*")
if (APPLE)
list (APPEND COVERAGE_EXCLUDES "/Applications/*" "/Library/*")
endif()
if (APPLE OR UNIX)
list (APPEND COVERAGE_EXCLUDES "/usr/*" "/opt/*")
endif()
set (XVFB_RUN_EXEC "")
if (UNIX)
find_program (XVFB_RUN NAMES xvfb-run)
if (NOT ${XVFB_RUN} MATCHES "XVFB_RUN-NOTFOUND")
message (STATUS "Using xvfb-run to perform graphics tests for coverage.")
set (XVFB_RUN_EXEC ${XVFB_RUN} -a -s "-screen 0 1024x768x24")
endif()
endif()
setup_target_for_coverage_lcov (
NAME ${COVERAGE_TARGET}
EXECUTABLE ${XVFB_RUN_EXEC} pytest -s ${CMAKE_CURRENT_LIST_DIR}/tests
DEPENDENCIES ${PROJECT_NAME}
LCOV_ARGS
#"--rc" "branch_coverage=1"
#"--branch-coverage"
"--keep-going"
"--ignore-errors" "inconsistent"
GENHTML_ARGS
#"--rc" "branch_coverage=1"
#"--branch-coverage"
"--keep-going"
"--ignore-errors" "inconsistent"
"--prefix" "${CMAKE_CURRENT_LIST_DIR}")
endif()
================================================
FILE: LICENSE
================================================
DUAL LICENSE NOTICE
This software is dually licensed:
1. GPLv3 LICENSE:
- The GPLv3 License is applicable for open-source projects and non-commercial use. See LICENSE.GPLv3 for details.
2. COMMERCIAL LICENSE:
- The Commercial License is applicable for closed-source projects and commercial use. See LICENSE.COMMERCIAL for details.
By using this software, you agree to adhere to the terms and conditions of either the GPLv3 License or the Commercial License, depending on your usage:
- If you are developing an open-source project or using the software for non-commercial purposes, you must comply with the terms of the GPLv3 License as outlined in LICENSE.GPLv3.
- If you are developing a closed-source application or using the software for commercial purposes, you must obtain a Commercial License as outlined in LICENSE.COMMERCIAL.
Please carefully review the respective license file applicable to your usage scenario.
For any inquiries regarding licensing or to obtain a Commercial License, please contact [kunitoki@gmail.com].
================================================
FILE: LICENSE.COMMERCIAL
================================================
COMMERCIAL LICENSE AGREEMENT
This Commercial License Agreement (the "Agreement") is entered into by and between popsicle, a corporation ("Licensor"), and the entity or individual licensing the Software ("Licensee"). This Agreement is effective as of the date of acceptance by Licensee.
1. DEFINITIONS
1.1 "Software" refers to the popsicle library, including any updates, modifications, or enhancements provided by Licensor.
1.2 "Closed Source App" refers to an application that is not distributed with its source code.
1.3 "Embedded" refers to the integration of the Software into a Closed Source App.
1.4 "JUCE" refers to the JUCE framework developed by Raw Material Software Limited.
2. LICENSE GRANT
2.1 Open Source Use: The Software is provided under the terms of the MIT License for non-commercial and open-source projects.
2.2 Commercial Use - Closed Source App:
2.2.1 Embedding: If the Software is embedded in a Closed Source App, Licensee must obtain a commercial license.
2.2.2 License Fee: Licensee agrees to pay the applicable license fee specified by Licensor for each Closed Source App that embeds the Software.
2.2.3 JUCE License: In case the Software is embedded in a Closed Source App, Licensee must also have a valid JUCE license from Raw Material Software Limited.
3. RESTRICTIONS
3.1 Licensee may not sublicense, assign, or transfer their rights under this Agreement without the express written consent of Licensor.
3.2 Licensee may not use the Software in any mission-critical or life-safety systems, where the failure of the Software could lead to personal injury, death, or significant damage to property.
3.3 Licensee may not remove or alter any copyright, trademark, or other proprietary notices present in the Software or its documentation.
3.4 Licensee may not use the Software for any illegal, unethical, or malicious purposes, including but not limited to activities that infringe on intellectual property rights, engage in unauthorized access, or violate applicable laws and regulations.
3.5 Licensee may not use the Software in connection with any projects or applications that promote or engage in illegal or discriminatory activities, or that violate human rights.
3.6 Licensee may not use the Software in any way that would violate the terms of use or policies of any third-party platforms, app stores, or distribution channels through which the Closed Source App is made available.
3.7 Licensee shall not attempt to circumvent any licensing mechanisms, security features, or access controls implemented in the Software.
4. SUPPORT AND UPDATES
Licensor may provide support and updates for the Software as specified in a separate support agreement, if applicable.
5. DISCLAIMER OF WARRANTY
THE SOFTWARE IS PROVIDED "AS IS," WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. LICENSOR DISCLAIMS ALL WARRANTIES, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
6. LIMITATION OF LIABILITY
IN NO EVENT SHALL LICENSOR BE LIABLE FOR ANY CONSEQUENTIAL, INCIDENTAL, INDIRECT, SPECIAL, OR PUNITIVE DAMAGES, INCLUDING WITHOUT LIMITATION, DAMAGES FOR LOSS OF PROFITS, LOSS OF BUSINESS, OR DOWN TIME, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
7. GOVERNING LAW
This Agreement shall be governed by and construed in accordance with the laws.
8. ACCEPTANCE
By using, downloading, or installing the Software, Licensee agrees to be bound by the terms and conditions of this Agreement.
================================================
FILE: LICENSE.GPLv3
================================================
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
popsicle - Copyright (c) 2024 kunitoki <kunitoki@gmail.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
popsicle - Copyright (c) 2024 kunitoki <kunitoki@gmail.com>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<https://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.
================================================
FILE: MANIFEST.in
================================================
include README.rst
include LICENSE LICENSE.GPLv3 LICENSE.COMMERCIAL
graft popsicle
graft popsicle.pyi
global-exclude *.py[cod] __pycache__ .DS_Store CMakeLists.txt
================================================
FILE: README.rst
================================================
.. image:: popsicle.jpg
:alt: Popsicle: Python integration for JUCE with pybind11.
:target: https://github.com/kunitoki/popsicle
===================================================
Popsicle: Python integration for JUCE with pybind11
===================================================
|linux_builds| |macos_builds| |windows_builds| |pypi_version| |pypi_downloads|
|coveralls| |pypi_status| |pypi_license| |commercial_license|
--------
Overview
--------
Popsicle is a groundbreaking project designed to extend the accessibility of `JUCE <https://juce.com/>`_ by seamlessly integrating it with Python. Leveraging the power of `pybind11 <https://pybind11.readthedocs.io/en/stable/>`_, Popsicle offers a Pythonic interface to the JUCE framework. This integration allows developers to utilize JUCE in a manner similar to using Qt with PySide, offering a simplified yet robust approach.
Popsicle serves multiple purposes, each contributing to its significance in the development landscape.
--------
Features
--------
- **Effortless JUCE App Prototyping**: Effortlessly prototype JUCE apps. Popsicle streamlines the development process, allowing developers to focus on creativity by eliminating the need for intricate build configurations and setups.
- **Python Scripting Integration**: Seamlessly integrate Python scripting by embedding Popsicle into existing JUCE applications as a dedicated module. Extend and enhance your JUCE projects with the flexibility and ease of Python within the familiar JUCE framework.
- **Unit Testing Made Easy**: Ensure the robustness and reliability of JUCE classes with Popsicle's built-in unit testing support. Leverage Python's testing infrastructure for a seamless testing process.
- **Cross-Platform Compatibility**: Enjoy cross-platform compatibility with Popsicle. Work consistently across Windows, macOS, and Linux environments for a unified development experience.
Popsicle stands as a humble yet powerful solution, aimed at enriching the development experience with JUCE by simplifying, extending, and enhancing its integration with Python.
-------------
Example Usage
-------------
A single 80 lines script is better than thousand of words:
.. code-block:: python
import popsicle as juce
class MainContentComponent(juce.Component, juce.Timer):
def __init__(self):
juce.Component.__init__(self)
juce.Timer.__init__(self)
self.setSize(600, 400)
self.startTimerHz(60)
def __del__(self):
self.stopTimer()
def paint(self, g):
g.fillAll(juce.Colours.black)
random = juce.Random.getSystemRandom()
rect = juce.Rectangle[int](0, 0, 20, 20)
for _ in range(100):
g.setColour(juce.Colour.fromRGBA(
random.nextInt(256),
random.nextInt(256),
random.nextInt(256),
255))
rect.setCentre(random.nextInt(self.getWidth()), random.nextInt(self.getHeight()))
g.drawRect(rect, 1)
def timerCallback(self):
if self.isVisible():
self.repaint()
class MainWindow(juce.DocumentWindow):
component = None
def __init__(self):
super().__init__(
juce.JUCEApplication.getInstance().getApplicationName(),
juce.Desktop.getInstance().getDefaultLookAndFeel()
.findColour(juce.ResizableWindow.backgroundColourId),
juce.DocumentWindow.allButtons,
True)
self.component = MainContentComponent()
self.setResizable(True, True)
self.setContentNonOwned(self.component, True)
self.centreWithSize(800, 600)
self.setVisible(True)
def __del__(self):
if self.component:
del self.component
def closeButtonPressed(self):
juce.JUCEApplication.getInstance().systemRequestedQuit()
class Application(juce.JUCEApplication):
window = None
def getApplicationName(self):
return "JUCE-o-matic"
def getApplicationVersion(self):
return "1.0"
def initialise(self, commandLine):
self.window = MainWindow()
def shutdown(self):
if self.window:
del self.window
if __name__ == "__main__":
juce.START_JUCE_APPLICATION(Application)
As easy as that ! You will find more example on JUCE usage in the *examples* folder.
.. image:: images/juce_o_matic.png
:target: examples/juce_o_matic.py
-------------------
Supported Platforms
-------------------
.. list-table:: List of popsicle supported platforms
:widths: 40 10 10 10 20
:header-rows: 1
* - Platform
- Python 3.10
- Python 3.11
- Python 3.12
- Notes
* - macOS-universal2
- ✅
- ✅
- ✅
-
* - win_amd64
- ✅
- ✅
- ✅
-
* - win_arm64
- ✅
- ✅
- ✅
-
* - manylinux_2014-x86_64
- ✅
- ✅
- ✅
-
* - manylinux_2014-aarch64
- ⚠️
- ⚠️
- ⚠️
- Built but not tested exhaustively
-----------------
Supported Modules
-----------------
.. list-table:: List of popsicle supported JUCE modules
:widths: 40 8 12 40
:header-rows: 1
* - Module
- Supported
- Test Coverage
- Notes
* - juce_analytics
- ⛔️
- N/A
- Not Planned
* - juce_audio_basics
- ✅
- 0.87%
- In Progress
* - juce_audio_devices
- ✅
- 0.0%
- In Progress
* - juce_audio_formats
- ✅
- 0.0%
- In Progress
* - juce_audio_plugin_client
- ⛔️
- N/A
- Not planned
* - juce_audio_processors
- ✅
- 0.0%
- In Progress
* - juce_audio_utils
- ✅
- 0.0%
- In Progress
* - juce_box2d
- ⛔️
- N/A
- Planned
* - juce_core
- ✅
- 47.7%
- Ready
* - juce_cryptography
- ⛔️
- N/A
- Planned
* - juce_data_structures
- ✅
- 55.61%
- Ready
* - juce_dsp
- ⛔️
- N/A
- Planned
* - juce_events
- ✅
- 49.68%
- Ready
* - juce_graphics
- ✅
- 15.76%
- In Progress
* - juce_gui_basics
- ✅
- 9.77%
- In Progress, Basic Components Available
* - juce_gui_extra
- ✅
- 0.57%
- In Progress
* - juce_midi_ci
- ⛔️
- N/A
- Not Planned
* - juce_opengl
- ⛔️
- N/A
- Planned
* - juce_osc
- ⛔️
- N/A
- Not Planned
* - juce_product_unlocking
- ⛔️
- N/A
- Not Planned
* - juce_video
- ⛔️
- N/A
- Not planned
--------------------
Example Applications
--------------------
Some images of JUCE tutorials and other small apps ported to *popsicle*.
- Hot Reloading (`hotreload_main.py <examples/hotreload_main.py>`_ and `hotreload_component.py <examples/hotreload_component.py>`_)
.. image:: images/hot_reloading_video.png
:target: https://www.youtube.com/watch?v=nZUL_1Tnyy8
- Animated Component (https://docs.juce.com/master/tutorial_animation.html)
.. image:: images/animated_component.png
:target: examples/animated_component.py
- Advanced GUI layout techniques (https://docs.juce.com/master/tutorial_rectangle_advanced.html)
.. image:: images/layout_rectangles.png
:target: examples/layout_rectangles.py
- Responsive GUI layouts using FlexBox and Grid (https://docs.juce.com/master/tutorial_flex_box_grid.html)
.. image:: images/layout_flexgrid.png
:target: examples/layout_flexgrid.py
- Table listbox (https://docs.juce.com/master/tutorial_table_list_box.html)
.. image:: images/table_list_box.png
:target: examples/table_list_box.py
- Slider values example (https://docs.juce.com/master/tutorial_slider_values.html)
.. image:: images/slider_values.png
:target: examples/slider_values.py
- Audio Player (https://docs.juce.com/master/tutorial_playing_sound_files.html)
.. image:: images/audio_player.png
:target: examples/audio_player.py
- Audio Player with waveform (https://docs.juce.com/master/tutorial_audio_thumbnail.html)
.. image:: images/audio_player_waveform.png
:target: examples/audio_player_waveform.py
- OpenCV Integration
.. image:: images/opencv_integration.png
:target: examples/opencv_integration.py
- Matplotlib Integration
.. image:: images/matplotlib_integration.png
:target: examples/matplotlib_integration.py
- Emojis Components (`emojis_component.py <examples/emojis_component.py>`_ and `emojis_font_component.py <examples/emojis_font_component.py>`_)
.. image:: images/emojis_component.png
:target: examples/emojis_font_component.py
- Wgpu Triangle Rendering Embedded Component
.. image:: images/wgpu_triangle.png
:target: examples/webgpu/
- Pygfx PBR Renderer Integration (`pbr2_embed.py <examples/webgpu/pbr2_embed.py>`_)
.. image:: images/pygfx_3d_video.png
:target: https://www.youtube.com/watch?v=8aV-wZtRkIg
-------------
Code Coverage
-------------
|coveralls|
**The current code coverage of the project refers to the combined JUCE + popsicle**
Popsicle places a strong emphasis on comprehensive code coverage to ensure the reliability and quality of the project. Our code coverage encompasses thorough testing of the JUCE framework, providing developers with confidence in the stability and performance of their applications.
To explore detailed information about the testing, refer to the `tests directory <tests/>`_ in our GitHub repository. This resource offers insights into the specific areas of the JUCE framework that have been rigorously tested, empowering developers to make informed decisions about the robustness of their implementations.
At Popsicle, we believe that extensive code coverage is essential for delivering software solutions that meet the highest standards of excellence. Feel free to delve into our testing documentation to gain a deeper understanding of the meticulous approach we take towards ensuring code quality and reliability.
---------
Licensing
---------
Popsicle is offered in two distinct licensed flavors to cater to diverse usage scenarios:
- **GPLv3 License**: This license is applicable when utilizing Popsicle from Python through the PyPi-provided wheels or embedding it in an open-source (OSS) application. Embracing the principles of open-source development, the GPLv3 license ensures that Popsicle remains freely accessible and modifiable within the open-source community.
- **Commercial License**: Tailored for scenarios where Popsicle is integrated into a closed-source application, the commercial license provides a flexible solution for proprietary software development. This option offers a streamlined approach for utilizing Popsicle within closed environments, with further details to be announced.
Popsicle's dual licensing approach ensures compatibility with a wide range of projects, whether they align with open-source principles or require the flexibility of a commercial license for closed-source applications.
**It's important to note that when Popsicle is employed in a closed-source application, a corresponding JUCE license is also required to ensure proper adherence to licensing requirements.**
------------
Installation
------------
Getting started with Popsicle is a straightforward process, requiring just a few simple steps. Follow the instructions below to install Popsicle effortlessly:
.. code-block:: bash
pip3 install popsicle
Ensure that you have an up-to-date version of **pip** to ensure a smooth installation process.
Be sure you follow the `quick start guide <docs/QuickStartGuide.rst>`_ to know more abut how to use **popsicle**.
-----------------
Build From Source
-----------------
Clone the repository recursively as JUCE is a submodule.
.. code-block:: bash
git clone --recursive git@github.com:kunitoki/popsicle.git
Install python dependencies.
.. code-block:: bash
# Build the binary distribution
python3 -m build --wheel
# Install the local wheel
pip3 install dist/popsicle-*.whl
.. |linux_builds| image:: https://github.com/kunitoki/popsicle/actions/workflows/build_linux.yml/badge.svg?branch=master
:alt: Linux Builds Status
:target: https://github.com/kunitoki/popsicle/actions/workflows/build_linux.yml
.. |macos_builds| image:: https://github.com/kunitoki/popsicle/actions/workflows/build_macos.yml/badge.svg?branch=master
:alt: macOS Builds Status
:target: https://github.com/kunitoki/popsicle/actions/workflows/build_macos.yml
.. |windows_builds| image:: https://github.com/kunitoki/popsicle/actions/workflows/build_windows.yml/badge.svg?branch=master
:alt: Windows Builds Status
:target: https://github.com/kunitoki/popsicle/actions/workflows/build_windows.yml
.. |coveralls| image:: https://coveralls.io/repos/github/kunitoki/popsicle/badge.svg
:alt: Coveralls - Code Coverage
:target: https://coveralls.io/github/kunitoki/popsicle
.. |commercial_license| image:: https://img.shields.io/badge/license-Commercial-blue
:alt: Commercial License
:target: LICENSE.COMMERCIAL
.. |pypi_license| image:: https://img.shields.io/pypi/l/popsicle
:alt: Open Source License
:target: LICENSE.GPLv3
.. |pypi_status| image:: https://img.shields.io/pypi/status/popsicle
:alt: PyPI - Status
:target: https://pypi.org/project/popsicle/
.. |pypi_version| image:: https://img.shields.io/pypi/pyversions/popsicle
:alt: PyPI - Python Version
:target: https://pypi.org/project/popsicle/
.. |pypi_downloads| image:: https://img.shields.io/pypi/dm/popsicle
:alt: PyPI - Downloads
:target: https://pypi.org/project/popsicle/
================================================
FILE: cmake/ArchivePythonStdlib.py
================================================
import os
import stat
import shutil
import hashlib
import zipfile
from pathlib import Path
from argparse import ArgumentParser
def file_hash(file):
h = hashlib.md5()
with open(file, "rb") as f:
h.update(f.read())
return h.hexdigest()
def make_archive(file, directory):
archived_files = []
for dirname, _, files in os.walk(directory):
for filename in files:
path = os.path.join(dirname, filename)
archived_files.append((path, os.path.relpath(path, directory)))
with zipfile.ZipFile(file, "w") as zf:
for path, archive_path in sorted(archived_files):
permission = 0o555 if os.access(path, os.X_OK) else 0o444
zip_info = zipfile.ZipInfo.from_file(path, archive_path)
zip_info.date_time = (1999, 1, 1, 0, 0, 0)
zip_info.external_attr = (stat.S_IFREG | permission) << 16
with open(path, "rb") as fp:
zf.writestr(zip_info, fp.read(), compress_type=zipfile.ZIP_DEFLATED, compresslevel=9)
if __name__ == "__main__":
parser = ArgumentParser()
parser.add_argument("-b", "--base-folder", type=Path, help="Path to the base folder.")
parser.add_argument("-o", "--output-folder", type=Path, help="Path to the output folder.")
parser.add_argument("-M", "--version-major", type=int, help="Major version number (integer).")
parser.add_argument("-m", "--version-minor", type=int, help="Minor version number (integer).")
parser.add_argument("-x", "--exclude-patterns", type=str, default=None, help="Excluded patterns (semicolon separated list).")
args = parser.parse_args()
version = f"{args.version_major}.{args.version_minor}"
version_nodot = f"{args.version_major}{args.version_minor}"
final_location: Path = args.output_folder / "python"
site_packages = final_location / "site-packages"
base_python: Path = args.base_folder / "lib" / f"python{version}"
final_archive = args.output_folder / f"python{version_nodot}.zip"
temp_archive = args.output_folder / f"temp{version_nodot}.zip"
base_patterns = [
"*.pyc",
"__pycache__",
"__phello__",
"*config-3*",
"*tcl*",
"*tdbc*",
"*tk*",
"Tk*",
"_tk*",
"_test*",
"libpython*",
"pkgconfig",
"idlelib",
"site-packages",
"test",
"turtledemo",
"LICENSE.txt",
]
if args.exclude_patterns:
custom_patterns = [x.strip() for x in args.exclude_patterns.split(";")]
base_patterns += custom_patterns
ignored_files = shutil.ignore_patterns(*base_patterns)
print("cleaning up...")
if final_location.exists():
shutil.rmtree(final_location)
print("copying library...")
shutil.copytree(base_python, final_location, ignore=ignored_files, dirs_exist_ok=True)
os.makedirs(site_packages, exist_ok=True)
print("making archive...")
if os.path.exists(final_archive):
make_archive(temp_archive, final_location)
if file_hash(temp_archive) != file_hash(final_archive):
shutil.copy(temp_archive, final_archive)
else:
make_archive(final_archive, final_location)
================================================
FILE: cmake/CodeCoverage.cmake
================================================
# Copyright (c) 2012 - 2017, Lars Bilke
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
# 3. Neither the name of the copyright holder nor the names of its contributors
# may be used to endorse or promote products derived from this software without
# specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# CHANGES:
#
# 2012-01-31, Lars Bilke
# - Enable Code Coverage
#
# 2013-09-17, Joakim Söderberg
# - Added support for Clang.
# - Some additional usage instructions.
#
# 2016-02-03, Lars Bilke
# - Refactored functions to use named parameters
#
# 2017-06-02, Lars Bilke
# - Merged with modified version from github.com/ufz/ogs
#
# 2019-05-06, Anatolii Kurotych
# - Remove unnecessary --coverage flag
#
# 2019-12-13, FeRD (Frank Dana)
# - Deprecate COVERAGE_LCOVR_EXCLUDES and COVERAGE_GCOVR_EXCLUDES lists in favor
# of tool-agnostic COVERAGE_EXCLUDES variable, or EXCLUDE setup arguments.
# - CMake 3.4+: All excludes can be specified relative to BASE_DIRECTORY
# - All setup functions: accept BASE_DIRECTORY, EXCLUDE list
# - Set lcov basedir with -b argument
# - Add automatic --demangle-cpp in lcovr, if 'c++filt' is available (can be
# overridden with NO_DEMANGLE option in setup_target_for_coverage_lcovr().)
# - Delete output dir, .info file on 'make clean'
# - Remove Python detection, since version mismatches will break gcovr
# - Minor cleanup (lowercase function names, update examples...)
#
# 2019-12-19, FeRD (Frank Dana)
# - Rename Lcov outputs, make filtered file canonical, fix cleanup for targets
#
# 2020-01-19, Bob Apthorpe
# - Added gfortran support
#
# 2020-02-17, FeRD (Frank Dana)
# - Make all add_custom_target()s VERBATIM to auto-escape wildcard characters
# in EXCLUDEs, and remove manual escaping from gcovr targets
#
# 2021-01-19, Robin Mueller
# - Add CODE_COVERAGE_VERBOSE option which will allow to print out commands which are run
# - Added the option for users to set the GCOVR_ADDITIONAL_ARGS variable to supply additional
# flags to the gcovr command
#
# 2020-05-04, Mihchael Davis
# - Add -fprofile-abs-path to make gcno files contain absolute paths
# - Fix BASE_DIRECTORY not working when defined
# - Change BYPRODUCT from folder to index.html to stop ninja from complaining about double defines
#
# 2021-05-10, Martin Stump
# - Check if the generator is multi-config before warning about non-Debug builds
#
# 2022-02-22, Marko Wehle
# - Change gcovr output from -o <filename> for --xml <filename> and --html <filename> output respectively.
# This will allow for Multiple Output Formats at the same time by making use of GCOVR_ADDITIONAL_ARGS, e.g. GCOVR_ADDITIONAL_ARGS "--txt".
#
# 2022-09-28, Sebastian Mueller
# - fix append_coverage_compiler_flags_to_target to correctly add flags
# - replace "-fprofile-arcs -ftest-coverage" with "--coverage" (equivalent)
#
# USAGE:
#
# 1. Copy this file into your cmake modules path.
#
# 2. Add the following line to your CMakeLists.txt (best inside an if-condition
# using a CMake option() to enable it just optionally):
# include(CodeCoverage)
#
# 3. Append necessary compiler flags for all supported source files:
# append_coverage_compiler_flags()
# Or for specific target:
# append_coverage_compiler_flags_to_target(YOUR_TARGET_NAME)
#
# 3.a (OPTIONAL) Set appropriate optimization flags, e.g. -O0, -O1 or -Og
#
# 4. If you need to exclude additional directories from the report, specify them
# using full paths in the COVERAGE_EXCLUDES variable before calling
# setup_target_for_coverage_*().
# Example:
# set(COVERAGE_EXCLUDES
# '${PROJECT_SOURCE_DIR}/src/dir1/*'
# '/path/to/my/src/dir2/*')
# Or, use the EXCLUDE argument to setup_target_for_coverage_*().
# Example:
# setup_target_for_coverage_lcov(
# NAME coverage
# EXECUTABLE testrunner
# EXCLUDE "${PROJECT_SOURCE_DIR}/src/dir1/*" "/path/to/my/src/dir2/*")
#
# 4.a NOTE: With CMake 3.4+, COVERAGE_EXCLUDES or EXCLUDE can also be set
# relative to the BASE_DIRECTORY (default: PROJECT_SOURCE_DIR)
# Example:
# set(COVERAGE_EXCLUDES "dir1/*")
# setup_target_for_coverage_gcovr_html(
# NAME coverage
# EXECUTABLE testrunner
# BASE_DIRECTORY "${PROJECT_SOURCE_DIR}/src"
# EXCLUDE "dir2/*")
#
# 5. Use the functions described below to create a custom make target which
# runs your test executable and produces a code coverage report.
#
# 6. Build a Debug build:
# cmake -DCMAKE_BUILD_TYPE=Debug ..
# make
# make my_coverage_target
#
include(CMakeParseArguments)
option(CODE_COVERAGE_VERBOSE "Verbose information" FALSE)
# Check prereqs
find_program( GCOV_PATH gcov )
find_program( LCOV_PATH NAMES lcov lcov.bat lcov.exe lcov.perl)
find_program( FASTCOV_PATH NAMES fastcov fastcov.py )
find_program( GENHTML_PATH NAMES genhtml genhtml.perl genhtml.bat )
find_program( GCOVR_PATH gcovr PATHS ${CMAKE_SOURCE_DIR}/scripts/test)
find_program( CPPFILT_PATH NAMES c++filt )
if(NOT GCOV_PATH)
message(FATAL_ERROR "gcov not found! Aborting...")
endif() # NOT GCOV_PATH
# Check supported compiler (Clang, GNU and Flang)
get_property(LANGUAGES GLOBAL PROPERTY ENABLED_LANGUAGES)
foreach(LANG ${LANGUAGES})
if("${CMAKE_${LANG}_COMPILER_ID}" MATCHES "(Apple)?[Cc]lang")
if("${CMAKE_${LANG}_COMPILER_VERSION}" VERSION_LESS 3)
message(FATAL_ERROR "Clang version must be 3.0.0 or greater! Aborting...")
endif()
elseif(NOT "${CMAKE_${LANG}_COMPILER_ID}" MATCHES "GNU"
AND NOT "${CMAKE_${LANG}_COMPILER_ID}" MATCHES "(LLVM)?[Ff]lang")
message(FATAL_ERROR "Compiler is not GNU or Flang! Aborting...")
endif()
endforeach()
set(COVERAGE_COMPILER_FLAGS "-O0 -g --coverage"
CACHE INTERNAL "")
if(CMAKE_CXX_COMPILER_ID MATCHES "(GNU|Clang)")
include(CheckCXXCompilerFlag)
check_cxx_compiler_flag(-fprofile-abs-path HAVE_cxx_fprofile_abs_path)
if(HAVE_cxx_fprofile_abs_path)
set(COVERAGE_CXX_COMPILER_FLAGS "${COVERAGE_COMPILER_FLAGS} -fprofile-abs-path")
endif()
include(CheckCCompilerFlag)
check_c_compiler_flag(-fprofile-abs-path HAVE_c_fprofile_abs_path)
if(HAVE_c_fprofile_abs_path)
set(COVERAGE_C_COMPILER_FLAGS "${COVERAGE_COMPILER_FLAGS} -fprofile-abs-path")
endif()
endif()
set(CMAKE_Fortran_FLAGS_COVERAGE
${COVERAGE_COMPILER_FLAGS}
CACHE STRING "Flags used by the Fortran compiler during coverage builds."
FORCE )
set(CMAKE_CXX_FLAGS_COVERAGE
${COVERAGE_COMPILER_FLAGS}
CACHE STRING "Flags used by the C++ compiler during coverage builds."
FORCE )
set(CMAKE_C_FLAGS_COVERAGE
${COVERAGE_COMPILER_FLAGS}
CACHE STRING "Flags used by the C compiler during coverage builds."
FORCE )
set(CMAKE_EXE_LINKER_FLAGS_COVERAGE
""
CACHE STRING "Flags used for linking binaries during coverage builds."
FORCE )
set(CMAKE_SHARED_LINKER_FLAGS_COVERAGE
""
CACHE STRING "Flags used by the shared libraries linker during coverage builds."
FORCE )
mark_as_advanced(
CMAKE_Fortran_FLAGS_COVERAGE
CMAKE_CXX_FLAGS_COVERAGE
CMAKE_C_FLAGS_COVERAGE
CMAKE_EXE_LINKER_FLAGS_COVERAGE
CMAKE_SHARED_LINKER_FLAGS_COVERAGE )
get_property(GENERATOR_IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
if(NOT (CMAKE_BUILD_TYPE STREQUAL "Debug" OR GENERATOR_IS_MULTI_CONFIG))
message(WARNING "Code coverage results with an optimised (non-Debug) build may be misleading")
endif() # NOT (CMAKE_BUILD_TYPE STREQUAL "Debug" OR GENERATOR_IS_MULTI_CONFIG)
if(CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")
link_libraries(gcov)
endif()
# Defines a target for running and collection code coverage information
# Builds dependencies, runs the given executable and outputs reports.
# NOTE! The executable should always have a ZERO as exit code otherwise
# the coverage generation will not complete.
#
# setup_target_for_coverage_lcov(
# NAME testrunner_coverage # New target name
# EXECUTABLE testrunner -j ${PROCESSOR_COUNT} # Executable in PROJECT_BINARY_DIR
# DEPENDENCIES testrunner # Dependencies to build first
# BASE_DIRECTORY "../" # Base directory for report
# # (defaults to PROJECT_SOURCE_DIR)
# EXCLUDE "src/dir1/*" "src/dir2/*" # Patterns to exclude (can be relative
# # to BASE_DIRECTORY, with CMake 3.4+)
# NO_DEMANGLE # Don't demangle C++ symbols
# # even if c++filt is found
# )
function(setup_target_for_coverage_lcov)
set(options NO_DEMANGLE SONARQUBE)
set(oneValueArgs BASE_DIRECTORY NAME)
set(multiValueArgs EXCLUDE EXECUTABLE EXECUTABLE_ARGS DEPENDENCIES LCOV_ARGS GENHTML_ARGS)
cmake_parse_arguments(Coverage "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
if(NOT LCOV_PATH)
message(FATAL_ERROR "lcov not found! Aborting...")
endif() # NOT LCOV_PATH
if(NOT GENHTML_PATH)
message(FATAL_ERROR "genhtml not found! Aborting...")
endif() # NOT GENHTML_PATH
# Set base directory (as absolute path), or default to PROJECT_SOURCE_DIR
if(DEFINED Coverage_BASE_DIRECTORY)
get_filename_component(BASEDIR ${Coverage_BASE_DIRECTORY} ABSOLUTE)
else()
set(BASEDIR ${PROJECT_SOURCE_DIR})
endif()
# Collect excludes (CMake 3.4+: Also compute absolute paths)
set(LCOV_EXCLUDES "")
foreach(EXCLUDE ${Coverage_EXCLUDE} ${COVERAGE_EXCLUDES} ${COVERAGE_LCOV_EXCLUDES})
if(CMAKE_VERSION VERSION_GREATER 3.4)
get_filename_component(EXCLUDE ${EXCLUDE} ABSOLUTE BASE_DIR ${BASEDIR})
endif()
list(APPEND LCOV_EXCLUDES "${EXCLUDE}")
endforeach()
list(REMOVE_DUPLICATES LCOV_EXCLUDES)
# Conditional arguments
if(CPPFILT_PATH AND NOT ${Coverage_NO_DEMANGLE})
set(GENHTML_EXTRA_ARGS "--demangle-cpp")
endif()
# Setting up commands which will be run to generate coverage data.
# Cleanup lcov
set(LCOV_CLEAN_CMD
${LCOV_PATH} ${Coverage_LCOV_ARGS} --gcov-tool ${GCOV_PATH} -directory .
-b ${BASEDIR} --zerocounters
)
# Create baseline to make sure untouched files show up in the report
set(LCOV_BASELINE_CMD
${LCOV_PATH} ${Coverage_LCOV_ARGS} --gcov-tool ${GCOV_PATH} -c -i -d . -b
${BASEDIR} -o ${Coverage_NAME}.base
)
# Run tests
set(LCOV_EXEC_TESTS_CMD
${Coverage_EXECUTABLE} ${Coverage_EXECUTABLE_ARGS}
)
# Capturing lcov counters and generating report
set(LCOV_CAPTURE_CMD
${LCOV_PATH} ${Coverage_LCOV_ARGS} --gcov-tool ${GCOV_PATH} --directory . -b
${BASEDIR} --capture --output-file ${Coverage_NAME}.capture
)
# add baseline counters
set(LCOV_BASELINE_COUNT_CMD
${LCOV_PATH} ${Coverage_LCOV_ARGS} --gcov-tool ${GCOV_PATH} -a ${Coverage_NAME}.base
-a ${Coverage_NAME}.capture --output-file ${Coverage_NAME}.total
)
# filter collected data to final coverage report
set(LCOV_FILTER_CMD
${LCOV_PATH} ${Coverage_LCOV_ARGS} --gcov-tool ${GCOV_PATH} --remove
${Coverage_NAME}.total ${LCOV_EXCLUDES} --output-file ${Coverage_NAME}.info
)
# Generate HTML output
set(LCOV_GEN_HTML_CMD
${GENHTML_PATH} ${GENHTML_EXTRA_ARGS} ${Coverage_GENHTML_ARGS} -o
${Coverage_NAME} ${Coverage_NAME}.info
)
if(${Coverage_SONARQUBE})
# Generate SonarQube output
set(GCOVR_XML_CMD
${GCOVR_PATH} --sonarqube ${Coverage_NAME}_sonarqube.xml -r ${BASEDIR} ${GCOVR_ADDITIONAL_ARGS}
${GCOVR_EXCLUDE_ARGS} --object-directory=${PROJECT_BINARY_DIR}
)
set(GCOVR_XML_CMD_COMMAND
COMMAND ${GCOVR_XML_CMD}
)
set(GCOVR_XML_CMD_BYPRODUCTS ${Coverage_NAME}_sonarqube.xml)
set(GCOVR_XML_CMD_COMMENT COMMENT "SonarQube code coverage info report saved in ${Coverage_NAME}_sonarqube.xml.")
endif()
if(CODE_COVERAGE_VERBOSE)
message(STATUS "Executed command report")
message(STATUS "Command to clean up lcov: ")
string(REPLACE ";" " " LCOV_CLEAN_CMD_SPACED "${LCOV_CLEAN_CMD}")
message(STATUS "${LCOV_CLEAN_CMD_SPACED}")
message(STATUS "Command to create baseline: ")
string(REPLACE ";" " " LCOV_BASELINE_CMD_SPACED "${LCOV_BASELINE_CMD}")
message(STATUS "${LCOV_BASELINE_CMD_SPACED}")
message(STATUS "Command to run the tests: ")
string(REPLACE ";" " " LCOV_EXEC_TESTS_CMD_SPACED "${LCOV_EXEC_TESTS_CMD}")
message(STATUS "${LCOV_EXEC_TESTS_CMD_SPACED}")
message(STATUS "Command to capture counters and generate report: ")
string(REPLACE ";" " " LCOV_CAPTURE_CMD_SPACED "${LCOV_CAPTURE_CMD}")
message(STATUS "${LCOV_CAPTURE_CMD_SPACED}")
message(STATUS "Command to add baseline counters: ")
string(REPLACE ";" " " LCOV_BASELINE_COUNT_CMD_SPACED "${LCOV_BASELINE_COUNT_CMD}")
message(STATUS "${LCOV_BASELINE_COUNT_CMD_SPACED}")
message(STATUS "Command to filter collected data: ")
string(REPLACE ";" " " LCOV_FILTER_CMD_SPACED "${LCOV_FILTER_CMD}")
message(STATUS "${LCOV_FILTER_CMD_SPACED}")
message(STATUS "Command to generate lcov HTML output: ")
string(REPLACE ";" " " LCOV_GEN_HTML_CMD_SPACED "${LCOV_GEN_HTML_CMD}")
message(STATUS "${LCOV_GEN_HTML_CMD_SPACED}")
if(${Coverage_SONARQUBE})
message(STATUS "Command to generate SonarQube XML output: ")
string(REPLACE ";" " " GCOVR_XML_CMD_SPACED "${GCOVR_XML_CMD}")
message(STATUS "${GCOVR_XML_CMD_SPACED}")
endif()
endif()
# Setup target
add_custom_target(${Coverage_NAME}
COMMAND ${LCOV_CLEAN_CMD}
COMMAND ${LCOV_BASELINE_CMD}
COMMAND ${LCOV_EXEC_TESTS_CMD}
COMMAND ${LCOV_CAPTURE_CMD}
COMMAND ${LCOV_BASELINE_COUNT_CMD}
COMMAND ${LCOV_FILTER_CMD}
COMMAND ${LCOV_GEN_HTML_CMD}
${GCOVR_XML_CMD_COMMAND}
# Set output files as GENERATED (will be removed on 'make clean')
BYPRODUCTS
${Coverage_NAME}.base
${Coverage_NAME}.capture
${Coverage_NAME}.total
${Coverage_NAME}.info
${GCOVR_XML_CMD_BYPRODUCTS}
${Coverage_NAME}/index.html
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
DEPENDS ${Coverage_DEPENDENCIES}
VERBATIM # Protect arguments to commands
COMMENT "Resetting code coverage counters to zero.\nProcessing code coverage counters and generating report."
)
# Show where to find the lcov info report
add_custom_command(TARGET ${Coverage_NAME} POST_BUILD
COMMAND ;
COMMENT "Lcov code coverage info report saved in ${Coverage_NAME}.info."
${GCOVR_XML_CMD_COMMENT}
)
# Show info where to find the report
add_custom_command(TARGET ${Coverage_NAME} POST_BUILD
COMMAND ;
COMMENT "Open ./${Coverage_NAME}/index.html in your browser to view the coverage report."
)
endfunction() # setup_target_for_coverage_lcov
# Defines a target for running and collection code coverage information
# Builds dependencies, runs the given executable and outputs reports.
# NOTE! The executable should always have a ZERO as exit code otherwise
# the coverage generation will not complete.
#
# setup_target_for_coverage_gcovr_xml(
# NAME ctest_coverage # New target name
# EXECUTABLE ctest -j ${PROCESSOR_COUNT} # Executable in PROJECT_BINARY_DIR
# DEPENDENCIES executable_target # Dependencies to build first
# BASE_DIRECTORY "../" # Base directory for report
# # (defaults to PROJECT_SOURCE_DIR)
# EXCLUDE "src/dir1/*" "src/dir2/*" # Patterns to exclude (can be relative
# # to BASE_DIRECTORY, with CMake 3.4+)
# )
# The user can set the variable GCOVR_ADDITIONAL_ARGS to supply additional flags to the
# GCVOR command.
function(setup_target_for_coverage_gcovr_xml)
set(options NONE)
set(oneValueArgs BASE_DIRECTORY NAME)
set(multiValueArgs EXCLUDE EXECUTABLE EXECUTABLE_ARGS DEPENDENCIES)
cmake_parse_arguments(Coverage "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
if(NOT GCOVR_PATH)
message(FATAL_ERROR "gcovr not found! Aborting...")
endif() # NOT GCOVR_PATH
# Set base directory (as absolute path), or default to PROJECT_SOURCE_DIR
if(DEFINED Coverage_BASE_DIRECTORY)
get_filename_component(BASEDIR ${Coverage_BASE_DIRECTORY} ABSOLUTE)
else()
set(BASEDIR ${PROJECT_SOURCE_DIR})
endif()
# Collect excludes (CMake 3.4+: Also compute absolute paths)
set(GCOVR_EXCLUDES "")
foreach(EXCLUDE ${Coverage_EXCLUDE} ${COVERAGE_EXCLUDES} ${COVERAGE_GCOVR_EXCLUDES})
if(CMAKE_VERSION VERSION_GREATER 3.4)
get_filename_component(EXCLUDE ${EXCLUDE} ABSOLUTE BASE_DIR ${BASEDIR})
endif()
list(APPEND GCOVR_EXCLUDES "${EXCLUDE}")
endforeach()
list(REMOVE_DUPLICATES GCOVR_EXCLUDES)
# Combine excludes to several -e arguments
set(GCOVR_EXCLUDE_ARGS "")
foreach(EXCLUDE ${GCOVR_EXCLUDES})
list(APPEND GCOVR_EXCLUDE_ARGS "-e")
list(APPEND GCOVR_EXCLUDE_ARGS "${EXCLUDE}")
endforeach()
# Set up commands which will be run to generate coverage data
# Run tests
set(GCOVR_XML_EXEC_TESTS_CMD
${Coverage_EXECUTABLE} ${Coverage_EXECUTABLE_ARGS}
)
# Running gcovr
set(GCOVR_XML_CMD
${GCOVR_PATH} --xml ${Coverage_NAME}.xml -r ${BASEDIR} ${GCOVR_ADDITIONAL_ARGS}
${GCOVR_EXCLUDE_ARGS} --object-directory=${PROJECT_BINARY_DIR}
)
if(CODE_COVERAGE_VERBOSE)
message(STATUS "Executed command report")
message(STATUS "Command to run tests: ")
string(REPLACE ";" " " GCOVR_XML_EXEC_TESTS_CMD_SPACED "${GCOVR_XML_EXEC_TESTS_CMD}")
message(STATUS "${GCOVR_XML_EXEC_TESTS_CMD_SPACED}")
message(STATUS "Command to generate gcovr XML coverage data: ")
string(REPLACE ";" " " GCOVR_XML_CMD_SPACED "${GCOVR_XML_CMD}")
message(STATUS "${GCOVR_XML_CMD_SPACED}")
endif()
add_custom_target(${Coverage_NAME}
COMMAND ${GCOVR_XML_EXEC_TESTS_CMD}
COMMAND ${GCOVR_XML_CMD}
BYPRODUCTS ${Coverage_NAME}.xml
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
DEPENDS ${Coverage_DEPENDENCIES}
VERBATIM # Protect arguments to commands
COMMENT "Running gcovr to produce Cobertura code coverage report."
)
# Show info where to find the report
add_custom_command(TARGET ${Coverage_NAME} POST_BUILD
COMMAND ;
COMMENT "Cobertura code coverage report saved in ${Coverage_NAME}.xml."
)
endfunction() # setup_target_for_coverage_gcovr_xml
# Defines a target for running and collection code coverage information
# Builds dependencies, runs the given executable and outputs reports.
# NOTE! The executable should always have a ZERO as exit code otherwise
# the coverage generation will not complete.
#
# setup_target_for_coverage_gcovr_html(
# NAME ctest_coverage # New target name
# EXECUTABLE ctest -j ${PROCESSOR_COUNT} # Executable in PROJECT_BINARY_DIR
# DEPENDENCIES executable_target # Dependencies to build first
# BASE_DIRECTORY "../" # Base directory for report
# # (defaults to PROJECT_SOURCE_DIR)
# EXCLUDE "src/dir1/*" "src/dir2/*" # Patterns to exclude (can be relative
# # to BASE_DIRECTORY, with CMake 3.4+)
# )
# The user can set the variable GCOVR_ADDITIONAL_ARGS to supply additional flags to the
# GCVOR command.
function(setup_target_for_coverage_gcovr_html)
set(options NONE)
set(oneValueArgs BASE_DIRECTORY NAME)
set(multiValueArgs EXCLUDE EXECUTABLE EXECUTABLE_ARGS DEPENDENCIES)
cmake_parse_arguments(Coverage "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
if(NOT GCOVR_PATH)
message(FATAL_ERROR "gcovr not found! Aborting...")
endif() # NOT GCOVR_PATH
# Set base directory (as absolute path), or default to PROJECT_SOURCE_DIR
if(DEFINED Coverage_BASE_DIRECTORY)
get_filename_component(BASEDIR ${Coverage_BASE_DIRECTORY} ABSOLUTE)
else()
set(BASEDIR ${PROJECT_SOURCE_DIR})
endif()
# Collect excludes (CMake 3.4+: Also compute absolute paths)
set(GCOVR_EXCLUDES "")
foreach(EXCLUDE ${Coverage_EXCLUDE} ${COVERAGE_EXCLUDES} ${COVERAGE_GCOVR_EXCLUDES})
if(CMAKE_VERSION VERSION_GREATER 3.4)
get_filename_component(EXCLUDE ${EXCLUDE} ABSOLUTE BASE_DIR ${BASEDIR})
endif()
list(APPEND GCOVR_EXCLUDES "${EXCLUDE}")
endforeach()
list(REMOVE_DUPLICATES GCOVR_EXCLUDES)
# Combine excludes to several -e arguments
set(GCOVR_EXCLUDE_ARGS "")
foreach(EXCLUDE ${GCOVR_EXCLUDES})
list(APPEND GCOVR_EXCLUDE_ARGS "-e")
list(APPEND GCOVR_EXCLUDE_ARGS "${EXCLUDE}")
endforeach()
# Set up commands which will be run to generate coverage data
# Run tests
set(GCOVR_HTML_EXEC_TESTS_CMD
${Coverage_EXECUTABLE} ${Coverage_EXECUTABLE_ARGS}
)
# Create folder
set(GCOVR_HTML_FOLDER_CMD
${CMAKE_COMMAND} -E make_directory ${PROJECT_BINARY_DIR}/${Coverage_NAME}
)
# Running gcovr
set(GCOVR_HTML_CMD
${GCOVR_PATH} --html ${Coverage_NAME}/index.html --html-details -r ${BASEDIR} ${GCOVR_ADDITIONAL_ARGS}
${GCOVR_EXCLUDE_ARGS} --object-directory=${PROJECT_BINARY_DIR}
)
if(CODE_COVERAGE_VERBOSE)
message(STATUS "Executed command report")
message(STATUS "Command to run tests: ")
string(REPLACE ";" " " GCOVR_HTML_EXEC_TESTS_CMD_SPACED "${GCOVR_HTML_EXEC_TESTS_CMD}")
message(STATUS "${GCOVR_HTML_EXEC_TESTS_CMD_SPACED}")
message(STATUS "Command to create a folder: ")
string(REPLACE ";" " " GCOVR_HTML_FOLDER_CMD_SPACED "${GCOVR_HTML_FOLDER_CMD}")
message(STATUS "${GCOVR_HTML_FOLDER_CMD_SPACED}")
message(STATUS "Command to generate gcovr HTML coverage data: ")
string(REPLACE ";" " " GCOVR_HTML_CMD_SPACED "${GCOVR_HTML_CMD}")
message(STATUS "${GCOVR_HTML_CMD_SPACED}")
endif()
add_custom_target(${Coverage_NAME}
COMMAND ${GCOVR_HTML_EXEC_TESTS_CMD}
COMMAND ${GCOVR_HTML_FOLDER_CMD}
COMMAND ${GCOVR_HTML_CMD}
BYPRODUCTS ${PROJECT_BINARY_DIR}/${Coverage_NAME}/index.html # report directory
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
DEPENDS ${Coverage_DEPENDENCIES}
VERBATIM # Protect arguments to commands
COMMENT "Running gcovr to produce HTML code coverage report."
)
# Show info where to find the report
add_custom_command(TARGET ${Coverage_NAME} POST_BUILD
COMMAND ;
COMMENT "Open ./${Coverage_NAME}/index.html in your browser to view the coverage report."
)
endfunction() # setup_target_for_coverage_gcovr_html
# Defines a target for running and collection code coverage information
# Builds dependencies, runs the given executable and outputs reports.
# NOTE! The executable should always have a ZERO as exit code otherwise
# the coverage generation will not complete.
#
# setup_target_for_coverage_fastcov(
# NAME testrunner_coverage # New target name
# EXECUTABLE testrunner -j ${PROCESSOR_COUNT} # Executable in PROJECT_BINARY_DIR
# DEPENDENCIES testrunner # Dependencies to build first
# BASE_DIRECTORY "../" # Base directory for report
# # (defaults to PROJECT_SOURCE_DIR)
# EXCLUDE "src/dir1/" "src/dir2/" # Patterns to exclude.
# NO_DEMANGLE # Don't demangle C++ symbols
# # even if c++filt is found
# SKIP_HTML # Don't create html report
# POST_CMD perl -i -pe s!${PROJECT_SOURCE_DIR}/!!g ctest_coverage.json # E.g. for stripping source dir from file paths
# )
function(setup_target_for_coverage_fastcov)
set(options NO_DEMANGLE SKIP_HTML)
set(oneValueArgs BASE_DIRECTORY NAME)
set(multiValueArgs EXCLUDE EXECUTABLE EXECUTABLE_ARGS DEPENDENCIES FASTCOV_ARGS GENHTML_ARGS POST_CMD)
cmake_parse_arguments(Coverage "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
if(NOT FASTCOV_PATH)
message(FATAL_ERROR "fastcov not found! Aborting...")
endif()
if(NOT Coverage_SKIP_HTML AND NOT GENHTML_PATH)
message(FATAL_ERROR "genhtml not found! Aborting...")
endif()
# Set base directory (as absolute path), or default to PROJECT_SOURCE_DIR
if(Coverage_BASE_DIRECTORY)
get_filename_component(BASEDIR ${Coverage_BASE_DIRECTORY} ABSOLUTE)
else()
set(BASEDIR ${PROJECT_SOURCE_DIR})
endif()
# Collect excludes (Patterns, not paths, for fastcov)
set(FASTCOV_EXCLUDES "")
foreach(EXCLUDE ${Coverage_EXCLUDE} ${COVERAGE_EXCLUDES} ${COVERAGE_FASTCOV_EXCLUDES})
list(APPEND FASTCOV_EXCLUDES "${EXCLUDE}")
endforeach()
list(REMOVE_DUPLICATES FASTCOV_EXCLUDES)
# Conditional arguments
if(CPPFILT_PATH AND NOT ${Coverage_NO_DEMANGLE})
set(GENHTML_EXTRA_ARGS "--demangle-cpp")
endif()
# Set up commands which will be run to generate coverage data
set(FASTCOV_EXEC_TESTS_CMD ${Coverage_EXECUTABLE} ${Coverage_EXECUTABLE_ARGS})
set(FASTCOV_CAPTURE_CMD ${FASTCOV_PATH} ${Coverage_FASTCOV_ARGS} --gcov ${GCOV_PATH}
--search-directory ${BASEDIR}
--process-gcno
--output ${Coverage_NAME}.json
--exclude ${FASTCOV_EXCLUDES}
)
set(FASTCOV_CONVERT_CMD ${FASTCOV_PATH}
-C ${Coverage_NAME}.json --lcov --output ${Coverage_NAME}.info
)
if(Coverage_SKIP_HTML)
set(FASTCOV_HTML_CMD ";")
else()
set(FASTCOV_HTML_CMD ${GENHTML_PATH} ${GENHTML_EXTRA_ARGS} ${Coverage_GENHTML_ARGS}
-o ${Coverage_NAME} ${Coverage_NAME}.info
)
endif()
set(FASTCOV_POST_CMD ";")
if(Coverage_POST_CMD)
set(FASTCOV_POST_CMD ${Coverage_POST_CMD})
endif()
if(CODE_COVERAGE_VERBOSE)
message(STATUS "Code coverage commands for target ${Coverage_NAME} (fastcov):")
message(" Running tests:")
string(REPLACE ";" " " FASTCOV_EXEC_TESTS_CMD_SPACED "${FASTCOV_EXEC_TESTS_CMD}")
message(" ${FASTCOV_EXEC_TESTS_CMD_SPACED}")
message(" Capturing fastcov counters and generating report:")
string(REPLACE ";" " " FASTCOV_CAPTURE_CMD_SPACED "${FASTCOV_CAPTURE_CMD}")
message(" ${FASTCOV_CAPTURE_CMD_SPACED}")
message(" Converting fastcov .json to lcov .info:")
string(REPLACE ";" " " FASTCOV_CONVERT_CMD_SPACED "${FASTCOV_CONVERT_CMD}")
message(" ${FASTCOV_CONVERT_CMD_SPACED}")
if(NOT Coverage_SKIP_HTML)
message(" Generating HTML report: ")
string(REPLACE ";" " " FASTCOV_HTML_CMD_SPACED "${FASTCOV_HTML_CMD}")
message(" ${FASTCOV_HTML_CMD_SPACED}")
endif()
if(Coverage_POST_CMD)
message(" Running post command: ")
string(REPLACE ";" " " FASTCOV_POST_CMD_SPACED "${FASTCOV_POST_CMD}")
message(" ${FASTCOV_POST_CMD_SPACED}")
endif()
endif()
# Setup target
add_custom_target(${Coverage_NAME}
# Cleanup fastcov
COMMAND ${FASTCOV_PATH} ${Coverage_FASTCOV_ARGS} --gcov ${GCOV_PATH}
--search-directory ${BASEDIR}
--zerocounters
COMMAND ${FASTCOV_EXEC_TESTS_CMD}
COMMAND ${FASTCOV_CAPTURE_CMD}
COMMAND ${FASTCOV_CONVERT_CMD}
COMMAND ${FASTCOV_HTML_CMD}
COMMAND ${FASTCOV_POST_CMD}
# Set output files as GENERATED (will be removed on 'make clean')
BYPRODUCTS
${Coverage_NAME}.info
${Coverage_NAME}.json
${Coverage_NAME}/index.html # report directory
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
DEPENDS ${Coverage_DEPENDENCIES}
VERBATIM # Protect arguments to commands
COMMENT "Resetting code coverage counters to zero. Processing code coverage counters and generating report."
)
set(INFO_MSG "fastcov code coverage info report saved in ${Coverage_NAME}.info and ${Coverage_NAME}.json.")
if(NOT Coverage_SKIP_HTML)
string(APPEND INFO_MSG " Open ${PROJECT_BINARY_DIR}/${Coverage_NAME}/index.html in your browser to view the coverage report.")
endif()
# Show where to find the fastcov info report
add_custom_command(TARGET ${Coverage_NAME} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E echo ${INFO_MSG}
)
endfunction() # setup_target_for_coverage_fastcov
function(append_coverage_compiler_flags)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${COVERAGE_COMPILER_FLAGS}" PARENT_SCOPE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COVERAGE_COMPILER_FLAGS}" PARENT_SCOPE)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${COVERAGE_COMPILER_FLAGS}" PARENT_SCOPE)
message(STATUS "Appending code coverage C compiler flags: ${COVERAGE_C_COMPILER_FLAGS}")
message(STATUS "Appending code coverage CXX compiler flags: ${COVERAGE_CXX_COMPILER_FLAGS}")
endfunction() # append_coverage_compiler_flags
# Setup coverage for specific library
function(append_coverage_compiler_flags_to_target name)
separate_arguments(_flag_list NATIVE_COMMAND "${COVERAGE_COMPILER_FLAGS}")
target_compile_options(${name} PRIVATE ${_flag_list})
if(CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")
target_link_libraries(${name} PRIVATE gcov)
endif()
endfunction()
================================================
FILE: demos/plugin/CMakeLists.txt
================================================
cmake_minimum_required (VERSION 3.21)
set (PROJECT_NAME popsicle_plugin_demo)
get_filename_component (ROOT_PATH "${CMAKE_CURRENT_LIST_DIR}/../.." ABSOLUTE)
file (STRINGS "${ROOT_PATH}/modules/juce_python/juce_python.h" JUCE_PYTHON_MODULE)
#string (REGEX REPLACE "(.*)([0-9]+\.[0-9]+\.[0-9]+)(.*)" "\\2" VERSION_NUMBER ${JUCE_PYTHON_MODULE})
set(VERSION_NUMBER "0.0")
project (${PROJECT_NAME} VERSION ${VERSION_NUMBER})
# Set browsable modules in IDE
set_property (GLOBAL PROPERTY USE_FOLDERS YES)
option (JUCE_ENABLE_MODULE_SOURCE_GROUPS "Enable Module Source Groups" ON)
# Configure fetching content
#include (FetchContent)
#set (FETCHCONTENT_UPDATES_DISCONNECTED TRUE)
# Add the juce modules
add_subdirectory (${ROOT_PATH}/JUCE JUCE)
#FetchContent_Declare (JUCE
# GIT_REPOSITORY https://github.com/juce-framework/JUCE.git
# GIT_TAG origin/master
# GIT_SHALLOW TRUE
# GIT_PROGRESS TRUE
# SOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR}/JUCE)
#FetchContent_MakeAvailable (JUCE)
# Add the popsicle modules
get_filename_component (MODULES_PATH "${ROOT_PATH}/modules" ABSOLUTE)
add_subdirectory (${MODULES_PATH} ./modules)
#FetchContent_Declare (popsicle
# GIT_REPOSITORY https://github.com/kunitoki/popsicle.git
# GIT_TAG origin/master
# GIT_SHALLOW TRUE
# GIT_PROGRESS TRUE
# SOURCE_SUBDIR modules
# SOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR}/popsicle)
#FetchContent_MakeAvailable (popsicle)
# Configure python
if (APPLE)
set (Python_ROOT_DIR "/Library/Frameworks/Python.framework/Versions/Current")
endif()
set (Python_USE_STATIC_LIBS TRUE)
find_package (Python REQUIRED Interpreter Development.Embed)
# Setup the juce app
juce_add_plugin ("${PROJECT_NAME}"
PRODUCT_NAME "PopsiclePluginDemo"
VERSION "${VERSION_NUMBER}"
BUNDLE_ID "org.kunitoki.popsicleplugindemo"
FORMATS Standalone AU VST3
PLUGIN_MANUFACTURER_CODE POPS
PLUGIN_CODE Ppd0
IS_SYNTH OFF
NEEDS_MIDI_INPUT OFF
NEEDS_MIDI_OUTPUT OFF
IS_MIDI_EFFECT OFF
APP_SANDBOX_ENABLED ON
COPY_PLUGIN_AFTER_BUILD ON)
juce_generate_juce_header (${PROJECT_NAME})
# Add the binary target for the python standard library
set (ADDITIONAL_IGNORED_PYTHON_PATTERNS "lib2to3" "pydoc_data" "_xxtestfuzz*")
set (PYTHON_STANDARD_LIBRARY "${CMAKE_CURRENT_BINARY_DIR}/python${Python_VERSION_MAJOR}${Python_VERSION_MINOR}.zip")
add_custom_target (
${PROJECT_NAME}_stdlib
${Python_EXECUTABLE} ${ROOT_PATH}/cmake/ArchivePythonStdlib.py
-b ${Python_ROOT_DIR} -o ${CMAKE_CURRENT_BINARY_DIR} -M ${Python_VERSION_MAJOR} -m ${Python_VERSION_MINOR}
-x "\"${ADDITIONAL_IGNORED_PYTHON_PATTERNS}\""
BYPRODUCTS ${PYTHON_STANDARD_LIBRARY})
add_dependencies (${PROJECT_NAME} ${PROJECT_NAME}_stdlib)
juce_add_binary_data (BinaryData SOURCES ${PYTHON_STANDARD_LIBRARY})
add_dependencies (BinaryData ${PROJECT_NAME}_stdlib)
# Setup target properties
target_sources (${PROJECT_NAME} PRIVATE
PopsiclePluginEditor.cpp
PopsiclePluginEditor.h
PopsiclePluginProcessor.cpp
PopsiclePluginProcessor.h)
#set_target_properties (${PROJECT_NAME} PROPERTIES JUCE_TARGET_KIND_STRING "App")
set_target_properties (${PROJECT_NAME} PROPERTIES CXX_STANDARD 17)
set_target_properties (${PROJECT_NAME} PROPERTIES CXX_VISIBILITY_PRESET "hidden")
set_target_properties (${PROJECT_NAME} PROPERTIES VISIBILITY_INLINES_HIDDEN TRUE)
set_target_properties (${PROJECT_NAME} PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
if (APPLE)
#set_target_properties (${PROJECT_NAME} PROPERTIES OSX_ARCHITECTURES "arm64;x86_64")
#set_target_properties (BinaryData PROPERTIES OSX_ARCHITECTURES "arm64;x86_64")
target_link_options (${PROJECT_NAME} PRIVATE "-Wl,-weak_reference_mismatches,weak")
#set (LTO_CONFIGURATION "juce::juce_recommended_lto_flags")
set (LTO_CONFIGURATION "")
else()
set (LTO_CONFIGURATION "")
endif()
if (APPLE)
add_custom_command(
TARGET "${PROJECT_NAME}" POST_BUILD DEPENDS "${PROJECT_NAME}"
COMMAND $<$<CONFIG:release>:${CMAKE_STRIP}>
ARGS -x $<TARGET_FILE:${PROJECT_NAME}>)
elseif (UNIX)
add_custom_command(
TARGET "${PROJECT_NAME}" POST_BUILD DEPENDS "${PROJECT_NAME}"
COMMAND $<$<CONFIG:release>:${CMAKE_STRIP}>
ARGS --strip-all $<TARGET_FILE:${PROJECT_NAME}>)
endif()
target_compile_definitions (${PROJECT_NAME} PRIVATE
#JUCE_STANDALONE_APPLICATION=1
JUCE_MODAL_LOOPS_PERMITTED=1
JUCE_CATCH_UNHANDLED_EXCEPTIONS=0
JUCE_LOG_ASSERTIONS=1
JUCE_ALLOW_STATIC_NULL_VARIABLES=0
JUCE_STRICT_REFCOUNTEDPOINTER=1
JUCE_WEB_BROWSER=0
JUCE_LOAD_CURL_SYMBOLS_LAZILY=1
JUCE_SILENCE_XCODE_15_LINKER_WARNING=1
PYBIND11_DETAILED_ERROR_MESSAGES=1)
target_link_libraries (${PROJECT_NAME} PRIVATE
#juce::juce_analytics
juce::juce_audio_basics
juce::juce_audio_devices
juce::juce_audio_formats
juce::juce_audio_plugin_client
juce::juce_audio_processors
juce::juce_audio_utils
juce::juce_core
#juce::juce_cryptography
juce::juce_data_structures
#juce::juce_dsp
juce::juce_events
juce::juce_graphics
juce::juce_gui_basics
juce::juce_gui_extra
#juce::juce_opengl
#juce::juce_osc
#juce::juce_video
juce::juce_recommended_config_flags
juce::juce_recommended_warning_flags
Python::Python
popsicle::juce_python
popsicle::juce_python_recommended_warning_flags
BinaryData
${LTO_CONFIGURATION})
================================================
FILE: demos/plugin/PopsiclePluginEditor.cpp
================================================
#include "PopsiclePluginProcessor.h"
#include "PopsiclePluginEditor.h"
//==============================================================================
AudioPluginAudioProcessorEditor::AudioPluginAudioProcessorEditor (AudioPluginAudioProcessor& p)
: AudioProcessorEditor (&p), processorRef (p)
{
juce::ignoreUnused (processorRef);
// Make sure that before the constructor has finished, you've set the
// editor's size to whatever you need it to be.
setSize (400, 300);
}
AudioPluginAudioProcessorEditor::~AudioPluginAudioProcessorEditor()
{
}
//==============================================================================
void AudioPluginAudioProcessorEditor::paint (juce::Graphics& g)
{
// (Our component is opaque, so we must completely fill the background with a solid colour)
g.fillAll (getLookAndFeel().findColour (juce::ResizableWindow::backgroundColourId));
g.setColour (juce::Colours::white);
g.setFont (15.0f);
g.drawFittedText ("Hello World!", getLocalBounds(), juce::Justification::centred, 1);
}
void AudioPluginAudioProcessorEditor::resized()
{
// This is generally where you'll want to lay out the positions of any
// subcomponents in your editor..
}
================================================
FILE: demos/plugin/PopsiclePluginEditor.h
================================================
#pragma once
#include "PopsiclePluginProcessor.h"
//==============================================================================
class AudioPluginAudioProcessorEditor : public juce::AudioProcessorEditor
{
public:
explicit AudioPluginAudioProcessorEditor (AudioPluginAudioProcessor&);
~AudioPluginAudioProcessorEditor() override;
//==============================================================================
void paint (juce::Graphics&) override;
void resized() override;
private:
// This reference is provided as a quick way for your editor to
// access the processor object that created it.
AudioPluginAudioProcessor& processorRef;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioPluginAudioProcessorEditor)
};
================================================
FILE: demos/plugin/PopsiclePluginProcessor.cpp
================================================
#include "PopsiclePluginProcessor.h"
#include "PopsiclePluginEditor.h"
// =================================================================================================
PYBIND11_EMBEDDED_MODULE(custom, m)
{
namespace py = pybind11;
//py::module_::import (popsicle::PythonModuleName);
//py::class_<AudioPluginAudioProcessor, juce::Component> (m, "PopsicleDemo")
// .def_readwrite ("text", &PopsicleDemo::text);
}
// =================================================================================================
AudioPluginAudioProcessor::AudioPluginAudioProcessor()
: AudioProcessor (BusesProperties()
#if ! JucePlugin_IsMidiEffect
#if ! JucePlugin_IsSynth
.withInput ("Input", juce::AudioChannelSet::stereo(), true)
#endif
.withOutput ("Output", juce::AudioChannelSet::stereo(), true)
#endif
)
/* , engine (popsicle::ScriptEngine::prepareScriptingHome (
juce::JUCEApplication::getInstance()->getApplicationName(),
juce::File::getSpecialLocation (juce::File::tempDirectory),
[](const char* resourceName) -> juce::MemoryBlock
{
int dataSize = 0;
auto data = BinaryData::getNamedResource (resourceName, dataSize);
return { data, static_cast<size_t> (dataSize) };
}))*/
{
pybind11::dict locals;
//locals["custom"] = pybind11::module_::import ("custom");
locals["juce"] = pybind11::module_::import (popsicle::PythonModuleName);
//locals["this"] = pybind11::cast (this);
auto result = engine.runScript (R"(
# import sys
# An example of scriptable self
print("Scripting JUCE!")
#this.text = "Popsicle " + sys.version.split(" ")[0]
#this.setOpaque(True)
#this.setSize(600, 300)
)", locals);
if (result.failed())
std::cout << result.getErrorMessage();
}
AudioPluginAudioProcessor::~AudioPluginAudioProcessor()
{
}
// =================================================================================================
const juce::String AudioPluginAudioProcessor::getName() const
{
return JucePlugin_Name;
}
bool AudioPluginAudioProcessor::acceptsMidi() const
{
#if JucePlugin_WantsMidiInput
return true;
#else
return false;
#endif
}
bool AudioPluginAudioProcessor::producesMidi() const
{
#if JucePlugin_ProducesMidiOutput
return true;
#else
return false;
#endif
}
bool AudioPluginAudioProcessor::isMidiEffect() const
{
#if JucePlugin_IsMidiEffect
return true;
#else
return false;
#endif
}
double AudioPluginAudioProcessor::getTailLengthSeconds() const
{
return 0.0;
}
int AudioPluginAudioProcessor::getNumPrograms()
{
return 1; // NB: some hosts don't cope very well if you tell them there are 0 programs,
// so this should be at least 1, even if you're not really implementing programs.
}
int AudioPluginAudioProcessor::getCurrentProgram()
{
return 0;
}
void AudioPluginAudioProcessor::setCurrentProgram (int index)
{
juce::ignoreUnused (index);
}
const juce::String AudioPluginAudioProcessor::getProgramName (int index)
{
juce::ignoreUnused (index);
return {};
}
void AudioPluginAudioProcessor::changeProgramName (int index, const juce::String& newName)
{
juce::ignoreUnused (index, newName);
}
// =================================================================================================
void AudioPluginAudioProcessor::prepareToPlay (double sampleRate, int samplesPerBlock)
{
// Use this method as the place to do any pre-playback
// initialisation that you need..
juce::ignoreUnused (sampleRate, samplesPerBlock);
}
void AudioPluginAudioProcessor::releaseResources()
{
// When playback stops, you can use this as an opportunity to free up any
// spare memory, etc.
}
bool AudioPluginAudioProcessor::isBusesLayoutSupported (const BusesLayout& layouts) const
{
#if JucePlugin_IsMidiEffect
juce::ignoreUnused (layouts);
return true;
#else
// This is the place where you check if the layout is supported.
// In this template code we only support mono or stereo.
// Some plugin hosts, such as certain GarageBand versions, will only
// load plugins that support stereo bus layouts.
if (layouts.getMainOutputChannelSet() != juce::AudioChannelSet::mono()
&& layouts.getMainOutputChannelSet() != juce::AudioChannelSet::stereo())
return false;
// This checks if the input layout matches the output layout
#if ! JucePlugin_IsSynth
if (layouts.getMainOutputChannelSet() != layouts.getMainInputChannelSet())
return false;
#endif
return true;
#endif
}
void AudioPluginAudioProcessor::processBlock (juce::AudioBuffer<float>& buffer,
juce::MidiBuffer& midiMessages)
{
juce::ignoreUnused (midiMessages);
juce::ScopedNoDenormals noDenormals;
auto totalNumInputChannels = getTotalNumInputChannels();
auto totalNumOutputChannels = getTotalNumOutputChannels();
// In case we have more outputs than inputs, this code clears any output
// channels that didn't contain input data, (because these aren't
// guaranteed to be empty - they may contain garbage).
// This is here to avoid people getting screaming feedback
// when they first compile a plugin, but obviously you don't need to keep
// this code if your algorithm always overwrites all the output channels.
for (auto i = totalNumInputChannels; i < totalNumOutputChannels; ++i)
buffer.clear (i, 0, buffer.getNumSamples());
// This is the place where you'd normally do the guts of your plugin's
// audio processing...
// Make sure to reset the state if your inner loop is processing
// the samples and the outer loop is handling the channels.
// Alternatively, you can process the samples with the channels
// interleaved by keeping the same state.
for (int channel = 0; channel < totalNumInputChannels; ++channel)
{
auto* channelData = buffer.getWritePointer (channel);
juce::ignoreUnused (channelData);
// ..do something to the data...
}
}
// =================================================================================================
bool AudioPluginAudioProcessor::hasEditor() const
{
return true; // (change this to false if you choose to not supply an editor)
}
juce::AudioProcessorEditor* AudioPluginAudioProcessor::createEditor()
{
return new AudioPluginAudioProcessorEditor (*this);
}
// =================================================================================================
void AudioPluginAudioProcessor::getStateInformation (juce::MemoryBlock& destData)
{
// You should use this method to store your parameters in the memory block.
// You could do that either as raw data, or use the XML or ValueTree classes
// as intermediaries to make it easy to save and load complex data.
juce::ignoreUnused (destData);
}
void AudioPluginAudioProcessor::setStateInformation (const void* data, int sizeInBytes)
{
// You should use this method to restore your parameters from this memory block,
// whose contents will have been created by the getStateInformation() call.
juce::ignoreUnused (data, sizeInBytes);
}
// =================================================================================================
juce::AudioProcessor* JUCE_CALLTYPE createPluginFilter()
{
return new AudioPluginAudioProcessor();
}
================================================
FILE: demos/plugin/PopsiclePluginProcessor.h
================================================
#pragma once
#include "JuceHeader.h"
//==============================================================================
class AudioPluginAudioProcessor : public juce::AudioProcessor
{
public:
//==============================================================================
AudioPluginAudioProcessor();
~AudioPluginAudioProcessor() override;
//==============================================================================
void prepareToPlay (double sampleRate, int samplesPerBlock) override;
void releaseResources() override;
bool isBusesLayoutSupported (const BusesLayout& layouts) const override;
void processBlock (juce::AudioBuffer<float>&, juce::MidiBuffer&) override;
using AudioProcessor::processBlock;
//==============================================================================
juce::AudioProcessorEditor* createEditor() override;
bool hasEditor() const override;
//==============================================================================
const juce::String getName() const override;
bool acceptsMidi() const override;
bool producesMidi() const override;
bool isMidiEffect() const override;
double getTailLengthSeconds() const override;
//==============================================================================
int getNumPrograms() override;
int getCurrentProgram() override;
void setCurrentProgram (int index) override;
const juce::String getProgramName (int index) override;
void changeProgramName (int index, const juce::String& newName) override;
//==============================================================================
void getStateInformation (juce::MemoryBlock& destData) override;
void setStateInformation (const void* data, int sizeInBytes) override;
private:
popsicle::ScriptEngine engine;
//==============================================================================
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioPluginAudioProcessor)
};
================================================
FILE: demos/standalone/CMakeLists.txt
================================================
cmake_minimum_required (VERSION 3.21)
set (PROJECT_NAME popsicle_standalone_demo)
get_filename_component (ROOT_PATH "${CMAKE_CURRENT_LIST_DIR}/../.." ABSOLUTE)
file (STRINGS "${ROOT_PATH}/modules/juce_python/juce_python.h" JUCE_PYTHON_MODULE)
string (REGEX REPLACE "(.*)([0-9]+\.[0-9]+\.[0-9]+)(.*)" "\\2" VERSION_NUMBER ${JUCE_PYTHON_MODULE})
project (${PROJECT_NAME} VERSION ${VERSION_NUMBER})
# Set browsable modules in IDE
set_property (GLOBAL PROPERTY USE_FOLDERS YES)
option (JUCE_ENABLE_MODULE_SOURCE_GROUPS "Enable Module Source Groups" ON)
# Configure fetching content
#include (FetchContent)
#set (FETCHCONTENT_UPDATES_DISCONNECTED TRUE)
# Add the juce modules
add_subdirectory (${ROOT_PATH}/JUCE JUCE)
#FetchContent_Declare (JUCE
# GIT_REPOSITORY https://github.com/juce-framework/JUCE.git
# GIT_TAG origin/master
# GIT_SHALLOW TRUE
# GIT_PROGRESS TRUE
# SOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR}/JUCE)
#FetchContent_MakeAvailable (JUCE)
# Add the popsicle modules
get_filename_component (MODULES_PATH "${ROOT_PATH}/modules" ABSOLUTE)
add_subdirectory (${MODULES_PATH} ./modules)
#FetchContent_Declare (popsicle
# GIT_REPOSITORY https://github.com/kunitoki/popsicle.git
# GIT_TAG origin/master
# GIT_SHALLOW TRUE
# GIT_PROGRESS TRUE
# SOURCE_SUBDIR modules
# SOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR}/popsicle)
#FetchContent_MakeAvailable (popsicle)
# Configure python
if (APPLE)
set (Python_ROOT_DIR "/Library/Frameworks/Python.framework/Versions/Current")
endif()
set (Python_USE_STATIC_LIBS TRUE)
find_package (Python REQUIRED Interpreter Development.Embed)
# Setup the juce app
juce_add_gui_app (${PROJECT_NAME}
PRODUCT_NAME "PopsicleDemo"
VERSION "${VERSION_NUMBER}"
BUNDLE_ID "org.kunitoki.popsicledemo")
juce_generate_juce_header (${PROJECT_NAME})
# Add the binary target for the python standard library
set (ADDITIONAL_IGNORED_PYTHON_PATTERNS "lib2to3" "pydoc_data" "_xxtestfuzz*")
set (PYTHON_STANDARD_LIBRARY "${CMAKE_CURRENT_BINARY_DIR}/python${Python_VERSION_MAJOR}${Python_VERSION_MINOR}.zip")
add_custom_target (
${PROJECT_NAME}_stdlib
${Python_EXECUTABLE} ${ROOT_PATH}/cmake/ArchivePythonStdlib.py
-b ${Python_ROOT_DIR} -o ${CMAKE_CURRENT_BINARY_DIR} -M ${Python_VERSION_MAJOR} -m ${Python_VERSION_MINOR}
-x "\"${ADDITIONAL_IGNORED_PYTHON_PATTERNS}\""
BYPRODUCTS ${PYTHON_STANDARD_LIBRARY})
add_dependencies (${PROJECT_NAME} ${PROJECT_NAME}_stdlib)
juce_add_binary_data (BinaryData SOURCES ${PYTHON_STANDARD_LIBRARY})
add_dependencies (BinaryData ${PROJECT_NAME}_stdlib)
# Setup target properties
target_sources (${PROJECT_NAME} PRIVATE
Main.cpp
PopsicleDemo.cpp
PopsicleDemo.h)
set_target_properties (${PROJECT_NAME} PROPERTIES JUCE_TARGET_KIND_STRING "App")
set_target_properties (${PROJECT_NAME} PROPERTIES CXX_STANDARD 17)
set_target_properties (${PROJECT_NAME} PROPERTIES CXX_VISIBILITY_PRESET "hidden")
set_target_properties (${PROJECT_NAME} PROPERTIES VISIBILITY_INLINES_HIDDEN TRUE)
set_target_properties (${PROJECT_NAME} PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
if (APPLE)
#set_target_properties (${PROJECT_NAME} PROPERTIES OSX_ARCHITECTURES "arm64;x86_64")
#set_target_properties (BinaryData PROPERTIES OSX_ARCHITECTURES "arm64;x86_64")
target_link_options (${PROJECT_NAME} PRIVATE "-Wl,-weak_reference_mismatches,weak")
#set (LTO_CONFIGURATION "juce::juce_recommended_lto_flags")
set (LTO_CONFIGURATION "")
else()
set (LTO_CONFIGURATION "")
endif()
if (APPLE)
add_custom_command(
TARGET "${PROJECT_NAME}" POST_BUILD DEPENDS "${PROJECT_NAME}"
COMMAND $<$<CONFIG:release>:${CMAKE_STRIP}>
ARGS -x $<TARGET_FILE:${PROJECT_NAME}>)
elseif (UNIX)
add_custom_command(
TARGET "${PROJECT_NAME}" POST_BUILD DEPENDS "${PROJECT_NAME}"
COMMAND $<$<CONFIG:release>:${CMAKE_STRIP}>
ARGS --strip-all $<TARGET_FILE:${PROJECT_NAME}>)
endif()
target_compile_definitions (${PROJECT_NAME} PRIVATE
JUCE_STANDALONE_APPLICATION=1
JUCE_MODAL_LOOPS_PERMITTED=1
JUCE_CATCH_UNHANDLED_EXCEPTIONS=0
JUCE_LOG_ASSERTIONS=1
JUCE_ALLOW_STATIC_NULL_VARIABLES=0
JUCE_STRICT_REFCOUNTEDPOINTER=1
JUCE_WEB_BROWSER=0
JUCE_LOAD_CURL_SYMBOLS_LAZILY=1
JUCE_SILENCE_XCODE_15_LINKER_WARNING=1
PYBIND11_DETAILED_ERROR_MESSAGES=1)
target_link_libraries (${PROJECT_NAME} PRIVATE
#juce::juce_analytics
juce::juce_audio_basics
juce::juce_audio_devices
juce::juce_audio_formats
juce::juce_audio_processors
juce::juce_audio_utils
juce::juce_core
#juce::juce_cryptography
juce::juce_data_structures
#juce::juce_dsp
juce::juce_events
juce::juce_graphics
juce::juce_gui_basics
juce::juce_gui_extra
#juce::juce_opengl
#juce::juce_osc
#juce::juce_video
juce::juce_recommended_config_flags
juce::juce_recommended_warning_flags
Python::Python
popsicle::juce_python
popsicle::juce_python_recommended_warning_flags
BinaryData
${LTO_CONFIGURATION})
================================================
FILE: demos/standalone/Main.cpp
================================================
/**
* juce_python - Python bindings for the JUCE framework.
*
* This file is part of the popsicle project.
*
* Copyright (c) 2024 - kunitoki <kunitoki@gmail.com>
*
* popsicle is an open source library subject to commercial or open-source licensing.
*
* By using popsicle, you agree to the terms of the popsicle License Agreement, which can
* be found at https://raw.githubusercontent.com/kunitoki/popsicle/master/LICENSE
*
* Or: You may also use this code under the terms of the GPL v3 (see www.gnu.org/licenses).
*
* POPSICLE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER EXPRESSED
* OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE DISCLAIMED.
*/
#include "JuceHeader.h"
#include "PopsicleDemo.h"
// =================================================================================================
class PopsicleApplication : public juce::JUCEApplication
{
public:
PopsicleApplication() = default;
const juce::String getApplicationName() override
{
return "PopsicleDemo";
}
const juce::String getApplicationVersion() override
{
return "1.0.0";
}
void initialise (const String&) override
{
mainWindow.reset (new MainWindow ("PopsicleDemo", new PopsicleDemo()));
}
void shutdown() override
{
mainWindow = nullptr;
}
private:
class MainWindow : public juce::DocumentWindow
{
public:
MainWindow (const juce::String& name, juce::Component* c)
: juce::DocumentWindow (name, juce::Desktop::getInstance().getDefaultLookAndFeel()
.findColour (juce::ResizableWindow::backgroundColourId),
juce::DocumentWindow::allButtons)
{
setUsingNativeTitleBar (true);
setContentOwned (c, true);
#if JUCE_ANDROID || JUCE_IOS
setFullScreen (true);
#else
setResizable (true, false);
setResizeLimits (300, 250, 10000, 10000);
centreWithSize (getWidth(), getHeight());
#endif
juce::MessageManager::callAsync ([this]
{
juce::Process::makeForegroundProcess();
setVisible (true);
toFront (true);
});
}
void closeButtonPressed() override
{
juce::JUCEApplication::getInstance()->systemRequestedQuit();
}
private:
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MainWindow)
};
std::unique_ptr<MainWindow> mainWindow;
};
// =================================================================================================
START_JUCE_APPLICATION (PopsicleApplication)
================================================
FILE: demos/standalone/PopsicleDemo.cpp
================================================
/**
* juce_python - Python bindings for the JUCE framework.
*
* This file is part of the popsicle project.
*
* Copyright (c) 2024 - kunitoki <kunitoki@gmail.com>
*
* popsicle is an open source library subject to commercial or open-source licensing.
*
* By using popsicle, you agree to the terms of the popsicle License Agreement, which can
* be found at https://raw.githubusercontent.com/kunitoki/popsicle/master/LICENSE
*
* Or: You may also use this code under the terms of the GPL v3 (see www.gnu.org/licenses).
*
* POPSICLE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER EXPRESSED
* OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE DISCLAIMED.
*/
#include "PopsicleDemo.h"
// =================================================================================================
PYBIND11_EMBEDDED_MODULE(custom, m)
{
namespace py = pybind11;
py::module_::import (popsicle::PythonModuleName);
py::class_<PopsicleDemo, juce::Component> (m, "PopsicleDemo")
.def_readwrite ("text", &PopsicleDemo::text);
}
// =================================================================================================
namespace {
void crashHandler ([[maybe_unused]] void* stack)
{
DBG (juce::SystemStats::getStackBacktrace());
}
} // namespace
// =================================================================================================
PopsicleDemo::PopsicleDemo()
: text ("Unkown")
, engine (popsicle::ScriptEngine::prepareScriptingHome (
juce::JUCEApplication::getInstance()->getApplicationName(),
juce::File::getSpecialLocation (juce::File::tempDirectory),
[](const char* resourceName) -> juce::MemoryBlock
{
int dataSize = 0;
auto data = BinaryData::getNamedResource (resourceName, dataSize);
return { data, static_cast<size_t> (dataSize) };
}))
{
juce::SystemStats::setApplicationCrashHandler (crashHandler);
pybind11::dict locals;
locals["custom"] = pybind11::module_::import ("custom");
locals["juce"] = pybind11::module_::import (popsicle::PythonModuleName);
locals["this"] = pybind11::cast (this);
auto result = engine.runScript (R"(
import sys
# An example of scriptable self
print("Scripting JUCE!")
this.text = "Popsicle " + sys.version.split(" ")[0]
this.setOpaque(True)
this.setSize(600, 300)
)", locals);
if (result.failed())
std::cout << result.getErrorMessage();
}
PopsicleDemo::~PopsicleDemo()
{
}
void PopsicleDemo::paint (juce::Graphics& g)
{
g.fillAll (findColour (juce::DocumentWindow::backgroundColourId));
g.setFont (juce::Font (16.0f));
g.setColour (juce::Colours::white);
juce::String finalText;
finalText << "Hello, " << text << "!";
g.drawText (finalText, getLocalBounds(), juce::Justification::centred, true);
}
void PopsicleDemo::resized()
{
}
================================================
FILE: demos/standalone/PopsicleDemo.h
================================================
/**
* juce_python - Python bindings for the JUCE framework.
*
* This file is part of the popsicle project.
*
* Copyright (c) 2024 - kunitoki <kunitoki@gmail.com>
*
* popsicle is an open source library subject to commercial or open-source licensing.
*
* By using popsicle, you agree to the terms of the popsicle License Agreement, which can
* be found at https://raw.githubusercontent.com/kunitoki/popsicle/master/LICENSE
*
* Or: You may also use this code under the terms of the GPL v3 (see www.gnu.org/licenses).
*
* POPSICLE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER EXPRESSED
* OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE DISCLAIMED.
*/
#pragma once
#include "JuceHeader.h"
// =================================================================================================
class PopsicleDemo : public juce::Component
{
public:
PopsicleDemo();
~PopsicleDemo() override;
// juce::Component
void paint (juce::Graphics& g) override;
void resized() override;
juce::String text;
private:
popsicle::ScriptEngine engine;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (PopsicleDemo)
};
================================================
FILE: docs/EmbeddingTutorial.rst
================================================
=========================
Popsicle: Embedding Guide
=========================
TODO
--------------------------------------
Adding popsicle to the project (cmake)
--------------------------------------
When `cmake` is the preferred build system for a JUCE app, it's necessary to fetch the popsicle repository
- Adding an in-tree checked out repository of popsicle (as a non recursive submodule of your project):
.. code-block:: cmake
add_subdirectory (${CMAKE_CURRENT_LIST_DIR}/popsicle/modules)
- Adding an out-of-tree checked out repository of popsicle:
.. code-block:: cmake
add_subdirectory (${CMAKE_CURRENT_LIST_DIR}/../popsicle/modules popsicle)
- Using `FetchContent` to add popsicle to your project:
.. code-block:: cmake
include (FetchContent)
set (FETCHCONTENT_UPDATES_DISCONNECTED TRUE)
FetchContent_Declare (popsicle
GIT_REPOSITORY https://github.com/kunitoki/popsicle.git
GIT_TAG origin/master # Eventually a tagged release
GIT_SHALLOW TRUE
GIT_PROGRESS TRUE
SOURCE_SUBDIR modules
SOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR}/popsicle)
FetchContent_MakeAvailable (popsicle)
Once this is done, it's also ncessary to find python interpreter and libraries to embed:
.. code-block:: cmake
set (Python_USE_STATIC_LIBS TRUE)
find_package (Python REQUIRED Interpreter Development.Embed)
If you installed python globally using the official upstream installers, it's possible to force their location as well to simplify the selection of the desired python version, for example in macOS:
.. code-block:: cmake
set (Python_ROOT_DIR "/Library/Frameworks/Python.framework/Versions/Current")
set (Python_USE_STATIC_LIBS TRUE)
find_package (Python REQUIRED Interpreter Development.Embed)
And add the necessary modules to the target (application or plugin):
.. code-block:: cmake
target_link_libraries (${PROJECT_NAME} PRIVATE
juce::juce_audio_basics
juce::juce_audio_devices
# More juce modules here ...
Python::Python # << Add python library
popsicle::juce_python # << Add popsicle juce_python
popsicle::juce_python_recommended_warning_flags) # << Add popsicle recommended warning flags
In order to be able to initialise correctly the embedded interpreter on the machine where the application will be deployed, we need to also zip and deploy the Python standard library or the interpreter bundled with the application will fail to initialise, requiring the final user to install the exact same python version.
In order to create a zip of the standard library we can add a new target which executes a script in `popsicle/cmake/ArchivePythonStdlib.py` (modify the path in case your location of popsicle is different):
.. code-block:: cmake
set (ADDITIONAL_IGNORED_PYTHON_PATTERNS "lib2to3" "pydoc_data" "_xxtestfuzz*")
set (PYTHON_STANDARD_LIBRARY "${CMAKE_CURRENT_BINARY_DIR}/python${Python_VERSION_MAJOR}${Python_VERSION_MINOR}.zip")
add_custom_target (
${PROJECT_NAME}_stdlib
${Python_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/popsicle/cmake/ArchivePythonStdlib.py
-b ${Python_ROOT_DIR} -o ${CMAKE_CURRENT_BINARY_DIR} -M ${Python_VERSION_MAJOR} -m ${Python_VERSION_MINOR}
-i "\"${ADDITIONAL_IGNORED_PYTHON_PATTERNS}\""
BYPRODUCTS ${PYTHON_STANDARD_LIBRARY})
add_dependencies (${PROJECT_NAME} ${PROJECT_NAME}_stdlib)
This will compile a zip file in `CMAKE_CURRENT_BINARY_DIR` with the Python's standard library that can be then copied when the app is installed.
The zip file can also be embedded in the binary by using the `juce_add_binary_data`:
.. code-block:: cmake
juce_add_binary_data (BinaryData SOURCES ${PYTHON_STANDARD_LIBRARY})
add_dependencies (BinaryData ${PROJECT_NAME}_stdlib)
target_link_libraries (${PROJECT_NAME} PRIVATE
juce::juce_audio_basics
juce::juce_audio_devices
# More juce modules here ...
BinaryData)
-----------------------------------------
Adding popsicle to the project (projucer)
-----------------------------------------
TODO
----------------------------------
Boostrapping the interpreter (C++)
----------------------------------
TODO
================================================
FILE: docs/QuickStartGuide.rst
================================================
===========================
Popsicle: Quick Start Guide
===========================
Popsicle is a groundbreaking project designed to extend the accessibility of `JUCE <https://juce.com/>`_ by seamlessly integrating it with Python. Leveraging the power of `pybind11 <https://pybind11.readthedocs.io/en/stable/>`_, Popsicle offers a Pythonic interface to the JUCE framework. This integration allows developers to utilize JUCE in a manner similar to using Qt with PySide, offering a simplified yet robust approach.
--------------------------
Using the wheels in Python
--------------------------
In order to use popsicle is necessary to install the wheels from pypi.
.. code-block:: bash
pip3 install popsicle
-----------------------------
Importing the popsicle module
-----------------------------
To make sure everything is setup correctly, execute the following command:
.. code-block:: bash
python3 -c "import popsicle as juce; print(juce.SystemStats.getJUCEVersion())"
Which should print something like:
.. code-block:: bash
JUCE v7.0.9
Now you are ready to rock !
------------------------------
First hands on of JUCE classes
------------------------------
Let's grab a more convoluted example:
.. code-block:: python
import popsicle as juce
el = juce.XmlElement("TEST")
el.setAttribute("property1", "100")
el.setAttribute("property2", "hallo")
el.setAttribute("property3", "1")
os = juce.MemoryOutputStream()
el.writeTo(os)
print(os.toString())
Which invoked should print:
.. code-block:: bash
<?xml version="1.0" encoding="UTF-8"?>
<TEST property1="100" property2="hallo" property3="1"/>
--------------------------
Our first JUCE application
--------------------------
Now we would like to start a proper JUCE application with the Message Thread running and all the JUCE bell and whistles, but let's start with having our first JUCEApplication subclass:
.. code-block:: python
import popsicle as juce
class MyFirstPopsicleApp(juce.JUCEApplication):
def __init__(self):
juce.JUCEApplication.__init__(self)
def getApplicationName(self):
return "My First Popsicle App"
def getApplicationVersion(self):
return "1.0"
def initialise(self, commandLineParameters):
print("We were called with:", commandLineParameters)
juce.MessageManager.callAsync(lambda: self.systemRequestedQuit())
def shutdown(self):
print("We were told to shutdown")
Now that we have our application, we need to tell just to use it, let's add this at the end of the file:
.. code-block:: python
if __name__ == "__main__":
juce.START_JUCE_APPLICATION(MyFirstPopsicleApp)
At this point, after saving the file (called `first_app.py` or whatever it suit best), when executed like this:
.. code-block:: bash
python3 first_app.py 1 2 3 "test"
Will start and immediately quit, producing this output:
.. code-block:: bash
We were called with: 1 2 3 test
We were told to shutdown
---------------
Adding a window
---------------
In order to show something on screen, we need to build a window with an empty component into it and show it.
.. code-block:: python
import popsicle as juce
class MyFirstPopsicleComponent(juce.Component):
def __init__(self):
juce.Component.__init__(self)
self.setSize(600, 400)
self.setVisible(True)
def paint(self, g):
g.fillAll(juce.Colours.red)
class MyFirstPopsicleWindow(juce.DocumentWindow):
component = None
def __init__(self):
juce.DocumentWindow.__init__(
self,
juce.JUCEApplication.getInstance().getApplicationName(),
juce.Desktop.getInstance().getDefaultLookAndFeel()
.findColour(juce.ResizableWindow.backgroundColourId),
juce.DocumentWindow.allButtons,
True)
self.component = MyFirstPopsicleComponent()
self.setResizable(True, True)
self.setContentNonOwned(self.component, True)
self.centreWithSize(self.component.getWidth(), self.component.getHeight() + self.getTitleBarHeight())
self.setVisible(True)
def __del__(self):
self.clearContentComponent()
if self.component:
self.component.setVisible(False)
del self.component
def closeButtonPressed(self):
juce.JUCEApplication.getInstance().systemRequestedQuit()
Then let's add it to the application:
.. code-block:: python
class MyFirstPopsicleApp(juce.JUCEApplication):
window = None
def __init__(self):
juce.JUCEApplication.__init__(self)
def getApplicationName(self):
return "My First Popsicle App"
def getApplicationVersion(self):
return "1.0"
def initialise(self, commandLineParameters):
self.window = MyFirstPopsicleWindow()
juce.MessageManager.callAsync(lambda: juce.Process.makeForegroundProcess())
def shutdown(self):
if self.window:
del self.window
At this point launching the app will show a window with a red component inside. Great progress !
================================================
FILE: docs/conf.py
================================================
# -*- coding: utf-8 -*-
import sys, os
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#sys.path.insert(0, os.path.abspath('.'))
# -- General configuration -----------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
#needs_sphinx = '1.0'
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.todo', 'sphinx.ext.ifconfig']
# 'sphinx.ext.coverage'
# fancy extensions we don't need now...
# 'sphinx.ext.viewcode'
# 'sphinx.ext.intersphinx',
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# The suffix of source filenames.
source_suffix = '.rst'
# The encoding of source files.
#source_encoding = 'utf-8-sig'
# The master toctree document.
master_doc = 'QuickStartGuide'
# General information about the project.
project = u'Popsicle'
copyright = u'2024, Popsicle Project'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = '1.0'
# The full version, including alpha/beta/rc tags.
release = '1.0.0'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#language = None
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
#today = ''
# Else, today_fmt is used as the format for a strftime call.
#today_fmt = '%B %d, %Y'
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = ['_build']
# The reST default role (used for this markup: `text`) to use for all documents.
#default_role = None
# If true, '()' will be appended to :func: etc. cross-reference text.
#add_function_parentheses = True
# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
#add_module_names = True
# If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default.
#show_authors = False
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
# A list of ignored prefixes for module index sorting.
#modindex_common_prefix = []
# -- Options for HTML output ---------------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'default'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#html_theme_options = {}
# Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = []
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
#html_title = None
# A shorter title for the navigation bar. Default is the same as html_title.
#html_short_title = None
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
#html_logo = None
# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
#html_favicon = None
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
#html_last_updated_fmt = '%b %d, %Y'
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
#html_use_smartypants = True
# Custom sidebar templates, maps document names to template names.
#html_sidebars = {}
# Additional templates that should be rendered to pages, maps page names to
# template names.
#html_additional_pages = {}
# If false, no module index is generated.
#html_domain_indices = True
# If false, no index is generated.
#html_use_index = True
# If true, the index is split into individual pages for each letter.
#html_split_index = False
# If true, links to the reST sources are added to the pages.
html_show_sourcelink = False
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
#html_show_sphinx = True
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
html_show_copyright = False
# If true, an OpenSearch description file will be output, and all pages will
# contain a <link> tag referring to it. The value of this option must be the
# base URL from which the finished HTML is served.
#html_use_opensearch = ''
# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
#html_file_suffix = ''
# Output file base name for HTML help builder.
htmlhelp_basename = 'popsicledoc'
# -- Options for LaTeX output --------------------------------------------------
# The paper size ('letter' or 'a4').
#latex_paper_size = 'letter'
# The font size ('10pt', '11pt' or '12pt').
#latex_font_size = '10pt'
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
#latex_documents = []
# The name of an image file (relative to this directory) to place at the top of
# the title page.
#latex_logo = None
# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
#latex_use_parts = False
# If true, show page references after internal links.
#latex_show_pagerefs = False
# If true, show URL addresses after external links.
#latex_show_urls = False
# Additional stuff for the LaTeX preamble.
#latex_preamble = ''
# Documents to append as an appendix to all manuals.
#latex_appendices = []
# If false, no module index is generated.
#latex_domain_indices = True
# -- Options for manual page output --------------------------------------------
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
#man_pages = []
# -- Options for Epub output ---------------------------------------------------
# Bibliographic Dublin Core info.
epub_title = u'Popsicle'
epub_author = u'kunitoki'
epub_publisher = u'kunitoki'
epub_copyright = u'2024, kunitoki'
# The language of the text. It defaults to the language option
# or en if the language is not set.
#epub_language = ''
# The scheme of the identifier. Typical schemes are ISBN or URL.
#epub_scheme = ''
# The unique identifier of the text. This can be a ISBN number
# or the project homepage.
#epub_identifier = ''
# A unique identification for the text.
#epub_uid = ''
# HTML files that should be inserted before the pages created by sphinx.
# The format is a list of tuples containing the path and title.
#epub_pre_files = []
# HTML files shat should be inserted after the pages created by sphinx.
# The format is a list of tuples containing the path and title.
#epub_post_files = []
# A list of files that should not be packed into the epub file.
#epub_exclude_files = []
# The depth of the table of contents in toc.ncx.
#epub_tocdepth = 3
# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {'http://docs.python.org/': None}
================================================
FILE: examples/.gitignore
================================================
emoji_cache/
================================================
FILE: examples/__init__.py
================================================
================================================
FILE: examples/animated_component.py
================================================
import math
from juce_init import START_JUCE_COMPONENT
import popsicle as juce
class MainContentComponent(juce.AnimatedAppComponent):
def __init__(self):
super().__init__()
self.setSize(800, 600)
self.setFramesPerSecond(60)
def update(self):
pass
def paint(self, g):
g.fillAll(self.getLookAndFeel().findColour(juce.ResizableWindow.backgroundColourId))
g.setColour(juce.Colours.turquoise) # self.getLookAndFeel().findColour(juce.Slider.thumbColourId)
fishLength = 15
spinePath = juce.Path()
for i in range(fishLength):
radius = 100 + 10 * math.sin(self.getFrameCounter() * 0.1 + i * 0.5)
p = juce.Point[float](
self.getWidth() / 2.0 + 1.5 * radius * math.sin(self.getFrameCounter() * 0.02 + i * 0.12),
self.getHeight() / 2.0 + 1.0 * radius * math.cos(self.getFrameCounter() * 0.04 + i * 0.12))
g.fillEllipse(p.x - i, p.y - i, 2.0 + 2.0 * i, 2.0 + 2.0 * i)
if i == 0:
spinePath.startNewSubPath(p)
else:
spinePath.lineTo(p)
g.strokePath(spinePath, juce.PathStrokeType(4.0))
if __name__ == "__main__":
START_JUCE_COMPONENT(MainContentComponent, name="Animated Component")
================================================
FILE: examples/audio_device.py
================================================
import math
import random
from juce_init import START_JUCE_COMPONENT
import popsicle as juce
class AudioCallback(juce.AudioIODeviceCallback):
gain = 1.0
time = 0.0
device = None
def audioDeviceAboutToStart(self, device: juce.AudioIODevice):
print("starting", device, "at", device.getCurrentSampleRate())
self.device = device
def audioDeviceIOCallbackWithContext(self, inputs, numInputChannels, outputs, numOutputChannels, numSamples, context):
for sample in range(numSamples):
noise = (random.random() * 2.0 - 1.0) * 0.025
sound = math.sin(math.radians(self.time))
self.time = (self.time + 2.0) % 360.0
for output in outputs:
output[sample] = (noise + sound) * self.gain
def audioDeviceError(self, errorMessage: str):
print("error", errorMessage)
def audioDeviceStopped(self):
print("stopping")
class MainContentComponent(juce.Component):
manager = juce.AudioDeviceManager()
audio_callback = AudioCallback()
def __init__(self):
juce.Component.__init__(self)
width = 600
height = 400
self.manager.addAudioCallback(self.audio_callback)
result = self.manager.initialiseWithDefaultDevices(0, 2)
if result:
print(result)
self.button = juce.TextButton("Silence!")
self.addAndMakeVisible(self.button)
self.button.onStateChange = lambda: self.onButtonStateChange()
self.setSize(int(width), int(height))
self.setOpaque(True)
def visibilityChanged(self):
if not self.isVisible() and self.manager:
self.manager.removeAudioCallback(self.audio_callback)
self.manager.closeAudioDevice()
def onButtonStateChange(self):
if self.button.getState() == juce.Button.ButtonState.buttonDown:
self.audio_callback.gain = 0.25
else:
self.audio_callback.gain = 1.0
def paint(self, g: juce.Graphics):
g.fillAll(juce.Colours.black)
def resized(self):
bounds = self.getLocalBounds()
self.button.setBounds(bounds.reduced(100))
if __name__ == "__main__":
START_JUCE_COMPONENT(MainContentComponent, name="Audio Device Example")
================================================
FILE: examples/audio_player.py
================================================
from enum import Enum
from juce_init import START_JUCE_COMPONENT
import popsicle as juce
class TransportState(Enum):
Stopped = 0
Starting = 1
Playing = 2
Stopping = 3
class AudioSource(juce.AudioSource):
transportSource = juce.AudioTransportSource()
hasReader = juce.Atomic[bool](False)
def __init__(self):
juce.AudioSource.__init__(self)
def prepareToPlay(self, samplesPerBlockExpected, sampleRate):
self.transportSource.prepareToPlay(samplesPerBlockExpected, sampleRate)
def getNextAudioBlock(self, bufferToFill):
if not self.hasReader.get():
bufferToFill.clearActiveBufferRegion()
else:
self.transportSource.getNextAudioBlock(bufferToFill)
def releaseResources(self):
self.transportSource.releaseResources()
class MainContentComponent(juce.Component, juce.ChangeListener, juce.Timer):
openButton = juce.TextButton()
playButton = juce.TextButton()
stopButton = juce.TextButton()
loopingToggle = juce.ToggleButton()
currentPositionLabel = juce.Label()
audioSource = AudioSource()
audioSourcePlayer = juce.AudioSourcePlayer()
readerSource = None
isLooping = False
deviceManager = juce.AudioDeviceManager()
formatManager = juce.AudioFormatManager()
state = TransportState.Stopped
def __init__(self):
juce.Component.__init__(self)
juce.ChangeListener.__init__(self)
juce.Timer.__init__(self)
self.addAndMakeVisible(self.openButton)
self.openButton.setButtonText("Open...")
self.openButton.onClick = self.openButtonClicked
self.addAndMakeVisible (self.playButton)
self.playButton.setButtonText ("Play")
self.playButton.onClick = self.playButtonClicked
self.playButton.setColour(juce.TextButton.buttonColourId, juce.Colours.green)
self.playButton.setEnabled(False)
self.addAndMakeVisible(self.stopButton)
self.stopButton.setButtonText("Stop")
self.stopButton.onClick = self.stopButtonClicked
self.stopButton.setColour(juce.TextButton.buttonColourId, juce.Colours.red)
self.stopButton.setEnabled(False)
self.addAndMakeVisible(self.loopingToggle)
self.loopingToggle.setButtonText("Loop")
self.loopingToggle.onClick = self.loopButtonChanged
self.addAndMakeVisible(self.currentPositionLabel)
self.currentPositionLabel.setText("Stopped", juce.dontSendNotification)
self.formatManager.registerBasicFormats()
self.audioSource.transportSource.addChangeListener(self)
self.deviceManager.initialise(0, 2, None, True)
self.deviceManager.addAudioCallback(self.audioSourcePlayer)
self.audioSourcePlayer.setSource(self.audioSource)
self.setSize(400, 400)
self.startTimer(20)
def visibilityChanged(self):
if self.isVisible() or not self.deviceManager:
return
self.audioSource.hasReader.set(False)
self.deviceManager.removeAudioCallback(self.audioSourcePlayer)
self.audioSource.transportSource.setSource(None)
self.audioSourcePlayer.setSource(None)
self.deviceManager.closeAudioDevice()
def resized(self):
self.openButton.setBounds(10, 10, self.getWidth() - 20, 20)
self.playButton.setBounds(10, 40, self.getWidth() - 20, 20)
self.stopButton.setBounds(10, 70, self.getWidth() - 20, 20)
self.loopingToggle.setBounds(10, 100, self.getWidth() - 20, 20)
self.currentPositionLabel.setBounds(10, 130, self.getWidth() - 20, 20)
def changeListenerCallback(self, source):
print("changeListenerCallback", source, self.audioSource.transportSource)
if source == self.audioSource.transportSource:
if self.audioSource.transportSource.isPlaying():
self.changeState(TransportState.Playing)
else:
self.changeState(TransportState.Stopped)
def timerCallback(self):
if self.audioSource.transportSource.isPlaying():
position = juce.RelativeTime(self.audioSource.transportSource.getCurrentPosition())
minutes = int(position.inMinutes()) % 60
seconds = int(position.inSeconds()) % 60
millis = int(position.inMilliseconds()) % 1000
positionString = "{:02d}:{:02d}:{:03d}".format(minutes, seconds, millis)
self.currentPositionLabel.setText(positionString, juce.dontSendNotification)
else:
self.currentPositionLabel.setText("Stopped", juce.dontSendNotification)
def updateLoopState(self, shouldLoop):
self.isLooping = shouldLoop
if self.readerSource:
self.readerSource.setLooping(self.isLooping)
def changeState (self, newState):
if self.state == newState:
return
self.state = newState
print(self.state)
if self.state == TransportState.Stopped:
self.stopButton.setEnabled(False)
self.playButton.setEnabled(True)
self.audioSource.transportSource.setPosition(0.0)
elif self.state == TransportState.Starting:
self.playButton.setEnabled(False)
self.audioSource.transportSource.start()
elif self.state == TransportState.Playing:
self.stopButton.setEnabled(True)
elif self.state == TransportState.Stopping:
self.audioSource.transportSource.stop()
def openButtonClicked(self):
chooser = juce.FileChooser("Select a Wave file to play...", juce.File(), "*.wav")
if chooser.browseForFileToOpen():
self.reader = self.formatManager.createReaderFor(chooser.getResult())
if self.reader:
self.readerSource = juce.AudioFormatReaderSource(self.reader, False)
if self.isLooping:
self.readerSource.setLooping(self.isLooping)
self.audioSource.transportSource.setSource(self.readerSource, 0, None, self.reader.sampleRate, 2)
self.audioSource.hasReader.set(True)
self.playButton.setEnabled(True)
else:
self.audioSource.hasReader.set(False)
def playButtonClicked(self):
self.updateLoopState(self.loopingToggle.getToggleState())
self.changeState(TransportState.Starting)
def stopButtonClicked(self):
self.changeState(TransportState.Stopping)
def loopButtonChanged(self):
self.updateLoopState(self.loopingToggle.getToggleState())
if __name__ == "__main__":
START_JUCE_COMPONENT(MainContentComponent, name="Audio Player")
================================================
FILE: examples/audio_player_waveform.py
================================================
from enum import Enum
from juce_init import START_JUCE_COMPONENT
import popsicle as juce
class TransportState(Enum):
Stopped = 0
Starting = 1
Playing = 2
Stopping = 3
class AudioSource(juce.AudioSource):
transportSource = juce.AudioTransportSource()
hasReader = juce.Atomic[bool](False)
def __init__(self):
juce.AudioSource.__init__(self)
def prepareToPlay(self, samplesPerBlockExpected, sampleRate):
self.transportSource.prepareToPlay(samplesPerBlockExpected, sampleRate)
def getNextAudioBlock(self, bufferToFill):
if not self.hasReader.get():
bufferToFill.clearActiveBufferRegion()
else:
self.transportSource.getNextAudioBlock(bufferToFill)
def releaseResources(self):
self.transportSource.releaseResources()
class SimpleThumbnailComponent(juce.Component, juce.ChangeListener):
def __init__(self, sourceSamplesPerThumbnailSample, formatManager, cache):
juce.Component.__init__(self)
juce.ChangeListener.__init__(self)
self.thumbnail = juce.AudioThumbnail(sourceSamplesPerThumbnailSample, formatManager, cache)
self.thumbnail.addChangeListener(self)
def setFile(self, file):
source = juce.FileInputSource(file)
self.thumbnail.setSource(source)
def paint(self, g):
if self.thumbnail.getNumChannels() == 0:
self.paintIfNoFileLoaded(g)
else:
self.paintIfFileLoaded(g)
def paintIfNoFileLoaded(self, g):
g.fillAll(juce.Colours.white)
g.setColour(juce.Colours.darkgrey)
g.drawFittedText("No File Loaded", self.getLocalBounds(), juce.Justification.centred, 1)
def paintIfFileLoaded(self, g):
g.fillAll(juce.Colours.white)
g.setColour(juce.Colours.red)
self.thumbnail.drawChannels(g, self.getLocalBounds(), 0.0, self.thumbnail.getTotalLength(), 1.0)
def changeListenerCallback(self, source):
if source == self.thumbnail:
self.thumbnailChanged()
def thumbnailChanged(self):
self.repaint()
class SimplePositionOverlay(juce.Component, juce.Timer):
def __init__(self, transportSourceToUse):
juce.Component.__init__(self)
juce.Timer.__init__(self)
self.transportSource = transportSourceToUse
self.startTimer(40)
def __del__(self):
self.stopTimer()
def paint(self, g):
duration = float(self.transportSource.getLengthInSeconds())
if duration > 0.0:
audioPosition = float(self.transportSource.getCurrentPosition())
drawPosition = (audioPosition / duration) * self.getWidth()
g.setColour(juce.Colours.green)
g.drawLine(drawPosition, 0.0, drawPosition, float(self.getHeight()), 2.0)
def mouseDown(self, event):
duration = self.transportSource.getLengthInSeconds()
if duration > 0.0:
clickPosition = event.position.x
audioPosition = (clickPosition / self.getWidth()) * duration
self.transportSource.setPosition(audioPosition)
def timerCallback(self):
self.repaint()
class MainContentComponent(juce.Component, juce.ChangeListener, juce.Timer):
openButton = juce.TextButton()
playButton = juce.TextButton()
stopButton = juce.TextButton()
loopingToggle = juce.ToggleButton()
currentPositionLabel = juce.Label()
audioSource = AudioSource()
audioSourcePlayer = juce.AudioSourcePlayer()
readerSource = None
isLooping = False
deviceManager = juce.AudioDeviceManager()
formatManager = juce.AudioFormatManager()
state = TransportState.Stopped
def __init__(self):
juce.Component.__init__(self)
juce.ChangeListener.__init__(self)
juce.Timer.__init__(self)
self.addAndMakeVisible(self.openButton)
self.openButton.setButtonText("Open...")
self.openButton.onClick = self.openButtonClicked
self.addAndMakeVisible (self.playButton)
self.playButton.setButtonText ("Play")
self.playButton.onClick = self.playButtonClicked
self.playButton.setColour(juce.TextButton.buttonColourId, juce.Colours.green)
self.playButton.setEnabled(False)
self.addAndMakeVisible(self.stopButton)
self.stopButton.setButtonText("Stop")
self.stopButton.onClick = self.stopButtonClicked
self.stopButton.setColour(juce.TextButton.buttonColourId, juce.Colours.red)
self.stopButton.setEnabled(False)
self.addAndMakeVisible(self.loopingToggle)
self.loopingToggle.setButtonText("Loop")
self.loopingToggle.onClick = self.loopButtonChanged
self.addAndMakeVisible(self.currentPositionLabel)
self.currentPositionLabel.setText("Stopped", juce.dontSendNotification)
self.formatManager.registerBasicFormats()
self.audioSource.transportSource.addChangeListener(self)
self.deviceManager.initialise(0, 2, None, True)
self.deviceManager.addAudioCallback(self.audioSourcePlayer)
self.audioSourcePlayer.setSource(self.audioSource)
self.thumbnailCache = juce.AudioThumbnailCache(10)
self.thumbnailComp = SimpleThumbnailComponent(512, self.formatManager, self.thumbnailCache)
self.addAndMakeVisible(self.thumbnailComp)
self.positionOverlay = SimplePositionOverlay(self.audioSource.transportSource)
self.addAndMakeVisible(self.positionOverlay)
self.setSize(400, 400)
self.startTimer(20)
def visibilityChanged(self):
if self.isVisible() or not self.deviceManager:
return
self.audioSource.hasReader.set(False)
self.deviceManager.removeAudioCallback(self.audioSourcePlayer)
self.audioSource.transportSource.setSource(None)
self.audioSourcePlayer.setSource(None)
self.deviceManager.closeAudioDevice()
def resized(self):
self.openButton.setBounds(10, 10, self.getWidth() - 20, 20)
self.playButton.setBounds(10, 40, self.getWidth() - 20, 20)
self.stopButton.setBounds(10, 70, self.getWidth() - 20, 20)
self.loopingToggle.setBounds(10, 100, self.getWidth() - 20, 20)
self.currentPositionLabel.setBounds(10, 130, self.getWidth() - 20, 20)
thumbnailBounds = juce.Rectangle[int](10, 170, self.getWidth() - 20, self.getHeight() - 190)
self.thumbnailComp.setBounds(thumbnailBounds)
self.positionOverlay.setBounds(thumbnailBounds)
def changeListenerCallback(self, source):
print("changeListenerCallback", source, self.audioSource.transportSource)
if source == self.audioSource.transportSource:
if self.audioSource.transportSource.isPlaying():
self.changeState(TransportState.Playing)
else:
self.changeState(TransportState.Stopped)
def timerCallback(self):
if self.audioSource.transportSource.isPlaying():
position = juce.RelativeTime(self.audioSource.transportSource.getCurrentPosition())
minutes = int(position.inMinutes()) % 60
seconds = int(position.inSeconds()) % 60
millis = int(position.inMilliseconds()) % 1000
positionString = "{:02d}:{:02d}:{:03d}".format(minutes, seconds, millis)
self.currentPositionLabel.setText(positionString, juce.dontSendNotification)
else:
self.currentPositionLabel.setText("Stopped", juce.dontSendNotification)
def updateLoopState(self, shouldLoop):
self.isLooping = shouldLoop
if self.readerSource:
self.readerSource.setLooping(self.isLooping)
def changeState (self, newState):
if self.state == newState:
return
self.state = newState
print(self.state)
if self.state == TransportState.Stopped:
self.stopButton.setEnabled(False)
self.playButton.setEnabled(True)
self.audioSource.transportSource.setPosition(0.0)
elif self.state == TransportState.Starting:
self.playButton.setEnabled(False)
self.audioSource.transportSource.start()
elif self.state == TransportState.Playing:
self.stopButton.setEnabled(True)
elif self.state == TransportState.Stopping:
self.audioSource.transportSource.stop()
def openButtonClicked(self):
chooser = juce.FileChooser("Select a Wave file to play...", juce.File(), "*.wav")
if chooser.browseForFileToOpen():
file = chooser.getResult()
self.reader = self.formatManager.createReaderFor(file)
if self.reader:
self.readerSource = juce.AudioFormatReaderSource(self.reader, False)
if self.isLooping:
self.readerSource.setLooping(self.isLooping)
self.audioSource.transportSource.setSource(self.readerSource, 0, None, self.reader.sampleRate, 2)
self.audioSource.hasReader.set(True)
self.thumbnailComp.setFile(file)
self.playButton.setEnabled(True)
else:
self.audioSource.hasReader.set(False)
def playButtonClicked(self):
self.updateLoopState(self.loopingToggle.getToggleState())
self.changeState(TransportState.Starting)
def stopButtonClicked(self):
self.changeState(TransportState.Stopping)
def loopButtonChanged(self):
self.updateLoopState(self.loopingToggle.getToggleState())
if __name__ == "__main__":
START_JUCE_COMPONENT(MainContentComponent, name="Audio Player")
================================================
FILE: examples/docs.py
================================================
import io
from contextlib import redirect_stdout
import juce_init
import popsicle as juce
with io.StringIO() as buf, redirect_stdout(buf):
help(juce)
docs = buf.getvalue()
print(docs)
================================================
FILE: examples/drawables.py
================================================
from juce_init import START_JUCE_COMPONENT
import popsicle as juce
class MainContentComponent(juce.Component):
def __init__(self):
super().__init__()
width = 600
height = 400
self.text = juce.DrawableText()
self.text.setText("Ciao")
self.text.setColour(juce.Colours.white)
self.text.setJustification(juce.Justification.centred)
self.addAndMakeVisible(self.text)
self.button = juce.TextButton("abc")
self.addAndMakeVisible(self.button)
self.button.onClick = lambda: print("clicked")
self.setSize(int(width), int(height))
self.setOpaque(True)
def paint(self, g: juce.Graphics):
g.fillAll(juce.Colours.black)
def resized(self):
bounds = self.getLocalBounds()
self.text.setBounds(bounds.removeFromLeft(self.proportionOfWidth(0.5)))
self.button.setBounds(bounds)
if __name__ == "__main__":
START_JUCE_COMPONENT(MainContentComponent, name="Drawables Example")
================================================
FILE: examples/emojis_component.py
================================================
import re
import os
import hashlib
from enum import Enum
from io import BytesIO
from textwrap import dedent
from urllib.request import Request, urlopen
from urllib.error import HTTPError
from urllib.parse import quote_plus
from typing import Any, Dict, Final, List, Optional, NamedTuple
from emoji import unicode_codes
from juce_init import START_JUCE_COMPONENT
import popsicle as juce
language_pack: Dict[str, str] = unicode_codes.get_emoji_unicode_dict("en")
EMOJI_UNICODE_REGEX = "|".join(map(re.escape, sorted(language_pack.values(), key=len, reverse=True)))
EMOJI_REGEX: Final[re.Pattern[str]] = re.compile(f'({EMOJI_UNICODE_REGEX})')
EMOJI_REQUEST_KWARGS: Dict[str, Any] = { "headers": {"User-Agent": "Mozilla/5.0"} }
EMOJI_BASE_CDN_URL: str = "https://emojicdn.elk.sh/"
EMOJI_STYLE: str = "google"
def get_emoji(emoji: str) -> Optional[BytesIO]:
emoji_cache = juce.File(os.path.abspath(__file__)).getParentDirectory().getChildFile("emoji_cache")
if not emoji_cache.isDirectory():
emoji_cache.createDirectory()
url = EMOJI_BASE_CDN_URL + quote_plus(emoji) + "?style=" + quote_plus(EMOJI_STYLE)
url_hash = hashlib.md5()
url_hash.update(url.encode("utf8"))
emoji_file = emoji_cache.getChildFile(url_hash.hexdigest())
if emoji_file.existsAsFile():
with open(emoji_file.getFullPathName(), "rb") as f:
return BytesIO(f.read())
try:
req = Request(url, **EMOJI_REQUEST_KWARGS)
with urlopen(req) as response:
response = response.read()
with open(emoji_file.getFullPathName(), "wb") as f:
f.write(response)
return BytesIO(response)
except HTTPError:
pass
return None
class NodeType(Enum):
text = 0
emoji = 1
class Node(NamedTuple):
type: NodeType
content: str
emoji: Optional[BytesIO]
class EmojiComponent(juce.Component):
font: juce.Font = juce.Font(juce.FontOptions(12.0))
colour: juce.Colour = juce.Colours.black
nodes: List[List[Node]]
def __init__(self):
juce.Component.__init__(self)
self.setOpaque(False)
def setFont(self, font: juce.Font):
self.font = font
self.repaint()
def setColour(self, colour: juce.Colour):
self.colour = colour
self.repaint()
def setText(self, text: str):
self.nodes = self.splitTextIntoNodes(text)
self.repaint()
def splitTextIntoNodes(self, text: str) -> List[List[Node]]:
lines = []
for line in text.splitlines():
nodes = []
for i, chunk in enumerate(EMOJI_REGEX.split(line)):
if not chunk:
continue
if not i % 2:
nodes.append(Node(NodeType.text, chunk, None))
continue
nodes.append(Node(NodeType.emoji, chunk, get_emoji(chunk)))
lines.append(nodes)
return lines
def paint(self, g: juce.Graphics):
if not self.nodes:
return
font_height = self.font.getHeight()
emoji_size = int(font_height * 1.1)
g.setFont(self.font)
g.setColour(self.colour)
y = 0
for lines in self.nodes:
x = 0
y += font_height + 2.0
height = int(font_height)
for node in lines:
if node.type == NodeType.text:
text_width = self.font.getStringWidthFloat(node.content)
g.drawText(node.content,
int(x), int(y), min(int(text_width), self.getWidth() - int(x)), height,
juce.Justification.centredLeft, useEllipsesIfTooBig=False)
x += text_width
elif node.emoji:
emoji = juce.ImageCache.getFromMemory(node.emoji.getbuffer())
if emoji and emoji.isValid():
g.drawImageWithin(emoji, int(x), int(y), emoji_size, emoji_size, juce.RectanglePlacement.centred)
x += emoji_size
class ExampleComponent(juce.Component):
def __init__(self):
juce.Component.__init__(self)
self.emoji_one = EmojiComponent()
self.emoji_one.setFont(juce.Font(juce.FontOptions(16.0)))
self.emoji_one.setColour(juce.Colours.white)
self.emoji_one.setText(dedent("""
I 🕴️ 100% 💶 agree 💯 that 👉💀🔕🐑 this automated 🏧 generator does 👩🦲 NOT 🚯🚯🚯 provide 👋 the same 😯
quality 👌 as hand 👊 crafted emoji 🤟 pasta. 🍝 But 😥 I 🤖 think 🤔 there's 🛒 something ❓❔ cool 🧊
about 🌈 being 😑 able 💪💪 to take 👏 a 10,000 word 📓 wikipedia 💻 article 📄 and instantly add 👈
emojis 🐅🐅🐢🦅🦅🦋🐒
""").strip())
self.addAndMakeVisible(self.emoji_one)
self.slider = juce.Slider()
self.slider.setRange(1.0, 100, 0.1)
self.slider.setValue(16.0)
self.slider.onValueChange = lambda: self.emoji_one.setFont(juce.Font(juce.FontOptions(self.slider.getValue())))
self.addAndMakeVisible(self.slider)
self.setOpaque(True)
self.setSize(600, 400)
def paint(self, g: juce.Graphics):
g.fillAll(self.findColour(juce.DocumentWindow.backgroundColourId, True))
def resized(self):
bounds = self.getLocalBounds()
self.emoji_one.setBounds(bounds)
self.slider.setBounds(bounds.removeFromBottom(20))
if __name__ == "__main__":
START_JUCE_COMPONENT(ExampleComponent, name="Emoji Example")
================================================
FILE: examples/emojis_font_component.py
================================================
import re
import os
from enum import Enum
from textwrap import dedent
from typing import Dict, Final, List, NamedTuple
from emoji import unicode_codes
from PIL import Image, ImageDraw, ImageFont
from pil_image import ImageJuce
from juce_init import START_JUCE_COMPONENT
import popsicle as juce
language_pack: Dict[str, str] = unicode_codes.get_emoji_unicode_dict("en")
EMOJI_UNICODE_REGEX = "|".join(map(re.escape, sorted(language_pack.values(), key=len, reverse=True)))
EMOJI_REGEX: Final[re.Pattern[str]] = re.compile(f'({EMOJI_UNICODE_REGEX})')
class NodeType(Enum):
text = 0
emoji = 1
class Node(NamedTuple):
type: NodeType
content: str
class EmojiComponent(juce.Component):
font: juce.Font = juce.Font(juce.FontOptions(12.0))
colour: juce.Colour = juce.Colours.black
nodes: List[List[Node]]
unicode_font = None
unicode_size = 109
def __init__(self):
juce.Component.__init__(self)
font_file = juce.File(os.path.abspath(__file__)).getSiblingFile("NotoColorEmoji.ttf")
self.unicode_font = ImageFont.truetype(font_file.getFullPathName(), self.unicode_size)
self.im = Image.new("RGBA", (self.unicode_size + 20, self.unicode_size + 20))
self.draw = ImageDraw.Draw(self.im)
self.setOpaque(False)
def setFont(self, font: juce.Font):
self.font = font
self.repaint()
def setColour(self, colour: juce.Colour):
self.colour = colour
self.repaint()
def setText(self, text: str):
self.nodes = self.splitTextIntoNodes(text)
self.repaint()
def splitTextIntoNodes(self, text: str) -> List[List[Node]]:
lines = []
for line in text.splitlines():
nodes = []
for i, chunk in enumerate(EMOJI_REGEX.split(line)):
if not chunk:
continue
if not i % 2:
nodes.append(Node(NodeType.text, chunk))
continue
nodes.append(Node(NodeType.emoji, chunk))
lines.append(nodes)
return lines
def paint(self, g: juce.Graphics):
if not self.nodes:
return
font_height = self.font.getHeight()
emoji_size = int(font_height * 1.1)
g.setFont(self.font)
g.setColour(self.colour)
def new_line(x, y):
return 0, y + font_height + 4.0
x = 0
y = 0
for lines in self.nodes:
x, y = new_line(x, y)
current_text = None
for node in lines:
if node.type == NodeType.text:
current_text = node.content
while current_text:
remaining_text = []
text_width = self.font.getStringWidthFloat(current_text)
while current_text and text_width > self.getWidth() - int(x):
words = current_text.split(" ")
current_text = " ".join(words[:-1])
if words:
remaining_text.append(words[-1])
text_width = self.font.getStringWidthFloat(current_text)
if current_text:
g.drawText(current_text,
int(x), int(y), min(int(text_width), self.getWidth() - int(x)), int(font_height),
juce.Justification.centredLeft, useEllipsesIfTooBig=False)
x += text_width
current_text = None
if remaining_text:
x, y = new_line(x, y)
current_text = " ".join(remaining_text)
else:
self.draw.rectangle((0, 0, self.im.size[0], self.im.size[1]), fill=(0, 0, 0, 0))
self.draw.text((0, 0), node.content, embedded_color=True, font=self.unicode_font)
if emoji_size > self.getWidth() - int(x):
x, y = new_line(x, y)
g.drawImageWithin(ImageJuce(self.im), int(x), int(y), emoji_size, emoji_size,
juce.RectanglePlacement.centred | juce.RectanglePlacement.onlyReduceInSize)
x += emoji_size
class ExampleComponent(juce.Component):
def __init__(self):
juce.Component.__init__(self)
self.emoji_one = EmojiComponent()
self.emoji_one.setFont(juce.Font(juce.FontOptions(16.0)))
self.emoji_one.setColour(juce.Colours.white)
self.emoji_one.setText(dedent("""
I 🕴️ 100% 💶 agree 💯 that 👉💀🔕🐑 this automated 🏧 generator does 👩🦲 NOT 🚯🚯🚯 provide 👋 the same 😯
quality 👌 as hand 👊 crafted emoji 🤟 pasta. 🍝 But 😥 I 🤖 think 🤔 there's 🛒 something ❓❔ cool 🧊
about 🌈 being 😑 able 💪💪 to take 👏 a 10,000 word 📓 wikipedia 💻 article 📄 and instantly add 👈
emojis 🐅🐅🐢🦅🦅🦋🐒
""").strip())
self.addAndMakeVisible(self.emoji_one)
self.slider = juce.Slider()
self.slider.setRange(1.0, 100, 0.1)
self.slider.setValue(16.0)
self.slider.onValueChange = lambda: self.emoji_one.setFont(juce.Font(juce.FontOptions(self.slider.getValue())))
self.addAndMakeVisible(self.slider)
self.setOpaque(True)
self.setSize(600, 400)
def paint(self, g: juce.Graphics):
g.fillAll(self.findColour(juce.DocumentWindow.backgroundColourId, True))
def resized(self):
bounds = self.getLocalBounds()
self.emoji_one.setBounds(bounds)
self.slider.setBounds(bounds.removeFromBottom(20))
if __name__ == "__main__":
START_JUCE_COMPONENT(ExampleComponent, name="Emoji Example")
================================================
FILE: examples/hotreload_component.py
================================================
import popsicle as juce
__all__ = ["TestComponent"]
class TestComponent(juce.Component, juce.Timer):
time = 0.0
def __init__(self):
juce.Component.__init__(self)
juce.Timer.__init__(self)
self.setOpaque(True)
self.startTimerHz(25)
def timerCallback(self):
self.time += juce.degreesToRadians(1)
self.repaint()
def paint(self, g: juce.Graphics):
g.fillAll(juce.Colours.red)
b = self.getLocalBounds()
center = juce.Point[float](b.getCentreX(), b.getCentreY())
p = juce.Path()
p.addStar(center, 20, 25, self.getWidth(), self.time)
g.setColour(juce.Colours.yellow)
g.fillPath(p)
================================================
FILE: examples/hotreload_main.py
================================================
import os
import importlib
from juce_init import START_JUCE_COMPONENT
import popsicle as juce
class HotReloadContentComponent(juce.Component, juce.Timer):
comp = None
module = None
moduleName = "hotreload_component"
fileToWatch = juce.File(os.path.abspath(__file__)).getSiblingFile(f"{moduleName}.py")
fileLastModificationTime = None
def __init__(self):
juce.Component.__init__(self)
juce.Timer.__init__(self)
width = 600
height = 400
self.setSize(int(width), int(height))
self.setOpaque(True)
self.startTimerHz(5)
def timerCallback(self):
fileLastModificationTime = self.fileToWatch.getLastModificationTime()
if not self.fileLastModificationTime or self.fileLastModificationTime < fileLastModificationTime:
self.instantiateComponent()
self.resized()
self.fileLastModificationTime = fileLastModificationTime
def paint(self, g: juce.Graphics):
g.fillAll(juce.Colours.black)
def resized(self):
bounds = self.getLocalBounds()
if self.comp:
self.comp.setBounds(bounds)
def instantiateComponent(self):
try:
if not self.module:
self.module = importlib.import_module(self.moduleName)
else:
self.module = importlib.reload(self.module)
print("Module", self.fileToWatch.getFileName(), "reloaded correctly")
except Exception as e:
print(e)
return
if self.comp:
self.removeChildComponent(self.comp)
self.comp = self.module.TestComponent()
self.addAndMakeVisible(self.comp)
if __name__ == "__main__":
START_JUCE_COMPONENT(HotReloadContentComponent, name="Hot Reload Example", alwaysOnTop=True, catchExceptionsAndContinue=True)
================================================
FILE: examples/juce_init.py
================================================
import os
import sys
import glob
import time
import traceback
from pathlib import Path
from functools import wraps
try:
import popsicle as juce
except ImportError:
folder = (Path(__file__).parent.parent / "build")
for ext in ["*.so", "*.pyd"]:
path_to_search = folder / "**" / ext
for f in glob.iglob(str(path_to_search), recursive=True):
if os.path.isfile(f):
sys.path.append(str(Path(f).parent))
break
import popsicle as juce
def START_JUCE_COMPONENT(ComponentClass, name, **kwargs):
class DefaultWindow(juce.DocumentWindow):
component = None
def __init__(self):
super().__init__(
juce.JUCEApplication.getInstance().getApplicationName(),
juce.Desktop.getInstance().getDefaultLookAndFeel()
.findColour(juce.ResizableWindow.backgroundColourId),
juce.DocumentWindow.allButtons,
True)
self.component = ComponentClass()
self.setResizable(True, True)
self.setContentNonOwned(self.component, True)
self.centreWithSize(self.component.getWidth(), self.component.getHeight() + self.getTitleBarHeight())
self.setAlwaysOnTop(kwargs.get("alwaysOnTop", False))
self.setVisible(True)
def __del__(self):
self.clearContentComponent()
if self.component:
self.component.setVisible(False)
del self.component
def closeButtonPressed(self):
juce.JUCEApplication.getInstance().systemRequestedQuit()
class DefaultApplication(juce.JUCEApplication):
window = None
def __init__(self):
super().__init__()
def getApplicationName(self):
return name
def getApplicationVersion(self):
return "1.0"
def initialise(self, commandLineParameters):
self.window = DefaultWindow()
juce.MessageManager.callAsync(lambda: juce.Process.makeForegroundProcess())
def shutdown(self):
if self.window:
del self.window
def systemRequestedQuit(self):
self.quit()
# def unhandledException(self, ex: Exception, file: str, line: int):
# if hasattr(ex, "__traceback__"):
# print("Traceback (most recent call last):")
# traceback.print_tb(ex.__traceback__)
# print(ex)
# if isinstance(ex, KeyboardInterrupt):
# juce.JUCEApplication.getInstance().systemRequestedQuit()
juce.START_JUCE_APPLICATION(
DefaultApplication,
catchExceptionsAndContinue=kwargs.get("catchExceptionsAndContinue", False))
def timeit(func):
@wraps(func)
def timeit_wrapper(*args, **kwargs):
start_time = time.perf_counter()
result = func(*args, **kwargs)
total_time = time.perf_counter() - start_time
print(f'Function {func.__name__} Took {total_time:.4f} seconds') # {args} {kwargs}
return result
return timeit_wrapper
================================================
FILE: examples/juce_o_matic.py
================================================
import juce_init
import popsicle as juce
class MainContentComponent(juce.Component, juce.Timer):
def __init__(self):
juce.Component.__init__(self)
juce.Timer.__init__(self)
self.setSize(600, 400)
self.setOpaque(True)
self.startTimerHz(60)
def paint(self, g: juce.Graphics):
g.fillAll(juce.Colours.black)
random = juce.Random.getSystemRandom()
rect = juce.Rectangle[int](0, 0, 20, 20)
for _ in range(100):
g.setColour(juce.Colour.fromRGBA(
random.nextInt(255),
random.nextInt(255),
random.nextInt(255),
255))
rect.setCentre(random.nextInt(self.getWidth()), random.nextInt(self.getHeight()))
g.drawRect(rect, 1)
def mouseDown(self, event: juce.MouseEvent):
print("mouseDown", event)
def mouseMove(self, event: juce.MouseEvent):
print("mouseMove", event.position.x, event.position.y)
def mouseUp(self, event: juce.MouseEvent):
print("mouseUp", event)
def timerCallback(self):
self.repaint()
class MainWindow(juce.DocumentWindow):
component = None
def __init__(self):
super().__init__(
juce.JUCEApplication.getInstance().getApplicationName(),
juce.Desktop.getInstance().getDefaultLookAndFeel()
.findColour(juce.ResizableWindow.backgroundColourId),
juce.DocumentWindow.allButtons,
True)
self.component = MainContentComponent()
self.setResizable(True, True)
self.setContentNonOwned(self.component, True)
self.centreWithSize(800, 600)
self.setVisible(True)
def __del__(self):
self.clearContentComponent()
if self.component:
del self.component
def closeButtonPressed(self):
juce.JUCEApplication.getInstance().systemRequestedQuit()
class Application(juce.JUCEApplication):
window = None
def __init__(self):
super().__init__()
def getApplicationName(self):
return "JUCE-o-matic"
def getApplicationVersion(self):
return "1.0"
def initialise(self, commandLineParameters: str):
self.window = MainWindow()
juce.MessageManager.callAsync(lambda: juce.Process.makeForegroundProcess())
def shutdown(self):
if self.window:
del self.window
def systemRequestedQuit(self):
self.quit()
if __name__ == "__main__":
juce.START_JUCE_APPLICATION(Application)
================================================
FILE: examples/layout_flexgrid.py
================================================
from juce_init import START_JUCE_COMPONENT
import popsicle as juce
class RightSidePanel(juce.Component):
backgroundColour = juce.Colours.lightblue
buttons = []
def __init__(self, colour=None):
super().__init__()
if colour:
self.backgroundColour = colour
for i in range(10):
button = juce.TextButton(str(i))
self.buttons.append(button)
self.addAndMakeVisible(button)
def paint(self, g):
g.fillAll(self.backgroundColour)
def resized(self):
fb = juce.FlexBox()
fb.flexWrap = juce.FlexBox.Wrap.wrap
fb.justifyContent = juce.FlexBox.JustifyContent.center
fb.alignContent = juce.FlexBox.AlignContent.center
for b in self.buttons:
fb.items.add(juce.FlexItem(b).withMinWidth(50.0).withMinHeight(50.0))
fb.performLayout(self.getLocalBounds().toFloat())
class LeftSidePanel(juce.Component):
backgroundColour = juce.Colours.lightgrey
knobs = []
def __init__(self, colour=None):
super().__init__()
if colour:
self.backgroundColour = colour
for _ in range(10):
slider
gitextract_7477lgzj/
├── .gitattributes
├── .github/
│ ├── FUNDING.yml
│ └── workflows/
│ ├── build_linux.yml
│ ├── build_macos.yml
│ ├── build_windows.yml
│ ├── coverage.yml
│ └── wheels.yml
├── .gitignore
├── .gitmodules
├── CHANGES.md
├── CMakeLists.txt
├── LICENSE
├── LICENSE.COMMERCIAL
├── LICENSE.GPLv3
├── MANIFEST.in
├── README.rst
├── cmake/
│ ├── ArchivePythonStdlib.py
│ └── CodeCoverage.cmake
├── demos/
│ ├── plugin/
│ │ ├── CMakeLists.txt
│ │ ├── PopsiclePluginEditor.cpp
│ │ ├── PopsiclePluginEditor.h
│ │ ├── PopsiclePluginProcessor.cpp
│ │ └── PopsiclePluginProcessor.h
│ └── standalone/
│ ├── CMakeLists.txt
│ ├── Main.cpp
│ ├── PopsicleDemo.cpp
│ └── PopsicleDemo.h
├── docs/
│ ├── EmbeddingTutorial.rst
│ ├── QuickStartGuide.rst
│ └── conf.py
├── examples/
│ ├── .gitignore
│ ├── __init__.py
│ ├── animated_component.py
│ ├── audio_device.py
│ ├── audio_player.py
│ ├── audio_player_waveform.py
│ ├── docs.py
│ ├── drawables.py
│ ├── emojis_component.py
│ ├── emojis_font_component.py
│ ├── hotreload_component.py
│ ├── hotreload_main.py
│ ├── juce_init.py
│ ├── juce_o_matic.py
│ ├── layout_flexgrid.py
│ ├── layout_rectangles.py
│ ├── matplotlib_integration.py
│ ├── nim_audio.nim
│ ├── nim_audio_integration.py
│ ├── numpy_audio.py
│ ├── opencv_integration.py
│ ├── opencv_video.py
│ ├── opencv_video.xml
│ ├── pil_image.py
│ ├── radio_buttons_checkboxes.py
│ ├── slider_decibels.py
│ ├── slider_values.py
│ ├── table_list_box.py
│ ├── table_list_box.xml
│ ├── wavetable_oscillator.py
│ ├── wavetable_oscillator_numpy.py
│ ├── webgpu/
│ │ ├── __init__.py
│ │ ├── cube_popsicle.py
│ │ ├── pbr2.py
│ │ ├── pbr2_embed.py
│ │ ├── pop.py
│ │ ├── triangle.py
│ │ ├── triangle_popsicle.py
│ │ └── triangle_popsicle_embed.py
│ └── wip/
│ ├── audio_callback_cpp.py
│ ├── audio_player_cpp.py
│ ├── copy_image_pixels.py
│ └── synth_midi_input.py
├── icons/
│ └── popsicle.icns
├── justfile
├── modules/
│ ├── CMakeLists.txt
│ └── juce_python/
│ ├── bindings/
│ │ ├── ScriptJuceAudioBasicsBindings.cpp
│ │ ├── ScriptJuceAudioBasicsBindings.h
│ │ ├── ScriptJuceAudioDevicesBindings.cpp
│ │ ├── ScriptJuceAudioDevicesBindings.h
│ │ ├── ScriptJuceAudioFormatsBindings.cpp
│ │ ├── ScriptJuceAudioFormatsBindings.h
│ │ ├── ScriptJuceAudioProcessorsBindings.cpp
│ │ ├── ScriptJuceAudioProcessorsBindings.h
│ │ ├── ScriptJuceAudioUtilsBindings.cpp
│ │ ├── ScriptJuceAudioUtilsBindings.h
│ │ ├── ScriptJuceBindings.cpp
│ │ ├── ScriptJuceCoreBindings.cpp
│ │ ├── ScriptJuceCoreBindings.h
│ │ ├── ScriptJuceDataStructuresBindings.cpp
│ │ ├── ScriptJuceDataStructuresBindings.h
│ │ ├── ScriptJuceEventsBindings.cpp
│ │ ├── ScriptJuceEventsBindings.h
│ │ ├── ScriptJuceGraphicsBindings.cpp
│ │ ├── ScriptJuceGraphicsBindings.h
│ │ ├── ScriptJuceGuiBasicsBindings.cpp
│ │ ├── ScriptJuceGuiBasicsBindings.h
│ │ ├── ScriptJuceGuiEntryPointsBindings.cpp
│ │ ├── ScriptJuceGuiEntryPointsBindings.h
│ │ ├── ScriptJuceGuiExtraBindings.cpp
│ │ ├── ScriptJuceGuiExtraBindings.h
│ │ ├── ScriptJuceOptionsBindings.cpp
│ │ └── ScriptJuceOptionsBindings.h
│ ├── juce_python.cpp
│ ├── juce_python.h
│ ├── juce_python.mm
│ ├── juce_python_audio_basics.cpp
│ ├── juce_python_audio_devices.cpp
│ ├── juce_python_audio_formats.cpp
│ ├── juce_python_audio_processors.cpp
│ ├── juce_python_audio_utils.cpp
│ ├── juce_python_bindings.cpp
│ ├── juce_python_core.cpp
│ ├── juce_python_data_structures.cpp
│ ├── juce_python_events.cpp
│ ├── juce_python_graphics.cpp
│ ├── juce_python_gui_basics.cpp
│ ├── juce_python_gui_entry.cpp
│ ├── juce_python_gui_extra.cpp
│ ├── juce_python_modules.cpp
│ ├── juce_python_options.cpp
│ ├── modules/
│ │ └── ScriptPopsicleModule.cpp
│ ├── pybind11/
│ │ ├── attr.h
│ │ ├── buffer_info.h
│ │ ├── cast.h
│ │ ├── chrono.h
│ │ ├── common.h
│ │ ├── complex.h
│ │ ├── detail/
│ │ │ ├── class.h
│ │ │ ├── common.h
│ │ │ ├── descr.h
│ │ │ ├── init.h
│ │ │ ├── internals.h
│ │ │ ├── type_caster_base.h
│ │ │ └── typeid.h
│ │ ├── eigen/
│ │ │ ├── common.h
│ │ │ ├── matrix.h
│ │ │ └── tensor.h
│ │ ├── eigen.h
│ │ ├── embed.h
│ │ ├── eval.h
│ │ ├── functional.h
│ │ ├── gil.h
│ │ ├── iostream.h
│ │ ├── numpy.h
│ │ ├── operators.h
│ │ ├── options.h
│ │ ├── pybind11.h
│ │ ├── pytypes.h
│ │ ├── stl/
│ │ │ └── filesystem.h
│ │ ├── stl.h
│ │ ├── stl_bind.h
│ │ └── type_caster_pyobject_ptr.h
│ ├── scripting/
│ │ ├── ScriptBindings.cpp
│ │ ├── ScriptBindings.h
│ │ ├── ScriptEngine.cpp
│ │ ├── ScriptEngine.h
│ │ ├── ScriptException.h
│ │ ├── ScriptUtilities.cpp
│ │ └── ScriptUtilities.h
│ └── utilities/
│ ├── ClassDemangling.cpp
│ ├── ClassDemangling.h
│ ├── CrashHandling.cpp
│ ├── CrashHandling.h
│ ├── MacroHelpers.h
│ ├── PyBind11Includes.h
│ ├── PythonInterop.h
│ ├── PythonTypes.h
│ └── WindowsIncludes.h
├── pyproject.toml
├── scripts/
│ ├── build_wheel.sh
│ ├── install_wheel.sh
│ ├── pull_upstream.sh
│ └── upload_wheel.sh
├── setup.py
└── tests/
├── __init__.py
├── common.py
├── compare_data/
│ └── .gitignore
├── conftest.py
├── runtime_data/
│ └── .gitignore
├── test_juce_core/
│ ├── __init__.py
│ ├── data/
│ │ ├── somefile.txt
│ │ ├── test.xml
│ │ └── test_broken.xml
│ ├── test_Array.py
│ ├── test_Base64.py
│ ├── test_BigInteger.py
│ ├── test_ByteOrder.py
│ ├── test_Cast.py
│ ├── test_CriticalSection.py
│ ├── test_File.py
│ ├── test_FileFilter.py
│ ├── test_FileInputStream.py
│ ├── test_FileOutputStream.py
│ ├── test_Identifier.py
│ ├── test_InputStream.py
│ ├── test_Ints.py
│ ├── test_JSON.py
│ ├── test_MemoryBlock.py
│ ├── test_MemoryInputStream.py
│ ├── test_MemoryMappedFile.py
│ ├── test_NamedValueSet.py
│ ├── test_NormalisableRange.py
│ ├── test_PropertySet.py
│ ├── test_Random.py
│ ├── test_Range.py
│ ├── test_RangedDirectoryIterator.py
│ ├── test_RelativeTime.py
│ ├── test_Result.py
│ ├── test_StringArray.py
│ ├── test_StringPairArray.py
│ ├── test_SubregionStream.py
│ ├── test_TemporaryFile.py
│ ├── test_Thread.py
│ ├── test_ThreadPool.py
│ ├── test_Time.py
│ ├── test_URLInputSource.py
│ ├── test_Uuid.py
│ ├── test_WildcardFileFilter.py
│ ├── test_XmlDocument.py
│ ├── test_XmlElement.py
│ └── test_ZipFile.py
├── test_juce_data_structures/
│ ├── __init__.py
│ ├── test_CachedValue.py
│ ├── test_PropertiesFile.py
│ ├── test_UndoManager.py
│ ├── test_Value.py
│ ├── test_ValueTree.py
│ └── test_ValueTreeSynchroniser.py
├── test_juce_events/
│ ├── __init__.py
│ ├── test_ActionBroadcaster.py
│ ├── test_AsyncUpdater.py
│ ├── test_ChangeBroadcaster.py
│ ├── test_LockingAsyncUpdater.py
│ ├── test_Message.py
│ ├── test_MessageListener.py
│ ├── test_MessageManager.py
│ ├── test_MultiTimer.py
│ └── test_Timer.py
├── test_juce_graphics/
│ ├── __init__.py
│ ├── test_AffineTransform.py
│ ├── test_BorderSize.py
│ ├── test_Colour.py
│ ├── test_ColourGradient.py
│ ├── test_FillType.py
│ ├── test_Graphics.py
│ ├── test_Justification.py
│ ├── test_Line.py
│ ├── test_Parallelogram.py
│ ├── test_Path.py
│ ├── test_PathStrokeType.py
│ ├── test_PixelARGB.py
│ ├── test_PixelAlpha.py
│ ├── test_PixelRGB.py
│ ├── test_Point.py
│ ├── test_Rectangle.py
│ ├── test_RectangleList.py
│ └── utilities.py
├── test_juce_gui_basics/
│ ├── __init__.py
│ ├── test_Button.py
│ ├── test_DocumentWindow.py
│ ├── test_JUCEApplication.py
│ └── test_KeyPress.py
└── utilities.py
Showing preview only (213K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (2466 symbols across 188 files)
FILE: cmake/ArchivePythonStdlib.py
function file_hash (line 10) | def file_hash(file):
function make_archive (line 19) | def make_archive(file, directory):
FILE: demos/plugin/PopsiclePluginEditor.h
function class (line 6) | class AudioPluginAudioProcessorEditor : public juce::AudioProcessorEditor
FILE: demos/plugin/PopsiclePluginProcessor.cpp
function PYBIND11_EMBEDDED_MODULE (line 6) | PYBIND11_EMBEDDED_MODULE(custom, m)
FILE: demos/plugin/PopsiclePluginProcessor.h
function class (line 6) | class AudioPluginAudioProcessor : public juce::AudioProcessor
FILE: demos/standalone/Main.cpp
function PopsicleApplication (line 27) | PopsicleApplication() = default;
function getApplicationName (line 29) | const juce::String getApplicationName() override
function getApplicationVersion (line 34) | const juce::String getApplicationVersion() override
function initialise (line 39) | void initialise (const String&) override
function shutdown (line 44) | void shutdown() override
class MainWindow (line 50) | class MainWindow : public juce::DocumentWindow
method MainWindow (line 53) | MainWindow (const juce::String& name, juce::Component* c)
method closeButtonPressed (line 78) | void closeButtonPressed() override
FILE: demos/standalone/PopsicleDemo.cpp
function PYBIND11_EMBEDDED_MODULE (line 23) | PYBIND11_EMBEDDED_MODULE(custom, m)
function crashHandler (line 36) | void crashHandler ([[maybe_unused]] void* stack)
FILE: demos/standalone/PopsicleDemo.h
function class (line 25) | class PopsicleDemo : public juce::Component
FILE: examples/animated_component.py
class MainContentComponent (line 7) | class MainContentComponent(juce.AnimatedAppComponent):
method __init__ (line 8) | def __init__(self):
method update (line 14) | def update(self):
method paint (line 17) | def paint(self, g):
FILE: examples/audio_device.py
class AudioCallback (line 8) | class AudioCallback(juce.AudioIODeviceCallback):
method audioDeviceAboutToStart (line 13) | def audioDeviceAboutToStart(self, device: juce.AudioIODevice):
method audioDeviceIOCallbackWithContext (line 17) | def audioDeviceIOCallbackWithContext(self, inputs, numInputChannels, o...
method audioDeviceError (line 26) | def audioDeviceError(self, errorMessage: str):
method audioDeviceStopped (line 29) | def audioDeviceStopped(self):
class MainContentComponent (line 33) | class MainContentComponent(juce.Component):
method __init__ (line 37) | def __init__(self):
method visibilityChanged (line 55) | def visibilityChanged(self):
method onButtonStateChange (line 60) | def onButtonStateChange(self):
method paint (line 66) | def paint(self, g: juce.Graphics):
method resized (line 69) | def resized(self):
FILE: examples/audio_player.py
class TransportState (line 7) | class TransportState(Enum):
class AudioSource (line 14) | class AudioSource(juce.AudioSource):
method __init__ (line 18) | def __init__(self):
method prepareToPlay (line 21) | def prepareToPlay(self, samplesPerBlockExpected, sampleRate):
method getNextAudioBlock (line 24) | def getNextAudioBlock(self, bufferToFill):
method releaseResources (line 30) | def releaseResources(self):
class MainContentComponent (line 34) | class MainContentComponent(juce.Component, juce.ChangeListener, juce.Tim...
method __init__ (line 50) | def __init__(self):
method visibilityChanged (line 88) | def visibilityChanged(self):
method resized (line 100) | def resized(self):
method changeListenerCallback (line 107) | def changeListenerCallback(self, source):
method timerCallback (line 115) | def timerCallback(self):
method updateLoopState (line 129) | def updateLoopState(self, shouldLoop):
method changeState (line 135) | def changeState (self, newState):
method openButtonClicked (line 157) | def openButtonClicked(self):
method playButtonClicked (line 175) | def playButtonClicked(self):
method stopButtonClicked (line 179) | def stopButtonClicked(self):
method loopButtonChanged (line 182) | def loopButtonChanged(self):
FILE: examples/audio_player_waveform.py
class TransportState (line 7) | class TransportState(Enum):
class AudioSource (line 14) | class AudioSource(juce.AudioSource):
method __init__ (line 18) | def __init__(self):
method prepareToPlay (line 21) | def prepareToPlay(self, samplesPerBlockExpected, sampleRate):
method getNextAudioBlock (line 24) | def getNextAudioBlock(self, bufferToFill):
method releaseResources (line 30) | def releaseResources(self):
class SimpleThumbnailComponent (line 34) | class SimpleThumbnailComponent(juce.Component, juce.ChangeListener):
method __init__ (line 35) | def __init__(self, sourceSamplesPerThumbnailSample, formatManager, cac...
method setFile (line 42) | def setFile(self, file):
method paint (line 46) | def paint(self, g):
method paintIfNoFileLoaded (line 52) | def paintIfNoFileLoaded(self, g):
method paintIfFileLoaded (line 57) | def paintIfFileLoaded(self, g):
method changeListenerCallback (line 63) | def changeListenerCallback(self, source):
method thumbnailChanged (line 67) | def thumbnailChanged(self):
class SimplePositionOverlay (line 71) | class SimplePositionOverlay(juce.Component, juce.Timer):
method __init__ (line 72) | def __init__(self, transportSourceToUse):
method __del__ (line 79) | def __del__(self):
method paint (line 82) | def paint(self, g):
method mouseDown (line 92) | def mouseDown(self, event):
method timerCallback (line 101) | def timerCallback(self):
class MainContentComponent (line 105) | class MainContentComponent(juce.Component, juce.ChangeListener, juce.Tim...
method __init__ (line 121) | def __init__(self):
method visibilityChanged (line 167) | def visibilityChanged(self):
method resized (line 179) | def resized(self):
method changeListenerCallback (line 190) | def changeListenerCallback(self, source):
method timerCallback (line 198) | def timerCallback(self):
method updateLoopState (line 212) | def updateLoopState(self, shouldLoop):
method changeState (line 218) | def changeState (self, newState):
method openButtonClicked (line 240) | def openButtonClicked(self):
method playButtonClicked (line 260) | def playButtonClicked(self):
method stopButtonClicked (line 264) | def stopButtonClicked(self):
method loopButtonChanged (line 267) | def loopButtonChanged(self):
FILE: examples/drawables.py
class MainContentComponent (line 7) | class MainContentComponent(juce.Component):
method __init__ (line 8) | def __init__(self):
method paint (line 27) | def paint(self, g: juce.Graphics):
method resized (line 30) | def resized(self):
FILE: examples/emojis_component.py
function get_emoji (line 27) | def get_emoji(emoji: str) -> Optional[BytesIO]:
class NodeType (line 57) | class NodeType(Enum):
class Node (line 62) | class Node(NamedTuple):
class EmojiComponent (line 68) | class EmojiComponent(juce.Component):
method __init__ (line 73) | def __init__(self):
method setFont (line 78) | def setFont(self, font: juce.Font):
method setColour (line 82) | def setColour(self, colour: juce.Colour):
method setText (line 86) | def setText(self, text: str):
method splitTextIntoNodes (line 90) | def splitTextIntoNodes(self, text: str) -> List[List[Node]]:
method paint (line 109) | def paint(self, g: juce.Graphics):
class ExampleComponent (line 139) | class ExampleComponent(juce.Component):
method __init__ (line 141) | def __init__(self):
method paint (line 164) | def paint(self, g: juce.Graphics):
method resized (line 167) | def resized(self):
FILE: examples/emojis_font_component.py
class NodeType (line 19) | class NodeType(Enum):
class Node (line 24) | class Node(NamedTuple):
class EmojiComponent (line 29) | class EmojiComponent(juce.Component):
method __init__ (line 36) | def __init__(self):
method setFont (line 47) | def setFont(self, font: juce.Font):
method setColour (line 51) | def setColour(self, colour: juce.Colour):
method setText (line 55) | def setText(self, text: str):
method splitTextIntoNodes (line 59) | def splitTextIntoNodes(self, text: str) -> List[List[Node]]:
method paint (line 78) | def paint(self, g: juce.Graphics):
class ExampleComponent (line 138) | class ExampleComponent(juce.Component):
method __init__ (line 140) | def __init__(self):
method paint (line 163) | def paint(self, g: juce.Graphics):
method resized (line 166) | def resized(self):
FILE: examples/hotreload_component.py
class TestComponent (line 6) | class TestComponent(juce.Component, juce.Timer):
method __init__ (line 9) | def __init__(self):
method timerCallback (line 16) | def timerCallback(self):
method paint (line 20) | def paint(self, g: juce.Graphics):
FILE: examples/hotreload_main.py
class HotReloadContentComponent (line 8) | class HotReloadContentComponent(juce.Component, juce.Timer):
method __init__ (line 16) | def __init__(self):
method timerCallback (line 27) | def timerCallback(self):
method paint (line 36) | def paint(self, g: juce.Graphics):
method resized (line 39) | def resized(self):
method instantiateComponent (line 45) | def instantiateComponent(self):
FILE: examples/juce_init.py
function START_JUCE_COMPONENT (line 25) | def START_JUCE_COMPONENT(ComponentClass, name, **kwargs):
function timeit (line 92) | def timeit(func):
FILE: examples/juce_o_matic.py
class MainContentComponent (line 5) | class MainContentComponent(juce.Component, juce.Timer):
method __init__ (line 6) | def __init__(self):
method paint (line 14) | def paint(self, g: juce.Graphics):
method mouseDown (line 30) | def mouseDown(self, event: juce.MouseEvent):
method mouseMove (line 33) | def mouseMove(self, event: juce.MouseEvent):
method mouseUp (line 36) | def mouseUp(self, event: juce.MouseEvent):
method timerCallback (line 39) | def timerCallback(self):
class MainWindow (line 43) | class MainWindow(juce.DocumentWindow):
method __init__ (line 46) | def __init__(self):
method __del__ (line 61) | def __del__(self):
method closeButtonPressed (line 67) | def closeButtonPressed(self):
class Application (line 71) | class Application(juce.JUCEApplication):
method __init__ (line 74) | def __init__(self):
method getApplicationName (line 77) | def getApplicationName(self):
method getApplicationVersion (line 80) | def getApplicationVersion(self):
method initialise (line 83) | def initialise(self, commandLineParameters: str):
method shutdown (line 88) | def shutdown(self):
method systemRequestedQuit (line 92) | def systemRequestedQuit(self):
FILE: examples/layout_flexgrid.py
class RightSidePanel (line 5) | class RightSidePanel(juce.Component):
method __init__ (line 9) | def __init__(self, colour=None):
method paint (line 21) | def paint(self, g):
method resized (line 24) | def resized(self):
class LeftSidePanel (line 36) | class LeftSidePanel(juce.Component):
method __init__ (line 40) | def __init__(self, colour=None):
method paint (line 54) | def paint(self, g):
method resized (line 57) | def resized(self):
class MainPanel (line 71) | class MainPanel(juce.Component):
method __init__ (line 74) | def __init__(self):
method paint (line 84) | def paint(self, g):
method resized (line 87) | def resized(self):
class MainContentComponent (line 104) | class MainContentComponent(juce.Component):
method __init__ (line 105) | def __init__(self):
method paint (line 118) | def paint(self, g):
method resized (line 121) | def resized(self):
FILE: examples/layout_rectangles.py
class MainContentComponent (line 5) | class MainContentComponent(juce.Component):
method __init__ (line 15) | def __init__(self):
method paint (line 44) | def paint(self, g):
method resized (line 47) | def resized(self):
FILE: examples/matplotlib_integration.py
function make_plot (line 13) | def make_plot(fig):
function generate_plot_png (line 27) | def generate_plot_png(q, width, height):
class MainContentComponent (line 39) | class MainContentComponent(juce.Component, juce.Timer):
method __init__ (line 47) | def __init__(self):
method timerCallback (line 63) | def timerCallback(self):
method createImageFromBuffer (line 82) | def createImageFromBuffer(self, image_data) -> juce.Image:
method paint (line 85) | def paint(self, g: juce.Graphics):
method resized (line 98) | def resized(self):
FILE: examples/nim_audio_integration.py
class AudioCallback (line 9) | class AudioCallback(juce.AudioIODeviceCallback):
method audioDeviceAboutToStart (line 14) | def audioDeviceAboutToStart(self, device: juce.AudioIODevice):
method audioDeviceIOCallbackWithContext (line 18) | def audioDeviceIOCallbackWithContext(self, inputs, numInputChannels, o...
method audioDeviceError (line 27) | def audioDeviceError(self, errorMessage: str):
method audioDeviceStopped (line 30) | def audioDeviceStopped(self):
class MainContentComponent (line 34) | class MainContentComponent(juce.Component):
method __init__ (line 38) | def __init__(self):
method visibilityChanged (line 56) | def visibilityChanged(self):
method onButtonStateChange (line 61) | def onButtonStateChange(self):
method paint (line 67) | def paint(self, g: juce.Graphics):
method resized (line 70) | def resized(self):
FILE: examples/numpy_audio.py
class AudioCallback (line 7) | class AudioCallback(juce.AudioIODeviceCallback):
method audioDeviceAboutToStart (line 12) | def audioDeviceAboutToStart(self, device: juce.AudioIODevice):
method audioDeviceIOCallbackWithContext (line 17) | def audioDeviceIOCallbackWithContext(self, inputs, numInputChannels, o...
method audioDeviceError (line 31) | def audioDeviceError(self, errorMessage: str):
method audioDeviceStopped (line 34) | def audioDeviceStopped(self):
class MainContentComponent (line 38) | class MainContentComponent(juce.Component):
method __init__ (line 42) | def __init__(self):
method visibilityChanged (line 60) | def visibilityChanged(self):
method onButtonStateChange (line 65) | def onButtonStateChange(self):
method paint (line 71) | def paint(self, g: juce.Graphics):
method resized (line 74) | def resized(self):
FILE: examples/opencv_integration.py
class MainContentComponent (line 8) | class MainContentComponent(juce.Component):
method __init__ (line 11) | def __init__(self):
method processBrightness (line 40) | def processBrightness(self, img, brightness):
method processBlur (line 49) | def processBlur(self, img, blur):
method updateImage (line 53) | def updateImage(self):
method convertCvImageToJuce (line 61) | def convertCvImageToJuce(self, cvImage, juceImage = None):
method paint (line 74) | def paint(self, g: juce.Graphics):
method resized (line 80) | def resized(self):
FILE: examples/opencv_video.py
function captureCameraCallback (line 10) | def captureCameraCallback(imageQ, paramsQ, faceDetector, shouldStop, sca...
class MainContentComponent (line 54) | class MainContentComponent(juce.Component, juce.Timer):
method __init__ (line 62) | def __init__(self):
method updateParameters (line 99) | def updateParameters(self):
method convertCvImageToJuce (line 105) | def convertCvImageToJuce(self, cvImage, juceImage = None):
method visibilityChanged (line 116) | def visibilityChanged(self):
method timerCallback (line 121) | def timerCallback(self):
method paint (line 139) | def paint(self, g: juce.Graphics):
method resized (line 161) | def resized(self):
FILE: examples/pil_image.py
class ImageJuce (line 5) | class ImageJuce(juce.Image):
method __init__ (line 6) | def __init__(self, im):
FILE: examples/radio_buttons_checkboxes.py
class MainContentComponent (line 5) | class MainContentComponent(juce.Component):
method __init__ (line 17) | def __init__(self):
method resized (line 44) | def resized(self):
method updateToggleState (line 54) | def updateToggleState(self, button, name):
FILE: examples/slider_decibels.py
class DecibelSlider (line 5) | class DecibelSlider(juce.Slider):
method __init__ (line 6) | def __init__(self):
method getValueFromText (line 9) | def getValueFromText(self, text):
method getTextFromValue (line 16) | def getTextFromValue(self, value):
class MainContentComponent (line 20) | class MainContentComponent(juce.AudioAppComponent):
method __init__ (line 26) | def __init__(self):
method visibilityChanged (line 45) | def visibilityChanged(self):
method prepareToPlay (line 49) | def prepareToPlay(self, blockSize, sampleRate):
method getNextAudioBlock (line 52) | def getNextAudioBlock(self, bufferToFill):
method releaseResources (line 62) | def releaseResources(self):
method resized (line 65) | def resized(self):
FILE: examples/slider_values.py
class MainContentComponent (line 5) | class MainContentComponent(juce.Component):
method __init__ (line 11) | def __init__(self):
method resized (line 42) | def resized(self):
FILE: examples/table_list_box.py
function forEachXmlChildElement (line 8) | def forEachXmlChildElement(parentXmlElement):
function compareNatural (line 15) | def compareNatural(x, y):
class EditableLabel (line 26) | class EditableLabel(juce.Label):
method __init__ (line 27) | def __init__(self, td):
method mouseDown (line 36) | def mouseDown(self, event):
method textWasEdited (line 41) | def textWasEdited(self):
method setRowAndColumn (line 44) | def setRowAndColumn(self, newRow, newColumn):
class EditableTextCustomComponent (line 52) | class EditableTextCustomComponent(juce.Component):
method __init__ (line 53) | def __init__(self, td):
method resized (line 59) | def resized(self):
method setRowAndColumn (line 62) | def setRowAndColumn(self, newRow, newColumn):
class SelectionColumnCustomComponent (line 66) | class SelectionColumnCustomComponent(juce.Component):
method __init__ (line 67) | def __init__(self, td):
method resized (line 78) | def resized(self):
method setRowAndColumn (line 81) | def setRowAndColumn(self, newRow, newColumn):
class TutorialDataSorter (line 88) | class TutorialDataSorter(juce.XmlElement.Comparator):
method __init__ (line 89) | def __init__(self, attributeToSortBy, forwards):
method compareElements (line 94) | def compareElements(self, first, second):
class TableTutorialComponent (line 104) | class TableTutorialComponent(juce.Component, juce.TableListBoxModel):
method __init__ (line 110) | def __init__(self):
method getNumRows (line 139) | def getNumRows(self):
method paintRowBackground (line 142) | def paintRowBackground(self, g, rowNumber, width, height, rowIsSelected):
method paintCell (line 151) | def paintCell(self, g, rowNumber, columnId, width, height, rowIsSelect...
method sortOrderChanged (line 167) | def sortOrderChanged(self, newSortColumnId, isForwards):
method refreshComponentForCell (line 175) | def refreshComponentForCell(self, rowNumber, columnId, isRowSelected, ...
method getColumnAutoSizeWidth (line 197) | def getColumnAutoSizeWidth(self, columnId):
method getSelection (line 212) | def getSelection(self, rowNumber):
method setSelection (line 215) | def setSelection(self, rowNumber, newSelection):
method getText (line 218) | def getText(self, columnNumber, rowNumber):
method setText (line 223) | def setText(self, columnNumber, rowNumber, newText):
method resized (line 227) | def resized(self):
method loadData (line 230) | def loadData(self):
method getAttributeNameForColumnId (line 242) | def getAttributeNameForColumnId(self, columnId):
class MainContentComponent (line 250) | class MainContentComponent(juce.Component):
method __init__ (line 251) | def __init__(self):
method paint (line 259) | def paint(self, g):
method resized (line 262) | def resized(self):
FILE: examples/wavetable_oscillator.py
class WavetableOscillator (line 7) | class WavetableOscillator(object):
method __init__ (line 13) | def __init__(self, wavetableToUse):
method setFrequency (line 19) | def setFrequency(self, frequency, sampleRate):
method getNextSample (line 23) | def getNextSample(self):
class MainContentComponent (line 42) | class MainContentComponent(juce.AudioAppComponent, juce.Timer):
method __init__ (line 52) | def __init__(self):
method visibilityChanged (line 67) | def visibilityChanged(self):
method resized (line 71) | def resized(self):
method timerCallback (line 75) | def timerCallback(self):
method createWavetable (line 79) | def createWavetable(self):
method prepareToPlay (line 100) | def prepareToPlay (self, samplePerBlock, sampleRate):
method releaseResources (line 115) | def releaseResources(self):
method getNextAudioBlock (line 118) | def getNextAudioBlock(self, bufferToFill):
FILE: examples/wavetable_oscillator_numpy.py
class WavetableOscillator (line 8) | class WavetableOscillator(object):
method __init__ (line 14) | def __init__(self, wavetableToUse, samplePerBlock):
method setFrequency (line 20) | def setFrequency(self, frequency, sampleRate):
method getNextBlock (line 24) | def getNextBlock(self, numSamples):
class MainContentComponent (line 42) | class MainContentComponent(juce.AudioAppComponent, juce.Timer):
method __init__ (line 52) | def __init__(self):
method visibilityChanged (line 67) | def visibilityChanged(self):
method resized (line 71) | def resized(self):
method timerCallback (line 75) | def timerCallback(self):
method createWavetable (line 79) | def createWavetable(self):
method prepareToPlay (line 99) | def prepareToPlay (self, samplePerBlock, sampleRate):
method releaseResources (line 114) | def releaseResources(self):
method getNextAudioBlock (line 117) | def getNextAudioBlock(self, bufferToFill):
FILE: examples/webgpu/cube_popsicle.py
function main (line 19) | def main(canvas):
FILE: examples/webgpu/pbr2.py
function main (line 27) | def main(canvas):
FILE: examples/webgpu/pbr2_embed.py
class WgpuComponent (line 28) | class WgpuComponent(juce.Component):
method __init__ (line 31) | def __init__(self):
method __del__ (line 45) | def __del__(self):
method resized (line 52) | def resized(self):
method sliderChanged (line 60) | def sliderChanged(self):
method attachToWindow (line 66) | def attachToWindow(self, window):
method detach (line 152) | def detach(self):
class WgpuWindow (line 157) | class WgpuWindow(juce.DocumentWindow):
method __init__ (line 160) | def __init__(self):
method __del__ (line 179) | def __del__(self):
method closeButtonPressed (line 186) | def closeButtonPressed(self):
class WgpuApplication (line 190) | class WgpuApplication(juce.JUCEApplication):
method getApplicationName (line 193) | def getApplicationName(self):
method getApplicationVersion (line 196) | def getApplicationVersion(self):
method initialise (line 199) | def initialise(self, commandLineParameters: str):
method shutdown (line 204) | def shutdown(self):
method systemRequestedQuit (line 208) | def systemRequestedQuit(self):
FILE: examples/webgpu/pop.py
function enable_hidpi (line 18) | def enable_hidpi():
function convert_buttons (line 30) | def convert_buttons(event: juce.MouseEvent):
function call_later (line 56) | def call_later(delay, callback, *args):
class JUCECallbackTimer (line 60) | class JUCECallbackTimer(juce.Timer):
method __init__ (line 61) | def __init__(self, callback):
method timerCallback (line 65) | def timerCallback(self):
class JUCEWgpuComponentBase (line 70) | class JUCEWgpuComponentBase(juce.Component):
method __init__ (line 71) | def __init__(self, *args, **kwargs):
class JUCEWgpuComponent (line 75) | class JUCEWgpuComponent(WgpuAutoGui, WgpuCanvasBase, JUCEWgpuComponentBa...
method __init__ (line 78) | def __init__(self, *args, **kwargs):
method paint (line 87) | def paint(self, g): # noqa: N802 - this is a Popsicle method
method resized (line 90) | def resized(self):
method get_surface_info (line 101) | def get_surface_info(self):
method get_pixel_ratio (line 123) | def get_pixel_ratio(self):
method get_logical_size (line 126) | def get_logical_size(self):
method get_physical_size (line 130) | def get_physical_size(self):
method set_logical_size (line 136) | def set_logical_size(self, width, height):
method _request_draw (line 141) | def _request_draw(self):
method is_closed (line 145) | def is_closed(self):
method _mouse_event (line 150) | def _mouse_event(self, event_type, event, touches=True):
method mouseDown (line 175) | def mouseDown(self, event): # noqa: N802
method mouseMove (line 178) | def mouseMove(self, event): # noqa: N802
method mouseDrag (line 181) | def mouseDrag(self, event): # noqa: N802
method mouseUp (line 184) | def mouseUp(self, event): # noqa: N802
method mouseDoubleClick (line 187) | def mouseDoubleClick(self, event): # noqa: N802
method mouseWheelMove (line 190) | def mouseWheelMove(self, event, wheel):
method reparentToWindow (line 210) | def reparentToWindow(self, window):
class JUCEWgpuWindow (line 214) | class JUCEWgpuWindow(juce.DocumentWindow):
method __init__ (line 215) | def __init__(self, title=None, *args, **kwargs):
class JUCEWgpuCanvas (line 225) | class JUCEWgpuCanvas(WgpuAutoGui, WgpuCanvasBase, JUCEWgpuWindow):
method __init__ (line 230) | def __init__(self, size=None, title=None, max_fps=30, **kwargs):
method __del__ (line 247) | def __del__(self):
method closeButtonPressed (line 252) | def closeButtonPressed(self):
method draw_frame (line 258) | def draw_frame(self):
method draw_frame (line 262) | def draw_frame(self, f):
method get_surface_info (line 265) | def get_surface_info(self):
method get_pixel_ratio (line 268) | def get_pixel_ratio(self):
method get_logical_size (line 271) | def get_logical_size(self):
method get_physical_size (line 274) | def get_physical_size(self):
method set_logical_size (line 277) | def set_logical_size(self, width, height):
method _request_draw (line 282) | def _request_draw(self):
method is_closed (line 285) | def is_closed(self):
method get_context (line 290) | def get_context(self, *args, **kwargs):
method request_draw (line 293) | def request_draw(self, *args, **kwargs):
method getSubwidget (line 298) | def getSubwidget(self):
function run (line 307) | def run(canvas, make_device, **kwargs):
FILE: examples/webgpu/triangle.py
function main (line 64) | def main(canvas, power_preference="high-performance", limits=None):
function main_async (line 71) | async def main_async(canvas):
function _main (line 78) | def _main(canvas, device):
FILE: examples/webgpu/triangle_popsicle_embed.py
class Example (line 13) | class Example(juce.Component):
method __init__ (line 14) | def __init__(self):
method resized (line 29) | def resized(self):
method getCanvas1 (line 41) | def getCanvas1(self):
method getCanvas2 (line 44) | def getCanvas2(self):
class WgpuWindow (line 48) | class WgpuWindow(juce.DocumentWindow):
method __init__ (line 51) | def __init__(self):
method __del__ (line 67) | def __del__(self):
method closeButtonPressed (line 72) | def closeButtonPressed(self):
method getCanvas1 (line 75) | def getCanvas1(self):
method getCanvas2 (line 78) | def getCanvas2(self):
class WgpuApplication (line 82) | class WgpuApplication(juce.JUCEApplication):
method getApplicationName (line 85) | def getApplicationName(self):
method getApplicationVersion (line 88) | def getApplicationVersion(self):
method initialise (line 91) | def initialise(self, commandLineParameters: str):
method shutdown (line 104) | def shutdown(self):
method systemRequestedQuit (line 108) | def systemRequestedQuit(self):
FILE: examples/wip/audio_callback_cpp.py
class MainContentComponent2 (line 41) | class MainContentComponent2(juce.Component):
method __init__ (line 45) | def __init__(self):
method __del__ (line 56) | def __del__(self):
method paint (line 65) | def paint(self, g):
FILE: examples/wip/audio_player_cpp.py
class TransportState (line 43) | class TransportState(Enum):
class MainContentComponent (line 50) | class MainContentComponent(juce_multi(cppyy.gbl.AudioAppComponent, juce....
method __init__ (line 61) | def __init__(self):
method __del__ (line 97) | def __del__(self):
method resized (line 110) | def resized(self):
method changeListenerCallback (line 117) | def changeListenerCallback(self, source):
method timerCallback (line 124) | def timerCallback(self):
method updateLoopState (line 138) | def updateLoopState(self, shouldLoop):
method changeState (line 142) | def changeState (self, newState):
method openButtonClicked (line 163) | def openButtonClicked(self):
method playButtonClicked (line 178) | def playButtonClicked(self):
method stopButtonClicked (line 182) | def stopButtonClicked(self):
method loopButtonChanged (line 185) | def loopButtonChanged(self):
FILE: examples/wip/copy_image_pixels.py
function createImageFromBuffer (line 3) | def createImageFromBuffer(image_data: bytes, width: int, height: int) ->...
FILE: examples/wip/synth_midi_input.py
class SineWaveSound (line 12) | class SineWaveSound(juce.SynthesiserSound):
method __init__ (line 13) | def __init__(self):
method appliesToNote (line 16) | def appliesToNote(self, channel):
method appliesToChannel (line 19) | def appliesToChannel(self, channel):
class SineWaveVoice (line 23) | class SineWaveVoice(juce.SynthesiserVoice):
method __init__ (line 24) | def __init__(self):
method canPlaySound (line 32) | def canPlaySound(self, sound):
method startNote (line 35) | def startNote(self, midiNoteNumber, velocity, sound, currentPitchWheel...
method stopNote (line 45) | def stopNote(self, velocity, allowTailOff):
method pitchWheelMoved (line 53) | def pitchWheelMoved(self, value):
method controllerMoved (line 56) | def controllerMoved(self, controller, value):
method renderNextBlock (line 59) | def renderNextBlock(self, outputBuffer, startSample, numSamples):
class SynthAudioSource (line 90) | class SynthAudioSource(juce.AudioSource):
method __init__ (line 95) | def __init__(self, keyState):
method setUsingSineWaveSound (line 108) | def setUsingSineWaveSound(self):
method prepareToPlay (line 111) | def prepareToPlay(self, samplesPerBlockExpected, sampleRate):
method releaseResources (line 115) | def releaseResources(self):
method getNextAudioBlock (line 118) | def getNextAudioBlock(self, bufferToFill):
method getMidiCollector (line 128) | def getMidiCollector(self):
class MainContentComponent (line 132) | class MainContentComponent(juce_multi(juce.AudioAppComponent, juce.Timer)):
method __init__ (line 138) | def __init__(self):
method __del__ (line 176) | def __del__(self):
method resized (line 182) | def resized(self):
method prepareToPlay (line 186) | def prepareToPlay(self, samplesPerBlockExpected, sampleRate):
method getNextAudioBlock (line 189) | def getNextAudioBlock(self, bufferToFill):
method releaseResources (line 192) | def releaseResources(self):
method timerCallback (line 195) | def timerCallback(self):
method setMidiInput (line 199) | def setMidiInput(self, index):
FILE: modules/juce_python/bindings/ScriptJuceAudioBasicsBindings.cpp
type popsicle::Bindings (line 25) | namespace popsicle::Bindings {
function registerAudioBuffer (line 35) | void registerAudioBuffer (py::module_& m)
function registerJuceAudioBasicsBindings (line 143) | void registerJuceAudioBasicsBindings (py::module_& m)
FILE: modules/juce_python/bindings/ScriptJuceAudioBasicsBindings.h
function namespace (line 31) | namespace popsicle::Bindings {
function prepareToPlay (line 110) | void prepareToPlay (int newSamplesPerBlockExpected, double newSampleRate...
function releaseResources (line 115) | void releaseResources() override
function getNextAudioBlock (line 120) | void getNextAudioBlock (const juce::AudioSourceChannelInfo& bufferToFill...
function setNextReadPosition (line 131) | void setNextReadPosition (juce::int64 newPosition) override
FILE: modules/juce_python/bindings/ScriptJuceAudioDevicesBindings.cpp
type popsicle::Bindings (line 29) | namespace popsicle::Bindings {
function registerJuceAudioDevicesBindings (line 38) | void registerJuceAudioDevicesBindings (py::module_& m)
FILE: modules/juce_python/bindings/ScriptJuceAudioDevicesBindings.h
function namespace (line 35) | namespace popsicle::Bindings {
function Listener (line 83) | struct PyAudioIODeviceTypeListener : juce::AudioIODeviceType::Listener
function audioDeviceIOCallbackWithContext (line 100) | void audioDeviceIOCallbackWithContext (const float* const* inputChannelD...
function audioDeviceAboutToStart (line 131) | void audioDeviceAboutToStart (juce::AudioIODevice* device) override
function audioDeviceStopped (line 136) | void audioDeviceStopped() override
function audioDeviceError (line 141) | void audioDeviceError (const juce::String& errorMessage) override
function AudioIODevice (line 152) | struct PyAudioIODevice : juce::AudioIODevice
function getDefaultBufferSize (line 191) | int getDefaultBufferSize() override
function close (line 201) | void close() override
function isOpen (line 206) | bool isOpen() override
function start (line 211) | void start (juce::AudioIODeviceCallback* callback) override
function stop (line 216) | void stop() override
function isPlaying (line 221) | bool isPlaying() override
function getCurrentBufferSizeSamples (line 231) | int getCurrentBufferSizeSamples() override
function getCurrentSampleRate (line 236) | double getCurrentSampleRate() override
function getCurrentBitDepth (line 241) | int getCurrentBitDepth() override
function getOutputLatencyInSamples (line 256) | int getOutputLatencyInSamples() override
function getInputLatencyInSamples (line 261) | int getInputLatencyInSamples() override
function hasControlPanel (line 271) | bool hasControlPanel() const override
function setAudioPreprocessingEnabled (line 281) | bool setAudioPreprocessingEnabled (bool shouldBeEnabled) override
FILE: modules/juce_python/bindings/ScriptJuceAudioFormatsBindings.cpp
type popsicle::Bindings (line 21) | namespace popsicle::Bindings {
function registerJuceAudioFormatsBindings (line 30) | void registerJuceAudioFormatsBindings (py::module_& m)
FILE: modules/juce_python/bindings/ScriptJuceAudioFormatsBindings.h
function namespace (line 35) | namespace popsicle::Bindings {
function IncomingDataReceiver (line 182) | struct PyAudioFormatWriterIncomingDataReceiver : juce::AudioFormatWriter...
function canHandleFile (line 219) | bool canHandleFile (const juce::File& fileToTest) override
function canDoStereo (line 234) | bool canDoStereo() override
function canDoMono (line 239) | bool canDoMono() override
function isCompressed (line 244) | bool isCompressed() override
function isChannelLayoutSupported (line 249) | bool isChannelLayoutSupported (const juce::AudioChannelSet& channelSet) ...
FILE: modules/juce_python/bindings/ScriptJuceAudioProcessorsBindings.cpp
type popsicle::Bindings (line 21) | namespace popsicle::Bindings {
function registerJuceAudioProcessorsBindings (line 30) | void registerJuceAudioProcessorsBindings ([[maybe_unused]] py::module_...
FILE: modules/juce_python/bindings/ScriptJuceAudioProcessorsBindings.h
function namespace (line 33) | namespace popsicle::Bindings {
FILE: modules/juce_python/bindings/ScriptJuceAudioUtilsBindings.cpp
type popsicle::Bindings (line 23) | namespace popsicle::Bindings {
function registerJuceAudioUtilsBindings (line 32) | void registerJuceAudioUtilsBindings (py::module_& m)
FILE: modules/juce_python/bindings/ScriptJuceAudioUtilsBindings.h
function namespace (line 36) | namespace popsicle::Bindings {
FILE: modules/juce_python/bindings/ScriptJuceCoreBindings.cpp
type PYBIND11_NAMESPACE (line 30) | namespace PYBIND11_NAMESPACE {
type detail (line 31) | namespace detail {
function handle (line 57) | handle type_caster<juce::StringRef>::cast (const juce::StringRef& sr...
function handle (line 110) | handle type_caster<juce::String>::cast (const juce::String& src, ret...
function handle (line 167) | handle type_caster<juce::Identifier>::cast (const juce::Identifier& ...
function handle (line 319) | handle type_caster<juce::var>::cast (const juce::var& src, return_va...
type popsicle::Bindings (line 383) | namespace popsicle::Bindings {
function registerMathConstants (line 393) | void registerMathConstants (py::module_& m)
function registerRange (line 423) | void registerRange (py::module_& m)
function registerNormalisableRange (line 495) | void registerNormalisableRange (py::module_& m)
function registerAtomic (line 547) | void registerAtomic (py::module_& m)
function registerSparseSet (line 591) | void registerSparseSet (pybind11::module_& m)
function registerJuceCoreBindings (line 652) | void registerJuceCoreBindings (py::module_& m)
FILE: modules/juce_python/bindings/ScriptJuceCoreBindings.h
function namespace (line 38) | namespace PYBIND11_NAMESPACE {
function namespace (line 107) | namespace popsicle::Bindings {
function compareElements (line 128) | int compareElements (const T& first, const T& second)
type PyThreadID (line 347) | struct PyThreadID
function noexcept (line 359) | const noexcept
function isExhausted (line 391) | bool isExhausted() override
function read (line 396) | int read (void* destBuffer, int maxBytesToRead) override
function readByte (line 410) | char readByte() override
function readShort (line 415) | short readShort() override
function readShortBigEndian (line 420) | short readShortBigEndian() override
function readInt (line 425) | int readInt() override
function readIntBigEndian (line 430) | int readIntBigEndian() override
function readFloat (line 445) | float readFloat() override
function readFloatBigEndian (line 450) | float readFloatBigEndian() override
function readDouble (line 455) | double readDouble() override
function readDoubleBigEndian (line 460) | double readDoubleBigEndian() override
function readCompressedInt (line 465) | int readCompressedInt() override
function readIntoMemoryBlock (line 485) | size_t readIntoMemoryBlock (juce::MemoryBlock& destBlock, ssize_t maxNum...
function setPosition (line 495) | bool setPosition (juce::int64 newPosition) override
function skipNextBytes (line 500) | void skipNextBytes (juce::int64 newPosition) override
function flush (line 542) | void flush() override
function setPosition (line 547) | bool setPosition (juce::int64 newPosition) override
function write (line 557) | bool write (const void* dataToWrite, size_t numberOfBytes) override
function writeByte (line 571) | bool writeByte (char value) override
function writeBool (line 576) | bool writeBool (bool value) override
function writeShort (line 581) | bool writeShort (short value) override
function writeShortBigEndian (line 586) | bool writeShortBigEndian (short value) override
function writeInt (line 591) | bool writeInt (int value) override
function writeIntBigEndian (line 596) | bool writeIntBigEndian (int value) override
function writeInt64 (line 601) | bool writeInt64 (juce::int64 value) override
function writeInt64BigEndian (line 606) | bool writeInt64BigEndian (juce::int64 value) override
function writeFloat (line 611) | bool writeFloat (float value) override
function writeFloatBigEndian (line 616) | bool writeFloatBigEndian (float value) override
function writeDouble (line 621) | bool writeDouble (double value) override
function writeDoubleBigEndian (line 626) | bool writeDoubleBigEndian (double value) override
function writeRepeatedByte (line 631) | bool writeRepeatedByte (juce::uint8 byte, size_t numTimesToRepeat) override
function writeCompressedInt (line 636) | bool writeCompressedInt (int value) override
function writeString (line 641) | bool writeString (const juce::String& text) override
function writeText (line 646) | bool writeText (const juce::String& text, bool asUTF16, bool writeUTF16B...
function isFileSuitable (line 664) | bool isFileSuitable (const juce::File& file) const override
function isDirectorySuitable (line 669) | bool isDirectorySuitable (const juce::File& file) const override
type PyURLDownloadTaskListener (line 677) | struct PyURLDownloadTaskListener
function finished (line 679) | void finished (juce::URL::DownloadTask* task, bool success) override
function progress (line 684) | void progress (juce::URL::DownloadTask* task, juce::int64 bytesDownloade...
type PyXmlElementComparator (line 692) | struct PyXmlElementComparator
type PyHighResolutionTimer (line 738) | struct PyHighResolutionTimer
function hiResTimerCallback (line 740) | void hiResTimerCallback() override
function mutex (line 751) | PyGenericScopedLock (const T& mutex)
function enter (line 764) | void enter()
function exit (line 769) | void exit()
function mutex (line 781) | PyGenericScopedUnlock (const T& mutex)
function enter (line 794) | void enter()
function exit (line 799) | void exit()
function enter (line 837) | void enter()
function exit (line 843) | void exit()
function run (line 862) | void run() override
FILE: modules/juce_python/bindings/ScriptJuceDataStructuresBindings.cpp
type popsicle::Bindings (line 30) | namespace popsicle::Bindings {
function registerCachedValue (line 40) | void registerCachedValue (py::module_& m)
function registerJuceDataStructuresBindings (line 85) | void registerJuceDataStructuresBindings (py::module_& m)
FILE: modules/juce_python/bindings/ScriptJuceDataStructuresBindings.h
function namespace (line 31) | namespace popsicle::Bindings {
type PyValueValueSource (line 79) | struct PyValueValueSource
function setValue (line 88) | void setValue (const juce::var& newValue) override
type PyValueListener (line 96) | struct PyValueListener
function valueChanged (line 100) | void valueChanged (juce::Value& value) override
type PyValueTreeListener (line 108) | struct PyValueTreeListener
function valueTreePropertyChanged (line 112) | void valueTreePropertyChanged (juce::ValueTree& treeWhosePropertyHasChan...
function valueTreeChildAdded (line 117) | void valueTreeChildAdded (juce::ValueTree& parentTree, juce::ValueTree& ...
function valueTreeChildRemoved (line 122) | void valueTreeChildRemoved (juce::ValueTree& parentTree, juce::ValueTree...
function valueTreeChildOrderChanged (line 127) | void valueTreeChildOrderChanged (juce::ValueTree& parentTreeWhoseChildre...
function valueTreeParentChanged (line 132) | void valueTreeParentChanged (juce::ValueTree& treeWhoseParentHasChanged)...
function valueTreeRedirected (line 137) | void valueTreeRedirected (juce::ValueTree& treeWhichHasBeenChanged) over...
type PyValueTreeComparator (line 145) | struct PyValueTreeComparator
type PyValueTreeSynchroniser (line 166) | struct PyValueTreeSynchroniser
function stateChanged (line 170) | void stateChanged (const void* encodedChange, size_t encodedChangeSize) ...
FILE: modules/juce_python/bindings/ScriptJuceEventsBindings.cpp
type juce (line 31) | namespace juce {
type popsicle::Bindings (line 41) | namespace popsicle::Bindings {
function registerJuceEventsBindings (line 48) | void registerJuceEventsBindings (py::module_& m)
FILE: modules/juce_python/bindings/ScriptJuceEventsBindings.h
function namespace (line 31) | namespace popsicle::Bindings {
type PyMultiTimer (line 136) | struct PyMultiTimer
function timerCallback (line 140) | void timerCallback (int timerID) override
FILE: modules/juce_python/bindings/ScriptJuceGraphicsBindings.cpp
function registerPoint (line 47) | void registerPoint (py::module_& m)
function registerLine (line 132) | void registerLine (py::module_& m)
function registerRectangle (line 211) | void registerRectangle (py::module_& m)
function registerRectangleList (line 358) | void registerRectangleList (py::module_& m)
function registerParallelogram (line 419) | void registerParallelogram (py::module_& m)
function registerBorderSize (line 487) | void registerBorderSize (py::module_& m)
FILE: modules/juce_python/bindings/ScriptJuceGraphicsBindings.h
function namespace (line 33) | namespace popsicle::Bindings {
function ImageFileFormat (line 61) | struct PyImageFileFormat : juce::ImageFileFormat
function isVectorDevice (line 98) | bool isVectorDevice() const override
function addTransform (line 108) | void addTransform (const juce::AffineTransform& transform) override
function getPhysicalPixelScaleFactor (line 113) | float getPhysicalPixelScaleFactor() const override
function clipToRectangleList (line 123) | bool clipToRectangleList (const juce::RectangleList<int>& rects) override
function excludeClipRectangle (line 128) | void excludeClipRectangle (const juce::Rectangle<int>& rect) override
function clipToPath (line 133) | void clipToPath (const juce::Path& path, const juce::AffineTransform& tr...
function clipToImageAlpha (line 138) | void clipToImageAlpha (const juce::Image& image, const juce::AffineTrans...
function clipRegionIntersects (line 143) | bool clipRegionIntersects (const juce::Rectangle<int>& rect) override
function isClipEmpty (line 153) | bool isClipEmpty() const override
function restoreState (line 163) | void restoreState() override
function beginTransparencyLayer (line 168) | void beginTransparencyLayer (float opacity) override
function endTransparencyLayer (line 173) | void endTransparencyLayer() override
function setFill (line 178) | void setFill (const juce::FillType& fill) override
function setOpacity (line 183) | void setOpacity (float opacity) override
function setInterpolationQuality (line 188) | void setInterpolationQuality (juce::Graphics::ResamplingQuality quality)...
function fillAll (line 193) | void fillAll() override
function fillRect (line 198) | void fillRect (const juce::Rectangle<int>& rect, bool replaceExistingCon...
function fillRect (line 203) | void fillRect (const juce::Rectangle<float>& rect) override
function fillRectList (line 208) | void fillRectList (const juce::RectangleList<float>& rects) override
function fillPath (line 213) | void fillPath (const juce::Path& path, const juce::AffineTransform& tran...
function drawImage (line 218) | void drawImage (const juce::Image& image, const juce::AffineTransform& t...
function drawLine (line 223) | void drawLine (const juce::Line<float>& line) override
function setFont (line 228) | void setFont (const juce::Font& font) override
function juce (line 233) | const juce::Font& getFont() override
function drawGlyphs (line 238) | void drawGlyphs (juce::Span<const uint16_t> glyphs,
FILE: modules/juce_python/bindings/ScriptJuceGuiBasicsBindings.cpp
type PYBIND11_NAMESPACE (line 29) | namespace PYBIND11_NAMESPACE {
type polymorphic_type_hook<juce::Component> (line 32) | struct polymorphic_type_hook<juce::Component>
FILE: modules/juce_python/bindings/ScriptJuceGuiBasicsBindings.h
function namespace (line 41) | namespace popsicle::Bindings {
function setHighlightedRegion (line 293) | void setHighlightedRegion (const juce::Range<int>& newRange) override
function setTemporaryUnderlining (line 298) | void setTemporaryUnderlining (const juce::Array<juce::Range<int>>& under...
function insertTextAtCaret (line 308) | void insertTextAtCaret (const juce::String& textToInsert) override
function getCaretPosition (line 313) | int getCaretPosition() const override
function getTotalNumChars (line 323) | int getTotalNumChars() const override
function drawSpinningWaitAnimation (line 351) | void drawSpinningWaitAnimation(juce::Graphics& g, const juce::Colour& co...
function drawButtonBackground (line 402) | void drawButtonBackground (juce::Graphics& g, juce::Button& b, const juc...
function drawButtonText (line 432) | void drawButtonText (juce::Graphics& g, juce::TextButton& button,
function getTextButtonWidthToFitText (line 448) | int getTextButtonWidthToFitText (juce::TextButton& button, int buttonHei...
function drawToggleButton (line 462) | void drawToggleButton (juce::Graphics& g, juce::ToggleButton& button,
function changeToggleButtonWidthToFitText (line 478) | void changeToggleButtonWidthToFitText (juce::ToggleButton& button) override
function drawTickBox (line 493) | void drawTickBox (juce::Graphics& g, juce::Component& component,
function drawDrawableButton (line 511) | void drawDrawableButton (juce::Graphics& g, juce::DrawableButton& button,
function drawAlertBox (line 535) | void drawAlertBox (juce::Graphics& g, juce::AlertWindow& alertWindow, co...
function getAlertBoxWindowFlags (line 550) | int getAlertBoxWindowFlags() override
function getAlertWindowButtonHeight (line 573) | int getAlertWindowButtonHeight() override
function ComponentListener (line 630) | struct PyComponentListener : juce::ComponentListener
function Callback (line 677) | struct PyModalComponentManagerCallback : juce::ModalComponentManager::Ca...
function Callback (line 687) | struct PyModalComponentManagerCallbackCallable : juce::ModalComponentMan...
function setName (line 711) | void setName (const juce::String& newName) override
function setVisible (line 716) | void setVisible (bool shouldBeVisible) override
function visibilityChanged (line 721) | void visibilityChanged() override
function userTriedToCloseWindow (line 726) | void userTriedToCloseWindow() override
function minimisationStateChanged (line 731) | void minimisationStateChanged(bool isNowMinimised) override
function getDesktopScaleFactor (line 736) | float getDesktopScaleFactor() const override
function childrenChanged (line 746) | void childrenChanged() override
function hitTest (line 751) | bool hitTest (int x, int y) override
function lookAndFeelChanged (line 756) | void lookAndFeelChanged() override
function enablementChanged (line 761) | void enablementChanged() override
function alphaChanged (line 766) | void alphaChanged() override
function paint (line 771) | void paint (juce::Graphics& g) override
function paintOverChildren (line 787) | void paintOverChildren (juce::Graphics& g) override
function keyPressed (line 802) | bool keyPressed (const juce::KeyPress& key) override
function keyStateChanged (line 807) | bool keyStateChanged (bool isDown) override
function modifierKeysChanged (line 812) | void modifierKeysChanged (const juce::ModifierKeys& modifiers) override
function focusGained (line 817) | void focusGained (juce::Component::FocusChangeType cause) override
function focusGainedWithDirection (line 822) | void focusGainedWithDirection (juce::Component::FocusChangeType cause, j...
function focusLost (line 827) | void focusLost (juce::Component::FocusChangeType cause) override
function focusOfChildComponentChanged (line 832) | void focusOfChildComponentChanged (juce::Component::FocusChangeType caus...
function resized (line 837) | void resized () override
function moved (line 842) | void moved () override
function childBoundsChanged (line 847) | void childBoundsChanged (juce::Component* child) override
function parentSizeChanged (line 852) | void parentSizeChanged () override
function broughtToFront (line 857) | void broughtToFront () override
function handleCommandMessage (line 862) | void handleCommandMessage (int commandId) override
function canModalEventBeSentToComponent (line 878) | bool canModalEventBeSentToComponent (const juce::Component* targetCompon...
function inputAttemptWhenModal (line 883) | void inputAttemptWhenModal () override
function colourChanged (line 888) | void colourChanged () override
function override (line 901) | const override
function replaceColour (line 931) | bool replaceColour (juce::Colour originalColour, juce::Colour replacemen...
function override (line 942) | const override { return nullptr; }
function override (line 960) | const override { return nullptr; }
function override (line 978) | const override { return nullptr; }
function override (line 986) | const override { return nullptr; }
function replaceColour (line 998) | bool replaceColour (juce::Colour originalColour, juce::Colour replacemen...
function override (line 1009) | const override { return nullptr; }
function replaceColour (line 1021) | bool replaceColour (juce::Colour originalColour, juce::Colour replacemen...
function explicit (line 1034) | explicit PyButton (const juce::String& name)
function triggerClick (line 1039) | void triggerClick() override
function clicked (line 1044) | void clicked() override
function clicked (line 1049) | void clicked (const juce::ModifierKeys& modifiers) override
function paintButton (line 1065) | void paintButton (juce::Graphics& g, bool shouldDrawButtonAsHighlighted,...
function buttonStateChanged (line 1080) | void buttonStateChanged() override
function Listener (line 1086) | struct PyButtonListener : juce::Button::Listener
function textWasEdited (line 1124) | void textWasEdited() override
function textWasChanged (line 1129) | void textWasChanged() override
function editorShown (line 1134) | void editorShown (juce::TextEditor* e) override
function editorAboutToBeHidden (line 1139) | void editorAboutToBeHidden (juce::TextEditor* e) override
function Listener (line 1145) | struct PyLabelListener : juce::Label::Listener
function addPopupMenuItems (line 1173) | void addPopupMenuItems (juce::PopupMenu& menuToAddTo, const juce::MouseE...
function performPopupMenuAction (line 1178) | void performPopupMenuAction (int menuItemID) override
function Listener (line 1184) | struct PyTextEditorListener : juce::TextEditor::Listener
function ListBoxModel (line 1222) | struct PyListBoxModel : juce::ListBoxModel
function columnClicked (line 1348) | void columnClicked (int columnId, const juce::ModifierKeys& mods) override
function addMenuItems (line 1353) | void addMenuItems (juce::PopupMenu& menu, int columnIdClicked) override
function reactToMenuItem (line 1358) | void reactToMenuItem (int menuReturnId, int columnIdClicked) override
function showColumnChooserMenu (line 1363) | void showColumnChooserMenu (int columnIdClicked) override
function Listener (line 1369) | struct PyTableHeaderComponentListener : juce::TableHeaderComponent::List...
function TableListBoxModel (line 1396) | struct PyTableListBoxModel : juce::TableListBoxModel
FILE: modules/juce_python/bindings/ScriptJuceGuiEntryPointsBindings.cpp
type juce (line 38) | namespace juce {
type popsicle::Bindings (line 47) | namespace popsicle::Bindings {
function runApplication (line 59) | void runApplication (JUCEApplicationBase* application, int milliseconds)
function registerJuceGuiEntryPointsBindings (line 99) | void registerJuceGuiEntryPointsBindings (py::module_& m)
function BOOL (line 275) | BOOL APIENTRY DllMain(HANDLE instance, DWORD reason, LPVOID reserved)
FILE: modules/juce_python/bindings/ScriptJuceGuiEntryPointsBindings.h
function namespace (line 29) | namespace popsicle::Bindings {
FILE: modules/juce_python/bindings/ScriptJuceGuiExtraBindings.cpp
type popsicle::Bindings (line 22) | namespace popsicle::Bindings {
function registerJuceGuiExtraBindings (line 31) | void registerJuceGuiExtraBindings (py::module_& m)
FILE: modules/juce_python/bindings/ScriptJuceGuiExtraBindings.h
function namespace (line 29) | namespace popsicle::Bindings {
FILE: modules/juce_python/bindings/ScriptJuceOptionsBindings.cpp
type popsicle::Bindings (line 21) | namespace popsicle::Bindings {
function Options (line 25) | Options& globalOptions() noexcept
function registerJuceOptionsBindings (line 33) | void registerJuceOptionsBindings ([[maybe_unused]] pybind11::module_& m)
FILE: modules/juce_python/juce_python.h
function namespace (line 88) | namespace popsicle {
FILE: modules/juce_python/modules/ScriptPopsicleModule.cpp
function PYBIND11_EMBEDDED_MODULE (line 27) | PYBIND11_EMBEDDED_MODULE(__popsicle__, m)
FILE: modules/juce_python/pybind11/attr.h
function is_method (line 18) | PYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE)
type is_setter (line 30) | struct is_setter {}
type is_operator (line 33) | struct is_operator {}
type is_final (line 36) | struct is_final {}
type name (line 51) | struct name {
type op_type (line 171) | enum op_type : int
type undefined_t (line 172) | struct undefined_t
type function_record (line 191) | struct function_record {
type type_record (line 272) | struct type_record {
function function_call (line 366) | inline function_call::function_call(const function_record &f, handle p) ...
type is_new_style_constructor (line 372) | struct is_new_style_constructor {}
function init (line 386) | static void init(const T &, function_record *) {}
function init (line 387) | static void init(const T &, type_record *) {}
function precall (line 388) | static void precall(function_call &) {}
function postcall (line 389) | static void postcall(function_call &, handle) {}
function name (line 394) | struct process_attribute<name> : process_attribute_default<name> {
function doc (line 400) | struct process_attribute<doc> : process_attribute_default<doc> {
type process_attribute (line 406) | struct process_attribute
function init (line 407) | static void init(const char *d, function_record *r) { r->doc = const_cas...
function init (line 408) | static void init(const char *d, type_record *r) { r->doc = d; }
type process_attribute (line 411) | struct process_attribute
function return_value_policy (line 415) | struct process_attribute<return_value_policy> : process_attribute_defaul...
function sibling (line 422) | struct process_attribute<sibling> : process_attribute_default<sibling> {
function is_method (line 428) | struct process_attribute<is_method> : process_attribute_default<is_metho...
function is_setter (line 437) | struct process_attribute<is_setter> : process_attribute_default<is_sette...
function scope (line 443) | struct process_attribute<scope> : process_attribute_default<scope> {
function is_operator (line 449) | struct process_attribute<is_operator> : process_attribute_default<is_ope...
function is_new_style_constructor (line 454) | struct process_attribute<is_new_style_constructor>
function check_kw_only_arg (line 461) | inline void check_kw_only_arg(const arg &a, function_record *r) {
function append_self_arg_if_needed (line 468) | inline void append_self_arg_if_needed(function_record *r) {
function arg (line 476) | struct process_attribute<arg> : process_attribute_default<arg> {
function arg_v (line 487) | struct process_attribute<arg_v> : process_attribute_default<arg_v> {
function kw_only (line 528) | struct process_attribute<kw_only> : process_attribute_default<kw_only> {
function pos_only (line 541) | struct process_attribute<pos_only> : process_attribute_default<pos_only> {
function init (line 557) | static void init(const handle &h, type_record *r) { r->bases.append(h); }
function init (line 563) | static void init(const base<T> &, type_record *r) { r->add_base(typeid(T...
function multiple_inheritance (line 568) | struct process_attribute<multiple_inheritance> : process_attribute_defau...
function dynamic_attr (line 575) | struct process_attribute<dynamic_attr> : process_attribute_default<dynam...
function custom_type_setup (line 580) | struct process_attribute<custom_type_setup> {
function is_final (line 587) | struct process_attribute<is_final> : process_attribute_default<is_final> {
function buffer_protocol (line 592) | struct process_attribute<buffer_protocol> : process_attribute_default<bu...
function metaclass (line 597) | struct process_attribute<metaclass> : process_attribute_default<metaclas...
function module_local (line 602) | struct process_attribute<module_local> : process_attribute_default<modul...
function prepend (line 608) | struct process_attribute<prepend> : process_attribute_default<prepend> {
function arithmetic (line 614) | struct process_attribute<arithmetic> : process_attribute_default<arithme...
function init (line 644) | static void init(const Args &...args, function_record *r) {
function init (line 651) | static void init(const Args &...args, type_record *r) {
function precall (line 658) | static void precall(function_call &call) {
function postcall (line 664) | static void postcall(function_call &call, handle fn_ret) {
FILE: modules/juce_python/pybind11/buffer_info.h
function PYBIND11_NAMESPACE_BEGIN (line 14) | PYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE)
function std (line 31) | inline std::vector<ssize_t> f_strides(const std::vector<ssize_t> &shape,...
function Py_buffer (line 153) | Py_buffer *view() const { return m_view; }
type private_ctr_tag (line 168) | struct private_ctr_tag {}
type compare_buffer_info (line 188) | struct compare_buffer_info {
function compare (line 197) | static bool compare(const buffer_info &b) {
FILE: modules/juce_python/pybind11/cast.h
function handle (line 71) | static handle
function index_check (line 140) | auto index_check = [](PyObject *o) { return PyIndex_Check(o); }
function index_check (line 144) | auto index_check = [](PyObject *o) { return hasattr(o, "__index__"); }
function load (line 268) | bool load(handle h, bool) {
function handle (line 294) | static handle cast(const void *ptr, return_value_policy /* policy */, ha...
function else (line 337) | else if (hasattr(src, PYBIND11_BOOL_ATTR)) {
function handle (line 357) | static handle cast(bool src, return_value_policy /* policy */, handle /*...
function load (line 385) | bool load(handle src, bool) {
function handle (line 437) | static handle
function handle (line 542) | static handle cast(const CharT *src, return_value_policy policy, handle ...
function handle (line 549) | static handle cast(CharT src, return_value_policy policy, handle parent) {
function handle (line 651) | handle cast(T *src, return_value_policy policy, handle parent) {
function load (line 753) | bool load(handle src, bool convert) {
function handle (line 830) | static handle cast(holder_type &&src, return_value_policy, handle) {
function bool_ (line 877) | struct handle_type_name<bool_> {
function bytes (line 881) | struct handle_type_name<bytes> {
function int_ (line 885) | struct handle_type_name<int_> {
function iterable (line 889) | struct handle_type_name<iterable> {
function iterator (line 893) | struct handle_type_name<iterator> {
function float_ (line 897) | struct handle_type_name<float_> {
function none (line 901) | struct handle_type_name<none> {
function args (line 905) | struct handle_type_name<args> {
function kwargs (line 909) | struct handle_type_name<kwargs> {
function handle (line 938) | static handle cast(const handle &src, return_value_policy /* policy */, ...
function return_value_policy (line 999) | static return_value_policy policy(return_value_policy p) { return p; }
function return_value_policy (line 1006) | static return_value_policy policy(return_value_policy p) {
function cast (line 1181) | inline void object::cast() && {
type override_unused (line 1195) | struct override_unused {}
function cast_error (line 1240) | inline cast_error cast_error_unable_to_convert_call_arg(const std::strin...
type arg (line 1277) | struct arg {
function namespace (line 1376) | inline namespace literals {
type function_record (line 1391) | struct function_record
type function_call (line 1394) | struct function_call {
function load_args (line 1443) | bool load_args(function_call &call) { return load_impl_sequence(call, in...
function tuple (line 1498) | tuple args() && { return std::move(m_args); }
function object (line 1501) | object call(PyObject *ptr) const {
function tuple (line 1531) | tuple args() && { return std::move(m_args); }
function dict (line 1532) | dict kwargs() && { return std::move(m_kwargs); }
function object (line 1535) | object call(PyObject *ptr) const {
function process (line 1559) | void process(list &args_list, detail::args_proxy ap) {
function process (line 1565) | void process(list & /*args_list*/, arg_v a) {
function process (line 1590) | void process(list & /*args_list*/, detail::kwargs_proxy kp) {
function nameless_argument_error (line 1606) | [[noreturn]] static void nameless_argument_error() {
function nameless_argument_error (line 1612) | [[noreturn]] static void nameless_argument_error(const std::string &type) {
function multiple_values_error (line 1617) | [[noreturn]] static void multiple_values_error() {
function multiple_values_error (line 1623) | [[noreturn]] static void multiple_values_error(const std::string &name) {
function args_are_all_positional (line 1637) | bool args_are_all_positional() {
FILE: modules/juce_python/pybind11/chrono.h
function PYBIND11_NAMESPACE_BEGIN (line 21) | PYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE)
function handle (line 74) | static handle cast(const type &src, return_value_policy /* policy */, ha...
function std (line 102) | inline std::tm *localtime_thread_safe(const std::time_t *time, std::tm *...
function load (line 123) | bool load(handle src, bool) {
function handle (line 173) | static handle cast(const std::chrono::time_point<std::chrono::system_clo...
FILE: modules/juce_python/pybind11/complex.h
function std (line 27) | static std::string format() { return std::string(value); }
function handle (line 66) | static handle
FILE: modules/juce_python/pybind11/detail/class.h
function std (line 28) | inline std::string get_fully_qualified_tp_name(PyTypeObject *type) {
function PyTypeObject (line 40) | inline PyTypeObject *type_incref(PyTypeObject *type) {
function PyObject (line 48) | inline PyObject *pybind11_static_get(PyObject *self, PyObject * /*ob*/, ...
function pybind11_static_set (line 53) | inline int pybind11_static_set(PyObject *self, PyObject *obj, PyObject *...
function PyTypeObject (line 64) | inline PyTypeObject *make_static_property_type() {
function PyTypeObject (line 111) | inline PyTypeObject *make_static_property_type() {
function pybind11_meta_setattro (line 137) | inline int pybind11_meta_setattro(PyObject *obj, PyObject *name, PyObjec...
function PyObject (line 174) | inline PyObject *pybind11_meta_getattro(PyObject *obj, PyObject *name) {
function PyObject (line 184) | inline PyObject *pybind11_meta_call(PyObject *type, PyObject *args, PyOb...
function PyTypeObject (line 251) | inline PyTypeObject *make_default_metaclass() {
function PyObject (line 368) | inline PyObject *pybind11_object_new(PyTypeObject *type, PyObject *, PyO...
function pybind11_object_init (line 375) | inline int pybind11_object_init(PyObject *self, PyObject *, PyObject *) {
function add_patient (line 382) | inline void add_patient(PyObject *nurse, PyObject *patient) {
function clear_patients (line 390) | inline void clear_patients(PyObject *self) {
function clear_instance (line 408) | inline void clear_instance(PyObject *self) {
function pybind11_object_dealloc (line 447) | inline void pybind11_object_dealloc(PyObject *self) {
function PyObject (line 481) | inline PyObject *make_object_base_type(PyTypeObject *metaclass) {
function pybind11_traverse (line 524) | inline int pybind11_traverse(PyObject *self, visitproc visit, void *arg) {
function pybind11_clear (line 535) | inline int pybind11_clear(PyObject *self) {
function enable_dynamic_attributes (line 542) | inline void enable_dynamic_attributes(PyHeapTypeObject *heap_type) {
function pybind11_getbuffer (line 569) | inline int pybind11_getbuffer(PyObject *obj, Py_buffer *view, int flags) {
function pybind11_releasebuffer (line 616) | inline void pybind11_releasebuffer(PyObject *, Py_buffer *view) {
function enable_buffer_protocol (line 621) | inline void enable_buffer_protocol(PyHeapTypeObject *heap_type) {
function PyObject (line 630) | inline PyObject *make_new_python_type(const type_record &rec) {
FILE: modules/juce_python/pybind11/detail/common.h
function return_value_policy (line 485) | enum class return_value_policy : uint8_t {
function size_in_ptrs (line 543) | inline static constexpr size_t size_in_ptrs(size_t s) {
function instance_simple_holder_in_ptrs (line 553) | constexpr size_t instance_simple_holder_in_ptrs() {
type type_info (line 560) | struct type_info
type value_and_holder (line 561) | struct value_and_holder
type nonsimple_values_and_holders (line 563) | struct nonsimple_values_and_holders {
type instance (line 569) | struct instance {
type select_indices_impl (line 688) | struct select_indices_impl
type void_type (line 801) | struct void_type {}
function constexpr_sum (line 810) | size_t constexpr_sum(Ts... ns) {
function constexpr_sum (line 814) | constexpr size_t constexpr_sum() { return 0; }
function constexpr_sum (line 816) | size_t constexpr_sum(T n, Ts... ns) {
function first (line 821) | PYBIND11_NAMESPACE_BEGIN(constexpr_impl)
function last (line 829) | constexpr int last(int /*i*/, int result) { return result; }
function PYBIND11_EXPORT_EXCEPTION (line 985) | PYBIND11_EXPORT_EXCEPTION builtin_exception : public std::runtime_error {
function pybind11_fail (line 1013) | void pybind11_fail(const char *reason) {
function PYBIND11_NOINLINE (line 1017) | [[noreturn]] PYBIND11_NOINLINE void pybind11_fail(const std::string &rea...
function std (line 1064) | static std::string format() { return std::string(1, c); }
type error_scope (line 1076) | struct error_scope {
type nodelete (line 1085) | struct nodelete {
function detail (line 1119) | constexpr detail::overload_cast_impl<Args...> overload_cast{}
function const_ (line 1125) | static constexpr auto const_ = std::true_type{}
function operator (line 1171) | operator std::vector<T> &&() && { return std::move(v); }
FILE: modules/juce_python/pybind11/detail/descr.h
function descr (line 63) | constexpr descr<0> const_name(char const (&)[1]) { return {}; }
FILE: modules/juce_python/pybind11/detail/init.h
function PYBIND11_WARNING_DISABLE_MSVC (line 14) | PYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE)
FILE: modules/juce_python/pybind11/detail/internals.h
function tls_replace_value (line 106) | inline void tls_replace_value(PYBIND11_TLS_KEY_REF key, void *value) {
function same_type (line 128) | inline bool same_type(const std::type_info &lhs, const std::type_info &r...
function same_type (line 132) | inline bool same_type(const std::type_info &lhs, const std::type_info &r...
type type_hash (line 136) | struct type_hash {
type type_equal_to (line 147) | struct type_equal_to {
type override_hash (line 157) | struct override_hash {
type internals (line 168) | struct internals {
type type_info (line 226) | struct type_info {
function internals (line 322) | inline internals **&get_internals_pp() {
function raise_err (line 350) | inline bool raise_err(PyObject *exc_type, const char *msg) {
function translate_exception (line 359) | inline void translate_exception(std::exception_ptr p) {
function translate_local_exception (line 419) | inline void translate_local_exception(std::exception_ptr p) {
function object (line 434) | inline object get_python_state_dict() {
function object (line 454) | inline object get_internals_obj_from_state_dict(handle state_dict) {
function internals (line 458) | inline internals **get_internals_pp_from_capsule(handle obj) {
function PYBIND11_NOINLINE (line 467) | PYBIND11_NOINLINE internals &get_internals() {
function local_internals (line 584) | inline local_internals &get_local_internals() {
function is_function_record_capsule (line 619) | inline bool is_function_record_capsule(const capsule &cap) {
function PYBIND11_NOINLINE (line 636) | PYBIND11_NOINLINE void *set_shared_data(const std::string &name, void *d...
FILE: modules/juce_python/pybind11/detail/type_caster_base.h
function PYBIND11_NAMESPACE_BEGIN (line 29) | PYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE)
function PYBIND11_NOINLINE (line 81) | PYBIND11_NOINLINE static void add_patient(handle h) {
function PYBIND11_NOINLINE (line 106) | PYBIND11_NOINLINE void all_type_info_populate(PyTypeObject *t, std::vect...
function explicit (line 269) | explicit value_and_holder(size_t index) : index{index}
type values_and_holders (line 315) | struct values_and_holders {
function PYBIND11_NOINLINE (line 465) | PYBIND11_NOINLINE bool isinstance_generic(handle obj, const std::type_in...
function PYBIND11_NOINLINE (line 473) | PYBIND11_NOINLINE handle get_object_handle(const void *ptr, const detail...
type recursive_bottom (line 881) | struct recursive_bottom {}
function type_caster_base (line 1069) | type_caster_base(typeid(type)) {}
function explicit (line 1070) | explicit type_caster_base(const std::type_info &info) : type_caster_gene...
function handle (line 1072) | static handle cast(const itype &src, return_value_policy policy, handle ...
function handle (line 1080) | static handle cast(itype &&src, return_value_policy, handle parent) {
function std (line 1087) | static std::pair<const void *, const type_info *> src_and_type(const ity...
function handle (line 1109) | static handle cast(const itype *src, return_value_policy policy, handle ...
function handle (line 1119) | static handle cast_holder(const itype *src, const void *holder) {
function operator (line 1134) | operator itype *() { return (type *) value; }
FILE: modules/juce_python/pybind11/detail/typeid.h
function PYBIND11_NAMESPACE_BEGIN (line 21) | PYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE)
function std (line 51) | inline std::string clean_type_id(const char *typeid_name) {
function type_id (line 57) | PYBIND11_NAMESPACE_END(detail)
FILE: modules/juce_python/pybind11/eigen/matrix.h
function EigenDStride (line 86) | EigenDStride stride{0, 0}; // Only valid if negativestrides is false!
type eigen_extract_stride (line 131) | struct eigen_extract_stride
type eigen_extract_stride (line 135) | struct eigen_extract_stride
function EigenConformable (line 172) | static EigenConformable<row_major> conformable(const array &a) {
function capsule (line 282) | capsule base(src, [](void *o) { delete static_cast<Type *>(o); }
function load (line 295) | bool load(handle src, bool convert) {
function handle (line 340) | handle cast_impl(CType *src, return_value_policy policy, handle parent) {
function handle (line 365) | static handle cast(const Type &&src, return_value_policy /* policy */, h...
function handle (line 369) | static handle cast(Type &src, return_value_policy policy, handle parent) {
function handle (line 377) | static handle cast(const Type &src, return_value_policy policy, handle p...
function handle (line 385) | static handle cast(Type *src, return_value_policy policy, handle parent) {
function handle (line 389) | static handle cast(const Type *src, return_value_policy policy, handle p...
function operator (line 396) | operator Type *() { return &value; }
function operator (line 547) | operator Type *() { return ref.get(); }
function handle (line 628) | static handle cast(const Type *src, return_value_policy policy, handle p...
function load (line 652) | bool load(handle src, bool) {
function handle (line 691) | static handle cast(const Type &src, return_value_policy /* policy */, ha...
FILE: modules/juce_python/pybind11/eigen/tensor.h
function PYBIND11_WARNING_DISABLE_MSVC (line 32) | PYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE)
type eigen_tensor_helper (line 55) | struct eigen_tensor_helper
function is_correct_shape (line 63) | static constexpr bool
function free (line 84) | static void free(Type *tensor) { delete tensor; }
type eigen_tensor_helper (line 88) | struct eigen_tensor_helper
function load (line 174) | bool load(handle src, bool convert) {
function handle (line 217) | static handle cast(Type &&src, return_value_policy policy, handle parent) {
function handle (line 225) | static handle cast(const Type &&src, return_value_policy policy, handle ...
function handle (line 233) | static handle cast(Type &src, return_value_policy policy, handle parent) {
function handle (line 241) | static handle cast(const Type &src, return_value_policy policy, handle p...
function handle (line 249) | static handle cast(Type *src, return_value_policy policy, handle parent) {
function handle (line 258) | static handle cast(const Type *src, return_value_policy policy, handle p...
function handle (line 268) | handle cast_impl(C *src, return_value_policy policy, handle parent) {
function load (line 370) | bool load(handle src, bool /*convert*/) {
function handle (line 412) | static handle cast(MapType &&src, return_value_policy policy, handle par...
function handle (line 416) | static handle cast(const MapType &&src, return_value_policy policy, hand...
function handle (line 420) | static handle cast(MapType &src, return_value_policy policy, handle pare...
function handle (line 428) | static handle cast(const MapType &src, return_value_policy policy, handl...
function handle (line 436) | static handle cast(MapType *src, return_value_policy policy, handle pare...
function handle (line 445) | static handle cast(const MapType *src, return_value_policy policy, handl...
FILE: modules/juce_python/pybind11/embed.h
function PYBIND11_NAMESPACE_BEGIN (line 59) | PYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE)
type wide_char_arg_deleter (line 77) | struct wide_char_arg_deleter {
function wchar_t (line 84) | inline wchar_t *widen_chars(const char *safe_arg) {
function precheck_interpreter (line 89) | inline void precheck_interpreter() {
function initialize_interpreter_pre_pyconfig (line 100) | inline void initialize_interpreter_pre_pyconfig(bool init_signal_handlers,
function finalize_interpreter (line 245) | inline void finalize_interpreter() {
function class (line 283) | class scoped_interpreter {
FILE: modules/juce_python/pybind11/eval.h
function PYBIND11_NAMESPACE_BEGIN (line 18) | PYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE)
function exec (line 88) | inline void exec(const str &expr, object global = globals(), object loca...
FILE: modules/juce_python/pybind11/functional.h
function PYBIND11_NAMESPACE_BEGIN (line 16) | PYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE)
FILE: modules/juce_python/pybind11/gil.h
function PYBIND11_NAMESPACE_BEGIN (line 18) | PYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE)
function inc_ref (line 91) | void inc_ref() { ++tstate->gilstate_counter; }
function PYBIND11_NOINLINE (line 93) | PYBIND11_NOINLINE void dec_ref() {
function PYBIND11_NOINLINE (line 123) | PYBIND11_NOINLINE void disarm() { active = false; }
function PYBIND11_NOINLINE (line 125) | PYBIND11_NOINLINE ~gil_scoped_acquire() {
function class (line 138) | class gil_scoped_release {
function PYBIND11_NOINLINE (line 163) | PYBIND11_NOINLINE void disarm() { active = false; }
function class (line 189) | class gil_scoped_acquire {
function class (line 200) | class gil_scoped_release {
function class (line 215) | class gil_scoped_acquire {
function class (line 226) | class gil_scoped_release {
FILE: modules/juce_python/pybind11/iostream.h
function PYBIND11_NAMESPACE_BEGIN (line 34) | PYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE)
function utf8_remainder (line 58) | size_t utf8_remainder() const {
function is_leading (line 62) | auto is_leading = [](char c) { return (static_cast<unsigned char>(c) & 0...
function is_leading_2b (line 63) | auto is_leading_2b = [](char c) { return static_cast<unsigned char>(c) <...
function is_leading_3b (line 64) | auto is_leading_3b = [](char c) { return static_cast<unsigned char>(c) <...
function _sync (line 94) | int _sync() {
function sync (line 117) | int sync() override { return _sync(); }
function class (line 192) | class scoped_estream_redirect : public scoped_ostream_redirect {
function OstreamRedirect (line 200) | PYBIND11_NAMESPACE_BEGIN(detail)
function exit (line 222) | void exit() {
FILE: modules/juce_python/pybind11/numpy.h
function PYBIND11_WARNING_DISABLE_MSVC (line 37) | PYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE)
type PyArrayDescr_Proxy (line 53) | struct PyArrayDescr_Proxy {
type PyArray_Proxy (line 68) | struct PyArray_Proxy {
type PyVoidScalarObject_Proxy (line 79) | struct PyVoidScalarObject_Proxy {
type numpy_type_info (line 86) | struct numpy_type_info {
function if (line 91) | struct numpy_internals {
function numpy_internals (line 115) | inline numpy_internals &get_numpy_internals() {
function PyArray_Check_ (line 140) | struct npy_api {
function PyArrayDescr_Check_ (line 202) | bool PyArrayDescr_Check_(PyObject *obj) const {
type functions (line 243) | enum functions {
function npy_api (line 265) | static npy_api lookup() {
function PyArray_Proxy (line 299) | inline PyArray_Proxy *array_proxy(void *ptr) { return reinterpret_cast<P...
function PyArray_Proxy (line 301) | inline const PyArray_Proxy *array_proxy(const void *ptr) {
function PyArrayDescr_Proxy (line 305) | inline PyArrayDescr_Proxy *array_descriptor_proxy(PyObject *ptr) {
function PyArrayDescr_Proxy (line 309) | inline const PyArrayDescr_Proxy *array_descriptor_proxy(const PyObject *...
function check_flags (line 313) | inline bool check_flags(const void *ptr, int flag) {
function append_extents (line 332) | static void append_extents(list & /* shape */) {}
function append_extents (line 347) | static void append_extents(list &shape) {
function itemsize (line 467) | constexpr static ssize_t itemsize() { return sizeof(T); }
function shape (line 470) | ssize_t shape(ssize_t dim) const { return shape_[(size_t) dim]; }
function explicit (line 544) | explicit dtype(const buffer_info &info) {
function explicit (line 552) | explicit dtype(const pybind11::str &format) : dtype(from_args(format)) {}
function explicit (line 554) | explicit dtype(const std::string &format) : dtype(pybind11::str(format)) {}
function explicit (line 556) | explicit dtype(const char *format) : dtype(pybind11::str(format)) {}
function explicit (line 569) | explicit dtype(int typenum)
function dtype (line 577) | static dtype from_args(const object &args) {
function dtype (line 587) | dtype of() {
function itemsize (line 592) | ssize_t itemsize() const { return detail::array_descriptor_proxy(m_ptr)-...
function explicit (line 777) | explicit array(const buffer_info &info, handle base = handle())
function size (line 786) | ssize_t size() const {
function ndim (line 799) | ssize_t ndim() const { return detail::array_proxy(m_ptr)->nd; }
function strides (line 819) | ssize_t strides(ssize_t dim) const {
function flags (line 827) | int flags() const { return detail::array_proxy(m_ptr)->flags; }
function array (line 909) | array squeeze() {
function array (line 934) | array reshape(ShapeContainer new_shape) {
function array (line 950) | array view(const std::string &dtype) {
type detail (line 972) | struct detail
function fail_dim_check (line 974) | void fail_dim_check(ssize_t dim, const std::string &msg) const {
function check_dimensions_impl (line 996) | void check_dimensions_impl(ssize_t, const ssize_t *) const {}
type private_ctor (line 1022) | struct private_ctor {}
function explicit (line 1057) | explicit array_t(const buffer_info &info, handle base = handle()) : arra...
function array_t (line 1138) | static array_t ensure(handle h) {
function check_ (line 1146) | static bool check_(handle h) {
function std (line 1173) | static std::string format() {
function string (line 1180) | string format() { return std::to_string(N) + 's'; }
function string (line 1184) | string format() { return std::to_string(N) + 's'; }
function std (line 1189) | static std::string format() {
function std (line 1197) | static std::string format() {
function load (line 1209) | bool load(handle src, bool convert) {
function handle (line 1217) | static handle cast(const handle &src, return_value_policy /* policy */, ...
function compare (line 1225) | static bool compare(const buffer_info &b) {
function pybind11 (line 1288) | static pybind11::dtype dtype() { return pybind11::dtype(/*typenum*/ valu...
function pybind11 (line 1297) | static pybind11::dtype dtype() { return pybind11::dtype(/*typenum*/ valu...
function pybind11 (line 1325) | static pybind11::dtype dtype() {
function pybind11 (line 1340) | static pybind11::dtype dtype() { return base_descr::dtype(); }
type field_descriptor (line 1343) | struct field_descriptor {
function pybind11 (line 1431) | static pybind11::dtype dtype() { return reinterpret_borrow<pybind11::dty...
function std (line 1433) | static std::string format() {
function register_dtype (line 1438) | static void register_dtype(any_container<field_descriptor> fields) {
function direct_converter (line 1451) | static bool direct_converter(PyObject *obj, void *&value) {
function class (line 1544) | class common_iterator {
function init_common_iterator (line 1610) | void init_common_iterator(const buffer_info &buffer,
function increment_common_iterator (line 1636) | void increment_common_iterator(size_t dim) {
function broadcast_trivial (line 1647) | enum class broadcast_trivial { non_trivial, c_trivial, f_trivial };
function Type (line 1764) | static Type create(broadcast_trivial trivial, const std::vector<ssize_t>...
function Return (line 1771) | static Return *mutable_data(Type &array) { return array.mutable_data(); }
function Return (line 1773) | static Return call(Func &f, Args &...args) { return f(args...); }
function call (line 1775) | static void call(Return *out, size_t i, Func &f, Args &...args) { out[i]...
function Type (line 1783) | static Type create(broadcast_trivial, const std::vector<ssize_t> &) { re...
function detail (line 1787) | static detail::void_type call(Func &f, Args &...args) {
function call (line 1792) | static void call(void *, size_t, Func &f, Args &...args) { f(args...); }
function object (line 1818) | object operator()(typename vectorize_arg<Args>::type... args) {
FILE: modules/juce_python/pybind11/operators.h
function PYBIND11_NAMESPACE_BEGIN (line 14) | PYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE)
type op_impl (line 82) | struct op_impl {}
FILE: modules/juce_python/pybind11/options.h
function options (line 14) | PYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE)
function show_user_defined_docstrings (line 62) | static bool show_user_defined_docstrings() {
function show_function_signatures (line 66) | static bool show_function_signatures() { return global_state().show_func...
function show_enum_members_docstring (line 68) | static bool show_enum_members_docstring() {
type state (line 76) | struct state {
function state (line 84) | static state &global_state() {
FILE: modules/juce_python/pybind11/pybind11.h
function apply_exception_translators (line 53) | PYBIND11_NAMESPACE_BEGIN(detail)
type InitializingFunctionRecordDeleter (line 154) | struct InitializingFunctionRecordDeleter {
function PYBIND11_NOINLINE (line 163) | PYBIND11_NOINLINE unique_function_record make_function_record() {
type capture (line 171) | struct capture {
function class (line 319) | class strdup_guard {
function release (line 335) | void release() { strings.clear(); }
function initialize_generic (line 342) | void initialize_generic(unique_function_record &&unique_rec,
function capsule (line 510) | capsule rec_capsule(unique_rec.release(),
function loader_life_support (line 945) | loader_life_support guard{}
function append_note_if_missing_header_is_suspected (line 1031) | auto append_note_if_missing_header_is_suspected = [](std::string &msg) {
function module_ (line 1211) | static module_ import(const char *name) {
function reload (line 1220) | void reload() {
function module_ (line 1252) | static module_ create_extension_module(const char *name, const char *doc...
function dict (line 1287) | inline dict globals() {
function object (line 1295) | object make_simple_namespace(Args &&...args_) {
function mark_parents_nonsimple (line 1365) | void mark_parents_nonsimple(PyTypeObject *value) {
function add_base (line 1564) | void add_base(detail::type_record &rec) {
function add_base (line 1571) | void add_base(detail::type_record &) {}
type capture (line 1638) | struct capture {
function cpp_function (line 1673) | cpp_function fget([pm](const type &c) -> const D & { return c.*pm; }
function cpp_function (line 1683) | cpp_function fget([pm](const type &c) -> const D & { return c.*pm; }
function cpp_function (line 1690) | cpp_function fget([pm](const object &) -> const D & { return *pm; }
function cpp_function (line 1698) | cpp_function fget([pm](const object &) -> const D & { return *pm; }
function init_holder (line 1810) | void init_holder(detail::instance *inst,
function init_holder_from_existing (line 1828) | static void init_holder_from_existing(const detail::value_and_holder &v_h,
function init_holder_from_existing (line 1835) | static void init_holder_from_existing(const detail::value_and_holder &v_h,
function init_holder (line 1844) | static void init_holder(detail::instance *inst,
function init_instance (line 1861) | static void init_instance(detail::instance *inst, const void *holder_ptr) {
function dealloc (line 1871) | static void dealloc(detail::value_and_holder &v_h) {
function detail (line 1889) | static detail::function_record *get_function_record(handle h) {
function enum_name (line 1943) | PYBIND11_NAMESPACE_BEGIN(detail)
function PYBIND11_NOINLINE (line 2116) | PYBIND11_NOINLINE void export_values() {
type equivalent_integer (line 2130) | struct equivalent_integer
type equivalent_integer (line 2134) | struct equivalent_integer
type equivalent_integer (line 2138) | struct equivalent_integer
type equivalent_integer (line 2142) | struct equivalent_integer
type equivalent_integer (line 2146) | struct equivalent_integer
type equivalent_integer (line 2150) | struct equivalent_integer
type equivalent_integer (line 2154) | struct equivalent_integer
type equivalent_integer (line 2158) | struct equivalent_integer
function keep_alive_impl (line 2224) | void keep_alive_impl(handle nurse, handle patient) {
function PYBIND11_NOINLINE (line 2254) | PYBIND11_NOINLINE void
function std (line 2272) | inline std::pair<decltype(internals::registered_types_py)::iterator, bool>
function result_type (line 2328) | result_type operator()(Iterator &it) const { return *it; }
function result_type (line 2350) | result_type operator()(Iterator &it) const { return (*it).first; }
function result_type (line 2363) | result_type operator()(Iterator &it) const { return (*it).second; }
function set_flag (line 2482) | struct set_flag {
function register_exception_translator (line 2512) | inline void register_exception_translator(ExceptionTranslator &&translat...
function register_local_exception_translator (line 2523) | inline void register_local_exception_translator(ExceptionTranslator &&tr...
function get_exception_object (line 2555) | PYBIND11_NAMESPACE_BEGIN(detail)
function register_exception (line 2590) | PYBIND11_NAMESPACE_END(detail)
function print (line 2619) | void print(const tuple &args, const dict &kwargs) {
function m_fetched_error_deleter (line 2658) | inline void
function get_type_override (line 2671) | PYBIND11_NAMESPACE_BEGIN(detail)
function get_override (line 2762) | PYBIND11_NAMESPACE_END(detail)
function function (line 2868) | inline function
FILE: modules/juce_python/pybind11/pytypes.h
function PYBIND11_WARNING_DISABLE_MSVC (line 34) | PYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE)
function class (line 70) | class pyobject_tag {}
function m_ptr (line 227) | m_ptr(ptr) {}
function m_ptr (line 238) | m_ptr(obj) {}
function PyObject (line 241) | PyObject *ptr() const { return m_ptr; }
function throw_gilstate_error (line 301) | void throw_gilstate_error(const std::string &function_name) const {
function inc_ref_counter (line 326) | static std::size_t inc_ref_counter(std::size_t add) {
function class (line 347) | class object : public handle {
function restore (line 688) | void restore() {
function matches (line 698) | bool matches(handle exc) const {
function std (line 712) | inline std::string error_string() {
function PYBIND11_EXPORT_EXCEPTION (line 722) | PYBIND11_EXPORT_EXCEPTION error_already_set : public std::exception {
function raise_from (line 780) | inline void raise_from(PyObject *type, const char *message) {
function raise_from (line 809) | inline void raise_from(error_already_set &err, PyObject *type, const cha...
function isinstance (line 837) | inline bool isinstance<object>(handle obj) {
function isinstance (line 843) | inline bool isinstance(handle obj, handle type) {
function hasattr (line 853) | inline bool hasattr(handle obj, handle name) {
function hasattr (line 857) | inline bool hasattr(handle obj, const char *name) {
function delattr (line 861) | inline void delattr(handle obj, handle name) {
function delattr (line 867) | inline void delattr(handle obj, const char *name) {
function object (line 873) | inline object getattr(handle obj, handle name) {
function object (line 881) | inline object getattr(handle obj, const char *name) {
function object (line 889) | inline object getattr(handle obj, handle name, handle default_) {
function object (line 897) | inline object getattr(handle obj, const char *name, handle default_) {
function setattr (line 905) | inline void setattr(handle obj, handle name, handle value) {
function setattr (line 911) | inline void setattr(handle obj, const char *name, handle value) {
function hash (line 917) | inline ssize_t hash(handle obj) {
function get_function (line 927) | PYBIND11_NAMESPACE_BEGIN(detail)
function PyObject (line 943) | inline PyObject *dict_getitemstring(PyObject *v, const char *key) {
function PyObject (line 958) | inline PyObject *dict_getitem(PyObject *v, PyObject *key) {
function handle (line 977) | inline handle object_or_cast(PyObject *ptr) { return ptr; }
function PYBIND11_WARNING_PUSH (line 979) | PYBIND11_WARNING_PUSH
function PyObject (line 1022) | PyObject *ptr() const { return get_cache().ptr(); }
function object (line 1030) | static object ensure_object(handle h) { return reinterpret_borrow<object...
function PYBIND11_WARNING_POP (line 1044) | PYBIND11_WARNING_POP
function set (line 1053) | struct str_attr {
type generic_item (line 1059) | struct generic_item {
function set (line 1070) | static void set(handle obj, handle key, handle val) {
type sequence_item (line 1077) | struct sequence_item {
type list_item (line 1098) | struct list_item {
type tuple_item (line 1119) | struct tuple_item {
function reference (line 1159) | reference operator[](difference_type n) const { return *(*this + n); }
function pointer (line 1160) | pointer operator->() const { return **this; }
function arrow_proxy (line 1208) | PYBIND11_NAMESPACE_BEGIN(iterator_policies)
function class (line 1220) | class sequence_fast_readonly {
function increment (line 1231) | void increment() { ++ptr; }
function decrement (line 1232) | void decrement() { --ptr; }
function advance (line 1233) | void advance(ssize_t n) { ptr += n; }
function equal (line 1234) | bool equal(const sequence_fast_readonly &b) const { return ptr == b.ptr; }
function distance_to (line 1235) | ssize_t distance_to(const sequence_fast_readonly &b) const { return ptr ...
function class (line 1242) | class sequence_slow_readwrite {
function increment (line 1252) | void increment() { ++index; }
function decrement (line 1253) | void decrement() { --index; }
function advance (line 1254) | void advance(ssize_t n) { index += n; }
function equal (line 1255) | bool equal(const sequence_slow_readwrite &b) const { return index == b.i...
function distance_to (line 1256) | ssize_t distance_to(const sequence_slow_readwrite &b) const { return ind...
function class (line 1264) | class dict_readonly {
function increment (line 1276) | void increment() {
function equal (line 1281) | bool equal(const dict_readonly &b) const { return pos == b.pos; }
function PyIterable_Check (line 1301) | inline bool PyIterable_Check(PyObject *obj) {
function PyNone_Check (line 1311) | inline bool PyNone_Check(PyObject *o) { return o == Py_None; }
function PyEllipsis_Check (line 1312) | inline bool PyEllipsis_Check(PyObject *o) { return o == Py_Ellipsis; }
function PyUnicode_Check_Permissive (line 1315) | inline bool PyUnicode_Check_Permissive(PyObject *o) {
function PyStaticMethod_Check (line 1323) | inline bool PyStaticMethod_Check(PyObject *o) { return o->ob_type == &Py...
function class (line 1325) | class kwargs_proxy : public handle {
function class (line 1330) | class args_proxy : public handle {
function Parent (line 1377) | Name(const object &o) ...
function Parent (line 1401) | Name(const object &o) : Parent(o) { ...
function class (line 1426) | class iterator : public object {
function reference (line 1448) | reference operator*() const {
function pointer (line 1456) | pointer operator->() const {
function iterator (line 1474) | static iterator sentinel() { return {}; }
function class (line 1491) | class type : public object {
function class (line 1517) | class iterable : public object {
function namespace (line 1611) | inline namespace literals {
function bytes (line 1676) | inline bytes::bytes(const pybind11::str &s) {
function str (line 1696) | inline str::str(const bytes &b) {
function class (line 1714) | class bytearray : public object {
function class (line 1744) | class none : public object {
function class (line 1750) | class ellipsis : public object {
function class (line 1756) | class bool_ : public object {
function as_unsigned (line 1777) | PYBIND11_NAMESPACE_BEGIN(detail)
function class (line 1828) | class float_ : public object {
function class (line 1850) | class weakref : public object {
function class (line 1867) | class slice : public object {
function compute (line 1895) | bool compute(
function object (line 1904) | object index_to_object(T index) {
function class (line 1909) | class capsule : public object {
function explicit (line 1942) | explicit capsule(void (*destructor)()) {
function set_pointer (line 1974) | void set_pointer(const void *value) {
function set_name (line 1989) | void set_name(const char *new_name) {
function initialize_with_void_ptr_destructor (line 2008) | void initialize_with_void_ptr_destructor(const void *value,
function class (line 2035) | class tuple : public object {
function args_are_all_keyword_or_ds (line 2061) | bool args_are_all_keyword_or_ds() {
function class (line 2065) | class dict : public object {
function clear (line 2084) | void clear() /* py-non-const */ { PyDict_Clear(ptr()); }
function class (line 2104) | class sequence : public object {
function item_accessor (line 2117) | item_accessor operator[](T &&o) const {
function class (line 2124) | class list : public object {
function class (line 2163) | class args : public tuple {
function memoryview (line 2348) | static memoryview from_memory(const void *mem, ssize_t size) {
function memoryview (line 2353) | static memoryview from_memory(std::string_view mem) {
function memoryview (line 2360) | inline memoryview memoryview::from_buffer(void *ptr,
function len (line 2399) | inline size_t len(handle h) {
function len_hint (line 2409) | inline size_t len_hint(handle h) {
function str (line 2420) | inline str repr(handle h) {
function iterator (line 2428) | inline iterator iter(handle obj) {
FILE: modules/juce_python/pybind11/stl.h
function PYBIND11_NAMESPACE_BEGIN (line 35) | PYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE)
function reserve_maybe (line 116) | void reserve_maybe(const dict &, void *) {}
function load (line 168) | bool load(handle src, bool convert) {
function reserve_maybe (line 190) | void reserve_maybe(const sequence &, void *) {}
function load (line 323) | bool load(handle src, bool convert) {
type type_caster (line 356) | struct type_caster
type variant_caster_visitor (line 361) | struct variant_caster_visitor {
type type_caster (line 433) | struct type_caster
FILE: modules/juce_python/pybind11/stl/filesystem.h
function PyObject (line 51) | static PyObject *unicode_from_fs_native(const std::wstring &w) {
function load (line 65) | bool load(handle handle, bool) {
type type_caster (line 108) | struct type_caster
type type_caster (line 111) | struct type_caster
FILE: modules/juce_python/pybind11/stl_bind.h
function PYBIND11_NAMESPACE_BEGIN (line 21) | PYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE)
function explicit (line 673) | explicit KeysViewImpl(Map &map) : map(map) {}
function len (line 674) | size_t len() override { return map.size(); }
function iterator (line 675) | iterator iter() override { return make_key_iterator(map.begin(), map.end...
function contains (line 676) | bool contains(const typename Map::key_type &k) override { return map.fin...
function contains (line 677) | bool contains(const object &) override { return false; }
function explicit (line 683) | explicit ValuesViewImpl(Map &map) : map(map) {}
function len (line 684) | size_t len() override { return map.size(); }
function iterator (line 685) | iterator iter() override { return make_value_iterator(map.begin(), map.e...
function explicit (line 691) | explicit ItemsViewImpl(Map &map) : map(map) {}
function len (line 692) | size_t len() override { return map.size(); }
function iterator (line 693) | iterator iter() override { return make_iterator(map.begin(), map.end()); }
FILE: modules/juce_python/pybind11/type_caster_pyobject_ptr.h
function PYBIND11_NAMESPACE_BEGIN (line 10) | PYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE)
function load (line 46) | bool load(handle src, bool) {
FILE: modules/juce_python/scripting/ScriptBindings.cpp
type popsicle::Bindings (line 29) | namespace popsicle::Bindings {
function ComponentTypeMap (line 33) | ComponentTypeMap& getComponentTypeMap()
function registerComponentType (line 39) | void registerComponentType (juce::StringRef className, ComponentTypeCa...
function clearComponentTypes (line 47) | void clearComponentTypes()
FILE: modules/juce_python/scripting/ScriptBindings.h
function namespace (line 31) | namespace popsicle {
FILE: modules/juce_python/scripting/ScriptEngine.cpp
type popsicle (line 26) | namespace popsicle {
function replaceBrokenLineNumbers (line 34) | [[maybe_unused]] juce::String replaceBrokenLineNumbers (const juce::St...
function catch (line 198) | catch (const py::error_already_set& e)
function catch (line 202) | catch (...)
FILE: modules/juce_python/scripting/ScriptEngine.h
function namespace (line 28) | namespace popsicle {
FILE: modules/juce_python/scripting/ScriptException.h
function namespace (line 25) | namespace popsicle {
FILE: modules/juce_python/scripting/ScriptUtilities.cpp
type popsicle (line 23) | namespace popsicle {
FILE: modules/juce_python/scripting/ScriptUtilities.h
function namespace (line 25) | namespace popsicle {
type ScriptStreamRedirection (line 46) | struct ScriptStreamRedirection
FILE: modules/juce_python/utilities/ClassDemangling.cpp
type popsicle::Helpers (line 39) | namespace popsicle::Helpers {
function demangleClassName (line 43) | juce::String demangleClassName (juce::StringRef className)
function pythonizeClassName (line 69) | juce::String pythonizeClassName (juce::StringRef className, int maxTem...
function pythonizeCompoundClassName (line 100) | juce::String pythonizeCompoundClassName (juce::StringRef prefixName, j...
function pythonizeModuleClassName (line 116) | juce::String pythonizeModuleClassName (juce::StringRef moduleName, juc...
FILE: modules/juce_python/utilities/ClassDemangling.h
function namespace (line 25) | namespace popsicle::Helpers {
FILE: modules/juce_python/utilities/CrashHandling.cpp
type popsicle::Helpers (line 29) | namespace popsicle::Helpers {
function getStackBacktrace (line 33) | juce::String getStackBacktrace()
function applicationCrashHandler (line 105) | void applicationCrashHandler ([[maybe_unused]] void* stackFrame)
FILE: modules/juce_python/utilities/CrashHandling.h
function namespace (line 23) | namespace popsicle::Helpers {
FILE: modules/juce_python/utilities/PythonInterop.h
function printPythonException (line 36) | inline void printPythonException (const pybind11::error_already_set& e)
FILE: modules/juce_python/utilities/PythonTypes.h
function namespace (line 24) | namespace popsicle {
FILE: setup.py
function get_environment_option (line 21) | def get_environment_option(typeClass, name, default=None):
function glob_python_library (line 28) | def glob_python_library(path):
function get_python_path (line 36) | def get_python_path():
function get_python_includes_path (line 69) | def get_python_includes_path():
function get_python_lib_path (line 76) | def get_python_lib_path():
class CMakeExtension (line 80) | class CMakeExtension(Extension):
method __init__ (line 81) | def __init__(self, name):
class CMakeBuildExtension (line 85) | class CMakeBuildExtension(build_ext):
method build_extension (line 92) | def build_extension(self, ext):
method generate_coverage (line 150) | def generate_coverage(self, cwd):
method generate_pyi (line 168) | def generate_pyi(self, cwd):
class CustomInstallScripts (line 203) | class CustomInstallScripts(install_scripts):
method run (line 204) | def run(self):
function load_description (line 218) | def load_description(version):
FILE: tests/conftest.py
function pytest_addoption (line 10) | def pytest_addoption(parser):
function pytest_generate_tests (line 13) | def pytest_generate_tests(metafunc):
function pytest_unconfigure (line 18) | def pytest_unconfigure(config):
function yield_test (line 26) | def yield_test():
function juce_app (line 30) | def juce_app():
FILE: tests/test_juce_core/test_Array.py
function create_array (line 8) | def create_array():
function test_array_default_constructor (line 16) | def test_array_default_constructor(array_type, create_array):
function test_array_bool_copy_constructor (line 22) | def test_array_bool_copy_constructor(create_array):
function test_array_int_copy_constructor (line 30) | def test_array_int_copy_constructor(create_array):
function test_array_float_copy_constructor (line 38) | def test_array_float_copy_constructor(create_array):
function test_array_bool_from_list_constructor (line 48) | def test_array_bool_from_list_constructor(create_array):
function test_array_int_from_list_constructor (line 55) | def test_array_int_from_list_constructor(create_array):
function test_array_float_from_list_constructor (line 62) | def test_array_float_from_list_constructor(create_array):
function test_array_bool_single_element_constructor (line 71) | def test_array_bool_single_element_constructor(create_array):
function test_array_int_single_element_constructor (line 76) | def test_array_int_single_element_constructor(create_array):
function test_array_float_single_element_constructor (line 81) | def test_array_float_single_element_constructor(create_array):
function test_array_bool_clear (line 88) | def test_array_bool_clear(create_array):
function test_array_int_clear (line 93) | def test_array_int_clear(create_array):
function test_array_float_clear (line 98) | def test_array_float_clear(create_array):
function test_array_bool_clear_quick (line 105) | def test_array_bool_clear_quick(create_array):
function test_array_int_clear_quick (line 110) | def test_array_int_clear_quick(create_array):
function test_array_float_clear_quick (line 115) | def test_array_float_clear_quick(create_array):
function test_array_bool_fill (line 122) | def test_array_bool_fill(create_array):
function test_array_int_fill (line 127) | def test_array_int_fill(create_array):
function test_array_float_fill (line 132) | def test_array_float_fill(create_array):
function test_array_bool_size (line 139) | def test_array_bool_size(create_array):
function test_array_int_size (line 143) | def test_array_int_size(create_array):
function test_array_float_size (line 147) | def test_array_float_size(create_array):
function test_array_bool_is_empty (line 153) | def test_array_bool_is_empty(create_array):
function test_array_int_is_empty (line 159) | def test_array_int_is_empty(create_array):
function test_array_float_is_empty (line 165) | def test_array_float_is_empty(create_array):
function test_array_bool_index_of (line 173) | def test_array_bool_index_of(create_array):
function test_array_int_index_of (line 178) | def test_array_int_index_of(create_array):
function test_array_float_index_of (line 183) | def test_array_float_index_of(create_array):
function test_array_bool_contains (line 190) | def test_array_bool_contains(create_array):
function test_array_int_contains (line 195) | def test_array_int_contains(create_array):
function test_array_float_contains (line 200) | def test_array_float_contains(create_array):
function test_array_bool_add (line 207) | def test_array_bool_add(create_array):
function test_array_int_add (line 213) | def test_array_int_add(create_array):
function test_array_float_add (line 219) | def test_array_float_add(create_array):
function test_array_bool_insert (line 227) | def test_array_bool_insert(create_array):
function test_array_int_insert (line 233) | def test_array_int_insert(create_array):
function test_array_float_insert (line 239) | def test_array_float_insert(create_array):
function test_array_bool_insert_multiple (line 247) | def test_array_bool_insert_multiple(create_array):
function test_array_int_insert_multiple (line 254) | def test_array_int_insert_multiple(create_array):
function test_array_float_insert_multiple (line 261) | def test_array_float_insert_multiple(create_array):
function test_array_bool_add_if_not_already_there (line 270) | def test_array_bool_add_if_not_already_there(create_array):
function test_array_int_add_if_not_already_there (line 278) | def test_array_int_add_if_not_already_there(create_array):
function test_array_float_add_if_not_already_there (line 286) | def test_array_float_add_if_not_already_there(create_array):
function test_array_bool_set (line 296) | def test_array_bool_set(create_array):
function test_array_int_set (line 301) | def test_array_int_set(create_array):
function test_array_float_set (line 306) | def test_array_float_set(create_array):
function test_array_bool_remove (line 313) | def test_array_bool_remove(create_array):
function test_array_int_remove (line 319) | def test_array_int_remove(create_array):
function test_array_float_remove (line 325) | def test_array_float_remove(create_array):
function test_array_bool_remove_and_return (line 333) | def test_array_bool_remove_and_return(create_array):
function test_array_int_remove_and_return (line 339) | def test_array_int_remove_and_return(create_array):
function test_array_float_remove_and_return (line 345) | def test_array_float_remove_and_return(create_array):
function test_array_bool_remove_first_matching_value (line 353) | def test_array_bool_remove_first_matching_value(create_array):
function test_array_int_remove_first_matching_value (line 360) | def test_array_int_remove_first_matching_value(create_array):
function test_array_float_remove_first_matching_value (line 367) | def test_array_float_remove_first_matching_value(create_array):
function test_array_bool_remove_all_instances_of (line 376) | def test_array_bool_remove_all_instances_of(create_array):
function test_array_int_remove_all_instances_of (line 382) | def test_array_int_remove_all_instances_of(create_array):
function test_array_float_remove_all_instances_of (line 388) | def test_array_float_remove_all_instances_of(create_array):
function test_array_bool_remove_if (line 396) | def test_array_bool_remove_if(create_array):
function test_array_int_remove_if (line 403) | def test_array_int_remove_if(create_array):
function test_array_float_remove_if (line 411) | def test_array_float_remove_if(create_array):
function test_array_bool_remove_range (line 421) | def test_array_bool_remove_range(create_array):
function test_array_int_remove_range (line 428) | def test_array_int_remove_range(create_array):
function test_array_float_remove_range (line 435) | def test_array_float_remove_range(create_array):
function test_array_bool_swap (line 444) | def test_array_bool_swap(create_array):
function test_array_int_swap (line 450) | def test_array_int_swap(create_array):
function test_array_float_swap (line 456) | def test_array_float_swap(create_array):
function test_array_bool_move (line 464) | def test_array_bool_move(create_array):
function test_array_int_move (line 470) | def test_array_int_move(create_array):
function test_array_float_move (line 476) | def test_array_float_move(create_array):
function test_array_bool_resize (line 484) | def test_array_bool_resize(create_array):
function test_array_int_resize (line 492) | def test_array_int_resize(create_array):
function test_array_float_resize (line 500) | def test_array_float_resize(create_array):
class CustomComparatorBool (line 510) | class CustomComparatorBool(juce.Array[bool].Comparator):
method compareElements (line 511) | def compareElements(self, x, y):
function test_array_bool_add_sorted_comparator (line 516) | def test_array_bool_add_sorted_comparator(create_array):
class CustomComparatorInt (line 527) | class CustomComparatorInt(juce.Array[int].Comparator):
method compareElements (line 528) | def compareElements(self, x, y):
function test_array_int_add_sorted_comparator (line 533) | def test_array_int_add_sorted_comparator(create_array):
class CustomComparatorFloat (line 544) | class CustomComparatorFloat(juce.Array[float].Comparator):
method compareElements (line 545) | def compareElements(self, x, y):
function test_array_float_add_sorted_comparator (line 550) | def test_array_float_add_sorted_comparator(create_array):
function test_array_int_add_sorted_lambda (line 563) | def test_array_int_add_sorted_lambda(create_array):
function test_array_bool_add_using_default_sort (line 575) | def test_array_bool_add_using_default_sort(create_array):
function test_array_int_add_using_default_sort (line 584) | def test_array_int_add_using_default_sort(create_array):
function test_array_float_add_using_default_sort (line 593) | def test_array_float_add_using_default_sort(create_array):
function test_array_bool_sort (line 604) | def test_array_bool_sort(create_array):
function test_array_int_sort (line 612) | def test_array_int_sort(create_array):
function test_array_float_sort (line 619) | def test_array_float_sort(create_array):
function test_array_bool_minimise_storage_overheads (line 628) | def test_array_bool_minimise_storage_overheads(create_array):
function test_array_int_minimise_storage_overheads (line 636) | def test_array_int_minimise_storage_overheads(create_array):
function test_array_float_minimise_storage_overheads (line 644) | def test_array_float_minimise_storage_overheads(create_array):
function test_array_bool_ensure_storage_allocated (line 654) | def test_array_bool_ensure_storage_allocated(create_array):
function test_array_int_ensure_storage_allocated (line 660) | def test_array_int_ensure_storage_allocated(create_array):
function test_array_float_ensure_storage_allocated (line 666) | def test_array_float_ensure_storage_allocated(create_array):
function test_array_bool_get_first (line 674) | def test_array_bool_get_first(create_array):
function test_array_int_get_first (line 679) | def test_array_int_get_first(create_array):
function test_array_float_get_first (line 685) | def test_array_float_get_first(create_array):
function test_array_bool_get_last (line 692) | def test_array_bool_get_last(create_array):
function test_array_int_get_last (line 697) | def test_array_int_get_last(create_array):
function test_array_float_get_last (line 702) | def test_array_float_get_last(create_array):
function test_array_bool_get_unchecked (line 709) | def test_array_bool_get_unchecked(create_array):
function test_array_int_get_unchecked (line 714) | def test_array_int_get_unchecked(create_array):
function test_array_float_get_unchecked (line 719) | def test_array_float_get_unchecked(create_array):
function test_array_bool_get_reference (line 726) | def test_array_bool_get_reference(create_array):
function test_array_int_get_reference (line 731) | def test_array_int_get_reference(create_array):
function test_array_float_get_reference (line 736) | def test_array_float_get_reference(create_array):
function test_array_bool_operator_equals (line 743) | def test_array_bool_operator_equals(create_array):
function test_array_int_operator_equals (line 748) | def test_array_int_operator_equals(create_array):
function test_array_float_operator_equals (line 753) | def test_array_float_operator_equals(create_array):
function test_array_bool_operator_not_equals (line 760) | def test_array_bool_operator_not_equals(create_array):
function test_array_int_operator_not_equals (line 765) | def test_array_int_operator_not_equals(create_array):
function test_array_float_operator_not_equals (line 770) | def test_array_float_operator_not_equals(create_array):
function test_array_bool_add_array (line 777) | def test_array_bool_add_array(create_array):
function test_array_int_add_array (line 785) | def test_array_int_add_array(create_array):
function test_array_float_add_array (line 794) | def test_array_float_add_array(create_array):
function test_array_bool_swap_with (line 804) | def test_array_bool_swap_with(create_array):
function test_array_int_swap_with (line 813) | def test_array_int_swap_with(create_array):
function test_array_float_swap_with (line 822) | def test_array_float_swap_with(create_array):
function test_array_bool_remove_last (line 833) | def test_array_bool_remove_last(create_array):
function test_array_int_remove_last (line 839) | def test_array_int_remove_last(create_array):
function test_array_float_remove_last (line 845) | def test_array_float_remove_last(create_array):
function test_array_bool_remove_values_in (line 853) | def test_array_bool_remove_values_in(create_array):
function test_array_int_remove_values_in (line 861) | def test_array_int_remove_values_in(create_array):
function test_array_float_remove_values_in (line 870) | def test_array_float_remove_values_in(create_array):
function test_array_bool_remove_values_not_in (line 883) | def test_array_bool_remove_values_not_in(create_array):
function test_array_int_remove_values_not_in (line 891) | def test_array_int_remove_values_not_in(create_array):
function test_array_float_remove_values_not_in (line 899) | def test_array_float_remove_values_not_in(create_array):
function test_array_bool_begin_end (line 912) | def test_array_bool_begin_end(create_array):
function test_array_int_begin_end (line 917) | def test_array_int_begin_end(create_array):
function test_array_float_begin_end (line 922) | def test_array_float_begin_end(create_array):
FILE: tests/test_juce_core/test_Base64.py
function test_to_base64 (line 5) | def test_to_base64():
function test_convert_to_base64 (line 14) | def test_convert_to_base64():
function test_convert_from_base64 (line 21) | def test_convert_from_base64():
FILE: tests/test_juce_core/test_BigInteger.py
function get_big_random (line 7) | def get_big_random(r: juce.Random) -> juce.BigInteger:
function test_construct_default (line 17) | def test_construct_default():
function test_construct_with_uint32 (line 23) | def test_construct_with_uint32():
function test_construct_with_int32 (line 29) | def test_construct_with_int32():
function test_construct_with_int64 (line 36) | def test_construct_with_int64():
function test_copy_constructor (line 42) | def test_copy_constructor():
function test_move_constructor (line 49) | def test_move_constructor():
function test_assignment_operator (line 56) | def test_assignment_operator():
function test_swap_with (line 64) | def test_swap_with():
function test_is_zero (line 73) | def test_is_zero():
function test_is_one (line 79) | def test_is_one():
function test_to_integer (line 85) | def test_to_integer():
function test_to_int64 (line 91) | def test_to_int64():
function test_clear (line 97) | def test_clear():
function test_clear_bit (line 104) | def test_clear_bit():
function test_set_bit (line 111) | def test_set_bit():
function test_set_bit_value (line 118) | def test_set_bit_value():
function test_set_range (line 127) | def test_set_range():
function test_insert_bit (line 134) | def test_insert_bit():
function test_get_bit_range (line 141) | def test_get_bit_range():
function test_get_bit_range_as_int (line 148) | def test_get_bit_range_as_int():
function test_set_bit_range_as_int (line 155) | def test_set_bit_range_as_int():
function test_shift_bits (line 162) | def test_shift_bits():
function test_count_number_of_set_bits (line 169) | def test_count_number_of_set_bits():
function test_find_next_set_bit (line 175) | def test_find_next_set_bit():
function test_find_next_clear_bit (line 181) | def test_find_next_clear_bit():
function test_get_highest_bit (line 187) | def test_get_highest_bit():
function test_is_negative (line 193) | def test_is_negative():
function test_set_negative (line 199) | def test_set_negative():
function test_negate (line 206) | def test_negate():
function test_addition (line 215) | def test_addition():
function test_subtraction (line 223) | def test_subtraction():
function test_multiplication (line 231) | def test_multiplication():
function test_division (line 239) | def test_division():
function test_modulus (line 247) | def test_modulus():
function test_bitwise_and (line 255) | def test_bitwise_and():
function test_bitwise_or (line 263) | def test_bitwise_or():
function test_bitwise_xor (line 271) | def test_bitwise_xor():
function test_left_shift (line 279) | def test_left_shift():
function test_right_shift (line 286) | def test_right_shift():
function test_equality (line 293) | def test_equality():
function test_inequality (line 300) | def test_inequality():
function test_less_than (line 307) | def test_less_than():
function test_less_than_or_equal (line 314) | def test_less_than_or_equal():
function test_greater_than (line 321) | def test_greater_than():
function test_greater_than_or_equal (line 328) | def test_greater_than_or_equal():
function test_compare (line 335) | def test_compare():
function test_compare_absolute (line 343) | def test_compare_absolute():
function test_divide_by (line 350) | def test_divide_by():
function test_find_greatest_common_divisor (line 360) | def test_find_greatest_common_divisor():
function test_exponent_modulo (line 367) | def test_exponent_modulo():
function test_inverse_modulo (line 376) | def test_inverse_modulo():
function test_montgomery_multiplication (line 384) | def test_montgomery_multiplication():
function test_extended_euclidean (line 398) | def test_extended_euclidean():
function test_comparisons (line 412) | def test_comparisons():
function test_bit_setting (line 441) | def test_bit_setting():
FILE: tests/test_juce_core/test_ByteOrder.py
function test_swap_python_integer (line 8) | def test_swap_python_integer():
function test_little_endian_short_python_integer (line 15) | def test_little_endian_short_python_integer():
function test_little_endian_int_python_integer (line 21) | def test_little_endian_int_python_integer():
function test_little_endian_int64_python_integer (line 27) | def test_little_endian_int64_python_integer():
function test_big_endian_short_python_integer (line 33) | def test_big_endian_short_python_integer():
function test_big_endian_int_python_integer (line 39) | def test_big_endian_int_python_integer():
function test_big_endian_int64_python_integer (line 45) | def test_big_endian_int64_python_integer():
function test_make_int (line 51) | def test_make_int():
function test_is_big_endian (line 67) | def test_is_big_endian():
FILE: tests/test_juce_core/test_Cast.py
function test_constructor (line 7) | def test_constructor():
FILE: tests/test_juce_core/test_CriticalSection.py
function test_constructor (line 7) | def test_constructor():
function test_double_entering (line 13) | def test_double_entering():
function test_manual_enter_exit (line 20) | def test_manual_enter_exit():
function test_scoped_enter_exit (line 28) | def test_scoped_enter_exit():
FILE: tests/test_juce_core/test_File.py
function test_constructor (line 16) | def test_constructor():
function test_construct_empty (line 23) | def test_construct_empty():
function test_construct_with_path (line 29) | def test_construct_with_path():
function test_copy_constructor (line 35) | def test_copy_constructor():
function test_exists (line 42) | def test_exists():
function test_exists_as_file (line 51) | def test_exists_as_file():
function test_is_directory (line 61) | def test_is_directory():
function test_is_root (line 72) | def test_is_root():
function test_get_size (line 81) | def test_get_size():
function test_description_of_size_in_bytes (line 87) | def test_description_of_size_in_bytes():
function test_get_full_path_name (line 93) | def test_get_full_path_name():
function test_get_file_name (line 99) | def test_get_file_name():
function test_get_relative_path_from (line 106) | def test_get_relative_path_from():
function test_get_file_extension (line 115) | def test_get_file_extension():
function test_has_file_extension (line 122) | def test_has_file_extension():
function test_with_file_extension (line 128) | def test_with_file_extension():
function test_get_file_name_without_extension (line 135) | def test_get_file_name_without_extension():
function test_hash_code (line 141) | def test_hash_code():
function test_hash_code_64 (line 147) | def test_hash_code_64():
function test_get_child_file (line 153) | def test_get_child_file():
function test_get_sibling_file (line 160) | def test_get_sibling_file():
function test_get_parent_directory (line 168) | def test_get_parent_directory():
function test_is_a_child_of (line 175) | def test_is_a_child_of():
function test_get_nonexistent_child_file (line 182) | def test_get_nonexistent_child_file():
function test_get_nonexistent_sibling (line 190) | def test_get_nonexistent_sibling():
function test_operators (line 197) | def test_operators():
function test_set_execute_permission (line 208) | def test_set_execute_permission():
function test_is_hidden (line 214) | def test_is_hidden():
function test_get_file_identifier (line 220) | def test_get_file_identifier():
function test_get_last_access_time (line 227) | def test_get_last_access_time():
function test_get_creation_time (line 236) | def test_get_creation_time():
function test_get_last_modification_time (line 245) | def test_get_last_modification_time():
function test_set_last_modification_time (line 253) | def test_set_last_modification_time():
function test_get_special_location (line 263) | def test_get_special_location():
function test_create_temp_file (line 269) | def test_create_temp_file():
function test_get_current_working_directory (line 275) | def test_get_current_working_directory():
function test_set_as_current_working_directory (line 283) | def test_set_as_current_working_directory():
function test_get_separator_char (line 290) | def test_get_separator_char():
function test_has_write_access (line 297) | def test_has_write_access():
function test_has_read_access (line 303) | def test_has_read_access():
function test_set_read_only (line 309) | def test_set_read_only():
function test_is_absolute_path (line 320) | def test_is_absolute_path():
function test_get_version (line 327) | def test_get_version():
function test_create (line 333) | def test_create():
function test_create_directory (line 341) | def test_create_directory():
function test_delete_file (line 349) | def test_delete_file():
function test_delete_recursively (line 356) | def test_delete_recursively():
function test_move_to_trash (line 369) | def test_move_to_trash():
function test_move_file_to (line 376) | def test_move_file_to():
function test_copy_file_to (line 395) | def test_copy_file_to():
function test_replace_file_in (line 414) | def test_replace_file_in():
function test_copy_directory_to (line 430) | def test_copy_directory_to():
function test_get_number_of_child_files (line 448) | def test_get_number_of_child_files():
function test_contains_subdirectories (line 459) | def test_contains_subdirectories():
function test_read_lines (line 465) | def test_read_lines():
function test_append_data (line 473) | def test_append_data():
function test_replace_with_data (line 488) | def test_replace_with_data():
function test_append_text (line 503) | def test_append_text():
function test_replace_with_text (line 515) | def test_replace_with_text():
function test_has_identical_content_to (line 527) | def test_has_identical_content_to():
function test_create_file_without_checking_path (line 552) | def test_create_file_without_checking_path():
function test_create_legal_file_name (line 558) | def test_create_legal_file_name():
function test_create_legal_path_name (line 565) | def test_create_legal_path_name():
function test_create_input_stream (line 572) | def test_create_input_stream():
function test_create_output_stream (line 579) | def test_create_output_stream():
function test_load_file_as_data (line 587) | def test_load_file_as_data():
function test_load_file_as_string (line 595) | def test_load_file_as_string():
function test_find_child_files (line 608) | def test_find_child_files():
function test_find_child_files_reference (line 618) | def test_find_child_files_reference():
function test_create_symbolic_link (line 628) | def test_create_symbolic_link():
function test_is_symbolic_link (line 637) | def test_is_symbolic_link():
function test_get_linked_target (line 647) | def test_get_linked_target():
function test_get_bytes_free_on_volume (line 656) | def test_get_bytes_free_on_volume():
function test_get_volume_total_size (line 663) | def test_get_volume_total_size():
function test_get_volume_label (line 670) | def test_get_volume_label():
function test_get_volume_serial_number (line 676) | def test_get_volume_serial_number():
function test_reveal_to_user (line 683) | def test_reveal_to_user():
function test_get_separator_string (line 689) | def test_get_separator_string():
function test_are_file_names_case_sensitive (line 695) | def test_are_file_names_case_sensitive():
function test_add_trailing_separator (line 701) | def test_add_trailing_separator():
function test_get_native_linked_target (line 708) | def test_get_native_linked_target():
function test_find_file_system_roots (line 715) | def test_find_file_system_roots():
function test_is_on_cdrom_drive (line 723) | def test_is_on_cdrom_drive():
function test_is_on_hard_disk (line 730) | def test_is_on_hard_disk():
function test_is_on_removable_drive (line 737) | def test_is_on_removable_drive():
function test_start_as_process (line 744) | def test_start_as_process():
function test_create_shortcut (line 751) | def test_create_shortcut():
function test_is_shortcut (line 760) | def test_is_shortcut():
function test_is_bundle (line 771) | def test_is_bundle():
function test_add_to_dock (line 778) | def test_add_to_dock():
function test_get_mac_os_type (line 785) | def test_get_mac_os_type():
function test_get_container_for_security_application_group_identifier (line 792) | def test_get_container_for_security_application_group_identifier():
FILE: tests/test_juce_core/test_FileFilter.py
class CustomFileFilter (line 11) | class CustomFileFilter(juce.FileFilter):
method isFileSuitable (line 12) | def isFileSuitable(self, file):
method isDirectorySuitable (line 15) | def isDirectorySuitable(self, file):
function test_custom_file_filter (line 18) | def test_custom_file_filter():
function test_wildcard_file_filter_files (line 29) | def test_wildcard_file_filter_files():
function test_wildcard_file_filter_folders (line 38) | def test_wildcard_file_filter_folders():
FILE: tests/test_juce_core/test_FileInputStream.py
function test_file_input_stream_nonexisting (line 14) | def test_file_input_stream_nonexisting():
function test_file_input_stream (line 23) | def test_file_input_stream():
function test_file_input_stream_read (line 32) | def test_file_input_stream_read():
function test_file_input_stream_read_ints (line 49) | def test_file_input_stream_read_ints():
function test_file_input_stream_string (line 70) | def test_file_input_stream_string():
function test_file_input_stream_read_entire_as_string (line 79) | def test_file_input_stream_read_entire_as_string():
function test_file_input_stream_read_into_memory_block (line 88) | def test_file_input_stream_read_into_memory_block():
FILE: tests/test_juce_core/test_FileOutputStream.py
function test_file_output_stream_write_from_input_all (line 16) | def test_file_output_stream_write_from_input_all():
function test_file_output_stream_write_from_input_some (line 31) | def test_file_output_stream_write_from_input_some():
function test_file_output_stream_write (line 46) | def test_file_output_stream_write():
FILE: tests/test_juce_core/test_Identifier.py
function test_empty_constructor (line 5) | def test_empty_constructor():
function test_constructor_python_str (line 21) | def test_constructor_python_str():
function test_constructor_copy (line 31) | def test_constructor_copy():
function test_constructor_juce_String (line 40) | def test_constructor_juce_String():
function test_comparisons (line 50) | def test_comparisons():
function test_to_string (line 68) | def test_to_string():
function test_is_valid_identifier (line 78) | def test_is_valid_identifier():
FILE: tests/test_juce_core/test_InputStream.py
class CustomFullInputStream (line 9) | class CustomFullInputStream(juce.InputStream):
method __init__ (line 13) | def __init__(self, data):
method getTotalLength (line 18) | def getTotalLength(self):
method isExhausted (line 21) | def isExhausted(self):
method read (line 24) | def read(self, destBuffer):
method readByte (line 31) | def readByte(self):
method readShort (line 36) | def readShort(self):
method readShortBigEndian (line 41) | def readShortBigEndian(self):
method readInt (line 46) | def readInt(self):
method readIntBigEndian (line 51) | def readIntBigEndian(self):
method readInt64 (line 56) | def readInt64(self):
method readInt64BigEndian (line 61) | def readInt64BigEndian(self):
method readFloat (line 66) | def readFloat(self):
method readFloatBigEndian (line 71) | def readFloatBigEndian(self):
method readDouble (line 76) | def readDouble(self):
method readDoubleBigEndian (line 81) | def readDoubleBigEndian(self):
method readCompressedInt (line 86) | def readCompressedInt(self):
method readNextLine (line 105) | def readNextLine(self):
method readString (line 120) | def readString(self):
method readEntireStreamAsString (line 135) | def readEntireStreamAsString(self):
method readIntoMemoryBlock (line 141) | def readIntoMemoryBlock(self, destBlock, maxNumBytesToRead):
method getPosition (line 153) | def getPosition(self):
method setPosition (line 156) | def setPosition(self, newPosition):
method skipNextBytes (line 159) | def skipNextBytes (self, newPosition):
class CustomMinimalInputStream (line 164) | class CustomMinimalInputStream(juce.InputStream):
method __init__ (line 168) | def __init__(self, data):
method getTotalLength (line 173) | def getTotalLength(self):
method isExhausted (line 176) | def isExhausted(self):
method read (line 179) | def read(self, destBuffer):
method getPosition (line 186) | def getPosition(self):
method setPosition (line 189) | def setPosition(self, newPosition):
function test_input_stream (line 195) | def test_input_stream(input_stream):
function test_read_entire_stream_as_string (line 212) | def test_read_entire_stream_as_string(input_stream):
function test_read_string (line 221) | def test_read_string(input_stream):
function test_read_new_line (line 233) | def test_read_new_line(input_stream):
function test_read_into_memory_block (line 245) | def test_read_into_memory_block(input_stream):
function test_read_byte (line 275) | def test_read_byte(input_stream):
function test_read_short (line 283) | def test_read_short(input_stream):
function test_read_int (line 295) | def test_read_int(input_stream):
function test_read_int64 (line 307) | def test_read_int64(input_stream):
function test_read_float (line 319) | def test_read_float(input_stream):
function test_read_double (line 331) | def test_read_double(input_stream):
FILE: tests/test_juce_core/test_Ints.py
function test_ints_constructor_positive (line 7) | def test_ints_constructor_positive():
function test_ints_constructor_negative (line 22) | def test_ints_constructor_negative():
function test_ints_constructor_out_of_range (line 37) | def test_ints_constructor_out_of_range():
function test_uints_constructor_positive (line 52) | def test_uints_constructor_positive():
function test_uints_constructor_negative (line 67) | def test_uints_constructor_negative():
function test_uints_constructor_out_of_range (line 82) | def test_uints_constructor_out_of_range():
FILE: tests/test_juce_core/test_JSON.py
function test_parse_with_valid_json_returns_correct_result (line 8) | def test_parse_with_valid_json_returns_correct_result():
function test_parse_with_invalid_json_returns_empty_var (line 16) | def test_parse_with_invalid_json_returns_empty_var():
function test_parse_with_file_returns_correct_result (line 23) | def test_parse_with_file_returns_correct_result():
function test_parse_with_stream_returns_correct_result (line 33) | def test_parse_with_stream_returns_correct_result():
function test_to_string_with_default_options (line 41) | def test_to_string_with_default_options():
function test_format_options (line 49) | def test_format_options():
function test_to_string_with_format_options_no_spacing (line 61) | def test_to_string_with_format_options_no_spacing():
function test_to_string_with_format_options_single_line (line 70) | def test_to_string_with_format_options_single_line():
function test_to_string_with_format_options_multi_line (line 79) | def test_to_string_with_format_options_multi_line():
function test_to_string_with_format_options_max_decimal_places (line 102) | def test_to_string_with_format_options_max_decimal_places():
function test_write_to_stream (line 111) | def test_write_to_stream():
function test_from_string_with_valid_json (line 119) | def test_from_string_with_valid_json():
function test_escape_string_escapes_special_characters (line 127) | def test_escape_string_escapes_special_characters():
FILE: tests/test_juce_core/test_MemoryBlock.py
function test_construct_empty (line 7) | def test_construct_empty():
function test_construct_size (line 14) | def test_construct_size():
function test_construct_size_value (line 21) | def test_construct_size_value():
function test_copy_constructor (line 29) | def test_copy_constructor():
function test_construct_from_buffer (line 37) | def test_construct_from_buffer():
function test_equality (line 45) | def test_equality():
function test_matches (line 55) | def test_matches():
function test_getitem (line 61) | def test_getitem():
function test_setitem (line 67) | def test_setitem():
function test_get_data (line 77) | def test_get_data():
function test_is_empty (line 85) | def test_is_empty():
function test_set_size (line 94) | def test_set_size():
function test_ensure_size (line 111) | def test_ensure_size():
function test_reset (line 118) | def test_reset():
function test_fill_with (line 126) | def test_fill_with():
function test_append (line 133) | def test_append():
function test_replace_all (line 141) | def test_replace_all():
function test_insert (line 150) | def test_insert():
function test_remove_section (line 160) | def test_remove_section():
function test_copy_from (line 174) | def test_copy_from():
function test_copy_to (line 183) | def test_copy_to():
function test_swap_with (line 193) | def test_swap_with():
function test_to_string (line 202) | def test_to_string():
function test_load_from_hex_string (line 208) | def test_load_from_hex_string():
function test_set_bit_range (line 217) | def test_set_bit_range():
function test_get_bit_range (line 226) | def test_get_bit_range():
function test_to_base64_encoding (line 233) | def test_to_base64_encoding():
function test_from_base64_encoding (line 240) | def test_from_base64_encoding():
function test_repr (line 248) | def test_repr():
function test_str (line 254) | def test_str():
FILE: tests/test_juce_core/test_MemoryInputStream.py
function test_constructor_with_empty_source_data (line 8) | def test_constructor_with_empty_source_data():
function test_constructor_with_source_data (line 21) | def test_constructor_with_source_data():
function test_constructor_with_empty_memory_block (line 34) | def test_constructor_with_empty_memory_block():
function test_constructor_with_memory_block (line 48) | def test_constructor_with_memory_block():
function test_memory_input_stream_construct_from_data (line 62) | def test_memory_input_stream_construct_from_data():
function test_memory_input_stream_construct_from_memory_block (line 69) | def test_memory_input_stream_construct_from_memory_block():
function test_memory_input_stream_get_position (line 77) | def test_memory_input_stream_get_position():
function test_memory_input_stream_set_position (line 84) | def test_memory_input_stream_set_position():
function test_memory_input_stream_get_total_length (line 93) | def test_memory_input_stream_get_total_length():
function test_memory_input_stream_is_exhausted (line 100) | def test_memory_input_stream_is_exhausted():
function test_memory_input_stream_read (line 107) | def test_memory_input_stream_read():
function test_memory_input_stream_skip_next_bytes (line 117) | def test_memory_input_stream_skip_next_bytes():
function test_memory_input_stream_read_into_memory_block (line 126) | def test_memory_input_stream_read_into_memory_block():
function test_memory_input_stream_read_next_line (line 137) | def test_memory_input_stream_read_next_line():
function test_memory_input_stream_read_string (line 144) | def test_memory_input_stream_read_string():
function test_memory_input_stream_read_entire_stream_as_string (line 151) | def test_memory_input_stream_read_entire_stream_as_string():
function test_memory_input_stream_read_byte (line 158) | def test_memory_input_stream_read_byte():
function test_memory_input_stream_read_bool (line 165) | def test_memory_input_stream_read_bool():
function test_memory_input_stream_read_short (line 173) | def test_memory_input_stream_read_short():
function test_memory_input_stream_read_int (line 181) | def test_memory_input_stream_read_int():
function test_memory_input_stream_read_int64 (line 189) | def test_memory_input_stream_read_int64():
function test_memory_input_stream_read_float (line 197) | def test_memory_input_stream_read_float():
function test_memory_input_stream_read_double (line 205) | def test_memory_input_stream_read_double():
function test_memory_input_stream_read_compressed_int (line 213) | def test_memory_input_stream_read_compressed_int():
FILE: tests/test_juce_core/test_MemoryMappedFile.py
function test_memory_mapped_file_read_only_mode (line 15) | def test_memory_mapped_file_read_only_mode():
function test_memory_mapped_file_read_write_mode (line 24) | def test_memory_mapped_file_read_write_mode():
function test_memory_mapped_file_exclusive_mode (line 34) | def test_memory_mapped_file_exclusive_mode():
function test_memory_mapped_file_non_existent_file (line 41) | def test_memory_mapped_file_non_existent_file():
function test_memory_mapped_file_section_read_only_mode (line 48) | def test_memory_mapped_file_section_read_only_mode():
function test_memory_mapped_file_section_read_write_mode (line 56) | def test_memory_mapped_file_section_read_write_mode():
function test_memory_mapped_file_section_exclusive_mode (line 65) | def test_memory_mapped_file_section_exclusive_mode():
FILE: tests/test_juce_core/test_NamedValueSet.py
function test_constructor_empty (line 7) | def test_constructor_empty():
function test_constructor_list_of_namedvalues (line 14) | def test_constructor_list_of_namedvalues():
function test_constructor_dict (line 35) | def test_constructor_dict():
function test_copy_constructor (line 47) | def test_copy_constructor():
function test_equality_operators (line 61) | def test_equality_operators():
function test_operator_bracket (line 86) | def test_operator_bracket():
function test_get_with_default (line 99) | def test_get_with_default():
function test_set (line 111) | def test_set():
function test_contains (line 126) | def test_contains():
function test_remove (line 138) | def test_remove():
function test_get_name (line 157) | def test_get_name():
function test_clear (line 170) | def test_clear():
function test_index_of (line 183) | def test_index_of():
function test_get_var_pointer (line 196) | def test_get_var_pointer():
function test_getValueAt (line 212) | def test_getValueAt():
function test_get_var_pointer_at (line 225) | def test_get_var_pointer_at():
function test_copy_to_xml_attributes (line 241) | def test_copy_to_xml_attributes():
function test_set_from_xml_attributes (line 261) | def test_set_from_xml_attributes():
FILE: tests/test_juce_core/test_NormalisableRange.py
function test_normalisable_range_default_constructor (line 7) | def test_normalisable_range_default_constructor():
function test_normalisable_range_with_range_interval_skew (line 17) | def test_normalisable_range_with_range_interval_skew():
function test_normalisable_range_with_range (line 27) | def test_normalisable_range_with_range():
function test_normalisable_range_with_range_and_interval (line 37) | def test_normalisable_range_with_range_and_interval():
function test_convert_to_0to1_with_linear_skew (line 47) | def test_convert_to_0to1_with_linear_skew():
function test_convert_to_0to1_with_skew (line 54) | def test_convert_to_0to1_with_skew():
function test_convert_from_0to1_with_linear_skew (line 65) | def test_convert_from_0to1_with_linear_skew():
function test_convert_from_0to1_with_skew (line 73) | def test_convert_from_0to1_with_skew():
function test_snap_to_legal_value_with_interval (line 84) | def test_snap_to_legal_value_with_interval():
function test_get_range (line 91) | def test_get_range():
function test_set_skew_for_centre (line 99) | def test_set_skew_for_centre():
FILE: tests/test_juce_core/test_PropertySet.py
function test_constructor (line 5) | def test_constructor():
FILE: tests/test_juce_core/test_Random.py
function test_system_random (line 7) | def test_system_random():
function test_seeded_random (line 40) | def test_seeded_random():
FILE: tests/test_juce_core/test_Range.py
function test_range_int_constructor (line 5) | def test_range_int_constructor():
function test_range_set_start_end (line 38) | def test_range_set_start_end():
function test_range_with_start_end (line 54) | def test_range_with_start_end():
function test_range_moved_start_end (line 81) | def test_range_moved_start_end():
function test_range_set_length (line 98) | def test_range_set_length():
function test_range_expanded (line 114) | def test_range_expanded():
function test_range_operators (line 125) | def test_range_operators():
function test_range_equality (line 154) | def test_range_equality():
function test_range_contains (line 167) | def test_range_contains():
function test_range_clip_value (line 189) | def test_range_clip_value():
function test_range_intersects (line 199) | def test_range_intersects():
function test_range_intersects (line 216) | def test_range_intersects():
function test_range_constrain_range (line 229) | def test_range_constrain_range():
FILE: tests/test_juce_core/test_RangedDirectoryIterator.py
function test_iterate_this_folder (line 10) | def test_iterate_this_folder():
function test_iterate_progress (line 32) | def test_iterate_progress():
FILE: tests/test_juce_core/test_RelativeTime.py
function test_construct_empty (line 11) | def test_construct_empty():
function test_construct_valid (line 22) | def test_construct_valid():
function test_operation_get_description (line 73) | def test_operation_get_description():
function test_operation_get_approximate_description (line 104) | def test_operation_get_approximate_description():
FILE: tests/test_juce_core/test_Result.py
function test_ok (line 5) | def test_ok():
function test_fail (line 17) | def test_fail():
function test_comparison (line 30) | def test_comparison():
FILE: tests/test_juce_core/test_StringArray.py
function test_constructor_empty (line 5) | def test_constructor_empty():
function test_constructor_copy (line 11) | def test_constructor_copy():
function test_constructor_list (line 21) | def test_constructor_list():
function test_constructor_single (line 30) | def test_constructor_single():
function test_constructor_args (line 37) | def test_constructor_args():
function test_comparison_operators (line 46) | def test_comparison_operators():
function test_size_method (line 56) | def test_size_method():
function test_is_empty_method (line 62) | def test_is_empty_method():
function test_index_operator (line 71) | def test_index_operator():
function test_swap_with_method (line 79) | def test_swap_with_method():
function test_contains_method (line 96) | def test_contains_method():
function test_index_of_method (line 104) | def test_index_of_method():
function test_add_method (line 112) | def test_add_method():
function test_insert_method (line 120) | def test_insert_method():
function test_set_method (line 129) | def test_set_method():
function test_add_if_not_already_there_method (line 137) | def test_add_if_not_already_there_method():
function test_add_array_method (line 151) | def test_add_array_method():
function test_merge_array_method (line 161) | def test_merge_array_method():
function test_remove_method (line 187) | def test_remove_method():
function test_remove_string_method (line 195) | def test_remove_string_method():
function test_remove_range_method (line 203) | def test_remove_range_method():
function test_remove_duplicates_method (line 212) | def test_remove_duplicates_method():
function test_remove_empty_strings_method (line 221) | def test_remove_empty_strings_method():
function test_move_method (line 231) | def test_move_method():
function test_trim_method (line 240) | def test_trim_method():
function test_join_into_string_method (line 251) | def test_join_into_string_method():
function test_sort_method (line 262) | def test_sort_method():
function test_sort_natural_method (line 283) | def test_sort_natural_method():
function test_ensure_storage_allocated_method (line 292) | def test_ensure_storage_allocated_method():
function test_minimise_storage_overheads_method (line 299) | def test_minimise_storage_overheads_method():
function test_from_tokens_method (line 307) | def test_from_tokens_method():
function test_from_tokens_methodwith_break_character (line 316) | def test_from_tokens_methodwith_break_character():
function test_from_tokens_method_with_quotes (line 334) | def test_from_tokens_method_with_quotes():
function test_from_lines_method (line 344) | def test_from_lines_method():
function test_clear_method (line 363) | def test_clear_method():
function test_clear_quick_method (line 374) | def test_clear_quick_method():
FILE: tests/test_juce_core/test_StringPairArray.py
function test_constructor_empty (line 5) | def test_constructor_empty():
function test_string_pair_array_copy_constructor (line 12) | def test_string_pair_array_copy_constructor():
function test_string_pair_array_assignment_operator (line 21) | def test_string_pair_array_assignment_operator():
function test_string_pair_array_equality_operator (line 31) | def test_string_pair_array_equality_operator():
function test_string_pair_array_inequality_operator (line 40) | def test_string_pair_array_inequality_operator():
function test_string_pair_array_get_value_with_default (line 49) | def test_string_pair_array_get_value_with_default():
function test_string_pair_array_contains_key (line 57) | def test_string_pair_array_contains_key():
function test_string_pair_array_get_all_keys (line 65) | def test_string_pair_array_get_all_keys():
function test_string_pair_array_get_all_values (line 76) | def test_string_pair_array_get_all_values():
function test_string_pair_array_set (line 87) | def test_string_pair_array_set():
function test_string_pair_array_add_array (line 94) | def test_string_pair_array_add_array():
function test_string_pair_array_clear (line 105) | def test_string_pair_array_clear():
function test_string_pair_array_remove_by_key (line 113) | def test_string_pair_array_remove_by_key():
function test_string_pair_array_remove_by_index (line 121) | def test_string_pair_array_remove_by_index():
function test_string_pair_array_set_ignores_case (line 129) | def test_string_pair_array_set_ignores_case():
function test_string_pair_array_get_ignores_case (line 138) | def test_string_pair_array_get_ignores_case():
function test_string_pair_array_get_description (line 146) | def test_string_pair_array_get_description():
function test_string_pair_array_minimise_storage_overheads (line 155) | def test_string_pair_array_minimise_storage_overheads():
function test_string_pair_array_add_map (line 166) | def test_string_pair_array_add_map():
function test_string_pair_array_add_unordered_map (line 176) | def test_string_pair_array_add_unordered_map():
FILE: tests/test_juce_core/test_SubregionStream.py
function test_read_within_subregion (line 7) | def test_read_within_subregion():
function test_read_past_subregion_end (line 23) | def test_read_past_subregion_end():
function test_seek_within_subregion (line 39) | def test_seek_within_subregion():
function test_seek_past_subregion_end (line 56) | def test_seek_past_subregion_end():
FILE: tests/test_juce_core/test_TemporaryFile.py
function test_create_temporary_file (line 9) | def test_create_temporary_file():
function test_write_to_temporary_file (line 16) | def test_write_to_temporary_file():
function test_delete_temporary_file (line 27) | def test_delete_temporary_file():
function test_replace_target_file_with_temporary (line 40) | def test_replace_target_file_with_temporary():
function test_replace_target_file_with_temporary_with (line 59) | def test_replace_target_file_with_temporary_with():
function test_temporary_file_deletion_on_destruction (line 75) | def test_temporary_file_deletion_on_destruction():
function test_fail_to_replace_nonexistent_target (line 83) | def test_fail_to_replace_nonexistent_target():
FILE: tests/test_juce_core/test_Thread.py
class Thread (line 7) | class Thread(juce.Thread):
method run (line 11) | def run(self):
class ThreadListener (line 23) | class ThreadListener(juce.Thread.Listener):
method exitSignalSent (line 26) | def exitSignalSent(self):
function test_construct_and_start_stop (line 31) | def test_construct_and_start_stop():
function test_construct_and_start_signal_stop (line 60) | def test_construct_and_start_signal_stop():
function test_launch (line 91) | def test_launch():
FILE: tests/test_juce_core/test_ThreadPool.py
class ThreadPoolJob (line 7) | class ThreadPoolJob(juce.ThreadPoolJob):
method __init__ (line 11) | def __init__(self, name, maxRuns):
method runJob (line 15) | def runJob(self):
function test_default_constructor (line 25) | def test_default_constructor():
function test_threads_constructor (line 31) | def test_threads_constructor():
FILE: tests/test_juce_core/test_Time.py
function test_construct_with_values (line 8) | def test_construct_with_values():
function test_get_current_time (line 20) | def test_get_current_time():
function test_add_relative_time (line 26) | def test_add_relative_time():
function test_subtract_relative_time (line 36) | def test_subtract_relative_time():
function test_comparisons (line 46) | def test_comparisons():
function test_to_milliseconds (line 62) | def test_to_milliseconds():
function test_get_month_name (line 69) | def test_get_month_name():
function test_get_weekday_name (line 80) | def test_get_weekday_name():
function test_set_system_time_to_this_time (line 91) | def test_set_system_time_to_this_time():
function test_to_string (line 97) | def test_to_string():
function test_from_iso8601 (line 127) | def test_from_iso8601():
function test_compilation_date (line 140) | def test_compilation_date():
function test_utc_offset_seconds (line 147) | def test_utc_offset_seconds():
function test_utc_offset_string (line 155) | def test_utc_offset_string():
function test_high_resolution_ticks (line 164) | def test_high_resolution_ticks():
function test_high_resolution_ticks_per_second (line 170) | def test_high_resolution_ticks_per_second():
function test_high_resolution_ticks_to_seconds (line 176) | def test_high_resolution_ticks_to_seconds():
function test_seconds_to_high_resolution_ticks (line 183) | def test_seconds_to_high_resolution_ticks():
function test_wait_for_millisecond_counter (line 190) | def test_wait_for_millisecond_counter():
function test_is_daylight_saving_time (line 201) | def test_is_daylight_saving_time():
function test_representation_methods (line 209) | def test_representation_methods():
function test_legacy_tests (line 216) | def test_legacy_tests():
FILE: tests/test_juce_core/test_URLInputSource.py
function test_url_input_source_constructor (line 5) | def test_url_input_source_constructor():
function test_create_stream (line 13) | def test_create_stream():
function test_create_stream_with_post_data (line 21) | def test_create_stream_with_post_data():
FILE: tests/test_juce_core/test_Uuid.py
function test_construct_empty (line 8) | def test_construct_empty():
function test_construct_null (line 15) | def test_construct_null():
function test_constuct_string (line 24) | def test_constuct_string():
function test_constuct_bytes (line 30) | def test_constuct_bytes():
function test_constuct_comparisons (line 48) | def test_constuct_comparisons():
function test_constuct_uuid (line 60) | def test_constuct_uuid():
function test_repr (line 67) | def test_repr():
FILE: tests/test_juce_core/test_WildcardFileFilter.py
function test_wildcard_file_filter_matches_correct_files (line 7) | def test_wildcard_file_filter_matches_correct_files():
function test_wildcard_file_filter_excludes_incorrect_files (line 13) | def test_wildcard_file_filter_excludes_incorrect_files():
function test_wildcard_file_filter_with_multiple_patterns (line 19) | def test_wildcard_file_filter_with_multiple_patterns():
FILE: tests/test_juce_core/test_XmlDocument.py
function xml_file (line 12) | def xml_file():
function broken_xml_file (line 16) | def broken_xml_file():
function test_construct_file (line 21) | def test_construct_file(xml_file, broken_xml_file):
function test_construct_string (line 45) | def test_construct_string(xml_file, broken_xml_file):
function test_construct_parse_file (line 69) | def test_construct_parse_file(xml_file, broken_xml_file):
function test_construct_parse_string (line 82) | def test_construct_parse_string(xml_file, broken_xml_file):
FILE: tests/test_juce_core/test_XmlElement.py
function xml_file (line 14) | def xml_file():
function broken_xml_file (line 18) | def broken_xml_file():
function test_construct_tag (line 23) | def test_construct_tag():
function test_to_string_text_format (line 29) | def test_to_string_text_format():
function test_tag_name_with_namespace (line 55) | def test_tag_name_with_namespace():
function test_attributes (line 77) | def test_attributes(name_type):
function test_compare_attributes (line 132) | def test_compare_attributes():
function test_child_elements (line 150) | def test_child_elements():
function test_text_element (line 159) | def test_text_element():
function test_child_elements_manipulation (line 182) | def test_child_elements_manipulation():
function test_invalid_xml_name (line 200) | def test_invalid_xml_name():
function test_namespace_handling (line 205) | def test_namespace_handling():
function test_deeply_nested_elements (line 215) | def test_deeply_nested_elements():
function test_sorting_child_elements (line 227) | def test_sorting_child_elements():
function test_sorting_child_elements_lambda (line 248) | def test_sorting_child_elements_lambda():
function test_complex_xml_structure_to_string (line 266) | def test_complex_xml_structure_to_string():
function test_attribute_value_comparisons (line 282) | def test_attribute_value_comparisons():
function test_handling_invalid_characters_in_text_elements (line 291) | def test_handling_invalid_characters_in_text_elements():
function test_write_to_file (line 298) | def test_write_to_file():
function test_write_to_stream (line 312) | def test_write_to_stream():
function test_read_from_file (line 328) | def test_read_from_file():
FILE: tests/test_juce_core/test_ZipFile.py
function zip_file (line 15) | def zip_file():
function text_file (line 19) | def text_file():
function image_file (line 23) | def image_file():
function test_constructor_with_file (line 28) | def test_constructor_with_file(zip_file):
function test_constructor_with_nonexisting_file (line 34) | def test_constructor_with_nonexisting_file():
function test_constructor_with_input_stream (line 40) | def test_constructor_with_input_stream(zip_file):
function test_constructor_with_input_source (line 49) | def test_constructor_with_input_source(zip_file):
function test_get_entry_by_index (line 56) | def test_get_entry_by_index(zip_file):
function test_get_index_of_file_name (line 77) | def test_get_index_of_file_name(zip_file):
function test_get_entry_by_file_name (line 90) | def test_get_entry_by_file_name(zip_file):
function test_sort_entries_by_filename (line 102) | def test_sort_entries_by_filename(zip_file):
function test_create_stream_for_entry_by_index (line 113) | def test_create_stream_for_entry_by_index(zip_file):
function test_create_stream_for_entry_by_entry (line 120) | def test_create_stream_for_entry_by_entry(zip_file, text_file):
function test_uncompress_to (line 128) | def test_uncompress_to(zip_file, text_file, image_file):
function test_uncompress_to_not_overwrite (line 158) | def test_uncompress_to_not_overwrite(zip_file):
function test_uncompress_to_nonexistent (line 186) | def test_uncompress_to_nonexistent(zip_file):
function test_uncompress_entry (line 197) | def test_uncompress_entry(zip_file):
function test_uncompress_entry_with_overwrite_bool_false (line 208) | def test_uncompress_entry_with_overwrite_bool_false(zip_file):
function test_uncompress_entry_with_overwrite_bool_true (line 227) | def test_uncompress_entry_with_overwrite_bool_true(zip_file, text_file):
function test_builder_add_file (line 247) | def test_builder_add_file(text_file):
function test_builder_add_stream_entry (line 264) | def test_builder_add_stream_entry(text_file):
FILE: tests/test_juce_data_structures/test_CachedValue.py
function test_constructor_raises (line 7) | def test_constructor_raises():
function test_construct_with_valuetree_property (line 24) | def test_construct_with_valuetree_property():
function test_construct_with_default_value (line 33) | def test_construct_with_default_value():
function test_get_and_set_value (line 43) | def test_get_and_set_value():
function test_get_property_as_value (line 54) | def test_get_property_as_value():
function test_reset_to_default (line 65) | def test_reset_to_default():
function test_comparison_operators (line 77) | def test_comparison_operators():
function test_refer_to_raises (line 95) | def test_refer_to_raises():
function test_refer_to_and_valuetree_changes (line 116) | def test_refer_to_and_valuetree_changes():
function test_refer_to_with_default (line 129) | def test_refer_to_with_default():
function test_force_update_of_cached_value (line 142) | def test_force_update_of_cached_value():
function test_is_using_default (line 155) | def test_is_using_default():
function test_value_change_with_undo_manager (line 169) | def test_value_change_with_undo_manager():
FILE: tests/test_juce_data_structures/test_PropertiesFile.py
function options (line 10) | def options():
function test_options_default_file (line 21) | def test_options_default_file(options):
function test_properties_file_creation_with_options (line 36) | def test_properties_file_creation_with_options(options):
function test_properties_file_creation_with_file_and_options (line 42) | def test_properties_file_creation_with_file_and_options(options):
function test_properties_file_save_if_needed_initial_state (line 49) | def test_properties_file_save_if_needed_initial_state(options):
function test_properties_file_needs_to_be_saved (line 55) | def test_properties_file_needs_to_be_saved(options):
function test_properties_file_set_needs_to_be_saved (line 62) | def test_properties_file_set_needs_to_be_saved(options):
function test_properties_file_save (line 72) | def test_properties_file_save(options):
function test_properties_file_reload (line 83) | def test_properties_file_reload(options):
function test_properties_file_value_manipulation (line 89) | def test_properties_file_value_manipulation(options):
function test_properties_file_reload_after_value_change (line 99) | def test_properties_file_reload_after_value_change(options):
class CustomListener (line 112) | class CustomListener(juce.ChangeListener):
method changeListenerCallback (line 115) | def changeListenerCallback(self, object):
function test_properties_file_property_changed_callback (line 118) | def test_properties_file_property_changed_callback(options, juce_app):
FILE: tests/test_juce_data_structures/test_UndoManager.py
class CustomAction (line 8) | class CustomAction(juce.UndoableAction):
method __init__ (line 12) | def __init__(self, value):
method perform (line 16) | def perform(self):
method undo (line 21) | def undo(self):
function test_undoable_action (line 28) | def test_undoable_action():
function test_undoable_action_ownership (line 80) | def test_undoable_action_ownership():
FILE: tests/test_juce_data_structures/test_Value.py
function test_var_constructor (line 5) | def test_var_constructor():
class ValueListener (line 52) | class ValueListener(juce.Value.Listener):
method valueChanged (line 55) | def valueChanged(self, value):
function test_value_listener (line 60) | def test_value_listener(juce_app):
class ValueSource (line 84) | class ValueSource(juce.Value.ValueSource):
method setValue (line 87) | def setValue(self, value):
method getValue (line 91) | def getValue(self):
function test_value_source (line 96) | def test_value_source(juce_app):
FILE: tests/test_juce_data_structures/test_ValueTree.py
class CustomListener (line 5) | class CustomListener(juce.ValueTree.Listener):
method valueTreePropertyChanged (line 8) | def valueTreePropertyChanged(self, tree, property):
method valueTreeChildAdded (line 11) | def valueTreeChildAdded(self, parentTree, childWhichHasBeenAdded):
method valueTreeChildRemoved (line 14) | def valueTreeChildRemoved(self, parentTree, childWhichHasBeenRemoved, ...
method valueTreeChildOrderChanged (line 17) | def valueTreeChildOrderChanged(self, parentTreeWhoseChildrenHaveMoved,...
function test_empty_constructor (line 22) | def test_empty_constructor():
function test_simple_constructor (line 36) | def test_simple_constructor():
function test_python_constructor (line 53) | def test_python_constructor():
function test_copy_constructor (line 70) | def test_copy_constructor():
function test_equality_operators (line 77) | def test_equality_operators():
function test_is_equivalent_to (line 86) | def test_is_equivalent_to():
function test_deep_copy_and_equivalence (line 95) | def test_deep_copy_and_equivalence():
function test_properties (line 112) | def test_properties():
function test_create_copy (line 132) | def test_create_copy():
function test_set_get_property (line 140) | def test_set_get_property():
function test_remove_property (line 147) | def test_remove_property():
function test_children (line 155) | def test_children():
function test_add_get_remove_child (line 198) | def test_add_get_remove_child():
function test_get_child_with_property (line 209) | def test_get_child_with_property():
function test_serialize_deserialize (line 220) | def test_serialize_deserialize():
function test_undo_redo_property_change (line 240) | def test_undo_redo_property_change():
function test_complex_property_and_child_manipulation (line 259) | def test_complex_property_and_child_manipulation():
function test_property_and_child_iteration (line 287) | def test_property_and_child_iteration():
function test_value_tree_listener (line 308) | def test_value_tree_listener():
function test_listener_on_child_added (line 325) | def test_listener_on_child_added():
function test_listener_on_child_removed (line 337) | def test_listener_on_child_removed():
function test_listener_on_child_order_changed (line 351) | def test_listener_on_child_order_changed():
function test_listener_removal (line 368) | def test_listener_removal():
function test_basic_xml_export (line 384) | def test_basic_xml_export():
function test_nested_xml_export (line 405) | def test_nested_xml_export():
function test_xml_round_trip (line 431) | def test_xml_round_trip():
function test_stress_large_data_sets (line 448) | def test_stress_large_data_sets():
FILE: tests/test_juce_data_structures/test_ValueTreeSynchroniser.py
class CustomSynchroniser (line 6) | class CustomSynchroniser(juce.ValueTreeSynchroniser):
method __init__ (line 9) | def __init__(self, tree):
method stateChanged (line 12) | def stateChanged(self, encodedChange):
function value_tree (line 18) | def value_tree():
function test_value_tree_synchroniser_construction (line 23) | def test_value_tree_synchroniser_construction(value_tree):
function test_send_full_sync_callback (line 29) | def test_send_full_sync_callback(value_tree):
function test_apply_change_success (line 36) | def test_apply_change_success(value_tree):
function test_apply_change_failure (line 48) | def test_apply_change_failure(value_tree):
function test_get_root (line 55) | def test_get_root(value_tree):
FILE: tests/test_juce_events/test_ActionBroadcaster.py
class ActionListener (line 5) | class ActionListener(juce.ActionListener):
method actionListenerCallback (line 9) | def actionListenerCallback(self, message):
function test_single_send (line 15) | def test_single_send(juce_app):
function test_multi_send (line 30) | def test_multi_send(juce_app):
function test_remove_listener (line 47) | def test_remove_listener(juce_app):
function test_remove_all_listeners (line 66) | def test_remove_all_listeners(juce_app):
FILE: tests/test_juce_events/test_AsyncUpdater.py
class AsyncUpdater (line 5) | class AsyncUpdater(juce.AsyncUpdater):
method handleAsyncUpdate (line 8) | def handleAsyncUpdate(self):
function test_single_trigger (line 13) | def test_single_trigger(juce_app):
function test_multiple_trigger (line 25) | def test_multiple_trigger(juce_app):
function test_cancel_single_trigger (line 40) | def test_cancel_single_trigger(juce_app):
function test_handle_update_now (line 54) | def test_handle_update_now(juce_app):
FILE: tests/test_juce_events/test_ChangeBroadcaster.py
class ChangeListener (line 5) | class ChangeListener(juce.ChangeListener):
method changeListenerCallback (line 9) | def changeListenerCallback(self, broadcaster):
function test_single_send (line 15) | def test_single_send(juce_app):
function test_multi_send (line 30) | def test_multi_send(juce_app):
function test_multi_send_separate_broadcasters (line 47) | def test_multi_send_separate_broadcasters(juce_app):
function test_remove_listener (line 68) | def test_remove_listener(juce_app):
function test_remove_all_listeners (line 96) | def test_remove_all_listeners(juce_app):
function test_synchronous_send (line 121) | def test_synchronous_send(juce_app):
function test_dispatch_pending_messages (line 144) | def test_dispatch_pending_messages(juce_app):
FILE: tests/test_juce_events/test_LockingAsyncUpdater.py
function test_single_trigger (line 5) | def test_single_trigger(juce_app):
function test_multiple_trigger (line 23) | def test_multiple_trigger(juce_app):
function test_cancel_single_trigger (line 44) | def test_cancel_single_trigger(juce_app):
function test_handle_update_now (line 64) | def test_handle_update_now(juce_app):
FILE: tests/test_juce_events/test_Message.py
class Message (line 7) | class Message(juce.Message):
method messageCallback (line 8) | def messageCallback(self):
function test_construct_and_post (line 14) | def test_construct_and_post(juce_app):
FILE: tests/test_juce_events/test_MessageListener.py
class Message (line 8) | class Message(juce.Message):
method __init__ (line 9) | def __init__(self, name):
method getName (line 13) | def getName(self):
method messageCallback (line 16) | def messageCallback(self):
class MessageListener (line 20) | class MessageListener(juce.MessageListener):
method handleMessage (line 24) | def handleMessage(self, message):
function test_construct_and_post (line 30) | def test_construct_and_post(juce_app):
FILE: tests/test_juce_events/test_MessageManager.py
function test_message_manager_instance (line 5) | def test_message_manager_instance():
function test_message_manager_run_dispatch_loop_until (line 16) | def test_message_manager_run_dispatch_loop_until():
class ActionListener (line 31) | class ActionListener(juce.ActionListener):
method actionListenerCallback (line 34) | def actionListenerCallback(self, message: str):
function test_message_manager_broadcast_listener (line 37) | def test_message_manager_broadcast_listener():
class Thread (line 54) | class Thread(juce.Thread):
method run (line 62) | def run(self):
method runOnMessageThread (line 73) | def runOnMessageThread(self):
function test_message_manager_lock (line 77) | def test_message_manager_lock(juce_app):
FILE: tests/test_juce_events/test_MultiTimer.py
class CustomMultiTimer (line 7) | class CustomMultiTimer(juce.MultiTimer):
method timerCallback (line 10) | def timerCallback(self, timerID):
function test_multi_timer (line 15) | def test_multi_timer(juce_app):
FILE: tests/test_juce_events/test_Timer.py
class CustomTimer (line 7) | class CustomTimer(juce.Timer):
method timerCallback (line 10) | def timerCallback(self):
function test_single_timer (line 15) | def test_single_timer(juce_app):
function test_call_pending_timers_synchronously (line 38) | def test_call_pending_timers_synchronously(juce_app):
function test_call_after_delay (line 55) | def test_call_after_delay(juce_app):
FILE: tests/test_juce_graphics/test_AffineTransform.py
function test_construct_empty (line 8) | def test_construct_empty():
function test_is_singularity (line 14) | def test_is_singularity():
function test_construct_with_values (line 20) | def test_construct_with_values():
function test_copy_constructor (line 32) | def test_copy_constructor():
function test_assignment_operator (line 39) | def test_assignment_operator():
function test_equality (line 47) | def test_equality():
function test_inequality (line 54) | def test_inequality():
function test_transform_point (line 61) | def test_transform_point():
function test_transform_points_two_points (line 69) | def test_transform_points_two_points():
function test_transform_points_three_points (line 79) | def test_transform_points_three_points():
function test_translated (line 91) | def test_translated():
function test_translation_static (line 99) | def test_translation_static():
function test_rotated (line 106) | def test_rotated():
function test_scaled (line 112) | def test_scaled():
function test_sheared (line 119) | def test_sheared():
function test_inverted (line 126) | def test_inverted():
function test_from_target_points (line 133) | def test_from_target_points():
function test_followed_by (line 139) | def test_followed_by():
function test_is_only_translation (line 152) | def test_is_only_translation():
function test_get_translation_x (line 158) | def test_get_translation_x():
function test_get_translation_y (line 164) | def test_get_translation_y():
function test_get_determinant (line 170) | def test_get_determinant():
function test_vertical_flip (line 176) | def test_vertical_flip():
function test_transform_points_flip (line 184) | def test_transform_points_flip():
function test_transform_translate (line 212) | def test_transform_translate():
function test_legacy (line 225) | def test_legacy():
FILE: tests/test_juce_graphics/test_BorderSize.py
function test_construct_default (line 7) | def test_construct_default():
function test_construct_with_values (line 24) | def test_construct_with_values():
function test_construct_with_single_value (line 41) | def test_construct_with_single_value():
function test_get_top_and_bottom (line 58) | def test_get_top_and_bottom():
function test_get_left_and_right (line 67) | def test_get_left_and_right():
function test_set_top (line 76) | def test_set_top():
function test_set_left (line 87) | def test_set_left():
function test_set_bottom (line 98) | def test_set_bottom():
function test_set_right (line 109) | def test_set_right():
function test_subtract_from_rectangle (line 120) | def test_subtract_from_rectangle():
function test_subtract_from_rectangle_in_place (line 133) | def test_subtract_from_rectangle_in_place():
function test_add_to_rectangle (line 146) | def test_add_to_rectangle():
function test_add_to_rectangle_in_place (line 159) | def test_add_to_rectangle_in_place():
function test_subtract_from_border (line 172) | def test_subtract_from_border():
function test_add_to_border (line 185) | def test_add_to_border():
function test_multiply_by_scalar (line 198) | def test_multiply_by_scalar():
function test_equality (line 209) | def test_equality():
function test_inequality (line 220) | def test_inequality():
function test_repr (line 231) | def test_repr():
FILE: tests/test_juce_graphics/test_Colour.py
function test_construct_default (line 7) | def test_construct_default():
function test_construct_copy (line 11) | def test_construct_copy():
function test_construct_rgb (line 16) | def test_construct_rgb():
function test_construct_rgba (line 20) | def test_construct_rgba():
function test_construct_hsb_int_alpha (line 24) | def test_construct_hsb_int_alpha():
function test_construct_hsb (line 28) | def test_construct_hsb():
function test_construct_rgba_float_alpha (line 32) | def test_construct_rgba_float_alpha():
function test_construct_from_argb (line 36) | def test_construct_from_argb():
function test_construct_from_rgb (line 40) | def test_construct_from_rgb():
function test_construct_from_rgba (line 44) | def test_construct_from_rgba():
function test_construct_from_float_rgba (line 48) | def test_construct_from_float_rgba():
function test_construct_from_hsv (line 52) | def test_construct_from_hsv():
function test_construct_from_hsl (line 56) | def test_construct_from_hsl():
function test_construct_with_pixel_argb (line 60) | def test_construct_with_pixel_argb():
function test_construct_with_pixel_rgb (line 65) | def test_construct_with_pixel_rgb():
function test_construct_with_pixel_alpha (line 70) | def test_construct_with_pixel_alpha():
function test_getters (line 77) | def test_getters():
function test_get_pixel_argb (line 90) | def test_get_pixel_argb():
function test_get_non_premultiplied_pixel_argb (line 97) | def test_get_non_premultiplied_pixel_argb():
function test_equality (line 104) | def test_equality():
function test_inequality (line 109) | def test_inequality():
function test_is_opaque (line 116) | def test_is_opaque():
function test_with_alpha_uint8 (line 124) | def test_with_alpha_uint8():
function test_with_alpha_float (line 130) | def test_with_alpha_float():
function test_with_multiplied_alpha (line 138) | def test_with_multiplied_alpha():
function test_get_hue (line 145) | def test_get_hue():
function test_get_saturation (line 149) | def test_get_saturation():
function test_get_saturation_hsl (line 153) | def test_get_saturation_hsl():
function test_get_brightness (line 157) | def test_get_brightness():
function test_get_lightness (line 161) | def test_get_lightness():
function test_get_perceived_brightness (line 165) | def test_get_perceived_brightness():
function test_get_hsb (line 171) | def test_get_hsb():
function test_get_hsl (line 178) | def test_get_hsl():
function test_with_hue (line 187) | def test_with_hue():
function test_with_saturation (line 192) | def test_with_saturation():
function test_with_brightness (line 197) | def test_with_brightness():
function test_with_saturation_hsl (line 202) | def test_with_saturation_hsl():
function test_with_lightness (line 207) | def test_with_lightness():
function test_with_rotated_hue (line 212) | def test_with_rotated_hue():
function test_with_multiplied_saturation (line 219) | def test_with_multiplied_saturation():
function test_with_multiplied_saturation_hsl (line 224) | def test_with_multiplied_saturation_hsl():
function test_with_multiplied_brightness (line 229) | def test_with_multiplied_brightness():
function test_with_multiplied_lightness (line 234) | def test_with_multiplied_lightness():
function test_brighter (line 241) | def test_brighter():
function test_darker (line 246) | def test_darker():
function test_contrasting (line 253) | def test_contrasting():
function test_contrasting_with_min_luminosity_diff (line 258) | def test_contrasting_with_min_luminosity_diff():
function test_contrasting_static (line 263) | def test_contrasting_static():
function test_grey_level (line 273) | def test_grey_level():
function test_overlaid_with (line 279) | def test_overlaid_with():
function test_interpolated_with (line 292) | def test_interpolated_with():
function test_to_string (line 304) | def test_to_string():
function test_to_display_string (line 308) | def test_to_display_string():
FILE: tests/test_juce_graphics/test_ColourGradient.py
function test_construct_default (line 7) | def test_construct_default():
function test_copy_construct (line 17) | def test_copy_construct():
function test_construct_coordinates_linear (line 25) | def test_construct_coordinates_linear():
function test_construct_points_linear (line 34) | def test_construct_points_linear():
function test_construct_coordinates_radial (line 43) | def test_construct_coordinates_radial():
function test_construct_points_radial (line 52) | def test_construct_points_radial():
function test_colour_at_position (line 61) | def test_colour_at_position():
function test_get_colour_position (line 69) | def test_get_colour_position():
function test_set_colour (line 76) | def test_set_colour():
function test_add_remove_colour (line 85) | def test_add_remove_colour():
function test_remove_colour (line 115) | def test_remove_colour():
function test_vertical_values (line 128) | def test_vertical_values():
function test_vertical_rectangle_int (line 134) | def test_vertical_rectangle_int():
function test_vertical_rectangle_float (line 140) | def test_vertical_rectangle_float():
function test_horizontal_values (line 148) | def test_horizontal_values():
function test_horizontal_rectangle_int (line 154) | def test_horizontal_rectangle_int():
function test_horizontal_rectangle_float (line 160) | def test_horizontal_rectangle_float():
function test_is_invisible_is_opaque (line 168) | def test_is_invisible_is_opaque():
FILE: tests/test_juce_graphics/test_FillType.py
function test_default_constructor (line 8) | def test_default_constructor():
function test_colour_constructor (line 20) | def test_colour_constructor():
function test_gradient_constructor (line 32) | def test_gradient_constructor():
function test_image_constructor (line 44) | def test_image_constructor():
function test_copy_constructor (line 56) | def test_copy_constructor():
function test_set_colour (line 65) | def test_set_colour():
function test_set_gradient (line 73) | def test_set_gradient():
function test_set_image (line 81) | def test_set_image():
function test_set_opacity (line 89) | def test_set_opacity():
function test_transformed (line 101) | def test_transformed():
FILE: tests/test_juce_graphics/test_Graphics.py
function update_rendering (line 18) | def update_rendering(pytestconfig):
function test_fill_all (line 23) | def test_fill_all(update_rendering):
function test_fill_all_image (line 34) | def test_fill_all_image(update_rendering):
function test_fill_rect (line 46) | def test_fill_rect(update_rendering):
function test_fill_rect_area (line 57) | def test_fill_rect_area(update_rendering):
function test_fill_rect_gradient_vertical (line 69) | def test_fill_rect_gradient_vertical(update_rendering):
function test_fill_rect_gradient_vertical_area (line 81) | def test_fill_rect_gradient_vertical_area(update_rendering):
function test_fill_rect_gradient_horizontal (line 95) | def test_fill_rect_gradient_horizontal(update_rendering):
function test_fill_rect_gradient_horizontal_area (line 107) | def test_fill_rect_gradient_horizontal_area(update_rendering):
function test_fill_rect_image (line 122) | def test_fill_rect_image(update_rendering):
function test_fill_rect_image_area (line 134) | def test_fill_rect_image_area(update_rendering):
function test_draw_rect (line 146) | def test_draw_rect(update_rendering):
function test_draw_rounded_rect (line 167) | def test_draw_rounded_rect(update_rendering):
FILE: tests/test_juce_graphics/test_Justification.py
function test_constructor (line 5) | def test_constructor():
function test_comparison (line 19) | def test_comparison():
function test_get_only_flags (line 31) | def test_get_only_flags():
function test_apply_to_rectangle_int (line 38) | def test_apply_to_rectangle_int():
function test_apply_to_rectangle_float (line 52) | def test_apply_to_rectangle_float():
FILE: tests/test_juce_graphics/test_Line.py
function test_empty_constructor (line 7) | def test_empty_constructor():
function test_values_constructor (line 22) | def test_values_constructor():
function test_points_constructor (line 37) | def test_points_constructor():
function test_copy_constructor (line 52) | def test_copy_constructor():
function test_get_start_end (line 69) | def test_get_start_end():
function test_set_start_end_values (line 84) | def test_set_start_end_values():
function test_reversed (line 103) | def test_reversed():
function test_apply_transform (line 120) | def test_apply_transform():
function test_length (line 139) | def test_length():
function test_vertical_horizontal (line 158) | def test_vertical_horizontal():
function test_get_angle (line 177) | def test_get_angle():
function test_to_float (line 198) | def test_to_float():
FILE: tests/test_juce_graphics/test_Parallelogram.py
function test_empty_constructor (line 8) | def test_empty_constructor():
function test_rectangle_constructor (line 37) | def test_rectangle_constructor():
function test_is_empty (line 67) | def test_is_empty():
function test_operator_add_assign (line 76) | def test_operator_add_assign():
function test_operator_add (line 101) | def test_operator_add():
function test_operator_sub_assign (line 126) | def test_operator_sub_assign():
function test_operator_sub (line 151) | def test_operator_sub():
function test_operator_mul_assign (line 176) | def test_operator_mul_assign():
function test_operator_mul (line 201) | def test_operator_mul():
function test_transformed_by (line 226) | def test_transformed_by():
function test_relative_point (line 253) | def test_relative_point():
function test_bounding_box (line 266) | def test_bounding_box():
FILE: tests/test_juce_graphics/test_Path.py
function make_box_path (line 5) | def make_box_path(size: float) -> juce.Path:
function test_constructor (line 16) | def test_constructor():
function test_copy_constructor (line 23) | def test_copy_constructor():
function test_get_bounds (line 36) | def test_get_bounds():
function test_get_bounds_transformed (line 46) | def test_get_bounds_transformed():
function test_contains (line 56) | def test_contains():
function test_intersects_line (line 73) | def test_intersects_line():
function test_round_trips (line 81) | def test_round_trips():
FILE: tests/test_juce_graphics/test_PathStrokeType.py
function test_constructor (line 7) | def test_constructor():
function test_stroke_tickness (line 37) | def test_stroke_tickness():
function test_joint_style (line 44) | def test_joint_style():
function test_end_style (line 51) | def test_end_style():
function test_create_stroked_path (line 58) | def test_create_stroked_path():
FILE: tests/test_juce_graphics/test_PixelARGB.py
function test_pixel_argb_default_constructor (line 7) | def test_pixel_argb_default_constructor():
function test_pixel_argb_constructor_with_values (line 16) | def test_pixel_argb_constructor_with_values():
function test_pixel_argb_get_native_argb (line 25) | def test_pixel_argb_get_native_argb():
function test_pixel_argb_get_in_argb_mask_order (line 31) | def test_pixel_argb_get_in_argb_mask_order():
function test_pixel_argb_get_in_argb_memory_order (line 37) | def test_pixel_argb_get_in_argb_memory_order():
function test_pixel_argb_get_even_bytes (line 47) | def test_pixel_argb_get_even_bytes():
function test_pixel_argb_get_odd_bytes (line 53) | def test_pixel_argb_get_odd_bytes():
function test_pixel_argb_set_argb (line 59) | def test_pixel_argb_set_argb():
function test_pixel_argb_blend (line 69) | def test_pixel_argb_blend():
function test_pixel_argb_set_alpha (line 80) | def test_pixel_argb_set_alpha():
function test_pixel_argb_multiply_alpha_float (line 96) | def test_pixel_argb_multiply_alpha_float():
function test_pixel_argb_premultiply (line 103) | def test_pixel_argb_premultiply():
function test_pixel_argb_unpremultiply (line 115) | def test_pixel_argb_unpremultiply():
function test_pixel_argb_desaturate (line 124) | def test_pixel_argb_desaturate():
FILE: tests/test_juce_graphics/test_PixelAlpha.py
function test_pixel_alpha_default_constructor (line 7) | def test_pixel_alpha_default_constructor():
function test_pixel_alpha_set_alpha (line 13) | def test_pixel_alpha_set_alpha():
function test_pixel_alpha_get_native_argb (line 20) | def test_pixel_alpha_get_native_argb():
function test_pixel_alpha_get_in_argb_mask_order (line 26) | def test_pixel_alpha_get_in_argb_mask_order():
function test_pixel_alpha_get_in_argb_memory_order (line 32) | def test_pixel_alpha_get_in_argb_memory_order():
function test_pixel_alpha_get_even_bytes (line 39) | def test_pixel_alpha_get_even_bytes():
function test_pixel_alpha_get_odd_bytes (line 45) | def test_pixel_alpha_get_odd_bytes():
function test_pixel_alpha_set_argb (line 51) | def test_pixel_alpha_set_argb():
function test_pixel_alpha_blend_with_extra_alpha (line 58) | def test_pixel_alpha_blend_with_extra_alpha():
function test_pixel_alpha_multiply_alpha_int (line 66) | def test_pixel_alpha_multiply_alpha_int():
function test_pixel_alpha_multiply_alpha_float (line 73) | def test_pixel_alpha_multiply_alpha_float():
function test_pixel_alpha_premultiply (line 80) | def test_pixel_alpha_premultiply():
function test_pixel_alpha_unpremultiply (line 87) | def test_pixel_alpha_unpremultiply():
function test_pixel_alpha_desaturate (line 94) | def test_pixel_alpha_desaturate():
FILE: tests/test_juce_graphics/test_PixelRGB.py
function test_pixel_rgb_default_constructor (line 7) | def test_pixel_rgb_default_constructor():
function test_pixel_rgb_set_argb (line 16) | def test_pixel_rgb_set_argb():
function test_pixel_rgb_get_native_argb (line 25) | def test_pixel_rgb_get_native_argb():
function test_pixel_rgb_get_in_argb_mask_order (line 31) | def test_pixel_rgb_get_in_argb_mask_order():
function test_pixel_rgb_get_in_argb_memory_order (line 37) | def test_pixel_rgb_get_in_argb_memory_order():
function test_pixel_rgb_get_even_bytes (line 47) | def test_pixel_rgb_get_even_bytes():
function test_pixel_rgb_get_odd_bytes (line 53) | def test_pixel_rgb_get_odd_bytes():
function test_pixel_rgb_blend (line 59) | def test_pixel_rgb_blend():
function test_pixel_rgb_multiply_alpha_int (line 69) | def test_pixel_rgb_multiply_alpha_int():
function test_pixel_rgb_multiply_alpha_float (line 78) | def test_pixel_rgb_multiply_alpha_float():
function test_pixel_rgb_premultiply (line 87) | def test_pixel_rgb_premultiply():
function test_pixel_rgb_unpremultiply (line 96) | def test_pixel_rgb_unpremultiply():
function test_pixel_rgb_desaturate (line 105) | def test_pixel_rgb_desaturate():
FILE: tests/test_juce_graphics/test_Point.py
function test_empty_constructor (line 8) | def test_empty_constructor():
function test_value_constructor (line 27) | def test_value_constructor():
function test_infinite_constructor (line 42) | def test_infinite_constructor():
function test_set_xy (line 48) | def test_set_xy():
function test_with_xy (line 83) | def test_with_xy():
function test_add_xy (line 94) | def test_add_xy():
function test_translated (line 107) | def test_translated():
function test_operator_add (line 120) | def test_operator_add():
function test_operator_subtract (line 143) | def test_operator_subtract():
function test_operator_multiply (line 166) | def test_operator_multiply():
function test_operator_multiply_scalar (line 189) | def test_operator_multiply_scalar():
function test_operator_divide (line 211) | def test_operator_divide():
function test_operator_divide_scalar (line 234) | def test_operator_divide_scalar():
function test_operator_unary_minus (line 255) | def test_operator_unary_minus():
function test_distance_from_origin (line 270) | def test_distance_from_origin():
function test_distance_squared_from_origin (line 291) | def test_distance_squared_from_origin():
function test_distance_from (line 312) | def test_distance_from():
function test_distance_squared_from (line 333) | def test_distance_squared_from():
function test_angle_to_point (line 354) | def test_angle_to_point():
function test_rotated_about_origin_int (line 382) | def test_rotated_about_origin_int():
function test_rotated_about_origin_float (line 388) | def test_rotated_about_origin_float():
function test_point_on_circumference_int (line 397) | def test_point_on_circumference_int():
function test_point_on_circumference_float (line 418) | def test_point_on_circumference_float():
function test_dot_product (line 439) | def test_dot_product():
function test_apply_transform (line 452) | def test_apply_transform():
function test_transformed_by (line 467) | def test_transformed_by():
function test_round_to_int (line 482) | def test_round_to_int():
function test_to_float (line 491) | def test_to_float():
function test_to_int (line 500) | def test_to_int():
function test_to_string (line 507) | def test_to_string():
FILE: tests/test_juce_graphics/test_Rectangle.py
function test_rectangle_default_constructor (line 7) | def test_rectangle_default_constructor():
function test_rectangle_copy_constructor (line 16) | def test_rectangle_copy_constructor():
function test_rectangle_position_and_size_constructor (line 26) | def test_rectangle_position_and_size_constructor():
function test_rectangle_size_constructor (line 35) | def test_rectangle_size_constructor():
function test_rectangle_corners_constructor (line 44) | def test_rectangle_corners_constructor():
function test_rectangle_is_empty (line 55) | def test_rectangle_is_empty():
function test_rectangle_get_set_position (line 76) | def test_rectangle_get_set_position():
function test_rectangle_get_set_size (line 88) | def test_rectangle_get_set_size():
function test_rectangle_get_set_bounds (line 96) | def test_rectangle_get_set_bounds():
function test_rectangle_translate (line 106) | def test_rectangle_translate():
function test_rectangle_with_position (line 114) | def test_rectangle_with_position():
function test_rectangle_with_size (line 128) | def test_rectangle_with_size():
function test_rectangle_contains_point (line 138) | def test_rectangle_contains_point():
function test_rectangle_intersection (line 147) | def test_rectangle_intersection():
function test_rectangle_get_intersection (line 157) | def test_rectangle_get_intersection():
function test_rectangle_union (line 172) | def test_rectangle_union():
function test_rectangle_expand (line 183) | def test_rectangle_expand():
function test_rectangle_expanded (line 193) | def test_rectangle_expanded():
function test_rectangle_reduce (line 203) | def test_rectangle_reduce():
function test_rectangle_reduced (line 213) | def test_rectangle_reduced():
func
Condensed preview — 264 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (3,328K chars).
[
{
"path": ".gitattributes",
"chars": 18,
"preview": "* text=auto eol=lf"
},
{
"path": ".github/FUNDING.yml",
"chars": 642,
"preview": "# These are supported funding model platforms\n\ngithub: kunitoki\npatreon: # Replace with a single Patreon username\nopen_c"
},
{
"path": ".github/workflows/build_linux.yml",
"chars": 1871,
"preview": "name: Linux Builds\n\non:\n push:\n branches:\n - '**'\n paths:\n - \"**/workflows/build_linux.yml\"\n - \"**"
},
{
"path": ".github/workflows/build_macos.yml",
"chars": 1675,
"preview": "name: macOS Builds\n\non:\n push:\n branches:\n - '**'\n paths:\n - \"**/workflows/build_macos.yml\"\n - \"**"
},
{
"path": ".github/workflows/build_windows.yml",
"chars": 1686,
"preview": "name: Windows Builds\n\non:\n push:\n branches:\n - '**'\n paths:\n - \"**/workflows/build_windows.yml\"\n -"
},
{
"path": ".github/workflows/coverage.yml",
"chars": 1209,
"preview": "name: Code Coverage\n\non:\n push:\n branches:\n - '**'\n paths:\n - \"**/workflows/coverage.yml\"\n - \"**/c"
},
{
"path": ".github/workflows/wheels.yml",
"chars": 4680,
"preview": "name: Wheels Deploy\n\non:\n push:\n tags:\n - 'v[0-9]+.[0-9]+.[0-9]+'\n\nconcurrency:\n group: ${{ github.workflow }}"
},
{
"path": ".gitignore",
"chars": 97,
"preview": "__pycache__/\n.eggs/\n.vscode/\ncoverage/\ndist/\nbuild/\npopsicle/\n*.egg-info/\n\n.DS_Store\n*.pyc\n*.pyi\n"
},
{
"path": ".gitmodules",
"chars": 82,
"preview": "[submodule \"JUCE\"]\n\tpath = JUCE\n\turl = https://github.com/juce-framework/JUCE.git\n"
},
{
"path": "CHANGES.md",
"chars": 10,
"preview": "## Master\n"
},
{
"path": "CMakeLists.txt",
"chars": 6507,
"preview": "cmake_minimum_required (VERSION 3.21)\n\nset (PROJECT_NAME popsicle)\n\nget_filename_component (ROOT_PATH \"${CMAKE_CURRENT_L"
},
{
"path": "LICENSE",
"chars": 1045,
"preview": "DUAL LICENSE NOTICE\n\nThis software is dually licensed:\n\n1. GPLv3 LICENSE:\n - The GPLv3 License is applicable for open-"
},
{
"path": "LICENSE.COMMERCIAL",
"chars": 3515,
"preview": "COMMERCIAL LICENSE AGREEMENT\n\nThis Commercial License Agreement (the \"Agreement\") is entered into by and between popsicl"
},
{
"path": "LICENSE.GPLv3",
"chars": 35104,
"preview": "\n GNU GENERAL PUBLIC LICENSE\n Version 3, 29 June 2007\n\n Copyright (C) 2007 Free"
},
{
"path": "MANIFEST.in",
"chars": 166,
"preview": "include README.rst\ninclude LICENSE LICENSE.GPLv3 LICENSE.COMMERCIAL\n\ngraft popsicle\ngraft popsicle.pyi\n\nglobal-exclude *"
},
{
"path": "README.rst",
"chars": 13766,
"preview": ".. image:: popsicle.jpg\n :alt: Popsicle: Python integration for JUCE with pybind11.\n :target: https://github.com/k"
},
{
"path": "cmake/ArchivePythonStdlib.py",
"chars": 3227,
"preview": "import os\nimport stat\nimport shutil\nimport hashlib\nimport zipfile\nfrom pathlib import Path\nfrom argparse import Argument"
},
{
"path": "cmake/CodeCoverage.cmake",
"chars": 31368,
"preview": "# Copyright (c) 2012 - 2017, Lars Bilke\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, wi"
},
{
"path": "demos/plugin/CMakeLists.txt",
"chars": 5413,
"preview": "cmake_minimum_required (VERSION 3.21)\n\nset (PROJECT_NAME popsicle_plugin_demo)\nget_filename_component (ROOT_PATH \"${CMAK"
},
{
"path": "demos/plugin/PopsiclePluginEditor.cpp",
"chars": 1220,
"preview": "#include \"PopsiclePluginProcessor.h\"\n#include \"PopsiclePluginEditor.h\"\n\n//=============================================="
},
{
"path": "demos/plugin/PopsiclePluginEditor.h",
"chars": 762,
"preview": "#pragma once\n\n#include \"PopsiclePluginProcessor.h\"\n\n//=================================================================="
},
{
"path": "demos/plugin/PopsiclePluginProcessor.cpp",
"chars": 7597,
"preview": "#include \"PopsiclePluginProcessor.h\"\n#include \"PopsiclePluginEditor.h\"\n\n// ============================================="
},
{
"path": "demos/plugin/PopsiclePluginProcessor.h",
"chars": 2022,
"preview": "#pragma once\n\n#include \"JuceHeader.h\"\n\n//==============================================================================\n"
},
{
"path": "demos/standalone/CMakeLists.txt",
"chars": 5040,
"preview": "cmake_minimum_required (VERSION 3.21)\n\nset (PROJECT_NAME popsicle_standalone_demo)\nget_filename_component (ROOT_PATH \"${"
},
{
"path": "demos/standalone/Main.cpp",
"chars": 2761,
"preview": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copy"
},
{
"path": "demos/standalone/PopsicleDemo.cpp",
"chars": 2915,
"preview": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copy"
},
{
"path": "demos/standalone/PopsicleDemo.h",
"chars": 1188,
"preview": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copy"
},
{
"path": "docs/EmbeddingTutorial.rst",
"chars": 4257,
"preview": "=========================\nPopsicle: Embedding Guide\n=========================\n\nTODO\n\n\n----------------------------------"
},
{
"path": "docs/QuickStartGuide.rst",
"chars": 5024,
"preview": "\n===========================\nPopsicle: Quick Start Guide\n===========================\n\nPopsicle is a groundbreaking proje"
},
{
"path": "docs/conf.py",
"chars": 7867,
"preview": "# -*- coding: utf-8 -*-\n\nimport sys, os\n\n# If extensions (or modules to document with autodoc) are in another directory,"
},
{
"path": "examples/.gitignore",
"chars": 13,
"preview": "emoji_cache/\n"
},
{
"path": "examples/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "examples/animated_component.py",
"chars": 1303,
"preview": "import math\n\nfrom juce_init import START_JUCE_COMPONENT\nimport popsicle as juce\n\n\nclass MainContentComponent(juce.Animat"
},
{
"path": "examples/audio_device.py",
"chars": 2276,
"preview": "import math\nimport random\n\nfrom juce_init import START_JUCE_COMPONENT\nimport popsicle as juce\n\n\nclass AudioCallback(juce"
},
{
"path": "examples/audio_player.py",
"chars": 6676,
"preview": "from enum import Enum\n\nfrom juce_init import START_JUCE_COMPONENT\nimport popsicle as juce\n\n\nclass TransportState(Enum):\n"
},
{
"path": "examples/audio_player_waveform.py",
"chars": 9648,
"preview": "from enum import Enum\n\nfrom juce_init import START_JUCE_COMPONENT\nimport popsicle as juce\n\n\nclass TransportState(Enum):\n"
},
{
"path": "examples/docs.py",
"chars": 195,
"preview": "import io\nfrom contextlib import redirect_stdout\n\nimport juce_init\nimport popsicle as juce\n\nwith io.StringIO() as buf, r"
},
{
"path": "examples/drawables.py",
"chars": 905,
"preview": "\nfrom juce_init import START_JUCE_COMPONENT\nimport popsicle as juce\n\n\n\nclass MainContentComponent(juce.Component):\n\tdef "
},
{
"path": "examples/emojis_component.py",
"chars": 5546,
"preview": "import re\nimport os\nimport hashlib\nfrom enum import Enum\nfrom io import BytesIO\nfrom textwrap import dedent\nfrom urllib."
},
{
"path": "examples/emojis_font_component.py",
"chars": 5828,
"preview": "import re\nimport os\nfrom enum import Enum\nfrom textwrap import dedent\nfrom typing import Dict, Final, List, NamedTuple\n\n"
},
{
"path": "examples/hotreload_component.py",
"chars": 614,
"preview": "import popsicle as juce\n\n__all__ = [\"TestComponent\"]\n\n\nclass TestComponent(juce.Component, juce.Timer):\n\ttime = 0.0\n\n\tde"
},
{
"path": "examples/hotreload_main.py",
"chars": 1863,
"preview": "import os\nimport importlib\n\nfrom juce_init import START_JUCE_COMPONENT\nimport popsicle as juce\n\n\nclass HotReloadContentC"
},
{
"path": "examples/juce_init.py",
"chars": 3128,
"preview": "import os\nimport sys\nimport glob\nimport time\nimport traceback\nfrom pathlib import Path\nfrom functools import wraps\n\n\ntry"
},
{
"path": "examples/juce_o_matic.py",
"chars": 2184,
"preview": "import juce_init\nimport popsicle as juce\n\n\nclass MainContentComponent(juce.Component, juce.Timer):\n\tdef __init__(self):\n"
},
{
"path": "examples/layout_flexgrid.py",
"chars": 4550,
"preview": "from juce_init import START_JUCE_COMPONENT\nimport popsicle as juce\n\n\nclass RightSidePanel(juce.Component):\n backgroun"
},
{
"path": "examples/layout_rectangles.py",
"chars": 2400,
"preview": "from juce_init import START_JUCE_COMPONENT\nimport popsicle as juce\n\n\nclass MainContentComponent(juce.Component):\n hea"
},
{
"path": "examples/matplotlib_integration.py",
"chars": 2734,
"preview": "import io\nimport multiprocessing\nimport queue\n\nimport numpy as np\nfrom matplotlib.figure import Figure\nfrom matplotlib.b"
},
{
"path": "examples/nim_audio.nim",
"chars": 588,
"preview": "import nimpy\nimport nimpy/raw_buffers\nimport std/[math, random]\n\nproc `+`[T](a: ptr T, b: int): ptr T =\n cast[ptr T]("
},
{
"path": "examples/nim_audio_integration.py",
"chars": 2223,
"preview": "import nimporter\nimport nim_audio\nimport numpy as np\n\nfrom juce_init import START_JUCE_COMPONENT\nimport popsicle as juce"
},
{
"path": "examples/numpy_audio.py",
"chars": 2432,
"preview": "import numpy as np\n\nfrom juce_init import START_JUCE_COMPONENT\nimport popsicle as juce\n\n\nclass AudioCallback(juce.AudioI"
},
{
"path": "examples/opencv_integration.py",
"chars": 3059,
"preview": "import os\nimport cv2\n\nfrom juce_init import START_JUCE_COMPONENT\nimport popsicle as juce\n\n\nclass MainContentComponent(ju"
},
{
"path": "examples/opencv_video.py",
"chars": 4723,
"preview": "import os\nimport cv2\nimport threading\nimport queue\n\nfrom juce_init import START_JUCE_COMPONENT\nimport popsicle as juce\n\n"
},
{
"path": "examples/opencv_video.xml",
"chars": 930127,
"preview": "<?xml version=\"1.0\"?>\n<!--\n Stump-based 24x24 discrete(?) adaboost frontal face detector.\n Created by Rainer Lienh"
},
{
"path": "examples/pil_image.py",
"chars": 783,
"preview": "\nimport popsicle as juce\n\n\nclass ImageJuce(juce.Image):\n def __init__(self, im):\n \"\"\"\n An PIL image wra"
},
{
"path": "examples/radio_buttons_checkboxes.py",
"chars": 2744,
"preview": "from juce_init import START_JUCE_COMPONENT\nimport popsicle as juce\n\n\nclass MainContentComponent(juce.Component):\n gen"
},
{
"path": "examples/slider_decibels.py",
"chars": 2277,
"preview": "from juce_init import START_JUCE_COMPONENT\nimport popsicle as juce\n\n\nclass DecibelSlider(juce.Slider):\n def __init__("
},
{
"path": "examples/slider_values.py",
"chars": 2183,
"preview": "from juce_init import START_JUCE_COMPONENT\nimport popsicle as juce\n\n\nclass MainContentComponent(juce.Component):\n fre"
},
{
"path": "examples/table_list_box.py",
"chars": 8858,
"preview": "import os\nimport re\n\nfrom juce_init import START_JUCE_COMPONENT\nimport popsicle as juce\n\n\ndef forEachXmlChildElement(par"
},
{
"path": "examples/table_list_box.xml",
"chars": 5688,
"preview": "<TABLE_DATA>\n <HEADERS>\n <COLUMN columnId=\"1\" name=\"ID\" width=\"50\"/>\n <COLUMN columnId=\"2\" name=\"Module"
},
{
"path": "examples/wavetable_oscillator.py",
"chars": 4252,
"preview": "import math\n\nfrom juce_init import START_JUCE_COMPONENT\nimport popsicle as juce\n\n\nclass WavetableOscillator(object):\n "
},
{
"path": "examples/wavetable_oscillator_numpy.py",
"chars": 4499,
"preview": "import math\nimport numpy as np\n\nfrom juce_init import START_JUCE_COMPONENT\nimport popsicle as juce\n\n\nclass WavetableOsci"
},
{
"path": "examples/webgpu/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "examples/webgpu/cube_popsicle.py",
"chars": 11312,
"preview": "\"\"\"\nImport the viz from triangle.py and run it using popsicle.\n\n# run_example = false\n\"\"\"\n\nimport sys\nimport time\nimport"
},
{
"path": "examples/webgpu/pbr2.py",
"chars": 3282,
"preview": "\"\"\"\n\nPBR Rendering 2\n===============\n\nThis example shows the lighting rendering affect of materials with different\nmetal"
},
{
"path": "examples/webgpu/pbr2_embed.py",
"chars": 6330,
"preview": "\"\"\"\n\nPBR Rendering 2\n===============\n\nThis example shows the lighting rendering affect of materials with different\nmetal"
},
{
"path": "examples/webgpu/pop.py",
"chars": 10235,
"preview": "\"\"\"\nSupport for rendering in a JUCE component. Provides a component subclass that\ncan be used as a standalone window or "
},
{
"path": "examples/webgpu/triangle.py",
"chars": 4713,
"preview": "\"\"\"\nExample use of the wgpu API to draw a triangle. This example is set up\nso it can be run on canvases provided by any "
},
{
"path": "examples/webgpu/triangle_popsicle.py",
"chars": 436,
"preview": "\"\"\"\nImport the viz from triangle.py and run it using popsicle.\n\n# run_example = false\n\"\"\"\n\nimport sys\nimport wgpu\n\nfrom "
},
{
"path": "examples/webgpu/triangle_popsicle_embed.py",
"chars": 2859,
"preview": "\"\"\"\nAn example demonstrating a popsicle app with a wgpu viz inside.\n\"\"\"\n\n# run_example = false\n\nimport popsicle as juce\n"
},
{
"path": "examples/wip/audio_callback_cpp.py",
"chars": 1734,
"preview": "import sys\nsys.path.insert(0, \"../\")\n\nimport cppyy\n\nfrom popsicle import juce_gui_basics, juce_audio_utils\nfrom popsicle"
},
{
"path": "examples/wip/audio_player_cpp.py",
"chars": 6377,
"preview": "import sys\nsys.path.insert(0, \"../\")\n\nimport math\nimport cppyy\nfrom enum import Enum\n\nfrom popsicle import juce_gui_basi"
},
{
"path": "examples/wip/copy_image_pixels.py",
"chars": 739,
"preview": "import popsicle as juce\n\ndef createImageFromBuffer(image_data: bytes, width: int, height: int) -> juce.Image:\n img = "
},
{
"path": "examples/wip/synth_midi_input.py",
"chars": 7075,
"preview": "import sys\nsys.path.insert(0, \"../\")\n\nimport math\nimport cppyy\nimport cppyy.ll\n\nfrom popsicle import juce_gui_basics, ju"
},
{
"path": "justfile",
"chars": 206,
"preview": "wheel:\n python -m build --wheel -n && just install\n\ninstall:\n pip install --force-reinstall dist/popsicle-*.whl\n\nu"
},
{
"path": "modules/CMakeLists.txt",
"chars": 1170,
"preview": "juce_add_modules(juce_python)\n\nadd_library(juce_python_recommended_warning_flags INTERFACE)\nif((CMAKE_CXX_COMPILER_ID ST"
},
{
"path": "modules/juce_python/bindings/ScriptJuceAudioBasicsBindings.cpp",
"chars": 43760,
"preview": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copy"
},
{
"path": "modules/juce_python/bindings/ScriptJuceAudioBasicsBindings.h",
"chars": 4312,
"preview": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copy"
},
{
"path": "modules/juce_python/bindings/ScriptJuceAudioDevicesBindings.cpp",
"chars": 16490,
"preview": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copy"
},
{
"path": "modules/juce_python/bindings/ScriptJuceAudioDevicesBindings.h",
"chars": 9507,
"preview": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copy"
},
{
"path": "modules/juce_python/bindings/ScriptJuceAudioFormatsBindings.cpp",
"chars": 17062,
"preview": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copy"
},
{
"path": "modules/juce_python/bindings/ScriptJuceAudioFormatsBindings.h",
"chars": 11293,
"preview": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copy"
},
{
"path": "modules/juce_python/bindings/ScriptJuceAudioProcessorsBindings.cpp",
"chars": 1078,
"preview": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copy"
},
{
"path": "modules/juce_python/bindings/ScriptJuceAudioProcessorsBindings.h",
"chars": 1340,
"preview": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copy"
},
{
"path": "modules/juce_python/bindings/ScriptJuceAudioUtilsBindings.cpp",
"chars": 5484,
"preview": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copy"
},
{
"path": "modules/juce_python/bindings/ScriptJuceAudioUtilsBindings.h",
"chars": 6573,
"preview": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copy"
},
{
"path": "modules/juce_python/bindings/ScriptJuceBindings.cpp",
"chars": 3331,
"preview": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copy"
},
{
"path": "modules/juce_python/bindings/ScriptJuceCoreBindings.cpp",
"chars": 139230,
"preview": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copy"
},
{
"path": "modules/juce_python/bindings/ScriptJuceCoreBindings.h",
"chars": 27839,
"preview": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copy"
},
{
"path": "modules/juce_python/bindings/ScriptJuceDataStructuresBindings.cpp",
"chars": 23414,
"preview": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copy"
},
{
"path": "modules/juce_python/bindings/ScriptJuceDataStructuresBindings.h",
"chars": 6302,
"preview": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copy"
},
{
"path": "modules/juce_python/bindings/ScriptJuceEventsBindings.cpp",
"chars": 13557,
"preview": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copy"
},
{
"path": "modules/juce_python/bindings/ScriptJuceEventsBindings.h",
"chars": 4303,
"preview": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copy"
},
{
"path": "modules/juce_python/bindings/ScriptJuceGraphicsBindings.cpp",
"chars": 112947,
"preview": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copy"
},
{
"path": "modules/juce_python/bindings/ScriptJuceGraphicsBindings.h",
"chars": 7695,
"preview": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copy"
},
{
"path": "modules/juce_python/bindings/ScriptJuceGuiBasicsBindings.cpp",
"chars": 150594,
"preview": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copy"
},
{
"path": "modules/juce_python/bindings/ScriptJuceGuiBasicsBindings.h",
"chars": 56852,
"preview": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copy"
},
{
"path": "modules/juce_python/bindings/ScriptJuceGuiEntryPointsBindings.cpp",
"chars": 8088,
"preview": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copy"
},
{
"path": "modules/juce_python/bindings/ScriptJuceGuiEntryPointsBindings.h",
"chars": 1186,
"preview": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copy"
},
{
"path": "modules/juce_python/bindings/ScriptJuceGuiExtraBindings.cpp",
"chars": 1808,
"preview": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copy"
},
{
"path": "modules/juce_python/bindings/ScriptJuceGuiExtraBindings.h",
"chars": 1517,
"preview": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copy"
},
{
"path": "modules/juce_python/bindings/ScriptJuceOptionsBindings.cpp",
"chars": 1188,
"preview": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copy"
},
{
"path": "modules/juce_python/bindings/ScriptJuceOptionsBindings.h",
"chars": 1380,
"preview": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copy"
},
{
"path": "modules/juce_python/juce_python.cpp",
"chars": 1010,
"preview": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copy"
},
{
"path": "modules/juce_python/juce_python.h",
"chars": 3654,
"preview": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copy"
},
{
"path": "modules/juce_python/juce_python.mm",
"chars": 735,
"preview": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copy"
},
{
"path": "modules/juce_python/juce_python_audio_basics.cpp",
"chars": 841,
"preview": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copy"
},
{
"path": "modules/juce_python/juce_python_audio_devices.cpp",
"chars": 843,
"preview": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copy"
},
{
"path": "modules/juce_python/juce_python_audio_formats.cpp",
"chars": 843,
"preview": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copy"
},
{
"path": "modules/juce_python/juce_python_audio_processors.cpp",
"chars": 849,
"preview": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copy"
},
{
"path": "modules/juce_python/juce_python_audio_utils.cpp",
"chars": 839,
"preview": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copy"
},
{
"path": "modules/juce_python/juce_python_bindings.cpp",
"chars": 777,
"preview": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copy"
},
{
"path": "modules/juce_python/juce_python_core.cpp",
"chars": 781,
"preview": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copy"
},
{
"path": "modules/juce_python/juce_python_data_structures.cpp",
"chars": 847,
"preview": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copy"
},
{
"path": "modules/juce_python/juce_python_events.cpp",
"chars": 830,
"preview": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copy"
},
{
"path": "modules/juce_python/juce_python_graphics.cpp",
"chars": 834,
"preview": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copy"
},
{
"path": "modules/juce_python/juce_python_gui_basics.cpp",
"chars": 837,
"preview": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copy"
},
{
"path": "modules/juce_python/juce_python_gui_entry.cpp",
"chars": 842,
"preview": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copy"
},
{
"path": "modules/juce_python/juce_python_gui_extra.cpp",
"chars": 835,
"preview": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copy"
},
{
"path": "modules/juce_python/juce_python_modules.cpp",
"chars": 778,
"preview": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copy"
},
{
"path": "modules/juce_python/juce_python_options.cpp",
"chars": 784,
"preview": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copy"
},
{
"path": "modules/juce_python/modules/ScriptPopsicleModule.cpp",
"chars": 2644,
"preview": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copy"
},
{
"path": "modules/juce_python/pybind11/attr.h",
"chars": 24334,
"preview": "/*\n pybind11/attr.h: Infrastructure for processing custom\n type and function attributes\n\n Copyright (c) 2016 We"
},
{
"path": "modules/juce_python/pybind11/buffer_info.h",
"chars": 7750,
"preview": "/*\n pybind11/buffer_info.h: Python buffer object interface\n\n Copyright (c) 2016 Wenzel Jakob <wenzel.jakob@epfl.ch"
},
{
"path": "modules/juce_python/pybind11/cast.h",
"chars": 67312,
"preview": "/*\n pybind11/cast.h: Partial template specializations to cast between\n C++ and Python types\n\n Copyright (c) 201"
},
{
"path": "modules/juce_python/pybind11/chrono.h",
"chars": 8458,
"preview": "/*\n pybind11/chrono.h: Transparent conversion between std::chrono and python's datetime\n\n Copyright (c) 2016 Trent"
},
{
"path": "modules/juce_python/pybind11/common.h",
"chars": 120,
"preview": "#include \"detail/common.h\"\n#warning \"Including 'common.h' is deprecated. It will be removed in v3.0. Use 'pybind11.h'.\"\n"
},
{
"path": "modules/juce_python/pybind11/complex.h",
"chars": 2096,
"preview": "/*\n pybind11/complex.h: Complex number support\n\n Copyright (c) 2016 Wenzel Jakob <wenzel.jakob@epfl.ch>\n\n All r"
},
{
"path": "modules/juce_python/pybind11/detail/class.h",
"chars": 28518,
"preview": "/*\n pybind11/detail/class.h: Python C API implementation details for py::class_\n\n Copyright (c) 2017 Wenzel Jakob "
},
{
"path": "modules/juce_python/pybind11/detail/common.h",
"chars": 53480,
"preview": "/*\n pybind11/detail/common.h -- Basic macros\n\n Copyright (c) 2016 Wenzel Jakob <wenzel.jakob@epfl.ch>\n\n All rig"
},
{
"path": "modules/juce_python/pybind11/detail/descr.h",
"chars": 5962,
"preview": "/*\n pybind11/detail/descr.h: Helper type for concatenating type signatures at compile time\n\n Copyright (c) 2016 We"
},
{
"path": "modules/juce_python/pybind11/detail/init.h",
"chars": 17859,
"preview": "/*\n pybind11/detail/init.h: init factory function implementation and support code.\n\n Copyright (c) 2017 Jason Rhin"
},
{
"path": "modules/juce_python/pybind11/detail/internals.h",
"chars": 28221,
"preview": "/*\n pybind11/detail/internals.h: Internal data structure and related functions\n\n Copyright (c) 2017 Wenzel Jakob <"
},
{
"path": "modules/juce_python/pybind11/detail/type_caster_base.h",
"chars": 48364,
"preview": "/*\n pybind11/detail/type_caster_base.h (originally first part of pybind11/cast.h)\n\n Copyright (c) 2016 Wenzel Jako"
},
{
"path": "modules/juce_python/pybind11/detail/typeid.h",
"chars": 1625,
"preview": "/*\n pybind11/detail/typeid.h: Compiler-independent access to type identifiers\n\n Copyright (c) 2016 Wenzel Jakob <w"
},
{
"path": "modules/juce_python/pybind11/eigen/common.h",
"chars": 378,
"preview": "// Copyright (c) 2023 The pybind Community.\n\n#pragma once\n\n// Common message for `static_assert()`s, which are useful to"
},
{
"path": "modules/juce_python/pybind11/eigen/matrix.h",
"chars": 32133,
"preview": "/*\n pybind11/eigen/matrix.h: Transparent conversion for dense and sparse Eigen matrices\n\n Copyright (c) 2016 Wenze"
},
{
"path": "modules/juce_python/pybind11/eigen/tensor.h",
"chars": 18442,
"preview": "/*\n pybind11/eigen/tensor.h: Transparent conversion for Eigen tensors\n\n All rights reserved. Use of this source co"
},
{
"path": "modules/juce_python/pybind11/eigen.h",
"chars": 316,
"preview": "/*\n pybind11/eigen.h: Transparent conversion for dense and sparse Eigen matrices\n\n Copyright (c) 2016 Wenzel Jakob"
},
{
"path": "modules/juce_python/pybind11/embed.h",
"chars": 13459,
"preview": "/*\n pybind11/embed.h: Support for embedding the interpreter\n\n Copyright (c) 2017 Wenzel Jakob <wenzel.jakob@epfl.c"
},
{
"path": "modules/juce_python/pybind11/eval.h",
"chars": 4731,
"preview": "/*\n pybind11/eval.h: Support for evaluating Python expressions and statements\n from strings and files\n\n Copyrig"
},
{
"path": "modules/juce_python/pybind11/functional.h",
"chars": 5002,
"preview": "/*\n pybind11/functional.h: std::function<> support\n\n Copyright (c) 2016 Wenzel Jakob <wenzel.jakob@epfl.ch>\n\n A"
},
{
"path": "modules/juce_python/pybind11/gil.h",
"chars": 8262,
"preview": "/*\n pybind11/gil.h: RAII helpers for managing the GIL\n\n Copyright (c) 2016 Wenzel Jakob <wenzel.jakob@epfl.ch>\n\n "
},
{
"path": "modules/juce_python/pybind11/iostream.h",
"chars": 8862,
"preview": "/*\n pybind11/iostream.h -- Tools to assist with redirecting cout and cerr to Python\n\n Copyright (c) 2017 Henry F. "
},
{
"path": "modules/juce_python/pybind11/numpy.h",
"chars": 79725,
"preview": "/*\n pybind11/numpy.h: Basic NumPy support, vectorize() wrapper\n\n Copyright (c) 2016 Wenzel Jakob <wenzel.jakob@epf"
},
{
"path": "modules/juce_python/pybind11/operators.h",
"chars": 9103,
"preview": "/*\n pybind11/operator.h: Metatemplates for operator overloading\n\n Copyright (c) 2016 Wenzel Jakob <wenzel.jakob@ep"
},
{
"path": "modules/juce_python/pybind11/options.h",
"chars": 2734,
"preview": "/*\n pybind11/options.h: global settings that are configurable at runtime.\n\n Copyright (c) 2016 Wenzel Jakob <wenze"
},
{
"path": "modules/juce_python/pybind11/pybind11.h",
"chars": 126706,
"preview": "/*\n pybind11/pybind11.h: Main header file of the C++11 python\n binding generator library\n\n Copyright (c) 2016 W"
},
{
"path": "modules/juce_python/pybind11/pytypes.h",
"chars": 98455,
"preview": "/*\n pybind11/pytypes.h: Convenience wrapper classes for basic Python types\n\n Copyright (c) 2016 Wenzel Jakob <wenz"
},
{
"path": "modules/juce_python/pybind11/stl/filesystem.h",
"chars": 4185,
"preview": "// Copyright (c) 2021 The Pybind Development Team.\n// All rights reserved. Use of this source code is governed by a\n// B"
},
{
"path": "modules/juce_python/pybind11/stl.h",
"chars": 15477,
"preview": "/*\n pybind11/stl.h: Transparent conversion for STL data types\n\n Copyright (c) 2016 Wenzel Jakob <wenzel.jakob@epfl"
},
{
"path": "modules/juce_python/pybind11/stl_bind.h",
"chars": 29897,
"preview": "/*\n pybind11/std_bind.h: Binding generators for STL data types\n\n Copyright (c) 2016 Sergey Lyskov and Wenzel Jakob"
},
{
"path": "modules/juce_python/pybind11/type_caster_pyobject_ptr.h",
"chars": 1929,
"preview": "// Copyright (c) 2023 The pybind Community.\n\n#pragma once\n\n#include \"detail/common.h\"\n#include \"detail/descr.h\"\n#include"
},
{
"path": "modules/juce_python/scripting/ScriptBindings.cpp",
"chars": 1598,
"preview": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copy"
},
{
"path": "modules/juce_python/scripting/ScriptBindings.h",
"chars": 4606,
"preview": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copy"
},
{
"path": "modules/juce_python/scripting/ScriptEngine.cpp",
"chars": 6500,
"preview": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copy"
},
{
"path": "modules/juce_python/scripting/ScriptEngine.h",
"chars": 4502,
"preview": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copy"
},
{
"path": "modules/juce_python/scripting/ScriptException.h",
"chars": 2395,
"preview": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copy"
},
{
"path": "modules/juce_python/scripting/ScriptUtilities.cpp",
"chars": 1163,
"preview": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copy"
},
{
"path": "modules/juce_python/scripting/ScriptUtilities.h",
"chars": 1243,
"preview": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copy"
},
{
"path": "modules/juce_python/utilities/ClassDemangling.cpp",
"chars": 3778,
"preview": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copy"
},
{
"path": "modules/juce_python/utilities/ClassDemangling.h",
"chars": 2913,
"preview": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copy"
},
{
"path": "modules/juce_python/utilities/CrashHandling.cpp",
"chars": 3622,
"preview": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copy"
},
{
"path": "modules/juce_python/utilities/CrashHandling.h",
"chars": 1181,
"preview": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copy"
},
{
"path": "modules/juce_python/utilities/MacroHelpers.h",
"chars": 980,
"preview": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copy"
},
{
"path": "modules/juce_python/utilities/PyBind11Includes.h",
"chars": 2645,
"preview": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copy"
},
{
"path": "modules/juce_python/utilities/PythonInterop.h",
"chars": 6293,
"preview": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copy"
},
{
"path": "modules/juce_python/utilities/PythonTypes.h",
"chars": 1973,
"preview": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copy"
},
{
"path": "modules/juce_python/utilities/WindowsIncludes.h",
"chars": 921,
"preview": "/**\n * juce_python - Python bindings for the JUCE framework.\n *\n * This file is part of the popsicle project.\n *\n * Copy"
},
{
"path": "pyproject.toml",
"chars": 2268,
"preview": "[build-system]\nrequires = [\n # c++ building\n \"cmake>=3.21\",\n # pyi generation\n \"mypy\",\n # unit tests (for"
},
{
"path": "scripts/build_wheel.sh",
"chars": 37,
"preview": "#!/bin/bash\n\npython -m build --wheel\n"
},
{
"path": "scripts/install_wheel.sh",
"chars": 83,
"preview": "#!/bin/bash\n\npython3 -m pip install --index-url https://test.pypi.org/simple/ juce\n"
},
{
"path": "scripts/pull_upstream.sh",
"chars": 74,
"preview": "#!/bin/bash\n\npushd ../\ngit subtree pull -P JUCE JUCE master --squash\npopd\n"
},
{
"path": "scripts/upload_wheel.sh",
"chars": 70,
"preview": "#!/bin/bash\n\npython3 -m twine upload --repository testjuce dist/*.whl\n"
},
{
"path": "setup.py",
"chars": 9859,
"preview": "import os\nimport sys\nimport re\nimport shutil\nimport pathlib\nimport platform\nimport glob\nimport setuptools\n\nfrom distutil"
},
{
"path": "tests/__init__.py",
"chars": 21,
"preview": "from . import common\n"
},
{
"path": "tests/common.py",
"chars": 447,
"preview": "import os\nimport sys\nimport glob\nfrom pathlib import Path\n\ntry:\n\timport popsicle as juce\n\nexcept ImportError:\n folder"
},
{
"path": "tests/compare_data/.gitignore",
"chars": 14,
"preview": "*\n!.gitignore\n"
},
{
"path": "tests/conftest.py",
"chars": 1415,
"preview": "import sys\nimport pytest\n\nimport popsicle as juce\n\nfrom .utilities import get_runtime_data_folder, remove_directory_recu"
},
{
"path": "tests/runtime_data/.gitignore",
"chars": 14,
"preview": "*\n!.gitignore\n"
},
{
"path": "tests/test_juce_core/__init__.py",
"chars": 22,
"preview": "from .. import common\n"
},
{
"path": "tests/test_juce_core/data/somefile.txt",
"chars": 886,
"preview": "-----BEGIN RSA PRIVATE KEY-----\nMIICXAIBAAKBgQCaEUhbzLlWlBCoSPsa/fKoGxfB+p+etUb9HeuHO0m2k6Tt8g64\nNiwIXNWyi6EJ260r0legE/V"
},
{
"path": "tests/test_juce_core/data/test.xml",
"chars": 539,
"preview": "<root>\n <person\n firstname=\"Kathy\"\n lastname=\"McClimans\"\n city=\"Mecca\"\n country=\"Mongolia\"\n firstname2=\"Fanny\"\n l"
},
{
"path": "tests/test_juce_core/data/test_broken.xml",
"chars": 538,
"preview": "<root>\n <person\n firstname=\"Kathy\"\n lastname=\"McClimans\"\n city=\"Mecca\"\n country=\"Mongolia\"\n firstname2=\"Fanny\"\n l"
},
{
"path": "tests/test_juce_core/test_Array.py",
"chars": 30917,
"preview": "import pytest\n\nimport popsicle as juce\n\n#==============================================================================="
},
{
"path": "tests/test_juce_core/test_Base64.py",
"chars": 1098,
"preview": "import popsicle as juce\n\n#=============================================================================================="
},
{
"path": "tests/test_juce_core/test_BigInteger.py",
"chars": 14751,
"preview": "from ctypes import c_uint32\n\nimport popsicle as juce\n\n#================================================================="
},
{
"path": "tests/test_juce_core/test_ByteOrder.py",
"chars": 3070,
"preview": "\nimport sys\n\nimport popsicle as juce\n\n#================================================================================="
},
{
"path": "tests/test_juce_core/test_Cast.py",
"chars": 174,
"preview": "import pytest\n\nimport popsicle as juce\n\n#==============================================================================="
},
{
"path": "tests/test_juce_core/test_CriticalSection.py",
"chars": 1104,
"preview": "import threading\n\nimport popsicle as juce\n\n#============================================================================"
},
{
"path": "tests/test_juce_core/test_File.py",
"chars": 33053,
"preview": "import os\nimport sys\nimport pytest\n\nfrom ..utilities import get_runtime_data_file\nimport popsicle as juce\n\nthis_file = o"
},
{
"path": "tests/test_juce_core/test_FileFilter.py",
"chars": 1710,
"preview": "import os\n\nfrom ..utilities import get_runtime_data_file\nimport popsicle as juce\n\nthis_file = os.path.abspath(__file__)\n"
},
{
"path": "tests/test_juce_core/test_FileInputStream.py",
"chars": 3640,
"preview": "import os\nimport pytest\n\nimport popsicle as juce\n\n\n#===================================================================="
},
{
"path": "tests/test_juce_core/test_FileOutputStream.py",
"chars": 3268,
"preview": "import os\nimport textwrap\nimport pytest\n\nfrom ..utilities import get_runtime_data_file\nimport popsicle as juce\n\n\n#======"
},
{
"path": "tests/test_juce_core/test_Identifier.py",
"chars": 2234,
"preview": "import popsicle as juce\n\n#=============================================================================================="
},
{
"path": "tests/test_juce_core/test_InputStream.py",
"chars": 10535,
"preview": "import pytest\nimport struct\nimport math\n\nimport popsicle as juce\n\n#====================================================="
},
{
"path": "tests/test_juce_core/test_Ints.py",
"chars": 2301,
"preview": "import pytest\n\nimport popsicle as juce\n\n#==============================================================================="
},
{
"path": "tests/test_juce_core/test_JSON.py",
"chars": 5495,
"preview": "import pytest\n\nfrom ..utilities import get_runtime_data_file\nimport popsicle as juce\n\n#================================="
},
{
"path": "tests/test_juce_core/test_MemoryBlock.py",
"chars": 9548,
"preview": "import pytest\n\nimport popsicle as juce\n\n#==============================================================================="
},
{
"path": "tests/test_juce_core/test_MemoryInputStream.py",
"chars": 8680,
"preview": "import os\nimport pytest\n\nimport popsicle as juce\n\n#====================================================================="
},
{
"path": "tests/test_juce_core/test_MemoryMappedFile.py",
"chars": 3172,
"preview": "import os\nimport sys\nimport pytest\n\nimport popsicle as juce\nfrom popsicle import int64\n\n#==============================="
}
]
// ... and 64 more files (download for full content)
About this extraction
This page contains the full source code of the kunitoki/popsicle GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 264 files (3.0 MB), approximately 811.7k tokens, and a symbol index with 2466 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.