NSSpeechSynthesizerDelegate: define protocol properly

Modern applications require NSSpeechSynthesizerDelegate to be an actual
@protocol in order to conform to it. Here, we allow it to be one if we
are on an Objective-C runtime that supports it.
This commit is contained in:
Daniel Ferreira 2017-07-18 03:44:58 +10:00 committed by Ivan Vučica
parent fd6e7f2e42
commit f665887c68

View file

@ -151,8 +151,13 @@ extern NSString *NSSpeechDictionaryEntryPhonemes;
- (NSString *) phonemesFromText: (NSString *)text;
@end
// Speech synthesizer delegate informal protocol...
@protocol NSSpeechSynthesizerDelegate <NSObject>
#if GS_PROTOCOLS_HAVE_OPTIONAL
@optional
#else
@end
@interface NSObject (NSSpeechSynthesizerDelegate)
#endif
- (void)speechSynthesizer: (NSSpeechSynthesizer *)sender
didEncounterErrorAtIndex: (NSUInteger)index
ofString: (NSString *)string