1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 #ifndef INCLUDED_VCL_INC_OSX_A11YWRAPPER_H
21 #define INCLUDED_VCL_INC_OSX_A11YWRAPPER_H
23 #include "osxvcltypes.h"
24 #include <com/sun/star/accessibility/XAccessibleAction.hpp>
25 #include <com/sun/star/accessibility/XAccessibleContext.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::XAccessibleComponent
> rAccessibleComponent
;
43 css::uno::Reference
< css::accessibility::XAccessibleExtendedComponent
> rAccessibleExtendedComponent
;
44 css::uno::Reference
< css::accessibility::XAccessibleSelection
> rAccessibleSelection
;
45 css::uno::Reference
< css::accessibility::XAccessibleTable
> rAccessibleTable
;
46 css::uno::Reference
< css::accessibility::XAccessibleText
> rAccessibleText
;
47 css::uno::Reference
< css::accessibility::XAccessibleEditableText
> rAccessibleEditableText
;
48 css::uno::Reference
< css::accessibility::XAccessibleValue
> rAccessibleValue
;
49 css::uno::Reference
< css::accessibility::XAccessibleTextAttributes
> rAccessibleTextAttributes
;
50 css::uno::Reference
< css::accessibility::XAccessibleMultiLineText
> rAccessibleMultiLineText
;
51 css::uno::Reference
< css::accessibility::XAccessibleTextMarkup
> rAccessibleTextMarkup
;
54 @interface AquaA11yWrapper
: NSView
56 ReferenceWrapper
* mpReferenceWrapper
;
57 BOOL mActsAsRadioGroup
;
60 // NSAccessibility Protocol
61 -(id
)accessibilityAttributeValue
:(NSString
*)attribute
;
62 -(BOOL
)accessibilityIsIgnored
;
63 -(NSArray
*)accessibilityAttributeNames
;
64 -(BOOL
)accessibilityIsAttributeSettable
:(NSString
*)attribute
;
65 -(NSArray
*)accessibilityParameterizedAttributeNames
;
66 -(BOOL
)accessibilitySetOverrideValue
:(id
)value forAttribute
:(NSString
*)attribute
;
67 -(void)accessibilitySetValue
:(id
)value forAttribute
:(NSString
*)attribute
;
68 -(id
)accessibilityAttributeValue
:(NSString
*)attribute forParameter
:(id
)parameter
;
69 -(id
)accessibilityFocusedUIElement
;
70 -(NSString
*)accessibilityActionDescription
:(NSString
*)action
;
71 -(void)accessibilityPerformAction
:(NSString
*)action
;
72 -(NSArray
*)accessibilityActionNames
;
73 -(id
)accessibilityHitTest
:(NSPoint
)point
;
79 -(id
)numberOfCharactersAttribute
;
80 -(id
)selectedTextAttribute
;
81 -(id
)selectedTextRangeAttribute
;
82 -(id
)visibleCharacterRangeAttribute
;
83 -(id
)childrenAttribute
;
84 -(id
)orientationAttribute
;
87 -(void)setActsAsRadioGroup
:(BOOL
)actsAsRadioGroup
;
88 -(BOOL
)actsAsRadioGroup
;
89 -(NSWindow
*)windowForParent
;
90 -(id
)initWithAccessibleContext
: (css::uno::Reference
< css::accessibility::XAccessibleContext
>) anAccessibleContext
;
91 -(void) setDefaults
: (css::uno::Reference
< css::accessibility::XAccessibleContext
>) rxAccessibleContext
;
93 +(void)setPopupMenuOpen
:(BOOL
)popupMenuOpen
;
94 -(css::accessibility::XAccessibleAction
*)accessibleAction
;
95 -(css::accessibility::XAccessibleContext
*)accessibleContext
;
96 -(css::accessibility::XAccessibleComponent
*)accessibleComponent
;
97 -(css::accessibility::XAccessibleExtendedComponent
*)accessibleExtendedComponent
;
98 -(css::accessibility::XAccessibleSelection
*)accessibleSelection
;
99 -(css::accessibility::XAccessibleTable
*)accessibleTable
;
100 -(css::accessibility::XAccessibleText
*)accessibleText
;
101 -(css::accessibility::XAccessibleEditableText
*)accessibleEditableText
;
102 -(css::accessibility::XAccessibleValue
*)accessibleValue
;
103 -(css::accessibility::XAccessibleTextAttributes
*)accessibleTextAttributes
;
104 -(css::accessibility::XAccessibleMultiLineText
*)accessibleMultiLineText
;
105 -(css::accessibility::XAccessibleTextMarkup
*)accessibleTextMarkup
;
108 #endif // INCLUDED_VCL_INC_OSX_A11YWRAPPER_H
110 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */