Skip to content
Snippets Groups Projects
Commit 0159e067 authored by Esme Povirk's avatar Esme Povirk Committed by Alexandre Julliard
Browse files

comctl32: Implement accDoDefaultAction for SysLink controls.

parent 1f0afc3b
No related branches found
No related tags found
No related merge requests found
......@@ -529,10 +529,27 @@ static HRESULT WINAPI Accessible_accHitTest(IAccessible *iface, LONG left, LONG
return E_NOTIMPL;
}
static LRESULT SYSLINK_SendParentNotify (const SYSLINK_INFO *infoPtr, UINT code, const DOC_ITEM *Link, int iLink);
static HRESULT WINAPI Accessible_accDoDefaultAction(IAccessible *iface, VARIANT childid)
{
FIXME("%p\n", iface);
return E_NOTIMPL;
SYSLINK_ACC *This = impl_from_IAccessible(iface);
HRESULT hr;
DOC_ITEM* item;
TRACE("%p, %s\n", iface, debugstr_variant(&childid));
hr = Accessible_FindChild(This, childid, &item);
if (FAILED(hr))
return hr;
if (!item)
/* Not supported for whole control. */
return E_INVALIDARG;
SYSLINK_SendParentNotify(This->infoPtr, NM_CLICK, item, V_I4(&childid) - 1);
return S_OK;
}
static HRESULT WINAPI Accessible_put_accName(IAccessible *iface, VARIANT childid, BSTR name)
......
......@@ -351,7 +351,7 @@ static void test_msaa(void)
ok(!name, "unexpected default action %s\n", debugstr_w(name));
hr = IAccessible_accDoDefaultAction(acc, varChild);
todo_wine ok(hr == E_INVALIDARG, "accDoDefaultAction should fail, hr=%lx\n", hr);
ok(hr == E_INVALIDARG, "accDoDefaultAction should fail, hr=%lx\n", hr);
hr = IAccessible_accLocation(acc, &left, &top, &width, &height, varChild);
ok(hr == S_OK, "accLocation failed, hr=%lx\n", hr);
......@@ -403,9 +403,9 @@ static void test_msaa(void)
g_link_id = -1;
hr = IAccessible_accDoDefaultAction(acc, varChild);
todo_wine ok(hr == S_OK, "accDoDefaultAction failed, hr=%lx\n", hr);
ok(hr == S_OK, "accDoDefaultAction failed, hr=%lx\n", hr);
wait_link_click(500);
todo_wine ok(g_link_id == 0, "Got unexpected link id %d.\n", g_link_id);
ok(g_link_id == 0, "Got unexpected link id %d.\n", g_link_id);
hr = IAccessible_accLocation(acc, &left, &top, &width, &height, varChild);
ok(hr == S_OK, "accLocation failed, hr=%lx\n", hr);
......@@ -453,9 +453,9 @@ static void test_msaa(void)
g_link_id = -1;
hr = IAccessible_accDoDefaultAction(acc, varChild);
todo_wine ok(hr == S_OK, "accDoDefaultAction failed, hr=%lx\n", hr);
ok(hr == S_OK, "accDoDefaultAction failed, hr=%lx\n", hr);
wait_link_click(500);
todo_wine ok(g_link_id == 1, "Got unexpected link id %d.\n", g_link_id);
ok(g_link_id == 1, "Got unexpected link id %d.\n", g_link_id);
hr = IAccessible_accLocation(acc, &left, &top, &width, &height, varChild);
ok(hr == S_OK, "accLocation failed, hr=%lx\n", hr);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment