1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/accessible/src/windows/ia2/ia2Accessible.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,114 @@ 1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1.5 +/* vim: set ts=2 et sw=2 tw=80: */ 1.6 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.7 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.8 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.9 + 1.10 +#ifndef mozilla_a11y_ia2Accessible_h_ 1.11 +#define mozilla_a11y_ia2Accessible_h_ 1.12 + 1.13 +#include "nsISupports.h" 1.14 + 1.15 +#include "Accessible2_2.h" 1.16 + 1.17 +namespace mozilla { 1.18 +namespace a11y { 1.19 + 1.20 +class ia2Accessible : public IAccessible2_2 1.21 +{ 1.22 +public: 1.23 + 1.24 + // IUnknown 1.25 + STDMETHODIMP QueryInterface(REFIID, void**); 1.26 + 1.27 + // IAccessible2 1.28 + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_nRelations( 1.29 + /* [retval][out] */ long* nRelations); 1.30 + 1.31 + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_relation( 1.32 + /* [in] */ long relationIndex, 1.33 + /* [retval][out] */ IAccessibleRelation** relation); 1.34 + 1.35 + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_relations( 1.36 + /* [in] */ long maxRelations, 1.37 + /* [length_is][size_is][out] */ IAccessibleRelation** relation, 1.38 + /* [retval][out] */ long* nRelations); 1.39 + 1.40 + virtual HRESULT STDMETHODCALLTYPE role( 1.41 + /* [retval][out] */ long* role); 1.42 + 1.43 + virtual HRESULT STDMETHODCALLTYPE scrollTo( 1.44 + /* [in] */ enum IA2ScrollType scrollType); 1.45 + 1.46 + virtual HRESULT STDMETHODCALLTYPE scrollToPoint( 1.47 + /* [in] */ enum IA2CoordinateType coordinateType, 1.48 + /* [in] */ long x, 1.49 + /* [in] */ long y); 1.50 + 1.51 + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_groupPosition( 1.52 + /* [out] */ long* groupLevel, 1.53 + /* [out] */ long* similarItemsInGroup, 1.54 + /* [retval][out] */ long* positionInGroup); 1.55 + 1.56 + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_states( 1.57 + /* [retval][out] */ AccessibleStates* states); 1.58 + 1.59 + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_extendedRole( 1.60 + /* [retval][out] */ BSTR* extendedRole); 1.61 + 1.62 + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_localizedExtendedRole( 1.63 + /* [retval][out] */ BSTR* localizedExtendedRole); 1.64 + 1.65 + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_nExtendedStates( 1.66 + /* [retval][out] */ long* nExtendedStates); 1.67 + 1.68 + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_extendedStates( 1.69 + /* [in] */ long maxExtendedStates, 1.70 + /* [length_is][length_is][size_is][size_is][out] */ BSTR** extendedStates, 1.71 + /* [retval][out] */ long* nExtendedStates); 1.72 + 1.73 + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_localizedExtendedStates( 1.74 + /* [in] */ long maxLocalizedExtendedStates, 1.75 + /* [length_is][length_is][size_is][size_is][out] */ BSTR** localizedExtendedStates, 1.76 + /* [retval][out] */ long* nLocalizedExtendedStates); 1.77 + 1.78 + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_uniqueID( 1.79 + /* [retval][out] */ long* uniqueID); 1.80 + 1.81 + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_windowHandle( 1.82 + /* [retval][out] */ HWND* windowHandle); 1.83 + 1.84 + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_indexInParent( 1.85 + /* [retval][out] */ long* indexInParent); 1.86 + 1.87 + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_locale( 1.88 + /* [retval][out] */ IA2Locale* locale); 1.89 + 1.90 + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_attributes( 1.91 + /* [retval][out] */ BSTR* attributes); 1.92 + 1.93 + // IAccessible2_2 1.94 + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_attribute( 1.95 + /* [in] */ BSTR name, 1.96 + /* [out, retval] */ VARIANT* attribute); 1.97 + 1.98 + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_accessibleWithCaret( 1.99 + /* [out] */ IUnknown** accessible, 1.100 + /* [out, retval] */ long* caretOffset); 1.101 + 1.102 + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_relationTargetsOfType( 1.103 + /* [in] */ BSTR type, 1.104 + /* [in] */ long maxTargets, 1.105 + /* [out, size_is(,*nTargets)] */ IUnknown*** targets, 1.106 + /* [out, retval] */ long* nTargets 1.107 + ); 1.108 + 1.109 + // Helper method 1.110 + static HRESULT ConvertToIA2Attributes(nsIPersistentProperties* aAttributes, 1.111 + BSTR* aIA2Attributes); 1.112 +}; 1.113 + 1.114 +} // namespace a11y 1.115 +} // namespace mozilla 1.116 + 1.117 +#endif