Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
6f2aa68e
Commit
6f2aa68e
authored
Feb 14, 2023
by
Connor McAdams
Committed by
Alexandre Julliard
Mar 31, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
uiautomationcore: Implement ILegacyIAccessibleProvider::get_Role for MSAA providers.
Signed-off-by:
Connor McAdams
<
cmcadams@codeweavers.com
>
parent
74f06be6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
2 deletions
+32
-2
uiautomation.c
dlls/uiautomationcore/tests/uiautomation.c
+19
-0
uia_provider.c
dlls/uiautomationcore/uia_provider.c
+13
-2
No files found.
dlls/uiautomationcore/tests/uiautomation.c
View file @
6f2aa68e
...
...
@@ -3556,6 +3556,9 @@ static void test_uia_prov_from_acc_properties(void)
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
msaa_role_uia_types
);
i
++
)
{
const
struct
msaa_role_uia_type
*
role
=
&
msaa_role_uia_types
[
i
];
ILegacyIAccessibleProvider
*
accprov
;
DWORD
role_val
;
IUnknown
*
unk
;
/*
* Roles get cached once a valid one is mapped, so create a new
...
...
@@ -3588,6 +3591,22 @@ static void test_uia_prov_from_acc_properties(void)
if
(
!
role
->
uia_control_type
)
CHECK_CALLED
(
Accessible_get_accRole
);
hr
=
IRawElementProviderSimple_GetPatternProvider
(
elprov
,
UIA_LegacyIAccessiblePatternId
,
&
unk
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
!!
unk
,
"unk == NULL
\n
"
);
hr
=
IUnknown_QueryInterface
(
unk
,
&
IID_ILegacyIAccessibleProvider
,
(
void
**
)
&
accprov
);
IUnknown_Release
(
unk
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
!!
accprov
,
"accprov == NULL
\n
"
);
SET_EXPECT
(
Accessible_get_accRole
);
hr
=
ILegacyIAccessibleProvider_get_Role
(
accprov
,
&
role_val
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
role_val
==
Accessible
.
role
,
"role_val != Accessible.role
\n
"
);
CHECK_CALLED
(
Accessible_get_accRole
);
ILegacyIAccessibleProvider_Release
(
accprov
);
IRawElementProviderSimple_Release
(
elprov
);
ok
(
Accessible
.
ref
==
1
,
"Unexpected refcnt %ld
\n
"
,
Accessible
.
ref
);
}
...
...
dlls/uiautomationcore/uia_provider.c
View file @
6f2aa68e
...
...
@@ -1066,8 +1066,19 @@ static HRESULT WINAPI msaa_acc_provider_get_Description(ILegacyIAccessibleProvid
static
HRESULT
WINAPI
msaa_acc_provider_get_Role
(
ILegacyIAccessibleProvider
*
iface
,
DWORD
*
out_role
)
{
FIXME
(
"%p, %p: stub!
\n
"
,
iface
,
out_role
);
return
E_NOTIMPL
;
struct
msaa_provider
*
msaa_prov
=
impl_from_msaa_acc_provider
(
iface
);
HRESULT
hr
;
VARIANT
v
;
TRACE
(
"%p, %p
\n
"
,
iface
,
out_role
);
*
out_role
=
0
;
VariantInit
(
&
v
);
hr
=
IAccessible_get_accRole
(
msaa_prov
->
acc
,
msaa_prov
->
cid
,
&
v
);
if
(
SUCCEEDED
(
hr
)
&&
V_VT
(
&
v
)
==
VT_I4
)
*
out_role
=
V_I4
(
&
v
);
return
S_OK
;
}
static
HRESULT
WINAPI
msaa_acc_provider_get_State
(
ILegacyIAccessibleProvider
*
iface
,
DWORD
*
out_state
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment