Changes suggested by @fredkeifer

Clean up declaration of protocols, but use informal protocols after the 10.6 API.
This commit is contained in:
Gregory Casamento 2021-09-26 07:56:30 -04:00 committed by GitHub
parent 04dfeb9501
commit 7d903e0246
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -94,7 +94,11 @@
#endif
@end
#if OS_API_VERSION(MAC_OS_X_VERSION_10_6, GS_API_LATEST)
@protocol NSComboBoxDataSource <NSObject>
#else
@interface NSObject (NSComboBoxDataSource)
#endif
- (NSInteger) numberOfItemsInComboBox: (NSComboBox *)aComboBox;
- (id) comboBox: (NSComboBox *)aComboBox objectValueForItemAtIndex:(NSInteger)index;
- (NSUInteger) comboBox: (NSComboBox *)aComboBox
@ -106,10 +110,11 @@
#endif
@end
@protocol NSComboBoxDataSource <NSObject>
@end
#if OS_API_VERSION(MAC_OS_X_VERSION_10_6, GS_API_LATEST)
@protocol NSComboBoxDelegate <NSTextFieldDelegate>
#else
@interface NSObject (NSComboBoxNotifications)
#endif
- (void) comboBoxWillPopUp: (NSNotification *)notification;
- (void) comboBoxWillDismiss: (NSNotification *)notification;
- (void) comboBoxSelectionDidChange: (NSNotification *)notification;