Add implementation of NSUserInterfaceItemIdentifier to NSView

This commit is contained in:
Gregory John Casamento 2024-04-19 23:46:33 -04:00
parent 8c9278e12a
commit 9da7bd4502
2 changed files with 13 additions and 1 deletions

View file

@ -37,6 +37,7 @@
#import <AppKit/NSAppearance.h>
#import <AppKit/NSGraphicsContext.h>
#import <AppKit/NSResponder.h>
#import <AppKit/NSUserInterfaceItemIdentification.h>
#import <AppKit/NSUserInterfaceLayout.h>
#import <AppKit/NSLayoutConstraint.h>
@ -130,7 +131,7 @@ extern const CGFloat NSViewNoInstrinsicMetric;
extern const CGFloat NSViewNoIntrinsicMetric;
APPKIT_EXPORT_CLASS
@interface NSView : NSResponder <NSAppearanceCustomization>
@interface NSView : NSResponder <NSAppearanceCustomization, NSUserInterfaceItemIdentification>
{
NSRect _frame;
NSRect _bounds;
@ -197,6 +198,7 @@ PACKAGE_SCOPE
NSRect _autoresizingFrameError;
NSShadow *_shadow;
NSAppearance* _appearance;
NSUserInterfaceItemIdentifier _identifier;
}
/*

View file

@ -5281,6 +5281,16 @@ static NSView* findByTag(NSView *view, NSInteger aTag, NSUInteger *level)
}
}
- (void) setIdentifier: (NSUserInterfaceItemIdentifier) identifier
{
ASSIGN(_identifier, identifier);
}
- (NSUserInterfaceItemIdentifier) identifier
{
return _identifier;
}
@end
#if OS_API_VERSION(MAC_OS_X_VERSION_10_7, GS_API_LATEST)