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