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
66666709
Commit
66666709
authored
Oct 04, 2023
by
Connor McAdams
Committed by
Alexandre Julliard
Oct 04, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
uiautomationcore: Add support for passing WinEvents to the COM API.
Signed-off-by:
Connor McAdams
<
cmcadams@codeweavers.com
>
parent
f420b65a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
2 deletions
+18
-2
uia_com_client.c
dlls/uiautomationcore/uia_com_client.c
+9
-0
uia_event.c
dlls/uiautomationcore/uia_event.c
+6
-2
uia_private.h
dlls/uiautomationcore/uia_private.h
+3
-0
No files found.
dlls/uiautomationcore/uia_com_client.c
View file @
66666709
...
...
@@ -958,6 +958,12 @@ struct uia_com_event {
struct
uia_event_handler_map_entry
*
handler_map
;
};
HRESULT
uia_com_win_event_callback
(
DWORD
event_id
,
HWND
hwnd
,
LONG
obj_id
,
LONG
child_id
,
DWORD
thread_id
,
DWORD
event_time
)
{
FIXME
(
"%ld, %p, %ld, %ld, %ld, %ld: stub
\n
"
,
event_id
,
hwnd
,
obj_id
,
child_id
,
thread_id
,
event_time
);
return
S_OK
;
}
static
HRESULT
uia_event_handlers_add_handler
(
IUnknown
*
handler_iface
,
SAFEARRAY
*
runtime_id
,
int
event_id
,
struct
uia_com_event
*
event
)
{
...
...
@@ -3311,6 +3317,9 @@ static HRESULT uia_add_com_event_handler(IUIAutomation6 *iface, EVENTID event_id
if
(
FAILED
(
hr
))
goto
exit
;
if
(
!
uia_clientside_event_start_event_thread
((
struct
uia_event
*
)
com_event
->
event
))
WARN
(
"Failed to start event thread, WinEvents may not be delivered.
\n
"
);
hr
=
uia_event_handlers_add_handler
(
handler_unk
,
runtime_id
,
event_id
,
com_event
);
exit:
...
...
dlls/uiautomationcore/uia_event.c
View file @
66666709
...
...
@@ -78,7 +78,6 @@ static BOOL CALLBACK uia_win_event_enum_top_level_hwnds(HWND hwnd, LPARAM lparam
return
TRUE
;
}
static
BOOL
uia_clientside_event_start_event_thread
(
struct
uia_event
*
event
);
HRESULT
uia_event_add_win_event_hwnd
(
struct
uia_event
*
event
,
HWND
hwnd
)
{
if
(
!
uia_clientside_event_start_event_thread
(
event
))
...
...
@@ -844,6 +843,11 @@ static void uia_event_thread_process_queue(struct list *event_queue)
{
struct
uia_queue_win_event
*
win_event
=
(
struct
uia_queue_win_event
*
)
event
;
hr
=
uia_com_win_event_callback
(
win_event
->
event_id
,
win_event
->
hwnd
,
win_event
->
obj_id
,
win_event
->
child_id
,
win_event
->
thread_id
,
win_event
->
event_time
);
if
(
FAILED
(
hr
))
WARN
(
"uia_com_win_event_callback failed with hr %#lx
\n
"
,
hr
);
hr
=
uia_event_for_each
(
win_event_to_uia_event_id
(
win_event
->
event_id
),
uia_win_event_for_each_callback
,
(
void
*
)
win_event
,
TRUE
);
break
;
...
...
@@ -990,7 +994,7 @@ static void uia_stop_event_thread(void)
LeaveCriticalSection
(
&
event_thread_cs
);
}
static
BOOL
uia_clientside_event_start_event_thread
(
struct
uia_event
*
event
)
BOOL
uia_clientside_event_start_event_thread
(
struct
uia_event
*
event
)
{
if
(
!
event
->
u
.
clientside
.
event_thread_started
)
event
->
u
.
clientside
.
event_thread_started
=
uia_start_event_thread
();
...
...
dlls/uiautomationcore/uia_private.h
View file @
66666709
...
...
@@ -223,10 +223,13 @@ HRESULT uia_condition_check(HUIANODE node, struct UiaCondition *condition) DECLS
BOOL
uia_condition_matched
(
HRESULT
hr
)
DECLSPEC_HIDDEN
;
/* uia_com_client.c */
HRESULT
uia_com_win_event_callback
(
DWORD
event_id
,
HWND
hwnd
,
LONG
obj_id
,
LONG
child_id
,
DWORD
thread_id
,
DWORD
event_time
)
DECLSPEC_HIDDEN
;
HRESULT
create_uia_iface
(
IUnknown
**
iface
,
BOOL
is_cui8
)
DECLSPEC_HIDDEN
;
/* uia_event.c */
HRESULT
uia_event_add_win_event_hwnd
(
struct
uia_event
*
event
,
HWND
hwnd
)
DECLSPEC_HIDDEN
;
BOOL
uia_clientside_event_start_event_thread
(
struct
uia_event
*
event
)
DECLSPEC_HIDDEN
;
HRESULT
create_serverside_uia_event
(
struct
uia_event
**
out_event
,
LONG
process_id
,
LONG
event_cookie
)
DECLSPEC_HIDDEN
;
HRESULT
uia_event_add_provider_event_adviser
(
IRawElementProviderAdviseEvents
*
advise_events
,
struct
uia_event
*
event
)
DECLSPEC_HIDDEN
;
...
...
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