From 5e9089135bfe7db7d7a43c9ee4d4c24ab8f6458d Mon Sep 17 00:00:00 2001 From: Jan-Arve Saether Date: Fri, 23 Mar 2012 11:11:53 +0100 Subject: Enable IAccessible for MinGW32, keep IAccessible2 disabled for MinGW No surprise, the files generated by midl contains code that only the MS compiler will understand. However, since the generated files are only needed for IA2, we can still compile the old IAccessible/MSAA implementation for mingw (like it was before the introduction of IA2) I used mingw 4.6.1 to test this. Change-Id: Iad581f2fee087bd7b796ac5a01548f2fcacbd595 Reviewed-by: Friedemann Kleint --- .../windows/accessible/qwindowsmsaaaccessible.h | 29 +++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) (limited to 'src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.h') diff --git a/src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.h b/src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.h index 9cb56c954c..d7dda6b3e2 100644 --- a/src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.h +++ b/src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.h @@ -43,12 +43,19 @@ #include #ifndef QT_NO_ACCESSIBILITY +#include #include "../qtwindows_additional.h" -#include -#include "Accessible2.h" #include #include +#ifndef Q_CC_MINGW +# include +# include "Accessible2.h" // IAccessible2 inherits from IAccessible +#else + // MinGW +# include +# include +#endif QT_BEGIN_NAMESPACE @@ -74,7 +81,13 @@ QWindow *window_helper(const QAccessibleInterface *iface); /**************************************************************\ * QWindowsAccessible * **************************************************************/ -class QWindowsMsaaAccessible : public IAccessible2, public IOleWindow +class QWindowsMsaaAccessible : public +#ifdef Q_CC_MINGW + IAccessible +#else + IAccessible2 +#endif + , public IOleWindow { public: QWindowsMsaaAccessible(QAccessibleInterface *a) @@ -87,6 +100,10 @@ public: delete accessible; } + /* IUnknown */ + HRESULT STDMETHODCALLTYPE QueryInterface(REFIID, LPVOID *); + ULONG STDMETHODCALLTYPE AddRef(); + ULONG STDMETHODCALLTYPE Release(); /* IDispatch */ HRESULT STDMETHODCALLTYPE GetTypeInfoCount(unsigned int *); @@ -124,12 +141,18 @@ public: HRESULT STDMETHODCALLTYPE ContextSensitiveHelp(BOOL fEnterMode); protected: + virtual QByteArray IIDToString(REFIID id); + QAccessibleInterface *accessible; QAIPointer childPointer(VARIANT varID) { return QAIPointer(accessible->child(varID.lVal - 1)); } + +private: + ULONG ref; + }; QT_END_NAMESPACE -- cgit v1.2.3