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
973d00db
Commit
973d00db
authored
May 15, 2023
by
Connor McAdams
Committed by
Alexandre Julliard
May 26, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
uiautomationcore: Implement UiaRemoveEvent.
Signed-off-by:
Connor McAdams
<
cmcadams@codeweavers.com
>
parent
407ce9a1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
23 deletions
+47
-23
uiautomation.c
dlls/uiautomationcore/tests/uiautomation.c
+23
-14
uia_client.c
dlls/uiautomationcore/uia_client.c
+0
-9
uia_event.c
dlls/uiautomationcore/uia_event.c
+24
-0
No files found.
dlls/uiautomationcore/tests/uiautomation.c
View file @
973d00db
...
...
@@ -13807,7 +13807,7 @@ static DWORD WINAPI uia_add_event_test_thread(LPVOID param)
CoInitializeEx
(
NULL
,
COINIT_MULTITHREADED
);
hr
=
UiaRemoveEvent
(
data
->
event
);
todo_wine
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
Provider
.
ref
==
2
,
"Unexpected refcnt %ld
\n
"
,
Provider
.
ref
);
ok
(
Provider2
.
ref
==
1
,
"Unexpected refcnt %ld
\n
"
,
Provider2
.
ref
);
todo_wine
ok
(
Provider2
.
last_call_tid
==
data
->
exp_thread_id
||
...
...
@@ -13855,7 +13855,18 @@ static void test_UiaAddEvent_args(HUIANODE node)
ok
(
!!
event
,
"event == NULL
\n
"
);
hr
=
UiaRemoveEvent
(
event
);
todo_wine
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
}
static
void
test_UiaRemoveEvent_args
(
HUIANODE
node
)
{
HRESULT
hr
;
hr
=
UiaRemoveEvent
(
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
UiaRemoveEvent
((
HUIAEVENT
)
node
);
ok
(
hr
==
E_INVALIDARG
,
"Unexpected hr %#lx.
\n
"
,
hr
);
}
static
void
test_UiaAddEvent
(
void
)
...
...
@@ -13896,6 +13907,7 @@ static void test_UiaAddEvent(void)
/* Test valid function input arguments. */
test_UiaAddEvent_args
(
node
);
test_UiaRemoveEvent_args
(
node
);
/*
* Raise event without any registered event handlers.
...
...
@@ -13933,10 +13945,9 @@ static void test_UiaAddEvent(void)
ok_method_sequence
(
event_seq3
,
"event_seq3"
);
hr
=
UiaRemoveEvent
(
event
);
todo_wine
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
Provider
.
ref
==
2
,
"Unexpected refcnt %ld
\n
"
,
Provider
.
ref
);
if
(
SUCCEEDED
(
hr
))
ok_method_sequence
(
event_seq4
,
"event_seq4"
);
ok_method_sequence
(
event_seq4
,
"event_seq4"
);
/*
* Register an event on the same node again, except this time we have a
...
...
@@ -13985,10 +13996,9 @@ static void test_UiaAddEvent(void)
method_sequences_enabled
=
TRUE
;
hr
=
UiaRemoveEvent
(
event
);
todo_wine
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
Provider
.
ref
==
2
,
"Unexpected refcnt %ld
\n
"
,
Provider
.
ref
);
if
(
SUCCEEDED
(
hr
))
ok_method_sequence
(
event_seq4
,
"event_seq4"
);
ok_method_sequence
(
event_seq4
,
"event_seq4"
);
/* Create an event with TreeScope_Children. */
hr
=
UiaAddEvent
(
node
,
UIA_AutomationFocusChangedEventId
,
uia_event_callback
,
TreeScope_Children
,
NULL
,
0
,
&
cache_req
,
...
...
@@ -14034,7 +14044,7 @@ static void test_UiaAddEvent(void)
set_provider_prop_override
(
&
Provider_child
,
NULL
,
0
);
hr
=
UiaRemoveEvent
(
event
);
todo_wine
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
Provider
.
ref
==
2
,
"Unexpected refcnt %ld
\n
"
,
Provider
.
ref
);
/* Create an event with TreeScope_Descendants. */
...
...
@@ -14054,7 +14064,7 @@ static void test_UiaAddEvent(void)
todo_wine
CHECK_CALLED
(
uia_event_callback
);
hr
=
UiaRemoveEvent
(
event
);
todo_wine
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
Provider
.
ref
==
2
,
"Unexpected refcnt %ld
\n
"
,
Provider
.
ref
);
CoUninitialize
();
...
...
@@ -14122,12 +14132,11 @@ static void test_UiaAddEvent(void)
method_sequences_enabled
=
TRUE
;
hr
=
UiaRemoveEvent
(
event
);
todo_wine
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
Provider
.
ref
==
2
,
"Unexpected refcnt %ld
\n
"
,
Provider
.
ref
);
ok
(
Provider_child
.
ref
==
1
,
"Unexpected refcnt %ld
\n
"
,
Provider_child
.
ref
);
ok
(
Provider_child2
.
ref
==
1
,
"Unexpected refcnt %ld
\n
"
,
Provider_child2
.
ref
);
if
(
SUCCEEDED
(
hr
))
ok_method_sequence
(
event_seq6
,
"event_seq6"
);
ok_method_sequence
(
event_seq6
,
"event_seq6"
);
UiaNodeRelease
(
node
);
ok
(
Provider
.
ref
==
1
,
"Unexpected refcnt %ld
\n
"
,
Provider
.
ref
);
...
...
@@ -14204,7 +14213,7 @@ static void test_UiaAddEvent(void)
todo_wine
CHECK_CALLED
(
uia_event_callback
);
hr
=
UiaRemoveEvent
(
event
);
todo_wine
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
UiaNodeRelease
(
node
);
method_sequences_enabled
=
TRUE
;
...
...
dlls/uiautomationcore/uia_client.c
View file @
973d00db
...
...
@@ -3514,15 +3514,6 @@ exit:
}
/***********************************************************************
* UiaRemoveEvent (uiautomationcore.@)
*/
HRESULT
WINAPI
UiaRemoveEvent
(
HUIAEVENT
huiaevent
)
{
FIXME
(
"(%p): stub
\n
"
,
huiaevent
);
return
E_NOTIMPL
;
}
/***********************************************************************
* UiaEventAddWindow (uiautomationcore.@)
*/
HRESULT
WINAPI
UiaEventAddWindow
(
HUIAEVENT
huiaevent
,
HWND
hwnd
)
...
...
dlls/uiautomationcore/uia_event.c
View file @
973d00db
...
...
@@ -84,6 +84,14 @@ static const IWineUiaEventVtbl uia_event_vtbl = {
uia_event_Release
,
};
static
struct
uia_event
*
unsafe_impl_from_IWineUiaEvent
(
IWineUiaEvent
*
iface
)
{
if
(
!
iface
||
(
iface
->
lpVtbl
!=
&
uia_event_vtbl
))
return
NULL
;
return
CONTAINING_RECORD
(
iface
,
struct
uia_event
,
IWineUiaEvent_iface
);
}
static
HRESULT
create_uia_event
(
struct
uia_event
**
out_event
,
int
event_id
,
int
scope
,
UiaEventCallback
*
cback
,
SAFEARRAY
*
runtime_id
)
{
...
...
@@ -146,3 +154,19 @@ HRESULT WINAPI UiaAddEvent(HUIANODE huianode, EVENTID event_id, UiaEventCallback
return
S_OK
;
}
/***********************************************************************
* UiaRemoveEvent (uiautomationcore.@)
*/
HRESULT
WINAPI
UiaRemoveEvent
(
HUIAEVENT
huiaevent
)
{
struct
uia_event
*
event
=
unsafe_impl_from_IWineUiaEvent
((
IWineUiaEvent
*
)
huiaevent
);
TRACE
(
"(%p)
\n
"
,
event
);
if
(
!
event
)
return
E_INVALIDARG
;
IWineUiaEvent_Release
(
&
event
->
IWineUiaEvent_iface
);
return
S_OK
;
}
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