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
afb15514
Commit
afb15514
authored
Jun 19, 2022
by
Connor McAdams
Committed by
Alexandre Julliard
Jul 21, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
uiautomationcore: Add support for UIAutomationType_Int properties.
Signed-off-by:
Connor McAdams
<
cmcadams@codeweavers.com
>
parent
61fa18aa
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
82 additions
and
26 deletions
+82
-26
uiautomation.c
dlls/uiautomationcore/tests/uiautomation.c
+10
-8
uia_client.c
dlls/uiautomationcore/uia_client.c
+40
-2
uia_ids.c
dlls/uiautomationcore/uia_ids.c
+32
-16
No files found.
dlls/uiautomationcore/tests/uiautomation.c
View file @
afb15514
...
...
@@ -4100,9 +4100,7 @@ static void check_uia_prop_val(PROPERTYID prop_id, enum UIAutomationType type, V
break
;
case
UIAutomationType_Int
:
todo_wine
ok
(
V_VT
(
v
)
==
VT_I4
,
"Unexpected VT %d
\n
"
,
V_VT
(
v
));
if
(
V_VT
(
v
)
!=
VT_I4
)
break
;
ok
(
V_VT
(
v
)
==
VT_I4
,
"Unexpected VT %d
\n
"
,
V_VT
(
v
));
if
(
prop_id
==
UIA_NativeWindowHandlePropertyId
)
ok
(
ULongToHandle
(
V_I4
(
v
))
==
Provider
.
hwnd
,
"Unexpected I4 %#lx
\n
"
,
V_I4
(
v
));
...
...
@@ -4112,9 +4110,7 @@ static void check_uia_prop_val(PROPERTYID prop_id, enum UIAutomationType type, V
break
;
case
UIAutomationType_IntArray
:
todo_wine
ok
(
V_VT
(
v
)
==
(
VT_ARRAY
|
VT_I4
),
"Unexpected VT %d
\n
"
,
V_VT
(
v
));
if
(
V_VT
(
v
)
!=
(
VT_ARRAY
|
VT_I4
))
break
;
ok
(
V_VT
(
v
)
==
(
VT_ARRAY
|
VT_I4
),
"Unexpected VT %d
\n
"
,
V_VT
(
v
));
for
(
idx
=
0
;
idx
<
ARRAY_SIZE
(
uia_i4_arr_prop_val
);
idx
++
)
{
...
...
@@ -4319,7 +4315,10 @@ static void test_UiaGetPropertyValue(void)
}
winetest_push_context
(
"prop_id %d"
,
prop_id
);
hr
=
UiaGetPropertyValue
(
node
,
prop_id
,
&
v
);
todo_wine
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
if
(
hr
==
E_NOTIMPL
)
todo_wine
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
else
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
check_uia_prop_val
(
prop_id
,
elem_prop
->
type
,
&
v
);
/*
...
...
@@ -4330,7 +4329,10 @@ static void test_UiaGetPropertyValue(void)
{
Provider
.
ret_invalid_prop_type
=
TRUE
;
hr
=
UiaGetPropertyValue
(
node
,
prop_id
,
&
v
);
todo_wine
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
if
(
hr
==
E_NOTIMPL
)
todo_wine
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
else
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
{
ok_method_sequence
(
get_prop_invalid_type_seq
,
NULL
);
...
...
dlls/uiautomationcore/uia_client.c
View file @
afb15514
...
...
@@ -153,8 +153,46 @@ static ULONG WINAPI uia_provider_Release(IWineUiaProvider *iface)
static
HRESULT
WINAPI
uia_provider_get_prop_val
(
IWineUiaProvider
*
iface
,
const
struct
uia_prop_info
*
prop_info
,
VARIANT
*
ret_val
)
{
FIXME
(
"%p, %p, %p: stub
\n
"
,
iface
,
prop_info
,
ret_val
);
return
E_NOTIMPL
;
struct
uia_provider
*
prov
=
impl_from_IWineUiaProvider
(
iface
);
HRESULT
hr
;
VARIANT
v
;
TRACE
(
"%p, %p, %p
\n
"
,
iface
,
prop_info
,
ret_val
);
VariantInit
(
&
v
);
hr
=
IRawElementProviderSimple_GetPropertyValue
(
prov
->
elprov
,
prop_info
->
prop_id
,
&
v
);
if
(
FAILED
(
hr
))
goto
exit
;
switch
(
prop_info
->
type
)
{
case
UIAutomationType_Int
:
if
(
V_VT
(
&
v
)
!=
VT_I4
)
{
WARN
(
"Invalid vt %d for UIAutomationType_Int
\n
"
,
V_VT
(
&
v
));
goto
exit
;
}
*
ret_val
=
v
;
break
;
case
UIAutomationType_IntArray
:
if
(
V_VT
(
&
v
)
!=
(
VT_I4
|
VT_ARRAY
))
{
WARN
(
"Invalid vt %d for UIAutomationType_IntArray
\n
"
,
V_VT
(
&
v
));
goto
exit
;
}
*
ret_val
=
v
;
break
;
default:
break
;
}
exit:
if
(
V_VT
(
ret_val
)
==
VT_EMPTY
)
VariantClear
(
&
v
);
return
S_OK
;
}
static
const
IWineUiaProviderVtbl
uia_provider_vtbl
=
{
...
...
dlls/uiautomationcore/uia_ids.c
View file @
afb15514
...
...
@@ -59,9 +59,11 @@ static const struct uia_prop_info default_uia_properties[] = {
{
&
Window_CanMinimize_Property_GUID
,
UIA_WindowCanMinimizePropertyId
,
},
{
&
RangeValue_LargeChange_Property_GUID
,
UIA_RangeValueLargeChangePropertyId
,
},
{
&
Selection2_CurrentSelectedItem_Property_GUID
,
UIA_Selection2CurrentSelectedItemPropertyId
,
},
{
&
Culture_Property_GUID
,
UIA_CulturePropertyId
,
},
{
&
Culture_Property_GUID
,
UIA_CulturePropertyId
,
UIAutomationType_Int
,
},
{
&
LegacyIAccessible_DefaultAction_Property_GUID
,
UIA_LegacyIAccessibleDefaultActionPropertyId
,
},
{
&
Level_Property_GUID
,
UIA_LevelPropertyId
,
},
{
&
Level_Property_GUID
,
UIA_LevelPropertyId
,
UIAutomationType_Int
,
},
{
&
IsKeyboardFocusable_Property_GUID
,
UIA_IsKeyboardFocusablePropertyId
,
},
{
&
GridItem_Row_Property_GUID
,
UIA_GridItemRowPropertyId
,
},
{
&
IsSpreadsheetItemPatternAvailable_Property_GUID
,
UIA_IsSpreadsheetItemPatternAvailablePropertyId
,
},
...
...
@@ -80,8 +82,10 @@ static const struct uia_prop_info default_uia_properties[] = {
{
&
IsInvokePatternAvailable_Property_GUID
,
UIA_IsInvokePatternAvailablePropertyId
,
},
{
&
HasKeyboardFocus_Property_GUID
,
UIA_HasKeyboardFocusPropertyId
,
},
{
&
ClickablePoint_Property_GUID
,
UIA_ClickablePointPropertyId
,
},
{
&
NewNativeWindowHandle_Property_GUID
,
UIA_NativeWindowHandlePropertyId
,
},
{
&
SizeOfSet_Property_GUID
,
UIA_SizeOfSetPropertyId
,
},
{
&
NewNativeWindowHandle_Property_GUID
,
UIA_NativeWindowHandlePropertyId
,
UIAutomationType_Int
,
},
{
&
SizeOfSet_Property_GUID
,
UIA_SizeOfSetPropertyId
,
UIAutomationType_Int
,
},
{
&
LegacyIAccessible_Name_Property_GUID
,
UIA_LegacyIAccessibleNamePropertyId
,
},
{
&
Window_CanMaximize_Property_GUID
,
UIA_WindowCanMaximizePropertyId
,
},
{
&
Scroll_HorizontallyScrollable_Property_GUID
,
UIA_ScrollHorizontallyScrollablePropertyId
,
},
...
...
@@ -103,7 +107,8 @@ static const struct uia_prop_info default_uia_properties[] = {
{
&
Toggle_ToggleState_Property_GUID
,
UIA_ToggleToggleStatePropertyId
,
},
{
&
IsTogglePatternAvailable_Property_GUID
,
UIA_IsTogglePatternAvailablePropertyId
,
},
{
&
LegacyIAccessible_State_Property_GUID
,
UIA_LegacyIAccessibleStatePropertyId
,
},
{
&
PositionInSet_Property_GUID
,
UIA_PositionInSetPropertyId
,
},
{
&
PositionInSet_Property_GUID
,
UIA_PositionInSetPropertyId
,
UIAutomationType_Int
,
},
{
&
RangeValue_IsReadOnly_Property_GUID
,
UIA_RangeValueIsReadOnlyPropertyId
,
},
{
&
Drag_DropEffects_Property_GUID
,
UIA_DragDropEffectsPropertyId
,
},
{
&
RangeValue_SmallChange_Property_GUID
,
UIA_RangeValueSmallChangePropertyId
,
},
...
...
@@ -116,16 +121,20 @@ static const struct uia_prop_info default_uia_properties[] = {
{
&
Window_WindowVisualState_Property_GUID
,
UIA_WindowWindowVisualStatePropertyId
,
},
{
&
IsOffscreen_Property_GUID
,
UIA_IsOffscreenPropertyId
,
},
{
&
Annotation_Author_Property_GUID
,
UIA_AnnotationAuthorPropertyId
,
},
{
&
Orientation_Property_GUID
,
UIA_OrientationPropertyId
,
},
{
&
Orientation_Property_GUID
,
UIA_OrientationPropertyId
,
UIAutomationType_Int
,
},
{
&
Value_Value_Property_GUID
,
UIA_ValueValuePropertyId
,
},
{
&
VisualEffects_Property_GUID
,
UIA_VisualEffectsPropertyId
,
},
{
&
VisualEffects_Property_GUID
,
UIA_VisualEffectsPropertyId
,
UIAutomationType_Int
,
},
{
&
Selection2_FirstSelectedItem_Property_GUID
,
UIA_Selection2FirstSelectedItemPropertyId
,
},
{
&
IsGridPatternAvailable_Property_GUID
,
UIA_IsGridPatternAvailablePropertyId
,
},
{
&
SelectionItem_SelectionContainer_Property_GUID
,
UIA_SelectionItemSelectionContainerPropertyId
,
},
{
&
HeadingLevel_Property_GUID
,
UIA_HeadingLevelPropertyId
,
},
{
&
HeadingLevel_Property_GUID
,
UIA_HeadingLevelPropertyId
,
UIAutomationType_Int
,
},
{
&
DropTarget_DropTargetEffect_Property_GUID
,
UIA_DropTargetDropTargetEffectPropertyId
,
},
{
&
Grid_ColumnCount_Property_GUID
,
UIA_GridColumnCountPropertyId
,
},
{
&
AnnotationTypes_Property_GUID
,
UIA_AnnotationTypesPropertyId
,
},
{
&
AnnotationTypes_Property_GUID
,
UIA_AnnotationTypesPropertyId
,
UIAutomationType_IntArray
,
},
{
&
IsPeripheral_Property_GUID
,
UIA_IsPeripheralPropertyId
,
},
{
&
Transform2_ZoomMaximum_Property_GUID
,
UIA_Transform2ZoomMaximumPropertyId
,
},
{
&
Drag_DropEffect_Property_GUID
,
UIA_DragDropEffectPropertyId
,
},
...
...
@@ -142,7 +151,8 @@ static const struct uia_prop_info default_uia_properties[] = {
{
&
ControllerFor_Property_GUID
,
UIA_ControllerForPropertyId
,
},
{
&
ProviderDescription_Property_GUID
,
UIA_ProviderDescriptionPropertyId
,
},
{
&
AriaProperties_Property_GUID
,
UIA_AriaPropertiesPropertyId
,
},
{
&
LiveSetting_Property_GUID
,
UIA_LiveSettingPropertyId
,
},
{
&
LiveSetting_Property_GUID
,
UIA_LiveSettingPropertyId
,
UIAutomationType_Int
,
},
{
&
Selection2_LastSelectedItem_Property_GUID
,
UIA_Selection2LastSelectedItemPropertyId
,
},
{
&
Transform2_CanZoom_Property_GUID
,
UIA_Transform2CanZoomPropertyId
,
},
{
&
Window_IsModal_Property_GUID
,
UIA_WindowIsModalPropertyId
,
},
...
...
@@ -150,7 +160,8 @@ static const struct uia_prop_info default_uia_properties[] = {
{
&
AriaRole_Property_GUID
,
UIA_AriaRolePropertyId
,
},
{
&
Scroll_VerticallyScrollable_Property_GUID
,
UIA_ScrollVerticallyScrollablePropertyId
,
},
{
&
RangeValue_Value_Property_GUID
,
UIA_RangeValueValuePropertyId
,
},
{
&
ProcessId_Property_GUID
,
UIA_ProcessIdPropertyId
,
},
{
&
ProcessId_Property_GUID
,
UIA_ProcessIdPropertyId
,
UIAutomationType_Int
,
},
{
&
Scroll_VerticalScrollPercent_Property_GUID
,
UIA_ScrollVerticalScrollPercentPropertyId
,
},
{
&
IsObjectModelPatternAvailable_Property_GUID
,
UIA_IsObjectModelPatternAvailablePropertyId
,
},
{
&
IsDialog_Property_GUID
,
UIA_IsDialogPropertyId
,
},
...
...
@@ -177,7 +188,8 @@ static const struct uia_prop_info default_uia_properties[] = {
{
&
DescribedBy_Property_GUID
,
UIA_DescribedByPropertyId
,
},
{
&
IsSelectionPatternAvailable_Property_GUID
,
UIA_IsSelectionPatternAvailablePropertyId
,
},
{
&
Grid_RowCount_Property_GUID
,
UIA_GridRowCountPropertyId
,
},
{
&
OutlineColor_Property_GUID
,
UIA_OutlineColorPropertyId
,
},
{
&
OutlineColor_Property_GUID
,
UIA_OutlineColorPropertyId
,
UIAutomationType_IntArray
,
},
{
&
Table_RowOrColumnMajor_Property_GUID
,
UIA_TableRowOrColumnMajorPropertyId
,
},
{
&
IsDockPatternAvailable_Property_GUID
,
UIA_IsDockPatternAvailablePropertyId
,
},
{
&
IsSynchronizedInputPatternAvailable_Property_GUID
,
UIA_IsSynchronizedInputPatternAvailablePropertyId
,
},
...
...
@@ -186,7 +198,8 @@ static const struct uia_prop_info default_uia_properties[] = {
{
&
AnnotationObjects_Property_GUID
,
UIA_AnnotationObjectsPropertyId
,
},
{
&
IsRequiredForForm_Property_GUID
,
UIA_IsRequiredForFormPropertyId
,
},
{
&
SpreadsheetItem_AnnotationTypes_Property_GUID
,
UIA_SpreadsheetItemAnnotationTypesPropertyId
,
},
{
&
FillColor_Property_GUID
,
UIA_FillColorPropertyId
,
},
{
&
FillColor_Property_GUID
,
UIA_FillColorPropertyId
,
UIAutomationType_Int
,
},
{
&
IsStylesPatternAvailable_Property_GUID
,
UIA_IsStylesPatternAvailablePropertyId
,
},
{
&
Window_IsTopmost_Property_GUID
,
UIA_WindowIsTopmostPropertyId
,
},
{
&
IsCustomNavigationPatternAvailable_Property_GUID
,
UIA_IsCustomNavigationPatternAvailablePropertyId
,
},
...
...
@@ -194,11 +207,14 @@ static const struct uia_prop_info default_uia_properties[] = {
{
&
AcceleratorKey_Property_GUID
,
UIA_AcceleratorKeyPropertyId
,
},
{
&
IsTextChildPatternAvailable_Property_GUID
,
UIA_IsTextChildPatternAvailablePropertyId
,
},
{
&
LegacyIAccessible_Selection_Property_GUID
,
UIA_LegacyIAccessibleSelectionPropertyId
,
},
{
&
FillType_Property_GUID
,
UIA_FillTypePropertyId
,
},
{
&
ControlType_Property_GUID
,
UIA_ControlTypePropertyId
,
},
{
&
FillType_Property_GUID
,
UIA_FillTypePropertyId
,
UIAutomationType_Int
,
},
{
&
ControlType_Property_GUID
,
UIA_ControlTypePropertyId
,
UIAutomationType_Int
,
},
{
&
IsMultipleViewPatternAvailable_Property_GUID
,
UIA_IsMultipleViewPatternAvailablePropertyId
,
},
{
&
DropTarget_DropTargetEffects_Property_GUID
,
UIA_DropTargetDropTargetEffectsPropertyId
,
},
{
&
LandmarkType_Property_GUID
,
UIA_LandmarkTypePropertyId
,
},
{
&
LandmarkType_Property_GUID
,
UIA_LandmarkTypePropertyId
,
UIAutomationType_Int
,
},
{
&
Drag_IsGrabbed_Property_GUID
,
UIA_DragIsGrabbedPropertyId
,
},
{
&
GridItem_ColumnSpan_Property_GUID
,
UIA_GridItemColumnSpanPropertyId
,
},
{
&
Styles_Shape_Property_GUID
,
UIA_StylesShapePropertyId
,
},
...
...
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