summaryrefslogtreecommitdiffstats
path: root/accessible/ios/MUIRootAccessibleProtocol.h
diff options
context:
space:
mode:
Diffstat (limited to 'accessible/ios/MUIRootAccessibleProtocol.h')
-rw-r--r--accessible/ios/MUIRootAccessibleProtocol.h51
1 files changed, 51 insertions, 0 deletions
diff --git a/accessible/ios/MUIRootAccessibleProtocol.h b/accessible/ios/MUIRootAccessibleProtocol.h
new file mode 100644
index 0000000000..23451021ac
--- /dev/null
+++ b/accessible/ios/MUIRootAccessibleProtocol.h
@@ -0,0 +1,51 @@
+/* clang-format off */
+/* -*- Mode: Objective-C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* clang-format on */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#import <Foundation/Foundation.h>
+#import <UIKit/UIAccessibility.h>
+
+/* This protocol's primary use is so widget/cocoa can talk back to us
+ properly.
+
+ ChildView owns the topmost MUIRootAccessible, and needs to take care of
+ setting up that parent/child relationship.
+
+ This protocol is thus used to make sure it knows it's talking to us, and not
+ just some random |id|.
+*/
+
+@protocol MUIRootAccessibleProtocol <NSObject>
+
+- (BOOL)hasRepresentedView;
+
+- (nullable id)representedView;
+
+// UIAccessibility
+
+- (BOOL)isAccessibilityElement;
+
+- (nullable NSString*)accessibilityLabel;
+
+- (CGRect)accessibilityFrame;
+
+- (nullable NSString*)accessibilityValue;
+
+- (uint64_t)accessibilityTraits;
+
+// UIAccessibilityContainer
+
+- (NSInteger)accessibilityElementCount;
+
+- (nullable id)accessibilityElementAtIndex:(NSInteger)index;
+
+- (NSInteger)indexOfAccessibilityElement:(nonnull id)element;
+
+- (nullable NSArray*)accessibilityElements;
+
+- (UIAccessibilityContainerType)accessibilityContainerType;
+
+@end