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
cf9d7ee4
Commit
cf9d7ee4
authored
Aug 23, 2022
by
Connor McAdams
Committed by
Alexandre Julliard
Aug 31, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
uiautomationcore: Retrieve HWND from HUIANODE provider.
Signed-off-by:
Connor McAdams
<
cmcadams@codeweavers.com
>
parent
3106380d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
50 additions
and
16 deletions
+50
-16
uiautomation.c
dlls/uiautomationcore/tests/uiautomation.c
+16
-16
uia_client.c
dlls/uiautomationcore/uia_client.c
+34
-0
No files found.
dlls/uiautomationcore/tests/uiautomation.c
View file @
cf9d7ee4
...
...
@@ -3647,8 +3647,8 @@ static const struct prov_method_sequence node_from_prov2[] = {
{
&
Provider
,
PROV_GET_PROVIDER_OPTIONS
},
/* Win10v1507 and below call this. */
{
&
Provider
,
PROV_GET_PROPERTY_VALUE
,
METHOD_OPTIONAL
},
/* UIA_NativeWindowHandlePropertyId */
{
&
Provider
,
PROV_GET_HOST_RAW_ELEMENT_PROVIDER
,
METHOD_TODO
},
{
&
Provider
,
PROV_GET_PROPERTY_VALUE
,
METHOD_TODO
},
/* UIA_NativeWindowHandlePropertyId */
{
&
Provider
,
PROV_GET_HOST_RAW_ELEMENT_PROVIDER
},
{
&
Provider
,
PROV_GET_PROPERTY_VALUE
},
/* UIA_NativeWindowHandlePropertyId */
{
&
Provider
,
FRAG_NAVIGATE
,
METHOD_TODO
},
/* NavigateDirection_Parent */
/* Only called on Windows versions past Win10v1507. */
{
&
Provider
,
PROV_GET_PROVIDER_OPTIONS
,
METHOD_OPTIONAL
},
...
...
@@ -3660,8 +3660,8 @@ static const struct prov_method_sequence node_from_prov3[] = {
{
&
Provider_child
,
PROV_GET_PROVIDER_OPTIONS
},
/* Win10v1507 and below call this. */
{
&
Provider_child
,
PROV_GET_PROPERTY_VALUE
,
METHOD_OPTIONAL
},
/* UIA_NativeWindowHandlePropertyId */
{
&
Provider_child
,
PROV_GET_HOST_RAW_ELEMENT_PROVIDER
,
METHOD_TODO
},
{
&
Provider_child
,
PROV_GET_PROPERTY_VALUE
,
METHOD_TODO
},
/* UIA_NativeWindowHandlePropertyId */
{
&
Provider_child
,
PROV_GET_HOST_RAW_ELEMENT_PROVIDER
},
{
&
Provider_child
,
PROV_GET_PROPERTY_VALUE
},
/* UIA_NativeWindowHandlePropertyId */
{
&
Provider_child
,
FRAG_NAVIGATE
,
METHOD_TODO
},
/* NavigateDirection_Parent */
/* Only called on Windows versions past Win10v1507. */
{
&
Provider_child
,
PROV_GET_PROVIDER_OPTIONS
,
METHOD_OPTIONAL
},
...
...
@@ -3673,7 +3673,7 @@ static const struct prov_method_sequence node_from_prov4[] = {
{
&
Provider
,
PROV_GET_PROVIDER_OPTIONS
},
/* Win10v1507 and below call this. */
{
&
Provider
,
PROV_GET_PROPERTY_VALUE
,
METHOD_OPTIONAL
},
/* UIA_NativeWindowHandlePropertyId */
{
&
Provider
,
PROV_GET_HOST_RAW_ELEMENT_PROVIDER
,
METHOD_TODO
},
{
&
Provider
,
PROV_GET_HOST_RAW_ELEMENT_PROVIDER
},
{
&
Provider
,
FRAG_NAVIGATE
,
METHOD_TODO
},
/* NavigateDirection_Parent */
/* Only called on Windows versions past Win10v1507. */
{
&
Provider
,
PROV_GET_PROVIDER_OPTIONS
,
METHOD_OPTIONAL
},
...
...
@@ -3685,7 +3685,7 @@ static const struct prov_method_sequence node_from_prov5[] = {
{
&
Provider
,
PROV_GET_PROVIDER_OPTIONS
},
/* Win10v1507 and below call this. */
{
&
Provider
,
PROV_GET_PROPERTY_VALUE
,
METHOD_OPTIONAL
},
/* UIA_NativeWindowHandlePropertyId */
{
&
Provider
,
PROV_GET_HOST_RAW_ELEMENT_PROVIDER
,
METHOD_TODO
},
{
&
Provider
,
PROV_GET_HOST_RAW_ELEMENT_PROVIDER
},
{
&
Provider2
,
PROV_GET_PROVIDER_OPTIONS
,
METHOD_TODO
},
/* Win10v1507 and below call this. */
{
&
Provider2
,
PROV_GET_PROPERTY_VALUE
,
METHOD_OPTIONAL
},
/* UIA_NativeWindowHandlePropertyId */
...
...
@@ -3710,7 +3710,7 @@ static const struct prov_method_sequence node_from_prov6[] = {
{
&
Provider
,
PROV_GET_PROVIDER_OPTIONS
},
/* Win10v1507 and below call this. */
{
&
Provider
,
PROV_GET_PROPERTY_VALUE
,
METHOD_OPTIONAL
},
/* UIA_NativeWindowHandlePropertyId */
{
&
Provider
,
PROV_GET_HOST_RAW_ELEMENT_PROVIDER
,
METHOD_TODO
},
{
&
Provider
,
PROV_GET_HOST_RAW_ELEMENT_PROVIDER
},
{
&
Provider2
,
PROV_GET_PROVIDER_OPTIONS
,
METHOD_TODO
},
/* Win10v1507 and below call this. */
{
&
Provider2
,
PROV_GET_PROPERTY_VALUE
,
METHOD_OPTIONAL
},
/* UIA_NativeWindowHandlePropertyId */
...
...
@@ -3735,7 +3735,7 @@ static const struct prov_method_sequence node_from_prov7[] = {
{
&
Provider_child
,
PROV_GET_PROVIDER_OPTIONS
},
/* Win10v1507 and below call this. */
{
&
Provider_child
,
PROV_GET_PROPERTY_VALUE
,
METHOD_OPTIONAL
},
/* UIA_NativeWindowHandlePropertyId */
{
&
Provider_child
,
PROV_GET_HOST_RAW_ELEMENT_PROVIDER
,
METHOD_TODO
},
{
&
Provider_child
,
PROV_GET_HOST_RAW_ELEMENT_PROVIDER
},
{
&
Provider2
,
PROV_GET_PROVIDER_OPTIONS
,
METHOD_TODO
},
/* Win10v1507 and below call this. */
{
&
Provider2
,
PROV_GET_PROPERTY_VALUE
,
METHOD_OPTIONAL
},
/* UIA_NativeWindowHandlePropertyId */
...
...
@@ -3760,8 +3760,8 @@ static const struct prov_method_sequence node_from_prov8[] = {
{
&
Provider
,
PROV_GET_PROVIDER_OPTIONS
},
/* Win10v1507 and below call this. */
{
&
Provider
,
PROV_GET_PROPERTY_VALUE
,
METHOD_OPTIONAL
},
/* UIA_NativeWindowHandlePropertyId */
{
&
Provider
,
PROV_GET_HOST_RAW_ELEMENT_PROVIDER
,
METHOD_TODO
},
{
&
Provider
,
PROV_GET_PROPERTY_VALUE
,
METHOD_TODO
},
/* UIA_NativeWindowHandlePropertyId */
{
&
Provider
,
PROV_GET_HOST_RAW_ELEMENT_PROVIDER
},
{
&
Provider
,
PROV_GET_PROPERTY_VALUE
},
/* UIA_NativeWindowHandlePropertyId */
{
&
Provider
,
FRAG_NAVIGATE
,
METHOD_TODO
},
/* NavigateDirection_Parent */
/* Only called on Windows versions past Win10v1507. */
{
&
Provider
,
PROV_GET_PROVIDER_OPTIONS
,
METHOD_OPTIONAL
},
...
...
@@ -4153,8 +4153,8 @@ static const struct prov_method_sequence get_elem_prop_seq[] = {
{
&
Provider_child
,
PROV_GET_PROVIDER_OPTIONS
},
/* Win10v1507 and below call this. */
{
&
Provider_child
,
PROV_GET_PROPERTY_VALUE
,
METHOD_OPTIONAL
},
/* UIA_NativeWindowHandlePropertyId */
{
&
Provider_child
,
PROV_GET_HOST_RAW_ELEMENT_PROVIDER
,
METHOD_TODO
},
{
&
Provider_child
,
PROV_GET_PROPERTY_VALUE
,
METHOD_TODO
},
/* UIA_NativeWindowHandlePropertyId */
{
&
Provider_child
,
PROV_GET_HOST_RAW_ELEMENT_PROVIDER
},
{
&
Provider_child
,
PROV_GET_PROPERTY_VALUE
},
/* UIA_NativeWindowHandlePropertyId */
{
&
Provider_child
,
FRAG_NAVIGATE
,
METHOD_TODO
},
/* NavigateDirection_Parent */
/* Only called on Windows versions past Win10v1507. */
{
&
Provider_child
,
PROV_GET_PROVIDER_OPTIONS
,
METHOD_OPTIONAL
},
...
...
@@ -4168,15 +4168,15 @@ static const struct prov_method_sequence get_elem_arr_prop_seq[] = {
{
&
Provider_child
,
PROV_GET_PROVIDER_OPTIONS
},
/* Win10v1507 and below call this. */
{
&
Provider_child
,
PROV_GET_PROPERTY_VALUE
,
METHOD_OPTIONAL
},
/* UIA_NativeWindowHandlePropertyId */
{
&
Provider_child
,
PROV_GET_HOST_RAW_ELEMENT_PROVIDER
,
METHOD_TODO
},
{
&
Provider_child
,
PROV_GET_PROPERTY_VALUE
,
METHOD_TODO
},
/* UIA_NativeWindowHandlePropertyId */
{
&
Provider_child
,
PROV_GET_HOST_RAW_ELEMENT_PROVIDER
},
{
&
Provider_child
,
PROV_GET_PROPERTY_VALUE
},
/* UIA_NativeWindowHandlePropertyId */
{
&
Provider_child
,
FRAG_NAVIGATE
,
METHOD_TODO
},
/* NavigateDirection_Parent */
{
&
Provider_child
,
PROV_GET_PROVIDER_OPTIONS
,
METHOD_TODO
},
{
&
Provider_child2
,
PROV_GET_PROVIDER_OPTIONS
},
/* Win10v1507 and below call this. */
{
&
Provider_child2
,
PROV_GET_PROPERTY_VALUE
,
METHOD_OPTIONAL
},
/* UIA_NativeWindowHandlePropertyId */
{
&
Provider_child2
,
PROV_GET_HOST_RAW_ELEMENT_PROVIDER
,
METHOD_TODO
},
{
&
Provider_child2
,
PROV_GET_PROPERTY_VALUE
,
METHOD_TODO
},
/* UIA_NativeWindowHandlePropertyId */
{
&
Provider_child2
,
PROV_GET_HOST_RAW_ELEMENT_PROVIDER
},
{
&
Provider_child2
,
PROV_GET_PROPERTY_VALUE
},
/* UIA_NativeWindowHandlePropertyId */
{
&
Provider_child2
,
FRAG_NAVIGATE
,
METHOD_TODO
},
/* NavigateDirection_Parent */
{
&
Provider_child2
,
PROV_GET_PROVIDER_OPTIONS
,
METHOD_TODO
},
{
&
Provider_child
,
PROV_GET_PROPERTY_VALUE
},
...
...
dlls/uiautomationcore/uia_client.c
View file @
cf9d7ee4
...
...
@@ -160,6 +160,37 @@ static HRESULT get_global_interface_table(IGlobalInterfaceTable **git)
return
hr
;
}
static
HWND
get_hwnd_from_provider
(
IRawElementProviderSimple
*
elprov
)
{
IRawElementProviderSimple
*
host_prov
;
HRESULT
hr
;
VARIANT
v
;
HWND
hwnd
;
hwnd
=
NULL
;
VariantInit
(
&
v
);
hr
=
IRawElementProviderSimple_get_HostRawElementProvider
(
elprov
,
&
host_prov
);
if
(
SUCCEEDED
(
hr
)
&&
host_prov
)
{
hr
=
IRawElementProviderSimple_GetPropertyValue
(
host_prov
,
UIA_NativeWindowHandlePropertyId
,
&
v
);
if
(
SUCCEEDED
(
hr
)
&&
(
V_VT
(
&
v
)
==
VT_I4
))
hwnd
=
UlongToHandle
(
V_I4
(
&
v
));
VariantClear
(
&
v
);
IRawElementProviderSimple_Release
(
host_prov
);
}
if
(
!
IsWindow
(
hwnd
))
{
hr
=
IRawElementProviderSimple_GetPropertyValue
(
elprov
,
UIA_NativeWindowHandlePropertyId
,
&
v
);
if
(
SUCCEEDED
(
hr
)
&&
(
V_VT
(
&
v
)
==
VT_I4
))
hwnd
=
UlongToHandle
(
V_I4
(
&
v
));
VariantClear
(
&
v
);
}
return
hwnd
;
}
/*
* IWineUiaNode interface.
*/
...
...
@@ -169,6 +200,8 @@ struct uia_node {
IWineUiaProvider
*
prov
;
DWORD
git_cookie
;
HWND
hwnd
;
};
static
inline
struct
uia_node
*
impl_from_IWineUiaNode
(
IWineUiaNode
*
iface
)
...
...
@@ -482,6 +515,7 @@ static HRESULT create_wine_uia_provider(struct uia_node *node, IRawElementProvid
prov
->
elprov
=
elprov
;
prov
->
ref
=
1
;
node
->
prov
=
&
prov
->
IWineUiaProvider_iface
;
node
->
hwnd
=
get_hwnd_from_provider
(
elprov
);
/*
* If the UseComThreading ProviderOption is specified, all calls to the
...
...
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