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
bc584afa
Commit
bc584afa
authored
Jun 14, 2022
by
Connor McAdams
Committed by
Alexandre Julliard
Jul 19, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
uiautomationcore: Implement UiaNodeRelease.
Signed-off-by:
Connor McAdams
<
cmcadams@codeweavers.com
>
parent
ab4a0017
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
8 deletions
+32
-8
uiautomation.c
dlls/uiautomationcore/tests/uiautomation.c
+6
-7
uia_client.c
dlls/uiautomationcore/uia_client.c
+24
-0
uiautomationcore.spec
dlls/uiautomationcore/uiautomationcore.spec
+1
-1
uiautomationcoreapi.h
include/uiautomationcoreapi.h
+1
-0
No files found.
dlls/uiautomationcore/tests/uiautomation.c
View file @
bc584afa
...
...
@@ -3597,8 +3597,7 @@ static void test_UiaNodeFromProvider(void)
ref
=
IUnknown_AddRef
((
IUnknown
*
)
node
);
ok
(
ref
==
3
,
"Unexpected refcnt %ld
\n
"
,
ref
);
ref
=
IUnknown_Release
((
IUnknown
*
)
node
);
ok
(
ref
==
2
,
"Unexpected refcnt %ld
\n
"
,
ref
);
ok
(
UiaNodeRelease
(
node
),
"UiaNodeRelease returned FALSE
\n
"
);
ref
=
IUnknown_Release
((
IUnknown
*
)
node
);
ok
(
ref
==
1
,
"Unexpected refcnt %ld
\n
"
,
ref
);
...
...
@@ -3626,7 +3625,7 @@ static void test_UiaNodeFromProvider(void)
}
ok_method_sequence
(
node_from_prov3
,
"node_from_prov3"
);
IUnknown_Release
((
IUnknown
*
)
node
);
ok
(
UiaNodeRelease
(
node
),
"UiaNodeRelease returned FALSE
\n
"
);
ok
(
Provider_child
.
ref
==
1
,
"Unexpected refcnt %ld
\n
"
,
Provider_child
.
ref
);
/* HWND exposed, but Provider2 not returned from WM_GETOBJECT. */
...
...
@@ -3668,7 +3667,7 @@ static void test_UiaNodeFromProvider(void)
ok_method_sequence
(
node_from_prov4
,
"node_from_prov4"
);
ok
(
!!
node
,
"node == NULL
\n
"
);
IUnknown_Release
((
IUnknown
*
)
node
);
ok
(
UiaNodeRelease
(
node
),
"UiaNodeRelease returned FALSE
\n
"
);
ok
(
Provider
.
ref
==
1
,
"Unexpected refcnt %ld
\n
"
,
Provider
.
ref
);
/* Return Provider2 in response to WM_GETOBJECT. */
...
...
@@ -3713,7 +3712,7 @@ static void test_UiaNodeFromProvider(void)
ok_method_sequence
(
node_from_prov5
,
"node_from_prov5"
);
IUnknown_Release
((
IUnknown
*
)
node
);
ok
(
UiaNodeRelease
(
node
),
"UiaNodeRelease returned FALSE
\n
"
);
ok
(
Provider
.
ref
==
1
,
"Unexpected refcnt %ld
\n
"
,
Provider
.
ref
);
ok
(
Provider2
.
ref
==
1
,
"Unexpected refcnt %ld
\n
"
,
Provider2
.
ref
);
...
...
@@ -3749,7 +3748,7 @@ static void test_UiaNodeFromProvider(void)
ok
(
Provider
.
ref
==
2
,
"Unexpected refcnt %ld
\n
"
,
Provider
.
ref
);
ok
(
!!
node
,
"node == NULL
\n
"
);
IUnknown_Release
((
IUnknown
*
)
node
);
ok
(
UiaNodeRelease
(
node
),
"UiaNodeRelease returned FALSE
\n
"
);
ok
(
Provider
.
ref
==
1
,
"Unexpected refcnt %ld
\n
"
,
Provider
.
ref
);
ok
(
Provider2
.
ref
==
1
,
"Unexpected refcnt %ld
\n
"
,
Provider2
.
ref
);
...
...
@@ -3783,7 +3782,7 @@ static void test_UiaNodeFromProvider(void)
ok
(
Provider_child
.
ref
==
2
,
"Unexpected refcnt %ld
\n
"
,
Provider
.
ref
);
ok
(
!!
node
,
"node == NULL
\n
"
);
IUnknown_Release
((
IUnknown
*
)
node
);
ok
(
UiaNodeRelease
(
node
),
"UiaNodeRelease returned FALSE
\n
"
);
ok
(
Provider_child
.
ref
==
1
,
"Unexpected refcnt %ld
\n
"
,
Provider
.
ref
);
ok
(
Provider2
.
ref
==
1
,
"Unexpected refcnt %ld
\n
"
,
Provider2
.
ref
);
...
...
dlls/uiautomationcore/uia_client.c
View file @
bc584afa
...
...
@@ -84,6 +84,14 @@ static const IWineUiaNodeVtbl uia_node_vtbl = {
uia_node_Release
,
};
static
struct
uia_node
*
unsafe_impl_from_IWineUiaNode
(
IWineUiaNode
*
iface
)
{
if
(
!
iface
||
(
iface
->
lpVtbl
!=
&
uia_node_vtbl
))
return
NULL
;
return
CONTAINING_RECORD
(
iface
,
struct
uia_node
,
IWineUiaNode_iface
);
}
/***********************************************************************
* UiaNodeFromProvider (uiautomationcore.@)
*/
...
...
@@ -124,3 +132,19 @@ HRESULT WINAPI UiaNodeFromProvider(IRawElementProviderSimple *elprov, HUIANODE *
return
hr
;
}
/***********************************************************************
* UiaNodeRelease (uiautomationcore.@)
*/
BOOL
WINAPI
UiaNodeRelease
(
HUIANODE
huianode
)
{
struct
uia_node
*
node
=
unsafe_impl_from_IWineUiaNode
((
IWineUiaNode
*
)
huianode
);
TRACE
(
"(%p)
\n
"
,
huianode
);
if
(
!
node
)
return
FALSE
;
IWineUiaNode_Release
(
&
node
->
IWineUiaNode_iface
);
return
TRUE
;
}
dlls/uiautomationcore/uiautomationcore.spec
View file @
bc584afa
...
...
@@ -80,7 +80,7 @@
@ stub UiaNodeFromHandle
@ stub UiaNodeFromPoint
@ stdcall UiaNodeFromProvider(ptr ptr)
@ st
ub UiaNodeRelease
@ st
dcall UiaNodeRelease(ptr)
@ stub UiaPatternRelease
#@ stub UiaProviderForNonClient
@ stdcall UiaProviderFromIAccessible(ptr long long ptr)
...
...
include/uiautomationcoreapi.h
View file @
bc584afa
...
...
@@ -257,6 +257,7 @@ HRESULT WINAPI UiaHostProviderFromHwnd(HWND hwnd, IRawElementProviderSimple **el
HRESULT
WINAPI
UiaProviderFromIAccessible
(
IAccessible
*
acc
,
long
child_id
,
DWORD
flags
,
IRawElementProviderSimple
**
elprov
);
HRESULT
WINAPI
UiaGetPropertyValue
(
HUIANODE
huianode
,
PROPERTYID
prop_id
,
VARIANT
*
out_val
);
HRESULT
WINAPI
UiaNodeFromProvider
(
IRawElementProviderSimple
*
elprov
,
HUIANODE
*
huianode
);
BOOL
WINAPI
UiaNodeRelease
(
HUIANODE
huianode
);
#ifdef __cplusplus
}
...
...
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