1
/****************************************************************************
3
** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
4
** Contact: http://www.qt-project.org/legal
6
** This file is part of the plugins of the Qt Toolkit.
8
** $QT_BEGIN_LICENSE:LGPL$
9
** Commercial License Usage
10
** Licensees holding valid commercial Qt licenses may use this file in
11
** accordance with the commercial license agreement provided with the
12
** Software or, alternatively, in accordance with the terms contained in
13
** a written agreement between you and Digia. For licensing terms and
14
** conditions see http://qt.digia.com/licensing. For further information
15
** use the contact form at http://qt.digia.com/contact-us.
17
** GNU Lesser General Public License Usage
18
** Alternatively, this file may be used under the terms of the GNU Lesser
19
** General Public License version 2.1 as published by the Free Software
20
** Foundation and appearing in the file LICENSE.LGPL included in the
21
** packaging of this file. Please review the following information to
22
** ensure the GNU Lesser General Public License version 2.1 requirements
23
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
25
** In addition, as a special exception, Digia gives you certain additional
26
** rights. These rights are described in the Digia Qt LGPL Exception
27
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
29
** GNU General Public License Usage
30
** Alternatively, this file may be used under the terms of the GNU
31
** General Public License version 3.0 as published by the Free Software
32
** Foundation and appearing in the file LICENSE.GPL included in the
33
** packaging of this file. Please review the following information to
34
** ensure the GNU General Public License version 3.0 requirements will be
35
** met: http://www.gnu.org/copyleft/gpl.html.
40
****************************************************************************/
41
#ifndef QWINDOWSMSAAACCESSIBLE_H
42
#define QWINDOWSMSAAACCESSIBLE_H
44
#include <QtCore/QtConfig>
45
#ifndef QT_NO_ACCESSIBILITY
46
#include <QtCore/qglobal.h>
48
#include "../qtwindows_additional.h"
49
#include <QtCore/qsharedpointer.h>
50
#include <QtGui/qaccessible.h>
53
# include "Accessible2.h" // IAccessible2 inherits from IAccessible
56
# include <basetyps.h>
62
#if !defined(QT_NO_DEBUG) && !defined(QT_NO_DEBUG_OUTPUT)
63
bool debug_accessibility();
64
# define accessibleDebug !debug_accessibility() ? (void)0 : qDebug
66
# define accessibleDebug
69
#ifndef QT_NO_DEBUG_OUTPUT
70
#define DEBUG_SHOW_ATCLIENT_COMMANDS
72
#if defined(DEBUG_SHOW_ATCLIENT_COMMANDS)
73
void accessibleDebugClientCalls_helper(const char* funcName, const QAccessibleInterface *iface);
74
# define accessibleDebugClientCalls(iface) accessibleDebugClientCalls_helper(Q_FUNC_INFO, iface)
76
# define accessibleDebugClientCalls(iface)
79
typedef QSharedPointer<QAccessibleInterface> QAIPointer;
81
QWindow *window_helper(const QAccessibleInterface *iface);
83
/**************************************************************\
84
* QWindowsAccessible *
85
**************************************************************/
86
class QWindowsMsaaAccessible : public
95
QWindowsMsaaAccessible(QAccessibleInterface *a)
101
virtual ~QWindowsMsaaAccessible()
107
HRESULT STDMETHODCALLTYPE QueryInterface(REFIID, LPVOID *);
108
ULONG STDMETHODCALLTYPE AddRef();
109
ULONG STDMETHODCALLTYPE Release();
112
HRESULT STDMETHODCALLTYPE GetTypeInfoCount(unsigned int *);
113
HRESULT STDMETHODCALLTYPE GetTypeInfo(unsigned int, unsigned long, ITypeInfo **);
114
HRESULT STDMETHODCALLTYPE GetIDsOfNames(const _GUID &, wchar_t **, unsigned int, unsigned long, long *);
115
HRESULT STDMETHODCALLTYPE Invoke(long, const _GUID &, unsigned long, unsigned short, tagDISPPARAMS *, tagVARIANT *, tagEXCEPINFO *, unsigned int *);
118
HRESULT STDMETHODCALLTYPE accHitTest(long xLeft, long yTop, VARIANT *pvarID);
119
HRESULT STDMETHODCALLTYPE accLocation(long *pxLeft, long *pyTop, long *pcxWidth, long *pcyHeight, VARIANT varID);
120
HRESULT STDMETHODCALLTYPE accNavigate(long navDir, VARIANT varStart, VARIANT *pvarEnd);
121
HRESULT STDMETHODCALLTYPE get_accChild(VARIANT varChildID, IDispatch** ppdispChild);
122
HRESULT STDMETHODCALLTYPE get_accChildCount(long* pcountChildren);
123
HRESULT STDMETHODCALLTYPE get_accParent(IDispatch** ppdispParent);
125
HRESULT STDMETHODCALLTYPE accDoDefaultAction(VARIANT varID);
126
HRESULT STDMETHODCALLTYPE get_accDefaultAction(VARIANT varID, BSTR* pszDefaultAction);
127
HRESULT STDMETHODCALLTYPE get_accDescription(VARIANT varID, BSTR* pszDescription);
128
HRESULT STDMETHODCALLTYPE get_accHelp(VARIANT varID, BSTR *pszHelp);
129
HRESULT STDMETHODCALLTYPE get_accHelpTopic(BSTR *pszHelpFile, VARIANT varChild, long *pidTopic);
130
HRESULT STDMETHODCALLTYPE get_accKeyboardShortcut(VARIANT varID, BSTR *pszKeyboardShortcut);
131
HRESULT STDMETHODCALLTYPE get_accName(VARIANT varID, BSTR* pszName);
132
HRESULT STDMETHODCALLTYPE put_accName(VARIANT varChild, BSTR szName);
133
HRESULT STDMETHODCALLTYPE get_accRole(VARIANT varID, VARIANT *pvarRole);
134
HRESULT STDMETHODCALLTYPE get_accState(VARIANT varID, VARIANT *pvarState);
135
HRESULT STDMETHODCALLTYPE get_accValue(VARIANT varID, BSTR* pszValue);
136
HRESULT STDMETHODCALLTYPE put_accValue(VARIANT varChild, BSTR szValue);
138
HRESULT STDMETHODCALLTYPE accSelect(long flagsSelect, VARIANT varID);
139
HRESULT STDMETHODCALLTYPE get_accFocus(VARIANT *pvarID);
140
HRESULT STDMETHODCALLTYPE get_accSelection(VARIANT *pvarChildren);
143
HRESULT STDMETHODCALLTYPE GetWindow(HWND *phwnd);
144
HRESULT STDMETHODCALLTYPE ContextSensitiveHelp(BOOL fEnterMode);
147
virtual QByteArray IIDToString(REFIID id);
149
QAccessibleInterface *accessible;
151
QAIPointer childPointer(VARIANT varID)
153
return QAIPointer(accessible->child(varID.lVal - 1));
163
#endif //QT_NO_ACCESSIBILITY
165
#endif // QWINDOWSMSAAACCESSIBLE_H