tdf#130857 qt weld: Implement QtInstanceWidget::strip_mnemonic
[LibreOffice.git] / vcl / inc / osx / a11ywrapper.h
blobc3360f58c24e704e2e637b269d0f8f9d89b6e079
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #pragma once
22 #include "osxvcltypes.h"
23 #include <com/sun/star/accessibility/XAccessibleAction.hpp>
24 #include <com/sun/star/accessibility/XAccessibleContext.hpp>
25 #include <com/sun/star/accessibility/XAccessibleContext2.hpp>
26 #include <com/sun/star/accessibility/XAccessibleComponent.hpp>
27 #include <com/sun/star/accessibility/XAccessibleExtendedComponent.hpp>
28 #include <com/sun/star/accessibility/XAccessibleSelection.hpp>
29 #include <com/sun/star/accessibility/XAccessibleTable.hpp>
30 #include <com/sun/star/accessibility/XAccessibleText.hpp>
31 #include <com/sun/star/accessibility/XAccessibleTextAttributes.hpp>
32 #include <com/sun/star/accessibility/XAccessibleEditableText.hpp>
33 #include <com/sun/star/accessibility/XAccessibleValue.hpp>
34 #include <com/sun/star/accessibility/XAccessibleMultiLineText.hpp>
35 #include <com/sun/star/accessibility/XAccessibleTextMarkup.hpp>
37 // rAccessibleXYZ as a field in an Objective-C-Class would not call Con-/Destructor, so use a struct instead
38 struct ReferenceWrapper
40 css::uno::Reference < css::accessibility::XAccessibleAction > rAccessibleAction;
41 css::uno::Reference < css::accessibility::XAccessibleContext > rAccessibleContext;
42 css::uno::Reference < css::accessibility::XAccessibleContext2 > rAccessibleContext2;
43 css::uno::Reference < css::accessibility::XAccessibleComponent > rAccessibleComponent;
44 css::uno::Reference < css::accessibility::XAccessibleExtendedComponent > rAccessibleExtendedComponent;
45 css::uno::Reference < css::accessibility::XAccessibleSelection > rAccessibleSelection;
46 css::uno::Reference < css::accessibility::XAccessibleTable > rAccessibleTable;
47 css::uno::Reference < css::accessibility::XAccessibleText > rAccessibleText;
48 css::uno::Reference < css::accessibility::XAccessibleEditableText > rAccessibleEditableText;
49 css::uno::Reference < css::accessibility::XAccessibleValue > rAccessibleValue;
50 css::uno::Reference < css::accessibility::XAccessibleTextAttributes > rAccessibleTextAttributes;
51 css::uno::Reference < css::accessibility::XAccessibleMultiLineText > rAccessibleMultiLineText;
52 css::uno::Reference < css::accessibility::XAccessibleTextMarkup > rAccessibleTextMarkup;
55 @interface AquaA11yWrapper : NSAccessibilityElement
56 <NSAccessibilityElement,
57 NSAccessibilityGroup,
58 NSAccessibilityButton,
59 NSAccessibilitySwitch,
60 NSAccessibilityRadioButton,
61 NSAccessibilityCheckBox,
62 NSAccessibilityStaticText,
63 NSAccessibilityNavigableStaticText,
64 NSAccessibilityProgressIndicator,
65 NSAccessibilityStepper,
66 NSAccessibilitySlider,
67 NSAccessibilityImage>
69 ReferenceWrapper maReferenceWrapper;
70 BOOL mActsAsRadioGroup;
71 BOOL mIsTableCell;
72 BOOL mIsDisposed;
74 // NSAccessibility Protocol
75 -(id)accessibilityAttributeValue:(NSString *)attribute;
76 -(BOOL)accessibilityIsIgnored;
77 -(NSArray *)accessibilityAttributeNames;
78 -(BOOL)accessibilityIsAttributeSettable:(NSString *)attribute;
79 -(NSArray *)accessibilityParameterizedAttributeNames;
80 -(BOOL)accessibilitySetOverrideValue:(id)value forAttribute:(NSString *)attribute;
81 -(void)accessibilitySetValue:(id)value forAttribute:(NSString *)attribute;
82 -(id)accessibilityAttributeValue:(NSString *)attribute forParameter:(id)parameter;
83 -(id)accessibilityFocusedUIElement;
84 -(NSString *)accessibilityActionDescription:(NSString *)action;
85 -(void)accessibilityPerformAction:(NSString *)action;
86 -(BOOL)performAction:(NSString *)action;
87 -(NSArray *)accessibilityActionNames;
88 -(id)accessibilityHitTest:(NSPoint)point;
89 // Attribute values
90 -(id)parentAttribute;
91 -(id)valueAttribute;
92 -(id)titleAttribute;
93 -(id)helpAttribute;
94 -(id)numberOfCharactersAttribute;
95 -(id)selectedTextAttribute;
96 -(id)selectedTextRangeAttribute;
97 -(id)visibleCharacterRangeAttribute;
98 -(id)childrenAttribute;
99 -(id)orientationAttribute;
100 -(id)windowAttribute;
101 // Wrapper-specific
102 -(void)setActsAsRadioGroup:(BOOL)actsAsRadioGroup;
103 -(BOOL)actsAsRadioGroup;
104 -(NSWindow*)windowForParent;
105 -(id)init;
106 -(id)initWithAccessibleContext: (css::uno::Reference < css::accessibility::XAccessibleContext >) anAccessibleContext;
107 -(void)setDisposed;
108 -(void) setDefaults: (css::uno::Reference < css::accessibility::XAccessibleContext >) rxAccessibleContext;
109 +(void)setPopupMenuOpen:(BOOL)popupMenuOpen;
110 -(css::accessibility::XAccessibleAction *)accessibleAction;
111 -(css::accessibility::XAccessibleContext *)accessibleContext;
112 -(css::accessibility::XAccessibleComponent *)accessibleComponent;
113 -(css::accessibility::XAccessibleExtendedComponent *)accessibleExtendedComponent;
114 -(css::accessibility::XAccessibleSelection *)accessibleSelection;
115 -(css::accessibility::XAccessibleTable *)accessibleTable;
116 -(css::accessibility::XAccessibleText *)accessibleText;
117 -(css::accessibility::XAccessibleEditableText *)accessibleEditableText;
118 -(css::accessibility::XAccessibleValue *)accessibleValue;
119 -(css::accessibility::XAccessibleTextAttributes *)accessibleTextAttributes;
120 -(css::accessibility::XAccessibleMultiLineText *)accessibleMultiLineText;
121 -(css::accessibility::XAccessibleTextMarkup *)accessibleTextMarkup;
122 @end
125 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */