winex11.drv: Release window data before calling sync_window_cursor().
[wine.git] / dlls / uiautomationcore / uia_ids.c
bloba3a60c8aec9467a752a90f10721dbbc4ed6571e7
1 /*
2 * Copyright 2022 Connor McAdams for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #include "uia_private.h"
20 #include "ocidl.h"
22 #include "wine/debug.h"
24 WINE_DEFAULT_DEBUG_CHANNEL(uiautomation);
26 static int __cdecl uia_property_guid_compare(const void *a, const void *b)
28 const GUID *guid = a;
29 const struct uia_prop_info *property = b;
30 return memcmp(guid, property->guid, sizeof(*guid));
33 /* Sorted by GUID. */
34 static const struct uia_prop_info default_uia_properties[] = {
35 { &AutomationId_Property_GUID, UIA_AutomationIdPropertyId,
36 PROP_TYPE_ELEM_PROP, UIAutomationType_String, },
37 { &FrameworkId_Property_GUID, UIA_FrameworkIdPropertyId,
38 PROP_TYPE_ELEM_PROP, UIAutomationType_String, },
39 { &IsTransformPatternAvailable_Property_GUID, UIA_IsTransformPatternAvailablePropertyId, },
40 { &IsScrollItemPatternAvailable_Property_GUID, UIA_IsScrollItemPatternAvailablePropertyId, },
41 { &IsExpandCollapsePatternAvailable_Property_GUID, UIA_IsExpandCollapsePatternAvailablePropertyId, },
42 { &CenterPoint_Property_GUID, UIA_CenterPointPropertyId, },
43 { &IsTableItemPatternAvailable_Property_GUID, UIA_IsTableItemPatternAvailablePropertyId, },
44 { &Scroll_HorizontalScrollPercent_Property_GUID, UIA_ScrollHorizontalScrollPercentPropertyId, },
45 { &AccessKey_Property_GUID, UIA_AccessKeyPropertyId,
46 PROP_TYPE_ELEM_PROP, UIAutomationType_String, },
47 { &RangeValue_Maximum_Property_GUID, UIA_RangeValueMaximumPropertyId, },
48 { &ClassName_Property_GUID, UIA_ClassNamePropertyId,
49 PROP_TYPE_ELEM_PROP, UIAutomationType_String, },
50 { &Transform2_ZoomMinimum_Property_GUID, UIA_Transform2ZoomMinimumPropertyId, },
51 { &LegacyIAccessible_Description_Property_GUID, UIA_LegacyIAccessibleDescriptionPropertyId, },
52 { &Transform2_ZoomLevel_Property_GUID, UIA_Transform2ZoomLevelPropertyId, },
53 { &Name_Property_GUID, UIA_NamePropertyId,
54 PROP_TYPE_ELEM_PROP, UIAutomationType_String, },
55 { &GridItem_RowSpan_Property_GUID, UIA_GridItemRowSpanPropertyId, },
56 { &Size_Property_GUID, UIA_SizePropertyId,
57 PROP_TYPE_ELEM_PROP, UIAutomationType_DoubleArray, },
58 { &IsTextPattern2Available_Property_GUID, UIA_IsTextPattern2AvailablePropertyId, },
59 { &Styles_FillPatternStyle_Property_GUID, UIA_StylesFillPatternStylePropertyId, },
60 { &FlowsTo_Property_GUID, UIA_FlowsToPropertyId,
61 PROP_TYPE_ELEM_PROP, UIAutomationType_ElementArray, },
62 { &ItemStatus_Property_GUID, UIA_ItemStatusPropertyId,
63 PROP_TYPE_ELEM_PROP, UIAutomationType_String, },
64 { &Scroll_VerticalViewSize_Property_GUID, UIA_ScrollVerticalViewSizePropertyId, },
65 { &Selection_IsSelectionRequired_Property_GUID, UIA_SelectionIsSelectionRequiredPropertyId, },
66 { &IsGridItemPatternAvailable_Property_GUID, UIA_IsGridItemPatternAvailablePropertyId, },
67 { &Window_CanMinimize_Property_GUID, UIA_WindowCanMinimizePropertyId, },
68 { &RangeValue_LargeChange_Property_GUID, UIA_RangeValueLargeChangePropertyId, },
69 { &Selection2_CurrentSelectedItem_Property_GUID, UIA_Selection2CurrentSelectedItemPropertyId, },
70 { &Culture_Property_GUID, UIA_CulturePropertyId,
71 PROP_TYPE_ELEM_PROP, UIAutomationType_Int, },
72 { &LegacyIAccessible_DefaultAction_Property_GUID, UIA_LegacyIAccessibleDefaultActionPropertyId, },
73 { &Level_Property_GUID, UIA_LevelPropertyId,
74 PROP_TYPE_ELEM_PROP, UIAutomationType_Int, },
75 { &IsKeyboardFocusable_Property_GUID, UIA_IsKeyboardFocusablePropertyId,
76 PROP_TYPE_ELEM_PROP, UIAutomationType_Bool, },
77 { &GridItem_Row_Property_GUID, UIA_GridItemRowPropertyId, },
78 { &IsSpreadsheetItemPatternAvailable_Property_GUID, UIA_IsSpreadsheetItemPatternAvailablePropertyId, },
79 { &Table_ColumnHeaders_Property_GUID, UIA_TableColumnHeadersPropertyId, },
80 { &Drag_GrabbedItems_Property_GUID, UIA_DragGrabbedItemsPropertyId, },
81 { &Annotation_Target_Property_GUID, UIA_AnnotationTargetPropertyId, },
82 { &IsSelectionItemPatternAvailable_Property_GUID, UIA_IsSelectionItemPatternAvailablePropertyId, },
83 { &IsDropTargetPatternAvailable_Property_GUID, UIA_IsDropTargetPatternAvailablePropertyId, },
84 { &Dock_DockPosition_Property_GUID, UIA_DockDockPositionPropertyId, },
85 { &Styles_StyleId_Property_GUID, UIA_StylesStyleIdPropertyId, },
86 { &Value_IsReadOnly_Property_GUID, UIA_ValueIsReadOnlyPropertyId, },
87 { &IsSpreadsheetPatternAvailable_Property_GUID, UIA_IsSpreadsheetPatternAvailablePropertyId, },
88 { &Styles_StyleName_Property_GUID, UIA_StylesStyleNamePropertyId, },
89 { &IsAnnotationPatternAvailable_Property_GUID, UIA_IsAnnotationPatternAvailablePropertyId, },
90 { &SpreadsheetItem_AnnotationObjects_Property_GUID, UIA_SpreadsheetItemAnnotationObjectsPropertyId, },
91 { &IsInvokePatternAvailable_Property_GUID, UIA_IsInvokePatternAvailablePropertyId, },
92 { &HasKeyboardFocus_Property_GUID, UIA_HasKeyboardFocusPropertyId,
93 PROP_TYPE_ELEM_PROP, UIAutomationType_Bool, },
94 { &ClickablePoint_Property_GUID, UIA_ClickablePointPropertyId, },
95 { &NewNativeWindowHandle_Property_GUID, UIA_NativeWindowHandlePropertyId,
96 PROP_TYPE_ELEM_PROP, UIAutomationType_Int, },
97 { &SizeOfSet_Property_GUID, UIA_SizeOfSetPropertyId,
98 PROP_TYPE_ELEM_PROP, UIAutomationType_Int, },
99 { &LegacyIAccessible_Name_Property_GUID, UIA_LegacyIAccessibleNamePropertyId, },
100 { &Window_CanMaximize_Property_GUID, UIA_WindowCanMaximizePropertyId, },
101 { &Scroll_HorizontallyScrollable_Property_GUID, UIA_ScrollHorizontallyScrollablePropertyId, },
102 { &ExpandCollapse_ExpandCollapseState_Property_GUID, UIA_ExpandCollapseExpandCollapseStatePropertyId, },
103 { &Transform_CanRotate_Property_GUID, UIA_TransformCanRotatePropertyId, },
104 { &IsRangeValuePatternAvailable_Property_GUID, UIA_IsRangeValuePatternAvailablePropertyId, },
105 { &IsScrollPatternAvailable_Property_GUID, UIA_IsScrollPatternAvailablePropertyId, },
106 { &IsTransformPattern2Available_Property_GUID, UIA_IsTransformPattern2AvailablePropertyId, },
107 { &LabeledBy_Property_GUID, UIA_LabeledByPropertyId,
108 PROP_TYPE_ELEM_PROP, UIAutomationType_Element, },
109 { &ItemType_Property_GUID, UIA_ItemTypePropertyId,
110 PROP_TYPE_ELEM_PROP, UIAutomationType_String, },
111 { &Transform_CanMove_Property_GUID, UIA_TransformCanMovePropertyId, },
112 { &LocalizedControlType_Property_GUID, UIA_LocalizedControlTypePropertyId,
113 PROP_TYPE_ELEM_PROP, UIAutomationType_String, },
114 { &Annotation_AnnotationTypeId_Property_GUID, UIA_AnnotationAnnotationTypeIdPropertyId, },
115 { &FlowsFrom_Property_GUID, UIA_FlowsFromPropertyId,
116 PROP_TYPE_ELEM_PROP, UIAutomationType_ElementArray, },
117 { &OptimizeForVisualContent_Property_GUID, UIA_OptimizeForVisualContentPropertyId,
118 PROP_TYPE_ELEM_PROP, UIAutomationType_Bool, },
119 { &IsVirtualizedItemPatternAvailable_Property_GUID, UIA_IsVirtualizedItemPatternAvailablePropertyId, },
120 { &GridItem_Parent_Property_GUID, UIA_GridItemContainingGridPropertyId, },
121 { &LegacyIAccessible_Help_Property_GUID, UIA_LegacyIAccessibleHelpPropertyId, },
122 { &Toggle_ToggleState_Property_GUID, UIA_ToggleToggleStatePropertyId, },
123 { &IsTogglePatternAvailable_Property_GUID, UIA_IsTogglePatternAvailablePropertyId, },
124 { &LegacyIAccessible_State_Property_GUID, UIA_LegacyIAccessibleStatePropertyId, },
125 { &PositionInSet_Property_GUID, UIA_PositionInSetPropertyId,
126 PROP_TYPE_ELEM_PROP, UIAutomationType_Int, },
127 { &RangeValue_IsReadOnly_Property_GUID, UIA_RangeValueIsReadOnlyPropertyId, },
128 { &Drag_DropEffects_Property_GUID, UIA_DragDropEffectsPropertyId, },
129 { &RangeValue_SmallChange_Property_GUID, UIA_RangeValueSmallChangePropertyId, },
130 { &IsTextEditPatternAvailable_Property_GUID, UIA_IsTextEditPatternAvailablePropertyId, },
131 { &GridItem_Column_Property_GUID, UIA_GridItemColumnPropertyId, },
132 { &LegacyIAccessible_ChildId_Property_GUID, UIA_LegacyIAccessibleChildIdPropertyId, },
133 { &Annotation_DateTime_Property_GUID, UIA_AnnotationDateTimePropertyId, },
134 { &IsTablePatternAvailable_Property_GUID, UIA_IsTablePatternAvailablePropertyId, },
135 { &SelectionItem_IsSelected_Property_GUID, UIA_SelectionItemIsSelectedPropertyId, },
136 { &Window_WindowVisualState_Property_GUID, UIA_WindowWindowVisualStatePropertyId, },
137 { &IsOffscreen_Property_GUID, UIA_IsOffscreenPropertyId,
138 PROP_TYPE_ELEM_PROP, UIAutomationType_Bool, },
139 { &Annotation_Author_Property_GUID, UIA_AnnotationAuthorPropertyId, },
140 { &Orientation_Property_GUID, UIA_OrientationPropertyId,
141 PROP_TYPE_ELEM_PROP, UIAutomationType_Int, },
142 { &Value_Value_Property_GUID, UIA_ValueValuePropertyId, },
143 { &VisualEffects_Property_GUID, UIA_VisualEffectsPropertyId,
144 PROP_TYPE_ELEM_PROP, UIAutomationType_Int, },
145 { &Selection2_FirstSelectedItem_Property_GUID, UIA_Selection2FirstSelectedItemPropertyId, },
146 { &IsGridPatternAvailable_Property_GUID, UIA_IsGridPatternAvailablePropertyId, },
147 { &SelectionItem_SelectionContainer_Property_GUID, UIA_SelectionItemSelectionContainerPropertyId, },
148 { &HeadingLevel_Property_GUID, UIA_HeadingLevelPropertyId,
149 PROP_TYPE_ELEM_PROP, UIAutomationType_Int, },
150 { &DropTarget_DropTargetEffect_Property_GUID, UIA_DropTargetDropTargetEffectPropertyId, },
151 { &Grid_ColumnCount_Property_GUID, UIA_GridColumnCountPropertyId, },
152 { &AnnotationTypes_Property_GUID, UIA_AnnotationTypesPropertyId,
153 PROP_TYPE_ELEM_PROP, UIAutomationType_IntArray, },
154 { &IsPeripheral_Property_GUID, UIA_IsPeripheralPropertyId,
155 PROP_TYPE_ELEM_PROP, UIAutomationType_Bool, },
156 { &Transform2_ZoomMaximum_Property_GUID, UIA_Transform2ZoomMaximumPropertyId, },
157 { &Drag_DropEffect_Property_GUID, UIA_DragDropEffectPropertyId, },
158 { &MultipleView_CurrentView_Property_GUID, UIA_MultipleViewCurrentViewPropertyId, },
159 { &Styles_FillColor_Property_GUID, UIA_StylesFillColorPropertyId, },
160 { &Rotation_Property_GUID, UIA_RotationPropertyId,
161 PROP_TYPE_ELEM_PROP, UIAutomationType_Double, },
162 { &SpreadsheetItem_Formula_Property_GUID, UIA_SpreadsheetItemFormulaPropertyId, },
163 { &IsEnabled_Property_GUID, UIA_IsEnabledPropertyId,
164 PROP_TYPE_ELEM_PROP, UIAutomationType_Bool, },
165 { &LocalizedLandmarkType_Property_GUID, UIA_LocalizedLandmarkTypePropertyId,
166 PROP_TYPE_ELEM_PROP, UIAutomationType_String, },
167 { &IsDataValidForForm_Property_GUID, UIA_IsDataValidForFormPropertyId,
168 PROP_TYPE_ELEM_PROP, UIAutomationType_Bool, },
169 { &IsControlElement_Property_GUID, UIA_IsControlElementPropertyId,
170 PROP_TYPE_ELEM_PROP, UIAutomationType_Bool, },
171 { &HelpText_Property_GUID, UIA_HelpTextPropertyId,
172 PROP_TYPE_ELEM_PROP, UIAutomationType_String, },
173 { &Table_RowHeaders_Property_GUID, UIA_TableRowHeadersPropertyId, },
174 { &ControllerFor_Property_GUID, UIA_ControllerForPropertyId,
175 PROP_TYPE_ELEM_PROP, UIAutomationType_ElementArray, },
176 { &ProviderDescription_Property_GUID, UIA_ProviderDescriptionPropertyId, },
177 { &AriaProperties_Property_GUID, UIA_AriaPropertiesPropertyId,
178 PROP_TYPE_ELEM_PROP, UIAutomationType_String, },
179 { &LiveSetting_Property_GUID, UIA_LiveSettingPropertyId,
180 PROP_TYPE_ELEM_PROP, UIAutomationType_Int, },
181 { &Selection2_LastSelectedItem_Property_GUID, UIA_Selection2LastSelectedItemPropertyId, },
182 { &Transform2_CanZoom_Property_GUID, UIA_Transform2CanZoomPropertyId, },
183 { &Window_IsModal_Property_GUID, UIA_WindowIsModalPropertyId, },
184 { &Annotation_AnnotationTypeName_Property_GUID, UIA_AnnotationAnnotationTypeNamePropertyId, },
185 { &AriaRole_Property_GUID, UIA_AriaRolePropertyId,
186 PROP_TYPE_ELEM_PROP, UIAutomationType_String, },
187 { &Scroll_VerticallyScrollable_Property_GUID, UIA_ScrollVerticallyScrollablePropertyId, },
188 { &RangeValue_Value_Property_GUID, UIA_RangeValueValuePropertyId, },
189 { &ProcessId_Property_GUID, UIA_ProcessIdPropertyId,
190 PROP_TYPE_ELEM_PROP, UIAutomationType_Int, },
191 { &Scroll_VerticalScrollPercent_Property_GUID, UIA_ScrollVerticalScrollPercentPropertyId, },
192 { &IsObjectModelPatternAvailable_Property_GUID, UIA_IsObjectModelPatternAvailablePropertyId, },
193 { &IsDialog_Property_GUID, UIA_IsDialogPropertyId,
194 PROP_TYPE_ELEM_PROP, UIAutomationType_Bool, },
195 { &IsTextPatternAvailable_Property_GUID, UIA_IsTextPatternAvailablePropertyId, },
196 { &LegacyIAccessible_Role_Property_GUID, UIA_LegacyIAccessibleRolePropertyId, },
197 { &Selection2_ItemCount_Property_GUID, UIA_Selection2ItemCountPropertyId, },
198 { &TableItem_RowHeaderItems_Property_GUID, UIA_TableItemRowHeaderItemsPropertyId, },
199 { &Styles_ExtendedProperties_Property_GUID, UIA_StylesExtendedPropertiesPropertyId, },
200 { &Selection_Selection_Property_GUID, UIA_SelectionSelectionPropertyId, },
201 { &TableItem_ColumnHeaderItems_Property_GUID, UIA_TableItemColumnHeaderItemsPropertyId, },
202 { &Window_WindowInteractionState_Property_GUID, UIA_WindowWindowInteractionStatePropertyId, },
203 { &Selection_CanSelectMultiple_Property_GUID, UIA_SelectionCanSelectMultiplePropertyId, },
204 { &Transform_CanResize_Property_GUID, UIA_TransformCanResizePropertyId, },
205 { &IsValuePatternAvailable_Property_GUID, UIA_IsValuePatternAvailablePropertyId, },
206 { &IsItemContainerPatternAvailable_Property_GUID, UIA_IsItemContainerPatternAvailablePropertyId, },
207 { &IsContentElement_Property_GUID, UIA_IsContentElementPropertyId,
208 PROP_TYPE_ELEM_PROP, UIAutomationType_Bool, },
209 { &LegacyIAccessible_KeyboardShortcut_Property_GUID, UIA_LegacyIAccessibleKeyboardShortcutPropertyId, },
210 { &IsPassword_Property_GUID, UIA_IsPasswordPropertyId,
211 PROP_TYPE_ELEM_PROP, UIAutomationType_Bool, },
212 { &IsWindowPatternAvailable_Property_GUID, UIA_IsWindowPatternAvailablePropertyId, },
213 { &RangeValue_Minimum_Property_GUID, UIA_RangeValueMinimumPropertyId, },
214 { &BoundingRectangle_Property_GUID, UIA_BoundingRectanglePropertyId, },
215 { &LegacyIAccessible_Value_Property_GUID, UIA_LegacyIAccessibleValuePropertyId, },
216 { &IsDragPatternAvailable_Property_GUID, UIA_IsDragPatternAvailablePropertyId, },
217 { &DescribedBy_Property_GUID, UIA_DescribedByPropertyId,
218 PROP_TYPE_ELEM_PROP, UIAutomationType_ElementArray, },
219 { &IsSelectionPatternAvailable_Property_GUID, UIA_IsSelectionPatternAvailablePropertyId, },
220 { &Grid_RowCount_Property_GUID, UIA_GridRowCountPropertyId, },
221 { &OutlineColor_Property_GUID, UIA_OutlineColorPropertyId,
222 PROP_TYPE_ELEM_PROP, UIAutomationType_IntArray, },
223 { &Table_RowOrColumnMajor_Property_GUID, UIA_TableRowOrColumnMajorPropertyId, },
224 { &IsDockPatternAvailable_Property_GUID, UIA_IsDockPatternAvailablePropertyId, },
225 { &IsSynchronizedInputPatternAvailable_Property_GUID,UIA_IsSynchronizedInputPatternAvailablePropertyId, },
226 { &OutlineThickness_Property_GUID, UIA_OutlineThicknessPropertyId,
227 PROP_TYPE_ELEM_PROP, UIAutomationType_DoubleArray, },
228 { &IsLegacyIAccessiblePatternAvailable_Property_GUID,UIA_IsLegacyIAccessiblePatternAvailablePropertyId, },
229 { &AnnotationObjects_Property_GUID, UIA_AnnotationObjectsPropertyId,
230 PROP_TYPE_ELEM_PROP, UIAutomationType_ElementArray, },
231 { &IsRequiredForForm_Property_GUID, UIA_IsRequiredForFormPropertyId,
232 PROP_TYPE_ELEM_PROP, UIAutomationType_Bool, },
233 { &SpreadsheetItem_AnnotationTypes_Property_GUID, UIA_SpreadsheetItemAnnotationTypesPropertyId, },
234 { &FillColor_Property_GUID, UIA_FillColorPropertyId,
235 PROP_TYPE_ELEM_PROP, UIAutomationType_Int, },
236 { &IsStylesPatternAvailable_Property_GUID, UIA_IsStylesPatternAvailablePropertyId, },
237 { &Window_IsTopmost_Property_GUID, UIA_WindowIsTopmostPropertyId, },
238 { &IsCustomNavigationPatternAvailable_Property_GUID, UIA_IsCustomNavigationPatternAvailablePropertyId, },
239 { &Scroll_HorizontalViewSize_Property_GUID, UIA_ScrollHorizontalViewSizePropertyId, },
240 { &AcceleratorKey_Property_GUID, UIA_AcceleratorKeyPropertyId,
241 PROP_TYPE_ELEM_PROP, UIAutomationType_String, },
242 { &IsTextChildPatternAvailable_Property_GUID, UIA_IsTextChildPatternAvailablePropertyId, },
243 { &LegacyIAccessible_Selection_Property_GUID, UIA_LegacyIAccessibleSelectionPropertyId, },
244 { &FillType_Property_GUID, UIA_FillTypePropertyId,
245 PROP_TYPE_ELEM_PROP, UIAutomationType_Int, },
246 { &ControlType_Property_GUID, UIA_ControlTypePropertyId,
247 PROP_TYPE_ELEM_PROP, UIAutomationType_Int, },
248 { &IsMultipleViewPatternAvailable_Property_GUID, UIA_IsMultipleViewPatternAvailablePropertyId, },
249 { &DropTarget_DropTargetEffects_Property_GUID, UIA_DropTargetDropTargetEffectsPropertyId, },
250 { &LandmarkType_Property_GUID, UIA_LandmarkTypePropertyId,
251 PROP_TYPE_ELEM_PROP, UIAutomationType_Int, },
252 { &Drag_IsGrabbed_Property_GUID, UIA_DragIsGrabbedPropertyId, },
253 { &GridItem_ColumnSpan_Property_GUID, UIA_GridItemColumnSpanPropertyId, },
254 { &Styles_Shape_Property_GUID, UIA_StylesShapePropertyId, },
255 { &RuntimeId_Property_GUID, UIA_RuntimeIdPropertyId,
256 PROP_TYPE_SPECIAL, UIAutomationType_IntArray, },
257 { &IsSelectionPattern2Available_Property_GUID, UIA_IsSelectionPattern2AvailablePropertyId, },
258 { &MultipleView_SupportedViews_Property_GUID, UIA_MultipleViewSupportedViewsPropertyId, },
259 { &Styles_FillPatternColor_Property_GUID, UIA_StylesFillPatternColorPropertyId, },
260 { &FullDescription_Property_GUID, UIA_FullDescriptionPropertyId,
261 PROP_TYPE_ELEM_PROP, UIAutomationType_String, },
264 static const int prop_id_idx[] = {
265 0xaa, 0x8b, 0x76, 0xa3, 0x3d, 0x0e, 0x9f, 0x08,
266 0x2e, 0x1e, 0x65, 0x00, 0x0a, 0x69, 0x2f, 0x1b,
267 0x68, 0x86, 0x3a, 0x88, 0x30, 0x3b, 0x52, 0x54,
268 0x01, 0x98, 0x14, 0x93, 0x04, 0x17, 0x58, 0x2d,
269 0xa4, 0x37, 0x38, 0x03, 0x24, 0x8f, 0x4f, 0x06,
270 0x7a, 0x45, 0x02, 0x84, 0x89, 0x55, 0x28, 0x75,
271 0x48, 0x8a, 0x09, 0x19, 0x4a, 0x07, 0x9e, 0x77,
272 0x15, 0x34, 0x74, 0x7f, 0x82, 0x16, 0x90, 0x5c,
273 0x1f, 0x4c, 0x0f, 0xa8, 0x42, 0x26, 0x35, 0x61,
274 0xac, 0x33, 0x18, 0x51, 0x81, 0x71, 0x9c, 0x50,
275 0x59, 0x6a, 0x21, 0x92, 0x7d, 0x80, 0x44, 0x3c,
276 0x83, 0x36, 0x96, 0x4d, 0x32, 0x8c, 0x0c, 0x7b,
277 0x46, 0x43, 0x87, 0xa1, 0x1c, 0x73, 0x6d, 0x67,
278 0x6b, 0x8e, 0x13, 0x6c, 0x85, 0x41, 0x94, 0x40,
279 0x78, 0x3e, 0x72, 0x53, 0x4e, 0x23, 0x2b, 0x11,
280 0x27, 0x2a, 0x62, 0x12, 0xa9, 0xad, 0x7e, 0x9b,
281 0x29, 0x64, 0x2c, 0x99, 0x20, 0x70, 0x39, 0x6e,
282 0xa0, 0x8d, 0xa7, 0x60, 0x49, 0x25, 0x5b, 0xa5,
283 0x22, 0x0d, 0x0b, 0x5f, 0x3f, 0x4b, 0x5e, 0x9d,
284 0x47, 0x31, 0x1d, 0x5d, 0x97, 0xa6, 0x66, 0xae,
285 0x9a, 0x91, 0xa2, 0x56, 0x95, 0x05, 0x63, 0x10,
286 0xab, 0x57, 0x6f, 0x1a, 0x7c, 0x5a, 0x79,
289 #define PROP_ID_MIN 30000
290 #define PROP_ID_MAX (PROP_ID_MIN + ARRAY_SIZE(default_uia_properties))
292 static const struct uia_prop_info *uia_prop_info_from_guid(const GUID *guid)
294 struct uia_prop_info *prop;
296 if ((prop = bsearch(guid, default_uia_properties, ARRAY_SIZE(default_uia_properties), sizeof(*prop),
297 uia_property_guid_compare)))
298 return prop;
300 return NULL;
303 const struct uia_prop_info *uia_prop_info_from_id(PROPERTYID prop_id)
305 if ((prop_id < PROP_ID_MIN) || (prop_id > PROP_ID_MAX))
306 return NULL;
308 return &default_uia_properties[prop_id_idx[prop_id - PROP_ID_MIN]];
311 /***********************************************************************
312 * UiaLookupId (uiautomationcore.@)
314 int WINAPI UiaLookupId(enum AutomationIdentifierType type, const GUID *guid)
316 int ret_id = 0;
318 TRACE("(%d, %s)\n", type, debugstr_guid(guid));
320 switch (type)
322 case AutomationIdentifierType_Property:
324 const struct uia_prop_info *prop = uia_prop_info_from_guid(guid);
326 if (prop)
327 ret_id = prop->prop_id;
328 else
329 FIXME("Failed to find propertyId for GUID %s\n", debugstr_guid(guid));
331 break;
334 case AutomationIdentifierType_Pattern:
335 case AutomationIdentifierType_Event:
336 case AutomationIdentifierType_ControlType:
337 case AutomationIdentifierType_TextAttribute:
338 case AutomationIdentifierType_LandmarkType:
339 case AutomationIdentifierType_Annotation:
340 case AutomationIdentifierType_Changes:
341 case AutomationIdentifierType_Style:
342 FIXME("Unimplemented AutomationIdentifierType %d\n", type);
343 break;
345 default:
346 FIXME("Invalid AutomationIdentifierType %d\n", type);
347 break;
350 return ret_id;