diff --git a/BREAKING_CHANGES.md b/BREAKING_CHANGES.md
index a56e640cac..d584924191 100644
--- a/BREAKING_CHANGES.md
+++ b/BREAKING_CHANGES.md
@@ -2,6 +2,29 @@
# develop
+## Change
+
+Support for the MinGW toolchain has been removed.
+
+**Possible Issues**
+
+MinGW can no longer be used to build JUCE.
+
+**Workaround**
+
+On Windows, use an alternative compiler such as Clang or MSVC.
+
+Cross-compiling for Windows from Linux is not supported, and there is no
+workaround for this use case.
+
+**Rationale**
+
+The MinGW provides a poor user experience, with very long build times and
+missing features. The high maintenance cost, both in terms of developer time,
+and continuous integration bandwidth (both of which could provide more value
+elsewhere), means that continued support for MinGW is difficult to justify.
+
+
## Change
The GUI Editor has been removed from the Projucer.
diff --git a/docs/JUCE Module Format.md b/docs/JUCE Module Format.md
index 3439e664cf..447a3df774 100644
--- a/docs/JUCE Module Format.md
+++ b/docs/JUCE Module Format.md
@@ -95,8 +95,7 @@ will be used and the cpp ignored. (And vice-versa for other platforms, of course
Precompiled libraries can be included in a module by placing them in a libs/ subdirectory.
The following directories are automatically added to the library search paths, and libraries
placed in these directories can be linked with projects via the OSXLibs, iOSLibs,
-windowsLibs, linuxLibs and mingwLibs keywords in the module declaration (see the following
-section).
+windowsLibs, and linuxLibs keywords in the module declaration (see the following section).
- OS X
- libs/MacOSX - to support multiple architectures, you may place libraries built as universal
@@ -115,9 +114,6 @@ section).
- libs/Linux/{arch}, where {arch} is the architecture you are targeting with the compiler. Some
common examples of {arch} are "x86_64", "i386" and "armv6".
-- MinGW
- - libs/MinGW/{arch}, where {arch} can take the same values as Linux.
-
- iOS
- libs/iOS - to support multiple architectures, you may place libraries built as universal
binaries at this location. For backwards compatibility, the Projucer will also include the
@@ -206,10 +202,6 @@ Possible values:
- (Optional) A list (space or comma-separated) of static or dynamic libs that should be linked in a
linux build (these are passed to the linker via the -l flag)
-- mingwLibs
- - (Optional) A list (space or comma-separated) of static libs that should be linked in a
- win32 mingw build (these are passed to the linker via the -l flag)
-
- OSXLibs
- (Optional) A list (space or comma-separated) of static or dynamic libs that should be linked in an
OS X build (these are passed to the linker via the -l flag)
@@ -238,7 +230,6 @@ Here's an example block:
OSXFrameworks: CoreAudio CoreMIDI DiscRecording
iOSFrameworks: CoreAudio CoreMIDI AudioToolbox AVFoundation
linuxLibs: asound
- mingwLibs: winmm
END_JUCE_MODULE_DECLARATION
diff --git a/examples/Assets/juce_module_info b/examples/Assets/juce_module_info
index 1059fa2abc..9cf8a262d6 100644
--- a/examples/Assets/juce_module_info
+++ b/examples/Assets/juce_module_info
@@ -33,6 +33,5 @@
"OSXFrameworks": "Cocoa IOKit",
"iOSFrameworks": "Foundation",
- "LinuxLibs": "rt dl pthread",
- "mingwLibs": "uuid wsock32 wininet version ole32 ws2_32 oleaut32 imm32 comdlg32 shlwapi rpcrt4 winmm"
+ "LinuxLibs": "rt dl pthread"
}
diff --git a/examples/DemoRunner/Builds/Android/app/CMakeLists.txt b/examples/DemoRunner/Builds/Android/app/CMakeLists.txt
index 56dae2f938..83a94118ca 100644
--- a/examples/DemoRunner/Builds/Android/app/CMakeLists.txt
+++ b/examples/DemoRunner/Builds/Android/app/CMakeLists.txt
@@ -2220,7 +2220,6 @@ add_library( ${BINARY_NAME}
"../../../../../modules/juce_gui_basics/native/accessibility/juce_AccessibilitySharedCode_mac.mm"
"../../../../../modules/juce_gui_basics/native/accessibility/juce_AccessibilityTextHelpers.h"
"../../../../../modules/juce_gui_basics/native/accessibility/juce_AccessibilityTextHelpers_test.cpp"
- "../../../../../modules/juce_gui_basics/native/accessibility/juce_ComInterfaces_windows.h"
"../../../../../modules/juce_gui_basics/native/accessibility/juce_UIAExpandCollapseProvider_windows.h"
"../../../../../modules/juce_gui_basics/native/accessibility/juce_UIAGridItemProvider_windows.h"
"../../../../../modules/juce_gui_basics/native/accessibility/juce_UIAGridProvider_windows.h"
@@ -2512,7 +2511,6 @@ add_library( ${BINARY_NAME}
"../../../../../modules/juce_video/native/juce_CameraDevice_ios.h"
"../../../../../modules/juce_video/native/juce_CameraDevice_mac.h"
"../../../../../modules/juce_video/native/juce_CameraDevice_windows.h"
- "../../../../../modules/juce_video/native/juce_ComTypes_windows.h"
"../../../../../modules/juce_video/native/juce_Video_android.h"
"../../../../../modules/juce_video/native/juce_Video_mac.h"
"../../../../../modules/juce_video/native/juce_Video_windows.h"
@@ -4718,7 +4716,6 @@ set_source_files_properties(
"../../../../../modules/juce_gui_basics/native/accessibility/juce_AccessibilitySharedCode_mac.mm"
"../../../../../modules/juce_gui_basics/native/accessibility/juce_AccessibilityTextHelpers.h"
"../../../../../modules/juce_gui_basics/native/accessibility/juce_AccessibilityTextHelpers_test.cpp"
- "../../../../../modules/juce_gui_basics/native/accessibility/juce_ComInterfaces_windows.h"
"../../../../../modules/juce_gui_basics/native/accessibility/juce_UIAExpandCollapseProvider_windows.h"
"../../../../../modules/juce_gui_basics/native/accessibility/juce_UIAGridItemProvider_windows.h"
"../../../../../modules/juce_gui_basics/native/accessibility/juce_UIAGridProvider_windows.h"
@@ -5010,7 +5007,6 @@ set_source_files_properties(
"../../../../../modules/juce_video/native/juce_CameraDevice_ios.h"
"../../../../../modules/juce_video/native/juce_CameraDevice_mac.h"
"../../../../../modules/juce_video/native/juce_CameraDevice_windows.h"
- "../../../../../modules/juce_video/native/juce_ComTypes_windows.h"
"../../../../../modules/juce_video/native/juce_Video_android.h"
"../../../../../modules/juce_video/native/juce_Video_mac.h"
"../../../../../modules/juce_video/native/juce_Video_windows.h"
diff --git a/examples/DemoRunner/Builds/Android/app/src/main/assets/juce_module_info b/examples/DemoRunner/Builds/Android/app/src/main/assets/juce_module_info
index 1059fa2abc..9cf8a262d6 100644
--- a/examples/DemoRunner/Builds/Android/app/src/main/assets/juce_module_info
+++ b/examples/DemoRunner/Builds/Android/app/src/main/assets/juce_module_info
@@ -33,6 +33,5 @@
"OSXFrameworks": "Cocoa IOKit",
"iOSFrameworks": "Foundation",
- "LinuxLibs": "rt dl pthread",
- "mingwLibs": "uuid wsock32 wininet version ole32 ws2_32 oleaut32 imm32 comdlg32 shlwapi rpcrt4 winmm"
+ "LinuxLibs": "rt dl pthread"
}
diff --git a/examples/DemoRunner/Builds/VisualStudio2019/DemoRunner_App.vcxproj b/examples/DemoRunner/Builds/VisualStudio2019/DemoRunner_App.vcxproj
index a7c261d8e9..c406fb3e06 100644
--- a/examples/DemoRunner/Builds/VisualStudio2019/DemoRunner_App.vcxproj
+++ b/examples/DemoRunner/Builds/VisualStudio2019/DemoRunner_App.vcxproj
@@ -4381,7 +4381,6 @@
-
@@ -4528,7 +4527,6 @@
-
diff --git a/examples/DemoRunner/Builds/VisualStudio2019/DemoRunner_App.vcxproj.filters b/examples/DemoRunner/Builds/VisualStudio2019/DemoRunner_App.vcxproj.filters
index 6f1f1dc14d..d2ae24b13d 100644
--- a/examples/DemoRunner/Builds/VisualStudio2019/DemoRunner_App.vcxproj.filters
+++ b/examples/DemoRunner/Builds/VisualStudio2019/DemoRunner_App.vcxproj.filters
@@ -7767,9 +7767,6 @@
JUCE Modules\juce_gui_basics\native\accessibility
-
- JUCE Modules\juce_gui_basics\native\accessibility
-
JUCE Modules\juce_gui_basics\native\accessibility
@@ -8208,9 +8205,6 @@
JUCE Modules\juce_video\native
-
- JUCE Modules\juce_video\native
-
JUCE Modules\juce_video\native
diff --git a/examples/DemoRunner/Builds/VisualStudio2022/DemoRunner_App.vcxproj b/examples/DemoRunner/Builds/VisualStudio2022/DemoRunner_App.vcxproj
index 7920fca43b..6b8e22292a 100644
--- a/examples/DemoRunner/Builds/VisualStudio2022/DemoRunner_App.vcxproj
+++ b/examples/DemoRunner/Builds/VisualStudio2022/DemoRunner_App.vcxproj
@@ -4381,7 +4381,6 @@
-
@@ -4528,7 +4527,6 @@
-
diff --git a/examples/DemoRunner/Builds/VisualStudio2022/DemoRunner_App.vcxproj.filters b/examples/DemoRunner/Builds/VisualStudio2022/DemoRunner_App.vcxproj.filters
index 590b2e4364..485b5c0e34 100644
--- a/examples/DemoRunner/Builds/VisualStudio2022/DemoRunner_App.vcxproj.filters
+++ b/examples/DemoRunner/Builds/VisualStudio2022/DemoRunner_App.vcxproj.filters
@@ -7767,9 +7767,6 @@
JUCE Modules\juce_gui_basics\native\accessibility
-
- JUCE Modules\juce_gui_basics\native\accessibility
-
JUCE Modules\juce_gui_basics\native\accessibility
@@ -8208,9 +8205,6 @@
JUCE Modules\juce_video\native
-
- JUCE Modules\juce_video\native
-
JUCE Modules\juce_video\native
diff --git a/extras/AudioPerformanceTest/Builds/Android/app/CMakeLists.txt b/extras/AudioPerformanceTest/Builds/Android/app/CMakeLists.txt
index 4d45f41559..9b2e825b56 100644
--- a/extras/AudioPerformanceTest/Builds/Android/app/CMakeLists.txt
+++ b/extras/AudioPerformanceTest/Builds/Android/app/CMakeLists.txt
@@ -1982,7 +1982,6 @@ add_library( ${BINARY_NAME}
"../../../../../modules/juce_gui_basics/native/accessibility/juce_AccessibilitySharedCode_mac.mm"
"../../../../../modules/juce_gui_basics/native/accessibility/juce_AccessibilityTextHelpers.h"
"../../../../../modules/juce_gui_basics/native/accessibility/juce_AccessibilityTextHelpers_test.cpp"
- "../../../../../modules/juce_gui_basics/native/accessibility/juce_ComInterfaces_windows.h"
"../../../../../modules/juce_gui_basics/native/accessibility/juce_UIAExpandCollapseProvider_windows.h"
"../../../../../modules/juce_gui_basics/native/accessibility/juce_UIAGridItemProvider_windows.h"
"../../../../../modules/juce_gui_basics/native/accessibility/juce_UIAGridProvider_windows.h"
@@ -4162,7 +4161,6 @@ set_source_files_properties(
"../../../../../modules/juce_gui_basics/native/accessibility/juce_AccessibilitySharedCode_mac.mm"
"../../../../../modules/juce_gui_basics/native/accessibility/juce_AccessibilityTextHelpers.h"
"../../../../../modules/juce_gui_basics/native/accessibility/juce_AccessibilityTextHelpers_test.cpp"
- "../../../../../modules/juce_gui_basics/native/accessibility/juce_ComInterfaces_windows.h"
"../../../../../modules/juce_gui_basics/native/accessibility/juce_UIAExpandCollapseProvider_windows.h"
"../../../../../modules/juce_gui_basics/native/accessibility/juce_UIAGridItemProvider_windows.h"
"../../../../../modules/juce_gui_basics/native/accessibility/juce_UIAGridProvider_windows.h"
diff --git a/extras/AudioPerformanceTest/Builds/VisualStudio2022/AudioPerformanceTest_App.vcxproj b/extras/AudioPerformanceTest/Builds/VisualStudio2022/AudioPerformanceTest_App.vcxproj
index e81ac7e227..627c38416f 100644
--- a/extras/AudioPerformanceTest/Builds/VisualStudio2022/AudioPerformanceTest_App.vcxproj
+++ b/extras/AudioPerformanceTest/Builds/VisualStudio2022/AudioPerformanceTest_App.vcxproj
@@ -3852,7 +3852,6 @@
-
diff --git a/extras/AudioPerformanceTest/Builds/VisualStudio2022/AudioPerformanceTest_App.vcxproj.filters b/extras/AudioPerformanceTest/Builds/VisualStudio2022/AudioPerformanceTest_App.vcxproj.filters
index 1d76a1563a..1c50dd185c 100644
--- a/extras/AudioPerformanceTest/Builds/VisualStudio2022/AudioPerformanceTest_App.vcxproj.filters
+++ b/extras/AudioPerformanceTest/Builds/VisualStudio2022/AudioPerformanceTest_App.vcxproj.filters
@@ -6822,9 +6822,6 @@
JUCE Modules\juce_gui_basics\native\accessibility
-
- JUCE Modules\juce_gui_basics\native\accessibility
-
JUCE Modules\juce_gui_basics\native\accessibility
diff --git a/extras/AudioPluginHost/Builds/Android/app/CMakeLists.txt b/extras/AudioPluginHost/Builds/Android/app/CMakeLists.txt
index 50ae8425da..5b22a857b7 100644
--- a/extras/AudioPluginHost/Builds/Android/app/CMakeLists.txt
+++ b/extras/AudioPluginHost/Builds/Android/app/CMakeLists.txt
@@ -2112,7 +2112,6 @@ add_library( ${BINARY_NAME}
"../../../../../modules/juce_gui_basics/native/accessibility/juce_AccessibilitySharedCode_mac.mm"
"../../../../../modules/juce_gui_basics/native/accessibility/juce_AccessibilityTextHelpers.h"
"../../../../../modules/juce_gui_basics/native/accessibility/juce_AccessibilityTextHelpers_test.cpp"
- "../../../../../modules/juce_gui_basics/native/accessibility/juce_ComInterfaces_windows.h"
"../../../../../modules/juce_gui_basics/native/accessibility/juce_UIAExpandCollapseProvider_windows.h"
"../../../../../modules/juce_gui_basics/native/accessibility/juce_UIAGridItemProvider_windows.h"
"../../../../../modules/juce_gui_basics/native/accessibility/juce_UIAGridProvider_windows.h"
@@ -4445,7 +4444,6 @@ set_source_files_properties(
"../../../../../modules/juce_gui_basics/native/accessibility/juce_AccessibilitySharedCode_mac.mm"
"../../../../../modules/juce_gui_basics/native/accessibility/juce_AccessibilityTextHelpers.h"
"../../../../../modules/juce_gui_basics/native/accessibility/juce_AccessibilityTextHelpers_test.cpp"
- "../../../../../modules/juce_gui_basics/native/accessibility/juce_ComInterfaces_windows.h"
"../../../../../modules/juce_gui_basics/native/accessibility/juce_UIAExpandCollapseProvider_windows.h"
"../../../../../modules/juce_gui_basics/native/accessibility/juce_UIAGridItemProvider_windows.h"
"../../../../../modules/juce_gui_basics/native/accessibility/juce_UIAGridProvider_windows.h"
diff --git a/extras/AudioPluginHost/Builds/Android/app/src/main/assets/juce_module_info b/extras/AudioPluginHost/Builds/Android/app/src/main/assets/juce_module_info
index 1059fa2abc..9cf8a262d6 100644
--- a/extras/AudioPluginHost/Builds/Android/app/src/main/assets/juce_module_info
+++ b/extras/AudioPluginHost/Builds/Android/app/src/main/assets/juce_module_info
@@ -33,6 +33,5 @@
"OSXFrameworks": "Cocoa IOKit",
"iOSFrameworks": "Foundation",
- "LinuxLibs": "rt dl pthread",
- "mingwLibs": "uuid wsock32 wininet version ole32 ws2_32 oleaut32 imm32 comdlg32 shlwapi rpcrt4 winmm"
+ "LinuxLibs": "rt dl pthread"
}
diff --git a/extras/AudioPluginHost/Builds/VisualStudio2019/AudioPluginHost_App.vcxproj b/extras/AudioPluginHost/Builds/VisualStudio2019/AudioPluginHost_App.vcxproj
index 320154bfd2..859e179f0c 100644
--- a/extras/AudioPluginHost/Builds/VisualStudio2019/AudioPluginHost_App.vcxproj
+++ b/extras/AudioPluginHost/Builds/VisualStudio2019/AudioPluginHost_App.vcxproj
@@ -4085,7 +4085,6 @@
-
diff --git a/extras/AudioPluginHost/Builds/VisualStudio2019/AudioPluginHost_App.vcxproj.filters b/extras/AudioPluginHost/Builds/VisualStudio2019/AudioPluginHost_App.vcxproj.filters
index adb183b4a8..d32c0880a1 100644
--- a/extras/AudioPluginHost/Builds/VisualStudio2019/AudioPluginHost_App.vcxproj.filters
+++ b/extras/AudioPluginHost/Builds/VisualStudio2019/AudioPluginHost_App.vcxproj.filters
@@ -7257,9 +7257,6 @@
JUCE Modules\juce_gui_basics\native\accessibility
-
- JUCE Modules\juce_gui_basics\native\accessibility
-
JUCE Modules\juce_gui_basics\native\accessibility
diff --git a/extras/AudioPluginHost/Builds/VisualStudio2022/AudioPluginHost_App.vcxproj b/extras/AudioPluginHost/Builds/VisualStudio2022/AudioPluginHost_App.vcxproj
index eb8c828a6c..abd36ff5b6 100644
--- a/extras/AudioPluginHost/Builds/VisualStudio2022/AudioPluginHost_App.vcxproj
+++ b/extras/AudioPluginHost/Builds/VisualStudio2022/AudioPluginHost_App.vcxproj
@@ -4085,7 +4085,6 @@
-
diff --git a/extras/AudioPluginHost/Builds/VisualStudio2022/AudioPluginHost_App.vcxproj.filters b/extras/AudioPluginHost/Builds/VisualStudio2022/AudioPluginHost_App.vcxproj.filters
index fe9334decc..24541e288d 100644
--- a/extras/AudioPluginHost/Builds/VisualStudio2022/AudioPluginHost_App.vcxproj.filters
+++ b/extras/AudioPluginHost/Builds/VisualStudio2022/AudioPluginHost_App.vcxproj.filters
@@ -7257,9 +7257,6 @@
JUCE Modules\juce_gui_basics\native\accessibility
-
- JUCE Modules\juce_gui_basics\native\accessibility
-
JUCE Modules\juce_gui_basics\native\accessibility
diff --git a/extras/Build/CMake/JUCEModuleSupport.cmake b/extras/Build/CMake/JUCEModuleSupport.cmake
index 434b64a080..b4e47e3d2e 100644
--- a/extras/Build/CMake/JUCEModuleSupport.cmake
+++ b/extras/Build/CMake/JUCEModuleSupport.cmake
@@ -415,8 +415,6 @@ function(_juce_add_module_staticlib_paths module_target module_path)
set(subfolder "$,MT,${subfolder}>")
target_link_directories(${module_target} INTERFACE
"${module_path}/libs/VisualStudio${CMAKE_MATCH_1}/${arch}/${subfolder}")
- elseif(MSYS OR MINGW)
- _juce_add_library_path(${module_target} "${module_path}/libs/MinGW/${JUCE_TARGET_ARCHITECTURE}")
endif()
elseif(CMAKE_SYSTEM_NAME STREQUAL "Android")
_juce_add_library_path(${module_target} "${module_path}/libs/Android/${CMAKE_ANDROID_ARCH_ABI}")
diff --git a/extras/NetworkGraphicsDemo/Builds/Android/app/CMakeLists.txt b/extras/NetworkGraphicsDemo/Builds/Android/app/CMakeLists.txt
index 4e20efe26d..9f06ddf78e 100644
--- a/extras/NetworkGraphicsDemo/Builds/Android/app/CMakeLists.txt
+++ b/extras/NetworkGraphicsDemo/Builds/Android/app/CMakeLists.txt
@@ -2001,7 +2001,6 @@ add_library( ${BINARY_NAME}
"../../../../../modules/juce_gui_basics/native/accessibility/juce_AccessibilitySharedCode_mac.mm"
"../../../../../modules/juce_gui_basics/native/accessibility/juce_AccessibilityTextHelpers.h"
"../../../../../modules/juce_gui_basics/native/accessibility/juce_AccessibilityTextHelpers_test.cpp"
- "../../../../../modules/juce_gui_basics/native/accessibility/juce_ComInterfaces_windows.h"
"../../../../../modules/juce_gui_basics/native/accessibility/juce_UIAExpandCollapseProvider_windows.h"
"../../../../../modules/juce_gui_basics/native/accessibility/juce_UIAGridItemProvider_windows.h"
"../../../../../modules/juce_gui_basics/native/accessibility/juce_UIAGridProvider_windows.h"
@@ -4261,7 +4260,6 @@ set_source_files_properties(
"../../../../../modules/juce_gui_basics/native/accessibility/juce_AccessibilitySharedCode_mac.mm"
"../../../../../modules/juce_gui_basics/native/accessibility/juce_AccessibilityTextHelpers.h"
"../../../../../modules/juce_gui_basics/native/accessibility/juce_AccessibilityTextHelpers_test.cpp"
- "../../../../../modules/juce_gui_basics/native/accessibility/juce_ComInterfaces_windows.h"
"../../../../../modules/juce_gui_basics/native/accessibility/juce_UIAExpandCollapseProvider_windows.h"
"../../../../../modules/juce_gui_basics/native/accessibility/juce_UIAGridItemProvider_windows.h"
"../../../../../modules/juce_gui_basics/native/accessibility/juce_UIAGridProvider_windows.h"
diff --git a/extras/NetworkGraphicsDemo/Builds/VisualStudio2022/NetworkGraphicsDemo_App.vcxproj b/extras/NetworkGraphicsDemo/Builds/VisualStudio2022/NetworkGraphicsDemo_App.vcxproj
index afa12b5411..d890ea791c 100644
--- a/extras/NetworkGraphicsDemo/Builds/VisualStudio2022/NetworkGraphicsDemo_App.vcxproj
+++ b/extras/NetworkGraphicsDemo/Builds/VisualStudio2022/NetworkGraphicsDemo_App.vcxproj
@@ -3950,7 +3950,6 @@
-
diff --git a/extras/NetworkGraphicsDemo/Builds/VisualStudio2022/NetworkGraphicsDemo_App.vcxproj.filters b/extras/NetworkGraphicsDemo/Builds/VisualStudio2022/NetworkGraphicsDemo_App.vcxproj.filters
index cb9951dc5d..d457123ac8 100644
--- a/extras/NetworkGraphicsDemo/Builds/VisualStudio2022/NetworkGraphicsDemo_App.vcxproj.filters
+++ b/extras/NetworkGraphicsDemo/Builds/VisualStudio2022/NetworkGraphicsDemo_App.vcxproj.filters
@@ -6984,9 +6984,6 @@
JUCE Modules\juce_gui_basics\native\accessibility
-
- JUCE Modules\juce_gui_basics\native\accessibility
-
JUCE Modules\juce_gui_basics\native\accessibility
diff --git a/extras/Projucer/Builds/VisualStudio2019/Projucer_App.vcxproj b/extras/Projucer/Builds/VisualStudio2019/Projucer_App.vcxproj
index d01d92ecc0..2553febd3a 100644
--- a/extras/Projucer/Builds/VisualStudio2019/Projucer_App.vcxproj
+++ b/extras/Projucer/Builds/VisualStudio2019/Projucer_App.vcxproj
@@ -2673,7 +2673,6 @@
-
diff --git a/extras/Projucer/Builds/VisualStudio2019/Projucer_App.vcxproj.filters b/extras/Projucer/Builds/VisualStudio2019/Projucer_App.vcxproj.filters
index 8a59f93157..53859e6e6f 100644
--- a/extras/Projucer/Builds/VisualStudio2019/Projucer_App.vcxproj.filters
+++ b/extras/Projucer/Builds/VisualStudio2019/Projucer_App.vcxproj.filters
@@ -4659,9 +4659,6 @@
JUCE Modules\juce_gui_basics\native\accessibility
-
- JUCE Modules\juce_gui_basics\native\accessibility
-
JUCE Modules\juce_gui_basics\native\accessibility
diff --git a/extras/Projucer/Builds/VisualStudio2022/Projucer_App.vcxproj b/extras/Projucer/Builds/VisualStudio2022/Projucer_App.vcxproj
index e4a65516c5..02920b26ff 100644
--- a/extras/Projucer/Builds/VisualStudio2022/Projucer_App.vcxproj
+++ b/extras/Projucer/Builds/VisualStudio2022/Projucer_App.vcxproj
@@ -2673,7 +2673,6 @@
-
diff --git a/extras/Projucer/Builds/VisualStudio2022/Projucer_App.vcxproj.filters b/extras/Projucer/Builds/VisualStudio2022/Projucer_App.vcxproj.filters
index b71627e4f4..2d923f5bb7 100644
--- a/extras/Projucer/Builds/VisualStudio2022/Projucer_App.vcxproj.filters
+++ b/extras/Projucer/Builds/VisualStudio2022/Projucer_App.vcxproj.filters
@@ -4659,9 +4659,6 @@
JUCE Modules\juce_gui_basics\native\accessibility
-
- JUCE Modules\juce_gui_basics\native\accessibility
-
JUCE Modules\juce_gui_basics\native\accessibility
diff --git a/extras/Projucer/Source/ProjectSaving/jucer_ProjectExporter.h b/extras/Projucer/Source/ProjectSaving/jucer_ProjectExporter.h
index 026afc08f9..d79d4574ca 100644
--- a/extras/Projucer/Source/ProjectSaving/jucer_ProjectExporter.h
+++ b/extras/Projucer/Source/ProjectSaving/jucer_ProjectExporter.h
@@ -267,7 +267,7 @@ public:
//==============================================================================
StringPairArray msvcExtraPreprocessorDefs;
String msvcDelayLoadedDLLs;
- StringArray mingwLibs, windowsLibs;
+ StringArray windowsLibs;
//==============================================================================
StringArray androidLibs;
diff --git a/extras/UnitTestRunner/Builds/VisualStudio2019/UnitTestRunner_ConsoleApp.vcxproj b/extras/UnitTestRunner/Builds/VisualStudio2019/UnitTestRunner_ConsoleApp.vcxproj
index 619bba8789..cb55f5ecd3 100644
--- a/extras/UnitTestRunner/Builds/VisualStudio2019/UnitTestRunner_ConsoleApp.vcxproj
+++ b/extras/UnitTestRunner/Builds/VisualStudio2019/UnitTestRunner_ConsoleApp.vcxproj
@@ -4181,7 +4181,6 @@
-
diff --git a/extras/UnitTestRunner/Builds/VisualStudio2019/UnitTestRunner_ConsoleApp.vcxproj.filters b/extras/UnitTestRunner/Builds/VisualStudio2019/UnitTestRunner_ConsoleApp.vcxproj.filters
index 196bf5149d..15e6e0431a 100644
--- a/extras/UnitTestRunner/Builds/VisualStudio2019/UnitTestRunner_ConsoleApp.vcxproj.filters
+++ b/extras/UnitTestRunner/Builds/VisualStudio2019/UnitTestRunner_ConsoleApp.vcxproj.filters
@@ -7371,9 +7371,6 @@
JUCE Modules\juce_gui_basics\native\accessibility
-
- JUCE Modules\juce_gui_basics\native\accessibility
-
JUCE Modules\juce_gui_basics\native\accessibility
diff --git a/extras/UnitTestRunner/Builds/VisualStudio2022/UnitTestRunner_ConsoleApp.vcxproj b/extras/UnitTestRunner/Builds/VisualStudio2022/UnitTestRunner_ConsoleApp.vcxproj
index f135a88f93..a453b66712 100644
--- a/extras/UnitTestRunner/Builds/VisualStudio2022/UnitTestRunner_ConsoleApp.vcxproj
+++ b/extras/UnitTestRunner/Builds/VisualStudio2022/UnitTestRunner_ConsoleApp.vcxproj
@@ -4181,7 +4181,6 @@
-
diff --git a/extras/UnitTestRunner/Builds/VisualStudio2022/UnitTestRunner_ConsoleApp.vcxproj.filters b/extras/UnitTestRunner/Builds/VisualStudio2022/UnitTestRunner_ConsoleApp.vcxproj.filters
index 74f86097dd..4edd5b779a 100644
--- a/extras/UnitTestRunner/Builds/VisualStudio2022/UnitTestRunner_ConsoleApp.vcxproj.filters
+++ b/extras/UnitTestRunner/Builds/VisualStudio2022/UnitTestRunner_ConsoleApp.vcxproj.filters
@@ -7371,9 +7371,6 @@
JUCE Modules\juce_gui_basics\native\accessibility
-
- JUCE Modules\juce_gui_basics\native\accessibility
-
JUCE Modules\juce_gui_basics\native\accessibility
diff --git a/extras/WindowsDLL/Builds/VisualStudio2022/WindowsDLL_StaticLibrary.vcxproj b/extras/WindowsDLL/Builds/VisualStudio2022/WindowsDLL_StaticLibrary.vcxproj
index 84b6711366..ce183c3bd8 100644
--- a/extras/WindowsDLL/Builds/VisualStudio2022/WindowsDLL_StaticLibrary.vcxproj
+++ b/extras/WindowsDLL/Builds/VisualStudio2022/WindowsDLL_StaticLibrary.vcxproj
@@ -3926,7 +3926,6 @@
-
@@ -4058,7 +4057,6 @@
-
diff --git a/extras/WindowsDLL/Builds/VisualStudio2022/WindowsDLL_StaticLibrary.vcxproj.filters b/extras/WindowsDLL/Builds/VisualStudio2022/WindowsDLL_StaticLibrary.vcxproj.filters
index a1ae85d4e7..525618b06a 100644
--- a/extras/WindowsDLL/Builds/VisualStudio2022/WindowsDLL_StaticLibrary.vcxproj.filters
+++ b/extras/WindowsDLL/Builds/VisualStudio2022/WindowsDLL_StaticLibrary.vcxproj.filters
@@ -6951,9 +6951,6 @@
JUCE Modules\juce_gui_basics\native\accessibility
-
- JUCE Modules\juce_gui_basics\native\accessibility
-
JUCE Modules\juce_gui_basics\native\accessibility
@@ -7347,9 +7344,6 @@
JUCE Modules\juce_video\native
-
- JUCE Modules\juce_video\native
-
JUCE Modules\juce_video\native
diff --git a/modules/juce_audio_basics/juce_audio_basics.cpp b/modules/juce_audio_basics/juce_audio_basics.cpp
index 8149491a1d..c3830efe6e 100644
--- a/modules/juce_audio_basics/juce_audio_basics.cpp
+++ b/modules/juce_audio_basics/juce_audio_basics.cpp
@@ -43,10 +43,6 @@
#include "juce_audio_basics.h"
-#if JUCE_MINGW && ! defined (alloca)
- #define alloca __builtin_alloca
-#endif
-
#if JUCE_USE_SSE_INTRINSICS
#include
#endif
diff --git a/modules/juce_audio_basics/juce_audio_basics.h b/modules/juce_audio_basics/juce_audio_basics.h
index 9139337825..eb0de6643e 100644
--- a/modules/juce_audio_basics/juce_audio_basics.h
+++ b/modules/juce_audio_basics/juce_audio_basics.h
@@ -70,10 +70,6 @@
#undef Factor
//==============================================================================
-#if JUCE_MINGW && ! defined (__SSE2__)
- #define JUCE_USE_SSE_INTRINSICS 0
-#endif
-
#ifndef JUCE_USE_SSE_INTRINSICS
#define JUCE_USE_SSE_INTRINSICS 1
#endif
diff --git a/modules/juce_audio_basics/midi/ump/juce_UMPDispatcher.h b/modules/juce_audio_basics/midi/ump/juce_UMPDispatcher.h
index 13d9b66c63..ffc5b355f0 100644
--- a/modules/juce_audio_basics/midi/ump/juce_UMPDispatcher.h
+++ b/modules/juce_audio_basics/midi/ump/juce_UMPDispatcher.h
@@ -120,13 +120,7 @@ public:
{
using CallbackPtr = decltype (std::addressof (callback));
- #if JUCE_MINGW
- #define JUCE_MINGW_HIDDEN_VISIBILITY __attribute__ ((visibility ("hidden")))
- #else
- #define JUCE_MINGW_HIDDEN_VISIBILITY
- #endif
-
- struct JUCE_MINGW_HIDDEN_VISIBILITY Callback
+ struct Callback
{
Callback (BytestreamToUMPDispatcher& d, CallbackPtr c)
: dispatch (d), callbackPtr (c) {}
@@ -145,8 +139,6 @@ public:
CallbackPtr callbackPtr = nullptr;
};
- #undef JUCE_MINGW_HIDDEN_VISIBILITY
-
Callback inputCallback { *this, &callback };
concatenator.pushMidiData (begin, int (end - begin), timestamp, (void*) nullptr, inputCallback);
}
diff --git a/modules/juce_audio_devices/juce_audio_devices.h b/modules/juce_audio_devices/juce_audio_devices.h
index ab160cb9e8..2b283bdb90 100644
--- a/modules/juce_audio_devices/juce_audio_devices.h
+++ b/modules/juce_audio_devices/juce_audio_devices.h
@@ -55,7 +55,6 @@
OSXFrameworks: CoreAudio CoreMIDI AudioToolbox
iOSFrameworks: CoreAudio CoreMIDI AudioToolbox AVFoundation
linuxPackages: alsa
- mingwLibs: winmm
END_JUCE_MODULE_DECLARATION
diff --git a/modules/juce_audio_devices/native/juce_ASIO_windows.cpp b/modules/juce_audio_devices/native/juce_ASIO_windows.cpp
index bcb4111633..90c098502c 100644
--- a/modules/juce_audio_devices/native/juce_ASIO_windows.cpp
+++ b/modules/juce_audio_devices/native/juce_ASIO_windows.cpp
@@ -1104,15 +1104,11 @@ private:
if (asioObject != nullptr)
{
- #if ! JUCE_MINGW
__try
- #endif
{
asioObject->Release();
}
- #if ! JUCE_MINGW
__except (EXCEPTION_EXECUTE_HANDLER) { releasedOK = false; }
- #endif
asioObject = nullptr;
}
@@ -1136,17 +1132,13 @@ private:
bool tryCreatingDriver (bool& crashed)
{
- #if ! JUCE_MINGW
__try
- #endif
{
return CoCreateInstance (classId, 0, CLSCTX_INPROC_SERVER,
classId, (void**) &asioObject) == S_OK;
}
- #if ! JUCE_MINGW
__except (EXCEPTION_EXECUTE_HANDLER) { crashed = true; }
return false;
- #endif
}
String getLastDriverError() const
diff --git a/modules/juce_audio_devices/native/juce_Midi_windows.cpp b/modules/juce_audio_devices/native/juce_Midi_windows.cpp
index 9bd0b10b18..2f88d1d005 100644
--- a/modules/juce_audio_devices/native/juce_Midi_windows.cpp
+++ b/modules/juce_audio_devices/native/juce_Midi_windows.cpp
@@ -1844,15 +1844,13 @@ private:
//==============================================================================
//==============================================================================
-#if ! JUCE_MINGW
- extern RTL_OSVERSIONINFOW getWindowsVersionInfo();
-#endif
+RTL_OSVERSIONINFOW getWindowsVersionInfo();
struct MidiService final : public DeletedAtShutdown
{
MidiService()
{
- #if JUCE_USE_WINRT_MIDI && ! JUCE_MINGW
+ #if JUCE_USE_WINRT_MIDI
#if ! JUCE_FORCE_WINRT_MIDI
auto windowsVersionInfo = getWindowsVersionInfo();
if (windowsVersionInfo.dwMajorVersion >= 10 && windowsVersionInfo.dwBuildNumber >= 17763)
diff --git a/modules/juce_audio_devices/native/juce_WASAPI_windows.cpp b/modules/juce_audio_devices/native/juce_WASAPI_windows.cpp
index ddb04ae189..c34fe9d966 100644
--- a/modules/juce_audio_devices/native/juce_WASAPI_windows.cpp
+++ b/modules/juce_audio_devices/native/juce_WASAPI_windows.cpp
@@ -109,21 +109,6 @@ static bool check (HRESULT hr)
//==============================================================================
}
-#if JUCE_MINGW
- struct PROPERTYKEY
- {
- GUID fmtid;
- DWORD pid;
- };
-
- WINOLEAPI PropVariantClear (PROPVARIANT*);
-#endif
-
-#if JUCE_MINGW && defined (KSDATAFORMAT_SUBTYPE_PCM)
- #undef KSDATAFORMAT_SUBTYPE_PCM
- #undef KSDATAFORMAT_SUBTYPE_IEEE_FLOAT
-#endif
-
#ifndef KSDATAFORMAT_SUBTYPE_PCM
#define KSDATAFORMAT_SUBTYPE_PCM uuidFromString ("00000001-0000-0010-8000-00aa00389b71")
#define KSDATAFORMAT_SUBTYPE_IEEE_FLOAT uuidFromString ("00000003-0000-0010-8000-00aa00389b71")
diff --git a/modules/juce_audio_formats/juce_audio_formats.h b/modules/juce_audio_formats/juce_audio_formats.h
index ba3004e14c..70735e0d9d 100644
--- a/modules/juce_audio_formats/juce_audio_formats.h
+++ b/modules/juce_audio_formats/juce_audio_formats.h
@@ -114,7 +114,7 @@
#define JUCE_USE_WINDOWS_MEDIA_FORMAT 1
#endif
-#if ! JUCE_WINDOWS || JUCE_MINGW
+#if ! JUCE_WINDOWS
#undef JUCE_USE_WINDOWS_MEDIA_FORMAT
#define JUCE_USE_WINDOWS_MEDIA_FORMAT 0
#endif
diff --git a/modules/juce_audio_plugin_client/detail/juce_PluginUtilities.h b/modules/juce_audio_plugin_client/detail/juce_PluginUtilities.h
index d60db78349..c73ef16a79 100644
--- a/modules/juce_audio_plugin_client/detail/juce_PluginUtilities.h
+++ b/modules/juce_audio_plugin_client/detail/juce_PluginUtilities.h
@@ -73,7 +73,7 @@ struct PluginUtilities
// NB: Nasty old-fashioned code in here because it's copied from the Steinberg example code.
static void getUUIDForVST2ID (bool forControllerUID, uint8 uuid[16])
{
- #if JUCE_WINDOWS && ! JUCE_MINGW
+ #if JUCE_WINDOWS
const auto juce_sprintf = [] (auto&& head, auto&&... tail) { sprintf_s (head, (size_t) numElementsInArray (head), tail...); };
const auto juce_strcpy = [] (auto&& head, auto&&... tail) { strcpy_s (head, (size_t) numElementsInArray (head), tail...); };
const auto juce_strcat = [] (auto&& head, auto&&... tail) { strcat_s (head, (size_t) numElementsInArray (head), tail...); };
diff --git a/modules/juce_audio_plugin_client/juce_audio_plugin_client_AAX.cpp b/modules/juce_audio_plugin_client/juce_audio_plugin_client_AAX.cpp
index afc15f9352..84769113e1 100644
--- a/modules/juce_audio_plugin_client/juce_audio_plugin_client_AAX.cpp
+++ b/modules/juce_audio_plugin_client/juce_audio_plugin_client_AAX.cpp
@@ -2707,7 +2707,7 @@ AAX_Result JUCE_CDECL GetEffectDescriptions (AAX_ICollection* collection)
JUCE_END_IGNORE_WARNINGS_GCC_LIKE
//==============================================================================
-#if _MSC_VER || JUCE_MINGW
+#if _MSC_VER
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wmissing-prototypes")
extern "C" BOOL WINAPI DllMain (HINSTANCE instance, DWORD reason, LPVOID) { if (reason == DLL_PROCESS_ATTACH) Process::setCurrentModuleInstanceHandle (instance); return true; }
JUCE_END_IGNORE_WARNINGS_GCC_LIKE
diff --git a/modules/juce_audio_processors/format_types/juce_LV2SupportLibs.cpp b/modules/juce_audio_processors/format_types/juce_LV2SupportLibs.cpp
index bb46d7739d..d55c302fbf 100644
--- a/modules/juce_audio_processors/format_types/juce_LV2SupportLibs.cpp
+++ b/modules/juce_audio_processors/format_types/juce_LV2SupportLibs.cpp
@@ -71,19 +71,6 @@ extern "C"
#include "serd/src/n3.c"
#undef TRY
-// node.c will replace isnan and isinf with _isnan and _finite if the former symbols are undefined.
-// MinGW declares these as normal functions rather than as preprocessor definitions, causing the build to fail.
-#if defined (_WIN32) && defined (__GNUC__)
-
-namespace Utils
-{
- inline int _isnan (double x) noexcept { return isnan (x); }
- inline int _finite (double x) noexcept { return ! isinf (x); }
-} // namespace Utils
-
-using namespace Utils;
-#endif
-
#include "serd/src/node.c"
#include "serd/src/reader.c"
#include "serd/src/string.c"
diff --git a/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp b/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp
index d231fae240..e1c214c3cc 100644
--- a/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp
+++ b/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp
@@ -38,7 +38,7 @@
#undef PRAGMA_ALIGN_SUPPORTED
-#if ! JUCE_MINGW && ! JUCE_MSVC
+#if ! JUCE_MSVC
#define __cdecl
#endif
@@ -71,11 +71,7 @@ JUCE_BEGIN_IGNORE_WARNINGS_MSVC (4355)
#include "juce_VSTMidiEventList.h"
-#if JUCE_MINGW
- #ifndef WM_APPCOMMAND
- #define WM_APPCOMMAND 0x0319
- #endif
-#elif ! JUCE_WINDOWS
+#if ! JUCE_WINDOWS
static void _fpreset() {}
static void _clearfp() {}
#endif
diff --git a/modules/juce_core/javascript/choc/javascript/choc_javascript_QuickJS.h b/modules/juce_core/javascript/choc/javascript/choc_javascript_QuickJS.h
index 97ede47dfc..12e93f8771 100644
--- a/modules/juce_core/javascript/choc/javascript/choc_javascript_QuickJS.h
+++ b/modules/juce_core/javascript/choc/javascript/choc_javascript_QuickJS.h
@@ -47,10 +47,6 @@
#include
#include
-#if JUCE_MINGW
- #undef PRId64
- #define PRId64 "lld"
-#endif
#include
#include
diff --git a/modules/juce_core/juce_core.cpp b/modules/juce_core/juce_core.cpp
index aa1ea9342a..5f44d2a50b 100644
--- a/modules/juce_core/juce_core.cpp
+++ b/modules/juce_core/juce_core.cpp
@@ -61,18 +61,12 @@
#if JUCE_WINDOWS
#include
- #if JUCE_MINGW
- #include
- #include
- #include
- #else
- JUCE_BEGIN_IGNORE_WARNINGS_MSVC (4091)
- #include
- JUCE_END_IGNORE_WARNINGS_MSVC
+ JUCE_BEGIN_IGNORE_WARNINGS_MSVC (4091)
+ #include
+ JUCE_END_IGNORE_WARNINGS_MSVC
- #if ! JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES
- #pragma comment (lib, "DbgHelp.lib")
- #endif
+ #if ! JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES
+ #pragma comment (lib, "DbgHelp.lib")
#endif
#else
diff --git a/modules/juce_core/juce_core.h b/modules/juce_core/juce_core.h
index 21d4763038..2bfebfd333 100644
--- a/modules/juce_core/juce_core.h
+++ b/modules/juce_core/juce_core.h
@@ -55,7 +55,6 @@
OSXFrameworks: Cocoa Foundation IOKit Security
iOSFrameworks: Foundation
linuxLibs: rt dl pthread
- mingwLibs: uuid wsock32 wininet version ole32 ws2_32 oleaut32 imm32 comdlg32 shlwapi rpcrt4 winmm
END_JUCE_MODULE_DECLARATION
diff --git a/modules/juce_core/maths/juce_MathsFunctions.h b/modules/juce_core/maths/juce_MathsFunctions.h
index 7663d7e4d7..9f5484ef3c 100644
--- a/modules/juce_core/maths/juce_MathsFunctions.h
+++ b/modules/juce_core/maths/juce_MathsFunctions.h
@@ -94,7 +94,7 @@ using uint32 = unsigned int;
using pointer_sized_uint = unsigned int;
#endif
-#if JUCE_WINDOWS && ! JUCE_MINGW
+#if JUCE_WINDOWS
using ssize_t = pointer_sized_int;
#endif
diff --git a/modules/juce_core/native/juce_BasicNativeHeaders.h b/modules/juce_core/native/juce_BasicNativeHeaders.h
index 32c7126d05..5177c6c5fb 100644
--- a/modules/juce_core/native/juce_BasicNativeHeaders.h
+++ b/modules/juce_core/native/juce_BasicNativeHeaders.h
@@ -128,16 +128,8 @@
#include
#include
- #if JUCE_MINGW
- #include
- #include
- #ifndef alloca
- #define alloca __builtin_alloca
- #endif
- #else
- #include
- #include
- #endif
+ #include
+ #include
#ifndef S_FALSE
#define S_FALSE (1) // (apparently some obscure win32 dev environments don't define this)
@@ -150,7 +142,7 @@
#pragma warning (4: 4511 4512 4100)
#endif
- #if ! JUCE_MINGW && ! JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES
+ #if ! JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES
#pragma comment (lib, "kernel32.lib")
#pragma comment (lib, "user32.lib")
#pragma comment (lib, "wininet.lib")
diff --git a/modules/juce_core/native/juce_ComSmartPtr_windows.h b/modules/juce_core/native/juce_ComSmartPtr_windows.h
index e1fe55726c..f08528b2bc 100644
--- a/modules/juce_core/native/juce_ComSmartPtr_windows.h
+++ b/modules/juce_core/native/juce_ComSmartPtr_windows.h
@@ -35,7 +35,7 @@
namespace juce
{
-#if (JUCE_MINGW && JUCE_32BIT) || (! defined (_MSC_VER) && ! defined (__uuidof))
+#if ! defined (_MSC_VER) && ! defined (__uuidof)
#ifdef __uuidof
#undef __uuidof
#endif
diff --git a/modules/juce_core/native/juce_Network_windows.cpp b/modules/juce_core/native/juce_Network_windows.cpp
index b0bf5e7e3c..4342d263a4 100644
--- a/modules/juce_core/native/juce_Network_windows.cpp
+++ b/modules/juce_core/native/juce_Network_windows.cpp
@@ -547,13 +547,8 @@ namespace MACAddressHelpers
static void split (const sockaddr_in6* sa_in6, int off, uint8* split)
{
- #if JUCE_MINGW
- split[0] = sa_in6->sin6_addr._S6_un._S6_u8[off + 1];
- split[1] = sa_in6->sin6_addr._S6_un._S6_u8[off];
- #else
split[0] = sa_in6->sin6_addr.u.Byte[off + 1];
split[1] = sa_in6->sin6_addr.u.Byte[off];
- #endif
}
static IPAddress createAddress (const sockaddr_in6* sa_in6)
diff --git a/modules/juce_core/native/juce_SystemStats_windows.cpp b/modules/juce_core/native/juce_SystemStats_windows.cpp
index fff3097b3e..a8f74ed73c 100644
--- a/modules/juce_core/native/juce_SystemStats_windows.cpp
+++ b/modules/juce_core/native/juce_SystemStats_windows.cpp
@@ -48,13 +48,6 @@ void Logger::outputDebugString (const String& text)
static int findNumberOfPhysicalCores() noexcept
{
- #if JUCE_MINGW
- // Not implemented in MinGW
- jassertfalse;
-
- return 1;
- #else
-
DWORD bufferSize = 0;
GetLogicalProcessorInformation (nullptr, &bufferSize);
@@ -78,8 +71,6 @@ static int findNumberOfPhysicalCores() noexcept
{
return info.Relationship == RelationProcessorCore;
});
-
- #endif // JUCE_MINGW
}
//==============================================================================
@@ -89,7 +80,7 @@ static int findNumberOfPhysicalCores() noexcept
#pragma intrinsic (__rdtsc)
#endif
- #if JUCE_MINGW || JUCE_CLANG
+ #if JUCE_CLANG
static void callCPUID (int result[4], uint32 type)
{
uint32 la = (uint32) result[0], lb = (uint32) result[1],
@@ -253,66 +244,34 @@ static DebugFlagsInitialiser debugFlagsInitialiser;
#endif
//==============================================================================
-#if JUCE_MINGW
- static uint64 getWindowsVersion()
- {
- auto filename = _T ("kernel32.dll");
- DWORD handle = 0;
+RTL_OSVERSIONINFOW getWindowsVersionInfo();
+RTL_OSVERSIONINFOW getWindowsVersionInfo()
+{
+ RTL_OSVERSIONINFOW versionInfo = {};
- if (auto size = GetFileVersionInfoSize (filename, &handle))
- {
- HeapBlock data (size);
+ if (auto* moduleHandle = ::GetModuleHandleW (L"ntdll.dll"))
+ {
+ using RtlGetVersion = LONG (WINAPI*) (PRTL_OSVERSIONINFOW);
- if (GetFileVersionInfo (filename, handle, size, data))
- {
- VS_FIXEDFILEINFO* info = nullptr;
- UINT verSize = 0;
+ if (auto* rtlGetVersion = (RtlGetVersion) ::GetProcAddress (moduleHandle, "RtlGetVersion"))
+ {
+ versionInfo.dwOSVersionInfoSize = sizeof (versionInfo);
+ LONG STATUS_SUCCESS = 0;
- if (VerQueryValue (data, (LPCTSTR) _T ("\\"), (void**) &info, &verSize))
- if (size > 0 && info != nullptr && info->dwSignature == 0xfeef04bd)
- return ((uint64) info->dwFileVersionMS << 32) | (uint64) info->dwFileVersionLS;
- }
- }
+ if (rtlGetVersion (&versionInfo) != STATUS_SUCCESS)
+ versionInfo = {};
+ }
+ }
- return 0;
- }
-#else
- RTL_OSVERSIONINFOW getWindowsVersionInfo();
- RTL_OSVERSIONINFOW getWindowsVersionInfo()
- {
- RTL_OSVERSIONINFOW versionInfo = {};
-
- if (auto* moduleHandle = ::GetModuleHandleW (L"ntdll.dll"))
- {
- using RtlGetVersion = LONG (WINAPI*) (PRTL_OSVERSIONINFOW);
-
- if (auto* rtlGetVersion = (RtlGetVersion) ::GetProcAddress (moduleHandle, "RtlGetVersion"))
- {
- versionInfo.dwOSVersionInfoSize = sizeof (versionInfo);
- LONG STATUS_SUCCESS = 0;
-
- if (rtlGetVersion (&versionInfo) != STATUS_SUCCESS)
- versionInfo = {};
- }
- }
-
- return versionInfo;
- }
-#endif
+ return versionInfo;
+}
SystemStats::OperatingSystemType SystemStats::getOperatingSystemType()
{
- #if JUCE_MINGW
- const auto v = getWindowsVersion();
- const auto major = (v >> 48) & 0xffff;
- const auto minor = (v >> 32) & 0xffff;
- const auto build = (v >> 16) & 0xffff;
- #else
const auto versionInfo = getWindowsVersionInfo();
const auto major = versionInfo.dwMajorVersion;
const auto minor = versionInfo.dwMinorVersion;
const auto build = versionInfo.dwBuildNumber;
- #endif
jassert (major <= 10); // need to add support for new version!
diff --git a/modules/juce_core/network/juce_Socket.cpp b/modules/juce_core/network/juce_Socket.cpp
index 31d4109b34..7b1b560590 100644
--- a/modules/juce_core/network/juce_Socket.cpp
+++ b/modules/juce_core/network/juce_Socket.cpp
@@ -338,7 +338,7 @@ namespace SocketHelpers
auto h = handle.load();
- #if JUCE_WINDOWS || JUCE_MINGW
+ #if JUCE_WINDOWS
struct timeval timeout;
struct timeval* timeoutp;
diff --git a/modules/juce_core/system/juce_CompilerWarnings.h b/modules/juce_core/system/juce_CompilerWarnings.h
index 6d8b6bb8c8..9bd8f5abea 100644
--- a/modules/juce_core/system/juce_CompilerWarnings.h
+++ b/modules/juce_core/system/juce_CompilerWarnings.h
@@ -160,7 +160,7 @@
/** Quote the argument, turning it into a string. */
#define JUCE_TO_STRING(x) #x
-#if JUCE_CLANG || JUCE_GCC || JUCE_MINGW
+#if JUCE_CLANG || JUCE_GCC
#define JUCE_IGNORE_GCC_IMPL_(compiler, warning)
#define JUCE_IGNORE_GCC_IMPL_0(compiler, warning)
#define JUCE_IGNORE_GCC_IMPL_1(compiler, warning) \
diff --git a/modules/juce_core/system/juce_StandardHeader.h b/modules/juce_core/system/juce_StandardHeader.h
index 83175a8995..5a22533297 100644
--- a/modules/juce_core/system/juce_StandardHeader.h
+++ b/modules/juce_core/system/juce_StandardHeader.h
@@ -128,11 +128,6 @@ JUCE_BEGIN_IGNORE_WARNINGS_MSVC (4514 4245 4100)
JUCE_END_IGNORE_WARNINGS_MSVC
-#if JUCE_MINGW
- #include
- #include
-#endif
-
#if JUCE_ANDROID
#include
#include
diff --git a/modules/juce_core/system/juce_SystemStats.cpp b/modules/juce_core/system/juce_SystemStats.cpp
index 6db0d8d891..e7ac5aceb9 100644
--- a/modules/juce_core/system/juce_SystemStats.cpp
+++ b/modules/juce_core/system/juce_SystemStats.cpp
@@ -190,7 +190,7 @@ String SystemStats::getStackBacktrace()
{
String result;
- #if JUCE_ANDROID || JUCE_MINGW || JUCE_WASM
+ #if JUCE_ANDROID || JUCE_WASM
jassertfalse; // sorry, not implemented yet!
#elif JUCE_WINDOWS
diff --git a/modules/juce_core/system/juce_TargetPlatform.h b/modules/juce_core/system/juce_TargetPlatform.h
index 49338ab265..b15ffe28c4 100644
--- a/modules/juce_core/system/juce_TargetPlatform.h
+++ b/modules/juce_core/system/juce_TargetPlatform.h
@@ -111,6 +111,7 @@
#ifdef __MINGW32__
#define JUCE_MINGW 1
+ #warning Support for MinGW has been removed. Please use an alternative compiler.
#ifdef __MINGW64__
#define JUCE_64BIT 1
#else
diff --git a/modules/juce_core/text/juce_CharPointer_ASCII.h b/modules/juce_core/text/juce_CharPointer_ASCII.h
index ce94a936b0..4f8fc0c011 100644
--- a/modules/juce_core/text/juce_CharPointer_ASCII.h
+++ b/modules/juce_core/text/juce_CharPointer_ASCII.h
@@ -275,7 +275,7 @@ public:
int compareIgnoreCase (const CharPointer_ASCII other) const
{
- #if JUCE_MINGW || (JUCE_WINDOWS && JUCE_CLANG)
+ #if JUCE_WINDOWS && JUCE_CLANG
return CharacterFunctions::compareIgnoreCase (*this, other);
#elif JUCE_WINDOWS
return stricmp (data, other.data);
@@ -345,7 +345,7 @@ public:
/** Parses this string as a 64-bit integer. */
int64 getIntValue64() const noexcept
{
- #if JUCE_LINUX || JUCE_BSD || JUCE_ANDROID || JUCE_MINGW
+ #if JUCE_LINUX || JUCE_BSD || JUCE_ANDROID
return atoll (data);
#elif JUCE_WINDOWS
return _atoi64 (data);
diff --git a/modules/juce_core/text/juce_CharPointer_UTF8.h b/modules/juce_core/text/juce_CharPointer_UTF8.h
index f8679e73ce..ca06656805 100644
--- a/modules/juce_core/text/juce_CharPointer_UTF8.h
+++ b/modules/juce_core/text/juce_CharPointer_UTF8.h
@@ -478,7 +478,7 @@ public:
/** Parses this string as a 64-bit integer. */
int64 getIntValue64() const noexcept
{
- #if JUCE_WINDOWS && ! JUCE_MINGW
+ #if JUCE_WINDOWS
return _atoi64 (data);
#else
return atoll (data);
diff --git a/modules/juce_core/text/juce_CharacterFunctions.cpp b/modules/juce_core/text/juce_CharacterFunctions.cpp
index a11198c159..3e655bd646 100644
--- a/modules/juce_core/text/juce_CharacterFunctions.cpp
+++ b/modules/juce_core/text/juce_CharacterFunctions.cpp
@@ -447,8 +447,6 @@ public:
CHARPTR_DOUBLE_PAIR_COMBOS (1.7976931348623157e+308),
CHARPTR_DOUBLE_PAIR_COMBOS (2.2250738585072014e-308),
- // Too many sig figs. The parsing routine on MinGW gets the last
- // significant figure wrong.
CHARPTR_DOUBLE_PAIR_COMBOS (17654321098765432.9),
CHARPTR_DOUBLE_PAIR_COMBOS (183456789012345678.9),
CHARPTR_DOUBLE_PAIR_COMBOS (1934567890123456789.9),
diff --git a/modules/juce_core/text/juce_CharacterFunctions.h b/modules/juce_core/text/juce_CharacterFunctions.h
index b9daca7792..aadb6a62e5 100644
--- a/modules/juce_core/text/juce_CharacterFunctions.h
+++ b/modules/juce_core/text/juce_CharacterFunctions.h
@@ -161,12 +161,11 @@ public:
constexpr auto inf = std::numeric_limits::infinity();
bool isNegative = false;
- #if ! JUCE_MINGW
+
constexpr const int maxSignificantDigits = 17 + 1; // An additional digit for rounding
constexpr const int bufferSize = maxSignificantDigits + 7 + 1; // -.E-XXX and a trailing null-terminator
char buffer[(size_t) bufferSize] = {};
char* writePtr = &(buffer[0]);
- #endif
const auto endOfWhitspace = text.findEndOfWhitespace();
text = endOfWhitspace;
@@ -177,9 +176,7 @@ public:
{
case '-':
isNegative = true;
- #if ! JUCE_MINGW
*writePtr++ = '-';
- #endif
JUCE_FALLTHROUGH
case '+':
c = *++text;
@@ -220,113 +217,6 @@ public:
break;
}
- #if JUCE_MINGW
- // MinGW does not have access to the locale functions required for strtold, so we parse the doubles
- // ourselves. There are some edge cases where the least significant digit will be wrong!
- double result[3] = { 0 }, accumulator[2] = { 0 };
- int exponentAdjustment[2] = { 0 }, exponentAccumulator[2] = { -1, -1 };
- int exponent = 0, decPointIndex = 0, digit = 0;
- int lastDigit = 0, numSignificantDigits = 0;
- bool digitsFound = false;
- constexpr const int maxSignificantDigits = 17 + 1;
-
- for (;;)
- {
- if (text.isDigit())
- {
- lastDigit = digit;
- digit = (int) text.getAndAdvance() - '0';
- digitsFound = true;
-
- if (decPointIndex != 0)
- exponentAdjustment[1]++;
-
- if (numSignificantDigits == 0 && digit == 0)
- continue;
-
- if (++numSignificantDigits > maxSignificantDigits)
- {
- if (digit > 5)
- ++accumulator [decPointIndex];
- else if (digit == 5 && (lastDigit & 1) != 0)
- ++accumulator [decPointIndex];
-
- if (decPointIndex > 0)
- exponentAdjustment[1]--;
- else
- exponentAdjustment[0]++;
-
- while (text.isDigit())
- {
- ++text;
- if (decPointIndex == 0)
- exponentAdjustment[0]++;
- }
- }
- else
- {
- const auto maxAccumulatorValue = (double) ((std::numeric_limits::max() - 9) / 10);
- if (accumulator [decPointIndex] > maxAccumulatorValue)
- {
- result [decPointIndex] = mulexp10 (result [decPointIndex], exponentAccumulator [decPointIndex])
- + accumulator [decPointIndex];
- accumulator [decPointIndex] = 0;
- exponentAccumulator [decPointIndex] = 0;
- }
-
- accumulator [decPointIndex] = accumulator[decPointIndex] * 10 + digit;
- exponentAccumulator [decPointIndex]++;
- }
- }
- else if (decPointIndex == 0 && *text == '.')
- {
- ++text;
- decPointIndex = 1;
-
- if (numSignificantDigits > maxSignificantDigits)
- {
- while (text.isDigit())
- ++text;
- break;
- }
- }
- else
- {
- break;
- }
- }
-
- result[0] = mulexp10 (result[0], exponentAccumulator[0]) + accumulator[0];
-
- if (decPointIndex != 0)
- result[1] = mulexp10 (result[1], exponentAccumulator[1]) + accumulator[1];
-
- c = *text;
- if ((c == 'e' || c == 'E') && digitsFound)
- {
- auto negativeExponent = false;
-
- switch (*++text)
- {
- case '-': negativeExponent = true; JUCE_FALLTHROUGH
- case '+': ++text;
- }
-
- while (text.isDigit())
- exponent = (exponent * 10) + ((int) text.getAndAdvance() - '0');
-
- if (negativeExponent)
- exponent = -exponent;
- }
-
- auto r = mulexp10 (result[0], exponent + exponentAdjustment[0]);
- if (decPointIndex != 0)
- r += mulexp10 (result[1], exponent - exponentAdjustment[1]);
-
- return isNegative ? -r : r;
-
- #else // ! JUCE_MINGW
-
int numSigFigs = 0, extraExponent = 0;
bool decimalPointFound = false, leadingZeros = false;
@@ -460,8 +350,6 @@ public:
return strtod_l (&buffer[0], nullptr, locale);
#endif
#endif
-
- #endif // JUCE_MINGW
}
/** Parses a character string, to read a floating-point value. */
diff --git a/modules/juce_core/time/juce_Time.cpp b/modules/juce_core/time/juce_Time.cpp
index 0e8ad8a076..882ecfb654 100644
--- a/modules/juce_core/time/juce_Time.cpp
+++ b/modules/juce_core/time/juce_Time.cpp
@@ -39,11 +39,7 @@ namespace TimeHelpers
{
static std::tm millisToLocal (int64 millis) noexcept
{
- #if JUCE_WINDOWS && JUCE_MINGW
- auto now = (time_t) (millis / 1000);
- return *localtime (&now);
-
- #elif JUCE_WINDOWS
+ #if JUCE_WINDOWS
std::tm result;
millis /= 1000;
@@ -65,11 +61,7 @@ namespace TimeHelpers
static std::tm millisToUTC (int64 millis) noexcept
{
- #if JUCE_WINDOWS && JUCE_MINGW
- auto now = (time_t) (millis / 1000);
- return *gmtime (&now);
-
- #elif JUCE_WINDOWS
+ #if JUCE_WINDOWS
std::tm result;
millis /= 1000;
@@ -231,7 +223,7 @@ Time::Time (int year, int month, int day,
//==============================================================================
int64 Time::currentTimeMillis() noexcept
{
- #if JUCE_WINDOWS && ! JUCE_MINGW
+ #if JUCE_WINDOWS
struct _timeb t;
_ftime_s (&t);
return ((int64) t.time) * 1000 + t.millitm;
diff --git a/modules/juce_events/messages/juce_ApplicationBase.cpp b/modules/juce_events/messages/juce_ApplicationBase.cpp
index 53d5ec8547..b93bdf39fa 100644
--- a/modules/juce_events/messages/juce_ApplicationBase.cpp
+++ b/modules/juce_events/messages/juce_ApplicationBase.cpp
@@ -294,7 +294,7 @@ bool JUCEApplicationBase::initialiseApp()
}
#endif
- #if JUCE_WINDOWS && (! defined (_CONSOLE)) && (! JUCE_MINGW)
+ #if JUCE_WINDOWS && (! defined (_CONSOLE))
if (isStandaloneApp() && AttachConsole (ATTACH_PARENT_PROCESS) != 0)
{
// if we've launched a GUI app from cmd.exe or PowerShell, we need this to enable printf etc.
diff --git a/modules/juce_graphics/image_formats/juce_JPEGLoader.cpp b/modules/juce_graphics/image_formats/juce_JPEGLoader.cpp
index 55888573b7..0dc277833d 100644
--- a/modules/juce_graphics/image_formats/juce_JPEGLoader.cpp
+++ b/modules/juce_graphics/image_formats/juce_JPEGLoader.cpp
@@ -40,10 +40,6 @@ JUCE_BEGIN_IGNORE_WARNINGS_MSVC (4365 6240 6326 6386 6385 28182 28183 6387 6011
namespace jpeglibNamespace
{
#if JUCE_INCLUDE_JPEGLIB_CODE || ! defined (JUCE_INCLUDE_JPEGLIB_CODE)
- #if JUCE_MINGW
- typedef unsigned char boolean;
- #endif
-
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wconversion",
"-Wdeprecated-register",
"-Wdeprecated-declarations",
diff --git a/modules/juce_gui_basics/juce_gui_basics.cpp b/modules/juce_gui_basics/juce_gui_basics.cpp
index 912320c536..ed245e0488 100644
--- a/modules/juce_gui_basics/juce_gui_basics.cpp
+++ b/modules/juce_gui_basics/juce_gui_basics.cpp
@@ -94,13 +94,6 @@
#include
#endif
- #if JUCE_MINGW
- // Some MinGW headers use 'new' as a parameter name
- JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wkeyword-macro")
- #define new new_
- JUCE_END_IGNORE_WARNINGS_GCC_LIKE
- #endif
-
#include
#undef new
@@ -110,9 +103,7 @@
#include
#endif
- #if JUCE_MINGW
- #include
- #elif ! JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES
+ #if ! JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES
#pragma comment(lib, "vfw32.lib")
#pragma comment(lib, "imm32.lib")
#pragma comment(lib, "comctl32.lib")
@@ -192,7 +183,6 @@
#elif JUCE_WINDOWS
#include
- #include "native/accessibility/juce_ComInterfaces_windows.h"
#include "native/accessibility/juce_WindowsUIAWrapper_windows.h"
#include "native/accessibility/juce_AccessibilityElement_windows.h"
#include "native/accessibility/juce_UIAHelpers_windows.h"
diff --git a/modules/juce_gui_basics/juce_gui_basics.h b/modules/juce_gui_basics/juce_gui_basics.h
index f426cc237c..5c3e4c84ff 100644
--- a/modules/juce_gui_basics/juce_gui_basics.h
+++ b/modules/juce_gui_basics/juce_gui_basics.h
@@ -56,7 +56,6 @@
WeakOSXFrameworks: Metal MetalKit
iOSFrameworks: CoreServices UIKit
WeakiOSFrameworks: Metal MetalKit
- mingwLibs: dxgi
END_JUCE_MODULE_DECLARATION
diff --git a/modules/juce_gui_basics/native/accessibility/juce_AccessibilityElement_windows.cpp b/modules/juce_gui_basics/native/accessibility/juce_AccessibilityElement_windows.cpp
index 02d7d5ff9b..fcc44ad55a 100644
--- a/modules/juce_gui_basics/native/accessibility/juce_AccessibilityElement_windows.cpp
+++ b/modules/juce_gui_basics/native/accessibility/juce_AccessibilityElement_windows.cpp
@@ -41,12 +41,12 @@ int AccessibilityNativeHandle::idCounter = 0;
//==============================================================================
class UIAScrollProvider final : public UIAProviderBase,
- public ComBaseClassHelper
+ public ComBaseClassHelper
{
public:
using UIAProviderBase::UIAProviderBase;
- JUCE_COMCALL Scroll (ComTypes::ScrollAmount, ComTypes::ScrollAmount) override { return E_FAIL; }
+ JUCE_COMCALL Scroll (ScrollAmount, ScrollAmount) override { return E_FAIL; }
JUCE_COMCALL SetScrollPercent (double, double) override { return E_FAIL; }
JUCE_COMCALL get_HorizontalScrollPercent (double*) override { return E_FAIL; }
JUCE_COMCALL get_VerticalScrollPercent (double*) override { return E_FAIL; }
@@ -60,7 +60,7 @@ private:
};
class UIAScrollItemProvider final : public UIAProviderBase,
- public ComBaseClassHelper
+ public ComBaseClassHelper
{
public:
using UIAProviderBase::UIAProviderBase;
@@ -105,8 +105,6 @@ static String getAutomationId (const AccessibilityHandler& handler)
static auto roleToControlTypeId (AccessibilityRole roleType)
{
- using namespace ComTypes::Constants;
-
switch (roleType)
{
case AccessibilityRole::popupMenu:
@@ -163,7 +161,7 @@ JUCE_COMRESULT AccessibilityNativeHandle::QueryInterface (REFIID refId, void** r
if (! isElementValid())
return (HRESULT) UIA_E_ELEMENTNOTAVAILABLE;
- if ((refId == __uuidof (ComTypes::IRawElementProviderFragmentRoot) && ! isFragmentRoot()))
+ if ((refId == __uuidof (IRawElementProviderFragmentRoot) && ! isFragmentRoot()))
return E_NOINTERFACE;
return ComBaseClassHelper::QueryInterface (refId, result);
@@ -225,8 +223,6 @@ JUCE_COMRESULT AccessibilityNativeHandle::GetPatternProvider (PATTERNID pId, IUn
return false;
};
- using namespace ComTypes::Constants;
-
switch (pId)
{
case UIA_WindowPatternId:
@@ -306,7 +302,7 @@ JUCE_COMRESULT AccessibilityNativeHandle::GetPatternProvider (PATTERNID pId, IUn
{
if (accessibilityHandler.getTableInterface() != nullptr
&& (pId == UIA_GridPatternId || accessibilityHandler.getRole() == AccessibilityRole::table))
- return static_cast (new UIAGridProvider (this));
+ return static_cast (new UIAGridProvider (this));
break;
}
@@ -314,7 +310,7 @@ JUCE_COMRESULT AccessibilityNativeHandle::GetPatternProvider (PATTERNID pId, IUn
case UIA_GridItemPatternId:
{
if (isListOrTableCell (accessibilityHandler))
- return static_cast (new UIAGridItemProvider (this));
+ return static_cast (new UIAGridItemProvider (this));
break;
}
@@ -366,8 +362,6 @@ JUCE_COMRESULT AccessibilityNativeHandle::GetPropertyValue (PROPERTYID propertyI
const auto state = accessibilityHandler.getCurrentState();
const auto ignored = accessibilityHandler.isIgnored();
- using namespace ComTypes::Constants;
-
switch (propertyId)
{
case UIA_AutomationIdPropertyId:
@@ -438,27 +432,27 @@ JUCE_COMRESULT AccessibilityNativeHandle::GetPropertyValue (PROPERTYID propertyI
}
//==============================================================================
-JUCE_COMRESULT AccessibilityNativeHandle::Navigate (ComTypes::NavigateDirection direction, ComTypes::IRawElementProviderFragment** pRetVal)
+JUCE_COMRESULT AccessibilityNativeHandle::Navigate (NavigateDirection direction, IRawElementProviderFragment** pRetVal)
{
return withCheckedComArgs (pRetVal, *this, [&]
{
auto* handler = [&]() -> AccessibilityHandler*
{
- if (direction == ComTypes::NavigateDirection_Parent)
+ if (direction == NavigateDirection_Parent)
return accessibilityHandler.getParent();
- if (direction == ComTypes::NavigateDirection_FirstChild
- || direction == ComTypes::NavigateDirection_LastChild)
+ if (direction == NavigateDirection_FirstChild
+ || direction == NavigateDirection_LastChild)
{
auto children = accessibilityHandler.getChildren();
return children.empty() ? nullptr
- : (direction == ComTypes::NavigateDirection_FirstChild ? children.front()
- : children.back());
+ : (direction == NavigateDirection_FirstChild ? children.front()
+ : children.back());
}
- if (direction == ComTypes::NavigateDirection_NextSibling
- || direction == ComTypes::NavigateDirection_PreviousSibling)
+ if (direction == NavigateDirection_NextSibling
+ || direction == NavigateDirection_PreviousSibling)
{
if (auto* parent = accessibilityHandler.getParent())
{
@@ -468,10 +462,10 @@ JUCE_COMRESULT AccessibilityNativeHandle::Navigate (ComTypes::NavigateDirection
if (iter == siblings.end())
return nullptr;
- if (direction == ComTypes::NavigateDirection_NextSibling && iter != std::prev (siblings.cend()))
+ if (direction == NavigateDirection_NextSibling && iter != std::prev (siblings.cend()))
return *std::next (iter);
- if (direction == ComTypes::NavigateDirection_PreviousSibling && iter != siblings.cbegin())
+ if (direction == NavigateDirection_PreviousSibling && iter != siblings.cbegin())
return *std::prev (iter);
}
}
@@ -512,7 +506,7 @@ JUCE_COMRESULT AccessibilityNativeHandle::GetRuntimeId (SAFEARRAY** pRetVal)
});
}
-JUCE_COMRESULT AccessibilityNativeHandle::get_BoundingRectangle (ComTypes::UiaRect* pRetVal)
+JUCE_COMRESULT AccessibilityNativeHandle::get_BoundingRectangle (UiaRect* pRetVal)
{
return withCheckedComArgs (pRetVal, *this, [&]
{
@@ -551,7 +545,7 @@ JUCE_COMRESULT AccessibilityNativeHandle::SetFocus()
return S_OK;
}
-JUCE_COMRESULT AccessibilityNativeHandle::get_FragmentRoot (ComTypes::IRawElementProviderFragmentRoot** pRetVal)
+JUCE_COMRESULT AccessibilityNativeHandle::get_FragmentRoot (IRawElementProviderFragmentRoot** pRetVal)
{
return withCheckedComArgs (pRetVal, *this, [&]() -> HRESULT
{
@@ -577,7 +571,7 @@ JUCE_COMRESULT AccessibilityNativeHandle::get_FragmentRoot (ComTypes::IRawElemen
}
//==============================================================================
-JUCE_COMRESULT AccessibilityNativeHandle::ElementProviderFromPoint (double x, double y, ComTypes::IRawElementProviderFragment** pRetVal)
+JUCE_COMRESULT AccessibilityNativeHandle::ElementProviderFromPoint (double x, double y, IRawElementProviderFragment** pRetVal)
{
return withCheckedComArgs (pRetVal, *this, [&]
{
@@ -599,7 +593,7 @@ JUCE_COMRESULT AccessibilityNativeHandle::ElementProviderFromPoint (double x, do
});
}
-JUCE_COMRESULT AccessibilityNativeHandle::GetFocus (ComTypes::IRawElementProviderFragment** pRetVal)
+JUCE_COMRESULT AccessibilityNativeHandle::GetFocus (IRawElementProviderFragment** pRetVal)
{
return withCheckedComArgs (pRetVal, *this, [&]
{
diff --git a/modules/juce_gui_basics/native/accessibility/juce_AccessibilityElement_windows.h b/modules/juce_gui_basics/native/accessibility/juce_AccessibilityElement_windows.h
index 5b08e07b99..f6b8506aa6 100644
--- a/modules/juce_gui_basics/native/accessibility/juce_AccessibilityElement_windows.h
+++ b/modules/juce_gui_basics/native/accessibility/juce_AccessibilityElement_windows.h
@@ -36,9 +36,9 @@ namespace juce
{
class AccessibilityNativeHandle : public ComBaseClassHelper
+ IRawElementProviderFragment,
+ IRawElementProviderFragmentRoot,
+ IRawElementProviderHwndOverride>
{
public:
explicit AccessibilityNativeHandle (AccessibilityHandler& handler);
@@ -58,15 +58,15 @@ public:
JUCE_COMRESULT GetPatternProvider (PATTERNID pId, IUnknown** provider) override;
JUCE_COMRESULT GetPropertyValue (PROPERTYID propertyId, VARIANT* pRetVal) override;
- JUCE_COMRESULT Navigate (ComTypes::NavigateDirection direction, ComTypes::IRawElementProviderFragment** pRetVal) override;
+ JUCE_COMRESULT Navigate (NavigateDirection direction, IRawElementProviderFragment** pRetVal) override;
JUCE_COMRESULT GetRuntimeId (SAFEARRAY** pRetVal) override;
- JUCE_COMRESULT get_BoundingRectangle (ComTypes::UiaRect* pRetVal) override;
+ JUCE_COMRESULT get_BoundingRectangle (UiaRect* pRetVal) override;
JUCE_COMRESULT GetEmbeddedFragmentRoots (SAFEARRAY** pRetVal) override;
JUCE_COMRESULT SetFocus() override;
- JUCE_COMRESULT get_FragmentRoot (ComTypes::IRawElementProviderFragmentRoot** pRetVal) override;
+ JUCE_COMRESULT get_FragmentRoot (IRawElementProviderFragmentRoot** pRetVal) override;
- JUCE_COMRESULT ElementProviderFromPoint (double x, double y, ComTypes::IRawElementProviderFragment** pRetVal) override;
- JUCE_COMRESULT GetFocus (ComTypes::IRawElementProviderFragment** pRetVal) override;
+ JUCE_COMRESULT ElementProviderFromPoint (double x, double y, IRawElementProviderFragment** pRetVal) override;
+ JUCE_COMRESULT GetFocus (IRawElementProviderFragment** pRetVal) override;
JUCE_COMRESULT GetOverrideProviderForHwnd (HWND hwnd, IRawElementProviderSimple** pRetVal) override;
diff --git a/modules/juce_gui_basics/native/accessibility/juce_Accessibility_windows.cpp b/modules/juce_gui_basics/native/accessibility/juce_Accessibility_windows.cpp
index c1c1341bcd..81391ce47f 100644
--- a/modules/juce_gui_basics/native/accessibility/juce_Accessibility_windows.cpp
+++ b/modules/juce_gui_basics/native/accessibility/juce_Accessibility_windows.cpp
@@ -164,8 +164,6 @@ void sendAccessibilityPropertyChangedEvent (const AccessibilityHandler& handler,
void detail::AccessibilityHelpers::notifyAccessibilityEvent (const AccessibilityHandler& handler, Event eventType)
{
- using namespace ComTypes::Constants;
-
if (eventType == Event::elementCreated
|| eventType == Event::elementDestroyed)
{
@@ -232,8 +230,6 @@ void AccessibilityHandler::notifyAccessibilityEvent (AccessibilityEvent eventTyp
auto event = [eventType]() -> EVENTID
{
- using namespace ComTypes::Constants;
-
switch (eventType)
{
case AccessibilityEvent::textSelectionChanged: return UIA_Text_TextSelectionChangedEventId;
@@ -255,7 +251,7 @@ struct SpVoiceWrapper final : public DeletedAtShutdown
{
SpVoiceWrapper()
{
- [[maybe_unused]] auto hr = voice.CoCreateInstance (ComTypes::CLSID_SpVoice);
+ [[maybe_unused]] auto hr = voice.CoCreateInstance (CLSID_SpVoice);
jassert (SUCCEEDED (hr));
}
diff --git a/modules/juce_gui_basics/native/accessibility/juce_ComInterfaces_windows.h b/modules/juce_gui_basics/native/accessibility/juce_ComInterfaces_windows.h
deleted file mode 100644
index 177782a171..0000000000
--- a/modules/juce_gui_basics/native/accessibility/juce_ComInterfaces_windows.h
+++ /dev/null
@@ -1,509 +0,0 @@
-/*
- ==============================================================================
-
- This file is part of the JUCE framework.
- Copyright (c) Raw Material Software Limited
-
- JUCE is an open source framework subject to commercial or open source
- licensing.
-
- By downloading, installing, or using the JUCE framework, or combining the
- JUCE framework with any other source code, object code, content or any other
- copyrightable work, you agree to the terms of the JUCE End User Licence
- Agreement, and all incorporated terms including the JUCE Privacy Policy and
- the JUCE Website Terms of Service, as applicable, which will bind you. If you
- do not agree to the terms of these agreements, we will not license the JUCE
- framework to you, and you must discontinue the installation or download
- process and cease use of the JUCE framework.
-
- JUCE End User Licence Agreement: https://juce.com/legal/juce-8-licence/
- JUCE Privacy Policy: https://juce.com/juce-privacy-policy
- JUCE Website Terms of Service: https://juce.com/juce-website-terms-of-service/
-
- Or:
-
- You may also use this code under the terms of the AGPLv3:
- https://www.gnu.org/licenses/agpl-3.0.en.html
-
- THE JUCE FRAMEWORK IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL
- WARRANTIES, WHETHER EXPRESSED OR IMPLIED, INCLUDING WARRANTY OF
- MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, ARE DISCLAIMED.
-
- ==============================================================================
-*/
-
-namespace juce::ComTypes
-{
-
-/*
- These interfaces would normally be included in the system platform headers.
- However, those headers are likely to be incomplete when building with
- MinGW. In order to allow building accessible applications under MinGW,
- we reproduce all necessary definitions here.
-*/
-
-struct UiaPoint
-{
- double x;
- double y;
-};
-
-struct UiaRect
-{
- double left;
- double top;
- double width;
- double height;
-};
-
-enum NavigateDirection
-{
- NavigateDirection_Parent = 0,
- NavigateDirection_NextSibling = 1,
- NavigateDirection_PreviousSibling = 2,
- NavigateDirection_FirstChild = 3,
- NavigateDirection_LastChild = 4
-};
-
-enum ExpandCollapseState
-{
- ExpandCollapseState_Collapsed = 0,
- ExpandCollapseState_Expanded = 1,
- ExpandCollapseState_PartiallyExpanded = 2,
- ExpandCollapseState_LeafNode = 3
-};
-
-enum TextPatternRangeEndpoint
-{
- TextPatternRangeEndpoint_Start = 0,
- TextPatternRangeEndpoint_End = 1
-};
-
-enum TextUnit
-{
- TextUnit_Character = 0,
- TextUnit_Format = 1,
- TextUnit_Word = 2,
- TextUnit_Line = 3,
- TextUnit_Paragraph = 4,
- TextUnit_Page = 5,
- TextUnit_Document = 6
-};
-
-enum SupportedTextSelection
-{
- SupportedTextSelection_None = 0,
- SupportedTextSelection_Single = 1,
- SupportedTextSelection_Multiple = 2
-};
-
-enum CaretPosition
-{
- CaretPosition_Unknown = 0,
- CaretPosition_EndOfLine = 1,
- CaretPosition_BeginningOfLine = 2
-};
-
-enum ToggleState
-{
- ToggleState_Off = 0,
- ToggleState_On = 1,
- ToggleState_Indeterminate = 2
-};
-
-enum WindowVisualState
-{
- WindowVisualState_Normal = 0,
- WindowVisualState_Maximized = 1,
- WindowVisualState_Minimized = 2
-};
-
-enum WindowInteractionState
-{
- WindowInteractionState_Running = 0,
- WindowInteractionState_Closing = 1,
- WindowInteractionState_ReadyForUserInteraction = 2,
- WindowInteractionState_BlockedByModalWindow = 3,
- WindowInteractionState_NotResponding = 4
-};
-
-enum RowOrColumnMajor
-{
- RowOrColumnMajor_RowMajor = 0,
- RowOrColumnMajor_ColumnMajor = 1,
- RowOrColumnMajor_Indeterminate = 2
-};
-
-enum ScrollAmount
-{
- ScrollAmount_LargeDecrement = 0,
- ScrollAmount_SmallDecrement = 1,
- ScrollAmount_NoAmount = 2,
- ScrollAmount_LargeIncrement = 3,
- ScrollAmount_SmallIncrement = 4
-};
-
-namespace Constants
-{
-
-#undef UIA_InvokePatternId
-#undef UIA_SelectionPatternId
-#undef UIA_ValuePatternId
-#undef UIA_RangeValuePatternId
-#undef UIA_ScrollPatternId
-#undef UIA_ExpandCollapsePatternId
-#undef UIA_GridPatternId
-#undef UIA_GridItemPatternId
-#undef UIA_WindowPatternId
-#undef UIA_SelectionItemPatternId
-#undef UIA_TablePatternId
-#undef UIA_TableItemPatternId
-#undef UIA_TextPatternId
-#undef UIA_TogglePatternId
-#undef UIA_TransformPatternId
-#undef UIA_ScrollItemPatternId
-#undef UIA_TextPattern2Id
-#undef UIA_StructureChangedEventId
-#undef UIA_MenuOpenedEventId
-#undef UIA_AutomationFocusChangedEventId
-#undef UIA_MenuClosedEventId
-#undef UIA_LayoutInvalidatedEventId
-#undef UIA_Invoke_InvokedEventId
-#undef UIA_SelectionItem_ElementSelectedEventId
-#undef UIA_Text_TextSelectionChangedEventId
-#undef UIA_Text_TextChangedEventId
-#undef UIA_Window_WindowOpenedEventId
-#undef UIA_Window_WindowClosedEventId
-#undef UIA_IsPeripheralPropertyId
-#undef UIA_FullDescriptionPropertyId
-#undef UIA_IsDialogPropertyId
-#undef UIA_IsReadOnlyAttributeId
-#undef UIA_CaretPositionAttributeId
-#undef UIA_ButtonControlTypeId
-#undef UIA_CheckBoxControlTypeId
-#undef UIA_ComboBoxControlTypeId
-#undef UIA_EditControlTypeId
-#undef UIA_HyperlinkControlTypeId
-#undef UIA_ImageControlTypeId
-#undef UIA_ListItemControlTypeId
-#undef UIA_ListControlTypeId
-#undef UIA_MenuBarControlTypeId
-#undef UIA_MenuItemControlTypeId
-#undef UIA_ProgressBarControlTypeId
-#undef UIA_RadioButtonControlTypeId
-#undef UIA_ScrollBarControlTypeId
-#undef UIA_SliderControlTypeId
-#undef UIA_TextControlTypeId
-#undef UIA_ToolTipControlTypeId
-#undef UIA_TreeControlTypeId
-#undef UIA_TreeItemControlTypeId
-#undef UIA_CustomControlTypeId
-#undef UIA_GroupControlTypeId
-#undef UIA_DataItemControlTypeId
-#undef UIA_WindowControlTypeId
-#undef UIA_HeaderControlTypeId
-#undef UIA_HeaderItemControlTypeId
-#undef UIA_TableControlTypeId
-
-const long UIA_InvokePatternId = 10000;
-const long UIA_SelectionPatternId = 10001;
-const long UIA_ValuePatternId = 10002;
-const long UIA_RangeValuePatternId = 10003;
-const long UIA_ScrollPatternId = 10004;
-const long UIA_ExpandCollapsePatternId = 10005;
-const long UIA_GridPatternId = 10006;
-const long UIA_GridItemPatternId = 10007;
-const long UIA_WindowPatternId = 10009;
-const long UIA_SelectionItemPatternId = 10010;
-const long UIA_TablePatternId = 10012;
-const long UIA_TableItemPatternId = 10013;
-const long UIA_TextPatternId = 10014;
-const long UIA_TogglePatternId = 10015;
-const long UIA_TransformPatternId = 10016;
-const long UIA_ScrollItemPatternId = 10017;
-const long UIA_TextPattern2Id = 10024;
-const long UIA_StructureChangedEventId = 20002;
-const long UIA_MenuOpenedEventId = 20003;
-const long UIA_AutomationFocusChangedEventId = 20005;
-const long UIA_MenuClosedEventId = 20007;
-const long UIA_LayoutInvalidatedEventId = 20008;
-const long UIA_Invoke_InvokedEventId = 20009;
-const long UIA_SelectionItem_ElementSelectedEventId = 20012;
-const long UIA_Text_TextSelectionChangedEventId = 20014;
-const long UIA_Text_TextChangedEventId = 20015;
-const long UIA_Window_WindowOpenedEventId = 20016;
-const long UIA_Window_WindowClosedEventId = 20017;
-const long UIA_IsPeripheralPropertyId = 30150;
-const long UIA_FullDescriptionPropertyId = 30159;
-const long UIA_IsDialogPropertyId = 30174;
-const long UIA_IsReadOnlyAttributeId = 40015;
-const long UIA_CaretPositionAttributeId = 40038;
-const long UIA_ButtonControlTypeId = 50000;
-const long UIA_CheckBoxControlTypeId = 50002;
-const long UIA_ComboBoxControlTypeId = 50003;
-const long UIA_EditControlTypeId = 50004;
-const long UIA_HyperlinkControlTypeId = 50005;
-const long UIA_ImageControlTypeId = 50006;
-const long UIA_ListItemControlTypeId = 50007;
-const long UIA_ListControlTypeId = 50008;
-const long UIA_MenuBarControlTypeId = 50010;
-const long UIA_MenuItemControlTypeId = 50011;
-const long UIA_ProgressBarControlTypeId = 50012;
-const long UIA_RadioButtonControlTypeId = 50013;
-const long UIA_ScrollBarControlTypeId = 50014;
-const long UIA_SliderControlTypeId = 50015;
-const long UIA_TextControlTypeId = 50020;
-const long UIA_ToolTipControlTypeId = 50022;
-const long UIA_TreeControlTypeId = 50023;
-const long UIA_TreeItemControlTypeId = 50024;
-const long UIA_CustomControlTypeId = 50025;
-const long UIA_GroupControlTypeId = 50026;
-const long UIA_DataItemControlTypeId = 50029;
-const long UIA_WindowControlTypeId = 50032;
-const long UIA_HeaderControlTypeId = 50034;
-const long UIA_HeaderItemControlTypeId = 50035;
-const long UIA_TableControlTypeId = 50036;
-
-} // namespace Constants
-
-interface IRawElementProviderFragmentRoot;
-interface IRawElementProviderFragment;
-
-JUCE_COMCLASS (IRawElementProviderFragmentRoot, "620ce2a5-ab8f-40a9-86cb-de3c75599b58") : public IUnknown
-{
-public:
- JUCE_COMCALL ElementProviderFromPoint (double x, double y, __RPC__deref_out_opt IRawElementProviderFragment** pRetVal) = 0;
- JUCE_COMCALL GetFocus (__RPC__deref_out_opt IRawElementProviderFragment * *pRetVal) = 0;
-};
-
-JUCE_COMCLASS (IRawElementProviderFragment, "f7063da8-8359-439c-9297-bbc5299a7d87") : public IUnknown
-{
-public:
- JUCE_COMCALL Navigate (NavigateDirection direction, __RPC__deref_out_opt IRawElementProviderFragment** pRetVal) = 0;
- JUCE_COMCALL GetRuntimeId (__RPC__deref_out_opt SAFEARRAY * *pRetVal) = 0;
- JUCE_COMCALL get_BoundingRectangle (__RPC__out UiaRect * pRetVal) = 0;
- JUCE_COMCALL GetEmbeddedFragmentRoots (__RPC__deref_out_opt SAFEARRAY * *pRetVal) = 0;
- JUCE_COMCALL SetFocus() = 0;
- JUCE_COMCALL get_FragmentRoot (__RPC__deref_out_opt IRawElementProviderFragmentRoot * *pRetVal) = 0;
-};
-
-JUCE_COMCLASS (IRawElementProviderHwndOverride, "1d5df27c-8947-4425-b8d9-79787bb460b8") : public IUnknown
-{
-public:
- JUCE_COMCALL GetOverrideProviderForHwnd (__RPC__in HWND hwnd,
- __RPC__deref_out_opt IRawElementProviderSimple** pRetVal) = 0;
-};
-
-JUCE_COMCLASS (IExpandCollapseProvider, "d847d3a5-cab0-4a98-8c32-ecb45c59ad24") : public IUnknown
-{
-public:
- JUCE_COMCALL Expand() = 0;
- JUCE_COMCALL Collapse() = 0;
- JUCE_COMCALL get_ExpandCollapseState (__RPC__out ExpandCollapseState * pRetVal) = 0;
-};
-
-JUCE_COMCLASS (IGridItemProvider, "d02541f1-fb81-4d64-ae32-f520f8a6dbd1") : public IUnknown
-{
-public:
- JUCE_COMCALL get_Row (__RPC__out int* pRetVal) = 0;
- JUCE_COMCALL get_Column (__RPC__out int* pRetVal) = 0;
- JUCE_COMCALL get_RowSpan (__RPC__out int* pRetVal) = 0;
- JUCE_COMCALL get_ColumnSpan (__RPC__out int* pRetVal) = 0;
- JUCE_COMCALL get_ContainingGrid (__RPC__deref_out_opt IRawElementProviderSimple * *pRetVal) = 0;
-};
-
-JUCE_COMCLASS (IGridProvider, "b17d6187-0907-464b-a168-0ef17a1572b1") : public IUnknown
-{
-public:
- JUCE_COMCALL GetItem (int row, int column, __RPC__deref_out_opt IRawElementProviderSimple** pRetVal) = 0;
- JUCE_COMCALL get_RowCount (__RPC__out int* pRetVal) = 0;
- JUCE_COMCALL get_ColumnCount (__RPC__out int* pRetVal) = 0;
-};
-
-JUCE_COMCLASS (ITableItemProvider, "b9734fa6-771f-4d78-9c90-2517999349cd") : public IUnknown
-{
-public:
- JUCE_COMCALL GetRowHeaderItems (SAFEARRAY** pRetVal) = 0;
- JUCE_COMCALL GetColumnHeaderItems (SAFEARRAY** pRetVal) = 0;
-};
-
-JUCE_COMCLASS (ITableProvider, "9c860395-97b3-490a-b52a-858cc22af166") : public IUnknown
-{
-public:
- JUCE_COMCALL GetRowHeaders (SAFEARRAY** pRetVal) = 0;
- JUCE_COMCALL GetColumnHeaders (SAFEARRAY** pRetVal) = 0;
- JUCE_COMCALL get_RowOrColumnMajor (RowOrColumnMajor* pRetVal) = 0;
-};
-
-JUCE_COMCLASS (IInvokeProvider, "54fcb24b-e18e-47a2-b4d3-eccbe77599a2") : public IUnknown
-{
-public:
- JUCE_COMCALL Invoke() = 0;
-};
-
-JUCE_COMCLASS (IRangeValueProvider, "36dc7aef-33e6-4691-afe1-2be7274b3d33") : public IUnknown
-{
-public:
- JUCE_COMCALL SetValue (double val) = 0;
- JUCE_COMCALL get_Value (__RPC__out double* pRetVal) = 0;
- JUCE_COMCALL get_IsReadOnly (__RPC__out BOOL * pRetVal) = 0;
- JUCE_COMCALL get_Maximum (__RPC__out double* pRetVal) = 0;
- JUCE_COMCALL get_Minimum (__RPC__out double* pRetVal) = 0;
- JUCE_COMCALL get_LargeChange (__RPC__out double* pRetVal) = 0;
- JUCE_COMCALL get_SmallChange (__RPC__out double* pRetVal) = 0;
-};
-
-JUCE_COMCLASS (ISelectionProvider, "fb8b03af-3bdf-48d4-bd36-1a65793be168") : public IUnknown
-{
-public:
- JUCE_COMCALL GetSelection (__RPC__deref_out_opt SAFEARRAY * *pRetVal) = 0;
- JUCE_COMCALL get_CanSelectMultiple (__RPC__out BOOL * pRetVal) = 0;
- JUCE_COMCALL get_IsSelectionRequired (__RPC__out BOOL * pRetVal) = 0;
-};
-
-JUCE_COMCLASS (ISelectionProvider2, "14f68475-ee1c-44f6-a869-d239381f0fe7") : public ISelectionProvider
-{
- JUCE_COMCALL get_FirstSelectedItem (IRawElementProviderSimple * *retVal) = 0;
- JUCE_COMCALL get_LastSelectedItem (IRawElementProviderSimple * *retVal) = 0;
- JUCE_COMCALL get_CurrentSelectedItem (IRawElementProviderSimple * *retVal) = 0;
- JUCE_COMCALL get_ItemCount (int* retVal) = 0;
-};
-
-JUCE_COMCLASS (ISelectionItemProvider, "2acad808-b2d4-452d-a407-91ff1ad167b2") : public IUnknown
-{
-public:
- JUCE_COMCALL Select() = 0;
- JUCE_COMCALL AddToSelection() = 0;
- JUCE_COMCALL RemoveFromSelection() = 0;
- JUCE_COMCALL get_IsSelected (__RPC__out BOOL * pRetVal) = 0;
- JUCE_COMCALL get_SelectionContainer (__RPC__deref_out_opt IRawElementProviderSimple * *pRetVal) = 0;
-};
-
-JUCE_COMCLASS (ITextRangeProvider, "5347ad7b-c355-46f8-aff5-909033582f63") : public IUnknown
-{
-public:
- JUCE_COMCALL Clone (__RPC__deref_out_opt ITextRangeProvider * *pRetVal) = 0;
- JUCE_COMCALL Compare (__RPC__in_opt ITextRangeProvider * range, __RPC__out BOOL * pRetVal) = 0;
- JUCE_COMCALL CompareEndpoints (TextPatternRangeEndpoint endpoint, __RPC__in_opt ITextRangeProvider * targetRange, TextPatternRangeEndpoint targetEndpoint, __RPC__out int* pRetVal) = 0;
- JUCE_COMCALL ExpandToEnclosingUnit (TextUnit unit) = 0;
- JUCE_COMCALL FindAttribute (TEXTATTRIBUTEID attributeId, VARIANT val, BOOL backward, __RPC__deref_out_opt ITextRangeProvider * *pRetVal) = 0;
- JUCE_COMCALL FindText (__RPC__in BSTR text, BOOL backward, BOOL ignoreCase, __RPC__deref_out_opt ITextRangeProvider * *pRetVal) = 0;
- JUCE_COMCALL GetAttributeValue (TEXTATTRIBUTEID attributeId, __RPC__out VARIANT * pRetVal) = 0;
- JUCE_COMCALL GetBoundingRectangles (__RPC__deref_out_opt SAFEARRAY * *pRetVal) = 0;
- JUCE_COMCALL GetEnclosingElement (__RPC__deref_out_opt IRawElementProviderSimple * *pRetVal) = 0;
- JUCE_COMCALL GetText (int maxLength, __RPC__deref_out_opt BSTR* pRetVal) = 0;
- JUCE_COMCALL Move (TextUnit unit, int count, __RPC__out int* pRetVal) = 0;
- JUCE_COMCALL MoveEndpointByUnit (TextPatternRangeEndpoint endpoint, TextUnit unit, int count, __RPC__out int* pRetVal) = 0;
- JUCE_COMCALL MoveEndpointByRange (TextPatternRangeEndpoint endpoint, __RPC__in_opt ITextRangeProvider * targetRange, TextPatternRangeEndpoint targetEndpoint) = 0;
- JUCE_COMCALL Select() = 0;
- JUCE_COMCALL AddToSelection() = 0;
- JUCE_COMCALL RemoveFromSelection() = 0;
- JUCE_COMCALL ScrollIntoView (BOOL alignToTop) = 0;
- JUCE_COMCALL GetChildren (__RPC__deref_out_opt SAFEARRAY * *pRetVal) = 0;
-};
-
-JUCE_COMCLASS (ITextProvider, "3589c92c-63f3-4367-99bb-ada653b77cf2") : public IUnknown
-{
-public:
- JUCE_COMCALL GetSelection (__RPC__deref_out_opt SAFEARRAY * *pRetVal) = 0;
- JUCE_COMCALL GetVisibleRanges (__RPC__deref_out_opt SAFEARRAY * *pRetVal) = 0;
- JUCE_COMCALL RangeFromChild (__RPC__in_opt IRawElementProviderSimple * childElement, __RPC__deref_out_opt ITextRangeProvider * *pRetVal) = 0;
- JUCE_COMCALL RangeFromPoint (UiaPoint point, __RPC__deref_out_opt ITextRangeProvider * *pRetVal) = 0;
- JUCE_COMCALL get_DocumentRange (__RPC__deref_out_opt ITextRangeProvider * *pRetVal) = 0;
- JUCE_COMCALL get_SupportedTextSelection (__RPC__out SupportedTextSelection * pRetVal) = 0;
-};
-
-JUCE_COMCLASS (ITextProvider2, "0dc5e6ed-3e16-4bf1-8f9a-a979878bc195") : public ITextProvider
-{
-public:
- JUCE_COMCALL RangeFromAnnotation (__RPC__in_opt IRawElementProviderSimple * annotationElement, __RPC__deref_out_opt ITextRangeProvider * *pRetVal) = 0;
- JUCE_COMCALL GetCaretRange (__RPC__out BOOL * isActive, __RPC__deref_out_opt ITextRangeProvider * *pRetVal) = 0;
-};
-
-JUCE_COMCLASS (IToggleProvider, "56d00bd0-c4f4-433c-a836-1a52a57e0892") : public IUnknown
-{
-public:
- JUCE_COMCALL Toggle() = 0;
- JUCE_COMCALL get_ToggleState (__RPC__out ToggleState * pRetVal) = 0;
-};
-
-JUCE_COMCLASS (ITransformProvider, "6829ddc4-4f91-4ffa-b86f-bd3e2987cb4c") : public IUnknown
-{
-public:
- JUCE_COMCALL Move (double x, double y) = 0;
- JUCE_COMCALL Resize (double width, double height) = 0;
- JUCE_COMCALL Rotate (double degrees) = 0;
- JUCE_COMCALL get_CanMove (__RPC__out BOOL * pRetVal) = 0;
- JUCE_COMCALL get_CanResize (__RPC__out BOOL * pRetVal) = 0;
- JUCE_COMCALL get_CanRotate (__RPC__out BOOL * pRetVal) = 0;
-};
-
-JUCE_COMCLASS (IValueProvider, "c7935180-6fb3-4201-b174-7df73adbf64a") : public IUnknown
-{
-public:
- JUCE_COMCALL SetValue (__RPC__in LPCWSTR val) = 0;
- JUCE_COMCALL get_Value (__RPC__deref_out_opt BSTR * pRetVal) = 0;
- JUCE_COMCALL get_IsReadOnly (__RPC__out BOOL * pRetVal) = 0;
-};
-
-JUCE_COMCLASS (IWindowProvider, "987df77b-db06-4d77-8f8a-86a9c3bb90b9") : public IUnknown
-{
-public:
- JUCE_COMCALL SetVisualState (WindowVisualState state) = 0;
- JUCE_COMCALL Close() = 0;
- JUCE_COMCALL WaitForInputIdle (int milliseconds, __RPC__out BOOL* pRetVal) = 0;
- JUCE_COMCALL get_CanMaximize (__RPC__out BOOL * pRetVal) = 0;
- JUCE_COMCALL get_CanMinimize (__RPC__out BOOL * pRetVal) = 0;
- JUCE_COMCALL get_IsModal (__RPC__out BOOL * pRetVal) = 0;
- JUCE_COMCALL get_WindowVisualState (__RPC__out WindowVisualState * pRetVal) = 0;
- JUCE_COMCALL get_WindowInteractionState (__RPC__out WindowInteractionState * pRetVal) = 0;
- JUCE_COMCALL get_IsTopmost (__RPC__out BOOL * pRetVal) = 0;
-};
-
-JUCE_COMCLASS (IScrollProvider, "b38b8077-1fc3-42a5-8cae-d40c2215055a") : public IUnknown
-{
-public:
- JUCE_COMCALL Scroll (ScrollAmount horizontalAmount, ScrollAmount verticalAmount) = 0;
- JUCE_COMCALL SetScrollPercent (double horizontalPercent,double verticalPercent) = 0;
- JUCE_COMCALL get_HorizontalScrollPercent (double* pRetVal) = 0;
- JUCE_COMCALL get_VerticalScrollPercent (double* pRetVal) = 0;
- JUCE_COMCALL get_HorizontalViewSize (double* pRetVal) = 0;
- JUCE_COMCALL get_VerticalViewSize (double* pRetVal) = 0;
- JUCE_COMCALL get_HorizontallyScrollable (BOOL* pRetVal) = 0;
- JUCE_COMCALL get_VerticallyScrollable (BOOL* pRetVal) = 0;
-};
-
-JUCE_COMCLASS (IScrollItemProvider, "2360c714-4bf1-4b26-ba65-9b21316127eb") : public IUnknown
-{
-public:
- JUCE_COMCALL ScrollIntoView() = 0;
-};
-
-constexpr CLSID CLSID_SpVoice { 0x96749377, 0x3391, 0x11D2, { 0x9E, 0xE3, 0x00, 0xC0, 0x4F, 0x79, 0x73, 0x96 } };
-
-} // namespace juce::ComTypes
-
-#ifdef __CRT_UUID_DECL
-__CRT_UUID_DECL (juce::ComTypes::IRawElementProviderFragmentRoot, 0x620ce2a5, 0xab8f, 0x40a9, 0x86, 0xcb, 0xde, 0x3c, 0x75, 0x59, 0x9b, 0x58)
-__CRT_UUID_DECL (juce::ComTypes::IRawElementProviderFragment, 0xf7063da8, 0x8359, 0x439c, 0x92, 0x97, 0xbb, 0xc5, 0x29, 0x9a, 0x7d, 0x87)
-__CRT_UUID_DECL (juce::ComTypes::IRawElementProviderHwndOverride, 0x1d5df27c, 0x8947, 0x4425, 0xb8, 0xd9, 0x79, 0x78, 0x7b, 0xb4, 0x60, 0xb8)
-__CRT_UUID_DECL (juce::ComTypes::IExpandCollapseProvider, 0xd847d3a5, 0xcab0, 0x4a98, 0x8c, 0x32, 0xec, 0xb4, 0x5c, 0x59, 0xad, 0x24)
-__CRT_UUID_DECL (juce::ComTypes::IGridItemProvider, 0xd02541f1, 0xfb81, 0x4d64, 0xae, 0x32, 0xf5, 0x20, 0xf8, 0xa6, 0xdb, 0xd1)
-__CRT_UUID_DECL (juce::ComTypes::IGridProvider, 0xb17d6187, 0x0907, 0x464b, 0xa1, 0x68, 0x0e, 0xf1, 0x7a, 0x15, 0x72, 0xb1)
-__CRT_UUID_DECL (juce::ComTypes::IInvokeProvider, 0x54fcb24b, 0xe18e, 0x47a2, 0xb4, 0xd3, 0xec, 0xcb, 0xe7, 0x75, 0x99, 0xa2)
-__CRT_UUID_DECL (juce::ComTypes::IRangeValueProvider, 0x36dc7aef, 0x33e6, 0x4691, 0xaf, 0xe1, 0x2b, 0xe7, 0x27, 0x4b, 0x3d, 0x33)
-__CRT_UUID_DECL (juce::ComTypes::ISelectionProvider, 0xfb8b03af, 0x3bdf, 0x48d4, 0xbd, 0x36, 0x1a, 0x65, 0x79, 0x3b, 0xe1, 0x68)
-__CRT_UUID_DECL (juce::ComTypes::ISelectionProvider2, 0x14f68475, 0xee1c, 0x44f6, 0xa8, 0x69, 0xd2, 0x39, 0x38, 0x1f, 0x0f, 0xe7)
-__CRT_UUID_DECL (juce::ComTypes::ISelectionItemProvider, 0x2acad808, 0xb2d4, 0x452d, 0xa4, 0x07, 0x91, 0xff, 0x1a, 0xd1, 0x67, 0xb2)
-__CRT_UUID_DECL (juce::ComTypes::ITextRangeProvider, 0x5347ad7b, 0xc355, 0x46f8, 0xaf, 0xf5, 0x90, 0x90, 0x33, 0x58, 0x2f, 0x63)
-__CRT_UUID_DECL (juce::ComTypes::ITextProvider, 0x3589c92c, 0x63f3, 0x4367, 0x99, 0xbb, 0xad, 0xa6, 0x53, 0xb7, 0x7c, 0xf2)
-__CRT_UUID_DECL (juce::ComTypes::ITextProvider2, 0x0dc5e6ed, 0x3e16, 0x4bf1, 0x8f, 0x9a, 0xa9, 0x79, 0x87, 0x8b, 0xc1, 0x95)
-__CRT_UUID_DECL (juce::ComTypes::IToggleProvider, 0x56d00bd0, 0xc4f4, 0x433c, 0xa8, 0x36, 0x1a, 0x52, 0xa5, 0x7e, 0x08, 0x92)
-__CRT_UUID_DECL (juce::ComTypes::ITransformProvider, 0x6829ddc4, 0x4f91, 0x4ffa, 0xb8, 0x6f, 0xbd, 0x3e, 0x29, 0x87, 0xcb, 0x4c)
-__CRT_UUID_DECL (juce::ComTypes::IValueProvider, 0xc7935180, 0x6fb3, 0x4201, 0xb1, 0x74, 0x7d, 0xf7, 0x3a, 0xdb, 0xf6, 0x4a)
-__CRT_UUID_DECL (juce::ComTypes::IWindowProvider, 0x987df77b, 0xdb06, 0x4d77, 0x8f, 0x8a, 0x86, 0xa9, 0xc3, 0xbb, 0x90, 0xb9)
-__CRT_UUID_DECL (juce::ComTypes::ITableItemProvider, 0xb9734fa6, 0x771f, 0x4d78, 0x9c, 0x90, 0x25, 0x17, 0x99, 0x93, 0x49, 0xcd)
-__CRT_UUID_DECL (juce::ComTypes::ITableProvider, 0x9c860395, 0x97b3, 0x490a, 0xb5, 0x2a, 0x85, 0x8c, 0xc2, 0x2a, 0xf1, 0x66)
-__CRT_UUID_DECL (juce::ComTypes::IScrollProvider, 0xb38b8077, 0x1fc3, 0x42a5, 0x8c, 0xae, 0xd4, 0x0c, 0x22, 0x15, 0x05, 0x5a)
-__CRT_UUID_DECL (juce::ComTypes::IScrollItemProvider, 0x2360c714, 0x4bf1, 0x4b26, 0xba, 0x65, 0x9b, 0x21, 0x31, 0x61, 0x27, 0xeb)
-#endif
diff --git a/modules/juce_gui_basics/native/accessibility/juce_UIAExpandCollapseProvider_windows.h b/modules/juce_gui_basics/native/accessibility/juce_UIAExpandCollapseProvider_windows.h
index 61e3be6b31..848a377009 100644
--- a/modules/juce_gui_basics/native/accessibility/juce_UIAExpandCollapseProvider_windows.h
+++ b/modules/juce_gui_basics/native/accessibility/juce_UIAExpandCollapseProvider_windows.h
@@ -37,7 +37,7 @@ namespace juce
//==============================================================================
class UIAExpandCollapseProvider : public UIAProviderBase,
- public ComBaseClassHelper
+ public ComBaseClassHelper
{
public:
using UIAProviderBase::UIAProviderBase;
@@ -53,13 +53,13 @@ public:
return invokeShowMenu();
}
- JUCE_COMRESULT get_ExpandCollapseState (ComTypes::ExpandCollapseState* pRetVal) override
+ JUCE_COMRESULT get_ExpandCollapseState (ExpandCollapseState* pRetVal) override
{
return withCheckedComArgs (pRetVal, *this, [&]
{
*pRetVal = getHandler().getCurrentState().isExpanded()
- ? ComTypes::ExpandCollapseState_Expanded
- : ComTypes::ExpandCollapseState_Collapsed;
+ ? ExpandCollapseState_Expanded
+ : ExpandCollapseState_Collapsed;
return S_OK;
});
@@ -75,8 +75,6 @@ private:
if (handler.getActions().invoke (AccessibilityActionType::showMenu))
{
- using namespace ComTypes::Constants;
-
sendAccessibilityAutomationEvent (handler, handler.getCurrentState().isExpanded()
? UIA_MenuOpenedEventId
: UIA_MenuClosedEventId);
diff --git a/modules/juce_gui_basics/native/accessibility/juce_UIAGridItemProvider_windows.h b/modules/juce_gui_basics/native/accessibility/juce_UIAGridItemProvider_windows.h
index 8583b16a25..b539875aa8 100644
--- a/modules/juce_gui_basics/native/accessibility/juce_UIAGridItemProvider_windows.h
+++ b/modules/juce_gui_basics/native/accessibility/juce_UIAGridItemProvider_windows.h
@@ -37,7 +37,7 @@ namespace juce
//==============================================================================
class UIAGridItemProvider : public UIAProviderBase,
- public ComBaseClassHelper
+ public ComBaseClassHelper
{
public:
using UIAProviderBase::UIAProviderBase;
diff --git a/modules/juce_gui_basics/native/accessibility/juce_UIAGridProvider_windows.h b/modules/juce_gui_basics/native/accessibility/juce_UIAGridProvider_windows.h
index 94d5da2265..f4f35be764 100644
--- a/modules/juce_gui_basics/native/accessibility/juce_UIAGridProvider_windows.h
+++ b/modules/juce_gui_basics/native/accessibility/juce_UIAGridProvider_windows.h
@@ -37,7 +37,7 @@ namespace juce
//==============================================================================
class UIAGridProvider : public UIAProviderBase,
- public ComBaseClassHelper
+ public ComBaseClassHelper
{
public:
using UIAProviderBase::UIAProviderBase;
@@ -133,9 +133,9 @@ public:
});
}
- JUCE_COMRESULT get_RowOrColumnMajor (ComTypes::RowOrColumnMajor* pRetVal) override
+ JUCE_COMRESULT get_RowOrColumnMajor (RowOrColumnMajor* pRetVal) override
{
- *pRetVal = ComTypes::RowOrColumnMajor_RowMajor;
+ *pRetVal = RowOrColumnMajor_RowMajor;
return S_OK;
}
diff --git a/modules/juce_gui_basics/native/accessibility/juce_UIAInvokeProvider_windows.h b/modules/juce_gui_basics/native/accessibility/juce_UIAInvokeProvider_windows.h
index 930dbe7283..3b3a40c468 100644
--- a/modules/juce_gui_basics/native/accessibility/juce_UIAInvokeProvider_windows.h
+++ b/modules/juce_gui_basics/native/accessibility/juce_UIAInvokeProvider_windows.h
@@ -37,7 +37,7 @@ namespace juce
//==============================================================================
class UIAInvokeProvider : public UIAProviderBase,
- public ComBaseClassHelper
+ public ComBaseClassHelper
{
public:
using UIAProviderBase::UIAProviderBase;
@@ -52,8 +52,6 @@ public:
if (handler.getActions().invoke (AccessibilityActionType::press))
{
- using namespace ComTypes::Constants;
-
if (isElementValid())
sendAccessibilityAutomationEvent (handler, UIA_Invoke_InvokedEventId);
diff --git a/modules/juce_gui_basics/native/accessibility/juce_UIARangeValueProvider_windows.h b/modules/juce_gui_basics/native/accessibility/juce_UIARangeValueProvider_windows.h
index 0231888dc6..d90151fefe 100644
--- a/modules/juce_gui_basics/native/accessibility/juce_UIARangeValueProvider_windows.h
+++ b/modules/juce_gui_basics/native/accessibility/juce_UIARangeValueProvider_windows.h
@@ -37,7 +37,7 @@ namespace juce
//==============================================================================
class UIARangeValueProvider : public UIAProviderBase,
- public ComBaseClassHelper
+ public ComBaseClassHelper
{
public:
using UIAProviderBase::UIAProviderBase;
diff --git a/modules/juce_gui_basics/native/accessibility/juce_UIASelectionProvider_windows.h b/modules/juce_gui_basics/native/accessibility/juce_UIASelectionProvider_windows.h
index 63964ab225..11347fc0d9 100644
--- a/modules/juce_gui_basics/native/accessibility/juce_UIASelectionProvider_windows.h
+++ b/modules/juce_gui_basics/native/accessibility/juce_UIASelectionProvider_windows.h
@@ -39,7 +39,7 @@ JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wlanguage-extension-token")
//==============================================================================
class UIASelectionItemProvider : public UIAProviderBase,
- public ComBaseClassHelper
+ public ComBaseClassHelper
{
public:
explicit UIASelectionItemProvider (AccessibilityNativeHandle* handle)
@@ -58,8 +58,6 @@ public:
if (isRadioButton)
{
- using namespace ComTypes::Constants;
-
handler.getActions().invoke (AccessibilityActionType::press);
sendAccessibilityAutomationEvent (handler, UIA_SelectionItem_ElementSelectedEventId);
@@ -139,7 +137,7 @@ private:
//==============================================================================
class UIASelectionProvider : public UIAProviderBase,
- public ComBaseClassHelper
+ public ComBaseClassHelper
{
public:
using UIAProviderBase::UIAProviderBase;
@@ -147,11 +145,11 @@ public:
//==============================================================================
JUCE_COMRESULT QueryInterface (REFIID iid, void** result) override
{
- if (iid == __uuidof (IUnknown) || iid == __uuidof (ComTypes::ISelectionProvider))
- return castToType (result);
+ if (iid == __uuidof (IUnknown) || iid == __uuidof (ISelectionProvider))
+ return castToType (result);
- if (iid == __uuidof (ComTypes::ISelectionProvider2))
- return castToType (result);
+ if (iid == __uuidof (ISelectionProvider2))
+ return castToType (result);
*result = nullptr;
return E_NOINTERFACE;
diff --git a/modules/juce_gui_basics/native/accessibility/juce_UIATextProvider_windows.h b/modules/juce_gui_basics/native/accessibility/juce_UIATextProvider_windows.h
index 2fabdd6b44..5bb60afc68 100644
--- a/modules/juce_gui_basics/native/accessibility/juce_UIATextProvider_windows.h
+++ b/modules/juce_gui_basics/native/accessibility/juce_UIATextProvider_windows.h
@@ -37,7 +37,7 @@ namespace juce
//==============================================================================
class UIATextProvider : public UIAProviderBase,
- public ComBaseClassHelper
+ public ComBaseClassHelper
{
public:
using UIAProviderBase::UIAProviderBase;
@@ -47,11 +47,11 @@ public:
{
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wlanguage-extension-token")
- if (iid == __uuidof (IUnknown) || iid == __uuidof (ComTypes::ITextProvider))
- return castToType (result);
+ if (iid == __uuidof (IUnknown) || iid == __uuidof (ITextProvider))
+ return castToType (result);
- if (iid == __uuidof (ComTypes::ITextProvider2))
- return castToType (result);
+ if (iid == __uuidof (ITextProvider2))
+ return castToType (result);
*result = nullptr;
return E_NOINTERFACE;
@@ -60,7 +60,7 @@ public:
}
//==============================================================================
- JUCE_COMRESULT get_DocumentRange (ComTypes::ITextRangeProvider** pRetVal) override
+ JUCE_COMRESULT get_DocumentRange (ITextRangeProvider** pRetVal) override
{
return withTextInterface (pRetVal, [&] (const AccessibilityTextInterface& textInterface)
{
@@ -69,11 +69,11 @@ public:
});
}
- JUCE_COMRESULT get_SupportedTextSelection (ComTypes::SupportedTextSelection* pRetVal) override
+ JUCE_COMRESULT get_SupportedTextSelection (SupportedTextSelection* pRetVal) override
{
return withCheckedComArgs (pRetVal, *this, [&]
{
- *pRetVal = ComTypes::SupportedTextSelection_Single;
+ *pRetVal = SupportedTextSelection_Single;
return S_OK;
});
}
@@ -130,7 +130,7 @@ public:
});
}
- JUCE_COMRESULT RangeFromChild (IRawElementProviderSimple*, ComTypes::ITextRangeProvider** pRetVal) override
+ JUCE_COMRESULT RangeFromChild (IRawElementProviderSimple*, ITextRangeProvider** pRetVal) override
{
return withCheckedComArgs (pRetVal, *this, []
{
@@ -138,7 +138,7 @@ public:
});
}
- JUCE_COMRESULT RangeFromPoint (ComTypes::UiaPoint point, ComTypes::ITextRangeProvider** pRetVal) override
+ JUCE_COMRESULT RangeFromPoint (UiaPoint point, ITextRangeProvider** pRetVal) override
{
return withTextInterface (pRetVal, [&] (const AccessibilityTextInterface& textInterface)
{
@@ -152,7 +152,7 @@ public:
}
//==============================================================================
- JUCE_COMRESULT GetCaretRange (BOOL* isActive, ComTypes::ITextRangeProvider** pRetVal) override
+ JUCE_COMRESULT GetCaretRange (BOOL* isActive, ITextRangeProvider** pRetVal) override
{
return withTextInterface (pRetVal, [&] (const AccessibilityTextInterface& textInterface)
{
@@ -165,7 +165,7 @@ public:
});
}
- JUCE_COMRESULT RangeFromAnnotation (IRawElementProviderSimple*, ComTypes::ITextRangeProvider** pRetVal) override
+ JUCE_COMRESULT RangeFromAnnotation (IRawElementProviderSimple*, ITextRangeProvider** pRetVal) override
{
return withCheckedComArgs (pRetVal, *this, []
{
@@ -189,7 +189,7 @@ private:
//==============================================================================
class UIATextRangeProvider : public UIAProviderBase,
- public ComBaseClassHelper
+ public ComBaseClassHelper
{
public:
UIATextRangeProvider (UIATextProvider& textProvider, Range range)
@@ -208,7 +208,7 @@ private:
return Select();
}
- JUCE_COMRESULT Clone (ComTypes::ITextRangeProvider** pRetVal) override
+ JUCE_COMRESULT Clone (ITextRangeProvider** pRetVal) override
{
return withCheckedComArgs (pRetVal, *this, [&]
{
@@ -217,7 +217,7 @@ private:
});
}
- JUCE_COMRESULT Compare (ComTypes::ITextRangeProvider* range, BOOL* pRetVal) override
+ JUCE_COMRESULT Compare (ITextRangeProvider* range, BOOL* pRetVal) override
{
return withCheckedComArgs (pRetVal, *this, [&]
{
@@ -226,9 +226,9 @@ private:
});
}
- JUCE_COMRESULT CompareEndpoints (ComTypes::TextPatternRangeEndpoint endpoint,
- ComTypes::ITextRangeProvider* targetRange,
- ComTypes::TextPatternRangeEndpoint targetEndpoint,
+ JUCE_COMRESULT CompareEndpoints (TextPatternRangeEndpoint endpoint,
+ ITextRangeProvider* targetRange,
+ TextPatternRangeEndpoint targetEndpoint,
int* pRetVal) override
{
if (targetRange == nullptr)
@@ -236,19 +236,19 @@ private:
return withCheckedComArgs (pRetVal, *this, [&]
{
- auto offset = (endpoint == ComTypes::TextPatternRangeEndpoint_Start ? selectionRange.getStart()
- : selectionRange.getEnd());
+ auto offset = (endpoint == TextPatternRangeEndpoint_Start ? selectionRange.getStart()
+ : selectionRange.getEnd());
auto otherRange = static_cast (targetRange)->getSelectionRange();
- auto otherOffset = (targetEndpoint == ComTypes::TextPatternRangeEndpoint_Start ? otherRange.getStart()
- : otherRange.getEnd());
+ auto otherOffset = (targetEndpoint == TextPatternRangeEndpoint_Start ? otherRange.getStart()
+ : otherRange.getEnd());
*pRetVal = offset - otherOffset;
return S_OK;
});
}
- JUCE_COMRESULT ExpandToEnclosingUnit (ComTypes::TextUnit unit) override
+ JUCE_COMRESULT ExpandToEnclosingUnit (TextUnit unit) override
{
if (! isElementValid())
return (HRESULT) UIA_E_ELEMENTNOTAVAILABLE;
@@ -280,7 +280,7 @@ private:
return (HRESULT) UIA_E_NOTSUPPORTED;
}
- JUCE_COMRESULT FindAttribute (TEXTATTRIBUTEID, VARIANT, BOOL, ComTypes::ITextRangeProvider** pRetVal) override
+ JUCE_COMRESULT FindAttribute (TEXTATTRIBUTEID, VARIANT, BOOL, ITextRangeProvider** pRetVal) override
{
return withCheckedComArgs (pRetVal, *this, []
{
@@ -289,7 +289,7 @@ private:
}
JUCE_COMRESULT FindText (BSTR text, BOOL backward, BOOL ignoreCase,
- ComTypes::ITextRangeProvider** pRetVal) override
+ ITextRangeProvider** pRetVal) override
{
return owner->withTextInterface (pRetVal, [&] (const AccessibilityTextInterface& textInterface)
{
@@ -312,8 +312,6 @@ private:
{
VariantHelpers::clear (pRetVal);
- using namespace ComTypes::Constants;
-
switch (attributeId)
{
case UIA_IsReadOnlyAttributeId:
@@ -329,12 +327,12 @@ private:
auto caretPos = [&]
{
if (cursorPos == 0)
- return ComTypes::CaretPosition_BeginningOfLine;
+ return CaretPosition_BeginningOfLine;
if (cursorPos == textInterface.getTotalNumCharacters())
- return ComTypes::CaretPosition_EndOfLine;
+ return CaretPosition_EndOfLine;
- return ComTypes::CaretPosition_Unknown;
+ return CaretPosition_Unknown;
}();
VariantHelpers::setInt (caretPos, pRetVal);
@@ -425,7 +423,7 @@ private:
});
}
- JUCE_COMRESULT Move (ComTypes::TextUnit unit, int count, int* pRetVal) override
+ JUCE_COMRESULT Move (TextUnit unit, int count, int* pRetVal) override
{
return owner->withTextInterface (pRetVal, [&] (const AccessibilityTextInterface& textInterface)
{
@@ -464,9 +462,9 @@ private:
});
}
- JUCE_COMRESULT MoveEndpointByRange (ComTypes::TextPatternRangeEndpoint endpoint,
- ComTypes::ITextRangeProvider* targetRange,
- ComTypes::TextPatternRangeEndpoint targetEndpoint) override
+ JUCE_COMRESULT MoveEndpointByRange (TextPatternRangeEndpoint endpoint,
+ ITextRangeProvider* targetRange,
+ TextPatternRangeEndpoint targetEndpoint) override
{
if (targetRange == nullptr)
return E_INVALIDARG;
@@ -477,8 +475,8 @@ private:
if (owner->getHandler().getTextInterface() != nullptr)
{
auto otherRange = static_cast (targetRange)->getSelectionRange();
- auto targetPoint = (targetEndpoint == ComTypes::TextPatternRangeEndpoint_Start ? otherRange.getStart()
- : otherRange.getEnd());
+ auto targetPoint = (targetEndpoint == TextPatternRangeEndpoint_Start ? otherRange.getStart()
+ : otherRange.getEnd());
setEndpointChecked (endpoint, targetPoint);
return S_OK;
@@ -487,8 +485,8 @@ private:
return (HRESULT) UIA_E_NOTSUPPORTED;
}
- JUCE_COMRESULT MoveEndpointByUnit (ComTypes::TextPatternRangeEndpoint endpoint,
- ComTypes::TextUnit unit,
+ JUCE_COMRESULT MoveEndpointByUnit (TextPatternRangeEndpoint endpoint,
+ TextUnit unit,
int count,
int* pRetVal) override
{
@@ -497,8 +495,8 @@ private:
if (count == 0 || textInterface.getTotalNumCharacters() == 0)
return S_OK;
- const auto endpointToMove = (endpoint == ComTypes::TextPatternRangeEndpoint_Start ? selectionRange.getStart()
- : selectionRange.getEnd());
+ const auto endpointToMove = (endpoint == TextPatternRangeEndpoint_Start ? selectionRange.getStart()
+ : selectionRange.getEnd());
using ATH = AccessibilityTextHelpers;
@@ -572,23 +570,23 @@ private:
}
private:
- static AccessibilityTextHelpers::BoundaryType getBoundaryType (ComTypes::TextUnit unit)
+ static AccessibilityTextHelpers::BoundaryType getBoundaryType (TextUnit unit)
{
switch (unit)
{
- case ComTypes::TextUnit_Character:
+ case TextUnit_Character:
return AccessibilityTextHelpers::BoundaryType::character;
- case ComTypes::TextUnit_Format:
- case ComTypes::TextUnit_Word:
+ case TextUnit_Format:
+ case TextUnit_Word:
return AccessibilityTextHelpers::BoundaryType::word;
- case ComTypes::TextUnit_Line:
+ case TextUnit_Line:
return AccessibilityTextHelpers::BoundaryType::line;
- case ComTypes::TextUnit_Paragraph:
- case ComTypes::TextUnit_Page:
- case ComTypes::TextUnit_Document:
+ case TextUnit_Paragraph:
+ case TextUnit_Page:
+ case TextUnit_Document:
return AccessibilityTextHelpers::BoundaryType::document;
};
@@ -596,9 +594,9 @@ private:
return AccessibilityTextHelpers::BoundaryType::character;
}
- void setEndpointChecked (ComTypes::TextPatternRangeEndpoint endpoint, int newEndpoint)
+ void setEndpointChecked (TextPatternRangeEndpoint endpoint, int newEndpoint)
{
- if (endpoint == ComTypes::TextPatternRangeEndpoint_Start)
+ if (endpoint == TextPatternRangeEndpoint_Start)
{
if (selectionRange.getEnd() < newEndpoint)
selectionRange.setEnd (newEndpoint);
diff --git a/modules/juce_gui_basics/native/accessibility/juce_UIAToggleProvider_windows.h b/modules/juce_gui_basics/native/accessibility/juce_UIAToggleProvider_windows.h
index 1ac3e77ffa..06a417bd11 100644
--- a/modules/juce_gui_basics/native/accessibility/juce_UIAToggleProvider_windows.h
+++ b/modules/juce_gui_basics/native/accessibility/juce_UIAToggleProvider_windows.h
@@ -37,7 +37,7 @@ namespace juce
//==============================================================================
class UIAToggleProvider : public UIAProviderBase,
- public ComBaseClassHelper
+ public ComBaseClassHelper
{
public:
using UIAProviderBase::UIAProviderBase;
@@ -64,7 +64,7 @@ public:
return (HRESULT) UIA_E_NOTSUPPORTED;
}
- JUCE_COMRESULT get_ToggleState (ComTypes::ToggleState* pRetVal) override
+ JUCE_COMRESULT get_ToggleState (ToggleState* pRetVal) override
{
return withCheckedComArgs (pRetVal, *this, [&]
{
@@ -74,10 +74,10 @@ public:
}
private:
- ComTypes::ToggleState getCurrentToggleState() const
+ ToggleState getCurrentToggleState() const
{
- return getHandler().getCurrentState().isChecked() ? ComTypes::ToggleState_On
- : ComTypes::ToggleState_Off;
+ return getHandler().getCurrentState().isChecked() ? ToggleState_On
+ : ToggleState_Off;
}
//==============================================================================
diff --git a/modules/juce_gui_basics/native/accessibility/juce_UIATransformProvider_windows.h b/modules/juce_gui_basics/native/accessibility/juce_UIATransformProvider_windows.h
index 352341ecb6..946496d118 100644
--- a/modules/juce_gui_basics/native/accessibility/juce_UIATransformProvider_windows.h
+++ b/modules/juce_gui_basics/native/accessibility/juce_UIATransformProvider_windows.h
@@ -37,7 +37,7 @@ namespace juce
//==============================================================================
class UIATransformProvider : public UIAProviderBase,
- public ComBaseClassHelper
+ public ComBaseClassHelper
{
public:
using UIAProviderBase::UIAProviderBase;
diff --git a/modules/juce_gui_basics/native/accessibility/juce_UIAValueProvider_windows.h b/modules/juce_gui_basics/native/accessibility/juce_UIAValueProvider_windows.h
index f5fae02653..5f1ad49f81 100644
--- a/modules/juce_gui_basics/native/accessibility/juce_UIAValueProvider_windows.h
+++ b/modules/juce_gui_basics/native/accessibility/juce_UIAValueProvider_windows.h
@@ -37,7 +37,7 @@ namespace juce
//==============================================================================
class UIAValueProvider : public UIAProviderBase,
- public ComBaseClassHelper
+ public ComBaseClassHelper
{
public:
using UIAProviderBase::UIAProviderBase;
diff --git a/modules/juce_gui_basics/native/accessibility/juce_UIAWindowProvider_windows.h b/modules/juce_gui_basics/native/accessibility/juce_UIAWindowProvider_windows.h
index 8f6b9f7bae..1cbd4279d3 100644
--- a/modules/juce_gui_basics/native/accessibility/juce_UIAWindowProvider_windows.h
+++ b/modules/juce_gui_basics/native/accessibility/juce_UIAWindowProvider_windows.h
@@ -37,13 +37,13 @@ namespace juce
//==============================================================================
class UIAWindowProvider : public UIAProviderBase,
- public ComBaseClassHelper
+ public ComBaseClassHelper
{
public:
using UIAProviderBase::UIAProviderBase;
//==============================================================================
- JUCE_COMRESULT SetVisualState (ComTypes::WindowVisualState state) override
+ JUCE_COMRESULT SetVisualState (WindowVisualState state) override
{
if (! isElementValid())
return (HRESULT) UIA_E_ELEMENTNOTAVAILABLE;
@@ -52,15 +52,15 @@ public:
{
switch (state)
{
- case ComTypes::WindowVisualState_Maximized:
+ case WindowVisualState_Maximized:
peer->setFullScreen (true);
break;
- case ComTypes::WindowVisualState_Minimized:
+ case WindowVisualState_Minimized:
peer->setMinimised (true);
break;
- case ComTypes::WindowVisualState_Normal:
+ case WindowVisualState_Normal:
peer->setFullScreen (false);
peer->setMinimised (false);
break;
@@ -139,18 +139,18 @@ public:
});
}
- JUCE_COMRESULT get_WindowVisualState (ComTypes::WindowVisualState* pRetVal) override
+ JUCE_COMRESULT get_WindowVisualState (WindowVisualState* pRetVal) override
{
return withCheckedComArgs (pRetVal, *this, [&]() -> HRESULT
{
if (auto* peer = getPeer())
{
if (peer->isFullScreen())
- *pRetVal = ComTypes::WindowVisualState_Maximized;
+ *pRetVal = WindowVisualState_Maximized;
else if (peer->isMinimised())
- *pRetVal = ComTypes::WindowVisualState_Minimized;
+ *pRetVal = WindowVisualState_Minimized;
else
- *pRetVal = ComTypes::WindowVisualState_Normal;
+ *pRetVal = WindowVisualState_Normal;
return S_OK;
}
@@ -159,15 +159,15 @@ public:
});
}
- JUCE_COMRESULT get_WindowInteractionState (ComTypes::WindowInteractionState* pRetVal) override
+ JUCE_COMRESULT get_WindowInteractionState (WindowInteractionState* pRetVal) override
{
return withCheckedComArgs (pRetVal, *this, [&]() -> HRESULT
{
if (auto* peer = getPeer())
{
*pRetVal = peer->getComponent().isCurrentlyBlockedByAnotherModalComponent()
- ? ComTypes::WindowInteractionState::WindowInteractionState_BlockedByModalWindow
- : ComTypes::WindowInteractionState::WindowInteractionState_Running;
+ ? WindowInteractionState::WindowInteractionState_BlockedByModalWindow
+ : WindowInteractionState::WindowInteractionState_Running;
return S_OK;
}
diff --git a/modules/juce_gui_basics/native/juce_Windowing_windows.cpp b/modules/juce_gui_basics/native/juce_Windowing_windows.cpp
index f3ba42d8b1..1bb395a5f0 100644
--- a/modules/juce_gui_basics/native/juce_Windowing_windows.cpp
+++ b/modules/juce_gui_basics/native/juce_Windowing_windows.cpp
@@ -766,9 +766,7 @@ static void setWindowZOrder (HWND hwnd, HWND insertAfter)
}
//==============================================================================
-#if ! JUCE_MINGW
-extern RTL_OSVERSIONINFOW getWindowsVersionInfo();
-#endif
+RTL_OSVERSIONINFOW getWindowsVersionInfo();
double Desktop::getDefaultMasterScale()
{
@@ -788,7 +786,6 @@ class Desktop::NativeDarkModeChangeDetectorImpl
public:
NativeDarkModeChangeDetectorImpl()
{
- #if ! JUCE_MINGW
const auto winVer = getWindowsVersionInfo();
if (winVer.dwMajorVersion >= 10 && winVer.dwBuildNumber >= 17763)
@@ -805,7 +802,6 @@ public:
darkModeEnabled = shouldAppsUseDarkMode() && ! isHighContrast();
}
}
- #endif
}
~NativeDarkModeChangeDetectorImpl()
diff --git a/modules/juce_opengl/juce_opengl.cpp b/modules/juce_opengl/juce_opengl.cpp
index 1599e2d9d8..c20886ffe2 100644
--- a/modules/juce_opengl/juce_opengl.cpp
+++ b/modules/juce_opengl/juce_opengl.cpp
@@ -84,7 +84,7 @@
#elif JUCE_WINDOWS
#include
- #if ! JUCE_MINGW && ! JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES
+ #if ! JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES
#pragma comment(lib, "OpenGL32.Lib")
#endif
diff --git a/modules/juce_opengl/juce_opengl.h b/modules/juce_opengl/juce_opengl.h
index 89dfa403b2..d676043b48 100644
--- a/modules/juce_opengl/juce_opengl.h
+++ b/modules/juce_opengl/juce_opengl.h
@@ -55,7 +55,6 @@
OSXFrameworks: OpenGL
iOSFrameworks: OpenGLES
linuxPackages: gl
- mingwLibs: opengl32
END_JUCE_MODULE_DECLARATION
diff --git a/modules/juce_video/juce_video.cpp b/modules/juce_video/juce_video.cpp
index 7792232048..e82ed3a517 100644
--- a/modules/juce_video/juce_video.cpp
+++ b/modules/juce_video/juce_video.cpp
@@ -54,10 +54,13 @@
//==============================================================================
#elif JUCE_WINDOWS
- #include "wmsdkidl.h"
- #include "native/juce_ComTypes_windows.h"
+ #include "dshow.h"
+ #include "dshowasf.h"
+ #include "evr.h"
+ #include "strmif.h"
+ #include "wmsdk.h"
- #if ! JUCE_MINGW && ! JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES
+ #if ! JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES
#pragma comment (lib, "strmiids.lib")
#if JUCE_USE_CAMERA
diff --git a/modules/juce_video/native/juce_CameraDevice_windows.h b/modules/juce_video/native/juce_CameraDevice_windows.h
index 55642d749f..a8e7ab2bb0 100644
--- a/modules/juce_video/native/juce_CameraDevice_windows.h
+++ b/modules/juce_video/native/juce_CameraDevice_windows.h
@@ -32,6 +32,29 @@
==============================================================================
*/
+// The following definitions would normally be found in qedit.h, which is not part of the
+// Windows SDK, and which is incompatible with newer versions of DirectX.
+JUCE_COMCLASS (ISampleGrabberCB, "0579154A-2B53-4994-B0D0-E773148EFF85") : public IUnknown
+{
+ JUCE_COMCALL SampleCB (double, IMediaSample*) = 0;
+ JUCE_COMCALL BufferCB (double, BYTE*, long) = 0;
+};
+
+JUCE_COMCLASS (ISampleGrabber, "6B652FFF-11FE-4fce-92AD-0266B5D7C78F") : public IUnknown
+{
+ JUCE_COMCALL SetOneShot (BOOL) = 0;
+ JUCE_COMCALL SetMediaType (const AM_MEDIA_TYPE*) = 0;
+ JUCE_COMCALL GetConnectedMediaType (AM_MEDIA_TYPE*) = 0;
+ JUCE_COMCALL SetBufferSamples (BOOL) = 0;
+ JUCE_COMCALL GetCurrentBuffer (long*, long*) = 0;
+ JUCE_COMCALL GetCurrentSample (IMediaSample**) = 0;
+ JUCE_COMCALL SetCallback (ISampleGrabberCB*, long) = 0;
+};
+
+constexpr CLSID CLSID_NullRenderer = { 0xC1F400A4, 0x3F08, 0x11d3, { 0x9F, 0x0B, 0x00, 0x60, 0x08, 0x03, 0x9E, 0x37 } };
+constexpr CLSID CLSID_SampleGrabber = { 0xC1F400A0, 0x3F08, 0x11d3, { 0x9F, 0x0B, 0x00, 0x60, 0x08, 0x03, 0x9E, 0x37 } };
+
+//==============================================================================
struct CameraDevice::Pimpl : public ChangeBroadcaster
{
Pimpl (CameraDevice& ownerToUse, const String&, int index,
@@ -39,7 +62,7 @@ struct CameraDevice::Pimpl : public ChangeBroadcaster
bool /*highQuality*/)
: owner (ownerToUse)
{
- HRESULT hr = captureGraphBuilder.CoCreateInstance (ComTypes::CLSID_CaptureGraphBuilder2);
+ HRESULT hr = captureGraphBuilder.CoCreateInstance (CLSID_CaptureGraphBuilder2);
if (FAILED (hr))
return;
@@ -47,7 +70,7 @@ struct CameraDevice::Pimpl : public ChangeBroadcaster
if (filter == nullptr)
return;
- hr = graphBuilder.CoCreateInstance (ComTypes::CLSID_FilterGraph);
+ hr = graphBuilder.CoCreateInstance (CLSID_FilterGraph);
if (FAILED (hr))
return;
@@ -55,16 +78,16 @@ struct CameraDevice::Pimpl : public ChangeBroadcaster
if (FAILED (hr))
return;
- mediaControl = graphBuilder.getInterface();
+ mediaControl = graphBuilder.getInterface();
if (mediaControl == nullptr)
return;
{
- ComSmartPtr streamConfig;
+ ComSmartPtr streamConfig;
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wlanguage-extension-token")
- hr = captureGraphBuilder->FindInterface (&ComTypes::PIN_CATEGORY_CAPTURE, nullptr, filter,
- __uuidof (ComTypes::IAMStreamConfig), (void**) streamConfig.resetAndGetPointerAddress());
+ hr = captureGraphBuilder->FindInterface (&PIN_CATEGORY_CAPTURE, nullptr, filter,
+ __uuidof (IAMStreamConfig), (void**) streamConfig.resetAndGetPointerAddress());
JUCE_END_IGNORE_WARNINGS_GCC_LIKE
if (streamConfig != nullptr)
@@ -80,7 +103,7 @@ struct CameraDevice::Pimpl : public ChangeBroadcaster
if (FAILED (hr))
return;
- hr = smartTee.CoCreateInstance (ComTypes::CLSID_SmartTee);
+ hr = smartTee.CoCreateInstance (CLSID_SmartTee);
if (FAILED (hr))
return;
@@ -91,23 +114,23 @@ struct CameraDevice::Pimpl : public ChangeBroadcaster
if (! connectFilters (filter, smartTee))
return;
- ComSmartPtr sampleGrabberBase;
- hr = sampleGrabberBase.CoCreateInstance (ComTypes::CLSID_SampleGrabber);
+ ComSmartPtr sampleGrabberBase;
+ hr = sampleGrabberBase.CoCreateInstance (CLSID_SampleGrabber);
if (FAILED (hr))
return;
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wlanguage-extension-token")
- hr = sampleGrabberBase.QueryInterface (__uuidof (ComTypes::ISampleGrabber), sampleGrabber);
+ hr = sampleGrabberBase.QueryInterface (__uuidof (ISampleGrabber), sampleGrabber);
JUCE_END_IGNORE_WARNINGS_GCC_LIKE
if (FAILED (hr))
return;
{
- ComTypes::AM_MEDIA_TYPE mt = {};
- mt.majortype = ComTypes::MEDIATYPE_Video;
- mt.subtype = ComTypes::MEDIASUBTYPE_RGB24;
- mt.formattype = ComTypes::FORMAT_VideoInfo;
+ AM_MEDIA_TYPE mt = {};
+ mt.majortype = MEDIATYPE_Video;
+ mt.subtype = MEDIASUBTYPE_RGB24;
+ mt.formattype = FORMAT_VideoInfo;
sampleGrabber->SetMediaType (&mt);
}
@@ -118,27 +141,27 @@ struct CameraDevice::Pimpl : public ChangeBroadcaster
if (FAILED (hr))
return;
- ComSmartPtr grabberInputPin;
- if (! (getPin (smartTee, ComTypes::PINDIR_OUTPUT, smartTeeCaptureOutputPin, "capture")
- && getPin (smartTee, ComTypes::PINDIR_OUTPUT, smartTeePreviewOutputPin, "preview")
- && getPin (sampleGrabberBase, ComTypes::PINDIR_INPUT, grabberInputPin)))
+ ComSmartPtr grabberInputPin;
+ if (! (getPin (smartTee, PINDIR_OUTPUT, smartTeeCaptureOutputPin, "capture")
+ && getPin (smartTee, PINDIR_OUTPUT, smartTeePreviewOutputPin, "preview")
+ && getPin (sampleGrabberBase, PINDIR_INPUT, grabberInputPin)))
return;
hr = graphBuilder->Connect (smartTeePreviewOutputPin, grabberInputPin);
if (FAILED (hr))
return;
- ComTypes::AM_MEDIA_TYPE mt = {};
+ AM_MEDIA_TYPE mt = {};
hr = sampleGrabber->GetConnectedMediaType (&mt);
- if (auto* pVih = unalignedPointerCast (mt.pbFormat))
+ if (auto* pVih = unalignedPointerCast (mt.pbFormat))
{
width = pVih->bmiHeader.biWidth;
height = pVih->bmiHeader.biHeight;
}
- ComSmartPtr nullFilter;
- hr = nullFilter.CoCreateInstance (ComTypes::CLSID_NullRenderer);
+ ComSmartPtr nullFilter;
+ hr = nullFilter.CoCreateInstance (CLSID_NullRenderer);
hr = graphBuilder->AddFilter (nullFilter, _T ("Null Renderer"));
if (connectFilters (sampleGrabberBase, nullFilter)
@@ -277,12 +300,12 @@ struct CameraDevice::Pimpl : public ChangeBroadcaster
firstRecordedTime = Time::getCurrentTime() - RelativeTime (defaultCameraLatency);
recordNextFrameTime = false;
- ComSmartPtr pin;
- if (getPin (filter, ComTypes::PINDIR_OUTPUT, pin))
+ ComSmartPtr pin;
+ if (getPin (filter, PINDIR_OUTPUT, pin))
{
- if (auto pushSource = pin.getInterface())
+ if (auto pushSource = pin.getInterface())
{
- ComTypes::REFERENCE_TIME latency = 0;
+ REFERENCE_TIME latency = 0;
pushSource->GetLatency (&latency);
firstRecordedTime = firstRecordedTime - RelativeTime ((double) latency);
@@ -342,11 +365,11 @@ struct CameraDevice::Pimpl : public ChangeBroadcaster
recordNextFrameTime = true;
previewMaxFPS = 60;
- HRESULT hr = asfWriter.CoCreateInstance (ComTypes::CLSID_WMAsfWriter);
+ HRESULT hr = asfWriter.CoCreateInstance (CLSID_WMAsfWriter);
if (SUCCEEDED (hr))
{
- if (auto fileSink = asfWriter.getInterface())
+ if (auto fileSink = asfWriter.getInterface())
{
hr = fileSink->SetFileName (file.getFullPathName().toWideCharPointer(), nullptr);
@@ -356,19 +379,12 @@ struct CameraDevice::Pimpl : public ChangeBroadcaster
if (SUCCEEDED (hr))
{
- if (auto asfConfig = asfWriter.getInterface())
+ if (auto asfConfig = asfWriter.getInterface())
{
asfConfig->SetIndexMode (true);
ComSmartPtr profileManager;
- using Fn = HRESULT (*) (IWMProfileManager**);
-
- // This function is available on Windows 2000 and up, but we load it at runtime anyway
- // because some versions of MinGW ship with libraries that don't include this symbol.
- if (auto* fn = reinterpret_cast (wmvcoreLibrary.getFunction ("WMCreateProfileManager")))
- hr = fn (profileManager.resetAndGetPointerAddress());
- else
- jassertfalse;
+ hr = WMCreateProfileManager (profileManager.resetAndGetPointerAddress());
// This gibberish is the DirectShow profile for a video-only wmv file.
String prof (""
@@ -405,9 +421,9 @@ struct CameraDevice::Pimpl : public ChangeBroadcaster
if (SUCCEEDED (hr))
{
- ComSmartPtr asfWriterInputPin;
+ ComSmartPtr asfWriterInputPin;
- if (getPin (asfWriter, ComTypes::PINDIR_INPUT, asfWriterInputPin, "Video Input 01"))
+ if (getPin (asfWriter, PINDIR_INPUT, asfWriterInputPin, "Video Input 01"))
{
hr = graphBuilder->Connect (smartTeeCaptureOutputPin, asfWriterInputPin);
@@ -453,10 +469,10 @@ struct CameraDevice::Pimpl : public ChangeBroadcaster
previewMaxFPS = 60;
}
- static ComSmartPtr enumerateCameras (StringArray* names, const int deviceIndexToOpen)
+ static ComSmartPtr enumerateCameras (StringArray* names, const int deviceIndexToOpen)
{
int index = 0;
- ComSmartPtr pDevEnum;
+ ComSmartPtr pDevEnum;
struct Deleter
{
@@ -465,10 +481,10 @@ struct CameraDevice::Pimpl : public ChangeBroadcaster
using ContextPtr = std::unique_ptr;
- if (SUCCEEDED (pDevEnum.CoCreateInstance (ComTypes::CLSID_SystemDeviceEnum)))
+ if (SUCCEEDED (pDevEnum.CoCreateInstance (CLSID_SystemDeviceEnum)))
{
ComSmartPtr enumerator;
- HRESULT hr = pDevEnum->CreateClassEnumerator (ComTypes::CLSID_VideoInputDeviceCategory, enumerator.resetAndGetPointerAddress(), 0);
+ HRESULT hr = pDevEnum->CreateClassEnumerator (CLSID_VideoInputDeviceCategory, enumerator.resetAndGetPointerAddress(), 0);
if (SUCCEEDED (hr) && enumerator != nullptr)
{
@@ -484,9 +500,9 @@ struct CameraDevice::Pimpl : public ChangeBroadcaster
return ContextPtr (ptr);
}();
- ComSmartPtr captureFilter;
+ ComSmartPtr captureFilter;
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wlanguage-extension-token")
- hr = moniker->BindToObject (context.get(), nullptr, __uuidof (ComTypes::IBaseFilter), (void**) captureFilter.resetAndGetPointerAddress());
+ hr = moniker->BindToObject (context.get(), nullptr, __uuidof (IBaseFilter), (void**) captureFilter.resetAndGetPointerAddress());
JUCE_END_IGNORE_WARNINGS_GCC_LIKE
if (SUCCEEDED (hr))
@@ -528,7 +544,7 @@ struct CameraDevice::Pimpl : public ChangeBroadcaster
return devs;
}
- struct GrabberCallback : public ComBaseClassHelperBase
+ struct GrabberCallback : public ComBaseClassHelperBase
{
explicit GrabberCallback (Pimpl& p)
: owner (p) {}
@@ -536,14 +552,14 @@ struct CameraDevice::Pimpl : public ChangeBroadcaster
JUCE_COMRESULT QueryInterface (REFIID refId, void** result) override
{
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wlanguage-extension-token")
- if (refId == __uuidof (ComTypes::ISampleGrabberCB))
- return castToType (result);
+ if (refId == __uuidof (ISampleGrabberCB))
+ return castToType (result);
JUCE_END_IGNORE_WARNINGS_GCC_LIKE
- return ComBaseClassHelperBase::QueryInterface (refId, result);
+ return ComBaseClassHelperBase::QueryInterface (refId, result);
}
- JUCE_COMRESULT SampleCB (double, ComTypes::IMediaSample*) override { return E_FAIL; }
+ JUCE_COMRESULT SampleCB (double, IMediaSample*) override { return E_FAIL; }
JUCE_COMRESULT BufferCB (double time, BYTE* buffer, long bufferSize) override
{
@@ -556,7 +572,6 @@ struct CameraDevice::Pimpl : public ChangeBroadcaster
JUCE_DECLARE_NON_COPYABLE (GrabberCallback)
};
- DynamicLibrary wmvcoreLibrary { "wmvcore" };
CameraDevice& owner;
ComSmartPtr callback;
@@ -573,12 +588,12 @@ struct CameraDevice::Pimpl : public ChangeBroadcaster
Array viewerComps;
- ComSmartPtr captureGraphBuilder;
- ComSmartPtr filter, smartTee, asfWriter;
- ComSmartPtr graphBuilder;
- ComSmartPtr sampleGrabber;
- ComSmartPtr mediaControl;
- ComSmartPtr smartTeePreviewOutputPin, smartTeeCaptureOutputPin;
+ ComSmartPtr captureGraphBuilder;
+ ComSmartPtr filter, smartTee, asfWriter;
+ ComSmartPtr graphBuilder;
+ ComSmartPtr sampleGrabber;
+ ComSmartPtr mediaControl;
+ ComSmartPtr smartTeePreviewOutputPin, smartTeeCaptureOutputPin;
int activeUsers = 0;
Array widths, heights;
DWORD graphRegistrationID;
@@ -592,7 +607,7 @@ private:
CriticalSection imageSwapLock;
Image activeImage;
- void getVideoSizes (ComTypes::IAMStreamConfig* const streamConfig)
+ void getVideoSizes (IAMStreamConfig* const streamConfig)
{
widths.clear();
heights.clear();
@@ -600,12 +615,12 @@ private:
int count = 0, size = 0;
streamConfig->GetNumberOfCapabilities (&count, &size);
- if (size == (int) sizeof (ComTypes::VIDEO_STREAM_CONFIG_CAPS))
+ if (size == (int) sizeof (VIDEO_STREAM_CONFIG_CAPS))
{
for (int i = 0; i < count; ++i)
{
- ComTypes::VIDEO_STREAM_CONFIG_CAPS scc;
- ComTypes::AM_MEDIA_TYPE* config;
+ VIDEO_STREAM_CONFIG_CAPS scc;
+ AM_MEDIA_TYPE* config;
HRESULT hr = streamConfig->GetStreamCaps (i, &config, (BYTE*) &scc);
@@ -637,17 +652,17 @@ private:
}
}
- bool selectVideoSize (ComTypes::IAMStreamConfig* const streamConfig,
+ bool selectVideoSize (IAMStreamConfig* const streamConfig,
const int minWidth, const int minHeight,
const int maxWidth, const int maxHeight)
{
int count = 0, size = 0, bestArea = 0, bestIndex = -1;
streamConfig->GetNumberOfCapabilities (&count, &size);
- if (size == (int) sizeof (ComTypes::VIDEO_STREAM_CONFIG_CAPS))
+ if (size == (int) sizeof (VIDEO_STREAM_CONFIG_CAPS))
{
- ComTypes::AM_MEDIA_TYPE* config;
- ComTypes::VIDEO_STREAM_CONFIG_CAPS scc;
+ AM_MEDIA_TYPE* config;
+ VIDEO_STREAM_CONFIG_CAPS scc;
for (int i = 0; i < count; ++i)
{
@@ -685,22 +700,22 @@ private:
return false;
}
- static bool getPin (ComTypes::IBaseFilter* filter, const ComTypes::PIN_DIRECTION wantedDirection,
- ComSmartPtr& result, const char* pinName = nullptr)
+ static bool getPin (IBaseFilter* filter, const PIN_DIRECTION wantedDirection,
+ ComSmartPtr& result, const char* pinName = nullptr)
{
- ComSmartPtr enumerator;
- ComSmartPtr pin;
+ ComSmartPtr enumerator;
+ ComSmartPtr pin;
filter->EnumPins (enumerator.resetAndGetPointerAddress());
while (enumerator->Next (1, pin.resetAndGetPointerAddress(), nullptr) == S_OK)
{
- ComTypes::PIN_DIRECTION dir;
+ PIN_DIRECTION dir;
pin->QueryDirection (&dir);
if (wantedDirection == dir)
{
- ComTypes::PIN_INFO info = {};
+ PIN_INFO info = {};
pin->QueryPinInfo (&info);
if (pinName == nullptr || String (pinName).equalsIgnoreCase (String (info.achName)))
@@ -714,12 +729,12 @@ private:
return false;
}
- bool connectFilters (ComTypes::IBaseFilter* const first, ComTypes::IBaseFilter* const second) const
+ bool connectFilters (IBaseFilter* const first, IBaseFilter* const second) const
{
- ComSmartPtr in, out;
+ ComSmartPtr in, out;
- return getPin (first, ComTypes::PINDIR_OUTPUT, out)
- && getPin (second, ComTypes::PINDIR_INPUT, in)
+ return getPin (first, PINDIR_OUTPUT, out)
+ && getPin (second, PINDIR_INPUT, in)
&& SUCCEEDED (graphBuilder->Connect (out, in));
}
@@ -749,7 +764,7 @@ private:
void disconnectAnyViewers();
- static void deleteMediaType (ComTypes::AM_MEDIA_TYPE* const pmt)
+ static void deleteMediaType (AM_MEDIA_TYPE* const pmt)
{
if (pmt->cbFormat != 0)
CoTaskMemFree ((PVOID) pmt->pbFormat);
diff --git a/modules/juce_video/native/juce_ComTypes_windows.h b/modules/juce_video/native/juce_ComTypes_windows.h
deleted file mode 100644
index 3af25615d8..0000000000
--- a/modules/juce_video/native/juce_ComTypes_windows.h
+++ /dev/null
@@ -1,521 +0,0 @@
-/*
- ==============================================================================
-
- This file is part of the JUCE framework.
- Copyright (c) Raw Material Software Limited
-
- JUCE is an open source framework subject to commercial or open source
- licensing.
-
- By downloading, installing, or using the JUCE framework, or combining the
- JUCE framework with any other source code, object code, content or any other
- copyrightable work, you agree to the terms of the JUCE End User Licence
- Agreement, and all incorporated terms including the JUCE Privacy Policy and
- the JUCE Website Terms of Service, as applicable, which will bind you. If you
- do not agree to the terms of these agreements, we will not license the JUCE
- framework to you, and you must discontinue the installation or download
- process and cease use of the JUCE framework.
-
- JUCE End User Licence Agreement: https://juce.com/legal/juce-8-licence/
- JUCE Privacy Policy: https://juce.com/juce-privacy-policy
- JUCE Website Terms of Service: https://juce.com/juce-website-terms-of-service/
-
- Or:
-
- You may also use this code under the terms of the AGPLv3:
- https://www.gnu.org/licenses/agpl-3.0.en.html
-
- THE JUCE FRAMEWORK IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL
- WARRANTIES, WHETHER EXPRESSED OR IMPLIED, INCLUDING WARRANTY OF
- MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, ARE DISCLAIMED.
-
- ==============================================================================
-*/
-
-namespace juce
-{
-namespace ComTypes
-{
-/*
- These interfaces would normally be included in the system platform headers.
- However, those headers are likely to be incomplete when building with
- MinGW. In order to allow building video applications under MinGW,
- we reproduce all necessary definitions here.
-*/
-
-enum PIN_DIRECTION
-{
- PINDIR_INPUT = 0,
- PINDIR_OUTPUT = PINDIR_INPUT + 1
-};
-
-enum VMRMode
-{
- VMRMode_Windowed = 0x1,
- VMRMode_Windowless = 0x2,
- VMRMode_Renderless = 0x4,
- VMRMode_Mask = 0x7
-};
-
-enum VMR_ASPECT_RATIO_MODE
-{
- VMR_ARMODE_NONE = 0,
- VMR_ARMODE_LETTER_BOX = VMR_ARMODE_NONE + 1
-};
-
-enum MFVideoAspectRatioMode
-{
- MFVideoARMode_None = 0,
- MFVideoARMode_PreservePicture = 0x1,
- MFVideoARMode_PreservePixel = 0x2,
- MFVideoARMode_NonLinearStretch = 0x4,
- MFVideoARMode_Mask = 0x7
-};
-
-enum FILTER_STATE
-{
- State_Stopped = 0,
- State_Paused = State_Stopped + 1,
- State_Running = State_Paused + 1
-};
-
-enum WMT_VERSION
-{
- WMT_VER_4_0 = 0x40000,
- WMT_VER_7_0 = 0x70000,
- WMT_VER_8_0 = 0x80000,
- WMT_VER_9_0 = 0x90000
-};
-
-// We only ever refer to these through a pointer, so we don't need definitions for them.
-struct IAMCopyCaptureFileProgress;
-struct IBaseFilter;
-struct IEnumFilters;
-struct IEnumMediaTypes;
-struct IReferenceClock;
-struct IVMRImageCompositor;
-
-struct FILTER_INFO;
-
-struct AM_MEDIA_TYPE
-{
- GUID majortype;
- GUID subtype;
- BOOL bFixedSizeSamples;
- BOOL bTemporalCompression;
- ULONG lSampleSize;
- GUID formattype;
- IUnknown* pUnk;
- ULONG cbFormat;
- BYTE* pbFormat;
-};
-
-typedef LONGLONG REFERENCE_TIME;
-typedef LONG_PTR OAEVENT;
-typedef LONG_PTR OAHWND;
-typedef double REFTIME;
-typedef long OAFilterState;
-
-enum Constants
-{
- EC_STATE_CHANGE = 0x32,
- EC_REPAINT = 0x05,
- EC_COMPLETE = 0x01,
- EC_ERRORABORT = 0x03,
- EC_ERRORABORTEX = 0x45,
- EC_USERABORT = 0x02,
-
- VFW_E_INVALID_FILE_FORMAT = (HRESULT) 0x8004022FL,
- VFW_E_NOT_FOUND = (HRESULT) 0x80040216L,
- VFW_E_UNKNOWN_FILE_TYPE = (HRESULT) 0x80040240L,
- VFW_E_UNSUPPORTED_STREAM = (HRESULT) 0x80040265L,
- VFW_E_CANNOT_CONNECT = (HRESULT) 0x80040217L,
- VFW_E_CANNOT_LOAD_SOURCE_FILTER = (HRESULT) 0x80040241L,
- VFW_E_NOT_CONNECTED = (HRESULT) 0x80040209L
-};
-
-struct MFVideoNormalizedRect
-{
- float left;
- float top;
- float right;
- float bottom;
-};
-
-struct VIDEOINFOHEADER
-{
- RECT rcSource;
- RECT rcTarget;
- DWORD dwBitRate;
- DWORD dwBitErrorRate;
- REFERENCE_TIME AvgTimePerFrame;
- BITMAPINFOHEADER bmiHeader;
-};
-
-struct VIDEO_STREAM_CONFIG_CAPS
-{
- GUID guid;
- ULONG VideoStandard;
- SIZE InputSize;
- SIZE MinCroppingSize;
- SIZE MaxCroppingSize;
- int CropGranularityX;
- int CropGranularityY;
- int CropAlignX;
- int CropAlignY;
- SIZE MinOutputSize;
- SIZE MaxOutputSize;
- int OutputGranularityX;
- int OutputGranularityY;
- int StretchTapsX;
- int StretchTapsY;
- int ShrinkTapsX;
- int ShrinkTapsY;
- LONGLONG MinFrameInterval;
- LONGLONG MaxFrameInterval;
- LONG MinBitsPerSecond;
- LONG MaxBitsPerSecond;
-};
-
-struct PIN_INFO
-{
- IBaseFilter* pFilter;
- PIN_DIRECTION dir;
- WCHAR achName[128];
-};
-
-JUCE_COMCLASS (ICreateDevEnum, "29840822-5B84-11D0-BD3B-00A0C911CE86") : public IUnknown
-{
-public:
- JUCE_COMCALL CreateClassEnumerator (REFCLSID clsidDeviceClass, _Out_ IEnumMoniker * *ppEnumMoniker, DWORD dwFlags) = 0;
-};
-
-JUCE_COMCLASS (IPin, "56a86891-0ad4-11ce-b03a-0020af0ba770") : public IUnknown
-{
-public:
- JUCE_COMCALL Connect (IPin * pReceivePin, _In_opt_ const AM_MEDIA_TYPE* pmt) = 0;
- JUCE_COMCALL ReceiveConnection (IPin * pConnector, const AM_MEDIA_TYPE* pmt) = 0;
- JUCE_COMCALL Disconnect() = 0;
- JUCE_COMCALL ConnectedTo (_Out_ IPin * *pPin) = 0;
- JUCE_COMCALL ConnectionMediaType (_Out_ AM_MEDIA_TYPE * pmt) = 0;
- JUCE_COMCALL QueryPinInfo (_Out_ PIN_INFO * pInfo) = 0;
- JUCE_COMCALL QueryDirection (_Out_ PIN_DIRECTION * pPinDir) = 0;
- JUCE_COMCALL QueryId (_Out_ LPWSTR * Id) = 0;
- JUCE_COMCALL QueryAccept (const AM_MEDIA_TYPE* pmt) = 0;
- JUCE_COMCALL EnumMediaTypes (_Out_ IEnumMediaTypes * *ppEnum) = 0;
- JUCE_COMCALL QueryInternalConnections (_Out_writes_to_opt_ (*nPin, *nPin) IPin * *apPin, ULONG * nPin) = 0;
- JUCE_COMCALL EndOfStream() = 0;
- JUCE_COMCALL BeginFlush() = 0;
- JUCE_COMCALL EndFlush() = 0;
- JUCE_COMCALL NewSegment (REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate) = 0;
-};
-
-JUCE_COMCLASS (IFilterGraph, "56a8689f-0ad4-11ce-b03a-0020af0ba770") : public IUnknown
-{
-public:
- JUCE_COMCALL AddFilter (IBaseFilter * pFilter, LPCWSTR pName) = 0;
- JUCE_COMCALL RemoveFilter (IBaseFilter * pFilter) = 0;
- JUCE_COMCALL EnumFilters (_Out_ IEnumFilters * *ppEnum) = 0;
- JUCE_COMCALL FindFilterByName (LPCWSTR pName, _Out_ IBaseFilter * *ppFilter) = 0;
- JUCE_COMCALL ConnectDirect (IPin * ppinOut, IPin * ppinIn, _In_opt_ const AM_MEDIA_TYPE* pmt) = 0;
- JUCE_COMCALL Reconnect (IPin * ppin) = 0;
- JUCE_COMCALL Disconnect (IPin * ppin) = 0;
- JUCE_COMCALL SetDefaultSyncSource() = 0;
-};
-
-JUCE_COMCLASS (IGraphBuilder, "56a868a9-0ad4-11ce-b03a-0020af0ba770") : public IFilterGraph
-{
-public:
- JUCE_COMCALL Connect (IPin * ppinOut, IPin * ppinIn) = 0;
- JUCE_COMCALL Render (IPin * ppinOut) = 0;
- JUCE_COMCALL RenderFile (LPCWSTR lpcwstrFile, _In_opt_ LPCWSTR lpcwstrPlayList) = 0;
- JUCE_COMCALL AddSourceFilter (LPCWSTR lpcwstrFileName, _In_opt_ LPCWSTR lpcwstrFilterName, _Out_ IBaseFilter * *ppFilter) = 0;
- JUCE_COMCALL SetLogFile (DWORD_PTR hFile) = 0;
- JUCE_COMCALL Abort() = 0;
- JUCE_COMCALL ShouldOperationContinue() = 0;
-};
-
-JUCE_COMCLASS (IMediaFilter, "56a86899-0ad4-11ce-b03a-0020af0ba770") : public IPersist
-{
-public:
- JUCE_COMCALL Stop() = 0;
- JUCE_COMCALL Pause() = 0;
- JUCE_COMCALL Run (REFERENCE_TIME tStart) = 0;
- JUCE_COMCALL GetState (DWORD dwMilliSecsTimeout, _Out_ FILTER_STATE * State) = 0;
- JUCE_COMCALL SetSyncSource (_In_opt_ IReferenceClock * pClock) = 0;
- JUCE_COMCALL GetSyncSource (_Outptr_result_maybenull_ IReferenceClock * *pClock) = 0;
-};
-
-JUCE_COMCLASS (IEnumPins, "56a86892-0ad4-11ce-b03a-0020af0ba770") : public IUnknown
-{
-public:
- JUCE_COMCALL Next (ULONG cPins, _Out_writes_to_ (cPins, *pcFetched) IPin * *ppPins, _Out_opt_ ULONG * pcFetched) = 0;
- JUCE_COMCALL Skip (ULONG cPins) = 0;
- JUCE_COMCALL Reset() = 0;
- JUCE_COMCALL Clone (_Out_ IEnumPins * *ppEnum) = 0;
-};
-
-JUCE_COMCLASS (IBaseFilter, "56a86895-0ad4-11ce-b03a-0020af0ba770") : public IMediaFilter
-{
-public:
- JUCE_COMCALL EnumPins (_Out_ IEnumPins * *ppEnum) = 0;
- JUCE_COMCALL FindPin (LPCWSTR Id, _Out_ IPin * *ppPin) = 0;
- JUCE_COMCALL QueryFilterInfo (_Out_ FILTER_INFO * pInfo) = 0;
- JUCE_COMCALL JoinFilterGraph (_In_opt_ IFilterGraph * pGraph, _In_opt_ LPCWSTR pName) = 0;
- JUCE_COMCALL QueryVendorInfo (_Out_ LPWSTR * pVendorInfo) = 0;
-};
-
-JUCE_COMCLASS (IVMRWindowlessControl, "0eb1088c-4dcd-46f0-878f-39dae86a51b7") : public IUnknown
-{
-public:
- JUCE_COMCALL GetNativeVideoSize (LONG * lpWidth, LONG * lpHeight, LONG * lpARWidth, LONG * lpARHeight) = 0;
- JUCE_COMCALL GetMinIdealVideoSize (LONG * lpWidth, LONG * lpHeight) = 0;
- JUCE_COMCALL GetMaxIdealVideoSize (LONG * lpWidth, LONG * lpHeight) = 0;
- JUCE_COMCALL SetVideoPosition (const LPRECT lpSRCRect, const LPRECT lpDSTRect) = 0;
- JUCE_COMCALL GetVideoPosition (LPRECT lpSRCRect, LPRECT lpDSTRect) = 0;
- JUCE_COMCALL GetAspectRatioMode (DWORD * lpAspectRatioMode) = 0;
- JUCE_COMCALL SetAspectRatioMode (DWORD AspectRatioMode) = 0;
- JUCE_COMCALL SetVideoClippingWindow (HWND hwnd) = 0;
- JUCE_COMCALL RepaintVideo (HWND hwnd, HDC hdc) = 0;
- JUCE_COMCALL DisplayModeChanged() = 0;
- JUCE_COMCALL GetCurrentImage (BYTE * *lpDib) = 0;
- JUCE_COMCALL SetBorderColor (COLORREF Clr) = 0;
- JUCE_COMCALL GetBorderColor (COLORREF * lpClr) = 0;
- JUCE_COMCALL SetColorKey (COLORREF Clr) = 0;
- JUCE_COMCALL GetColorKey (COLORREF * lpClr) = 0;
-};
-
-JUCE_COMCLASS (IVMRFilterConfig, "9e5530c5-7034-48b4-bb46-0b8a6efc8e36") : public IUnknown
-{
-public:
- JUCE_COMCALL SetImageCompositor (IVMRImageCompositor * lpVMRImgCompositor) = 0;
- JUCE_COMCALL SetNumberOfStreams (DWORD dwMaxStreams) = 0;
- JUCE_COMCALL GetNumberOfStreams (DWORD * pdwMaxStreams) = 0;
- JUCE_COMCALL SetRenderingPrefs (DWORD dwRenderFlags) = 0;
- JUCE_COMCALL GetRenderingPrefs (DWORD * pdwRenderFlags) = 0;
- JUCE_COMCALL SetRenderingMode (DWORD Mode) = 0;
- JUCE_COMCALL GetRenderingMode (DWORD * pMode) = 0;
-};
-
-JUCE_COMCLASS (IMFVideoDisplayControl, "a490b1e4-ab84-4d31-a1b2-181e03b1077a") : public IUnknown
-{
-public:
- JUCE_COMCALL GetNativeVideoSize (__RPC__inout_opt SIZE * pszVideo, __RPC__inout_opt SIZE * pszARVideo) = 0;
- JUCE_COMCALL GetIdealVideoSize (__RPC__inout_opt SIZE * pszMin, __RPC__inout_opt SIZE * pszMax) = 0;
- JUCE_COMCALL SetVideoPosition (__RPC__in_opt const MFVideoNormalizedRect* pnrcSource, __RPC__in_opt const LPRECT prcDest) = 0;
- JUCE_COMCALL GetVideoPosition (__RPC__out MFVideoNormalizedRect * pnrcSource, __RPC__out LPRECT prcDest) = 0;
- JUCE_COMCALL SetAspectRatioMode (DWORD dwAspectRatioMode) = 0;
- JUCE_COMCALL GetAspectRatioMode (__RPC__out DWORD * pdwAspectRatioMode) = 0;
- JUCE_COMCALL SetVideoWindow (__RPC__in HWND hwndVideo) = 0;
- JUCE_COMCALL GetVideoWindow (__RPC__deref_out_opt HWND * phwndVideo) = 0;
- JUCE_COMCALL RepaintVideo() = 0;
- JUCE_COMCALL GetCurrentImage (__RPC__inout BITMAPINFOHEADER * pBih, __RPC__deref_out_ecount_full_opt (*pcbDib) BYTE * *pDib, __RPC__out DWORD * pcbDib, __RPC__inout_opt LONGLONG * pTimeStamp) = 0;
- JUCE_COMCALL SetBorderColor (COLORREF Clr) = 0;
- JUCE_COMCALL GetBorderColor (__RPC__out COLORREF * pClr) = 0;
- JUCE_COMCALL SetRenderingPrefs (DWORD dwRenderFlags) = 0;
- JUCE_COMCALL GetRenderingPrefs (__RPC__out DWORD * pdwRenderFlags) = 0;
- JUCE_COMCALL SetFullscreen (BOOL fFullscreen) = 0;
- JUCE_COMCALL GetFullscreen (__RPC__out BOOL * pfFullscreen) = 0;
-};
-
-JUCE_COMCLASS (IMFGetService, "fa993888-4383-415a-a930-dd472a8cf6f7") : public IUnknown
-{
-public:
- JUCE_COMCALL GetService (__RPC__in REFGUID guidService, __RPC__in REFIID riid, __RPC__deref_out_opt LPVOID * ppvObject) = 0;
-};
-
-JUCE_COMCLASS (IMediaControl, "56a868b1-0ad4-11ce-b03a-0020af0ba770") : public IDispatch
-{
-public:
- JUCE_COMCALL Run() = 0;
- JUCE_COMCALL Pause() = 0;
- JUCE_COMCALL Stop() = 0;
- JUCE_COMCALL GetState (LONG msTimeout, __RPC__out OAFilterState * pfs) = 0;
- JUCE_COMCALL RenderFile (__RPC__in BSTR strFilename) = 0;
- JUCE_COMCALL AddSourceFilter (__RPC__in BSTR strFilename, __RPC__deref_out_opt IDispatch * *ppUnk) = 0;
- JUCE_COMCALL get_FilterCollection (__RPC__deref_out_opt IDispatch * *ppUnk) = 0;
- JUCE_COMCALL get_RegFilterCollection (__RPC__deref_out_opt IDispatch * *ppUnk) = 0;
- JUCE_COMCALL StopWhenReady() = 0;
-};
-
-JUCE_COMCLASS (IMediaPosition, "56a868b2-0ad4-11ce-b03a-0020af0ba770") : public IDispatch
-{
-public:
- JUCE_COMCALL get_Duration (__RPC__out REFTIME * plength) = 0;
- JUCE_COMCALL put_CurrentPosition (REFTIME llTime) = 0;
- JUCE_COMCALL get_CurrentPosition (__RPC__out REFTIME * pllTime) = 0;
- JUCE_COMCALL get_StopTime (__RPC__out REFTIME * pllTime) = 0;
- JUCE_COMCALL put_StopTime (REFTIME llTime) = 0;
- JUCE_COMCALL get_PrerollTime (__RPC__out REFTIME * pllTime) = 0;
- JUCE_COMCALL put_PrerollTime (REFTIME llTime) = 0;
- JUCE_COMCALL put_Rate (double dRate) = 0;
- JUCE_COMCALL get_Rate (__RPC__out double* pdRate) = 0;
- JUCE_COMCALL CanSeekForward (__RPC__out LONG * pCanSeekForward) = 0;
- JUCE_COMCALL CanSeekBackward (__RPC__out LONG * pCanSeekBackward) = 0;
-};
-
-JUCE_COMCLASS (IMediaEvent, "56a868b6-0ad4-11ce-b03a-0020af0ba770") : public IDispatch
-{
-public:
- JUCE_COMCALL GetEventHandle (__RPC__out OAEVENT * hEvent) = 0;
- JUCE_COMCALL GetEvent (__RPC__out long* lEventCode, __RPC__out LONG_PTR* lParam1, __RPC__out LONG_PTR* lParam2, long msTimeout) = 0;
- JUCE_COMCALL WaitForCompletion (long msTimeout, __RPC__out long* pEvCode) = 0;
- JUCE_COMCALL CancelDefaultHandling (long lEvCode) = 0;
- JUCE_COMCALL RestoreDefaultHandling (long lEvCode) = 0;
- JUCE_COMCALL FreeEventParams (long lEvCode, LONG_PTR lParam1, LONG_PTR lParam2) = 0;
-};
-
-JUCE_COMCLASS (IMediaEventEx, "56a868c0-0ad4-11ce-b03a-0020af0ba770") : public IMediaEvent
-{
-public:
- JUCE_COMCALL SetNotifyWindow (OAHWND hwnd, long lMsg, LONG_PTR lInstanceData) = 0;
- JUCE_COMCALL SetNotifyFlags (long lNoNotifyFlags) = 0;
- JUCE_COMCALL GetNotifyFlags (__RPC__out long* lplNoNotifyFlags) = 0;
-};
-
-JUCE_COMCLASS (IBasicAudio, "56a868b3-0ad4-11ce-b03a-0020af0ba770") : public IDispatch
-{
-public:
- JUCE_COMCALL put_Volume (long lVolume) = 0;
- JUCE_COMCALL get_Volume (__RPC__out long* plVolume) = 0;
- JUCE_COMCALL put_Balance (long lBalance) = 0;
- JUCE_COMCALL get_Balance (__RPC__out long* plBalance) = 0;
-};
-
-JUCE_COMCLASS (IMediaSample, "56a8689a-0ad4-11ce-b03a-0020af0ba770") : public IUnknown
-{
-public:
- JUCE_COMCALL GetPointer (BYTE * *ppBuffer) = 0;
- virtual long STDMETHODCALLTYPE GetSize() = 0;
- JUCE_COMCALL GetTime (_Out_ REFERENCE_TIME * pTimeStart, _Out_ REFERENCE_TIME * pTimeEnd) = 0;
- JUCE_COMCALL SetTime (_In_opt_ REFERENCE_TIME * pTimeStart, _In_opt_ REFERENCE_TIME * pTimeEnd) = 0;
- JUCE_COMCALL IsSyncPoint() = 0;
- JUCE_COMCALL SetSyncPoint (BOOL bIsSyncPoint) = 0;
- JUCE_COMCALL IsPreroll() = 0;
- JUCE_COMCALL SetPreroll (BOOL bIsPreroll) = 0;
- virtual long STDMETHODCALLTYPE GetActualDataLength() = 0;
- JUCE_COMCALL SetActualDataLength (long __MIDL__IMediaSample0000) = 0;
- JUCE_COMCALL GetMediaType (_Out_ AM_MEDIA_TYPE * *ppMediaType) = 0;
- JUCE_COMCALL SetMediaType (_In_ AM_MEDIA_TYPE * pMediaType) = 0;
- JUCE_COMCALL IsDiscontinuity() = 0;
- JUCE_COMCALL SetDiscontinuity (BOOL bDiscontinuity) = 0;
- JUCE_COMCALL GetMediaTime (_Out_ LONGLONG * pTimeStart, _Out_ LONGLONG * pTimeEnd) = 0;
- JUCE_COMCALL SetMediaTime (_In_opt_ LONGLONG * pTimeStart, _In_opt_ LONGLONG * pTimeEnd) = 0;
-};
-
-JUCE_COMCLASS (IFileSinkFilter, "a2104830-7c70-11cf-8bce-00aa00a3f1a6") : public IUnknown
-{
-public:
- JUCE_COMCALL SetFileName (LPCOLESTR pszFileName, _In_opt_ const AM_MEDIA_TYPE* pmt) = 0;
- JUCE_COMCALL GetCurFile (_Out_ LPOLESTR * ppszFileName, _Out_ AM_MEDIA_TYPE * pmt) = 0;
-};
-
-JUCE_COMCLASS (ICaptureGraphBuilder2, "93E5A4E0-2D50-11d2-ABFA-00A0C9C6E38D") : public IUnknown
-{
-public:
- JUCE_COMCALL SetFiltergraph (IGraphBuilder * pfg) = 0;
- JUCE_COMCALL GetFiltergraph (_Out_ IGraphBuilder * *ppfg) = 0;
- JUCE_COMCALL SetOutputFileName (const GUID* pType, LPCOLESTR lpstrFile, _Outptr_ IBaseFilter** ppf, _Outptr_opt_ IFileSinkFilter** ppSink) = 0;
- JUCE_COMCALL FindInterface (_In_opt_ const GUID* pCategory, _In_opt_ const GUID* pType, IBaseFilter* pf, REFIID riid, _Out_ void** ppint) = 0;
- JUCE_COMCALL RenderStream (_In_opt_ const GUID* pCategory, const GUID* pType, IUnknown* pSource, IBaseFilter* pfCompressor, IBaseFilter* pfRenderer) = 0;
- JUCE_COMCALL ControlStream (const GUID* pCategory, const GUID* pType, IBaseFilter* pFilter, _In_opt_ REFERENCE_TIME* pstart, _In_opt_ REFERENCE_TIME* pstop, WORD wStartCookie, WORD wStopCookie) = 0;
- JUCE_COMCALL AllocCapFile (LPCOLESTR lpstr, DWORDLONG dwlSize) = 0;
- JUCE_COMCALL CopyCaptureFile (_In_ LPOLESTR lpwstrOld, _In_ LPOLESTR lpwstrNew, int fAllowEscAbort, IAMCopyCaptureFileProgress* pCallback) = 0;
- JUCE_COMCALL FindPin (IUnknown * pSource, PIN_DIRECTION pindir, _In_opt_ const GUID* pCategory, _In_opt_ const GUID* pType, BOOL fUnconnected, int num, _Out_ IPin** ppPin) = 0;
-};
-
-JUCE_COMCLASS (IAMStreamConfig, "C6E13340-30AC-11d0-A18C-00A0C9118956") : public IUnknown
-{
-public:
- JUCE_COMCALL SetFormat (AM_MEDIA_TYPE * pmt) = 0;
- JUCE_COMCALL GetFormat (_Out_ AM_MEDIA_TYPE * *ppmt) = 0;
- JUCE_COMCALL GetNumberOfCapabilities (_Out_ int* piCount, _Out_ int* piSize) = 0;
- JUCE_COMCALL GetStreamCaps (int iIndex, _Out_ AM_MEDIA_TYPE** ppmt, _Out_ BYTE* pSCC) = 0;
-};
-
-JUCE_COMCLASS (ISampleGrabberCB, "0579154A-2B53-4994-B0D0-E773148EFF85") : public IUnknown
-{
- JUCE_COMCALL SampleCB (double, ComTypes::IMediaSample*) = 0;
- JUCE_COMCALL BufferCB (double, BYTE*, long) = 0;
-};
-
-JUCE_COMCLASS (ISampleGrabber, "6B652FFF-11FE-4fce-92AD-0266B5D7C78F") : public IUnknown
-{
- JUCE_COMCALL SetOneShot (BOOL) = 0;
- JUCE_COMCALL SetMediaType (const ComTypes::AM_MEDIA_TYPE*) = 0;
- JUCE_COMCALL GetConnectedMediaType (ComTypes::AM_MEDIA_TYPE*) = 0;
- JUCE_COMCALL SetBufferSamples (BOOL) = 0;
- JUCE_COMCALL GetCurrentBuffer (long*, long*) = 0;
- JUCE_COMCALL GetCurrentSample (ComTypes::IMediaSample**) = 0;
- JUCE_COMCALL SetCallback (ISampleGrabberCB*, long) = 0;
-};
-
-JUCE_COMCLASS (IAMLatency, "62EA93BA-EC62-11d2-B770-00C04FB6BD3D") : public IUnknown
-{
-public:
- JUCE_COMCALL GetLatency (_Out_ REFERENCE_TIME * prtLatency) = 0;
-};
-
-JUCE_COMCLASS (IAMPushSource, "F185FE76-E64E-11d2-B76E-00C04FB6BD3D") : public IAMLatency
-{
-public:
- JUCE_COMCALL GetPushSourceFlags (_Out_ ULONG * pFlags) = 0;
- JUCE_COMCALL SetPushSourceFlags (ULONG Flags) = 0;
- JUCE_COMCALL SetStreamOffset (REFERENCE_TIME rtOffset) = 0;
- JUCE_COMCALL GetStreamOffset (_Out_ REFERENCE_TIME * prtOffset) = 0;
- JUCE_COMCALL GetMaxStreamOffset (_Out_ REFERENCE_TIME * prtMaxOffset) = 0;
- JUCE_COMCALL SetMaxStreamOffset (REFERENCE_TIME rtMaxOffset) = 0;
-};
-
-JUCE_COMCLASS (IConfigAsfWriter, "45086030-F7E4-486a-B504-826BB5792A3B") : public IUnknown
-{
-public:
- JUCE_COMCALL ConfigureFilterUsingProfileId (DWORD dwProfileId) = 0;
- JUCE_COMCALL GetCurrentProfileId (__RPC__out DWORD * pdwProfileId) = 0;
- JUCE_COMCALL ConfigureFilterUsingProfileGuid (__RPC__in REFGUID guidProfile) = 0;
- JUCE_COMCALL GetCurrentProfileGuid (__RPC__out GUID * pProfileGuid) = 0;
- JUCE_COMCALL ConfigureFilterUsingProfile (__RPC__in_opt IWMProfile * pProfile) = 0;
- JUCE_COMCALL GetCurrentProfile (__RPC__deref_out_opt IWMProfile * *ppProfile) = 0;
- JUCE_COMCALL SetIndexMode (BOOL bIndexFile) = 0;
- JUCE_COMCALL GetIndexMode (__RPC__out BOOL * pbIndexFile) = 0;
-};
-
-constexpr CLSID CLSID_CaptureGraphBuilder2 = { 0xBF87B6E1, 0x8C27, 0x11d0, { 0xB3, 0xF0, 0x00, 0xAA, 0x00, 0x37, 0x61, 0xC5 } };
-constexpr CLSID CLSID_EnhancedVideoRenderer = { 0xfa10746c, 0x9b63, 0x4b6c, { 0xbc, 0x49, 0xfc, 0x30, 0x0e, 0xa5, 0xf2, 0x56 } };
-constexpr CLSID CLSID_FilterGraph = { 0xe436ebb3, 0x524f, 0x11ce, { 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70 } };
-constexpr CLSID CLSID_NullRenderer = { 0xC1F400A4, 0x3F08, 0x11d3, { 0x9F, 0x0B, 0x00, 0x60, 0x08, 0x03, 0x9E, 0x37 } };
-constexpr CLSID CLSID_SampleGrabber = { 0xC1F400A0, 0x3F08, 0x11d3, { 0x9F, 0x0B, 0x00, 0x60, 0x08, 0x03, 0x9E, 0x37 } };
-constexpr CLSID CLSID_SmartTee = { 0xcc58e280, 0x8aa1, 0x11d1, { 0xb3, 0xf1, 0x00, 0xaa, 0x00, 0x37, 0x61, 0xc5 } };
-constexpr CLSID CLSID_SystemDeviceEnum = { 0x62BE5D10, 0x60EB, 0x11d0, { 0xBD, 0x3B, 0x00, 0xA0, 0xC9, 0x11, 0xCE, 0x86 } };
-constexpr CLSID CLSID_VideoInputDeviceCategory = { 0x860BB310, 0x5D01, 0x11d0, { 0xBD, 0x3B, 0x00, 0xA0, 0xC9, 0x11, 0xCE, 0x86 } };
-constexpr CLSID CLSID_VideoMixingRenderer = { 0xb87beb7b, 0x8d29, 0x423F, { 0xae, 0x4d, 0x65, 0x82, 0xc1, 0x01, 0x75, 0xac } };
-constexpr CLSID CLSID_WMAsfWriter = { 0x7c23220e, 0x55bb, 0x11d3, { 0x8b, 0x16, 0x00, 0xc0, 0x4f, 0xb6, 0xbd, 0x3d } };
-constexpr CLSID FORMAT_VideoInfo = { 0x05589f80, 0xc356, 0x11ce, { 0xbf, 0x01, 0x00, 0xaa, 0x00, 0x55, 0x59, 0x5a } };
-constexpr CLSID MEDIASUBTYPE_RGB24 = { 0xe436eb7d, 0x524f, 0x11ce, { 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70 } };
-constexpr CLSID MEDIATYPE_Video = { 0x73646976, 0x0000, 0x0010, { 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 } };
-constexpr CLSID MR_VIDEO_RENDER_SERVICE = { 0x1092a86c, 0xab1a, 0x459a, { 0xa3, 0x36, 0x83, 0x1f, 0xbc, 0x4d, 0x11, 0xff } };
-constexpr CLSID PIN_CATEGORY_CAPTURE = { 0xfb6c4281, 0x0353, 0x11d1, { 0x90, 0x5f, 0x00, 0x00, 0xc0, 0xcc, 0x16, 0xba } };
-
-} // namespace ComTypes
-} // namespace juce
-
-#ifdef __CRT_UUID_DECL
-__CRT_UUID_DECL (juce::ComTypes::IAMPushSource, 0xF185FE76, 0xE64E, 0x11d2, 0xB7, 0x6E, 0x00, 0xC0, 0x4F, 0xB6, 0xBD, 0x3D)
-__CRT_UUID_DECL (juce::ComTypes::IAMStreamConfig, 0xC6E13340, 0x30AC, 0x11d0, 0xA1, 0x8C, 0x00, 0xA0, 0xC9, 0x11, 0x89, 0x56)
-__CRT_UUID_DECL (juce::ComTypes::IBaseFilter, 0x56a86895, 0x0ad4, 0x11ce, 0xb0, 0x3a, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70)
-__CRT_UUID_DECL (juce::ComTypes::IBasicAudio, 0x56a868b3, 0x0ad4, 0x11ce, 0xb0, 0x3a, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70)
-__CRT_UUID_DECL (juce::ComTypes::ICaptureGraphBuilder2, 0x93E5A4E0, 0x2D50, 0x11d2, 0xAB, 0xFA, 0x00, 0xA0, 0xC9, 0xC6, 0xE3, 0x8D)
-__CRT_UUID_DECL (juce::ComTypes::IConfigAsfWriter, 0x45086030, 0xF7E4, 0x486a, 0xB5, 0x04, 0x82, 0x6B, 0xB5, 0x79, 0x2A, 0x3B)
-__CRT_UUID_DECL (juce::ComTypes::ICreateDevEnum, 0x29840822, 0x5B84, 0x11D0, 0xBD, 0x3B, 0x00, 0xA0, 0xC9, 0x11, 0xCE, 0x86)
-__CRT_UUID_DECL (juce::ComTypes::IFileSinkFilter, 0xa2104830, 0x7c70, 0x11cf, 0x8b, 0xce, 0x00, 0xaa, 0x00, 0xa3, 0xf1, 0xa6)
-__CRT_UUID_DECL (juce::ComTypes::IGraphBuilder, 0x56a868a9, 0x0ad4, 0x11ce, 0xb0, 0x3a, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70)
-__CRT_UUID_DECL (juce::ComTypes::IMFGetService, 0xfa993888, 0x4383, 0x415a, 0xa9, 0x30, 0xdd, 0x47, 0x2a, 0x8c, 0xf6, 0xf7)
-__CRT_UUID_DECL (juce::ComTypes::IMFVideoDisplayControl, 0xa490b1e4, 0xab84, 0x4d31, 0xa1, 0xb2, 0x18, 0x1e, 0x03, 0xb1, 0x07, 0x7a)
-__CRT_UUID_DECL (juce::ComTypes::IMediaControl, 0x56a868b1, 0x0ad4, 0x11ce, 0xb0, 0x3a, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70)
-__CRT_UUID_DECL (juce::ComTypes::IMediaEventEx, 0x56a868c0, 0x0ad4, 0x11ce, 0xb0, 0x3a, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70)
-__CRT_UUID_DECL (juce::ComTypes::IMediaPosition, 0x56a868b2, 0x0ad4, 0x11ce, 0xb0, 0x3a, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70)
-__CRT_UUID_DECL (juce::ComTypes::ISampleGrabber, 0x6B652FFF, 0x11FE, 0x4fce, 0x92, 0xAD, 0x02, 0x66, 0xB5, 0xD7, 0xC7, 0x8F)
-__CRT_UUID_DECL (juce::ComTypes::ISampleGrabberCB, 0x0579154A, 0x2B53, 0x4994, 0xB0, 0xD0, 0xE7, 0x73, 0x14, 0x8E, 0xFF, 0x85)
-__CRT_UUID_DECL (juce::ComTypes::IVMRFilterConfig, 0x9e5530c5, 0x7034, 0x48b4, 0xbb, 0x46, 0x0b, 0x8a, 0x6e, 0xfc, 0x8e, 0x36)
-__CRT_UUID_DECL (juce::ComTypes::IVMRWindowlessControl, 0x0eb1088c, 0x4dcd, 0x46f0, 0x87, 0x8f, 0x39, 0xda, 0xe8, 0x6a, 0x51, 0xb7)
-#endif
diff --git a/modules/juce_video/native/juce_Video_windows.h b/modules/juce_video/native/juce_Video_windows.h
index 0cdc3f4a33..0aebba910d 100644
--- a/modules/juce_video/native/juce_Video_windows.h
+++ b/modules/juce_video/native/juce_Video_windows.h
@@ -39,7 +39,7 @@ namespace VideoRenderers
{
virtual ~Base() = default;
- virtual HRESULT create (ComSmartPtr&, ComSmartPtr&, HWND) = 0;
+ virtual HRESULT create (ComSmartPtr&, ComSmartPtr&, HWND) = 0;
virtual void setVideoWindow (HWND) = 0;
virtual void setVideoPosition (HWND) = 0;
virtual void repaintVideo (HWND, HDC) = 0;
@@ -52,19 +52,19 @@ namespace VideoRenderers
{
VMR7() {}
- HRESULT create (ComSmartPtr& graphBuilder,
- ComSmartPtr& baseFilter, HWND hwnd) override
+ HRESULT create (ComSmartPtr& graphBuilder,
+ ComSmartPtr& baseFilter, HWND hwnd) override
{
- ComSmartPtr filterConfig;
+ ComSmartPtr filterConfig;
- HRESULT hr = baseFilter.CoCreateInstance (ComTypes::CLSID_VideoMixingRenderer);
+ HRESULT hr = baseFilter.CoCreateInstance (CLSID_VideoMixingRenderer);
if (SUCCEEDED (hr)) hr = graphBuilder->AddFilter (baseFilter, L"VMR-7");
if (SUCCEEDED (hr)) hr = baseFilter.QueryInterface (filterConfig);
- if (SUCCEEDED (hr)) hr = filterConfig->SetRenderingMode (ComTypes::VMRMode_Windowless);
+ if (SUCCEEDED (hr)) hr = filterConfig->SetRenderingMode (VMRMode_Windowless);
if (SUCCEEDED (hr)) hr = baseFilter.QueryInterface (windowlessControl);
if (SUCCEEDED (hr)) hr = windowlessControl->SetVideoClippingWindow (hwnd);
- if (SUCCEEDED (hr)) hr = windowlessControl->SetAspectRatioMode (ComTypes::VMR_ARMODE_LETTER_BOX);
+ if (SUCCEEDED (hr)) hr = windowlessControl->SetAspectRatioMode (VMR_ARMODE_LETTER_BOX);
return hr;
}
@@ -101,7 +101,7 @@ namespace VideoRenderers
return windowlessControl->GetNativeVideoSize (&videoWidth, &videoHeight, nullptr, nullptr);
}
- ComSmartPtr windowlessControl;
+ ComSmartPtr windowlessControl;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (VMR7)
};
@@ -112,21 +112,21 @@ namespace VideoRenderers
{
EVR() = default;
- HRESULT create (ComSmartPtr& graphBuilder,
- ComSmartPtr& baseFilter, HWND hwnd) override
+ HRESULT create (ComSmartPtr& graphBuilder,
+ ComSmartPtr& baseFilter, HWND hwnd) override
{
- ComSmartPtr getService;
+ ComSmartPtr getService;
- HRESULT hr = baseFilter.CoCreateInstance (ComTypes::CLSID_EnhancedVideoRenderer);
+ HRESULT hr = baseFilter.CoCreateInstance (CLSID_EnhancedVideoRenderer);
if (SUCCEEDED (hr)) hr = graphBuilder->AddFilter (baseFilter, L"EVR");
if (SUCCEEDED (hr)) hr = baseFilter.QueryInterface (getService);
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wlanguage-extension-token")
- if (SUCCEEDED (hr)) hr = getService->GetService (ComTypes::MR_VIDEO_RENDER_SERVICE, __uuidof (ComTypes::IMFVideoDisplayControl),
+ if (SUCCEEDED (hr)) hr = getService->GetService (MR_VIDEO_RENDER_SERVICE, __uuidof (IMFVideoDisplayControl),
(void**) videoDisplayControl.resetAndGetPointerAddress());
JUCE_END_IGNORE_WARNINGS_GCC_LIKE
if (SUCCEEDED (hr)) hr = videoDisplayControl->SetVideoWindow (hwnd);
- if (SUCCEEDED (hr)) hr = videoDisplayControl->SetAspectRatioMode (ComTypes::MFVideoARMode_PreservePicture);
+ if (SUCCEEDED (hr)) hr = videoDisplayControl->SetAspectRatioMode (MFVideoARMode_PreservePicture);
return hr;
}
@@ -138,7 +138,7 @@ namespace VideoRenderers
void setVideoPosition (HWND hwnd) override
{
- const ComTypes::MFVideoNormalizedRect src { 0.0f, 0.0f, 1.0f, 1.0f };
+ const MFVideoNormalizedRect src { 0.0f, 0.0f, 1.0f, 1.0f };
RECT dest;
GetClientRect (hwnd, &dest);
@@ -162,7 +162,7 @@ namespace VideoRenderers
return hr;
}
- ComSmartPtr videoDisplayControl;
+ ComSmartPtr videoDisplayControl;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (EVR)
};
@@ -452,8 +452,8 @@ private:
createNativeWindow();
- mediaEvent->CancelDefaultHandling (ComTypes::EC_STATE_CHANGE);
- mediaEvent->SetNotifyWindow ((ComTypes::OAHWND) hwnd, graphEventID, 0);
+ mediaEvent->CancelDefaultHandling (EC_STATE_CHANGE);
+ mediaEvent->SetNotifyWindow ((OAHWND) hwnd, graphEventID, 0);
if (videoRenderer != nullptr)
videoRenderer->setVideoWindow (hwnd);
@@ -503,7 +503,7 @@ private:
if (! createNativeWindow())
return Result::fail ("Can't create window");
- HRESULT hr = graphBuilder.CoCreateInstance (ComTypes::CLSID_FilterGraph);
+ HRESULT hr = graphBuilder.CoCreateInstance (CLSID_FilterGraph);
// basic playback interfaces
if (SUCCEEDED (hr)) hr = graphBuilder.QueryInterface (mediaControl);
@@ -565,8 +565,8 @@ private:
// set window to receive events
if (SUCCEEDED (hr))
{
- mediaEvent->CancelDefaultHandling (ComTypes::EC_STATE_CHANGE);
- hr = mediaEvent->SetNotifyWindow ((ComTypes::OAHWND) hwnd, graphEventID, 0);
+ mediaEvent->CancelDefaultHandling (EC_STATE_CHANGE);
+ hr = mediaEvent->SetNotifyWindow ((OAHWND) hwnd, graphEventID, 0);
}
if (SUCCEEDED (hr))
@@ -587,12 +587,12 @@ private:
{
switch (hr)
{
- case ComTypes::VFW_E_INVALID_FILE_FORMAT: return Result::fail ("Invalid file format");
- case ComTypes::VFW_E_NOT_FOUND: return Result::fail ("File not found");
- case ComTypes::VFW_E_UNKNOWN_FILE_TYPE: return Result::fail ("Unknown file type");
- case ComTypes::VFW_E_UNSUPPORTED_STREAM: return Result::fail ("Unsupported stream");
- case ComTypes::VFW_E_CANNOT_CONNECT: return Result::fail ("Cannot connect");
- case ComTypes::VFW_E_CANNOT_LOAD_SOURCE_FILTER: return Result::fail ("Cannot load source filter");
+ case VFW_E_INVALID_FILE_FORMAT: return Result::fail ("Invalid file format");
+ case VFW_E_NOT_FOUND: return Result::fail ("File not found");
+ case VFW_E_UNKNOWN_FILE_TYPE: return Result::fail ("Unknown file type");
+ case VFW_E_UNSUPPORTED_STREAM: return Result::fail ("Unsupported stream");
+ case VFW_E_CANNOT_CONNECT: return Result::fail ("Cannot connect");
+ case VFW_E_CANNOT_LOAD_SOURCE_FILTER: return Result::fail ("Cannot load source filter");
}
TCHAR messageBuffer[512] = { 0 };
@@ -643,28 +643,28 @@ private:
switch (ec)
{
- case ComTypes::EC_REPAINT:
+ case EC_REPAINT:
component.repaint();
break;
- case ComTypes::EC_COMPLETE:
+ case EC_COMPLETE:
component.stop();
component.setPosition (0.0);
break;
- case ComTypes::EC_ERRORABORT:
- case ComTypes::EC_ERRORABORTEX:
+ case EC_ERRORABORT:
+ case EC_ERRORABORTEX:
component.errorOccurred (getErrorMessageFromResult ((HRESULT) p1).getErrorMessage());
// intentional fallthrough
- case ComTypes::EC_USERABORT:
+ case EC_USERABORT:
component.close();
break;
- case ComTypes::EC_STATE_CHANGE:
+ case EC_STATE_CHANGE:
switch (p1)
{
- case ComTypes::State_Paused: component.playbackStopped(); break;
- case ComTypes::State_Running: component.playbackStarted(); break;
+ case State_Paused: component.playbackStopped(); break;
+ case State_Running: component.playbackStarted(); break;
default: break;
}
@@ -707,7 +707,7 @@ private:
//==============================================================================
double getDuration() const
{
- ComTypes::REFTIME duration;
+ REFTIME duration;
mediaPosition->get_Duration (&duration);
return duration;
}
@@ -721,7 +721,7 @@ private:
double getPosition() const
{
- ComTypes::REFTIME seconds;
+ REFTIME seconds;
mediaPosition->get_CurrentPosition (&seconds);
return seconds;
}
@@ -757,12 +757,12 @@ private:
HWND hwnd = {};
HDC hdc = {};
- ComSmartPtr graphBuilder;
- ComSmartPtr mediaControl;
- ComSmartPtr mediaPosition;
- ComSmartPtr mediaEvent;
- ComSmartPtr basicAudio;
- ComSmartPtr baseFilter;
+ ComSmartPtr graphBuilder;
+ ComSmartPtr mediaControl;
+ ComSmartPtr mediaPosition;
+ ComSmartPtr mediaEvent;
+ ComSmartPtr basicAudio;
+ ComSmartPtr baseFilter;
std::unique_ptr videoRenderer;
@@ -810,31 +810,31 @@ private:
bool isRendererConnected()
{
- ComSmartPtr enumPins;
+ ComSmartPtr enumPins;
HRESULT hr = baseFilter->EnumPins (enumPins.resetAndGetPointerAddress());
if (SUCCEEDED (hr))
hr = enumPins->Reset();
- ComSmartPtr pin;
+ ComSmartPtr pin;
while (SUCCEEDED (hr)
&& enumPins->Next (1, pin.resetAndGetPointerAddress(), nullptr) == S_OK)
{
- ComSmartPtr otherPin;
+ ComSmartPtr otherPin;
hr = pin->ConnectedTo (otherPin.resetAndGetPointerAddress());
if (SUCCEEDED (hr))
{
- ComTypes::PIN_DIRECTION direction;
+ PIN_DIRECTION direction;
hr = pin->QueryDirection (&direction);
- if (SUCCEEDED (hr) && direction == ComTypes::PINDIR_INPUT)
+ if (SUCCEEDED (hr) && direction == PINDIR_INPUT)
return true;
}
- else if (hr == ComTypes::VFW_E_NOT_CONNECTED)
+ else if (hr == VFW_E_NOT_CONNECTED)
{
hr = S_OK;
}