OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef UI_ACCESSIBILITY_PLATFORM_TEXT_MARKER_HELPER_MAC_H_ | 5 #ifndef UI_ACCESSIBILITY_PLATFORM_TEXT_MARKER_HELPER_MAC_H_ |
6 #define UI_ACCESSIBILITY_PLATFORM_TEXT_MARKER_HELPER_MAC_H_ | 6 #define UI_ACCESSIBILITY_PLATFORM_TEXT_MARKER_HELPER_MAC_H_ |
7 | 7 |
8 #import <Foundation/Foundation.h> | 8 #import <Foundation/Foundation.h> |
9 | 9 |
10 #include "ui/accessibility/ax_abstract_position.h" | 10 #include "ui/accessibility/ax_abstract_position.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 | 27 |
28 } // namespace ui | 28 } // namespace ui |
29 | 29 |
30 // A component that can be placed in an AXNode to satisfy requests from Cocoa | 30 // A component that can be placed in an AXNode to satisfy requests from Cocoa |
31 // accessibility to create and manipulate AXTextMarker objects. | 31 // accessibility to create and manipulate AXTextMarker objects. |
32 AX_EXPORT | 32 AX_EXPORT |
33 @interface TextMarkerHelperMac : NSObject | 33 @interface TextMarkerHelperMac : NSObject |
34 | 34 |
35 - (instancetype)initWithFactory:(std::unique_ptr<ui::PositionFactory>)factory; | 35 - (instancetype)initWithFactory:(std::unique_ptr<ui::PositionFactory>)factory; |
36 | 36 |
37 // Returns a text marker that points to the first character in the document that | 37 // Unparameterized attributes that may be called directly. |
38 // can be selected with VoiceOver. | 38 - (id)AXEndTextMarker; |
39 - (id)startTextMarker; | 39 - (id)AXSelectedTextMarkerRange; |
40 | 40 - (id)AXStartTextMarker; |
41 // Returns a text marker that points to the last character in the document that | |
42 // can be selected with VoiceOver. | |
43 - (id)endTextMarker; | |
44 | |
45 // Returns a text marker range corresponding to the current selection. | |
46 - (id)selectedTextMarkerRange; | |
47 | 41 |
48 // Given an AXTextMarkerRangeRef, extract the stored AXPositionData for the | 42 // Given an AXTextMarkerRangeRef, extract the stored AXPositionData for the |
49 // start and end markers. Returns NO if either marker is nil, or if the stored | 43 // start and end markers. Returns NO if either marker is nil, or if the stored |
50 // data is the wrong size. | 44 // data is the wrong size. |
51 + (BOOL)getRangeDataFromMarkerRange:(id)parameter | 45 + (BOOL)getRangeDataFromMarkerRange:(id)parameter |
52 start:(ui::AXPositionData*)start | 46 start:(ui::AXPositionData*)start |
53 end:(ui::AXPositionData*)end; | 47 end:(ui::AXPositionData*)end; |
54 | 48 |
| 49 + (NSArray*)getSupportedAttributes; |
| 50 + (NSArray*)getSupportedParameterizedAttributesExtended:(BOOL)extended; |
| 51 |
55 @end | 52 @end |
56 | 53 |
57 #endif // UI_ACCESSIBILITY_PLATFORM_TEXT_MARKER_HELPER_MAC_H_ | 54 #endif // UI_ACCESSIBILITY_PLATFORM_TEXT_MARKER_HELPER_MAC_H_ |
OLD | NEW |