mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 13:10:59 +00:00
Update NSToolbar.h to use a formal protocol if API level is 10.6+
This commit is contained in:
parent
c814250079
commit
31dcf70a11
2 changed files with 18 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
2021-10-13 Gregory John Casamento <greg.casamento@gmail.com>
|
||||
|
||||
* Headers/AppKit/NSToolbar.h: Update to use formal protocol if
|
||||
API level is 10.6+.
|
||||
|
||||
2021-10-13 Gregory John Casamento <greg.casamento@gmail.com>
|
||||
|
||||
* Headers/AppKit/NSTabView.h: Update NSTabView.h to have a formal
|
||||
|
|
|
@ -144,11 +144,24 @@ typedef NSString* NSToolbarItemIdentifier;
|
|||
/*
|
||||
* Methods Implemented by the Delegate
|
||||
*/
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_6, GS_API_LATEST)
|
||||
@protocol NSToolbarDelegate <NSObject>
|
||||
#if GS_PROTOCOLS_HAVE_OPTIONAL
|
||||
@optional
|
||||
#endif
|
||||
#else
|
||||
@interface NSObject (NSToolbarDelegate)
|
||||
#endif
|
||||
// notification methods
|
||||
- (void) toolbarDidRemoveItem: (NSNotification*)aNotification;
|
||||
- (void) toolbarWillAddItem: (NSNotification*)aNotification;
|
||||
|
||||
// optional method
|
||||
- (NSArray *) toolbarSelectableItemIdentifiers: (NSToolbar *)toolbar;
|
||||
|
||||
#if GS_PROTOCOLS_HAVE_OPTIONAL
|
||||
@required
|
||||
#endif
|
||||
// delegate methods
|
||||
// required method
|
||||
- (NSToolbarItem*)toolbar: (NSToolbar*)toolbar
|
||||
|
@ -158,8 +171,6 @@ willBeInsertedIntoToolbar: (BOOL)flag;
|
|||
- (NSArray*) toolbarAllowedItemIdentifiers: (NSToolbar*)toolbar;
|
||||
// required method
|
||||
- (NSArray*) toolbarDefaultItemIdentifiers: (NSToolbar*)toolbar;
|
||||
// optional method
|
||||
- (NSArray *) toolbarSelectableItemIdentifiers: (NSToolbar *)toolbar;
|
||||
@end
|
||||
|
||||
#endif /* _GNUstep_H_NSToolbar */
|
||||
|
|
Loading…
Reference in a new issue