4#include <QtGui/qtguiglobal.h>
5#if QT_CONFIG(accessibility)
11#include <QtGui/qaccessible.h>
12#include <QtGui/private/qwindow_p.h>
13#include <QtCore/qloggingcategory.h>
14#include <QtCore/qstring.h>
18using namespace QWindowsUiAutomation;
21QWindowsUiaWindowProvider::QWindowsUiaWindowProvider(QAccessible::Id
id) :
22 QWindowsUiaBaseProvider(
id)
26QWindowsUiaWindowProvider::~QWindowsUiaWindowProvider()
31 qCDebug(lcQpaUiAutomation) << __FUNCTION__;
32 QAccessibleInterface *accessible = accessibleInterface();
33 if (!accessible || !accessible->window())
35 auto window = accessible->window();
50HRESULT STDMETHODCALLTYPE QWindowsUiaWindowProvider::Close() {
51 qCDebug(lcQpaUiAutomation) << __FUNCTION__;
52 QAccessibleInterface *accessible = accessibleInterface();
53 if (!accessible || !accessible->window())
55 accessible->window()->close();
59HRESULT STDMETHODCALLTYPE QWindowsUiaWindowProvider::WaitForInputIdle(
int milliseconds, __RPC__out BOOL *
pRetVal) {
65HRESULT STDMETHODCALLTYPE QWindowsUiaWindowProvider::get_CanMaximize(__RPC__out BOOL *
pRetVal) {
66 qCDebug(lcQpaUiAutomation) << __FUNCTION__;
67 QAccessibleInterface *accessible = accessibleInterface();
68 if (!accessible || !accessible->window())
71 auto window = accessible->window();
81HRESULT STDMETHODCALLTYPE QWindowsUiaWindowProvider::get_CanMinimize(__RPC__out BOOL *
pRetVal) {
82 qCDebug(lcQpaUiAutomation) << __FUNCTION__;
83 QAccessibleInterface *accessible = accessibleInterface();
84 if (!accessible || !accessible->window())
90HRESULT STDMETHODCALLTYPE QWindowsUiaWindowProvider::get_IsModal(__RPC__out BOOL *
pRetVal) {
91 qCDebug(lcQpaUiAutomation) << __FUNCTION__;
92 QAccessibleInterface *accessible = accessibleInterface();
93 if (!accessible || !accessible->window())
95 *
pRetVal = accessible->window()->isModal();
100 qCDebug(lcQpaUiAutomation) << __FUNCTION__;
101 QAccessibleInterface *accessible = accessibleInterface();
102 if (!accessible || !accessible->window())
104 auto visibility = accessible->window()->visibility();
105 switch (visibility) {
106 case QWindow::FullScreen:
107 case QWindow::Maximized:
110 case QWindow::Minimized:
125HRESULT STDMETHODCALLTYPE QWindowsUiaWindowProvider::get_IsTopmost(__RPC__out BOOL *
pRetVal) {
Combined button and popup list for selecting options.
@ MSWindowsFixedSizeDialogHint
@ WindowMaximizeButtonHint
@ WindowMinimizeButtonHint
#define qCDebug(category,...)
#define UIA_E_ELEMENTNOTAVAILABLE
#define UIA_E_NOTSUPPORTED
IRawElementProviderFragment __RPC__deref_out_opt IRawElementProviderFragment ** pRetVal
@ WindowVisualState_Normal
@ WindowVisualState_Maximized
@ WindowVisualState_Minimized