mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Platform: Remove compatibility checks for iOS 11
This commit is contained in:
parent
6428f43eeb
commit
5391032238
6 changed files with 77 additions and 125 deletions
|
|
@ -547,7 +547,7 @@ public:
|
|||
hostMusicalContextCallback = [au musicalContextBlock];
|
||||
hostTransportStateCallback = [au transportStateBlock];
|
||||
|
||||
if (@available (macOS 10.13, iOS 11.0, *))
|
||||
if (@available (macOS 10.13, *))
|
||||
midiOutputEventBlock = [au MIDIOutputEventBlock];
|
||||
|
||||
reset();
|
||||
|
|
@ -853,7 +853,7 @@ private:
|
|||
addMethod (@selector (supportsMPE), [] (id self, SEL) { return _this (self)->getSupportsMPE() ? YES : NO; });
|
||||
JUCE_END_IGNORE_WARNINGS_GCC_LIKE
|
||||
|
||||
if (@available (macOS 10.13, iOS 11.0, *))
|
||||
if (@available (macOS 10.13, *))
|
||||
addMethod (@selector (MIDIOutputNames), [] (id self, SEL) { return _this (self)->getMIDIOutputNames(); });
|
||||
|
||||
//==============================================================================
|
||||
|
|
@ -875,7 +875,7 @@ private:
|
|||
#endif
|
||||
|
||||
//==============================================================================
|
||||
if (@available (macOS 10.13, iOS 11.0, *))
|
||||
if (@available (macOS 10.13, *))
|
||||
{
|
||||
addMethod (@selector (supportedViewConfigurations:), [] (id self, SEL, NSArray<AUAudioUnitViewConfiguration*>* configs)
|
||||
{
|
||||
|
|
@ -1585,7 +1585,7 @@ private:
|
|||
|
||||
// send MIDI
|
||||
#if JucePlugin_ProducesMidiOutput
|
||||
if (@available (macOS 10.13, iOS 11.0, *))
|
||||
if (@available (macOS 10.13, *))
|
||||
{
|
||||
if (auto midiOut = midiOutputEventBlock)
|
||||
for (const auto metadata : midiMessages)
|
||||
|
|
|
|||
|
|
@ -128,76 +128,62 @@ private:
|
|||
return nil;
|
||||
});
|
||||
|
||||
if (@available (iOS 11.0, *))
|
||||
addMethod (@selector (accessibilityDataTableCellElementForRow:column:), [] (id self, SEL, NSUInteger row, NSUInteger column) -> id
|
||||
{
|
||||
addMethod (@selector (accessibilityDataTableCellElementForRow:column:), [] (id self, SEL, NSUInteger row, NSUInteger column) -> id
|
||||
if (auto* tableHandler = detail::AccessibilityHelpers::getEnclosingHandlerWithInterface (getHandler (self), &AccessibilityHandler::getTableInterface))
|
||||
if (auto* tableInterface = tableHandler->getTableInterface())
|
||||
if (auto* cellHandler = tableInterface->getCellHandler ((int) row, (int) column))
|
||||
if (auto* parent = getAccessibleParent (cellHandler))
|
||||
return static_cast<id> (parent->getNativeImplementation());
|
||||
|
||||
return nil;
|
||||
});
|
||||
|
||||
addMethod (@selector (accessibilityRowCount), getAccessibilityRowCount);
|
||||
addMethod (@selector (accessibilityColumnCount), getAccessibilityColumnCount);
|
||||
|
||||
addMethod (@selector (accessibilityHeaderElementsForColumn:), [] (id self, SEL, NSUInteger column) -> NSArray*
|
||||
{
|
||||
if (auto* tableHandler = detail::AccessibilityHelpers::getEnclosingHandlerWithInterface (getHandler (self), &AccessibilityHandler::getTableInterface))
|
||||
{
|
||||
if (auto* tableHandler = detail::AccessibilityHelpers::getEnclosingHandlerWithInterface (getHandler (self), &AccessibilityHandler::getTableInterface))
|
||||
if (auto* tableInterface = tableHandler->getTableInterface())
|
||||
if (auto* cellHandler = tableInterface->getCellHandler ((int) row, (int) column))
|
||||
if (auto* parent = getAccessibleParent (cellHandler))
|
||||
return static_cast<id> (parent->getNativeImplementation());
|
||||
|
||||
return nil;
|
||||
});
|
||||
|
||||
addMethod (@selector (accessibilityRowCount), getAccessibilityRowCount);
|
||||
addMethod (@selector (accessibilityColumnCount), getAccessibilityColumnCount);
|
||||
|
||||
addMethod (@selector (accessibilityHeaderElementsForColumn:), [] (id self, SEL, NSUInteger column) -> NSArray*
|
||||
{
|
||||
if (auto* tableHandler = detail::AccessibilityHelpers::getEnclosingHandlerWithInterface (getHandler (self), &AccessibilityHandler::getTableInterface))
|
||||
if (auto* tableInterface = tableHandler->getTableInterface())
|
||||
{
|
||||
if (auto* tableInterface = tableHandler->getTableInterface())
|
||||
if (auto* header = tableInterface->getHeaderHandler())
|
||||
{
|
||||
if (auto* header = tableInterface->getHeaderHandler())
|
||||
if (isPositiveAndBelow (column, header->getChildren().size()))
|
||||
{
|
||||
if (isPositiveAndBelow (column, header->getChildren().size()))
|
||||
{
|
||||
auto* result = [NSMutableArray new];
|
||||
[result addObject: static_cast<id> (header->getChildren()[(size_t) column]->getNativeImplementation())];
|
||||
return result;
|
||||
}
|
||||
auto* result = [NSMutableArray new];
|
||||
[result addObject: static_cast<id> (header->getChildren()[(size_t) column]->getNativeImplementation())];
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
});
|
||||
return nullptr;
|
||||
});
|
||||
|
||||
addProtocol (@protocol (UIAccessibilityContainerDataTable));
|
||||
addProtocol (@protocol (UIAccessibilityContainerDataTable));
|
||||
|
||||
addMethod (@selector (accessibilityContainerType), [] (id self, SEL) -> NSInteger
|
||||
addMethod (@selector (accessibilityContainerType), [] (id self, SEL) -> NSInteger
|
||||
{
|
||||
if (auto* handler = getHandler (self))
|
||||
{
|
||||
if (auto* handler = getHandler (self))
|
||||
if (handler->getTableInterface() != nullptr)
|
||||
return UIAccessibilityContainerTypeDataTable;
|
||||
|
||||
const auto handlerRole = handler->getRole();
|
||||
|
||||
if (handlerRole == AccessibilityRole::popupMenu
|
||||
|| handlerRole == AccessibilityRole::list
|
||||
|| handlerRole == AccessibilityRole::tree)
|
||||
{
|
||||
if (handler->getTableInterface() != nullptr)
|
||||
{
|
||||
if (@available (iOS 11.0, *))
|
||||
return UIAccessibilityContainerTypeDataTable;
|
||||
|
||||
return 1; // UIAccessibilityContainerTypeDataTable
|
||||
}
|
||||
|
||||
const auto handlerRole = handler->getRole();
|
||||
|
||||
if (handlerRole == AccessibilityRole::popupMenu
|
||||
|| handlerRole == AccessibilityRole::list
|
||||
|| handlerRole == AccessibilityRole::tree)
|
||||
{
|
||||
if (@available (iOS 11.0, *))
|
||||
return UIAccessibilityContainerTypeList;
|
||||
|
||||
return 2; // UIAccessibilityContainerTypeList
|
||||
}
|
||||
return UIAccessibilityContainerTypeList;
|
||||
}
|
||||
}
|
||||
|
||||
if (@available (iOS 11.0, *))
|
||||
return UIAccessibilityContainerTypeNone;
|
||||
|
||||
return 0; // UIAccessibilityContainerTypeNone
|
||||
});
|
||||
}
|
||||
return UIAccessibilityContainerTypeNone;
|
||||
});
|
||||
|
||||
registerClass();
|
||||
}
|
||||
|
|
@ -511,12 +497,9 @@ private:
|
|||
addProtocol (@protocol (UITextInput));
|
||||
}
|
||||
|
||||
if (@available (iOS 11.0, *))
|
||||
{
|
||||
addMethod (@selector (accessibilityRowRange), getAccessibilityRowIndexRange);
|
||||
addMethod (@selector (accessibilityColumnRange), getAccessibilityColumnIndexRange);
|
||||
addProtocol (@protocol (UIAccessibilityContainerDataTableCell));
|
||||
}
|
||||
addMethod (@selector (accessibilityRowRange), getAccessibilityRowIndexRange);
|
||||
addMethod (@selector (accessibilityColumnRange), getAccessibilityColumnIndexRange);
|
||||
addProtocol (@protocol (UIAccessibilityContainerDataTableCell));
|
||||
|
||||
addIvar<UIAccessibilityElement*> ("container");
|
||||
|
||||
|
|
|
|||
|
|
@ -218,8 +218,7 @@ private:
|
|||
{
|
||||
controller.reset ([[FileChooserControllerClass alloc] initWithDocumentTypes: utTypeArray inMode: UIDocumentPickerModeOpen]);
|
||||
|
||||
if (@available (iOS 11.0, *))
|
||||
[controller.get() setAllowsMultipleSelection: (flags & FileBrowserComponent::canSelectMultipleItems) != 0];
|
||||
[controller.get() setAllowsMultipleSelection: (flags & FileBrowserComponent::canSelectMultipleItems) != 0];
|
||||
}
|
||||
|
||||
[controller.get() setDelegate: delegate.get()];
|
||||
|
|
|
|||
|
|
@ -625,22 +625,11 @@ static Rectangle<int> getRecommendedWindowBounds()
|
|||
|
||||
static BorderSize<int> getSafeAreaInsets (float masterScale)
|
||||
{
|
||||
if (@available (iOS 11.0, *))
|
||||
{
|
||||
UIEdgeInsets safeInsets = TemporaryWindow().window.safeAreaInsets;
|
||||
return detail::WindowingHelpers::roundToInt (BorderSize<double> { safeInsets.top,
|
||||
safeInsets.left,
|
||||
safeInsets.bottom,
|
||||
safeInsets.right }.multipliedBy (1.0 / (double) masterScale));
|
||||
}
|
||||
|
||||
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations")
|
||||
auto statusBarSize = [UIApplication sharedApplication].statusBarFrame.size;
|
||||
JUCE_END_IGNORE_WARNINGS_GCC_LIKE
|
||||
|
||||
auto statusBarHeight = jmin (statusBarSize.width, statusBarSize.height);
|
||||
|
||||
return { roundToInt (statusBarHeight / masterScale), 0, 0, 0 };
|
||||
UIEdgeInsets safeInsets = TemporaryWindow().window.safeAreaInsets;
|
||||
return detail::WindowingHelpers::roundToInt (BorderSize<double> { safeInsets.top,
|
||||
safeInsets.left,
|
||||
safeInsets.bottom,
|
||||
safeInsets.right }.multipliedBy (1.0 / (double) masterScale));
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
|
|
|
|||
|
|
@ -835,7 +835,7 @@ public:
|
|||
|
||||
[[config.get() userContentController] addUserScript:script.get()];
|
||||
|
||||
if (@available (macOS 10.13, iOS 11.0, *))
|
||||
if (@available (macOS 10.13, *))
|
||||
{
|
||||
if (browserOptions.getResourceProvider() != nullptr)
|
||||
[config.get() setURLSchemeHandler:webViewDelegate.get() forURLScheme:@"juce"];
|
||||
|
|
|
|||
|
|
@ -154,8 +154,7 @@ private:
|
|||
|
||||
[deviceTypes.get() addObject: AVCaptureDeviceTypeBuiltInDualCamera];
|
||||
|
||||
if (@available (iOS 11.1, *))
|
||||
[deviceTypes.get() addObject: AVCaptureDeviceTypeBuiltInTrueDepthCamera];
|
||||
[deviceTypes.get() addObject: AVCaptureDeviceTypeBuiltInTrueDepthCamera];
|
||||
|
||||
auto discoverySession = [AVCaptureDeviceDiscoverySession discoverySessionWithDeviceTypes: deviceTypes.get()
|
||||
mediaType: AVMediaTypeVideo
|
||||
|
|
@ -208,12 +207,9 @@ private:
|
|||
JUCE_CAMERA_LOG ("Device type: " + nsStringToJuce (device.deviceType));
|
||||
JUCE_CAMERA_LOG ("Locking focus with custom lens position supported: " + String ((int)device.lockingFocusWithCustomLensPositionSupported));
|
||||
|
||||
if (@available (iOS 11.0, *))
|
||||
{
|
||||
JUCE_CAMERA_LOG ("Min available video zoom factor: " + String (device.minAvailableVideoZoomFactor));
|
||||
JUCE_CAMERA_LOG ("Max available video zoom factor: " + String (device.maxAvailableVideoZoomFactor));
|
||||
JUCE_CAMERA_LOG ("Dual camera switch over video zoom factor: " + String (device.dualCameraSwitchOverVideoZoomFactor));
|
||||
}
|
||||
JUCE_CAMERA_LOG ("Min available video zoom factor: " + String (device.minAvailableVideoZoomFactor));
|
||||
JUCE_CAMERA_LOG ("Max available video zoom factor: " + String (device.maxAvailableVideoZoomFactor));
|
||||
JUCE_CAMERA_LOG ("Dual camera switch over video zoom factor: " + String (device.dualCameraSwitchOverVideoZoomFactor));
|
||||
|
||||
JUCE_CAMERA_LOG ("Capture formats start-------------------");
|
||||
for (AVCaptureDeviceFormat* format in device.formats)
|
||||
|
|
@ -275,11 +271,8 @@ private:
|
|||
JUCE_CAMERA_LOG ("Cinematic video stabilization supported: " + String ((int) [format isVideoStabilizationModeSupported: AVCaptureVideoStabilizationModeCinematic]));
|
||||
JUCE_CAMERA_LOG ("Auto video stabilization supported: " + String ((int) [format isVideoStabilizationModeSupported: AVCaptureVideoStabilizationModeAuto]));
|
||||
|
||||
if (@available (iOS 11.0, *))
|
||||
{
|
||||
JUCE_CAMERA_LOG ("Min zoom factor for depth data delivery: " + String (format.videoMinZoomFactorForDepthDataDelivery));
|
||||
JUCE_CAMERA_LOG ("Max zoom factor for depth data delivery: " + String (format.videoMaxZoomFactorForDepthDataDelivery));
|
||||
}
|
||||
JUCE_CAMERA_LOG ("Min zoom factor for depth data delivery: " + String (format.videoMinZoomFactorForDepthDataDelivery));
|
||||
JUCE_CAMERA_LOG ("Max zoom factor for depth data delivery: " + String (format.videoMaxZoomFactorForDepthDataDelivery));
|
||||
}
|
||||
|
||||
static String getHighResStillImgDimensionsString (CMVideoDimensions d)
|
||||
|
|
@ -663,34 +656,30 @@ private:
|
|||
JUCE_CAMERA_LOG ("Lens stabilization during bracketed capture supported: " + String ((int) photoOutput.lensStabilizationDuringBracketedCaptureSupported));
|
||||
JUCE_CAMERA_LOG ("Live photo capture supported: " + String ((int) photoOutput.livePhotoCaptureSupported));
|
||||
|
||||
typesString.clear();
|
||||
|
||||
if (@available (iOS 11.0, *))
|
||||
{
|
||||
typesString.clear();
|
||||
for (AVFileType type in photoOutput.availablePhotoFileTypes)
|
||||
typesString << nsStringToJuce (type) << " ";
|
||||
|
||||
for (AVFileType type in photoOutput.availablePhotoFileTypes)
|
||||
typesString << nsStringToJuce (type) << " ";
|
||||
JUCE_CAMERA_LOG ("Available photo file types: " + typesString);
|
||||
|
||||
JUCE_CAMERA_LOG ("Available photo file types: " + typesString);
|
||||
typesString.clear();
|
||||
|
||||
typesString.clear();
|
||||
for (AVFileType type in photoOutput.availableRawPhotoFileTypes)
|
||||
typesString << nsStringToJuce (type) << " ";
|
||||
|
||||
for (AVFileType type in photoOutput.availableRawPhotoFileTypes)
|
||||
typesString << nsStringToJuce (type) << " ";
|
||||
JUCE_CAMERA_LOG ("Available RAW photo file types: " + typesString);
|
||||
|
||||
JUCE_CAMERA_LOG ("Available RAW photo file types: " + typesString);
|
||||
typesString.clear();
|
||||
|
||||
typesString.clear();
|
||||
for (AVFileType type in photoOutput.availableLivePhotoVideoCodecTypes)
|
||||
typesString << nsStringToJuce (type) << " ";
|
||||
|
||||
for (AVFileType type in photoOutput.availableLivePhotoVideoCodecTypes)
|
||||
typesString << nsStringToJuce (type) << " ";
|
||||
JUCE_CAMERA_LOG ("Available live photo video codec types: " + typesString);
|
||||
|
||||
JUCE_CAMERA_LOG ("Available live photo video codec types: " + typesString);
|
||||
|
||||
JUCE_CAMERA_LOG ("Dual camera dual photo delivery supported: " + String ((int) photoOutput.dualCameraDualPhotoDeliverySupported));
|
||||
JUCE_CAMERA_LOG ("Camera calibration data delivery supported: " + String ((int) photoOutput.cameraCalibrationDataDeliverySupported));
|
||||
JUCE_CAMERA_LOG ("Depth data delivery supported: " + String ((int) photoOutput.depthDataDeliverySupported));
|
||||
}
|
||||
JUCE_CAMERA_LOG ("Dual camera dual photo delivery supported: " + String ((int) photoOutput.dualCameraDualPhotoDeliverySupported));
|
||||
JUCE_CAMERA_LOG ("Camera calibration data delivery supported: " + String ((int) photoOutput.cameraCalibrationDataDeliverySupported));
|
||||
JUCE_CAMERA_LOG ("Depth data delivery supported: " + String ((int) photoOutput.depthDataDeliverySupported));
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
@ -731,14 +720,7 @@ private:
|
|||
addMethod (@selector (captureOutput:didCapturePhotoForResolvedSettings:), didCaptureForSettings);
|
||||
addMethod (@selector (captureOutput:didFinishCaptureForResolvedSettings:error:), didFinishCaptureForSettings);
|
||||
|
||||
if (@available (iOS 11.0, *))
|
||||
{
|
||||
addMethod (@selector (captureOutput:didFinishProcessingPhoto:error:), didFinishProcessingPhoto);
|
||||
}
|
||||
else
|
||||
{
|
||||
addMethod (@selector (captureOutput:didFinishProcessingPhotoSampleBuffer:previewPhotoSampleBuffer:resolvedSettings:bracketSettings:error:), didFinishProcessingPhotoSampleBuffer);
|
||||
}
|
||||
addMethod (@selector (captureOutput:didFinishProcessingPhoto:error:), didFinishProcessingPhoto);
|
||||
|
||||
addIvar<StillPictureTaker*> ("owner");
|
||||
|
||||
|
|
@ -772,7 +754,6 @@ private:
|
|||
JUCE_CAMERA_LOG ("didFinishCaptureForSettings(), error = " + errorString);
|
||||
}
|
||||
|
||||
API_AVAILABLE (ios (11.0))
|
||||
static void didFinishProcessingPhoto (id self, SEL, AVCapturePhotoOutput*, AVCapturePhoto* capturePhoto, NSError* error)
|
||||
{
|
||||
getOwner (self).takingPicture = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue