Skip to content

Instantly share code, notes, and snippets.

@danwalmsley
Created February 26, 2021 21:36
Show Gist options
  • Save danwalmsley/c941292cc8c29be20caf906f5e3ef682 to your computer and use it in GitHub Desktop.
Save danwalmsley/c941292cc8c29be20caf906f5e3ef682 to your computer and use it in GitHub Desktop.
/*
NSAccessibilityElement.h
Application Kit
Copyright (c) 2013-2019, Apple Inc.
All rights reserved.
*/
#import <Foundation/Foundation.h>
#import <AppKit/NSAccessibilityConstants.h>
#import <AppKit/NSAccessibilityProtocols.h>
#import <AppKit/AppKitDefines.h>
/* An NSAccessibilityElement is used to convey information regarding onscreen UI through the accessibility API for UI that may not already have a single backing object. For example, if a single NSView subclass draws 4 buttons, it would vend 4 NSAccessibilityElements as accessibilityChildren. Note that as long as the UI is around, the vendor of NSAccessibilityElements must maintain ownership of the NSAccessibilityElements. */
NS_ASSUME_NONNULL_BEGIN
APPKIT_API_UNAVAILABLE_BEGIN_MACCATALYST
API_AVAILABLE(macos(10.10))
@interface NSAccessibilityElement : NSObject <NSAccessibility>
+ (id)accessibilityElementWithRole:(NSAccessibilityRole)role frame:(NSRect)frame label:(nullable NSString *)label parent:(nullable id)parent;
- (void)accessibilityAddChildElement:(NSAccessibilityElement *)childElement;
// Accessibility frame in the cordinate system of the accessibility parent
@property NSRect accessibilityFrameInParentSpace;
@end
API_UNAVAILABLE_END
NS_ASSUME_NONNULL_END
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment