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
f36e1b91
Commit
f36e1b91
authored
Oct 12, 2022
by
Connor McAdams
Committed by
Alexandre Julliard
Oct 18, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
uiautomationcore: Add support for getting HWND providers to uia_node_from_lresult().
Signed-off-by:
Connor McAdams
<
cmcadams@codeweavers.com
>
parent
750d11a4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
5 deletions
+34
-5
uiautomation.c
dlls/uiautomationcore/tests/uiautomation.c
+5
-5
uia_classes.idl
dlls/uiautomationcore/uia_classes.idl
+1
-0
uia_client.c
dlls/uiautomationcore/uia_client.c
+28
-0
No files found.
dlls/uiautomationcore/tests/uiautomation.c
View file @
f36e1b91
...
...
@@ -5061,12 +5061,12 @@ static const struct prov_method_sequence node_from_hwnd7[] = {
{
&
Provider_child
,
FRAG_NAVIGATE
,
METHOD_TODO
},
/* NavigateDirection_Parent */
{
&
Provider_child
,
PROV_GET_PROVIDER_OPTIONS
},
{
&
Provider_child
,
PROV_GET_PROVIDER_OPTIONS
},
{
&
Provider
,
PROV_GET_PROVIDER_OPTIONS
,
METHOD_TODO
},
{
&
Provider
,
PROV_GET_PROVIDER_OPTIONS
},
{
&
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 */
{
&
Provider
,
PROV_GET_PROVIDER_OPTIONS
,
METHOD_TODO
},
{
&
Provider
,
PROV_GET_PROVIDER_OPTIONS
,
METHOD_TODO
},
{
&
Provider
,
PROV_GET_PROVIDER_OPTIONS
},
{
&
Provider
,
PROV_GET_PROVIDER_OPTIONS
},
{
&
Provider_child
,
PROV_GET_PROPERTY_VALUE
,
METHOD_TODO
},
/* UIA_ProviderDescriptionPropertyId */
{
0
}
};
...
...
@@ -5352,7 +5352,7 @@ static DWORD WINAPI uia_node_from_handle_test_thread(LPVOID param)
SET_EXPECT
(
winproc_GETOBJECT_CLIENT
);
hr
=
UiaGetPropertyValue
(
node
,
UIA_LabeledByPropertyId
,
&
v
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx
\n
"
,
hr
);
todo_wine
CHECK_CALLED
(
winproc_GETOBJECT_UiaRoot
);
CHECK_CALLED
(
winproc_GETOBJECT_UiaRoot
);
called_winproc_GETOBJECT_CLIENT
=
expect_winproc_GETOBJECT_CLIENT
=
0
;
ok
(
Provider_child
.
ref
==
2
,
"Unexpected refcnt %ld
\n
"
,
Provider_child
.
ref
);
...
...
dlls/uiautomationcore/uia_classes.idl
View file @
f36e1b91
...
...
@@ -58,5 +58,6 @@ library UIA_wine_private
HRESULT
get_provider
(
[
in
]
int
idx
,
[
out
,
retval
]
IWineUiaProvider
**
out_prov
)
;
HRESULT
get_prop_val
(
[
in
]
const
GUID
*
prop_guid
,
[
out
,
retval
]
VARIANT
*
ret_val
)
;
HRESULT
disconnect
()
;
HRESULT
get_hwnd
(
[
out
,
retval
]
ULONG
*
out_hwnd
)
;
}
}
dlls/uiautomationcore/uia_client.c
View file @
f36e1b91
...
...
@@ -523,6 +523,17 @@ static HRESULT WINAPI uia_node_disconnect(IWineUiaNode *iface)
return
S_OK
;
}
static
HRESULT
WINAPI
uia_node_get_hwnd
(
IWineUiaNode
*
iface
,
ULONG
*
out_hwnd
)
{
struct
uia_node
*
node
=
impl_from_IWineUiaNode
(
iface
);
TRACE
(
"%p, %p
\n
"
,
node
,
out_hwnd
);
*
out_hwnd
=
HandleToUlong
(
node
->
hwnd
);
return
S_OK
;
}
static
const
IWineUiaNodeVtbl
uia_node_vtbl
=
{
uia_node_QueryInterface
,
uia_node_AddRef
,
...
...
@@ -530,6 +541,7 @@ static const IWineUiaNodeVtbl uia_node_vtbl = {
uia_node_get_provider
,
uia_node_get_prop_val
,
uia_node_disconnect
,
uia_node_get_hwnd
,
};
static
struct
uia_node
*
unsafe_impl_from_IWineUiaNode
(
IWineUiaNode
*
iface
)
...
...
@@ -1351,6 +1363,15 @@ static HRESULT create_wine_uia_nested_node_provider(struct uia_node *node, LRESU
IWineUiaProvider_Release
(
&
prov
->
IWineUiaProvider_iface
);
return
hr
;
}
if
(
!
node
->
hwnd
)
{
ULONG
hwnd
;
hr
=
IWineUiaNode_get_hwnd
(
nested_node
,
&
hwnd
);
if
(
SUCCEEDED
(
hr
))
node
->
hwnd
=
UlongToHandle
(
hwnd
);
}
}
node
->
prov
[
prov_type
]
=
provider_iface
;
...
...
@@ -1383,6 +1404,13 @@ static HRESULT uia_node_from_lresult(LRESULT lr, HUIANODE *huianode)
return
hr
;
}
if
(
node
->
hwnd
)
{
hr
=
uia_get_provider_from_hwnd
(
node
);
if
(
FAILED
(
hr
))
WARN
(
"uia_get_provider_from_hwnd failed with hr %#lx
\n
"
,
hr
);
}
hr
=
prepare_uia_node
(
node
);
if
(
FAILED
(
hr
))
{
...
...
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