From: Connor McAdams cmcadams@codeweavers.com
Signed-off-by: Connor McAdams cmcadams@codeweavers.com --- include/uiautomationclient.idl | 730 +++++++++++++++++++++++++++++++-- include/uiautomationcore.idl | 92 +++++ 2 files changed, 782 insertions(+), 40 deletions(-)
diff --git a/include/uiautomationclient.idl b/include/uiautomationclient.idl index ffef7b840fb..4579e4db652 100644 --- a/include/uiautomationclient.idl +++ b/include/uiautomationclient.idl @@ -622,25 +622,298 @@ library UIAutomationClient { [in] int changesCount); }
- interface IUIAutomationNotificationEventHandler; - - interface IUIAutomationInvokePattern; - interface IUIAutomationDockPattern; - interface IUIAutomationExpandCollapsePattern; - interface IUIAutomationGridPattern; - interface IUIAutomationGridItemPattern; - interface IUIAutomationMultipleViewPattern; - interface IUIAutomationObjectModelPattern; - interface IUIAutomationRangeValuePattern; - interface IUIAutomationScrollPattern; - interface IUIAutomationScrollItemPattern; - interface IUIAutomationSelectionPattern; - interface IUIAutomationSelectionItemPattern; - interface IUIAutomationSynchronizedInputPattern; - interface IUIAutomationTablePattern; - interface IUIAutomationTableItemPattern; - interface IUIAutomationTogglePattern; - interface IUIAutomationTransformPattern; + [ + object, + uuid(c7cb2637-e6c2-4d0c-85de-4948c02175c7), + pointer_default(unique), + oleautomation + ] + interface IUIAutomationNotificationEventHandler : IUnknown + { + HRESULT HandleNotificationEvent( + [in] IUIAutomationElement *sender, + enum NotificationKind notificationKind, + enum NotificationProcessing notificationProcessing, + [in] BSTR displayString, + [in] BSTR activityId); + } + + [ + object, + uuid(fb377fbe-8ea6-46d5-9c73-6499642d3059), + pointer_default(unique) + ] + interface IUIAutomationInvokePattern : IUnknown + { + HRESULT Invoke(); + } + + [ + object, + uuid(fde5ef97-1464-48f6-90bf-43d0948e86ec), + pointer_default(unique) + ] + interface IUIAutomationDockPattern : IUnknown + { + HRESULT SetDockPosition([in] enum DockPosition dockPos); + [propget] HRESULT CurrentDockPosition([out, retval] enum DockPosition *retVal); + [propget] HRESULT CachedDockPosition([out, retval] enum DockPosition *retVal); + } + + [ + object, + uuid(619be086-1f4e-4ee4-bafa-210128738730), + pointer_default(unique) + ] + interface IUIAutomationExpandCollapsePattern : IUnknown + { + HRESULT Expand(); + HRESULT Collapse(); + [propget] HRESULT CurrentExpandCollapseState([out, retval] enum ExpandCollapseState *retVal); + [propget] HRESULT CachedExpandCollapseState([out, retval] enum ExpandCollapseState *retVal); + } + + [ + object, + uuid(414c3cdc-856b-4f5b-8538-3131c6302550), + pointer_default(unique) + ] + interface IUIAutomationGridPattern : IUnknown + { + HRESULT GetItem( + [in] int row, + [in] int column, + [out, retval] IUIAutomationElement **element); + + [propget] HRESULT CurrentRowCount([out, retval] int *retVal); + [propget] HRESULT CurrentColumnCount([out, retval] int *retVal); + [propget] HRESULT CachedRowCount([out, retval] int *retVal); + [propget] HRESULT CachedColumnCount([out, retval] int *retVal); + } + + [ + object, + uuid(78f8ef57-66c3-4e09-bd7c-e79b2004894d), + pointer_default(unique) + ] + interface IUIAutomationGridItemPattern : IUnknown + { + [propget] HRESULT CurrentContainingGrid([out, retval] IUIAutomationElement **retVal); + [propget] HRESULT CurrentRow([out, retval] int *retVal); + [propget] HRESULT CurrentColumn([out, retval] int *retVal); + [propget] HRESULT CurrentRowSpan([out, retval] int *retVal); + [propget] HRESULT CurrentColumnSpan([out, retval] int *retVal); + [propget] HRESULT CachedContainingGrid([out, retval] IUIAutomationElement **retVal); + [propget] HRESULT CachedRow([out, retval] int *retVal); + [propget] HRESULT CachedColumn([out, retval] int *retVal); + [propget] HRESULT CachedRowSpan([out, retval] int *retVal); + [propget] HRESULT CachedColumnSpan([out, retval] int *retVal); + } + + [ + object, + uuid(8d253c91-1dc5-4bb5-b18f-ade16fa495e8), + pointer_default(unique) + ] + interface IUIAutomationMultipleViewPattern : IUnknown + { + HRESULT GetViewName( + [in] int view, + [out, retval] BSTR *name); + + HRESULT SetCurrentView([in] int view); + + [propget] HRESULT CurrentCurrentView([out, retval] int *retVal); + HRESULT GetCurrentSupportedViews([out, retval] SAFEARRAY(int) *retVal); + + [propget] HRESULT CachedCurrentView([out, retval] int *retVal); + HRESULT GetCachedSupportedViews([out, retval] SAFEARRAY(int) *retVal); + } + + [ + object, + uuid(71c284b3-c14d-4d14-981e-19751b0d756d), + pointer_default(unique) + ] + interface IUIAutomationObjectModelPattern : IUnknown + { + HRESULT GetUnderlyingObjectModel([out, retval] IUnknown **retVal); + } + + [ + object, + uuid(59213f4f-7346-49e5-b120-80555987a148), + pointer_default(unique) + ] + interface IUIAutomationRangeValuePattern : IUnknown + { + HRESULT SetValue([in] double val); + + [propget] HRESULT CurrentValue([out, retval] double *retVal); + [propget] HRESULT CurrentIsReadOnly([out, retval] BOOL *retVal); + [propget] HRESULT CurrentMaximum([out, retval] double *retVal); + [propget] HRESULT CurrentMinimum([out, retval] double *retVal); + [propget] HRESULT CurrentLargeChange([out, retval] double *retVal); + [propget] HRESULT CurrentSmallChange([out, retval] double *retVal); + + [propget] HRESULT CachedValue([out, retval] double *retVal); + [propget] HRESULT CachedIsReadOnly([out, retval] BOOL *retVal); + [propget] HRESULT CachedMaximum([out, retval] double *retVal); + [propget] HRESULT CachedMinimum([out, retval] double *retVal); + [propget] HRESULT CachedLargeChange([out, retval] double *retVal); + [propget] HRESULT CachedSmallChange([out, retval] double *retVal); + } + + [ + object, + uuid(88f4d42a-e881-459d-a77c-73bbbb7e02dc), + pointer_default(unique) + ] + interface IUIAutomationScrollPattern : IUnknown + { + HRESULT Scroll( + [in] enum ScrollAmount horizontalAmount, + [in] enum ScrollAmount verticalAmount); + HRESULT SetScrollPercent( + [in] double horizontalPercent, + [in] double verticalPercent); + + [propget] HRESULT CurrentHorizontalScrollPercent([out, retval] double *retVal); + [propget] HRESULT CurrentVerticalScrollPercent([out, retval] double *retVal); + [propget] HRESULT CurrentHorizontalViewSize([out, retval] double *retVal); + [propget] HRESULT CurrentVerticalViewSize([out, retval] double *retVal); + [propget] HRESULT CurrentHorizontallyScrollable([out, retval] BOOL *retVal); + [propget] HRESULT CurrentVerticallyScrollable([out, retval] BOOL *retVal); + + [propget] HRESULT CachedHorizontalScrollPercent([out, retval] double *retVal); + [propget] HRESULT CachedVerticalScrollPercent([out, retval] double *retVal); + [propget] HRESULT CachedHorizontalViewSize([out, retval] double *retVal); + [propget] HRESULT CachedVerticalViewSize([out, retval] double *retVal); + [propget] HRESULT CachedHorizontallyScrollable([out, retval] BOOL *retVal); + [propget] HRESULT CachedVerticallyScrollable([out, retval] BOOL *retVal); + } + + [ + object, + uuid(b488300f-d015-4f19-9c29-bb595e3645ef), + pointer_default(unique) + ] + interface IUIAutomationScrollItemPattern : IUnknown + { + HRESULT ScrollIntoView(); + } + + [ + object, + uuid(5ed5202e-b2ac-47a6-b638-4b0bf140d78e), + pointer_default(unique) + ] + interface IUIAutomationSelectionPattern : IUnknown + { + HRESULT GetCurrentSelection([out, retval] IUIAutomationElementArray **retVal); + [propget] HRESULT CurrentCanSelectMultiple([out, retval] BOOL *retVal); + [propget] HRESULT CurrentIsSelectionRequired([out, retval] BOOL *retVal); + + HRESULT GetCachedSelection([out, retval] IUIAutomationElementArray **retVal); + [propget] HRESULT CachedCanSelectMultiple([out, retval] BOOL *retVal); + [propget] HRESULT CachedIsSelectionRequired([out, retval] BOOL *retVal); + } + + [ + object, + uuid(a8efa66a-0fda-421a-9194-38021f3578ea), + pointer_default(unique) + ] + interface IUIAutomationSelectionItemPattern : IUnknown + { + HRESULT Select(); + HRESULT AddToSelection(); + HRESULT RemoveFromSelection(); + + [propget] HRESULT CurrentIsSelected([out, retval] BOOL *retVal); + [propget] HRESULT CurrentSelectionContainer([out, retval] IUIAutomationElement **retVal); + + [propget] HRESULT CachedIsSelected([out, retval] BOOL *retVal); + [propget] HRESULT CachedSelectionContainer([out, retval] IUIAutomationElement **retVal); + } + + [ + object, + uuid(2233be0b-afb7-448b-9fda-3b378aa5eae1), + pointer_default(unique) + ] + interface IUIAutomationSynchronizedInputPattern : IUnknown + { + HRESULT StartListening([in] enum SynchronizedInputType inputType); + HRESULT Cancel(); + } + + [ + object, + uuid(620e691c-ea96-4710-a850-754b24ce2417), + pointer_default(unique) + ] + interface IUIAutomationTablePattern : IUnknown + { + HRESULT GetCurrentRowHeaders([out, retval] IUIAutomationElementArray **retVal); + HRESULT GetCurrentColumnHeaders([out, retval] IUIAutomationElementArray **retVal); + [propget] HRESULT CurrentRowOrColumnMajor([out, retval] enum RowOrColumnMajor *retVal); + + HRESULT GetCachedRowHeaders([out, retval] IUIAutomationElementArray **retVal); + HRESULT GetCachedColumnHeaders([out, retval] IUIAutomationElementArray **retVal); + [propget] HRESULT CachedRowOrColumnMajor([out, retval] enum RowOrColumnMajor *retVal); + } + + [ + object, + uuid(0b964eb3-ef2e-4464-9c79-61d61737a27e), + pointer_default(unique) + ] + interface IUIAutomationTableItemPattern : IUnknown + { + HRESULT GetCurrentRowHeaderItems([out, retval] IUIAutomationElementArray **retVal); + HRESULT GetCurrentColumnHeaderItems([out, retval] IUIAutomationElementArray **retVal); + + HRESULT GetCachedRowHeaderItems([out, retval] IUIAutomationElementArray **retVal); + HRESULT GetCachedColumnHeaderItems([out, retval] IUIAutomationElementArray **retVal); + } + + [ + object, + uuid(94cf8058-9b8d-4ab9-8bfd-4cd0a33c8c70), + pointer_default(unique) + ] + interface IUIAutomationTogglePattern : IUnknown + { + HRESULT Toggle(); + + [propget] HRESULT CurrentToggleState([out, retval] enum ToggleState *retVal); + [propget] HRESULT CachedToggleState([out, retval] enum ToggleState *retVal); + } + + [ + object, + uuid(a9b55844-a55d-4ef0-926d-569c16ff89bb), + pointer_default(unique) + ] + interface IUIAutomationTransformPattern : IUnknown + { + HRESULT Move( + [in] double x, + [in] double y); + HRESULT Resize( + [in] double width, + [in] double height); + HRESULT Rotate([in] double degrees); + + [propget] HRESULT CurrentCanMove([out, retval] BOOL *retVal); + [propget] HRESULT CurrentCanResize([out, retval] BOOL *retVal); + [propget] HRESULT CurrentCanRotate([out, retval] BOOL *retVal); + + [propget] HRESULT CachedCanMove([out, retval] BOOL *retVal); + [propget] HRESULT CachedCanResize([out, retval] BOOL *retVal); + [propget] HRESULT CachedCanRotate([out, retval] BOOL *retVal); + }
[ object, @@ -685,14 +958,162 @@ library UIAutomationClient { [propget] HRESULT CachedWindowInteractionState([out, retval] enum WindowInteractionState *retVal); }
- interface IUIAutomationTextRange; - interface IUIAutomationTextRange2; - interface IUIAutomationTextRangeArray; - interface IUIAutomationTextPattern; - interface IUIAutomationTextPattern2; - interface IUIAutomationTextEditPattern; - interface IUIAutomationCustomNavigationPattern; - interface IUIAutomationActiveTextPositionChangedEventHandler; + [ + object, + uuid(a543cc6a-f4ae-494b-8239-c814481187a8), + pointer_default(unique) + ] + interface IUIAutomationTextRange : IUnknown + { + HRESULT Clone([out, retval] IUIAutomationTextRange **clonedRange); + HRESULT Compare( + [in] IUIAutomationTextRange *range, + [out, retval] BOOL *areSame); + HRESULT CompareEndpoints( + [in] enum TextPatternRangeEndpoint srcEndPoint, + [in] IUIAutomationTextRange *range, + [in] enum TextPatternRangeEndpoint targetEndPoint, + [out, retval] int *compValue); + + HRESULT ExpandToEnclosingUnit([in] enum TextUnit textUnit); + + HRESULT FindAttribute( + [in] TEXTATTRIBUTEID attr, + [in] VARIANT val, + [in] BOOL backward, + [out, retval] IUIAutomationTextRange **found); + HRESULT FindText( + [in] BSTR text, + [in] BOOL backward, + [in] BOOL ignoreCase, + [out, retval] IUIAutomationTextRange **found); + + HRESULT GetAttributeValue( + [in] TEXTATTRIBUTEID attr, + [out, retval] VARIANT *value); + HRESULT GetBoundingRectangles([out, retval] SAFEARRAY(double) *boundingRects); + HRESULT GetEnclosingElement([out, retval] IUIAutomationElement **enclosingElement); + HRESULT GetText( + [in] int maxLength, + [out, retval] BSTR *text); + + HRESULT Move( + [in] enum TextUnit unit, + [in] int count, + [out, retval] int *moved); + HRESULT MoveEndpointByUnit( + [in] enum TextPatternRangeEndpoint endpoint, + [in] enum TextUnit unit, + [in] int count, + [out, retval] int *moved); + HRESULT MoveEndpointByRange( + [in] enum TextPatternRangeEndpoint srcEndPoint, + [in] IUIAutomationTextRange *range, + [in] enum TextPatternRangeEndpoint targetEndPoint); + + HRESULT Select(); + HRESULT AddToSelection(); + HRESULT RemoveFromSelection( ); + HRESULT ScrollIntoView([in] BOOL alignToTop); + + HRESULT GetChildren([out, retval] IUIAutomationElementArray **children); + } + + [ + object, + uuid(bb9b40e0-5e04-46bd-9be0-4b601b9afad4), + pointer_default(unique) + ] + interface IUIAutomationTextRange2 : IUIAutomationTextRange + { + HRESULT ShowContextMenu(); + } + + [ + object, + uuid(ce4ae76a-e717-4c98-81ea-47371d028eb6), + pointer_default(unique) + ] + interface IUIAutomationTextRangeArray : IUnknown + { + [propget] HRESULT Length([out, retval] int *length); + HRESULT GetElement( + [in] int index, + [out, retval] IUIAutomationTextRange **element); + } + + [ + object, + uuid(32eba289-3583-42c9-9c59-3b6d9a1e9b6a), + pointer_default(unique) + ] + interface IUIAutomationTextPattern : IUnknown + { + HRESULT RangeFromPoint( + [in] POINT pt, + [out, retval] IUIAutomationTextRange **range); + HRESULT RangeFromChild( + [in] IUIAutomationElement *child, + [out, retval] IUIAutomationTextRange **range); + + HRESULT GetSelection([out, retval] IUIAutomationTextRangeArray **ranges); + HRESULT GetVisibleRanges([out, retval] IUIAutomationTextRangeArray **ranges); + [propget] HRESULT DocumentRange([out, retval] IUIAutomationTextRange **range); + [propget] HRESULT SupportedTextSelection([out, retval] enum SupportedTextSelection *supportedTextSelection); + + } + + [ + object, + uuid(506a921a-fcc9-409f-b23b-37eb74106872), + pointer_default(unique) + ] + interface IUIAutomationTextPattern2 : IUIAutomationTextPattern + { + HRESULT RangeFromAnnotation( + [in] IUIAutomationElement *annotation, + [out, retval] IUIAutomationTextRange **range); + + HRESULT GetCaretRange( + [out] BOOL *isActive, + [out, retval] IUIAutomationTextRange **range); + } + + [ + object, + uuid(17e21576-996c-4870-99d9-bff323380c06), + pointer_default(unique) + ] + interface IUIAutomationTextEditPattern : IUIAutomationTextPattern + { + HRESULT GetActiveComposition([out, retval] IUIAutomationTextRange **range); + HRESULT GetConversionTarget([out, retval] IUIAutomationTextRange **range); + } + + [ + object, + uuid(01ea217a-1766-47ed-a6cc-acf492854b1f), + pointer_default(unique) + ] + interface IUIAutomationCustomNavigationPattern : IUnknown + { + HRESULT Navigate( + [in] enum NavigateDirection direction, + [out, retval] IUIAutomationElement **pRetVal); + } + + [ + object, + uuid(f97933b0-8dae-4496-8997-5ba015fe0d82), + pointer_default(unique), + oleautomation + ] + interface IUIAutomationActiveTextPositionChangedEventHandler : IUnknown + { + HRESULT HandleActiveTextPositionChangedEvent( + [in] IUIAutomationElement *sender, + [in] IUIAutomationTextRange *range); + }
[ object, @@ -730,16 +1151,175 @@ library UIAutomationClient { HRESULT GetIAccessible([out, retval] IAccessible **ppAccessible); };
- interface IUIAutomationItemContainerPattern; - interface IUIAutomationVirtualizedItemPattern; - interface IUIAutomationAnnotationPattern; - interface IUIAutomationStylesPattern; - interface IUIAutomationSpreadsheetPattern; - interface IUIAutomationSpreadsheetItemPattern; - interface IUIAutomationTransformPattern2; - interface IUIAutomationTextChildPattern; - interface IUIAutomationDragPattern; - interface IUIAutomationDropTargetPattern; + [ + object, + uuid(c690fdb2-27a8-423c-812d-429773c9084e), + pointer_default(unique) + ] + interface IUIAutomationItemContainerPattern : IUnknown + { + HRESULT FindItemByProperty( + [in] IUIAutomationElement *pStartAfter, + [in] PROPERTYID propertyId, + [in] VARIANT value, + [out, retval] IUIAutomationElement **pFound); + }; + + [ + object, + uuid(6ba3d7a6-04cf-4f11-8793-a8d1cde9969f), + pointer_default(unique) + ] + interface IUIAutomationVirtualizedItemPattern : IUnknown + { + HRESULT Realize(); + }; + + [ + object, + uuid(9a175b21-339e-41b1-8e8b-623f6b681098), + pointer_default(unique) + ] + interface IUIAutomationAnnotationPattern : IUnknown + { + [propget] HRESULT CurrentAnnotationTypeId([out, retval] int *retVal); + [propget] HRESULT CurrentAnnotationTypeName([out, retval] BSTR *retVal); + [propget] HRESULT CurrentAuthor( [out, retval] BSTR *retVal); + [propget] HRESULT CurrentDateTime( [out, retval] BSTR *retVal); + [propget] HRESULT CurrentTarget( [out, retval] IUIAutomationElement **retVal); + + [propget] HRESULT CachedAnnotationTypeId([out, retval] int *retVal); + [propget] HRESULT CachedAnnotationTypeName([out, retval] BSTR *retVal); + [propget] HRESULT CachedAuthor( [out, retval] BSTR *retVal); + [propget] HRESULT CachedDateTime( [out, retval] BSTR *retVal); + [propget] HRESULT CachedTarget( [out, retval] IUIAutomationElement **retVal); + }; + + [ + object, + uuid(85b5f0a2-bd79-484a-ad2b-388c9838d5fb), + pointer_default(unique) + ] + interface IUIAutomationStylesPattern : IUnknown + { + [propget] HRESULT CurrentStyleId([out, retval] int *retVal); + [propget] HRESULT CurrentStyleName([out, retval] BSTR *retVal); + [propget] HRESULT CurrentFillColor([out, retval] int *retVal); + [propget] HRESULT CurrentFillPatternStyle([out, retval] BSTR *retVal); + [propget] HRESULT CurrentShape([out, retval] BSTR *retVal); + [propget] HRESULT CurrentFillPatternColor([out, retval] int *retVal); + [propget] HRESULT CurrentExtendedProperties([out, retval] BSTR *retVal); + HRESULT GetCurrentExtendedPropertiesAsArray( + [out, size_is( ,*propertyCount)] struct ExtendedProperty **propertyArray, + [out] int *propertyCount); + + [propget] HRESULT CachedStyleId([out, retval] int *retVal); + [propget] HRESULT CachedStyleName([out, retval] BSTR *retVal); + [propget] HRESULT CachedFillColor([out, retval] int *retVal); + [propget] HRESULT CachedFillPatternStyle([out, retval] BSTR *retVal); + [propget] HRESULT CachedShape([out, retval] BSTR *retVal); + [propget] HRESULT CachedFillPatternColor([out, retval] int *retVal); + [propget] HRESULT CachedExtendedProperties([out, retval] BSTR *retVal); + HRESULT GetCachedExtendedPropertiesAsArray( + [out, size_is( ,*propertyCount)] struct ExtendedProperty **propertyArray, + [out] int *propertyCount); + }; + + [ + object, + uuid(7517a7c8-faae-4de9-9f08-29b91e8595c1), + pointer_default(unique) + ] + interface IUIAutomationSpreadsheetPattern : IUnknown + { + HRESULT GetItemByName( + [in] BSTR name, + [out, retval] IUIAutomationElement **element); + }; + + [ + object, + uuid(7d4fb86c-8d34-40e1-8e83-62c15204e335), + pointer_default(unique) + ] + interface IUIAutomationSpreadsheetItemPattern : IUnknown + { + [propget] HRESULT CurrentFormula([out, retval] BSTR *retVal); + HRESULT GetCurrentAnnotationObjects([out, retval] IUIAutomationElementArray **retVal); + HRESULT GetCurrentAnnotationTypes([out, retval] SAFEARRAY(int) *retVal); + + [propget] HRESULT CachedFormula([out, retval] BSTR *retVal); + HRESULT GetCachedAnnotationObjects([out, retval] IUIAutomationElementArray **retVal); + HRESULT GetCachedAnnotationTypes([out, retval] SAFEARRAY(int) *retVal); + }; + + [ + object, + uuid(6d74d017-6ecb-4381-b38b-3c17a48ff1c2), + pointer_default(unique) + ] + interface IUIAutomationTransformPattern2 : IUIAutomationTransformPattern + { + HRESULT Zoom([in] double zoomValue); + HRESULT ZoomByUnit([in] enum ZoomUnit zoomUnit); + + [propget] HRESULT CurrentCanZoom([out, retval] BOOL *retVal); + [propget] HRESULT CachedCanZoom([out, retval] BOOL *retVal); + + [propget] HRESULT CurrentZoomLevel([out, retval] double *retVal); + [propget] HRESULT CachedZoomLevel([out, retval] double *retVal); + + [propget] HRESULT CurrentZoomMinimum([out, retval] double *retVal); + [propget] HRESULT CachedZoomMinimum([out, retval] double *retVal); + + [propget] HRESULT CurrentZoomMaximum([out, retval] double *retVal); + [propget] HRESULT CachedZoomMaximum([out, retval] double *retVal); + } + + [ + object, + uuid(6552b038-ae05-40c8-abfd-aa08352aab86), + pointer_default(unique) + ] + interface IUIAutomationTextChildPattern : IUnknown + { + [propget] HRESULT TextContainer([out, retval] IUIAutomationElement **container); + [propget] HRESULT TextRange([out, retval] IUIAutomationTextRange **range); + } + + [ + object, + uuid(1dc7b570-1f54-4bad-bcda-d36a722fb7bd), + pointer_default(unique) + ] + interface IUIAutomationDragPattern : IUnknown + { + [propget] HRESULT CurrentIsGrabbed([out, retval] BOOL *retVal); + [propget] HRESULT CachedIsGrabbed([out, retval] BOOL *retVal); + + [propget] HRESULT CurrentDropEffect([out, retval] BSTR *retVal); + [propget] HRESULT CachedDropEffect([out, retval] BSTR *retVal); + + [propget] HRESULT CurrentDropEffects([out, retval] SAFEARRAY(BSTR) *retVal); + [propget] HRESULT CachedDropEffects([out, retval] SAFEARRAY(BSTR) *retVal); + + HRESULT GetCurrentGrabbedItems([out, retval] IUIAutomationElementArray **retVal); + HRESULT GetCachedGrabbedItems([out, retval] IUIAutomationElementArray **retVal); + } + + [ + object, + uuid(69a095f7-eee4-430e-a46b-fb73b1ae39a5), + pointer_default(unique) + ] + interface IUIAutomationDropTargetPattern : IUnknown + { + [propget] HRESULT CurrentDropTargetEffect([out, retval] BSTR *retVal); + [propget] HRESULT CachedDropTargetEffect([out, retval] BSTR *retVal); + + [propget] HRESULT CurrentDropTargetEffects([out, retval] SAFEARRAY(BSTR) *retVal); + [propget] HRESULT CachedDropTargetEffects([out, retval] SAFEARRAY(BSTR) *retVal); + }
[ object, @@ -1033,9 +1613,79 @@ library UIAutomationClient { [out, retval] IUIAutomationElement **element); }
- interface IUIAutomationProxyFactory; - interface IUIAutomationProxyFactoryEntry; - interface IUIAutomationProxyFactoryMapping; + [ + object, + uuid(85b94ecd-849d-42b6-b94d-d6db23fdf5a4), + pointer_default(unique) + ] + interface IUIAutomationProxyFactory : IUnknown + { + HRESULT CreateProvider( + [in] UIA_HWND hwnd, + [in] LONG idObject, + [in] LONG idChild, + [out, retval] IRawElementProviderSimple **provider); + + [propget] HRESULT ProxyFactoryId([out, retval] BSTR *factoryId); + } + + [ + object, + uuid(d50e472e-b64b-490c-bca1-d30696f9f289), + pointer_default(unique) + ] + interface IUIAutomationProxyFactoryEntry : IUnknown + { + [propget] HRESULT ProxyFactory([out, retval] IUIAutomationProxyFactory **factory); + + [propget] HRESULT ClassName([out, retval] BSTR *className); + [propget] HRESULT ImageName([out, retval] BSTR *imageName); + [propget] HRESULT AllowSubstringMatch([out, retval] BOOL *allowSubstringMatch); + [propget] HRESULT CanCheckBaseClass([out, retval] BOOL *canCheckBaseClass); + [propget] HRESULT NeedsAdviseEvents([out, retval] BOOL *adviseEvents); + + [propput] HRESULT ClassName([in] LPCWSTR className); + [propput] HRESULT ImageName([in] LPCWSTR imageName); + [propput] HRESULT AllowSubstringMatch([in] BOOL allowSubstringMatch); + [propput] HRESULT CanCheckBaseClass([in] BOOL canCheckBaseClass); + [propput] HRESULT NeedsAdviseEvents([in] BOOL adviseEvents); + + HRESULT SetWinEventsForAutomationEvent( + [in] EVENTID eventId, + [in] PROPERTYID propertyId, + [in] SAFEARRAY(UINT) winEvents); + HRESULT GetWinEventsForAutomationEvent( + [in] EVENTID eventId, + [in] PROPERTYID propertyId, + [out, retval] SAFEARRAY(UINT) *winEvents); + } + + [ + object, + uuid(09e31e18-872d-4873-93d1-1e541ec133fd), + pointer_default(unique) + ] + interface IUIAutomationProxyFactoryMapping : IUnknown + { + [propget] HRESULT Count([out, retval] UINT *count); + + HRESULT GetTable([out, retval] SAFEARRAY(IUIAutomationProxyFactoryEntry) *table); + HRESULT GetEntry( + [in] UINT index, + [out, retval] IUIAutomationProxyFactoryEntry **entry); + + HRESULT SetTable([in] SAFEARRAY(IUIAutomationProxyFactoryEntry) factoryList); + HRESULT InsertEntries( + [in] UINT before, + [in] SAFEARRAY(IUIAutomationProxyFactoryEntry) factoryList); + HRESULT InsertEntry( + [in] UINT before, + [in] IUIAutomationProxyFactoryEntry *factory); + + HRESULT RemoveEntry([in] UINT index); + HRESULT ClearTable(); + HRESULT RestoreDefaultTable(); + }
[ object, diff --git a/include/uiautomationcore.idl b/include/uiautomationcore.idl index 98894407441..715d9cf4b9e 100644 --- a/include/uiautomationcore.idl +++ b/include/uiautomationcore.idl @@ -63,12 +63,59 @@ enum OrientationType { OrientationType_Vertical = 0x0002, };
+enum DockPosition { + DockPosition_Top = 0x0000, + DockPosition_Left = 0x0001, + DockPosition_Bottom = 0x0002, + DockPosition_Right = 0x0003, + DockPosition_Fill = 0x0004, + DockPosition_None = 0x0005, +}; + +enum ExpandCollapseState { + ExpandCollapseState_Collapsed = 0x0000, + ExpandCollapseState_Expanded = 0x0001, + ExpandCollapseState_PartiallyExpanded = 0x0002, + ExpandCollapseState_LeafNode = 0x0003, +}; + +enum ScrollAmount { + ScrollAmount_LargeDecrement = 0x0000, + ScrollAmount_SmallDecrement = 0x0001, + ScrollAmount_NoAmount = 0x0002, + ScrollAmount_LargeIncrement = 0x0003, + ScrollAmount_SmallIncrement = 0x0004, +}; + +enum RowOrColumnMajor { + RowOrColumnMajor_RowMajor = 0x0000, + RowOrColumnMajor_ColumnMajor = 0x0001, + RowOrColumnMajor_Indeterminate = 0x0002, +}; + +enum ToggleState { + ToggleState_Off = 0x0000, + ToggleState_On = 0x0001, + ToggleState_Indeterminate = 0x0002, +}; + enum WindowVisualState { WindowVisualState_Normal = 0x0000, WindowVisualState_Maximized = 0x0001, WindowVisualState_Minimized = 0x0002, };
+enum SynchronizedInputType { + SynchronizedInputType_KeyUp = 0x0001, + SynchronizedInputType_KeyDown = 0x0002, + SynchronizedInputType_LeftMouseUp = 0x0004, + SynchronizedInputType_LeftMouseDown = 0x0008, + SynchronizedInputType_RightMouseUp = 0x0010, + SynchronizedInputType_RightMouseDown = 0x0020, +}; + +cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(SynchronizedInputType)") + enum WindowInteractionState { WindowInteractionState_Running = 0x0000, WindowInteractionState_Closing = 0x0001, @@ -77,12 +124,57 @@ enum WindowInteractionState { WindowInteractionState_NotResponding = 0x0004, };
+enum TextUnit { + TextUnit_Character = 0x0000, + TextUnit_Format = 0x0001, + TextUnit_Word = 0x0002, + TextUnit_Line = 0x0003, + TextUnit_Paragraph = 0x0004, + TextUnit_Page = 0x0005, + TextUnit_Document = 0x0006, +}; + +enum TextPatternRangeEndpoint { + TextPatternRangeEndpoint_Start = 0x0000, + TextPatternRangeEndpoint_End = 0x0001, +}; + +enum SupportedTextSelection { + SupportedTextSelection_None = 0x0000, + SupportedTextSelection_Single = 0x0001, + SupportedTextSelection_Multiple = 0x0002, +}; + enum LiveSetting { Off = 0x0000, Polite = 0x0001, Assertive = 0x0002, };
+enum ZoomUnit { + ZoomUnit_NoAmount = 0x0000, + ZoomUnit_LargeDecrement = 0x0001, + ZoomUnit_SmallDecrement = 0x0002, + ZoomUnit_LargeIncrement = 0x0003, + ZoomUnit_SmallIncrement = 0x0004, +}; + +enum NotificationProcessing { + NotificationProcessing_ImportantAll = 0x0000, + NotificationProcessing_ImportantMostRecent = 0x0001, + NotificationProcessing_All = 0x0002, + NotificationProcessing_MostRecent = 0x0003, + NotificationProcessing_CurrentThenMostRecent = 0x0004, +}; + +enum NotificationKind { + NotificationKind_ItemAdded = 0x0000, + NotificationKind_ItemRemoved = 0x0001, + NotificationKind_ActionCompleted = 0x0002, + NotificationKind_ActionAborted = 0x0003, + NotificationKind_Other = 0x0004, +}; + typedef int PROPERTYID; typedef int PATTERNID; typedef int EVENTID;
From: Connor McAdams cmcadams@codeweavers.com
Signed-off-by: Connor McAdams cmcadams@codeweavers.com --- dlls/uiautomationcore/tests/uiautomation.c | 73 ++++++++++++-- dlls/uiautomationcore/uia_classes.idl | 6 ++ dlls/uiautomationcore/uia_ids.c | 107 ++++++++++++++++++++- include/uiautomationclient.idl | 2 + include/uiautomationcoreapi.h | 39 ++++++++ 5 files changed, 216 insertions(+), 11 deletions(-)
diff --git a/dlls/uiautomationcore/tests/uiautomation.c b/dlls/uiautomationcore/tests/uiautomation.c index 3756b5cbf1a..a6239b4f300 100644 --- a/dlls/uiautomationcore/tests/uiautomation.c +++ b/dlls/uiautomationcore/tests/uiautomation.c @@ -4022,22 +4022,75 @@ static const struct uia_lookup_id uia_property_lookup_ids[] = { { &IsDialog_Property_GUID, UIA_IsDialogPropertyId }, };
+static const struct uia_lookup_id uia_event_lookup_ids[] = { + { &ToolTipOpened_Event_GUID, UIA_ToolTipOpenedEventId }, + { &ToolTipClosed_Event_GUID, UIA_ToolTipClosedEventId }, + { &StructureChanged_Event_GUID, UIA_StructureChangedEventId }, + { &MenuOpened_Event_GUID, UIA_MenuOpenedEventId }, + { &AutomationPropertyChanged_Event_GUID, UIA_AutomationPropertyChangedEventId }, + { &AutomationFocusChanged_Event_GUID, UIA_AutomationFocusChangedEventId }, + { &AsyncContentLoaded_Event_GUID, UIA_AsyncContentLoadedEventId }, + { &MenuClosed_Event_GUID, UIA_MenuClosedEventId }, + { &LayoutInvalidated_Event_GUID, UIA_LayoutInvalidatedEventId }, + { &Invoke_Invoked_Event_GUID, UIA_Invoke_InvokedEventId }, + { &SelectionItem_ElementAddedToSelectionEvent_Event_GUID, UIA_SelectionItem_ElementAddedToSelectionEventId }, + { &SelectionItem_ElementRemovedFromSelectionEvent_Event_GUID, UIA_SelectionItem_ElementRemovedFromSelectionEventId }, + { &SelectionItem_ElementSelectedEvent_Event_GUID, UIA_SelectionItem_ElementSelectedEventId }, + { &Selection_InvalidatedEvent_Event_GUID, UIA_Selection_InvalidatedEventId }, + { &Text_TextSelectionChangedEvent_Event_GUID, UIA_Text_TextSelectionChangedEventId }, + { &Text_TextChangedEvent_Event_GUID, UIA_Text_TextChangedEventId }, + { &Window_WindowOpened_Event_GUID, UIA_Window_WindowOpenedEventId }, + { &Window_WindowClosed_Event_GUID, UIA_Window_WindowClosedEventId }, + { &MenuModeStart_Event_GUID, UIA_MenuModeStartEventId }, + { &MenuModeEnd_Event_GUID, UIA_MenuModeEndEventId }, + { &InputReachedTarget_Event_GUID, UIA_InputReachedTargetEventId }, + { &InputReachedOtherElement_Event_GUID, UIA_InputReachedOtherElementEventId }, + { &InputDiscarded_Event_GUID, UIA_InputDiscardedEventId }, + /* Implemented on Win8+ */ + { &SystemAlert_Event_GUID, UIA_SystemAlertEventId }, + { &LiveRegionChanged_Event_GUID, UIA_LiveRegionChangedEventId }, + { &HostedFragmentRootsInvalidated_Event_GUID, UIA_HostedFragmentRootsInvalidatedEventId }, + { &Drag_DragStart_Event_GUID, UIA_Drag_DragStartEventId }, + { &Drag_DragCancel_Event_GUID, UIA_Drag_DragCancelEventId }, + { &Drag_DragComplete_Event_GUID, UIA_Drag_DragCompleteEventId }, + { &DropTarget_DragEnter_Event_GUID, UIA_DropTarget_DragEnterEventId }, + { &DropTarget_DragLeave_Event_GUID, UIA_DropTarget_DragLeaveEventId }, + { &DropTarget_Dropped_Event_GUID, UIA_DropTarget_DroppedEventId }, + { &TextEdit_TextChanged_Event_GUID, UIA_TextEdit_TextChangedEventId }, + { &TextEdit_ConversionTargetChanged_Event_GUID, UIA_TextEdit_ConversionTargetChangedEventId }, + /* Implemented on Win10v1809+. */ + { &Changes_Event_GUID, UIA_ChangesEventId }, + { &Notification_Event_GUID, UIA_NotificationEventId }, +}; + static void test_UiaLookupId(void) { - unsigned int i; - - for (i = 0; i < ARRAY_SIZE(uia_property_lookup_ids); i++) + static const struct { + const char *id_type_name; + int id_type; + const struct uia_lookup_id *ids; + int ids_count; + } tests[] = { - int prop_id = UiaLookupId(AutomationIdentifierType_Property, uia_property_lookup_ids[i].guid); + { "property", AutomationIdentifierType_Property, uia_property_lookup_ids, ARRAY_SIZE(uia_property_lookup_ids) }, + { "event", AutomationIdentifierType_Event, uia_event_lookup_ids, ARRAY_SIZE(uia_event_lookup_ids) }, + }; + unsigned int i, y;
- if (!prop_id) + for (i = 0; i < ARRAY_SIZE(tests); i++) + { + for (y = 0; y < tests[i].ids_count; y++) { - win_skip("No propertyId for GUID %s, skipping further tests.\n", debugstr_guid(uia_property_lookup_ids[i].guid)); - break; - } + int id = UiaLookupId(tests[i].id_type, tests[i].ids[y].guid);
- ok(prop_id == uia_property_lookup_ids[i].id, "Unexpected Property id, expected %d, got %d\n", - uia_property_lookup_ids[i].id, prop_id); + if (!id) + { + win_skip("No %s id for GUID %s, skipping further tests.\n", tests[i].id_type_name, debugstr_guid(tests[i].ids[y].guid)); + break; + } + + ok(id == tests[i].ids[y].id, "Unexpected %s id, expected %d, got %d\n", tests[i].id_type_name, tests[i].ids[y].id, id); + } } }
diff --git a/dlls/uiautomationcore/uia_classes.idl b/dlls/uiautomationcore/uia_classes.idl index 2dc7981b702..ace1c12e70c 100644 --- a/dlls/uiautomationcore/uia_classes.idl +++ b/dlls/uiautomationcore/uia_classes.idl @@ -27,6 +27,12 @@ struct uia_prop_info { int type; };
+struct uia_event_info { + const GUID *guid; + int event_id; + int event_arg_type; +}; + [ version(1.0), uuid(8a9ca8eb-856b-43d9-abd7-4a590054064f), diff --git a/dlls/uiautomationcore/uia_ids.c b/dlls/uiautomationcore/uia_ids.c index a3a60c8aec9..c1e51c51ca3 100644 --- a/dlls/uiautomationcore/uia_ids.c +++ b/dlls/uiautomationcore/uia_ids.c @@ -30,6 +30,13 @@ static int __cdecl uia_property_guid_compare(const void *a, const void *b) return memcmp(guid, property->guid, sizeof(*guid)); }
+static int __cdecl uia_event_guid_compare(const void *a, const void *b) +{ + const GUID *guid = a; + const struct uia_event_info *event = b; + return memcmp(guid, event->guid, sizeof(*guid)); +} + /* Sorted by GUID. */ static const struct uia_prop_info default_uia_properties[] = { { &AutomationId_Property_GUID, UIA_AutomationIdPropertyId, @@ -308,6 +315,93 @@ const struct uia_prop_info *uia_prop_info_from_id(PROPERTYID prop_id) return &default_uia_properties[prop_id_idx[prop_id - PROP_ID_MIN]]; }
+/* Sorted by GUID. */ +static const struct uia_event_info default_uia_events[] = { + { &Selection_InvalidatedEvent_Event_GUID, UIA_Selection_InvalidatedEventId, + EventArgsType_Simple, }, + { &Window_WindowOpened_Event_GUID, UIA_Window_WindowOpenedEventId, + EventArgsType_Simple, }, + { &TextEdit_TextChanged_Event_GUID, UIA_TextEdit_TextChangedEventId, + EventArgsType_TextEditTextChanged, }, + { &Drag_DragStart_Event_GUID, UIA_Drag_DragStartEventId, + EventArgsType_Simple, }, + { &Changes_Event_GUID, UIA_ChangesEventId, + EventArgsType_Changes, }, + { &DropTarget_DragLeave_Event_GUID, UIA_DropTarget_DragLeaveEventId, + EventArgsType_Simple, }, + { &AutomationFocusChanged_Event_GUID, UIA_AutomationFocusChangedEventId, + EventArgsType_Simple, }, + { &AsyncContentLoaded_Event_GUID, UIA_AsyncContentLoadedEventId, + EventArgsType_AsyncContentLoaded, }, + { &MenuModeStart_Event_GUID, UIA_MenuModeStartEventId, + EventArgsType_Simple, }, + { &HostedFragmentRootsInvalidated_Event_GUID, UIA_HostedFragmentRootsInvalidatedEventId, + EventArgsType_Simple, }, + { &LayoutInvalidated_Event_GUID, UIA_LayoutInvalidatedEventId, + EventArgsType_Simple, }, + { &MenuOpened_Event_GUID, UIA_MenuOpenedEventId, + EventArgsType_Simple, }, + { &SystemAlert_Event_GUID, UIA_SystemAlertEventId, + EventArgsType_Simple, }, + { &StructureChanged_Event_GUID, UIA_StructureChangedEventId, + EventArgsType_StructureChanged, }, + { &InputDiscarded_Event_GUID, UIA_InputDiscardedEventId, + EventArgsType_Simple, }, + { &MenuClosed_Event_GUID, UIA_MenuClosedEventId, + EventArgsType_Simple, }, + { &Text_TextChangedEvent_Event_GUID, UIA_Text_TextChangedEventId, + EventArgsType_Simple, }, + { &TextEdit_ConversionTargetChanged_Event_GUID, UIA_TextEdit_ConversionTargetChangedEventId, + EventArgsType_Simple, }, + { &Drag_DragComplete_Event_GUID, UIA_Drag_DragCompleteEventId, + EventArgsType_Simple, }, + { &InputReachedOtherElement_Event_GUID, UIA_InputReachedOtherElementEventId, + EventArgsType_Simple, }, + { &LiveRegionChanged_Event_GUID, UIA_LiveRegionChangedEventId, + EventArgsType_Simple, }, + { &InputReachedTarget_Event_GUID, UIA_InputReachedTargetEventId, + EventArgsType_Simple, }, + { &DropTarget_DragEnter_Event_GUID, UIA_DropTarget_DragEnterEventId, + EventArgsType_Simple, }, + { &MenuModeEnd_Event_GUID, UIA_MenuModeEndEventId, + EventArgsType_Simple, }, + { &Text_TextSelectionChangedEvent_Event_GUID, UIA_Text_TextSelectionChangedEventId, + EventArgsType_Simple, }, + { &AutomationPropertyChanged_Event_GUID, UIA_AutomationPropertyChangedEventId, + EventArgsType_PropertyChanged, }, + { &SelectionItem_ElementRemovedFromSelectionEvent_Event_GUID, UIA_SelectionItem_ElementRemovedFromSelectionEventId, + EventArgsType_Simple, }, + { &SelectionItem_ElementAddedToSelectionEvent_Event_GUID, UIA_SelectionItem_ElementAddedToSelectionEventId, + EventArgsType_Simple, }, + { &DropTarget_Dropped_Event_GUID, UIA_DropTarget_DroppedEventId, + EventArgsType_Simple, }, + { &ToolTipClosed_Event_GUID, UIA_ToolTipClosedEventId, + EventArgsType_Simple, }, + { &Invoke_Invoked_Event_GUID, UIA_Invoke_InvokedEventId, + EventArgsType_Simple, }, + { &Notification_Event_GUID, UIA_NotificationEventId, + EventArgsType_Notification, }, + { &Window_WindowClosed_Event_GUID, UIA_Window_WindowClosedEventId, + EventArgsType_WindowClosed, }, + { &Drag_DragCancel_Event_GUID, UIA_Drag_DragCancelEventId, + EventArgsType_Simple, }, + { &SelectionItem_ElementSelectedEvent_Event_GUID, UIA_SelectionItem_ElementSelectedEventId, + EventArgsType_Simple, }, + { &ToolTipOpened_Event_GUID, UIA_ToolTipOpenedEventId, + EventArgsType_Simple, }, +}; + +static const struct uia_event_info *uia_event_info_from_guid(const GUID *guid) +{ + struct uia_event_info *event; + + if ((event = bsearch(guid, default_uia_events, ARRAY_SIZE(default_uia_events), sizeof(*event), + uia_event_guid_compare))) + return event; + + return NULL; +} + /*********************************************************************** * UiaLookupId (uiautomationcore.@) */ @@ -331,8 +425,19 @@ int WINAPI UiaLookupId(enum AutomationIdentifierType type, const GUID *guid) break; }
- case AutomationIdentifierType_Pattern: case AutomationIdentifierType_Event: + { + const struct uia_event_info *event = uia_event_info_from_guid(guid); + + if (event) + ret_id = event->event_id; + else + FIXME("Failed to find eventId for GUID %s\n", debugstr_guid(guid)); + + break; + } + + case AutomationIdentifierType_Pattern: case AutomationIdentifierType_ControlType: case AutomationIdentifierType_TextAttribute: case AutomationIdentifierType_LandmarkType: diff --git a/include/uiautomationclient.idl b/include/uiautomationclient.idl index 4579e4db652..ce0402a5d33 100644 --- a/include/uiautomationclient.idl +++ b/include/uiautomationclient.idl @@ -156,6 +156,8 @@ library UIAutomationClient { const long UIA_DropTarget_DroppedEventId = 20031; const long UIA_TextEdit_TextChangedEventId = 20032; const long UIA_TextEdit_ConversionTargetChangedEventId = 20033; + const long UIA_ChangesEventId = 20034; + const long UIA_NotificationEventId = 20035; /* }; */ diff --git a/include/uiautomationcoreapi.h b/include/uiautomationcoreapi.h index ef94c72d162..52a8e596325 100644 --- a/include/uiautomationcoreapi.h +++ b/include/uiautomationcoreapi.h @@ -221,6 +221,45 @@ DEFINE_GUID(Selection2_ItemCount_Property_GUID, 0xbb49eb9f,0x456d DEFINE_GUID(HeadingLevel_Property_GUID, 0x29084272,0xaaaf,0x4a30,0x87,0x96,0x3c,0x12,0xf6,0x2b,0x6b,0xbb); DEFINE_GUID(IsDialog_Property_GUID, 0x9d0dfb9b,0x8436,0x4501,0xbb,0xbb,0xe5,0x34,0xa4,0xfb,0x3b,0x3f);
+/* + * AutomationIdentifierType_Event GUIDs. + */ +DEFINE_GUID(ToolTipOpened_Event_GUID, 0x3f4b97ff,0x2edc,0x451d,0xbc,0xa4,0x95,0xa3,0x18,0x8d,0x5b,0x03); +DEFINE_GUID(ToolTipClosed_Event_GUID, 0x276d71ef,0x24a9,0x49b6,0x8e,0x97,0xda,0x98,0xb4,0x01,0xbb,0xcd); +DEFINE_GUID(StructureChanged_Event_GUID, 0x59977961,0x3edd,0x4b11,0xb1,0x3b,0x67,0x6b,0x2a,0x2a,0x6c,0xa9); +DEFINE_GUID(MenuOpened_Event_GUID, 0xebe2e945,0x66ca,0x4ed1,0x9f,0xf8,0x2a,0xd7,0xdf,0x0a,0x1b,0x08); +DEFINE_GUID(AutomationPropertyChanged_Event_GUID, 0x2527fba1,0x8d7a,0x4630,0xa4,0xcc,0xe6,0x63,0x15,0x94,0x2f,0x52); +DEFINE_GUID(AutomationFocusChanged_Event_GUID, 0xb68a1f17,0xf60d,0x41a7,0xa3,0xcc,0xb0,0x52,0x92,0x15,0x5f,0xe0); +DEFINE_GUID(AsyncContentLoaded_Event_GUID, 0x5fdee11c,0xd2fa,0x4fb9,0x90,0x4e,0x5c,0xbe,0xe8,0x94,0xd5,0xef); +DEFINE_GUID(MenuClosed_Event_GUID, 0x3cf1266e,0x1582,0x4041,0xac,0xd7,0x88,0xa3,0x5a,0x96,0x52,0x97); +DEFINE_GUID(LayoutInvalidated_Event_GUID, 0xed7d6544,0xa6bd,0x4595,0x9b,0xae,0x3d,0x28,0x94,0x6c,0xc7,0x15); +DEFINE_GUID(Invoke_Invoked_Event_GUID, 0xdfd699f0,0xc915,0x49dd,0xb4,0x22,0xdd,0xe7,0x85,0xc3,0xd2,0x4b); +DEFINE_GUID(SelectionItem_ElementAddedToSelectionEvent_Event_GUID, 0x3c822dd1,0xc407,0x4dba,0x91,0xdd,0x79,0xd4,0xae,0xd0,0xae,0xc6); +DEFINE_GUID(SelectionItem_ElementRemovedFromSelectionEvent_Event_GUID, 0x097fa8a9,0x7079,0x41af,0x8b,0x9c,0x09,0x34,0xd8,0x30,0x5e,0x5c); +DEFINE_GUID(SelectionItem_ElementSelectedEvent_Event_GUID, 0xb9c7dbfb,0x4ebe,0x4532,0xaa,0xf4,0x00,0x8c,0xf6,0x47,0x23,0x3c); +DEFINE_GUID(Selection_InvalidatedEvent_Event_GUID, 0xcac14904,0x16b4,0x4b53,0x8e,0x47,0x4c,0xb1,0xdf,0x26,0x7b,0xb7); +DEFINE_GUID(Text_TextSelectionChangedEvent_Event_GUID, 0x918edaa1,0x71b3,0x49ae,0x97,0x41,0x79,0xbe,0xb8,0xd3,0x58,0xf3); +DEFINE_GUID(Text_TextChangedEvent_Event_GUID, 0x4a342082,0xf483,0x48c4,0xac,0x11,0xa8,0x4b,0x43,0x5e,0x2a,0x84); +DEFINE_GUID(Window_WindowOpened_Event_GUID, 0xd3e81d06,0xde45,0x4f2f,0x96,0x33,0xde,0x9e,0x02,0xfb,0x65,0xaf); +DEFINE_GUID(Window_WindowClosed_Event_GUID, 0xedf141f8,0xfa67,0x4e22,0xbb,0xf7,0x94,0x4e,0x05,0x73,0x5e,0xe2); +DEFINE_GUID(MenuModeStart_Event_GUID, 0x18d7c631,0x166a,0x4ac9,0xae,0x3b,0xef,0x4b,0x54,0x20,0xe6,0x81); +DEFINE_GUID(MenuModeEnd_Event_GUID, 0x9ecd4c9f,0x80dd,0x47b8,0x82,0x67,0x5a,0xec,0x06,0xbb,0x2c,0xff); +DEFINE_GUID(InputReachedTarget_Event_GUID, 0x93ed549a,0x0549,0x40f0,0xbe,0xdb,0x28,0xe4,0x4f,0x7d,0xe2,0xa3); +DEFINE_GUID(InputReachedOtherElement_Event_GUID, 0xed201d8a,0x4e6c,0x415e,0xa8,0x74,0x24,0x60,0xc9,0xb6,0x6b,0xa8); +DEFINE_GUID(InputDiscarded_Event_GUID, 0x7f36c367,0x7b18,0x417c,0x97,0xe3,0x9d,0x58,0xdd,0xc9,0x44,0xab); +DEFINE_GUID(SystemAlert_Event_GUID, 0xd271545d,0x7a3a,0x47a7,0x84,0x74,0x81,0xd2,0x9a,0x24,0x51,0xc9); +DEFINE_GUID(LiveRegionChanged_Event_GUID, 0x102d5e90,0xe6a9,0x41b6,0xb1,0xc5,0xa9,0xb1,0x92,0x9d,0x95,0x10); +DEFINE_GUID(HostedFragmentRootsInvalidated_Event_GUID, 0xe6bdb03e,0x0921,0x4ec5,0x8d,0xcf,0xea,0xe8,0x77,0xb0,0x42,0x6b); +DEFINE_GUID(Drag_DragStart_Event_GUID, 0x883a480b,0x3aa9,0x429d,0x95,0xe4,0xd9,0xc8,0xd0,0x11,0xf0,0xdd); +DEFINE_GUID(Drag_DragCancel_Event_GUID, 0xc3ede6fa,0x3451,0x4e0f,0x9e,0x71,0xdf,0x9c,0x28,0x0a,0x46,0x57); +DEFINE_GUID(Drag_DragComplete_Event_GUID, 0x38e96188,0xef1f,0x463e,0x91,0xca,0x3a,0x77,0x92,0xc2,0x9c,0xaf); +DEFINE_GUID(DropTarget_DragEnter_Event_GUID, 0xaad9319b,0x032c,0x4a88,0x96,0x1d,0x1c,0xf5,0x79,0x58,0x1e,0x34); +DEFINE_GUID(DropTarget_DragLeave_Event_GUID, 0x0f82eb15,0x24a2,0x4988,0x92,0x17,0xde,0x16,0x2a,0xee,0x27,0x2b); +DEFINE_GUID(DropTarget_Dropped_Event_GUID, 0x622cead8,0x1edb,0x4a3d,0xab,0xbc,0xbe,0x22,0x11,0xff,0x68,0xb5); +DEFINE_GUID(TextEdit_TextChanged_Event_GUID, 0x120b0308,0xec22,0x4eb8,0x9c,0x98,0x98,0x67,0xcd,0xa1,0xb1,0x65); +DEFINE_GUID(TextEdit_ConversionTargetChanged_Event_GUID, 0x3388c183,0xed4f,0x4c8b,0x9b,0xaa,0x36,0x4d,0x51,0xd8,0x84,0x7f); +DEFINE_GUID(Changes_Event_GUID, 0x7df26714,0x614f,0x4e05,0x94,0x88,0x71,0x6c,0x5b,0xa1,0x94,0x36); +DEFINE_GUID(Notification_Event_GUID, 0x72c5a2f7,0x9788,0x480f,0xb8,0xeb,0x4d,0xee,0x00,0xf6,0x18,0x6f);
enum AutomationIdentifierType {
From: Connor McAdams cmcadams@codeweavers.com
Signed-off-by: Connor McAdams cmcadams@codeweavers.com --- include/uiautomationcore.idl | 601 +++++++++++++++++++++++++++++++++++ 1 file changed, 601 insertions(+)
diff --git a/include/uiautomationcore.idl b/include/uiautomationcore.idl index 715d9cf4b9e..bd93bd04dff 100644 --- a/include/uiautomationcore.idl +++ b/include/uiautomationcore.idl @@ -191,6 +191,11 @@ struct UiaRect { double height; };
+struct UiaPoint { + double x; + double y; +}; + struct UiaChangeInfo { int uiaId; VARIANT payload; @@ -341,6 +346,602 @@ library UIA [propget] HRESULT DefaultAction([out, retval] BSTR *pszDefaultAction); }
+ [ + object, + uuid(159bc72c-4ad3-485e-9637-d7052edf0146), + pointer_default(unique), + oleautomation + ] + interface IDockProvider : IUnknown + { + HRESULT SetDockPosition([in] enum DockPosition dockPosition); + [propget] HRESULT DockPosition([out, retval] enum DockPosition *pRetVal); + }; + + [ + object, + uuid(d847d3a5-cab0-4a98-8c32-ecb45c59ad24), + pointer_default(unique), + oleautomation + ] + interface IExpandCollapseProvider : IUnknown + { + HRESULT Expand(); + HRESULT Collapse(); + [propget] HRESULT ExpandCollapseState([out, retval] enum ExpandCollapseState *pRetVal); + }; + + [ + object, + uuid(b17d6187-0907-464b-a168-0ef17a1572b1), + pointer_default(unique), + oleautomation + ] + interface IGridProvider : IUnknown + { + HRESULT GetItem( + [in] int row, + [in] int column, + [out, retval] IRawElementProviderSimple **pRetVal); + + [propget] HRESULT RowCount([out, retval] int *pRetVal); + [propget] HRESULT ColumnCount([out, retval] int *pRetVal); + }; + + [ + object, + uuid(d02541f1-fb81-4d64-ae32-f520f8a6dbd1), + pointer_default(unique), + oleautomation + ] + interface IGridItemProvider : IUnknown + { + [propget] HRESULT Row([out, retval] int *pRetVal); + [propget] HRESULT Column([out, retval] int *pRetVal); + [propget] HRESULT RowSpan([out, retval] int *pRetVal); + [propget] HRESULT ColumnSpan([out, retval] int *pRetVal); + [propget] HRESULT ContainingGrid([out, retval] IRawElementProviderSimple **pRetVal); + }; + + [ + object, + uuid(54fcb24b-e18e-47a2-b4d3-eccbe77599a2), + pointer_default(unique), + oleautomation + ] + interface IInvokeProvider : IUnknown + { + HRESULT Invoke(); + }; + + [ + object, + uuid(6278cab1-b556-4a1a-b4e0-418acc523201), + pointer_default(unique), + oleautomation + ] + interface IMultipleViewProvider : IUnknown + { + HRESULT GetViewName( + [in] int viewId, + [out, retval] BSTR *pRetVal); + + HRESULT SetCurrentView([in] int viewId); + [propget] HRESULT CurrentView([out, retval] int *pRetVal); + HRESULT GetSupportedViews([out, retval] SAFEARRAY(int) *pRetVal); + }; + + [ + object, + uuid(36dc7aef-33e6-4691-afe1-2be7274b3d33), + pointer_default(unique), + oleautomation + ] + interface IRangeValueProvider : IUnknown + { + HRESULT SetValue([in] double val); + [propget] HRESULT Value([out, retval] double *pRetVal); + [propget] HRESULT IsReadOnly([out, retval] BOOL *pRetVal); + [propget] HRESULT Maximum([out, retval] double *pRetVal); + [propget] HRESULT Minimum([out, retval] double *pRetVal); + [propget] HRESULT LargeChange([out, retval] double *pRetVal); + [propget] HRESULT SmallChange([out, retval] double *pRetVal); + }; + + [ + object, + uuid(2360c714-4bf1-4b26-ba65-9b21316127eb), + pointer_default(unique), + oleautomation + ] + interface IScrollItemProvider : IUnknown + { + HRESULT ScrollIntoView(); + }; + + [ + object, + uuid(fb8b03af-3bdf-48d4-bd36-1a65793be168), + pointer_default(unique), + oleautomation + ] + interface ISelectionProvider : IUnknown + { + /* + * FIXME: Current versions of Windows SDK use + * SAFEARRAY(IRawElementProviderSimple *) instead of + * SAFEARRAY(VARIANT). + */ + HRESULT GetSelection([out, retval] SAFEARRAY(VARIANT) *pRetVal); + [propget] HRESULT CanSelectMultiple([out, retval] BOOL *pRetVal); + [propget] HRESULT IsSelectionRequired([out, retval] BOOL *pRetVal); + }; + + [ + object, + uuid(b38b8077-1fc3-42a5-8cae-d40c2215055a), + pointer_default(unique), + oleautomation + ] + interface IScrollProvider : IUnknown + { + HRESULT Scroll( + [in] enum ScrollAmount horizontalAmount, + [in] enum ScrollAmount verticalAmount); + HRESULT SetScrollPercent( + [in] double horizontalPercent, + [in] double verticalPercent); + + [propget] HRESULT HorizontalScrollPercent([out, retval] double *pRetVal); + [propget] HRESULT VerticalScrollPercent([out, retval] double *pRetVal); + [propget] HRESULT HorizontalViewSize([out, retval] double *pRetVal); + [propget] HRESULT VerticalViewSize([out, retval] double *pRetVal); + [propget] HRESULT HorizontallyScrollable([out, retval] BOOL *pRetVal); + [propget] HRESULT VerticallyScrollable([out, retval] BOOL *pRetVal); + }; + + [ + object, + uuid(2acad808-b2d4-452d-a407-91ff1ad167b2), + pointer_default(unique), + oleautomation + ] + interface ISelectionItemProvider : IUnknown + { + HRESULT Select(); + HRESULT AddToSelection(); + HRESULT RemoveFromSelection(); + [propget] HRESULT IsSelected([out, retval] BOOL *pRetVal); + [propget] HRESULT SelectionContainer([out, retval] IRawElementProviderSimple **pRetVal); + }; + + [ + object, + uuid(29db1a06-02ce-4cf7-9b42-565d4fab20ee), + pointer_default(unique), + oleautomation + ] + interface ISynchronizedInputProvider : IUnknown + { + HRESULT StartListening([in] enum SynchronizedInputType inputType); + HRESULT Cancel(); + }; + + [ + object, + uuid(9c860395-97b3-490a-b52a-858cc22af166), + pointer_default(unique), + oleautomation + ] + interface ITableProvider : IUnknown + { + /* + * FIXME: Current versions of Windows SDK use + * SAFEARRAY(IRawElementProviderSimple *) instead of + * SAFEARRAY(VARIANT). + */ + HRESULT GetRowHeaders([out, retval] SAFEARRAY(VARIANT) *pRetVal); + HRESULT GetColumnHeaders([out, retval] SAFEARRAY(VARIANT) *pRetVal); + [propget] HRESULT RowOrColumnMajor([out, retval] enum RowOrColumnMajor *pRetVal); + }; + + [ + object, + uuid(b9734fa6-771f-4d78-9c90-2517999349cd), + pointer_default(unique), + oleautomation + ] + interface ITableItemProvider : IUnknown + { + /* + * FIXME: Current versions of Windows SDK use + * SAFEARRAY(IRawElementProviderSimple *) instead of + * SAFEARRAY(VARIANT). + */ + HRESULT GetRowHeaderItems([out, retval] SAFEARRAY(VARIANT) *pRetVal); + HRESULT GetColumnHeaderItems([out, retval] SAFEARRAY(VARIANT) *pRetVal); + }; + + [ + object, + uuid(56d00bd0-c4f4-433c-a836-1a52a57e0892), + pointer_default(unique), + oleautomation + ] + interface IToggleProvider : IUnknown + { + HRESULT Toggle(); + [propget] HRESULT ToggleState([out, retval] enum ToggleState *pRetVal); + }; + + [ + object, + uuid(6829ddc4-4f91-4ffa-b86f-bd3e2987cb4c), + pointer_default(unique), + oleautomation + ] + interface ITransformProvider : IUnknown + { + HRESULT Move( + [in] double x, + [in] double y); + HRESULT Resize( + [in] double width, + [in] double height); + + HRESULT Rotate([in] double degrees); + [propget] HRESULT CanMove([out, retval] BOOL *pRetVal); + [propget] HRESULT CanResize([out, retval] BOOL *pRetVal); + [propget] HRESULT CanRotate([out, retval] BOOL *pRetVal); + }; + + [ + object, + uuid(c7935180-6fb3-4201-b174-7df73adbf64a), + pointer_default(unique), + oleautomation + ] + interface IValueProvider : IUnknown + { + HRESULT SetValue([in] LPCWSTR val); + [propget] HRESULT Value([out, retval] BSTR *pRetVal); + [propget] HRESULT IsReadOnly([out, retval] BOOL *pRetVal); + }; + + [ + object, + uuid(987df77b-db06-4d77-8f8a-86a9c3bb90b9), + pointer_default(unique), + oleautomation + ] + interface IWindowProvider : IUnknown + { + HRESULT SetVisualState([in] enum WindowVisualState state); + HRESULT Close(); + + HRESULT WaitForInputIdle( + [in] int milliseconds, + [out, retval] BOOL *pRetVal); + + [propget] HRESULT CanMaximize([out, retval] BOOL *pRetVal); + [propget] HRESULT CanMinimize([out, retval] BOOL *pRetVal); + [propget] HRESULT IsModal([out, retval] BOOL *pRetVal); + [propget] HRESULT WindowVisualState([out, retval] enum WindowVisualState *pRetVal); + [propget] HRESULT WindowInteractionState([out, retval] enum WindowInteractionState *pRetVal); + [propget] HRESULT IsTopmost([out, retval] BOOL *pRetVal); + }; + + [ + object, + uuid(e747770b-39ce-4382-ab30-d8fb3f336f24), + pointer_default(unique), + oleautomation + ] + interface IItemContainerProvider : IUnknown + { + HRESULT FindItemByProperty( + [in] IRawElementProviderSimple *pStartAfter, + [in] PROPERTYID propertyId, + [in] VARIANT value, + [out, retval] IRawElementProviderSimple **pFound); + }; + + [ + object, + uuid(cb98b665-2d35-4fac-ad35-f3c60d0c0b8b), + pointer_default(unique), + oleautomation + ] + interface IVirtualizedItemProvider : IUnknown + { + HRESULT Realize(); + }; + + [ + object, + uuid(3ad86ebd-f5ef-483d-bb18-b1042a475d64), + pointer_default(unique), + oleautomation + ] + interface IObjectModelProvider : IUnknown + { + HRESULT GetUnderlyingObjectModel([out, retval] IUnknown **ppUnknown); + }; + + [ + object, + uuid(f95c7e80-bd63-4601-9782-445ebff011fc), + pointer_default(unique), + oleautomation + ] + interface IAnnotationProvider : IUnknown + { + [propget] HRESULT AnnotationTypeId([out, retval] int *retVal); + [propget] HRESULT AnnotationTypeName([out, retval] BSTR *retVal); + [propget] HRESULT Author([out, retval] BSTR *retVal); + [propget] HRESULT DateTime([out, retval] BSTR *retVal); + [propget] HRESULT Target([out, retval] IRawElementProviderSimple **retVal); + }; + + [ + object, + uuid(19b6b649-f5d7-4a6d-bdcb-129252be588a), + pointer_default(unique), + oleautomation + ] + interface IStylesProvider : IUnknown + { + [propget] HRESULT StyleId([out, retval] int *retVal); + [propget] HRESULT StyleName([out, retval] BSTR *retVal); + [propget] HRESULT FillColor([out, retval] int *retVal); + [propget] HRESULT FillPatternStyle([out, retval] BSTR *retVal); + [propget] HRESULT Shape([out, retval] BSTR *retVal); + [propget] HRESULT FillPatternColor([out, retval] int *retVal); + [propget] HRESULT ExtendedProperties([out, retval] BSTR *retVal); + }; + + [ + object, + uuid(6f6b5d35-5525-4f80-b758-85473832ffc7), + pointer_default(unique), + oleautomation + ] + interface ISpreadsheetProvider : IUnknown + { + HRESULT GetItemByName( + [in] LPCWSTR name, + [out, retval] IRawElementProviderSimple **pRetVal); + }; + + [ + object, + uuid(eaed4660-7b3d-4879-a2e6-365ce603f3d0), + pointer_default(unique), + oleautomation + ] + interface ISpreadsheetItemProvider : IUnknown + { + [propget] HRESULT Formula([out, retval] BSTR *pRetVal); + + /* + * FIXME: Current versions of Windows SDK use + * SAFEARRAY(IRawElementProviderSimple *) instead of + * SAFEARRAY(VARIANT). + */ + HRESULT GetAnnotationObjects([out, retval] SAFEARRAY(VARIANT) *pRetVal); + HRESULT GetAnnotationTypes([out, retval] SAFEARRAY(int) *pRetVal); + }; + + [ + object, + uuid(4758742f-7ac2-460c-bc48-09fc09308a93), + pointer_default(unique), + oleautomation + ] + interface ITransformProvider2 : ITransformProvider + { + HRESULT Zoom([in] double zoom); + [propget] HRESULT CanZoom([out, retval] BOOL *pRetVal); + [propget] HRESULT ZoomLevel([out, retval] double *pRetVal); + [propget] HRESULT ZoomMinimum([out, retval] double *pRetVal); + [propget] HRESULT ZoomMaximum([out, retval] double *pRetVal); + HRESULT ZoomByUnit([in] enum ZoomUnit zoomUnit); + } + + [ + object, + uuid(6aa7bbbb-7ff9-497d-904f-d20b897929d8), + pointer_default(unique), + oleautomation + ] + interface IDragProvider : IUnknown + { + [propget] HRESULT IsGrabbed([out, retval] BOOL *pRetVal); + [propget] HRESULT DropEffect([out, retval] BSTR *pRetVal); + [propget] HRESULT DropEffects([out, retval] SAFEARRAY(BSTR) *pRetVal); + + /* + * FIXME: Current versions of Windows SDK use + * SAFEARRAY(IRawElementProviderSimple *) instead of + * SAFEARRAY(VARIANT). + */ + HRESULT GetGrabbedItems([out, retval] SAFEARRAY(VARIANT) *pRetVal); + }; + + [ + object, + uuid(bae82bfd-358a-481c-85a0-d8b4d90a5d61), + pointer_default(unique), + oleautomation + ] + interface IDropTargetProvider : IUnknown + { + [propget] HRESULT DropTargetEffect([out, retval] BSTR *pRetVal); + [propget] HRESULT DropTargetEffects([out, retval] SAFEARRAY(BSTR) *pRetVal); + }; + + interface ITextRangeProvider; + [ + object, + uuid(3589c92c-63f3-4367-99bb-ada653b77cf2), + pointer_default(unique), + oleautomation + ] + interface ITextProvider : IUnknown + { + /* + * FIXME: Current versions of Windows SDK use + * SAFEARRAY(ITextRangeProvider *) instead of + * SAFEARRAY(VARIANT). + */ + HRESULT GetSelection([out, retval] SAFEARRAY(VARIANT) *pRetVal); + HRESULT GetVisibleRanges([out, retval] SAFEARRAY(VARIANT) *pRetVal); + + HRESULT RangeFromChild( + [in] IRawElementProviderSimple *childElement, + [out, retval] ITextRangeProvider **pRetVal); + HRESULT RangeFromPoint( + [in] struct UiaPoint point, + [out, retval] ITextRangeProvider **pRetVal); + + [propget] HRESULT DocumentRange([out, retval] ITextRangeProvider **pRetVal); + [propget] HRESULT SupportedTextSelection([out, retval] enum SupportedTextSelection *pRetVal); + }; + + [ + object, + uuid(0dc5e6ed-3e16-4bf1-8f9a-a979878bc195), + pointer_default(unique), + oleautomation + ] + interface ITextProvider2 : ITextProvider + { + HRESULT RangeFromAnnotation( + [in] IRawElementProviderSimple *annotationElement, + [out, retval] ITextRangeProvider **pRetVal); + HRESULT GetCaretRange( + [out] BOOL *isActive, + [out, retval] ITextRangeProvider **pRetVal); + } + + [ + object, + uuid(ea3605b4-3a05-400e-b5f9-4e91b40f6176), + pointer_default(unique), + oleautomation + ] + interface ITextEditProvider : ITextProvider + { + HRESULT GetActiveComposition([out, retval] ITextRangeProvider **pRetVal); + HRESULT GetConversionTarget([out, retval] ITextRangeProvider **pRetVal); + } + + [ + object, + uuid(5347ad7b-c355-46f8-aff5-909033582f63), + pointer_default(unique), + oleautomation + ] + interface ITextRangeProvider : IUnknown + { + HRESULT Clone([out, retval] ITextRangeProvider **pRetVal); + + HRESULT Compare( + [in] ITextRangeProvider *range, + [out, retval] BOOL *pRetVal); + HRESULT CompareEndpoints( + [in] enum TextPatternRangeEndpoint endpoint, + [in] ITextRangeProvider *targetRange, + [in] enum TextPatternRangeEndpoint targetEndpoint, + [out, retval] int *pRetVal); + + HRESULT ExpandToEnclosingUnit([in] enum TextUnit unit); + + HRESULT FindAttribute( + [in] TEXTATTRIBUTEID attributeId, + [in] VARIANT val, + [in] BOOL backward, + [out, retval] ITextRangeProvider **pRetVal); + HRESULT FindText( + [in] BSTR text, + [in] BOOL backward, + [in] BOOL ignoreCase, + [out, retval] ITextRangeProvider **pRetVal); + + HRESULT GetAttributeValue( + [in] TEXTATTRIBUTEID attributeId, + [out, retval] VARIANT *pRetVal); + + HRESULT GetBoundingRectangles([out, retval] SAFEARRAY(double) *pRetVal); + HRESULT GetEnclosingElement([out, retval] IRawElementProviderSimple **pRetVal); + + HRESULT GetText( + [in] int maxLength, + [out, retval] BSTR *pRetVal); + + HRESULT Move( + [in] enum TextUnit unit, + [in] int count, + [out, retval] int *pRetVal); + HRESULT MoveEndpointByUnit( + [in] enum TextPatternRangeEndpoint endpoint, + [in] enum TextUnit unit, + [in] int count, + [out, retval] int *pRetVal); + HRESULT MoveEndpointByRange( + [in] enum TextPatternRangeEndpoint endpoint, + [in] ITextRangeProvider *targetRange, + [in] enum TextPatternRangeEndpoint targetEndpoint); + + HRESULT Select(); + HRESULT AddToSelection(); + HRESULT RemoveFromSelection(); + HRESULT ScrollIntoView([in] BOOL alignToTop); + + /* + * FIXME: Current versions of Windows SDK use + * SAFEARRAY(IRawElementProviderSimple *) instead of + * SAFEARRAY(VARIANT). + */ + HRESULT GetChildren([out, retval] SAFEARRAY(VARIANT) *pRetVal); + }; + + [ + object, + uuid(9bbce42c-1921-4f18-89ca-dba1910a0386), + pointer_default(unique), + oleautomation + ] + interface ITextRangeProvider2 : ITextRangeProvider + { + HRESULT ShowContextMenu(); + } + + [ + object, + uuid(4c2de2b9-c88f-4f88-a111-f1d336b7d1a9), + pointer_default(unique), + oleautomation + ] + interface ITextChildProvider : IUnknown + { + [propget] HRESULT TextContainer([out, retval] IRawElementProviderSimple **pRetVal); + [propget] HRESULT TextRange([out, retval] ITextRangeProvider **pRetVal); + }; + + [ + object, + uuid(2062a28a-8c07-4b94-8e12-7037c622aeb8), + pointer_default(unique), + oleautomation + ] + interface ICustomNavigationProvider : IUnknown + { + HRESULT Navigate( + [in] enum NavigateDirection direction, + [out, retval] IRawElementProviderSimple **pRetVal); + } + enum UIAutomationType { UIAutomationType_Int = 0x01, UIAutomationType_Bool = 0x02,
From: Connor McAdams cmcadams@codeweavers.com
Signed-off-by: Connor McAdams cmcadams@codeweavers.com --- dlls/uiautomationcore/tests/uiautomation.c | 40 ++++++++ dlls/uiautomationcore/uia_classes.idl | 6 ++ dlls/uiautomationcore/uia_ids.c | 101 +++++++++++++++++++++ include/uiautomationcoreapi.h | 38 ++++++++ 4 files changed, 185 insertions(+)
diff --git a/dlls/uiautomationcore/tests/uiautomation.c b/dlls/uiautomationcore/tests/uiautomation.c index a6239b4f300..51fd04bfc02 100644 --- a/dlls/uiautomationcore/tests/uiautomation.c +++ b/dlls/uiautomationcore/tests/uiautomation.c @@ -4063,6 +4063,45 @@ static const struct uia_lookup_id uia_event_lookup_ids[] = { { &Notification_Event_GUID, UIA_NotificationEventId }, };
+static const struct uia_lookup_id uia_pattern_lookup_ids[] = { + { &Invoke_Pattern_GUID, UIA_InvokePatternId }, + { &Selection_Pattern_GUID, UIA_SelectionPatternId }, + { &Value_Pattern_GUID, UIA_ValuePatternId }, + { &RangeValue_Pattern_GUID, UIA_RangeValuePatternId }, + { &Scroll_Pattern_GUID, UIA_ScrollPatternId }, + { &ExpandCollapse_Pattern_GUID, UIA_ExpandCollapsePatternId }, + { &Grid_Pattern_GUID, UIA_GridPatternId }, + { &GridItem_Pattern_GUID, UIA_GridItemPatternId }, + { &MultipleView_Pattern_GUID, UIA_MultipleViewPatternId }, + { &Window_Pattern_GUID, UIA_WindowPatternId }, + { &SelectionItem_Pattern_GUID, UIA_SelectionItemPatternId }, + { &Dock_Pattern_GUID, UIA_DockPatternId }, + { &Table_Pattern_GUID, UIA_TablePatternId }, + { &TableItem_Pattern_GUID, UIA_TableItemPatternId }, + { &Text_Pattern_GUID, UIA_TextPatternId }, + { &Toggle_Pattern_GUID, UIA_TogglePatternId }, + { &Transform_Pattern_GUID, UIA_TransformPatternId }, + { &ScrollItem_Pattern_GUID, UIA_ScrollItemPatternId }, + { &LegacyIAccessible_Pattern_GUID, UIA_LegacyIAccessiblePatternId }, + { &ItemContainer_Pattern_GUID, UIA_ItemContainerPatternId }, + { &VirtualizedItem_Pattern_GUID, UIA_VirtualizedItemPatternId }, + { &SynchronizedInput_Pattern_GUID, UIA_SynchronizedInputPatternId }, + /* Implemented on Win8+ */ + { &ObjectModel_Pattern_GUID, UIA_ObjectModelPatternId }, + { &Annotation_Pattern_GUID, UIA_AnnotationPatternId }, + { &Text_Pattern2_GUID, UIA_TextPattern2Id }, + { &Styles_Pattern_GUID, UIA_StylesPatternId }, + { &Spreadsheet_Pattern_GUID, UIA_SpreadsheetPatternId }, + { &SpreadsheetItem_Pattern_GUID, UIA_SpreadsheetItemPatternId }, + { &Tranform_Pattern2_GUID, UIA_TransformPattern2Id }, + { &TextChild_Pattern_GUID, UIA_TextChildPatternId }, + { &Drag_Pattern_GUID, UIA_DragPatternId }, + { &DropTarget_Pattern_GUID, UIA_DropTargetPatternId }, + { &TextEdit_Pattern_GUID, UIA_TextEditPatternId }, + /* Implemented on Win10+. */ + { &CustomNavigation_Pattern_GUID, UIA_CustomNavigationPatternId }, +}; + static void test_UiaLookupId(void) { static const struct { @@ -4074,6 +4113,7 @@ static void test_UiaLookupId(void) { { "property", AutomationIdentifierType_Property, uia_property_lookup_ids, ARRAY_SIZE(uia_property_lookup_ids) }, { "event", AutomationIdentifierType_Event, uia_event_lookup_ids, ARRAY_SIZE(uia_event_lookup_ids) }, + { "pattern", AutomationIdentifierType_Pattern, uia_pattern_lookup_ids, ARRAY_SIZE(uia_pattern_lookup_ids) }, }; unsigned int i, y;
diff --git a/dlls/uiautomationcore/uia_classes.idl b/dlls/uiautomationcore/uia_classes.idl index ace1c12e70c..9954b465f90 100644 --- a/dlls/uiautomationcore/uia_classes.idl +++ b/dlls/uiautomationcore/uia_classes.idl @@ -33,6 +33,12 @@ struct uia_event_info { int event_arg_type; };
+struct uia_pattern_info { + const GUID *guid; + int pattern_id; + const GUID *pattern_iid; +}; + [ version(1.0), uuid(8a9ca8eb-856b-43d9-abd7-4a590054064f), diff --git a/dlls/uiautomationcore/uia_ids.c b/dlls/uiautomationcore/uia_ids.c index c1e51c51ca3..a3f414110d0 100644 --- a/dlls/uiautomationcore/uia_ids.c +++ b/dlls/uiautomationcore/uia_ids.c @@ -37,6 +37,13 @@ static int __cdecl uia_event_guid_compare(const void *a, const void *b) return memcmp(guid, event->guid, sizeof(*guid)); }
+static int __cdecl uia_pattern_guid_compare(const void *a, const void *b) +{ + const GUID *guid = a; + const struct uia_pattern_info *pattern = b; + return memcmp(guid, pattern->guid, sizeof(*guid)); +} + /* Sorted by GUID. */ static const struct uia_prop_info default_uia_properties[] = { { &AutomationId_Property_GUID, UIA_AutomationIdPropertyId, @@ -402,6 +409,89 @@ static const struct uia_event_info *uia_event_info_from_guid(const GUID *guid) return NULL; }
+/* Sorted by GUID. */ +static const struct uia_pattern_info default_uia_patterns[] = { + { &ScrollItem_Pattern_GUID, UIA_ScrollItemPatternId, + &IID_IScrollItemProvider, }, + { &Tranform_Pattern2_GUID, UIA_TransformPattern2Id, + &IID_ITransformProvider2, }, + { &ItemContainer_Pattern_GUID, UIA_ItemContainerPatternId, + &IID_IItemContainerProvider, }, + { &Drag_Pattern_GUID, UIA_DragPatternId, + &IID_IDragProvider, }, + { &Window_Pattern_GUID, UIA_WindowPatternId, + &IID_IWindowProvider, }, + { &VirtualizedItem_Pattern_GUID, UIA_VirtualizedItemPatternId, + &IID_IVirtualizedItemProvider, }, + { &Dock_Pattern_GUID, UIA_DockPatternId, + &IID_IDockProvider, }, + { &Styles_Pattern_GUID, UIA_StylesPatternId, + &IID_IStylesProvider, }, + { &DropTarget_Pattern_GUID, UIA_DropTargetPatternId, + &IID_IDropTargetProvider, }, + { &Text_Pattern_GUID, UIA_TextPatternId, + &IID_ITextProvider, }, + { &Toggle_Pattern_GUID, UIA_TogglePatternId, + &IID_IToggleProvider, }, + { &GridItem_Pattern_GUID, UIA_GridItemPatternId, + &IID_IGridItemProvider, }, + { &RangeValue_Pattern_GUID, UIA_RangeValuePatternId, + &IID_IRangeValueProvider, }, + { &TextEdit_Pattern_GUID, UIA_TextEditPatternId, + &IID_ITextEditProvider, }, + { &CustomNavigation_Pattern_GUID, UIA_CustomNavigationPatternId, + &IID_ICustomNavigationProvider, }, + { &Table_Pattern_GUID, UIA_TablePatternId, + &IID_ITableProvider, }, + { &Value_Pattern_GUID, UIA_ValuePatternId, + &IID_IValueProvider, }, + { &LegacyIAccessible_Pattern_GUID, UIA_LegacyIAccessiblePatternId, + &IID_ILegacyIAccessibleProvider, }, + { &Text_Pattern2_GUID, UIA_TextPattern2Id, + &IID_ITextProvider2, }, + { &ExpandCollapse_Pattern_GUID, UIA_ExpandCollapsePatternId, + &IID_IExpandCollapseProvider, }, + { &SynchronizedInput_Pattern_GUID, UIA_SynchronizedInputPatternId, + &IID_ISynchronizedInputProvider, }, + { &Scroll_Pattern_GUID, UIA_ScrollPatternId, + &IID_IScrollProvider, }, + { &TextChild_Pattern_GUID, UIA_TextChildPatternId, + &IID_ITextChildProvider, }, + { &TableItem_Pattern_GUID, UIA_TableItemPatternId, + &IID_ITableItemProvider, }, + { &Spreadsheet_Pattern_GUID, UIA_SpreadsheetPatternId, + &IID_ISpreadsheetProvider, }, + { &Grid_Pattern_GUID, UIA_GridPatternId, + &IID_IGridProvider, }, + { &Annotation_Pattern_GUID, UIA_AnnotationPatternId, + &IID_IAnnotationProvider, }, + { &Transform_Pattern_GUID, UIA_TransformPatternId, + &IID_ITransformProvider, }, + { &MultipleView_Pattern_GUID, UIA_MultipleViewPatternId, + &IID_IMultipleViewProvider, }, + { &Selection_Pattern_GUID, UIA_SelectionPatternId, + &IID_ISelectionProvider, }, + { &SelectionItem_Pattern_GUID, UIA_SelectionItemPatternId, + &IID_ISelectionItemProvider, }, + { &Invoke_Pattern_GUID, UIA_InvokePatternId, + &IID_IInvokeProvider, }, + { &ObjectModel_Pattern_GUID, UIA_ObjectModelPatternId, + &IID_IObjectModelProvider, }, + { &SpreadsheetItem_Pattern_GUID, UIA_SpreadsheetItemPatternId, + &IID_ISpreadsheetItemProvider, }, +}; + +static const struct uia_pattern_info *uia_pattern_info_from_guid(const GUID *guid) +{ + struct uia_pattern_info *pattern; + + if ((pattern = bsearch(guid, default_uia_patterns, ARRAY_SIZE(default_uia_patterns), sizeof(*pattern), + uia_pattern_guid_compare))) + return pattern; + + return NULL; +} + /*********************************************************************** * UiaLookupId (uiautomationcore.@) */ @@ -438,6 +528,17 @@ int WINAPI UiaLookupId(enum AutomationIdentifierType type, const GUID *guid) }
case AutomationIdentifierType_Pattern: + { + const struct uia_pattern_info *pattern = uia_pattern_info_from_guid(guid); + + if (pattern) + ret_id = pattern->pattern_id; + else + FIXME("Failed to find patternId for GUID %s\n", debugstr_guid(guid)); + + break; + } + case AutomationIdentifierType_ControlType: case AutomationIdentifierType_TextAttribute: case AutomationIdentifierType_LandmarkType: diff --git a/include/uiautomationcoreapi.h b/include/uiautomationcoreapi.h index 52a8e596325..ccffb1cc23b 100644 --- a/include/uiautomationcoreapi.h +++ b/include/uiautomationcoreapi.h @@ -261,6 +261,44 @@ DEFINE_GUID(TextEdit_ConversionTargetChanged_Event_GUID, 0x3388c18 DEFINE_GUID(Changes_Event_GUID, 0x7df26714,0x614f,0x4e05,0x94,0x88,0x71,0x6c,0x5b,0xa1,0x94,0x36); DEFINE_GUID(Notification_Event_GUID, 0x72c5a2f7,0x9788,0x480f,0xb8,0xeb,0x4d,0xee,0x00,0xf6,0x18,0x6f);
+/* + * AutomationIdentifierType_Pattern GUIDs. + */ +DEFINE_GUID(Invoke_Pattern_GUID, 0xd976c2fc,0x66ea,0x4a6e,0xb2,0x8f,0xc2,0x4c,0x75,0x46,0xad,0x37); +DEFINE_GUID(Selection_Pattern_GUID, 0x66e3b7e8,0xd821,0x4d25,0x87,0x61,0x43,0x5d,0x2c,0x8b,0x25,0x3f); +DEFINE_GUID(Value_Pattern_GUID, 0x17faad9e,0xc877,0x475b,0xb9,0x33,0x77,0x33,0x27,0x79,0xb6,0x37); +DEFINE_GUID(RangeValue_Pattern_GUID, 0x18b00d87,0xb1c9,0x476a,0xbf,0xbd,0x5f,0x0b,0xdb,0x92,0x6f,0x63); +DEFINE_GUID(Scroll_Pattern_GUID, 0x895fa4b4,0x759d,0x4c50,0x8e,0x15,0x03,0x46,0x06,0x72,0x00,0x3c); +DEFINE_GUID(ExpandCollapse_Pattern_GUID, 0xae05efa2,0xf9d1,0x428a,0x83,0x4c,0x53,0xa5,0xc5,0x2f,0x9b,0x8b); +DEFINE_GUID(Grid_Pattern_GUID, 0x260a2ccb,0x93a8,0x4e44,0xa4,0xc1,0x3d,0xf3,0x97,0xf2,0xb0,0x2b); +DEFINE_GUID(GridItem_Pattern_GUID, 0xf2d5c877,0xa462,0x4957,0xa2,0xa5,0x2c,0x96,0xb3,0x03,0xbc,0x63); +DEFINE_GUID(MultipleView_Pattern_GUID, 0x547a6ae4,0x113f,0x47c4,0x85,0x0f,0xdb,0x4d,0xfa,0x46,0x6b,0x1d); +DEFINE_GUID(Window_Pattern_GUID, 0x27901735,0xc760,0x4994,0xad,0x11,0x59,0x19,0xe6,0x06,0xb1,0x10); +DEFINE_GUID(SelectionItem_Pattern_GUID, 0x9bc64eeb,0x87c7,0x4b28,0x94,0xbb,0x4d,0x9f,0xa4,0x37,0xb6,0xef); +DEFINE_GUID(Dock_Pattern_GUID, 0x9cbaa846,0x83c8,0x428d,0x82,0x7f,0x7e,0x60,0x63,0xfe,0x06,0x20); +DEFINE_GUID(Table_Pattern_GUID, 0xc415218e,0xa028,0x461e,0xaa,0x92,0x8f,0x92,0x5c,0xf7,0x93,0x51); +DEFINE_GUID(TableItem_Pattern_GUID, 0xdf1343bd,0x1888,0x4a29,0xa5,0x0c,0xb9,0x2e,0x6d,0xe3,0x7f,0x6f); +DEFINE_GUID(Text_Pattern_GUID, 0x8615f05d,0x7de5,0x44fd,0xa6,0x79,0x2c,0xa4,0xb4,0x60,0x33,0xa8); +DEFINE_GUID(Toggle_Pattern_GUID, 0x0b419760,0xe2f4,0x43ff,0x8c,0x5f,0x94,0x57,0xc8,0x2b,0x56,0xe9); +DEFINE_GUID(Transform_Pattern_GUID, 0x24b46fdb,0x587e,0x49f1,0x9c,0x4a,0xd8,0xe9,0x8b,0x66,0x4b,0x7b); +DEFINE_GUID(ScrollItem_Pattern_GUID, 0x4591d005,0xa803,0x4d5c,0xb4,0xd5,0x8d,0x28,0x00,0xf9,0x06,0xa7); +DEFINE_GUID(LegacyIAccessible_Pattern_GUID, 0x54cc0a9f,0x3395,0x48af,0xba,0x8d,0x73,0xf8,0x56,0x90,0xf3,0xe0); +DEFINE_GUID(ItemContainer_Pattern_GUID, 0x3d13da0f,0x8b9a,0x4a99,0x85,0xfa,0xc5,0xc9,0xa6,0x9f,0x1e,0xd4); +DEFINE_GUID(VirtualizedItem_Pattern_GUID, 0xf510173e,0x2e71,0x45e9,0xa6,0xe5,0x62,0xf6,0xed,0x82,0x89,0xd5); +DEFINE_GUID(SynchronizedInput_Pattern_GUID, 0x05c288a6,0xc47b,0x488b,0xb6,0x53,0x33,0x97,0x7a,0x55,0x1b,0x8b); +DEFINE_GUID(ObjectModel_Pattern_GUID, 0x3e04acfe,0x08fc,0x47ec,0x96,0xbc,0x35,0x3f,0xa3,0xb3,0x4a,0xa7); +DEFINE_GUID(Annotation_Pattern_GUID, 0xf6c72ad7,0x356c,0x4850,0x92,0x91,0x31,0x6f,0x60,0x8a,0x8c,0x84); +DEFINE_GUID(Text_Pattern2_GUID, 0x498479a2,0x5b22,0x448d,0xb6,0xe4,0x64,0x74,0x90,0x86,0x06,0x98); +DEFINE_GUID(Styles_Pattern_GUID, 0x1ae62655,0xda72,0x4d60,0xa1,0x53,0xe5,0xaa,0x69,0x88,0xe3,0xbf); +DEFINE_GUID(Spreadsheet_Pattern_GUID, 0x6a5b24c9,0x9d1e,0x4b85,0x9e,0x44,0xc0,0x2e,0x31,0x69,0xb1,0x0b); +DEFINE_GUID(SpreadsheetItem_Pattern_GUID, 0x32cf83ff,0xf1a8,0x4a8c,0x86,0x58,0xd4,0x7b,0xa7,0x4e,0x20,0xba); +DEFINE_GUID(Tranform_Pattern2_GUID, 0x8afcfd07,0xa369,0x44de,0x98,0x8b,0x2f,0x7f,0xf4,0x9f,0xb8,0xa8); +DEFINE_GUID(TextChild_Pattern_GUID, 0x7533cab7,0x3bfe,0x41ef,0x9e,0x85,0xe2,0x63,0x8c,0xbe,0x16,0x9e); +DEFINE_GUID(Drag_Pattern_GUID, 0xc0bee21f,0xccb3,0x4fed,0x99,0x5b,0x11,0x4f,0x6e,0x3d,0x27,0x28); +DEFINE_GUID(DropTarget_Pattern_GUID, 0x0bcbec56,0xbd34,0x4b7b,0x9f,0xd5,0x26,0x59,0x90,0x5e,0xa3,0xdc); +DEFINE_GUID(TextEdit_Pattern_GUID, 0x69f3ff89,0x5af9,0x4c75,0x93,0x40,0xf2,0xde,0x29,0x2e,0x45,0x91); +DEFINE_GUID(CustomNavigation_Pattern_GUID, 0xafea938a,0x621e,0x4054,0xbb,0x2c,0x2f,0x46,0x11,0x4d,0xac,0x3f); + enum AutomationIdentifierType { AutomationIdentifierType_Property,
This merge request was approved by Esme Povirk.