1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 #ifndef _SV_AQUA11WRAPPER_H 29 #define _SV_AQUA11WRAPPER_H 30 31 #include "aquavcltypes.h" 32 #include <com/sun/star/accessibility/XAccessibleAction.hpp> 33 #include <com/sun/star/accessibility/XAccessibleContext.hpp> 34 #include <com/sun/star/accessibility/XAccessibleComponent.hpp> 35 #include <com/sun/star/accessibility/XAccessibleExtendedComponent.hpp> 36 #include <com/sun/star/accessibility/XAccessibleSelection.hpp> 37 #include <com/sun/star/accessibility/XAccessibleTable.hpp> 38 #include <com/sun/star/accessibility/XAccessibleText.hpp> 39 #include <com/sun/star/accessibility/XAccessibleTextAttributes.hpp> 40 #include <com/sun/star/accessibility/XAccessibleEditableText.hpp> 41 #include <com/sun/star/accessibility/XAccessibleValue.hpp> 42 #include <com/sun/star/accessibility/XAccessibleMultiLineText.hpp> 43 44 // rAccessibleXYZ as a field in an Objective-C-Class would not call Con-/Destructor, so use a struct instead 45 struct ReferenceWrapper 46 { 47 ::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleAction > rAccessibleAction; 48 ::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleContext > rAccessibleContext; 49 ::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleComponent > rAccessibleComponent; 50 ::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleExtendedComponent > rAccessibleExtendedComponent; 51 ::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleSelection > rAccessibleSelection; 52 ::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleTable > rAccessibleTable; 53 ::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleText > rAccessibleText; 54 ::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleEditableText > rAccessibleEditableText; 55 ::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleValue > rAccessibleValue; 56 ::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleTextAttributes > rAccessibleTextAttributes; 57 ::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleMultiLineText > rAccessibleMultiLineText; 58 }; 59 60 @interface AquaA11yWrapper : NSView 61 { 62 ReferenceWrapper * mpReferenceWrapper; 63 NSString * mpDefaultFontname; 64 float mDefaultFontsize; 65 BOOL mActsAsRadioGroup; 66 BOOL mIsTableCell; 67 } 68 // NSAccessibility Protocol 69 -(id)accessibilityAttributeValue:(NSString *)attribute; 70 -(BOOL)accessibilityIsIgnored; 71 -(NSArray *)accessibilityAttributeNames; 72 -(BOOL)accessibilityIsAttributeSettable:(NSString *)attribute; 73 -(NSArray *)accessibilityParameterizedAttributeNames; 74 -(BOOL)accessibilitySetOverrideValue:(id)value forAttribute:(NSString *)attribute; 75 -(void)accessibilitySetValue:(id)value forAttribute:(NSString *)attribute; 76 -(id)accessibilityAttributeValue:(NSString *)attribute forParameter:(id)parameter; 77 -(id)accessibilityFocusedUIElement; 78 -(NSString *)accessibilityActionDescription:(NSString *)action; 79 -(void)accessibilityPerformAction:(NSString *)action; 80 -(NSArray *)accessibilityActionNames; 81 -(id)accessibilityHitTest:(NSPoint)point; 82 // Attribute values 83 -(id)parentAttribute; 84 -(id)valueAttribute; 85 -(id)titleAttribute; 86 -(id)helpAttribute; 87 -(id)numberOfCharactersAttribute; 88 -(id)selectedTextAttribute; 89 -(id)selectedTextRangeAttribute; 90 -(id)visibleCharacterRangeAttribute; 91 -(id)childrenAttribute; 92 -(id)orientationAttribute; 93 -(id)windowAttribute; 94 // Wrapper-specific 95 -(void)setActsAsRadioGroup:(BOOL)actsAsRadioGroup; 96 -(BOOL)actsAsRadioGroup; 97 -(NSView *)viewElementForParent; 98 -(id)initWithAccessibleContext: (::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleContext >) anAccessibleContext; 99 -(void) setDefaults: (::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleContext >) rxAccessibleContext; 100 -(void) dealloc; 101 -(void)setDefaultFontname:(NSString *)fontname; 102 -(NSString *)defaultFontname; 103 -(void)setDefaultFontsize:(float)fontsize; 104 -(float)defaultFontsize; 105 +(void)setPopupMenuOpen:(BOOL)popupMenuOpen; 106 -(::com::sun::star::accessibility::XAccessibleAction *)accessibleAction; 107 -(::com::sun::star::accessibility::XAccessibleContext *)accessibleContext; 108 -(::com::sun::star::accessibility::XAccessibleComponent *)accessibleComponent; 109 -(::com::sun::star::accessibility::XAccessibleExtendedComponent *)accessibleExtendedComponent; 110 -(::com::sun::star::accessibility::XAccessibleSelection *)accessibleSelection; 111 -(::com::sun::star::accessibility::XAccessibleTable *)accessibleTable; 112 -(::com::sun::star::accessibility::XAccessibleText *)accessibleText; 113 -(::com::sun::star::accessibility::XAccessibleEditableText *)accessibleEditableText; 114 -(::com::sun::star::accessibility::XAccessibleValue *)accessibleValue; 115 -(::com::sun::star::accessibility::XAccessibleTextAttributes *)accessibleTextAttributes; 116 -(::com::sun::star::accessibility::XAccessibleMultiLineText *)accessibleMultiLineText; 117 @end 118 119 #endif // _SV_AQUA11WRAPPER_H 120