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:
@ -65,9 +65,42 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
template <typename ...Params>
|
||||
// g++ 4.8 cannot deduce the parameter pack inside the function pointer when it has more than one element
|
||||
#if defined(__GNUC__) && __GNUC__ < 5 && ! defined(__clang__)
|
||||
template <typename... Params>
|
||||
static void sendMouseEvent (Component& comp, Component::BailOutChecker& checker,
|
||||
void (MouseListener::*eventMethod) (Params...), Params... params)
|
||||
void (MouseListener::*eventMethod) (const MouseEvent&),
|
||||
Params... params)
|
||||
{
|
||||
sendMouseEvent <decltype (eventMethod), Params...> (comp, checker, eventMethod, params...);
|
||||
}
|
||||
|
||||
template <typename... Params>
|
||||
static void sendMouseEvent (Component& comp, Component::BailOutChecker& checker,
|
||||
void (MouseListener::*eventMethod) (const MouseEvent&, const MouseWheelDetails&),
|
||||
Params... params)
|
||||
{
|
||||
sendMouseEvent <decltype (eventMethod), Params...> (comp, checker, eventMethod, params...);
|
||||
}
|
||||
|
||||
template <typename... Params>
|
||||
static void sendMouseEvent (Component& comp, Component::BailOutChecker& checker,
|
||||
void (MouseListener::*eventMethod) (const MouseEvent&, float),
|
||||
Params... params)
|
||||
{
|
||||
sendMouseEvent <decltype (eventMethod), Params...> (comp, checker, eventMethod, params...);
|
||||
}
|
||||
|
||||
template <typename EventMethod, typename... Params>
|
||||
static void sendMouseEvent (Component& comp, Component::BailOutChecker& checker,
|
||||
EventMethod eventMethod,
|
||||
Params... params)
|
||||
#else
|
||||
template <typename... Params>
|
||||
static void sendMouseEvent (Component& comp, Component::BailOutChecker& checker,
|
||||
void (MouseListener::*eventMethod) (Params...),
|
||||
Params... params)
|
||||
#endif
|
||||
{
|
||||
if (checker.shouldBailOut())
|
||||
return;
|
||||
@ -456,7 +489,7 @@ void Component::setName (const String& name)
|
||||
{
|
||||
// if component methods are being called from threads other than the message
|
||||
// thread, you'll need to use a MessageManagerLock object to make sure it's thread-safe.
|
||||
ASSERT_MESSAGE_MANAGER_IS_LOCKED_OR_OFFSCREEN
|
||||
JUCE_ASSERT_MESSAGE_MANAGER_IS_LOCKED_OR_OFFSCREEN
|
||||
|
||||
if (componentName != name)
|
||||
{
|
||||
@ -482,7 +515,7 @@ void Component::setVisible (bool shouldBeVisible)
|
||||
{
|
||||
// if component methods are being called from threads other than the message
|
||||
// thread, you'll need to use a MessageManagerLock object to make sure it's thread-safe.
|
||||
ASSERT_MESSAGE_MANAGER_IS_LOCKED_OR_OFFSCREEN
|
||||
JUCE_ASSERT_MESSAGE_MANAGER_IS_LOCKED_OR_OFFSCREEN
|
||||
|
||||
const WeakReference<Component> safePointer (this);
|
||||
flags.visibleFlag = shouldBeVisible;
|
||||
@ -562,7 +595,7 @@ void Component::addToDesktop (int styleWanted, void* nativeWindowToAttachTo)
|
||||
{
|
||||
// if component methods are being called from threads other than the message
|
||||
// thread, you'll need to use a MessageManagerLock object to make sure it's thread-safe.
|
||||
ASSERT_MESSAGE_MANAGER_IS_LOCKED
|
||||
JUCE_ASSERT_MESSAGE_MANAGER_IS_LOCKED
|
||||
|
||||
if (isOpaque())
|
||||
styleWanted &= ~ComponentPeer::windowIsSemiTransparent;
|
||||
@ -663,10 +696,12 @@ void Component::removeFromDesktop()
|
||||
{
|
||||
// if component methods are being called from threads other than the message
|
||||
// thread, you'll need to use a MessageManagerLock object to make sure it's thread-safe.
|
||||
ASSERT_MESSAGE_MANAGER_IS_LOCKED_OR_OFFSCREEN
|
||||
JUCE_ASSERT_MESSAGE_MANAGER_IS_LOCKED_OR_OFFSCREEN
|
||||
|
||||
if (flags.hasHeavyweightPeerFlag)
|
||||
{
|
||||
ComponentHelpers::releaseAllCachedImageResources (*this);
|
||||
|
||||
auto* peer = ComponentPeer::getPeerFor (this);
|
||||
jassert (peer != nullptr);
|
||||
|
||||
@ -839,7 +874,7 @@ void Component::toFront (bool setAsForeground)
|
||||
{
|
||||
// if component methods are being called from threads other than the message
|
||||
// thread, you'll need to use a MessageManagerLock object to make sure it's thread-safe.
|
||||
ASSERT_MESSAGE_MANAGER_IS_LOCKED_OR_OFFSCREEN
|
||||
JUCE_ASSERT_MESSAGE_MANAGER_IS_LOCKED_OR_OFFSCREEN
|
||||
|
||||
if (flags.hasHeavyweightPeerFlag)
|
||||
{
|
||||
@ -1009,7 +1044,7 @@ int Component::getParentHeight() const noexcept
|
||||
|
||||
Rectangle<int> Component::getParentMonitorArea() const
|
||||
{
|
||||
return Desktop::getInstance().getDisplays().getDisplayContaining (getScreenBounds().getCentre()).userArea;
|
||||
return Desktop::getInstance().getDisplays().findDisplayForRect (getScreenBounds()).userArea;
|
||||
}
|
||||
|
||||
int Component::getScreenX() const { return getScreenPosition().x; }
|
||||
@ -1030,7 +1065,7 @@ void Component::setBounds (int x, int y, int w, int h)
|
||||
{
|
||||
// if component methods are being called from threads other than the message
|
||||
// thread, you'll need to use a MessageManagerLock object to make sure it's thread-safe.
|
||||
ASSERT_MESSAGE_MANAGER_IS_LOCKED_OR_OFFSCREEN
|
||||
JUCE_ASSERT_MESSAGE_MANAGER_IS_LOCKED_OR_OFFSCREEN
|
||||
|
||||
if (w < 0) w = 0;
|
||||
if (h < 0) h = 0;
|
||||
@ -1344,7 +1379,9 @@ void Component::addChildComponent (Component& child, int zOrder)
|
||||
{
|
||||
// if component methods are being called from threads other than the message
|
||||
// thread, you'll need to use a MessageManagerLock object to make sure it's thread-safe.
|
||||
ASSERT_MESSAGE_MANAGER_IS_LOCKED_OR_OFFSCREEN
|
||||
JUCE_ASSERT_MESSAGE_MANAGER_IS_LOCKED_OR_OFFSCREEN
|
||||
|
||||
jassert (this != &child); // adding a component to itself!?
|
||||
|
||||
if (child.parentComponent != this)
|
||||
{
|
||||
@ -1420,7 +1457,7 @@ Component* Component::removeChildComponent (int index, bool sendParentEvents, bo
|
||||
{
|
||||
// if component methods are being called from threads other than the message
|
||||
// thread, you'll need to use a MessageManagerLock object to make sure it's thread-safe.
|
||||
ASSERT_MESSAGE_MANAGER_IS_LOCKED_OR_OFFSCREEN
|
||||
JUCE_ASSERT_MESSAGE_MANAGER_IS_LOCKED_OR_OFFSCREEN
|
||||
|
||||
auto* child = childComponentList [index];
|
||||
|
||||
@ -1607,7 +1644,7 @@ void Component::enterModalState (bool shouldTakeKeyboardFocus,
|
||||
{
|
||||
// if component methods are being called from threads other than the message
|
||||
// thread, you'll need to use a MessageManagerLock object to make sure it's thread-safe.
|
||||
ASSERT_MESSAGE_MANAGER_IS_LOCKED
|
||||
JUCE_ASSERT_MESSAGE_MANAGER_IS_LOCKED
|
||||
|
||||
if (! isCurrentlyModal (false))
|
||||
{
|
||||
@ -1784,7 +1821,7 @@ void Component::internalRepaintUnchecked (Rectangle<int> area, bool isEntireComp
|
||||
{
|
||||
// if component methods are being called from threads other than the message
|
||||
// thread, you'll need to use a MessageManagerLock object to make sure it's thread-safe.
|
||||
ASSERT_MESSAGE_MANAGER_IS_LOCKED
|
||||
JUCE_ASSERT_MESSAGE_MANAGER_IS_LOCKED
|
||||
|
||||
if (flags.visibleFlag)
|
||||
{
|
||||
@ -2013,8 +2050,8 @@ void Component::setComponentEffect (ImageEffectFilter* newEffect)
|
||||
LookAndFeel& Component::getLookAndFeel() const noexcept
|
||||
{
|
||||
for (auto* c = this; c != nullptr; c = c->parentComponent)
|
||||
if (c->lookAndFeel != nullptr)
|
||||
return *(c->lookAndFeel);
|
||||
if (auto lf = c->lookAndFeel.get())
|
||||
return *lf;
|
||||
|
||||
return LookAndFeel::getDefaultLookAndFeel();
|
||||
}
|
||||
@ -2164,10 +2201,12 @@ void Component::addComponentListener (ComponentListener* newListener)
|
||||
{
|
||||
// if component methods are being called from threads other than the message
|
||||
// thread, you'll need to use a MessageManagerLock object to make sure it's thread-safe.
|
||||
#if JUCE_DEBUG || JUCE_LOG_ASSERTIONS
|
||||
#if JUCE_DEBUG || JUCE_LOG_ASSERTIONS
|
||||
if (getParentComponent() != nullptr)
|
||||
ASSERT_MESSAGE_MANAGER_IS_LOCKED;
|
||||
#endif
|
||||
{
|
||||
JUCE_ASSERT_MESSAGE_MANAGER_IS_LOCKED
|
||||
}
|
||||
#endif
|
||||
|
||||
componentListeners.add (newListener);
|
||||
}
|
||||
@ -2218,7 +2257,7 @@ void Component::addMouseListener (MouseListener* newListener,
|
||||
{
|
||||
// if component methods are being called from threads other than the message
|
||||
// thread, you'll need to use a MessageManagerLock object to make sure it's thread-safe.
|
||||
ASSERT_MESSAGE_MANAGER_IS_LOCKED
|
||||
JUCE_ASSERT_MESSAGE_MANAGER_IS_LOCKED
|
||||
|
||||
// If you register a component as a mouselistener for itself, it'll receive all the events
|
||||
// twice - once via the direct callback that all components get anyway, and then again as a listener!
|
||||
@ -2234,7 +2273,7 @@ void Component::removeMouseListener (MouseListener* listenerToRemove)
|
||||
{
|
||||
// if component methods are being called from threads other than the message
|
||||
// thread, you'll need to use a MessageManagerLock object to make sure it's thread-safe.
|
||||
ASSERT_MESSAGE_MANAGER_IS_LOCKED
|
||||
JUCE_ASSERT_MESSAGE_MANAGER_IS_LOCKED
|
||||
|
||||
if (mouseListeners != nullptr)
|
||||
mouseListeners->removeListener (listenerToRemove);
|
||||
@ -2734,7 +2773,7 @@ void Component::grabKeyboardFocus()
|
||||
{
|
||||
// if component methods are being called from threads other than the message
|
||||
// thread, you'll need to use a MessageManagerLock object to make sure it's thread-safe.
|
||||
ASSERT_MESSAGE_MANAGER_IS_LOCKED
|
||||
JUCE_ASSERT_MESSAGE_MANAGER_IS_LOCKED
|
||||
|
||||
grabFocusInternal (focusChangedDirectly, true);
|
||||
|
||||
@ -2749,7 +2788,7 @@ void Component::moveKeyboardFocusToSibling (bool moveToNext)
|
||||
{
|
||||
// if component methods are being called from threads other than the message
|
||||
// thread, you'll need to use a MessageManagerLock object to make sure it's thread-safe.
|
||||
ASSERT_MESSAGE_MANAGER_IS_LOCKED
|
||||
JUCE_ASSERT_MESSAGE_MANAGER_IS_LOCKED
|
||||
|
||||
if (parentComponent != nullptr)
|
||||
{
|
||||
|
Reference in New Issue
Block a user