From a82f9f1a1d7a9a0bd0ceebac6a2bc765b01877e5 Mon Sep 17 00:00:00 2001 From: Andre de la Rocha Date: Fri, 13 Dec 2019 17:13:44 +0100 Subject: Windows QPA: Implement IExpandCollapseProvider for submenus Menu items with submenus should implement the Expand/Collapse UI Automation pattern in order to allow screen readers to say whether they are expandable items. Fixes: QTBUG-80550 Change-Id: I4f72d30172f76f028be5cbdeb1fd85fca6b07acf Reviewed-by: Friedemann Kleint Reviewed-by: Oliver Wolff --- .../windowsuiautomation/uiaserverinterfaces_p.h | 17 +++++++++++++++++ src/platformsupport/windowsuiautomation/uiatypes_p.h | 7 +++++++ 2 files changed, 24 insertions(+) (limited to 'src/platformsupport') diff --git a/src/platformsupport/windowsuiautomation/uiaserverinterfaces_p.h b/src/platformsupport/windowsuiautomation/uiaserverinterfaces_p.h index fd39b6ee33..fde16206da 100644 --- a/src/platformsupport/windowsuiautomation/uiaserverinterfaces_p.h +++ b/src/platformsupport/windowsuiautomation/uiaserverinterfaces_p.h @@ -383,4 +383,21 @@ __CRT_UUID_DECL(IWindowProvider, 0x987df77b, 0xdb06, 0x4d77, 0x8f,0x8a, 0x86,0xa #endif #endif + +#ifndef __IExpandCollapseProvider_INTERFACE_DEFINED__ +#define __IExpandCollapseProvider_INTERFACE_DEFINED__ +DEFINE_GUID(IID_IExpandCollapseProvider, 0xd847d3a5, 0xcab0, 0x4a98, 0x8c,0x32, 0xec,0xb4,0x5c,0x59,0xad,0x24); +MIDL_INTERFACE("d847d3a5-cab0-4a98-8c32-ecb45c59ad24") +IExpandCollapseProvider : public IUnknown +{ +public: + virtual HRESULT STDMETHODCALLTYPE Expand() = 0; + virtual HRESULT STDMETHODCALLTYPE Collapse() = 0; + virtual HRESULT STDMETHODCALLTYPE get_ExpandCollapseState(__RPC__out enum ExpandCollapseState *pRetVal) = 0; +}; +#ifdef __CRT_UUID_DECL +__CRT_UUID_DECL(IExpandCollapseProvider, 0xd847d3a5, 0xcab0, 0x4a98, 0x8c,0x32, 0xec,0xb4,0x5c,0x59,0xad,0x24) +#endif +#endif + #endif diff --git a/src/platformsupport/windowsuiautomation/uiatypes_p.h b/src/platformsupport/windowsuiautomation/uiatypes_p.h index 8ef71843a3..afbc957094 100644 --- a/src/platformsupport/windowsuiautomation/uiatypes_p.h +++ b/src/platformsupport/windowsuiautomation/uiatypes_p.h @@ -155,6 +155,13 @@ enum WindowInteractionState { WindowInteractionState_NotResponding = 4 }; +enum ExpandCollapseState { + ExpandCollapseState_Collapsed = 0, + ExpandCollapseState_Expanded = 1, + ExpandCollapseState_PartiallyExpanded = 2, + ExpandCollapseState_LeafNode = 3 +}; + struct UiaRect { double left; double top; -- cgit v1.2.3 From adfd0914e3fe9a15f818b0979936d5f0ff545f32 Mon Sep 17 00:00:00 2001 From: Andre de la Rocha Date: Wed, 12 Feb 2020 19:30:26 +0100 Subject: Windows QPA: Add support to IsDialog UIA property Adding support to the IsDialog property within the UI Automation code. This property allows dialog windows to be identified as such, which may be used by screen readers to better describe them. Fixes: QTBUG-82019 Change-Id: I6f5478dd30f63f152cba75886a9e0eb38772037a Reviewed-by: Friedemann Kleint --- src/platformsupport/windowsuiautomation/uiapropertyids_p.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/platformsupport') diff --git a/src/platformsupport/windowsuiautomation/uiapropertyids_p.h b/src/platformsupport/windowsuiautomation/uiapropertyids_p.h index 74e84147f6..9c14a35271 100644 --- a/src/platformsupport/windowsuiautomation/uiapropertyids_p.h +++ b/src/platformsupport/windowsuiautomation/uiapropertyids_p.h @@ -219,5 +219,6 @@ #define UIA_CenterPointPropertyId 30165 #define UIA_RotationPropertyId 30166 #define UIA_SizePropertyId 30167 +#define UIA_IsDialogPropertyId 30174 #endif -- cgit v1.2.3