|
|
|
@@ -25,10 +25,10 @@ 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
|
|
|
|
@@ -72,7 +72,7 @@ namespace WindowsMessageHelpers |
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
void handleBroadcastMessage (const COPYDATASTRUCT* const data)
|
|
|
|
void handleBroadcastMessage (const COPYDATASTRUCT* data)
|
|
|
|
{
|
|
|
|
if (data != nullptr && data->dwData == broadcastMessageMagicNumber)
|
|
|
|
{
|
|
|
|
@@ -91,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)
|
|
|
|
{
|
|
|
|
@@ -108,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);
|
|
|
|
@@ -124,7 +123,7 @@ LRESULT juce_offerEventToActiveXControl (::MSG&); |
|
|
|
#endif
|
|
|
|
|
|
|
|
//==============================================================================
|
|
|
|
bool MessageManager::dispatchNextMessageOnSystemQueue (const bool returnIfNoPendingMessages)
|
|
|
|
bool MessageManager::dispatchNextMessageOnSystemQueue (bool returnIfNoPendingMessages)
|
|
|
|
{
|
|
|
|
using namespace WindowsMessageHelpers;
|
|
|
|
MSG m;
|
|
|
|
@@ -134,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)
|
|
|
|
{
|
|
|
|
|