diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:43:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:43:14 +0000 |
commit | 8dd16259287f58f9273002717ec4d27e97127719 (patch) | |
tree | 3863e62a53829a84037444beab3abd4ed9dfc7d0 /accessible/windows/uia/uiaRawElmProvider.h | |
parent | Releasing progress-linux version 126.0.1-1~progress7.99u1. (diff) | |
download | firefox-8dd16259287f58f9273002717ec4d27e97127719.tar.xz firefox-8dd16259287f58f9273002717ec4d27e97127719.zip |
Merging upstream version 127.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'accessible/windows/uia/uiaRawElmProvider.h')
-rw-r--r-- | accessible/windows/uia/uiaRawElmProvider.h | 75 |
1 files changed, 74 insertions, 1 deletions
diff --git a/accessible/windows/uia/uiaRawElmProvider.h b/accessible/windows/uia/uiaRawElmProvider.h index 0e05d1a030..ea713d8bc1 100644 --- a/accessible/windows/uia/uiaRawElmProvider.h +++ b/accessible/windows/uia/uiaRawElmProvider.h @@ -11,10 +11,20 @@ #include <stdint.h> #include <uiautomation.h> +#include <initializer_list> + +#include "nsString.h" + +template <class T> +class nsTArray; +template <class T> +class RefPtr; + namespace mozilla { namespace a11y { class Accessible; +enum class RelationType; /** * IRawElementProviderSimple implementation (maintains IAccessibleEx approach). @@ -26,8 +36,16 @@ class uiaRawElmProvider : public IAccessibleEx, public IToggleProvider, public IExpandCollapseProvider, public IScrollItemProvider, - public IValueProvider { + public IValueProvider, + public IRangeValueProvider, + public ISelectionProvider, + public ISelectionItemProvider { public: + static constexpr enum ProviderOptions kProviderOptions = + static_cast<enum ProviderOptions>(ProviderOptions_ServerSideProvider | + ProviderOptions_UseComThreading | + ProviderOptions_HasNativeIAccessible); + static void RaiseUiaEventForGeckoEvent(Accessible* aAcc, uint32_t aGeckoEvent); static void RaiseUiaEventForStateChange(Accessible* aAcc, uint64_t aState, @@ -118,6 +136,51 @@ class uiaRawElmProvider : public IAccessibleEx, virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_IsReadOnly( /* [retval][out] */ __RPC__out BOOL* pRetVal); + // IRangeValueProvider + virtual HRESULT STDMETHODCALLTYPE SetValue( + /* [in] */ double aVal); + + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Value( + /* [retval][out] */ __RPC__out double* aRetVal); + + // get_IsReadOnly is shared with IValueProvider. + + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Maximum( + /* [retval][out] */ __RPC__out double* aRetVal); + + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Minimum( + /* [retval][out] */ __RPC__out double* aRetVal); + + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_LargeChange( + /* [retval][out] */ __RPC__out double* aRetVal); + + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_SmallChange( + /* [retval][out] */ __RPC__out double* aRetVal); + + // ISelectionProvider + virtual HRESULT STDMETHODCALLTYPE GetSelection( + /* [retval][out] */ __RPC__deref_out_opt SAFEARRAY** aRetVal); + + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_CanSelectMultiple( + /* [retval][out] */ __RPC__out BOOL* aRetVal); + + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_IsSelectionRequired( + /* [retval][out] */ __RPC__out BOOL* aRetVal); + + // ISelectionItemProvider methods + virtual HRESULT STDMETHODCALLTYPE Select(void); + + virtual HRESULT STDMETHODCALLTYPE AddToSelection(void); + + virtual HRESULT STDMETHODCALLTYPE RemoveFromSelection(void); + + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_IsSelected( + /* [retval][out] */ __RPC__out BOOL* aRetVal); + + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_SelectionContainer( + /* [retval][out] */ __RPC__deref_out_opt IRawElementProviderSimple** + aRetVal); + private: Accessible* Acc() const; bool IsControl(); @@ -125,8 +188,18 @@ class uiaRawElmProvider : public IAccessibleEx, bool HasTogglePattern(); bool HasExpandCollapsePattern(); bool HasValuePattern() const; + template <class Derived, class Interface> + RefPtr<Interface> GetPatternFromDerived(); + bool HasSelectionItemPattern(); + SAFEARRAY* AccRelationsToUiaArray( + std::initializer_list<RelationType> aTypes) const; + Accessible* GetLabeledBy() const; + long GetLandmarkType() const; + void GetLocalizedLandmarkType(nsAString& aLocalized) const; }; +SAFEARRAY* AccessibleArrayToUiaArray(const nsTArray<Accessible*>& aAccs); + } // namespace a11y } // namespace mozilla |