Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
5bd40907
Commit
5bd40907
authored
Mar 24, 2023
by
Connor McAdams
Committed by
Alexandre Julliard
Apr 28, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
uiautomationcore: Implement IUIAutomation::GetFocusedElement{BuildCacheRequest}.
Signed-off-by:
Connor McAdams
<
cmcadams@codeweavers.com
>
parent
e070e9b4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
56 additions
and
4 deletions
+56
-4
uiautomation.c
dlls/uiautomationcore/tests/uiautomation.c
+0
-0
uia_com_client.c
dlls/uiautomationcore/uia_com_client.c
+56
-4
No files found.
dlls/uiautomationcore/tests/uiautomation.c
View file @
5bd40907
This diff is collapsed.
Click to expand it.
dlls/uiautomationcore/uia_com_client.c
View file @
5bd40907
...
...
@@ -2814,10 +2814,61 @@ static HRESULT WINAPI uia_iface_ElementFromPoint(IUIAutomation6 *iface, POINT pt
return
E_NOTIMPL
;
}
static
HRESULT
uia_get_focused_element
(
IUIAutomation6
*
iface
,
IUIAutomationCacheRequest
*
cache_req
,
BOOL
use_default_cache_req
,
IUIAutomationElement
**
out_elem
)
{
struct
uia_iface
*
uia_iface
=
impl_from_IUIAutomation6
(
iface
);
struct
UiaCacheRequest
*
cache_req_struct
;
BSTR
tree_struct
;
SAFEARRAY
*
sa
;
HRESULT
hr
;
if
(
!
out_elem
)
return
E_POINTER
;
*
out_elem
=
NULL
;
if
(
use_default_cache_req
)
{
hr
=
create_uia_cache_request_iface
(
&
cache_req
);
if
(
FAILED
(
hr
))
return
hr
;
}
hr
=
get_uia_cache_request_struct_from_iface
(
cache_req
,
&
cache_req_struct
);
if
(
FAILED
(
hr
))
goto
exit
;
hr
=
UiaNodeFromFocus
(
cache_req_struct
,
&
sa
,
&
tree_struct
);
if
(
SUCCEEDED
(
hr
))
{
if
(
!
sa
)
{
/*
* Failure to get a focused element returns E_FAIL from the BuildCache
* method, but UIA_E_ELEMENTNOTAVAILABLE from the default cache
* request method.
*/
hr
=
use_default_cache_req
?
UIA_E_ELEMENTNOTAVAILABLE
:
E_FAIL
;
SysFreeString
(
tree_struct
);
goto
exit
;
}
hr
=
create_uia_element_from_cache_req
(
out_elem
,
uia_iface
->
is_cui8
,
cache_req_struct
,
0
,
sa
,
tree_struct
);
SafeArrayDestroy
(
sa
);
}
exit:
if
(
use_default_cache_req
)
IUIAutomationCacheRequest_Release
(
cache_req
);
return
hr
;
}
static
HRESULT
WINAPI
uia_iface_GetFocusedElement
(
IUIAutomation6
*
iface
,
IUIAutomationElement
**
out_elem
)
{
FIXME
(
"%p, %p: stub
\n
"
,
iface
,
out_elem
);
return
E_NOTIMPL
;
TRACE
(
"%p, %p
\n
"
,
iface
,
out_elem
);
return
uia_get_focused_element
(
iface
,
NULL
,
TRUE
,
out_elem
);
}
static
HRESULT
WINAPI
uia_iface_GetRootElementBuildCache
(
IUIAutomation6
*
iface
,
IUIAutomationCacheRequest
*
cache_req
,
...
...
@@ -2844,8 +2895,9 @@ static HRESULT WINAPI uia_iface_ElementFromPointBuildCache(IUIAutomation6 *iface
static
HRESULT
WINAPI
uia_iface_GetFocusedElementBuildCache
(
IUIAutomation6
*
iface
,
IUIAutomationCacheRequest
*
cache_req
,
IUIAutomationElement
**
out_elem
)
{
FIXME
(
"%p, %p, %p: stub
\n
"
,
iface
,
cache_req
,
out_elem
);
return
E_NOTIMPL
;
TRACE
(
"%p, %p, %p
\n
"
,
iface
,
cache_req
,
out_elem
);
return
uia_get_focused_element
(
iface
,
cache_req
,
FALSE
,
out_elem
);
}
static
HRESULT
WINAPI
uia_iface_CreateTreeWalker
(
IUIAutomation6
*
iface
,
IUIAutomationCondition
*
cond
,
...
...
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