Commit 05b4619d authored by Connor McAdams's avatar Connor McAdams Committed by Alexandre Julliard

uiautomationcore: Handle EVENT_SYSTEM_ALERT in…

uiautomationcore: Handle EVENT_SYSTEM_ALERT in IProxyProviderWinEventHandler::RespondToWinEvent() for MSAA providers. Signed-off-by: 's avatarConnor McAdams <cmcadams@codeweavers.com>
parent c22bd318
......@@ -3543,16 +3543,16 @@ static void test_uia_prov_from_acc_winevent_handler(HWND hwnd)
SET_EXPECT(ProxyEventSink_AddAutomationEvent);
hr = IProxyProviderWinEventHandler_RespondToWinEvent(handler, EVENT_SYSTEM_ALERT, hwnd, OBJID_CLIENT, CHILDID_SELF,
&ProxyEventSink.IProxyProviderWinEventSink_iface);
todo_wine ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
todo_wine CHECK_CALLED(ProxyEventSink_AddAutomationEvent);
todo_wine ok(ProxyEventSink.event_id == UIA_SystemAlertEventId, "Unexpected event_id %d\n", ProxyEventSink.event_id);
todo_wine ok(ProxyEventSink.event_elprov == elprov, "Unexpected event_elprov %p\n", ProxyEventSink.event_elprov);
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
CHECK_CALLED(ProxyEventSink_AddAutomationEvent);
ok(ProxyEventSink.event_id == UIA_SystemAlertEventId, "Unexpected event_id %d\n", ProxyEventSink.event_id);
ok(ProxyEventSink.event_elprov == elprov, "Unexpected event_elprov %p\n", ProxyEventSink.event_elprov);
proxy_event_sink_clear();
/* EVENT_OBJECT_FOCUS is not handled. */
hr = IProxyProviderWinEventHandler_RespondToWinEvent(handler, EVENT_OBJECT_FOCUS, hwnd, OBJID_CLIENT, CHILDID_SELF,
&ProxyEventSink.IProxyProviderWinEventSink_iface);
todo_wine ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* EVENT_OBJECT_NAMECHANGE. */
SET_EXPECT(ProxyEventSink_AddAutomationPropertyChangedEvent);
......
......@@ -1403,8 +1403,34 @@ static ULONG WINAPI msaa_winevent_handler_Release(IProxyProviderWinEventHandler
static HRESULT WINAPI msaa_winevent_handler_RespondToWinEvent(IProxyProviderWinEventHandler *iface, DWORD event_id,
HWND hwnd, LONG objid, LONG cid, IProxyProviderWinEventSink *event_sink)
{
FIXME("%p, %ld, %p, %ld, %ld, %p: stub\n", iface, event_id, hwnd, objid, cid, event_sink);
return E_NOTIMPL;
struct msaa_provider *msaa_prov = impl_from_msaa_winevent_handler(iface);
HRESULT hr;
TRACE("%p, %ld, %p, %ld, %ld, %p\n", iface, event_id, hwnd, objid, cid, event_sink);
switch (event_id)
{
case EVENT_SYSTEM_ALERT:
hr = IProxyProviderWinEventSink_AddAutomationEvent(event_sink, &msaa_prov->IRawElementProviderSimple_iface,
UIA_SystemAlertEventId);
if (FAILED(hr))
WARN("AddAutomationEvent failed with hr %#lx\n", hr);
break;
case EVENT_OBJECT_REORDER:
case EVENT_OBJECT_SELECTION:
case EVENT_OBJECT_NAMECHANGE:
case EVENT_OBJECT_VALUECHANGE:
case EVENT_OBJECT_HELPCHANGE:
case EVENT_OBJECT_INVOKED:
FIXME("WinEvent %ld currently unimplemented\n", event_id);
return E_NOTIMPL;
default:
break;
}
return S_OK;
}
static const IProxyProviderWinEventHandlerVtbl msaa_winevent_handler_vtbl = {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment