summaryrefslogtreecommitdiffstats
path: root/src/platformsupport/windowsuiautomation
diff options
context:
space:
mode:
authorAndre de la Rocha <andre.rocha@qt.io>2019-12-13 17:13:44 +0100
committerAndre de la Rocha <andre.rocha@qt.io>2020-02-12 17:06:15 +0100
commita82f9f1a1d7a9a0bd0ceebac6a2bc765b01877e5 (patch)
tree57ba0893967e35eb0a5a3dd3962a3ffff42c3555 /src/platformsupport/windowsuiautomation
parent217b7d2dd64551ea499766b538551d31319c01cd (diff)
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 <Friedemann.Kleint@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Diffstat (limited to 'src/platformsupport/windowsuiautomation')
-rw-r--r--src/platformsupport/windowsuiautomation/uiaserverinterfaces_p.h17
-rw-r--r--src/platformsupport/windowsuiautomation/uiatypes_p.h7
2 files changed, 24 insertions, 0 deletions
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;