From 7d3693eb365d50765d05538ee64610a86c311fdd Mon Sep 17 00:00:00 2001 From: =?utf8?q?IOhannes=20m=20zm=C3=B6lnig?= Date: Fri, 18 Mar 2022 15:18:52 +0100 Subject: [PATCH] New upstream version 6.1.6~ds0 --- BREAKING-CHANGES.txt | 127 +++++ CMakeLists.txt | 5 +- ChangeList.txt | 7 + docs/CMake API.md | 16 + .../Builds/Android/app/CMakeLists.txt | 10 +- .../Android/app/src/main/AndroidManifest.xml | 2 +- .../DemoRunner/Builds/LinuxMakefile/Makefile | 4 +- .../DemoRunner.xcodeproj/project.pbxproj | 12 +- .../DemoRunner/Builds/MacOSX/Info-App.plist | 4 +- .../VisualStudio2015/DemoRunner_App.vcxproj | 6 +- .../DemoRunner_App.vcxproj.filters | 6 + .../Builds/VisualStudio2015/resources.rc | 6 +- .../VisualStudio2017/DemoRunner_App.vcxproj | 6 +- .../DemoRunner_App.vcxproj.filters | 6 + .../Builds/VisualStudio2017/resources.rc | 6 +- .../VisualStudio2019/DemoRunner_App.vcxproj | 6 +- .../DemoRunner_App.vcxproj.filters | 6 + .../Builds/VisualStudio2019/resources.rc | 6 +- .../VisualStudio2022/DemoRunner_App.vcxproj | 6 +- .../DemoRunner_App.vcxproj.filters | 6 + .../Builds/VisualStudio2022/resources.rc | 6 +- .../iOS/DemoRunner.xcodeproj/project.pbxproj | 12 +- examples/DemoRunner/Builds/iOS/Info-App.plist | 4 +- examples/DemoRunner/DemoRunner.jucer | 2 +- .../DemoRunner/JuceLibraryCode/JuceHeader.h | 4 +- examples/GUI/OpenGLDemo.h | 5 + examples/Plugins/DSPModulePluginDemo.h | 2 +- examples/Plugins/MidiLoggerPluginDemo.h | 3 + examples/Utilities/ChildProcessDemo.h | 52 +- examples/Utilities/InAppPurchasesDemo.h | 11 +- .../Builds/Android/app/CMakeLists.txt | 8 +- .../Android/app/src/main/AndroidManifest.xml | 2 +- .../Builds/LinuxMakefile/Makefile | 4 +- .../project.pbxproj | 4 +- .../AudioPerformanceTest_App.vcxproj | 6 +- .../AudioPerformanceTest_App.vcxproj.filters | 6 + .../project.pbxproj | 4 +- .../Builds/Android/app/CMakeLists.txt | 8 +- .../Builds/LinuxMakefile/Makefile | 4 +- .../AudioPluginHost.xcodeproj/project.pbxproj | 4 +- .../AudioPluginHost_App.vcxproj | 6 +- .../AudioPluginHost_App.vcxproj.filters | 6 + .../AudioPluginHost_App.vcxproj | 6 +- .../AudioPluginHost_App.vcxproj.filters | 6 + .../AudioPluginHost_App.vcxproj | 6 +- .../AudioPluginHost_App.vcxproj.filters | 6 + .../AudioPluginHost_App.vcxproj | 6 +- .../AudioPluginHost_App.vcxproj.filters | 6 + .../AudioPluginHost.xcodeproj/project.pbxproj | 4 +- extras/AudioPluginHost/Source/HostStartup.cpp | 73 ++- .../Source/Plugins/IOConfigurationWindow.cpp | 57 +-- .../Source/UI/GraphEditorPanel.cpp | 108 +++-- .../Source/UI/MainHostWindow.cpp | 2 + .../Builds/LinuxMakefile/Makefile | 4 +- .../BinaryBuilder.xcodeproj/project.pbxproj | 4 +- .../BinaryBuilder_ConsoleApp.vcxproj | 4 +- extras/Build/CMake/JUCEHelperTargets.cmake | 2 +- extras/Build/CMake/JUCEUtils.cmake | 23 +- extras/Build/CMake/checkBundleSigning.cmake | 37 ++ .../Build/juce_build_tools/juce_build_tools.h | 2 +- .../utils/juce_Entitlements.cpp | 16 +- .../utils/juce_Entitlements.h | 8 + extras/Build/juceaide/CMakeLists.txt | 11 +- extras/Build/juceaide/Main.cpp | 23 + .../Builds/Android/app/CMakeLists.txt | 8 +- .../Android/app/src/main/AndroidManifest.xml | 2 +- .../Builds/LinuxMakefile/Makefile | 4 +- .../project.pbxproj | 4 +- .../NetworkGraphicsDemo_App.vcxproj | 6 +- .../NetworkGraphicsDemo_App.vcxproj.filters | 6 + .../project.pbxproj | 4 +- extras/Projucer/Builds/LinuxMakefile/Makefile | 4 +- extras/Projucer/Builds/MacOSX/Info-App.plist | 4 +- .../MacOSX/Projucer.xcodeproj/project.pbxproj | 12 +- .../VisualStudio2015/Projucer_App.vcxproj | 6 +- .../Projucer_App.vcxproj.filters | 6 + .../Builds/VisualStudio2015/resources.rc | 6 +- .../VisualStudio2017/Projucer_App.vcxproj | 6 +- .../Projucer_App.vcxproj.filters | 6 + .../Builds/VisualStudio2017/resources.rc | 6 +- .../VisualStudio2019/Projucer_App.vcxproj | 6 +- .../Projucer_App.vcxproj.filters | 6 + .../Builds/VisualStudio2019/resources.rc | 6 +- .../VisualStudio2022/Projucer_App.vcxproj | 6 +- .../Projucer_App.vcxproj.filters | 6 + .../Builds/VisualStudio2022/resources.rc | 6 +- extras/Projucer/JuceLibraryCode/JuceHeader.h | 4 +- extras/Projucer/Projucer.jucer | 2 +- .../Source/Application/jucer_MainWindow.cpp | 3 +- .../Source/Project/UI/Sidebar/jucer_Sidebar.h | 2 +- .../Project/UI/jucer_ContentViewComponents.h | 13 +- .../Projucer/Source/Project/jucer_Project.cpp | 22 +- .../Projucer/Source/Project/jucer_Project.h | 9 +- .../jucer_ProjectExport_Android.h | 2 +- .../ProjectSaving/jucer_ProjectExport_MSVC.h | 35 +- .../ProjectSaving/jucer_ProjectExport_Xcode.h | 56 ++- .../ProjectSaving/jucer_ProjectSaver.cpp | 14 - .../Source/Utility/Helpers/jucer_PresetIDs.h | 4 + .../Utility/UI/jucer_ProjucerLookAndFeel.cpp | 12 +- .../Utility/UI/jucer_ProjucerLookAndFeel.h | 4 +- .../Builds/LinuxMakefile/Makefile | 4 +- .../UnitTestRunner.xcodeproj/project.pbxproj | 4 +- .../UnitTestRunner_ConsoleApp.vcxproj | 6 +- .../UnitTestRunner_ConsoleApp.vcxproj.filters | 6 + .../UnitTestRunner_ConsoleApp.vcxproj | 6 +- .../UnitTestRunner_ConsoleApp.vcxproj.filters | 6 + .../UnitTestRunner_ConsoleApp.vcxproj | 6 +- .../UnitTestRunner_ConsoleApp.vcxproj.filters | 6 + .../WindowsDLL_StaticLibrary.vcxproj | 6 +- .../WindowsDLL_StaticLibrary.vcxproj.filters | 6 + modules/juce_analytics/juce_analytics.h | 2 +- .../audio_play_head/juce_AudioPlayHead.h | 6 +- .../buffers/juce_AudioChannelSet.cpp | 90 ++-- modules/juce_audio_basics/juce_audio_basics.h | 2 +- .../juce_audio_basics/midi/juce_MidiFile.h | 2 +- .../utilities/juce_SmoothedValue.h | 2 - .../juce_audio_devices/juce_audio_devices.h | 2 +- .../native/juce_mac_CoreAudio.cpp | 2 +- .../codecs/juce_WavAudioFormat.cpp | 138 +++++- .../codecs/juce_WavAudioFormat.h | 4 + .../juce_audio_formats/juce_audio_formats.h | 2 +- .../AAX/juce_AAX_Wrapper.cpp | 2 +- .../RTAS/juce_RTAS_Wrapper.cpp | 6 +- .../Standalone/juce_StandaloneFilterWindow.h | 133 ++++- .../Unity/juce_Unity_Wrapper.cpp | 21 +- .../VST/juce_VST_Wrapper.cpp | 10 +- .../VST3/juce_VST3_Wrapper.cpp | 37 +- .../juce_audio_plugin_client.h | 2 +- .../format/juce_AudioPluginFormat.h | 6 +- .../format_types/juce_AU_Shared.h | 20 +- .../juce_AudioUnitPluginFormat.mm | 458 ++++++++++++------ .../format_types/juce_VST3PluginFormat.cpp | 77 ++- .../juce_audio_processors.h | 2 +- .../processors/juce_AudioProcessor.h | 4 +- .../juce_AudioProcessorEditorHostContext.h | 13 +- .../processors/juce_AudioProcessorListener.h | 8 +- .../processors/juce_AudioProcessorParameter.h | 4 +- .../juce_GenericAudioProcessorEditor.cpp | 52 +- .../processors/juce_PluginDescription.cpp | 3 +- .../scanning/juce_PluginDirectoryScanner.h | 2 +- .../scanning/juce_PluginListComponent.cpp | 8 +- modules/juce_audio_utils/juce_audio_utils.h | 2 +- modules/juce_box2d/juce_box2d.h | 5 +- .../files/juce_DirectoryIterator.cpp | 21 +- .../juce_core/files/juce_DirectoryIterator.h | 53 +- modules/juce_core/files/juce_File.cpp | 8 +- modules/juce_core/files/juce_File.h | 29 +- .../files/juce_RangedDirectoryIterator.cpp | 6 +- .../files/juce_RangedDirectoryIterator.h | 4 +- .../juce_core/files/juce_TemporaryFile.cpp | 21 +- modules/juce_core/juce_core.h | 2 +- modules/juce_core/maths/juce_MathsFunctions.h | 8 +- modules/juce_core/maths/juce_Random.cpp | 4 - modules/juce_core/maths/juce_Random.h | 3 - modules/juce_core/maths/juce_Range.h | 22 +- .../native/juce_BasicNativeHeaders.h | 11 + .../juce_core/native/juce_posix_NamedPipe.cpp | 112 +++-- modules/juce_core/native/juce_win32_Files.cpp | 23 +- modules/juce_core/network/juce_URL.h | 52 +- .../juce_core/system/juce_CompilerSupport.h | 6 + .../juce_core/system/juce_StandardHeader.h | 5 +- .../juce_core/text/juce_CharacterFunctions.h | 4 +- modules/juce_core/text/juce_String.cpp | 3 + modules/juce_core/xml/juce_XmlElement.h | 4 +- .../encryption/juce_RSAKey.cpp | 4 - .../encryption/juce_RSAKey.h | 3 - modules/juce_cryptography/juce_cryptography.h | 2 +- .../juce_data_structures.h | 2 +- modules/juce_dsp/containers/juce_AudioBlock.h | 51 +- .../juce_FixedSizeFunction_test.cpp | 3 + .../containers/juce_SIMDRegister_Impl.h | 7 +- modules/juce_dsp/juce_dsp.h | 2 +- .../juce_dsp/processors/juce_ProcessContext.h | 2 +- .../broadcasters/juce_ChangeBroadcaster.h | 1 + .../juce_ConnectedChildProcess.cpp | 15 +- modules/juce_events/juce_events.h | 2 +- modules/juce_events/timers/juce_Timer.cpp | 1 + modules/juce_graphics/colour/juce_Colour.h | 36 +- .../contexts/juce_GraphicsContext.cpp | 8 - .../contexts/juce_GraphicsContext.h | 3 - .../contexts/juce_LowLevelGraphicsContext.h | 4 +- ...uce_LowLevelGraphicsPostScriptRenderer.cpp | 8 - .../juce_LowLevelGraphicsPostScriptRenderer.h | 3 - .../fonts/juce_AttributedString.cpp | 28 ++ .../fonts/juce_AttributedString.h | 5 + modules/juce_graphics/fonts/juce_Font.h | 16 +- .../fonts/juce_GlyphArrangement.cpp | 14 +- .../fonts/juce_GlyphArrangement.h | 7 - .../juce_graphics/geometry/juce_BorderSize.h | 3 - modules/juce_graphics/geometry/juce_Path.cpp | 2 +- modules/juce_graphics/geometry/juce_Path.h | 2 +- .../juce_graphics/geometry/juce_Rectangle.h | 42 +- modules/juce_graphics/images/juce_Image.cpp | 4 +- modules/juce_graphics/images/juce_Image.h | 1 + modules/juce_graphics/juce_graphics.h | 2 +- .../native/juce_mac_CoreGraphicsContext.mm | 28 +- .../juce_graphics/native/juce_mac_Fonts.mm | 68 ++- .../juce_win32_DirectWriteTypeLayout.cpp | 38 +- .../accessibility/juce_AccessibilityState.h | 26 +- .../components/juce_Component.cpp | 172 +++++-- .../components/juce_Component.h | 6 +- .../juce_gui_basics/desktop/juce_Desktop.cpp | 6 +- .../filebrowser/juce_FileChooser.cpp | 13 +- modules/juce_gui_basics/juce_gui_basics.cpp | 2 + modules/juce_gui_basics/juce_gui_basics.h | 3 +- .../keyboard/juce_ModifierKeys.h | 18 +- .../juce_ComponentBoundsConstrainer.cpp | 31 +- .../juce_gui_basics/layout/juce_FlexBox.cpp | 3 - modules/juce_gui_basics/layout/juce_FlexBox.h | 5 +- .../juce_gui_basics/layout/juce_GridItem.cpp | 4 +- .../juce_gui_basics/layout/juce_GridItem.h | 3 - .../juce_gui_basics/layout/juce_Viewport.cpp | 253 +++++----- .../juce_gui_basics/layout/juce_Viewport.h | 32 +- .../lookandfeel/juce_LookAndFeel_V2.cpp | 2 +- .../juce_gui_basics/menus/juce_PopupMenu.cpp | 5 + .../juce_gui_basics/menus/juce_PopupMenu.h | 26 +- .../juce_gui_basics/mouse/juce_MouseEvent.cpp | 4 - .../juce_gui_basics/mouse/juce_MouseEvent.h | 9 +- .../mouse/juce_MouseInputSource.cpp | 197 ++++---- .../mouse/juce_MouseInputSource.h | 40 +- .../juce_gui_basics/mouse/juce_PointerState.h | 109 +++++ .../juce_AccessibilityTextHelpers.h | 4 +- .../accessibility/juce_ios_Accessibility.mm | 5 +- .../juce_mac_AccessibilitySharedCode.mm | 12 + .../juce_win32_Accessibility.cpp | 2 +- .../native/juce_android_Windowing.cpp | 22 +- .../native/juce_ios_UIViewComponentPeer.mm | 23 +- .../native/juce_linux_Windowing.cpp | 19 +- .../native/juce_mac_NSViewComponentPeer.mm | 166 +++++-- .../native/juce_mac_Windowing.mm | 71 ++- .../native/juce_win32_Windowing.cpp | 89 +++- .../native/x11/juce_linux_X11_DragAndDrop.cpp | 7 +- .../native/x11/juce_linux_XWindowSystem.cpp | 64 ++- .../native/x11/juce_linux_XWindowSystem.h | 4 +- .../juce_gui_basics/widgets/juce_ListBox.cpp | 10 +- .../juce_gui_basics/widgets/juce_Toolbar.cpp | 18 +- .../juce_gui_basics/widgets/juce_Toolbar.h | 1 + .../juce_gui_basics/widgets/juce_TreeView.cpp | 14 +- .../juce_gui_basics/widgets/juce_TreeView.h | 7 + .../windows/juce_ComponentPeer.h | 62 +++ .../windows/juce_DocumentWindow.h | 12 + .../windows/juce_MessageBoxOptions.h | 10 +- .../windows/juce_ResizableWindow.cpp | 23 +- .../windows/juce_TooltipWindow.cpp | 6 +- .../windows/juce_TooltipWindow.h | 2 +- modules/juce_gui_extra/juce_gui_extra.cpp | 1 + modules/juce_gui_extra/juce_gui_extra.h | 2 +- .../misc/juce_RecentlyOpenedFilesList.cpp | 4 - .../misc/juce_RecentlyOpenedFilesList.h | 3 - .../misc/juce_WebBrowserComponent.h | 8 +- .../native/juce_mac_NSViewComponent.mm | 79 --- .../native/juce_mac_NSViewFrameWatcher.h | 111 +++++ .../native/juce_mac_SystemTrayIcon.cpp | 24 +- .../native/juce_win32_ActiveXComponent.cpp | 4 +- .../native/juce_win32_SystemTrayIcon.cpp | 4 +- .../native/juce_win32_WebBrowserComponent.cpp | 2 +- modules/juce_opengl/juce_opengl.h | 2 +- modules/juce_opengl/native/juce_OpenGL_osx.h | 3 +- .../juce_opengl/native/juce_OpenGL_win32.h | 2 +- .../juce_opengl/opengl/juce_OpenGLContext.cpp | 109 ++++- .../juce_opengl/opengl/juce_OpenGLHelpers.cpp | 17 + .../juce_opengl/opengl/juce_OpenGLImage.cpp | 3 + modules/juce_osc/juce_osc.h | 2 +- .../juce_product_unlocking.h | 2 +- modules/juce_video/juce_video.h | 2 +- 265 files changed, 3503 insertions(+), 1642 deletions(-) create mode 100644 extras/Build/CMake/checkBundleSigning.cmake create mode 100644 modules/juce_gui_basics/mouse/juce_PointerState.h create mode 100644 modules/juce_gui_extra/native/juce_mac_NSViewFrameWatcher.h diff --git a/BREAKING-CHANGES.txt b/BREAKING-CHANGES.txt index cffdd352..29aa4155 100644 --- a/BREAKING-CHANGES.txt +++ b/BREAKING-CHANGES.txt @@ -1,6 +1,133 @@ JUCE breaking changes ===================== +Version 6.1.6 +============= + +Change +------ +Unhandled mouse wheel and magnify events will now be passed to the closest +enclosing enabled ancestor component. + +Possible Issues +--------------- +Components that previously blocked mouse wheel events when in a disabled state +may no longer block the events as expected. + +Workaround +---------- +If a component should explicitly prevent events from propagating when disabled, +it should override mouseWheelMove() and mouseMagnify() to do nothing when the +component is disabled. + +Rationale +--------- +Previously, unhandled wheel events would be passed to the parent component, +but only if the parent was enabled. This meant that scrolling on a component +nested inside a disabled component would have no effect by default. This +behaviour was not intuitive. + + +Change +------ +The invalidPressure, invalidOrientation, invalidRotation, invalidTiltX and +invalidTiltY members of MouseInputSource have been deprecated. + +Possible Issues +--------------- +Deprecation warnings will be seen when compiling code which uses these members +and eventually builds will fail when they are later removed from the API. + +Workaround +---------- +Use the equivalent defaultPressure, defaultOrientation, defaultRotation, +defaultTiltX and defaultTiltY members of MouseInputSource. + +Rationale +--------- +The deprecated members represent valid values and the isPressureValid() etc. +functions return true when using them. This could be a source of confusion and +may be inviting programming errors. The new names are in line with the ongoing +practice of using these values to provide a neutral default in the absence of +actual OS provided values. + + +Change +------ +Plugin wrappers will no longer call processBlockBypassed() if the wrapped +AudioProcessor returns a parameter from getBypassParameter(). + +Possible Issues +--------------- +Plugins that used to depend on processBlockBypassed() being called may no +longer correctly enter a bypassed state. + +Workaround +---------- +AudioProcessors that implement getBypassParameter() must check the current +value of the bypass parameter on each call to processBlock(), and bypass +processing as appropriate. When switching between bypassed and non-bypassed +states, the plugin must use some sort of ramping or smoothing to avoid +discontinuities in the output. If the plugin introduces latency when not +bypassed, the plugin must delay its output when in bypassed mode so that the +overall latency does not change when enabling/disabling bypass. + +Rationale +--------- +The documentation for AudioProcessor::getBypassParameter() says +> if this method returns a non-null value, you should never call + processBlockBypassed but use the returned parameter to control the bypass + state instead. +Some plugin wrappers were not following this rule. After this change, the +behaviour of all plugin wrappers is consistent with the documented behaviour. + + +Change +------ +The ComponentPeer::getFrameSize() function has been deprecated on Linux. + +Possible Issues +--------------- +Deprecation warnings will be seen when compiling code which uses this function +and eventually builds will fail when it is later removed from the API. + +Workaround +---------- +Use the ComponentPeer::getFrameSizeIfPresent() function. The new function returns +an OptionalBorderSize object. Use operator bool() to determine if the border size +is valid, then access the value using operator*() only if it is. + +Rationale +--------- +The XWindow system cannot return a valid border size immediately after window +creation. ComponentPeer::getFrameSize() returns a default constructed +BorderSize instance in such cases that corresponds to a frame size of +zero. That however can be a valid value, and needs to be treated differently +from the situation when the frame size is not yet available. + + +Change +------ +The return type of XWindowSystem::getBorderSize() was changed to +ComponentPeer::OptionalBorderSize. + +Possible Issues +--------------- +User code that uses XWindowSystem::getBorderSize() will fail to build. + +Workaround +---------- +Use operator bool() to determine the validity of the new return value and +access the contained value using operator*(). + +Rationale +--------- +The XWindow system cannot immediately report the correct border size after +window creation. The underlying X11 calls will signal whether querying the +border size was successful, but there was no way to forward this information +through XWindowSystem::getBorderSize() until this change. + + Version 6.1.5 ============= diff --git a/CMakeLists.txt b/CMakeLists.txt index a82922e7..f9c8f408 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,7 +23,7 @@ cmake_minimum_required(VERSION 3.15) -project(JUCE VERSION 6.1.5 LANGUAGES C CXX) +project(JUCE VERSION 6.1.6 LANGUAGES C CXX) include(CMakeDependentOption) @@ -141,8 +141,8 @@ configure_package_config_file("${JUCE_CMAKE_UTILS_DIR}/JUCEConfig.cmake.in" install(FILES "${JUCE_BINARY_DIR}/JUCEConfigVersion.cmake" "${JUCE_BINARY_DIR}/JUCEConfig.cmake" - "${JUCE_CMAKE_UTILS_DIR}/JUCEHelperTargets.cmake" "${JUCE_CMAKE_UTILS_DIR}/JUCECheckAtomic.cmake" + "${JUCE_CMAKE_UTILS_DIR}/JUCEHelperTargets.cmake" "${JUCE_CMAKE_UTILS_DIR}/JUCEModuleSupport.cmake" "${JUCE_CMAKE_UTILS_DIR}/JUCEUtils.cmake" "${JUCE_CMAKE_UTILS_DIR}/LaunchScreen.storyboard" @@ -151,6 +151,7 @@ install(FILES "${JUCE_BINARY_DIR}/JUCEConfigVersion.cmake" "${JUCE_CMAKE_UTILS_DIR}/PIPConsole.cpp.in" "${JUCE_CMAKE_UTILS_DIR}/RecentFilesMenuTemplate.nib" "${JUCE_CMAKE_UTILS_DIR}/UnityPluginGUIScript.cs.in" + "${JUCE_CMAKE_UTILS_DIR}/checkBundleSigning.cmake" "${JUCE_CMAKE_UTILS_DIR}/copyDir.cmake" "${JUCE_CMAKE_UTILS_DIR}/juce_runtime_arch_detection.cpp" DESTINATION "${JUCE_INSTALL_DESTINATION}") diff --git a/ChangeList.txt b/ChangeList.txt index 355874e4..b664abe7 100644 --- a/ChangeList.txt +++ b/ChangeList.txt @@ -3,6 +3,13 @@ This file just lists the more notable headline features. For more detailed info about changes and bugfixes please see the git log and BREAKING-CHANGES.txt. +Version 6.1.6 + - Improved the handling of AU multichannel layouts + - Added JUCE_NODISCARD to builder-patten functions + - Added recursion options to DirectoryIterator + - Unified the loading of OpenGL 3.2 core profiles + - Improved macOS full-screen behaviour with non-native titlebars + Version 6.1.5 - Improved the accessibility framework - Added handling of non-Latin virtual key codes on macOS diff --git a/docs/CMake API.md b/docs/CMake API.md index a2fecc77..c1e90ae1 100644 --- a/docs/CMake API.md +++ b/docs/CMake API.md @@ -427,6 +427,22 @@ attributes directly to these creation functions, rather than adding them later. plist if `APP_SANDBOX_ENABLED` is `TRUE`. Each key should be in the form `com.apple.security.*` where `*` is a specific entitlement. +`APP_SANDBOX_FILE_ACCESS_HOME_RO` +- A set of space-separated paths that will be added to this target's entitlements plist for + accessing read-only paths relative to the home directory if `APP_SANDBOX_ENABLED` is `TRUE`. + +`APP_SANDBOX_FILE_ACCESS_HOME_RW` +- A set of space-separated paths that will be added to this target's entitlements plist for + accessing read/write paths relative to the home directory if `APP_SANDBOX_ENABLED` is `TRUE`. + +`APP_SANDBOX_FILE_ACCESS_ABS_RO` +- A set of space-separated paths that will be added to this target's entitlements plist for + accessing read-only absolute paths if `APP_SANDBOX_ENABLED` is `TRUE`. + +`APP_SANDBOX_FILE_ACCESS_ABS_RW` +- A set of space-separated paths that will be added to this target's entitlements plist for + accessing read/write absolute paths if `APP_SANDBOX_ENABLED` is `TRUE`. + `PLIST_TO_MERGE` - A string to insert into an app/plugin's Info.plist. diff --git a/examples/DemoRunner/Builds/Android/app/CMakeLists.txt b/examples/DemoRunner/Builds/Android/app/CMakeLists.txt index 00cd71bf..01cc0b28 100644 --- a/examples/DemoRunner/Builds/Android/app/CMakeLists.txt +++ b/examples/DemoRunner/Builds/Android/app/CMakeLists.txt @@ -12,7 +12,7 @@ add_subdirectory (${OBOE_DIR} ./oboe) add_library("cpufeatures" STATIC "${ANDROID_NDK}/sources/android/cpufeatures/cpu-features.c") set_source_files_properties("${ANDROID_NDK}/sources/android/cpufeatures/cpu-features.c" PROPERTIES COMPILE_FLAGS "-Wno-sign-conversion -Wno-gnu-statement-expression") -add_definitions([[-DJUCE_ANDROID=1]] [[-DJUCE_ANDROID_API_VERSION=23]] [[-DJUCE_PUSH_NOTIFICATIONS=1]] [[-DJUCE_PUSH_NOTIFICATIONS_ACTIVITY="com/rmsl/juce/JuceActivity"]] [[-DJUCE_CONTENT_SHARING=1]] [[-DJUCE_ANDROID_GL_ES_VERSION_3_0=1]] [[-DJUCE_DEMO_RUNNER=1]] [[-DJUCE_UNIT_TESTS=1]] [[-DJUCER_ANDROIDSTUDIO_7F0E4A25=1]] [[-DJUCE_APP_VERSION=6.1.5]] [[-DJUCE_APP_VERSION_HEX=0x60105]]) +add_definitions([[-DJUCE_ANDROID=1]] [[-DJUCE_ANDROID_API_VERSION=23]] [[-DJUCE_PUSH_NOTIFICATIONS=1]] [[-DJUCE_PUSH_NOTIFICATIONS_ACTIVITY="com/rmsl/juce/JuceActivity"]] [[-DJUCE_CONTENT_SHARING=1]] [[-DJUCE_ANDROID_GL_ES_VERSION_3_0=1]] [[-DJUCE_DEMO_RUNNER=1]] [[-DJUCE_UNIT_TESTS=1]] [[-DJUCER_ANDROIDSTUDIO_7F0E4A25=1]] [[-DJUCE_APP_VERSION=6.1.6]] [[-DJUCE_APP_VERSION_HEX=0x60106]]) include_directories( AFTER "../../../JuceLibraryCode" @@ -23,9 +23,9 @@ include_directories( AFTER enable_language(ASM) if(JUCE_BUILD_CONFIGURATION MATCHES "DEBUG") - add_definitions([[-DJUCE_DISPLAY_SPLASH_SCREEN=0]] [[-DJUCE_USE_DARK_SPLASH_SCREEN=1]] [[-DJUCE_PROJUCER_VERSION=0x60105]] [[-DJUCE_MODULE_AVAILABLE_juce_analytics=1]] [[-DJUCE_MODULE_AVAILABLE_juce_audio_basics=1]] [[-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1]] [[-DJUCE_MODULE_AVAILABLE_juce_audio_formats=1]] [[-DJUCE_MODULE_AVAILABLE_juce_audio_processors=1]] [[-DJUCE_MODULE_AVAILABLE_juce_audio_utils=1]] [[-DJUCE_MODULE_AVAILABLE_juce_box2d=1]] [[-DJUCE_MODULE_AVAILABLE_juce_core=1]] [[-DJUCE_MODULE_AVAILABLE_juce_cryptography=1]] [[-DJUCE_MODULE_AVAILABLE_juce_data_structures=1]] [[-DJUCE_MODULE_AVAILABLE_juce_dsp=1]] [[-DJUCE_MODULE_AVAILABLE_juce_events=1]] [[-DJUCE_MODULE_AVAILABLE_juce_graphics=1]] [[-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1]] [[-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1]] [[-DJUCE_MODULE_AVAILABLE_juce_opengl=1]] [[-DJUCE_MODULE_AVAILABLE_juce_osc=1]] [[-DJUCE_MODULE_AVAILABLE_juce_product_unlocking=1]] [[-DJUCE_MODULE_AVAILABLE_juce_video=1]] [[-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1]] [[-DJUCE_USE_MP3AUDIOFORMAT=1]] [[-DJUCE_ALLOW_STATIC_NULL_VARIABLES=0]] [[-DJUCE_STRICT_REFCOUNTEDPOINTER=1]] [[-DJUCE_USE_CAMERA=1]] [[-DJUCE_STANDALONE_APPLICATION=1]] [[-DJUCE_DEMO_RUNNER=1]] [[-DJUCE_UNIT_TESTS=1]] [[-DJUCER_ANDROIDSTUDIO_7F0E4A25=1]] [[-DJUCE_APP_VERSION=6.1.5]] [[-DJUCE_APP_VERSION_HEX=0x60105]] [[-DDEBUG=1]] [[-D_DEBUG=1]]) + add_definitions([[-DJUCE_DISPLAY_SPLASH_SCREEN=0]] [[-DJUCE_USE_DARK_SPLASH_SCREEN=1]] [[-DJUCE_PROJUCER_VERSION=0x60106]] [[-DJUCE_MODULE_AVAILABLE_juce_analytics=1]] [[-DJUCE_MODULE_AVAILABLE_juce_audio_basics=1]] [[-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1]] [[-DJUCE_MODULE_AVAILABLE_juce_audio_formats=1]] [[-DJUCE_MODULE_AVAILABLE_juce_audio_processors=1]] [[-DJUCE_MODULE_AVAILABLE_juce_audio_utils=1]] [[-DJUCE_MODULE_AVAILABLE_juce_box2d=1]] [[-DJUCE_MODULE_AVAILABLE_juce_core=1]] [[-DJUCE_MODULE_AVAILABLE_juce_cryptography=1]] [[-DJUCE_MODULE_AVAILABLE_juce_data_structures=1]] [[-DJUCE_MODULE_AVAILABLE_juce_dsp=1]] [[-DJUCE_MODULE_AVAILABLE_juce_events=1]] [[-DJUCE_MODULE_AVAILABLE_juce_graphics=1]] [[-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1]] [[-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1]] [[-DJUCE_MODULE_AVAILABLE_juce_opengl=1]] [[-DJUCE_MODULE_AVAILABLE_juce_osc=1]] [[-DJUCE_MODULE_AVAILABLE_juce_product_unlocking=1]] [[-DJUCE_MODULE_AVAILABLE_juce_video=1]] [[-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1]] [[-DJUCE_USE_MP3AUDIOFORMAT=1]] [[-DJUCE_ALLOW_STATIC_NULL_VARIABLES=0]] [[-DJUCE_STRICT_REFCOUNTEDPOINTER=1]] [[-DJUCE_USE_CAMERA=1]] [[-DJUCE_STANDALONE_APPLICATION=1]] [[-DJUCE_DEMO_RUNNER=1]] [[-DJUCE_UNIT_TESTS=1]] [[-DJUCER_ANDROIDSTUDIO_7F0E4A25=1]] [[-DJUCE_APP_VERSION=6.1.6]] [[-DJUCE_APP_VERSION_HEX=0x60106]] [[-DDEBUG=1]] [[-D_DEBUG=1]]) elseif(JUCE_BUILD_CONFIGURATION MATCHES "RELEASE") - add_definitions([[-DJUCE_DISPLAY_SPLASH_SCREEN=0]] [[-DJUCE_USE_DARK_SPLASH_SCREEN=1]] [[-DJUCE_PROJUCER_VERSION=0x60105]] [[-DJUCE_MODULE_AVAILABLE_juce_analytics=1]] [[-DJUCE_MODULE_AVAILABLE_juce_audio_basics=1]] [[-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1]] [[-DJUCE_MODULE_AVAILABLE_juce_audio_formats=1]] [[-DJUCE_MODULE_AVAILABLE_juce_audio_processors=1]] [[-DJUCE_MODULE_AVAILABLE_juce_audio_utils=1]] [[-DJUCE_MODULE_AVAILABLE_juce_box2d=1]] [[-DJUCE_MODULE_AVAILABLE_juce_core=1]] [[-DJUCE_MODULE_AVAILABLE_juce_cryptography=1]] [[-DJUCE_MODULE_AVAILABLE_juce_data_structures=1]] [[-DJUCE_MODULE_AVAILABLE_juce_dsp=1]] [[-DJUCE_MODULE_AVAILABLE_juce_events=1]] [[-DJUCE_MODULE_AVAILABLE_juce_graphics=1]] [[-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1]] [[-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1]] [[-DJUCE_MODULE_AVAILABLE_juce_opengl=1]] [[-DJUCE_MODULE_AVAILABLE_juce_osc=1]] [[-DJUCE_MODULE_AVAILABLE_juce_product_unlocking=1]] [[-DJUCE_MODULE_AVAILABLE_juce_video=1]] [[-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1]] [[-DJUCE_USE_MP3AUDIOFORMAT=1]] [[-DJUCE_ALLOW_STATIC_NULL_VARIABLES=0]] [[-DJUCE_STRICT_REFCOUNTEDPOINTER=1]] [[-DJUCE_USE_CAMERA=1]] [[-DJUCE_STANDALONE_APPLICATION=1]] [[-DJUCE_DEMO_RUNNER=1]] [[-DJUCE_UNIT_TESTS=1]] [[-DJUCER_ANDROIDSTUDIO_7F0E4A25=1]] [[-DJUCE_APP_VERSION=6.1.5]] [[-DJUCE_APP_VERSION_HEX=0x60105]] [[-DNDEBUG=1]]) + add_definitions([[-DJUCE_DISPLAY_SPLASH_SCREEN=0]] [[-DJUCE_USE_DARK_SPLASH_SCREEN=1]] [[-DJUCE_PROJUCER_VERSION=0x60106]] [[-DJUCE_MODULE_AVAILABLE_juce_analytics=1]] [[-DJUCE_MODULE_AVAILABLE_juce_audio_basics=1]] [[-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1]] [[-DJUCE_MODULE_AVAILABLE_juce_audio_formats=1]] [[-DJUCE_MODULE_AVAILABLE_juce_audio_processors=1]] [[-DJUCE_MODULE_AVAILABLE_juce_audio_utils=1]] [[-DJUCE_MODULE_AVAILABLE_juce_box2d=1]] [[-DJUCE_MODULE_AVAILABLE_juce_core=1]] [[-DJUCE_MODULE_AVAILABLE_juce_cryptography=1]] [[-DJUCE_MODULE_AVAILABLE_juce_data_structures=1]] [[-DJUCE_MODULE_AVAILABLE_juce_dsp=1]] [[-DJUCE_MODULE_AVAILABLE_juce_events=1]] [[-DJUCE_MODULE_AVAILABLE_juce_graphics=1]] [[-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1]] [[-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1]] [[-DJUCE_MODULE_AVAILABLE_juce_opengl=1]] [[-DJUCE_MODULE_AVAILABLE_juce_osc=1]] [[-DJUCE_MODULE_AVAILABLE_juce_product_unlocking=1]] [[-DJUCE_MODULE_AVAILABLE_juce_video=1]] [[-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1]] [[-DJUCE_USE_MP3AUDIOFORMAT=1]] [[-DJUCE_ALLOW_STATIC_NULL_VARIABLES=0]] [[-DJUCE_STRICT_REFCOUNTEDPOINTER=1]] [[-DJUCE_USE_CAMERA=1]] [[-DJUCE_STANDALONE_APPLICATION=1]] [[-DJUCE_DEMO_RUNNER=1]] [[-DJUCE_UNIT_TESTS=1]] [[-DJUCER_ANDROIDSTUDIO_7F0E4A25=1]] [[-DJUCE_APP_VERSION=6.1.6]] [[-DJUCE_APP_VERSION_HEX=0x60106]] [[-DNDEBUG=1]]) else() message( FATAL_ERROR "No matching build-configuration found." ) endif() @@ -1554,6 +1554,7 @@ add_library( ${BINARY_NAME} "../../../../../modules/juce_gui_basics/mouse/juce_MouseInputSource.h" "../../../../../modules/juce_gui_basics/mouse/juce_MouseListener.cpp" "../../../../../modules/juce_gui_basics/mouse/juce_MouseListener.h" + "../../../../../modules/juce_gui_basics/mouse/juce_PointerState.h" "../../../../../modules/juce_gui_basics/mouse/juce_SelectedItemSet.h" "../../../../../modules/juce_gui_basics/mouse/juce_TextDragAndDropTarget.h" "../../../../../modules/juce_gui_basics/mouse/juce_TooltipClient.h" @@ -1740,6 +1741,7 @@ add_library( ${BINARY_NAME} "../../../../../modules/juce_gui_extra/native/juce_mac_AppleRemote.mm" "../../../../../modules/juce_gui_extra/native/juce_mac_CarbonViewWrapperComponent.h" "../../../../../modules/juce_gui_extra/native/juce_mac_NSViewComponent.mm" + "../../../../../modules/juce_gui_extra/native/juce_mac_NSViewFrameWatcher.h" "../../../../../modules/juce_gui_extra/native/juce_mac_PushNotifications.cpp" "../../../../../modules/juce_gui_extra/native/juce_mac_SystemTrayIcon.cpp" "../../../../../modules/juce_gui_extra/native/juce_mac_WebBrowserComponent.mm" @@ -3371,6 +3373,7 @@ set_source_files_properties("../../../../../modules/juce_gui_basics/mouse/juce_M set_source_files_properties("../../../../../modules/juce_gui_basics/mouse/juce_MouseInputSource.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_gui_basics/mouse/juce_MouseListener.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_gui_basics/mouse/juce_MouseListener.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_gui_basics/mouse/juce_PointerState.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_gui_basics/mouse/juce_SelectedItemSet.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_gui_basics/mouse/juce_TextDragAndDropTarget.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_gui_basics/mouse/juce_TooltipClient.h" PROPERTIES HEADER_FILE_ONLY TRUE) @@ -3557,6 +3560,7 @@ set_source_files_properties("../../../../../modules/juce_gui_extra/native/juce_l set_source_files_properties("../../../../../modules/juce_gui_extra/native/juce_mac_AppleRemote.mm" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_gui_extra/native/juce_mac_CarbonViewWrapperComponent.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_gui_extra/native/juce_mac_NSViewComponent.mm" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_gui_extra/native/juce_mac_NSViewFrameWatcher.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_gui_extra/native/juce_mac_PushNotifications.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_gui_extra/native/juce_mac_SystemTrayIcon.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_gui_extra/native/juce_mac_WebBrowserComponent.mm" PROPERTIES HEADER_FILE_ONLY TRUE) diff --git a/examples/DemoRunner/Builds/Android/app/src/main/AndroidManifest.xml b/examples/DemoRunner/Builds/Android/app/src/main/AndroidManifest.xml index 0c1ab296..24204de3 100644 --- a/examples/DemoRunner/Builds/Android/app/src/main/AndroidManifest.xml +++ b/examples/DemoRunner/Builds/Android/app/src/main/AndroidManifest.xml @@ -1,6 +1,6 @@ - diff --git a/examples/DemoRunner/Builds/LinuxMakefile/Makefile b/examples/DemoRunner/Builds/LinuxMakefile/Makefile index 7cb5459a..a358044c 100644 --- a/examples/DemoRunner/Builds/LinuxMakefile/Makefile +++ b/examples/DemoRunner/Builds/LinuxMakefile/Makefile @@ -35,7 +35,7 @@ ifeq ($(CONFIG),Debug) TARGET_ARCH := endif - JUCE_CPPFLAGS := $(DEPFLAGS) "-DLINUX=1" "-DDEBUG=1" "-D_DEBUG=1" "-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x60105" "-DJUCE_MODULE_AVAILABLE_juce_analytics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_formats=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_processors=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_utils=1" "-DJUCE_MODULE_AVAILABLE_juce_box2d=1" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_MODULE_AVAILABLE_juce_cryptography=1" "-DJUCE_MODULE_AVAILABLE_juce_data_structures=1" "-DJUCE_MODULE_AVAILABLE_juce_dsp=1" "-DJUCE_MODULE_AVAILABLE_juce_events=1" "-DJUCE_MODULE_AVAILABLE_juce_graphics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1" "-DJUCE_MODULE_AVAILABLE_juce_opengl=1" "-DJUCE_MODULE_AVAILABLE_juce_osc=1" "-DJUCE_MODULE_AVAILABLE_juce_product_unlocking=1" "-DJUCE_MODULE_AVAILABLE_juce_video=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_USE_MP3AUDIOFORMAT=1" "-DJUCE_ALLOW_STATIC_NULL_VARIABLES=0" "-DJUCE_STRICT_REFCOUNTEDPOINTER=1" "-DJUCE_USE_CAMERA=1" "-DJUCE_STANDALONE_APPLICATION=1" "-DJUCE_DEMO_RUNNER=1" "-DJUCE_UNIT_TESTS=1" "-DJUCER_LINUX_MAKE_6D53C8B4=1" "-DJUCE_APP_VERSION=6.1.5" "-DJUCE_APP_VERSION_HEX=0x60105" $(shell pkg-config --cflags alsa freetype2 libcurl webkit2gtk-4.0 gtk+-x11-3.0) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS) + JUCE_CPPFLAGS := $(DEPFLAGS) "-DLINUX=1" "-DDEBUG=1" "-D_DEBUG=1" "-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x60106" "-DJUCE_MODULE_AVAILABLE_juce_analytics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_formats=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_processors=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_utils=1" "-DJUCE_MODULE_AVAILABLE_juce_box2d=1" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_MODULE_AVAILABLE_juce_cryptography=1" "-DJUCE_MODULE_AVAILABLE_juce_data_structures=1" "-DJUCE_MODULE_AVAILABLE_juce_dsp=1" "-DJUCE_MODULE_AVAILABLE_juce_events=1" "-DJUCE_MODULE_AVAILABLE_juce_graphics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1" "-DJUCE_MODULE_AVAILABLE_juce_opengl=1" "-DJUCE_MODULE_AVAILABLE_juce_osc=1" "-DJUCE_MODULE_AVAILABLE_juce_product_unlocking=1" "-DJUCE_MODULE_AVAILABLE_juce_video=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_USE_MP3AUDIOFORMAT=1" "-DJUCE_ALLOW_STATIC_NULL_VARIABLES=0" "-DJUCE_STRICT_REFCOUNTEDPOINTER=1" "-DJUCE_USE_CAMERA=1" "-DJUCE_STANDALONE_APPLICATION=1" "-DJUCE_DEMO_RUNNER=1" "-DJUCE_UNIT_TESTS=1" "-DJUCER_LINUX_MAKE_6D53C8B4=1" "-DJUCE_APP_VERSION=6.1.6" "-DJUCE_APP_VERSION_HEX=0x60106" $(shell pkg-config --cflags alsa freetype2 libcurl webkit2gtk-4.0 gtk+-x11-3.0) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS) JUCE_CPPFLAGS_APP := "-DJucePlugin_Build_VST=0" "-DJucePlugin_Build_VST3=0" "-DJucePlugin_Build_AU=0" "-DJucePlugin_Build_AUv3=0" "-DJucePlugin_Build_RTAS=0" "-DJucePlugin_Build_AAX=0" "-DJucePlugin_Build_Standalone=0" "-DJucePlugin_Build_Unity=0" JUCE_TARGET_APP := DemoRunner @@ -56,7 +56,7 @@ ifeq ($(CONFIG),Release) TARGET_ARCH := endif - JUCE_CPPFLAGS := $(DEPFLAGS) "-DLINUX=1" "-DNDEBUG=1" "-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x60105" "-DJUCE_MODULE_AVAILABLE_juce_analytics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_formats=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_processors=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_utils=1" "-DJUCE_MODULE_AVAILABLE_juce_box2d=1" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_MODULE_AVAILABLE_juce_cryptography=1" "-DJUCE_MODULE_AVAILABLE_juce_data_structures=1" "-DJUCE_MODULE_AVAILABLE_juce_dsp=1" "-DJUCE_MODULE_AVAILABLE_juce_events=1" "-DJUCE_MODULE_AVAILABLE_juce_graphics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1" "-DJUCE_MODULE_AVAILABLE_juce_opengl=1" "-DJUCE_MODULE_AVAILABLE_juce_osc=1" "-DJUCE_MODULE_AVAILABLE_juce_product_unlocking=1" "-DJUCE_MODULE_AVAILABLE_juce_video=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_USE_MP3AUDIOFORMAT=1" "-DJUCE_ALLOW_STATIC_NULL_VARIABLES=0" "-DJUCE_STRICT_REFCOUNTEDPOINTER=1" "-DJUCE_USE_CAMERA=1" "-DJUCE_STANDALONE_APPLICATION=1" "-DJUCE_DEMO_RUNNER=1" "-DJUCE_UNIT_TESTS=1" "-DJUCER_LINUX_MAKE_6D53C8B4=1" "-DJUCE_APP_VERSION=6.1.5" "-DJUCE_APP_VERSION_HEX=0x60105" $(shell pkg-config --cflags alsa freetype2 libcurl webkit2gtk-4.0 gtk+-x11-3.0) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS) + JUCE_CPPFLAGS := $(DEPFLAGS) "-DLINUX=1" "-DNDEBUG=1" "-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x60106" "-DJUCE_MODULE_AVAILABLE_juce_analytics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_formats=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_processors=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_utils=1" "-DJUCE_MODULE_AVAILABLE_juce_box2d=1" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_MODULE_AVAILABLE_juce_cryptography=1" "-DJUCE_MODULE_AVAILABLE_juce_data_structures=1" "-DJUCE_MODULE_AVAILABLE_juce_dsp=1" "-DJUCE_MODULE_AVAILABLE_juce_events=1" "-DJUCE_MODULE_AVAILABLE_juce_graphics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1" "-DJUCE_MODULE_AVAILABLE_juce_opengl=1" "-DJUCE_MODULE_AVAILABLE_juce_osc=1" "-DJUCE_MODULE_AVAILABLE_juce_product_unlocking=1" "-DJUCE_MODULE_AVAILABLE_juce_video=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_USE_MP3AUDIOFORMAT=1" "-DJUCE_ALLOW_STATIC_NULL_VARIABLES=0" "-DJUCE_STRICT_REFCOUNTEDPOINTER=1" "-DJUCE_USE_CAMERA=1" "-DJUCE_STANDALONE_APPLICATION=1" "-DJUCE_DEMO_RUNNER=1" "-DJUCE_UNIT_TESTS=1" "-DJUCER_LINUX_MAKE_6D53C8B4=1" "-DJUCE_APP_VERSION=6.1.6" "-DJUCE_APP_VERSION_HEX=0x60106" $(shell pkg-config --cflags alsa freetype2 libcurl webkit2gtk-4.0 gtk+-x11-3.0) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS) JUCE_CPPFLAGS_APP := "-DJucePlugin_Build_VST=0" "-DJucePlugin_Build_VST3=0" "-DJucePlugin_Build_AU=0" "-DJucePlugin_Build_AUv3=0" "-DJucePlugin_Build_RTAS=0" "-DJucePlugin_Build_AAX=0" "-DJucePlugin_Build_Standalone=0" "-DJucePlugin_Build_Unity=0" JUCE_TARGET_APP := DemoRunner diff --git a/examples/DemoRunner/Builds/MacOSX/DemoRunner.xcodeproj/project.pbxproj b/examples/DemoRunner/Builds/MacOSX/DemoRunner.xcodeproj/project.pbxproj index e5391264..a849e33a 100644 --- a/examples/DemoRunner/Builds/MacOSX/DemoRunner.xcodeproj/project.pbxproj +++ b/examples/DemoRunner/Builds/MacOSX/DemoRunner.xcodeproj/project.pbxproj @@ -507,7 +507,7 @@ "NDEBUG=1", "JUCE_DISPLAY_SPLASH_SCREEN=0", "JUCE_USE_DARK_SPLASH_SCREEN=1", - "JUCE_PROJUCER_VERSION=0x60105", + "JUCE_PROJUCER_VERSION=0x60106", "JUCE_MODULE_AVAILABLE_juce_analytics=1", "JUCE_MODULE_AVAILABLE_juce_audio_basics=1", "JUCE_MODULE_AVAILABLE_juce_audio_devices=1", @@ -536,8 +536,8 @@ "JUCE_DEMO_RUNNER=1", "JUCE_UNIT_TESTS=1", "JUCER_XCODE_MAC_F6D2F4CF=1", - "JUCE_APP_VERSION=6.1.5", - "JUCE_APP_VERSION_HEX=0x60105", + "JUCE_APP_VERSION=6.1.6", + "JUCE_APP_VERSION_HEX=0x60106", "JucePlugin_Build_VST=0", "JucePlugin_Build_VST3=0", "JucePlugin_Build_AU=0", @@ -587,7 +587,7 @@ "DEBUG=1", "JUCE_DISPLAY_SPLASH_SCREEN=0", "JUCE_USE_DARK_SPLASH_SCREEN=1", - "JUCE_PROJUCER_VERSION=0x60105", + "JUCE_PROJUCER_VERSION=0x60106", "JUCE_MODULE_AVAILABLE_juce_analytics=1", "JUCE_MODULE_AVAILABLE_juce_audio_basics=1", "JUCE_MODULE_AVAILABLE_juce_audio_devices=1", @@ -616,8 +616,8 @@ "JUCE_DEMO_RUNNER=1", "JUCE_UNIT_TESTS=1", "JUCER_XCODE_MAC_F6D2F4CF=1", - "JUCE_APP_VERSION=6.1.5", - "JUCE_APP_VERSION_HEX=0x60105", + "JUCE_APP_VERSION=6.1.6", + "JUCE_APP_VERSION_HEX=0x60106", "JucePlugin_Build_VST=0", "JucePlugin_Build_VST3=0", "JucePlugin_Build_AU=0", diff --git a/examples/DemoRunner/Builds/MacOSX/Info-App.plist b/examples/DemoRunner/Builds/MacOSX/Info-App.plist index 53459d9d..9be80923 100644 --- a/examples/DemoRunner/Builds/MacOSX/Info-App.plist +++ b/examples/DemoRunner/Builds/MacOSX/Info-App.plist @@ -24,9 +24,9 @@ CFBundleSignature ???? CFBundleShortVersionString - 6.1.5 + 6.1.6 CFBundleVersion - 6.1.5 + 6.1.6 NSHumanReadableCopyright Copyright (c) 2020 - Raw Material Software Limited NSHighResolutionCapable diff --git a/examples/DemoRunner/Builds/VisualStudio2015/DemoRunner_App.vcxproj b/examples/DemoRunner/Builds/VisualStudio2015/DemoRunner_App.vcxproj index bf9d778e..34af5bd1 100644 --- a/examples/DemoRunner/Builds/VisualStudio2015/DemoRunner_App.vcxproj +++ b/examples/DemoRunner/Builds/VisualStudio2015/DemoRunner_App.vcxproj @@ -64,7 +64,7 @@ Disabled ProgramDatabase ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60105;JUCE_MODULE_AVAILABLE_juce_analytics=1;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_box2d=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_MODULE_AVAILABLE_juce_osc=1;JUCE_MODULE_AVAILABLE_juce_product_unlocking=1;JUCE_MODULE_AVAILABLE_juce_video=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_USE_MP3AUDIOFORMAT=1;JUCE_ALLOW_STATIC_NULL_VARIABLES=0;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_USE_CAMERA=1;JUCE_STANDALONE_APPLICATION=1;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=6.1.5;JUCE_APP_VERSION_HEX=0x60105;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60106;JUCE_MODULE_AVAILABLE_juce_analytics=1;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_box2d=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_MODULE_AVAILABLE_juce_osc=1;JUCE_MODULE_AVAILABLE_juce_product_unlocking=1;JUCE_MODULE_AVAILABLE_juce_video=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_USE_MP3AUDIOFORMAT=1;JUCE_ALLOW_STATIC_NULL_VARIABLES=0;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_USE_CAMERA=1;JUCE_STANDALONE_APPLICATION=1;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=6.1.6;JUCE_APP_VERSION_HEX=0x60106;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) MultiThreadedDebugDLL true NotUsing @@ -106,7 +106,7 @@ Full ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60105;JUCE_MODULE_AVAILABLE_juce_analytics=1;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_box2d=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_MODULE_AVAILABLE_juce_osc=1;JUCE_MODULE_AVAILABLE_juce_product_unlocking=1;JUCE_MODULE_AVAILABLE_juce_video=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_USE_MP3AUDIOFORMAT=1;JUCE_ALLOW_STATIC_NULL_VARIABLES=0;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_USE_CAMERA=1;JUCE_STANDALONE_APPLICATION=1;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=6.1.5;JUCE_APP_VERSION_HEX=0x60105;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60106;JUCE_MODULE_AVAILABLE_juce_analytics=1;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_box2d=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_MODULE_AVAILABLE_juce_osc=1;JUCE_MODULE_AVAILABLE_juce_product_unlocking=1;JUCE_MODULE_AVAILABLE_juce_video=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_USE_MP3AUDIOFORMAT=1;JUCE_ALLOW_STATIC_NULL_VARIABLES=0;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_USE_CAMERA=1;JUCE_STANDALONE_APPLICATION=1;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=6.1.6;JUCE_APP_VERSION_HEX=0x60106;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) MultiThreaded true NotUsing @@ -3298,6 +3298,7 @@ + @@ -3392,6 +3393,7 @@ + diff --git a/examples/DemoRunner/Builds/VisualStudio2015/DemoRunner_App.vcxproj.filters b/examples/DemoRunner/Builds/VisualStudio2015/DemoRunner_App.vcxproj.filters index 58720860..324de953 100644 --- a/examples/DemoRunner/Builds/VisualStudio2015/DemoRunner_App.vcxproj.filters +++ b/examples/DemoRunner/Builds/VisualStudio2015/DemoRunner_App.vcxproj.filters @@ -5529,6 +5529,9 @@ JUCE Modules\juce_gui_basics\mouse + + JUCE Modules\juce_gui_basics\mouse + JUCE Modules\juce_gui_basics\mouse @@ -5811,6 +5814,9 @@ JUCE Modules\juce_gui_extra\native + + JUCE Modules\juce_gui_extra\native + JUCE Modules\juce_gui_extra diff --git a/examples/DemoRunner/Builds/VisualStudio2015/resources.rc b/examples/DemoRunner/Builds/VisualStudio2015/resources.rc index 9e9c7ab8..f22dabbc 100644 --- a/examples/DemoRunner/Builds/VisualStudio2015/resources.rc +++ b/examples/DemoRunner/Builds/VisualStudio2015/resources.rc @@ -9,7 +9,7 @@ #include VS_VERSION_INFO VERSIONINFO -FILEVERSION 6,1,5,0 +FILEVERSION 6,1,6,0 BEGIN BLOCK "StringFileInfo" BEGIN @@ -18,9 +18,9 @@ BEGIN VALUE "CompanyName", "Raw Material Software Limited\0" VALUE "LegalCopyright", "Copyright (c) 2020 - Raw Material Software Limited\0" VALUE "FileDescription", "DemoRunner\0" - VALUE "FileVersion", "6.1.5\0" + VALUE "FileVersion", "6.1.6\0" VALUE "ProductName", "DemoRunner\0" - VALUE "ProductVersion", "6.1.5\0" + VALUE "ProductVersion", "6.1.6\0" END END diff --git a/examples/DemoRunner/Builds/VisualStudio2017/DemoRunner_App.vcxproj b/examples/DemoRunner/Builds/VisualStudio2017/DemoRunner_App.vcxproj index 728fcd12..34f9f529 100644 --- a/examples/DemoRunner/Builds/VisualStudio2017/DemoRunner_App.vcxproj +++ b/examples/DemoRunner/Builds/VisualStudio2017/DemoRunner_App.vcxproj @@ -64,7 +64,7 @@ Disabled ProgramDatabase ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60105;JUCE_MODULE_AVAILABLE_juce_analytics=1;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_box2d=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_MODULE_AVAILABLE_juce_osc=1;JUCE_MODULE_AVAILABLE_juce_product_unlocking=1;JUCE_MODULE_AVAILABLE_juce_video=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_USE_MP3AUDIOFORMAT=1;JUCE_ALLOW_STATIC_NULL_VARIABLES=0;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_USE_CAMERA=1;JUCE_STANDALONE_APPLICATION=1;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=6.1.5;JUCE_APP_VERSION_HEX=0x60105;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60106;JUCE_MODULE_AVAILABLE_juce_analytics=1;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_box2d=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_MODULE_AVAILABLE_juce_osc=1;JUCE_MODULE_AVAILABLE_juce_product_unlocking=1;JUCE_MODULE_AVAILABLE_juce_video=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_USE_MP3AUDIOFORMAT=1;JUCE_ALLOW_STATIC_NULL_VARIABLES=0;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_USE_CAMERA=1;JUCE_STANDALONE_APPLICATION=1;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=6.1.6;JUCE_APP_VERSION_HEX=0x60106;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) MultiThreadedDebugDLL true NotUsing @@ -106,7 +106,7 @@ Full ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60105;JUCE_MODULE_AVAILABLE_juce_analytics=1;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_box2d=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_MODULE_AVAILABLE_juce_osc=1;JUCE_MODULE_AVAILABLE_juce_product_unlocking=1;JUCE_MODULE_AVAILABLE_juce_video=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_USE_MP3AUDIOFORMAT=1;JUCE_ALLOW_STATIC_NULL_VARIABLES=0;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_USE_CAMERA=1;JUCE_STANDALONE_APPLICATION=1;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=6.1.5;JUCE_APP_VERSION_HEX=0x60105;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60106;JUCE_MODULE_AVAILABLE_juce_analytics=1;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_box2d=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_MODULE_AVAILABLE_juce_osc=1;JUCE_MODULE_AVAILABLE_juce_product_unlocking=1;JUCE_MODULE_AVAILABLE_juce_video=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_USE_MP3AUDIOFORMAT=1;JUCE_ALLOW_STATIC_NULL_VARIABLES=0;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_USE_CAMERA=1;JUCE_STANDALONE_APPLICATION=1;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=6.1.6;JUCE_APP_VERSION_HEX=0x60106;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) MultiThreaded true NotUsing @@ -3298,6 +3298,7 @@ + @@ -3392,6 +3393,7 @@ + diff --git a/examples/DemoRunner/Builds/VisualStudio2017/DemoRunner_App.vcxproj.filters b/examples/DemoRunner/Builds/VisualStudio2017/DemoRunner_App.vcxproj.filters index c8693e6e..8d351075 100644 --- a/examples/DemoRunner/Builds/VisualStudio2017/DemoRunner_App.vcxproj.filters +++ b/examples/DemoRunner/Builds/VisualStudio2017/DemoRunner_App.vcxproj.filters @@ -5529,6 +5529,9 @@ JUCE Modules\juce_gui_basics\mouse + + JUCE Modules\juce_gui_basics\mouse + JUCE Modules\juce_gui_basics\mouse @@ -5811,6 +5814,9 @@ JUCE Modules\juce_gui_extra\native + + JUCE Modules\juce_gui_extra\native + JUCE Modules\juce_gui_extra diff --git a/examples/DemoRunner/Builds/VisualStudio2017/resources.rc b/examples/DemoRunner/Builds/VisualStudio2017/resources.rc index 9e9c7ab8..f22dabbc 100644 --- a/examples/DemoRunner/Builds/VisualStudio2017/resources.rc +++ b/examples/DemoRunner/Builds/VisualStudio2017/resources.rc @@ -9,7 +9,7 @@ #include VS_VERSION_INFO VERSIONINFO -FILEVERSION 6,1,5,0 +FILEVERSION 6,1,6,0 BEGIN BLOCK "StringFileInfo" BEGIN @@ -18,9 +18,9 @@ BEGIN VALUE "CompanyName", "Raw Material Software Limited\0" VALUE "LegalCopyright", "Copyright (c) 2020 - Raw Material Software Limited\0" VALUE "FileDescription", "DemoRunner\0" - VALUE "FileVersion", "6.1.5\0" + VALUE "FileVersion", "6.1.6\0" VALUE "ProductName", "DemoRunner\0" - VALUE "ProductVersion", "6.1.5\0" + VALUE "ProductVersion", "6.1.6\0" END END diff --git a/examples/DemoRunner/Builds/VisualStudio2019/DemoRunner_App.vcxproj b/examples/DemoRunner/Builds/VisualStudio2019/DemoRunner_App.vcxproj index f682aa48..1048fd4f 100644 --- a/examples/DemoRunner/Builds/VisualStudio2019/DemoRunner_App.vcxproj +++ b/examples/DemoRunner/Builds/VisualStudio2019/DemoRunner_App.vcxproj @@ -64,7 +64,7 @@ Disabled ProgramDatabase ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60105;JUCE_MODULE_AVAILABLE_juce_analytics=1;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_box2d=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_MODULE_AVAILABLE_juce_osc=1;JUCE_MODULE_AVAILABLE_juce_product_unlocking=1;JUCE_MODULE_AVAILABLE_juce_video=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_USE_MP3AUDIOFORMAT=1;JUCE_ALLOW_STATIC_NULL_VARIABLES=0;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_USE_CAMERA=1;JUCE_STANDALONE_APPLICATION=1;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2019_78A5026=1;JUCE_APP_VERSION=6.1.5;JUCE_APP_VERSION_HEX=0x60105;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60106;JUCE_MODULE_AVAILABLE_juce_analytics=1;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_box2d=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_MODULE_AVAILABLE_juce_osc=1;JUCE_MODULE_AVAILABLE_juce_product_unlocking=1;JUCE_MODULE_AVAILABLE_juce_video=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_USE_MP3AUDIOFORMAT=1;JUCE_ALLOW_STATIC_NULL_VARIABLES=0;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_USE_CAMERA=1;JUCE_STANDALONE_APPLICATION=1;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2019_78A5026=1;JUCE_APP_VERSION=6.1.6;JUCE_APP_VERSION_HEX=0x60106;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) MultiThreadedDebugDLL true NotUsing @@ -106,7 +106,7 @@ Full ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60105;JUCE_MODULE_AVAILABLE_juce_analytics=1;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_box2d=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_MODULE_AVAILABLE_juce_osc=1;JUCE_MODULE_AVAILABLE_juce_product_unlocking=1;JUCE_MODULE_AVAILABLE_juce_video=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_USE_MP3AUDIOFORMAT=1;JUCE_ALLOW_STATIC_NULL_VARIABLES=0;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_USE_CAMERA=1;JUCE_STANDALONE_APPLICATION=1;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2019_78A5026=1;JUCE_APP_VERSION=6.1.5;JUCE_APP_VERSION_HEX=0x60105;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60106;JUCE_MODULE_AVAILABLE_juce_analytics=1;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_box2d=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_MODULE_AVAILABLE_juce_osc=1;JUCE_MODULE_AVAILABLE_juce_product_unlocking=1;JUCE_MODULE_AVAILABLE_juce_video=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_USE_MP3AUDIOFORMAT=1;JUCE_ALLOW_STATIC_NULL_VARIABLES=0;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_USE_CAMERA=1;JUCE_STANDALONE_APPLICATION=1;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2019_78A5026=1;JUCE_APP_VERSION=6.1.6;JUCE_APP_VERSION_HEX=0x60106;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) MultiThreaded true NotUsing @@ -3298,6 +3298,7 @@ + @@ -3392,6 +3393,7 @@ + diff --git a/examples/DemoRunner/Builds/VisualStudio2019/DemoRunner_App.vcxproj.filters b/examples/DemoRunner/Builds/VisualStudio2019/DemoRunner_App.vcxproj.filters index 0625f854..79b0a421 100644 --- a/examples/DemoRunner/Builds/VisualStudio2019/DemoRunner_App.vcxproj.filters +++ b/examples/DemoRunner/Builds/VisualStudio2019/DemoRunner_App.vcxproj.filters @@ -5529,6 +5529,9 @@ JUCE Modules\juce_gui_basics\mouse + + JUCE Modules\juce_gui_basics\mouse + JUCE Modules\juce_gui_basics\mouse @@ -5811,6 +5814,9 @@ JUCE Modules\juce_gui_extra\native + + JUCE Modules\juce_gui_extra\native + JUCE Modules\juce_gui_extra diff --git a/examples/DemoRunner/Builds/VisualStudio2019/resources.rc b/examples/DemoRunner/Builds/VisualStudio2019/resources.rc index 9e9c7ab8..f22dabbc 100644 --- a/examples/DemoRunner/Builds/VisualStudio2019/resources.rc +++ b/examples/DemoRunner/Builds/VisualStudio2019/resources.rc @@ -9,7 +9,7 @@ #include VS_VERSION_INFO VERSIONINFO -FILEVERSION 6,1,5,0 +FILEVERSION 6,1,6,0 BEGIN BLOCK "StringFileInfo" BEGIN @@ -18,9 +18,9 @@ BEGIN VALUE "CompanyName", "Raw Material Software Limited\0" VALUE "LegalCopyright", "Copyright (c) 2020 - Raw Material Software Limited\0" VALUE "FileDescription", "DemoRunner\0" - VALUE "FileVersion", "6.1.5\0" + VALUE "FileVersion", "6.1.6\0" VALUE "ProductName", "DemoRunner\0" - VALUE "ProductVersion", "6.1.5\0" + VALUE "ProductVersion", "6.1.6\0" END END diff --git a/examples/DemoRunner/Builds/VisualStudio2022/DemoRunner_App.vcxproj b/examples/DemoRunner/Builds/VisualStudio2022/DemoRunner_App.vcxproj index 82fbdfe4..3c208600 100644 --- a/examples/DemoRunner/Builds/VisualStudio2022/DemoRunner_App.vcxproj +++ b/examples/DemoRunner/Builds/VisualStudio2022/DemoRunner_App.vcxproj @@ -64,7 +64,7 @@ Disabled ProgramDatabase ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60105;JUCE_MODULE_AVAILABLE_juce_analytics=1;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_box2d=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_MODULE_AVAILABLE_juce_osc=1;JUCE_MODULE_AVAILABLE_juce_product_unlocking=1;JUCE_MODULE_AVAILABLE_juce_video=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_USE_MP3AUDIOFORMAT=1;JUCE_ALLOW_STATIC_NULL_VARIABLES=0;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_USE_CAMERA=1;JUCE_STANDALONE_APPLICATION=1;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2022_78A503E=1;JUCE_APP_VERSION=6.1.5;JUCE_APP_VERSION_HEX=0x60105;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60106;JUCE_MODULE_AVAILABLE_juce_analytics=1;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_box2d=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_MODULE_AVAILABLE_juce_osc=1;JUCE_MODULE_AVAILABLE_juce_product_unlocking=1;JUCE_MODULE_AVAILABLE_juce_video=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_USE_MP3AUDIOFORMAT=1;JUCE_ALLOW_STATIC_NULL_VARIABLES=0;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_USE_CAMERA=1;JUCE_STANDALONE_APPLICATION=1;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2022_78A503E=1;JUCE_APP_VERSION=6.1.6;JUCE_APP_VERSION_HEX=0x60106;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) MultiThreadedDebugDLL true NotUsing @@ -106,7 +106,7 @@ Full ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60105;JUCE_MODULE_AVAILABLE_juce_analytics=1;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_box2d=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_MODULE_AVAILABLE_juce_osc=1;JUCE_MODULE_AVAILABLE_juce_product_unlocking=1;JUCE_MODULE_AVAILABLE_juce_video=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_USE_MP3AUDIOFORMAT=1;JUCE_ALLOW_STATIC_NULL_VARIABLES=0;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_USE_CAMERA=1;JUCE_STANDALONE_APPLICATION=1;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2022_78A503E=1;JUCE_APP_VERSION=6.1.5;JUCE_APP_VERSION_HEX=0x60105;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60106;JUCE_MODULE_AVAILABLE_juce_analytics=1;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_box2d=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_MODULE_AVAILABLE_juce_osc=1;JUCE_MODULE_AVAILABLE_juce_product_unlocking=1;JUCE_MODULE_AVAILABLE_juce_video=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_USE_MP3AUDIOFORMAT=1;JUCE_ALLOW_STATIC_NULL_VARIABLES=0;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_USE_CAMERA=1;JUCE_STANDALONE_APPLICATION=1;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2022_78A503E=1;JUCE_APP_VERSION=6.1.6;JUCE_APP_VERSION_HEX=0x60106;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) MultiThreaded true NotUsing @@ -3298,6 +3298,7 @@ + @@ -3392,6 +3393,7 @@ + diff --git a/examples/DemoRunner/Builds/VisualStudio2022/DemoRunner_App.vcxproj.filters b/examples/DemoRunner/Builds/VisualStudio2022/DemoRunner_App.vcxproj.filters index 1cd8e513..c42d4c98 100644 --- a/examples/DemoRunner/Builds/VisualStudio2022/DemoRunner_App.vcxproj.filters +++ b/examples/DemoRunner/Builds/VisualStudio2022/DemoRunner_App.vcxproj.filters @@ -5529,6 +5529,9 @@ JUCE Modules\juce_gui_basics\mouse + + JUCE Modules\juce_gui_basics\mouse + JUCE Modules\juce_gui_basics\mouse @@ -5811,6 +5814,9 @@ JUCE Modules\juce_gui_extra\native + + JUCE Modules\juce_gui_extra\native + JUCE Modules\juce_gui_extra diff --git a/examples/DemoRunner/Builds/VisualStudio2022/resources.rc b/examples/DemoRunner/Builds/VisualStudio2022/resources.rc index 9e9c7ab8..f22dabbc 100644 --- a/examples/DemoRunner/Builds/VisualStudio2022/resources.rc +++ b/examples/DemoRunner/Builds/VisualStudio2022/resources.rc @@ -9,7 +9,7 @@ #include VS_VERSION_INFO VERSIONINFO -FILEVERSION 6,1,5,0 +FILEVERSION 6,1,6,0 BEGIN BLOCK "StringFileInfo" BEGIN @@ -18,9 +18,9 @@ BEGIN VALUE "CompanyName", "Raw Material Software Limited\0" VALUE "LegalCopyright", "Copyright (c) 2020 - Raw Material Software Limited\0" VALUE "FileDescription", "DemoRunner\0" - VALUE "FileVersion", "6.1.5\0" + VALUE "FileVersion", "6.1.6\0" VALUE "ProductName", "DemoRunner\0" - VALUE "ProductVersion", "6.1.5\0" + VALUE "ProductVersion", "6.1.6\0" END END diff --git a/examples/DemoRunner/Builds/iOS/DemoRunner.xcodeproj/project.pbxproj b/examples/DemoRunner/Builds/iOS/DemoRunner.xcodeproj/project.pbxproj index 8bf9dc23..26d37ebc 100644 --- a/examples/DemoRunner/Builds/iOS/DemoRunner.xcodeproj/project.pbxproj +++ b/examples/DemoRunner/Builds/iOS/DemoRunner.xcodeproj/project.pbxproj @@ -511,7 +511,7 @@ "JUCE_CONTENT_SHARING=1", "JUCE_DISPLAY_SPLASH_SCREEN=0", "JUCE_USE_DARK_SPLASH_SCREEN=1", - "JUCE_PROJUCER_VERSION=0x60105", + "JUCE_PROJUCER_VERSION=0x60106", "JUCE_MODULE_AVAILABLE_juce_analytics=1", "JUCE_MODULE_AVAILABLE_juce_audio_basics=1", "JUCE_MODULE_AVAILABLE_juce_audio_devices=1", @@ -540,8 +540,8 @@ "JUCE_DEMO_RUNNER=1", "JUCE_UNIT_TESTS=1", "JUCER_XCODE_IPHONE_5BC26AE3=1", - "JUCE_APP_VERSION=6.1.5", - "JUCE_APP_VERSION_HEX=0x60105", + "JUCE_APP_VERSION=6.1.6", + "JUCE_APP_VERSION_HEX=0x60106", "JucePlugin_Build_VST=0", "JucePlugin_Build_VST3=0", "JucePlugin_Build_AU=0", @@ -591,7 +591,7 @@ "JUCE_CONTENT_SHARING=1", "JUCE_DISPLAY_SPLASH_SCREEN=0", "JUCE_USE_DARK_SPLASH_SCREEN=1", - "JUCE_PROJUCER_VERSION=0x60105", + "JUCE_PROJUCER_VERSION=0x60106", "JUCE_MODULE_AVAILABLE_juce_analytics=1", "JUCE_MODULE_AVAILABLE_juce_audio_basics=1", "JUCE_MODULE_AVAILABLE_juce_audio_devices=1", @@ -620,8 +620,8 @@ "JUCE_DEMO_RUNNER=1", "JUCE_UNIT_TESTS=1", "JUCER_XCODE_IPHONE_5BC26AE3=1", - "JUCE_APP_VERSION=6.1.5", - "JUCE_APP_VERSION_HEX=0x60105", + "JUCE_APP_VERSION=6.1.6", + "JUCE_APP_VERSION_HEX=0x60106", "JucePlugin_Build_VST=0", "JucePlugin_Build_VST3=0", "JucePlugin_Build_AU=0", diff --git a/examples/DemoRunner/Builds/iOS/Info-App.plist b/examples/DemoRunner/Builds/iOS/Info-App.plist index 35cdb053..48e7afda 100644 --- a/examples/DemoRunner/Builds/iOS/Info-App.plist +++ b/examples/DemoRunner/Builds/iOS/Info-App.plist @@ -30,9 +30,9 @@ CFBundleSignature ???? CFBundleShortVersionString - 6.1.5 + 6.1.6 CFBundleVersion - 6.1.5 + 6.1.6 NSHumanReadableCopyright Copyright (c) 2020 - Raw Material Software Limited NSHighResolutionCapable diff --git a/examples/DemoRunner/DemoRunner.jucer b/examples/DemoRunner/DemoRunner.jucer index cb2c5eab..058501ac 100644 --- a/examples/DemoRunner/DemoRunner.jucer +++ b/examples/DemoRunner/DemoRunner.jucer @@ -1,7 +1,7 @@ statusLabel.setText (statusText, dontSendNotification); } @@ -1246,6 +1248,7 @@ private: OpenGLUtils::DemoTexture* textureToUse = nullptr; OpenGLUtils::DemoTexture* lastTexture = nullptr; + CriticalSection shaderMutex; String newVertexShader, newFragmentShader, statusText; struct BackgroundStar @@ -1258,6 +1261,8 @@ private: //============================================================================== void updateShader() { + const ScopedLock lock (shaderMutex); // Prevent concurrent access to shader strings and status + if (newVertexShader.isNotEmpty() || newFragmentShader.isNotEmpty()) { std::unique_ptr newShader (new OpenGLShaderProgram (openGLContext)); diff --git a/examples/Plugins/DSPModulePluginDemo.h b/examples/Plugins/DSPModulePluginDemo.h index a5c5479b..edfa5425 100644 --- a/examples/Plugins/DSPModulePluginDemo.h +++ b/examples/Plugins/DSPModulePluginDemo.h @@ -1712,7 +1712,7 @@ private: { if (e.mods.isRightButtonDown()) if (auto* c = editor.getHostContext()) - if (auto menuInfo = c->getContextMenuForParameterIndex (¶m)) + if (auto menuInfo = c->getContextMenuForParameter (¶m)) menuInfo->getEquivalentPopupMenu().showMenuAsync (PopupMenu::Options{}.withTargetComponent (this) .withMousePosition()); } diff --git a/examples/Plugins/MidiLoggerPluginDemo.h b/examples/Plugins/MidiLoggerPluginDemo.h index b2e3d091..740f861d 100644 --- a/examples/Plugins/MidiLoggerPluginDemo.h +++ b/examples/Plugins/MidiLoggerPluginDemo.h @@ -80,6 +80,9 @@ public: template void addMessages (It begin, It end) { + if (begin == end) + return; + const auto numNewMessages = (int) std::distance (begin, end); const auto numToAdd = juce::jmin (numToStore, numNewMessages); const auto numToRemove = jmax (0, (int) messages.size() + numToAdd - numToStore); diff --git a/examples/Utilities/ChildProcessDemo.h b/examples/Utilities/ChildProcessDemo.h index e6eb5446..2b3c4a58 100644 --- a/examples/Utilities/ChildProcessDemo.h +++ b/examples/Utilities/ChildProcessDemo.h @@ -98,7 +98,12 @@ public: testResultsBox.setFont ({ Font::getDefaultMonospacedFontName(), 12.0f, Font::plain }); logMessage (String ("This demo uses the ChildProcessCoordinator and ChildProcessWorker classes to launch and communicate " - "with a child process, sending messages in the form of serialised ValueTree objects.") + newLine); + "with a child process, sending messages in the form of serialised ValueTree objects.") + newLine + + String ("In this demo, the child process will automatically quit if it fails to receive a ping message at least every ") + + String (timeoutSeconds) + + String (" seconds. To keep the process alive, press the \"") + + pingButton.getButtonText() + + String ("\" button periodically.") + newLine); setSize (500, 500); } @@ -136,10 +141,14 @@ public: { if (coordinatorProcess.get() == nullptr) { - coordinatorProcess.reset (new DemoCoordinatorProcess (*this)); + coordinatorProcess = std::make_unique (*this); - if (coordinatorProcess->launchWorkerProcess (File::getSpecialLocation (File::currentExecutableFile), demoCommandLineUID)) + if (coordinatorProcess->launchWorkerProcess (File::getSpecialLocation (File::currentExecutableFile), + demoCommandLineUID, + timeoutMillis)) + { logMessage ("Child process started"); + } } } @@ -166,11 +175,14 @@ public: // This class is used by the main process, acting as the coordinator and receiving messages // from the worker process. class DemoCoordinatorProcess : public ChildProcessCoordinator, - private DeletedAtShutdown + private DeletedAtShutdown, + private AsyncUpdater { public: DemoCoordinatorProcess (ChildProcessDemo& d) : demo (d) {} + ~DemoCoordinatorProcess() override { cancelPendingUpdate(); } + // This gets called when a message arrives from the worker process.. void handleMessageFromWorker (const MemoryBlock& mb) override { @@ -183,6 +195,11 @@ public: void handleConnectionLost() override { demo.logMessage ("Connection lost to child process!"); + triggerAsyncUpdate(); + } + + void handleAsyncUpdate() override + { demo.killChildProcess(); } @@ -203,7 +220,11 @@ public: //============================================================================== std::unique_ptr coordinatorProcess; + static constexpr auto timeoutSeconds = 10; + static constexpr auto timeoutMillis = timeoutSeconds * 1000; + private: + TextButton launchButton { "Launch Child Process" }; TextButton pingButton { "Send Ping" }; TextButton killButton { "Kill Child Process" }; @@ -268,8 +289,8 @@ public: } /* If no pings are received from the coordinator process for a number of seconds, then this will get invoked. - Typically you'll want to use this as a signal to kill the process as quickly as possible, as you - don't want to leave it hanging around as a zombie.. + Typically, you'll want to use this as a signal to kill the process as quickly as possible, as you + don't want to leave it hanging around as a zombie. */ void handleConnectionLost() override { @@ -280,13 +301,13 @@ public: //============================================================================== /* The JUCEApplication::initialise method calls this function to allow the child process to launch when the command line parameters indicate that we're - being asked to run as a child process.. + being asked to run as a child process. */ bool invokeChildProcessDemo (const String& commandLine) { - std::unique_ptr worker (new DemoWorkerProcess()); + auto worker = std::make_unique(); - if (worker->initialiseFromCommandLine (commandLine, demoCommandLineUID)) + if (worker->initialiseFromCommandLine (commandLine, demoCommandLineUID, ChildProcessDemo::timeoutMillis)) { worker.release(); // allow the worker object to stay alive - it'll handle its own deletion. return true; @@ -316,7 +337,7 @@ bool invokeChildProcessDemo (const String& commandLine) if (invokeChildProcessDemo (commandLine)) return; - mainWindow.reset (new MainWindow ("ChildProcessDemo", new ChildProcessDemo())); + mainWindow = std::make_unique ("ChildProcessDemo", std::make_unique()); } void shutdown() override { mainWindow = nullptr; } @@ -325,13 +346,14 @@ bool invokeChildProcessDemo (const String& commandLine) class MainWindow : public DocumentWindow { public: - MainWindow (const String& name, Component* c) : DocumentWindow (name, - Desktop::getInstance().getDefaultLookAndFeel() - .findColour (ResizableWindow::backgroundColourId), - DocumentWindow::allButtons) + MainWindow (const String& name, std::unique_ptr c) + : DocumentWindow (name, + Desktop::getInstance().getDefaultLookAndFeel() + .findColour (ResizableWindow::backgroundColourId), + DocumentWindow::allButtons) { setUsingNativeTitleBar (true); - setContentOwned (c, true); + setContentOwned (c.release(), true); centreWithSize (getWidth(), getHeight()); diff --git a/examples/Utilities/InAppPurchasesDemo.h b/examples/Utilities/InAppPurchasesDemo.h index b9157457..8979b183 100644 --- a/examples/Utilities/InAppPurchasesDemo.h +++ b/examples/Utilities/InAppPurchasesDemo.h @@ -442,15 +442,17 @@ public: Component* refreshComponentForRow (int row, bool selected, Component* existing) override { + auto safePtr = rawToUniquePtr (existing); + if (isPositiveAndBelow (row, voiceProducts.size())) { - if (existing == nullptr) - existing = new VoiceRow (purchases); + if (safePtr == nullptr) + safePtr = std::make_unique (purchases); - if (auto* voiceRow = dynamic_cast (existing)) + if (auto* voiceRow = dynamic_cast (safePtr.get())) voiceRow->update (row, selected); - return existing; + return safePtr.release(); } return nullptr; @@ -499,7 +501,6 @@ public: voiceListBox.setRowHeight (66); voiceListBox.selectRow (0); voiceListBox.updateContent(); - voiceListBox.getViewport()->setScrollOnDragEnabled (true); addAndMakeVisible (phraseLabel); addAndMakeVisible (phraseListBox); diff --git a/extras/AudioPerformanceTest/Builds/Android/app/CMakeLists.txt b/extras/AudioPerformanceTest/Builds/Android/app/CMakeLists.txt index b3d271b2..53c54a49 100644 --- a/extras/AudioPerformanceTest/Builds/Android/app/CMakeLists.txt +++ b/extras/AudioPerformanceTest/Builds/Android/app/CMakeLists.txt @@ -23,9 +23,9 @@ include_directories( AFTER enable_language(ASM) if(JUCE_BUILD_CONFIGURATION MATCHES "DEBUG") - add_definitions([[-DJUCE_DISPLAY_SPLASH_SCREEN=0]] [[-DJUCE_USE_DARK_SPLASH_SCREEN=1]] [[-DJUCE_PROJUCER_VERSION=0x60105]] [[-DJUCE_MODULE_AVAILABLE_juce_audio_basics=1]] [[-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1]] [[-DJUCE_MODULE_AVAILABLE_juce_audio_formats=1]] [[-DJUCE_MODULE_AVAILABLE_juce_audio_processors=1]] [[-DJUCE_MODULE_AVAILABLE_juce_audio_utils=1]] [[-DJUCE_MODULE_AVAILABLE_juce_core=1]] [[-DJUCE_MODULE_AVAILABLE_juce_data_structures=1]] [[-DJUCE_MODULE_AVAILABLE_juce_events=1]] [[-DJUCE_MODULE_AVAILABLE_juce_graphics=1]] [[-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1]] [[-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1]] [[-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1]] [[-DJUCE_STANDALONE_APPLICATION=1]] [[-DJUCER_ANDROIDSTUDIO_7F0E4A25=1]] [[-DJUCE_APP_VERSION=1.0.0]] [[-DJUCE_APP_VERSION_HEX=0x10000]] [[-DDEBUG=1]] [[-D_DEBUG=1]]) + add_definitions([[-DJUCE_DISPLAY_SPLASH_SCREEN=0]] [[-DJUCE_USE_DARK_SPLASH_SCREEN=1]] [[-DJUCE_PROJUCER_VERSION=0x60106]] [[-DJUCE_MODULE_AVAILABLE_juce_audio_basics=1]] [[-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1]] [[-DJUCE_MODULE_AVAILABLE_juce_audio_formats=1]] [[-DJUCE_MODULE_AVAILABLE_juce_audio_processors=1]] [[-DJUCE_MODULE_AVAILABLE_juce_audio_utils=1]] [[-DJUCE_MODULE_AVAILABLE_juce_core=1]] [[-DJUCE_MODULE_AVAILABLE_juce_data_structures=1]] [[-DJUCE_MODULE_AVAILABLE_juce_events=1]] [[-DJUCE_MODULE_AVAILABLE_juce_graphics=1]] [[-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1]] [[-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1]] [[-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1]] [[-DJUCE_STANDALONE_APPLICATION=1]] [[-DJUCER_ANDROIDSTUDIO_7F0E4A25=1]] [[-DJUCE_APP_VERSION=1.0.0]] [[-DJUCE_APP_VERSION_HEX=0x10000]] [[-DDEBUG=1]] [[-D_DEBUG=1]]) elseif(JUCE_BUILD_CONFIGURATION MATCHES "RELEASE") - add_definitions([[-DJUCE_DISPLAY_SPLASH_SCREEN=0]] [[-DJUCE_USE_DARK_SPLASH_SCREEN=1]] [[-DJUCE_PROJUCER_VERSION=0x60105]] [[-DJUCE_MODULE_AVAILABLE_juce_audio_basics=1]] [[-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1]] [[-DJUCE_MODULE_AVAILABLE_juce_audio_formats=1]] [[-DJUCE_MODULE_AVAILABLE_juce_audio_processors=1]] [[-DJUCE_MODULE_AVAILABLE_juce_audio_utils=1]] [[-DJUCE_MODULE_AVAILABLE_juce_core=1]] [[-DJUCE_MODULE_AVAILABLE_juce_data_structures=1]] [[-DJUCE_MODULE_AVAILABLE_juce_events=1]] [[-DJUCE_MODULE_AVAILABLE_juce_graphics=1]] [[-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1]] [[-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1]] [[-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1]] [[-DJUCE_STANDALONE_APPLICATION=1]] [[-DJUCER_ANDROIDSTUDIO_7F0E4A25=1]] [[-DJUCE_APP_VERSION=1.0.0]] [[-DJUCE_APP_VERSION_HEX=0x10000]] [[-DNDEBUG=1]]) + add_definitions([[-DJUCE_DISPLAY_SPLASH_SCREEN=0]] [[-DJUCE_USE_DARK_SPLASH_SCREEN=1]] [[-DJUCE_PROJUCER_VERSION=0x60106]] [[-DJUCE_MODULE_AVAILABLE_juce_audio_basics=1]] [[-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1]] [[-DJUCE_MODULE_AVAILABLE_juce_audio_formats=1]] [[-DJUCE_MODULE_AVAILABLE_juce_audio_processors=1]] [[-DJUCE_MODULE_AVAILABLE_juce_audio_utils=1]] [[-DJUCE_MODULE_AVAILABLE_juce_core=1]] [[-DJUCE_MODULE_AVAILABLE_juce_data_structures=1]] [[-DJUCE_MODULE_AVAILABLE_juce_events=1]] [[-DJUCE_MODULE_AVAILABLE_juce_graphics=1]] [[-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1]] [[-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1]] [[-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1]] [[-DJUCE_STANDALONE_APPLICATION=1]] [[-DJUCER_ANDROIDSTUDIO_7F0E4A25=1]] [[-DJUCE_APP_VERSION=1.0.0]] [[-DJUCE_APP_VERSION_HEX=0x10000]] [[-DNDEBUG=1]]) else() message( FATAL_ERROR "No matching build-configuration found." ) endif() @@ -1340,6 +1340,7 @@ add_library( ${BINARY_NAME} "../../../../../modules/juce_gui_basics/mouse/juce_MouseInputSource.h" "../../../../../modules/juce_gui_basics/mouse/juce_MouseListener.cpp" "../../../../../modules/juce_gui_basics/mouse/juce_MouseListener.h" + "../../../../../modules/juce_gui_basics/mouse/juce_PointerState.h" "../../../../../modules/juce_gui_basics/mouse/juce_SelectedItemSet.h" "../../../../../modules/juce_gui_basics/mouse/juce_TextDragAndDropTarget.h" "../../../../../modules/juce_gui_basics/mouse/juce_TooltipClient.h" @@ -1526,6 +1527,7 @@ add_library( ${BINARY_NAME} "../../../../../modules/juce_gui_extra/native/juce_mac_AppleRemote.mm" "../../../../../modules/juce_gui_extra/native/juce_mac_CarbonViewWrapperComponent.h" "../../../../../modules/juce_gui_extra/native/juce_mac_NSViewComponent.mm" + "../../../../../modules/juce_gui_extra/native/juce_mac_NSViewFrameWatcher.h" "../../../../../modules/juce_gui_extra/native/juce_mac_PushNotifications.cpp" "../../../../../modules/juce_gui_extra/native/juce_mac_SystemTrayIcon.cpp" "../../../../../modules/juce_gui_extra/native/juce_mac_WebBrowserComponent.mm" @@ -2855,6 +2857,7 @@ set_source_files_properties("../../../../../modules/juce_gui_basics/mouse/juce_M set_source_files_properties("../../../../../modules/juce_gui_basics/mouse/juce_MouseInputSource.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_gui_basics/mouse/juce_MouseListener.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_gui_basics/mouse/juce_MouseListener.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_gui_basics/mouse/juce_PointerState.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_gui_basics/mouse/juce_SelectedItemSet.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_gui_basics/mouse/juce_TextDragAndDropTarget.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_gui_basics/mouse/juce_TooltipClient.h" PROPERTIES HEADER_FILE_ONLY TRUE) @@ -3041,6 +3044,7 @@ set_source_files_properties("../../../../../modules/juce_gui_extra/native/juce_l set_source_files_properties("../../../../../modules/juce_gui_extra/native/juce_mac_AppleRemote.mm" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_gui_extra/native/juce_mac_CarbonViewWrapperComponent.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_gui_extra/native/juce_mac_NSViewComponent.mm" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_gui_extra/native/juce_mac_NSViewFrameWatcher.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_gui_extra/native/juce_mac_PushNotifications.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_gui_extra/native/juce_mac_SystemTrayIcon.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_gui_extra/native/juce_mac_WebBrowserComponent.mm" PROPERTIES HEADER_FILE_ONLY TRUE) diff --git a/extras/AudioPerformanceTest/Builds/Android/app/src/main/AndroidManifest.xml b/extras/AudioPerformanceTest/Builds/Android/app/src/main/AndroidManifest.xml index fe61ddc8..e25451f6 100644 --- a/extras/AudioPerformanceTest/Builds/Android/app/src/main/AndroidManifest.xml +++ b/extras/AudioPerformanceTest/Builds/Android/app/src/main/AndroidManifest.xml @@ -1,7 +1,7 @@ + package="com.juce.audioperformancetest"> diff --git a/extras/AudioPerformanceTest/Builds/LinuxMakefile/Makefile b/extras/AudioPerformanceTest/Builds/LinuxMakefile/Makefile index f20fcca6..3c889e5f 100644 --- a/extras/AudioPerformanceTest/Builds/LinuxMakefile/Makefile +++ b/extras/AudioPerformanceTest/Builds/LinuxMakefile/Makefile @@ -35,7 +35,7 @@ ifeq ($(CONFIG),Debug) TARGET_ARCH := endif - JUCE_CPPFLAGS := $(DEPFLAGS) "-DLINUX=1" "-DDEBUG=1" "-D_DEBUG=1" "-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x60105" "-DJUCE_MODULE_AVAILABLE_juce_audio_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_formats=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_processors=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_utils=1" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_MODULE_AVAILABLE_juce_data_structures=1" "-DJUCE_MODULE_AVAILABLE_juce_events=1" "-DJUCE_MODULE_AVAILABLE_juce_graphics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_STANDALONE_APPLICATION=1" "-DJUCER_LINUX_MAKE_6D53C8B4=1" "-DJUCE_APP_VERSION=1.0.0" "-DJUCE_APP_VERSION_HEX=0x10000" $(shell pkg-config --cflags alsa freetype2 libcurl webkit2gtk-4.0 gtk+-x11-3.0) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS) + JUCE_CPPFLAGS := $(DEPFLAGS) "-DLINUX=1" "-DDEBUG=1" "-D_DEBUG=1" "-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x60106" "-DJUCE_MODULE_AVAILABLE_juce_audio_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_formats=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_processors=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_utils=1" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_MODULE_AVAILABLE_juce_data_structures=1" "-DJUCE_MODULE_AVAILABLE_juce_events=1" "-DJUCE_MODULE_AVAILABLE_juce_graphics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_STANDALONE_APPLICATION=1" "-DJUCER_LINUX_MAKE_6D53C8B4=1" "-DJUCE_APP_VERSION=1.0.0" "-DJUCE_APP_VERSION_HEX=0x10000" $(shell pkg-config --cflags alsa freetype2 libcurl webkit2gtk-4.0 gtk+-x11-3.0) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS) JUCE_CPPFLAGS_APP := "-DJucePlugin_Build_VST=0" "-DJucePlugin_Build_VST3=0" "-DJucePlugin_Build_AU=0" "-DJucePlugin_Build_AUv3=0" "-DJucePlugin_Build_RTAS=0" "-DJucePlugin_Build_AAX=0" "-DJucePlugin_Build_Standalone=0" "-DJucePlugin_Build_Unity=0" JUCE_TARGET_APP := AudioPerformanceTest @@ -56,7 +56,7 @@ ifeq ($(CONFIG),Release) TARGET_ARCH := endif - JUCE_CPPFLAGS := $(DEPFLAGS) "-DLINUX=1" "-DNDEBUG=1" "-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x60105" "-DJUCE_MODULE_AVAILABLE_juce_audio_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_formats=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_processors=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_utils=1" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_MODULE_AVAILABLE_juce_data_structures=1" "-DJUCE_MODULE_AVAILABLE_juce_events=1" "-DJUCE_MODULE_AVAILABLE_juce_graphics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_STANDALONE_APPLICATION=1" "-DJUCER_LINUX_MAKE_6D53C8B4=1" "-DJUCE_APP_VERSION=1.0.0" "-DJUCE_APP_VERSION_HEX=0x10000" $(shell pkg-config --cflags alsa freetype2 libcurl webkit2gtk-4.0 gtk+-x11-3.0) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS) + JUCE_CPPFLAGS := $(DEPFLAGS) "-DLINUX=1" "-DNDEBUG=1" "-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x60106" "-DJUCE_MODULE_AVAILABLE_juce_audio_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_formats=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_processors=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_utils=1" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_MODULE_AVAILABLE_juce_data_structures=1" "-DJUCE_MODULE_AVAILABLE_juce_events=1" "-DJUCE_MODULE_AVAILABLE_juce_graphics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_STANDALONE_APPLICATION=1" "-DJUCER_LINUX_MAKE_6D53C8B4=1" "-DJUCE_APP_VERSION=1.0.0" "-DJUCE_APP_VERSION_HEX=0x10000" $(shell pkg-config --cflags alsa freetype2 libcurl webkit2gtk-4.0 gtk+-x11-3.0) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS) JUCE_CPPFLAGS_APP := "-DJucePlugin_Build_VST=0" "-DJucePlugin_Build_VST3=0" "-DJucePlugin_Build_AU=0" "-DJucePlugin_Build_AUv3=0" "-DJucePlugin_Build_RTAS=0" "-DJucePlugin_Build_AAX=0" "-DJucePlugin_Build_Standalone=0" "-DJucePlugin_Build_Unity=0" JUCE_TARGET_APP := AudioPerformanceTest diff --git a/extras/AudioPerformanceTest/Builds/MacOSX/AudioPerformanceTest.xcodeproj/project.pbxproj b/extras/AudioPerformanceTest/Builds/MacOSX/AudioPerformanceTest.xcodeproj/project.pbxproj index c8aaea86..dd7d19f3 100644 --- a/extras/AudioPerformanceTest/Builds/MacOSX/AudioPerformanceTest.xcodeproj/project.pbxproj +++ b/extras/AudioPerformanceTest/Builds/MacOSX/AudioPerformanceTest.xcodeproj/project.pbxproj @@ -325,7 +325,7 @@ "DEBUG=1", "JUCE_DISPLAY_SPLASH_SCREEN=0", "JUCE_USE_DARK_SPLASH_SCREEN=1", - "JUCE_PROJUCER_VERSION=0x60105", + "JUCE_PROJUCER_VERSION=0x60106", "JUCE_MODULE_AVAILABLE_juce_audio_basics=1", "JUCE_MODULE_AVAILABLE_juce_audio_devices=1", "JUCE_MODULE_AVAILABLE_juce_audio_formats=1", @@ -387,7 +387,7 @@ "NDEBUG=1", "JUCE_DISPLAY_SPLASH_SCREEN=0", "JUCE_USE_DARK_SPLASH_SCREEN=1", - "JUCE_PROJUCER_VERSION=0x60105", + "JUCE_PROJUCER_VERSION=0x60106", "JUCE_MODULE_AVAILABLE_juce_audio_basics=1", "JUCE_MODULE_AVAILABLE_juce_audio_devices=1", "JUCE_MODULE_AVAILABLE_juce_audio_formats=1", diff --git a/extras/AudioPerformanceTest/Builds/VisualStudio2022/AudioPerformanceTest_App.vcxproj b/extras/AudioPerformanceTest/Builds/VisualStudio2022/AudioPerformanceTest_App.vcxproj index a63cc330..c44b7acf 100644 --- a/extras/AudioPerformanceTest/Builds/VisualStudio2022/AudioPerformanceTest_App.vcxproj +++ b/extras/AudioPerformanceTest/Builds/VisualStudio2022/AudioPerformanceTest_App.vcxproj @@ -64,7 +64,7 @@ Disabled ProgramDatabase ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60105;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_STANDALONE_APPLICATION=1;JUCER_VS2022_78A503E=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60106;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_STANDALONE_APPLICATION=1;JUCER_VS2022_78A503E=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) MultiThreadedDebugDLL true NotUsing @@ -105,7 +105,7 @@ Full ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60105;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_STANDALONE_APPLICATION=1;JUCER_VS2022_78A503E=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60106;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_STANDALONE_APPLICATION=1;JUCER_VS2022_78A503E=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) MultiThreadedDLL true NotUsing @@ -2797,6 +2797,7 @@ + @@ -2891,6 +2892,7 @@ + diff --git a/extras/AudioPerformanceTest/Builds/VisualStudio2022/AudioPerformanceTest_App.vcxproj.filters b/extras/AudioPerformanceTest/Builds/VisualStudio2022/AudioPerformanceTest_App.vcxproj.filters index 8e1afa8f..e5ba0784 100644 --- a/extras/AudioPerformanceTest/Builds/VisualStudio2022/AudioPerformanceTest_App.vcxproj.filters +++ b/extras/AudioPerformanceTest/Builds/VisualStudio2022/AudioPerformanceTest_App.vcxproj.filters @@ -4644,6 +4644,9 @@ JUCE Modules\juce_gui_basics\mouse + + JUCE Modules\juce_gui_basics\mouse + JUCE Modules\juce_gui_basics\mouse @@ -4926,6 +4929,9 @@ JUCE Modules\juce_gui_extra\native + + JUCE Modules\juce_gui_extra\native + JUCE Modules\juce_gui_extra diff --git a/extras/AudioPerformanceTest/Builds/iOS/AudioPerformanceTest.xcodeproj/project.pbxproj b/extras/AudioPerformanceTest/Builds/iOS/AudioPerformanceTest.xcodeproj/project.pbxproj index 5ca7242e..30323f43 100644 --- a/extras/AudioPerformanceTest/Builds/iOS/AudioPerformanceTest.xcodeproj/project.pbxproj +++ b/extras/AudioPerformanceTest/Builds/iOS/AudioPerformanceTest.xcodeproj/project.pbxproj @@ -338,7 +338,7 @@ "JUCE_CONTENT_SHARING=1", "JUCE_DISPLAY_SPLASH_SCREEN=0", "JUCE_USE_DARK_SPLASH_SCREEN=1", - "JUCE_PROJUCER_VERSION=0x60105", + "JUCE_PROJUCER_VERSION=0x60106", "JUCE_MODULE_AVAILABLE_juce_audio_basics=1", "JUCE_MODULE_AVAILABLE_juce_audio_devices=1", "JUCE_MODULE_AVAILABLE_juce_audio_formats=1", @@ -399,7 +399,7 @@ "JUCE_CONTENT_SHARING=1", "JUCE_DISPLAY_SPLASH_SCREEN=0", "JUCE_USE_DARK_SPLASH_SCREEN=1", - "JUCE_PROJUCER_VERSION=0x60105", + "JUCE_PROJUCER_VERSION=0x60106", "JUCE_MODULE_AVAILABLE_juce_audio_basics=1", "JUCE_MODULE_AVAILABLE_juce_audio_devices=1", "JUCE_MODULE_AVAILABLE_juce_audio_formats=1", diff --git a/extras/AudioPluginHost/Builds/Android/app/CMakeLists.txt b/extras/AudioPluginHost/Builds/Android/app/CMakeLists.txt index 04cf1cdf..132b0f8c 100644 --- a/extras/AudioPluginHost/Builds/Android/app/CMakeLists.txt +++ b/extras/AudioPluginHost/Builds/Android/app/CMakeLists.txt @@ -24,9 +24,9 @@ include_directories( AFTER enable_language(ASM) if(JUCE_BUILD_CONFIGURATION MATCHES "DEBUG") - add_definitions([[-DJUCE_DISPLAY_SPLASH_SCREEN=0]] [[-DJUCE_USE_DARK_SPLASH_SCREEN=1]] [[-DJUCE_PROJUCER_VERSION=0x60105]] [[-DJUCE_MODULE_AVAILABLE_juce_audio_basics=1]] [[-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1]] [[-DJUCE_MODULE_AVAILABLE_juce_audio_formats=1]] [[-DJUCE_MODULE_AVAILABLE_juce_audio_processors=1]] [[-DJUCE_MODULE_AVAILABLE_juce_audio_utils=1]] [[-DJUCE_MODULE_AVAILABLE_juce_core=1]] [[-DJUCE_MODULE_AVAILABLE_juce_cryptography=1]] [[-DJUCE_MODULE_AVAILABLE_juce_data_structures=1]] [[-DJUCE_MODULE_AVAILABLE_juce_dsp=1]] [[-DJUCE_MODULE_AVAILABLE_juce_events=1]] [[-DJUCE_MODULE_AVAILABLE_juce_graphics=1]] [[-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1]] [[-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1]] [[-DJUCE_MODULE_AVAILABLE_juce_opengl=1]] [[-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1]] [[-DJUCE_WASAPI=1]] [[-DJUCE_DIRECTSOUND=1]] [[-DJUCE_ALSA=1]] [[-DJUCE_USE_FLAC=0]] [[-DJUCE_USE_OGGVORBIS=1]] [[-DJUCE_PLUGINHOST_VST3=1]] [[-DJUCE_PLUGINHOST_AU=1]] [[-DJUCE_PLUGINHOST_LADSPA=1]] [[-DJUCE_USE_CDREADER=0]] [[-DJUCE_USE_CDBURNER=0]] [[-DJUCE_WEB_BROWSER=0]] [[-DJUCE_STANDALONE_APPLICATION=1]] [[-DJUCER_ANDROIDSTUDIO_7F0E4A25=1]] [[-DJUCE_APP_VERSION=1.0.0]] [[-DJUCE_APP_VERSION_HEX=0x10000]] [[-DDEBUG=1]] [[-D_DEBUG=1]]) + add_definitions([[-DJUCE_DISPLAY_SPLASH_SCREEN=0]] [[-DJUCE_USE_DARK_SPLASH_SCREEN=1]] [[-DJUCE_PROJUCER_VERSION=0x60106]] [[-DJUCE_MODULE_AVAILABLE_juce_audio_basics=1]] [[-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1]] [[-DJUCE_MODULE_AVAILABLE_juce_audio_formats=1]] [[-DJUCE_MODULE_AVAILABLE_juce_audio_processors=1]] [[-DJUCE_MODULE_AVAILABLE_juce_audio_utils=1]] [[-DJUCE_MODULE_AVAILABLE_juce_core=1]] [[-DJUCE_MODULE_AVAILABLE_juce_cryptography=1]] [[-DJUCE_MODULE_AVAILABLE_juce_data_structures=1]] [[-DJUCE_MODULE_AVAILABLE_juce_dsp=1]] [[-DJUCE_MODULE_AVAILABLE_juce_events=1]] [[-DJUCE_MODULE_AVAILABLE_juce_graphics=1]] [[-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1]] [[-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1]] [[-DJUCE_MODULE_AVAILABLE_juce_opengl=1]] [[-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1]] [[-DJUCE_WASAPI=1]] [[-DJUCE_DIRECTSOUND=1]] [[-DJUCE_ALSA=1]] [[-DJUCE_USE_FLAC=0]] [[-DJUCE_USE_OGGVORBIS=1]] [[-DJUCE_PLUGINHOST_VST3=1]] [[-DJUCE_PLUGINHOST_AU=1]] [[-DJUCE_PLUGINHOST_LADSPA=1]] [[-DJUCE_USE_CDREADER=0]] [[-DJUCE_USE_CDBURNER=0]] [[-DJUCE_WEB_BROWSER=0]] [[-DJUCE_STANDALONE_APPLICATION=1]] [[-DJUCER_ANDROIDSTUDIO_7F0E4A25=1]] [[-DJUCE_APP_VERSION=1.0.0]] [[-DJUCE_APP_VERSION_HEX=0x10000]] [[-DDEBUG=1]] [[-D_DEBUG=1]]) elseif(JUCE_BUILD_CONFIGURATION MATCHES "RELEASE") - add_definitions([[-DJUCE_DISPLAY_SPLASH_SCREEN=0]] [[-DJUCE_USE_DARK_SPLASH_SCREEN=1]] [[-DJUCE_PROJUCER_VERSION=0x60105]] [[-DJUCE_MODULE_AVAILABLE_juce_audio_basics=1]] [[-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1]] [[-DJUCE_MODULE_AVAILABLE_juce_audio_formats=1]] [[-DJUCE_MODULE_AVAILABLE_juce_audio_processors=1]] [[-DJUCE_MODULE_AVAILABLE_juce_audio_utils=1]] [[-DJUCE_MODULE_AVAILABLE_juce_core=1]] [[-DJUCE_MODULE_AVAILABLE_juce_cryptography=1]] [[-DJUCE_MODULE_AVAILABLE_juce_data_structures=1]] [[-DJUCE_MODULE_AVAILABLE_juce_dsp=1]] [[-DJUCE_MODULE_AVAILABLE_juce_events=1]] [[-DJUCE_MODULE_AVAILABLE_juce_graphics=1]] [[-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1]] [[-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1]] [[-DJUCE_MODULE_AVAILABLE_juce_opengl=1]] [[-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1]] [[-DJUCE_WASAPI=1]] [[-DJUCE_DIRECTSOUND=1]] [[-DJUCE_ALSA=1]] [[-DJUCE_USE_FLAC=0]] [[-DJUCE_USE_OGGVORBIS=1]] [[-DJUCE_PLUGINHOST_VST3=1]] [[-DJUCE_PLUGINHOST_AU=1]] [[-DJUCE_PLUGINHOST_LADSPA=1]] [[-DJUCE_USE_CDREADER=0]] [[-DJUCE_USE_CDBURNER=0]] [[-DJUCE_WEB_BROWSER=0]] [[-DJUCE_STANDALONE_APPLICATION=1]] [[-DJUCER_ANDROIDSTUDIO_7F0E4A25=1]] [[-DJUCE_APP_VERSION=1.0.0]] [[-DJUCE_APP_VERSION_HEX=0x10000]] [[-DNDEBUG=1]]) + add_definitions([[-DJUCE_DISPLAY_SPLASH_SCREEN=0]] [[-DJUCE_USE_DARK_SPLASH_SCREEN=1]] [[-DJUCE_PROJUCER_VERSION=0x60106]] [[-DJUCE_MODULE_AVAILABLE_juce_audio_basics=1]] [[-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1]] [[-DJUCE_MODULE_AVAILABLE_juce_audio_formats=1]] [[-DJUCE_MODULE_AVAILABLE_juce_audio_processors=1]] [[-DJUCE_MODULE_AVAILABLE_juce_audio_utils=1]] [[-DJUCE_MODULE_AVAILABLE_juce_core=1]] [[-DJUCE_MODULE_AVAILABLE_juce_cryptography=1]] [[-DJUCE_MODULE_AVAILABLE_juce_data_structures=1]] [[-DJUCE_MODULE_AVAILABLE_juce_dsp=1]] [[-DJUCE_MODULE_AVAILABLE_juce_events=1]] [[-DJUCE_MODULE_AVAILABLE_juce_graphics=1]] [[-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1]] [[-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1]] [[-DJUCE_MODULE_AVAILABLE_juce_opengl=1]] [[-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1]] [[-DJUCE_WASAPI=1]] [[-DJUCE_DIRECTSOUND=1]] [[-DJUCE_ALSA=1]] [[-DJUCE_USE_FLAC=0]] [[-DJUCE_USE_OGGVORBIS=1]] [[-DJUCE_PLUGINHOST_VST3=1]] [[-DJUCE_PLUGINHOST_AU=1]] [[-DJUCE_PLUGINHOST_LADSPA=1]] [[-DJUCE_USE_CDREADER=0]] [[-DJUCE_USE_CDBURNER=0]] [[-DJUCE_WEB_BROWSER=0]] [[-DJUCE_STANDALONE_APPLICATION=1]] [[-DJUCER_ANDROIDSTUDIO_7F0E4A25=1]] [[-DJUCE_APP_VERSION=1.0.0]] [[-DJUCE_APP_VERSION_HEX=0x10000]] [[-DNDEBUG=1]]) if(NOT (ANDROID_ABI STREQUAL "mips" OR ANDROID_ABI STREQUAL "mips64")) set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -flto") set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -flto") @@ -1462,6 +1462,7 @@ add_library( ${BINARY_NAME} "../../../../../modules/juce_gui_basics/mouse/juce_MouseInputSource.h" "../../../../../modules/juce_gui_basics/mouse/juce_MouseListener.cpp" "../../../../../modules/juce_gui_basics/mouse/juce_MouseListener.h" + "../../../../../modules/juce_gui_basics/mouse/juce_PointerState.h" "../../../../../modules/juce_gui_basics/mouse/juce_SelectedItemSet.h" "../../../../../modules/juce_gui_basics/mouse/juce_TextDragAndDropTarget.h" "../../../../../modules/juce_gui_basics/mouse/juce_TooltipClient.h" @@ -1648,6 +1649,7 @@ add_library( ${BINARY_NAME} "../../../../../modules/juce_gui_extra/native/juce_mac_AppleRemote.mm" "../../../../../modules/juce_gui_extra/native/juce_mac_CarbonViewWrapperComponent.h" "../../../../../modules/juce_gui_extra/native/juce_mac_NSViewComponent.mm" + "../../../../../modules/juce_gui_extra/native/juce_mac_NSViewFrameWatcher.h" "../../../../../modules/juce_gui_extra/native/juce_mac_PushNotifications.cpp" "../../../../../modules/juce_gui_extra/native/juce_mac_SystemTrayIcon.cpp" "../../../../../modules/juce_gui_extra/native/juce_mac_WebBrowserComponent.mm" @@ -3131,6 +3133,7 @@ set_source_files_properties("../../../../../modules/juce_gui_basics/mouse/juce_M set_source_files_properties("../../../../../modules/juce_gui_basics/mouse/juce_MouseInputSource.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_gui_basics/mouse/juce_MouseListener.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_gui_basics/mouse/juce_MouseListener.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_gui_basics/mouse/juce_PointerState.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_gui_basics/mouse/juce_SelectedItemSet.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_gui_basics/mouse/juce_TextDragAndDropTarget.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_gui_basics/mouse/juce_TooltipClient.h" PROPERTIES HEADER_FILE_ONLY TRUE) @@ -3317,6 +3320,7 @@ set_source_files_properties("../../../../../modules/juce_gui_extra/native/juce_l set_source_files_properties("../../../../../modules/juce_gui_extra/native/juce_mac_AppleRemote.mm" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_gui_extra/native/juce_mac_CarbonViewWrapperComponent.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_gui_extra/native/juce_mac_NSViewComponent.mm" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_gui_extra/native/juce_mac_NSViewFrameWatcher.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_gui_extra/native/juce_mac_PushNotifications.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_gui_extra/native/juce_mac_SystemTrayIcon.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_gui_extra/native/juce_mac_WebBrowserComponent.mm" PROPERTIES HEADER_FILE_ONLY TRUE) diff --git a/extras/AudioPluginHost/Builds/LinuxMakefile/Makefile b/extras/AudioPluginHost/Builds/LinuxMakefile/Makefile index 757a64cb..04ea6394 100644 --- a/extras/AudioPluginHost/Builds/LinuxMakefile/Makefile +++ b/extras/AudioPluginHost/Builds/LinuxMakefile/Makefile @@ -35,7 +35,7 @@ ifeq ($(CONFIG),Debug) TARGET_ARCH := endif - JUCE_CPPFLAGS := $(DEPFLAGS) "-DLINUX=1" "-DDEBUG=1" "-D_DEBUG=1" "-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x60105" "-DJUCE_MODULE_AVAILABLE_juce_audio_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_formats=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_processors=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_utils=1" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_MODULE_AVAILABLE_juce_cryptography=1" "-DJUCE_MODULE_AVAILABLE_juce_data_structures=1" "-DJUCE_MODULE_AVAILABLE_juce_dsp=1" "-DJUCE_MODULE_AVAILABLE_juce_events=1" "-DJUCE_MODULE_AVAILABLE_juce_graphics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1" "-DJUCE_MODULE_AVAILABLE_juce_opengl=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_WASAPI=1" "-DJUCE_DIRECTSOUND=1" "-DJUCE_ALSA=1" "-DJUCE_USE_FLAC=0" "-DJUCE_USE_OGGVORBIS=1" "-DJUCE_PLUGINHOST_VST3=1" "-DJUCE_PLUGINHOST_AU=1" "-DJUCE_PLUGINHOST_LADSPA=1" "-DJUCE_USE_CDREADER=0" "-DJUCE_USE_CDBURNER=0" "-DJUCE_WEB_BROWSER=0" "-DJUCE_STANDALONE_APPLICATION=1" "-DJUCER_LINUX_MAKE_6D53C8B4=1" "-DJUCE_APP_VERSION=1.0.0" "-DJUCE_APP_VERSION_HEX=0x10000" $(shell pkg-config --cflags alsa freetype2 libcurl) -pthread -I../../../../modules/juce_audio_processors/format_types/VST3_SDK -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS) + JUCE_CPPFLAGS := $(DEPFLAGS) "-DLINUX=1" "-DDEBUG=1" "-D_DEBUG=1" "-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x60106" "-DJUCE_MODULE_AVAILABLE_juce_audio_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_formats=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_processors=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_utils=1" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_MODULE_AVAILABLE_juce_cryptography=1" "-DJUCE_MODULE_AVAILABLE_juce_data_structures=1" "-DJUCE_MODULE_AVAILABLE_juce_dsp=1" "-DJUCE_MODULE_AVAILABLE_juce_events=1" "-DJUCE_MODULE_AVAILABLE_juce_graphics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1" "-DJUCE_MODULE_AVAILABLE_juce_opengl=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_WASAPI=1" "-DJUCE_DIRECTSOUND=1" "-DJUCE_ALSA=1" "-DJUCE_USE_FLAC=0" "-DJUCE_USE_OGGVORBIS=1" "-DJUCE_PLUGINHOST_VST3=1" "-DJUCE_PLUGINHOST_AU=1" "-DJUCE_PLUGINHOST_LADSPA=1" "-DJUCE_USE_CDREADER=0" "-DJUCE_USE_CDBURNER=0" "-DJUCE_WEB_BROWSER=0" "-DJUCE_STANDALONE_APPLICATION=1" "-DJUCER_LINUX_MAKE_6D53C8B4=1" "-DJUCE_APP_VERSION=1.0.0" "-DJUCE_APP_VERSION_HEX=0x10000" $(shell pkg-config --cflags alsa freetype2 libcurl) -pthread -I../../../../modules/juce_audio_processors/format_types/VST3_SDK -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS) JUCE_CPPFLAGS_APP := "-DJucePlugin_Build_VST=0" "-DJucePlugin_Build_VST3=0" "-DJucePlugin_Build_AU=0" "-DJucePlugin_Build_AUv3=0" "-DJucePlugin_Build_RTAS=0" "-DJucePlugin_Build_AAX=0" "-DJucePlugin_Build_Standalone=0" "-DJucePlugin_Build_Unity=0" JUCE_TARGET_APP := AudioPluginHost @@ -56,7 +56,7 @@ ifeq ($(CONFIG),Release) TARGET_ARCH := endif - JUCE_CPPFLAGS := $(DEPFLAGS) "-DLINUX=1" "-DNDEBUG=1" "-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x60105" "-DJUCE_MODULE_AVAILABLE_juce_audio_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_formats=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_processors=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_utils=1" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_MODULE_AVAILABLE_juce_cryptography=1" "-DJUCE_MODULE_AVAILABLE_juce_data_structures=1" "-DJUCE_MODULE_AVAILABLE_juce_dsp=1" "-DJUCE_MODULE_AVAILABLE_juce_events=1" "-DJUCE_MODULE_AVAILABLE_juce_graphics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1" "-DJUCE_MODULE_AVAILABLE_juce_opengl=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_WASAPI=1" "-DJUCE_DIRECTSOUND=1" "-DJUCE_ALSA=1" "-DJUCE_USE_FLAC=0" "-DJUCE_USE_OGGVORBIS=1" "-DJUCE_PLUGINHOST_VST3=1" "-DJUCE_PLUGINHOST_AU=1" "-DJUCE_PLUGINHOST_LADSPA=1" "-DJUCE_USE_CDREADER=0" "-DJUCE_USE_CDBURNER=0" "-DJUCE_WEB_BROWSER=0" "-DJUCE_STANDALONE_APPLICATION=1" "-DJUCER_LINUX_MAKE_6D53C8B4=1" "-DJUCE_APP_VERSION=1.0.0" "-DJUCE_APP_VERSION_HEX=0x10000" $(shell pkg-config --cflags alsa freetype2 libcurl) -pthread -I../../../../modules/juce_audio_processors/format_types/VST3_SDK -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS) + JUCE_CPPFLAGS := $(DEPFLAGS) "-DLINUX=1" "-DNDEBUG=1" "-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x60106" "-DJUCE_MODULE_AVAILABLE_juce_audio_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_formats=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_processors=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_utils=1" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_MODULE_AVAILABLE_juce_cryptography=1" "-DJUCE_MODULE_AVAILABLE_juce_data_structures=1" "-DJUCE_MODULE_AVAILABLE_juce_dsp=1" "-DJUCE_MODULE_AVAILABLE_juce_events=1" "-DJUCE_MODULE_AVAILABLE_juce_graphics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1" "-DJUCE_MODULE_AVAILABLE_juce_opengl=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_WASAPI=1" "-DJUCE_DIRECTSOUND=1" "-DJUCE_ALSA=1" "-DJUCE_USE_FLAC=0" "-DJUCE_USE_OGGVORBIS=1" "-DJUCE_PLUGINHOST_VST3=1" "-DJUCE_PLUGINHOST_AU=1" "-DJUCE_PLUGINHOST_LADSPA=1" "-DJUCE_USE_CDREADER=0" "-DJUCE_USE_CDBURNER=0" "-DJUCE_WEB_BROWSER=0" "-DJUCE_STANDALONE_APPLICATION=1" "-DJUCER_LINUX_MAKE_6D53C8B4=1" "-DJUCE_APP_VERSION=1.0.0" "-DJUCE_APP_VERSION_HEX=0x10000" $(shell pkg-config --cflags alsa freetype2 libcurl) -pthread -I../../../../modules/juce_audio_processors/format_types/VST3_SDK -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS) JUCE_CPPFLAGS_APP := "-DJucePlugin_Build_VST=0" "-DJucePlugin_Build_VST3=0" "-DJucePlugin_Build_AU=0" "-DJucePlugin_Build_AUv3=0" "-DJucePlugin_Build_RTAS=0" "-DJucePlugin_Build_AAX=0" "-DJucePlugin_Build_Standalone=0" "-DJucePlugin_Build_Unity=0" JUCE_TARGET_APP := AudioPluginHost diff --git a/extras/AudioPluginHost/Builds/MacOSX/AudioPluginHost.xcodeproj/project.pbxproj b/extras/AudioPluginHost/Builds/MacOSX/AudioPluginHost.xcodeproj/project.pbxproj index 6c1e2975..4437f8df 100644 --- a/extras/AudioPluginHost/Builds/MacOSX/AudioPluginHost.xcodeproj/project.pbxproj +++ b/extras/AudioPluginHost/Builds/MacOSX/AudioPluginHost.xcodeproj/project.pbxproj @@ -433,7 +433,7 @@ "NDEBUG=1", "JUCE_DISPLAY_SPLASH_SCREEN=0", "JUCE_USE_DARK_SPLASH_SCREEN=1", - "JUCE_PROJUCER_VERSION=0x60105", + "JUCE_PROJUCER_VERSION=0x60106", "JUCE_MODULE_AVAILABLE_juce_audio_basics=1", "JUCE_MODULE_AVAILABLE_juce_audio_devices=1", "JUCE_MODULE_AVAILABLE_juce_audio_formats=1", @@ -563,7 +563,7 @@ "DEBUG=1", "JUCE_DISPLAY_SPLASH_SCREEN=0", "JUCE_USE_DARK_SPLASH_SCREEN=1", - "JUCE_PROJUCER_VERSION=0x60105", + "JUCE_PROJUCER_VERSION=0x60106", "JUCE_MODULE_AVAILABLE_juce_audio_basics=1", "JUCE_MODULE_AVAILABLE_juce_audio_devices=1", "JUCE_MODULE_AVAILABLE_juce_audio_formats=1", diff --git a/extras/AudioPluginHost/Builds/VisualStudio2015/AudioPluginHost_App.vcxproj b/extras/AudioPluginHost/Builds/VisualStudio2015/AudioPluginHost_App.vcxproj index 1293b09d..909c58f8 100644 --- a/extras/AudioPluginHost/Builds/VisualStudio2015/AudioPluginHost_App.vcxproj +++ b/extras/AudioPluginHost/Builds/VisualStudio2015/AudioPluginHost_App.vcxproj @@ -64,7 +64,7 @@ Disabled ProgramDatabase ..\..\..\..\modules\juce_audio_processors\format_types\VST3_SDK;..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60105;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_WASAPI=1;JUCE_DIRECTSOUND=1;JUCE_ALSA=1;JUCE_USE_FLAC=0;JUCE_USE_OGGVORBIS=1;JUCE_PLUGINHOST_VST3=1;JUCE_PLUGINHOST_AU=1;JUCE_PLUGINHOST_LADSPA=1;JUCE_USE_CDREADER=0;JUCE_USE_CDBURNER=0;JUCE_WEB_BROWSER=0;JUCE_STANDALONE_APPLICATION=1;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60106;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_WASAPI=1;JUCE_DIRECTSOUND=1;JUCE_ALSA=1;JUCE_USE_FLAC=0;JUCE_USE_OGGVORBIS=1;JUCE_PLUGINHOST_VST3=1;JUCE_PLUGINHOST_AU=1;JUCE_PLUGINHOST_LADSPA=1;JUCE_USE_CDREADER=0;JUCE_USE_CDBURNER=0;JUCE_WEB_BROWSER=0;JUCE_STANDALONE_APPLICATION=1;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) MultiThreadedDebugDLL true NotUsing @@ -106,7 +106,7 @@ Full ..\..\..\..\modules\juce_audio_processors\format_types\VST3_SDK;..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60105;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_WASAPI=1;JUCE_DIRECTSOUND=1;JUCE_ALSA=1;JUCE_USE_FLAC=0;JUCE_USE_OGGVORBIS=1;JUCE_PLUGINHOST_VST3=1;JUCE_PLUGINHOST_AU=1;JUCE_PLUGINHOST_LADSPA=1;JUCE_USE_CDREADER=0;JUCE_USE_CDBURNER=0;JUCE_WEB_BROWSER=0;JUCE_STANDALONE_APPLICATION=1;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60106;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_WASAPI=1;JUCE_DIRECTSOUND=1;JUCE_ALSA=1;JUCE_USE_FLAC=0;JUCE_USE_OGGVORBIS=1;JUCE_PLUGINHOST_VST3=1;JUCE_PLUGINHOST_AU=1;JUCE_PLUGINHOST_LADSPA=1;JUCE_USE_CDREADER=0;JUCE_USE_CDBURNER=0;JUCE_WEB_BROWSER=0;JUCE_STANDALONE_APPLICATION=1;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) MultiThreadedDLL true NotUsing @@ -3032,6 +3032,7 @@ + @@ -3126,6 +3127,7 @@ + diff --git a/extras/AudioPluginHost/Builds/VisualStudio2015/AudioPluginHost_App.vcxproj.filters b/extras/AudioPluginHost/Builds/VisualStudio2015/AudioPluginHost_App.vcxproj.filters index 5b1acf05..a75bf0cc 100644 --- a/extras/AudioPluginHost/Builds/VisualStudio2015/AudioPluginHost_App.vcxproj.filters +++ b/extras/AudioPluginHost/Builds/VisualStudio2015/AudioPluginHost_App.vcxproj.filters @@ -5079,6 +5079,9 @@ JUCE Modules\juce_gui_basics\mouse + + JUCE Modules\juce_gui_basics\mouse + JUCE Modules\juce_gui_basics\mouse @@ -5361,6 +5364,9 @@ JUCE Modules\juce_gui_extra\native + + JUCE Modules\juce_gui_extra\native + JUCE Modules\juce_gui_extra diff --git a/extras/AudioPluginHost/Builds/VisualStudio2017/AudioPluginHost_App.vcxproj b/extras/AudioPluginHost/Builds/VisualStudio2017/AudioPluginHost_App.vcxproj index 5cf57bf1..4c24ccab 100644 --- a/extras/AudioPluginHost/Builds/VisualStudio2017/AudioPluginHost_App.vcxproj +++ b/extras/AudioPluginHost/Builds/VisualStudio2017/AudioPluginHost_App.vcxproj @@ -64,7 +64,7 @@ Disabled ProgramDatabase ..\..\..\..\modules\juce_audio_processors\format_types\VST3_SDK;..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60105;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_WASAPI=1;JUCE_DIRECTSOUND=1;JUCE_ALSA=1;JUCE_USE_FLAC=0;JUCE_USE_OGGVORBIS=1;JUCE_PLUGINHOST_VST3=1;JUCE_PLUGINHOST_AU=1;JUCE_PLUGINHOST_LADSPA=1;JUCE_USE_CDREADER=0;JUCE_USE_CDBURNER=0;JUCE_WEB_BROWSER=0;JUCE_STANDALONE_APPLICATION=1;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60106;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_WASAPI=1;JUCE_DIRECTSOUND=1;JUCE_ALSA=1;JUCE_USE_FLAC=0;JUCE_USE_OGGVORBIS=1;JUCE_PLUGINHOST_VST3=1;JUCE_PLUGINHOST_AU=1;JUCE_PLUGINHOST_LADSPA=1;JUCE_USE_CDREADER=0;JUCE_USE_CDBURNER=0;JUCE_WEB_BROWSER=0;JUCE_STANDALONE_APPLICATION=1;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) MultiThreadedDebugDLL true NotUsing @@ -106,7 +106,7 @@ Full ..\..\..\..\modules\juce_audio_processors\format_types\VST3_SDK;..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60105;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_WASAPI=1;JUCE_DIRECTSOUND=1;JUCE_ALSA=1;JUCE_USE_FLAC=0;JUCE_USE_OGGVORBIS=1;JUCE_PLUGINHOST_VST3=1;JUCE_PLUGINHOST_AU=1;JUCE_PLUGINHOST_LADSPA=1;JUCE_USE_CDREADER=0;JUCE_USE_CDBURNER=0;JUCE_WEB_BROWSER=0;JUCE_STANDALONE_APPLICATION=1;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60106;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_WASAPI=1;JUCE_DIRECTSOUND=1;JUCE_ALSA=1;JUCE_USE_FLAC=0;JUCE_USE_OGGVORBIS=1;JUCE_PLUGINHOST_VST3=1;JUCE_PLUGINHOST_AU=1;JUCE_PLUGINHOST_LADSPA=1;JUCE_USE_CDREADER=0;JUCE_USE_CDBURNER=0;JUCE_WEB_BROWSER=0;JUCE_STANDALONE_APPLICATION=1;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) MultiThreadedDLL true NotUsing @@ -3032,6 +3032,7 @@ + @@ -3126,6 +3127,7 @@ + diff --git a/extras/AudioPluginHost/Builds/VisualStudio2017/AudioPluginHost_App.vcxproj.filters b/extras/AudioPluginHost/Builds/VisualStudio2017/AudioPluginHost_App.vcxproj.filters index 90873cc0..58ea4cf6 100644 --- a/extras/AudioPluginHost/Builds/VisualStudio2017/AudioPluginHost_App.vcxproj.filters +++ b/extras/AudioPluginHost/Builds/VisualStudio2017/AudioPluginHost_App.vcxproj.filters @@ -5079,6 +5079,9 @@ JUCE Modules\juce_gui_basics\mouse + + JUCE Modules\juce_gui_basics\mouse + JUCE Modules\juce_gui_basics\mouse @@ -5361,6 +5364,9 @@ JUCE Modules\juce_gui_extra\native + + JUCE Modules\juce_gui_extra\native + JUCE Modules\juce_gui_extra diff --git a/extras/AudioPluginHost/Builds/VisualStudio2019/AudioPluginHost_App.vcxproj b/extras/AudioPluginHost/Builds/VisualStudio2019/AudioPluginHost_App.vcxproj index f541961d..2519b8cf 100644 --- a/extras/AudioPluginHost/Builds/VisualStudio2019/AudioPluginHost_App.vcxproj +++ b/extras/AudioPluginHost/Builds/VisualStudio2019/AudioPluginHost_App.vcxproj @@ -64,7 +64,7 @@ Disabled ProgramDatabase ..\..\..\..\modules\juce_audio_processors\format_types\VST3_SDK;..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60105;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_WASAPI=1;JUCE_DIRECTSOUND=1;JUCE_ALSA=1;JUCE_USE_FLAC=0;JUCE_USE_OGGVORBIS=1;JUCE_PLUGINHOST_VST3=1;JUCE_PLUGINHOST_AU=1;JUCE_PLUGINHOST_LADSPA=1;JUCE_USE_CDREADER=0;JUCE_USE_CDBURNER=0;JUCE_WEB_BROWSER=0;JUCE_STANDALONE_APPLICATION=1;JUCER_VS2019_78A5026=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60106;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_WASAPI=1;JUCE_DIRECTSOUND=1;JUCE_ALSA=1;JUCE_USE_FLAC=0;JUCE_USE_OGGVORBIS=1;JUCE_PLUGINHOST_VST3=1;JUCE_PLUGINHOST_AU=1;JUCE_PLUGINHOST_LADSPA=1;JUCE_USE_CDREADER=0;JUCE_USE_CDBURNER=0;JUCE_WEB_BROWSER=0;JUCE_STANDALONE_APPLICATION=1;JUCER_VS2019_78A5026=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) MultiThreadedDebugDLL true NotUsing @@ -106,7 +106,7 @@ Full ..\..\..\..\modules\juce_audio_processors\format_types\VST3_SDK;..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60105;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_WASAPI=1;JUCE_DIRECTSOUND=1;JUCE_ALSA=1;JUCE_USE_FLAC=0;JUCE_USE_OGGVORBIS=1;JUCE_PLUGINHOST_VST3=1;JUCE_PLUGINHOST_AU=1;JUCE_PLUGINHOST_LADSPA=1;JUCE_USE_CDREADER=0;JUCE_USE_CDBURNER=0;JUCE_WEB_BROWSER=0;JUCE_STANDALONE_APPLICATION=1;JUCER_VS2019_78A5026=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60106;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_WASAPI=1;JUCE_DIRECTSOUND=1;JUCE_ALSA=1;JUCE_USE_FLAC=0;JUCE_USE_OGGVORBIS=1;JUCE_PLUGINHOST_VST3=1;JUCE_PLUGINHOST_AU=1;JUCE_PLUGINHOST_LADSPA=1;JUCE_USE_CDREADER=0;JUCE_USE_CDBURNER=0;JUCE_WEB_BROWSER=0;JUCE_STANDALONE_APPLICATION=1;JUCER_VS2019_78A5026=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) MultiThreadedDLL true NotUsing @@ -3032,6 +3032,7 @@ + @@ -3126,6 +3127,7 @@ + diff --git a/extras/AudioPluginHost/Builds/VisualStudio2019/AudioPluginHost_App.vcxproj.filters b/extras/AudioPluginHost/Builds/VisualStudio2019/AudioPluginHost_App.vcxproj.filters index af1fc510..3aa165b0 100644 --- a/extras/AudioPluginHost/Builds/VisualStudio2019/AudioPluginHost_App.vcxproj.filters +++ b/extras/AudioPluginHost/Builds/VisualStudio2019/AudioPluginHost_App.vcxproj.filters @@ -5079,6 +5079,9 @@ JUCE Modules\juce_gui_basics\mouse + + JUCE Modules\juce_gui_basics\mouse + JUCE Modules\juce_gui_basics\mouse @@ -5361,6 +5364,9 @@ JUCE Modules\juce_gui_extra\native + + JUCE Modules\juce_gui_extra\native + JUCE Modules\juce_gui_extra diff --git a/extras/AudioPluginHost/Builds/VisualStudio2022/AudioPluginHost_App.vcxproj b/extras/AudioPluginHost/Builds/VisualStudio2022/AudioPluginHost_App.vcxproj index d775d856..02f36e9b 100644 --- a/extras/AudioPluginHost/Builds/VisualStudio2022/AudioPluginHost_App.vcxproj +++ b/extras/AudioPluginHost/Builds/VisualStudio2022/AudioPluginHost_App.vcxproj @@ -64,7 +64,7 @@ Disabled ProgramDatabase ..\..\..\..\modules\juce_audio_processors\format_types\VST3_SDK;..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60105;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_WASAPI=1;JUCE_DIRECTSOUND=1;JUCE_ALSA=1;JUCE_USE_FLAC=0;JUCE_USE_OGGVORBIS=1;JUCE_PLUGINHOST_VST3=1;JUCE_PLUGINHOST_AU=1;JUCE_PLUGINHOST_LADSPA=1;JUCE_USE_CDREADER=0;JUCE_USE_CDBURNER=0;JUCE_WEB_BROWSER=0;JUCE_STANDALONE_APPLICATION=1;JUCER_VS2022_78A503E=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60106;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_WASAPI=1;JUCE_DIRECTSOUND=1;JUCE_ALSA=1;JUCE_USE_FLAC=0;JUCE_USE_OGGVORBIS=1;JUCE_PLUGINHOST_VST3=1;JUCE_PLUGINHOST_AU=1;JUCE_PLUGINHOST_LADSPA=1;JUCE_USE_CDREADER=0;JUCE_USE_CDBURNER=0;JUCE_WEB_BROWSER=0;JUCE_STANDALONE_APPLICATION=1;JUCER_VS2022_78A503E=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) MultiThreadedDebugDLL true NotUsing @@ -106,7 +106,7 @@ Full ..\..\..\..\modules\juce_audio_processors\format_types\VST3_SDK;..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60105;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_WASAPI=1;JUCE_DIRECTSOUND=1;JUCE_ALSA=1;JUCE_USE_FLAC=0;JUCE_USE_OGGVORBIS=1;JUCE_PLUGINHOST_VST3=1;JUCE_PLUGINHOST_AU=1;JUCE_PLUGINHOST_LADSPA=1;JUCE_USE_CDREADER=0;JUCE_USE_CDBURNER=0;JUCE_WEB_BROWSER=0;JUCE_STANDALONE_APPLICATION=1;JUCER_VS2022_78A503E=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60106;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_WASAPI=1;JUCE_DIRECTSOUND=1;JUCE_ALSA=1;JUCE_USE_FLAC=0;JUCE_USE_OGGVORBIS=1;JUCE_PLUGINHOST_VST3=1;JUCE_PLUGINHOST_AU=1;JUCE_PLUGINHOST_LADSPA=1;JUCE_USE_CDREADER=0;JUCE_USE_CDBURNER=0;JUCE_WEB_BROWSER=0;JUCE_STANDALONE_APPLICATION=1;JUCER_VS2022_78A503E=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) MultiThreadedDLL true NotUsing @@ -3032,6 +3032,7 @@ + @@ -3126,6 +3127,7 @@ + diff --git a/extras/AudioPluginHost/Builds/VisualStudio2022/AudioPluginHost_App.vcxproj.filters b/extras/AudioPluginHost/Builds/VisualStudio2022/AudioPluginHost_App.vcxproj.filters index 0fcd7b28..58772fbb 100644 --- a/extras/AudioPluginHost/Builds/VisualStudio2022/AudioPluginHost_App.vcxproj.filters +++ b/extras/AudioPluginHost/Builds/VisualStudio2022/AudioPluginHost_App.vcxproj.filters @@ -5079,6 +5079,9 @@ JUCE Modules\juce_gui_basics\mouse + + JUCE Modules\juce_gui_basics\mouse + JUCE Modules\juce_gui_basics\mouse @@ -5361,6 +5364,9 @@ JUCE Modules\juce_gui_extra\native + + JUCE Modules\juce_gui_extra\native + JUCE Modules\juce_gui_extra diff --git a/extras/AudioPluginHost/Builds/iOS/AudioPluginHost.xcodeproj/project.pbxproj b/extras/AudioPluginHost/Builds/iOS/AudioPluginHost.xcodeproj/project.pbxproj index 99935fc8..5895abd3 100644 --- a/extras/AudioPluginHost/Builds/iOS/AudioPluginHost.xcodeproj/project.pbxproj +++ b/extras/AudioPluginHost/Builds/iOS/AudioPluginHost.xcodeproj/project.pbxproj @@ -442,7 +442,7 @@ "JUCE_CONTENT_SHARING=1", "JUCE_DISPLAY_SPLASH_SCREEN=0", "JUCE_USE_DARK_SPLASH_SCREEN=1", - "JUCE_PROJUCER_VERSION=0x60105", + "JUCE_PROJUCER_VERSION=0x60106", "JUCE_MODULE_AVAILABLE_juce_audio_basics=1", "JUCE_MODULE_AVAILABLE_juce_audio_devices=1", "JUCE_MODULE_AVAILABLE_juce_audio_formats=1", @@ -573,7 +573,7 @@ "JUCE_CONTENT_SHARING=1", "JUCE_DISPLAY_SPLASH_SCREEN=0", "JUCE_USE_DARK_SPLASH_SCREEN=1", - "JUCE_PROJUCER_VERSION=0x60105", + "JUCE_PROJUCER_VERSION=0x60106", "JUCE_MODULE_AVAILABLE_juce_audio_basics=1", "JUCE_MODULE_AVAILABLE_juce_audio_devices=1", "JUCE_MODULE_AVAILABLE_juce_audio_formats=1", diff --git a/extras/AudioPluginHost/Source/HostStartup.cpp b/extras/AudioPluginHost/Source/HostStartup.cpp index 175d8505..485fce90 100644 --- a/extras/AudioPluginHost/Source/HostStartup.cpp +++ b/extras/AudioPluginHost/Source/HostStartup.cpp @@ -35,22 +35,23 @@ class PluginScannerSubprocess : private ChildProcessWorker, private AsyncUpdater { public: - PluginScannerSubprocess() - { - formatManager.addDefaultFormats(); - } - using ChildProcessWorker::initialiseFromCommandLine; private: void handleMessageFromCoordinator (const MemoryBlock& mb) override { + if (mb.isEmpty()) + return; + + if (! doScan (mb)) { - const std::lock_guard lock (mutex); - pendingBlocks.emplace (mb); - } + { + const std::lock_guard lock (mutex); + pendingBlocks.emplace (mb); + } - triggerAsyncUpdate(); + triggerAsyncUpdate(); + } } void handleConnectionLost() override @@ -58,7 +59,6 @@ private: JUCEApplicationBase::quit(); } - // It's important to run the plugin scan on the main thread! void handleAsyncUpdate() override { for (;;) @@ -78,27 +78,55 @@ private: if (block.isEmpty()) return; - MemoryInputStream stream { block, false }; - const auto formatName = stream.readString(); - const auto identifier = stream.readString(); + doScan (block); + } + } + + bool doScan (const MemoryBlock& block) + { + AudioPluginFormatManager formatManager; + formatManager.addDefaultFormats(); + + MemoryInputStream stream { block, false }; + const auto formatName = stream.readString(); + const auto identifier = stream.readString(); - OwnedArray results; + PluginDescription pd; + pd.fileOrIdentifier = identifier; + pd.uniqueId = pd.deprecatedUid = 0; + const auto matchingFormat = [&]() -> AudioPluginFormat* + { for (auto* format : formatManager.getFormats()) if (format->getName() == formatName) - format->findAllTypesForFile (results, identifier); - - XmlElement xml ("LIST"); + return format; - for (const auto& desc : results) - xml.addChildElement (desc->createXml().release()); + return nullptr; + }(); - const auto str = xml.toString(); - sendMessageToCoordinator ({ str.toRawUTF8(), str.getNumBytesAsUTF8() }); + if (matchingFormat == nullptr + || (! MessageManager::getInstance()->isThisTheMessageThread() + && ! matchingFormat->requiresUnblockedMessageThreadDuringCreation (pd))) + { + return false; } + + OwnedArray results; + matchingFormat->findAllTypesForFile (results, identifier); + sendPluginDescriptions (results); + return true; } - AudioPluginFormatManager formatManager; + void sendPluginDescriptions (const OwnedArray& results) + { + XmlElement xml ("LIST"); + + for (const auto& desc : results) + xml.addChildElement (desc->createXml().release()); + + const auto str = xml.toString(); + sendMessageToCoordinator ({ str.toRawUTF8(), str.getNumBytesAsUTF8() }); + } std::mutex mutex; std::queue pendingBlocks; @@ -132,7 +160,6 @@ public: appProperties->setStorageParameters (options); mainWindow.reset (new MainHostWindow()); - mainWindow->setUsingNativeTitleBar (true); commandManager.registerAllCommandsForTarget (this); commandManager.registerAllCommandsForTarget (mainWindow.get()); diff --git a/extras/AudioPluginHost/Source/Plugins/IOConfigurationWindow.cpp b/extras/AudioPluginHost/Source/Plugins/IOConfigurationWindow.cpp index f0cfe339..db77d0cb 100644 --- a/extras/AudioPluginHost/Source/Plugins/IOConfigurationWindow.cpp +++ b/extras/AudioPluginHost/Source/Plugins/IOConfigurationWindow.cpp @@ -171,7 +171,6 @@ private: //============================================================================== class IOConfigurationWindow::InputOutputConfig : public Component, - private ComboBox::Listener, private Button::Listener, private NumberedBoxes::Listener { @@ -187,7 +186,6 @@ public: layoutLabel.setFont (layoutLabel.getFont().withStyle (Font::bold)); enabledToggle.setClickingTogglesState (true); - layouts.addListener (this); enabledToggle.addListener (this); addAndMakeVisible (layoutLabel); @@ -262,26 +260,32 @@ private: { name.setText (bus->getName(), NotificationType::dontSendNotification); - int i; - for (i = 1; i < AudioChannelSet::maxChannelsOfNamedLayout; ++i) - if ((layouts.indexOfItemId(i) == -1) != bus->supportedLayoutWithChannels (i).isDisabled()) - break; - // supported layouts have changed - if (i < AudioChannelSet::maxChannelsOfNamedLayout) - { - layouts.clear(); + layouts.clear (dontSendNotification); + auto* menu = layouts.getRootMenu(); + + auto itemId = 1; + auto selectedId = -1; - for (i = 1; i < AudioChannelSet::maxChannelsOfNamedLayout; ++i) + for (auto i = 1; i < AudioChannelSet::maxChannelsOfNamedLayout; ++i) + { + for (const auto& set : AudioChannelSet::channelSetsWithNumberOfChannels (i)) { - auto set = bus->supportedLayoutWithChannels (i); + if (bus->isLayoutSupported (set)) + { + menu->addItem (PopupMenu::Item { set.getDescription() } + .setAction ([this, set] { applyBusLayout (set); }) + .setID (itemId)); + } - if (! set.isDisabled()) - layouts.addItem (set.getDescription(), i); + if (bus->getCurrentLayout() == set) + selectedId = itemId; + + ++itemId; } } - layouts.setSelectedId (bus->getLastEnabledLayout().size()); + layouts.setSelectedId (selectedId); const bool canBeDisabled = bus->isNumberOfChannelsSupported (0); @@ -294,27 +298,18 @@ private: } //============================================================================== - void comboBoxChanged (ComboBox* combo) override + void applyBusLayout (const AudioChannelSet& set) { - if (combo == &layouts) + if (auto* p = owner.getAudioProcessor()) { - if (auto* p = owner.getAudioProcessor()) + if (auto* bus = p->getBus (isInput, currentBus)) { - if (auto* bus = p->getBus (isInput, currentBus)) + if (bus->setCurrentLayoutWithoutEnabling (set)) { - auto selectedNumChannels = layouts.getSelectedId(); - - if (selectedNumChannels != bus->getLastEnabledLayout().size()) - { - if (isPositiveAndBelow (selectedNumChannels, AudioChannelSet::maxChannelsOfNamedLayout) - && bus->setCurrentLayoutWithoutEnabling (bus->supportedLayoutWithChannels (selectedNumChannels))) - { - if (auto* config = owner.getConfig (! isInput)) - config->updateBusLayout(); + if (auto* config = owner.getConfig (! isInput)) + config->updateBusLayout(); - owner.update(); - } - } + owner.update(); } } } diff --git a/extras/AudioPluginHost/Source/UI/GraphEditorPanel.cpp b/extras/AudioPluginHost/Source/UI/GraphEditorPanel.cpp index e7a90ce5..7060ac74 100644 --- a/extras/AudioPluginHost/Source/UI/GraphEditorPanel.cpp +++ b/extras/AudioPluginHost/Source/UI/GraphEditorPanel.cpp @@ -401,50 +401,38 @@ struct GraphEditorPanel::PluginComponent : public Component, void showPopupMenu() { menu.reset (new PopupMenu); - menu->addItem (1, "Delete this filter"); - menu->addItem (2, "Disconnect all pins"); - menu->addItem (3, "Toggle Bypass"); + menu->addItem ("Delete this filter", [this] { graph.graph.removeNode (pluginID); }); + menu->addItem ("Disconnect all pins", [this] { graph.graph.disconnectNode (pluginID); }); + menu->addItem ("Toggle Bypass", [this] + { + if (auto* node = graph.graph.getNodeForId (pluginID)) + node->setBypassed (! node->isBypassed()); + + repaint(); + }); menu->addSeparator(); if (getProcessor()->hasEditor()) - menu->addItem (10, "Show plugin GUI"); + menu->addItem ("Show plugin GUI", [this] { showWindow (PluginWindow::Type::normal); }); - menu->addItem (11, "Show all programs"); - menu->addItem (12, "Show all parameters"); - menu->addItem (13, "Show debug log"); + menu->addItem ("Show all programs", [this] { showWindow (PluginWindow::Type::programs); }); + menu->addItem ("Show all parameters", [this] { showWindow (PluginWindow::Type::generic); }); + menu->addItem ("Show debug log", [this] { showWindow (PluginWindow::Type::debug); }); if (autoScaleOptionAvailable) addPluginAutoScaleOptionsSubMenu (dynamic_cast (getProcessor()), *menu); menu->addSeparator(); - menu->addItem (20, "Configure Audio I/O"); - menu->addItem (21, "Test state save/load"); - - menu->showMenuAsync ({}, ModalCallbackFunction::create - ([this] (int r) { - switch (r) - { - case 1: graph.graph.removeNode (pluginID); break; - case 2: graph.graph.disconnectNode (pluginID); break; - case 3: - { - if (auto* node = graph.graph.getNodeForId (pluginID)) - node->setBypassed (! node->isBypassed()); + menu->addItem ("Configure Audio I/O", [this] { showWindow (PluginWindow::Type::audioIO); }); + menu->addItem ("Test state save/load", [this] { testStateSaveLoad(); }); - repaint(); + #if ! JUCE_IOS && ! JUCE_ANDROID + menu->addSeparator(); + menu->addItem ("Save plugin state", [this] { savePluginState(); }); + menu->addItem ("Load plugin state", [this] { loadPluginState(); }); + #endif - break; - } - case 10: showWindow (PluginWindow::Type::normal); break; - case 11: showWindow (PluginWindow::Type::programs); break; - case 12: showWindow (PluginWindow::Type::generic) ; break; - case 13: showWindow (PluginWindow::Type::debug); break; - case 20: showWindow (PluginWindow::Type::audioIO); break; - case 21: testStateSaveLoad(); break; - - default: break; - } - })); + menu->showMenuAsync ({}); } void testStateSaveLoad() @@ -484,6 +472,59 @@ struct GraphEditorPanel::PluginComponent : public Component, void handleAsyncUpdate() override { repaint(); } + void savePluginState() + { + fileChooser = std::make_unique ("Save plugin state"); + + const auto onChosen = [ref = SafePointer (this)] (const FileChooser& chooser) + { + if (ref == nullptr) + return; + + const auto result = chooser.getResult(); + + if (result == File()) + return; + + if (auto* node = ref->graph.graph.getNodeForId (ref->pluginID)) + { + MemoryBlock block; + node->getProcessor()->getStateInformation (block); + result.replaceWithData (block.getData(), block.getSize()); + } + }; + + fileChooser->launchAsync (FileBrowserComponent::saveMode | FileBrowserComponent::warnAboutOverwriting, onChosen); + } + + void loadPluginState() + { + fileChooser = std::make_unique ("Load plugin state"); + + const auto onChosen = [ref = SafePointer (this)] (const FileChooser& chooser) + { + if (ref == nullptr) + return; + + const auto result = chooser.getResult(); + + if (result == File()) + return; + + if (auto* node = ref->graph.graph.getNodeForId (ref->pluginID)) + { + if (auto stream = result.createInputStream()) + { + MemoryBlock block; + stream->readIntoMemoryBlock (block); + node->getProcessor()->setStateInformation (block.getData(), (int) block.getSize()); + } + } + }; + + fileChooser->launchAsync (FileBrowserComponent::openMode | FileBrowserComponent::canSelectFiles, onChosen); + } + GraphEditorPanel& panel; PluginGraph& graph; const AudioProcessorGraph::NodeID pluginID; @@ -495,6 +536,7 @@ struct GraphEditorPanel::PluginComponent : public Component, int numIns = 0, numOuts = 0; DropShadowEffect shadow; std::unique_ptr menu; + std::unique_ptr fileChooser; const String formatSuffix = getFormatSuffix (getProcessor()); }; diff --git a/extras/AudioPluginHost/Source/UI/MainHostWindow.cpp b/extras/AudioPluginHost/Source/UI/MainHostWindow.cpp index a0e410fd..0c7da61d 100644 --- a/extras/AudioPluginHost/Source/UI/MainHostWindow.cpp +++ b/extras/AudioPluginHost/Source/UI/MainHostWindow.cpp @@ -300,6 +300,8 @@ MainHostWindow::MainHostWindow() setContentNonOwned (graphHolder.get(), false); + setUsingNativeTitleBar (true); + restoreWindowStateFromString (getAppProperties().getUserSettings()->getValue ("mainWindowPos")); setVisible (true); diff --git a/extras/BinaryBuilder/Builds/LinuxMakefile/Makefile b/extras/BinaryBuilder/Builds/LinuxMakefile/Makefile index 7df3dbc1..3f8015de 100644 --- a/extras/BinaryBuilder/Builds/LinuxMakefile/Makefile +++ b/extras/BinaryBuilder/Builds/LinuxMakefile/Makefile @@ -35,7 +35,7 @@ ifeq ($(CONFIG),Debug) TARGET_ARCH := endif - JUCE_CPPFLAGS := $(DEPFLAGS) "-DLINUX=1" "-DDEBUG=1" "-D_DEBUG=1" "-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x60105" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_STANDALONE_APPLICATION=1" "-DJUCER_LINUX_MAKE_6D53C8B4=1" "-DJUCE_APP_VERSION=1.0.0" "-DJUCE_APP_VERSION_HEX=0x10000" $(shell pkg-config --cflags libcurl) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS) + JUCE_CPPFLAGS := $(DEPFLAGS) "-DLINUX=1" "-DDEBUG=1" "-D_DEBUG=1" "-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x60106" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_STANDALONE_APPLICATION=1" "-DJUCER_LINUX_MAKE_6D53C8B4=1" "-DJUCE_APP_VERSION=1.0.0" "-DJUCE_APP_VERSION_HEX=0x10000" $(shell pkg-config --cflags libcurl) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS) JUCE_CPPFLAGS_CONSOLEAPP := "-DJucePlugin_Build_VST=0" "-DJucePlugin_Build_VST3=0" "-DJucePlugin_Build_AU=0" "-DJucePlugin_Build_AUv3=0" "-DJucePlugin_Build_RTAS=0" "-DJucePlugin_Build_AAX=0" "-DJucePlugin_Build_Standalone=0" "-DJucePlugin_Build_Unity=0" JUCE_TARGET_CONSOLEAPP := BinaryBuilder @@ -56,7 +56,7 @@ ifeq ($(CONFIG),Release) TARGET_ARCH := endif - JUCE_CPPFLAGS := $(DEPFLAGS) "-DLINUX=1" "-DNDEBUG=1" "-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x60105" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_STANDALONE_APPLICATION=1" "-DJUCER_LINUX_MAKE_6D53C8B4=1" "-DJUCE_APP_VERSION=1.0.0" "-DJUCE_APP_VERSION_HEX=0x10000" $(shell pkg-config --cflags libcurl) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS) + JUCE_CPPFLAGS := $(DEPFLAGS) "-DLINUX=1" "-DNDEBUG=1" "-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x60106" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_STANDALONE_APPLICATION=1" "-DJUCER_LINUX_MAKE_6D53C8B4=1" "-DJUCE_APP_VERSION=1.0.0" "-DJUCE_APP_VERSION_HEX=0x10000" $(shell pkg-config --cflags libcurl) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS) JUCE_CPPFLAGS_CONSOLEAPP := "-DJucePlugin_Build_VST=0" "-DJucePlugin_Build_VST3=0" "-DJucePlugin_Build_AU=0" "-DJucePlugin_Build_AUv3=0" "-DJucePlugin_Build_RTAS=0" "-DJucePlugin_Build_AAX=0" "-DJucePlugin_Build_Standalone=0" "-DJucePlugin_Build_Unity=0" JUCE_TARGET_CONSOLEAPP := BinaryBuilder diff --git a/extras/BinaryBuilder/Builds/MacOSX/BinaryBuilder.xcodeproj/project.pbxproj b/extras/BinaryBuilder/Builds/MacOSX/BinaryBuilder.xcodeproj/project.pbxproj index 62f404f3..83de5c3d 100644 --- a/extras/BinaryBuilder/Builds/MacOSX/BinaryBuilder.xcodeproj/project.pbxproj +++ b/extras/BinaryBuilder/Builds/MacOSX/BinaryBuilder.xcodeproj/project.pbxproj @@ -201,7 +201,7 @@ "DEBUG=1", "JUCE_DISPLAY_SPLASH_SCREEN=0", "JUCE_USE_DARK_SPLASH_SCREEN=1", - "JUCE_PROJUCER_VERSION=0x60105", + "JUCE_PROJUCER_VERSION=0x60106", "JUCE_MODULE_AVAILABLE_juce_core=1", "JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1", "JUCE_STANDALONE_APPLICATION=1", @@ -299,7 +299,7 @@ "NDEBUG=1", "JUCE_DISPLAY_SPLASH_SCREEN=0", "JUCE_USE_DARK_SPLASH_SCREEN=1", - "JUCE_PROJUCER_VERSION=0x60105", + "JUCE_PROJUCER_VERSION=0x60106", "JUCE_MODULE_AVAILABLE_juce_core=1", "JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1", "JUCE_STANDALONE_APPLICATION=1", diff --git a/extras/BinaryBuilder/Builds/VisualStudio2022/BinaryBuilder_ConsoleApp.vcxproj b/extras/BinaryBuilder/Builds/VisualStudio2022/BinaryBuilder_ConsoleApp.vcxproj index 4d20d07d..2b14ea80 100644 --- a/extras/BinaryBuilder/Builds/VisualStudio2022/BinaryBuilder_ConsoleApp.vcxproj +++ b/extras/BinaryBuilder/Builds/VisualStudio2022/BinaryBuilder_ConsoleApp.vcxproj @@ -64,7 +64,7 @@ Disabled ProgramDatabase ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;_CONSOLE;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60105;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_STANDALONE_APPLICATION=1;JUCER_VS2022_78A503E=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;_CONSOLE;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60106;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_STANDALONE_APPLICATION=1;JUCER_VS2022_78A503E=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) MultiThreadedDebugDLL true NotUsing @@ -105,7 +105,7 @@ Full ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;_CONSOLE;WIN32;_WINDOWS;NDEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60105;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_STANDALONE_APPLICATION=1;JUCER_VS2022_78A503E=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;_CONSOLE;WIN32;_WINDOWS;NDEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60106;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_STANDALONE_APPLICATION=1;JUCER_VS2022_78A503E=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) MultiThreadedDLL true NotUsing diff --git a/extras/Build/CMake/JUCEHelperTargets.cmake b/extras/Build/CMake/JUCEHelperTargets.cmake index 4d145ebf..f592f994 100644 --- a/extras/Build/CMake/JUCEHelperTargets.cmake +++ b/extras/Build/CMake/JUCEHelperTargets.cmake @@ -11,7 +11,7 @@ elseif((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") OR (CMAKE_CXX_COMPILER_ID STREQU -Wsign-conversion -Wbool-conversion -Wextra-semi -Wunreachable-code -Wcast-align -Wshift-sign-overflow -Wno-missing-field-initializers -Wnullable-to-nonnull-conversion -Wno-ignored-qualifiers -Wswitch-enum - -Wpedantic + -Wpedantic -Wdeprecated $<$,$>: -Wzero-as-null-pointer-constant -Wunused-private-field -Woverloaded-virtual -Wreorder diff --git a/extras/Build/CMake/JUCEUtils.cmake b/extras/Build/CMake/JUCEUtils.cmake index a734f2da..245fe233 100644 --- a/extras/Build/CMake/JUCEUtils.cmake +++ b/extras/Build/CMake/JUCEUtils.cmake @@ -318,6 +318,10 @@ function(_juce_write_configure_time_info target) _juce_append_target_property(file_content APP_SANDBOX_INHERIT ${target} JUCE_APP_SANDBOX_INHERIT) _juce_append_target_property(file_content HARDENED_RUNTIME_OPTIONS ${target} JUCE_HARDENED_RUNTIME_OPTIONS) _juce_append_target_property(file_content APP_SANDBOX_OPTIONS ${target} JUCE_APP_SANDBOX_OPTIONS) + _juce_append_target_property(file_content APP_SANDBOX_FILE_ACCESS_HOME_RO ${target} JUCE_APP_SANDBOX_FILE_ACCESS_HOME_RO) + _juce_append_target_property(file_content APP_SANDBOX_FILE_ACCESS_HOME_RW ${target} JUCE_APP_SANDBOX_FILE_ACCESS_HOME_RW) + _juce_append_target_property(file_content APP_SANDBOX_FILE_ACCESS_ABS_RO ${target} JUCE_APP_SANDBOX_FILE_ACCESS_ABS_RO) + _juce_append_target_property(file_content APP_SANDBOX_FILE_ACCESS_ABS_RW ${target} JUCE_APP_SANDBOX_FILE_ACCESS_ABS_RW) _juce_append_target_property(file_content APP_GROUPS_ENABLED ${target} JUCE_APP_GROUPS_ENABLED) _juce_append_target_property(file_content APP_GROUP_IDS ${target} JUCE_APP_GROUP_IDS) _juce_append_target_property(file_content IS_PLUGIN ${target} JUCE_IS_PLUGIN) @@ -451,7 +455,7 @@ function(_juce_to_char_literal str out_var help_text) string(LENGTH "${str}" string_length) if(NOT "${string_length}" EQUAL "4") - message(FATAL_ERROR "The ${help_text} code must contain exactly four characters, but it was set to '${str}'") + message(WARNING "The ${help_text} code must contain exactly four characters, but it was set to '${str}'") endif() # Round-tripping through a file is the simplest way to convert a string to hex... @@ -463,7 +467,8 @@ function(_juce_to_char_literal str out_var help_text) file(READ "${scratch_file}" four_chars_hex HEX) file(REMOVE "${scratch_file}") - set(${out_var} ${four_chars_hex} PARENT_SCOPE) + string(SUBSTRING "${four_chars_hex}00000000" 0 8 four_chars_hex) + set(${out_var} "${four_chars_hex}" PARENT_SCOPE) endfunction() # ================================================================================================== @@ -855,7 +860,15 @@ function(juce_enable_copy_plugin_step shared_code_target) get_target_property(source "${target}" JUCE_PLUGIN_ARTEFACT_FILE) if(source) - get_target_property(dest "${target}" JUCE_PLUGIN_COPY_DIR) + if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") + add_custom_command(TARGET ${target} POST_BUILD + COMMAND "${CMAKE_COMMAND}" + "-Dsrc=${source}" + "-P" "${JUCE_CMAKE_UTILS_DIR}/checkBundleSigning.cmake" + VERBATIM) + endif() + + get_target_property(dest "${target}" JUCE_PLUGIN_COPY_DIR) if(dest) _juce_copy_dir("${target}" "${source}" "$") @@ -1537,6 +1550,10 @@ function(_juce_initialise_target target) VST3_CATEGORIES HARDENED_RUNTIME_OPTIONS APP_SANDBOX_OPTIONS + APP_SANDBOX_FILE_ACCESS_HOME_RO + APP_SANDBOX_FILE_ACCESS_HOME_RW + APP_SANDBOX_FILE_ACCESS_ABS_RO + APP_SANDBOX_FILE_ACCESS_ABS_RW DOCUMENT_EXTENSIONS AAX_CATEGORY IPHONE_SCREEN_ORIENTATIONS # iOS only diff --git a/extras/Build/CMake/checkBundleSigning.cmake b/extras/Build/CMake/checkBundleSigning.cmake new file mode 100644 index 00000000..457edd7b --- /dev/null +++ b/extras/Build/CMake/checkBundleSigning.cmake @@ -0,0 +1,37 @@ +# ============================================================================== +# +# This file is part of the JUCE library. +# Copyright (c) 2020 - Raw Material Software Limited +# +# JUCE is an open source library subject to commercial or open-source +# licensing. +# +# By using JUCE, you agree to the terms of both the JUCE 6 End-User License +# Agreement and JUCE Privacy Policy (both effective as of the 16th June 2020). +# +# End User License Agreement: www.juce.com/juce-6-licence +# Privacy Policy: www.juce.com/juce-privacy-policy +# +# Or: You may also use this code under the terms of the GPL v3 (see +# www.gnu.org/licenses). +# +# JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER +# EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE +# DISCLAIMED. +# +# ============================================================================== + +find_program(JUCE_XCRUN xcrun) + +if(NOT JUCE_XCRUN) + return() +endif() + +execute_process( + COMMAND "${JUCE_XCRUN}" codesign --verify "${src}" + RESULT_VARIABLE result) + +if(result) + message(STATUS "Replacing invalid signature with ad-hoc signature") + execute_process(COMMAND "${JUCE_XCRUN}" codesign -s - "${src}") +endif() diff --git a/extras/Build/juce_build_tools/juce_build_tools.h b/extras/Build/juce_build_tools/juce_build_tools.h index 03db74ba..d3e72f55 100644 --- a/extras/Build/juce_build_tools/juce_build_tools.h +++ b/extras/Build/juce_build_tools/juce_build_tools.h @@ -34,7 +34,7 @@ ID: juce_build_tools vendor: juce - version: 6.1.5 + version: 6.1.6 name: JUCE Build Tools description: Classes for generating intermediate files for JUCE projects. website: http://www.juce.com/juce diff --git a/extras/Build/juce_build_tools/utils/juce_Entitlements.cpp b/extras/Build/juce_build_tools/utils/juce_Entitlements.cpp index bb4c02f1..faac95a5 100644 --- a/extras/Build/juce_build_tools/utils/juce_Entitlements.cpp +++ b/extras/Build/juce_build_tools/utils/juce_Entitlements.cpp @@ -79,7 +79,7 @@ namespace build_tools if (isAppGroupsEnabled) { auto appGroups = StringArray::fromTokens (appGroupIdString, ";", {}); - auto groups = String (""); + String groups = ""; for (auto group : appGroups) groups += "\n\t\t" + group.trim() + ""; @@ -101,13 +101,27 @@ namespace build_tools { // no other sandbox options can be specified if sandbox inheritance is enabled! jassert (appSandboxOptions.isEmpty()); + jassert (appSandboxTemporaryPaths.empty()); entitlements.set ("com.apple.security.inherit", ""); } if (isAppSandboxEnabled) + { for (auto& option : appSandboxOptions) entitlements.set (option, ""); + + for (auto& option : appSandboxTemporaryPaths) + { + String paths = ""; + + for (const auto& path : option.values) + paths += "\n\t\t" + path + ""; + + paths += "\n\t"; + entitlements.set (option.key, paths); + } + } } if (isNetworkingMulticastEnabled) diff --git a/extras/Build/juce_build_tools/utils/juce_Entitlements.h b/extras/Build/juce_build_tools/utils/juce_Entitlements.h index b7d15385..a706fd35 100644 --- a/extras/Build/juce_build_tools/utils/juce_Entitlements.h +++ b/extras/Build/juce_build_tools/utils/juce_Entitlements.h @@ -49,6 +49,14 @@ namespace build_tools StringArray hardenedRuntimeOptions; StringArray appSandboxOptions; + struct KeyAndStringArray + { + String key; + StringArray values; + }; + + std::vector appSandboxTemporaryPaths; + private: StringPairArray getEntitlements() const; }; diff --git a/extras/Build/juceaide/CMakeLists.txt b/extras/Build/juceaide/CMakeLists.txt index dd680eae..1839c668 100644 --- a/extras/Build/juceaide/CMakeLists.txt +++ b/extras/Build/juceaide/CMakeLists.txt @@ -53,10 +53,18 @@ else() # environment variables, which is unfortunate because we really don't want to cross-compile # juceaide. If you really want to set the compilers for juceaide, pass the appropriate # CMAKE__COMPILER flags when configuring CMake. - if((CMAKE_SYSTEM_NAME STREQUAL "Android") OR (CMAKE_SYSTEM_NAME STREQUAL "iOS")) + if(CMAKE_CROSSCOMPILING) unset(ENV{ASM}) unset(ENV{CC}) unset(ENV{CXX}) + else() + # When building with clang-cl in Clion on Windows for an x64 target, the ABI detection phase + # of the inner build can fail unless we pass through these flags too + set(extra_configure_flags + "-DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}" + "-DCMAKE_C_FLAGS=${CMAKE_C_FLAGS}" + "-DCMAKE_EXE_LINKER_FLAGS=${CMAKE_EXE_LINKER_FLAGS}" + "-DCMAKE_GENERATOR_PLATFORM=${CMAKE_GENERATOR_PLATFORM}") endif() message(STATUS "Configuring juceaide") @@ -70,6 +78,7 @@ else() "-DCMAKE_BUILD_TYPE=Debug" "-DJUCE_BUILD_HELPER_TOOLS=ON" "-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}" + ${extra_configure_flags} WORKING_DIRECTORY "${JUCE_SOURCE_DIR}" OUTPUT_VARIABLE command_output ERROR_VARIABLE command_output diff --git a/extras/Build/juceaide/Main.cpp b/extras/Build/juceaide/Main.cpp index cdfcda1d..4a9e61e6 100644 --- a/extras/Build/juceaide/Main.cpp +++ b/extras/Build/juceaide/Main.cpp @@ -343,6 +343,29 @@ juce::build_tools::EntitlementOptions parseEntitlementsOptions (const juce::File updateField ("APP_SANDBOX_OPTIONS", result.appSandboxOptions); updateField ("NETWORK_MULTICAST_ENABLED", result.isNetworkingMulticastEnabled); + struct SandboxTemporaryAccessKey + { + juce::String cMakeVar, key; + }; + + SandboxTemporaryAccessKey sandboxTemporaryAccessKeys[] + { + { "APP_SANDBOX_FILE_ACCESS_HOME_RO", "home-relative-path.read-only" }, + { "APP_SANDBOX_FILE_ACCESS_HOME_RW", "home-relative-path.read-write" }, + { "APP_SANDBOX_FILE_ACCESS_ABS_RO", "absolute-path.read-only" }, + { "APP_SANDBOX_FILE_ACCESS_ABS_RW", "absolute-path.read-write" } + }; + + for (const auto& entry : sandboxTemporaryAccessKeys) + { + juce::StringArray values; + updateField (entry.cMakeVar, values); + + if (! values.isEmpty()) + result.appSandboxTemporaryPaths.push_back ({ "com.apple.security.temporary-exception.files." + entry.key, + std::move (values) }); + } + result.type = type; return result; diff --git a/extras/NetworkGraphicsDemo/Builds/Android/app/CMakeLists.txt b/extras/NetworkGraphicsDemo/Builds/Android/app/CMakeLists.txt index e2b9a817..9bde976d 100644 --- a/extras/NetworkGraphicsDemo/Builds/Android/app/CMakeLists.txt +++ b/extras/NetworkGraphicsDemo/Builds/Android/app/CMakeLists.txt @@ -23,9 +23,9 @@ include_directories( AFTER enable_language(ASM) if(JUCE_BUILD_CONFIGURATION MATCHES "DEBUG") - add_definitions([[-DJUCE_DISPLAY_SPLASH_SCREEN=0]] [[-DJUCE_USE_DARK_SPLASH_SCREEN=1]] [[-DJUCE_PROJUCER_VERSION=0x60105]] [[-DJUCE_MODULE_AVAILABLE_juce_audio_basics=1]] [[-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1]] [[-DJUCE_MODULE_AVAILABLE_juce_audio_formats=1]] [[-DJUCE_MODULE_AVAILABLE_juce_audio_processors=1]] [[-DJUCE_MODULE_AVAILABLE_juce_audio_utils=1]] [[-DJUCE_MODULE_AVAILABLE_juce_core=1]] [[-DJUCE_MODULE_AVAILABLE_juce_cryptography=1]] [[-DJUCE_MODULE_AVAILABLE_juce_data_structures=1]] [[-DJUCE_MODULE_AVAILABLE_juce_events=1]] [[-DJUCE_MODULE_AVAILABLE_juce_graphics=1]] [[-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1]] [[-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1]] [[-DJUCE_MODULE_AVAILABLE_juce_opengl=1]] [[-DJUCE_MODULE_AVAILABLE_juce_osc=1]] [[-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1]] [[-DJUCE_STANDALONE_APPLICATION=1]] [[-DJUCE_DEBUG=0]] [[-DJUCER_ANDROIDSTUDIO_7F0E4A25=1]] [[-DJUCE_APP_VERSION=1.0.0]] [[-DJUCE_APP_VERSION_HEX=0x10000]] [[-DDEBUG=1]] [[-D_DEBUG=1]]) + add_definitions([[-DJUCE_DISPLAY_SPLASH_SCREEN=0]] [[-DJUCE_USE_DARK_SPLASH_SCREEN=1]] [[-DJUCE_PROJUCER_VERSION=0x60106]] [[-DJUCE_MODULE_AVAILABLE_juce_audio_basics=1]] [[-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1]] [[-DJUCE_MODULE_AVAILABLE_juce_audio_formats=1]] [[-DJUCE_MODULE_AVAILABLE_juce_audio_processors=1]] [[-DJUCE_MODULE_AVAILABLE_juce_audio_utils=1]] [[-DJUCE_MODULE_AVAILABLE_juce_core=1]] [[-DJUCE_MODULE_AVAILABLE_juce_cryptography=1]] [[-DJUCE_MODULE_AVAILABLE_juce_data_structures=1]] [[-DJUCE_MODULE_AVAILABLE_juce_events=1]] [[-DJUCE_MODULE_AVAILABLE_juce_graphics=1]] [[-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1]] [[-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1]] [[-DJUCE_MODULE_AVAILABLE_juce_opengl=1]] [[-DJUCE_MODULE_AVAILABLE_juce_osc=1]] [[-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1]] [[-DJUCE_STANDALONE_APPLICATION=1]] [[-DJUCE_DEBUG=0]] [[-DJUCER_ANDROIDSTUDIO_7F0E4A25=1]] [[-DJUCE_APP_VERSION=1.0.0]] [[-DJUCE_APP_VERSION_HEX=0x10000]] [[-DDEBUG=1]] [[-D_DEBUG=1]]) elseif(JUCE_BUILD_CONFIGURATION MATCHES "RELEASE") - add_definitions([[-DJUCE_DISPLAY_SPLASH_SCREEN=0]] [[-DJUCE_USE_DARK_SPLASH_SCREEN=1]] [[-DJUCE_PROJUCER_VERSION=0x60105]] [[-DJUCE_MODULE_AVAILABLE_juce_audio_basics=1]] [[-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1]] [[-DJUCE_MODULE_AVAILABLE_juce_audio_formats=1]] [[-DJUCE_MODULE_AVAILABLE_juce_audio_processors=1]] [[-DJUCE_MODULE_AVAILABLE_juce_audio_utils=1]] [[-DJUCE_MODULE_AVAILABLE_juce_core=1]] [[-DJUCE_MODULE_AVAILABLE_juce_cryptography=1]] [[-DJUCE_MODULE_AVAILABLE_juce_data_structures=1]] [[-DJUCE_MODULE_AVAILABLE_juce_events=1]] [[-DJUCE_MODULE_AVAILABLE_juce_graphics=1]] [[-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1]] [[-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1]] [[-DJUCE_MODULE_AVAILABLE_juce_opengl=1]] [[-DJUCE_MODULE_AVAILABLE_juce_osc=1]] [[-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1]] [[-DJUCE_STANDALONE_APPLICATION=1]] [[-DJUCER_ANDROIDSTUDIO_7F0E4A25=1]] [[-DJUCE_APP_VERSION=1.0.0]] [[-DJUCE_APP_VERSION_HEX=0x10000]] [[-DNDEBUG=1]]) + add_definitions([[-DJUCE_DISPLAY_SPLASH_SCREEN=0]] [[-DJUCE_USE_DARK_SPLASH_SCREEN=1]] [[-DJUCE_PROJUCER_VERSION=0x60106]] [[-DJUCE_MODULE_AVAILABLE_juce_audio_basics=1]] [[-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1]] [[-DJUCE_MODULE_AVAILABLE_juce_audio_formats=1]] [[-DJUCE_MODULE_AVAILABLE_juce_audio_processors=1]] [[-DJUCE_MODULE_AVAILABLE_juce_audio_utils=1]] [[-DJUCE_MODULE_AVAILABLE_juce_core=1]] [[-DJUCE_MODULE_AVAILABLE_juce_cryptography=1]] [[-DJUCE_MODULE_AVAILABLE_juce_data_structures=1]] [[-DJUCE_MODULE_AVAILABLE_juce_events=1]] [[-DJUCE_MODULE_AVAILABLE_juce_graphics=1]] [[-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1]] [[-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1]] [[-DJUCE_MODULE_AVAILABLE_juce_opengl=1]] [[-DJUCE_MODULE_AVAILABLE_juce_osc=1]] [[-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1]] [[-DJUCE_STANDALONE_APPLICATION=1]] [[-DJUCER_ANDROIDSTUDIO_7F0E4A25=1]] [[-DJUCE_APP_VERSION=1.0.0]] [[-DJUCE_APP_VERSION_HEX=0x10000]] [[-DNDEBUG=1]]) else() message( FATAL_ERROR "No matching build-configuration found." ) endif() @@ -1359,6 +1359,7 @@ add_library( ${BINARY_NAME} "../../../../../modules/juce_gui_basics/mouse/juce_MouseInputSource.h" "../../../../../modules/juce_gui_basics/mouse/juce_MouseListener.cpp" "../../../../../modules/juce_gui_basics/mouse/juce_MouseListener.h" + "../../../../../modules/juce_gui_basics/mouse/juce_PointerState.h" "../../../../../modules/juce_gui_basics/mouse/juce_SelectedItemSet.h" "../../../../../modules/juce_gui_basics/mouse/juce_TextDragAndDropTarget.h" "../../../../../modules/juce_gui_basics/mouse/juce_TooltipClient.h" @@ -1545,6 +1546,7 @@ add_library( ${BINARY_NAME} "../../../../../modules/juce_gui_extra/native/juce_mac_AppleRemote.mm" "../../../../../modules/juce_gui_extra/native/juce_mac_CarbonViewWrapperComponent.h" "../../../../../modules/juce_gui_extra/native/juce_mac_NSViewComponent.mm" + "../../../../../modules/juce_gui_extra/native/juce_mac_NSViewFrameWatcher.h" "../../../../../modules/juce_gui_extra/native/juce_mac_PushNotifications.cpp" "../../../../../modules/juce_gui_extra/native/juce_mac_SystemTrayIcon.cpp" "../../../../../modules/juce_gui_extra/native/juce_mac_WebBrowserComponent.mm" @@ -2954,6 +2956,7 @@ set_source_files_properties("../../../../../modules/juce_gui_basics/mouse/juce_M set_source_files_properties("../../../../../modules/juce_gui_basics/mouse/juce_MouseInputSource.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_gui_basics/mouse/juce_MouseListener.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_gui_basics/mouse/juce_MouseListener.h" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_gui_basics/mouse/juce_PointerState.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_gui_basics/mouse/juce_SelectedItemSet.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_gui_basics/mouse/juce_TextDragAndDropTarget.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_gui_basics/mouse/juce_TooltipClient.h" PROPERTIES HEADER_FILE_ONLY TRUE) @@ -3140,6 +3143,7 @@ set_source_files_properties("../../../../../modules/juce_gui_extra/native/juce_l set_source_files_properties("../../../../../modules/juce_gui_extra/native/juce_mac_AppleRemote.mm" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_gui_extra/native/juce_mac_CarbonViewWrapperComponent.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_gui_extra/native/juce_mac_NSViewComponent.mm" PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties("../../../../../modules/juce_gui_extra/native/juce_mac_NSViewFrameWatcher.h" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_gui_extra/native/juce_mac_PushNotifications.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_gui_extra/native/juce_mac_SystemTrayIcon.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties("../../../../../modules/juce_gui_extra/native/juce_mac_WebBrowserComponent.mm" PROPERTIES HEADER_FILE_ONLY TRUE) diff --git a/extras/NetworkGraphicsDemo/Builds/Android/app/src/main/AndroidManifest.xml b/extras/NetworkGraphicsDemo/Builds/Android/app/src/main/AndroidManifest.xml index c04fe00a..03a1cd09 100644 --- a/extras/NetworkGraphicsDemo/Builds/Android/app/src/main/AndroidManifest.xml +++ b/extras/NetworkGraphicsDemo/Builds/Android/app/src/main/AndroidManifest.xml @@ -1,7 +1,7 @@ + package="com.juce.networkgraphicsdemo"> diff --git a/extras/NetworkGraphicsDemo/Builds/LinuxMakefile/Makefile b/extras/NetworkGraphicsDemo/Builds/LinuxMakefile/Makefile index 3ad21c89..96872426 100644 --- a/extras/NetworkGraphicsDemo/Builds/LinuxMakefile/Makefile +++ b/extras/NetworkGraphicsDemo/Builds/LinuxMakefile/Makefile @@ -35,7 +35,7 @@ ifeq ($(CONFIG),Debug) TARGET_ARCH := endif - JUCE_CPPFLAGS := $(DEPFLAGS) "-DLINUX=1" "-DDEBUG=1" "-D_DEBUG=1" "-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x60105" "-DJUCE_MODULE_AVAILABLE_juce_audio_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_formats=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_processors=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_utils=1" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_MODULE_AVAILABLE_juce_cryptography=1" "-DJUCE_MODULE_AVAILABLE_juce_data_structures=1" "-DJUCE_MODULE_AVAILABLE_juce_events=1" "-DJUCE_MODULE_AVAILABLE_juce_graphics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1" "-DJUCE_MODULE_AVAILABLE_juce_opengl=1" "-DJUCE_MODULE_AVAILABLE_juce_osc=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_STANDALONE_APPLICATION=1" "-DJUCER_LINUX_MAKE_6D53C8B4=1" "-DJUCE_APP_VERSION=1.0.0" "-DJUCE_APP_VERSION_HEX=0x10000" $(shell pkg-config --cflags alsa freetype2 libcurl webkit2gtk-4.0 gtk+-x11-3.0) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS) + JUCE_CPPFLAGS := $(DEPFLAGS) "-DLINUX=1" "-DDEBUG=1" "-D_DEBUG=1" "-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x60106" "-DJUCE_MODULE_AVAILABLE_juce_audio_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_formats=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_processors=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_utils=1" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_MODULE_AVAILABLE_juce_cryptography=1" "-DJUCE_MODULE_AVAILABLE_juce_data_structures=1" "-DJUCE_MODULE_AVAILABLE_juce_events=1" "-DJUCE_MODULE_AVAILABLE_juce_graphics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1" "-DJUCE_MODULE_AVAILABLE_juce_opengl=1" "-DJUCE_MODULE_AVAILABLE_juce_osc=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_STANDALONE_APPLICATION=1" "-DJUCER_LINUX_MAKE_6D53C8B4=1" "-DJUCE_APP_VERSION=1.0.0" "-DJUCE_APP_VERSION_HEX=0x10000" $(shell pkg-config --cflags alsa freetype2 libcurl webkit2gtk-4.0 gtk+-x11-3.0) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS) JUCE_CPPFLAGS_APP := "-DJucePlugin_Build_VST=0" "-DJucePlugin_Build_VST3=0" "-DJucePlugin_Build_AU=0" "-DJucePlugin_Build_AUv3=0" "-DJucePlugin_Build_RTAS=0" "-DJucePlugin_Build_AAX=0" "-DJucePlugin_Build_Standalone=0" "-DJucePlugin_Build_Unity=0" JUCE_TARGET_APP := JUCE\ Network\ Graphics\ Demo @@ -56,7 +56,7 @@ ifeq ($(CONFIG),Release) TARGET_ARCH := endif - JUCE_CPPFLAGS := $(DEPFLAGS) "-DLINUX=1" "-DNDEBUG=1" "-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x60105" "-DJUCE_MODULE_AVAILABLE_juce_audio_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_formats=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_processors=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_utils=1" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_MODULE_AVAILABLE_juce_cryptography=1" "-DJUCE_MODULE_AVAILABLE_juce_data_structures=1" "-DJUCE_MODULE_AVAILABLE_juce_events=1" "-DJUCE_MODULE_AVAILABLE_juce_graphics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1" "-DJUCE_MODULE_AVAILABLE_juce_opengl=1" "-DJUCE_MODULE_AVAILABLE_juce_osc=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_STANDALONE_APPLICATION=1" "-DJUCER_LINUX_MAKE_6D53C8B4=1" "-DJUCE_APP_VERSION=1.0.0" "-DJUCE_APP_VERSION_HEX=0x10000" $(shell pkg-config --cflags alsa freetype2 libcurl webkit2gtk-4.0 gtk+-x11-3.0) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS) + JUCE_CPPFLAGS := $(DEPFLAGS) "-DLINUX=1" "-DNDEBUG=1" "-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x60106" "-DJUCE_MODULE_AVAILABLE_juce_audio_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_formats=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_processors=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_utils=1" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_MODULE_AVAILABLE_juce_cryptography=1" "-DJUCE_MODULE_AVAILABLE_juce_data_structures=1" "-DJUCE_MODULE_AVAILABLE_juce_events=1" "-DJUCE_MODULE_AVAILABLE_juce_graphics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1" "-DJUCE_MODULE_AVAILABLE_juce_opengl=1" "-DJUCE_MODULE_AVAILABLE_juce_osc=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_STANDALONE_APPLICATION=1" "-DJUCER_LINUX_MAKE_6D53C8B4=1" "-DJUCE_APP_VERSION=1.0.0" "-DJUCE_APP_VERSION_HEX=0x10000" $(shell pkg-config --cflags alsa freetype2 libcurl webkit2gtk-4.0 gtk+-x11-3.0) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS) JUCE_CPPFLAGS_APP := "-DJucePlugin_Build_VST=0" "-DJucePlugin_Build_VST3=0" "-DJucePlugin_Build_AU=0" "-DJucePlugin_Build_AUv3=0" "-DJucePlugin_Build_RTAS=0" "-DJucePlugin_Build_AAX=0" "-DJucePlugin_Build_Standalone=0" "-DJucePlugin_Build_Unity=0" JUCE_TARGET_APP := JUCE\ Network\ Graphics\ Demo diff --git a/extras/NetworkGraphicsDemo/Builds/MacOSX/NetworkGraphicsDemo.xcodeproj/project.pbxproj b/extras/NetworkGraphicsDemo/Builds/MacOSX/NetworkGraphicsDemo.xcodeproj/project.pbxproj index c53bae38..d9d37e82 100644 --- a/extras/NetworkGraphicsDemo/Builds/MacOSX/NetworkGraphicsDemo.xcodeproj/project.pbxproj +++ b/extras/NetworkGraphicsDemo/Builds/MacOSX/NetworkGraphicsDemo.xcodeproj/project.pbxproj @@ -365,7 +365,7 @@ "NDEBUG=1", "JUCE_DISPLAY_SPLASH_SCREEN=0", "JUCE_USE_DARK_SPLASH_SCREEN=1", - "JUCE_PROJUCER_VERSION=0x60105", + "JUCE_PROJUCER_VERSION=0x60106", "JUCE_MODULE_AVAILABLE_juce_audio_basics=1", "JUCE_MODULE_AVAILABLE_juce_audio_devices=1", "JUCE_MODULE_AVAILABLE_juce_audio_formats=1", @@ -529,7 +529,7 @@ "DEBUG=1", "JUCE_DISPLAY_SPLASH_SCREEN=0", "JUCE_USE_DARK_SPLASH_SCREEN=1", - "JUCE_PROJUCER_VERSION=0x60105", + "JUCE_PROJUCER_VERSION=0x60106", "JUCE_MODULE_AVAILABLE_juce_audio_basics=1", "JUCE_MODULE_AVAILABLE_juce_audio_devices=1", "JUCE_MODULE_AVAILABLE_juce_audio_formats=1", diff --git a/extras/NetworkGraphicsDemo/Builds/VisualStudio2022/NetworkGraphicsDemo_App.vcxproj b/extras/NetworkGraphicsDemo/Builds/VisualStudio2022/NetworkGraphicsDemo_App.vcxproj index cc36f559..168fd925 100644 --- a/extras/NetworkGraphicsDemo/Builds/VisualStudio2022/NetworkGraphicsDemo_App.vcxproj +++ b/extras/NetworkGraphicsDemo/Builds/VisualStudio2022/NetworkGraphicsDemo_App.vcxproj @@ -64,7 +64,7 @@ Disabled ProgramDatabase ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60105;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_MODULE_AVAILABLE_juce_osc=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_STANDALONE_APPLICATION=1;JUCER_VS2022_78A503E=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60106;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_MODULE_AVAILABLE_juce_osc=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_STANDALONE_APPLICATION=1;JUCER_VS2022_78A503E=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) MultiThreadedDebugDLL true NotUsing @@ -105,7 +105,7 @@ Full ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60105;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_MODULE_AVAILABLE_juce_osc=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_STANDALONE_APPLICATION=1;JUCER_VS2022_78A503E=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60106;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_MODULE_AVAILABLE_juce_osc=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_STANDALONE_APPLICATION=1;JUCER_VS2022_78A503E=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) MultiThreadedDLL true NotUsing @@ -2895,6 +2895,7 @@ + @@ -2989,6 +2990,7 @@ + diff --git a/extras/NetworkGraphicsDemo/Builds/VisualStudio2022/NetworkGraphicsDemo_App.vcxproj.filters b/extras/NetworkGraphicsDemo/Builds/VisualStudio2022/NetworkGraphicsDemo_App.vcxproj.filters index 38fa4896..4f1b6e47 100644 --- a/extras/NetworkGraphicsDemo/Builds/VisualStudio2022/NetworkGraphicsDemo_App.vcxproj.filters +++ b/extras/NetworkGraphicsDemo/Builds/VisualStudio2022/NetworkGraphicsDemo_App.vcxproj.filters @@ -4806,6 +4806,9 @@ JUCE Modules\juce_gui_basics\mouse + + JUCE Modules\juce_gui_basics\mouse + JUCE Modules\juce_gui_basics\mouse @@ -5088,6 +5091,9 @@ JUCE Modules\juce_gui_extra\native + + JUCE Modules\juce_gui_extra\native + JUCE Modules\juce_gui_extra diff --git a/extras/NetworkGraphicsDemo/Builds/iOS/NetworkGraphicsDemo.xcodeproj/project.pbxproj b/extras/NetworkGraphicsDemo/Builds/iOS/NetworkGraphicsDemo.xcodeproj/project.pbxproj index 04708289..4edd3481 100644 --- a/extras/NetworkGraphicsDemo/Builds/iOS/NetworkGraphicsDemo.xcodeproj/project.pbxproj +++ b/extras/NetworkGraphicsDemo/Builds/iOS/NetworkGraphicsDemo.xcodeproj/project.pbxproj @@ -378,7 +378,7 @@ "JUCE_CONTENT_SHARING=1", "JUCE_DISPLAY_SPLASH_SCREEN=0", "JUCE_USE_DARK_SPLASH_SCREEN=1", - "JUCE_PROJUCER_VERSION=0x60105", + "JUCE_PROJUCER_VERSION=0x60106", "JUCE_MODULE_AVAILABLE_juce_audio_basics=1", "JUCE_MODULE_AVAILABLE_juce_audio_devices=1", "JUCE_MODULE_AVAILABLE_juce_audio_formats=1", @@ -545,7 +545,7 @@ "JUCE_CONTENT_SHARING=1", "JUCE_DISPLAY_SPLASH_SCREEN=0", "JUCE_USE_DARK_SPLASH_SCREEN=1", - "JUCE_PROJUCER_VERSION=0x60105", + "JUCE_PROJUCER_VERSION=0x60106", "JUCE_MODULE_AVAILABLE_juce_audio_basics=1", "JUCE_MODULE_AVAILABLE_juce_audio_devices=1", "JUCE_MODULE_AVAILABLE_juce_audio_formats=1", diff --git a/extras/Projucer/Builds/LinuxMakefile/Makefile b/extras/Projucer/Builds/LinuxMakefile/Makefile index 9b120486..e2e84b71 100644 --- a/extras/Projucer/Builds/LinuxMakefile/Makefile +++ b/extras/Projucer/Builds/LinuxMakefile/Makefile @@ -35,7 +35,7 @@ ifeq ($(CONFIG),Debug) TARGET_ARCH := endif - JUCE_CPPFLAGS := $(DEPFLAGS) "-DLINUX=1" "-DDEBUG=1" "-D_DEBUG=1" "-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x60105" "-DJUCE_MODULE_AVAILABLE_juce_build_tools=1" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_MODULE_AVAILABLE_juce_cryptography=1" "-DJUCE_MODULE_AVAILABLE_juce_data_structures=1" "-DJUCE_MODULE_AVAILABLE_juce_events=1" "-DJUCE_MODULE_AVAILABLE_juce_graphics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_LOG_ASSERTIONS=1" "-DJUCE_USE_CURL=1" "-DJUCE_LOAD_CURL_SYMBOLS_LAZILY=1" "-DJUCE_ALLOW_STATIC_NULL_VARIABLES=0" "-DJUCE_STRICT_REFCOUNTEDPOINTER=1" "-DJUCE_WEB_BROWSER=0" "-DJUCE_STANDALONE_APPLICATION=1" "-DJUCER_LINUX_MAKE_6D53C8B4=1" "-DJUCE_APP_VERSION=6.1.5" "-DJUCE_APP_VERSION_HEX=0x60105" $(shell pkg-config --cflags freetype2) -pthread -I../../JuceLibraryCode -I../../../Build -I../../../../modules $(CPPFLAGS) + JUCE_CPPFLAGS := $(DEPFLAGS) "-DLINUX=1" "-DDEBUG=1" "-D_DEBUG=1" "-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x60106" "-DJUCE_MODULE_AVAILABLE_juce_build_tools=1" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_MODULE_AVAILABLE_juce_cryptography=1" "-DJUCE_MODULE_AVAILABLE_juce_data_structures=1" "-DJUCE_MODULE_AVAILABLE_juce_events=1" "-DJUCE_MODULE_AVAILABLE_juce_graphics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_LOG_ASSERTIONS=1" "-DJUCE_USE_CURL=1" "-DJUCE_LOAD_CURL_SYMBOLS_LAZILY=1" "-DJUCE_ALLOW_STATIC_NULL_VARIABLES=0" "-DJUCE_STRICT_REFCOUNTEDPOINTER=1" "-DJUCE_WEB_BROWSER=0" "-DJUCE_STANDALONE_APPLICATION=1" "-DJUCER_LINUX_MAKE_6D53C8B4=1" "-DJUCE_APP_VERSION=6.1.6" "-DJUCE_APP_VERSION_HEX=0x60106" $(shell pkg-config --cflags freetype2) -pthread -I../../JuceLibraryCode -I../../../Build -I../../../../modules $(CPPFLAGS) JUCE_CPPFLAGS_APP := "-DJucePlugin_Build_VST=0" "-DJucePlugin_Build_VST3=0" "-DJucePlugin_Build_AU=0" "-DJucePlugin_Build_AUv3=0" "-DJucePlugin_Build_RTAS=0" "-DJucePlugin_Build_AAX=0" "-DJucePlugin_Build_Standalone=0" "-DJucePlugin_Build_Unity=0" JUCE_TARGET_APP := Projucer @@ -56,7 +56,7 @@ ifeq ($(CONFIG),Release) TARGET_ARCH := endif - JUCE_CPPFLAGS := $(DEPFLAGS) "-DLINUX=1" "-DNDEBUG=1" "-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x60105" "-DJUCE_MODULE_AVAILABLE_juce_build_tools=1" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_MODULE_AVAILABLE_juce_cryptography=1" "-DJUCE_MODULE_AVAILABLE_juce_data_structures=1" "-DJUCE_MODULE_AVAILABLE_juce_events=1" "-DJUCE_MODULE_AVAILABLE_juce_graphics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_LOG_ASSERTIONS=1" "-DJUCE_USE_CURL=1" "-DJUCE_LOAD_CURL_SYMBOLS_LAZILY=1" "-DJUCE_ALLOW_STATIC_NULL_VARIABLES=0" "-DJUCE_STRICT_REFCOUNTEDPOINTER=1" "-DJUCE_WEB_BROWSER=0" "-DJUCE_STANDALONE_APPLICATION=1" "-DJUCER_LINUX_MAKE_6D53C8B4=1" "-DJUCE_APP_VERSION=6.1.5" "-DJUCE_APP_VERSION_HEX=0x60105" $(shell pkg-config --cflags freetype2) -pthread -I../../JuceLibraryCode -I../../../Build -I../../../../modules $(CPPFLAGS) + JUCE_CPPFLAGS := $(DEPFLAGS) "-DLINUX=1" "-DNDEBUG=1" "-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x60106" "-DJUCE_MODULE_AVAILABLE_juce_build_tools=1" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_MODULE_AVAILABLE_juce_cryptography=1" "-DJUCE_MODULE_AVAILABLE_juce_data_structures=1" "-DJUCE_MODULE_AVAILABLE_juce_events=1" "-DJUCE_MODULE_AVAILABLE_juce_graphics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_LOG_ASSERTIONS=1" "-DJUCE_USE_CURL=1" "-DJUCE_LOAD_CURL_SYMBOLS_LAZILY=1" "-DJUCE_ALLOW_STATIC_NULL_VARIABLES=0" "-DJUCE_STRICT_REFCOUNTEDPOINTER=1" "-DJUCE_WEB_BROWSER=0" "-DJUCE_STANDALONE_APPLICATION=1" "-DJUCER_LINUX_MAKE_6D53C8B4=1" "-DJUCE_APP_VERSION=6.1.6" "-DJUCE_APP_VERSION_HEX=0x60106" $(shell pkg-config --cflags freetype2) -pthread -I../../JuceLibraryCode -I../../../Build -I../../../../modules $(CPPFLAGS) JUCE_CPPFLAGS_APP := "-DJucePlugin_Build_VST=0" "-DJucePlugin_Build_VST3=0" "-DJucePlugin_Build_AU=0" "-DJucePlugin_Build_AUv3=0" "-DJucePlugin_Build_RTAS=0" "-DJucePlugin_Build_AAX=0" "-DJucePlugin_Build_Standalone=0" "-DJucePlugin_Build_Unity=0" JUCE_TARGET_APP := Projucer diff --git a/extras/Projucer/Builds/MacOSX/Info-App.plist b/extras/Projucer/Builds/MacOSX/Info-App.plist index 7679227a..c1bafadd 100644 --- a/extras/Projucer/Builds/MacOSX/Info-App.plist +++ b/extras/Projucer/Builds/MacOSX/Info-App.plist @@ -22,9 +22,9 @@ CFBundleSignature ???? CFBundleShortVersionString - 6.1.5 + 6.1.6 CFBundleVersion - 6.1.5 + 6.1.6 NSHumanReadableCopyright Raw Material Software Limited NSHighResolutionCapable diff --git a/extras/Projucer/Builds/MacOSX/Projucer.xcodeproj/project.pbxproj b/extras/Projucer/Builds/MacOSX/Projucer.xcodeproj/project.pbxproj index 04d08795..0f3d07cc 100644 --- a/extras/Projucer/Builds/MacOSX/Projucer.xcodeproj/project.pbxproj +++ b/extras/Projucer/Builds/MacOSX/Projucer.xcodeproj/project.pbxproj @@ -1129,7 +1129,7 @@ "NDEBUG=1", "JUCE_DISPLAY_SPLASH_SCREEN=0", "JUCE_USE_DARK_SPLASH_SCREEN=1", - "JUCE_PROJUCER_VERSION=0x60105", + "JUCE_PROJUCER_VERSION=0x60106", "JUCE_MODULE_AVAILABLE_juce_build_tools=1", "JUCE_MODULE_AVAILABLE_juce_core=1", "JUCE_MODULE_AVAILABLE_juce_cryptography=1", @@ -1147,8 +1147,8 @@ "JUCE_WEB_BROWSER=0", "JUCE_STANDALONE_APPLICATION=1", "JUCER_XCODE_MAC_F6D2F4CF=1", - "JUCE_APP_VERSION=6.1.5", - "JUCE_APP_VERSION_HEX=0x60105", + "JUCE_APP_VERSION=6.1.6", + "JUCE_APP_VERSION_HEX=0x60106", "JucePlugin_Build_VST=0", "JucePlugin_Build_VST3=0", "JucePlugin_Build_AU=0", @@ -1198,7 +1198,7 @@ "DEBUG=1", "JUCE_DISPLAY_SPLASH_SCREEN=0", "JUCE_USE_DARK_SPLASH_SCREEN=1", - "JUCE_PROJUCER_VERSION=0x60105", + "JUCE_PROJUCER_VERSION=0x60106", "JUCE_MODULE_AVAILABLE_juce_build_tools=1", "JUCE_MODULE_AVAILABLE_juce_core=1", "JUCE_MODULE_AVAILABLE_juce_cryptography=1", @@ -1216,8 +1216,8 @@ "JUCE_WEB_BROWSER=0", "JUCE_STANDALONE_APPLICATION=1", "JUCER_XCODE_MAC_F6D2F4CF=1", - "JUCE_APP_VERSION=6.1.5", - "JUCE_APP_VERSION_HEX=0x60105", + "JUCE_APP_VERSION=6.1.6", + "JUCE_APP_VERSION_HEX=0x60106", "JucePlugin_Build_VST=0", "JucePlugin_Build_VST3=0", "JucePlugin_Build_AU=0", diff --git a/extras/Projucer/Builds/VisualStudio2015/Projucer_App.vcxproj b/extras/Projucer/Builds/VisualStudio2015/Projucer_App.vcxproj index 9412df3f..e8f9dccb 100644 --- a/extras/Projucer/Builds/VisualStudio2015/Projucer_App.vcxproj +++ b/extras/Projucer/Builds/VisualStudio2015/Projucer_App.vcxproj @@ -64,7 +64,7 @@ Disabled ProgramDatabase ..\..\JuceLibraryCode;..\..\..\Build;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60105;JUCE_MODULE_AVAILABLE_juce_build_tools=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_LOG_ASSERTIONS=1;JUCE_USE_CURL=1;JUCE_LOAD_CURL_SYMBOLS_LAZILY=1;JUCE_ALLOW_STATIC_NULL_VARIABLES=0;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_WEB_BROWSER=0;JUCE_STANDALONE_APPLICATION=1;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=6.1.5;JUCE_APP_VERSION_HEX=0x60105;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60106;JUCE_MODULE_AVAILABLE_juce_build_tools=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_LOG_ASSERTIONS=1;JUCE_USE_CURL=1;JUCE_LOAD_CURL_SYMBOLS_LAZILY=1;JUCE_ALLOW_STATIC_NULL_VARIABLES=0;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_WEB_BROWSER=0;JUCE_STANDALONE_APPLICATION=1;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=6.1.6;JUCE_APP_VERSION_HEX=0x60106;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) MultiThreadedDebugDLL true NotUsing @@ -106,7 +106,7 @@ Full ..\..\JuceLibraryCode;..\..\..\Build;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60105;JUCE_MODULE_AVAILABLE_juce_build_tools=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_LOG_ASSERTIONS=1;JUCE_USE_CURL=1;JUCE_LOAD_CURL_SYMBOLS_LAZILY=1;JUCE_ALLOW_STATIC_NULL_VARIABLES=0;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_WEB_BROWSER=0;JUCE_STANDALONE_APPLICATION=1;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=6.1.5;JUCE_APP_VERSION_HEX=0x60105;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60106;JUCE_MODULE_AVAILABLE_juce_build_tools=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_LOG_ASSERTIONS=1;JUCE_USE_CURL=1;JUCE_LOAD_CURL_SYMBOLS_LAZILY=1;JUCE_ALLOW_STATIC_NULL_VARIABLES=0;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_WEB_BROWSER=0;JUCE_STANDALONE_APPLICATION=1;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=6.1.6;JUCE_APP_VERSION_HEX=0x60106;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) MultiThreaded true NotUsing @@ -2034,6 +2034,7 @@ + @@ -2128,6 +2129,7 @@ + diff --git a/extras/Projucer/Builds/VisualStudio2015/Projucer_App.vcxproj.filters b/extras/Projucer/Builds/VisualStudio2015/Projucer_App.vcxproj.filters index da0dedf9..15a5ecd4 100644 --- a/extras/Projucer/Builds/VisualStudio2015/Projucer_App.vcxproj.filters +++ b/extras/Projucer/Builds/VisualStudio2015/Projucer_App.vcxproj.filters @@ -3465,6 +3465,9 @@ JUCE Modules\juce_gui_basics\mouse + + JUCE Modules\juce_gui_basics\mouse + JUCE Modules\juce_gui_basics\mouse @@ -3747,6 +3750,9 @@ JUCE Modules\juce_gui_extra\native + + JUCE Modules\juce_gui_extra\native + JUCE Modules\juce_gui_extra diff --git a/extras/Projucer/Builds/VisualStudio2015/resources.rc b/extras/Projucer/Builds/VisualStudio2015/resources.rc index 421842fd..c41ddea2 100644 --- a/extras/Projucer/Builds/VisualStudio2015/resources.rc +++ b/extras/Projucer/Builds/VisualStudio2015/resources.rc @@ -9,7 +9,7 @@ #include VS_VERSION_INFO VERSIONINFO -FILEVERSION 6,1,5,0 +FILEVERSION 6,1,6,0 BEGIN BLOCK "StringFileInfo" BEGIN @@ -18,9 +18,9 @@ BEGIN VALUE "CompanyName", "Raw Material Software Limited\0" VALUE "LegalCopyright", "Raw Material Software Limited\0" VALUE "FileDescription", "Projucer\0" - VALUE "FileVersion", "6.1.5\0" + VALUE "FileVersion", "6.1.6\0" VALUE "ProductName", "Projucer\0" - VALUE "ProductVersion", "6.1.5\0" + VALUE "ProductVersion", "6.1.6\0" END END diff --git a/extras/Projucer/Builds/VisualStudio2017/Projucer_App.vcxproj b/extras/Projucer/Builds/VisualStudio2017/Projucer_App.vcxproj index c138918b..468c6015 100644 --- a/extras/Projucer/Builds/VisualStudio2017/Projucer_App.vcxproj +++ b/extras/Projucer/Builds/VisualStudio2017/Projucer_App.vcxproj @@ -64,7 +64,7 @@ Disabled ProgramDatabase ..\..\JuceLibraryCode;..\..\..\Build;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60105;JUCE_MODULE_AVAILABLE_juce_build_tools=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_LOG_ASSERTIONS=1;JUCE_USE_CURL=1;JUCE_LOAD_CURL_SYMBOLS_LAZILY=1;JUCE_ALLOW_STATIC_NULL_VARIABLES=0;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_WEB_BROWSER=0;JUCE_STANDALONE_APPLICATION=1;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=6.1.5;JUCE_APP_VERSION_HEX=0x60105;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60106;JUCE_MODULE_AVAILABLE_juce_build_tools=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_LOG_ASSERTIONS=1;JUCE_USE_CURL=1;JUCE_LOAD_CURL_SYMBOLS_LAZILY=1;JUCE_ALLOW_STATIC_NULL_VARIABLES=0;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_WEB_BROWSER=0;JUCE_STANDALONE_APPLICATION=1;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=6.1.6;JUCE_APP_VERSION_HEX=0x60106;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) MultiThreadedDebug true NotUsing @@ -106,7 +106,7 @@ Full ..\..\JuceLibraryCode;..\..\..\Build;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60105;JUCE_MODULE_AVAILABLE_juce_build_tools=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_LOG_ASSERTIONS=1;JUCE_USE_CURL=1;JUCE_LOAD_CURL_SYMBOLS_LAZILY=1;JUCE_ALLOW_STATIC_NULL_VARIABLES=0;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_WEB_BROWSER=0;JUCE_STANDALONE_APPLICATION=1;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=6.1.5;JUCE_APP_VERSION_HEX=0x60105;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60106;JUCE_MODULE_AVAILABLE_juce_build_tools=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_LOG_ASSERTIONS=1;JUCE_USE_CURL=1;JUCE_LOAD_CURL_SYMBOLS_LAZILY=1;JUCE_ALLOW_STATIC_NULL_VARIABLES=0;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_WEB_BROWSER=0;JUCE_STANDALONE_APPLICATION=1;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=6.1.6;JUCE_APP_VERSION_HEX=0x60106;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) MultiThreaded true NotUsing @@ -2034,6 +2034,7 @@ + @@ -2128,6 +2129,7 @@ + diff --git a/extras/Projucer/Builds/VisualStudio2017/Projucer_App.vcxproj.filters b/extras/Projucer/Builds/VisualStudio2017/Projucer_App.vcxproj.filters index 8f5bd1b2..2be8d112 100644 --- a/extras/Projucer/Builds/VisualStudio2017/Projucer_App.vcxproj.filters +++ b/extras/Projucer/Builds/VisualStudio2017/Projucer_App.vcxproj.filters @@ -3465,6 +3465,9 @@ JUCE Modules\juce_gui_basics\mouse + + JUCE Modules\juce_gui_basics\mouse + JUCE Modules\juce_gui_basics\mouse @@ -3747,6 +3750,9 @@ JUCE Modules\juce_gui_extra\native + + JUCE Modules\juce_gui_extra\native + JUCE Modules\juce_gui_extra diff --git a/extras/Projucer/Builds/VisualStudio2017/resources.rc b/extras/Projucer/Builds/VisualStudio2017/resources.rc index 421842fd..c41ddea2 100644 --- a/extras/Projucer/Builds/VisualStudio2017/resources.rc +++ b/extras/Projucer/Builds/VisualStudio2017/resources.rc @@ -9,7 +9,7 @@ #include VS_VERSION_INFO VERSIONINFO -FILEVERSION 6,1,5,0 +FILEVERSION 6,1,6,0 BEGIN BLOCK "StringFileInfo" BEGIN @@ -18,9 +18,9 @@ BEGIN VALUE "CompanyName", "Raw Material Software Limited\0" VALUE "LegalCopyright", "Raw Material Software Limited\0" VALUE "FileDescription", "Projucer\0" - VALUE "FileVersion", "6.1.5\0" + VALUE "FileVersion", "6.1.6\0" VALUE "ProductName", "Projucer\0" - VALUE "ProductVersion", "6.1.5\0" + VALUE "ProductVersion", "6.1.6\0" END END diff --git a/extras/Projucer/Builds/VisualStudio2019/Projucer_App.vcxproj b/extras/Projucer/Builds/VisualStudio2019/Projucer_App.vcxproj index 78d54220..4753e8f7 100644 --- a/extras/Projucer/Builds/VisualStudio2019/Projucer_App.vcxproj +++ b/extras/Projucer/Builds/VisualStudio2019/Projucer_App.vcxproj @@ -64,7 +64,7 @@ Disabled ProgramDatabase ..\..\JuceLibraryCode;..\..\..\Build;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60105;JUCE_MODULE_AVAILABLE_juce_build_tools=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_LOG_ASSERTIONS=1;JUCE_USE_CURL=1;JUCE_LOAD_CURL_SYMBOLS_LAZILY=1;JUCE_ALLOW_STATIC_NULL_VARIABLES=0;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_WEB_BROWSER=0;JUCE_STANDALONE_APPLICATION=1;JUCER_VS2019_78A5026=1;JUCE_APP_VERSION=6.1.5;JUCE_APP_VERSION_HEX=0x60105;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60106;JUCE_MODULE_AVAILABLE_juce_build_tools=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_LOG_ASSERTIONS=1;JUCE_USE_CURL=1;JUCE_LOAD_CURL_SYMBOLS_LAZILY=1;JUCE_ALLOW_STATIC_NULL_VARIABLES=0;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_WEB_BROWSER=0;JUCE_STANDALONE_APPLICATION=1;JUCER_VS2019_78A5026=1;JUCE_APP_VERSION=6.1.6;JUCE_APP_VERSION_HEX=0x60106;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) MultiThreadedDebug true NotUsing @@ -106,7 +106,7 @@ Full ..\..\JuceLibraryCode;..\..\..\Build;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60105;JUCE_MODULE_AVAILABLE_juce_build_tools=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_LOG_ASSERTIONS=1;JUCE_USE_CURL=1;JUCE_LOAD_CURL_SYMBOLS_LAZILY=1;JUCE_ALLOW_STATIC_NULL_VARIABLES=0;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_WEB_BROWSER=0;JUCE_STANDALONE_APPLICATION=1;JUCER_VS2019_78A5026=1;JUCE_APP_VERSION=6.1.5;JUCE_APP_VERSION_HEX=0x60105;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60106;JUCE_MODULE_AVAILABLE_juce_build_tools=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_LOG_ASSERTIONS=1;JUCE_USE_CURL=1;JUCE_LOAD_CURL_SYMBOLS_LAZILY=1;JUCE_ALLOW_STATIC_NULL_VARIABLES=0;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_WEB_BROWSER=0;JUCE_STANDALONE_APPLICATION=1;JUCER_VS2019_78A5026=1;JUCE_APP_VERSION=6.1.6;JUCE_APP_VERSION_HEX=0x60106;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) MultiThreaded true NotUsing @@ -2034,6 +2034,7 @@ + @@ -2128,6 +2129,7 @@ + diff --git a/extras/Projucer/Builds/VisualStudio2019/Projucer_App.vcxproj.filters b/extras/Projucer/Builds/VisualStudio2019/Projucer_App.vcxproj.filters index 87d1846d..c92b2abf 100644 --- a/extras/Projucer/Builds/VisualStudio2019/Projucer_App.vcxproj.filters +++ b/extras/Projucer/Builds/VisualStudio2019/Projucer_App.vcxproj.filters @@ -3465,6 +3465,9 @@ JUCE Modules\juce_gui_basics\mouse + + JUCE Modules\juce_gui_basics\mouse + JUCE Modules\juce_gui_basics\mouse @@ -3747,6 +3750,9 @@ JUCE Modules\juce_gui_extra\native + + JUCE Modules\juce_gui_extra\native + JUCE Modules\juce_gui_extra diff --git a/extras/Projucer/Builds/VisualStudio2019/resources.rc b/extras/Projucer/Builds/VisualStudio2019/resources.rc index 421842fd..c41ddea2 100644 --- a/extras/Projucer/Builds/VisualStudio2019/resources.rc +++ b/extras/Projucer/Builds/VisualStudio2019/resources.rc @@ -9,7 +9,7 @@ #include VS_VERSION_INFO VERSIONINFO -FILEVERSION 6,1,5,0 +FILEVERSION 6,1,6,0 BEGIN BLOCK "StringFileInfo" BEGIN @@ -18,9 +18,9 @@ BEGIN VALUE "CompanyName", "Raw Material Software Limited\0" VALUE "LegalCopyright", "Raw Material Software Limited\0" VALUE "FileDescription", "Projucer\0" - VALUE "FileVersion", "6.1.5\0" + VALUE "FileVersion", "6.1.6\0" VALUE "ProductName", "Projucer\0" - VALUE "ProductVersion", "6.1.5\0" + VALUE "ProductVersion", "6.1.6\0" END END diff --git a/extras/Projucer/Builds/VisualStudio2022/Projucer_App.vcxproj b/extras/Projucer/Builds/VisualStudio2022/Projucer_App.vcxproj index 2e63c16a..11fd5e53 100644 --- a/extras/Projucer/Builds/VisualStudio2022/Projucer_App.vcxproj +++ b/extras/Projucer/Builds/VisualStudio2022/Projucer_App.vcxproj @@ -64,7 +64,7 @@ Disabled ProgramDatabase ..\..\JuceLibraryCode;..\..\..\Build;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60105;JUCE_MODULE_AVAILABLE_juce_build_tools=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_LOG_ASSERTIONS=1;JUCE_USE_CURL=1;JUCE_LOAD_CURL_SYMBOLS_LAZILY=1;JUCE_ALLOW_STATIC_NULL_VARIABLES=0;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_WEB_BROWSER=0;JUCE_STANDALONE_APPLICATION=1;JUCER_VS2022_78A503E=1;JUCE_APP_VERSION=6.1.5;JUCE_APP_VERSION_HEX=0x60105;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60106;JUCE_MODULE_AVAILABLE_juce_build_tools=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_LOG_ASSERTIONS=1;JUCE_USE_CURL=1;JUCE_LOAD_CURL_SYMBOLS_LAZILY=1;JUCE_ALLOW_STATIC_NULL_VARIABLES=0;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_WEB_BROWSER=0;JUCE_STANDALONE_APPLICATION=1;JUCER_VS2022_78A503E=1;JUCE_APP_VERSION=6.1.6;JUCE_APP_VERSION_HEX=0x60106;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) MultiThreadedDebug true NotUsing @@ -106,7 +106,7 @@ Full ..\..\JuceLibraryCode;..\..\..\Build;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60105;JUCE_MODULE_AVAILABLE_juce_build_tools=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_LOG_ASSERTIONS=1;JUCE_USE_CURL=1;JUCE_LOAD_CURL_SYMBOLS_LAZILY=1;JUCE_ALLOW_STATIC_NULL_VARIABLES=0;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_WEB_BROWSER=0;JUCE_STANDALONE_APPLICATION=1;JUCER_VS2022_78A503E=1;JUCE_APP_VERSION=6.1.5;JUCE_APP_VERSION_HEX=0x60105;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60106;JUCE_MODULE_AVAILABLE_juce_build_tools=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_LOG_ASSERTIONS=1;JUCE_USE_CURL=1;JUCE_LOAD_CURL_SYMBOLS_LAZILY=1;JUCE_ALLOW_STATIC_NULL_VARIABLES=0;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_WEB_BROWSER=0;JUCE_STANDALONE_APPLICATION=1;JUCER_VS2022_78A503E=1;JUCE_APP_VERSION=6.1.6;JUCE_APP_VERSION_HEX=0x60106;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) MultiThreaded true NotUsing @@ -2034,6 +2034,7 @@ + @@ -2128,6 +2129,7 @@ + diff --git a/extras/Projucer/Builds/VisualStudio2022/Projucer_App.vcxproj.filters b/extras/Projucer/Builds/VisualStudio2022/Projucer_App.vcxproj.filters index 034c23cf..bc6960b0 100644 --- a/extras/Projucer/Builds/VisualStudio2022/Projucer_App.vcxproj.filters +++ b/extras/Projucer/Builds/VisualStudio2022/Projucer_App.vcxproj.filters @@ -3465,6 +3465,9 @@ JUCE Modules\juce_gui_basics\mouse + + JUCE Modules\juce_gui_basics\mouse + JUCE Modules\juce_gui_basics\mouse @@ -3747,6 +3750,9 @@ JUCE Modules\juce_gui_extra\native + + JUCE Modules\juce_gui_extra\native + JUCE Modules\juce_gui_extra diff --git a/extras/Projucer/Builds/VisualStudio2022/resources.rc b/extras/Projucer/Builds/VisualStudio2022/resources.rc index 421842fd..c41ddea2 100644 --- a/extras/Projucer/Builds/VisualStudio2022/resources.rc +++ b/extras/Projucer/Builds/VisualStudio2022/resources.rc @@ -9,7 +9,7 @@ #include VS_VERSION_INFO VERSIONINFO -FILEVERSION 6,1,5,0 +FILEVERSION 6,1,6,0 BEGIN BLOCK "StringFileInfo" BEGIN @@ -18,9 +18,9 @@ BEGIN VALUE "CompanyName", "Raw Material Software Limited\0" VALUE "LegalCopyright", "Raw Material Software Limited\0" VALUE "FileDescription", "Projucer\0" - VALUE "FileVersion", "6.1.5\0" + VALUE "FileVersion", "6.1.6\0" VALUE "ProductName", "Projucer\0" - VALUE "ProductVersion", "6.1.5\0" + VALUE "ProductVersion", "6.1.6\0" END END diff --git a/extras/Projucer/JuceLibraryCode/JuceHeader.h b/extras/Projucer/JuceLibraryCode/JuceHeader.h index e164b35e..80aa5999 100644 --- a/extras/Projucer/JuceLibraryCode/JuceHeader.h +++ b/extras/Projucer/JuceLibraryCode/JuceHeader.h @@ -44,7 +44,7 @@ namespace ProjectInfo { const char* const projectName = "Projucer"; const char* const companyName = "Raw Material Software Limited"; - const char* const versionString = "6.1.5"; - const int versionNumber = 0x60105; + const char* const versionString = "6.1.6"; + const int versionNumber = 0x60106; } #endif diff --git a/extras/Projucer/Projucer.jucer b/extras/Projucer/Projucer.jucer index 72c2f915..49dd7305 100644 --- a/extras/Projucer/Projucer.jucer +++ b/extras/Projucer/Projucer.jucer @@ -1,7 +1,7 @@ diff --git a/extras/Projucer/Source/Application/jucer_MainWindow.cpp b/extras/Projucer/Source/Application/jucer_MainWindow.cpp index ca750a3e..b12e2419 100644 --- a/extras/Projucer/Source/Application/jucer_MainWindow.cpp +++ b/extras/Projucer/Source/Application/jucer_MainWindow.cpp @@ -1012,7 +1012,8 @@ void MainWindowList::checkWindowBounds (MainWindow& windowToCheck) auto screenLimits = Desktop::getInstance().getDisplays().getDisplayForRect (windowBounds)->userArea; if (auto* peer = windowToCheck.getPeer()) - peer->getFrameSize().subtractFrom (screenLimits); + if (const auto frameSize = peer->getFrameSizeIfPresent()) + frameSize->subtractFrom (screenLimits); auto constrainedX = jlimit (screenLimits.getX(), jmax (screenLimits.getX(), screenLimits.getRight() - windowBounds.getWidth()), windowBounds.getX()); auto constrainedY = jlimit (screenLimits.getY(), jmax (screenLimits.getY(), screenLimits.getBottom() - windowBounds.getHeight()), windowBounds.getY()); diff --git a/extras/Projucer/Source/Project/UI/Sidebar/jucer_Sidebar.h b/extras/Projucer/Source/Project/UI/Sidebar/jucer_Sidebar.h index a81eca1f..f88e8a73 100644 --- a/extras/Projucer/Source/Project/UI/Sidebar/jucer_Sidebar.h +++ b/extras/Projucer/Source/Project/UI/Sidebar/jucer_Sidebar.h @@ -185,7 +185,7 @@ public: findPanel = (1 << 2) }; - AdditionalComponents with (Type t) + JUCE_NODISCARD AdditionalComponents with (Type t) { auto copy = *this; copy.componentTypes |= t; diff --git a/extras/Projucer/Source/Project/UI/jucer_ContentViewComponents.h b/extras/Projucer/Source/Project/UI/jucer_ContentViewComponents.h index ab970eac..e6c79f8e 100644 --- a/extras/Projucer/Source/Project/UI/jucer_ContentViewComponents.h +++ b/extras/Projucer/Source/Project/UI/jucer_ContentViewComponents.h @@ -302,8 +302,7 @@ public: for (auto& pp : properties) { - const auto propertyHeight = pp->getPreferredHeight() - + (getHeightMultiplier (pp.get()) * pp->getPreferredHeight()); + const auto propertyHeight = jmax (pp->getPreferredHeight(), getApproximateLabelHeight (*pp)); auto iter = std::find_if (propertyComponentsWithInfo.begin(), propertyComponentsWithInfo.end(), [&pp] (const std::unique_ptr& w) { return &w->propertyComponent == pp.get(); }); @@ -418,17 +417,17 @@ private: } } - int getHeightMultiplier (PropertyComponent* pp) + static int getApproximateLabelHeight (const PropertyComponent& pp) { auto availableTextWidth = ProjucerLookAndFeel::getTextWidthForPropertyComponent (pp); - auto font = ProjucerLookAndFeel::getPropertyComponentFont(); - auto nameWidth = font.getStringWidthFloat (pp->getName()); - if (availableTextWidth == 0) return 0; - return static_cast (nameWidth / (float) availableTextWidth); + const auto font = ProjucerLookAndFeel::getPropertyComponentFont(); + const auto labelWidth = font.getStringWidthFloat (pp.getName()); + const auto numLines = (int) (labelWidth / (float) availableTextWidth) + 1; + return (int) std::round ((float) numLines * font.getHeight() * 1.1f); } //============================================================================== diff --git a/extras/Projucer/Source/Project/jucer_Project.cpp b/extras/Projucer/Source/Project/jucer_Project.cpp index fd69c098..28dc55f4 100644 --- a/extras/Projucer/Source/Project/jucer_Project.cpp +++ b/extras/Projucer/Source/Project/jucer_Project.cpp @@ -826,6 +826,14 @@ void Project::updateJUCEPathWarning() } } +void Project::updateCodeWarning (Identifier identifier, String value) +{ + if (value.length() != 4 || value.toStdString().size() != 4) + addProjectMessage (identifier, {}); + else + removeProjectMessage (identifier); +} + void Project::updateModuleWarnings() { auto& modules = getEnabledModules(); @@ -1091,6 +1099,14 @@ void Project::valueTreePropertyChanged (ValueTree& tree, const Identifier& prope { updateModuleWarnings(); } + else if (property == Ids::pluginCode) + { + updateCodeWarning (ProjectMessages::Ids::pluginCodeInvalid, pluginCodeValue.get()); + } + else if (property == Ids::pluginManufacturerCode) + { + updateCodeWarning (ProjectMessages::Ids::manufacturerCodeInvalid, pluginManufacturerCodeValue.get()); + } } changed(); @@ -2578,8 +2594,10 @@ StringPairArray Project::getAudioPluginFlags() const uint32 hexRepresentation = 0; for (int i = 0; i < 4; ++i) - hexRepresentation = (hexRepresentation << 8u) - | (static_cast (fourCharCode[i]) & 0xffu); + { + const auto character = (unsigned int) (i < fourCharCode.length() ? fourCharCode[i] : 0); + hexRepresentation = (hexRepresentation << 8u) | (character & 0xffu); + } return "0x" + String::toHexString (static_cast (hexRepresentation)); }; diff --git a/extras/Projucer/Source/Project/jucer_Project.h b/extras/Projucer/Source/Project/jucer_Project.h index a02a01a4..8f1a3a91 100644 --- a/extras/Projucer/Source/Project/jucer_Project.h +++ b/extras/Projucer/Source/Project/jucer_Project.h @@ -50,6 +50,8 @@ namespace ProjectMessages DECLARE_ID (oldProjucer); DECLARE_ID (cLion); DECLARE_ID (newVersionAvailable); + DECLARE_ID (pluginCodeInvalid); + DECLARE_ID (manufacturerCodeInvalid); DECLARE_ID (notification); DECLARE_ID (warning); @@ -63,7 +65,7 @@ namespace ProjectMessages { static Identifier warnings[] = { Ids::incompatibleLicense, Ids::cppStandard, Ids::moduleNotFound, Ids::jucePath, Ids::jucerFileModified, Ids::missingModuleDependencies, - Ids::oldProjucer, Ids::cLion }; + Ids::oldProjucer, Ids::cLion, Ids::pluginCodeInvalid, Ids::manufacturerCodeInvalid }; if (std::find (std::begin (warnings), std::end (warnings), message) != std::end (warnings)) return Ids::warning; @@ -86,6 +88,8 @@ namespace ProjectMessages if (message == Ids::oldProjucer) return "Projucer Out of Date"; if (message == Ids::newVersionAvailable) return "New Version Available"; if (message == Ids::cLion) return "Deprecated Exporter"; + if (message == Ids::pluginCodeInvalid) return "Invalid Plugin Code"; + if (message == Ids::manufacturerCodeInvalid) return "Invalid Manufacturer Code"; jassertfalse; return {}; @@ -102,6 +106,8 @@ namespace ProjectMessages if (message == Ids::oldProjucer) return "The version of the Projucer you are using is out of date."; if (message == Ids::newVersionAvailable) return "A new version of JUCE is available to download."; if (message == Ids::cLion) return "The CLion exporter is deprecated. Use JUCE's CMake support instead."; + if (message == Ids::pluginCodeInvalid) return "The plugin code should be exactly four characters in length."; + if (message == Ids::manufacturerCodeInvalid) return "The manufacturer code should be exactly four characters in length."; jassertfalse; return {}; @@ -618,6 +624,7 @@ private: void updateOldProjucerWarning (bool showWarning); void updateCLionWarning (bool showWarning); void updateModuleNotFoundWarning (bool showWarning); + void updateCodeWarning (Identifier identifier, String value); ValueTree projectMessages { ProjectMessages::Ids::projectMessages, {}, { { ProjectMessages::Ids::notification, {} }, { ProjectMessages::Ids::warning, {} } } }; diff --git a/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Android.h b/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Android.h index 9b084238..b4312a6a 100644 --- a/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Android.h +++ b/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Android.h @@ -1639,7 +1639,7 @@ private: setAttributeIfNotPresent (*manifest, "xmlns:android", "http://schemas.android.com/apk/res/android"); setAttributeIfNotPresent (*manifest, "android:versionCode", androidVersionCode.get()); setAttributeIfNotPresent (*manifest, "android:versionName", project.getVersionString()); - setAttributeIfNotPresent (*manifest, "package", project.getBundleIdentifierString()); + setAttributeIfNotPresent (*manifest, "package", project.getBundleIdentifierString().toLowerCase()); return manifest; } diff --git a/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_MSVC.h b/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_MSVC.h index 43bc3c15..cf4c000f 100644 --- a/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_MSVC.h +++ b/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_MSVC.h @@ -34,6 +34,14 @@ inline String msBuildEscape (String str) return str; } +inline StringArray msBuildEscape (StringArray range) +{ + for (auto& i : range) + i = msBuildEscape (i); + + return range; +} + //============================================================================== class MSVCProjectExporterBase : public ProjectExporter { @@ -509,7 +517,6 @@ public: intdir->addTextElement (build_tools::windowsStylePath (intermediatesPath)); } - { auto* targetName = props->createNewChildElement ("TargetName"); setConditionAttribute (*targetName, config); @@ -1332,23 +1339,25 @@ public: return librarySearchPaths; } + /* Libraries specified in the Projucer don't get escaped automatically. + To include a special character in the name of a library, + you must use the appropriate escape code instead. + Module and shared code library names are not preprocessed. + Special characters in the names of these libraries will be toEscape + as appropriate. + */ StringArray getExternalLibraries (const MSVCBuildConfiguration& config, const StringArray& otherLibs) const { - const auto sharedCodeLib = [&]() -> StringArray - { - if (type != SharedCodeTarget) - if (auto* shared = getOwner().getSharedCodeTarget()) - return { shared->getBinaryNameWithSuffix (config, false) }; - - return {}; - }(); - auto result = otherLibs; - result.addArray (getOwner().getModuleLibs()); - result.addArray (sharedCodeLib); for (auto& i : result) - i = msBuildEscape (getOwner().replacePreprocessorTokens (config, i).trim()); + i = getOwner().replacePreprocessorTokens (config, i).trim(); + + result.addArray (msBuildEscape (getOwner().getModuleLibs())); + + if (type != SharedCodeTarget) + if (auto* shared = getOwner().getSharedCodeTarget()) + result.add (msBuildEscape (shared->getBinaryNameWithSuffix (config, false))); return result; } diff --git a/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Xcode.h b/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Xcode.h index f5333e28..7723b12c 100644 --- a/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Xcode.h +++ b/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Xcode.h @@ -74,6 +74,10 @@ public: appSandboxValue (settings, Ids::appSandbox, getUndoManager()), appSandboxInheritanceValue (settings, Ids::appSandboxInheritance, getUndoManager()), appSandboxOptionsValue (settings, Ids::appSandboxOptions, getUndoManager(), Array(), ","), + appSandboxHomeDirROValue (settings, Ids::appSandboxHomeDirRO, getUndoManager()), + appSandboxHomeDirRWValue (settings, Ids::appSandboxHomeDirRW, getUndoManager()), + appSandboxAbsDirROValue (settings, Ids::appSandboxAbsDirRO, getUndoManager()), + appSandboxAbsDirRWValue (settings, Ids::appSandboxAbsDirRW, getUndoManager()), hardenedRuntimeValue (settings, Ids::hardenedRuntime, getUndoManager()), hardenedRuntimeOptionsValue (settings, Ids::hardenedRuntimeOptions, getUndoManager(), Array(), ","), microphonePermissionNeededValue (settings, Ids::microphonePermissionNeeded, getUndoManager()), @@ -173,6 +177,21 @@ public: bool isAppSandboxInhertianceEnabled() const { return appSandboxInheritanceValue.get(); } Array getAppSandboxOptions() const { return *appSandboxOptionsValue.get().getArray(); } + auto getAppSandboxTemporaryPaths() const + { + std::vector result; + + for (const auto& entry : sandboxFileAccessProperties) + { + auto paths = getCommaOrWhitespaceSeparatedItems (entry.property.get()); + + if (! paths.isEmpty()) + result.push_back ({ "com.apple.security.temporary-exception.files." + entry.key, std::move (paths) }); + } + + return result; + } + Array getValidArchs() const { return *validArchsValue.get().getArray(); } bool isMicrophonePermissionEnabled() const { return microphonePermissionNeededValue.get(); } @@ -457,29 +476,36 @@ public: { "Temporary Exception: Audio Unit Hosting", "temporary-exception.audio-unit-host" }, { "Temporary Exception: Global Mach Service", "temporary-exception.mach-lookup.global-name" }, { "Temporary Exception: Global Mach Service Dynamic Registration", "temporary-exception.mach-register.global-name" }, - { "Temporary Exception: Home Directory File Access (Read Only)", "temporary-exception.files.home-relative-path.read-only" }, - { "Temporary Exception: Home Directory File Access (Read/Write)", "temporary-exception.files.home-relative-path.read-write" }, - { "Temporary Exception: Absolute Path File Access (Read Only)", "temporary-exception.files.absolute-path.read-only" }, - { "Temporary Exception: Absolute Path File Access (Read/Write)", "temporary-exception.files.absolute-path.read-write" }, { "Temporary Exception: IOKit User Client Class", "temporary-exception.iokit-user-client-class" }, { "Temporary Exception: Shared Preference Domain (Read Only)", "temporary-exception.shared-preference.read-only" }, { "Temporary Exception: Shared Preference Domain (Read/Write)", "temporary-exception.shared-preference.read-write" } }; StringArray sandboxKeys; - Array sanboxValues; + Array sandboxValues; for (auto& opt : sandboxOptions) { sandboxKeys.add (opt.first); - sanboxValues.add ("com.apple.security." + opt.second); + sandboxValues.add ("com.apple.security." + opt.second); } props.add (new MultiChoicePropertyComponentWithEnablement (appSandboxOptionsValue, appSandboxValue, "App Sandbox Options", sandboxKeys, - sanboxValues)); + sandboxValues)); + + for (const auto& entry : sandboxFileAccessProperties) + { + props.add (new TextPropertyComponentWithEnablement (entry.property, + appSandboxValue, + entry.label, + 8192, + true), + "A list of the corresponding paths (separated by newlines or whitespace). " + "See Apple's File Access Temporary Exceptions documentation."); + } props.add (new ChoicePropertyComponent (hardenedRuntimeValue, "Use Hardened Runtime"), "Enable this to use the hardened runtime required for app notarization."); @@ -3085,6 +3111,7 @@ private: options.appGroupIdString = getAppGroupIdString(); options.hardenedRuntimeOptions = getHardenedRuntimeOptions(); options.appSandboxOptions = getAppSandboxOptions(); + options.appSandboxTemporaryPaths = getAppSandboxTemporaryPaths(); const auto entitlementsFile = getTargetFolder().getChildFile (target.getEntitlementsFilename()); build_tools::overwriteFileIfDifferentOrThrow (entitlementsFile, options.getEntitlementsFileContent()); @@ -3566,6 +3593,7 @@ private: duplicateAppExResourcesFolderValue, iosDeviceFamilyValue, iPhoneScreenOrientationValue, iPadScreenOrientationValue, customXcodeResourceFoldersValue, customXcassetsFolderValue, appSandboxValue, appSandboxInheritanceValue, appSandboxOptionsValue, + appSandboxHomeDirROValue, appSandboxHomeDirRWValue, appSandboxAbsDirROValue, appSandboxAbsDirRWValue, hardenedRuntimeValue, hardenedRuntimeOptionsValue, microphonePermissionNeededValue, microphonePermissionsTextValue, cameraPermissionNeededValue, cameraPermissionTextValue, @@ -3576,5 +3604,19 @@ private: networkingMulticastValue, iosDevelopmentTeamIDValue, iosAppGroupsIDValue, keepCustomXcodeSchemesValue, useHeaderMapValue, customLaunchStoryboardValue, exporterBundleIdentifierValue, suppressPlistResourceUsageValue, useLegacyBuildSystemValue, buildNumber; + struct SandboxFileAccessProperty + { + const ValueTreePropertyWithDefault& property; + const String label, key; + }; + + const std::vector sandboxFileAccessProperties + { + { appSandboxHomeDirROValue, "App sandbox temporary exception: home directory read only file access", "home-relative-path.read-only" }, + { appSandboxHomeDirRWValue, "App sandbox temporary exception: home directory read/write file access", "home-relative-path.read-write" }, + { appSandboxAbsDirROValue, "App sandbox temporary exception: absolute path read only file access", "absolute-path.read-only" }, + { appSandboxAbsDirRWValue, "App sandbox temporary exception: absolute path read/write file access", "absolute-path.read-write" } + }; + JUCE_DECLARE_NON_COPYABLE (XcodeProjectExporter) }; diff --git a/extras/Projucer/Source/ProjectSaving/jucer_ProjectSaver.cpp b/extras/Projucer/Source/ProjectSaving/jucer_ProjectSaver.cpp index fcfa71b0..f61cf2e4 100644 --- a/extras/Projucer/Source/ProjectSaving/jucer_ProjectSaver.cpp +++ b/extras/Projucer/Source/ProjectSaving/jucer_ProjectSaver.cpp @@ -291,20 +291,6 @@ Result ProjectSaver::saveProject (ProjectExporter* specifiedExporterToSave) if (errors.isEmpty()) { - if (project.isAudioPluginProject()) - { - const auto isInvalidCode = [] (String code) - { - return code.length() != 4 || code.toStdString().size() != 4; - }; - - if (isInvalidCode (project.getPluginManufacturerCodeString())) - return Result::fail ("The plugin manufacturer code must contain exactly four characters."); - - if (isInvalidCode (project.getPluginCodeString())) - return Result::fail ("The plugin code must contain exactly four characters."); - } - if (project.isAudioPluginProject()) { if (project.shouldBuildUnityPlugin()) diff --git a/extras/Projucer/Source/Utility/Helpers/jucer_PresetIDs.h b/extras/Projucer/Source/Utility/Helpers/jucer_PresetIDs.h index 018706b0..a502beb9 100644 --- a/extras/Projucer/Source/Utility/Helpers/jucer_PresetIDs.h +++ b/extras/Projucer/Source/Utility/Helpers/jucer_PresetIDs.h @@ -196,6 +196,10 @@ namespace Ids DECLARE_ID (appSandbox); DECLARE_ID (appSandboxInheritance); DECLARE_ID (appSandboxOptions); + DECLARE_ID (appSandboxHomeDirRO); + DECLARE_ID (appSandboxHomeDirRW); + DECLARE_ID (appSandboxAbsDirRO); + DECLARE_ID (appSandboxAbsDirRW); DECLARE_ID (hardenedRuntime); DECLARE_ID (hardenedRuntimeOptions); DECLARE_ID (microphonePermissionNeeded); diff --git a/extras/Projucer/Source/Utility/UI/jucer_ProjucerLookAndFeel.cpp b/extras/Projucer/Source/Utility/UI/jucer_ProjucerLookAndFeel.cpp index ead10092..943521b8 100644 --- a/extras/Projucer/Source/Utility/UI/jucer_ProjucerLookAndFeel.cpp +++ b/extras/Projucer/Source/Utility/UI/jucer_ProjucerLookAndFeel.cpp @@ -94,23 +94,21 @@ int ProjucerLookAndFeel::getTabButtonBestWidth (TabBarButton& button, int) return 120; } -void ProjucerLookAndFeel::drawPropertyComponentLabel (Graphics& g, int width, int height, PropertyComponent& component) +void ProjucerLookAndFeel::drawPropertyComponentLabel (Graphics& g, int, int height, PropertyComponent& component) { - ignoreUnused (width); - g.setColour (component.findColour (defaultTextColourId) .withMultipliedAlpha (component.isEnabled() ? 1.0f : 0.6f)); - auto textWidth = getTextWidthForPropertyComponent (&component); + auto textWidth = getTextWidthForPropertyComponent (component); g.setFont (getPropertyComponentFont()); - g.drawFittedText (component.getName(), 0, 0, textWidth - 5, height, Justification::centredLeft, 5, 1.0f); + g.drawFittedText (component.getName(), 0, 0, textWidth, height, Justification::centredLeft, 5, 1.0f); } Rectangle ProjucerLookAndFeel::getPropertyComponentContentPosition (PropertyComponent& component) { - const auto textW = getTextWidthForPropertyComponent (&component); - return { textW, 0, component.getWidth() - textW, component.getHeight() - 1 }; + const auto paddedTextW = getTextWidthForPropertyComponent (component) + 5; + return { paddedTextW , 0, component.getWidth() - paddedTextW, component.getHeight() - 1 }; } void ProjucerLookAndFeel::drawButtonBackground (Graphics& g, diff --git a/extras/Projucer/Source/Utility/UI/jucer_ProjucerLookAndFeel.h b/extras/Projucer/Source/Utility/UI/jucer_ProjucerLookAndFeel.h index 33b25809..c9a77453 100644 --- a/extras/Projucer/Source/Utility/UI/jucer_ProjucerLookAndFeel.h +++ b/extras/Projucer/Source/Utility/UI/jucer_ProjucerLookAndFeel.h @@ -81,8 +81,8 @@ public: const bool filled, const Justification justification); static Path getChoiceComponentArrowPath (Rectangle arrowZone); - static Font getPropertyComponentFont() { return { 14.0f, Font::FontStyleFlags::bold }; } - static int getTextWidthForPropertyComponent (PropertyComponent* pp) { return jmin (200, pp->getWidth() / 2); } + static Font getPropertyComponentFont() { return { 14.0f, Font::FontStyleFlags::bold }; } + static int getTextWidthForPropertyComponent (const PropertyComponent& pc) { return jmin (200, pc.getWidth() / 2); } static ColourScheme getProjucerDarkColourScheme() { diff --git a/extras/UnitTestRunner/Builds/LinuxMakefile/Makefile b/extras/UnitTestRunner/Builds/LinuxMakefile/Makefile index 6f42ffce..5632ca38 100644 --- a/extras/UnitTestRunner/Builds/LinuxMakefile/Makefile +++ b/extras/UnitTestRunner/Builds/LinuxMakefile/Makefile @@ -35,7 +35,7 @@ ifeq ($(CONFIG),Debug) TARGET_ARCH := endif - JUCE_CPPFLAGS := $(DEPFLAGS) "-DLINUX=1" "-DDEBUG=1" "-D_DEBUG=1" "-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x60105" "-DJUCE_MODULE_AVAILABLE_juce_analytics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_formats=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_processors=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_utils=1" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_MODULE_AVAILABLE_juce_cryptography=1" "-DJUCE_MODULE_AVAILABLE_juce_data_structures=1" "-DJUCE_MODULE_AVAILABLE_juce_dsp=1" "-DJUCE_MODULE_AVAILABLE_juce_events=1" "-DJUCE_MODULE_AVAILABLE_juce_graphics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1" "-DJUCE_MODULE_AVAILABLE_juce_opengl=1" "-DJUCE_MODULE_AVAILABLE_juce_osc=1" "-DJUCE_MODULE_AVAILABLE_juce_product_unlocking=1" "-DJUCE_MODULE_AVAILABLE_juce_video=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_STRICT_REFCOUNTEDPOINTER=1" "-DJUCE_STANDALONE_APPLICATION=1" "-DJUCE_UNIT_TESTS=1" "-DJUCER_LINUX_MAKE_6D53C8B4=1" "-DJUCE_APP_VERSION=1.0.0" "-DJUCE_APP_VERSION_HEX=0x10000" $(shell pkg-config --cflags alsa freetype2 libcurl webkit2gtk-4.0 gtk+-x11-3.0) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS) + JUCE_CPPFLAGS := $(DEPFLAGS) "-DLINUX=1" "-DDEBUG=1" "-D_DEBUG=1" "-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x60106" "-DJUCE_MODULE_AVAILABLE_juce_analytics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_formats=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_processors=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_utils=1" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_MODULE_AVAILABLE_juce_cryptography=1" "-DJUCE_MODULE_AVAILABLE_juce_data_structures=1" "-DJUCE_MODULE_AVAILABLE_juce_dsp=1" "-DJUCE_MODULE_AVAILABLE_juce_events=1" "-DJUCE_MODULE_AVAILABLE_juce_graphics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1" "-DJUCE_MODULE_AVAILABLE_juce_opengl=1" "-DJUCE_MODULE_AVAILABLE_juce_osc=1" "-DJUCE_MODULE_AVAILABLE_juce_product_unlocking=1" "-DJUCE_MODULE_AVAILABLE_juce_video=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_STRICT_REFCOUNTEDPOINTER=1" "-DJUCE_STANDALONE_APPLICATION=1" "-DJUCE_UNIT_TESTS=1" "-DJUCER_LINUX_MAKE_6D53C8B4=1" "-DJUCE_APP_VERSION=1.0.0" "-DJUCE_APP_VERSION_HEX=0x10000" $(shell pkg-config --cflags alsa freetype2 libcurl webkit2gtk-4.0 gtk+-x11-3.0) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS) JUCE_CPPFLAGS_CONSOLEAPP := "-DJucePlugin_Build_VST=0" "-DJucePlugin_Build_VST3=0" "-DJucePlugin_Build_AU=0" "-DJucePlugin_Build_AUv3=0" "-DJucePlugin_Build_RTAS=0" "-DJucePlugin_Build_AAX=0" "-DJucePlugin_Build_Standalone=0" "-DJucePlugin_Build_Unity=0" JUCE_TARGET_CONSOLEAPP := UnitTestRunner @@ -56,7 +56,7 @@ ifeq ($(CONFIG),Release) TARGET_ARCH := endif - JUCE_CPPFLAGS := $(DEPFLAGS) "-DLINUX=1" "-DNDEBUG=1" "-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x60105" "-DJUCE_MODULE_AVAILABLE_juce_analytics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_formats=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_processors=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_utils=1" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_MODULE_AVAILABLE_juce_cryptography=1" "-DJUCE_MODULE_AVAILABLE_juce_data_structures=1" "-DJUCE_MODULE_AVAILABLE_juce_dsp=1" "-DJUCE_MODULE_AVAILABLE_juce_events=1" "-DJUCE_MODULE_AVAILABLE_juce_graphics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1" "-DJUCE_MODULE_AVAILABLE_juce_opengl=1" "-DJUCE_MODULE_AVAILABLE_juce_osc=1" "-DJUCE_MODULE_AVAILABLE_juce_product_unlocking=1" "-DJUCE_MODULE_AVAILABLE_juce_video=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_STRICT_REFCOUNTEDPOINTER=1" "-DJUCE_STANDALONE_APPLICATION=1" "-DJUCE_UNIT_TESTS=1" "-DJUCER_LINUX_MAKE_6D53C8B4=1" "-DJUCE_APP_VERSION=1.0.0" "-DJUCE_APP_VERSION_HEX=0x10000" $(shell pkg-config --cflags alsa freetype2 libcurl webkit2gtk-4.0 gtk+-x11-3.0) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS) + JUCE_CPPFLAGS := $(DEPFLAGS) "-DLINUX=1" "-DNDEBUG=1" "-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x60106" "-DJUCE_MODULE_AVAILABLE_juce_analytics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_formats=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_processors=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_utils=1" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_MODULE_AVAILABLE_juce_cryptography=1" "-DJUCE_MODULE_AVAILABLE_juce_data_structures=1" "-DJUCE_MODULE_AVAILABLE_juce_dsp=1" "-DJUCE_MODULE_AVAILABLE_juce_events=1" "-DJUCE_MODULE_AVAILABLE_juce_graphics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1" "-DJUCE_MODULE_AVAILABLE_juce_opengl=1" "-DJUCE_MODULE_AVAILABLE_juce_osc=1" "-DJUCE_MODULE_AVAILABLE_juce_product_unlocking=1" "-DJUCE_MODULE_AVAILABLE_juce_video=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_STRICT_REFCOUNTEDPOINTER=1" "-DJUCE_STANDALONE_APPLICATION=1" "-DJUCE_UNIT_TESTS=1" "-DJUCER_LINUX_MAKE_6D53C8B4=1" "-DJUCE_APP_VERSION=1.0.0" "-DJUCE_APP_VERSION_HEX=0x10000" $(shell pkg-config --cflags alsa freetype2 libcurl webkit2gtk-4.0 gtk+-x11-3.0) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS) JUCE_CPPFLAGS_CONSOLEAPP := "-DJucePlugin_Build_VST=0" "-DJucePlugin_Build_VST3=0" "-DJucePlugin_Build_AU=0" "-DJucePlugin_Build_AUv3=0" "-DJucePlugin_Build_RTAS=0" "-DJucePlugin_Build_AAX=0" "-DJucePlugin_Build_Standalone=0" "-DJucePlugin_Build_Unity=0" JUCE_TARGET_CONSOLEAPP := UnitTestRunner diff --git a/extras/UnitTestRunner/Builds/MacOSX/UnitTestRunner.xcodeproj/project.pbxproj b/extras/UnitTestRunner/Builds/MacOSX/UnitTestRunner.xcodeproj/project.pbxproj index e88f582e..003f63a3 100644 --- a/extras/UnitTestRunner/Builds/MacOSX/UnitTestRunner.xcodeproj/project.pbxproj +++ b/extras/UnitTestRunner/Builds/MacOSX/UnitTestRunner.xcodeproj/project.pbxproj @@ -404,7 +404,7 @@ "NDEBUG=1", "JUCE_DISPLAY_SPLASH_SCREEN=0", "JUCE_USE_DARK_SPLASH_SCREEN=1", - "JUCE_PROJUCER_VERSION=0x60105", + "JUCE_PROJUCER_VERSION=0x60106", "JUCE_MODULE_AVAILABLE_juce_analytics=1", "JUCE_MODULE_AVAILABLE_juce_audio_basics=1", "JUCE_MODULE_AVAILABLE_juce_audio_devices=1", @@ -525,7 +525,7 @@ "DEBUG=1", "JUCE_DISPLAY_SPLASH_SCREEN=0", "JUCE_USE_DARK_SPLASH_SCREEN=1", - "JUCE_PROJUCER_VERSION=0x60105", + "JUCE_PROJUCER_VERSION=0x60106", "JUCE_MODULE_AVAILABLE_juce_analytics=1", "JUCE_MODULE_AVAILABLE_juce_audio_basics=1", "JUCE_MODULE_AVAILABLE_juce_audio_devices=1", diff --git a/extras/UnitTestRunner/Builds/VisualStudio2017/UnitTestRunner_ConsoleApp.vcxproj b/extras/UnitTestRunner/Builds/VisualStudio2017/UnitTestRunner_ConsoleApp.vcxproj index 78e0e4ce..e8fe99e2 100644 --- a/extras/UnitTestRunner/Builds/VisualStudio2017/UnitTestRunner_ConsoleApp.vcxproj +++ b/extras/UnitTestRunner/Builds/VisualStudio2017/UnitTestRunner_ConsoleApp.vcxproj @@ -64,7 +64,7 @@ Disabled ProgramDatabase ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;_CONSOLE;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60105;JUCE_MODULE_AVAILABLE_juce_analytics=1;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_MODULE_AVAILABLE_juce_osc=1;JUCE_MODULE_AVAILABLE_juce_product_unlocking=1;JUCE_MODULE_AVAILABLE_juce_video=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_STANDALONE_APPLICATION=1;JUCE_UNIT_TESTS=1;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;_CONSOLE;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60106;JUCE_MODULE_AVAILABLE_juce_analytics=1;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_MODULE_AVAILABLE_juce_osc=1;JUCE_MODULE_AVAILABLE_juce_product_unlocking=1;JUCE_MODULE_AVAILABLE_juce_video=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_STANDALONE_APPLICATION=1;JUCE_UNIT_TESTS=1;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) MultiThreadedDebugDLL true NotUsing @@ -107,7 +107,7 @@ Full ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;_CONSOLE;WIN32;_WINDOWS;NDEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60105;JUCE_MODULE_AVAILABLE_juce_analytics=1;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_MODULE_AVAILABLE_juce_osc=1;JUCE_MODULE_AVAILABLE_juce_product_unlocking=1;JUCE_MODULE_AVAILABLE_juce_video=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_STANDALONE_APPLICATION=1;JUCE_UNIT_TESTS=1;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;_CONSOLE;WIN32;_WINDOWS;NDEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60106;JUCE_MODULE_AVAILABLE_juce_analytics=1;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_MODULE_AVAILABLE_juce_osc=1;JUCE_MODULE_AVAILABLE_juce_product_unlocking=1;JUCE_MODULE_AVAILABLE_juce_video=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_STANDALONE_APPLICATION=1;JUCE_UNIT_TESTS=1;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) MultiThreadedDLL true NotUsing @@ -3100,6 +3100,7 @@ + @@ -3194,6 +3195,7 @@ + diff --git a/extras/UnitTestRunner/Builds/VisualStudio2017/UnitTestRunner_ConsoleApp.vcxproj.filters b/extras/UnitTestRunner/Builds/VisualStudio2017/UnitTestRunner_ConsoleApp.vcxproj.filters index 8d471c3f..ad8f6e7e 100644 --- a/extras/UnitTestRunner/Builds/VisualStudio2017/UnitTestRunner_ConsoleApp.vcxproj.filters +++ b/extras/UnitTestRunner/Builds/VisualStudio2017/UnitTestRunner_ConsoleApp.vcxproj.filters @@ -5175,6 +5175,9 @@ JUCE Modules\juce_gui_basics\mouse + + JUCE Modules\juce_gui_basics\mouse + JUCE Modules\juce_gui_basics\mouse @@ -5457,6 +5460,9 @@ JUCE Modules\juce_gui_extra\native + + JUCE Modules\juce_gui_extra\native + JUCE Modules\juce_gui_extra diff --git a/extras/UnitTestRunner/Builds/VisualStudio2019/UnitTestRunner_ConsoleApp.vcxproj b/extras/UnitTestRunner/Builds/VisualStudio2019/UnitTestRunner_ConsoleApp.vcxproj index db1c0bf1..f4773208 100644 --- a/extras/UnitTestRunner/Builds/VisualStudio2019/UnitTestRunner_ConsoleApp.vcxproj +++ b/extras/UnitTestRunner/Builds/VisualStudio2019/UnitTestRunner_ConsoleApp.vcxproj @@ -64,7 +64,7 @@ Disabled ProgramDatabase ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;_CONSOLE;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60105;JUCE_MODULE_AVAILABLE_juce_analytics=1;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_MODULE_AVAILABLE_juce_osc=1;JUCE_MODULE_AVAILABLE_juce_product_unlocking=1;JUCE_MODULE_AVAILABLE_juce_video=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_STANDALONE_APPLICATION=1;JUCE_UNIT_TESTS=1;JUCER_VS2019_78A5026=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;_CONSOLE;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60106;JUCE_MODULE_AVAILABLE_juce_analytics=1;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_MODULE_AVAILABLE_juce_osc=1;JUCE_MODULE_AVAILABLE_juce_product_unlocking=1;JUCE_MODULE_AVAILABLE_juce_video=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_STANDALONE_APPLICATION=1;JUCE_UNIT_TESTS=1;JUCER_VS2019_78A5026=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) MultiThreadedDebugDLL true NotUsing @@ -107,7 +107,7 @@ Full ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;_CONSOLE;WIN32;_WINDOWS;NDEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60105;JUCE_MODULE_AVAILABLE_juce_analytics=1;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_MODULE_AVAILABLE_juce_osc=1;JUCE_MODULE_AVAILABLE_juce_product_unlocking=1;JUCE_MODULE_AVAILABLE_juce_video=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_STANDALONE_APPLICATION=1;JUCE_UNIT_TESTS=1;JUCER_VS2019_78A5026=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;_CONSOLE;WIN32;_WINDOWS;NDEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60106;JUCE_MODULE_AVAILABLE_juce_analytics=1;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_MODULE_AVAILABLE_juce_osc=1;JUCE_MODULE_AVAILABLE_juce_product_unlocking=1;JUCE_MODULE_AVAILABLE_juce_video=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_STANDALONE_APPLICATION=1;JUCE_UNIT_TESTS=1;JUCER_VS2019_78A5026=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) MultiThreadedDLL true NotUsing @@ -3100,6 +3100,7 @@ + @@ -3194,6 +3195,7 @@ + diff --git a/extras/UnitTestRunner/Builds/VisualStudio2019/UnitTestRunner_ConsoleApp.vcxproj.filters b/extras/UnitTestRunner/Builds/VisualStudio2019/UnitTestRunner_ConsoleApp.vcxproj.filters index c8054d4c..eccd02ee 100644 --- a/extras/UnitTestRunner/Builds/VisualStudio2019/UnitTestRunner_ConsoleApp.vcxproj.filters +++ b/extras/UnitTestRunner/Builds/VisualStudio2019/UnitTestRunner_ConsoleApp.vcxproj.filters @@ -5175,6 +5175,9 @@ JUCE Modules\juce_gui_basics\mouse + + JUCE Modules\juce_gui_basics\mouse + JUCE Modules\juce_gui_basics\mouse @@ -5457,6 +5460,9 @@ JUCE Modules\juce_gui_extra\native + + JUCE Modules\juce_gui_extra\native + JUCE Modules\juce_gui_extra diff --git a/extras/UnitTestRunner/Builds/VisualStudio2022/UnitTestRunner_ConsoleApp.vcxproj b/extras/UnitTestRunner/Builds/VisualStudio2022/UnitTestRunner_ConsoleApp.vcxproj index 6a6b5407..5b5714ea 100644 --- a/extras/UnitTestRunner/Builds/VisualStudio2022/UnitTestRunner_ConsoleApp.vcxproj +++ b/extras/UnitTestRunner/Builds/VisualStudio2022/UnitTestRunner_ConsoleApp.vcxproj @@ -64,7 +64,7 @@ Disabled ProgramDatabase ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;_CONSOLE;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60105;JUCE_MODULE_AVAILABLE_juce_analytics=1;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_MODULE_AVAILABLE_juce_osc=1;JUCE_MODULE_AVAILABLE_juce_product_unlocking=1;JUCE_MODULE_AVAILABLE_juce_video=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_STANDALONE_APPLICATION=1;JUCE_UNIT_TESTS=1;JUCER_VS2022_78A503E=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;_CONSOLE;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60106;JUCE_MODULE_AVAILABLE_juce_analytics=1;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_MODULE_AVAILABLE_juce_osc=1;JUCE_MODULE_AVAILABLE_juce_product_unlocking=1;JUCE_MODULE_AVAILABLE_juce_video=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_STANDALONE_APPLICATION=1;JUCE_UNIT_TESTS=1;JUCER_VS2022_78A503E=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) MultiThreadedDebugDLL true NotUsing @@ -107,7 +107,7 @@ Full ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;_CONSOLE;WIN32;_WINDOWS;NDEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60105;JUCE_MODULE_AVAILABLE_juce_analytics=1;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_MODULE_AVAILABLE_juce_osc=1;JUCE_MODULE_AVAILABLE_juce_product_unlocking=1;JUCE_MODULE_AVAILABLE_juce_video=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_STANDALONE_APPLICATION=1;JUCE_UNIT_TESTS=1;JUCER_VS2022_78A503E=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;_CONSOLE;WIN32;_WINDOWS;NDEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60106;JUCE_MODULE_AVAILABLE_juce_analytics=1;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_MODULE_AVAILABLE_juce_osc=1;JUCE_MODULE_AVAILABLE_juce_product_unlocking=1;JUCE_MODULE_AVAILABLE_juce_video=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_STANDALONE_APPLICATION=1;JUCE_UNIT_TESTS=1;JUCER_VS2022_78A503E=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) MultiThreadedDLL true NotUsing @@ -3100,6 +3100,7 @@ + @@ -3194,6 +3195,7 @@ + diff --git a/extras/UnitTestRunner/Builds/VisualStudio2022/UnitTestRunner_ConsoleApp.vcxproj.filters b/extras/UnitTestRunner/Builds/VisualStudio2022/UnitTestRunner_ConsoleApp.vcxproj.filters index e0e8c3fe..816c592a 100644 --- a/extras/UnitTestRunner/Builds/VisualStudio2022/UnitTestRunner_ConsoleApp.vcxproj.filters +++ b/extras/UnitTestRunner/Builds/VisualStudio2022/UnitTestRunner_ConsoleApp.vcxproj.filters @@ -5175,6 +5175,9 @@ JUCE Modules\juce_gui_basics\mouse + + JUCE Modules\juce_gui_basics\mouse + JUCE Modules\juce_gui_basics\mouse @@ -5457,6 +5460,9 @@ JUCE Modules\juce_gui_extra\native + + JUCE Modules\juce_gui_extra\native + JUCE Modules\juce_gui_extra diff --git a/extras/WindowsDLL/Builds/VisualStudio2022/WindowsDLL_StaticLibrary.vcxproj b/extras/WindowsDLL/Builds/VisualStudio2022/WindowsDLL_StaticLibrary.vcxproj index c657eda5..b16fe4dc 100644 --- a/extras/WindowsDLL/Builds/VisualStudio2022/WindowsDLL_StaticLibrary.vcxproj +++ b/extras/WindowsDLL/Builds/VisualStudio2022/WindowsDLL_StaticLibrary.vcxproj @@ -64,7 +64,7 @@ Disabled ProgramDatabase ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60105;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_MODULE_AVAILABLE_juce_video=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_STANDALONE_APPLICATION=1;JUCE_DLL_BUILD=1;JUCER_VS2022_78A503E=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;_LIB;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60106;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_MODULE_AVAILABLE_juce_video=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_STANDALONE_APPLICATION=1;JUCE_DLL_BUILD=1;JUCER_VS2022_78A503E=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;_LIB;%(PreprocessorDefinitions) MultiThreadedDebugDLL true NotUsing @@ -105,7 +105,7 @@ Full ..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60105;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_MODULE_AVAILABLE_juce_video=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_STANDALONE_APPLICATION=1;JUCE_DLL_BUILD=1;JUCER_VS2022_78A503E=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;_LIB;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60106;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_MODULE_AVAILABLE_juce_video=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_STANDALONE_APPLICATION=1;JUCE_DLL_BUILD=1;JUCER_VS2022_78A503E=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;_LIB;%(PreprocessorDefinitions) MultiThreadedDLL true NotUsing @@ -2871,6 +2871,7 @@ + @@ -2965,6 +2966,7 @@ + diff --git a/extras/WindowsDLL/Builds/VisualStudio2022/WindowsDLL_StaticLibrary.vcxproj.filters b/extras/WindowsDLL/Builds/VisualStudio2022/WindowsDLL_StaticLibrary.vcxproj.filters index 67a686fb..6b1f6585 100644 --- a/extras/WindowsDLL/Builds/VisualStudio2022/WindowsDLL_StaticLibrary.vcxproj.filters +++ b/extras/WindowsDLL/Builds/VisualStudio2022/WindowsDLL_StaticLibrary.vcxproj.filters @@ -4773,6 +4773,9 @@ JUCE Modules\juce_gui_basics\mouse + + JUCE Modules\juce_gui_basics\mouse + JUCE Modules\juce_gui_basics\mouse @@ -5055,6 +5058,9 @@ JUCE Modules\juce_gui_extra\native + + JUCE Modules\juce_gui_extra\native + JUCE Modules\juce_gui_extra diff --git a/modules/juce_analytics/juce_analytics.h b/modules/juce_analytics/juce_analytics.h index eb7e4388..ff53d868 100644 --- a/modules/juce_analytics/juce_analytics.h +++ b/modules/juce_analytics/juce_analytics.h @@ -35,7 +35,7 @@ ID: juce_analytics vendor: juce - version: 6.1.5 + version: 6.1.6 name: JUCE analytics classes description: Classes to collect analytics and send to destinations website: http://www.juce.com/juce diff --git a/modules/juce_audio_basics/audio_play_head/juce_AudioPlayHead.h b/modules/juce_audio_basics/audio_play_head/juce_AudioPlayHead.h index 0e83537a..17bc7d83 100644 --- a/modules/juce_audio_basics/audio_play_head/juce_AudioPlayHead.h +++ b/modules/juce_audio_basics/audio_play_head/juce_AudioPlayHead.h @@ -102,13 +102,13 @@ public: double getEffectiveRate() const { return pulldown ? (double) base / 1.001 : (double) base; } /** Returns a copy of this object with the specified base rate. */ - FrameRate withBaseRate (int x) const { return with (&FrameRate::base, x); } + JUCE_NODISCARD FrameRate withBaseRate (int x) const { return with (&FrameRate::base, x); } /** Returns a copy of this object with drop frames enabled or disabled, as specified. */ - FrameRate withDrop (bool x = true) const { return with (&FrameRate::drop, x); } + JUCE_NODISCARD FrameRate withDrop (bool x = true) const { return with (&FrameRate::drop, x); } /** Returns a copy of this object with pulldown enabled or disabled, as specified. */ - FrameRate withPullDown (bool x = true) const { return with (&FrameRate::pulldown, x); } + JUCE_NODISCARD FrameRate withPullDown (bool x = true) const { return with (&FrameRate::pulldown, x); } /** Returns true if this instance is equal to other. */ bool operator== (const FrameRate& other) const diff --git a/modules/juce_audio_basics/buffers/juce_AudioChannelSet.cpp b/modules/juce_audio_basics/buffers/juce_AudioChannelSet.cpp index 97bb15c4..f7d74fd8 100644 --- a/modules/juce_audio_basics/buffers/juce_AudioChannelSet.cpp +++ b/modules/juce_audio_basics/buffers/juce_AudioChannelSet.cpp @@ -544,49 +544,55 @@ Array AudioChannelSet::channelSetsWithNumberOfChannels (int num { retval.add (AudioChannelSet::discreteChannels (numChannels)); - if (numChannels == 1) + retval.addArray ([numChannels]() -> Array { - retval.add (AudioChannelSet::mono()); - } - else if (numChannels == 2) - { - retval.add (AudioChannelSet::stereo()); - } - else if (numChannels == 3) - { - retval.add (AudioChannelSet::createLCR()); - retval.add (AudioChannelSet::createLRS()); - } - else if (numChannels == 4) - { - retval.add (AudioChannelSet::quadraphonic()); - retval.add (AudioChannelSet::createLCRS()); - } - else if (numChannels == 5) - { - retval.add (AudioChannelSet::create5point0()); - retval.add (AudioChannelSet::pentagonal()); - } - else if (numChannels == 6) - { - retval.add (AudioChannelSet::create5point1()); - retval.add (AudioChannelSet::create6point0()); - retval.add (AudioChannelSet::create6point0Music()); - retval.add (AudioChannelSet::hexagonal()); - } - else if (numChannels == 7) - { - retval.add (AudioChannelSet::create7point0()); - retval.add (AudioChannelSet::create7point0SDDS()); - retval.add (AudioChannelSet::create6point1()); - retval.add (AudioChannelSet::create6point1Music()); - } - else if (numChannels == 8) - { - retval.add (AudioChannelSet::create7point1()); - retval.add (AudioChannelSet::create7point1SDDS()); - retval.add (AudioChannelSet::octagonal()); - } + switch (numChannels) + { + case 1: + return { AudioChannelSet::mono() }; + case 2: + return { AudioChannelSet::stereo() }; + case 3: + return { AudioChannelSet::createLCR(), + AudioChannelSet::createLRS() }; + case 4: + return { AudioChannelSet::quadraphonic(), + AudioChannelSet::createLCRS() }; + case 5: + return { AudioChannelSet::create5point0(), + AudioChannelSet::pentagonal() }; + case 6: + return { AudioChannelSet::create5point1(), + AudioChannelSet::create6point0(), + AudioChannelSet::create6point0Music(), + AudioChannelSet::hexagonal() }; + case 7: + return { AudioChannelSet::create7point0(), + AudioChannelSet::create7point0SDDS(), + AudioChannelSet::create6point1(), + AudioChannelSet::create6point1Music() }; + case 8: + return { AudioChannelSet::create7point1(), + AudioChannelSet::create7point1SDDS(), + AudioChannelSet::octagonal(), + AudioChannelSet::create5point1point2() }; + case 9: + return { AudioChannelSet::create7point0point2() }; + case 10: + return { AudioChannelSet::create5point1point4(), + AudioChannelSet::create7point1point2() }; + case 11: + return { AudioChannelSet::create7point0point4() }; + case 12: + return { AudioChannelSet::create7point1point4() }; + case 14: + return { AudioChannelSet::create7point1point6() }; + case 16: + return { AudioChannelSet::create9point1point6() }; + } + + return {}; + }()); auto order = getAmbisonicOrderForNumChannels (numChannels); if (order >= 0) diff --git a/modules/juce_audio_basics/juce_audio_basics.h b/modules/juce_audio_basics/juce_audio_basics.h index 1db887e9..97b559e8 100644 --- a/modules/juce_audio_basics/juce_audio_basics.h +++ b/modules/juce_audio_basics/juce_audio_basics.h @@ -32,7 +32,7 @@ ID: juce_audio_basics vendor: juce - version: 6.1.5 + version: 6.1.6 name: JUCE audio and MIDI data classes description: Classes for audio buffer manipulation, midi message handling, synthesis, etc. website: http://www.juce.com/juce diff --git a/modules/juce_audio_basics/midi/juce_MidiFile.h b/modules/juce_audio_basics/midi/juce_MidiFile.h index 95f0e3ab..40662c26 100644 --- a/modules/juce_audio_basics/midi/juce_MidiFile.h +++ b/modules/juce_audio_basics/midi/juce_MidiFile.h @@ -133,7 +133,7 @@ public: */ void findAllTimeSigEvents (MidiMessageSequence& timeSigEvents) const; - /** Makes a list of all the time-signature meta-events from all tracks in the midi file. + /** Makes a list of all the key-signature meta-events from all tracks in the midi file. @param keySigEvents a list to which all the events will be added */ void findAllKeySigEvents (MidiMessageSequence& keySigEvents) const; diff --git a/modules/juce_audio_basics/utilities/juce_SmoothedValue.h b/modules/juce_audio_basics/utilities/juce_SmoothedValue.h index 5ee6cd65..1757966f 100644 --- a/modules/juce_audio_basics/utilities/juce_SmoothedValue.h +++ b/modules/juce_audio_basics/utilities/juce_SmoothedValue.h @@ -58,8 +58,6 @@ public: /** Constructor. */ SmoothedValueBase() = default; - virtual ~SmoothedValueBase() {} - //============================================================================== /** Returns true if the current value is currently being interpolated. */ bool isSmoothing() const noexcept { return countdown > 0; } diff --git a/modules/juce_audio_devices/juce_audio_devices.h b/modules/juce_audio_devices/juce_audio_devices.h index 96179a76..b4077022 100644 --- a/modules/juce_audio_devices/juce_audio_devices.h +++ b/modules/juce_audio_devices/juce_audio_devices.h @@ -32,7 +32,7 @@ ID: juce_audio_devices vendor: juce - version: 6.1.5 + version: 6.1.6 name: JUCE audio and MIDI I/O device classes description: Classes to play and record from audio and MIDI I/O devices website: http://www.juce.com/juce diff --git a/modules/juce_audio_devices/native/juce_mac_CoreAudio.cpp b/modules/juce_audio_devices/native/juce_mac_CoreAudio.cpp index 8cb3f367..24e5bfda 100644 --- a/modules/juce_audio_devices/native/juce_mac_CoreAudio.cpp +++ b/modules/juce_audio_devices/native/juce_mac_CoreAudio.cpp @@ -1555,7 +1555,7 @@ public: newCallback->audioDeviceAboutToStart (this); const ScopedLock sl (callbackLock); - previousCallback = std::exchange (callback, newCallback); + previousCallback = callback = newCallback; } } diff --git a/modules/juce_audio_formats/codecs/juce_WavAudioFormat.cpp b/modules/juce_audio_formats/codecs/juce_WavAudioFormat.cpp index 8414d5c8..aa2ef4ff 100644 --- a/modules/juce_audio_formats/codecs/juce_WavAudioFormat.cpp +++ b/modules/juce_audio_formats/codecs/juce_WavAudioFormat.cpp @@ -168,8 +168,9 @@ const char* const WavAudioFormat::riffInfoWatermarkURL = "IWMU"; const char* const WavAudioFormat::riffInfoWrittenBy = "IWRI"; const char* const WavAudioFormat::riffInfoYear = "YEAR"; -const char* const WavAudioFormat::ISRC = "ISRC"; -const char* const WavAudioFormat::tracktionLoopInfo = "tracktion loop info"; +const char* const WavAudioFormat::ISRC = "ISRC"; +const char* const WavAudioFormat::internationalStandardRecordingCode = "international standard recording code"; +const char* const WavAudioFormat::tracktionLoopInfo = "tracktion loop info"; //============================================================================== namespace WavFileHelpers @@ -880,7 +881,12 @@ namespace WavFileHelpers auto ISRCCode = xml4->getAllSubText().fromFirstOccurrenceOf ("ISRC:", false, true); if (ISRCCode.isNotEmpty()) - destValues[WavAudioFormat::ISRC] = ISRCCode; + { + // We set ISRC here for backwards compatibility. + // If the INFO 'source' field is set in the info chunk, then the + // value for this key will be overwritten later. + destValues[WavAudioFormat::riffInfoSource] = destValues[WavAudioFormat::internationalStandardRecordingCode] = ISRCCode; + } } } } @@ -890,11 +896,24 @@ namespace WavFileHelpers static MemoryBlock createFrom (const StringMap& values) { - auto ISRC = getValueWithDefault (values, WavAudioFormat::ISRC); + // Use the new ISRC key if it is present, but fall back to the + // INFO 'source' value for backwards compatibility. + auto ISRC = getValueWithDefault (values, + WavAudioFormat::internationalStandardRecordingCode, + getValueWithDefault (values, WavAudioFormat::riffInfoSource)); + MemoryOutputStream xml; if (ISRC.isNotEmpty()) { + // If you are trying to set the ISRC, make sure that you are using + // WavAudioFormat::internationalStandardRecordingCode as the metadata key, + // and that the value is 12 characters long. If you are trying to set the + // 'source' field in the INFO chunk, set the + // WavAudioFormat::internationalStandardRecordingCode metadata field to the + // empty string to silence this assertion. + jassert (ISRC.length() == 12); + xml << "" "" @@ -1869,6 +1888,8 @@ struct WaveAudioFormatTests : public UnitTest for (int i = numElementsInArray (WavFileHelpers::ListInfoChunk::types); --i >= 0;) metadataValues[WavFileHelpers::ListInfoChunk::types[i]] = WavFileHelpers::ListInfoChunk::types[i]; + metadataValues[WavAudioFormat::internationalStandardRecordingCode] = WavAudioFormat::internationalStandardRecordingCode; + if (metadataValues.size() > 0) metadataValues["MetaDataSource"] = "WAV"; @@ -1882,30 +1903,113 @@ struct WaveAudioFormatTests : public UnitTest metadataArray.addUnorderedMap (metadataValues); { - beginTest ("Creating a basic wave writer"); + beginTest ("Metadata can be written and read"); - std::unique_ptr writer (format.createWriterFor (new MemoryOutputStream (memoryBlock, false), - 44100.0, numTestAudioBufferChannels, - 32, metadataArray, 0)); - expect (writer != nullptr); + const auto newMetadata = getMetadataAfterReading (format, writeToBlock (format, metadataArray)); + expect (newMetadata == metadataArray, "Somehow, the metadata is different!"); + } - AudioBuffer buffer (numTestAudioBufferChannels, numTestAudioBufferSamples); - buffer.clear(); + { + beginTest ("Files containing a riff info source and an empty ISRC associate the source with the riffInfoSource key"); + StringPairArray meta; + meta.addMap ({ { WavAudioFormat::riffInfoSource, "customsource" }, + { WavAudioFormat::internationalStandardRecordingCode, "" } }); + const auto mb = writeToBlock (format, meta); + checkPatternsPresent (mb, { "INFOISRC" }); + checkPatternsNotPresent (mb, { "ISRC:", "writeFromAudioSampleBuffer (buffer, 0, numTestAudioBufferSamples)); + { + beginTest ("Files containing a riff info source and no ISRC associate the source with both keys " + "for backwards compatibility"); + StringPairArray meta; + meta.addMap ({ { WavAudioFormat::riffInfoSource, "customsource" } }); + const auto mb = writeToBlock (format, meta); + checkPatternsPresent (mb, { "INFOISRC", "ISRC:customsource", " reader (format.createReaderFor (new MemoryInputStream (memoryBlock, false), false)); - expect (reader != nullptr); - expect (reader->metadataValues == metadataArray, "Somehow, the metadata is different!"); + { + beginTest ("Files containing an ISRC and a riff info source associate the values with the appropriate keys"); + StringPairArray meta; + meta.addMap ({ { WavAudioFormat::riffInfoSource, "source" } }); + meta.addMap ({ { WavAudioFormat::internationalStandardRecordingCode, "UUVVVXXYYYYY" } }); + const auto mb = writeToBlock (format, meta); + checkPatternsPresent (mb, { "INFOISRC", "ISRC:UUVVVXXYYYYY", " buffer (numTestAudioBufferChannels, numTestAudioBufferSamples); + expect (writer->writeFromAudioSampleBuffer (buffer, 0, numTestAudioBufferSamples)); + } + + return mb; + } + + StringPairArray getMetadataAfterReading (WavAudioFormat& format, const MemoryBlock& mb) + { + auto reader = rawToUniquePtr (format.createReaderFor (new MemoryInputStream (mb, false), true)); + expect (reader != nullptr); + return reader->metadataValues; + } + + template + void checkPatterns (const MemoryBlock& mb, const std::vector& patterns, Fn&& fn) + { + for (const auto& pattern : patterns) + { + const auto begin = static_cast (mb.getData()); + const auto end = begin + mb.getSize(); + expect (fn (std::search (begin, end, pattern.begin(), pattern.end()), end)); + } + } + + void checkPatternsPresent (const MemoryBlock& mb, const std::vector& patterns) + { + checkPatterns (mb, patterns, std::not_equal_to<>{}); + } + + void checkPatternsNotPresent (const MemoryBlock& mb, const std::vector& patterns) + { + checkPatterns (mb, patterns, std::equal_to<>{}); + } + enum { numTestAudioBufferChannels = 2, diff --git a/modules/juce_audio_formats/codecs/juce_WavAudioFormat.h b/modules/juce_audio_formats/codecs/juce_WavAudioFormat.h index 55f5c4bf..766d76b8 100644 --- a/modules/juce_audio_formats/codecs/juce_WavAudioFormat.h +++ b/modules/juce_audio_formats/codecs/juce_WavAudioFormat.h @@ -177,8 +177,12 @@ public: //============================================================================== /** Metadata property name used when reading an ISRC code from an AXML chunk. */ + [[deprecated ("This string is identical to riffInfoSource, making it impossible to differentiate between the two")]] static const char* const ISRC; + /** Metadata property name used when reading and writing ISRC codes to/from AXML chunks. */ + static const char* const internationalStandardRecordingCode; + /** Metadata property name used when reading a WAV file with a Tracktion chunk. */ static const char* const tracktionLoopInfo; diff --git a/modules/juce_audio_formats/juce_audio_formats.h b/modules/juce_audio_formats/juce_audio_formats.h index a2b9cb7e..461d3cf0 100644 --- a/modules/juce_audio_formats/juce_audio_formats.h +++ b/modules/juce_audio_formats/juce_audio_formats.h @@ -35,7 +35,7 @@ ID: juce_audio_formats vendor: juce - version: 6.1.5 + version: 6.1.6 name: JUCE audio file format codecs description: Classes for reading and writing various audio file formats. website: http://www.juce.com/juce diff --git a/modules/juce_audio_plugin_client/AAX/juce_AAX_Wrapper.cpp b/modules/juce_audio_plugin_client/AAX/juce_AAX_Wrapper.cpp index ecbc4dbd..67f29bee 100644 --- a/modules/juce_audio_plugin_client/AAX/juce_AAX_Wrapper.cpp +++ b/modules/juce_audio_plugin_client/AAX/juce_AAX_Wrapper.cpp @@ -1533,7 +1533,7 @@ namespace AAXClasses } } - if (bypass) + if (bypass && pluginInstance->getBypassParameter() == nullptr) pluginInstance->processBlockBypassed (buffer, midiBuffer); else pluginInstance->processBlock (buffer, midiBuffer); diff --git a/modules/juce_audio_plugin_client/RTAS/juce_RTAS_Wrapper.cpp b/modules/juce_audio_plugin_client/RTAS/juce_RTAS_Wrapper.cpp index 99defb77..91a49867 100644 --- a/modules/juce_audio_plugin_client/RTAS/juce_RTAS_Wrapper.cpp +++ b/modules/juce_audio_plugin_client/RTAS/juce_RTAS_Wrapper.cpp @@ -588,7 +588,7 @@ public: AudioBuffer chans (channels, totalChans, numSamples); - if (mBypassed) + if (mBypassed && juceFilter->getBypassParameter() == nullptr) juceFilter->processBlockBypassed (chans, midiEvents); else juceFilter->processBlock (chans, midiEvents); @@ -685,6 +685,10 @@ public: else { mBypassed = (value > 0); + + if (auto* param = juceFilter->getBypassParameter()) + if (mBypassed != (param->getValue() >= 0.5f)) + param.setValueNotifyingHost (mBypassed ? 1.0f : 0.0f); } return CProcess::UpdateControlValue (controlIndex, value); diff --git a/modules/juce_audio_plugin_client/Standalone/juce_StandaloneFilterWindow.h b/modules/juce_audio_plugin_client/Standalone/juce_StandaloneFilterWindow.h index 58b458da..85ffae7d 100644 --- a/modules/juce_audio_plugin_client/Standalone/juce_StandaloneFilterWindow.h +++ b/modules/juce_audio_plugin_client/Standalone/juce_StandaloneFilterWindow.h @@ -709,6 +709,8 @@ public: : DocumentWindow (title, backgroundColour, DocumentWindow::minimiseButton | DocumentWindow::closeButton), optionsButton ("Options") { + setConstrainer (&decoratorConstrainer); + #if JUCE_IOS || JUCE_ANDROID setTitleBarHeight (0); #else @@ -725,9 +727,9 @@ public: #if JUCE_IOS || JUCE_ANDROID setFullScreen (true); - setContentOwned (new MainContentComponent (*this), false); + updateContent(); #else - setContentOwned (new MainContentComponent (*this), true); + updateContent(); const auto windowScreenBounds = [this]() -> Rectangle { @@ -798,7 +800,7 @@ public: props->removeValue ("filterState"); pluginHolder->createPlugin(); - setContentOwned (new MainContentComponent (*this), true); + updateContent(); pluginHolder->startPlaying(); } @@ -839,6 +841,20 @@ public: std::unique_ptr pluginHolder; private: + void updateContent() + { + auto* content = new MainContentComponent (*this); + decoratorConstrainer.setMainContentComponent (content); + + #if JUCE_IOS || JUCE_ANDROID + constexpr auto resizeAutomatically = false; + #else + constexpr auto resizeAutomatically = true; + #endif + + setContentOwned (content, resizeAutomatically); + } + void buttonClicked (Button*) override { PopupMenu m; @@ -914,6 +930,23 @@ private: } } + ComponentBoundsConstrainer* getEditorConstrainer() const + { + if (auto* e = editor.get()) + return e->getConstrainer(); + + return nullptr; + } + + BorderSize computeBorder() const + { + const auto outer = owner.getContentComponentBorder(); + return { outer.getTop() + (shouldShowNotification ? NotificationArea::height : 0), + outer.getLeft(), + outer.getBottom(), + outer.getRight() }; + } + private: //============================================================================== class NotificationArea : public Component @@ -975,28 +1008,6 @@ private: { const int extraHeight = shouldShowNotification ? NotificationArea::height : 0; const auto rect = getSizeToContainEditor(); - - if (auto* editorConstrainer = editor->getConstrainer()) - { - const auto borders = owner.getContentComponentBorder(); - - const auto windowBorders = [&]() -> BorderSize - { - if (auto* peer = owner.getPeer()) - return peer->getFrameSize(); - - return {}; - }(); - - const auto extraWindowWidth = borders.getLeftAndRight() + windowBorders.getLeftAndRight(); - const auto extraWindowHeight = extraHeight + borders.getTopAndBottom() + windowBorders.getTopAndBottom(); - - owner.setResizeLimits (jmax (10, editorConstrainer->getMinimumWidth() + extraWindowWidth), - jmax (10, editorConstrainer->getMinimumHeight() + extraWindowHeight), - editorConstrainer->getMaximumWidth() + extraWindowWidth, - editorConstrainer->getMaximumHeight() + extraWindowHeight); - } - setSize (rect.getWidth(), rect.getHeight() + extraHeight); } #endif @@ -1045,8 +1056,80 @@ private: JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MainContentComponent) }; + /* This custom constrainer checks with the AudioProcessorEditor (which might itself be + constrained) to ensure that any size we choose for the standalone window will be suitable + for the editor too. + + Without this constrainer, attempting to resize the standalone window may set bounds on the + peer that are unsupported by the inner editor. In this scenario, the peer will be set to a + 'bad' size, then the inner editor will be resized. The editor will check the new bounds with + its own constrainer, and may set itself to a more suitable size. After that, the resizable + window will see that its content component has changed size, and set the bounds of the peer + accordingly. The end result is that the peer is resized twice in a row to different sizes, + which can appear glitchy/flickery to the user. + */ + struct DecoratorConstrainer : public ComponentBoundsConstrainer + { + void checkBounds (Rectangle& bounds, + const Rectangle& previousBounds, + const Rectangle& limits, + bool isStretchingTop, + bool isStretchingLeft, + bool isStretchingBottom, + bool isStretchingRight) override + { + auto* decorated = contentComponent != nullptr ? contentComponent->getEditorConstrainer() + : nullptr; + + if (decorated != nullptr) + { + const auto border = contentComponent->computeBorder(); + const auto requestedBounds = bounds; + + border.subtractFrom (bounds); + decorated->checkBounds (bounds, + border.subtractedFrom (previousBounds), + limits, + isStretchingTop, + isStretchingLeft, + isStretchingBottom, + isStretchingRight); + border.addTo (bounds); + bounds = bounds.withPosition (requestedBounds.getPosition()); + + if (isStretchingTop && ! isStretchingBottom) + bounds = bounds.withBottomY (previousBounds.getBottom()); + + if (! isStretchingTop && isStretchingBottom) + bounds = bounds.withY (previousBounds.getY()); + + if (isStretchingLeft && ! isStretchingRight) + bounds = bounds.withRightX (previousBounds.getRight()); + + if (! isStretchingLeft && isStretchingRight) + bounds = bounds.withX (previousBounds.getX()); + } + else + { + ComponentBoundsConstrainer::checkBounds (bounds, + previousBounds, + limits, + isStretchingTop, + isStretchingLeft, + isStretchingBottom, + isStretchingRight); + } + } + + void setMainContentComponent (MainContentComponent* in) { contentComponent = in; } + + private: + MainContentComponent* contentComponent = nullptr; + }; + //============================================================================== TextButton optionsButton; + DecoratorConstrainer decoratorConstrainer; JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (StandaloneFilterWindow) }; diff --git a/modules/juce_audio_plugin_client/Unity/juce_Unity_Wrapper.cpp b/modules/juce_audio_plugin_client/Unity/juce_Unity_Wrapper.cpp index 08018247..7aae5b91 100644 --- a/modules/juce_audio_plugin_client/Unity/juce_Unity_Wrapper.cpp +++ b/modules/juce_audio_plugin_client/Unity/juce_Unity_Wrapper.cpp @@ -126,8 +126,8 @@ public: { ModifierKeys::currentModifiers = mods; - handleMouseEvent (juce::MouseInputSource::mouse, position, mods, juce::MouseInputSource::invalidPressure, - juce::MouseInputSource::invalidOrientation, juce::Time::currentTimeMillis()); + handleMouseEvent (juce::MouseInputSource::mouse, position, mods, juce::MouseInputSource::defaultPressure, + juce::MouseInputSource::defaultOrientation, juce::Time::currentTimeMillis()); } void forwardKeyPress (int code, String name, ModifierKeys mods) @@ -162,7 +162,9 @@ private: { ignoreUnused (mode); - bitmap.data = imageData + x * pixelStride + y * lineStride; + const auto offset = (size_t) x * (size_t) pixelStride + (size_t) y * (size_t) lineStride; + bitmap.data = imageData + offset; + bitmap.size = (size_t) (lineStride * height) - offset; bitmap.pixelFormat = pixelFormat; bitmap.lineStride = lineStride; bitmap.pixelStride = pixelStride; @@ -199,7 +201,7 @@ private: if (! ms.getCurrentModifiers().isLeftButtonDown()) owner.handleMouseEvent (juce::MouseInputSource::mouse, owner.globalToLocal (pos.toFloat()), {}, - juce::MouseInputSource::invalidPressure, juce::MouseInputSource::invalidOrientation, juce::Time::currentTimeMillis()); + juce::MouseInputSource::defaultPressure, juce::MouseInputSource::defaultOrientation, juce::Time::currentTimeMillis()); lastMousePos = pos; } @@ -270,6 +272,7 @@ private: bool isFocused() const override { return true; } void grabFocus() override {} void* getNativeHandle() const override { return nullptr; } + OptionalBorderSize getFrameSizeIfPresent() const override { return {}; } BorderSize getFrameSize() const override { return {}; } void setVisible (bool) override {} void setTitle (const String&) override {} @@ -349,6 +352,11 @@ public: void process (float* inBuffer, float* outBuffer, int bufferSize, int numInChannels, int numOutChannels, bool isBypassed) { + // If the plugin has a bypass parameter, set it to the current bypass state + if (auto* param = pluginInstance->getBypassParameter()) + if (isBypassed != (param->getValue() >= 0.5f)) + param->setValueNotifyingHost (isBypassed ? 1.0f : 0.0f); + for (int pos = 0; pos < bufferSize;) { auto max = jmin (bufferSize - pos, samplesPerBlock); @@ -451,7 +459,7 @@ private: { MidiBuffer mb; - if (isBypassed) + if (isBypassed && pluginInstance->getBypassParameter() == nullptr) pluginInstance->processBlockBypassed (scratchBuffer, mb); else pluginInstance->processBlock (scratchBuffer, mb); @@ -618,8 +626,7 @@ namespace UnityCallbacks auto isMuted = ((state->flags & stateIsMuted) != 0); auto isPaused = ((state->flags & stateIsPaused) != 0); - auto bypassed = ! isPlaying || (isMuted || isPaused); - + const auto bypassed = ! isPlaying || (isMuted || isPaused); pluginInstance->process (inBuffer, outBuffer, static_cast (bufferSize), numInChannels, numOutChannels, bypassed); } else diff --git a/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp b/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp index 24fc168a..bca6cd74 100644 --- a/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp +++ b/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp @@ -447,7 +447,7 @@ public: const int numChannels = jmax (numIn, numOut); AudioBuffer chans (tmpBuffers.channels, isMidiEffect ? 0 : numChannels, numSamples); - if (isBypassed) + if (isBypassed && processor->getBypassParameter() == nullptr) processor->processBlockBypassed (chans, midiEvents); else processor->processBlock (chans, midiEvents); @@ -737,7 +737,7 @@ public: void parameterValueChanged (int, float newValue) override { // this can only come from the bypass parameter - isBypassed = (newValue != 0.0f); + isBypassed = (newValue >= 0.5f); } void parameterGestureChanged (int, bool) override {} @@ -1800,10 +1800,10 @@ private: pointer_sized_int handleSetBypass (VstOpCodeArguments args) { - isBypassed = (args.value != 0); + isBypassed = args.value != 0; - if (auto* bypass = processor->getBypassParameter()) - bypass->setValueNotifyingHost (isBypassed ? 1.0f : 0.0f); + if (auto* param = processor->getBypassParameter()) + param->setValueNotifyingHost (isBypassed ? 1.0f : 0.0f); return 1; } diff --git a/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp b/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp index ded1cf1a..623ca9ae 100644 --- a/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp +++ b/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp @@ -582,7 +582,7 @@ private: cachedParamValues = CachedParamValues { { vstParamIDs.begin(), vstParamIDs.end() } }; } - Vst::ParamID generateVSTParamIDForParam (AudioProcessorParameter* param) + Vst::ParamID generateVSTParamIDForParam (const AudioProcessorParameter* param) { auto juceParamID = LegacyAudioParameter::getParamID (param, false); @@ -1174,19 +1174,19 @@ public: //============================================================================== void beginGesture (Vst::ParamID vstParamId) { - if (MessageManager::getInstance()->isThisTheMessageThread()) + if (! inSetState && MessageManager::getInstance()->isThisTheMessageThread()) beginEdit (vstParamId); } void endGesture (Vst::ParamID vstParamId) { - if (MessageManager::getInstance()->isThisTheMessageThread()) + if (! inSetState && MessageManager::getInstance()->isThisTheMessageThread()) endEdit (vstParamId); } void paramChanged (Steinberg::int32 parameterIndex, Vst::ParamID vstParamId, double newValue) { - if (inParameterChangedCallback) + if (inParameterChangedCallback || inSetState) return; if (MessageManager::getInstance()->isThisTheMessageThread()) @@ -1354,6 +1354,7 @@ private: std::vector> ownedParameterListeners; //============================================================================== + bool inSetState = false; std::atomic vst3IsPlaying { false }, inSetupProcessing { false }; @@ -1579,7 +1580,7 @@ private: Steinberg::IPlugView* viewIn) : processor (processorIn), editor (editorIn), componentHandler (handler), view (viewIn) {} - std::unique_ptr getContextMenuForParameterIndex (const AudioProcessorParameter* parameter) const override + std::unique_ptr getContextMenuForParameter (const AudioProcessorParameter* parameter) const override { if (componentHandler == nullptr || view == nullptr) return {}; @@ -2207,14 +2208,14 @@ class JuceVST3Component : public Vst::IComponent, { public: JuceVST3Component (Vst::IHostApplication* h) - : pluginInstance (createPluginFilterOfType (AudioProcessor::wrapperType_VST3)), - host (h) + : pluginInstance (createPluginFilterOfType (AudioProcessor::wrapperType_VST3)), + host (h) { inParameterChangedCallback = false; #ifdef JucePlugin_PreferredChannelConfigurations short configs[][2] = { JucePlugin_PreferredChannelConfigurations }; - const int numConfigs = sizeof (configs) / sizeof (short[2]); + const int numConfigs = numElementsInArray (configs); ignoreUnused (numConfigs); jassert (numConfigs > 0 && (configs[0][0] > 0 || configs[0][1] > 0)); @@ -2370,10 +2371,10 @@ public: tresult PLUGIN_API getRoutingInfo (Vst::RoutingInfo&, Vst::RoutingInfo&) override { return kNotImplemented; } //============================================================================== - bool isBypassed() + bool isBypassed() const { if (auto* bypassParam = comPluginInstance->getBypassParameter()) - return (bypassParam->getValue() != 0.0f); + return bypassParam->getValue() >= 0.5f; return false; } @@ -2433,6 +2434,10 @@ public: void setStateInformation (const void* data, int sizeAsInt) { + bool unusedState = false; + auto& flagToSet = juceVST3EditController != nullptr ? juceVST3EditController->inSetState : unusedState; + const ScopedValueSetter scope (flagToSet, true); + auto size = (uint64) sizeAsInt; // Check if this data was written with a newer JUCE version @@ -2636,6 +2641,10 @@ public: tresult PLUGIN_API setState (IBStream* state) override { + // The VST3 spec requires that this function is called from the UI thread. + // If this assertion fires, your host is misbehaving! + JUCE_ASSERT_MESSAGE_THREAD + if (state == nullptr) return kInvalidArgument; @@ -2763,7 +2772,7 @@ public: #ifdef JucePlugin_PreferredChannelConfigurations short configs[][2] = {JucePlugin_PreferredChannelConfigurations}; - const int numConfigs = sizeof (configs) / sizeof (short[2]); + const int numConfigs = numElementsInArray (configs); bool hasOnlyZeroChannels = true; @@ -3374,7 +3383,9 @@ private: if (totalInputChans == pluginInstance->getTotalNumInputChannels() && totalOutputChans == pluginInstance->getTotalNumOutputChannels()) { - if (isBypassed()) + // processBlockBypassed should only ever be called if the AudioProcessor doesn't + // return a valid parameter from getBypassParameter + if (pluginInstance->getBypassParameter() == nullptr && comPluginInstance->getBypassParameter()->getValue() >= 0.5f) pluginInstance->processBlockBypassed (buffer, midiBuffer); else pluginInstance->processBlock (buffer, midiBuffer); @@ -3489,7 +3500,7 @@ private: ptr = {}; } - T* operator->() { return ptr.operator->(); } + T* operator->() const { return ptr.operator->(); } T* get() const noexcept { return ptr.get(); } operator T*() const noexcept { return ptr.get(); } diff --git a/modules/juce_audio_plugin_client/juce_audio_plugin_client.h b/modules/juce_audio_plugin_client/juce_audio_plugin_client.h index e178dfff..1171fdae 100644 --- a/modules/juce_audio_plugin_client/juce_audio_plugin_client.h +++ b/modules/juce_audio_plugin_client/juce_audio_plugin_client.h @@ -35,7 +35,7 @@ ID: juce_audio_plugin_client vendor: juce - version: 6.1.5 + version: 6.1.6 name: JUCE audio plugin wrapper classes description: Classes for building VST, VST3, AudioUnit, AAX and RTAS plugins. website: http://www.juce.com/juce diff --git a/modules/juce_audio_processors/format/juce_AudioPluginFormat.h b/modules/juce_audio_processors/format/juce_AudioPluginFormat.h index f3bc8268..8ada0200 100644 --- a/modules/juce_audio_processors/format/juce_AudioPluginFormat.h +++ b/modules/juce_audio_processors/format/juce_AudioPluginFormat.h @@ -137,6 +137,9 @@ public: */ virtual FileSearchPath getDefaultLocationsToSearch() = 0; + /** Returns true if instantiation of this plugin type must be done from a non-message thread. */ + virtual bool requiresUnblockedMessageThreadDuringCreation (const PluginDescription&) const = 0; + protected: //============================================================================== friend class AudioPluginFormatManager; @@ -149,9 +152,6 @@ protected: virtual void createPluginInstance (const PluginDescription&, double initialSampleRate, int initialBufferSize, PluginCreationCallback) = 0; - /** Returns true if instantiation of this plugin type must be done from a non-message thread. */ - virtual bool requiresUnblockedMessageThreadDuringCreation (const PluginDescription&) const = 0; - private: struct AsyncCreateMessage; void handleMessage (const Message&) override; diff --git a/modules/juce_audio_processors/format_types/juce_AU_Shared.h b/modules/juce_audio_processors/format_types/juce_AU_Shared.h index aad9a4f4..06e739d8 100644 --- a/modules/juce_audio_processors/format_types/juce_AU_Shared.h +++ b/modules/juce_audio_processors/format_types/juce_AU_Shared.h @@ -215,25 +215,31 @@ struct AudioUnitHelpers } } - void clearInputBus (int index) + void clearInputBus (int index, int bufferLength) { if (isPositiveAndBelow (index, inputBusOffsets.size() - 1)) - clearChannels (inputBusOffsets[(size_t) index], inputBusOffsets[(size_t) (index + 1)]); + clearChannels ({ inputBusOffsets[(size_t) index], inputBusOffsets[(size_t) (index + 1)] }, bufferLength); } - void clearUnusedChannels() + void clearUnusedChannels (int bufferLength) { jassert (! inputBusOffsets .empty()); jassert (! outputBusOffsets.empty()); - clearChannels (inputBusOffsets.back(), outputBusOffsets.back()); + clearChannels ({ inputBusOffsets.back(), outputBusOffsets.back() }, bufferLength); } private: - void clearChannels (int begin, int end) + void clearChannels (Range range, int bufferLength) { - for (auto i = begin; i < end; ++i) - zeromem (scratch.getWritePointer (i), sizeof (float) * (size_t) scratch.getNumSamples()); + jassert (bufferLength <= scratch.getNumSamples()); + + if (range.getEnd() <= (int) channels.size()) + { + std::for_each (channels.begin() + range.getStart(), + channels.begin() + range.getEnd(), + [bufferLength] (float* ptr) { zeromem (ptr, sizeof (float) * (size_t) bufferLength); }); + } } float* uniqueBuffer (int idx, float* buffer) noexcept diff --git a/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm b/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm index b878bd03..8389dd6c 100644 --- a/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm +++ b/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm @@ -312,6 +312,105 @@ namespace AudioUnitFormatHelpers void handleAsyncUpdate() override { resizeToFitView(); } }; #endif + + template + struct BasicOptional + { + BasicOptional() = default; + + explicit constexpr BasicOptional (Value&& v) : value (std::move (v)), isValid (true) {} + explicit constexpr BasicOptional (const Value& v) : value (v), isValid (true) {} + + explicit constexpr operator bool() const noexcept { return isValid; } + + Value value; + bool isValid { false }; + }; + + template + static BasicOptional tryGetProperty (AudioUnit inUnit, + AudioUnitPropertyID inID, + AudioUnitScope inScope, + AudioUnitElement inElement) + { + Value data; + auto size = (UInt32) sizeof (Value); + + if (AudioUnitGetProperty (inUnit, inID, inScope, inElement, &data, &size) == noErr) + return BasicOptional (data); + + return BasicOptional(); + } + + static UInt32 getElementCount (AudioUnit comp, AudioUnitScope scope) noexcept + { + const auto count = tryGetProperty (comp, kAudioUnitProperty_ElementCount, scope, 0); + jassert (count.isValid); + return count.value; + } + + /* The plugin may expect its channels in a particular order, reported to the host + using kAudioUnitProperty_AudioChannelLayout. + This remapper allows us to respect the channel order requested by the plugin, + while still using the JUCE channel ordering for the AudioBuffer argument + of AudioProcessor::processBlock. + */ + class SingleDirectionChannelMapping + { + public: + void setUpMapping (AudioUnit comp, bool isInput) + { + channels.clear(); + busOffset.clear(); + + const auto scope = isInput ? kAudioUnitScope_Input : kAudioUnitScope_Output; + const auto n = getElementCount (comp, scope); + + for (UInt32 busIndex = 0; busIndex < n; ++busIndex) + { + std::vector busMap; + + if (const auto layout = tryGetProperty (comp, kAudioUnitProperty_AudioChannelLayout, scope, busIndex)) + { + const auto juceChannelOrder = CoreAudioLayouts::fromCoreAudio (layout.value); + const auto auChannelOrder = CoreAudioLayouts::getCoreAudioLayoutChannels (layout.value); + + for (auto juceChannelIndex = 0; juceChannelIndex < juceChannelOrder.size(); ++juceChannelIndex) + busMap.push_back ((size_t) auChannelOrder.indexOf (juceChannelOrder.getTypeOfChannel (juceChannelIndex))); + } + + busOffset.push_back (busMap.empty() ? unknownChannelCount : channels.size()); + channels.insert (channels.end(), busMap.begin(), busMap.end()); + } + } + + size_t getAuIndexForJuceChannel (size_t bus, size_t channel) const noexcept + { + const auto baseOffset = busOffset[bus]; + return baseOffset != unknownChannelCount ? channels[baseOffset + channel] + : channel; + } + + private: + static constexpr size_t unknownChannelCount = std::numeric_limits::max(); + + /* The index (in the channels vector) of the first channel in each bus. + e.g the index of the first channel in the second bus can be found at busOffset[1]. + It's possible for a bus not to report its channel layout, and in this case a value + of unknownChannelCount will be stored for that bus. + */ + std::vector busOffset; + + /* The index in a collection of JUCE channels of the AU channel with a matching channel + type. The mappings for all buses are stored in bus order. To find the start offset for a + particular bus, use the busOffset vector. + e.g. the index of the AU channel with the same type as the fifth channel of the third bus + in JUCE layout is found at channels[busOffset[2] + 4]. + If the busOffset for the bus is unknownChannelCount, then assume there is no mapping + between JUCE/AU channel layouts. + */ + std::vector channels; + }; } //============================================================================== @@ -386,15 +485,8 @@ public: return defaultValue; } - String getName (int /*maximumStringLength*/) const override - { - return name; - } - - String getLabel() const override - { - return valueLabel; - } + String getName (int /*maximumStringLength*/) const override { return name; } + String getLabel() const override { return valueLabel; } String getText (float value, int maximumLength) const override { @@ -510,15 +602,18 @@ public: UInt32 getRawParamID() const { return paramID; } + void setName (String&& newName) { name = std::move (newName); } + void setLabel (String&& newLabel) { valueLabel = std::move (newLabel); } + private: AudioUnitPluginInstance& pluginInstance; const UInt32 paramID; - const String name; + String name; const AudioUnitParameterValue minValue, maxValue, range; const bool automatable, discrete; const int numSteps; const bool valuesHaveStrings, isSwitch; - const String valueLabel; + String valueLabel; const AudioUnitParameterValue defaultValue; StringArray auValueStrings; }; @@ -624,8 +719,8 @@ public: bool canApplyBusCountChange (bool isInput, bool isAdding, BusProperties& outProperties) override { - int currentCount = getBusCount (isInput); - int newCount = currentCount + (isAdding ? 1 : -1); + auto currentCount = (UInt32) getBusCount (isInput); + auto newCount = (UInt32) ((int) currentCount + (isAdding ? 1 : -1)); AudioUnitScope scope = isInput ? kAudioUnitScope_Input : kAudioUnitScope_Output; if (AudioUnitSetProperty (audioUnit, kAudioUnitProperty_ElementCount, scope, 0, &newCount, sizeof (newCount)) == noErr) @@ -980,7 +1075,6 @@ public: timeStamp.mHostTime = GetCurrentHostTime (0, newSampleRate, isAUv3); timeStamp.mFlags = kAudioTimeStampSampleTimeValid | kAudioTimeStampHostTimeValid; - currentBuffer = nullptr; wasPlaying = false; resetBuses(); @@ -1003,6 +1097,13 @@ public: AudioUnitUninitialize (audioUnit); } } + + inMapping .setUpMapping (audioUnit, true); + outMapping.setUpMapping (audioUnit, false); + + preparedChannels = jmax (getTotalNumInputChannels(), getTotalNumOutputChannels()); + preparedSamples = estimatedSamplesPerBlock; + inputBuffer.setSize (preparedChannels, preparedSamples); } } @@ -1015,7 +1116,6 @@ public: AudioUnitReset (audioUnit, kAudioUnitScope_Global, 0); outputBufferList.clear(); - currentBuffer = nullptr; prepared = false; } @@ -1030,6 +1130,14 @@ public: void processAudio (AudioBuffer& buffer, MidiBuffer& midiMessages, bool processBlockBypassedCalled) { + // If these are hit, we might allocate in the process block! + jassert (buffer.getNumChannels() <= preparedChannels); + jassert (buffer.getNumSamples() <= preparedSamples); + // Copy the input buffer to guard against the case where a bus has more output channels + // than input channels, so rendering the output for that bus might stamp over the input + // to the following bus. + inputBuffer.makeCopyOf (buffer, true); + auto numSamples = buffer.getNumSamples(); if (auSupportsBypass) @@ -1045,28 +1153,27 @@ public: if (prepared) { timeStamp.mHostTime = GetCurrentHostTime (numSamples, getSampleRate(), isAUv3); - int numOutputBuses; - int chIdx = 0; - numOutputBuses = getBusCount (false); + const auto numOutputBuses = getBusCount (false); for (int i = 0; i < numOutputBuses; ++i) { if (AUBuffer* buf = outputBufferList[i]) { AudioBufferList& abl = *buf; + const auto* bus = getBus (false, i); + const auto channelCount = bus != nullptr ? bus->getNumberOfChannels() : 0; - for (AudioUnitElement j = 0; j < abl.mNumberBuffers; ++j) + for (auto juceChannel = 0; juceChannel < channelCount; ++juceChannel) { - abl.mBuffers[j].mNumberChannels = 1; - abl.mBuffers[j].mDataByteSize = (UInt32) ((size_t) numSamples * sizeof (float)); - abl.mBuffers[j].mData = buffer.getWritePointer (chIdx++); + const auto auChannel = outMapping.getAuIndexForJuceChannel ((size_t) i, (size_t) juceChannel); + abl.mBuffers[auChannel].mNumberChannels = 1; + abl.mBuffers[auChannel].mDataByteSize = (UInt32) ((size_t) numSamples * sizeof (float)); + abl.mBuffers[auChannel].mData = buffer.getWritePointer (bus->getChannelIndexInProcessBlockBuffer (juceChannel)); } } } - currentBuffer = &buffer; - if (wantsMidiMessages) { for (const auto metadata : midiMessages) @@ -1142,10 +1249,10 @@ public: for (int dir = 0; dir < 2; ++dir) { - const bool isInput = (dir == 0); - const int n = getElementCount (comp, isInput ? kAudioUnitScope_Input : kAudioUnitScope_Output); + const auto isInput = (dir == 0); + const auto n = AudioUnitFormatHelpers::getElementCount (comp, isInput ? kAudioUnitScope_Input : kAudioUnitScope_Output); - for (int i = 0; i < n; ++i) + for (UInt32 i = 0; i < n; ++i) { String busName; AudioChannelSet currentLayout; @@ -1383,99 +1490,72 @@ public: for (size_t i = 0; i < numParams; ++i) { - AudioUnitParameterInfo info; - UInt32 sz = sizeof (info); - - if (AudioUnitGetProperty (audioUnit, - kAudioUnitProperty_ParameterInfo, - kAudioUnitScope_Global, - ids[i], &info, &sz) == noErr) + const ScopedAudioUnitParameterInfo info { audioUnit, ids[i] }; + + if (! info.isValid()) + continue; + + const auto paramName = getParamName (info.get()); + const auto label = getParamLabel (info.get()); + const auto isDiscrete = (info.get().unit == kAudioUnitParameterUnit_Indexed + || info.get().unit == kAudioUnitParameterUnit_Boolean); + const auto isBoolean = info.get().unit == kAudioUnitParameterUnit_Boolean; + + auto parameter = std::make_unique (*this, + ids[i], + paramName, + info.get().minValue, + info.get().maxValue, + info.get().defaultValue, + (info.get().flags & kAudioUnitParameterFlag_NonRealTime) == 0, + isDiscrete, + isDiscrete ? (int) (info.get().maxValue - info.get().minValue + 1.0f) : AudioProcessor::getDefaultNumParameterSteps(), + isBoolean, + label, + (info.get().flags & kAudioUnitParameterFlag_ValuesHaveStrings) != 0); + + paramIDToParameter.emplace (ids[i], parameter.get()); + + if (info.get().flags & kAudioUnitParameterFlag_HasClump) { - String paramName; - - if ((info.flags & kAudioUnitParameterFlag_HasCFNameString) != 0) - { - paramName = String::fromCFString (info.cfNameString); - - if ((info.flags & kAudioUnitParameterFlag_CFNameRelease) != 0) - CFRelease (info.cfNameString); - } - else - { - paramName = String (info.name, sizeof (info.name)); - } + auto groupInfo = groupIDMap.find (info.get().clumpID); - bool isDiscrete = (info.unit == kAudioUnitParameterUnit_Indexed - || info.unit == kAudioUnitParameterUnit_Boolean); - bool isBoolean = info.unit == kAudioUnitParameterUnit_Boolean; - - auto label = [info]() -> String - { - if (info.unit == kAudioUnitParameterUnit_Percent) return "%"; - if (info.unit == kAudioUnitParameterUnit_Seconds) return "s"; - if (info.unit == kAudioUnitParameterUnit_Hertz) return "Hz"; - if (info.unit == kAudioUnitParameterUnit_Decibels) return "dB"; - if (info.unit == kAudioUnitParameterUnit_Milliseconds) return "ms"; - - return {}; - }(); - - auto parameter = std::make_unique (*this, - ids[i], - paramName, - info.minValue, - info.maxValue, - info.defaultValue, - (info.flags & kAudioUnitParameterFlag_NonRealTime) == 0, - isDiscrete, - isDiscrete ? (int) (info.maxValue - info.minValue + 1.0f) : AudioProcessor::getDefaultNumParameterSteps(), - isBoolean, - label, - (info.flags & kAudioUnitParameterFlag_ValuesHaveStrings) != 0); - - paramIDToParameter.emplace (ids[i], parameter.get()); - - if (info.flags & kAudioUnitParameterFlag_HasClump) + if (groupInfo == groupIDMap.end()) { - auto groupInfo = groupIDMap.find (info.clumpID); - - if (groupInfo == groupIDMap.end()) - { - auto getClumpName = [this, info] - { - AudioUnitParameterNameInfo clumpNameInfo; - UInt32 clumpSz = sizeof (clumpNameInfo); - zerostruct (clumpNameInfo); - clumpNameInfo.inID = info.clumpID; - clumpNameInfo.inDesiredLength = (SInt32) 256; - - if (AudioUnitGetProperty (audioUnit, - kAudioUnitProperty_ParameterClumpName, - kAudioUnitScope_Global, - 0, - &clumpNameInfo, - &clumpSz) == noErr) - return String::fromCFString (clumpNameInfo.outName); - - return String (info.clumpID); - }; - - auto group = std::make_unique (String (info.clumpID), - getClumpName(), String()); - group->addChild (std::move (parameter)); - groupIDMap[info.clumpID] = group.get(); - newParameterTree.addChild (std::move (group)); - } - else + const auto clumpName = [this, &info] { - groupInfo->second->addChild (std::move (parameter)); - } + AudioUnitParameterNameInfo clumpNameInfo; + UInt32 clumpSz = sizeof (clumpNameInfo); + zerostruct (clumpNameInfo); + clumpNameInfo.inID = info.get().clumpID; + clumpNameInfo.inDesiredLength = (SInt32) 256; + + if (AudioUnitGetProperty (audioUnit, + kAudioUnitProperty_ParameterClumpName, + kAudioUnitScope_Global, + 0, + &clumpNameInfo, + &clumpSz) == noErr) + return String::fromCFString (clumpNameInfo.outName); + + return String (info.get().clumpID); + }(); + + auto group = std::make_unique (String (info.get().clumpID), + clumpName, String()); + group->addChild (std::move (parameter)); + groupIDMap[info.get().clumpID] = group.get(); + newParameterTree.addChild (std::move (group)); } else { - newParameterTree.addChild (std::move (parameter)); + groupInfo->second->addChild (std::move (parameter)); } } + else + { + newParameterTree.addChild (std::move (parameter)); + } } } } @@ -1642,10 +1722,10 @@ private: OwnedArray outputBufferList; AudioTimeStamp timeStamp; - AudioBuffer* currentBuffer = nullptr; + AudioBuffer inputBuffer; Array> supportedInLayouts, supportedOutLayouts; - int numChannelInfos; + int numChannelInfos, preparedChannels = 0, preparedSamples = 0; HeapBlock channelInfos; AudioUnit audioUnit; @@ -1655,6 +1735,7 @@ private: std::map paramIDToParameter; + AudioUnitFormatHelpers::SingleDirectionChannelMapping inMapping, outMapping; MidiDataConcatenator midiConcatenator; CriticalSection midiInLock; MidiBuffer incomingMidi; @@ -1778,6 +1859,7 @@ private: switch (prop.mPropertyID) { case kAudioUnitProperty_ParameterList: + updateParameterInfo(); updateHostDisplay (AudioProcessorListener::ChangeDetails().withParameterInfoChanged (true)); break; @@ -1801,40 +1883,124 @@ private: static void eventListenerCallback (void* userRef, void*, const AudioUnitEvent* event, UInt64, AudioUnitParameterValue value) { + JUCE_ASSERT_MESSAGE_THREAD jassert (event != nullptr); static_cast (userRef)->eventCallback (*event, value); } + + void updateParameterInfo() + { + for (const auto& idAndParam : paramIDToParameter) + { + const auto& id = idAndParam.first; + const auto& param = idAndParam.second; + + const ScopedAudioUnitParameterInfo info { audioUnit, id }; + + if (! info.isValid()) + continue; + + param->setName (getParamName (info.get())); + param->setLabel (getParamLabel (info.get())); + } + } #endif + /* Some fields in the AudioUnitParameterInfo may need to be released after use, + so we'll do that using RAII. + */ + class ScopedAudioUnitParameterInfo + { + public: + ScopedAudioUnitParameterInfo (AudioUnit au, UInt32 paramId) + { + auto sz = (UInt32) sizeof (info); + valid = noErr == AudioUnitGetProperty (au, + kAudioUnitProperty_ParameterInfo, + kAudioUnitScope_Global, + paramId, + &info, + &sz); + } + + ScopedAudioUnitParameterInfo (const ScopedAudioUnitParameterInfo&) = delete; + ScopedAudioUnitParameterInfo (ScopedAudioUnitParameterInfo&&) = delete; + ScopedAudioUnitParameterInfo& operator= (const ScopedAudioUnitParameterInfo&) = delete; + ScopedAudioUnitParameterInfo& operator= (ScopedAudioUnitParameterInfo&&) = delete; + + ~ScopedAudioUnitParameterInfo() noexcept + { + if ((info.flags & kAudioUnitParameterFlag_CFNameRelease) == 0) + return; + + if (info.cfNameString != nullptr) + CFRelease (info.cfNameString); + + if (info.unit == kAudioUnitParameterUnit_CustomUnit && info.unitName != nullptr) + CFRelease (info.unitName); + } + + bool isValid() const { return valid; } + + const AudioUnitParameterInfo& get() const noexcept { return info; } + + private: + AudioUnitParameterInfo info; + bool valid = false; + }; + + static String getParamName (const AudioUnitParameterInfo& info) + { + if ((info.flags & kAudioUnitParameterFlag_HasCFNameString) == 0) + return { info.name, sizeof (info.name) }; + + return String::fromCFString (info.cfNameString); + } + + static String getParamLabel (const AudioUnitParameterInfo& info) + { + if (info.unit == kAudioUnitParameterUnit_CustomUnit) return String::fromCFString (info.unitName); + if (info.unit == kAudioUnitParameterUnit_Percent) return "%"; + if (info.unit == kAudioUnitParameterUnit_Seconds) return "s"; + if (info.unit == kAudioUnitParameterUnit_Hertz) return "Hz"; + if (info.unit == kAudioUnitParameterUnit_Decibels) return "dB"; + if (info.unit == kAudioUnitParameterUnit_Milliseconds) return "ms"; + + return {}; + } + //============================================================================== OSStatus renderGetInput (AudioUnitRenderActionFlags*, const AudioTimeStamp*, UInt32 inBusNumber, UInt32 inNumberFrames, - AudioBufferList* ioData) const + AudioBufferList* ioData) { - if (currentBuffer != nullptr) + if (inputBuffer.getNumChannels() <= 0) { - // if this ever happens, might need to add extra handling - jassert (inNumberFrames == (UInt32) currentBuffer->getNumSamples()); - auto buffer = static_cast (inBusNumber) < getBusCount (true) - ? getBusBuffer (*currentBuffer, true, static_cast (inBusNumber)) - : AudioBuffer(); + jassertfalse; + return noErr; + } - for (int i = 0; i < static_cast (ioData->mNumberBuffers); ++i) - { - if (i < buffer.getNumChannels()) - { - memcpy (ioData->mBuffers[i].mData, - buffer.getReadPointer (i), - sizeof (float) * inNumberFrames); - } - else - { - zeromem (ioData->mBuffers[i].mData, - sizeof (float) * inNumberFrames); - } - } + // if this ever happens, might need to add extra handling + if (inputBuffer.getNumSamples() != (int) inNumberFrames) + { + jassertfalse; + return noErr; + } + + const auto buffer = static_cast (inBusNumber) < getBusCount (true) + ? getBusBuffer (inputBuffer, true, static_cast (inBusNumber)) + : AudioBuffer(); + + for (int juceChannel = 0; juceChannel < buffer.getNumChannels(); ++juceChannel) + { + const auto auChannel = (int) inMapping.getAuIndexForJuceChannel (inBusNumber, (size_t) juceChannel); + + if (auChannel < buffer.getNumChannels()) + memcpy (ioData->mBuffers[auChannel].mData, buffer.getReadPointer (juceChannel), sizeof (float) * inNumberFrames); + else + zeromem (ioData->mBuffers[auChannel].mData, sizeof (float) * inNumberFrames); } return noErr; @@ -2017,28 +2183,16 @@ private: //============================================================================== int getElementCount (AudioUnitScope scope) const noexcept { - return static_cast (getElementCount (audioUnit, scope)); - } - - static int getElementCount (AudioUnit comp, AudioUnitScope scope) noexcept - { - UInt32 count; - UInt32 countSize = sizeof (count); - - auto err = AudioUnitGetProperty (comp, kAudioUnitProperty_ElementCount, scope, 0, &count, &countSize); - jassert (err == noErr); - ignoreUnused (err); - - return static_cast (count); + return static_cast (AudioUnitFormatHelpers::getElementCount (audioUnit, scope)); } //============================================================================== - void getBusProperties (bool isInput, int busIdx, String& busName, AudioChannelSet& currentLayout) const + void getBusProperties (bool isInput, UInt32 busIdx, String& busName, AudioChannelSet& currentLayout) const { getBusProperties (audioUnit, isInput, busIdx, busName, currentLayout); } - static void getBusProperties (AudioUnit comp, bool isInput, int busIdx, String& busName, AudioChannelSet& currentLayout) + static void getBusProperties (AudioUnit comp, bool isInput, UInt32 busIdx, String& busName, AudioChannelSet& currentLayout) { const AudioUnitScope scope = isInput ? kAudioUnitScope_Input : kAudioUnitScope_Output; busName = (isInput ? "Input #" : "Output #") + String (busIdx + 1); @@ -2047,7 +2201,7 @@ private: CFObjectHolder busNameCF; UInt32 propertySize = sizeof (busNameCF.object); - if (AudioUnitGetProperty (comp, kAudioUnitProperty_ElementName, scope, static_cast (busIdx), &busNameCF.object, &propertySize) == noErr) + if (AudioUnitGetProperty (comp, kAudioUnitProperty_ElementName, scope, busIdx, &busNameCF.object, &propertySize) == noErr) if (busNameCF.object != nullptr) busName = nsStringToJuce ((NSString*) busNameCF.object); @@ -2055,7 +2209,7 @@ private: AudioChannelLayout auLayout; propertySize = sizeof (auLayout); - if (AudioUnitGetProperty (comp, kAudioUnitProperty_AudioChannelLayout, scope, static_cast (busIdx), &auLayout, &propertySize) == noErr) + if (AudioUnitGetProperty (comp, kAudioUnitProperty_AudioChannelLayout, scope, busIdx, &auLayout, &propertySize) == noErr) currentLayout = CoreAudioLayouts::fromCoreAudio (auLayout); } @@ -2064,7 +2218,7 @@ private: AudioStreamBasicDescription descr; propertySize = sizeof (descr); - if (AudioUnitGetProperty (comp, kAudioUnitProperty_StreamFormat, scope, static_cast (busIdx), &descr, &propertySize) == noErr) + if (AudioUnitGetProperty (comp, kAudioUnitProperty_StreamFormat, scope, busIdx, &descr, &propertySize) == noErr) currentLayout = AudioChannelSet::canonicalChannelSet (static_cast (descr.mChannelsPerFrame)); } } diff --git a/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp b/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp index e566f7cc..90121aa0 100644 --- a/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp +++ b/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp @@ -1348,9 +1348,7 @@ struct VST3PluginWindow : public AudioProcessorEditor, warnOnFailure (view->setFrame (this)); view->queryInterface (Steinberg::IPlugViewContentScaleSupport::iid, (void**) &scaleInterface); - if (scaleInterface != nullptr) - warnOnFailure (scaleInterface->setContentScaleFactor ((Steinberg::IPlugViewContentScaleSupport::ScaleFactor) nativeScaleFactor)); - + setContentScaleFactor(); resizeToFit(); } @@ -1365,7 +1363,9 @@ struct VST3PluginWindow : public AudioProcessorEditor, embeddedComponent.removeClient(); #endif - warnOnFailure (view->removed()); + if (attachedCalled) + warnOnFailure (view->removed()); + warnOnFailure (view->setFrame (nullptr)); processor.editorBeingDeleted (this); @@ -1573,7 +1573,12 @@ private: return; } - warnOnFailure (view->attached ((void*) pluginHandle, defaultVST3WindowType)); + const auto attachedResult = view->attached ((void*) pluginHandle, defaultVST3WindowType); + ignoreUnused (warnOnFailure (attachedResult)); + + if (attachedResult == kResultOk) + attachedCalled = true; + updatePluginScale(); } } @@ -1591,11 +1596,24 @@ private: void updatePluginScale() { if (scaleInterface != nullptr) - warnOnFailure (scaleInterface->setContentScaleFactor ((Steinberg::IPlugViewContentScaleSupport::ScaleFactor) nativeScaleFactor)); + setContentScaleFactor(); else resizeToFit(); } + void setContentScaleFactor() + { + if (scaleInterface != nullptr) + { + const auto result = scaleInterface->setContentScaleFactor ((Steinberg::IPlugViewContentScaleSupport::ScaleFactor) nativeScaleFactor); + ignoreUnused (result); + + #if ! JUCE_MAC + ignoreUnused (warnOnFailure (result)); + #endif + } + } + //============================================================================== Atomic refCount { 1 }; VSTComSmartPtr view; @@ -1641,7 +1659,7 @@ private: #endif HandleFormat pluginHandle = {}; - bool recursiveResize = false, isInOnSize = false; + bool recursiveResize = false, isInOnSize = false, attachedCalled = false; ComponentPeer* currentPeer = nullptr; Steinberg::IPlugViewContentScaleSupport* scaleInterface = nullptr; @@ -1669,16 +1687,33 @@ struct VST3ComponentHolder // transfers ownership to the plugin instance! AudioPluginInstance* createPluginInstance(); + bool isIComponentAlsoIEditController() const + { + if (component == nullptr) + { + jassertfalse; + return false; + } + + return VSTComSmartPtr().loadFrom (component); + } + bool fetchController (VSTComSmartPtr& editController) { if (! isComponentInitialised && ! initialise()) return false; + editController.loadFrom (component); + // Get the IEditController: TUID controllerCID = { 0 }; - if (component->getControllerClassId (controllerCID) == kResultTrue && FUID (controllerCID).isValid()) + if (editController == nullptr + && component->getControllerClassId (controllerCID) == kResultTrue + && FUID (controllerCID).isValid()) + { editController.loadFrom (factory, controllerCID); + } if (editController == nullptr) { @@ -1695,9 +1730,6 @@ struct VST3ComponentHolder } } - if (editController == nullptr) - editController.loadFrom (component); - return (editController != nullptr); } @@ -2213,7 +2245,7 @@ public: editController->setComponentHandler (nullptr); - if (isControllerInitialised) + if (isControllerInitialised && ! holder->isIComponentAlsoIEditController()) editController->terminate(); holder->terminate(); @@ -2245,8 +2277,10 @@ public: if (! (isControllerInitialised || holder->fetchController (editController))) return false; - // (May return an error if the plugin combines the IComponent and IEditController implementations) - editController->initialize (holder->host->getFUnknown()); + // If the IComponent and IEditController are the same, we will have + // already initialized the object at this point and should avoid doing so again. + if (! holder->isIComponentAlsoIEditController()) + editController->initialize (holder->host->getFUnknown()); isControllerInitialised = true; editController->setComponentHandler (holder->host); @@ -2903,7 +2937,7 @@ public: MemoryBlock getStateForPresetFile() const { - VSTComSmartPtr memoryStream = new Steinberg::MemoryStream(); + VSTComSmartPtr memoryStream (new Steinberg::MemoryStream(), false); if (memoryStream == nullptr || holder->component == nullptr) return {}; @@ -2921,8 +2955,8 @@ public: bool setStateFromPresetFile (const MemoryBlock& rawData) const { - MemoryBlock rawDataCopy (rawData); - VSTComSmartPtr memoryStream = new Steinberg::MemoryStream (rawDataCopy.getData(), (int) rawDataCopy.getSize()); + auto rawDataCopy = rawData; + VSTComSmartPtr memoryStream (new Steinberg::MemoryStream (rawDataCopy.getData(), (int) rawDataCopy.getSize()), false); if (memoryStream == nullptr || holder->component == nullptr) return false; @@ -3746,12 +3780,13 @@ void VST3PluginFormat::recursiveFileSearch (StringArray& results, const File& di FileSearchPath VST3PluginFormat::getDefaultLocationsToSearch() { #if JUCE_WINDOWS - auto programFiles = File::getSpecialLocation (File::globalApplicationsDirectory).getFullPathName(); - return FileSearchPath (programFiles + "\\Common Files\\VST3"); + const auto localAppData = File::getSpecialLocation (File::windowsLocalAppData) .getFullPathName(); + const auto programFiles = File::getSpecialLocation (File::globalApplicationsDirectory).getFullPathName(); + return FileSearchPath (localAppData + "\\Programs\\Common\\VST3;" + programFiles + "\\Common Files\\VST3"); #elif JUCE_MAC - return FileSearchPath ("/Library/Audio/Plug-Ins/VST3;~/Library/Audio/Plug-Ins/VST3"); + return FileSearchPath ("~/Library/Audio/Plug-Ins/VST3;/Library/Audio/Plug-Ins/VST3"); #else - return FileSearchPath ("/usr/lib/vst3/;/usr/local/lib/vst3/;~/.vst3/"); + return FileSearchPath ("~/.vst3/;/usr/lib/vst3/;/usr/local/lib/vst3/"); #endif } diff --git a/modules/juce_audio_processors/juce_audio_processors.h b/modules/juce_audio_processors/juce_audio_processors.h index 026b05ad..6e6b90e9 100644 --- a/modules/juce_audio_processors/juce_audio_processors.h +++ b/modules/juce_audio_processors/juce_audio_processors.h @@ -35,7 +35,7 @@ ID: juce_audio_processors vendor: juce - version: 6.1.5 + version: 6.1.6 name: JUCE audio processor classes description: Classes for loading and playing VST, AU, LADSPA, or internally-generated audio processors. website: http://www.juce.com/juce diff --git a/modules/juce_audio_processors/processors/juce_AudioProcessor.h b/modules/juce_audio_processors/processors/juce_AudioProcessor.h index 3cb5b78e..d4ef6fb4 100644 --- a/modules/juce_audio_processors/processors/juce_AudioProcessor.h +++ b/modules/juce_audio_processors/processors/juce_AudioProcessor.h @@ -1340,8 +1340,8 @@ protected: void addBus (bool isInput, const String& name, const AudioChannelSet& defaultLayout, bool isActivatedByDefault = true); - BusesProperties withInput (const String& name, const AudioChannelSet& defaultLayout, bool isActivatedByDefault = true) const; - BusesProperties withOutput (const String& name, const AudioChannelSet& defaultLayout, bool isActivatedByDefault = true) const; + JUCE_NODISCARD BusesProperties withInput (const String& name, const AudioChannelSet& defaultLayout, bool isActivatedByDefault = true) const; + JUCE_NODISCARD BusesProperties withOutput (const String& name, const AudioChannelSet& defaultLayout, bool isActivatedByDefault = true) const; }; /** Callback to query if adding/removing buses currently possible. diff --git a/modules/juce_audio_processors/processors/juce_AudioProcessorEditorHostContext.h b/modules/juce_audio_processors/processors/juce_AudioProcessorEditorHostContext.h index 8b01a7c5..af7bf1b8 100644 --- a/modules/juce_audio_processors/processors/juce_AudioProcessorEditorHostContext.h +++ b/modules/juce_audio_processors/processors/juce_AudioProcessorEditorHostContext.h @@ -72,7 +72,18 @@ struct AudioProcessorEditorHostContext /** Returns an object which can be used to display a context menu for the parameter with the given index. */ - virtual std::unique_ptr getContextMenuForParameterIndex (const AudioProcessorParameter *) const = 0; + virtual std::unique_ptr getContextMenuForParameter (const AudioProcessorParameter *) const = 0; + + /** The naming of this function is misleading. Use getContextMenuForParameter() instead. + + Returns an object which can be used to display a context menu for the + parameter with the given index. + */ + [[deprecated ("The naming of this function has been fixed, use getContextMenuForParameter instead")]] + virtual std::unique_ptr getContextMenuForParameterIndex (const AudioProcessorParameter * p) const + { + return getContextMenuForParameter (p); + } }; } // namespace juce diff --git a/modules/juce_audio_processors/processors/juce_AudioProcessorListener.h b/modules/juce_audio_processors/processors/juce_AudioProcessorListener.h index aba63104..9f695ddc 100644 --- a/modules/juce_audio_processors/processors/juce_AudioProcessorListener.h +++ b/modules/juce_audio_processors/processors/juce_AudioProcessorListener.h @@ -78,7 +78,7 @@ public: @see latencyChanged */ - ChangeDetails withLatencyChanged (bool b) const noexcept { return with (&ChangeDetails::latencyChanged, b); } + JUCE_NODISCARD ChangeDetails withLatencyChanged (bool b) const noexcept { return with (&ChangeDetails::latencyChanged, b); } /** Indicates that some attributes of the AudioProcessor's parameters have changed. @@ -88,7 +88,7 @@ public: @see parameterInfoChanged */ - ChangeDetails withParameterInfoChanged (bool b) const noexcept { return with (&ChangeDetails::parameterInfoChanged, b); } + JUCE_NODISCARD ChangeDetails withParameterInfoChanged (bool b) const noexcept { return with (&ChangeDetails::parameterInfoChanged, b); } /** Indicates that the loaded program has changed. @@ -97,7 +97,7 @@ public: @see programChanged */ - ChangeDetails withProgramChanged (bool b) const noexcept { return with (&ChangeDetails::programChanged, b); } + JUCE_NODISCARD ChangeDetails withProgramChanged (bool b) const noexcept { return with (&ChangeDetails::programChanged, b); } /** Indicates that the plugin state has changed (but not its parameters!). @@ -110,7 +110,7 @@ public: @see nonParameterStateChanged */ - ChangeDetails withNonParameterStateChanged (bool b) const noexcept { return with (&ChangeDetails::nonParameterStateChanged, b); } + JUCE_NODISCARD ChangeDetails withNonParameterStateChanged (bool b) const noexcept { return with (&ChangeDetails::nonParameterStateChanged, b); } /** Returns the default set of flags that will be used when AudioProcessor::updateHostDisplay() is called with no arguments. diff --git a/modules/juce_audio_processors/processors/juce_AudioProcessorParameter.h b/modules/juce_audio_processors/processors/juce_AudioProcessorParameter.h index 4e39d4cc..bdb5360d 100644 --- a/modules/juce_audio_processors/processors/juce_AudioProcessorParameter.h +++ b/modules/juce_audio_processors/processors/juce_AudioProcessorParameter.h @@ -178,9 +178,9 @@ public: enum Category { - genericParameter = (0 << 16) | 0, /** If your parameter is not a meter then you should use this category */ + genericParameter = (0 << 16) | 0, /**< If your parameter is not a meter then you should use this category */ - inputGain = (1 << 16) | 0, /** Currently not used */ + inputGain = (1 << 16) | 0, /**< Currently not used */ outputGain = (1 << 16) | 1, /** The following categories tell the host that this parameter is a meter level value diff --git a/modules/juce_audio_processors/processors/juce_GenericAudioProcessorEditor.cpp b/modules/juce_audio_processors/processors/juce_GenericAudioProcessorEditor.cpp index e380d0c6..8c9df0d4 100644 --- a/modules/juce_audio_processors/processors/juce_GenericAudioProcessorEditor.cpp +++ b/modules/juce_audio_processors/processors/juce_GenericAudioProcessorEditor.cpp @@ -97,13 +97,19 @@ private: JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ParameterListener) }; +class ParameterComponent : public Component, + public ParameterListener +{ +public: + using ParameterListener::ParameterListener; +}; + //============================================================================== -class BooleanParameterComponent final : public Component, - private ParameterListener +class BooleanParameterComponent : public ParameterComponent { public: BooleanParameterComponent (AudioProcessor& proc, AudioProcessorParameter& param) - : ParameterListener (proc, param) + : ParameterComponent (proc, param) { // Set the initial value. handleNewParameterValue(); @@ -122,12 +128,12 @@ public: button.setBounds (area.reduced (0, 10)); } -private: void handleNewParameterValue() override { button.setToggleState (isParameterOn(), dontSendNotification); } +private: void buttonClicked() { if (isParameterOn() != button.getToggleState()) @@ -146,12 +152,11 @@ private: }; //============================================================================== -class SwitchParameterComponent final : public Component, - private ParameterListener +class SwitchParameterComponent : public ParameterComponent { public: SwitchParameterComponent (AudioProcessor& proc, AudioProcessorParameter& param) - : ParameterListener (proc, param) + : ParameterComponent (proc, param) { for (auto& button : buttons) { @@ -186,7 +191,6 @@ public: button.setBounds (area.removeFromLeft (80)); } -private: void handleNewParameterValue() override { bool newState = isParameterOn(); @@ -198,6 +202,7 @@ private: } } +private: void rightButtonChanged() { auto buttonState = buttons[1].getToggleState(); @@ -249,12 +254,11 @@ private: }; //============================================================================== -class ChoiceParameterComponent final : public Component, - private ParameterListener +class ChoiceParameterComponent : public ParameterComponent { public: ChoiceParameterComponent (AudioProcessor& proc, AudioProcessorParameter& param) - : ParameterListener (proc, param), + : ParameterComponent (proc, param), parameterValues (getParameter().getAllValueStrings()) { box.addItemList (parameterValues, 1); @@ -312,12 +316,11 @@ private: }; //============================================================================== -class SliderParameterComponent final : public Component, - private ParameterListener +class SliderParameterComponent : public ParameterComponent { public: SliderParameterComponent (AudioProcessor& proc, AudioProcessorParameter& param) - : ParameterListener (proc, param) + : ParameterComponent (proc, param) { if (getParameter().getNumSteps() != AudioProcessor::getDefaultNumParameterSteps()) slider.setRange (0.0, 1.0, 1.0 / (getParameter().getNumSteps() - 1.0)); @@ -354,12 +357,6 @@ public: slider.setBounds (area); } -private: - void updateTextDisplay() - { - valueLabel.setText (getParameter().getCurrentValueAsText(), dontSendNotification); - } - void handleNewParameterValue() override { if (! isDragging) @@ -369,6 +366,12 @@ private: } } +private: + void updateTextDisplay() + { + valueLabel.setText (getParameter().getCurrentValueAsText(), dontSendNotification); + } + void sliderValueChanged() { auto newVal = (float) slider.getValue(); @@ -449,7 +452,7 @@ public: { if (e.mods.isRightButtonDown()) if (auto* context = editor.getHostContext()) - if (auto menu = context->getContextMenuForParameterIndex (¶meter)) + if (auto menu = context->getContextMenuForParameter (¶meter)) menu->getEquivalentPopupMenu().showMenuAsync (PopupMenu::Options().withTargetComponent (this) .withMousePosition()); } @@ -458,9 +461,9 @@ private: AudioProcessorEditor& editor; AudioProcessorParameter& parameter; Label parameterName, parameterLabel; - std::unique_ptr parameterComp; + std::unique_ptr parameterComp; - std::unique_ptr createParameterComp (AudioProcessor& processor) const + std::unique_ptr createParameterComp (AudioProcessor& processor) const { // The AU, AUv3 and VST (only via a .vstxml file) SDKs support // marking a parameter as boolean. If you want consistency across @@ -501,6 +504,9 @@ private: { parameterName .setText (parameter.getName (128), dontSendNotification); parameterLabel.setText (parameter.getLabel(), dontSendNotification); + + if (auto* p = parameterComp.get()) + p->handleNewParameterValue(); } JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ParameterDisplayComponent) diff --git a/modules/juce_audio_processors/processors/juce_PluginDescription.cpp b/modules/juce_audio_processors/processors/juce_PluginDescription.cpp index 63f22e23..a7f2d1c7 100644 --- a/modules/juce_audio_processors/processors/juce_PluginDescription.cpp +++ b/modules/juce_audio_processors/processors/juce_PluginDescription.cpp @@ -54,7 +54,8 @@ bool PluginDescription::matchesIdentifierString (const String& identifierString) String PluginDescription::createIdentifierString() const { - return pluginFormatName + "-" + name + getPluginDescSuffix (*this, uniqueId); + const auto idToUse = uniqueId != 0 ? uniqueId : deprecatedUid; + return pluginFormatName + "-" + name + getPluginDescSuffix (*this, idToUse); } std::unique_ptr PluginDescription::createXml() const diff --git a/modules/juce_audio_processors/scanning/juce_PluginDirectoryScanner.h b/modules/juce_audio_processors/scanning/juce_PluginDirectoryScanner.h index 7da639b1..fc8aa8c5 100644 --- a/modules/juce_audio_processors/scanning/juce_PluginDirectoryScanner.h +++ b/modules/juce_audio_processors/scanning/juce_PluginDirectoryScanner.h @@ -126,7 +126,7 @@ private: File deadMansPedalFile; StringArray failedFiles; Atomic nextIndex; - float progress = 0; + std::atomic progress { 0.0f }; const bool allowAsync; void updateProgress(); diff --git a/modules/juce_audio_processors/scanning/juce_PluginListComponent.cpp b/modules/juce_audio_processors/scanning/juce_PluginListComponent.cpp index b56ea638..b1e3484a 100644 --- a/modules/juce_audio_processors/scanning/juce_PluginListComponent.cpp +++ b/modules/juce_audio_processors/scanning/juce_PluginListComponent.cpp @@ -451,7 +451,8 @@ private: String pluginBeingScanned; double progress = 0; const int numThreads; - bool allowAsync, finished = false, timerReentrancyCheck = false; + bool allowAsync, timerReentrancyCheck = false; + std::atomic finished { false }; std::unique_ptr pool; std::set initiallyBlacklistedFiles; @@ -582,6 +583,8 @@ private: if (timerReentrancyCheck) return; + progress = scanner->getProgress(); + if (pool == nullptr) { const ScopedValueSetter setter (timerReentrancyCheck, true); @@ -602,10 +605,7 @@ private: bool doNextScan() { if (scanner->scanNextFile (true, pluginBeingScanned)) - { - progress = scanner->getProgress(); return true; - } finished = true; return false; diff --git a/modules/juce_audio_utils/juce_audio_utils.h b/modules/juce_audio_utils/juce_audio_utils.h index 90ba324d..7eab5d0e 100644 --- a/modules/juce_audio_utils/juce_audio_utils.h +++ b/modules/juce_audio_utils/juce_audio_utils.h @@ -35,7 +35,7 @@ ID: juce_audio_utils vendor: juce - version: 6.1.5 + version: 6.1.6 name: JUCE extra audio utility classes description: Classes for audio-related GUI and miscellaneous tasks. website: http://www.juce.com/juce diff --git a/modules/juce_box2d/juce_box2d.h b/modules/juce_box2d/juce_box2d.h index 3b9ca41b..2b93878f 100644 --- a/modules/juce_box2d/juce_box2d.h +++ b/modules/juce_box2d/juce_box2d.h @@ -35,7 +35,7 @@ ID: juce_box2d vendor: juce - version: 6.1.5 + version: 6.1.6 name: JUCE wrapper for the Box2D physics engine description: The Box2D physics engine and some utility classes. website: http://www.juce.com/juce @@ -58,7 +58,8 @@ JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wconversion", "-Wshadow-field", "-Wzero-as-null-pointer-constant", - "-Wsign-conversion") + "-Wsign-conversion", + "-Wdeprecated") #include #include diff --git a/modules/juce_core/files/juce_DirectoryIterator.cpp b/modules/juce_core/files/juce_DirectoryIterator.cpp index 767a3ac4..ea72ed7e 100644 --- a/modules/juce_core/files/juce_DirectoryIterator.cpp +++ b/modules/juce_core/files/juce_DirectoryIterator.cpp @@ -75,13 +75,26 @@ bool DirectoryIterator::next (bool* isDirResult, bool* isHiddenResult, int64* fi if (! filename.containsOnly (".")) { + const auto fullPath = File::createFileWithoutCheckingPath (path + filename); bool matches = false; if (isDirectory) { - if (isRecursive && ((whatToLookFor & File::ignoreHiddenFiles) == 0 || ! isHidden)) - subIterator.reset (new DirectoryIterator (File::createFileWithoutCheckingPath (path + filename), - true, wildCard, whatToLookFor)); + const auto mayRecurseIntoPossibleHiddenDir = [this, &isHidden] + { + return (whatToLookFor & File::ignoreHiddenFiles) == 0 || ! isHidden; + }; + + const auto mayRecurseIntoPossibleSymlink = [this, &fullPath] + { + return followSymlinks == File::FollowSymlinks::yes + || ! fullPath.isSymbolicLink() + || (followSymlinks == File::FollowSymlinks::noCycles + && knownPaths->find (fullPath.getLinkedTarget()) == knownPaths->end()); + }; + + if (isRecursive && mayRecurseIntoPossibleHiddenDir() && mayRecurseIntoPossibleSymlink()) + subIterator.reset (new DirectoryIterator (fullPath, true, wildCard, whatToLookFor, followSymlinks, knownPaths)); matches = (whatToLookFor & File::findDirectories) != 0; } @@ -99,7 +112,7 @@ bool DirectoryIterator::next (bool* isDirResult, bool* isHiddenResult, int64* fi if (matches) { - currentFile = File::createFileWithoutCheckingPath (path + filename); + currentFile = fullPath; if (isHiddenResult != nullptr) *isHiddenResult = isHidden; if (isDirResult != nullptr) *isDirResult = isDirectory; diff --git a/modules/juce_core/files/juce_DirectoryIterator.h b/modules/juce_core/files/juce_DirectoryIterator.h index 8b99b3bf..27a7aea9 100644 --- a/modules/juce_core/files/juce_DirectoryIterator.h +++ b/modules/juce_core/files/juce_DirectoryIterator.h @@ -34,6 +34,10 @@ namespace juce A DirectoryIterator will search through a directory and its subdirectories using a wildcard filepattern match. + The iterator keeps track of directories that it has previously traversed, and will + skip any previously-seen directories in the case of cycles caused by symbolic links. + It is also possible to avoid following symbolic links altogether. + If you may be scanning a large number of files, it's usually smarter to use this class than File::findChildFiles() because it allows you to stop at any time, rather than having to wait for the entire scan to finish before getting the results. @@ -73,17 +77,10 @@ public: DirectoryIterator (const File& directory, bool recursive, const String& pattern = "*", - int type = File::findFiles) - : wildCards (parseWildcards (pattern)), - fileFinder (directory, (recursive || wildCards.size() > 1) ? "*" : pattern), - wildCard (pattern), - path (File::addTrailingSeparator (directory.getFullPathName())), - whatToLookFor (type), - isRecursive (recursive) + int type = File::findFiles, + File::FollowSymlinks follow = File::FollowSymlinks::yes) + : DirectoryIterator (directory, recursive, pattern, type, follow, nullptr) { - // you have to specify the type of files you're looking for! - jassert ((whatToLookFor & (File::findFiles | File::findDirectories)) != 0); - jassert (whatToLookFor > 0 && whatToLookFor <= 7); } /** Moves the iterator along to the next file. @@ -126,6 +123,39 @@ public: float getEstimatedProgress() const; private: + using KnownPaths = std::set; + + DirectoryIterator (const File& directory, + bool recursive, + const String& pattern, + int type, + File::FollowSymlinks follow, + KnownPaths* seenPaths) + : wildCards (parseWildcards (pattern)), + fileFinder (directory, (recursive || wildCards.size() > 1) ? "*" : pattern), + wildCard (pattern), + path (File::addTrailingSeparator (directory.getFullPathName())), + whatToLookFor (type), + isRecursive (recursive), + followSymlinks (follow), + knownPaths (seenPaths) + { + // you have to specify the type of files you're looking for! + jassert ((whatToLookFor & (File::findFiles | File::findDirectories)) != 0); + jassert (whatToLookFor > 0 && whatToLookFor <= 7); + + if (followSymlinks == File::FollowSymlinks::noCycles) + { + if (knownPaths == nullptr) + { + heapKnownPaths = std::make_unique(); + knownPaths = heapKnownPaths.get(); + } + + knownPaths->insert (directory); + } + } + //============================================================================== struct NativeIterator { @@ -152,6 +182,9 @@ private: bool hasBeenAdvanced = false; std::unique_ptr subIterator; File currentFile; + File::FollowSymlinks followSymlinks = File::FollowSymlinks::yes; + KnownPaths* knownPaths = nullptr; + std::unique_ptr heapKnownPaths; static StringArray parseWildcards (const String& pattern); static bool fileMatches (const StringArray& wildCards, const String& filename); diff --git a/modules/juce_core/files/juce_File.cpp b/modules/juce_core/files/juce_File.cpp index e17e5763..85fd0b7d 100644 --- a/modules/juce_core/files/juce_File.cpp +++ b/modules/juce_core/files/juce_File.cpp @@ -561,18 +561,18 @@ void File::readLines (StringArray& destLines) const } //============================================================================== -Array File::findChildFiles (int whatToLookFor, bool searchRecursively, const String& wildcard) const +Array File::findChildFiles (int whatToLookFor, bool searchRecursively, const String& wildcard, FollowSymlinks followSymlinks) const { Array results; - findChildFiles (results, whatToLookFor, searchRecursively, wildcard); + findChildFiles (results, whatToLookFor, searchRecursively, wildcard, followSymlinks); return results; } -int File::findChildFiles (Array& results, int whatToLookFor, bool searchRecursively, const String& wildcard) const +int File::findChildFiles (Array& results, int whatToLookFor, bool searchRecursively, const String& wildcard, FollowSymlinks followSymlinks) const { int total = 0; - for (const auto& di : RangedDirectoryIterator (*this, searchRecursively, wildcard, whatToLookFor)) + for (const auto& di : RangedDirectoryIterator (*this, searchRecursively, wildcard, whatToLookFor, followSymlinks)) { results.add (di.getFile()); ++total; diff --git a/modules/juce_core/files/juce_File.h b/modules/juce_core/files/juce_File.h index ac38105e..a6f9f71a 100644 --- a/modules/juce_core/files/juce_File.h +++ b/modules/juce_core/files/juce_File.h @@ -560,6 +560,23 @@ public: ignoreHiddenFiles = 4 /**< Add this flag to avoid returning any hidden files in the results. */ }; + enum class FollowSymlinks + { + /** Requests that a file system traversal should not follow any symbolic links. */ + no, + + /** Requests that a file system traversal may follow symbolic links, but should attempt to + skip any symbolic links to directories that may cause a cycle. + */ + noCycles, + + /** Requests that a file system traversal follow all symbolic links. Use with care, as this + may produce inconsistent results, or fail to terminate, if the filesystem contains cycles + due to symbolic links. + */ + yes + }; + /** Searches this directory for files matching a wildcard pattern. Assuming that this file is a directory, this method will search it @@ -572,13 +589,15 @@ public: @param searchRecursively if true, all subdirectories will be recursed into to do an exhaustive search @param wildCardPattern the filename pattern to search for, e.g. "*.txt" + @param followSymlinks the method that should be used to handle symbolic links @returns the set of files that were found @see getNumberOfChildFiles, RangedDirectoryIterator */ Array findChildFiles (int whatToLookFor, bool searchRecursively, - const String& wildCardPattern = "*") const; + const String& wildCardPattern = "*", + FollowSymlinks followSymlinks = FollowSymlinks::yes) const; /** Searches inside a directory for files matching a wildcard pattern. Note that there's a newer, better version of this method which returns the results @@ -586,7 +605,8 @@ public: mainly for legacy code to use. */ int findChildFiles (Array& results, int whatToLookFor, - bool searchRecursively, const String& wildCardPattern = "*") const; + bool searchRecursively, const String& wildCardPattern = "*", + FollowSymlinks followSymlinks = FollowSymlinks::yes) const; /** Searches inside a directory and counts how many files match a wildcard pattern. @@ -942,7 +962,10 @@ public: @see globalApplicationsDirectory */ - globalApplicationsDirectoryX86 + globalApplicationsDirectoryX86, + + /** On a Windows machine returns the %LOCALAPPDATA% folder. */ + windowsLocalAppData #endif }; diff --git a/modules/juce_core/files/juce_RangedDirectoryIterator.cpp b/modules/juce_core/files/juce_RangedDirectoryIterator.cpp index cbf3dbd6..fa5796cb 100644 --- a/modules/juce_core/files/juce_RangedDirectoryIterator.cpp +++ b/modules/juce_core/files/juce_RangedDirectoryIterator.cpp @@ -39,11 +39,13 @@ float DirectoryEntry::getEstimatedProgress() const RangedDirectoryIterator::RangedDirectoryIterator (const File& directory, bool isRecursive, const String& wildCard, - int whatToLookFor) + int whatToLookFor, + File::FollowSymlinks followSymlinks) : iterator (new DirectoryIterator (directory, isRecursive, wildCard, - whatToLookFor)) + whatToLookFor, + followSymlinks)) { entry.iterator = iterator; increment(); diff --git a/modules/juce_core/files/juce_RangedDirectoryIterator.h b/modules/juce_core/files/juce_RangedDirectoryIterator.h index 0c2ba664..db34e893 100644 --- a/modules/juce_core/files/juce_RangedDirectoryIterator.h +++ b/modules/juce_core/files/juce_RangedDirectoryIterator.h @@ -118,11 +118,13 @@ public: separated by a semi-colon or comma, e.g. "*.jpg;*.png" @param whatToLookFor a value from the File::TypesOfFileToFind enum, specifying whether to look for files, directories, or both. + @param followSymlinks the policy to use when symlinks are encountered */ RangedDirectoryIterator (const File& directory, bool isRecursive, const String& wildCard = "*", - int whatToLookFor = File::findFiles); + int whatToLookFor = File::findFiles, + File::FollowSymlinks followSymlinks = File::FollowSymlinks::yes); /** Returns true if both iterators are in their end/sentinel state, otherwise returns false. diff --git a/modules/juce_core/files/juce_TemporaryFile.cpp b/modules/juce_core/files/juce_TemporaryFile.cpp index 4cf2f9f3..eda1edcd 100644 --- a/modules/juce_core/files/juce_TemporaryFile.cpp +++ b/modules/juce_core/files/juce_TemporaryFile.cpp @@ -23,6 +23,23 @@ namespace juce { +// Using Random::getSystemRandom() can be a bit dangerous in multithreaded contexts! +class LockedRandom +{ +public: + int nextInt() + { + const ScopedLock lock (mutex); + return random.nextInt(); + } + +private: + CriticalSection mutex; + Random random; +}; + +static LockedRandom lockedRandom; + static File createTempFile (const File& parentDirectory, String name, const String& suffix, int optionFlags) { @@ -34,7 +51,7 @@ static File createTempFile (const File& parentDirectory, String name, TemporaryFile::TemporaryFile (const String& suffix, const int optionFlags) : temporaryFile (createTempFile (File::getSpecialLocation (File::tempDirectory), - "temp_" + String::toHexString (Random::getSystemRandom().nextInt()), + "temp_" + String::toHexString (lockedRandom.nextInt()), suffix, optionFlags)), targetFile() { @@ -43,7 +60,7 @@ TemporaryFile::TemporaryFile (const String& suffix, const int optionFlags) TemporaryFile::TemporaryFile (const File& target, const int optionFlags) : temporaryFile (createTempFile (target.getParentDirectory(), target.getFileNameWithoutExtension() - + "_temp" + String::toHexString (Random::getSystemRandom().nextInt()), + + "_temp" + String::toHexString (lockedRandom.nextInt()), target.getFileExtension(), optionFlags)), targetFile (target) { diff --git a/modules/juce_core/juce_core.h b/modules/juce_core/juce_core.h index 5b582e57..41a29220 100644 --- a/modules/juce_core/juce_core.h +++ b/modules/juce_core/juce_core.h @@ -32,7 +32,7 @@ ID: juce_core vendor: juce - version: 6.1.5 + version: 6.1.6 name: JUCE core classes description: The essential set of basic JUCE classes, as required by all the other JUCE modules. Includes text, container, memory, threading and i/o functionality. website: http://www.juce.com/juce diff --git a/modules/juce_core/maths/juce_MathsFunctions.h b/modules/juce_core/maths/juce_MathsFunctions.h index f6f58297..4ead2726 100644 --- a/modules/juce_core/maths/juce_MathsFunctions.h +++ b/modules/juce_core/maths/juce_MathsFunctions.h @@ -175,8 +175,8 @@ Type mapFromLog10 (Type valueInLogRange, Type logRangeMin, Type logRangeMax) } /** Scans an array of values, returning the minimum value that it contains. */ -template -Type findMinimum (const Type* data, int numValues) +template +Type findMinimum (const Type* data, Size numValues) { if (numValues <= 0) return Type (0); @@ -195,8 +195,8 @@ Type findMinimum (const Type* data, int numValues) } /** Scans an array of values, returning the maximum value that it contains. */ -template -Type findMaximum (const Type* values, int numValues) +template +Type findMaximum (const Type* values, Size numValues) { if (numValues <= 0) return Type (0); diff --git a/modules/juce_core/maths/juce_Random.cpp b/modules/juce_core/maths/juce_Random.cpp index c2b75d47..dc14a53e 100644 --- a/modules/juce_core/maths/juce_Random.cpp +++ b/modules/juce_core/maths/juce_Random.cpp @@ -32,10 +32,6 @@ Random::Random() : seed (1) setSeedRandomly(); } -Random::~Random() noexcept -{ -} - void Random::setSeed (const int64 newSeed) noexcept { if (this == &getSystemRandom()) diff --git a/modules/juce_core/maths/juce_Random.h b/modules/juce_core/maths/juce_Random.h index 2a24fa75..ff25e60d 100644 --- a/modules/juce_core/maths/juce_Random.h +++ b/modules/juce_core/maths/juce_Random.h @@ -50,9 +50,6 @@ public: */ Random(); - /** Destructor. */ - ~Random() noexcept; - /** Returns the next random 32 bit integer. @returns a random integer from the full range 0x80000000 to 0x7fffffff */ diff --git a/modules/juce_core/maths/juce_Range.h b/modules/juce_core/maths/juce_Range.h index bf540d81..de5a3f78 100644 --- a/modules/juce_core/maths/juce_Range.h +++ b/modules/juce_core/maths/juce_Range.h @@ -63,14 +63,14 @@ public: } /** Returns a range with a given start and length. */ - static Range withStartAndLength (const ValueType startValue, const ValueType length) noexcept + JUCE_NODISCARD static Range withStartAndLength (const ValueType startValue, const ValueType length) noexcept { jassert (length >= ValueType()); return Range (startValue, startValue + length); } /** Returns a range with the specified start position and a length of zero. */ - constexpr static Range emptyRange (const ValueType start) noexcept + JUCE_NODISCARD constexpr static Range emptyRange (const ValueType start) noexcept { return Range (start, start); } @@ -104,13 +104,13 @@ public: If the new start position is higher than the current end of the range, the end point will be pushed along to equal it, returning an empty range at the new position. */ - constexpr Range withStart (const ValueType newStart) const noexcept + JUCE_NODISCARD constexpr Range withStart (const ValueType newStart) const noexcept { return Range (newStart, jmax (newStart, end)); } /** Returns a range with the same length as this one, but moved to have the given start position. */ - constexpr Range movedToStartAt (const ValueType newStart) const noexcept + JUCE_NODISCARD constexpr Range movedToStartAt (const ValueType newStart) const noexcept { return Range (newStart, end + (newStart - start)); } @@ -130,13 +130,13 @@ public: If the new end position is below the current start of the range, the start point will be pushed back to equal the new end point. */ - constexpr Range withEnd (const ValueType newEnd) const noexcept + JUCE_NODISCARD constexpr Range withEnd (const ValueType newEnd) const noexcept { return Range (jmin (start, newEnd), newEnd); } /** Returns a range with the same length as this one, but moved to have the given end position. */ - constexpr Range movedToEndAt (const ValueType newEnd) const noexcept + JUCE_NODISCARD constexpr Range movedToEndAt (const ValueType newEnd) const noexcept { return Range (start + (newEnd - end), newEnd); } @@ -152,7 +152,7 @@ public: /** Returns a range with the same start as this one, but a different length. Lengths less than zero are treated as zero. */ - constexpr Range withLength (const ValueType newLength) const noexcept + JUCE_NODISCARD constexpr Range withLength (const ValueType newLength) const noexcept { return Range (start, start + newLength); } @@ -161,7 +161,7 @@ public: given amount. @returns The returned range will be (start - amount, end + amount) */ - constexpr Range expanded (ValueType amount) const noexcept + JUCE_NODISCARD constexpr Range expanded (ValueType amount) const noexcept { return Range (start - amount, end + amount); } @@ -231,21 +231,21 @@ public: /** Returns the range that is the intersection of the two ranges, or an empty range with an undefined start position if they don't overlap. */ - constexpr Range getIntersectionWith (Range other) const noexcept + JUCE_NODISCARD constexpr Range getIntersectionWith (Range other) const noexcept { return Range (jmax (start, other.start), jmin (end, other.end)); } /** Returns the smallest range that contains both this one and the other one. */ - constexpr Range getUnionWith (Range other) const noexcept + JUCE_NODISCARD constexpr Range getUnionWith (Range other) const noexcept { return Range (jmin (start, other.start), jmax (end, other.end)); } /** Returns the smallest range that contains both this one and the given value. */ - constexpr Range getUnionWith (const ValueType valueToInclude) const noexcept + JUCE_NODISCARD constexpr Range getUnionWith (const ValueType valueToInclude) const noexcept { return Range (jmin (valueToInclude, start), jmax (valueToInclude, end)); diff --git a/modules/juce_core/native/juce_BasicNativeHeaders.h b/modules/juce_core/native/juce_BasicNativeHeaders.h index d524214b..acf7d041 100644 --- a/modules/juce_core/native/juce_BasicNativeHeaders.h +++ b/modules/juce_core/native/juce_BasicNativeHeaders.h @@ -154,7 +154,18 @@ #include #include #include + + #if ! JUCE_CXX17_IS_AVAILABLE + #pragma push_macro ("WIN_NOEXCEPT") + #define WIN_NOEXCEPT + #endif + #include + + #if ! JUCE_CXX17_IS_AVAILABLE + #pragma pop_macro ("WIN_NOEXCEPT") + #endif + #include #include #include diff --git a/modules/juce_core/native/juce_posix_NamedPipe.cpp b/modules/juce_core/native/juce_posix_NamedPipe.cpp index 5af501ce..0e6e6783 100644 --- a/modules/juce_core/native/juce_posix_NamedPipe.cpp +++ b/modules/juce_core/native/juce_posix_NamedPipe.cpp @@ -39,8 +39,8 @@ public: ~Pimpl() { - if (pipeIn != -1) ::close (pipeIn); - if (pipeOut != -1) ::close (pipeOut); + pipeIn .close(); + pipeOut.close(); if (createdPipe) { @@ -51,7 +51,7 @@ public: bool connect (int timeOutMilliseconds) { - return openPipe (true, getTimeoutEnd (timeOutMilliseconds)); + return openPipe (true, getTimeoutEnd (timeOutMilliseconds)) != invalidPipe; } int read (char* destBuffer, int maxBytesToRead, int timeOutMilliseconds) @@ -61,8 +61,10 @@ public: while (bytesRead < maxBytesToRead) { + const auto pipe = pipeIn.get(); + auto bytesThisTime = maxBytesToRead - bytesRead; - auto numRead = (int) ::read (pipeIn, destBuffer, (size_t) bytesThisTime); + auto numRead = (int) ::read (pipe, destBuffer, (size_t) bytesThisTime); if (numRead <= 0) { @@ -72,9 +74,9 @@ public: return -1; const int maxWaitingTime = 30; - waitForInput (pipeIn, timeoutEnd == 0 ? maxWaitingTime - : jmin (maxWaitingTime, - (int) (timeoutEnd - Time::getMillisecondCounter()))); + waitForInput (pipe, timeoutEnd == 0 ? maxWaitingTime + : jmin (maxWaitingTime, + (int) (timeoutEnd - Time::getMillisecondCounter()))); continue; } @@ -89,7 +91,9 @@ public: { auto timeoutEnd = getTimeoutEnd (timeOutMilliseconds); - if (! openPipe (false, timeoutEnd)) + const auto pipe = openPipe (false, timeoutEnd); + + if (pipe == invalidPipe) return -1; int bytesWritten = 0; @@ -97,7 +101,7 @@ public: while (bytesWritten < numBytesToWrite && ! hasExpired (timeoutEnd)) { auto bytesThisTime = numBytesToWrite - bytesWritten; - auto numWritten = (int) ::write (pipeOut, sourceBuffer, (size_t) bytesThisTime); + auto numWritten = (int) ::write (pipe, sourceBuffer, (size_t) bytesThisTime); if (numWritten < 0) { @@ -105,9 +109,9 @@ public: const int maxWaitingTime = 30; if (error == EWOULDBLOCK || error == EAGAIN) - waitToWrite (pipeOut, timeoutEnd == 0 ? maxWaitingTime - : jmin (maxWaitingTime, - (int) (timeoutEnd - Time::getMillisecondCounter()))); + waitToWrite (pipe, timeoutEnd == 0 ? maxWaitingTime + : jmin (maxWaitingTime, + (int) (timeoutEnd - Time::getMillisecondCounter()))); else return -1; @@ -134,8 +138,52 @@ public: return createdFifoIn && createdFifoOut; } + static constexpr auto invalidPipe = -1; + + class PipeDescriptor + { + public: + template + int get (Fn&& fn) + { + { + const ScopedReadLock l (mutex); + + if (descriptor != invalidPipe) + return descriptor; + } + + const ScopedWriteLock l (mutex); + return descriptor = fn(); + } + + void close() + { + { + const ScopedReadLock l (mutex); + + if (descriptor == invalidPipe) + return; + } + + const ScopedWriteLock l (mutex); + ::close (descriptor); + descriptor = invalidPipe; + } + + int get() + { + const ScopedReadLock l (mutex); + return descriptor; + } + + private: + ReadWriteLock mutex; + int descriptor = invalidPipe; + }; + const String pipeInName, pipeOutName; - int pipeIn = -1, pipeOut = -1; + PipeDescriptor pipeIn, pipeOut; bool createdFifoIn = false, createdFifoOut = false; const bool createdPipe; @@ -160,30 +208,25 @@ private: { auto p = ::open (name.toUTF8(), flags); - if (p != -1 || hasExpired (timeoutEnd) || stopReadOperation.load()) + if (p != invalidPipe || hasExpired (timeoutEnd) || stopReadOperation.load()) return p; Thread::sleep (2); } } - bool openPipe (bool isInput, uint32 timeoutEnd) + int openPipe (bool isInput, uint32 timeoutEnd) { auto& pipe = isInput ? pipeIn : pipeOut; - int flags = (isInput ? O_RDWR : O_WRONLY) | O_NONBLOCK; + const auto flags = (isInput ? O_RDWR : O_WRONLY) | O_NONBLOCK; const String& pipeName = isInput ? (createdPipe ? pipeInName : pipeOutName) : (createdPipe ? pipeOutName : pipeInName); - if (pipe == -1) + return pipe.get ([this, &pipeName, &flags, &timeoutEnd] { - pipe = openPipe (pipeName, flags, timeoutEnd); - - if (pipe == -1) - return false; - } - - return true; + return openPipe (pipeName, flags, timeoutEnd); + }); } static void waitForInput (int handle, int timeoutMsecs) noexcept @@ -203,23 +246,18 @@ private: void NamedPipe::close() { - { - ScopedReadLock sl (lock); + ScopedWriteLock sl (lock); - if (pimpl != nullptr) - { - pimpl->stopReadOperation = true; + if (pimpl != nullptr) + { + pimpl->stopReadOperation = true; - char buffer[1] = { 0 }; - ssize_t done = ::write (pimpl->pipeIn, buffer, 1); - ignoreUnused (done); - } + const char buffer[] { 0 }; + const auto done = ::write (pimpl->pipeIn.get(), buffer, numElementsInArray (buffer)); + ignoreUnused (done); } - { - ScopedWriteLock sl (lock); - pimpl.reset(); - } + pimpl.reset(); } bool NamedPipe::openInternal (const String& pipeName, bool createPipe, bool mustNotExist) diff --git a/modules/juce_core/native/juce_win32_Files.cpp b/modules/juce_core/native/juce_win32_Files.cpp index b9628eb1..b8ab52ca 100644 --- a/modules/juce_core/native/juce_win32_Files.cpp +++ b/modules/juce_core/native/juce_win32_Files.cpp @@ -618,17 +618,18 @@ File JUCE_CALLTYPE File::getSpecialLocation (const SpecialLocationType type) switch (type) { - case userHomeDirectory: csidlType = CSIDL_PROFILE; break; - case userDocumentsDirectory: csidlType = CSIDL_PERSONAL; break; - case userDesktopDirectory: csidlType = CSIDL_DESKTOP; break; - case userApplicationDataDirectory: csidlType = CSIDL_APPDATA; break; - case commonApplicationDataDirectory: csidlType = CSIDL_COMMON_APPDATA; break; - case commonDocumentsDirectory: csidlType = CSIDL_COMMON_DOCUMENTS; break; - case globalApplicationsDirectory: csidlType = CSIDL_PROGRAM_FILES; break; - case globalApplicationsDirectoryX86: csidlType = CSIDL_PROGRAM_FILESX86; break; - case userMusicDirectory: csidlType = 0x0d; /*CSIDL_MYMUSIC*/ break; - case userMoviesDirectory: csidlType = 0x0e; /*CSIDL_MYVIDEO*/ break; - case userPicturesDirectory: csidlType = 0x27; /*CSIDL_MYPICTURES*/ break; + case userHomeDirectory: csidlType = CSIDL_PROFILE; break; + case userDocumentsDirectory: csidlType = CSIDL_PERSONAL; break; + case userDesktopDirectory: csidlType = CSIDL_DESKTOP; break; + case userApplicationDataDirectory: csidlType = CSIDL_APPDATA; break; + case commonApplicationDataDirectory: csidlType = CSIDL_COMMON_APPDATA; break; + case commonDocumentsDirectory: csidlType = CSIDL_COMMON_DOCUMENTS; break; + case globalApplicationsDirectory: csidlType = CSIDL_PROGRAM_FILES; break; + case globalApplicationsDirectoryX86: csidlType = CSIDL_PROGRAM_FILESX86; break; + case windowsLocalAppData: csidlType = CSIDL_LOCAL_APPDATA; break; + case userMusicDirectory: csidlType = 0x0d; /*CSIDL_MYMUSIC*/ break; + case userMoviesDirectory: csidlType = 0x0e; /*CSIDL_MYVIDEO*/ break; + case userPicturesDirectory: csidlType = 0x27; /*CSIDL_MYPICTURES*/ break; case tempDirectory: { diff --git a/modules/juce_core/network/juce_URL.h b/modules/juce_core/network/juce_URL.h index 2623bb97..7908ed26 100644 --- a/modules/juce_core/network/juce_URL.h +++ b/modules/juce_core/network/juce_URL.h @@ -147,7 +147,7 @@ public: @see withNewSubPath */ - URL withNewDomainAndPath (const String& newFullPath) const; + JUCE_NODISCARD URL withNewDomainAndPath (const String& newFullPath) const; /** Returns a new version of this URL with a different sub-path. @@ -156,7 +156,7 @@ public: @see withNewDomainAndPath */ - URL withNewSubPath (const String& newPath) const; + JUCE_NODISCARD URL withNewSubPath (const String& newPath) const; /** Attempts to return a URL which is the parent folder containing this URL. @@ -189,8 +189,8 @@ public: @see getParameterNames, getParameterValues */ - URL withParameter (const String& parameterName, - const String& parameterValue) const; + JUCE_NODISCARD URL withParameter (const String& parameterName, + const String& parameterValue) const; /** Returns a copy of this URL, with a set of GET or POST parameters added. @@ -198,7 +198,7 @@ public: @see withParameter */ - URL withParameters (const StringPairArray& parametersToAdd) const; + JUCE_NODISCARD URL withParameters (const StringPairArray& parametersToAdd) const; /** Returns a copy of this URL, with a file-upload type parameter added to it. @@ -211,9 +211,9 @@ public: @see withDataToUpload */ - URL withFileToUpload (const String& parameterName, - const File& fileToUpload, - const String& mimeType) const; + JUCE_NODISCARD URL withFileToUpload (const String& parameterName, + const File& fileToUpload, + const String& mimeType) const; /** Returns a copy of this URL, with a file-upload type parameter added to it. @@ -225,10 +225,10 @@ public: @see withFileToUpload */ - URL withDataToUpload (const String& parameterName, - const String& filename, - const MemoryBlock& fileContentToUpload, - const String& mimeType) const; + JUCE_NODISCARD URL withDataToUpload (const String& parameterName, + const String& filename, + const MemoryBlock& fileContentToUpload, + const String& mimeType) const; /** Returns an array of the names of all the URL's parameters. @@ -264,7 +264,7 @@ public: If no HTTP command is set when calling createInputStream() to read from this URL and some data has been set, it will do a POST request. */ - URL withPOSTData (const String& postData) const; + JUCE_NODISCARD URL withPOSTData (const String& postData) const; /** Returns a copy of this URL, with a block of data to send as the POST data. @@ -274,7 +274,7 @@ public: If no HTTP command is set when calling createInputStream() to read from this URL and some data has been set, it will do a POST request. */ - URL withPOSTData (const MemoryBlock& postData) const; + JUCE_NODISCARD URL withPOSTData (const MemoryBlock& postData) const; /** Returns the data that was set using withPOSTData(). */ String getPostData() const { return postData.toString(); } @@ -337,36 +337,36 @@ public: This can be useful for lengthy POST operations, so that you can provide user feedback. */ - InputStreamOptions withProgressCallback (std::function progressCallback) const; + JUCE_NODISCARD InputStreamOptions withProgressCallback (std::function progressCallback) const; /** A string that will be appended onto the headers that are used for the request. It must be a valid set of HTML header directives, separated by newlines. */ - InputStreamOptions withExtraHeaders (const String& extraHeaders) const; + JUCE_NODISCARD InputStreamOptions withExtraHeaders (const String& extraHeaders) const; /** Specifies a timeout for the request in milliseconds. If 0, this will use whatever default setting the OS chooses. If a negative number, it will be infinite. */ - InputStreamOptions withConnectionTimeoutMs (int connectionTimeoutMs) const; + JUCE_NODISCARD InputStreamOptions withConnectionTimeoutMs (int connectionTimeoutMs) const; /** If this is non-null, all the (key, value) pairs received as headers in the response will be stored in this array. */ - InputStreamOptions withResponseHeaders (StringPairArray* responseHeaders) const; + JUCE_NODISCARD InputStreamOptions withResponseHeaders (StringPairArray* responseHeaders) const; /** If this is non-null, it will get set to the http status code, if one is known, or 0 if a code isn't available. */ - InputStreamOptions withStatusCode (int* statusCode) const; + JUCE_NODISCARD InputStreamOptions withStatusCode (int* statusCode) const; /** Specifies the number of redirects that will be followed before returning a response. N.B. This will be ignored on Android which follows up to 5 redirects. */ - InputStreamOptions withNumRedirectsToFollow (int numRedirectsToFollow) const; + JUCE_NODISCARD InputStreamOptions withNumRedirectsToFollow (int numRedirectsToFollow) const; /** Specifies which HTTP request command to use. @@ -375,7 +375,7 @@ public: via withPOSTData(), withFileToUpload(), or withDataToUpload(). Otherwise it will be GET. */ - InputStreamOptions withHttpRequestCmd (const String& httpRequestCmd) const; + JUCE_NODISCARD InputStreamOptions withHttpRequestCmd (const String& httpRequestCmd) const; //============================================================================== ParameterHandling getParameterHandling() const noexcept { return parameterHandling; } @@ -459,7 +459,7 @@ public: bool usePost = false; /** Specifies headers to add to the request. */ - auto withExtraHeaders (String value) const { return with (&DownloadTaskOptions::extraHeaders, std::move (value)); } + JUCE_NODISCARD auto withExtraHeaders (String value) const { return with (&DownloadTaskOptions::extraHeaders, std::move (value)); } /** On iOS, specifies the container where the downloaded file will be stored. @@ -468,17 +468,17 @@ public: This is currently unused on other platforms. */ - auto withSharedContainer (String value) const { return with (&DownloadTaskOptions::sharedContainer, std::move (value)); } + JUCE_NODISCARD auto withSharedContainer (String value) const { return with (&DownloadTaskOptions::sharedContainer, std::move (value)); } /** Specifies an observer for the download task. */ - auto withListener (DownloadTaskListener* value) const { return with (&DownloadTaskOptions::listener, std::move (value)); } + JUCE_NODISCARD auto withListener (DownloadTaskListener* value) const { return with (&DownloadTaskOptions::listener, std::move (value)); } /** Specifies whether a post command should be used. */ - auto withUsePost (bool value) const { return with (&DownloadTaskOptions::usePost, value); } + JUCE_NODISCARD auto withUsePost (bool value) const { return with (&DownloadTaskOptions::usePost, value); } private: template - DownloadTaskOptions with (Member&& member, Value&& value) const + JUCE_NODISCARD DownloadTaskOptions with (Member&& member, Value&& value) const { auto copy = *this; copy.*member = std::forward (value); diff --git a/modules/juce_core/system/juce_CompilerSupport.h b/modules/juce_core/system/juce_CompilerSupport.h index 72e889a8..7fd571e4 100644 --- a/modules/juce_core/system/juce_CompilerSupport.h +++ b/modules/juce_core/system/juce_CompilerSupport.h @@ -101,3 +101,9 @@ #define JUCE_DELETED_FUNCTION = delete #define JUCE_CONSTEXPR constexpr #endif + +#if JUCE_CXX17_IS_AVAILABLE + #define JUCE_NODISCARD [[nodiscard]] +#else + #define JUCE_NODISCARD +#endif diff --git a/modules/juce_core/system/juce_StandardHeader.h b/modules/juce_core/system/juce_StandardHeader.h index 919c864b..fe164cdd 100644 --- a/modules/juce_core/system/juce_StandardHeader.h +++ b/modules/juce_core/system/juce_StandardHeader.h @@ -29,7 +29,7 @@ */ #define JUCE_MAJOR_VERSION 6 #define JUCE_MINOR_VERSION 1 -#define JUCE_BUILDNUMBER 5 +#define JUCE_BUILDNUMBER 6 /** Current JUCE version number. @@ -55,13 +55,14 @@ #include #include #include -#include #include #include #include #include +#include #include #include +#include #include #include #include diff --git a/modules/juce_core/text/juce_CharacterFunctions.h b/modules/juce_core/text/juce_CharacterFunctions.h index f89dc611..764417e6 100644 --- a/modules/juce_core/text/juce_CharacterFunctions.h +++ b/modules/juce_core/text/juce_CharacterFunctions.h @@ -500,10 +500,10 @@ public: while (! t.isEmpty()) { - auto hexValue = static_cast (CharacterFunctions::getHexDigitValue (t.getAndAdvance())); + auto hexValue = CharacterFunctions::getHexDigitValue (t.getAndAdvance()); if (hexValue >= 0) - result = static_cast (result << 4) | hexValue; + result = static_cast (result << 4) | static_cast (hexValue); } return result; diff --git a/modules/juce_core/text/juce_String.cpp b/modules/juce_core/text/juce_String.cpp index b2102bb6..8a00e283 100644 --- a/modules/juce_core/text/juce_String.cpp +++ b/modules/juce_core/text/juce_String.cpp @@ -2467,6 +2467,9 @@ public: expect (String (StringRef ("abc")) == StringRef ("abc")); expect (String ("abc") + StringRef ("def") == "abcdef"); + expect (String ("0x00").getHexValue32() == 0); + expect (String ("0x100").getHexValue32() == 256); + String s2 ("123"); s2 << ((int) 4) << ((short) 5) << "678" << L"9" << '0'; s2 += "xyz"; diff --git a/modules/juce_core/xml/juce_XmlElement.h b/modules/juce_core/xml/juce_XmlElement.h index 109ea384..1a42f072 100644 --- a/modules/juce_core/xml/juce_XmlElement.h +++ b/modules/juce_core/xml/juce_XmlElement.h @@ -144,8 +144,8 @@ public: int lineWrapLength = 60; /**< A maximum line length before wrapping is done. (If newLineChars is nullptr, this is ignored) */ const char* newLineChars = "\r\n"; /**< Allows the newline characters to be set. If you set this to nullptr, then the whole XML document will be placed on a single line. */ - TextFormat singleLine() const; /**< returns a copy of this format with newLineChars set to nullptr. */ - TextFormat withoutHeader() const; /**< returns a copy of this format with the addDefaultHeader flag set to false. */ + JUCE_NODISCARD TextFormat singleLine() const; /**< returns a copy of this format with newLineChars set to nullptr. */ + JUCE_NODISCARD TextFormat withoutHeader() const; /**< returns a copy of this format with the addDefaultHeader flag set to false. */ }; /** Returns a text version of this XML element. diff --git a/modules/juce_cryptography/encryption/juce_RSAKey.cpp b/modules/juce_cryptography/encryption/juce_RSAKey.cpp index e79cf4e9..2090f812 100644 --- a/modules/juce_cryptography/encryption/juce_RSAKey.cpp +++ b/modules/juce_cryptography/encryption/juce_RSAKey.cpp @@ -44,10 +44,6 @@ RSAKey::RSAKey (const String& s) } } -RSAKey::~RSAKey() -{ -} - bool RSAKey::operator== (const RSAKey& other) const noexcept { return part1 == other.part1 && part2 == other.part2; diff --git a/modules/juce_cryptography/encryption/juce_RSAKey.h b/modules/juce_cryptography/encryption/juce_RSAKey.h index 1d9eedb8..ed8d3fdf 100644 --- a/modules/juce_cryptography/encryption/juce_RSAKey.h +++ b/modules/juce_cryptography/encryption/juce_RSAKey.h @@ -107,9 +107,6 @@ public: */ explicit RSAKey (const String& stringRepresentation); - /** Destructor. */ - ~RSAKey(); - bool operator== (const RSAKey& other) const noexcept; bool operator!= (const RSAKey& other) const noexcept; diff --git a/modules/juce_cryptography/juce_cryptography.h b/modules/juce_cryptography/juce_cryptography.h index 794d2b99..f9bf9c51 100644 --- a/modules/juce_cryptography/juce_cryptography.h +++ b/modules/juce_cryptography/juce_cryptography.h @@ -35,7 +35,7 @@ ID: juce_cryptography vendor: juce - version: 6.1.5 + version: 6.1.6 name: JUCE cryptography classes description: Classes for various basic cryptography functions, including RSA, Blowfish, MD5, SHA, etc. website: http://www.juce.com/juce diff --git a/modules/juce_data_structures/juce_data_structures.h b/modules/juce_data_structures/juce_data_structures.h index 1017ca5a..1e86e71b 100644 --- a/modules/juce_data_structures/juce_data_structures.h +++ b/modules/juce_data_structures/juce_data_structures.h @@ -35,7 +35,7 @@ ID: juce_data_structures vendor: juce - version: 6.1.5 + version: 6.1.6 name: JUCE data model helper classes description: Classes for undo/redo management, and smart data structures. website: http://www.juce.com/juce diff --git a/modules/juce_dsp/containers/juce_AudioBlock.h b/modules/juce_dsp/containers/juce_AudioBlock.h index 7fa027e5..9f4dd847 100644 --- a/modules/juce_dsp/containers/juce_AudioBlock.h +++ b/modules/juce_dsp/containers/juce_AudioBlock.h @@ -341,12 +341,11 @@ public: size_t numElements = std::numeric_limits::max()) const { auto dstlen = static_cast (dst.getNumSamples()) / sizeFactor; - auto n = static_cast (jmin (numSamples - srcPos, dstlen - dstPos, numElements) * sizeFactor); + auto n = jmin (numSamples - srcPos, dstlen - dstPos, numElements) * sizeFactor; auto maxChannels = jmin (static_cast (dst.getNumChannels()), static_cast (numChannels)); for (size_t ch = 0; ch < maxChannels; ++ch) - FloatVectorOperations::copy (dst.getWritePointer (static_cast (ch), - static_cast (dstPos * sizeFactor)), + FloatVectorOperations::copy (dst.getWritePointer ((int) ch, (int) (dstPos * sizeFactor)), getDataPointer (ch) + (srcPos * sizeFactor), n); } @@ -524,7 +523,7 @@ public: if (numChannels == 0) return {}; - auto n = static_cast (numSamples * sizeFactor); + auto n = numSamples * sizeFactor; auto minmax = FloatVectorOperations::findMinAndMax (getDataPointer (0), n); for (size_t ch = 1; ch < numChannels; ++ch) @@ -601,7 +600,7 @@ private: //============================================================================== void JUCE_VECTOR_CALLTYPE clearInternal() const noexcept { - auto n = static_cast (numSamples * sizeFactor); + auto n = numSamples * sizeFactor; for (size_t ch = 0; ch < numChannels; ++ch) FloatVectorOperations::clear (getDataPointer (ch), n); @@ -609,7 +608,7 @@ private: void JUCE_VECTOR_CALLTYPE fillInternal (NumericType value) const noexcept { - auto n = static_cast (numSamples * sizeFactor); + auto n = numSamples * sizeFactor; for (size_t ch = 0; ch < numChannels; ++ch) FloatVectorOperations::fill (getDataPointer (ch), value, n); @@ -619,8 +618,7 @@ private: void copyFromInternal (const AudioBlock& src) const noexcept { auto maxChannels = jmin (src.numChannels, numChannels); - auto n = static_cast (jmin (src.numSamples * src.sizeFactor, - numSamples * sizeFactor)); + auto n = jmin (src.numSamples * src.sizeFactor, numSamples * sizeFactor); for (size_t ch = 0; ch < maxChannels; ++ch) FloatVectorOperations::copy (getDataPointer (ch), src.getDataPointer (ch), n); @@ -630,13 +628,12 @@ private: void copyFromInternal (const AudioBuffer& src, size_t srcPos, size_t dstPos, size_t numElements) const { auto srclen = static_cast (src.getNumSamples()) / sizeFactor; - auto n = static_cast (jmin (srclen - srcPos, numSamples - dstPos, numElements) * sizeFactor); + auto n = jmin (srclen - srcPos, numSamples - dstPos, numElements) * sizeFactor; auto maxChannels = jmin (static_cast (src.getNumChannels()), static_cast (numChannels)); for (size_t ch = 0; ch < maxChannels; ++ch) FloatVectorOperations::copy (getDataPointer (ch) + (dstPos * sizeFactor), - src.getReadPointer (static_cast (ch), - static_cast (srcPos * sizeFactor)), + src.getReadPointer ((int) ch, (int) (srcPos * sizeFactor)), n); } @@ -655,7 +652,7 @@ private: //============================================================================== void JUCE_VECTOR_CALLTYPE addInternal (NumericType value) const noexcept { - auto n = static_cast (numSamples * sizeFactor); + auto n = numSamples * sizeFactor; for (size_t ch = 0; ch < numChannels; ++ch) FloatVectorOperations::add (getDataPointer (ch), value, n); @@ -665,7 +662,7 @@ private: void addInternal (AudioBlock src) const noexcept { jassert (numChannels == src.numChannels); - auto n = static_cast (jmin (numSamples, src.numSamples) * sizeFactor); + auto n = jmin (numSamples, src.numSamples) * sizeFactor; for (size_t ch = 0; ch < numChannels; ++ch) FloatVectorOperations::add (getDataPointer (ch), src.getDataPointer (ch), n); @@ -675,7 +672,7 @@ private: void JUCE_VECTOR_CALLTYPE replaceWithSumOfInternal (AudioBlock src, NumericType value) const noexcept { jassert (numChannels == src.numChannels); - auto n = static_cast (jmin (numSamples, src.numSamples) * sizeFactor); + auto n = jmin (numSamples, src.numSamples) * sizeFactor; for (size_t ch = 0; ch < numChannels; ++ch) FloatVectorOperations::add (getDataPointer (ch), src.getDataPointer (ch), value, n); @@ -685,7 +682,7 @@ private: void replaceWithSumOfInternal (AudioBlock src1, AudioBlock src2) const noexcept { jassert (numChannels == src1.numChannels && src1.numChannels == src2.numChannels); - auto n = static_cast (jmin (numSamples, src1.numSamples, src2.numSamples) * sizeFactor); + auto n = jmin (numSamples, src1.numSamples, src2.numSamples) * sizeFactor; for (size_t ch = 0; ch < numChannels; ++ch) FloatVectorOperations::add (getDataPointer (ch), src1.getDataPointer (ch), src2.getDataPointer (ch), n); @@ -701,7 +698,7 @@ private: void subtractInternal (AudioBlock src) const noexcept { jassert (numChannels == src.numChannels); - auto n = static_cast (jmin (numSamples, src.numSamples) * sizeFactor); + auto n = jmin (numSamples, src.numSamples) * sizeFactor; for (size_t ch = 0; ch < numChannels; ++ch) FloatVectorOperations::subtract (getDataPointer (ch), src.getDataPointer (ch), n); @@ -717,7 +714,7 @@ private: void replaceWithDifferenceOfInternal (AudioBlock src1, AudioBlock src2) const noexcept { jassert (numChannels == src1.numChannels && src1.numChannels == src2.numChannels); - auto n = static_cast (jmin (numSamples, src1.numSamples, src2.numSamples) * sizeFactor); + auto n = jmin (numSamples, src1.numSamples, src2.numSamples) * sizeFactor; for (size_t ch = 0; ch < numChannels; ++ch) FloatVectorOperations::subtract (getDataPointer (ch), src1.getDataPointer (ch), src2.getDataPointer (ch), n); @@ -726,7 +723,7 @@ private: //============================================================================== void JUCE_VECTOR_CALLTYPE multiplyByInternal (NumericType value) const noexcept { - auto n = static_cast (numSamples * sizeFactor); + auto n = numSamples * sizeFactor; for (size_t ch = 0; ch < numChannels; ++ch) FloatVectorOperations::multiply (getDataPointer (ch), value, n); @@ -736,7 +733,7 @@ private: void multiplyByInternal (AudioBlock src) const noexcept { jassert (numChannels == src.numChannels); - auto n = static_cast (jmin (numSamples, src.numSamples) * sizeFactor); + auto n = jmin (numSamples, src.numSamples) * sizeFactor; for (size_t ch = 0; ch < numChannels; ++ch) FloatVectorOperations::multiply (getDataPointer (ch), src.getDataPointer (ch), n); @@ -746,7 +743,7 @@ private: void JUCE_VECTOR_CALLTYPE replaceWithProductOfInternal (AudioBlock src, NumericType value) const noexcept { jassert (numChannels == src.numChannels); - auto n = static_cast (jmin (numSamples, src.numSamples) * sizeFactor); + auto n = jmin (numSamples, src.numSamples) * sizeFactor; for (size_t ch = 0; ch < numChannels; ++ch) FloatVectorOperations::multiply (getDataPointer (ch), src.getDataPointer (ch), value, n); @@ -756,7 +753,7 @@ private: void replaceWithProductOfInternal (AudioBlock src1, AudioBlock src2) const noexcept { jassert (numChannels == src1.numChannels && src1.numChannels == src2.numChannels); - auto n = static_cast (jmin (numSamples, src1.numSamples, src2.numSamples) * sizeFactor); + auto n = jmin (numSamples, src1.numSamples, src2.numSamples) * sizeFactor; for (size_t ch = 0; ch < numChannels; ++ch) FloatVectorOperations::multiply (getDataPointer (ch), src1.getDataPointer (ch), src2.getDataPointer (ch), n); @@ -809,7 +806,7 @@ private: void JUCE_VECTOR_CALLTYPE addProductOfInternal (AudioBlock src, NumericType factor) const noexcept { jassert (numChannels == src.numChannels); - auto n = static_cast (jmin (numSamples, src.numSamples) * sizeFactor); + auto n = jmin (numSamples, src.numSamples) * sizeFactor; for (size_t ch = 0; ch < numChannels; ++ch) FloatVectorOperations::addWithMultiply (getDataPointer (ch), src.getDataPointer (ch), factor, n); @@ -819,7 +816,7 @@ private: void addProductOfInternal (AudioBlock src1, AudioBlock src2) const noexcept { jassert (numChannels == src1.numChannels && src1.numChannels == src2.numChannels); - auto n = static_cast (jmin (numSamples, src1.numSamples, src2.numSamples) * sizeFactor); + auto n = jmin (numSamples, src1.numSamples, src2.numSamples) * sizeFactor; for (size_t ch = 0; ch < numChannels; ++ch) FloatVectorOperations::addWithMultiply (getDataPointer (ch), src1.getDataPointer (ch), src2.getDataPointer (ch), n); @@ -835,7 +832,7 @@ private: void replaceWithNegativeOfInternal (AudioBlock src) const noexcept { jassert (numChannels == src.numChannels); - auto n = static_cast (jmin (numSamples, src.numSamples) * sizeFactor); + auto n = jmin (numSamples, src.numSamples) * sizeFactor; for (size_t ch = 0; ch < numChannels; ++ch) FloatVectorOperations::negate (getDataPointer (ch), src.getDataPointer (ch), n); @@ -845,7 +842,7 @@ private: void replaceWithAbsoluteValueOfInternal (AudioBlock src) const noexcept { jassert (numChannels == src.numChannels); - auto n = static_cast (jmin (numSamples, src.numSamples) * sizeFactor); + auto n = jmin (numSamples, src.numSamples) * sizeFactor; for (size_t ch = 0; ch < numChannels; ++ch) FloatVectorOperations::abs (getDataPointer (ch), src.getDataPointer (ch), n); @@ -856,7 +853,7 @@ private: void replaceWithMinOfInternal (AudioBlock src1, AudioBlock src2) const noexcept { jassert (numChannels == src1.numChannels && src1.numChannels == src2.numChannels); - auto n = static_cast (jmin (src1.numSamples, src2.numSamples, numSamples) * sizeFactor); + auto n = jmin (src1.numSamples, src2.numSamples, numSamples) * sizeFactor; for (size_t ch = 0; ch < numChannels; ++ch) FloatVectorOperations::min (getDataPointer (ch), src1.getDataPointer (ch), src2.getDataPointer (ch), n); @@ -866,7 +863,7 @@ private: void replaceWithMaxOfInternal (AudioBlock src1, AudioBlock src2) const noexcept { jassert (numChannels == src1.numChannels && src1.numChannels == src2.numChannels); - auto n = static_cast (jmin (src1.numSamples, src2.numSamples, numSamples) * sizeFactor); + auto n = jmin (src1.numSamples, src2.numSamples, numSamples) * sizeFactor; for (size_t ch = 0; ch < numChannels; ++ch) FloatVectorOperations::max (getDataPointer (ch), src1.getDataPointer (ch), src2.getDataPointer (ch), n); diff --git a/modules/juce_dsp/containers/juce_FixedSizeFunction_test.cpp b/modules/juce_dsp/containers/juce_FixedSizeFunction_test.cpp index e0b7ac43..acb17f4f 100644 --- a/modules/juce_dsp/containers/juce_FixedSizeFunction_test.cpp +++ b/modules/juce_dsp/containers/juce_FixedSizeFunction_test.cpp @@ -204,6 +204,9 @@ public: throw std::runtime_error { "this was meant to happen" }; } + BadConstructor (const BadConstructor&) = default; + BadConstructor& operator= (const BadConstructor&) = delete; + ~BadConstructor() noexcept { counts.destructions += 1; } void operator()() const noexcept { counts.calls += 1; } diff --git a/modules/juce_dsp/containers/juce_SIMDRegister_Impl.h b/modules/juce_dsp/containers/juce_SIMDRegister_Impl.h index 8b0d1a1b..7b0178ba 100644 --- a/modules/juce_dsp/containers/juce_SIMDRegister_Impl.h +++ b/modules/juce_dsp/containers/juce_SIMDRegister_Impl.h @@ -33,9 +33,10 @@ namespace dsp template struct SIMDRegister::ElementAccess { - operator Type() const { return simd.get (idx); } - ElementAccess& operator= (Type scalar) noexcept { simd.set (idx, scalar); return *this; } - ElementAccess& operator= (ElementAccess& o) noexcept { return operator= ((Type) o); } + ElementAccess (const ElementAccess&) = default; + operator Type() const { return simd.get (idx); } + ElementAccess& operator= (Type scalar) noexcept { simd.set (idx, scalar); return *this; } + ElementAccess& operator= (const ElementAccess& o) noexcept { return operator= ((Type) o); } private: friend struct SIMDRegister; diff --git a/modules/juce_dsp/juce_dsp.h b/modules/juce_dsp/juce_dsp.h index 7d7ff801..2c7a3748 100644 --- a/modules/juce_dsp/juce_dsp.h +++ b/modules/juce_dsp/juce_dsp.h @@ -35,7 +35,7 @@ ID: juce_dsp vendor: juce - version: 6.1.5 + version: 6.1.6 name: JUCE DSP classes description: Classes for audio buffer manipulation, digital audio processing, filtering, oversampling, fast math functions etc. website: http://www.juce.com/juce diff --git a/modules/juce_dsp/processors/juce_ProcessContext.h b/modules/juce_dsp/processors/juce_ProcessContext.h index bb170646..1a00fcff 100644 --- a/modules/juce_dsp/processors/juce_ProcessContext.h +++ b/modules/juce_dsp/processors/juce_ProcessContext.h @@ -146,7 +146,7 @@ public: using AudioBlockType = AudioBlock; using ConstAudioBlockType = AudioBlock; - /** Creates a ProcessContextReplacing that uses the given input and output blocks. + /** Creates a ProcessContextNonReplacing that uses the given input and output blocks. Note that the caller must not delete these blocks while they are still in use by this object! */ ProcessContextNonReplacing (const ConstAudioBlockType& input, AudioBlockType& output) noexcept diff --git a/modules/juce_events/broadcasters/juce_ChangeBroadcaster.h b/modules/juce_events/broadcasters/juce_ChangeBroadcaster.h index bf97413d..9e8b03ca 100644 --- a/modules/juce_events/broadcasters/juce_ChangeBroadcaster.h +++ b/modules/juce_events/broadcasters/juce_ChangeBroadcaster.h @@ -86,6 +86,7 @@ private: { public: ChangeBroadcasterCallback(); + ~ChangeBroadcasterCallback() override { cancelPendingUpdate(); } void handleAsyncUpdate() override; ChangeBroadcaster* owner; diff --git a/modules/juce_events/interprocess/juce_ConnectedChildProcess.cpp b/modules/juce_events/interprocess/juce_ConnectedChildProcess.cpp index 731d9ad6..3623c064 100644 --- a/modules/juce_events/interprocess/juce_ConnectedChildProcess.cpp +++ b/modules/juce_events/interprocess/juce_ConnectedChildProcess.cpp @@ -51,6 +51,8 @@ struct ChildProcessPingThread : public Thread, pingReceived(); } + void startPinging() { startThread (4); } + void pingReceived() noexcept { countdown = timeoutMs / 1000 + 1; } void triggerConnectionLostMessage() { triggerAsyncUpdate(); } @@ -90,8 +92,7 @@ struct ChildProcessCoordinator::Connection : public InterprocessConnection, ChildProcessPingThread (timeout), owner (m) { - if (createPipe (pipeName, timeoutMs)) - startThread (4); + createPipe (pipeName, timeoutMs); } ~Connection() override @@ -99,6 +100,8 @@ struct ChildProcessCoordinator::Connection : public InterprocessConnection, stopThread (10000); } + using ChildProcessPingThread::startPinging; + private: void connectionMade() override {} void connectionLost() override { owner.handleConnectionLost(); } @@ -198,14 +201,16 @@ struct ChildProcessWorker::Connection : public InterprocessConnection, owner (p) { connectToPipe (pipeName, timeoutMs); - startThread (4); } ~Connection() override { stopThread (10000); + disconnect(); } + using ChildProcessPingThread::startPinging; + private: ChildProcessWorker& owner; @@ -274,7 +279,9 @@ bool ChildProcessWorker::initialiseFromCommandLine (const String& commandLine, { connection.reset (new Connection (*this, pipeName, timeoutMs <= 0 ? defaultTimeoutMs : timeoutMs)); - if (! connection->isConnected()) + if (connection->isConnected()) + connection->startPinging(); + else connection.reset(); } } diff --git a/modules/juce_events/juce_events.h b/modules/juce_events/juce_events.h index 6bff21ae..12594a06 100644 --- a/modules/juce_events/juce_events.h +++ b/modules/juce_events/juce_events.h @@ -32,7 +32,7 @@ ID: juce_events vendor: juce - version: 6.1.5 + version: 6.1.6 name: JUCE message and event handling classes description: Classes for running an application's main event loop and sending/receiving messages, timers, etc. website: http://www.juce.com/juce diff --git a/modules/juce_events/timers/juce_Timer.cpp b/modules/juce_events/timers/juce_Timer.cpp index 52e12919..32c4e12b 100644 --- a/modules/juce_events/timers/juce_Timer.cpp +++ b/modules/juce_events/timers/juce_Timer.cpp @@ -38,6 +38,7 @@ public: ~TimerThread() override { + cancelPendingUpdate(); signalThreadShouldExit(); callbackArrived.signal(); stopThread (4000); diff --git a/modules/juce_graphics/colour/juce_Colour.h b/modules/juce_graphics/colour/juce_Colour.h index b8fb7535..fffa2902 100644 --- a/modules/juce_graphics/colour/juce_Colour.h +++ b/modules/juce_graphics/colour/juce_Colour.h @@ -299,35 +299,35 @@ public: //============================================================================== /** Returns a copy of this colour with a different hue. */ - Colour withHue (float newHue) const noexcept; + JUCE_NODISCARD Colour withHue (float newHue) const noexcept; /** Returns a copy of this colour with a different saturation. */ - Colour withSaturation (float newSaturation) const noexcept; + JUCE_NODISCARD Colour withSaturation (float newSaturation) const noexcept; /** Returns a copy of this colour with a different saturation in the HSL colour space. */ - Colour withSaturationHSL (float newSaturation) const noexcept; + JUCE_NODISCARD Colour withSaturationHSL (float newSaturation) const noexcept; /** Returns a copy of this colour with a different brightness. @see brighter, darker, withMultipliedBrightness */ - Colour withBrightness (float newBrightness) const noexcept; + JUCE_NODISCARD Colour withBrightness (float newBrightness) const noexcept; /** Returns a copy of this colour with a different lightness. @see lighter, darker, withMultipliedLightness */ - Colour withLightness (float newLightness) const noexcept; + JUCE_NODISCARD Colour withLightness (float newLightness) const noexcept; /** Returns a copy of this colour with its hue rotated. The new colour's hue is ((this->getHue() + amountToRotate) % 1.0) @see brighter, darker, withMultipliedBrightness */ - Colour withRotatedHue (float amountToRotate) const noexcept; + JUCE_NODISCARD Colour withRotatedHue (float amountToRotate) const noexcept; /** Returns a copy of this colour with its saturation multiplied by the given value. The new colour's saturation is (this->getSaturation() * multiplier) (the result is clipped to legal limits). */ - Colour withMultipliedSaturation (float multiplier) const noexcept; + JUCE_NODISCARD Colour withMultipliedSaturation (float multiplier) const noexcept; /** Returns a copy of this colour with its saturation multiplied by the given value. The new colour's saturation is (this->getSaturation() * multiplier) @@ -335,19 +335,19 @@ public: This will be in the HSL colour space. */ - Colour withMultipliedSaturationHSL (float multiplier) const noexcept; + JUCE_NODISCARD Colour withMultipliedSaturationHSL (float multiplier) const noexcept; /** Returns a copy of this colour with its brightness multiplied by the given value. The new colour's brightness is (this->getBrightness() * multiplier) (the result is clipped to legal limits). */ - Colour withMultipliedBrightness (float amount) const noexcept; + JUCE_NODISCARD Colour withMultipliedBrightness (float amount) const noexcept; /** Returns a copy of this colour with its lightness multiplied by the given value. The new colour's lightness is (this->lightness() * multiplier) (the result is clipped to legal limits). */ - Colour withMultipliedLightness (float amount) const noexcept; + JUCE_NODISCARD Colour withMultipliedLightness (float amount) const noexcept; //============================================================================== /** Returns a brighter version of this colour. @@ -355,14 +355,14 @@ public: where 0 is unchanged, and higher values make it brighter @see withMultipliedBrightness */ - Colour brighter (float amountBrighter = 0.4f) const noexcept; + JUCE_NODISCARD Colour brighter (float amountBrighter = 0.4f) const noexcept; /** Returns a darker version of this colour. @param amountDarker how much darker to make it - a value greater than or equal to 0, where 0 is unchanged, and higher values make it darker @see withMultipliedBrightness */ - Colour darker (float amountDarker = 0.4f) const noexcept; + JUCE_NODISCARD Colour darker (float amountDarker = 0.4f) const noexcept; //============================================================================== /** Returns a colour that will be clearly visible against this colour. @@ -372,7 +372,7 @@ public: that's just a little bit lighter; Colours::black.contrasting (1.0f) will return white; Colours::white.contrasting (1.0f) will return black, etc. */ - Colour contrasting (float amount = 1.0f) const noexcept; + JUCE_NODISCARD Colour contrasting (float amount = 1.0f) const noexcept; /** Returns a colour that is as close as possible to a target colour whilst still being in contrast to this one. @@ -381,20 +381,20 @@ public: nudged up or down so that it differs from the luminosity of this colour by at least the amount specified by minLuminosityDiff. */ - Colour contrasting (Colour targetColour, float minLuminosityDiff) const noexcept; + JUCE_NODISCARD Colour contrasting (Colour targetColour, float minLuminosityDiff) const noexcept; /** Returns a colour that contrasts against two colours. Looks for a colour that contrasts with both of the colours passed-in. Handy for things like choosing a highlight colour in text editors, etc. */ - static Colour contrasting (Colour colour1, - Colour colour2) noexcept; + JUCE_NODISCARD static Colour contrasting (Colour colour1, + Colour colour2) noexcept; //============================================================================== /** Returns an opaque shade of grey. @param brightness the level of grey to return - 0 is black, 1.0 is white */ - static Colour greyLevel (float brightness) noexcept; + JUCE_NODISCARD static Colour greyLevel (float brightness) noexcept; //============================================================================== /** Returns a stringified version of this colour. @@ -403,7 +403,7 @@ public: String toString() const; /** Reads the colour from a string that was created with toString(). */ - static Colour fromString (StringRef encodedColourString); + JUCE_NODISCARD static Colour fromString (StringRef encodedColourString); /** Returns the colour as a hex string in the form RRGGBB or AARRGGBB. */ String toDisplayString (bool includeAlphaValue) const; diff --git a/modules/juce_graphics/contexts/juce_GraphicsContext.cpp b/modules/juce_graphics/contexts/juce_GraphicsContext.cpp index 0c0e211f..85f098d1 100644 --- a/modules/juce_graphics/contexts/juce_GraphicsContext.cpp +++ b/modules/juce_graphics/contexts/juce_GraphicsContext.cpp @@ -44,10 +44,6 @@ namespace } } -//============================================================================== -LowLevelGraphicsContext::LowLevelGraphicsContext() {} -LowLevelGraphicsContext::~LowLevelGraphicsContext() {} - //============================================================================== Graphics::Graphics (const Image& imageToDrawOnto) : contextHolder (imageToDrawOnto.createLowLevelContext()), @@ -61,10 +57,6 @@ Graphics::Graphics (LowLevelGraphicsContext& internalContext) noexcept { } -Graphics::~Graphics() -{ -} - //============================================================================== void Graphics::resetToDefaultState() { diff --git a/modules/juce_graphics/contexts/juce_GraphicsContext.h b/modules/juce_graphics/contexts/juce_GraphicsContext.h index 8622eecd..9f8274b4 100644 --- a/modules/juce_graphics/contexts/juce_GraphicsContext.h +++ b/modules/juce_graphics/contexts/juce_GraphicsContext.h @@ -56,9 +56,6 @@ public: */ explicit Graphics (const Image& imageToDrawOnto); - /** Destructor. */ - ~Graphics(); - //============================================================================== /** Changes the current drawing colour. diff --git a/modules/juce_graphics/contexts/juce_LowLevelGraphicsContext.h b/modules/juce_graphics/contexts/juce_LowLevelGraphicsContext.h index a647b886..92e36a81 100644 --- a/modules/juce_graphics/contexts/juce_LowLevelGraphicsContext.h +++ b/modules/juce_graphics/contexts/juce_LowLevelGraphicsContext.h @@ -46,10 +46,10 @@ class JUCE_API LowLevelGraphicsContext { protected: //============================================================================== - LowLevelGraphicsContext(); + LowLevelGraphicsContext() = default; public: - virtual ~LowLevelGraphicsContext(); + virtual ~LowLevelGraphicsContext() = default; /** Returns true if this device is vector-based, e.g. a printer. */ virtual bool isVectorDevice() const = 0; diff --git a/modules/juce_graphics/contexts/juce_LowLevelGraphicsPostScriptRenderer.cpp b/modules/juce_graphics/contexts/juce_LowLevelGraphicsPostScriptRenderer.cpp index e7fbe847..ecc8881d 100644 --- a/modules/juce_graphics/contexts/juce_LowLevelGraphicsPostScriptRenderer.cpp +++ b/modules/juce_graphics/contexts/juce_LowLevelGraphicsPostScriptRenderer.cpp @@ -83,10 +83,6 @@ LowLevelGraphicsPostScriptRenderer::LowLevelGraphicsPostScriptRenderer (OutputSt << scale << ' ' << scale << " scale\n\n"; } -LowLevelGraphicsPostScriptRenderer::~LowLevelGraphicsPostScriptRenderer() -{ -} - //============================================================================== bool LowLevelGraphicsPostScriptRenderer::isVectorDevice() const { @@ -168,10 +164,6 @@ LowLevelGraphicsPostScriptRenderer::SavedState::SavedState() { } -LowLevelGraphicsPostScriptRenderer::SavedState::~SavedState() -{ -} - void LowLevelGraphicsPostScriptRenderer::saveState() { stateStack.add (new SavedState (*stateStack.getLast())); diff --git a/modules/juce_graphics/contexts/juce_LowLevelGraphicsPostScriptRenderer.h b/modules/juce_graphics/contexts/juce_LowLevelGraphicsPostScriptRenderer.h index d8e3509e..5c4631c2 100644 --- a/modules/juce_graphics/contexts/juce_LowLevelGraphicsPostScriptRenderer.h +++ b/modules/juce_graphics/contexts/juce_LowLevelGraphicsPostScriptRenderer.h @@ -42,8 +42,6 @@ public: int totalWidth, int totalHeight); - ~LowLevelGraphicsPostScriptRenderer() override; - //============================================================================== bool isVectorDevice() const override; void setOrigin (Point) override; @@ -96,7 +94,6 @@ protected: { SavedState(); SavedState& operator= (const SavedState&) = delete; - ~SavedState(); RectangleList clip; int xOffset, yOffset; diff --git a/modules/juce_graphics/fonts/juce_AttributedString.cpp b/modules/juce_graphics/fonts/juce_AttributedString.cpp index 2a2ef4b7..ce09e29a 100644 --- a/modules/juce_graphics/fonts/juce_AttributedString.cpp +++ b/modules/juce_graphics/fonts/juce_AttributedString.cpp @@ -54,6 +54,24 @@ namespace } } + inline bool areInvariantsMaintained (const String& text, const Array& atts) + { + if (atts.isEmpty()) + return true; + + if (atts.getFirst().range.getStart() != 0) + return false; + + if (atts.getLast().range.getEnd() != text.length()) + return false; + + for (auto it = std::next (atts.begin()); it != atts.end(); ++it) + if (it->range.getStart() != std::prev (it)->range.getEnd()) + return false; + + return true; + } + Range splitAttributeRanges (Array& atts, Range newRange) { newRange = newRange.getIntersectionWith ({ 0, getLength (atts) }); @@ -151,30 +169,35 @@ void AttributedString::setText (const String& newText) truncate (attributes, newLength); text = newText; + jassert (areInvariantsMaintained (text, attributes)); } void AttributedString::append (const String& textToAppend) { text += textToAppend; appendRange (attributes, textToAppend.length(), nullptr, nullptr); + jassert (areInvariantsMaintained (text, attributes)); } void AttributedString::append (const String& textToAppend, const Font& font) { text += textToAppend; appendRange (attributes, textToAppend.length(), &font, nullptr); + jassert (areInvariantsMaintained (text, attributes)); } void AttributedString::append (const String& textToAppend, Colour colour) { text += textToAppend; appendRange (attributes, textToAppend.length(), nullptr, &colour); + jassert (areInvariantsMaintained (text, attributes)); } void AttributedString::append (const String& textToAppend, const Font& font, Colour colour) { text += textToAppend; appendRange (attributes, textToAppend.length(), &font, &colour); + jassert (areInvariantsMaintained (text, attributes)); } void AttributedString::append (const AttributedString& other) @@ -188,6 +211,7 @@ void AttributedString::append (const AttributedString& other) attributes.getReference (i).range += originalLength; mergeAdjacentRanges (attributes); + jassert (areInvariantsMaintained (text, attributes)); } void AttributedString::clear() @@ -219,21 +243,25 @@ void AttributedString::setLineSpacing (const float newLineSpacing) noexcept void AttributedString::setColour (Range range, Colour colour) { applyFontAndColour (attributes, range, nullptr, &colour); + jassert (areInvariantsMaintained (text, attributes)); } void AttributedString::setFont (Range range, const Font& font) { applyFontAndColour (attributes, range, &font, nullptr); + jassert (areInvariantsMaintained (text, attributes)); } void AttributedString::setColour (Colour colour) { setColour ({ 0, getLength (attributes) }, colour); + jassert (areInvariantsMaintained (text, attributes)); } void AttributedString::setFont (const Font& font) { setFont ({ 0, getLength (attributes) }, font); + jassert (areInvariantsMaintained (text, attributes)); } void AttributedString::draw (Graphics& g, const Rectangle& area) const diff --git a/modules/juce_graphics/fonts/juce_AttributedString.h b/modules/juce_graphics/fonts/juce_AttributedString.h index 9721939a..5f7fffdf 100644 --- a/modules/juce_graphics/fonts/juce_AttributedString.h +++ b/modules/juce_graphics/fonts/juce_AttributedString.h @@ -34,6 +34,11 @@ namespace juce An attributed string lets you create a string with varied fonts, colours, word-wrapping, layout, etc., and draw it using AttributedString::draw(). + Invariants: + - Every character in the string is a member of exactly one attribute. + - Attributes are sorted such that the range-end of attribute 'i' is equal to the + range-begin of attribute 'i + 1'. + @see TextLayout @tags{Graphics} diff --git a/modules/juce_graphics/fonts/juce_Font.h b/modules/juce_graphics/fonts/juce_Font.h index befd42f0..e4eae256 100644 --- a/modules/juce_graphics/fonts/juce_Font.h +++ b/modules/juce_graphics/fonts/juce_Font.h @@ -154,7 +154,7 @@ public: /** Returns a copy of this font with a new typeface style. @see getAvailableStyles() */ - Font withTypefaceStyle (const String& newStyle) const; + JUCE_NODISCARD Font withTypefaceStyle (const String& newStyle) const; /** Returns a list of the styles that this font can use. */ StringArray getAvailableStyles() const; @@ -204,10 +204,10 @@ public: //============================================================================== /** Returns a copy of this font with a new height. */ - Font withHeight (float height) const; + JUCE_NODISCARD Font withHeight (float height) const; /** Returns a copy of this font with a new height, specified in points. */ - Font withPointHeight (float heightInPoints) const; + JUCE_NODISCARD Font withPointHeight (float heightInPoints) const; /** Changes the font's height. @see getHeight, withHeight, setHeightWithoutChangingWidth @@ -271,7 +271,7 @@ public: @param styleFlags a bitwise-or'ed combination of values from the FontStyleFlags enum. @see FontStyleFlags, getStyleFlags */ - Font withStyle (int styleFlags) const; + JUCE_NODISCARD Font withStyle (int styleFlags) const; /** Changes the font's style. @param newFlags a bitwise-or'ed combination of values from the FontStyleFlags enum. @@ -286,7 +286,7 @@ public: /** Returns a copy of this font with the bold attribute set. If the font does not have a bold version, this will return the default font. */ - Font boldened() const; + JUCE_NODISCARD Font boldened() const; /** Returns true if the font is bold. */ bool isBold() const noexcept; @@ -294,7 +294,7 @@ public: /** Makes the font italic or non-italic. */ void setItalic (bool shouldBeItalic); /** Returns a copy of this font with the italic attribute set. */ - Font italicised() const; + JUCE_NODISCARD Font italicised() const; /** Returns true if the font is italic. */ bool isItalic() const noexcept; @@ -317,7 +317,7 @@ public: narrower, greater than 1.0 will be stretched out. @see getHorizontalScale */ - Font withHorizontalScale (float scaleFactor) const; + JUCE_NODISCARD Font withHorizontalScale (float scaleFactor) const; /** Changes the font's horizontal scale factor. @param scaleFactor a value of 1.0 is the normal scale, less than this will be @@ -353,7 +353,7 @@ public: normal spacing, positive values spread the letters out, negative values make them closer together. */ - Font withExtraKerningFactor (float extraKerning) const; + JUCE_NODISCARD Font withExtraKerningFactor (float extraKerning) const; /** Changes the font's kerning. @param extraKerning a multiple of the font's height that will be added diff --git a/modules/juce_graphics/fonts/juce_GlyphArrangement.cpp b/modules/juce_graphics/fonts/juce_GlyphArrangement.cpp index 1d621f85..eb5313ee 100644 --- a/modules/juce_graphics/fonts/juce_GlyphArrangement.cpp +++ b/modules/juce_graphics/fonts/juce_GlyphArrangement.cpp @@ -26,6 +26,14 @@ namespace juce { +static constexpr bool isNonBreakingSpace (const juce_wchar c) +{ + return c == 0x00a0 + || c == 0x2007 + || c == 0x202f + || c == 0x2060; +} + PositionedGlyph::PositionedGlyph() noexcept : character (0), glyph (0), x (0), y (0), w (0), whitespace (false) { @@ -38,8 +46,6 @@ PositionedGlyph::PositionedGlyph (const Font& font_, juce_wchar character_, int { } -PositionedGlyph::~PositionedGlyph() {} - static void drawGlyphWithFont (Graphics& g, int glyph, const Font& font, AffineTransform t) { auto& context = g.getInternalContext(); @@ -168,7 +174,7 @@ void GlyphArrangement::addCurtailedLineOfText (const Font& font, const String& t } auto thisX = xOffsets.getUnchecked (i); - bool isWhitespace = t.isWhitespace(); + auto isWhitespace = isNonBreakingSpace (*t) || t.isWhitespace(); glyphs.add (PositionedGlyph (font, t.getAndAdvance(), newGlyphs.getUnchecked(i), @@ -545,7 +551,7 @@ void GlyphArrangement::spreadOutLine (int start, int num, float targetWidth) static bool isBreakableGlyph (const PositionedGlyph& g) noexcept { - return g.isWhitespace() || g.getCharacter() == '-'; + return ! isNonBreakingSpace (g.getCharacter()) && (g.isWhitespace() || g.getCharacter() == '-'); } void GlyphArrangement::splitLines (const String& text, Font font, int startIndex, diff --git a/modules/juce_graphics/fonts/juce_GlyphArrangement.h b/modules/juce_graphics/fonts/juce_GlyphArrangement.h index 18500f53..068e46b2 100644 --- a/modules/juce_graphics/fonts/juce_GlyphArrangement.h +++ b/modules/juce_graphics/fonts/juce_GlyphArrangement.h @@ -47,13 +47,6 @@ public: PositionedGlyph (const Font& font, juce_wchar character, int glyphNumber, float anchorX, float baselineY, float width, bool isWhitespace); - PositionedGlyph (const PositionedGlyph&) = default; - PositionedGlyph& operator= (const PositionedGlyph&) = default; - PositionedGlyph (PositionedGlyph&&) noexcept = default; - PositionedGlyph& operator= (PositionedGlyph&&) noexcept = default; - - ~PositionedGlyph(); - /** Returns the character the glyph represents. */ juce_wchar getCharacter() const noexcept { return character; } /** Checks whether the glyph is actually empty. */ diff --git a/modules/juce_graphics/geometry/juce_BorderSize.h b/modules/juce_graphics/geometry/juce_BorderSize.h index 0fea60d3..ea941027 100644 --- a/modules/juce_graphics/geometry/juce_BorderSize.h +++ b/modules/juce_graphics/geometry/juce_BorderSize.h @@ -47,9 +47,6 @@ public: */ BorderSize() = default; - /** Creates a copy of another border. */ - BorderSize (const BorderSize&) = default; - /** Creates a border with the given gaps. */ BorderSize (ValueType topGap, ValueType leftGap, ValueType bottomGap, ValueType rightGap) noexcept : top (topGap), left (leftGap), bottom (bottomGap), right (rightGap) diff --git a/modules/juce_graphics/geometry/juce_Path.cpp b/modules/juce_graphics/geometry/juce_Path.cpp index 851e65c5..fc809fa2 100644 --- a/modules/juce_graphics/geometry/juce_Path.cpp +++ b/modules/juce_graphics/geometry/juce_Path.cpp @@ -970,7 +970,7 @@ bool Path::contains (Point point, float tolerance) const return contains (point.x, point.y, tolerance); } -bool Path::intersectsLine (Line line, float tolerance) +bool Path::intersectsLine (Line line, float tolerance) const { PathFlatteningIterator i (*this, AffineTransform(), tolerance); Point intersection; diff --git a/modules/juce_graphics/geometry/juce_Path.h b/modules/juce_graphics/geometry/juce_Path.h index b9a5ee5f..893fa435 100644 --- a/modules/juce_graphics/geometry/juce_Path.h +++ b/modules/juce_graphics/geometry/juce_Path.h @@ -144,7 +144,7 @@ public: outside the path's boundary. */ bool intersectsLine (Line line, - float tolerance = defaultToleranceForTesting); + float tolerance = defaultToleranceForTesting) const; /** Cuts off parts of a line to keep the parts that are either inside or outside this path. diff --git a/modules/juce_graphics/geometry/juce_Rectangle.h b/modules/juce_graphics/geometry/juce_Rectangle.h index 780f46df..d8854a03 100644 --- a/modules/juce_graphics/geometry/juce_Rectangle.h +++ b/modules/juce_graphics/geometry/juce_Rectangle.h @@ -217,42 +217,42 @@ public: void setVerticalRange (Range range) noexcept { pos.y = range.getStart(); h = range.getLength(); } /** Returns a rectangle which has the same size and y-position as this one, but with a different x-position. */ - Rectangle withX (ValueType newX) const noexcept { return { newX, pos.y, w, h }; } + JUCE_NODISCARD Rectangle withX (ValueType newX) const noexcept { return { newX, pos.y, w, h }; } /** Returns a rectangle which has the same size and x-position as this one, but with a different y-position. */ - Rectangle withY (ValueType newY) const noexcept { return { pos.x, newY, w, h }; } + JUCE_NODISCARD Rectangle withY (ValueType newY) const noexcept { return { pos.x, newY, w, h }; } /** Returns a rectangle which has the same size and y-position as this one, but whose right-hand edge has the given position. */ - Rectangle withRightX (ValueType newRightX) const noexcept { return { newRightX - w, pos.y, w, h }; } + JUCE_NODISCARD Rectangle withRightX (ValueType newRightX) const noexcept { return { newRightX - w, pos.y, w, h }; } /** Returns a rectangle which has the same size and x-position as this one, but whose bottom edge has the given position. */ - Rectangle withBottomY (ValueType newBottomY) const noexcept { return { pos.x, newBottomY - h, w, h }; } + JUCE_NODISCARD Rectangle withBottomY (ValueType newBottomY) const noexcept { return { pos.x, newBottomY - h, w, h }; } /** Returns a rectangle with the same size as this one, but a new position. */ - Rectangle withPosition (ValueType newX, ValueType newY) const noexcept { return { newX, newY, w, h }; } + JUCE_NODISCARD Rectangle withPosition (ValueType newX, ValueType newY) const noexcept { return { newX, newY, w, h }; } /** Returns a rectangle with the same size as this one, but a new position. */ - Rectangle withPosition (Point newPos) const noexcept { return { newPos.x, newPos.y, w, h }; } + JUCE_NODISCARD Rectangle withPosition (Point newPos) const noexcept { return { newPos.x, newPos.y, w, h }; } /** Returns a rectangle whose size is the same as this one, but whose top-left position is (0, 0). */ - Rectangle withZeroOrigin() const noexcept { return { w, h }; } + JUCE_NODISCARD Rectangle withZeroOrigin() const noexcept { return { w, h }; } /** Returns a rectangle with the same size as this one, but a new centre position. */ - Rectangle withCentre (Point newCentre) const noexcept { return { newCentre.x - w / (ValueType) 2, + JUCE_NODISCARD Rectangle withCentre (Point newCentre) const noexcept { return { newCentre.x - w / (ValueType) 2, newCentre.y - h / (ValueType) 2, w, h }; } /** Returns a rectangle which has the same position and height as this one, but with a different width. */ - Rectangle withWidth (ValueType newWidth) const noexcept { return { pos.x, pos.y, jmax (ValueType(), newWidth), h }; } + JUCE_NODISCARD Rectangle withWidth (ValueType newWidth) const noexcept { return { pos.x, pos.y, jmax (ValueType(), newWidth), h }; } /** Returns a rectangle which has the same position and width as this one, but with a different height. */ - Rectangle withHeight (ValueType newHeight) const noexcept { return { pos.x, pos.y, w, jmax (ValueType(), newHeight) }; } + JUCE_NODISCARD Rectangle withHeight (ValueType newHeight) const noexcept { return { pos.x, pos.y, w, jmax (ValueType(), newHeight) }; } /** Returns a rectangle with the same top-left position as this one, but a new size. */ - Rectangle withSize (ValueType newWidth, ValueType newHeight) const noexcept { return { pos.x, pos.y, jmax (ValueType(), newWidth), jmax (ValueType(), newHeight) }; } + JUCE_NODISCARD Rectangle withSize (ValueType newWidth, ValueType newHeight) const noexcept { return { pos.x, pos.y, jmax (ValueType(), newWidth), jmax (ValueType(), newHeight) }; } /** Returns a rectangle with the same centre position as this one, but a new size. */ - Rectangle withSizeKeepingCentre (ValueType newWidth, ValueType newHeight) const noexcept { return { pos.x + (w - newWidth) / (ValueType) 2, - pos.y + (h - newHeight) / (ValueType) 2, newWidth, newHeight }; } + JUCE_NODISCARD Rectangle withSizeKeepingCentre (ValueType newWidth, ValueType newHeight) const noexcept { return { pos.x + (w - newWidth) / (ValueType) 2, + pos.y + (h - newHeight) / (ValueType) 2, newWidth, newHeight }; } /** Moves the x position, adjusting the width so that the right-hand edge remains in the same place. If the x is moved to be on the right of the current right-hand edge, the width will be set to zero. @@ -264,7 +264,7 @@ public: If the new x is beyond the right of the current right-hand edge, the width will be set to zero. @see setLeft */ - Rectangle withLeft (ValueType newLeft) const noexcept { return { newLeft, pos.y, jmax (ValueType(), pos.x + w - newLeft), h }; } + JUCE_NODISCARD Rectangle withLeft (ValueType newLeft) const noexcept { return { newLeft, pos.y, jmax (ValueType(), pos.x + w - newLeft), h }; } /** Moves the y position, adjusting the height so that the bottom edge remains in the same place. If the y is moved to be below the current bottom edge, the height will be set to zero. @@ -276,7 +276,7 @@ public: If the new y is beyond the bottom of the current rectangle, the height will be set to zero. @see setTop */ - Rectangle withTop (ValueType newTop) const noexcept { return { pos.x, newTop, w, jmax (ValueType(), pos.y + h - newTop) }; } + JUCE_NODISCARD Rectangle withTop (ValueType newTop) const noexcept { return { pos.x, newTop, w, jmax (ValueType(), pos.y + h - newTop) }; } /** Adjusts the width so that the right-hand edge of the rectangle has this new value. If the new right is below the current X value, the X will be pushed down to match it. @@ -288,7 +288,7 @@ public: If the new right edge is below the current left-hand edge, the width will be set to zero. @see setRight */ - Rectangle withRight (ValueType newRight) const noexcept { return { jmin (pos.x, newRight), pos.y, jmax (ValueType(), newRight - pos.x), h }; } + JUCE_NODISCARD Rectangle withRight (ValueType newRight) const noexcept { return { jmin (pos.x, newRight), pos.y, jmax (ValueType(), newRight - pos.x), h }; } /** Adjusts the height so that the bottom edge of the rectangle has this new value. If the new bottom is lower than the current Y value, the Y will be pushed down to match it. @@ -300,19 +300,19 @@ public: If the new y is beyond the bottom of the current rectangle, the height will be set to zero. @see setBottom */ - Rectangle withBottom (ValueType newBottom) const noexcept { return { pos.x, jmin (pos.y, newBottom), w, jmax (ValueType(), newBottom - pos.y) }; } + JUCE_NODISCARD Rectangle withBottom (ValueType newBottom) const noexcept { return { pos.x, jmin (pos.y, newBottom), w, jmax (ValueType(), newBottom - pos.y) }; } /** Returns a version of this rectangle with the given amount removed from its left-hand edge. */ - Rectangle withTrimmedLeft (ValueType amountToRemove) const noexcept { return withLeft (pos.x + amountToRemove); } + JUCE_NODISCARD Rectangle withTrimmedLeft (ValueType amountToRemove) const noexcept { return withLeft (pos.x + amountToRemove); } /** Returns a version of this rectangle with the given amount removed from its right-hand edge. */ - Rectangle withTrimmedRight (ValueType amountToRemove) const noexcept { return withWidth (w - amountToRemove); } + JUCE_NODISCARD Rectangle withTrimmedRight (ValueType amountToRemove) const noexcept { return withWidth (w - amountToRemove); } /** Returns a version of this rectangle with the given amount removed from its top edge. */ - Rectangle withTrimmedTop (ValueType amountToRemove) const noexcept { return withTop (pos.y + amountToRemove); } + JUCE_NODISCARD Rectangle withTrimmedTop (ValueType amountToRemove) const noexcept { return withTop (pos.y + amountToRemove); } /** Returns a version of this rectangle with the given amount removed from its bottom edge. */ - Rectangle withTrimmedBottom (ValueType amountToRemove) const noexcept { return withHeight (h - amountToRemove); } + JUCE_NODISCARD Rectangle withTrimmedBottom (ValueType amountToRemove) const noexcept { return withHeight (h - amountToRemove); } //============================================================================== /** Moves the rectangle's position by adding amount to its x and y coordinates. */ diff --git a/modules/juce_graphics/images/juce_Image.cpp b/modules/juce_graphics/images/juce_Image.cpp index 10213980..c4355fe7 100644 --- a/modules/juce_graphics/images/juce_Image.cpp +++ b/modules/juce_graphics/images/juce_Image.cpp @@ -97,7 +97,9 @@ public: void initialiseBitmapData (Image::BitmapData& bitmap, int x, int y, Image::BitmapData::ReadWriteMode mode) override { - bitmap.data = imageData + (size_t) x * (size_t) pixelStride + (size_t) y * (size_t) lineStride; + const auto offset = (size_t) x * (size_t) pixelStride + (size_t) y * (size_t) lineStride; + bitmap.data = imageData + offset; + bitmap.size = (size_t) (height * lineStride) - offset; bitmap.pixelFormat = pixelFormat; bitmap.lineStride = lineStride; bitmap.pixelStride = pixelStride; diff --git a/modules/juce_graphics/images/juce_Image.h b/modules/juce_graphics/images/juce_Image.h index 71447230..62bb19fd 100644 --- a/modules/juce_graphics/images/juce_Image.h +++ b/modules/juce_graphics/images/juce_Image.h @@ -349,6 +349,7 @@ public: Rectangle getBounds() const noexcept { return Rectangle (width, height); } uint8* data; /**< The raw pixel data, packed according to the image's pixel format. */ + size_t size; /**< The number of valid/allocated bytes after data. May be smaller than "lineStride * height" if this is a section of a larger image. */ PixelFormat pixelFormat; /**< The format of the data. */ int lineStride; /**< The number of bytes between each line. */ int pixelStride; /**< The number of bytes between each pixel. */ diff --git a/modules/juce_graphics/juce_graphics.h b/modules/juce_graphics/juce_graphics.h index 1fcf6d2e..6404d5ed 100644 --- a/modules/juce_graphics/juce_graphics.h +++ b/modules/juce_graphics/juce_graphics.h @@ -35,7 +35,7 @@ ID: juce_graphics vendor: juce - version: 6.1.5 + version: 6.1.6 name: JUCE graphics classes description: Classes for 2D vector graphics, image loading/saving, font handling, etc. website: http://www.juce.com/juce diff --git a/modules/juce_graphics/native/juce_mac_CoreGraphicsContext.mm b/modules/juce_graphics/native/juce_mac_CoreGraphicsContext.mm index 94186220..df5f9f94 100644 --- a/modules/juce_graphics/native/juce_mac_CoreGraphicsContext.mm +++ b/modules/juce_graphics/native/juce_mac_CoreGraphicsContext.mm @@ -71,7 +71,9 @@ public: void initialiseBitmapData (Image::BitmapData& bitmap, int x, int y, Image::BitmapData::ReadWriteMode mode) override { - bitmap.data = imageData->data + x * pixelStride + y * lineStride; + const auto offset = (size_t) (x * pixelStride + y * lineStride); + bitmap.data = imageData->data + offset; + bitmap.size = (size_t) (lineStride * height) - offset; bitmap.pixelFormat = pixelFormat; bitmap.lineStride = lineStride; bitmap.pixelStride = pixelStride; @@ -111,22 +113,20 @@ public: static CGImageRef createImage (const Image& juceImage, CGColorSpaceRef colourSpace) { const Image::BitmapData srcData (juceImage, Image::BitmapData::readOnly); - detail::DataProviderPtr provider; - if (auto* cgim = dynamic_cast (juceImage.getPixelData())) + const auto provider = [&] { - provider = detail::DataProviderPtr { CGDataProviderCreateWithData (new ImageDataContainer::Ptr (cgim->imageData), + if (auto* cgim = dynamic_cast (juceImage.getPixelData())) + { + return detail::DataProviderPtr { CGDataProviderCreateWithData (new ImageDataContainer::Ptr (cgim->imageData), srcData.data, - (size_t) srcData.lineStride * (size_t) srcData.height, + srcData.size, [] (void * __nullable info, const void*, size_t) { delete (ImageDataContainer::Ptr*) info; }) }; - } - else - { - CFUniquePtr data (CFDataCreate (nullptr, - (const UInt8*) srcData.data, - (CFIndex) ((size_t) srcData.lineStride * (size_t) srcData.height))); - provider = detail::DataProviderPtr { CGDataProviderCreateWithCFData (data.get()) }; - } + } + + CFUniquePtr data (CFDataCreate (nullptr, (const UInt8*) srcData.data, (CFIndex) srcData.size)); + return detail::DataProviderPtr { CGDataProviderCreateWithCFData (data.get()) }; + }(); CGImageRef imageRef = CGImageCreate ((size_t) srcData.width, (size_t) srcData.height, @@ -512,7 +512,7 @@ void CoreGraphicsContext::drawImage (const Image& sourceImage, const AffineTrans auto colourSpace = sourceImage.getFormat() == Image::PixelFormat::SingleChannel ? greyColourSpace.get() : rgbColourSpace.get(); - auto image = detail::ImagePtr { CoreGraphicsPixelData::getCachedImageRef (sourceImage, colourSpace) }; + detail::ImagePtr image { CoreGraphicsPixelData::getCachedImageRef (sourceImage, colourSpace) }; ScopedCGContextState scopedState (context.get()); CGContextSetAlpha (context.get(), state->fillType.getOpacity()); diff --git a/modules/juce_graphics/native/juce_mac_Fonts.mm b/modules/juce_graphics/native/juce_mac_Fonts.mm index 4802dc49..83ba2947 100644 --- a/modules/juce_graphics/native/juce_mac_Fonts.mm +++ b/modules/juce_graphics/native/juce_mac_Fonts.mm @@ -208,34 +208,74 @@ namespace CoreTextTypeLayout } //============================================================================== + // A flatmap that properly retains/releases font refs + class FontMap + { + public: + void emplace (CTFontRef ctFontRef, Font value) + { + pairs.emplace (std::lower_bound (pairs.begin(), pairs.end(), ctFontRef), ctFontRef, std::move (value)); + } + + const Font* find (CTFontRef ctFontRef) const + { + const auto iter = std::lower_bound (pairs.begin(), pairs.end(), ctFontRef); + + if (iter == pairs.end()) + return nullptr; + + if (iter->key.get() != ctFontRef) + return nullptr; + + return &iter->value; + } + + private: + struct Pair + { + Pair (CTFontRef ref, Font font) : key (ref), value (std::move (font)) { CFRetain (ref); } + + bool operator< (CTFontRef other) const { return key.get() < other; } + + CFUniquePtr key; + Font value; + }; + + std::vector pairs; + }; + struct AttributedStringAndFontMap { CFUniquePtr string; - std::map fontMap; + FontMap fontMap; }; static AttributedStringAndFontMap createCFAttributedString (const AttributedString& text) { - std::map fontMap; + FontMap fontMap; const detail::ColorSpacePtr rgbColourSpace { CGColorSpaceCreateWithName (kCGColorSpaceSRGB) }; auto attribString = CFAttributedStringCreateMutable (kCFAllocatorDefault, 0); CFUniquePtr cfText (text.getText().toCFString()); + CFAttributedStringReplaceString (attribString, CFRangeMake (0, 0), cfText.get()); - auto numCharacterAttributes = text.getNumAttributes(); - auto attribStringLen = CFAttributedStringGetLength (attribString); + const auto numCharacterAttributes = text.getNumAttributes(); + const auto attribStringLen = CFAttributedStringGetLength (attribString); + const auto beginPtr = text.getText().toUTF16(); + auto currentPosition = beginPtr; - for (int i = 0; i < numCharacterAttributes; ++i) + for (int i = 0; i < numCharacterAttributes; currentPosition += text.getAttribute (i).range.getLength(), ++i) { - auto& attr = text.getAttribute (i); - auto rangeStart = attr.range.getStart(); + const auto& attr = text.getAttribute (i); + const auto wordBegin = currentPosition.getAddress() - beginPtr.getAddress(); - if (rangeStart >= attribStringLen) + if (attribStringLen <= wordBegin) continue; - auto range = CFRangeMake (rangeStart, jmin (attr.range.getEnd(), (int) attribStringLen) - rangeStart); + const auto wordEnd = jmin (attribStringLen, (currentPosition + attr.range.getLength()).getAddress() - beginPtr.getAddress()); + const auto range = CFRangeMake (wordBegin, wordEnd - wordBegin); if (auto ctFontRef = getOrCreateFont (attr.font)) { @@ -300,7 +340,7 @@ namespace CoreTextTypeLayout struct FramesetterAndFontMap { CFUniquePtr framesetter; - std::map fontMap; + FontMap fontMap; }; static FramesetterAndFontMap createCTFramesetter (const AttributedString& text) @@ -324,7 +364,7 @@ namespace CoreTextTypeLayout struct FrameAndFontMap { CFUniquePtr frame; - std::map fontMap; + FontMap fontMap; }; static FrameAndFontMap createCTFrame (const AttributedString& text, CGRect bounds) @@ -476,10 +516,8 @@ namespace CoreTextTypeLayout { glyphRun->font = [&] { - auto it = frameAndMap.fontMap.find (ctRunFont); - - if (it != frameAndMap.fontMap.end()) - return it->second; + if (auto* it = frameAndMap.fontMap.find (ctRunFont)) + return *it; CFUniquePtr cfsFontName (CTFontCopyPostScriptName (ctRunFont)); CFUniquePtr ctFontRef (CTFontCreateWithName (cfsFontName.get(), referenceFontSize, nullptr)); diff --git a/modules/juce_graphics/native/juce_win32_DirectWriteTypeLayout.cpp b/modules/juce_graphics/native/juce_win32_DirectWriteTypeLayout.cpp index a877e559..28931e9f 100644 --- a/modules/juce_graphics/native/juce_win32_DirectWriteTypeLayout.cpp +++ b/modules/juce_graphics/native/juce_win32_DirectWriteTypeLayout.cpp @@ -271,12 +271,22 @@ namespace DirectWriteTypeLayout format.SetWordWrapping (wrapType); } - void addAttributedRange (const AttributedString::Attribute& attr, IDWriteTextLayout& textLayout, - const int textLen, ID2D1RenderTarget& renderTarget, IDWriteFontCollection& fontCollection) + void addAttributedRange (const AttributedString::Attribute& attr, + IDWriteTextLayout& textLayout, + CharPointer_UTF16 begin, + CharPointer_UTF16 textPointer, + const UINT32 textLen, + ID2D1RenderTarget& renderTarget, + IDWriteFontCollection& fontCollection) { DWRITE_TEXT_RANGE range; - range.startPosition = (UINT32) attr.range.getStart(); - range.length = (UINT32) jmin (attr.range.getLength(), textLen - attr.range.getStart()); + range.startPosition = (UINT32) (textPointer.getAddress() - begin.getAddress()); + + if (textLen <= range.startPosition) + return; + + const auto wordEnd = jmin (textLen, (UINT32) ((textPointer + attr.range.getLength()).getAddress() - begin.getAddress())); + range.length = wordEnd - range.startPosition; { auto familyName = FontStyleHelpers::getConcreteFamilyName (attr.font); @@ -367,18 +377,28 @@ namespace DirectWriteTypeLayout hr = dwTextFormat->SetTrimming (&trimming, trimmingSign); } - auto textLen = text.getText().length(); + const auto beginPtr = text.getText().toUTF16(); + const auto textLen = (UINT32) (beginPtr.findTerminatingNull().getAddress() - beginPtr.getAddress()); - hr = directWriteFactory.CreateTextLayout (text.getText().toWideCharPointer(), (UINT32) textLen, dwTextFormat, - maxWidth, maxHeight, textLayout.resetAndGetPointerAddress()); + hr = directWriteFactory.CreateTextLayout (beginPtr.getAddress(), + textLen, + dwTextFormat, + maxWidth, + maxHeight, + textLayout.resetAndGetPointerAddress()); if (FAILED (hr) || textLayout == nullptr) return false; - auto numAttributes = text.getNumAttributes(); + const auto numAttributes = text.getNumAttributes(); + auto rangePointer = beginPtr; for (int i = 0; i < numAttributes; ++i) - addAttributedRange (text.getAttribute (i), *textLayout, textLen, renderTarget, fontCollection); + { + const auto attribute = text.getAttribute (i); + addAttributedRange (attribute, *textLayout, beginPtr, rangePointer, textLen, renderTarget, fontCollection); + rangePointer += attribute.range.getLength(); + } return true; } diff --git a/modules/juce_gui_basics/accessibility/juce_AccessibilityState.h b/modules/juce_gui_basics/accessibility/juce_AccessibilityState.h index 769c6055..9b061c29 100644 --- a/modules/juce_gui_basics/accessibility/juce_AccessibilityState.h +++ b/modules/juce_gui_basics/accessibility/juce_AccessibilityState.h @@ -50,73 +50,73 @@ public: @see isCheckable */ - AccessibleState withCheckable() const noexcept { return withFlag (Flags::checkable); } + JUCE_NODISCARD AccessibleState withCheckable() const noexcept { return withFlag (Flags::checkable); } /** Sets the checked flag and returns the new state. @see isChecked */ - AccessibleState withChecked() const noexcept { return withFlag (Flags::checked); } + JUCE_NODISCARD AccessibleState withChecked() const noexcept { return withFlag (Flags::checked); } /** Sets the collapsed flag and returns the new state. @see isCollapsed */ - AccessibleState withCollapsed() const noexcept { return withFlag (Flags::collapsed); } + JUCE_NODISCARD AccessibleState withCollapsed() const noexcept { return withFlag (Flags::collapsed); } /** Sets the expandable flag and returns the new state. @see isExpandable */ - AccessibleState withExpandable() const noexcept { return withFlag (Flags::expandable); } + JUCE_NODISCARD AccessibleState withExpandable() const noexcept { return withFlag (Flags::expandable); } /** Sets the expanded flag and returns the new state. @see isExpanded */ - AccessibleState withExpanded() const noexcept { return withFlag (Flags::expanded); } + JUCE_NODISCARD AccessibleState withExpanded() const noexcept { return withFlag (Flags::expanded); } /** Sets the focusable flag and returns the new state. @see isFocusable */ - AccessibleState withFocusable() const noexcept { return withFlag (Flags::focusable); } + JUCE_NODISCARD AccessibleState withFocusable() const noexcept { return withFlag (Flags::focusable); } /** Sets the focused flag and returns the new state. @see isFocused */ - AccessibleState withFocused() const noexcept { return withFlag (Flags::focused); } + JUCE_NODISCARD AccessibleState withFocused() const noexcept { return withFlag (Flags::focused); } /** Sets the ignored flag and returns the new state. @see isIgnored */ - AccessibleState withIgnored() const noexcept { return withFlag (Flags::ignored); } + JUCE_NODISCARD AccessibleState withIgnored() const noexcept { return withFlag (Flags::ignored); } /** Sets the selectable flag and returns the new state. @see isSelectable */ - AccessibleState withSelectable() const noexcept { return withFlag (Flags::selectable); } + JUCE_NODISCARD AccessibleState withSelectable() const noexcept { return withFlag (Flags::selectable); } /** Sets the multiSelectable flag and returns the new state. @see isMultiSelectable */ - AccessibleState withMultiSelectable() const noexcept { return withFlag (Flags::multiSelectable); } + JUCE_NODISCARD AccessibleState withMultiSelectable() const noexcept { return withFlag (Flags::multiSelectable); } /** Sets the selected flag and returns the new state. @see isSelected */ - AccessibleState withSelected() const noexcept { return withFlag (Flags::selected); } + JUCE_NODISCARD AccessibleState withSelected() const noexcept { return withFlag (Flags::selected); } /** Sets the accessible offscreen flag and returns the new state. @see isSelected */ - AccessibleState withAccessibleOffscreen() const noexcept { return withFlag (Flags::accessibleOffscreen); } + JUCE_NODISCARD AccessibleState withAccessibleOffscreen() const noexcept { return withFlag (Flags::accessibleOffscreen); } //============================================================================== /** Returns true if the UI element is checkable. @@ -208,7 +208,7 @@ private: accessibleOffscreen = (1 << 11) }; - AccessibleState withFlag (int flag) const noexcept + JUCE_NODISCARD AccessibleState withFlag (int flag) const noexcept { auto copy = *this; copy.flags |= flag; diff --git a/modules/juce_gui_basics/components/juce_Component.cpp b/modules/juce_gui_basics/components/juce_Component.cpp index 5ee474f9..691fbbae 100644 --- a/modules/juce_gui_basics/components/juce_Component.cpp +++ b/modules/juce_gui_basics/components/juce_Component.cpp @@ -26,6 +26,17 @@ namespace juce { +static Component* findFirstEnabledAncestor (Component* in) +{ + if (in == nullptr) + return nullptr; + + if (in->isEnabled()) + return in; + + return findFirstEnabledAncestor (in->getParentComponent()); +} + Component* Component::currentlyFocusedComponent = nullptr; @@ -264,6 +275,18 @@ struct ScalingHelpers static Rectangle subtractPosition (Rectangle p, const Component& c) noexcept { return p - c.getPosition(); } static Point subtractPosition (Point p, const Component& c) noexcept { return p - c.getPosition().toFloat(); } static Rectangle subtractPosition (Rectangle p, const Component& c) noexcept { return p - c.getPosition().toFloat(); } + + static Point screenPosToLocalPos (Component& comp, Point pos) + { + if (auto* peer = comp.getPeer()) + { + pos = peer->globalToLocal (pos); + auto& peerComp = peer->getComponent(); + return comp.getLocalPoint (&peerComp, unscaledScreenPosToScaled (peerComp, pos)); + } + + return comp.getLocalPoint (nullptr, unscaledScreenPosToScaled (comp, pos)); + } }; static const char colourPropertyPrefix[] = "jcclr_"; @@ -2269,16 +2292,16 @@ void Component::mouseDoubleClick (const MouseEvent&) {} void Component::mouseWheelMove (const MouseEvent& e, const MouseWheelDetails& wheel) { - // the base class just passes this event up to its parent.. - if (parentComponent != nullptr && parentComponent->isEnabled()) - parentComponent->mouseWheelMove (e.getEventRelativeTo (parentComponent), wheel); + // the base class just passes this event up to the nearest enabled ancestor + if (auto* enabledComponent = findFirstEnabledAncestor (getParentComponent())) + enabledComponent->mouseWheelMove (e.getEventRelativeTo (enabledComponent), wheel); } void Component::mouseMagnify (const MouseEvent& e, float magnifyAmount) { - // the base class just passes this event up to its parent.. - if (parentComponent != nullptr && parentComponent->isEnabled()) - parentComponent->mouseMagnify (e.getEventRelativeTo (parentComponent), magnifyAmount); + // the base class just passes this event up to the nearest enabled ancestor + if (auto* enabledComponent = findFirstEnabledAncestor (getParentComponent())) + enabledComponent->mouseMagnify (e.getEventRelativeTo (enabledComponent), magnifyAmount); } //============================================================================== @@ -2382,10 +2405,16 @@ void Component::internalMouseEnter (MouseInputSource source, Point relati BailOutChecker checker (this); - const MouseEvent me (source, relativePos, source.getCurrentModifiers(), MouseInputSource::invalidPressure, - MouseInputSource::invalidOrientation, MouseInputSource::invalidRotation, - MouseInputSource::invalidTiltX, MouseInputSource::invalidTiltY, - this, this, time, relativePos, time, 0, false); + const auto me = makeMouseEvent (source, + PointerState().withPosition (relativePos), + source.getCurrentModifiers(), + this, + this, + time, + relativePos, + time, + 0, + false); mouseEnter (me); flags.cachedMouseInsideComponent = true; @@ -2414,10 +2443,16 @@ void Component::internalMouseExit (MouseInputSource source, Point relativ BailOutChecker checker (this); - const MouseEvent me (source, relativePos, source.getCurrentModifiers(), MouseInputSource::invalidPressure, - MouseInputSource::invalidOrientation, MouseInputSource::invalidRotation, - MouseInputSource::invalidTiltX, MouseInputSource::invalidTiltY, - this, this, time, relativePos, time, 0, false); + const auto me = makeMouseEvent (source, + PointerState().withPosition (relativePos), + source.getCurrentModifiers(), + this, + this, + time, + relativePos, + time, + 0, + false); mouseExit (me); @@ -2429,8 +2464,7 @@ void Component::internalMouseExit (MouseInputSource source, Point relativ MouseListenerList::template sendMouseEvent (*this, checker, &MouseListener::mouseExit, me); } -void Component::internalMouseDown (MouseInputSource source, Point relativePos, Time time, - float pressure, float orientation, float rotation, float tiltX, float tiltY) +void Component::internalMouseDown (MouseInputSource source, const PointerState& relativePointerState, Time time) { auto& desktop = Desktop::getInstance(); BailOutChecker checker (this); @@ -2448,9 +2482,16 @@ void Component::internalMouseDown (MouseInputSource source, Point relativ if (isCurrentlyBlockedByAnotherModalComponent()) { // allow blocked mouse-events to go to global listeners.. - const MouseEvent me (source, relativePos, source.getCurrentModifiers(), pressure, - orientation, rotation, tiltX, tiltY, this, this, time, relativePos, - time, source.getNumberOfMultipleClicks(), false); + const auto me = makeMouseEvent (source, + relativePointerState, + source.getCurrentModifiers(), + this, + this, + time, + relativePointerState.position, + time, + source.getNumberOfMultipleClicks(), + false); desktop.getMouseListeners().callChecked (checker, [&] (MouseListener& l) { l.mouseDown (me); }); return; @@ -2481,9 +2522,16 @@ void Component::internalMouseDown (MouseInputSource source, Point relativ if (flags.repaintOnMouseActivityFlag) repaint(); - const MouseEvent me (source, relativePos, source.getCurrentModifiers(), pressure, - orientation, rotation, tiltX, tiltY, this, this, time, relativePos, - time, source.getNumberOfMultipleClicks(), false); + const auto me = makeMouseEvent (source, + relativePointerState, + source.getCurrentModifiers(), + this, + this, + time, + relativePointerState.position, + time, + source.getNumberOfMultipleClicks(), + false); mouseDown (me); if (checker.shouldBailOut()) @@ -2494,8 +2542,7 @@ void Component::internalMouseDown (MouseInputSource source, Point relativ MouseListenerList::template sendMouseEvent (*this, checker, &MouseListener::mouseDown, me); } -void Component::internalMouseUp (MouseInputSource source, Point relativePos, Time time, - const ModifierKeys oldModifiers, float pressure, float orientation, float rotation, float tiltX, float tiltY) +void Component::internalMouseUp (MouseInputSource source, const PointerState& relativePointerState, Time time, const ModifierKeys oldModifiers) { if (flags.mouseDownWasBlocked && isCurrentlyBlockedByAnotherModalComponent()) return; @@ -2505,12 +2552,16 @@ void Component::internalMouseUp (MouseInputSource source, Point relativeP if (flags.repaintOnMouseActivityFlag) repaint(); - const MouseEvent me (source, relativePos, oldModifiers, pressure, orientation, - rotation, tiltX, tiltY, this, this, time, - getLocalPoint (nullptr, source.getLastMouseDownPosition()), - source.getLastMouseDownTime(), - source.getNumberOfMultipleClicks(), - source.isLongPressOrDrag()); + const auto me = makeMouseEvent (source, + relativePointerState, + oldModifiers, + this, + this, + time, + getLocalPoint (nullptr, source.getLastMouseDownPosition()), + source.getLastMouseDownTime(), + source.getNumberOfMultipleClicks(), + source.isLongPressOrDrag()); mouseUp (me); if (checker.shouldBailOut()) @@ -2537,19 +2588,22 @@ void Component::internalMouseUp (MouseInputSource source, Point relativeP } } -void Component::internalMouseDrag (MouseInputSource source, Point relativePos, Time time, - float pressure, float orientation, float rotation, float tiltX, float tiltY) +void Component::internalMouseDrag (MouseInputSource source, const PointerState& relativePointerState, Time time) { if (! isCurrentlyBlockedByAnotherModalComponent()) { BailOutChecker checker (this); - const MouseEvent me (source, relativePos, source.getCurrentModifiers(), - pressure, orientation, rotation, tiltX, tiltY, this, this, time, - getLocalPoint (nullptr, source.getLastMouseDownPosition()), - source.getLastMouseDownTime(), - source.getNumberOfMultipleClicks(), - source.isLongPressOrDrag()); + const auto me = makeMouseEvent (source, + relativePointerState, + source.getCurrentModifiers(), + this, + this, + time, + getLocalPoint (nullptr, source.getLastMouseDownPosition()), + source.getLastMouseDownTime(), + source.getNumberOfMultipleClicks(), + source.isLongPressOrDrag()); mouseDrag (me); if (checker.shouldBailOut()) @@ -2574,10 +2628,16 @@ void Component::internalMouseMove (MouseInputSource source, Point relativ { BailOutChecker checker (this); - const MouseEvent me (source, relativePos, source.getCurrentModifiers(), MouseInputSource::invalidPressure, - MouseInputSource::invalidOrientation, MouseInputSource::invalidRotation, - MouseInputSource::invalidTiltX, MouseInputSource::invalidTiltY, - this, this, time, relativePos, time, 0, false); + const auto me = makeMouseEvent (source, + PointerState().withPosition (relativePos), + source.getCurrentModifiers(), + this, + this, + time, + relativePos, + time, + 0, + false); mouseMove (me); if (checker.shouldBailOut()) @@ -2595,10 +2655,16 @@ void Component::internalMouseWheel (MouseInputSource source, Point relati auto& desktop = Desktop::getInstance(); BailOutChecker checker (this); - const MouseEvent me (source, relativePos, source.getCurrentModifiers(), MouseInputSource::invalidPressure, - MouseInputSource::invalidOrientation, MouseInputSource::invalidRotation, - MouseInputSource::invalidTiltX, MouseInputSource::invalidTiltY, - this, this, time, relativePos, time, 0, false); + const auto me = makeMouseEvent (source, + PointerState().withPosition (relativePos), + source.getCurrentModifiers(), + this, + this, + time, + relativePos, + time, + 0, + false); if (isCurrentlyBlockedByAnotherModalComponent()) { @@ -2625,10 +2691,16 @@ void Component::internalMagnifyGesture (MouseInputSource source, Point re auto& desktop = Desktop::getInstance(); BailOutChecker checker (this); - const MouseEvent me (source, relativePos, source.getCurrentModifiers(), MouseInputSource::invalidPressure, - MouseInputSource::invalidOrientation, MouseInputSource::invalidRotation, - MouseInputSource::invalidTiltX, MouseInputSource::invalidTiltY, - this, this, time, relativePos, time, 0, false); + const auto me = makeMouseEvent (source, + PointerState().withPosition (relativePos), + source.getCurrentModifiers(), + this, + this, + time, + relativePos, + time, + 0, + false); if (isCurrentlyBlockedByAnotherModalComponent()) { diff --git a/modules/juce_gui_basics/components/juce_Component.h b/modules/juce_gui_basics/components/juce_Component.h index a53392c1..711d3d55 100644 --- a/modules/juce_gui_basics/components/juce_Component.h +++ b/modules/juce_gui_basics/components/juce_Component.h @@ -2594,9 +2594,9 @@ private: //============================================================================== void internalMouseEnter (MouseInputSource, Point, Time); void internalMouseExit (MouseInputSource, Point, Time); - void internalMouseDown (MouseInputSource, Point, Time, float, float, float, float, float); - void internalMouseUp (MouseInputSource, Point, Time, const ModifierKeys oldModifiers, float, float, float, float, float); - void internalMouseDrag (MouseInputSource, Point, Time, float, float, float, float, float); + void internalMouseDown (MouseInputSource, const PointerState&, Time); + void internalMouseUp (MouseInputSource, const PointerState&, Time, const ModifierKeys oldModifiers); + void internalMouseDrag (MouseInputSource, const PointerState&, Time); void internalMouseMove (MouseInputSource, Point, Time); void internalMouseWheel (MouseInputSource, Point, Time, const MouseWheelDetails&); void internalMagnifyGesture (MouseInputSource, Point, Time, float); diff --git a/modules/juce_gui_basics/desktop/juce_Desktop.cpp b/modules/juce_gui_basics/desktop/juce_Desktop.cpp index a6df54ff..cd56e721 100644 --- a/modules/juce_gui_basics/desktop/juce_Desktop.cpp +++ b/modules/juce_gui_basics/desktop/juce_Desktop.cpp @@ -276,9 +276,9 @@ void Desktop::sendMouseMove() auto pos = target->getLocalPoint (nullptr, lastFakeMouseMove); auto now = Time::getCurrentTime(); - const MouseEvent me (getMainMouseSource(), pos, ModifierKeys::currentModifiers, MouseInputSource::invalidPressure, - MouseInputSource::invalidOrientation, MouseInputSource::invalidRotation, - MouseInputSource::invalidTiltX, MouseInputSource::invalidTiltY, + const MouseEvent me (getMainMouseSource(), pos, ModifierKeys::currentModifiers, MouseInputSource::defaultPressure, + MouseInputSource::defaultOrientation, MouseInputSource::defaultRotation, + MouseInputSource::defaultTiltX, MouseInputSource::defaultTiltY, target, target, now, pos, now, 0, false); if (me.mods.isAnyMouseButtonDown()) diff --git a/modules/juce_gui_basics/filebrowser/juce_FileChooser.cpp b/modules/juce_gui_basics/filebrowser/juce_FileChooser.cpp index e8086a41..58ee108b 100644 --- a/modules/juce_gui_basics/filebrowser/juce_FileChooser.cpp +++ b/modules/juce_gui_basics/filebrowser/juce_FileChooser.cpp @@ -27,7 +27,8 @@ namespace juce { //============================================================================== -class FileChooser::NonNative : public FileChooser::Pimpl +class FileChooser::NonNative : public std::enable_shared_from_this, + public FileChooser::Pimpl { public: NonNative (FileChooser& fileChooser, int flags, FilePreviewComponent* preview) @@ -50,7 +51,15 @@ public: void launch() override { dialogBox.centreWithDefaultSize (nullptr); - dialogBox.enterModalState (true, ModalCallbackFunction::create ([this] (int r) { modalStateFinished (r); }), true); + + const std::weak_ptr ref (shared_from_this()); + auto* callback = ModalCallbackFunction::create ([ref] (int r) + { + if (auto locked = ref.lock()) + locked->modalStateFinished (r); + }); + + dialogBox.enterModalState (true, callback, true); } void runModally() override diff --git a/modules/juce_gui_basics/juce_gui_basics.cpp b/modules/juce_gui_basics/juce_gui_basics.cpp index 2a1fb141..64477463 100644 --- a/modules/juce_gui_basics/juce_gui_basics.cpp +++ b/modules/juce_gui_basics/juce_gui_basics.cpp @@ -127,6 +127,8 @@ namespace juce }; } // namespace juce +#include "mouse/juce_PointerState.h" + #include "accessibility/juce_AccessibilityHandler.cpp" #include "components/juce_Component.cpp" #include "components/juce_ComponentListener.cpp" diff --git a/modules/juce_gui_basics/juce_gui_basics.h b/modules/juce_gui_basics/juce_gui_basics.h index f497d038..5eaf306f 100644 --- a/modules/juce_gui_basics/juce_gui_basics.h +++ b/modules/juce_gui_basics/juce_gui_basics.h @@ -35,7 +35,7 @@ ID: juce_gui_basics vendor: juce - version: 6.1.5 + version: 6.1.6 name: JUCE GUI core classes description: Basic user-interface components and related classes. website: http://www.juce.com/juce @@ -158,6 +158,7 @@ namespace juce class Displays; class AccessibilityHandler; class KeyboardFocusTraverser; + class PointerState; class FlexBox; class Grid; diff --git a/modules/juce_gui_basics/keyboard/juce_ModifierKeys.h b/modules/juce_gui_basics/keyboard/juce_ModifierKeys.h index b4eb4488..3789c8c1 100644 --- a/modules/juce_gui_basics/keyboard/juce_ModifierKeys.h +++ b/modules/juce_gui_basics/keyboard/juce_ModifierKeys.h @@ -163,23 +163,23 @@ public: //============================================================================== /** Returns a copy of only the mouse-button flags */ - ModifierKeys withOnlyMouseButtons() const noexcept { return ModifierKeys (flags & allMouseButtonModifiers); } + JUCE_NODISCARD ModifierKeys withOnlyMouseButtons() const noexcept { return ModifierKeys (flags & allMouseButtonModifiers); } /** Returns a copy of only the non-mouse flags */ - ModifierKeys withoutMouseButtons() const noexcept { return ModifierKeys (flags & ~allMouseButtonModifiers); } + JUCE_NODISCARD ModifierKeys withoutMouseButtons() const noexcept { return ModifierKeys (flags & ~allMouseButtonModifiers); } - bool operator== (const ModifierKeys other) const noexcept { return flags == other.flags; } - bool operator!= (const ModifierKeys other) const noexcept { return flags != other.flags; } + bool operator== (const ModifierKeys other) const noexcept { return flags == other.flags; } + bool operator!= (const ModifierKeys other) const noexcept { return flags != other.flags; } //============================================================================== /** Returns the raw flags for direct testing. */ - inline int getRawFlags() const noexcept { return flags; } + inline int getRawFlags() const noexcept { return flags; } - ModifierKeys withoutFlags (int rawFlagsToClear) const noexcept { return ModifierKeys (flags & ~rawFlagsToClear); } - ModifierKeys withFlags (int rawFlagsToSet) const noexcept { return ModifierKeys (flags | rawFlagsToSet); } + JUCE_NODISCARD ModifierKeys withoutFlags (int rawFlagsToClear) const noexcept { return ModifierKeys (flags & ~rawFlagsToClear); } + JUCE_NODISCARD ModifierKeys withFlags (int rawFlagsToSet) const noexcept { return ModifierKeys (flags | rawFlagsToSet); } /** Tests a combination of flags and returns true if any of them are set. */ - bool testFlags (int flagsToTest) const noexcept { return (flags & flagsToTest) != 0; } + bool testFlags (int flagsToTest) const noexcept { return (flags & flagsToTest) != 0; } /** Returns the total number of mouse buttons that are down. */ int getNumMouseButtonsDown() const noexcept; @@ -194,7 +194,7 @@ public: This method is here for backwards compatibility and there's no need to call it anymore, you should use the public currentModifiers member directly. */ - static ModifierKeys getCurrentModifiers() noexcept { return currentModifiers; } + static ModifierKeys getCurrentModifiers() noexcept { return currentModifiers; } /** Creates a ModifierKeys object to represent the current state of the keyboard and mouse buttons. diff --git a/modules/juce_gui_basics/layout/juce_ComponentBoundsConstrainer.cpp b/modules/juce_gui_basics/layout/juce_ComponentBoundsConstrainer.cpp index 9ea63b21..4575a13d 100644 --- a/modules/juce_gui_basics/layout/juce_ComponentBoundsConstrainer.cpp +++ b/modules/juce_gui_basics/layout/juce_ComponentBoundsConstrainer.cpp @@ -104,22 +104,29 @@ void ComponentBoundsConstrainer::setBoundsForComponent (Component* component, { jassert (component != nullptr); - Rectangle limits, bounds (targetBounds); - BorderSize border; + auto bounds = targetBounds; - if (auto* parent = component->getParentComponent()) + auto limits = [&]() -> Rectangle { - limits.setSize (parent->getWidth(), parent->getHeight()); - } - else - { - if (auto* peer = component->getPeer()) - border = peer->getFrameSize(); + if (auto* parent = component->getParentComponent()) + return { parent->getWidth(), parent->getHeight() }; - auto screenBounds = Desktop::getInstance().getDisplays().getDisplayForPoint (targetBounds.getCentre())->userArea; + if (auto* display = Desktop::getInstance().getDisplays().getDisplayForPoint (targetBounds.getCentre())) + return component->getLocalArea (nullptr, display->userArea) + component->getPosition(); - limits = component->getLocalArea (nullptr, screenBounds) + component->getPosition(); - } + const auto max = std::numeric_limits::max(); + return { max, max }; + }(); + + auto border = [&]() -> BorderSize + { + if (component->getParentComponent() == nullptr) + if (auto* peer = component->getPeer()) + if (const auto frameSize = peer->getFrameSizeIfPresent()) + return *frameSize; + + return {}; + }(); border.addTo (bounds); diff --git a/modules/juce_gui_basics/layout/juce_FlexBox.cpp b/modules/juce_gui_basics/layout/juce_FlexBox.cpp index e2fdb689..c24d1e8f 100644 --- a/modules/juce_gui_basics/layout/juce_FlexBox.cpp +++ b/modules/juce_gui_basics/layout/juce_FlexBox.cpp @@ -738,9 +738,6 @@ private: }; //============================================================================== -FlexBox::FlexBox() noexcept = default; -FlexBox::~FlexBox() noexcept = default; - FlexBox::FlexBox (JustifyContent jc) noexcept : justifyContent (jc) {} FlexBox::FlexBox (Direction d, Wrap w, AlignContent ac, AlignItems ai, JustifyContent jc) noexcept diff --git a/modules/juce_gui_basics/layout/juce_FlexBox.h b/modules/juce_gui_basics/layout/juce_FlexBox.h index 1d685a3c..d80e7dc2 100644 --- a/modules/juce_gui_basics/layout/juce_FlexBox.h +++ b/modules/juce_gui_basics/layout/juce_FlexBox.h @@ -91,7 +91,7 @@ public: //============================================================================== /** Creates an empty FlexBox container with default parameters. */ - FlexBox() noexcept; + FlexBox() noexcept = default; /** Creates an empty FlexBox container with these parameters. */ FlexBox (Direction, Wrap, AlignContent, AlignItems, JustifyContent) noexcept; @@ -99,9 +99,6 @@ public: /** Creates an empty FlexBox container with the given content-justification mode. */ FlexBox (JustifyContent) noexcept; - /** Destructor. */ - ~FlexBox() noexcept; - //============================================================================== /** Lays-out the box's items within the given rectangle. */ void performLayout (Rectangle targetArea); diff --git a/modules/juce_gui_basics/layout/juce_GridItem.cpp b/modules/juce_gui_basics/layout/juce_GridItem.cpp index 9cb29bc9..50ef8128 100644 --- a/modules/juce_gui_basics/layout/juce_GridItem.cpp +++ b/modules/juce_gui_basics/layout/juce_GridItem.cpp @@ -68,9 +68,7 @@ GridItem::Margin::Margin (float v) noexcept : left (v), right (v), top (v), bott GridItem::Margin::Margin (float t, float r, float b, float l) noexcept : left (l), right (r), top (t), bottom (b) {} //============================================================================== -GridItem::GridItem() noexcept {} -GridItem::~GridItem() noexcept {} - +GridItem::GridItem() noexcept = default; GridItem::GridItem (Component& componentToUse) noexcept : associatedComponent (&componentToUse) {} GridItem::GridItem (Component* componentToUse) noexcept : associatedComponent (componentToUse) {} diff --git a/modules/juce_gui_basics/layout/juce_GridItem.h b/modules/juce_gui_basics/layout/juce_GridItem.h index 8dffbf36..7da2c089 100644 --- a/modules/juce_gui_basics/layout/juce_GridItem.h +++ b/modules/juce_gui_basics/layout/juce_GridItem.h @@ -128,9 +128,6 @@ public: /** Creates an item with a given Component to use. */ GridItem (Component* componentToUse) noexcept; - /** Destructor. */ - ~GridItem() noexcept; - //============================================================================== /** If this is non-null, it represents a Component whose bounds are controlled by this item. */ Component* associatedComponent = nullptr; diff --git a/modules/juce_gui_basics/layout/juce_Viewport.cpp b/modules/juce_gui_basics/layout/juce_Viewport.cpp index dfccd68a..b59de116 100644 --- a/modules/juce_gui_basics/layout/juce_Viewport.cpp +++ b/modules/juce_gui_basics/layout/juce_Viewport.cpp @@ -26,7 +26,132 @@ namespace juce { -Viewport::Viewport (const String& name) : Component (name) +static bool viewportWouldScrollOnEvent (const Viewport* vp, const MouseInputSource& src) noexcept +{ + if (vp != nullptr) + { + switch (vp->getScrollOnDragMode()) + { + case Viewport::ScrollOnDragMode::all: return true; + case Viewport::ScrollOnDragMode::nonHover: return ! src.canHover(); + case Viewport::ScrollOnDragMode::never: return false; + } + } + + return false; +} + +using ViewportDragPosition = AnimatedPosition; + +struct Viewport::DragToScrollListener : private MouseListener, + private ViewportDragPosition::Listener +{ + DragToScrollListener (Viewport& v) : viewport (v) + { + viewport.contentHolder.addMouseListener (this, true); + offsetX.addListener (this); + offsetY.addListener (this); + offsetX.behaviour.setMinimumVelocity (60); + offsetY.behaviour.setMinimumVelocity (60); + } + + ~DragToScrollListener() override + { + viewport.contentHolder.removeMouseListener (this); + Desktop::getInstance().removeGlobalMouseListener (this); + } + + void positionChanged (ViewportDragPosition&, double) override + { + viewport.setViewPosition (originalViewPos - Point ((int) offsetX.getPosition(), + (int) offsetY.getPosition())); + } + + void mouseDown (const MouseEvent& e) override + { + if (! isGlobalMouseListener && viewportWouldScrollOnEvent (&viewport, e.source)) + { + offsetX.setPosition (offsetX.getPosition()); + offsetY.setPosition (offsetY.getPosition()); + + // switch to a global mouse listener so we still receive mouseUp events + // if the original event component is deleted + viewport.contentHolder.removeMouseListener (this); + Desktop::getInstance().addGlobalMouseListener (this); + + isGlobalMouseListener = true; + + scrollSource = e.source; + } + } + + void mouseDrag (const MouseEvent& e) override + { + if (e.source == scrollSource + && ! doesMouseEventComponentBlockViewportDrag (e.eventComponent)) + { + auto totalOffset = e.getOffsetFromDragStart().toFloat(); + + if (! isDragging && totalOffset.getDistanceFromOrigin() > 8.0f && viewportWouldScrollOnEvent (&viewport, e.source)) + { + isDragging = true; + + originalViewPos = viewport.getViewPosition(); + offsetX.setPosition (0.0); + offsetX.beginDrag(); + offsetY.setPosition (0.0); + offsetY.beginDrag(); + } + + if (isDragging) + { + offsetX.drag (totalOffset.x); + offsetY.drag (totalOffset.y); + } + } + } + + void mouseUp (const MouseEvent& e) override + { + if (isGlobalMouseListener && e.source == scrollSource) + endDragAndClearGlobalMouseListener(); + } + + void endDragAndClearGlobalMouseListener() + { + offsetX.endDrag(); + offsetY.endDrag(); + isDragging = false; + + viewport.contentHolder.addMouseListener (this, true); + Desktop::getInstance().removeGlobalMouseListener (this); + + isGlobalMouseListener = false; + } + + bool doesMouseEventComponentBlockViewportDrag (const Component* eventComp) + { + for (auto c = eventComp; c != nullptr && c != &viewport; c = c->getParentComponent()) + if (c->getViewportIgnoreDragFlag()) + return true; + + return false; + } + + Viewport& viewport; + ViewportDragPosition offsetX, offsetY; + Point originalViewPos; + MouseInputSource scrollSource = Desktop::getInstance().getMainMouseSource(); + bool isDragging = false; + bool isGlobalMouseListener = false; + + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (DragToScrollListener) +}; + +//============================================================================== +Viewport::Viewport (const String& name) + : Component (name), + dragToScrollListener (std::make_unique (*this)) { // content holder is used to clip the contents so they don't overlap the scrollbars addAndMakeVisible (contentHolder); @@ -36,14 +161,12 @@ Viewport::Viewport (const String& name) : Component (name) setInterceptsMouseClicks (false, true); setWantsKeyboardFocus (true); - setScrollOnDragEnabled (Desktop::getInstance().getMainMouseSource().isTouch()); recreateScrollbars(); } Viewport::~Viewport() { - setScrollOnDragEnabled (false); deleteOrRemoveContentComp(); } @@ -196,132 +319,14 @@ void Viewport::componentMovedOrResized (Component&, bool, bool) } //============================================================================== -typedef AnimatedPosition ViewportDragPosition; - -struct Viewport::DragToScrollListener : private MouseListener, - private ViewportDragPosition::Listener -{ - DragToScrollListener (Viewport& v) : viewport (v) - { - viewport.contentHolder.addMouseListener (this, true); - offsetX.addListener (this); - offsetY.addListener (this); - offsetX.behaviour.setMinimumVelocity (60); - offsetY.behaviour.setMinimumVelocity (60); - } - - ~DragToScrollListener() override - { - viewport.contentHolder.removeMouseListener (this); - Desktop::getInstance().removeGlobalMouseListener (this); - } - - void positionChanged (ViewportDragPosition&, double) override - { - viewport.setViewPosition (originalViewPos - Point ((int) offsetX.getPosition(), - (int) offsetY.getPosition())); - } - - void mouseDown (const MouseEvent& e) override - { - if (! isGlobalMouseListener) - { - offsetX.setPosition (offsetX.getPosition()); - offsetY.setPosition (offsetY.getPosition()); - - // switch to a global mouse listener so we still receive mouseUp events - // if the original event component is deleted - viewport.contentHolder.removeMouseListener (this); - Desktop::getInstance().addGlobalMouseListener (this); - - isGlobalMouseListener = true; - - scrollSource = e.source; - } - } - - void mouseDrag (const MouseEvent& e) override - { - if (e.source == scrollSource - && ! doesMouseEventComponentBlockViewportDrag (e.eventComponent)) - { - auto totalOffset = e.getOffsetFromDragStart().toFloat(); - - if (! isDragging && totalOffset.getDistanceFromOrigin() > 8.0f) - { - isDragging = true; - - originalViewPos = viewport.getViewPosition(); - offsetX.setPosition (0.0); - offsetX.beginDrag(); - offsetY.setPosition (0.0); - offsetY.beginDrag(); - } - - if (isDragging) - { - offsetX.drag (totalOffset.x); - offsetY.drag (totalOffset.y); - } - } - } - - void mouseUp (const MouseEvent& e) override - { - if (isGlobalMouseListener && e.source == scrollSource) - endDragAndClearGlobalMouseListener(); - } - - void endDragAndClearGlobalMouseListener() - { - offsetX.endDrag(); - offsetY.endDrag(); - isDragging = false; - - viewport.contentHolder.addMouseListener (this, true); - Desktop::getInstance().removeGlobalMouseListener (this); - - isGlobalMouseListener = false; - } - - bool doesMouseEventComponentBlockViewportDrag (const Component* eventComp) - { - for (auto c = eventComp; c != nullptr && c != &viewport; c = c->getParentComponent()) - if (c->getViewportIgnoreDragFlag()) - return true; - - return false; - } - - Viewport& viewport; - ViewportDragPosition offsetX, offsetY; - Point originalViewPos; - MouseInputSource scrollSource = Desktop::getInstance().getMainMouseSource(); - bool isDragging = false; - bool isGlobalMouseListener = false; - - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (DragToScrollListener) -}; - -void Viewport::setScrollOnDragEnabled (bool shouldScrollOnDrag) -{ - if (isScrollOnDragEnabled() != shouldScrollOnDrag) - { - if (shouldScrollOnDrag) - dragToScrollListener.reset (new DragToScrollListener (*this)); - else - dragToScrollListener.reset(); - } -} - -bool Viewport::isScrollOnDragEnabled() const noexcept +void Viewport::setScrollOnDragMode (const ScrollOnDragMode mode) { - return dragToScrollListener != nullptr; + scrollOnDragMode = mode; } bool Viewport::isCurrentlyScrollingOnDrag() const noexcept { - return dragToScrollListener != nullptr && dragToScrollListener->isDragging; + return dragToScrollListener->isDragging; } //============================================================================== diff --git a/modules/juce_gui_basics/layout/juce_Viewport.h b/modules/juce_gui_basics/layout/juce_Viewport.h index 9738517f..77e6700b 100644 --- a/modules/juce_gui_basics/layout/juce_Viewport.h +++ b/modules/juce_gui_basics/layout/juce_Viewport.h @@ -271,16 +271,39 @@ public: */ bool canScrollHorizontally() const noexcept; - /** Enables or disables drag-to-scroll functionality in the viewport. + /** Enables or disables drag-to-scroll functionality for mouse sources in the viewport. If your viewport contains a Component that you don't want to receive mouse events when the user is drag-scrolling, you can disable this with the Component::setViewportIgnoreDragFlag() method. */ - void setScrollOnDragEnabled (bool shouldScrollOnDrag); + [[deprecated ("Use setScrollOnDragMode instead.")]] + void setScrollOnDragEnabled (bool shouldScrollOnDrag) + { + setScrollOnDragMode (shouldScrollOnDrag ? ScrollOnDragMode::all : ScrollOnDragMode::never); + } - /** Returns true if drag-to-scroll functionality is enabled. */ - bool isScrollOnDragEnabled() const noexcept; + /** Returns true if drag-to-scroll functionality is enabled for mouse input sources. */ + [[deprecated ("Use getScrollOnDragMode instead.")]] + bool isScrollOnDragEnabled() const noexcept { return getScrollOnDragMode() == ScrollOnDragMode::all; } + + enum class ScrollOnDragMode + { + never, /**< Dragging will never scroll the viewport. */ + nonHover, /**< Dragging will only scroll the viewport if the input source cannot hover. */ + all /**< Dragging will always scroll the viewport. */ + }; + + /** Sets the current scroll-on-drag mode. The default is ScrollOnDragMode::nonHover. + + If your viewport contains a Component that you don't want to receive mouse events when the + user is drag-scrolling, you can disable this with the Component::setViewportIgnoreDragFlag() + method. + */ + void setScrollOnDragMode (ScrollOnDragMode scrollOnDragMode); + + /** Returns the current scroll-on-drag mode. */ + ScrollOnDragMode getScrollOnDragMode() const { return scrollOnDragMode; } /** Returns true if the user is currently dragging-to-scroll. @see setScrollOnDragEnabled @@ -320,6 +343,7 @@ private: Rectangle lastVisibleArea; int scrollBarThickness = 0; int singleStepX = 16, singleStepY = 16; + ScrollOnDragMode scrollOnDragMode = ScrollOnDragMode::nonHover; bool showHScrollbar = true, showVScrollbar = true, deleteContent = true; bool customScrollBarThickness = false; bool allowScrollingWithoutScrollbarV = false, allowScrollingWithoutScrollbarH = false; diff --git a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.cpp b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.cpp index 7ea997de..bdbe6b97 100644 --- a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.cpp +++ b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.cpp @@ -2456,7 +2456,7 @@ Button* LookAndFeel_V2::createTabBarExtrasButton() overImage.addAndMakeVisible (ellipse.createCopy().release()); overImage.addAndMakeVisible (dp.createCopy().release()); - auto db = new DrawableButton ("tabs", DrawableButton::ImageFitted); + auto db = new DrawableButton (TRANS ("Additional Items"), DrawableButton::ImageFitted); db->setImages (&normalImage, &overImage, nullptr); return db; } diff --git a/modules/juce_gui_basics/menus/juce_PopupMenu.cpp b/modules/juce_gui_basics/menus/juce_PopupMenu.cpp index 22668e10..a03e01b6 100644 --- a/modules/juce_gui_basics/menus/juce_PopupMenu.cpp +++ b/modules/juce_gui_basics/menus/juce_PopupMenu.cpp @@ -541,6 +541,7 @@ struct MenuWindow : public Component auto resultID = options.hasWatchedComponentBeenDeleted() ? 0 : getResultItemID (item); exitModalState (resultID); + exitingModalState = true; if (makeInvisible && deletionChecker != nullptr) setVisible (false); @@ -739,6 +740,9 @@ struct MenuWindow : public Component if (! treeContains (currentlyModalWindow)) return false; + if (exitingModalState) + return false; + return true; } @@ -1323,6 +1327,7 @@ struct MenuWindow : public Component uint32 windowCreationTime, lastFocusedTime, timeEnteredCurrentChildComp; OwnedArray mouseSourceStates; float scaleFactor; + bool exitingModalState = false; JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MenuWindow) }; diff --git a/modules/juce_gui_basics/menus/juce_PopupMenu.h b/modules/juce_gui_basics/menus/juce_PopupMenu.h index 95677219..6bb4dcaa 100644 --- a/modules/juce_gui_basics/menus/juce_PopupMenu.h +++ b/modules/juce_gui_basics/menus/juce_PopupMenu.h @@ -483,8 +483,8 @@ public: @see withTargetComponent, withTargetScreenArea */ - Options withTargetComponent (Component* targetComponent) const; - Options withTargetComponent (Component& targetComponent) const; + JUCE_NODISCARD Options withTargetComponent (Component* targetComponent) const; + JUCE_NODISCARD Options withTargetComponent (Component& targetComponent) const; /** Sets the region of the screen next to which the menu should be displayed. @@ -500,7 +500,7 @@ public: @see withMousePosition */ - Options withTargetScreenArea (Rectangle targetArea) const; + JUCE_NODISCARD Options withTargetScreenArea (Rectangle targetArea) const; /** Sets the target screen area to match the current mouse position. @@ -508,7 +508,7 @@ public: @see withTargetScreenArea */ - Options withMousePosition() const; + JUCE_NODISCARD Options withMousePosition() const; /** If the passed component has been deleted when the popup menu exits, the selected item's action will not be called. @@ -517,26 +517,26 @@ public: callback, in the case that the callback needs to access a component that may be deleted. */ - Options withDeletionCheck (Component& componentToWatchForDeletion) const; + JUCE_NODISCARD Options withDeletionCheck (Component& componentToWatchForDeletion) const; /** Sets the minimum width of the popup window. */ - Options withMinimumWidth (int minWidth) const; + JUCE_NODISCARD Options withMinimumWidth (int minWidth) const; /** Sets the minimum number of columns in the popup window. */ - Options withMinimumNumColumns (int minNumColumns) const; + JUCE_NODISCARD Options withMinimumNumColumns (int minNumColumns) const; /** Sets the maximum number of columns in the popup window. */ - Options withMaximumNumColumns (int maxNumColumns) const; + JUCE_NODISCARD Options withMaximumNumColumns (int maxNumColumns) const; /** Sets the default height of each item in the popup menu. */ - Options withStandardItemHeight (int standardHeight) const; + JUCE_NODISCARD Options withStandardItemHeight (int standardHeight) const; /** Sets an item which must be visible when the menu is initially drawn. This is useful to ensure that a particular item is shown when the menu contains too many items to display on a single screen. */ - Options withItemThatMustBeVisible (int idOfItemToBeVisible) const; + JUCE_NODISCARD Options withItemThatMustBeVisible (int idOfItemToBeVisible) const; /** Sets a component that the popup menu will be drawn into. @@ -547,10 +547,10 @@ public: avoid this unwanted behaviour, but with the downside that the menu size will be constrained by the size of the parent component. */ - Options withParentComponent (Component* parentComponent) const; + JUCE_NODISCARD Options withParentComponent (Component* parentComponent) const; /** Sets the direction of the popup menu relative to the target screen area. */ - Options withPreferredPopupDirection (PopupDirection direction) const; + JUCE_NODISCARD Options withPreferredPopupDirection (PopupDirection direction) const; /** Sets an item to select in the menu. @@ -560,7 +560,7 @@ public: than needing to move the highlighted row down from the top of the menu each time it is opened. */ - Options withInitiallySelectedItem (int idOfItemToBeSelected) const; + JUCE_NODISCARD Options withInitiallySelectedItem (int idOfItemToBeSelected) const; //============================================================================== /** Gets the parent component. This may be nullptr if the Component has been deleted. diff --git a/modules/juce_gui_basics/mouse/juce_MouseEvent.cpp b/modules/juce_gui_basics/mouse/juce_MouseEvent.cpp index d0923b0a..47fd8b15 100644 --- a/modules/juce_gui_basics/mouse/juce_MouseEvent.cpp +++ b/modules/juce_gui_basics/mouse/juce_MouseEvent.cpp @@ -57,10 +57,6 @@ MouseEvent::MouseEvent (MouseInputSource inputSource, { } -MouseEvent::~MouseEvent() noexcept -{ -} - //============================================================================== MouseEvent MouseEvent::getEventRelativeTo (Component* const otherComponent) const noexcept { diff --git a/modules/juce_gui_basics/mouse/juce_MouseEvent.h b/modules/juce_gui_basics/mouse/juce_MouseEvent.h index d63c2a49..729a95d7 100644 --- a/modules/juce_gui_basics/mouse/juce_MouseEvent.h +++ b/modules/juce_gui_basics/mouse/juce_MouseEvent.h @@ -79,8 +79,11 @@ public: int numberOfClicks, bool mouseWasDragged) noexcept; - /** Destructor. */ - ~MouseEvent() noexcept; + MouseEvent (const MouseEvent&) = default; + MouseEvent& operator= (const MouseEvent&) = delete; + + MouseEvent (MouseEvent&&) = default; + MouseEvent& operator= (MouseEvent&&) = delete; //============================================================================== /** The position of the mouse when the event occurred. @@ -374,8 +377,6 @@ public: private: //============================================================================== const uint8 numberOfClicks, wasMovedSinceMouseDown; - - MouseEvent& operator= (const MouseEvent&); }; diff --git a/modules/juce_gui_basics/mouse/juce_MouseInputSource.cpp b/modules/juce_gui_basics/mouse/juce_MouseInputSource.cpp index 449e6530..a8ed7b02 100644 --- a/modules/juce_gui_basics/mouse/juce_MouseInputSource.cpp +++ b/modules/juce_gui_basics/mouse/juce_MouseInputSource.cpp @@ -57,18 +57,6 @@ public: return lastPeer; } - static Point screenPosToLocalPos (Component& comp, Point pos) - { - if (auto* peer = comp.getPeer()) - { - pos = peer->globalToLocal (pos); - auto& peerComp = peer->getComponent(); - return comp.getLocalPoint (&peerComp, ScalingHelpers::unscaledScreenPosToScaled (peerComp, pos)); - } - - return comp.getLocalPoint (nullptr, ScalingHelpers::unscaledScreenPosToScaled (comp, pos)); - } - Component* findComponentAt (Point screenPos) { if (auto* peer = getPeer()) @@ -95,7 +83,7 @@ public: Point getRawScreenPosition() const noexcept { return unboundedMouseOffset + (inputType != MouseInputSource::InputSourceType::touch ? MouseInputSource::getCurrentRawMousePosition() - : lastScreenPos); + : lastPointerState.position); } void setScreenPosition (Point p) @@ -103,78 +91,80 @@ public: MouseInputSource::setRawMousePosition (ScalingHelpers::scaledScreenPosToUnscaled (p)); } - bool isPressureValid() const noexcept { return pressure >= 0.0f && pressure <= 1.0f; } - bool isOrientationValid() const noexcept { return orientation >= 0.0f && orientation <= MathConstants::twoPi; } - bool isRotationValid() const noexcept { return rotation >= 0.0f && rotation <= MathConstants::twoPi; } - bool isTiltValid (bool isX) const noexcept { return isX ? (tiltX >= -1.0f && tiltX <= 1.0f) : (tiltY >= -1.0f && tiltY <= 1.0f); } - //============================================================================== #if JUCE_DUMP_MOUSE_EVENTS - #define JUCE_MOUSE_EVENT_DBG(desc) DBG ("Mouse " << desc << " #" << index \ - << ": " << screenPosToLocalPos (comp, screenPos).toString() \ - << " - Comp: " << String::toHexString ((pointer_sized_int) &comp)); + #define JUCE_MOUSE_EVENT_DBG(desc, screenPos) DBG ("Mouse " << desc << " #" << index \ + << ": " << ScalingHelpers::screenPosToLocalPos (comp, screenPos).toString() \ + << " - Comp: " << String::toHexString ((pointer_sized_int) &comp)); #else - #define JUCE_MOUSE_EVENT_DBG(desc) + #define JUCE_MOUSE_EVENT_DBG(desc, screenPos) #endif - void sendMouseEnter (Component& comp, Point screenPos, Time time) + void sendMouseEnter (Component& comp, const PointerState& pointerState, Time time) { - JUCE_MOUSE_EVENT_DBG ("enter") - comp.internalMouseEnter (MouseInputSource (this), screenPosToLocalPos (comp, screenPos), time); + JUCE_MOUSE_EVENT_DBG ("enter", pointerState.position) + comp.internalMouseEnter (MouseInputSource (this), ScalingHelpers::screenPosToLocalPos (comp, pointerState.position), time); } - void sendMouseExit (Component& comp, Point screenPos, Time time) + void sendMouseExit (Component& comp, const PointerState& pointerState, Time time) { - JUCE_MOUSE_EVENT_DBG ("exit") - comp.internalMouseExit (MouseInputSource (this), screenPosToLocalPos (comp, screenPos), time); + JUCE_MOUSE_EVENT_DBG ("exit", pointerState.position) + comp.internalMouseExit (MouseInputSource (this), ScalingHelpers::screenPosToLocalPos (comp, pointerState.position), time); } - void sendMouseMove (Component& comp, Point screenPos, Time time) + void sendMouseMove (Component& comp, const PointerState& pointerState, Time time) { - JUCE_MOUSE_EVENT_DBG ("move") - comp.internalMouseMove (MouseInputSource (this), screenPosToLocalPos (comp, screenPos), time); + JUCE_MOUSE_EVENT_DBG ("move", pointerState.position) + comp.internalMouseMove (MouseInputSource (this), ScalingHelpers::screenPosToLocalPos (comp, pointerState.position), time); } - void sendMouseDown (Component& comp, Point screenPos, Time time) + void sendMouseDown (Component& comp, const PointerState& pointerState, Time time) { - JUCE_MOUSE_EVENT_DBG ("down") - comp.internalMouseDown (MouseInputSource (this), screenPosToLocalPos (comp, screenPos), time, pressure, orientation, rotation, tiltX, tiltY); + JUCE_MOUSE_EVENT_DBG ("down", pointerState.position) + comp.internalMouseDown (MouseInputSource (this), + pointerState.withPosition (ScalingHelpers::screenPosToLocalPos (comp, pointerState.position)), + time); } - void sendMouseDrag (Component& comp, Point screenPos, Time time) + void sendMouseDrag (Component& comp, const PointerState& pointerState, Time time) { - JUCE_MOUSE_EVENT_DBG ("drag") - comp.internalMouseDrag (MouseInputSource (this), screenPosToLocalPos (comp, screenPos), time, pressure, orientation, rotation, tiltX, tiltY); + JUCE_MOUSE_EVENT_DBG ("drag", pointerState.position) + comp.internalMouseDrag (MouseInputSource (this), + pointerState.withPosition (ScalingHelpers::screenPosToLocalPos (comp, pointerState.position)), + time); } - void sendMouseUp (Component& comp, Point screenPos, Time time, ModifierKeys oldMods) + void sendMouseUp (Component& comp, const PointerState& pointerState, Time time, ModifierKeys oldMods) { - JUCE_MOUSE_EVENT_DBG ("up") - comp.internalMouseUp (MouseInputSource (this), screenPosToLocalPos (comp, screenPos), time, oldMods, pressure, orientation, rotation, tiltX, tiltY); + JUCE_MOUSE_EVENT_DBG ("up", pointerState.position) + comp.internalMouseUp (MouseInputSource (this), + pointerState.withPosition (ScalingHelpers::screenPosToLocalPos (comp, pointerState.position)), + time, + oldMods); } void sendMouseWheel (Component& comp, Point screenPos, Time time, const MouseWheelDetails& wheel) { - JUCE_MOUSE_EVENT_DBG ("wheel") - comp.internalMouseWheel (MouseInputSource (this), screenPosToLocalPos (comp, screenPos), time, wheel); + JUCE_MOUSE_EVENT_DBG ("wheel", screenPos) + comp.internalMouseWheel (MouseInputSource (this), ScalingHelpers::screenPosToLocalPos (comp, screenPos), time, wheel); } void sendMagnifyGesture (Component& comp, Point screenPos, Time time, float amount) { - JUCE_MOUSE_EVENT_DBG ("magnify") - comp.internalMagnifyGesture (MouseInputSource (this), screenPosToLocalPos (comp, screenPos), time, amount); + JUCE_MOUSE_EVENT_DBG ("magnify", screenPos) + comp.internalMagnifyGesture (MouseInputSource (this), ScalingHelpers::screenPosToLocalPos (comp, screenPos), time, amount); } //============================================================================== // (returns true if the button change caused a modal event loop) - bool setButtons (Point screenPos, Time time, ModifierKeys newButtonState) + bool setButtons (const PointerState& pointerState, Time time, ModifierKeys newButtonState) { if (buttonState == newButtonState) return false; // (avoid sending a spurious mouse-drag when we receive a mouse-up) if (! (isDragging() && ! newButtonState.isAnyMouseButtonDown())) - setScreenPos (screenPos, time, false); + setPointerState (pointerState, time, false); // (ignore secondary clicks when there's already a button down) if (buttonState.isAnyMouseButtonDown() == newButtonState.isAnyMouseButtonDown()) @@ -192,7 +182,7 @@ public: auto oldMods = getCurrentModifiers(); buttonState = newButtonState; // must change this before calling sendMouseUp, in case it runs a modal loop - sendMouseUp (*current, screenPos + unboundedMouseOffset, time, oldMods); + sendMouseUp (*current, pointerState.withPositionOffset (unboundedMouseOffset), time, oldMods); if (lastCounter != mouseEventCounter) return true; // if a modal loop happened, then newButtonState is no longer valid. @@ -209,16 +199,16 @@ public: if (auto* current = getComponentUnderMouse()) { - registerMouseDown (screenPos, time, *current, buttonState, + registerMouseDown (pointerState.position, time, *current, buttonState, inputType == MouseInputSource::InputSourceType::touch); - sendMouseDown (*current, screenPos, time); + sendMouseDown (*current, pointerState, time); } } return lastCounter != mouseEventCounter; } - void setComponentUnderMouse (Component* newComponent, Point screenPos, Time time) + void setComponentUnderMouse (Component* newComponent, const PointerState& pointerState, Time time) { auto* current = getComponentUnderMouse(); @@ -230,12 +220,12 @@ public: if (current != nullptr) { WeakReference safeOldComp (current); - setButtons (screenPos, time, ModifierKeys()); + setButtons (pointerState, time, ModifierKeys()); if (auto oldComp = safeOldComp.get()) { componentUnderMouse = safeNewComp; - sendMouseExit (*oldComp, screenPos, time); + sendMouseExit (*oldComp, pointerState, time); } buttonState = originalButtonState; @@ -245,48 +235,50 @@ public: current = safeNewComp.get(); if (current != nullptr) - sendMouseEnter (*current, screenPos, time); + sendMouseEnter (*current, pointerState, time); revealCursor (false); - setButtons (screenPos, time, originalButtonState); + setButtons (pointerState, time, originalButtonState); } } - void setPeer (ComponentPeer& newPeer, Point screenPos, Time time) + void setPeer (ComponentPeer& newPeer, const PointerState& pointerState, Time time) { if (&newPeer != lastPeer) { - setComponentUnderMouse (nullptr, screenPos, time); + setComponentUnderMouse (nullptr, pointerState, time); lastPeer = &newPeer; - setComponentUnderMouse (findComponentAt (screenPos), screenPos, time); + setComponentUnderMouse (findComponentAt (pointerState.position), pointerState, time); } } - void setScreenPos (Point newScreenPos, Time time, bool forceUpdate) + void setPointerState (const PointerState& newPointerState, Time time, bool forceUpdate) { + const auto& newScreenPos = newPointerState.position; + if (! isDragging()) - setComponentUnderMouse (findComponentAt (newScreenPos), newScreenPos, time); + setComponentUnderMouse (findComponentAt (newScreenPos), newPointerState, time); - if (newScreenPos != lastScreenPos || forceUpdate) + if ((newPointerState != lastPointerState) || forceUpdate) { cancelPendingUpdate(); - if (newScreenPos != MouseInputSource::offscreenMousePos) - lastScreenPos = newScreenPos; + if (newPointerState.position != MouseInputSource::offscreenMousePos) + lastPointerState = newPointerState; if (auto* current = getComponentUnderMouse()) { if (isDragging()) { registerMouseDrag (newScreenPos); - sendMouseDrag (*current, newScreenPos + unboundedMouseOffset, time); + sendMouseDrag (*current, newPointerState.withPositionOffset (unboundedMouseOffset), time); if (isUnboundedMouseModeOn) handleUnboundedDrag (*current); } else { - sendMouseMove (*current, newScreenPos, time); + sendMouseMove (*current, newPointerState, time); } } @@ -299,43 +291,31 @@ public: const ModifierKeys newMods, float newPressure, float newOrientation, PenDetails pen) { lastTime = time; - - const bool pressureChanged = (pressure != newPressure); - pressure = newPressure; - - const bool orientationChanged = (orientation != newOrientation); - orientation = newOrientation; - - const bool rotationChanged = (rotation != pen.rotation); - rotation = pen.rotation; - - const bool tiltChanged = (tiltX != pen.tiltX || tiltY != pen.tiltY); - tiltX = pen.tiltX; - tiltY = pen.tiltY; - - const bool shouldUpdate = (pressureChanged || orientationChanged || rotationChanged || tiltChanged); - ++mouseEventCounter; - - auto screenPos = newPeer.localToGlobal (positionWithinPeer); + const auto pointerState = PointerState().withPosition (newPeer.localToGlobal (positionWithinPeer)) + .withPressure (newPressure) + .withOrientation (newOrientation) + .withRotation (MouseInputSource::defaultRotation) + .withTiltX (pen.tiltX) + .withTiltY (pen.tiltY); if (isDragging() && newMods.isAnyMouseButtonDown()) { - setScreenPos (screenPos, time, shouldUpdate); + setPointerState (pointerState, time, false); } else { - setPeer (newPeer, screenPos, time); + setPeer (newPeer, pointerState, time); if (auto* peer = getPeer()) { - if (setButtons (screenPos, time, newMods)) + if (setButtons (pointerState, time, newMods)) return; // some modal events have been dispatched, so the current event is now out-of-date peer = getPeer(); if (peer != nullptr) - setScreenPos (screenPos, time, shouldUpdate); + setPointerState (pointerState, time, false); } } } @@ -347,8 +327,9 @@ public: ++mouseEventCounter; screenPos = peer.localToGlobal (positionWithinPeer); - setPeer (peer, screenPos, time); - setScreenPos (screenPos, time, false); + const auto pointerState = lastPointerState.withPosition (screenPos); + setPeer (peer, pointerState, time); + setPointerState (pointerState, time, false); triggerFakeMove(); return getComponentUnderMouse(); @@ -428,7 +409,7 @@ public: void handleAsyncUpdate() override { - setScreenPos (lastScreenPos, jmax (lastTime, Time::getCurrentTime()), true); + setPointerState (lastPointerState, jmax (lastTime, Time::getCurrentTime()), true); } //============================================================================== @@ -444,7 +425,7 @@ public: // when released, return the mouse to within the component's bounds if (auto* current = getComponentUnderMouse()) setScreenPosition (current->getScreenBounds().toFloat() - .getConstrainedPoint (ScalingHelpers::unscaledScreenPosToScaled (lastScreenPos))); + .getConstrainedPoint (ScalingHelpers::unscaledScreenPosToScaled (lastPointerState.position))); } isUnboundedMouseModeOn = enable; @@ -458,17 +439,17 @@ public: { auto componentScreenBounds = ScalingHelpers::scaledScreenPosToUnscaled (current.getParentMonitorArea().reduced (2, 2).toFloat()); - if (! componentScreenBounds.contains (lastScreenPos)) + if (! componentScreenBounds.contains (lastPointerState.position)) { auto componentCentre = current.getScreenBounds().toFloat().getCentre(); - unboundedMouseOffset += (lastScreenPos - ScalingHelpers::scaledScreenPosToUnscaled (componentCentre)); + unboundedMouseOffset += (lastPointerState.position - ScalingHelpers::scaledScreenPosToUnscaled (componentCentre)); setScreenPosition (componentCentre); } else if (isCursorVisibleUntilOffscreen && (! unboundedMouseOffset.isOrigin()) - && componentScreenBounds.contains (lastScreenPos + unboundedMouseOffset)) + && componentScreenBounds.contains (lastPointerState.position + unboundedMouseOffset)) { - MouseInputSource::setRawMousePosition (lastScreenPos + unboundedMouseOffset); + MouseInputSource::setRawMousePosition (lastPointerState.position + unboundedMouseOffset); unboundedMouseOffset = {}; } } @@ -507,13 +488,9 @@ public: //============================================================================== const int index; const MouseInputSource::InputSourceType inputType; - Point lastScreenPos, unboundedMouseOffset; // NB: these are unscaled coords + Point unboundedMouseOffset; // NB: these are unscaled coords + PointerState lastPointerState; ModifierKeys buttonState; - float pressure = 0; - float orientation = 0; - float rotation = 0; - float tiltX = 0; - float tiltY = 0; bool isUnboundedMouseModeOn = false, isCursorVisibleUntilOffscreen = false; @@ -600,14 +577,14 @@ bool MouseInputSource::isDragging() const noexcept Point MouseInputSource::getScreenPosition() const noexcept { return pimpl->getScreenPosition(); } Point MouseInputSource::getRawScreenPosition() const noexcept { return pimpl->getRawScreenPosition(); } ModifierKeys MouseInputSource::getCurrentModifiers() const noexcept { return pimpl->getCurrentModifiers(); } -float MouseInputSource::getCurrentPressure() const noexcept { return pimpl->pressure; } -bool MouseInputSource::isPressureValid() const noexcept { return pimpl->isPressureValid(); } -float MouseInputSource::getCurrentOrientation() const noexcept { return pimpl->orientation; } -bool MouseInputSource::isOrientationValid() const noexcept { return pimpl->isOrientationValid(); } -float MouseInputSource::getCurrentRotation() const noexcept { return pimpl->rotation; } -bool MouseInputSource::isRotationValid() const noexcept { return pimpl->isRotationValid(); } -float MouseInputSource::getCurrentTilt (bool tiltX) const noexcept { return tiltX ? pimpl->tiltX : pimpl->tiltY; } -bool MouseInputSource::isTiltValid (bool isX) const noexcept { return pimpl->isTiltValid (isX); } +float MouseInputSource::getCurrentPressure() const noexcept { return pimpl->lastPointerState.pressure; } +bool MouseInputSource::isPressureValid() const noexcept { return pimpl->lastPointerState.isPressureValid(); } +float MouseInputSource::getCurrentOrientation() const noexcept { return pimpl->lastPointerState.orientation; } +bool MouseInputSource::isOrientationValid() const noexcept { return pimpl->lastPointerState.isOrientationValid(); } +float MouseInputSource::getCurrentRotation() const noexcept { return pimpl->lastPointerState.rotation; } +bool MouseInputSource::isRotationValid() const noexcept { return pimpl->lastPointerState.isRotationValid(); } +float MouseInputSource::getCurrentTilt (bool tiltX) const noexcept { return tiltX ? pimpl->lastPointerState.tiltX : pimpl->lastPointerState.tiltY; } +bool MouseInputSource::isTiltValid (bool isX) const noexcept { return pimpl->lastPointerState.isTiltValid (isX); } Component* MouseInputSource::getComponentUnderMouse() const { return pimpl->getComponentUnderMouse(); } void MouseInputSource::triggerFakeMove() const { pimpl->triggerFakeMove(); } int MouseInputSource::getNumberOfMultipleClicks() const noexcept { return pimpl->getNumberOfMultipleClicks(); } @@ -698,7 +675,7 @@ struct MouseInputSource::SourceList : public Timer } else if (type == MouseInputSource::InputSourceType::touch) { - jassert (touchIndex >= 0 && touchIndex < 100); // sanity-check on number of fingers + jassert (0 <= touchIndex && touchIndex < 100); // sanity-check on number of fingers for (auto& m : sourceArray) if (type == m.getType() && touchIndex == m.getIndex()) @@ -763,7 +740,7 @@ struct MouseInputSource::SourceList : public Timer // because on some OSes the queue can get overloaded with messages so that mouse-events don't get through.. if (s->isDragging() && ComponentPeer::getCurrentModifiersRealtime().isAnyMouseButtonDown()) { - s->lastScreenPos = s->getRawScreenPosition(); + s->lastPointerState.position = s->getRawScreenPosition(); s->triggerFakeMove(); anyDragging = true; } diff --git a/modules/juce_gui_basics/mouse/juce_MouseInputSource.h b/modules/juce_gui_basics/mouse/juce_MouseInputSource.h index 736b8ec7..07a7358e 100644 --- a/modules/juce_gui_basics/mouse/juce_MouseInputSource.h +++ b/modules/juce_gui_basics/mouse/juce_MouseInputSource.h @@ -224,16 +224,50 @@ public: /** A default value for pressure, which is used when a device doesn't support it, or for mouse-moves, mouse-ups, etc. */ - static const float invalidPressure; + static constexpr float defaultPressure = 0.0f; /** A default value for orientation, which is used when a device doesn't support it */ - static const float invalidOrientation; + static constexpr float defaultOrientation = 0.0f; /** A default value for rotation, which is used when a device doesn't support it */ - static const float invalidRotation; + static constexpr float defaultRotation = 0.0f; /** Default values for tilt, which are used when a device doesn't support it */ + static constexpr float defaultTiltX = 0.0f; + static constexpr float defaultTiltY = 0.0f; + + /** A default value for pressure, which is used when a device doesn't support it. + + This is a valid value, returning true when calling isPressureValid() hence the + deprecation. Use defaultPressure instead. + */ + [[deprecated ("Use defaultPressure instead.")]] + static const float invalidPressure; + + /** A default value for orientation, which is used when a device doesn't support it. + + This is a valid value, returning true when calling isOrientationValid() hence the + deprecation. Use defaultOrientation instead. + */ + [[deprecated ("Use defaultOrientation instead.")]] + static const float invalidOrientation; + + /** A default value for rotation, which is used when a device doesn't support it. + + This is a valid value, returning true when calling isRotationValid() hence the + deprecation. Use defaultRotation instead. + */ + [[deprecated ("Use defaultRotation instead.")]] + static const float invalidRotation; + + /** Default values for tilt, which are used when a device doesn't support it + + These are valid values, returning true when calling isTiltValid() hence the + deprecation. Use defaultTiltX and defaultTiltY instead. + */ + [[deprecated ("Use defaultTiltX instead.")]] static const float invalidTiltX; + [[deprecated ("Use defaultTiltY instead.")]] static const float invalidTiltY; /** An offscreen mouse position used when triggering mouse exits where we don't want to move diff --git a/modules/juce_gui_basics/mouse/juce_PointerState.h b/modules/juce_gui_basics/mouse/juce_PointerState.h new file mode 100644 index 00000000..767d6f01 --- /dev/null +++ b/modules/juce_gui_basics/mouse/juce_PointerState.h @@ -0,0 +1,109 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2020 - Raw Material Software Limited + + JUCE is an open source library subject to commercial or open-source + licensing. + + By using JUCE, you agree to the terms of both the JUCE 6 End-User License + Agreement and JUCE Privacy Policy (both effective as of the 16th June 2020). + + End User License Agreement: www.juce.com/juce-6-licence + Privacy Policy: www.juce.com/juce-privacy-policy + + Or: You may also use this code under the terms of the GPL v3 (see + www.gnu.org/licenses). + + JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER + EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE + DISCLAIMED. + + ============================================================================== +*/ + +namespace juce +{ + +#ifndef DOXYGEN + +class PointerState +{ + auto tie() const noexcept + { + return std::tie (position, pressure, orientation, rotation, tiltX, tiltY); + } + +public: + PointerState() = default; + + bool operator== (const PointerState& other) const noexcept { return tie() == other.tie(); } + bool operator!= (const PointerState& other) const noexcept { return tie() != other.tie(); } + + JUCE_NODISCARD PointerState withPositionOffset (Point x) const noexcept { return with (&PointerState::position, position + x); } + JUCE_NODISCARD PointerState withPosition (Point x) const noexcept { return with (&PointerState::position, x); } + JUCE_NODISCARD PointerState withPressure (float x) const noexcept { return with (&PointerState::pressure, x); } + JUCE_NODISCARD PointerState withOrientation (float x) const noexcept { return with (&PointerState::orientation, x); } + JUCE_NODISCARD PointerState withRotation (float x) const noexcept { return with (&PointerState::rotation, x); } + JUCE_NODISCARD PointerState withTiltX (float x) const noexcept { return with (&PointerState::tiltX, x); } + JUCE_NODISCARD PointerState withTiltY (float x) const noexcept { return with (&PointerState::tiltY, x); } + + Point position; + float pressure = MouseInputSource::defaultPressure; + float orientation = MouseInputSource::defaultOrientation; + float rotation = MouseInputSource::defaultRotation; + float tiltX = MouseInputSource::defaultTiltX; + float tiltY = MouseInputSource::defaultTiltY; + + bool isPressureValid() const noexcept { return 0.0f <= pressure && pressure <= 1.0f; } + bool isOrientationValid() const noexcept { return 0.0f <= orientation && orientation <= MathConstants::twoPi; } + bool isRotationValid() const noexcept { return 0.0f <= rotation && rotation <= MathConstants::twoPi; } + bool isTiltValid (bool isX) const noexcept + { + return isX ? (-1.0f <= tiltX && tiltX <= 1.0f) + : (-1.0f <= tiltY && tiltY <= 1.0f); + } + +private: + template + PointerState with (Value PointerState::* member, Value item) const + { + auto copy = *this; + copy.*member = std::move (item); + return copy; + } +}; + +inline auto makeMouseEvent (MouseInputSource source, + const PointerState& ps, + ModifierKeys modifiers, + Component* eventComponent, + Component* originator, + Time eventTime, + Point mouseDownPos, + Time mouseDownTime, + int numberOfClicks, + bool mouseWasDragged) +{ + return MouseEvent (source, + ps.position, + modifiers, + ps.pressure, + ps.orientation, + ps.rotation, + ps.tiltX, + ps.tiltY, + eventComponent, + originator, + eventTime, + mouseDownPos, + mouseDownTime, + numberOfClicks, + mouseWasDragged); +} + + +#endif + +} // namespace juce diff --git a/modules/juce_gui_basics/native/accessibility/juce_AccessibilityTextHelpers.h b/modules/juce_gui_basics/native/accessibility/juce_AccessibilityTextHelpers.h index 3c74b331..a519fd32 100644 --- a/modules/juce_gui_basics/native/accessibility/juce_AccessibilityTextHelpers.h +++ b/modules/juce_gui_basics/native/accessibility/juce_AccessibilityTextHelpers.h @@ -50,12 +50,12 @@ namespace AccessibilityTextHelpers const auto numCharacters = textInterface.getTotalNumCharacters(); const auto isForwards = (direction == Direction::forwards); - auto offsetWithDirecton = [isForwards] (int input) { return isForwards ? input : -input; }; + const auto offsetWithDirecton = [isForwards] (int input) { return isForwards ? input : -input; }; switch (boundary) { case BoundaryType::character: - return jlimit (0, numCharacters, currentPosition + offsetWithDirecton (1)); + return jlimit (0, numCharacters, isForwards ? currentPosition + 1 : currentPosition); case BoundaryType::word: case BoundaryType::line: diff --git a/modules/juce_gui_basics/native/accessibility/juce_ios_Accessibility.mm b/modules/juce_gui_basics/native/accessibility/juce_ios_Accessibility.mm index eacd2753..3efbc9dc 100644 --- a/modules/juce_gui_basics/native/accessibility/juce_ios_Accessibility.mm +++ b/modules/juce_gui_basics/native/accessibility/juce_ios_Accessibility.mm @@ -225,8 +225,11 @@ private: addMethod (@selector (accessibilityDataTableCellElementForRow:column:), getAccessibilityDataTableCellElementForRowColumn); addMethod (@selector (accessibilityRowCount), getAccessibilityRowCount); addMethod (@selector (accessibilityColumnCount), getAccessibilityColumnCount); + addProtocol (@protocol (UIAccessibilityContainerDataTable)); + addMethod (@selector (accessibilityRowRange), getAccessibilityRowIndexRange); addMethod (@selector (accessibilityColumnRange), getAccessibilityColumnIndexRange); + addProtocol (@protocol (UIAccessibilityContainerDataTableCell)); } #endif @@ -435,7 +438,7 @@ private: static id getAccessibilityDataTableCellElementForRowColumn (id self, SEL, NSUInteger row, NSUInteger column) { - if (auto* tableInterface = getTableInterface (self)) + if (auto* tableInterface = getEnclosingInterface (getHandler (self), &AccessibilityHandler::getTableInterface)) if (auto* cellHandler = tableInterface->getCellHandler ((int) row, (int) column)) return (id) cellHandler->getNativeImplementation(); diff --git a/modules/juce_gui_basics/native/accessibility/juce_mac_AccessibilitySharedCode.mm b/modules/juce_gui_basics/native/accessibility/juce_mac_AccessibilitySharedCode.mm index b188848f..15e79845 100644 --- a/modules/juce_gui_basics/native/accessibility/juce_mac_AccessibilitySharedCode.mm +++ b/modules/juce_gui_basics/native/accessibility/juce_mac_AccessibilitySharedCode.mm @@ -71,6 +71,18 @@ protected: static AccessibilityTableInterface* getTableInterface (id self) noexcept { return getInterface (self, &AccessibilityHandler::getTableInterface); } static AccessibilityCellInterface* getCellInterface (id self) noexcept { return getInterface (self, &AccessibilityHandler::getCellInterface); } + template + static auto getEnclosingInterface (AccessibilityHandler* handler, MemberFn fn) noexcept -> decltype ((std::declval().*fn)()) + { + if (handler == nullptr) + return nullptr; + + if (auto* interface = (handler->*fn)()) + return interface; + + return getEnclosingInterface (handler->getParent(), fn); + } + static bool hasEditableText (AccessibilityHandler& handler) noexcept { return handler.getRole() == AccessibilityRole::editableText diff --git a/modules/juce_gui_basics/native/accessibility/juce_win32_Accessibility.cpp b/modules/juce_gui_basics/native/accessibility/juce_win32_Accessibility.cpp index a116d1aa..78d521eb 100644 --- a/modules/juce_gui_basics/native/accessibility/juce_win32_Accessibility.cpp +++ b/modules/juce_gui_basics/native/accessibility/juce_win32_Accessibility.cpp @@ -73,7 +73,7 @@ public: { uiaWrapper->disconnectProvider (provider); - if (providerCount == 0) + if (providerCount == 0 && JUCEApplicationBase::isStandaloneApp()) uiaWrapper->disconnectAllProviders(); } } diff --git a/modules/juce_gui_basics/native/juce_android_Windowing.cpp b/modules/juce_gui_basics/native/juce_android_Windowing.cpp index a6ba22a5..7609d018 100644 --- a/modules/juce_gui_basics/native/juce_android_Windowing.cpp +++ b/modules/juce_gui_basics/native/juce_android_Windowing.cpp @@ -631,6 +631,12 @@ public: (float) localPos.y * scale)); } + OptionalBorderSize getFrameSizeIfPresent() const override + { + // TODO + return {}; + } + BorderSize getFrameSize() const override { // TODO @@ -673,8 +679,8 @@ public: handleMouseEvent (MouseInputSource::InputSourceType::touch, pos, ModifierKeys::currentModifiers.withoutMouseButtons(), - MouseInputSource::invalidPressure, - MouseInputSource::invalidOrientation, + MouseInputSource::defaultPressure, + MouseInputSource::defaultOrientation, time, {}, index); @@ -696,8 +702,8 @@ public: handleMouseEvent (MouseInputSource::InputSourceType::touch, pos, ModifierKeys::currentModifiers.withoutMouseButtons().withFlags (ModifierKeys::leftButtonModifier), - MouseInputSource::invalidPressure, - MouseInputSource::invalidOrientation, + MouseInputSource::defaultPressure, + MouseInputSource::defaultOrientation, time, {}, index); @@ -717,8 +723,8 @@ public: handleMouseEvent (MouseInputSource::InputSourceType::touch, pos, ModifierKeys::currentModifiers.withoutMouseButtons(), - MouseInputSource::invalidPressure, - MouseInputSource::invalidOrientation, + MouseInputSource::defaultPressure, + MouseInputSource::defaultOrientation, time, {}, index); @@ -1207,7 +1213,9 @@ private: bm.lineStride = width * static_cast (sizeof (jint)); bm.pixelStride = static_cast (sizeof (jint)); bm.pixelFormat = Image::ARGB; - bm.data = (uint8*) (data + x + y * width); + const auto offset = (size_t) x + (size_t) y * (size_t) width; + bm.data = (uint8*) (data + offset); + bm.size = sizeof (jint) * (((size_t) height * (size_t) width) - offset); } ImagePixelData::Ptr clone() override diff --git a/modules/juce_gui_basics/native/juce_ios_UIViewComponentPeer.mm b/modules/juce_gui_basics/native/juce_ios_UIViewComponentPeer.mm index 8ff1ddfc..5f7ffdf4 100644 --- a/modules/juce_gui_basics/native/juce_ios_UIViewComponentPeer.mm +++ b/modules/juce_gui_basics/native/juce_ios_UIViewComponentPeer.mm @@ -211,24 +211,25 @@ public: controller = [newController retain]; } - Rectangle getBounds() const override { return getBounds (! isSharedWindow); } + Rectangle getBounds() const override { return getBounds (! isSharedWindow); } Rectangle getBounds (bool global) const; Point localToGlobal (Point relativePosition) override; Point globalToLocal (Point screenPosition) override; using ComponentPeer::localToGlobal; using ComponentPeer::globalToLocal; void setAlpha (float newAlpha) override; - void setMinimised (bool) override {} - bool isMinimised() const override { return false; } + void setMinimised (bool) override {} + bool isMinimised() const override { return false; } void setFullScreen (bool shouldBeFullScreen) override; - bool isFullScreen() const override { return fullScreen; } + bool isFullScreen() const override { return fullScreen; } bool contains (Point localPos, bool trueIfInAChildWindow) const override; - BorderSize getFrameSize() const override { return BorderSize(); } + OptionalBorderSize getFrameSizeIfPresent() const override { return {}; } + BorderSize getFrameSize() const override { return BorderSize(); } bool setAlwaysOnTop (bool alwaysOnTop) override; void toFront (bool makeActiveWindow) override; void toBehind (ComponentPeer* other) override; void setIcon (const Image& newIcon) override; - StringArray getAvailableRenderingEngines() override { return StringArray ("CoreGraphics Renderer"); } + StringArray getAvailableRenderingEngines() override { return StringArray ("CoreGraphics Renderer"); } void drawRect (CGRect); bool canBecomeKeyWindow(); @@ -957,7 +958,7 @@ void UIViewComponentPeer::handleTouches (UIEvent* event, MouseEventFlags mouseEv // this forces a mouse-enter/up event, in case for some reason we didn't get a mouse-up before. handleMouseEvent (MouseInputSource::InputSourceType::touch, pos, modsToSend.withoutMouseButtons(), - MouseInputSource::invalidPressure, MouseInputSource::invalidOrientation, time, {}, touchIndex); + MouseInputSource::defaultPressure, MouseInputSource::defaultOrientation, time, {}, touchIndex); if (! isValidPeer (this)) // (in case this component was deleted by the event) return; @@ -982,10 +983,10 @@ void UIViewComponentPeer::handleTouches (UIEvent* event, MouseEventFlags mouseEv // NB: some devices return 0 or 1.0 if pressure is unknown, so we'll clip our value to a believable range: auto pressure = maximumForce > 0 ? jlimit (0.0001f, 0.9999f, getTouchForce (touch) / maximumForce) - : MouseInputSource::invalidPressure; + : MouseInputSource::defaultPressure; handleMouseEvent (MouseInputSource::InputSourceType::touch, - pos, modsToSend, pressure, MouseInputSource::invalidOrientation, time, { }, touchIndex); + pos, modsToSend, pressure, MouseInputSource::defaultOrientation, time, { }, touchIndex); if (! isValidPeer (this)) // (in case this component was deleted by the event) return; @@ -993,7 +994,7 @@ void UIViewComponentPeer::handleTouches (UIEvent* event, MouseEventFlags mouseEv if (isUp (mouseEventFlags)) { handleMouseEvent (MouseInputSource::InputSourceType::touch, MouseInputSource::offscreenMousePos, modsToSend, - MouseInputSource::invalidPressure, MouseInputSource::invalidOrientation, time, {}, touchIndex); + MouseInputSource::defaultPressure, MouseInputSource::defaultOrientation, time, {}, touchIndex); if (! isValidPeer (this)) return; @@ -1010,7 +1011,7 @@ void UIViewComponentPeer::onHover (UIHoverGestureRecognizer* gesture) handleMouseEvent (MouseInputSource::InputSourceType::touch, pos, ModifierKeys::currentModifiers, - MouseInputSource::invalidPressure, MouseInputSource::invalidOrientation, + MouseInputSource::defaultPressure, MouseInputSource::defaultOrientation, UIViewComponentPeer::getMouseTime ([[NSProcessInfo processInfo] systemUptime]), {}); } diff --git a/modules/juce_gui_basics/native/juce_linux_Windowing.cpp b/modules/juce_gui_basics/native/juce_linux_Windowing.cpp index e81cc47d..58cd7163 100644 --- a/modules/juce_gui_basics/native/juce_linux_Windowing.cpp +++ b/modules/juce_gui_basics/native/juce_linux_Windowing.cpp @@ -141,11 +141,17 @@ public: return bounds; } - BorderSize getFrameSize() const override + OptionalBorderSize getFrameSizeIfPresent() const override { return windowBorder; } + BorderSize getFrameSize() const override + { + const auto optionalBorderSize = getFrameSizeIfPresent(); + return optionalBorderSize ? (*optionalBorderSize) : BorderSize(); + } + Point localToGlobal (Point relativePosition) override { return relativePosition + getScreenPosition (false).toFloat(); @@ -362,9 +368,14 @@ public: void updateBorderSize() { if ((styleFlags & windowHasTitleBar) == 0) - windowBorder = {}; - else if (windowBorder.getTopAndBottom() == 0 && windowBorder.getLeftAndRight() == 0) + { + windowBorder = ComponentPeer::OptionalBorderSize { BorderSize() }; + } + else if (! windowBorder + || ((*windowBorder).getTopAndBottom() == 0 && (*windowBorder).getLeftAndRight() == 0)) + { windowBorder = XWindowSystem::getInstance()->getBorderSize (windowH); + } } //============================================================================== @@ -504,7 +515,7 @@ private: ::Window windowH = {}, parentWindow = {}; Rectangle bounds; - BorderSize windowBorder; + ComponentPeer::OptionalBorderSize windowBorder; bool fullScreen = false, isAlwaysOnTop = false; double currentScaleFactor = 1.0; Array glRepaintListeners; diff --git a/modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm b/modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm index 1ed8e31a..902e8f13 100644 --- a/modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm +++ b/modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm @@ -126,10 +126,11 @@ public: | NSTrackingEnabledDuringMouseDrag | NSTrackingActiveAlways | NSTrackingInVisibleRect; - [view addTrackingArea: [[NSTrackingArea alloc] initWithRect: r - options: options - owner: view - userInfo: nil]]; + const NSUniquePtr trackingArea { [[NSTrackingArea alloc] initWithRect: r + options: options + owner: view + userInfo: nil] }; + [view addTrackingArea: trackingArea.get()]; notificationCenter = [NSNotificationCenter defaultCenter]; @@ -429,20 +430,14 @@ public: if (isSharedWindow) return; - setCollectionBehaviour (shouldBeFullScreen); + if (shouldBeFullScreen) + setCollectionBehaviour (true); if (isMinimised()) setMinimised (false); - if (hasNativeTitleBar()) - { - if (shouldBeFullScreen != isFullScreen()) - [window toggleFullScreen: nil]; - } - else - { - [window zoom: nil]; - } + if (shouldBeFullScreen != isFullScreen()) + [window toggleFullScreen: nil]; } bool isFullScreen() const override @@ -493,12 +488,12 @@ public: : (v == view); } - BorderSize getFrameSize() const override + OptionalBorderSize getFrameSizeIfPresent() const override { - BorderSize b; - if (! isSharedWindow) { + BorderSize b; + NSRect v = [view convertRect: [view frame] toView: nil]; NSRect w = [window frame]; @@ -506,9 +501,19 @@ public: b.setBottom ((int) v.origin.y); b.setLeft ((int) v.origin.x); b.setRight ((int) (w.size.width - (v.origin.x + v.size.width))); + + return OptionalBorderSize { b }; } - return b; + return {}; + } + + BorderSize getFrameSize() const override + { + if (const auto frameSize = getFrameSizeIfPresent()) + return *frameSize; + + return {}; } bool hasNativeTitleBar() const @@ -684,7 +689,7 @@ public: else // moved into another window which overlaps this one, so trigger an exit handleMouseEvent (MouseInputSource::InputSourceType::mouse, MouseInputSource::offscreenMousePos, ModifierKeys::currentModifiers, - getMousePressure (ev), MouseInputSource::invalidOrientation, getMouseTime (ev)); + getMousePressure (ev), MouseInputSource::defaultOrientation, getMouseTime (ev)); showArrowCursorIfNeeded(); } @@ -796,7 +801,7 @@ public: { updateModifiers (ev); handleMouseEvent (MouseInputSource::InputSourceType::mouse, getMousePos (ev, view), ModifierKeys::currentModifiers, - getMousePressure (ev), MouseInputSource::invalidOrientation, getMouseTime (ev)); + getMousePressure (ev), MouseInputSource::defaultOrientation, getMouseTime (ev)); } bool handleKeyEvent (NSEvent* ev, bool isKeyDown) @@ -1094,13 +1099,34 @@ public: return false; } - void sendModalInputAttemptIfBlocked() + enum class KeyWindowChanged { no, yes }; + + void sendModalInputAttemptIfBlocked (KeyWindowChanged keyChanged) { - if (isBlockedByModalComponent()) - if (auto* modal = Component::getCurrentlyModalComponent()) - if (auto* otherPeer = modal->getPeer()) - if ((otherPeer->getStyleFlags() & ComponentPeer::windowIsTemporary) != 0) - modal->inputAttemptWhenModal(); + if (! isBlockedByModalComponent()) + return; + + if (auto* modal = Component::getCurrentlyModalComponent()) + { + if (auto* otherPeer = modal->getPeer()) + { + const auto modalPeerIsTemporary = (otherPeer->getStyleFlags() & ComponentPeer::windowIsTemporary) != 0; + + if (! modalPeerIsTemporary) + return; + + // When a peer resigns key status, it might be because we just created a modal + // component that is now key. + // In this case, we should only dismiss the modal component if it isn't key, + // implying that a third window has become key. + const auto modalPeerIsKey = [NSApp keyWindow] == static_cast (otherPeer)->window; + + if (keyChanged == KeyWindowChanged::yes && modalPeerIsKey) + return; + + modal->inputAttemptWhenModal(); + } + } } bool canBecomeKeyWindow() @@ -1163,7 +1189,7 @@ public: { [notificationCenter addObserver: view selector: dismissModalsSelector - name: NSWindowDidMoveNotification + name: NSWindowWillMoveNotification object: currentWindow]; [notificationCenter addObserver: view @@ -1186,7 +1212,7 @@ public: void dismissModals() { if (hasNativeTitleBar() || isSharedWindow) - sendModalInputAttemptIfBlocked(); + sendModalInputAttemptIfBlocked (KeyWindowChanged::no); } void becomeKey() @@ -1197,7 +1223,7 @@ public: void resignKey() { viewFocusLoss(); - sendModalInputAttemptIfBlocked(); + sendModalInputAttemptIfBlocked (KeyWindowChanged::yes); } void liveResizingStart() @@ -1432,7 +1458,7 @@ public: return [NSArray arrayWithObjects: type, (NSString*) kPasteboardTypeFileURLPromise, NSPasteboardTypeString, nil]; } - BOOL sendDragCallback (const int type, id sender) + BOOL sendDragCallback (bool (ComponentPeer::* callback) (const DragInfo&), id sender) { NSPasteboard* pasteboard = [sender draggingPasteboard]; NSString* contentType = [pasteboard availableTypeFromArray: getSupportedDragTypes()]; @@ -1440,9 +1466,10 @@ public: if (contentType == nil) return false; - NSPoint p = [view convertPoint: [sender draggingLocation] fromView: nil]; + const auto p = localToGlobal (convertToPointFloat ([view convertPoint: [sender draggingLocation] fromView: nil])); + ComponentPeer::DragInfo dragInfo; - dragInfo.position.setXY ((int) p.x, (int) p.y); + dragInfo.position = ScalingHelpers::screenPosToLocalPos (component, p).roundToInt(); if (contentType == NSPasteboardTypeString) dragInfo.text = nsStringToJuce ([pasteboard stringForType: NSPasteboardTypeString]); @@ -1450,15 +1477,7 @@ public: dragInfo.files = getDroppedFiles (pasteboard, contentType); if (! dragInfo.isEmpty()) - { - switch (type) - { - case 0: return handleDragMove (dragInfo); - case 1: return handleDragExit (dragInfo); - case 2: return handleDragDrop (dragInfo); - default: jassertfalse; break; - } - } + return (this->*callback) (dragInfo); return false; } @@ -1594,6 +1613,7 @@ public: String stringBeingComposed; NSNotificationCenter* notificationCenter = nil; + Rectangle lastSizeBeforeZoom; RectangleList deferredRepaints; uint32 lastRepaintTime; @@ -2190,7 +2210,7 @@ private: static NSDragOperation draggingUpdated (id self, SEL, id sender) { if (auto* owner = getOwner (self)) - if (owner->sendDragCallback (0, sender)) + if (owner->sendDragCallback (&NSViewComponentPeer::handleDragMove, sender)) return NSDragOperationGeneric; return NSDragOperationNone; @@ -2203,7 +2223,7 @@ private: static void draggingExited (id self, SEL, id sender) { - callOnOwner (self, &NSViewComponentPeer::sendDragCallback, 1, sender); + callOnOwner (self, &NSViewComponentPeer::sendDragCallback, &NSViewComponentPeer::handleDragExit, sender); } static BOOL prepareForDragOperation (id, SEL, id) @@ -2214,7 +2234,7 @@ private: static BOOL performDragOperation (id self, SEL, id sender) { auto* owner = getOwner (self); - return owner != nullptr && owner->sendDragCallback (2, sender); + return owner != nullptr && owner->sendDragCallback (&NSViewComponentPeer::handleDragDrop, sender); } static void concludeDragOperation (id, SEL, id) {} @@ -2303,6 +2323,7 @@ struct JuceNSWindowClass : public NSViewComponentPeerWrappergetConstrainer()) { - const auto originalBounds = owner->getFrameSize().addedTo (owner->getComponent().getScreenBounds()).toFloat(); - const auto expanded = originalBounds.withWidth ((float) constrainer->getMaximumWidth()) - .withHeight ((float) constrainer->getMaximumHeight()); - const auto constrained = expanded.constrainedWithin (convertToRectFloat (flippedScreenRect (r))); - return flippedScreenRect (makeNSRect (constrained)); + if (auto* screen = [window screen]) + { + const auto safeScreenBounds = convertToRectFloat (flippedScreenRect (owner->hasNativeTitleBar() ? r : [screen visibleFrame])); + const auto originalBounds = owner->getFrameSize().addedTo (owner->getComponent().getScreenBounds()).toFloat(); + const auto expanded = originalBounds.withWidth ((float) constrainer->getMaximumWidth()) + .withHeight ((float) constrainer->getMaximumHeight()); + const auto constrained = expanded.constrainedWithin (safeScreenBounds); + + return flippedScreenRect (makeNSRect ([&] + { + if (constrained == owner->getBounds().toFloat()) + return owner->lastSizeBeforeZoom.toFloat(); + + owner->lastSizeBeforeZoom = owner->getBounds().toFloat(); + return constrained; + }())); + } } } return r; } - static BOOL windowShouldZoomToFrame (id self, SEL, NSWindow* window, NSRect frame) + static BOOL windowShouldZoomToFrame (id self, SEL, NSWindow*, NSRect) { if (auto* owner = getOwner (self)) if (owner->hasNativeTitleBar() && (owner->getStyleFlags() & ComponentPeer::windowIsResizable) == 0) return NO; - return convertToRectFloat ([window frame]).withZeroOrigin() != convertToRectFloat (frame).withZeroOrigin(); + return YES; } static BOOL canBecomeKeyWindow (id self, SEL) @@ -2459,12 +2494,39 @@ private: return frameRect.size; } + static void toggleFullScreen (id self, SEL name, id sender) + { + if (auto* owner = getOwner (self)) + { + const auto isFullScreen = owner->isFullScreen(); + + if (! isFullScreen) + owner->lastSizeBeforeZoom = owner->getBounds().toFloat(); + + sendSuperclassMessage (self, name, sender); + + if (isFullScreen) + { + [NSApp setPresentationOptions: NSApplicationPresentationDefault]; + owner->setBounds (owner->lastSizeBeforeZoom.toNearestInt(), false); + } + } + } + static void windowDidExitFullScreen (id self, SEL, NSNotification*) { if (auto* owner = getOwner (self)) owner->resetWindowPresentation(); } + static void windowWillExitFullScreen (id self, SEL, NSNotification*) + { + // The exit-fullscreen animation looks bad on Monterey if the window isn't resizable... + if (auto* owner = getOwner (self)) + if (auto* window = owner->window) + [window setStyleMask: [window styleMask] | NSWindowStyleMaskResizable]; + } + static void windowWillEnterFullScreen (id self, SEL, NSNotification*) { if (SystemStats::getOperatingSystemType() <= SystemStats::MacOSX_10_9) diff --git a/modules/juce_gui_basics/native/juce_mac_Windowing.mm b/modules/juce_gui_basics/native/juce_mac_Windowing.mm index 2f9778cb..b3c3fa2b 100644 --- a/modules/juce_gui_basics/native/juce_mac_Windowing.mm +++ b/modules/juce_gui_basics/native/juce_mac_Windowing.mm @@ -43,7 +43,15 @@ public: int getResult() const { - switch (getRawResult()) + return convertResult ([getAlert() runModal]); + } + + using AsyncUpdater::triggerAsyncUpdate; + +private: + static int convertResult (NSModalResponse response) + { + switch (response) { case NSAlertFirstButtonReturn: return 0; case NSAlertSecondButtonReturn: return 1; @@ -55,15 +63,37 @@ public: return 0; } - using AsyncUpdater::triggerAsyncUpdate; - -private: void handleAsyncUpdate() override { - auto result = getResult(); + if (auto* comp = options.getAssociatedComponent()) + { + if (auto* peer = comp->getPeer()) + { + if (auto* view = static_cast (peer->getNativeHandle())) + { + if (auto* window = [view window]) + { + if (@available (macOS 10.9, *)) + { + [getAlert() beginSheetModalForWindow: window completionHandler: ^(NSModalResponse result) + { + handleModalFinished (result); + }]; + + return; + } + } + } + } + } + handleModalFinished ([getAlert() runModal]); + } + + void handleModalFinished (NSModalResponse result) + { if (callback != nullptr) - callback->modalStateFinished (result); + callback->modalStateFinished (convertResult (result)); delete this; } @@ -74,7 +104,7 @@ private: [alert addButtonWithTitle: juceStringToNS (button)]; } - NSInteger getRawResult() const + NSAlert* getAlert() const { NSAlert* alert = [[[NSAlert alloc] init] autorelease]; @@ -90,7 +120,7 @@ private: addButton (alert, options.getButtonText (1)); addButton (alert, options.getButtonText (2)); - return [alert runModal]; + return alert; } MessageBoxOptions options; @@ -125,13 +155,14 @@ static int showDialog (const MessageBoxOptions& options, #if JUCE_MODAL_LOOPS_PERMITTED void JUCE_CALLTYPE NativeMessageBox::showMessageBox (MessageBoxIconType iconType, const String& title, const String& message, - Component* /*associatedComponent*/) + Component* associatedComponent) { showDialog (MessageBoxOptions() .withIconType (iconType) .withTitle (title) .withMessage (message) - .withButton (TRANS("OK")), + .withButton (TRANS("OK")) + .withAssociatedComponent (associatedComponent), nullptr, AlertWindowMappings::messageBox); } @@ -143,20 +174,21 @@ int JUCE_CALLTYPE NativeMessageBox::show (const MessageBoxOptions& options) void JUCE_CALLTYPE NativeMessageBox::showMessageBoxAsync (MessageBoxIconType iconType, const String& title, const String& message, - Component* /*associatedComponent*/, + Component* associatedComponent, ModalComponentManager::Callback* callback) { showDialog (MessageBoxOptions() .withIconType (iconType) .withTitle (title) .withMessage (message) - .withButton (TRANS("OK")), + .withButton (TRANS("OK")) + .withAssociatedComponent (associatedComponent), callback, AlertWindowMappings::messageBox); } bool JUCE_CALLTYPE NativeMessageBox::showOkCancelBox (MessageBoxIconType iconType, const String& title, const String& message, - Component* /*associatedComponent*/, + Component* associatedComponent, ModalComponentManager::Callback* callback) { return showDialog (MessageBoxOptions() @@ -164,13 +196,14 @@ bool JUCE_CALLTYPE NativeMessageBox::showOkCancelBox (MessageBoxIconType iconTyp .withTitle (title) .withMessage (message) .withButton (TRANS("OK")) - .withButton (TRANS("Cancel")), + .withButton (TRANS("Cancel")) + .withAssociatedComponent (associatedComponent), callback, AlertWindowMappings::okCancel) != 0; } int JUCE_CALLTYPE NativeMessageBox::showYesNoCancelBox (MessageBoxIconType iconType, const String& title, const String& message, - Component* /*associatedComponent*/, + Component* associatedComponent, ModalComponentManager::Callback* callback) { return showDialog (MessageBoxOptions() @@ -179,13 +212,14 @@ int JUCE_CALLTYPE NativeMessageBox::showYesNoCancelBox (MessageBoxIconType iconT .withMessage (message) .withButton (TRANS("Yes")) .withButton (TRANS("No")) - .withButton (TRANS("Cancel")), + .withButton (TRANS("Cancel")) + .withAssociatedComponent (associatedComponent), callback, AlertWindowMappings::yesNoCancel); } int JUCE_CALLTYPE NativeMessageBox::showYesNoBox (MessageBoxIconType iconType, const String& title, const String& message, - Component* /*associatedComponent*/, + Component* associatedComponent, ModalComponentManager::Callback* callback) { return showDialog (MessageBoxOptions() @@ -193,7 +227,8 @@ int JUCE_CALLTYPE NativeMessageBox::showYesNoBox (MessageBoxIconType iconType, .withTitle (title) .withMessage (message) .withButton (TRANS("Yes")) - .withButton (TRANS("No")), + .withButton (TRANS("No")) + .withAssociatedComponent (associatedComponent), callback, AlertWindowMappings::okCancel); } diff --git a/modules/juce_gui_basics/native/juce_win32_Windowing.cpp b/modules/juce_gui_basics/native/juce_win32_Windowing.cpp index c58995d0..4ffc09d9 100644 --- a/modules/juce_gui_basics/native/juce_win32_Windowing.cpp +++ b/modules/juce_gui_basics/native/juce_win32_Windowing.cpp @@ -758,6 +758,11 @@ public: #endif } + ~NativeDarkModeChangeDetectorImpl() + { + UnhookWindowsHookEx (hook); + } + bool isDarkModeEnabled() const noexcept { return darkModeEnabled; } private: @@ -990,7 +995,9 @@ public: void initialiseBitmapData (Image::BitmapData& bitmap, int x, int y, Image::BitmapData::ReadWriteMode mode) override { - bitmap.data = imageData + x * pixelStride + y * lineStride; + const auto offset = (size_t) (x * pixelStride + y * lineStride); + bitmap.data = imageData + offset; + bitmap.size = (size_t) (lineStride * height) - offset; bitmap.pixelFormat = pixelFormat; bitmap.lineStride = lineStride; bitmap.pixelStride = pixelStride; @@ -1583,6 +1590,13 @@ public: void setBounds (const Rectangle& bounds, bool isNowFullScreen) override { + // If we try to set new bounds while handling an existing position change, + // Windows may get confused about our current scale and size. + // This can happen when moving a window between displays, because the mouse-move + // generator in handlePositionChanged can cause the window to move again. + if (inHandlePositionChanged) + return; + const ScopedValueSetter scope (shouldIgnoreModalDismiss, true); fullScreen = isNowFullScreen; @@ -1608,7 +1622,7 @@ public: if (! hasMoved) flags |= SWP_NOMOVE; if (! hasResized) flags |= SWP_NOSIZE; - setWindowPos (hwnd, newBounds, flags, numInDpiChange == 0); + setWindowPos (hwnd, newBounds, flags, ! inDpiChange); if (hasResized && isValidPeer (this)) { @@ -1757,6 +1771,11 @@ public: return w == hwnd || (trueIfInAChildWindow && (IsChild (hwnd, w) != 0)); } + OptionalBorderSize getFrameSizeIfPresent() const override + { + return ComponentPeer::OptionalBorderSize { windowBorder }; + } + BorderSize getFrameSize() const override { return windowBorder; @@ -1981,8 +2000,9 @@ public: private: Point getMousePos (POINTL mousePos) const { - return peer.getComponent().getLocalPoint (nullptr, convertPhysicalScreenPointToLogical (pointFromPOINT ({ mousePos.x, mousePos.y }), - (HWND) peer.getNativeHandle()).toFloat()); + const auto originalPos = pointFromPOINT ({ mousePos.x, mousePos.y }); + const auto logicalPos = convertPhysicalScreenPointToLogical (originalPos, peer.hwnd); + return ScalingHelpers::screenPosToLocalPos (peer.component, logicalPos.toFloat()); } struct DroppedData @@ -2125,7 +2145,7 @@ private: #endif double scaleFactor = 1.0; - int numInDpiChange = 0; + bool inDpiChange = 0, inHandlePositionChanged = 0; bool isAccessibilityActive = false; @@ -2394,6 +2414,13 @@ private: } else { + TCHAR messageBuffer[256] = {}; + + FormatMessage (FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, + nullptr, GetLastError(), MAKELANGID (LANG_NEUTRAL, SUBLANG_DEFAULT), + messageBuffer, (DWORD) numElementsInArray (messageBuffer) - 1, nullptr); + + DBG (messageBuffer); jassertfalse; } } @@ -2798,8 +2825,8 @@ private: if (now >= lastMouseTime + minTimeBetweenMouses) { lastMouseTime = now; - doMouseEvent (position, MouseInputSource::invalidPressure, - MouseInputSource::invalidOrientation, modsToSend); + doMouseEvent (position, MouseInputSource::defaultPressure, + MouseInputSource::defaultOrientation, modsToSend); } } @@ -2825,7 +2852,7 @@ private: isDragging = true; - doMouseEvent (position, MouseInputSource::invalidPressure); + doMouseEvent (position, MouseInputSource::defaultPressure); } } @@ -2852,7 +2879,7 @@ private: // NB: under some circumstances (e.g. double-clicking a native title bar), a mouse-up can // arrive without a mouse-down, so in that case we need to avoid sending a message. if (wasDragging) - doMouseEvent (position, MouseInputSource::invalidPressure); + doMouseEvent (position, MouseInputSource::defaultPressure); } void doCaptureChanged() @@ -2874,7 +2901,7 @@ private: isMouseOver = false; if (! areOtherTouchSourcesActive()) - doMouseEvent (getCurrentMousePos(), MouseInputSource::invalidPressure); + doMouseEvent (getCurrentMousePos(), MouseInputSource::defaultPressure); } ComponentPeer* findPeerUnderMouse (Point& localPos) @@ -2991,7 +3018,7 @@ private: } bool handleTouchInput (const TOUCHINPUT& touch, const bool isDown, const bool isUp, - const float touchPressure = MouseInputSource::invalidPressure, + const float touchPressure = MouseInputSource::defaultPressure, const float orientation = 0.0f) { auto isCancel = false; @@ -3068,9 +3095,9 @@ private: return false; const auto pressure = touchInfo.touchMask & TOUCH_MASK_PRESSURE ? static_cast (touchInfo.pressure) - : MouseInputSource::invalidPressure; + : MouseInputSource::defaultPressure; const auto orientation = touchInfo.touchMask & TOUCH_MASK_ORIENTATION ? degreesToRadians (static_cast (touchInfo.orientation)) - : MouseInputSource::invalidOrientation; + : MouseInputSource::defaultOrientation; if (! handleTouchInput (emulateTouchEventFromPointer (touchInfo.pointerInfo.ptPixelLocationRaw, wParam), isDown, isUp, pressure, orientation)) @@ -3083,7 +3110,7 @@ private: if (! getPointerPenInfo (GET_POINTERID_WPARAM (wParam), &penInfo)) return false; - const auto pressure = (penInfo.penMask & PEN_MASK_PRESSURE) ? (float) penInfo.pressure / 1024.0f : MouseInputSource::invalidPressure; + const auto pressure = (penInfo.penMask & PEN_MASK_PRESSURE) ? (float) penInfo.pressure / 1024.0f : MouseInputSource::defaultPressure; if (! handlePenInput (penInfo, globalToLocal (convertPhysicalScreenPointToLogical (pointFromPOINT (getPOINTFromLParam (lParam)), hwnd).toFloat()), pressure, isDown, isUp)) @@ -3114,9 +3141,9 @@ private: ModifierKeys modsToSend (ModifierKeys::currentModifiers); PenDetails penDetails; - penDetails.rotation = (penInfo.penMask & PEN_MASK_ROTATION) ? degreesToRadians (static_cast (penInfo.rotation)) : MouseInputSource::invalidRotation; - penDetails.tiltX = (penInfo.penMask & PEN_MASK_TILT_X) ? (float) penInfo.tiltX / 90.0f : MouseInputSource::invalidTiltX; - penDetails.tiltY = (penInfo.penMask & PEN_MASK_TILT_Y) ? (float) penInfo.tiltY / 90.0f : MouseInputSource::invalidTiltY; + penDetails.rotation = (penInfo.penMask & PEN_MASK_ROTATION) ? degreesToRadians (static_cast (penInfo.rotation)) : MouseInputSource::defaultRotation; + penDetails.tiltX = (penInfo.penMask & PEN_MASK_TILT_X) ? (float) penInfo.tiltX / 90.0f : MouseInputSource::defaultTiltX; + penDetails.tiltY = (penInfo.penMask & PEN_MASK_TILT_Y) ? (float) penInfo.tiltY / 90.0f : MouseInputSource::defaultTiltY; auto pInfoFlags = penInfo.pointerInfo.pointerFlags; @@ -3131,7 +3158,7 @@ private: // this forces a mouse-enter/up event, in case for some reason we didn't get a mouse-up before. handleMouseEvent (MouseInputSource::InputSourceType::pen, pos, modsToSend.withoutMouseButtons(), - pressure, MouseInputSource::invalidOrientation, time, penDetails); + pressure, MouseInputSource::defaultOrientation, time, penDetails); if (! isValidPeer (this)) // (in case this component was deleted by the event) return false; @@ -3143,7 +3170,7 @@ private: } handleMouseEvent (MouseInputSource::InputSourceType::pen, pos, modsToSend, pressure, - MouseInputSource::invalidOrientation, time, penDetails); + MouseInputSource::defaultOrientation, time, penDetails); if (! isValidPeer (this)) // (in case this component was deleted by the event) return false; @@ -3151,7 +3178,7 @@ private: if (isUp) { handleMouseEvent (MouseInputSource::InputSourceType::pen, MouseInputSource::offscreenMousePos, ModifierKeys::currentModifiers, - pressure, MouseInputSource::invalidOrientation, time, penDetails); + pressure, MouseInputSource::defaultOrientation, time, penDetails); if (! isValidPeer (this)) return false; @@ -3448,8 +3475,10 @@ private: if (contains (pos.roundToInt(), false)) { + const ScopedValueSetter scope (inHandlePositionChanged, true); + if (! areOtherTouchSourcesActive()) - doMouseEvent (pos, MouseInputSource::invalidPressure); + doMouseEvent (pos, MouseInputSource::defaultPressure); if (! isValidPeer (this)) return true; @@ -3477,15 +3506,27 @@ private: scaleFactor = newScale; { - const ScopedValueSetter setter (numInDpiChange, numInDpiChange + 1); - setBounds (windowBorder.subtractedFrom (convertPhysicalScreenRectangleToLogical (rectangleFromRECT (newRect), hwnd)), fullScreen); + const ScopedValueSetter setter (inDpiChange, true); + SetWindowPos (hwnd, + nullptr, + newRect.left, + newRect.top, + newRect.right - newRect.left, + newRect.bottom - newRect.top, + SWP_NOZORDER | SWP_NOACTIVATE); } // This is to handle reentrancy. If responding to a DPI change triggers further DPI changes, // we should only notify listeners and resize windows once all of the DPI changes have // resolved. - if (numInDpiChange != 0) + if (inDpiChange) + { + // Danger! Re-entrant call to handleDPIChanging. + // Please report this issue on the JUCE forum, along with instructions + // so that a JUCE developer can reproduce the issue. + jassertfalse; return 0; + } updateShadower(); InvalidateRect (hwnd, nullptr, FALSE); diff --git a/modules/juce_gui_basics/native/x11/juce_linux_X11_DragAndDrop.cpp b/modules/juce_gui_basics/native/x11/juce_linux_X11_DragAndDrop.cpp index 3a5c9f27..3e24e1f2 100644 --- a/modules/juce_gui_basics/native/x11/juce_linux_X11_DragAndDrop.cpp +++ b/modules/juce_gui_basics/native/x11/juce_linux_X11_DragAndDrop.cpp @@ -156,9 +156,10 @@ public: if (windowH == 0) windowH = (::Window) peer->getNativeHandle(); - auto dropPos = Desktop::getInstance().getDisplays().physicalToLogical (Point ((int) clientMsg.data.l[2] >> 16, - (int) clientMsg.data.l[2] & 0xffff)); - dropPos -= peer->getBounds().getPosition(); + const auto displays = Desktop::getInstance().getDisplays(); + const auto logicalPos = displays.physicalToLogical (Point ((int) clientMsg.data.l[2] >> 16, + (int) clientMsg.data.l[2] & 0xffff)); + const auto dropPos = ScalingHelpers::screenPosToLocalPos (peer->getComponent(), logicalPos.toFloat()).roundToInt(); const auto& atoms = getAtoms(); diff --git a/modules/juce_gui_basics/native/x11/juce_linux_XWindowSystem.cpp b/modules/juce_gui_basics/native/x11/juce_linux_XWindowSystem.cpp index 8e9a87d5..2ea80990 100644 --- a/modules/juce_gui_basics/native/x11/juce_linux_XWindowSystem.cpp +++ b/modules/juce_gui_basics/native/x11/juce_linux_XWindowSystem.cpp @@ -154,7 +154,7 @@ String XWindowSystemUtilities::Atoms::getName (::Display* display, Atom atom) if (atom == None) return "None"; - return X11Symbols::getInstance()->xGetAtomName (display, atom); + return makeXFreePtr (X11Symbols::getInstance()->xGetAtomName (display, atom)).get(); } bool XWindowSystemUtilities::Atoms::isMimeTypeFile (::Display* display, Atom atom) @@ -968,7 +968,9 @@ public: void initialiseBitmapData (Image::BitmapData& bitmap, int x, int y, Image::BitmapData::ReadWriteMode mode) override { - bitmap.data = imageData + x * pixelStride + y * lineStride; + const auto offset = (size_t) (x * pixelStride + y * lineStride); + bitmap.data = imageData + offset; + bitmap.size = (size_t) (lineStride * height) - offset; bitmap.pixelFormat = pixelFormat; bitmap.lineStride = lineStride; bitmap.pixelStride = pixelStride; @@ -1744,7 +1746,13 @@ void XWindowSystem::setBounds (::Window windowH, Rectangle newBounds, bool X11Symbols::getInstance()->xSetWMNormalHints (display, windowH, hints.get()); } - auto windowBorder = peer->getFrameSize(); + const auto windowBorder = [&]() -> BorderSize + { + if (const auto& frameSize = peer->getFrameSizeIfPresent()) + return *frameSize; + + return {}; + }(); X11Symbols::getInstance()->xMoveResizeWindow (display, windowH, newBounds.getX() - windowBorder.getLeft(), @@ -1774,7 +1782,14 @@ void XWindowSystem::updateConstraints (::Window windowH, ComponentPeer& peer) co } else if (auto* c = peer.getConstrainer()) { - const auto windowBorder = peer.getFrameSize(); + const auto windowBorder = [&]() -> BorderSize + { + if (const auto& frameSize = peer.getFrameSizeIfPresent()) + return *frameSize; + + return {}; + }(); + const auto factor = peer.getPlatformScaleFactor(); const auto leftAndRight = windowBorder.getLeftAndRight(); const auto topAndBottom = windowBorder.getTopAndBottom(); @@ -1802,7 +1817,7 @@ bool XWindowSystem::contains (::Window windowH, Point localPos) const && child == None; } -BorderSize XWindowSystem::getBorderSize (::Window windowH) const +ComponentPeer::OptionalBorderSize XWindowSystem::getBorderSize (::Window windowH) const { jassert (windowH != 0); @@ -1824,7 +1839,7 @@ BorderSize XWindowSystem::getBorderSize (::Window windowH) const data += sizeof (unsigned long); } - return { (int) sizes[2], (int) sizes[0], (int) sizes[3], (int) sizes[1] }; + return ComponentPeer::OptionalBorderSize ({ (int) sizes[2], (int) sizes[0], (int) sizes[3], (int) sizes[1] }); } } @@ -3185,17 +3200,22 @@ void XWindowSystem::destroyXDisplay() { jassert (display != nullptr); - XWindowSystemUtilities::ScopedXLock xLock; + { + XWindowSystemUtilities::ScopedXLock xLock; - X11Symbols::getInstance()->xDestroyWindow (display, juce_messageWindowHandle); - juce_messageWindowHandle = 0; - X11Symbols::getInstance()->xSync (display, True); + X11Symbols::getInstance()->xDestroyWindow (display, juce_messageWindowHandle); + juce_messageWindowHandle = 0; + X11Symbols::getInstance()->xSync (display, True); + } LinuxEventLoop::unregisterFdCallback (X11Symbols::getInstance()->xConnectionNumber (display)); - X11Symbols::getInstance()->xCloseDisplay (display); - display = nullptr; - displayVisuals = nullptr; + { + XWindowSystemUtilities::ScopedXLock xLock; + X11Symbols::getInstance()->xCloseDisplay (display); + display = nullptr; + displayVisuals = nullptr; + } } } @@ -3459,8 +3479,8 @@ void XWindowSystem::handleButtonPressEvent (LinuxComponentPeer* peer, const XBut ModifierKeys::currentModifiers = ModifierKeys::currentModifiers.withFlags (buttonModifierFlag); peer->toFront (true); peer->handleMouseEvent (MouseInputSource::InputSourceType::mouse, getLogicalMousePos (buttonPressEvent, peer->getPlatformScaleFactor()), - ModifierKeys::currentModifiers, MouseInputSource::invalidPressure, - MouseInputSource::invalidOrientation, getEventTime (buttonPressEvent), {}); + ModifierKeys::currentModifiers, MouseInputSource::defaultPressure, + MouseInputSource::defaultOrientation, getEventTime (buttonPressEvent), {}); } void XWindowSystem::handleButtonPressEvent (LinuxComponentPeer* peer, const XButtonPressedEvent& buttonPressEvent) const @@ -3509,7 +3529,7 @@ void XWindowSystem::handleButtonReleaseEvent (LinuxComponentPeer* peer, const XB dragState.handleExternalDragButtonReleaseEvent(); peer->handleMouseEvent (MouseInputSource::InputSourceType::mouse, getLogicalMousePos (buttonRelEvent, peer->getPlatformScaleFactor()), - ModifierKeys::currentModifiers, MouseInputSource::invalidPressure, MouseInputSource::invalidOrientation, getEventTime (buttonRelEvent)); + ModifierKeys::currentModifiers, MouseInputSource::defaultPressure, MouseInputSource::defaultOrientation, getEventTime (buttonRelEvent)); } void XWindowSystem::handleMotionNotifyEvent (LinuxComponentPeer* peer, const XPointerMovedEvent& movedEvent) const @@ -3522,8 +3542,8 @@ void XWindowSystem::handleMotionNotifyEvent (LinuxComponentPeer* peer, const XPo dragState.handleExternalDragMotionNotify(); peer->handleMouseEvent (MouseInputSource::InputSourceType::mouse, getLogicalMousePos (movedEvent, peer->getPlatformScaleFactor()), - ModifierKeys::currentModifiers, MouseInputSource::invalidPressure, - MouseInputSource::invalidOrientation, getEventTime (movedEvent)); + ModifierKeys::currentModifiers, MouseInputSource::defaultPressure, + MouseInputSource::defaultOrientation, getEventTime (movedEvent)); } void XWindowSystem::handleEnterNotifyEvent (LinuxComponentPeer* peer, const XEnterWindowEvent& enterEvent) const @@ -3535,8 +3555,8 @@ void XWindowSystem::handleEnterNotifyEvent (LinuxComponentPeer* peer, const XEnt { updateKeyModifiers ((int) enterEvent.state); peer->handleMouseEvent (MouseInputSource::InputSourceType::mouse, getLogicalMousePos (enterEvent, peer->getPlatformScaleFactor()), - ModifierKeys::currentModifiers, MouseInputSource::invalidPressure, - MouseInputSource::invalidOrientation, getEventTime (enterEvent)); + ModifierKeys::currentModifiers, MouseInputSource::defaultPressure, + MouseInputSource::defaultOrientation, getEventTime (enterEvent)); } } @@ -3550,8 +3570,8 @@ void XWindowSystem::handleLeaveNotifyEvent (LinuxComponentPeer* peer, const XLea { updateKeyModifiers ((int) leaveEvent.state); peer->handleMouseEvent (MouseInputSource::InputSourceType::mouse, getLogicalMousePos (leaveEvent, peer->getPlatformScaleFactor()), - ModifierKeys::currentModifiers, MouseInputSource::invalidPressure, - MouseInputSource::invalidOrientation, getEventTime (leaveEvent)); + ModifierKeys::currentModifiers, MouseInputSource::defaultPressure, + MouseInputSource::defaultOrientation, getEventTime (leaveEvent)); } } diff --git a/modules/juce_gui_basics/native/x11/juce_linux_XWindowSystem.h b/modules/juce_gui_basics/native/x11/juce_linux_XWindowSystem.h index 9369f824..587b81e1 100644 --- a/modules/juce_gui_basics/native/x11/juce_linux_XWindowSystem.h +++ b/modules/juce_gui_basics/native/x11/juce_linux_XWindowSystem.h @@ -181,8 +181,8 @@ public: void setBounds (::Window, Rectangle, bool fullScreen) const; void updateConstraints (::Window) const; - BorderSize getBorderSize (::Window) const; - Rectangle getWindowBounds (::Window, ::Window parentWindow); + ComponentPeer::OptionalBorderSize getBorderSize (::Window) const; + Rectangle getWindowBounds (::Window, ::Window parentWindow); Point getPhysicalParentScreenPosition() const; bool contains (::Window, Point localPos) const; diff --git a/modules/juce_gui_basics/widgets/juce_ListBox.cpp b/modules/juce_gui_basics/widgets/juce_ListBox.cpp index 5c98a310..0d488e72 100644 --- a/modules/juce_gui_basics/widgets/juce_ListBox.cpp +++ b/modules/juce_gui_basics/widgets/juce_ListBox.cpp @@ -107,14 +107,6 @@ public: m->listBoxItemClicked (row, e); } - bool isInDragToScrollViewport() const noexcept - { - if (auto* vp = owner.getViewport()) - return vp->isScrollOnDragEnabled() && (vp->canScrollVertically() || vp->canScrollHorizontally()); - - return false; - } - void mouseDown (const MouseEvent& e) override { isDragging = false; @@ -123,7 +115,7 @@ public: if (isEnabled()) { - if (owner.selectOnMouseDown && ! (isSelected || isInDragToScrollViewport())) + if (owner.selectOnMouseDown && ! isSelected && ! viewportWouldScrollOnEvent (owner.getViewport(), e.source)) performSelection (e, false); else selectRowOnMouseUp = true; diff --git a/modules/juce_gui_basics/widgets/juce_Toolbar.cpp b/modules/juce_gui_basics/widgets/juce_Toolbar.cpp index 97cf5034..6a8c08e5 100644 --- a/modules/juce_gui_basics/widgets/juce_Toolbar.cpp +++ b/modules/juce_gui_basics/widgets/juce_Toolbar.cpp @@ -243,10 +243,7 @@ private: Toolbar::Toolbar() { lookAndFeelChanged(); - addChildComponent (missingItemsButton.get()); - - missingItemsButton->setAlwaysOnTop (true); - missingItemsButton->onClick = [this] { showMissingItems(); }; + initMissingItemButton(); } Toolbar::~Toolbar() @@ -534,6 +531,16 @@ void Toolbar::updateAllItemPositions (bool animate) } //============================================================================== +void Toolbar::initMissingItemButton() +{ + if (missingItemsButton == nullptr) + return; + + addChildComponent (*missingItemsButton); + missingItemsButton->setAlwaysOnTop (true); + missingItemsButton->onClick = [this] { showMissingItems(); }; +} + void Toolbar::showMissingItems() { jassert (missingItemsButton->isShowing()); @@ -542,7 +549,7 @@ void Toolbar::showMissingItems() { PopupMenu m; auto comp = std::make_unique (*this, getThickness()); - m.addCustomItem (1, std::move (comp)); + m.addCustomItem (1, std::move (comp), nullptr, TRANS ("Additional Items")); m.showMenuAsync (PopupMenu::Options().withTargetComponent (missingItemsButton.get())); } } @@ -643,6 +650,7 @@ void Toolbar::itemDropped (const SourceDetails& dragSourceDetails) void Toolbar::lookAndFeelChanged() { missingItemsButton.reset (getLookAndFeel().createToolbarMissingItemsButton (*this)); + initMissingItemButton(); } void Toolbar::mouseDown (const MouseEvent&) {} diff --git a/modules/juce_gui_basics/widgets/juce_Toolbar.h b/modules/juce_gui_basics/widgets/juce_Toolbar.h index 7bb3825a..992f1bf4 100644 --- a/modules/juce_gui_basics/widgets/juce_Toolbar.h +++ b/modules/juce_gui_basics/widgets/juce_Toolbar.h @@ -323,6 +323,7 @@ private: class CustomisationDialog; std::unique_ptr createAccessibilityHandler() override; + void initMissingItemButton(); void showMissingItems(); void addItemInternal (ToolbarItemFactory& factory, int itemId, int insertIndex); diff --git a/modules/juce_gui_basics/widgets/juce_TreeView.cpp b/modules/juce_gui_basics/widgets/juce_TreeView.cpp index 305d6023..ba5e4a8b 100644 --- a/modules/juce_gui_basics/widgets/juce_TreeView.cpp +++ b/modules/juce_gui_basics/widgets/juce_TreeView.cpp @@ -40,7 +40,8 @@ static int getItemDepth (const TreeViewItem* item) } //============================================================================== -class TreeView::ItemComponent : public Component +class TreeView::ItemComponent : public Component, + public TooltipClient { public: explicit ItemComponent (TreeViewItem& itemToRepresent) @@ -78,6 +79,11 @@ public: return item; } + String getTooltip() override + { + return item.getTooltip(); + } + private: //============================================================================== class ItemAccessibilityHandler : public AccessibilityHandler @@ -216,8 +222,8 @@ private: auto topLeft = itemComp.getRepresentedItem().getItemPosition (false).toFloat().getTopLeft(); return { Desktop::getInstance().getMainMouseSource(), topLeft, mods, - MouseInputSource::invalidPressure, MouseInputSource::invalidOrientation, MouseInputSource::invalidRotation, - MouseInputSource::invalidTiltX, MouseInputSource::invalidTiltY, + MouseInputSource::defaultPressure, MouseInputSource::defaultOrientation, MouseInputSource::defaultRotation, + MouseInputSource::defaultTiltX, MouseInputSource::defaultTiltY, &itemComp, &itemComp, Time::getCurrentTime(), topLeft, Time::getCurrentTime(), 0, false }; } @@ -338,7 +344,7 @@ public: auto newComp = std::make_unique (*treeItem); addAndMakeVisible (*newComp); - newComp->addMouseListener (this, false); + newComp->addMouseListener (this, treeItem->customComponentUsesTreeViewMouseHandler()); componentsToKeep.insert (newComp.get()); itemComponents.push_back (std::move (newComp)); diff --git a/modules/juce_gui_basics/widgets/juce_TreeView.h b/modules/juce_gui_basics/widgets/juce_TreeView.h index aa4547bb..85f57fc7 100644 --- a/modules/juce_gui_basics/widgets/juce_TreeView.h +++ b/modules/juce_gui_basics/widgets/juce_TreeView.h @@ -363,6 +363,13 @@ public: /** Draws the line that extends vertically up towards one of its parents, or down to one of its children. */ virtual void paintVerticalConnectingLine (Graphics&, const Line& line); + /** This should return true if you want to use a custom component, and also use + the TreeView's built-in mouse handling support, enabling drag-and-drop, + itemClicked() and itemDoubleClicked(); return false if the component should + consume all mouse clicks. + */ + virtual bool customComponentUsesTreeViewMouseHandler() const { return false; } + /** Called when the user clicks on this item. If you're using createItemComponent() to create a custom component for the diff --git a/modules/juce_gui_basics/windows/juce_ComponentPeer.h b/modules/juce_gui_basics/windows/juce_ComponentPeer.h index 639e012e..06c0a729 100644 --- a/modules/juce_gui_basics/windows/juce_ComponentPeer.h +++ b/modules/juce_gui_basics/windows/juce_ComponentPeer.h @@ -76,6 +76,53 @@ public: }; + /** Represents the window borders around a window component. + + You must use operator bool() to evaluate the validity of the object before accessing + its value. + + Returned by getFrameSizeIfPresent(). A missing value may be returned on Linux for a + short time after window creation. + */ + class JUCE_API OptionalBorderSize final + { + public: + /** Default constructor. Creates an invalid object. */ + OptionalBorderSize() : valid (false) {} + + /** Constructor. Creates a valid object containing the provided BorderSize. */ + explicit OptionalBorderSize (BorderSize size) : valid (true), borderSize (std::move (size)) {} + + /** Returns true if a valid value has been provided. */ + explicit operator bool() const noexcept { return valid; } + + /** Returns a reference to the value. + + You must not call this function on an invalid object. Use operator bool() to + determine validity. + */ + const auto& operator*() const noexcept + { + jassert (valid); + return borderSize; + } + + /** Returns a pointer to the value. + + You must not call this function on an invalid object. Use operator bool() to + determine validity. + */ + const auto* operator->() const noexcept + { + jassert (valid); + return &borderSize; + } + + private: + bool valid; + BorderSize borderSize; + }; + //============================================================================== /** Creates a peer. @@ -219,10 +266,25 @@ public: */ virtual bool contains (Point localPos, bool trueIfInAChildWindow) const = 0; + /** Returns the size of the window frame that's around this window. + + Depending on the platform the border size may be invalid for a short transient + after creating a new window. Hence the returned value must be checked using + operator bool() and the contained value can be accessed using operator*() only + if it is present. + + Whether or not the window has a normal window frame depends on the flags + that were set when the window was created by Component::addToDesktop() + */ + virtual OptionalBorderSize getFrameSizeIfPresent() const = 0; + /** Returns the size of the window frame that's around this window. Whether or not the window has a normal window frame depends on the flags that were set when the window was created by Component::addToDesktop() */ + #if JUCE_LINUX || JUCE_BSD + [[deprecated ("Use getFrameSizeIfPresent instead.")]] + #endif virtual BorderSize getFrameSize() const = 0; /** This is called when the window's bounds change. diff --git a/modules/juce_gui_basics/windows/juce_DocumentWindow.h b/modules/juce_gui_basics/windows/juce_DocumentWindow.h index 4fc4d076..6e794793 100644 --- a/modules/juce_gui_basics/windows/juce_DocumentWindow.h +++ b/modules/juce_gui_basics/windows/juce_DocumentWindow.h @@ -82,6 +82,10 @@ public: that it can be "allButtons" to get them all. You can change this later with the setTitleBarButtonsRequired() method, which can also specify where they are positioned. + The behaviour of native titlebars on macOS is slightly different: + the maximiseButton flag controls whether or not the window can enter + native fullscreen mode, and the zoom button can be disabled by + making the window non-resizable. @param addToDesktop if true, the window will be automatically added to the desktop; if false, you can use it as a child component @see TitleBarButtons @@ -124,6 +128,10 @@ public: should be shown on the title bar. This value is a bitwise combination of values from the TitleBarButtons enum. Note that it can be "allButtons" to get them all. + The behaviour of native titlebars on macOS is slightly different: + the maximiseButton flag controls whether or not the window can enter + native fullscreen mode, and the zoom button can be disabled by + making the window non-resizable. @param positionTitleBarButtonsOnLeft if true, the buttons should go at the left side of the bar; if false, they'll be placed at the right */ @@ -188,6 +196,8 @@ public: /** Callback that is triggered when the minimise button is pressed. + This function is only called when using a non-native titlebar. + The default implementation of this calls ResizableWindow::setMinimised(), but you can override it to do more customised behaviour. */ @@ -196,6 +206,8 @@ public: /** Callback that is triggered when the maximise button is pressed, or when the title-bar is double-clicked. + This function is only called when using a non-native titlebar. + The default implementation of this calls ResizableWindow::setFullScreen(), but you can override it to do more customised behaviour. */ diff --git a/modules/juce_gui_basics/windows/juce_MessageBoxOptions.h b/modules/juce_gui_basics/windows/juce_MessageBoxOptions.h index 19571e99..f7c3f44c 100644 --- a/modules/juce_gui_basics/windows/juce_MessageBoxOptions.h +++ b/modules/juce_gui_basics/windows/juce_MessageBoxOptions.h @@ -68,13 +68,13 @@ public: //============================================================================== /** Sets the type of icon that should be used for the dialog box. */ - MessageBoxOptions withIconType (MessageBoxIconType type) const { return with (*this, &MessageBoxOptions::iconType, type); } + JUCE_NODISCARD MessageBoxOptions withIconType (MessageBoxIconType type) const { return with (*this, &MessageBoxOptions::iconType, type); } /** Sets the title of the dialog box. */ - MessageBoxOptions withTitle (const String& boxTitle) const { return with (*this, &MessageBoxOptions::title, boxTitle); } + JUCE_NODISCARD MessageBoxOptions withTitle (const String& boxTitle) const { return with (*this, &MessageBoxOptions::title, boxTitle); } /** Sets the message that should be displayed in the dialog box. */ - MessageBoxOptions withMessage (const String& boxMessage) const { return with (*this, &MessageBoxOptions::message, boxMessage); } + JUCE_NODISCARD MessageBoxOptions withMessage (const String& boxMessage) const { return with (*this, &MessageBoxOptions::message, boxMessage); } /** If the string passed in is not empty, this will add a button to the dialog box with the specified text. @@ -82,10 +82,10 @@ public: Generally up to 3 buttons are supported for dialog boxes, so adding any more than this may have no effect. */ - MessageBoxOptions withButton (const String& text) const { auto copy = *this; copy.buttons.add (text); return copy; } + JUCE_NODISCARD MessageBoxOptions withButton (const String& text) const { auto copy = *this; copy.buttons.add (text); return copy; } /** The component that the dialog box should be associated with. */ - MessageBoxOptions withAssociatedComponent (Component* component) const { return with (*this, &MessageBoxOptions::associatedComponent, component); } + JUCE_NODISCARD MessageBoxOptions withAssociatedComponent (Component* component) const { return with (*this, &MessageBoxOptions::associatedComponent, component); } //============================================================================== /** Returns the icon type of the dialog box. diff --git a/modules/juce_gui_basics/windows/juce_ResizableWindow.cpp b/modules/juce_gui_basics/windows/juce_ResizableWindow.cpp index d1d009a4..437475c7 100644 --- a/modules/juce_gui_basics/windows/juce_ResizableWindow.cpp +++ b/modules/juce_gui_basics/windows/juce_ResizableWindow.cpp @@ -532,9 +532,12 @@ String ResizableWindow::getWindowStateAsString() #if JUCE_LINUX if (auto* peer = isOnDesktop() ? getPeer() : nullptr) { - const auto frameSize = peer->getFrameSize(); - stateString << " frame " << frameSize.getTop() << ' ' << frameSize.getLeft() - << ' ' << frameSize.getBottom() << ' ' << frameSize.getRight(); + if (const auto optionalFrameSize = peer->getFrameSizeIfPresent()) + { + const auto& frameSize = *optionalFrameSize; + stateString << " frame " << frameSize.getTop() << ' ' << frameSize.getLeft() + << ' ' << frameSize.getBottom() << ' ' << frameSize.getRight(); + } } #endif @@ -566,10 +569,12 @@ bool ResizableWindow::restoreWindowStateFromString (const String& s) if (peer != nullptr) { - peer->getFrameSize().addTo (newPos); + if (const auto frameSize = peer->getFrameSizeIfPresent()) + frameSize->addTo (newPos); } + #if JUCE_LINUX - else + if (peer == nullptr || ! peer->getFrameSizeIfPresent()) { // We need to adjust for the frame size before we create a peer, as X11 // doesn't provide this information at construction time. @@ -580,7 +585,9 @@ bool ResizableWindow::restoreWindowStateFromString (const String& s) tokens[firstCoord + 7].getIntValue(), tokens[firstCoord + 8].getIntValue() }; - frame.addTo (newPos); + newPos.setX (newPos.getX() - frame.getLeft()); + newPos.setY (newPos.getY() - frame.getTop()); + setBounds (newPos); } } @@ -606,7 +613,9 @@ bool ResizableWindow::restoreWindowStateFromString (const String& s) if (peer != nullptr) { - peer->getFrameSize().subtractFrom (newPos); + if (const auto frameSize = peer->getFrameSizeIfPresent()) + frameSize->subtractFrom (newPos); + peer->setNonFullScreenBounds (newPos); } diff --git a/modules/juce_gui_basics/windows/juce_TooltipWindow.cpp b/modules/juce_gui_basics/windows/juce_TooltipWindow.cpp index 8f1eb5de..86435e0f 100644 --- a/modules/juce_gui_basics/windows/juce_TooltipWindow.cpp +++ b/modules/juce_gui_basics/windows/juce_TooltipWindow.cpp @@ -218,6 +218,9 @@ void TooltipWindow::timerCallback() const auto tipChanged = (newTip != lastTipUnderMouse || newComp != lastComponentUnderMouse); const auto now = Time::getApproximateMillisecondCounter(); + lastComponentUnderMouse = newComp; + lastTipUnderMouse = newTip; + if (tipChanged || dismissalMouseEventOccurred || mouseMovedQuickly) lastCompChangeTime = now; @@ -246,9 +249,6 @@ void TooltipWindow::timerCallback() showTip(); } } - - lastComponentUnderMouse = newComp; - lastTipUnderMouse = newTip; } } diff --git a/modules/juce_gui_basics/windows/juce_TooltipWindow.h b/modules/juce_gui_basics/windows/juce_TooltipWindow.h index 72deb74a..34e27fbd 100644 --- a/modules/juce_gui_basics/windows/juce_TooltipWindow.h +++ b/modules/juce_gui_basics/windows/juce_TooltipWindow.h @@ -136,7 +136,7 @@ public: private: //============================================================================== Point lastMousePos; - Component* lastComponentUnderMouse = nullptr; + SafePointer lastComponentUnderMouse; String tipShowing, lastTipUnderMouse, manuallyShownTip; int millisecondsBeforeTipAppears; unsigned int lastCompChangeTime = 0, lastHideTime = 0; diff --git a/modules/juce_gui_extra/juce_gui_extra.cpp b/modules/juce_gui_extra/juce_gui_extra.cpp index b1562373..d78ca233 100644 --- a/modules/juce_gui_extra/juce_gui_extra.cpp +++ b/modules/juce_gui_extra/juce_gui_extra.cpp @@ -143,6 +143,7 @@ #if JUCE_MAC || JUCE_IOS #if JUCE_MAC + #include "native/juce_mac_NSViewFrameWatcher.h" #include "native/juce_mac_NSViewComponent.mm" #include "native/juce_mac_AppleRemote.mm" #include "native/juce_mac_SystemTrayIcon.cpp" diff --git a/modules/juce_gui_extra/juce_gui_extra.h b/modules/juce_gui_extra/juce_gui_extra.h index 3a421dc2..a7ca7529 100644 --- a/modules/juce_gui_extra/juce_gui_extra.h +++ b/modules/juce_gui_extra/juce_gui_extra.h @@ -35,7 +35,7 @@ ID: juce_gui_extra vendor: juce - version: 6.1.5 + version: 6.1.6 name: JUCE extended GUI classes description: Miscellaneous GUI classes for specialised tasks. website: http://www.juce.com/juce diff --git a/modules/juce_gui_extra/misc/juce_RecentlyOpenedFilesList.cpp b/modules/juce_gui_extra/misc/juce_RecentlyOpenedFilesList.cpp index 9786c087..a11ae05d 100644 --- a/modules/juce_gui_extra/misc/juce_RecentlyOpenedFilesList.cpp +++ b/modules/juce_gui_extra/misc/juce_RecentlyOpenedFilesList.cpp @@ -31,10 +31,6 @@ RecentlyOpenedFilesList::RecentlyOpenedFilesList() { } -RecentlyOpenedFilesList::~RecentlyOpenedFilesList() -{ -} - //============================================================================== void RecentlyOpenedFilesList::setMaxNumberOfItems (const int newMaxNumber) { diff --git a/modules/juce_gui_extra/misc/juce_RecentlyOpenedFilesList.h b/modules/juce_gui_extra/misc/juce_RecentlyOpenedFilesList.h index 7d220858..2bcd7e30 100644 --- a/modules/juce_gui_extra/misc/juce_RecentlyOpenedFilesList.h +++ b/modules/juce_gui_extra/misc/juce_RecentlyOpenedFilesList.h @@ -46,9 +46,6 @@ public: */ RecentlyOpenedFilesList(); - /** Destructor. */ - ~RecentlyOpenedFilesList(); - //============================================================================== /** Sets a limit for the number of files that will be stored in the list. diff --git a/modules/juce_gui_extra/misc/juce_WebBrowserComponent.h b/modules/juce_gui_extra/misc/juce_WebBrowserComponent.h index 7b9160c7..f52cf472 100644 --- a/modules/juce_gui_extra/misc/juce_WebBrowserComponent.h +++ b/modules/juce_gui_extra/misc/juce_WebBrowserComponent.h @@ -182,7 +182,7 @@ public: /** Sets a custom location for the WebView2Loader.dll that is not a part of the standard system DLL search paths. */ - WebView2Preferences withDLLLocation (const File& location) const { return with (&WebView2Preferences::dllLocation, location); } + JUCE_NODISCARD WebView2Preferences withDLLLocation (const File& location) const { return with (&WebView2Preferences::dllLocation, location); } /** Sets a non-default location for storing user data for the browser instance. */ WebView2Preferences withUserDataFolder (const File& folder) const { return with (&WebView2Preferences::userDataFolder, folder); } @@ -190,19 +190,19 @@ public: /** If this is set, the status bar usually displayed in the lower-left of the webview will be disabled. */ - WebView2Preferences withStatusBarDisabled() const { return with (&WebView2Preferences::disableStatusBar, true); } + JUCE_NODISCARD WebView2Preferences withStatusBarDisabled() const { return with (&WebView2Preferences::disableStatusBar, true); } /** If this is set, a blank page will be displayed on error instead of the default built-in error page. */ - WebView2Preferences withBuiltInErrorPageDisabled() const { return with (&WebView2Preferences::disableBuiltInErrorPage, true); } + JUCE_NODISCARD WebView2Preferences withBuiltInErrorPageDisabled() const { return with (&WebView2Preferences::disableBuiltInErrorPage, true); } /** Sets the background colour that WebView2 renders underneath all web content. This colour must either be fully opaque or transparent. On Windows 7 this colour must be opaque. */ - WebView2Preferences withBackgroundColour (const Colour& colour) const + JUCE_NODISCARD WebView2Preferences withBackgroundColour (const Colour& colour) const { // the background colour must be either fully opaque or transparent! jassert (colour.isOpaque() || colour.isTransparent()); diff --git a/modules/juce_gui_extra/native/juce_mac_NSViewComponent.mm b/modules/juce_gui_extra/native/juce_mac_NSViewComponent.mm index 270f3528..0a5ae11f 100644 --- a/modules/juce_gui_extra/native/juce_mac_NSViewComponent.mm +++ b/modules/juce_gui_extra/native/juce_mac_NSViewComponent.mm @@ -26,85 +26,6 @@ namespace juce { -JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wundeclared-selector") -static const auto nsViewFrameChangedSelector = @selector (frameChanged:); -JUCE_END_IGNORE_WARNINGS_GCC_LIKE - -struct NSViewCallbackInterface -{ - virtual ~NSViewCallbackInterface() = default; - virtual void frameChanged() = 0; -}; - -//============================================================================== -struct NSViewFrameChangeCallbackClass : public ObjCClass -{ - NSViewFrameChangeCallbackClass() - : ObjCClass ("JUCE_NSViewCallback_") - { - addIvar ("target"); - - addMethod (nsViewFrameChangedSelector, frameChanged); - - registerClass(); - } - - static void setTarget (id self, NSViewCallbackInterface* c) - { - object_setInstanceVariable (self, "target", c); - } - -private: - static void frameChanged (id self, SEL, NSNotification*) - { - if (auto* target = getIvar (self, "target")) - target->frameChanged(); - } - - JUCE_DECLARE_NON_COPYABLE (NSViewFrameChangeCallbackClass) -}; - -//============================================================================== -class NSViewFrameWatcher : private NSViewCallbackInterface -{ -public: - NSViewFrameWatcher (NSView* viewToWatch, std::function viewResizedIn) - : viewResized (std::move (viewResizedIn)), callback (makeCallbackForView (viewToWatch)) - { - } - - ~NSViewFrameWatcher() override - { - [[NSNotificationCenter defaultCenter] removeObserver: callback]; - [callback release]; - callback = nil; - } - - JUCE_DECLARE_NON_COPYABLE (NSViewFrameWatcher) - JUCE_DECLARE_NON_MOVEABLE (NSViewFrameWatcher) - -private: - id makeCallbackForView (NSView* view) - { - static NSViewFrameChangeCallbackClass cls; - auto* result = [cls.createInstance() init]; - NSViewFrameChangeCallbackClass::setTarget (result, this); - - [[NSNotificationCenter defaultCenter] addObserver: result - selector: nsViewFrameChangedSelector - name: NSViewFrameDidChangeNotification - object: view]; - - return result; - } - - void frameChanged() override { viewResized(); } - - std::function viewResized; - id callback; -}; - -//============================================================================== class NSViewAttachment : public ReferenceCountedObject, public ComponentMovementWatcher { diff --git a/modules/juce_gui_extra/native/juce_mac_NSViewFrameWatcher.h b/modules/juce_gui_extra/native/juce_mac_NSViewFrameWatcher.h new file mode 100644 index 00000000..62f69a55 --- /dev/null +++ b/modules/juce_gui_extra/native/juce_mac_NSViewFrameWatcher.h @@ -0,0 +1,111 @@ +/* + ============================================================================== + + This file is part of the JUCE library. + Copyright (c) 2020 - Raw Material Software Limited + + JUCE is an open source library subject to commercial or open-source + licensing. + + By using JUCE, you agree to the terms of both the JUCE 6 End-User License + Agreement and JUCE Privacy Policy (both effective as of the 16th June 2020). + + End User License Agreement: www.juce.com/juce-6-licence + Privacy Policy: www.juce.com/juce-privacy-policy + + Or: You may also use this code under the terms of the GPL v3 (see + www.gnu.org/licenses). + + JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER + EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE + DISCLAIMED. + + ============================================================================== +*/ + +#if JUCE_MAC + +namespace juce +{ + +JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wundeclared-selector") +const auto nsViewFrameChangedSelector = @selector (frameChanged:); +JUCE_END_IGNORE_WARNINGS_GCC_LIKE + +struct NSViewCallbackInterface +{ + virtual ~NSViewCallbackInterface() = default; + virtual void frameChanged() = 0; +}; + +//============================================================================== +struct NSViewFrameChangeCallbackClass : public ObjCClass +{ + NSViewFrameChangeCallbackClass() + : ObjCClass ("JUCE_NSViewCallback_") + { + addIvar ("target"); + + addMethod (nsViewFrameChangedSelector, frameChanged); + + registerClass(); + } + + static void setTarget (id self, NSViewCallbackInterface* c) + { + object_setInstanceVariable (self, "target", c); + } + +private: + static void frameChanged (id self, SEL, NSNotification*) + { + if (auto* target = getIvar (self, "target")) + target->frameChanged(); + } + + JUCE_DECLARE_NON_COPYABLE (NSViewFrameChangeCallbackClass) +}; + +//============================================================================== +class NSViewFrameWatcher : private NSViewCallbackInterface +{ +public: + NSViewFrameWatcher (NSView* viewToWatch, std::function viewResizedIn) + : viewResized (std::move (viewResizedIn)), callback (makeCallbackForView (viewToWatch)) + { + } + + ~NSViewFrameWatcher() override + { + [[NSNotificationCenter defaultCenter] removeObserver: callback]; + [callback release]; + callback = nil; + } + + JUCE_DECLARE_NON_COPYABLE (NSViewFrameWatcher) + JUCE_DECLARE_NON_MOVEABLE (NSViewFrameWatcher) + +private: + id makeCallbackForView (NSView* view) + { + static NSViewFrameChangeCallbackClass cls; + auto* result = [cls.createInstance() init]; + NSViewFrameChangeCallbackClass::setTarget (result, this); + + [[NSNotificationCenter defaultCenter] addObserver: result + selector: nsViewFrameChangedSelector + name: NSViewFrameDidChangeNotification + object: view]; + + return result; + } + + void frameChanged() override { viewResized(); } + + std::function viewResized; + id callback; +}; + +} // namespace juce + +#endif diff --git a/modules/juce_gui_extra/native/juce_mac_SystemTrayIcon.cpp b/modules/juce_gui_extra/native/juce_mac_SystemTrayIcon.cpp index dc33b0c0..ca7537f4 100644 --- a/modules/juce_gui_extra/native/juce_mac_SystemTrayIcon.cpp +++ b/modules/juce_gui_extra/native/juce_mac_SystemTrayIcon.cpp @@ -160,22 +160,22 @@ struct ButtonBasedStatusItem : public StatusItemContainer eventMods.withFlags (isLeft ? ModifierKeys::leftButtonModifier : ModifierKeys::rightButtonModifier), pressure, - MouseInputSource::invalidOrientation, MouseInputSource::invalidRotation, - MouseInputSource::invalidTiltX, MouseInputSource::invalidTiltY, + MouseInputSource::defaultOrientation, MouseInputSource::defaultRotation, + MouseInputSource::defaultTiltX, MouseInputSource::defaultTiltY, &owner, &owner, now, {}, now, 1, false }); owner.mouseUp ({ mouseSource, {}, eventMods.withoutMouseButtons(), pressure, - MouseInputSource::invalidOrientation, MouseInputSource::invalidRotation, - MouseInputSource::invalidTiltX, MouseInputSource::invalidTiltY, + MouseInputSource::defaultOrientation, MouseInputSource::defaultRotation, + MouseInputSource::defaultTiltX, MouseInputSource::defaultTiltY, &owner, &owner, now, {}, now, 1, false }); } else if (type == NSEventTypeMouseMoved) { owner.mouseMove (MouseEvent (mouseSource, {}, eventMods, pressure, - MouseInputSource::invalidOrientation, MouseInputSource::invalidRotation, - MouseInputSource::invalidTiltX, MouseInputSource::invalidTiltY, + MouseInputSource::defaultOrientation, MouseInputSource::defaultRotation, + MouseInputSource::defaultTiltX, MouseInputSource::defaultTiltY, &owner, &owner, now, {}, now, 1, false)); } } @@ -289,20 +289,20 @@ struct ViewBasedStatusItem : public StatusItemContainer owner.mouseDown (MouseEvent (mouseSource, {}, eventMods.withFlags (isLeft ? ModifierKeys::leftButtonModifier : ModifierKeys::rightButtonModifier), - pressure, MouseInputSource::invalidOrientation, MouseInputSource::invalidRotation, - MouseInputSource::invalidTiltX, MouseInputSource::invalidTiltY, + pressure, MouseInputSource::defaultOrientation, MouseInputSource::defaultRotation, + MouseInputSource::defaultTiltX, MouseInputSource::defaultTiltY, &owner, &owner, now, {}, now, 1, false)); owner.mouseUp (MouseEvent (mouseSource, {}, eventMods.withoutMouseButtons(), pressure, - MouseInputSource::invalidOrientation, MouseInputSource::invalidRotation, - MouseInputSource::invalidTiltX, MouseInputSource::invalidTiltY, + MouseInputSource::defaultOrientation, MouseInputSource::defaultRotation, + MouseInputSource::defaultTiltX, MouseInputSource::defaultTiltY, &owner, &owner, now, {}, now, 1, false)); } else if (type == NSEventTypeMouseMoved) { owner.mouseMove (MouseEvent (mouseSource, {}, eventMods, pressure, - MouseInputSource::invalidOrientation, MouseInputSource::invalidRotation, - MouseInputSource::invalidTiltX, MouseInputSource::invalidTiltY, + MouseInputSource::defaultOrientation, MouseInputSource::defaultRotation, + MouseInputSource::defaultTiltX, MouseInputSource::defaultTiltY, &owner, &owner, now, {}, now, 1, false)); } } diff --git a/modules/juce_gui_extra/native/juce_win32_ActiveXComponent.cpp b/modules/juce_gui_extra/native/juce_win32_ActiveXComponent.cpp index 54da2726..82290703 100644 --- a/modules/juce_gui_extra/native/juce_win32_ActiveXComponent.cpp +++ b/modules/juce_gui_extra/native/juce_win32_ActiveXComponent.cpp @@ -224,8 +224,8 @@ namespace ActiveXHelpers { (float) (GET_X_LPARAM (lParam) + activeXRect.left - peerRect.left), (float) (GET_Y_LPARAM (lParam) + activeXRect.top - peerRect.top) }, ComponentPeer::getCurrentModifiersRealtime(), - MouseInputSource::invalidPressure, - MouseInputSource::invalidOrientation, + MouseInputSource::defaultPressure, + MouseInputSource::defaultOrientation, getMouseEventTime()); break; } diff --git a/modules/juce_gui_extra/native/juce_win32_SystemTrayIcon.cpp b/modules/juce_gui_extra/native/juce_win32_SystemTrayIcon.cpp index 629d958a..6bef4160 100644 --- a/modules/juce_gui_extra/native/juce_win32_SystemTrayIcon.cpp +++ b/modules/juce_gui_extra/native/juce_win32_SystemTrayIcon.cpp @@ -115,8 +115,8 @@ public: const Time eventTime (getMouseEventTime()); const MouseEvent e (Desktop::getInstance().getMainMouseSource(), {}, eventMods, - MouseInputSource::invalidPressure, MouseInputSource::invalidOrientation, - MouseInputSource::invalidRotation, MouseInputSource::invalidTiltX, MouseInputSource::invalidTiltY, + MouseInputSource::defaultPressure, MouseInputSource::defaultOrientation, + MouseInputSource::defaultRotation, MouseInputSource::defaultTiltX, MouseInputSource::defaultTiltY, &owner, &owner, eventTime, {}, eventTime, 1, false); if (lParam == WM_LBUTTONDOWN || lParam == WM_RBUTTONDOWN) diff --git a/modules/juce_gui_extra/native/juce_win32_WebBrowserComponent.cpp b/modules/juce_gui_extra/native/juce_win32_WebBrowserComponent.cpp index 579e3aaf..56db0f0b 100644 --- a/modules/juce_gui_extra/native/juce_win32_WebBrowserComponent.cpp +++ b/modules/juce_gui_extra/native/juce_win32_WebBrowserComponent.cpp @@ -609,7 +609,7 @@ private: ComSmartPtr settings; webView->get_Settings (settings.resetAndGetPointerAddress()); - if (settings == nullptr) + if (settings != nullptr) { settings->put_IsStatusBarEnabled (! preferences.getIsStatusBarDisabled()); settings->put_IsBuiltInErrorPageEnabled (! preferences.getIsBuiltInErrorPageDisabled()); diff --git a/modules/juce_opengl/juce_opengl.h b/modules/juce_opengl/juce_opengl.h index 62f58319..5f03aa3e 100644 --- a/modules/juce_opengl/juce_opengl.h +++ b/modules/juce_opengl/juce_opengl.h @@ -35,7 +35,7 @@ ID: juce_opengl vendor: juce - version: 6.1.5 + version: 6.1.6 name: JUCE OpenGL classes description: Classes for rendering OpenGL in a JUCE window. website: http://www.juce.com/juce diff --git a/modules/juce_opengl/native/juce_OpenGL_osx.h b/modules/juce_opengl/native/juce_OpenGL_osx.h index fb404f66..8445269e 100644 --- a/modules/juce_opengl/native/juce_OpenGL_osx.h +++ b/modules/juce_opengl/native/juce_OpenGL_osx.h @@ -248,7 +248,8 @@ public: NSOpenGLView* view = nil; ReferenceCountedObjectPtr viewAttachment; double lastSwapTime = 0; - int minSwapTimeMs = 0, underrunCounter = 0, numFramesPerSwap = 0; + std::atomic minSwapTimeMs { 0 }; + int underrunCounter = 0, numFramesPerSwap = 0; double videoRefreshPeriodS = 1.0 / 60.0; //============================================================================== diff --git a/modules/juce_opengl/native/juce_OpenGL_win32.h b/modules/juce_opengl/native/juce_OpenGL_win32.h index 6ea6ef17..b272a256 100644 --- a/modules/juce_opengl/native/juce_OpenGL_win32.h +++ b/modules/juce_opengl/native/juce_OpenGL_win32.h @@ -212,7 +212,7 @@ private: { WGL_CONTEXT_MAJOR_VERSION_ARB, 3, WGL_CONTEXT_MINOR_VERSION_ARB, 2, - WGL_CONTEXT_PROFILE_MASK_ARB, WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB, + WGL_CONTEXT_PROFILE_MASK_ARB, WGL_CONTEXT_CORE_PROFILE_BIT_ARB, 0 }; diff --git a/modules/juce_opengl/opengl/juce_OpenGLContext.cpp b/modules/juce_opengl/opengl/juce_OpenGLContext.cpp index fce1b763..868df91d 100644 --- a/modules/juce_opengl/opengl/juce_OpenGLContext.cpp +++ b/modules/juce_opengl/opengl/juce_OpenGLContext.cpp @@ -91,6 +91,44 @@ static bool contextHasTextureNpotFeature() class OpenGLContext::CachedImage : public CachedComponentImage, private ThreadPoolJob { + struct AreaAndScale + { + Rectangle area; + double scale; + + auto tie() const { return std::tie (area, scale); } + + auto operator== (const AreaAndScale& other) const { return tie() == other.tie(); } + auto operator!= (const AreaAndScale& other) const { return tie() != other.tie(); } + }; + + class LockedAreaAndScale + { + public: + auto get() const + { + const ScopedLock lock (mutex); + return data; + } + + template + void set (const AreaAndScale& d, Fn&& ifDifferent) + { + const auto old = [&] + { + const ScopedLock lock (mutex); + return std::exchange (data, d); + }(); + + if (old != d) + ifDifferent(); + } + + private: + CriticalSection mutex; + AreaAndScale data { {}, 1.0 }; + }; + public: CachedImage (OpenGLContext& c, Component& comp, const OpenGLPixelFormat& pixFormat, void* contextToShare) @@ -205,8 +243,10 @@ public: } //============================================================================== - bool ensureFrameBufferSize() + bool ensureFrameBufferSize (Rectangle viewportArea) { + JUCE_ASSERT_MESSAGE_MANAGER_IS_LOCKED + auto fbW = cachedImageFrameBuffer.getWidth(); auto fbH = cachedImageFrameBuffer.getHeight(); @@ -276,10 +316,13 @@ public: doWorkWhileWaitingForLock (true); + const auto currentAreaAndScale = areaAndScale.get(); + const auto viewportArea = currentAreaAndScale.area; + if (context.renderer != nullptr) { glViewport (0, 0, viewportArea.getWidth(), viewportArea.getHeight()); - context.currentRenderScale = scale; + context.currentRenderScale = currentAreaAndScale.scale; context.renderer->renderOpenGL(); clearGLError(); @@ -290,7 +333,7 @@ public: { if (isUpdating) { - paintComponent(); + paintComponent (currentAreaAndScale); if (! hasInitialised) return false; @@ -316,7 +359,7 @@ public: if (auto* peer = component.getPeer()) { #if JUCE_MAC - const auto displayScale = [this] + const auto displayScale = Desktop::getInstance().getGlobalScaleFactor() * [this] { if (auto* wrapper = cvDisplayLinkWrapper.get()) if (wrapper->updateActiveDisplay()) @@ -331,7 +374,7 @@ public: return [window backingScaleFactor]; } - return scale; + return areaAndScale.get().scale; }(); #else const auto displayScale = Desktop::getInstance().getDisplays().getDisplayForRect (component.getTopLevelComponent()->getScreenBounds())->scale; @@ -350,10 +393,9 @@ public: auto newScale = displayScale; #endif - if (scale != newScale || viewportArea != newArea) + areaAndScale.set ({ newArea, newScale }, [&] { - scale = newScale; - viewportArea = newArea; + // Transform is only accessed when the message manager is locked transform = AffineTransform::scale ((float) newArea.getWidth() / (float) localBounds.getWidth(), (float) newArea.getHeight() / (float) localBounds.getHeight()); @@ -361,13 +403,13 @@ public: if (canTriggerUpdate) invalidateAll(); - } + }); } } void bindVertexArray() noexcept { - if (openGLVersion.major >= 3) + if (shouldUseCustomVAO()) if (vertexArrayObject != 0) context.extensions.glBindVertexArray (vertexArrayObject); } @@ -383,17 +425,19 @@ public: } } - void paintComponent() + void paintComponent (const AreaAndScale& currentAreaAndScale) { + JUCE_ASSERT_MESSAGE_MANAGER_IS_LOCKED + // you mustn't set your own cached image object when attaching a GL context! jassert (get (component) == this); - if (! ensureFrameBufferSize()) + if (! ensureFrameBufferSize (currentAreaAndScale.area)) return; - RectangleList invalid (viewportArea); + RectangleList invalid (currentAreaAndScale.area); invalid.subtract (validArea); - validArea = viewportArea; + validArea = currentAreaAndScale.area; if (! invalid.isEmpty()) { @@ -572,15 +616,14 @@ public: gl::loadFunctions(); - openGLVersion = getOpenGLVersion(); - - if (openGLVersion.major >= 3) + if (shouldUseCustomVAO()) { context.extensions.glGenVertexArrays (1, &vertexArrayObject); bindVertexArray(); } - glViewport (0, 0, viewportArea.getWidth(), viewportArea.getHeight()); + const auto currentViewportArea = areaAndScale.get().area; + glViewport (0, 0, currentViewportArea.getWidth(), currentViewportArea.getHeight()); nativeContext->setSwapInterval (1); @@ -617,6 +660,31 @@ public: nativeContext->shutdownOnRenderThread(); } + /* Returns true if the context requires a non-zero vertex array object (VAO) to be bound. + + If the context is a compatibility context, we can just pretend that VAOs don't exist, + and use the default VAO all the time instead. This provides a more consistent experience + in user code, which might make calls (like glVertexPointer()) that only work when VAO 0 is + bound in OpenGL 3.2+. + */ + bool shouldUseCustomVAO() const + { + #if JUCE_OPENGL_ES + return false; + #else + clearGLError(); + GLint mask = 0; + glGetIntegerv (GL_CONTEXT_PROFILE_MASK, &mask); + + // The context isn't aware of the profile mask, so it pre-dates the core profile + if (glGetError() == GL_INVALID_ENUM) + return false; + + // Also assumes a compatibility profile if the mask is completely empty for some reason + return (mask & (GLint) GL_CONTEXT_CORE_PROFILE_BIT) != 0; + #endif + } + //============================================================================== struct BlockingWorker : public OpenGLContext::AsyncWorker { @@ -707,13 +775,12 @@ public: OpenGLContext& context; Component& component; - Version openGLVersion; OpenGLFrameBuffer cachedImageFrameBuffer; RectangleList validArea; - Rectangle viewportArea, lastScreenBounds; - double scale = 1.0; + Rectangle lastScreenBounds; AffineTransform transform; GLuint vertexArrayObject = 0; + LockedAreaAndScale areaAndScale; StringArray associatedObjectNames; ReferenceCountedArray associatedObjects; diff --git a/modules/juce_opengl/opengl/juce_OpenGLHelpers.cpp b/modules/juce_opengl/opengl/juce_OpenGLHelpers.cpp index 54ea447f..f4b26e79 100644 --- a/modules/juce_opengl/opengl/juce_OpenGLHelpers.cpp +++ b/modules/juce_opengl/opengl/juce_OpenGLHelpers.cpp @@ -133,6 +133,23 @@ bool OpenGLHelpers::isExtensionSupported (const char* const extensionName) jassert (extensionName != nullptr); // you must supply a genuine string for this. jassert (isContextActive()); // An OpenGL context will need to be active before calling this. + if (getOpenGLVersion().major >= 3) + { + using GetStringi = const GLubyte* (*) (GLenum, GLuint); + + if (auto* thisGlGetStringi = reinterpret_cast (getExtensionFunction ("glGetStringi"))) + { + GLint n = 0; + glGetIntegerv (GL_NUM_EXTENSIONS, &n); + + for (auto i = (decltype (n)) 0; i < n; ++i) + if (StringRef (extensionName) == StringRef ((const char*) thisGlGetStringi (GL_EXTENSIONS, (GLuint) i))) + return true; + + return false; + } + } + const char* extensions = (const char*) glGetString (GL_EXTENSIONS); jassert (extensions != nullptr); // Perhaps you didn't activate an OpenGL context before calling this? diff --git a/modules/juce_opengl/opengl/juce_OpenGLImage.cpp b/modules/juce_opengl/opengl/juce_OpenGLImage.cpp index 716cec64..709b6778 100644 --- a/modules/juce_opengl/opengl/juce_OpenGLImage.cpp +++ b/modules/juce_opengl/opengl/juce_OpenGLImage.cpp @@ -168,6 +168,9 @@ private: bitmapData.dataReleaser.reset (r); bitmapData.data = (uint8*) r->data.get(); + bitmapData.size = (size_t) bitmapData.width + * (size_t) bitmapData.height + * sizeof (PixelARGB); bitmapData.lineStride = (bitmapData.width * bitmapData.pixelStride + 3) & ~3; ReaderType::read (frameBuffer, bitmapData, x, y); diff --git a/modules/juce_osc/juce_osc.h b/modules/juce_osc/juce_osc.h index d196b31d..fe0c552a 100644 --- a/modules/juce_osc/juce_osc.h +++ b/modules/juce_osc/juce_osc.h @@ -35,7 +35,7 @@ ID: juce_osc vendor: juce - version: 6.1.5 + version: 6.1.6 name: JUCE OSC classes description: Open Sound Control implementation. website: http://www.juce.com/juce diff --git a/modules/juce_product_unlocking/juce_product_unlocking.h b/modules/juce_product_unlocking/juce_product_unlocking.h index f264eb54..1f0a2e98 100644 --- a/modules/juce_product_unlocking/juce_product_unlocking.h +++ b/modules/juce_product_unlocking/juce_product_unlocking.h @@ -35,7 +35,7 @@ ID: juce_product_unlocking vendor: juce - version: 6.1.5 + version: 6.1.6 name: JUCE Online marketplace support description: Classes for online product authentication website: http://www.juce.com/juce diff --git a/modules/juce_video/juce_video.h b/modules/juce_video/juce_video.h index 5b2414c8..42529475 100644 --- a/modules/juce_video/juce_video.h +++ b/modules/juce_video/juce_video.h @@ -35,7 +35,7 @@ ID: juce_video vendor: juce - version: 6.1.5 + version: 6.1.6 name: JUCE video playback and capture classes description: Classes for playing video and capturing camera input. website: http://www.juce.com/juce -- 2.30.2