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
15f098c3
Commit
15f098c3
authored
Sep 21, 2023
by
Connor McAdams
Committed by
Alexandre Julliard
Oct 18, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
uiautomationcore: Implement IUIAutomationElement::get_CachedControlType.
Signed-off-by:
Connor McAdams
<
cmcadams@codeweavers.com
>
parent
6d0047ad
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
18 deletions
+37
-18
uiautomation.c
dlls/uiautomationcore/tests/uiautomation.c
+6
-6
uia_com_client.c
dlls/uiautomationcore/uia_com_client.c
+31
-12
No files found.
dlls/uiautomationcore/tests/uiautomation.c
View file @
15f098c3
...
@@ -13658,22 +13658,22 @@ static void test_Element_cache_methods(IUIAutomation *uia_iface)
...
@@ -13658,22 +13658,22 @@ static void test_Element_cache_methods(IUIAutomation *uia_iface)
/* Cached UIA_ControlTypePropertyId. */
/* Cached UIA_ControlTypePropertyId. */
hr
=
IUIAutomationElement_get_CachedControlType
(
element
,
NULL
);
hr
=
IUIAutomationElement_get_CachedControlType
(
element
,
NULL
);
todo_wine
ok
(
hr
==
E_POINTER
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
hr
==
E_POINTER
,
"Unexpected hr %#lx.
\n
"
,
hr
);
tmp_int
=
0xdeadbeef
;
tmp_int
=
0xdeadbeef
;
hr
=
IUIAutomationElement_get_CachedControlType
(
element
,
&
tmp_int
);
hr
=
IUIAutomationElement_get_CachedControlType
(
element
,
&
tmp_int
);
todo_wine
ok
(
hr
==
E_INVALIDARG
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
hr
==
E_INVALIDARG
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
tmp_int
==
0xdeadbeef
,
"Unexpected control type %#x
\n
"
,
tmp_int
);
ok
(
tmp_int
==
0xdeadbeef
,
"Unexpected control type %#x
\n
"
,
tmp_int
);
tmp_int
=
0
;
tmp_int
=
0
;
hr
=
IUIAutomationElement_get_CachedControlType
(
element2
,
&
tmp_int
);
hr
=
IUIAutomationElement_get_CachedControlType
(
element2
,
&
tmp_int
);
todo_wine
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
todo_wine
ok
(
tmp_int
==
UIA_CustomControlTypeId
,
"Unexpected control type %#x
\n
"
,
tmp_int
);
ok
(
tmp_int
==
UIA_CustomControlTypeId
,
"Unexpected control type %#x
\n
"
,
tmp_int
);
tmp_int
=
0
;
tmp_int
=
0
;
hr
=
IUIAutomationElement_get_CachedControlType
(
element3
,
&
tmp_int
);
hr
=
IUIAutomationElement_get_CachedControlType
(
element3
,
&
tmp_int
);
todo_wine
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
todo_wine
ok
(
tmp_int
==
UIA_HyperlinkControlTypeId
,
"Unexpected control type %#x
\n
"
,
tmp_int
);
ok
(
tmp_int
==
UIA_HyperlinkControlTypeId
,
"Unexpected control type %#x
\n
"
,
tmp_int
);
/* Cached UIA_BoundingRectanglePropertyId helper. */
/* Cached UIA_BoundingRectanglePropertyId helper. */
hr
=
IUIAutomationElement_get_CachedBoundingRectangle
(
element
,
NULL
);
hr
=
IUIAutomationElement_get_CachedBoundingRectangle
(
element
,
NULL
);
...
...
dlls/uiautomationcore/uia_com_client.c
View file @
15f098c3
...
@@ -2143,27 +2143,33 @@ static HRESULT WINAPI uia_element_get_CurrentProcessId(IUIAutomationElement9 *if
...
@@ -2143,27 +2143,33 @@ static HRESULT WINAPI uia_element_get_CurrentProcessId(IUIAutomationElement9 *if
return
E_NOTIMPL
;
return
E_NOTIMPL
;
}
}
static
void
uia_elem_get_control_type
(
VARIANT
*
v
,
CONTROLTYPEID
*
ret_val
)
{
const
struct
uia_control_type_info
*
info
=
NULL
;
*
ret_val
=
UIA_CustomControlTypeId
;
if
(
V_VT
(
v
)
!=
VT_I4
)
return
;
if
((
info
=
uia_control_type_info_from_id
(
V_I4
(
v
))))
*
ret_val
=
info
->
control_type_id
;
else
WARN
(
"Provider returned invalid control type ID %ld
\n
"
,
V_I4
(
v
));
}
static
HRESULT
WINAPI
uia_element_get_CurrentControlType
(
IUIAutomationElement9
*
iface
,
CONTROLTYPEID
*
ret_val
)
static
HRESULT
WINAPI
uia_element_get_CurrentControlType
(
IUIAutomationElement9
*
iface
,
CONTROLTYPEID
*
ret_val
)
{
{
struct
uia_element
*
element
=
impl_from_IUIAutomationElement9
(
iface
);
struct
uia_element
*
element
=
impl_from_IUIAutomationElement9
(
iface
);
const
struct
uia_control_type_info
*
control_type_info
=
NULL
;
HRESULT
hr
;
HRESULT
hr
;
VARIANT
v
;
VARIANT
v
;
TRACE
(
"%p, %p
\n
"
,
iface
,
ret_val
);
TRACE
(
"%p, %p
\n
"
,
iface
,
ret_val
);
VariantInit
(
&
v
);
VariantInit
(
&
v
);
*
ret_val
=
UIA_CustomControlTypeId
;
hr
=
UiaGetPropertyValue
(
element
->
node
,
UIA_ControlTypePropertyId
,
&
v
);
hr
=
UiaGetPropertyValue
(
element
->
node
,
UIA_ControlTypePropertyId
,
&
v
);
if
(
SUCCEEDED
(
hr
)
&&
V_VT
(
&
v
)
==
VT_I4
)
uia_elem_get_control_type
(
&
v
,
ret_val
);
{
if
((
control_type_info
=
uia_control_type_info_from_id
(
V_I4
(
&
v
))))
*
ret_val
=
control_type_info
->
control_type_id
;
else
WARN
(
"Provider returned invalid control type ID %ld
\n
"
,
V_I4
(
&
v
));
}
VariantClear
(
&
v
);
VariantClear
(
&
v
);
return
hr
;
return
hr
;
}
}
...
@@ -2393,8 +2399,21 @@ static HRESULT WINAPI uia_element_get_CachedProcessId(IUIAutomationElement9 *ifa
...
@@ -2393,8 +2399,21 @@ static HRESULT WINAPI uia_element_get_CachedProcessId(IUIAutomationElement9 *ifa
static
HRESULT
WINAPI
uia_element_get_CachedControlType
(
IUIAutomationElement9
*
iface
,
CONTROLTYPEID
*
ret_val
)
static
HRESULT
WINAPI
uia_element_get_CachedControlType
(
IUIAutomationElement9
*
iface
,
CONTROLTYPEID
*
ret_val
)
{
{
FIXME
(
"%p: stub
\n
"
,
iface
);
struct
uia_element
*
element
=
impl_from_IUIAutomationElement9
(
iface
);
return
E_NOTIMPL
;
const
int
prop_id
=
UIA_ControlTypePropertyId
;
struct
uia_cache_property
*
cache_prop
=
NULL
;
TRACE
(
"%p, %p
\n
"
,
iface
,
ret_val
);
if
(
!
ret_val
)
return
E_POINTER
;
if
(
!
(
cache_prop
=
bsearch
(
&
prop_id
,
element
->
cached_props
,
element
->
cached_props_count
,
sizeof
(
*
cache_prop
),
uia_cached_property_id_compare
)))
return
E_INVALIDARG
;
uia_elem_get_control_type
(
&
cache_prop
->
prop_val
,
ret_val
);
return
S_OK
;
}
}
static
HRESULT
WINAPI
uia_element_get_CachedLocalizedControlType
(
IUIAutomationElement9
*
iface
,
BSTR
*
ret_val
)
static
HRESULT
WINAPI
uia_element_get_CachedLocalizedControlType
(
IUIAutomationElement9
*
iface
,
BSTR
*
ret_val
)
...
...
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