upgrade to JUCE 5.4.3. Remove (probably) unused JUCE modules. Remove VST2 target (it's been end-of-life'd by Steinberg and by JUCE)
This commit is contained in:
@ -25,12 +25,16 @@ namespace juce
|
||||
|
||||
extern HWND juce_messageWindowHandle;
|
||||
|
||||
typedef bool (*CheckEventBlockedByModalComps) (const MSG&);
|
||||
using CheckEventBlockedByModalComps = bool (*)(const MSG&);
|
||||
CheckEventBlockedByModalComps isEventBlockedByModalComps = nullptr;
|
||||
|
||||
typedef void (*SettingChangeCallbackFunc) (void);
|
||||
using SettingChangeCallbackFunc = void (*)(void);
|
||||
SettingChangeCallbackFunc settingChangeCallback = nullptr;
|
||||
|
||||
#if JUCE_MODULE_AVAILABLE_juce_audio_plugin_client && JucePlugin_Build_Unity
|
||||
bool juce_isRunningInUnity();
|
||||
#endif
|
||||
|
||||
//==============================================================================
|
||||
namespace WindowsMessageHelpers
|
||||
{
|
||||
@ -42,7 +46,7 @@ namespace WindowsMessageHelpers
|
||||
|
||||
void dispatchMessageFromLParam (LPARAM lParam)
|
||||
{
|
||||
if (MessageManager::MessageBase* message = reinterpret_cast<MessageManager::MessageBase*> (lParam))
|
||||
if (auto message = reinterpret_cast<MessageManager::MessageBase*> (lParam))
|
||||
{
|
||||
JUCE_TRY
|
||||
{
|
||||
@ -68,7 +72,7 @@ namespace WindowsMessageHelpers
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void handleBroadcastMessage (const COPYDATASTRUCT* const data)
|
||||
void handleBroadcastMessage (const COPYDATASTRUCT* data)
|
||||
{
|
||||
if (data != nullptr && data->dwData == broadcastMessageMagicNumber)
|
||||
{
|
||||
@ -87,7 +91,7 @@ namespace WindowsMessageHelpers
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
LRESULT CALLBACK messageWndProc (HWND h, const UINT message, const WPARAM wParam, const LPARAM lParam) noexcept
|
||||
LRESULT CALLBACK messageWndProc (HWND h, UINT message, WPARAM wParam, LPARAM lParam) noexcept
|
||||
{
|
||||
if (h == juce_messageWindowHandle)
|
||||
{
|
||||
@ -104,11 +108,10 @@ namespace WindowsMessageHelpers
|
||||
handleBroadcastMessage (reinterpret_cast<const COPYDATASTRUCT*> (lParam));
|
||||
return 0;
|
||||
}
|
||||
else if (message == WM_SETTINGCHANGE)
|
||||
{
|
||||
|
||||
if (message == WM_SETTINGCHANGE)
|
||||
if (settingChangeCallback != nullptr)
|
||||
settingChangeCallback();
|
||||
}
|
||||
}
|
||||
|
||||
return DefWindowProc (h, message, wParam, lParam);
|
||||
@ -120,7 +123,7 @@ LRESULT juce_offerEventToActiveXControl (::MSG&);
|
||||
#endif
|
||||
|
||||
//==============================================================================
|
||||
bool MessageManager::dispatchNextMessageOnSystemQueue (const bool returnIfNoPendingMessages)
|
||||
bool MessageManager::dispatchNextMessageOnSystemQueue (bool returnIfNoPendingMessages)
|
||||
{
|
||||
using namespace WindowsMessageHelpers;
|
||||
MSG m;
|
||||
@ -130,10 +133,10 @@ bool MessageManager::dispatchNextMessageOnSystemQueue (const bool returnIfNoPend
|
||||
|
||||
if (GetMessage (&m, (HWND) 0, 0, 0) >= 0)
|
||||
{
|
||||
#if JUCE_MODULE_AVAILABLE_juce_gui_extra
|
||||
#if JUCE_MODULE_AVAILABLE_juce_gui_extra
|
||||
if (juce_offerEventToActiveXControl (m) != S_FALSE)
|
||||
return true;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if (m.message == customMessageID && m.hwnd == juce_messageWindowHandle)
|
||||
{
|
||||
@ -151,7 +154,7 @@ bool MessageManager::dispatchNextMessageOnSystemQueue (const bool returnIfNoPend
|
||||
{
|
||||
// if it's someone else's window being clicked on, and the focus is
|
||||
// currently on a juce window, pass the kb focus over..
|
||||
HWND currentFocus = GetFocus();
|
||||
auto currentFocus = GetFocus();
|
||||
|
||||
if (currentFocus == 0 || JuceWindowIdentifier::isJUCEWindow (currentFocus))
|
||||
SetFocus (m.hwnd);
|
||||
@ -168,12 +171,18 @@ bool MessageManager::dispatchNextMessageOnSystemQueue (const bool returnIfNoPend
|
||||
bool MessageManager::postMessageToSystemQueue (MessageManager::MessageBase* const message)
|
||||
{
|
||||
message->incReferenceCount();
|
||||
|
||||
#if JUCE_MODULE_AVAILABLE_juce_audio_plugin_client && JucePlugin_Build_Unity
|
||||
if (juce_isRunningInUnity())
|
||||
return SendNotifyMessage (juce_messageWindowHandle, WindowsMessageHelpers::customMessageID, 0, (LPARAM) message) != 0;
|
||||
#endif
|
||||
|
||||
return PostMessage (juce_messageWindowHandle, WindowsMessageHelpers::customMessageID, 0, (LPARAM) message) != 0;
|
||||
}
|
||||
|
||||
void MessageManager::broadcastMessage (const String& value)
|
||||
{
|
||||
const String localCopy (value);
|
||||
auto localCopy = value;
|
||||
|
||||
Array<HWND> windows;
|
||||
EnumWindows (&WindowsMessageHelpers::broadcastEnumWindowProc, (LPARAM) &windows);
|
||||
|
Reference in New Issue
Block a user