1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 #ifndef _SV_AQUA11WRAPPER_H 25 #define _SV_AQUA11WRAPPER_H 26 27 #include "aquavcltypes.h" 28 #include <com/sun/star/accessibility/XAccessibleAction.hpp> 29 #include <com/sun/star/accessibility/XAccessibleContext.hpp> 30 #include <com/sun/star/accessibility/XAccessibleComponent.hpp> 31 #include <com/sun/star/accessibility/XAccessibleExtendedComponent.hpp> 32 #include <com/sun/star/accessibility/XAccessibleSelection.hpp> 33 #include <com/sun/star/accessibility/XAccessibleTable.hpp> 34 #include <com/sun/star/accessibility/XAccessibleText.hpp> 35 #include <com/sun/star/accessibility/XAccessibleTextAttributes.hpp> 36 #include <com/sun/star/accessibility/XAccessibleEditableText.hpp> 37 #include <com/sun/star/accessibility/XAccessibleValue.hpp> 38 #include <com/sun/star/accessibility/XAccessibleMultiLineText.hpp> 39 40 // rAccessibleXYZ as a field in an Objective-C-Class would not call Con-/Destructor, so use a struct instead 41 struct ReferenceWrapper 42 { 43 ::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleAction > rAccessibleAction; 44 ::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleContext > rAccessibleContext; 45 ::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleComponent > rAccessibleComponent; 46 ::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleExtendedComponent > rAccessibleExtendedComponent; 47 ::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleSelection > rAccessibleSelection; 48 ::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleTable > rAccessibleTable; 49 ::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleText > rAccessibleText; 50 ::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleEditableText > rAccessibleEditableText; 51 ::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleValue > rAccessibleValue; 52 ::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleTextAttributes > rAccessibleTextAttributes; 53 ::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleMultiLineText > rAccessibleMultiLineText; 54 }; 55 56 @interface AquaA11yWrapper : NSView 57 { 58 ReferenceWrapper * mpReferenceWrapper; 59 NSString * mpDefaultFontname; 60 float mDefaultFontsize; 61 BOOL mActsAsRadioGroup; 62 BOOL mIsTableCell; 63 } 64 // NSAccessibility Protocol 65 -(id)accessibilityAttributeValue:(NSString *)attribute; 66 -(BOOL)accessibilityIsIgnored; 67 -(NSArray *)accessibilityAttributeNames; 68 -(BOOL)accessibilityIsAttributeSettable:(NSString *)attribute; 69 -(NSArray *)accessibilityParameterizedAttributeNames; 70 -(BOOL)accessibilitySetOverrideValue:(id)value forAttribute:(NSString *)attribute; 71 -(void)accessibilitySetValue:(id)value forAttribute:(NSString *)attribute; 72 -(id)accessibilityAttributeValue:(NSString *)attribute forParameter:(id)parameter; 73 -(id)accessibilityFocusedUIElement; 74 -(NSString *)accessibilityActionDescription:(NSString *)action; 75 -(void)accessibilityPerformAction:(NSString *)action; 76 -(NSArray *)accessibilityActionNames; 77 -(id)accessibilityHitTest:(NSPoint)point; 78 // Attribute values 79 -(id)parentAttribute; 80 -(id)valueAttribute; 81 -(id)titleAttribute; 82 -(id)helpAttribute; 83 -(id)numberOfCharactersAttribute; 84 -(id)selectedTextAttribute; 85 -(id)selectedTextRangeAttribute; 86 -(id)visibleCharacterRangeAttribute; 87 -(id)childrenAttribute; 88 -(id)orientationAttribute; 89 -(id)windowAttribute; 90 // Wrapper-specific 91 -(void)setActsAsRadioGroup:(BOOL)actsAsRadioGroup; 92 -(BOOL)actsAsRadioGroup; 93 -(NSView *)viewElementForParent; 94 -(id)initWithAccessibleContext: (::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleContext >) anAccessibleContext; 95 -(void) setDefaults: (::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleContext >) rxAccessibleContext; 96 -(void) dealloc; 97 -(void)setDefaultFontname:(NSString *)fontname; 98 -(NSString *)defaultFontname; 99 -(void)setDefaultFontsize:(float)fontsize; 100 -(float)defaultFontsize; 101 +(void)setPopupMenuOpen:(BOOL)popupMenuOpen; 102 -(::com::sun::star::accessibility::XAccessibleAction *)accessibleAction; 103 -(::com::sun::star::accessibility::XAccessibleContext *)accessibleContext; 104 -(::com::sun::star::accessibility::XAccessibleComponent *)accessibleComponent; 105 -(::com::sun::star::accessibility::XAccessibleExtendedComponent *)accessibleExtendedComponent; 106 -(::com::sun::star::accessibility::XAccessibleSelection *)accessibleSelection; 107 -(::com::sun::star::accessibility::XAccessibleTable *)accessibleTable; 108 -(::com::sun::star::accessibility::XAccessibleText *)accessibleText; 109 -(::com::sun::star::accessibility::XAccessibleEditableText *)accessibleEditableText; 110 -(::com::sun::star::accessibility::XAccessibleValue *)accessibleValue; 111 -(::com::sun::star::accessibility::XAccessibleTextAttributes *)accessibleTextAttributes; 112 -(::com::sun::star::accessibility::XAccessibleMultiLineText *)accessibleMultiLineText; 113 @end 114 115 #endif // _SV_AQUA11WRAPPER_H 116