mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Platform: Remove compatibility checks for macOS 10.11
This commit is contained in:
parent
8ac7bfc9ca
commit
e71ebb3407
6 changed files with 30 additions and 79 deletions
|
|
@ -499,10 +499,7 @@ namespace AudioUnitFormatHelpers
|
|||
|
||||
static bool isPluginAUv3 (const AudioComponentDescription& desc)
|
||||
{
|
||||
if (@available (macOS 10.11, *))
|
||||
return (desc.componentFlags & kAudioComponentFlag_IsV3AudioUnit) != 0;
|
||||
|
||||
return false;
|
||||
return (desc.componentFlags & kAudioComponentFlag_IsV3AudioUnit) != 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -580,17 +577,14 @@ static void createAudioUnit (VersionedAudioComponent versionedComponent, AudioUn
|
|||
{
|
||||
if (versionedComponent.isAUv3)
|
||||
{
|
||||
if (@available (macOS 10.11, *))
|
||||
{
|
||||
AudioComponentInstantiate (versionedComponent.audioComponent,
|
||||
kAudioComponentInstantiation_LoadOutOfProcess,
|
||||
^(AudioComponentInstance audioUnit, OSStatus err)
|
||||
{
|
||||
callback (audioUnit, err);
|
||||
});
|
||||
AudioComponentInstantiate (versionedComponent.audioComponent,
|
||||
kAudioComponentInstantiation_LoadOutOfProcess,
|
||||
^(AudioComponentInstance audioUnit, OSStatus err)
|
||||
{
|
||||
callback (audioUnit, err);
|
||||
});
|
||||
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
AudioComponentInstance audioUnit;
|
||||
|
|
@ -2771,8 +2765,7 @@ private:
|
|||
{
|
||||
auto size = CGSizeZero;
|
||||
|
||||
if (@available (macOS 10.11, *))
|
||||
size = [controller preferredContentSize];
|
||||
size = [controller preferredContentSize];
|
||||
|
||||
if (approximatelyEqual (size.width, 0.0) || approximatelyEqual (size.height, 0.0))
|
||||
size = controller.view.frame.size;
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ namespace juce
|
|||
{
|
||||
|
||||
//==============================================================================
|
||||
class API_AVAILABLE (macos (10.11)) BluetoothMidiPairingWindowClass final : public ObjCClass<NSObject>
|
||||
class BluetoothMidiPairingWindowClass final : public ObjCClass<NSObject>
|
||||
{
|
||||
public:
|
||||
struct Callbacks
|
||||
|
|
@ -126,7 +126,7 @@ private:
|
|||
}
|
||||
};
|
||||
|
||||
class API_AVAILABLE (macos (10.11)) BluetoothMidiSelectorWindowHelper final : public DeletedAtShutdown
|
||||
class BluetoothMidiSelectorWindowHelper final : public DeletedAtShutdown
|
||||
{
|
||||
public:
|
||||
BluetoothMidiSelectorWindowHelper (ModalComponentManager::Callback* exitCallback,
|
||||
|
|
@ -166,26 +166,13 @@ private:
|
|||
bool BluetoothMidiDevicePairingDialogue::open (ModalComponentManager::Callback* exitCallback,
|
||||
Rectangle<int>* bounds)
|
||||
{
|
||||
if (@available (macOS 10.11, *))
|
||||
{
|
||||
new BluetoothMidiSelectorWindowHelper (exitCallback, bounds);
|
||||
return true;
|
||||
}
|
||||
|
||||
std::unique_ptr<ModalComponentManager::Callback> cb (exitCallback);
|
||||
// This functionality is unavailable when targetting OSX < 10.11. Instead,
|
||||
// you should pair Bluetooth MIDI devices using the "Audio MIDI Setup" app
|
||||
// (located in /Applications/Utilities).
|
||||
jassertfalse;
|
||||
return false;
|
||||
new BluetoothMidiSelectorWindowHelper (exitCallback, bounds);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool BluetoothMidiDevicePairingDialogue::isAvailable()
|
||||
{
|
||||
if (@available (macOS 10.11, *))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace juce
|
||||
|
|
|
|||
|
|
@ -129,13 +129,10 @@ public:
|
|||
preview->addToDesktop (0, (void*) nsViewPreview);
|
||||
preview->setVisible (true);
|
||||
|
||||
if (@available (macOS 10.11, *))
|
||||
if (! isSave)
|
||||
{
|
||||
if (! isSave)
|
||||
{
|
||||
auto* openPanel = static_cast<NSOpenPanel*> (panel);
|
||||
[openPanel setAccessoryViewDisclosed: YES];
|
||||
}
|
||||
auto* openPanel = static_cast<NSOpenPanel*> (panel);
|
||||
[openPanel setAccessoryViewDisclosed: YES];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -371,18 +371,8 @@ private:
|
|||
{
|
||||
NSArray* array = nil;
|
||||
|
||||
if (@available (macOS 10.11, *))
|
||||
{
|
||||
[menuNib instantiateWithOwner: NSApp
|
||||
topLevelObjects: &array];
|
||||
}
|
||||
else
|
||||
{
|
||||
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations")
|
||||
[menuNib instantiateNibWithOwner: NSApp
|
||||
topLevelObjects: &array];
|
||||
JUCE_END_IGNORE_WARNINGS_GCC_LIKE
|
||||
}
|
||||
[menuNib instantiateWithOwner: NSApp
|
||||
topLevelObjects: &array];
|
||||
|
||||
for (id object in array)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -398,13 +398,8 @@ public:
|
|||
}
|
||||
else
|
||||
{
|
||||
// Repaint behaviour of setFrame seemed to change in 10.11, and the drawing became synchronous,
|
||||
// causing performance issues. But sending an async update causes flickering in older versions,
|
||||
// hence this version check to use the old behaviour on pre 10.11 machines
|
||||
static bool isPre10_11 = SystemStats::getOperatingSystemType() <= SystemStats::MacOSX_10_10;
|
||||
|
||||
[window setFrame: [window frameRectForContentRect: flippedScreenRect (r)]
|
||||
display: isPre10_11];
|
||||
display: false];
|
||||
}
|
||||
|
||||
if (! CGSizeEqualToSize (oldViewSize, r.size))
|
||||
|
|
@ -1962,13 +1957,9 @@ private:
|
|||
|
||||
void setFullScreenSizeConstraints (const ComponentBoundsConstrainer& c)
|
||||
{
|
||||
if (@available (macOS 10.11, *))
|
||||
{
|
||||
const auto minSize = NSMakeSize (static_cast<float> (c.getMinimumWidth()),
|
||||
0.0f);
|
||||
[window setMinFullScreenContentSize: minSize];
|
||||
[window setMaxFullScreenContentSize: NSMakeSize (100000, 100000)];
|
||||
}
|
||||
const auto minSize = NSMakeSize (static_cast<float> (c.getMinimumWidth()), 0.0f);
|
||||
[window setMinFullScreenContentSize: minSize];
|
||||
[window setMaxFullScreenContentSize: NSMakeSize (100000, 100000)];
|
||||
}
|
||||
|
||||
void displayLayer ([[maybe_unused]] CALayer* layer) override
|
||||
|
|
|
|||
|
|
@ -786,12 +786,12 @@ private:
|
|||
JUCE_END_IGNORE_WARNINGS_GCC_LIKE
|
||||
#endif
|
||||
|
||||
class API_AVAILABLE (macos (10.11)) WebBrowserComponent::Impl::Platform::WKWebViewImpl : public WebBrowserComponent::Impl::PlatformInterface,
|
||||
#if JUCE_MAC
|
||||
public NSViewComponent
|
||||
#else
|
||||
public UIViewComponent
|
||||
#endif
|
||||
class WebBrowserComponent::Impl::Platform::WKWebViewImpl : public WebBrowserComponent::Impl::PlatformInterface,
|
||||
#if JUCE_MAC
|
||||
public NSViewComponent
|
||||
#else
|
||||
public UIViewComponent
|
||||
#endif
|
||||
{
|
||||
public:
|
||||
WKWebViewImpl (WebBrowserComponent::Impl& implIn,
|
||||
|
|
@ -1085,14 +1085,7 @@ auto WebBrowserComponent::Impl::createAndInitPlatformDependentPart (WebBrowserCo
|
|||
const StringArray& userScripts)
|
||||
-> std::unique_ptr<PlatformInterface>
|
||||
{
|
||||
if (@available (macOS 10.11, *))
|
||||
return std::make_unique<Platform::WKWebViewImpl> (impl, options, userScripts);
|
||||
|
||||
#if JUCE_MAC
|
||||
return std::make_unique<Platform::WebViewImpl> (impl, options.getUserAgent());
|
||||
#endif
|
||||
|
||||
return {};
|
||||
return std::make_unique<Platform::WKWebViewImpl> (impl, options, userScripts);
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue