1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-17 00:44:19 +00:00

ObjC Helpers: Automatically derive appropriate signature for function

This commit is contained in:
reuk 2021-11-10 17:57:51 +00:00
parent b4bc2c8710
commit 81fa777ff7
No known key found for this signature in database
GPG key ID: FCB43929F012EE5C
27 changed files with 391 additions and 394 deletions

View file

@ -1622,10 +1622,10 @@ public:
addIvar<JuceAU*> ("au");
addIvar<EditorCompHolder*> ("editor");
addMethod (@selector (dealloc), dealloc, "v@:");
addMethod (@selector (applicationWillTerminate:), applicationWillTerminate, "v@:@");
addMethod (@selector (viewDidMoveToWindow), viewDidMoveToWindow, "v@:");
addMethod (@selector (mouseDownCanMoveWindow), mouseDownCanMoveWindow, "c@:");
addMethod (@selector (dealloc), dealloc);
addMethod (@selector (applicationWillTerminate:), applicationWillTerminate);
addMethod (@selector (viewDidMoveToWindow), viewDidMoveToWindow);
addMethod (@selector (mouseDownCanMoveWindow), mouseDownCanMoveWindow);
registerClass();
}
@ -1709,9 +1709,9 @@ public:
{
JuceUICreationClass() : ObjCClass<NSObject> ("JUCE_AUCocoaViewClass_")
{
addMethod (@selector (interfaceVersion), interfaceVersion, @encode (unsigned int), "@:");
addMethod (@selector (description), description, @encode (NSString*), "@:");
addMethod (@selector (uiViewForAudioUnit:withSize:), uiViewForAudioUnit, @encode (NSView*), "@:", @encode (AudioUnit), @encode (NSSize));
addMethod (@selector (interfaceVersion), interfaceVersion);
addMethod (@selector (description), description);
addMethod (@selector (uiViewForAudioUnit:withSize:), uiViewForAudioUnit);
addProtocol (@protocol (AUCocoaUIBase));

View file

@ -216,73 +216,67 @@ private:
addIvar<JuceAudioUnitv3Base*> ("cppObject");
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wundeclared-selector")
addMethod (@selector (initWithComponentDescription:options:error:juceClass:),
initWithComponentDescriptionAndJuceClass, "@@:",
@encode (AudioComponentDescription),
@encode (AudioComponentInstantiationOptions), "^@@");
addMethod (@selector (initWithComponentDescription:options:error:juceClass:), initWithComponentDescriptionAndJuceClass);
JUCE_END_IGNORE_WARNINGS_GCC_LIKE
addMethod (@selector (initWithComponentDescription:options:error:),
initWithComponentDescription, "@@:",
@encode (AudioComponentDescription),
@encode (AudioComponentInstantiationOptions), "^@");
addMethod (@selector (initWithComponentDescription:options:error:), initWithComponentDescription);
addMethod (@selector (dealloc), dealloc, "v@:");
addMethod (@selector (dealloc), dealloc);
//==============================================================================
addMethod (@selector (reset), reset, "v@:");
addMethod (@selector (reset), reset);
//==============================================================================
addMethod (@selector (currentPreset), getCurrentPreset, "@@:");
addMethod (@selector (setCurrentPreset:), setCurrentPreset, "v@:@");
addMethod (@selector (factoryPresets), getFactoryPresets, "@@:");
addMethod (@selector (fullState), getFullState, "@@:");
addMethod (@selector (setFullState:), setFullState, "v@:@");
addMethod (@selector (parameterTree), getParameterTree, "@@:");
addMethod (@selector (parametersForOverviewWithCount:), parametersForOverviewWithCount, "@@:", @encode (NSInteger));
addMethod (@selector (currentPreset), getCurrentPreset);
addMethod (@selector (setCurrentPreset:), setCurrentPreset);
addMethod (@selector (factoryPresets), getFactoryPresets);
addMethod (@selector (fullState), getFullState);
addMethod (@selector (setFullState:), setFullState);
addMethod (@selector (parameterTree), getParameterTree);
addMethod (@selector (parametersForOverviewWithCount:), parametersForOverviewWithCount);
//==============================================================================
addMethod (@selector (latency), getLatency, @encode (NSTimeInterval), "@:");
addMethod (@selector (tailTime), getTailTime, @encode (NSTimeInterval), "@:");
addMethod (@selector (latency), getLatency);
addMethod (@selector (tailTime), getTailTime);
//==============================================================================
addMethod (@selector (inputBusses), getInputBusses, "@@:");
addMethod (@selector (outputBusses), getOutputBusses, "@@:");
addMethod (@selector (channelCapabilities), getChannelCapabilities, "@@:");
addMethod (@selector (shouldChangeToFormat:forBus:), shouldChangeToFormat, "c@:@@");
addMethod (@selector (inputBusses), getInputBusses);
addMethod (@selector (outputBusses), getOutputBusses);
addMethod (@selector (channelCapabilities), getChannelCapabilities);
addMethod (@selector (shouldChangeToFormat:forBus:), shouldChangeToFormat);
//==============================================================================
addMethod (@selector (virtualMIDICableCount), getVirtualMIDICableCount, @encode (NSInteger), "@:");
addMethod (@selector (virtualMIDICableCount), getVirtualMIDICableCount);
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wundeclared-selector")
addMethod (@selector (supportsMPE), getSupportsMPE, @encode (BOOL), "@:");
addMethod (@selector (supportsMPE), getSupportsMPE);
JUCE_END_IGNORE_WARNINGS_GCC_LIKE
#if JUCE_AUV3_MIDI_OUTPUT_SUPPORTED
if (@available (macOS 10.13, iOS 11.0, *))
addMethod (@selector (MIDIOutputNames), getMIDIOutputNames, "@@:");
addMethod (@selector (MIDIOutputNames), getMIDIOutputNames);
#endif
//==============================================================================
addMethod (@selector (internalRenderBlock), getInternalRenderBlock, @encode (AUInternalRenderBlock), "@:");
addMethod (@selector (canProcessInPlace), getCanProcessInPlace, @encode (BOOL), "@:");
addMethod (@selector (isRenderingOffline), getRenderingOffline, @encode (BOOL), "@:");
addMethod (@selector (setRenderingOffline:), setRenderingOffline, "v@:", @encode (BOOL));
addMethod (@selector (shouldBypassEffect), getShouldBypassEffect, @encode (BOOL), "@:");
addMethod (@selector (setShouldBypassEffect:), setShouldBypassEffect, "v@:", @encode (BOOL));
addMethod (@selector (allocateRenderResourcesAndReturnError:), allocateRenderResourcesAndReturnError, "c@:^@");
addMethod (@selector (deallocateRenderResources), deallocateRenderResources, "v@:");
addMethod (@selector (internalRenderBlock), getInternalRenderBlock);
addMethod (@selector (canProcessInPlace), getCanProcessInPlace);
addMethod (@selector (isRenderingOffline), getRenderingOffline);
addMethod (@selector (setRenderingOffline:), setRenderingOffline);
addMethod (@selector (shouldBypassEffect), getShouldBypassEffect);
addMethod (@selector (setShouldBypassEffect:), setShouldBypassEffect);
addMethod (@selector (allocateRenderResourcesAndReturnError:), allocateRenderResourcesAndReturnError);
addMethod (@selector (deallocateRenderResources), deallocateRenderResources);
//==============================================================================
addMethod (@selector (contextName), getContextName, "@@:");
addMethod (@selector (setContextName:), setContextName, "v@:@");
addMethod (@selector (contextName), getContextName);
addMethod (@selector (setContextName:), setContextName);
//==============================================================================
#if JUCE_AUV3_VIEW_CONFIG_SUPPORTED
if (@available (macOS 10.13, iOS 11.0, *))
{
addMethod (@selector (supportedViewConfigurations:), getSupportedViewConfigurations, "@@:@");
addMethod (@selector (selectViewConfiguration:), selectViewConfiguration, "v@:@");
addMethod (@selector (supportedViewConfigurations:), getSupportedViewConfigurations);
addMethod (@selector (selectViewConfiguration:), selectViewConfiguration);
}
#endif

View file

@ -150,9 +150,9 @@ private:
{
addIvar<NSViewComponentWithParent*> ("owner");
addMethod (@selector (isFlipped), isFlipped, "c@:");
addMethod (@selector (isOpaque), isOpaque, "c@:");
addMethod (@selector (didAddSubview:), didAddSubview, "v@:@");
addMethod (@selector (isFlipped), isFlipped);
addMethod (@selector (isOpaque), isOpaque);
addMethod (@selector (didAddSubview:), didAddSubview);
registerClass();
}

View file

@ -35,20 +35,19 @@ struct AudioTrackProducerClass : public ObjCClass<NSObject>
addIvar<AudioSourceHolder*> ("source");
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wundeclared-selector")
addMethod (@selector (initWithAudioSourceHolder:), initWithAudioSourceHolder, "@@:^v");
addMethod (@selector (verifyDataForTrack:intoBuffer:length:atAddress:blockSize:ioFlags:),
produceDataForTrack, "I@:@^cIQI^I");
addMethod (@selector (initWithAudioSourceHolder:), initWithAudioSourceHolder);
addMethod (@selector (verifyDataForTrack:intoBuffer:length:atAddress:blockSize:ioFlags:), produceDataForTrack);
JUCE_END_IGNORE_WARNINGS_GCC_LIKE
addMethod (@selector (cleanupTrackAfterBurn:), cleanupTrackAfterBurn, "v@:@");
addMethod (@selector (cleanupTrackAfterVerification:), cleanupTrackAfterVerification, "c@:@");
addMethod (@selector (estimateLengthOfTrack:), estimateLengthOfTrack, "Q@:@");
addMethod (@selector (prepareTrack:forBurn:toMedia:), prepareTrack, "c@:@@@");
addMethod (@selector (prepareTrackForVerification:), prepareTrackForVerification, "c@:@");
addMethod (@selector (cleanupTrackAfterBurn:), cleanupTrackAfterBurn);
addMethod (@selector (cleanupTrackAfterVerification:), cleanupTrackAfterVerification);
addMethod (@selector (estimateLengthOfTrack:), estimateLengthOfTrack);
addMethod (@selector (prepareTrack:forBurn:toMedia:), prepareTrack);
addMethod (@selector (prepareTrackForVerification:), prepareTrackForVerification);
addMethod (@selector (produceDataForTrack:intoBuffer:length:atAddress:blockSize:ioFlags:),
produceDataForTrack, "I@:@^cIQI^I");
produceDataForTrack);
addMethod (@selector (producePreGapForTrack:intoBuffer:length:atAddress:blockSize:ioFlags:),
produceDataForTrack, "I@:@^cIQI^I");
produceDataForTrack);
registerClass();
}

View file

@ -42,12 +42,12 @@ public:
addIvar<CABTLEMIDIWindowController*> ("controller");
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wundeclared-selector")
addMethod (@selector (initWithCallbacks:), initWithCallbacks, "@@:^v");
addMethod (@selector (show:), show, "v@:^v");
addMethod (@selector (receivedWindowWillClose:), receivedWindowWillClose, "v@:^v");
addMethod (@selector (initWithCallbacks:), initWithCallbacks);
addMethod (@selector (show:), show);
addMethod (@selector (receivedWindowWillClose:), receivedWindowWillClose);
JUCE_END_IGNORE_WARNINGS_GCC_LIKE
addMethod (@selector (dealloc), dealloc, "v@:");
addMethod (@selector (dealloc), dealloc);
registerClass();
}

View file

@ -339,13 +339,13 @@ private:
{
addIvar<URLConnectionStatePreYosemite*> ("state");
addMethod (@selector (connection:didReceiveResponse:), didReceiveResponse, "v@:@@");
addMethod (@selector (connection:didFailWithError:), didFailWithError, "v@:@@");
addMethod (@selector (connection:didReceiveData:), didReceiveData, "v@:@@");
addMethod (@selector (connection:didReceiveResponse:), didReceiveResponse);
addMethod (@selector (connection:didFailWithError:), didFailWithError);
addMethod (@selector (connection:didReceiveData:), didReceiveData);
addMethod (@selector (connection:didSendBodyData:totalBytesWritten:totalBytesExpectedToWrite:),
connectionDidSendBodyData, "v@:@iii");
addMethod (@selector (connectionDidFinishLoading:), connectionDidFinishLoading, "v@:@");
addMethod (@selector (connection:willSendRequest:redirectResponse:), willSendRequest, "@@:@@@");
connectionDidSendBodyData);
addMethod (@selector (connectionDidFinishLoading:), connectionDidFinishLoading);
addMethod (@selector (connection:willSendRequest:redirectResponse:), willSendRequest);
registerClass();
}
@ -608,14 +608,14 @@ private:
addIvar<URLConnectionState*> ("state");
addMethod (@selector (URLSession:dataTask:didReceiveResponse:completionHandler:),
didReceiveResponse, "v@:@@@@");
addMethod (@selector (URLSession:didBecomeInvalidWithError:), didBecomeInvalidWithError, "v@:@@");
addMethod (@selector (URLSession:dataTask:didReceiveData:), didReceiveData, "v@:@@@");
didReceiveResponse);
addMethod (@selector (URLSession:didBecomeInvalidWithError:), didBecomeInvalidWithError);
addMethod (@selector (URLSession:dataTask:didReceiveData:), didReceiveData);
addMethod (@selector (URLSession:task:didSendBodyData:totalBytesSent:totalBytesExpectedToSend:),
didSendBodyData, "v@:@@qqq");
didSendBodyData);
addMethod (@selector (URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:),
willPerformHTTPRedirection, "v@:@@@@@");
addMethod (@selector (URLSession:task:didCompleteWithError:), didCompleteWithError, "v@:@@@");
willPerformHTTPRedirection);
addMethod (@selector (URLSession:task:didCompleteWithError:), didCompleteWithError);
registerClass();
}
@ -872,11 +872,10 @@ struct BackgroundDownloadTask : public URL::DownloadTask
{
addIvar<BackgroundDownloadTask*> ("state");
addMethod (@selector (URLSession:downloadTask:didWriteData:totalBytesWritten:totalBytesExpectedToWrite:),
didWriteData, "v@:@@qqq");
addMethod (@selector (URLSession:downloadTask:didFinishDownloadingToURL:), didFinishDownloadingToURL, "v@:@@@");
addMethod (@selector (URLSession:task:didCompleteWithError:), didCompleteWithError, "v@:@@@");
addMethod (@selector (URLSession:didBecomeInvalidWithError:), didBecomeInvalidWithError, "v@:@@@");
addMethod (@selector (URLSession:downloadTask:didWriteData:totalBytesWritten:totalBytesExpectedToWrite:), didWriteData);
addMethod (@selector (URLSession:downloadTask:didFinishDownloadingToURL:), didFinishDownloadingToURL);
addMethod (@selector (URLSession:task:didCompleteWithError:), didCompleteWithError);
addMethod (@selector (URLSession:didBecomeInvalidWithError:), didBecomeInvalidWithError);
registerClass();
}

View file

@ -312,6 +312,35 @@ private:
T item{};
};
//==============================================================================
namespace detail
{
constexpr auto makeCompileTimeStr()
{
return std::array<char, 1> { { '\0' } };
}
template <typename A, size_t... As, typename B, size_t... Bs>
constexpr auto joinCompileTimeStrImpl (A&& a, std::index_sequence<As...>,
B&& b, std::index_sequence<Bs...>)
{
return std::array<char, sizeof... (As) + sizeof... (Bs) + 1> { { a[As]..., b[Bs]..., '\0' } };
}
template <size_t A, size_t B>
constexpr auto joinCompileTimeStr (const char (&a)[A], std::array<char, B> b)
{
return joinCompileTimeStrImpl (a, std::make_index_sequence<A - 1>(),
b, std::make_index_sequence<B - 1>());
}
template <size_t A, typename... Others>
constexpr auto makeCompileTimeStr (const char (&v)[A], Others&&... others)
{
return joinCompileTimeStr (v, makeCompileTimeStr (others...));
}
} // namespace detail
//==============================================================================
template <typename Type>
inline Type getIvar (id self, const char* name)
@ -354,29 +383,12 @@ struct ObjCClass
jassert (b); ignoreUnused (b);
}
template <typename FunctionType>
void addMethod (SEL selector, FunctionType callbackFn, const char* signature)
template <typename Result, typename... Args>
void addMethod (SEL selector, Result (*callbackFn) (Args...))
{
BOOL b = class_addMethod (cls, selector, (IMP) callbackFn, signature);
jassert (b); ignoreUnused (b);
}
template <typename FunctionType>
void addMethod (SEL selector, FunctionType callbackFn, const char* sig1, const char* sig2)
{
addMethod (selector, callbackFn, (String (sig1) + sig2).toUTF8());
}
template <typename FunctionType>
void addMethod (SEL selector, FunctionType callbackFn, const char* sig1, const char* sig2, const char* sig3)
{
addMethod (selector, callbackFn, (String (sig1) + sig2 + sig3).toUTF8());
}
template <typename FunctionType>
void addMethod (SEL selector, FunctionType callbackFn, const char* sig1, const char* sig2, const char* sig3, const char* sig4)
{
addMethod (selector, callbackFn, (String (sig1) + sig2 + sig3 + sig4).toUTF8());
const auto s = detail::makeCompileTimeStr (@encode (Result), @encode (Args)...);
const auto b = class_addMethod (cls, selector, (IMP) callbackFn, s.data());
jassertquiet (b);
}
void addProtocol (Protocol* protocol)
@ -413,10 +425,10 @@ struct ObjCLifetimeManagedClass : public ObjCClass<NSObject>
addIvar<JuceClass*> ("cppObject");
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wundeclared-selector")
addMethod (@selector (initWithJuceObject:), initWithJuceObject, "@@:@");
addMethod (@selector (initWithJuceObject:), initWithJuceObject);
JUCE_END_IGNORE_WARNINGS_GCC_LIKE
addMethod (@selector (dealloc), dealloc, "v@:");
addMethod (@selector (dealloc), dealloc);
registerClass();
}

View file

@ -37,36 +37,36 @@ struct AppDelegateClass : public ObjCClass<NSObject>
{
AppDelegateClass() : ObjCClass<NSObject> ("JUCEAppDelegate_")
{
addMethod (@selector (applicationWillFinishLaunching:), applicationWillFinishLaunching, "v@:@");
addMethod (@selector (applicationShouldTerminate:), applicationShouldTerminate, "I@:@");
addMethod (@selector (applicationWillTerminate:), applicationWillTerminate, "v@:@");
addMethod (@selector (application:openFile:), application_openFile, "c@:@@");
addMethod (@selector (application:openFiles:), application_openFiles, "v@:@@");
addMethod (@selector (applicationDidBecomeActive:), applicationDidBecomeActive, "v@:@");
addMethod (@selector (applicationDidResignActive:), applicationDidResignActive, "v@:@");
addMethod (@selector (applicationWillUnhide:), applicationWillUnhide, "v@:@");
addMethod (@selector (applicationWillFinishLaunching:), applicationWillFinishLaunching);
addMethod (@selector (applicationShouldTerminate:), applicationShouldTerminate);
addMethod (@selector (applicationWillTerminate:), applicationWillTerminate);
addMethod (@selector (application:openFile:), application_openFile);
addMethod (@selector (application:openFiles:), application_openFiles);
addMethod (@selector (applicationDidBecomeActive:), applicationDidBecomeActive);
addMethod (@selector (applicationDidResignActive:), applicationDidResignActive);
addMethod (@selector (applicationWillUnhide:), applicationWillUnhide);
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wundeclared-selector")
addMethod (@selector (getUrl:withReplyEvent:), getUrl_withReplyEvent, "v@:@@");
addMethod (@selector (broadcastMessageCallback:), broadcastMessageCallback, "v@:@");
addMethod (@selector (mainMenuTrackingBegan:), mainMenuTrackingBegan, "v@:@");
addMethod (@selector (mainMenuTrackingEnded:), mainMenuTrackingEnded, "v@:@");
addMethod (@selector (dummyMethod), dummyMethod, "v@:");
addMethod (@selector (getUrl:withReplyEvent:), getUrl_withReplyEvent);
addMethod (@selector (broadcastMessageCallback:), broadcastMessageCallback);
addMethod (@selector (mainMenuTrackingBegan:), mainMenuTrackingBegan);
addMethod (@selector (mainMenuTrackingEnded:), mainMenuTrackingEnded);
addMethod (@selector (dummyMethod), dummyMethod);
JUCE_END_IGNORE_WARNINGS_GCC_LIKE
#if JUCE_PUSH_NOTIFICATIONS
//==============================================================================
addIvar<NSObject<NSApplicationDelegate, NSUserNotificationCenterDelegate>*> ("pushNotificationsDelegate");
addMethod (@selector (applicationDidFinishLaunching:), applicationDidFinishLaunching, "v@:@");
addMethod (@selector (applicationDidFinishLaunching:), applicationDidFinishLaunching);
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wundeclared-selector")
addMethod (@selector (setPushNotificationsDelegate:), setPushNotificationsDelegate, "v@:@");
addMethod (@selector (setPushNotificationsDelegate:), setPushNotificationsDelegate);
JUCE_END_IGNORE_WARNINGS_GCC_LIKE
addMethod (@selector (application:didRegisterForRemoteNotificationsWithDeviceToken:), registeredForRemoteNotifications, "v@:@@");
addMethod (@selector (application:didFailToRegisterForRemoteNotificationsWithError:), failedToRegisterForRemoteNotifications, "v@:@@");
addMethod (@selector (application:didReceiveRemoteNotification:), didReceiveRemoteNotification, "v@:@@");
addMethod (@selector (application:didRegisterForRemoteNotificationsWithDeviceToken:), registeredForRemoteNotifications);
addMethod (@selector (application:didFailToRegisterForRemoteNotificationsWithError:), failedToRegisterForRemoteNotifications);
addMethod (@selector (application:didReceiveRemoteNotification:), didReceiveRemoteNotification);
#endif
registerClass();
@ -515,7 +515,7 @@ private:
addIvar<Pimpl*> ("owner");
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wundeclared-selector")
addMethod (@selector (changed:), changed, "v@:@");
addMethod (@selector (changed:), changed);
JUCE_END_IGNORE_WARNINGS_GCC_LIKE
addProtocol (@protocol (NSTextInput));

View file

@ -118,13 +118,13 @@ private:
AccessibilityContainer()
: ObjCClass ("JUCEUIAccessibilityElementContainer_")
{
addMethod (@selector (isAccessibilityElement), getIsAccessibilityElement, "c@:");
addMethod (@selector (accessibilityFrame), getAccessibilityFrame, @encode (CGRect), "@:");
addMethod (@selector (accessibilityElements), getAccessibilityElements, "@@:");
addMethod (@selector (isAccessibilityElement), getIsAccessibilityElement);
addMethod (@selector (accessibilityFrame), getAccessibilityFrame);
addMethod (@selector (accessibilityElements), getAccessibilityElements);
#if JUCE_IOS_CONTAINER_API_AVAILABLE
if (@available (iOS 11.0, *))
addMethod (@selector (accessibilityContainerType), getAccessibilityContainerType, "i@:");
addMethod (@selector (accessibilityContainerType), getAccessibilityContainerType);
#endif
addIvar<AccessibilityHandler*> ("handler");
@ -200,42 +200,42 @@ private:
AccessibilityElement (Type elementType)
{
addMethod (@selector (isAccessibilityElement), getIsAccessibilityElement, "c@:");
addMethod (@selector (accessibilityContainer), getAccessibilityContainer, "@@:");
addMethod (@selector (accessibilityFrame), getAccessibilityFrame, @encode (CGRect), "@:");
addMethod (@selector (accessibilityTraits), getAccessibilityTraits, "i@:");
addMethod (@selector (accessibilityLabel), getAccessibilityTitle, "@@:");
addMethod (@selector (accessibilityHint), getAccessibilityHelp, "@@:");
addMethod (@selector (accessibilityValue), getAccessibilityValue, "@@:");
addMethod (@selector (setAccessibilityValue:), setAccessibilityValue, "v@:@");
addMethod (@selector (isAccessibilityElement), getIsAccessibilityElement);
addMethod (@selector (accessibilityContainer), getAccessibilityContainer);
addMethod (@selector (accessibilityFrame), getAccessibilityFrame);
addMethod (@selector (accessibilityTraits), getAccessibilityTraits);
addMethod (@selector (accessibilityLabel), getAccessibilityTitle);
addMethod (@selector (accessibilityHint), getAccessibilityHelp);
addMethod (@selector (accessibilityValue), getAccessibilityValue);
addMethod (@selector (setAccessibilityValue:), setAccessibilityValue);
addMethod (@selector (accessibilityElementDidBecomeFocused), onFocusGain, "v@:");
addMethod (@selector (accessibilityElementDidLoseFocus), onFocusLoss, "v@:");
addMethod (@selector (accessibilityElementIsFocused), isFocused, "c@:");
addMethod (@selector (accessibilityViewIsModal), getIsAccessibilityModal, "c@:");
addMethod (@selector (accessibilityElementDidBecomeFocused), onFocusGain);
addMethod (@selector (accessibilityElementDidLoseFocus), onFocusLoss);
addMethod (@selector (accessibilityElementIsFocused), isFocused);
addMethod (@selector (accessibilityViewIsModal), getIsAccessibilityModal);
addMethod (@selector (accessibilityActivate), accessibilityPerformActivate, "c@:");
addMethod (@selector (accessibilityIncrement), accessibilityPerformIncrement, "c@:");
addMethod (@selector (accessibilityDecrement), accessibilityPerformDecrement, "c@:");
addMethod (@selector (accessibilityPerformEscape), accessibilityPerformEscape, "c@:");
addMethod (@selector (accessibilityActivate), accessibilityPerformActivate);
addMethod (@selector (accessibilityIncrement), accessibilityPerformIncrement);
addMethod (@selector (accessibilityDecrement), accessibilityPerformDecrement);
addMethod (@selector (accessibilityPerformEscape), accessibilityPerformEscape);
#if JUCE_IOS_CONTAINER_API_AVAILABLE
if (@available (iOS 11.0, *))
{
addMethod (@selector (accessibilityDataTableCellElementForRow:column:), getAccessibilityDataTableCellElementForRowColumn, "@@:ii");
addMethod (@selector (accessibilityRowCount), getAccessibilityRowCount, "i@:");
addMethod (@selector (accessibilityColumnCount), getAccessibilityColumnCount, "i@:");
addMethod (@selector (accessibilityRowRange), getAccessibilityRowIndexRange, @encode (NSRange), "@:");
addMethod (@selector (accessibilityColumnRange), getAccessibilityColumnIndexRange, @encode (NSRange), "@:");
addMethod (@selector (accessibilityDataTableCellElementForRow:column:), getAccessibilityDataTableCellElementForRowColumn);
addMethod (@selector (accessibilityRowCount), getAccessibilityRowCount);
addMethod (@selector (accessibilityColumnCount), getAccessibilityColumnCount);
addMethod (@selector (accessibilityRowRange), getAccessibilityRowIndexRange);
addMethod (@selector (accessibilityColumnRange), getAccessibilityColumnIndexRange);
}
#endif
if (elementType == Type::textElement)
{
addMethod (@selector (accessibilityLineNumberForPoint:), getAccessibilityLineNumberForPoint, "i@:", @encode (CGPoint));
addMethod (@selector (accessibilityContentForLineNumber:), getAccessibilityContentForLineNumber, "@@:i");
addMethod (@selector (accessibilityFrameForLineNumber:), getAccessibilityFrameForLineNumber, @encode (CGRect), "@:i");
addMethod (@selector (accessibilityPageContent), getAccessibilityPageContent, "@@:");
addMethod (@selector (accessibilityLineNumberForPoint:), getAccessibilityLineNumberForPoint);
addMethod (@selector (accessibilityContentForLineNumber:), getAccessibilityContentForLineNumber);
addMethod (@selector (accessibilityFrameForLineNumber:), getAccessibilityFrameForLineNumber);
addMethod (@selector (accessibilityPageContent), getAccessibilityPageContent);
addProtocol (@protocol (UIAccessibilityReadingContent));
}

View file

@ -71,70 +71,70 @@ private:
private:
AccessibilityElement()
{
addMethod (@selector (accessibilityNotifiesWhenDestroyed), getAccessibilityNotifiesWhenDestroyed, "c@:");
addMethod (@selector (isAccessibilityElement), getIsAccessibilityElement, "c@:");
addMethod (@selector (isAccessibilityEnabled), getIsAccessibilityEnabled, "c@:");
addMethod (@selector (accessibilityWindow), getAccessibilityWindow, "@@:");
addMethod (@selector (accessibilityTopLevelUIElement), getAccessibilityWindow, "@@:");
addMethod (@selector (accessibilityFocusedUIElement), getAccessibilityFocusedUIElement, "@@:");
addMethod (@selector (accessibilityHitTest:), accessibilityHitTest, "@@:", @encode (NSPoint));
addMethod (@selector (accessibilityParent), getAccessibilityParent, "@@:");
addMethod (@selector (accessibilityChildren), getAccessibilityChildren, "@@:");
addMethod (@selector (isAccessibilityFocused), getIsAccessibilityFocused, "c@:");
addMethod (@selector (setAccessibilityFocused:), setAccessibilityFocused, "v@:c");
addMethod (@selector (isAccessibilityModal), getIsAccessibilityModal, "c@:");
addMethod (@selector (accessibilityFrame), getAccessibilityFrame, @encode (NSRect), "@:");
addMethod (@selector (accessibilityRole), getAccessibilityRole, "@@:");
addMethod (@selector (accessibilitySubrole), getAccessibilitySubrole, "@@:");
addMethod (@selector (accessibilityTitle), getAccessibilityTitle, "@@:");
addMethod (@selector (accessibilityLabel), getAccessibilityLabel, "@@:");
addMethod (@selector (accessibilityHelp), getAccessibilityHelp, "@@:");
addMethod (@selector (accessibilityValue), getAccessibilityValue, "@@:");
addMethod (@selector (setAccessibilityValue:), setAccessibilityValue, "v@:@");
addMethod (@selector (accessibilitySelectedChildren), getAccessibilitySelectedChildren, "@@:");
addMethod (@selector (setAccessibilitySelectedChildren:), setAccessibilitySelectedChildren, "v@:@");
addMethod (@selector (accessibilityOrientation), getAccessibilityOrientation, "i@:@");
addMethod (@selector (accessibilityNotifiesWhenDestroyed), getAccessibilityNotifiesWhenDestroyed);
addMethod (@selector (isAccessibilityElement), getIsAccessibilityElement);
addMethod (@selector (isAccessibilityEnabled), getIsAccessibilityEnabled);
addMethod (@selector (accessibilityWindow), getAccessibilityWindow);
addMethod (@selector (accessibilityTopLevelUIElement), getAccessibilityWindow);
addMethod (@selector (accessibilityFocusedUIElement), getAccessibilityFocusedUIElement);
addMethod (@selector (accessibilityHitTest:), accessibilityHitTest);
addMethod (@selector (accessibilityParent), getAccessibilityParent);
addMethod (@selector (accessibilityChildren), getAccessibilityChildren);
addMethod (@selector (isAccessibilityFocused), getIsAccessibilityFocused);
addMethod (@selector (setAccessibilityFocused:), setAccessibilityFocused);
addMethod (@selector (isAccessibilityModal), getIsAccessibilityModal);
addMethod (@selector (accessibilityFrame), getAccessibilityFrame);
addMethod (@selector (accessibilityRole), getAccessibilityRole);
addMethod (@selector (accessibilitySubrole), getAccessibilitySubrole);
addMethod (@selector (accessibilityTitle), getAccessibilityTitle);
addMethod (@selector (accessibilityLabel), getAccessibilityLabel);
addMethod (@selector (accessibilityHelp), getAccessibilityHelp);
addMethod (@selector (accessibilityValue), getAccessibilityValue);
addMethod (@selector (setAccessibilityValue:), setAccessibilityValue);
addMethod (@selector (accessibilitySelectedChildren), getAccessibilitySelectedChildren);
addMethod (@selector (setAccessibilitySelectedChildren:), setAccessibilitySelectedChildren);
addMethod (@selector (accessibilityOrientation), getAccessibilityOrientation);
addMethod (@selector (accessibilityInsertionPointLineNumber), getAccessibilityInsertionPointLineNumber, "i@:");
addMethod (@selector (accessibilityVisibleCharacterRange), getAccessibilityVisibleCharacterRange, @encode (NSRange), "@:");
addMethod (@selector (accessibilityNumberOfCharacters), getAccessibilityNumberOfCharacters, "i@:");
addMethod (@selector (accessibilitySelectedText), getAccessibilitySelectedText, "@@:");
addMethod (@selector (accessibilitySelectedTextRange), getAccessibilitySelectedTextRange, @encode (NSRange), "@:");
addMethod (@selector (accessibilityAttributedStringForRange:), getAccessibilityAttributedStringForRange, "@@:", @encode (NSRange));
addMethod (@selector (accessibilityRangeForLine:), getAccessibilityRangeForLine, @encode (NSRange), "@:i");
addMethod (@selector (accessibilityStringForRange:), getAccessibilityStringForRange, "@@:", @encode (NSRange));
addMethod (@selector (accessibilityRangeForPosition:), getAccessibilityRangeForPosition, @encode (NSRange), "@:", @encode (NSPoint));
addMethod (@selector (accessibilityRangeForIndex:), getAccessibilityRangeForIndex, @encode (NSRange), "@:i");
addMethod (@selector (accessibilityFrameForRange:), getAccessibilityFrameForRange, @encode (NSRect), "@:", @encode (NSRange));
addMethod (@selector (accessibilityLineForIndex:), getAccessibilityLineForIndex, "i@:i");
addMethod (@selector (setAccessibilitySelectedTextRange:), setAccessibilitySelectedTextRange, "v@:", @encode (NSRange));
addMethod (@selector (accessibilityInsertionPointLineNumber), getAccessibilityInsertionPointLineNumber);
addMethod (@selector (accessibilityVisibleCharacterRange), getAccessibilityVisibleCharacterRange);
addMethod (@selector (accessibilityNumberOfCharacters), getAccessibilityNumberOfCharacters);
addMethod (@selector (accessibilitySelectedText), getAccessibilitySelectedText);
addMethod (@selector (accessibilitySelectedTextRange), getAccessibilitySelectedTextRange);
addMethod (@selector (accessibilityAttributedStringForRange:), getAccessibilityAttributedStringForRange);
addMethod (@selector (accessibilityRangeForLine:), getAccessibilityRangeForLine);
addMethod (@selector (accessibilityStringForRange:), getAccessibilityStringForRange);
addMethod (@selector (accessibilityRangeForPosition:), getAccessibilityRangeForPosition);
addMethod (@selector (accessibilityRangeForIndex:), getAccessibilityRangeForIndex);
addMethod (@selector (accessibilityFrameForRange:), getAccessibilityFrameForRange);
addMethod (@selector (accessibilityLineForIndex:), getAccessibilityLineForIndex);
addMethod (@selector (setAccessibilitySelectedTextRange:), setAccessibilitySelectedTextRange);
addMethod (@selector (accessibilityRowCount), getAccessibilityRowCount, "i@:");
addMethod (@selector (accessibilityRows), getAccessibilityRows, "@@:");
addMethod (@selector (accessibilitySelectedRows), getAccessibilitySelectedRows, "@@:");
addMethod (@selector (setAccessibilitySelectedRows:), setAccessibilitySelectedRows, "v@:@");
addMethod (@selector (accessibilityColumnCount), getAccessibilityColumnCount, "i@:");
addMethod (@selector (accessibilityColumns), getAccessibilityColumns, "@@:");
addMethod (@selector (accessibilitySelectedColumns), getAccessibilitySelectedColumns, "@@:");
addMethod (@selector (setAccessibilitySelectedColumns:), setAccessibilitySelectedColumns, "v@:@");
addMethod (@selector (accessibilityRowCount), getAccessibilityRowCount);
addMethod (@selector (accessibilityRows), getAccessibilityRows);
addMethod (@selector (accessibilitySelectedRows), getAccessibilitySelectedRows);
addMethod (@selector (setAccessibilitySelectedRows:), setAccessibilitySelectedRows);
addMethod (@selector (accessibilityColumnCount), getAccessibilityColumnCount);
addMethod (@selector (accessibilityColumns), getAccessibilityColumns);
addMethod (@selector (accessibilitySelectedColumns), getAccessibilitySelectedColumns);
addMethod (@selector (setAccessibilitySelectedColumns:), setAccessibilitySelectedColumns);
addMethod (@selector (accessibilityRowIndexRange), getAccessibilityRowIndexRange, @encode (NSRange), "@:");
addMethod (@selector (accessibilityColumnIndexRange), getAccessibilityColumnIndexRange, @encode (NSRange), "@:");
addMethod (@selector (accessibilityIndex), getAccessibilityIndex, "i@:");
addMethod (@selector (accessibilityDisclosureLevel), getAccessibilityDisclosureLevel, "i@:");
addMethod (@selector (isAccessibilityExpanded), getIsAccessibilityExpanded, "c@:");
addMethod (@selector (accessibilityRowIndexRange), getAccessibilityRowIndexRange);
addMethod (@selector (accessibilityColumnIndexRange), getAccessibilityColumnIndexRange);
addMethod (@selector (accessibilityIndex), getAccessibilityIndex);
addMethod (@selector (accessibilityDisclosureLevel), getAccessibilityDisclosureLevel);
addMethod (@selector (isAccessibilityExpanded), getIsAccessibilityExpanded);
addMethod (@selector (accessibilityPerformIncrement), accessibilityPerformIncrement, "c@:");
addMethod (@selector (accessibilityPerformDecrement), accessibilityPerformDecrement, "c@:");
addMethod (@selector (accessibilityPerformDelete), accessibilityPerformDelete, "c@:");
addMethod (@selector (accessibilityPerformPress), accessibilityPerformPress, "c@:");
addMethod (@selector (accessibilityPerformShowMenu), accessibilityPerformShowMenu, "c@:");
addMethod (@selector (accessibilityPerformRaise), accessibilityPerformRaise, "c@:");
addMethod (@selector (accessibilityPerformIncrement), accessibilityPerformIncrement);
addMethod (@selector (accessibilityPerformDecrement), accessibilityPerformDecrement);
addMethod (@selector (accessibilityPerformDelete), accessibilityPerformDelete);
addMethod (@selector (accessibilityPerformPress), accessibilityPerformPress);
addMethod (@selector (accessibilityPerformShowMenu), accessibilityPerformShowMenu);
addMethod (@selector (accessibilityPerformRaise), accessibilityPerformRaise);
addMethod (@selector (isAccessibilitySelectorAllowed:), getIsAccessibilitySelectorAllowed, "c@:@");
addMethod (@selector (isAccessibilitySelectorAllowed:), getIsAccessibilitySelectorAllowed);
#if defined (MAC_OS_X_VERSION_10_13) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_13
addMethod (@selector (accessibilityChildrenInNavigationOrder), getAccessibilityChildren, "@@:");
addMethod (@selector (accessibilityChildrenInNavigationOrder), getAccessibilityChildren);
#endif
registerClass();

View file

@ -176,7 +176,7 @@ private:
{
PopoverDelegateClass() : ObjCClass<NSObject<UIPopoverPresentationControllerDelegate>> ("PopoverDelegateClass_")
{
addMethod (@selector (popoverPresentationController:willRepositionPopoverToRect:inView:), willRepositionPopover, "v@:@@@");
addMethod (@selector (popoverPresentationController:willRepositionPopoverToRect:inView:), willRepositionPopover);
registerClass();
}

View file

@ -301,8 +301,8 @@ private:
{
addIvar<Native*> ("owner");
addMethod (@selector (documentPicker:didPickDocumentAtURL:), didPickDocumentAtURL, "v@:@@");
addMethod (@selector (documentPickerWasCancelled:), documentPickerWasCancelled, "v@:@");
addMethod (@selector (documentPicker:didPickDocumentAtURL:), didPickDocumentAtURL);
addMethod (@selector (documentPickerWasCancelled:), documentPickerWasCancelled);
addProtocol (@protocol (UIDocumentPickerDelegate));
@ -331,7 +331,7 @@ private:
FileChooserControllerClass() : ObjCClass<UIDocumentPickerViewController> ("FileChooserController_")
{
addIvar<Native*> ("owner");
addMethod (@selector (viewDidDisappear:), viewDidDisappear, "v@:@c");
addMethod (@selector (viewDidDisappear:), viewDidDisappear);
registerClass();
}

View file

@ -732,7 +732,7 @@ private:
addIvar<NativeDarkModeChangeDetectorImpl*> ("owner");
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wundeclared-selector")
addMethod (@selector (darkModeChanged:), darkModeChanged, "v@:@");
addMethod (@selector (darkModeChanged:), darkModeChanged);
JUCE_END_IGNORE_WARNINGS_GCC_LIKE
registerClass();

View file

@ -336,8 +336,7 @@ private:
explicit SafeModalPanel (const char* name) : ObjCClass<Base> (name)
{
this->addMethod (@selector (preventsApplicationTerminationWhenModal),
preventsApplicationTerminationWhenModal,
"c@:");
preventsApplicationTerminationWhenModal);
this->registerClass();
}
@ -360,8 +359,8 @@ private:
{
addIvar<Native*> ("cppObject");
addMethod (@selector (panel:shouldShowFilename:), shouldShowFilename, "c@:@@");
addMethod (@selector (panelSelectionDidChange:), panelSelectionDidChange, "c@");
addMethod (@selector (panel:shouldShowFilename:), shouldShowFilename);
addMethod (@selector (panelSelectionDidChange:), panelSelectionDidChange);
addProtocol (@protocol (NSOpenSavePanelDelegate));

View file

@ -457,8 +457,8 @@ private:
{
ValidatorClass() : ObjCClass ("JUCEMenuValidator_")
{
addMethod (menuItemInvokedSelector, menuItemInvoked, "c@:@");
addMethod (@selector (validateMenuItem:), validateMenuItem, "c@:@");
addMethod (menuItemInvokedSelector, menuItemInvoked);
addMethod (@selector (validateMenuItem:), validateMenuItem);
#if defined (MAC_OS_X_VERSION_10_14)
addProtocol (@protocol (NSMenuItemValidation));
@ -551,9 +551,9 @@ private:
{
addIvar<JuceMainMenuHandler*> ("owner");
addMethod (menuItemInvokedSelector, menuItemInvoked, "v@:@");
addMethod (@selector (menuNeedsUpdate:), menuNeedsUpdate, "v@:@");
addMethod (@selector (validateMenuItem:), validateMenuItem, "c@:@");
addMethod (menuItemInvokedSelector, menuItemInvoked);
addMethod (@selector (menuNeedsUpdate:), menuNeedsUpdate);
addMethod (@selector (validateMenuItem:), validateMenuItem);
addProtocol (@protocol (NSMenuDelegate));

View file

@ -1738,83 +1738,83 @@ struct JuceNSViewClass : public NSViewComponentPeerWrapper<ObjCClass<NSView>>
{
JuceNSViewClass() : NSViewComponentPeerWrapper ("JUCEView_")
{
addMethod (@selector (isOpaque), isOpaque, "c@:");
addMethod (@selector (drawRect:), drawRect, "v@:", @encode (NSRect));
addMethod (@selector (mouseDown:), mouseDown, "v@:@");
addMethod (@selector (mouseUp:), mouseUp, "v@:@");
addMethod (@selector (mouseDragged:), mouseDragged, "v@:@");
addMethod (@selector (mouseMoved:), mouseMoved, "v@:@");
addMethod (@selector (mouseEntered:), mouseEntered, "v@:@");
addMethod (@selector (mouseExited:), mouseExited, "v@:@");
addMethod (@selector (rightMouseDown:), mouseDown, "v@:@");
addMethod (@selector (rightMouseDragged:), mouseDragged, "v@:@");
addMethod (@selector (rightMouseUp:), mouseUp, "v@:@");
addMethod (@selector (otherMouseDown:), mouseDown, "v@:@");
addMethod (@selector (otherMouseDragged:), mouseDragged, "v@:@");
addMethod (@selector (otherMouseUp:), mouseUp, "v@:@");
addMethod (@selector (scrollWheel:), scrollWheel, "v@:@");
addMethod (@selector (magnifyWithEvent:), magnify, "v@:@");
addMethod (@selector (acceptsFirstMouse:), acceptsFirstMouse, "c@:@");
addMethod (@selector (windowWillMiniaturize:), windowWillMiniaturize, "v@:@");
addMethod (@selector (windowDidDeminiaturize:), windowDidDeminiaturize, "v@:@");
addMethod (@selector (wantsDefaultClipping), wantsDefaultClipping, "c@:");
addMethod (@selector (worksWhenModal), worksWhenModal, "c@:");
addMethod (@selector (viewDidMoveToWindow), viewDidMoveToWindow, "v@:");
addMethod (@selector (viewWillDraw), viewWillDraw, "v@:");
addMethod (@selector (keyDown:), keyDown, "v@:@");
addMethod (@selector (keyUp:), keyUp, "v@:@");
addMethod (@selector (insertText:), insertText, "v@:@");
addMethod (@selector (doCommandBySelector:), doCommandBySelector, "v@::");
addMethod (@selector (setMarkedText:selectedRange:), setMarkedText, "v@:@", @encode (NSRange));
addMethod (@selector (unmarkText), unmarkText, "v@:");
addMethod (@selector (hasMarkedText), hasMarkedText, "c@:");
addMethod (@selector (conversationIdentifier), conversationIdentifier, "l@:");
addMethod (@selector (attributedSubstringFromRange:), attributedSubstringFromRange, "@@:", @encode (NSRange));
addMethod (@selector (markedRange), markedRange, @encode (NSRange), "@:");
addMethod (@selector (selectedRange), selectedRange, @encode (NSRange), "@:");
addMethod (@selector (firstRectForCharacterRange:), firstRectForCharacterRange, @encode (NSRect), "@:", @encode (NSRange));
addMethod (@selector (characterIndexForPoint:), characterIndexForPoint, "L@:", @encode (NSPoint));
addMethod (@selector (validAttributesForMarkedText), validAttributesForMarkedText, "@@:");
addMethod (@selector (flagsChanged:), flagsChanged, "v@:@");
addMethod (@selector (isOpaque), isOpaque);
addMethod (@selector (drawRect:), drawRect);
addMethod (@selector (mouseDown:), mouseDown);
addMethod (@selector (mouseUp:), mouseUp);
addMethod (@selector (mouseDragged:), mouseDragged);
addMethod (@selector (mouseMoved:), mouseMoved);
addMethod (@selector (mouseEntered:), mouseEntered);
addMethod (@selector (mouseExited:), mouseExited);
addMethod (@selector (rightMouseDown:), mouseDown);
addMethod (@selector (rightMouseDragged:), mouseDragged);
addMethod (@selector (rightMouseUp:), mouseUp);
addMethod (@selector (otherMouseDown:), mouseDown);
addMethod (@selector (otherMouseDragged:), mouseDragged);
addMethod (@selector (otherMouseUp:), mouseUp);
addMethod (@selector (scrollWheel:), scrollWheel);
addMethod (@selector (magnifyWithEvent:), magnify);
addMethod (@selector (acceptsFirstMouse:), acceptsFirstMouse);
addMethod (@selector (windowWillMiniaturize:), windowWillMiniaturize);
addMethod (@selector (windowDidDeminiaturize:), windowDidDeminiaturize);
addMethod (@selector (wantsDefaultClipping), wantsDefaultClipping);
addMethod (@selector (worksWhenModal), worksWhenModal);
addMethod (@selector (viewDidMoveToWindow), viewDidMoveToWindow);
addMethod (@selector (viewWillDraw), viewWillDraw);
addMethod (@selector (keyDown:), keyDown);
addMethod (@selector (keyUp:), keyUp);
addMethod (@selector (insertText:), insertText);
addMethod (@selector (doCommandBySelector:), doCommandBySelector);
addMethod (@selector (setMarkedText:selectedRange:), setMarkedText);
addMethod (@selector (unmarkText), unmarkText);
addMethod (@selector (hasMarkedText), hasMarkedText);
addMethod (@selector (conversationIdentifier), conversationIdentifier);
addMethod (@selector (attributedSubstringFromRange:), attributedSubstringFromRange);
addMethod (@selector (markedRange), markedRange);
addMethod (@selector (selectedRange), selectedRange);
addMethod (@selector (firstRectForCharacterRange:), firstRectForCharacterRange);
addMethod (@selector (characterIndexForPoint:), characterIndexForPoint);
addMethod (@selector (validAttributesForMarkedText), validAttributesForMarkedText);
addMethod (@selector (flagsChanged:), flagsChanged);
addMethod (@selector (becomeFirstResponder), becomeFirstResponder, "c@:");
addMethod (@selector (resignFirstResponder), resignFirstResponder, "c@:");
addMethod (@selector (acceptsFirstResponder), acceptsFirstResponder, "c@:");
addMethod (@selector (becomeFirstResponder), becomeFirstResponder);
addMethod (@selector (resignFirstResponder), resignFirstResponder);
addMethod (@selector (acceptsFirstResponder), acceptsFirstResponder);
addMethod (@selector (draggingEntered:), draggingEntered, @encode (NSDragOperation), "@:@");
addMethod (@selector (draggingUpdated:), draggingUpdated, @encode (NSDragOperation), "@:@");
addMethod (@selector (draggingEnded:), draggingEnded, "v@:@");
addMethod (@selector (draggingExited:), draggingExited, "v@:@");
addMethod (@selector (prepareForDragOperation:), prepareForDragOperation, "c@:@");
addMethod (@selector (performDragOperation:), performDragOperation, "c@:@");
addMethod (@selector (concludeDragOperation:), concludeDragOperation, "v@:@");
addMethod (@selector (draggingEntered:), draggingEntered);
addMethod (@selector (draggingUpdated:), draggingUpdated);
addMethod (@selector (draggingEnded:), draggingEnded);
addMethod (@selector (draggingExited:), draggingExited);
addMethod (@selector (prepareForDragOperation:), prepareForDragOperation);
addMethod (@selector (performDragOperation:), performDragOperation);
addMethod (@selector (concludeDragOperation:), concludeDragOperation);
addMethod (@selector (paste:), paste, "v@:@");
addMethod (@selector (copy:), copy, "v@:@");
addMethod (@selector (cut:), cut, "v@:@");
addMethod (@selector (selectAll:), selectAll, "v@:@");
addMethod (@selector (paste:), paste);
addMethod (@selector (copy:), copy);
addMethod (@selector (cut:), cut);
addMethod (@selector (selectAll:), selectAll);
addMethod (@selector (viewWillMoveToWindow:), willMoveToWindow, "v@:@");
addMethod (@selector (viewWillMoveToWindow:), willMoveToWindow);
addMethod (@selector (isAccessibilityElement), getIsAccessibilityElement, "c@:");
addMethod (@selector (accessibilityChildren), getAccessibilityChildren, "@@:");
addMethod (@selector (accessibilityHitTest:), accessibilityHitTest, "@@:", @encode (NSPoint));
addMethod (@selector (accessibilityFocusedUIElement), getAccessibilityFocusedUIElement, "@@:");
addMethod (@selector (isAccessibilityElement), getIsAccessibilityElement);
addMethod (@selector (accessibilityChildren), getAccessibilityChildren);
addMethod (@selector (accessibilityHitTest:), accessibilityHitTest);
addMethod (@selector (accessibilityFocusedUIElement), getAccessibilityFocusedUIElement);
// deprecated methods required for backwards compatibility
addMethod (@selector (accessibilityIsIgnored), getAccessibilityIsIgnored, "c@:");
addMethod (@selector (accessibilityAttributeValue:), getAccessibilityAttributeValue, "@@:@");
addMethod (@selector (accessibilityIsIgnored), getAccessibilityIsIgnored);
addMethod (@selector (accessibilityAttributeValue:), getAccessibilityAttributeValue);
addMethod (@selector (isFlipped), isFlipped, "c@:");
addMethod (@selector (isFlipped), isFlipped);
addMethod (NSViewComponentPeer::dismissModalsSelector, dismissModals, "v@:");
addMethod (NSViewComponentPeer::asyncMouseDownSelector, asyncMouseDown, "v@:@");
addMethod (NSViewComponentPeer::asyncMouseUpSelector, asyncMouseUp, "v@:@");
addMethod (NSViewComponentPeer::frameChangedSelector, frameChanged, "v@:@");
addMethod (NSViewComponentPeer::becomeKeySelector, becomeKey, "v@:@");
addMethod (NSViewComponentPeer::resignKeySelector, resignKey, "v@:@");
addMethod (NSViewComponentPeer::dismissModalsSelector, dismissModals);
addMethod (NSViewComponentPeer::asyncMouseDownSelector, asyncMouseDown);
addMethod (NSViewComponentPeer::asyncMouseUpSelector, asyncMouseUp);
addMethod (NSViewComponentPeer::frameChangedSelector, frameChanged);
addMethod (NSViewComponentPeer::becomeKeySelector, becomeKey);
addMethod (NSViewComponentPeer::resignKeySelector, resignKey);
addMethod (@selector (performKeyEquivalent:), performKeyEquivalent, "c@:@");
addMethod (@selector (performKeyEquivalent:), performKeyEquivalent);
addProtocol (@protocol (NSTextInput));
@ -2214,30 +2214,30 @@ struct JuceNSWindowClass : public NSViewComponentPeerWrapper<ObjCClass<NSWindo
{
JuceNSWindowClass() : NSViewComponentPeerWrapper ("JUCEWindow_")
{
addMethod (@selector (canBecomeKeyWindow), canBecomeKeyWindow, "c@:");
addMethod (@selector (canBecomeMainWindow), canBecomeMainWindow, "c@:");
addMethod (@selector (becomeKeyWindow), becomeKeyWindow, "v@:");
addMethod (@selector (resignKeyWindow), resignKeyWindow, "v@:");
addMethod (@selector (windowShouldClose:), windowShouldClose, "c@:@");
addMethod (@selector (constrainFrameRect:toScreen:), constrainFrameRect, @encode (NSRect), "@:", @encode (NSRect), "@");
addMethod (@selector (windowWillResize:toSize:), windowWillResize, @encode (NSSize), "@:@", @encode (NSSize));
addMethod (@selector (windowDidExitFullScreen:), windowDidExitFullScreen, "v@:@");
addMethod (@selector (windowWillEnterFullScreen:), windowWillEnterFullScreen, "v@:@");
addMethod (@selector (zoom:), zoom, "v@:@");
addMethod (@selector (windowWillStartLiveResize:), windowWillStartLiveResize, "v@:@");
addMethod (@selector (windowDidEndLiveResize:), windowDidEndLiveResize, "v@:@");
addMethod (@selector (window:shouldPopUpDocumentPathMenu:), shouldPopUpPathMenu, "c@:@", @encode (NSMenu*));
addMethod (@selector (isFlipped), isFlipped, "c@:");
addMethod (@selector (canBecomeKeyWindow), canBecomeKeyWindow);
addMethod (@selector (canBecomeMainWindow), canBecomeMainWindow);
addMethod (@selector (becomeKeyWindow), becomeKeyWindow);
addMethod (@selector (resignKeyWindow), resignKeyWindow);
addMethod (@selector (windowShouldClose:), windowShouldClose);
addMethod (@selector (constrainFrameRect:toScreen:), constrainFrameRect);
addMethod (@selector (windowWillResize:toSize:), windowWillResize);
addMethod (@selector (windowDidExitFullScreen:), windowDidExitFullScreen);
addMethod (@selector (windowWillEnterFullScreen:), windowWillEnterFullScreen);
addMethod (@selector (zoom:), zoom);
addMethod (@selector (windowWillStartLiveResize:), windowWillStartLiveResize);
addMethod (@selector (windowDidEndLiveResize:), windowDidEndLiveResize);
addMethod (@selector (window:shouldPopUpDocumentPathMenu:), shouldPopUpPathMenu);
addMethod (@selector (isFlipped), isFlipped);
addMethod (@selector (accessibilityTitle), getAccessibilityTitle, "@@:");
addMethod (@selector (accessibilityLabel), getAccessibilityLabel, "@@:");
addMethod (@selector (accessibilityTopLevelUIElement), getAccessibilityWindow, "@@:");
addMethod (@selector (accessibilityWindow), getAccessibilityWindow, "@@:");
addMethod (@selector (accessibilityRole), getAccessibilityRole, "@@:");
addMethod (@selector (accessibilitySubrole), getAccessibilitySubrole, "@@:");
addMethod (@selector (accessibilityTitle), getAccessibilityTitle);
addMethod (@selector (accessibilityLabel), getAccessibilityLabel);
addMethod (@selector (accessibilityTopLevelUIElement), getAccessibilityWindow);
addMethod (@selector (accessibilityWindow), getAccessibilityWindow);
addMethod (@selector (accessibilityRole), getAccessibilityRole);
addMethod (@selector (accessibilitySubrole), getAccessibilitySubrole);
addMethod (@selector (window:shouldDragDocumentWithEvent:from:withPasteboard:), shouldAllowIconDrag);
addMethod (@selector (window:shouldDragDocumentWithEvent:from:withPasteboard:),
shouldAllowIconDrag, "c@:@", @encode (NSEvent*), @encode (NSPoint), @encode (NSPasteboard*));
addProtocol (@protocol (NSWindowDelegate));

View file

@ -239,11 +239,11 @@ struct NSDraggingSourceHelper : public ObjCClass<NSObject<NSDraggingSource>>
addIvar<String*> ("text");
addIvar<NSDragOperation*> ("operation");
addMethod (@selector (dealloc), dealloc, "v@:");
addMethod (@selector (pasteboard:item:provideDataForType:), provideDataForType, "v@:@@@");
addMethod (@selector (dealloc), dealloc);
addMethod (@selector (pasteboard:item:provideDataForType:), provideDataForType);
addMethod (@selector (draggingSession:sourceOperationMaskForDraggingContext:), sourceOperationMaskForDraggingContext, "c@:@@");
addMethod (@selector (draggingSession:endedAtPoint:operation:), draggingSessionEnded, "v@:@@@");
addMethod (@selector (draggingSession:sourceOperationMaskForDraggingContext:), sourceOperationMaskForDraggingContext);
addMethod (@selector (draggingSession:endedAtPoint:operation:), draggingSessionEnded);
addProtocol (@protocol (NSPasteboardItemDataProvider));
@ -474,7 +474,7 @@ private:
addIvar<NativeDarkModeChangeDetectorImpl*> ("owner");
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wundeclared-selector")
addMethod (@selector (darkModeChanged:), darkModeChanged, "v@:@");
addMethod (@selector (darkModeChanged:), darkModeChanged);
JUCE_END_IGNORE_WARNINGS_GCC_LIKE
registerClass();

View file

@ -486,19 +486,19 @@ private:
{
addIvar<PushNotificationsDelegate*> ("self");
addMethod (@selector (application:didRegisterUserNotificationSettings:), didRegisterUserNotificationSettings, "v@:@@");
addMethod (@selector (application:didRegisterForRemoteNotificationsWithDeviceToken:), registeredForRemoteNotifications, "v@:@@");
addMethod (@selector (application:didFailToRegisterForRemoteNotificationsWithError:), failedToRegisterForRemoteNotifications, "v@:@@");
addMethod (@selector (application:didReceiveRemoteNotification:), didReceiveRemoteNotification, "v@:@@");
addMethod (@selector (application:didReceiveRemoteNotification:fetchCompletionHandler:), didReceiveRemoteNotificationFetchCompletionHandler, "v@:@@@");
addMethod (@selector (application:handleActionWithIdentifier:forRemoteNotification:withResponseInfo:completionHandler:), handleActionForRemoteNotificationCompletionHandler, "v@:@@@@@");
addMethod (@selector (application:didReceiveLocalNotification:), didReceiveLocalNotification, "v@:@@");
addMethod (@selector (application:handleActionWithIdentifier:forLocalNotification:completionHandler:), handleActionForLocalNotificationCompletionHandler, "v@:@@@@");
addMethod (@selector (application:handleActionWithIdentifier:forLocalNotification:withResponseInfo:completionHandler:), handleActionForLocalNotificationWithResponseCompletionHandler, "v@:@@@@@");
addMethod (@selector (application:didRegisterUserNotificationSettings:), didRegisterUserNotificationSettings);
addMethod (@selector (application:didRegisterForRemoteNotificationsWithDeviceToken:), registeredForRemoteNotifications);
addMethod (@selector (application:didFailToRegisterForRemoteNotificationsWithError:), failedToRegisterForRemoteNotifications);
addMethod (@selector (application:didReceiveRemoteNotification:), didReceiveRemoteNotification);
addMethod (@selector (application:didReceiveRemoteNotification:fetchCompletionHandler:), didReceiveRemoteNotificationFetchCompletionHandler);
addMethod (@selector (application:handleActionWithIdentifier:forRemoteNotification:withResponseInfo:completionHandler:), handleActionForRemoteNotificationCompletionHandler);
addMethod (@selector (application:didReceiveLocalNotification:), didReceiveLocalNotification);
addMethod (@selector (application:handleActionWithIdentifier:forLocalNotification:completionHandler:), handleActionForLocalNotificationCompletionHandler);
addMethod (@selector (application:handleActionWithIdentifier:forLocalNotification:withResponseInfo:completionHandler:), handleActionForLocalNotificationWithResponseCompletionHandler);
#if defined (__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0
addMethod (@selector (userNotificationCenter:willPresentNotification:withCompletionHandler:), willPresentNotificationWithCompletionHandler, "v@:@@@");
addMethod (@selector (userNotificationCenter:didReceiveNotificationResponse:withCompletionHandler:), didReceiveNotificationResponseWithCompletionHandler, "v@:@@@");
addMethod (@selector (userNotificationCenter:willPresentNotification:withCompletionHandler:), willPresentNotificationWithCompletionHandler);
addMethod (@selector (userNotificationCenter:didReceiveNotificationResponse:withCompletionHandler:), didReceiveNotificationResponseWithCompletionHandler);
#endif
registerClass();

View file

@ -44,7 +44,7 @@ struct NSViewFrameChangeCallbackClass : public ObjCClass<NSObject>
{
addIvar<NSViewCallbackInterface*> ("target");
addMethod (nsViewFrameChangedSelector, frameChanged, "v@:@");
addMethod (nsViewFrameChangedSelector, frameChanged);
registerClass();
}

View file

@ -307,12 +307,12 @@ private:
{
addIvar<PushNotificationsDelegate*> ("self");
addMethod (@selector (application:didRegisterForRemoteNotificationsWithDeviceToken:), registeredForRemoteNotifications, "v@:@@");
addMethod (@selector (application:didFailToRegisterForRemoteNotificationsWithError:), failedToRegisterForRemoteNotifications, "v@:@@");
addMethod (@selector (application:didReceiveRemoteNotification:), didReceiveRemoteNotification, "v@:@@");
addMethod (@selector (userNotificationCenter:didDeliverNotification:), didDeliverNotification, "v@:@@");
addMethod (@selector (userNotificationCenter:didActivateNotification:), didActivateNotification, "v@:@@");
addMethod (@selector (userNotificationCenter:shouldPresentNotification:), shouldPresentNotification, "c@:@@");
addMethod (@selector (application:didRegisterForRemoteNotificationsWithDeviceToken:), registeredForRemoteNotifications);
addMethod (@selector (application:didFailToRegisterForRemoteNotificationsWithError:), failedToRegisterForRemoteNotifications);
addMethod (@selector (application:didReceiveRemoteNotification:), didReceiveRemoteNotification);
addMethod (@selector (userNotificationCenter:didDeliverNotification:), didDeliverNotification);
addMethod (@selector (userNotificationCenter:didActivateNotification:), didActivateNotification);
addMethod (@selector (userNotificationCenter:shouldPresentNotification:), shouldPresentNotification);
registerClass();
}

View file

@ -184,7 +184,7 @@ struct ButtonBasedStatusItem : public StatusItemContainer
{
addIvar<ButtonBasedStatusItem*> ("owner");
addMethod (@selector (handleEvent:), handleEvent, "v@:@");
addMethod (@selector (handleEvent:), handleEvent);
registerClass();
}
@ -311,12 +311,12 @@ struct ViewBasedStatusItem : public StatusItemContainer
addIvar<ViewBasedStatusItem*> ("owner");
addIvar<NSImage*> ("image");
addMethod (@selector (mouseDown:), handleEventDown, "v@:@");
addMethod (@selector (rightMouseDown:), handleEventDown, "v@:@");
addMethod (@selector (drawRect:), drawRect, "v@:@");
addMethod (@selector (mouseDown:), handleEventDown);
addMethod (@selector (rightMouseDown:), handleEventDown);
addMethod (@selector (drawRect:), drawRect);
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wundeclared-selector")
addMethod (@selector (frameChanged:), frameChanged, "v@:@");
addMethod (@selector (frameChanged:), frameChanged);
JUCE_END_IGNORE_WARNINGS_GCC_LIKE
registerClass();

View file

@ -117,7 +117,7 @@ struct WebViewKeyEquivalentResponder : public ObjCClass<WebViewClass>
WebViewKeyEquivalentResponder()
: ObjCClass<WebViewClass> ("WebViewKeyEquivalentResponder_")
{
ObjCClass<WebViewClass>::addMethod (@selector (performKeyEquivalent:), performKeyEquivalent, @encode (BOOL), "@:@");
ObjCClass<WebViewClass>::addMethod (@selector (performKeyEquivalent:), performKeyEquivalent);
ObjCClass<WebViewClass>::registerClass();
}
@ -164,15 +164,13 @@ struct DownloadClickDetectorClass : public ObjCClass<NSObject>
{
addIvar<WebBrowserComponent*> ("owner");
addMethod (@selector (webView:decidePolicyForNavigationAction:request:frame:decisionListener:),
decidePolicyForNavigationAction, "v@:@@@@@");
addMethod (@selector (webView:decidePolicyForNewWindowAction:request:newFrameName:decisionListener:),
decidePolicyForNewWindowAction, "v@:@@@@@");
addMethod (@selector (webView:didFinishLoadForFrame:), didFinishLoadForFrame, "v@:@@");
addMethod (@selector (webView:didFailLoadWithError:forFrame:), didFailLoadWithError, "v@:@@@");
addMethod (@selector (webView:didFailProvisionalLoadWithError:forFrame:), didFailLoadWithError, "v@:@@@");
addMethod (@selector (webView:willCloseFrame:), willCloseFrame, "v@:@@");
addMethod (@selector (webView:runOpenPanelForFileButtonWithResultListener:allowMultipleFiles:), runOpenPanel, "v@:@@", @encode (BOOL));
addMethod (@selector (webView:decidePolicyForNavigationAction:request:frame:decisionListener:), decidePolicyForNavigationAction);
addMethod (@selector (webView:decidePolicyForNewWindowAction:request:newFrameName:decisionListener:), decidePolicyForNewWindowAction);
addMethod (@selector (webView:didFinishLoadForFrame:), didFinishLoadForFrame);
addMethod (@selector (webView:didFailLoadWithError:forFrame:), didFailLoadWithError);
addMethod (@selector (webView:didFailProvisionalLoadWithError:forFrame:), didFailLoadWithError);
addMethod (@selector (webView:willCloseFrame:), willCloseFrame);
addMethod (@selector (webView:runOpenPanelForFileButtonWithResultListener:allowMultipleFiles:), runOpenPanel);
registerClass();
}
@ -271,17 +269,17 @@ struct WebViewDelegateClass : public ObjCClass<NSObject>
{
addIvar<WebBrowserComponent*> ("owner");
addMethod (@selector (webView:decidePolicyForNavigationAction:decisionHandler:), decidePolicyForNavigationAction, "v@:@@@");
addMethod (@selector (webView:didFinishNavigation:), didFinishNavigation, "v@:@@");
addMethod (@selector (webView:didFailNavigation:withError:), didFailNavigation, "v@:@@@");
addMethod (@selector (webView:didFailProvisionalNavigation:withError:), didFailProvisionalNavigation, "v@:@@@");
addMethod (@selector (webViewDidClose:), webViewDidClose, "v@:@");
addMethod (@selector (webView:decidePolicyForNavigationAction:decisionHandler:), decidePolicyForNavigationAction);
addMethod (@selector (webView:didFinishNavigation:), didFinishNavigation);
addMethod (@selector (webView:didFailNavigation:withError:), didFailNavigation);
addMethod (@selector (webView:didFailProvisionalNavigation:withError:), didFailProvisionalNavigation);
addMethod (@selector (webViewDidClose:), webViewDidClose);
addMethod (@selector (webView:createWebViewWithConfiguration:forNavigationAction:
windowFeatures:), createWebView, "@@:@@@@");
windowFeatures:), createWebView);
#if WKWEBVIEW_OPENPANEL_SUPPORTED
if (@available (macOS 10.12, *))
addMethod (@selector (webView:runOpenPanelWithParameters:initiatedByFrame:completionHandler:), runOpenPanel, "v@:@@@@");
addMethod (@selector (webView:runOpenPanelWithParameters:initiatedByFrame:completionHandler:), runOpenPanel);
#endif
registerClass();

View file

@ -256,9 +256,9 @@ public:
{
MouseForwardingNSOpenGLViewClass() : ObjCClass<NSOpenGLView> ("JUCEGLView_")
{
addMethod (@selector (rightMouseDown:), rightMouseDown, "v@:@");
addMethod (@selector (rightMouseUp:), rightMouseUp, "v@:@");
addMethod (@selector (acceptsFirstMouse:), acceptsFirstMouse, "v@:@");
addMethod (@selector (rightMouseDown:), rightMouseDown);
addMethod (@selector (rightMouseUp:), rightMouseUp);
addMethod (@selector (acceptsFirstMouse:), acceptsFirstMouse);
registerClass();
}

View file

@ -54,13 +54,13 @@ private:
{
addIvar<SKDelegateAndPaymentObserver*> ("self");
addMethod (@selector (productsRequest:didReceiveResponse:), didReceiveResponse, "v@:@@");
addMethod (@selector (requestDidFinish:), requestDidFinish, "v@:@");
addMethod (@selector (request:didFailWithError:), requestDidFailWithError, "v@:@@");
addMethod (@selector (paymentQueue:updatedTransactions:), updatedTransactions, "v@:@@");
addMethod (@selector (paymentQueue:restoreCompletedTransactionsFailedWithError:), restoreCompletedTransactionsFailedWithError, "v@:@@");
addMethod (@selector (paymentQueueRestoreCompletedTransactionsFinished:), restoreCompletedTransactionsFinished, "v@:@");
addMethod (@selector (paymentQueue:updatedDownloads:), updatedDownloads, "v@:@@");
addMethod (@selector (productsRequest:didReceiveResponse:), didReceiveResponse);
addMethod (@selector (requestDidFinish:), requestDidFinish);
addMethod (@selector (request:didFailWithError:), requestDidFailWithError);
addMethod (@selector (paymentQueue:updatedTransactions:), updatedTransactions);
addMethod (@selector (paymentQueue:restoreCompletedTransactionsFailedWithError:), restoreCompletedTransactionsFailedWithError);
addMethod (@selector (paymentQueueRestoreCompletedTransactionsFinished:), restoreCompletedTransactionsFinished);
addMethod (@selector (paymentQueue:updatedDownloads:), updatedDownloads);
registerClass();
}

View file

@ -519,11 +519,11 @@ private:
SessionDelegateClass() : ObjCClass<NSObject> ("SessionDelegateClass_")
{
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wundeclared-selector")
addMethod (@selector (sessionDidStartRunning:), started, "v@:@");
addMethod (@selector (sessionDidStopRunning:), stopped, "v@:@");
addMethod (@selector (runtimeError:), runtimeError, "v@:@");
addMethod (@selector (sessionWasInterrupted:), interrupted, "v@:@");
addMethod (@selector (sessionInterruptionEnded:), interruptionEnded, "v@:@");
addMethod (@selector (sessionDidStartRunning:), started);
addMethod (@selector (sessionDidStopRunning:), stopped);
addMethod (@selector (runtimeError:), runtimeError);
addMethod (@selector (sessionWasInterrupted:), interrupted);
addMethod (@selector (sessionInterruptionEnded:), interruptionEnded);
JUCE_END_IGNORE_WARNINGS_GCC_LIKE
addIvar<CaptureSession*> ("owner");
@ -771,24 +771,20 @@ private:
public:
PhotoOutputDelegateClass() : ObjCClass<NSObject> ("PhotoOutputDelegateClass_")
{
addMethod (@selector (captureOutput:willBeginCaptureForResolvedSettings:), willBeginCaptureForSettings, "v@:@@");
addMethod (@selector (captureOutput:willCapturePhotoForResolvedSettings:), willCaptureForSettings, "v@:@@");
addMethod (@selector (captureOutput:didCapturePhotoForResolvedSettings:), didCaptureForSettings, "v@:@@");
addMethod (@selector (captureOutput:didFinishCaptureForResolvedSettings:error:), didFinishCaptureForSettings, "v@:@@@");
addMethod (@selector (captureOutput:willBeginCaptureForResolvedSettings:), willBeginCaptureForSettings);
addMethod (@selector (captureOutput:willCapturePhotoForResolvedSettings:), willCaptureForSettings);
addMethod (@selector (captureOutput:didCapturePhotoForResolvedSettings:), didCaptureForSettings);
addMethod (@selector (captureOutput:didFinishCaptureForResolvedSettings:error:), didFinishCaptureForSettings);
#if defined (__IPHONE_11_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_11_0
if (@available (iOS 11.0, *))
{
addMethod (@selector (captureOutput:didFinishProcessingPhoto:error:),
didFinishProcessingPhoto,
"v@:@@@");
addMethod (@selector (captureOutput:didFinishProcessingPhoto:error:), didFinishProcessingPhoto);
}
else
#endif
{
addMethod (@selector (captureOutput:didFinishProcessingPhotoSampleBuffer:previewPhotoSampleBuffer:resolvedSettings:bracketSettings:error:),
didFinishProcessingPhotoSampleBuffer,
"v@:@@@@@@");
addMethod (@selector (captureOutput:didFinishProcessingPhotoSampleBuffer:previewPhotoSampleBuffer:resolvedSettings:bracketSettings:error:), didFinishProcessingPhotoSampleBuffer);
}
addIvar<StillPictureTaker*> ("owner");
@ -1075,8 +1071,8 @@ private:
{
FileOutputRecordingDelegateClass() : ObjCClass<NSObject<AVCaptureFileOutputRecordingDelegate>> ("FileOutputRecordingDelegateClass_")
{
addMethod (@selector (captureOutput:didStartRecordingToOutputFileAtURL:fromConnections:), started, "v@:@@@");
addMethod (@selector (captureOutput:didFinishRecordingToOutputFileAtURL:fromConnections:error:), stopped, "v@:@@@@");
addMethod (@selector (captureOutput:didStartRecordingToOutputFileAtURL:fromConnections:), started);
addMethod (@selector (captureOutput:didFinishRecordingToOutputFileAtURL:fromConnections:error:), stopped);
addIvar<VideoRecorder*> ("owner");
@ -1261,7 +1257,7 @@ struct CameraDevice::ViewerComponent : public UIViewComponent
{
JuceCameraDeviceViewerClass() : ObjCClass<UIView> ("JuceCameraDeviceViewerClass_")
{
addMethod (@selector (layoutSubviews), layoutSubviews, "v@:");
addMethod (@selector (layoutSubviews), layoutSubviews);
registerClass();
}

View file

@ -201,13 +201,13 @@ private:
addIvar<Pimpl*> ("owner");
addProtocol (@protocol (AVCaptureFileOutputRecordingDelegate));
addMethod (@selector (captureOutput:didStartRecordingToOutputFileAtURL: fromConnections:), didStartRecordingToOutputFileAtURL, "v@:@@@");
addMethod (@selector (captureOutput:didPauseRecordingToOutputFileAtURL: fromConnections:), didPauseRecordingToOutputFileAtURL, "v@:@@@");
addMethod (@selector (captureOutput:didResumeRecordingToOutputFileAtURL: fromConnections:), didResumeRecordingToOutputFileAtURL, "v@:@@@");
addMethod (@selector (captureOutput:willFinishRecordingToOutputFileAtURL:fromConnections:error:), willFinishRecordingToOutputFileAtURL, "v@:@@@@");
addMethod (@selector (captureOutput:didStartRecordingToOutputFileAtURL: fromConnections:), didStartRecordingToOutputFileAtURL);
addMethod (@selector (captureOutput:didPauseRecordingToOutputFileAtURL: fromConnections:), didPauseRecordingToOutputFileAtURL);
addMethod (@selector (captureOutput:didResumeRecordingToOutputFileAtURL: fromConnections:), didResumeRecordingToOutputFileAtURL);
addMethod (@selector (captureOutput:willFinishRecordingToOutputFileAtURL:fromConnections:error:), willFinishRecordingToOutputFileAtURL);
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wundeclared-selector")
addMethod (@selector (captureSessionRuntimeError:), sessionRuntimeError, "v@:@");
addMethod (@selector (captureSessionRuntimeError:), sessionRuntimeError);
JUCE_END_IGNORE_WARNINGS_GCC_LIKE
registerClass();
@ -298,7 +298,7 @@ private:
public:
PhotoOutputDelegateClass() : ObjCClass<NSObject> ("PhotoOutputDelegateClass_")
{
addMethod (@selector (captureOutput:didFinishProcessingPhoto:error:), didFinishProcessingPhoto, "v@:@@@");
addMethod (@selector (captureOutput:didFinishProcessingPhoto:error:), didFinishProcessingPhoto);
addIvar<Pimpl*> ("owner");
registerClass();
}

View file

@ -206,7 +206,7 @@ private:
JucePlayerStatusObserverClass() : ObjCClass<NSObject> ("JucePlayerStatusObserverClass_")
{
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wundeclared-selector")
addMethod (@selector (observeValueForKeyPath:ofObject:change:context:), valueChanged, "v@:@@@?");
addMethod (@selector (observeValueForKeyPath:ofObject:change:context:), valueChanged);
JUCE_END_IGNORE_WARNINGS_GCC_LIKE
addIvar<PlayerAsyncInitialiser*> ("owner");
@ -250,7 +250,7 @@ private:
JucePlayerItemPlaybackStatusObserverClass() : ObjCClass<NSObject> ("JucePlayerItemPlaybackStatusObserverClass_")
{
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wundeclared-selector")
addMethod (@selector (processNotification:), notificationReceived, "v@:@");
addMethod (@selector (processNotification:), notificationReceived);
JUCE_END_IGNORE_WARNINGS_GCC_LIKE
addIvar<PlayerControllerBase*> ("owner");
@ -305,7 +305,7 @@ private:
JucePlayerItemPreparationStatusObserverClass() : ObjCClass<NSObject> ("JucePlayerItemStatusObserverClass_")
{
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wundeclared-selector")
addMethod (@selector (observeValueForKeyPath:ofObject:change:context:), valueChanged, "v@:@@@?");
addMethod (@selector (observeValueForKeyPath:ofObject:change:context:), valueChanged);
JUCE_END_IGNORE_WARNINGS_GCC_LIKE
addIvar<PlayerAsyncInitialiser*> ("owner");
@ -733,7 +733,7 @@ private:
{
JuceVideoViewerClass() : ObjCClass<UIView> ("JuceVideoViewerClass_")
{
addMethod (@selector (layoutSubviews), layoutSubviews, "v@:");
addMethod (@selector (layoutSubviews), layoutSubviews);
registerClass();
}