43 #include <QtCore/private/qsystemlibrary_p.h>
48 QWindowsUiaWrapper::QWindowsUiaWrapper()
52 m_pUiaReturnRawElementProvider =
reinterpret_cast<PtrUiaReturnRawElementProvider
>(uiaLib.resolve(
"UiaReturnRawElementProvider"));
53 m_pUiaHostProviderFromHwnd =
reinterpret_cast<PtrUiaHostProviderFromHwnd
>(uiaLib.resolve(
"UiaHostProviderFromHwnd"));
54 m_pUiaRaiseAutomationPropertyChangedEvent =
reinterpret_cast<PtrUiaRaiseAutomationPropertyChangedEvent
>(uiaLib.resolve(
"UiaRaiseAutomationPropertyChangedEvent"));
55 m_pUiaRaiseAutomationEvent =
reinterpret_cast<PtrUiaRaiseAutomationEvent
>(uiaLib.resolve(
"UiaRaiseAutomationEvent"));
56 m_pUiaRaiseNotificationEvent =
reinterpret_cast<PtrUiaRaiseNotificationEvent
>(uiaLib.resolve(
"UiaRaiseNotificationEvent"));
57 m_pUiaClientsAreListening =
reinterpret_cast<PtrUiaClientsAreListening
>(uiaLib.resolve(
"UiaClientsAreListening"));
61 QWindowsUiaWrapper::~QWindowsUiaWrapper()
75 return m_pUiaReturnRawElementProvider
76 && m_pUiaHostProviderFromHwnd
77 && m_pUiaRaiseAutomationPropertyChangedEvent
78 && m_pUiaRaiseAutomationEvent
79 && m_pUiaClientsAreListening;
84 if (!m_pUiaClientsAreListening)
86 return m_pUiaClientsAreListening();
91 if (!m_pUiaReturnRawElementProvider)
92 return static_cast<LRESULT
>(
NULL);
93 return m_pUiaReturnRawElementProvider(hwnd, wParam, lParam,
el);
98 if (!m_pUiaHostProviderFromHwnd)
100 return m_pUiaHostProviderFromHwnd(hwnd, ppProvider);
105 if (!m_pUiaRaiseAutomationPropertyChangedEvent)
107 return m_pUiaRaiseAutomationPropertyChangedEvent(pProvider,
id, oldValue, newValue);
112 if (!m_pUiaRaiseAutomationEvent)
114 return m_pUiaRaiseAutomationEvent(pProvider,
id);
119 if (!m_pUiaRaiseNotificationEvent)
121 return m_pUiaRaiseNotificationEvent(provider, notificationKind, notificationProcessing, displayString, activityId);
HRESULT raiseNotificationEvent(IRawElementProviderSimple *provider, NotificationKind notificationKind, NotificationProcessing notificationProcessing, BSTR displayString, BSTR activityId)
HRESULT raiseAutomationEvent(IRawElementProviderSimple *pProvider, EVENTID id)
BOOL clientsAreListening()
static QWindowsUiaWrapper * instance()
HRESULT raiseAutomationPropertyChangedEvent(IRawElementProviderSimple *pProvider, PROPERTYID id, VARIANT oldValue, VARIANT newValue)
LRESULT returnRawElementProvider(HWND hwnd, WPARAM wParam, LPARAM lParam, IRawElementProviderSimple *el)
HRESULT hostProviderFromHwnd(HWND hwnd, IRawElementProviderSimple **ppProvider)
#define QStringLiteral(str)
#define UIA_E_NOTSUPPORTED