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
a4bb7c12
Commit
a4bb7c12
authored
Mar 06, 2023
by
Connor McAdams
Committed by
Alexandre Julliard
Mar 06, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
uiautomationcore: Implement IUIAutomation::get_ControlViewCondition.
Signed-off-by:
Connor McAdams
<
cmcadams@codeweavers.com
>
parent
f5d562b7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
72 additions
and
2 deletions
+72
-2
uiautomation.c
dlls/uiautomationcore/tests/uiautomation.c
+44
-0
uia_com_client.c
dlls/uiautomationcore/uia_com_client.c
+28
-2
No files found.
dlls/uiautomationcore/tests/uiautomation.c
View file @
a4bb7c12
...
...
@@ -10386,6 +10386,50 @@ static void test_CUIAutomation_condition_ifaces(IUIAutomation *uia_iface)
CoTaskMemFree
(
cond_arr
);
IUIAutomationOrCondition_Release
(
or_cond
);
/*
* Condition used to get the control TreeView. Equivalent to:
* if (!(UIA_IsControlElementPropertyId == VARIANT_FALSE))
*/
hr
=
IUIAutomation_get_ControlViewCondition
(
uia_iface
,
NULL
);
ok
(
hr
==
E_POINTER
,
"Unexpected hr %#lx.
\n
"
,
hr
);
cond
=
NULL
;
hr
=
IUIAutomation_get_ControlViewCondition
(
uia_iface
,
&
cond
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
!!
cond
,
"cond == NULL
\n
"
);
hr
=
IUIAutomationCondition_QueryInterface
(
cond
,
&
IID_IUIAutomationNotCondition
,
(
void
**
)
&
not_cond
);
IUIAutomationCondition_Release
(
cond
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
!!
not_cond
,
"not_cond == NULL
\n
"
);
cond
=
NULL
;
hr
=
IUIAutomationNotCondition_GetChild
(
not_cond
,
&
cond
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
!!
cond
,
"cond == NULL
\n
"
);
hr
=
IUIAutomationCondition_QueryInterface
(
cond
,
&
IID_IUIAutomationPropertyCondition
,
(
void
**
)
&
prop_cond
);
IUIAutomationCondition_Release
(
cond
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
!!
prop_cond
,
"prop_cond == NULL
\n
"
);
hr
=
IUIAutomationPropertyCondition_get_PropertyId
(
prop_cond
,
&
prop_id
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
prop_id
==
UIA_IsControlElementPropertyId
,
"Unexpected prop_id %d.
\n
"
,
prop_id
);
VariantInit
(
&
v
);
hr
=
IUIAutomationPropertyCondition_get_PropertyValue
(
prop_cond
,
&
v
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
check_variant_bool
(
&
v
,
FALSE
),
"Unexpected BOOL %#x
\n
"
,
V_BOOL
(
&
v
));
VariantClear
(
&
v
);
hr
=
IUIAutomationPropertyCondition_get_PropertyConditionFlags
(
prop_cond
,
&
prop_flags
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
prop_flags
==
PropertyConditionFlags_None
,
"Unexpected flags %#x.
\n
"
,
prop_flags
);
IUIAutomationPropertyCondition_Release
(
prop_cond
);
IUIAutomationNotCondition_Release
(
not_cond
);
}
struct
uia_com_classes
{
...
...
dlls/uiautomationcore/uia_com_client.c
View file @
a4bb7c12
...
...
@@ -1769,8 +1769,34 @@ static HRESULT WINAPI uia_iface_get_RawViewCondition(IUIAutomation6 *iface, IUIA
static
HRESULT
WINAPI
uia_iface_get_ControlViewCondition
(
IUIAutomation6
*
iface
,
IUIAutomationCondition
**
out_condition
)
{
FIXME
(
"%p, %p: stub
\n
"
,
iface
,
out_condition
);
return
E_NOTIMPL
;
IUIAutomationCondition
*
prop_cond
,
*
not_cond
;
HRESULT
hr
;
VARIANT
v
;
TRACE
(
"%p, %p
\n
"
,
iface
,
out_condition
);
if
(
!
out_condition
)
return
E_POINTER
;
*
out_condition
=
NULL
;
VariantInit
(
&
v
);
V_VT
(
&
v
)
=
VT_BOOL
;
V_BOOL
(
&
v
)
=
VARIANT_FALSE
;
hr
=
create_uia_property_condition_iface
(
&
prop_cond
,
UIA_IsControlElementPropertyId
,
v
,
PropertyConditionFlags_None
);
if
(
FAILED
(
hr
))
return
hr
;
hr
=
create_uia_not_condition_iface
(
&
not_cond
,
prop_cond
);
if
(
FAILED
(
hr
))
{
IUIAutomationCondition_Release
(
prop_cond
);
return
hr
;
}
*
out_condition
=
not_cond
;
return
S_OK
;
}
static
HRESULT
WINAPI
uia_iface_get_ContentViewCondition
(
IUIAutomation6
*
iface
,
IUIAutomationCondition
**
out_condition
)
...
...
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