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:
Alex Birch
2019-06-22 20:41:38 +01:00
parent d22c2cd4fa
commit 9ee566b251
1140 changed files with 67534 additions and 105952 deletions

View File

@ -108,7 +108,7 @@ namespace ActiveXHelpers
JUCE_COMRESULT GetWindowContext (LPOLEINPLACEFRAME* lplpFrame, LPOLEINPLACEUIWINDOW* lplpDoc, LPRECT, LPRECT, LPOLEINPLACEFRAMEINFO lpFrameInfo)
{
/* Note: if you call AddRef on the frame here, then some types of object (e.g. web browser control) cause leaks..
/* Note: If you call AddRef on the frame here, then some types of object (e.g. web browser control) cause leaks..
If you don't call AddRef then others crash (e.g. QuickTime).. Bit of a catch-22, so letting it leak is probably preferable.
*/
if (lplpFrame != nullptr) { frame->AddRef(); *lplpFrame = frame; }
@ -231,6 +231,9 @@ namespace ActiveXHelpers
//==============================================================================
class ActiveXControlComponent::Pimpl : public ComponentMovementWatcher
#if JUCE_WIN_PER_MONITOR_DPI_AWARE
, public ComponentPeer::ScaleFactorListener
#endif
{
public:
Pimpl (HWND hwnd, ActiveXControlComponent& activeXComp)
@ -251,12 +254,26 @@ public:
clientSite->Release();
storage->Release();
#if JUCE_WIN_PER_MONITOR_DPI_AWARE
for (int i = 0; i < ComponentPeer::getNumPeers(); ++i)
if (auto* peer = ComponentPeer::getPeer (i))
peer->removeScaleFactorListener (this);
#endif
}
void setControlBounds (Rectangle<int> newBounds) const
{
if (controlHWND != 0)
{
#if JUCE_WIN_PER_MONITOR_DPI_AWARE
if (auto* peer = owner.getTopLevelComponent()->getPeer())
newBounds = (newBounds.toDouble() * peer->getPlatformScaleFactor()).toNearestInt();
#endif
MoveWindow (controlHWND, newBounds.getX(), newBounds.getY(), newBounds.getWidth(), newBounds.getHeight(), TRUE);
}
}
void setControlVisible (bool shouldBeVisible) const
@ -269,12 +286,17 @@ public:
void componentMovedOrResized (bool /*wasMoved*/, bool /*wasResized*/) override
{
if (auto* peer = owner.getTopLevelComponent()->getPeer())
setControlBounds (peer->getAreaCoveredBy(owner));
setControlBounds (peer->getAreaCoveredBy (owner));
}
void componentPeerChanged() override
{
componentMovedOrResized (true, true);
#if JUCE_WIN_PER_MONITOR_DPI_AWARE
if (auto* peer = owner.getTopLevelComponent()->getPeer())
peer->addScaleFactorListener (this);
#endif
}
void componentVisibilityChanged() override
@ -283,6 +305,13 @@ public:
componentPeerChanged();
}
#if JUCE_WIN_PER_MONITOR_DPI_AWARE
void nativeScaleFactorChanged (double /*newScaleFactor*/) override
{
componentMovedOrResized (true, true);
}
#endif
// intercepts events going to an activeX control, so we can sneakily use the mouse events
static LRESULT CALLBACK activeXHookWndProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{