Documentation
¶
Overview ¶
Package uia is the accessibility bridge of Windows (SPEC §25.11): it mirrors the framework's semantics tree as UI Automation providers, so that Narrator, NVDA, JAWS and Accessibility Insights can read the app and act on it. The bridge is off until the first WM_GETOBJECT that asks a window for its UI Automation provider.
The model of the trees, the mapping of roles, flags and actions to control types, properties and patterns, the Text pattern's ranges, the on/off state and the translation of changes into events and of requests into actions (Core) are plain Go, tested on any host. The COM objects that Go makes for the providers, the thunks for the methods that take a double, and the Bridge that is a platform.Accessibility are *_windows.go. Sub-packages: callshim (calls a method with doubles, for tests), semtree (builds semantics updates for tests) and uiatest (the UI Automation client of the tests).
Flutter: shell/platform/windows/accessibility_bridge_windows.cc AccessibilityBridgeWindows
Index ¶
- Constants
- Variables
- func AutomationID(n *Node) string
- func ByteOffset(s string, utf16Offset int) int
- func CompareEndpoints(a TextRange, ea int, b TextRange, eb int) int
- func HelpText(n *Node) string
- func RootRuntimeID() []int32
- func RuntimeID(id int) []int32
- func UTF16Len(s string) int
- func UTF16Offset(s string, byteOffset int) int
- type Change
- type ChangeKind
- type ControlType
- type Core
- func (c *Core) Ask(objectID int32) bool
- func (c *Core) ClientRect(view ui.ViewID) (x, y, width, height float64, ok bool)
- func (c *Core) Close()
- func (c *Core) HWND(view ui.ViewID) uintptr
- func (c *Core) On() bool
- func (c *Core) Perform(events []ui.SemanticsActionEvent)
- func (c *Core) Read(fn func(m *Model))
- func (c *Core) RemoveView(view ui.ViewID)
- func (c *Core) Request(fn func(m *Model) ([]ui.SemanticsActionEvent, Status)) Status
- func (c *Core) SetWindow(view ui.ViewID, title string, active bool)
- func (c *Core) Start(host platform.AccessibilityHost)
- func (c *Core) UpdateSemantics(view ui.ViewID, update *ui.SemanticsUpdate)
- type Enable
- type EventID
- type EventSink
- type Interface
- type Model
- func (m *Model) Active(view ui.ViewID) bool
- func (m *Model) AddToSelection(ref NodeRef) ([]ui.SemanticsActionEvent, Status)
- func (m *Model) Apply(view ui.ViewID, update *ui.SemanticsUpdate) []Change
- func (m *Model) Children(n *Node) []NodeRef
- func (m *Model) Collapse(ref NodeRef) ([]ui.SemanticsActionEvent, Status)
- func (m *Model) Expand(ref NodeRef) ([]ui.SemanticsActionEvent, Status)
- func (m *Model) Extents(n *Node) Rect
- func (m *Model) Focus(ref NodeRef) ([]ui.SemanticsActionEvent, Status)
- func (m *Model) Focused(view ui.ViewID) *Node
- func (m *Model) HitTest(n *Node, x, y float64) *Node
- func (m *Model) Invoke(ref NodeRef) ([]ui.SemanticsActionEvent, Status)
- func (m *Model) Name(n *Node) string
- func (m *Model) Node(ref NodeRef) *Node
- func (m *Model) ParentOf(n *Node) *Node
- func (m *Model) Patterns(n *Node) PatternSet
- func (m *Model) Property(n *Node, id PropertyID) Value
- func (m *Model) RemoveFromSelection(ref NodeRef) ([]ui.SemanticsActionEvent, Status)
- func (m *Model) RemoveView(view ui.ViewID) []Change
- func (m *Model) Root(view ui.ViewID) *Node
- func (m *Model) ScreenRect(n *Node, originX, originY float64) Rect
- func (m *Model) Scroll(ref NodeRef, horizontal, vertical int) ([]ui.SemanticsActionEvent, Status)
- func (m *Model) Select(ref NodeRef) ([]ui.SemanticsActionEvent, Status)
- func (m *Model) SelectRange(ref NodeRef, r TextRange) (events []ui.SemanticsActionEvent, st Status)
- func (m *Model) SelectedChildren(n *Node) []NodeRef
- func (m *Model) SelectionContainer(n *Node) *Node
- func (m *Model) SetRangeValue(ref NodeRef, want float64) ([]ui.SemanticsActionEvent, Status)
- func (m *Model) SetScrollPercent(ref NodeRef, horizontal, vertical float64) ([]ui.SemanticsActionEvent, Status)
- func (m *Model) SetValue(ref NodeRef, text string) ([]ui.SemanticsActionEvent, Status)
- func (m *Model) SetWindow(view ui.ViewID, title string, active bool) []Change
- func (m *Model) ShowOnScreen(ref NodeRef) ([]ui.SemanticsActionEvent, Status)
- func (m *Model) Sibling(n *Node, delta int) *Node
- func (m *Model) Title(view ui.ViewID) string
- func (m *Model) Toggle(ref NodeRef) ([]ui.SemanticsActionEvent, Status)
- func (m *Model) Views() []ui.ViewID
- type Node
- type NodeRef
- type PatternID
- type PatternSet
- type PropertyID
- type Rect
- type Status
- type Text
- func (t Text) Clamp(r TextRange) TextRange
- func (t Text) Document() TextRange
- func (t Text) Expand(r TextRange, unit int) TextRange
- func (t Text) Find(r TextRange, needle string, backward, ignoreCase bool) (TextRange, bool)
- func (t Text) Len() int
- func (t Text) Move(r TextRange, unit, count int) (TextRange, int)
- func (t Text) MoveEndpoint(r TextRange, endpoint, unit, count int) (TextRange, int)
- func (t Text) Substring(r TextRange, maxLength int) string
- type TextRange
- type Value
- type ValueKind
- type Window
Constants ¶
const ( // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc NavigateParent = 0 // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc NavigateNextSibling = 1 // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc NavigatePreviousSibling = 2 // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc NavigateFirstChild = 3 // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc NavigateLastChild = 4 )
The directions of IRawElementProviderFragment::Navigate (NavigateDirection).
const ( // ProviderServerSide is ProviderOptions_ServerSideProvider. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc ProviderServerSide = 0x2 // ProviderUseCOMThreading is ProviderOptions_UseComThreading. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc ProviderUseCOMThreading = 0x20 )
The options of a provider (ProviderOptions), a bit set.
const ( // StructureChildAdded is StructureChangeType_ChildAdded. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc StructureChildAdded = 0 // StructureChildRemoved is StructureChangeType_ChildRemoved. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc StructureChildRemoved = 1 // StructureChildrenInvalidated is StructureChangeType_ChildrenInvalidated. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc StructureChildrenInvalidated = 2 // StructureChildrenReordered is StructureChangeType_ChildrenReordered. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc StructureChildrenReordered = 5 )
The kinds of change of the tree (StructureChangeType).
const ( // ToggleOff is ToggleState_Off. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc ToggleOff = 0 // ToggleOn is ToggleState_On. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc ToggleOn = 1 // ToggleIndeterminate is ToggleState_Indeterminate. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc ToggleIndeterminate = 2 )
The states of the Toggle pattern (ToggleState).
const ( // ExpandCollapseCollapsed is ExpandCollapseState_Collapsed. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc ExpandCollapseCollapsed = 0 // ExpandCollapseExpanded is ExpandCollapseState_Expanded. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc ExpandCollapseExpanded = 1 // ExpandCollapseLeafNode is ExpandCollapseState_LeafNode. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc ExpandCollapseLeafNode = 3 )
The states of the ExpandCollapse pattern (ExpandCollapseState).
const ( // ScrollLargeDecrement is ScrollAmount_LargeDecrement. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc ScrollLargeDecrement = 0 // ScrollSmallDecrement is ScrollAmount_SmallDecrement. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc ScrollSmallDecrement = 1 // ScrollNoAmount is ScrollAmount_NoAmount. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc ScrollNoAmount = 2 // ScrollLargeIncrement is ScrollAmount_LargeIncrement. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc ScrollLargeIncrement = 3 // ScrollSmallIncrement is ScrollAmount_SmallIncrement. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc ScrollSmallIncrement = 4 )
The amounts of the Scroll pattern (ScrollAmount).
const ( // TextUnitCharacter is TextUnit_Character. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_textrangeprovider_win.cc TextUnitCharacter = 0 // TextUnitFormat is TextUnit_Format. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_textrangeprovider_win.cc TextUnitFormat = 1 // TextUnitWord is TextUnit_Word. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_textrangeprovider_win.cc TextUnitWord = 2 // TextUnitLine is TextUnit_Line. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_textrangeprovider_win.cc TextUnitLine = 3 // TextUnitParagraph is TextUnit_Paragraph. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_textrangeprovider_win.cc TextUnitParagraph = 4 // TextUnitPage is TextUnit_Page. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_textrangeprovider_win.cc TextUnitPage = 5 // TextUnitDocument is TextUnit_Document. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_textrangeprovider_win.cc TextUnitDocument = 6 )
The units of text (TextUnit).
const ( // EndpointStart is TextPatternRangeEndpoint_Start. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_textrangeprovider_win.cc EndpointStart = 0 // EndpointEnd is TextPatternRangeEndpoint_End. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_textrangeprovider_win.cc EndpointEnd = 1 )
The ends of a text range (TextPatternRangeEndpoint).
const ( // LiveOff is LiveSetting Off. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc LiveOff = 0 // LivePolite is LiveSetting Polite. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc LivePolite = 1 )
The live settings of an element (LiveSetting).
const ( // ErrElementNotEnabled is UIA_E_ELEMENTNOTENABLED: the element is disabled. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc ErrElementNotEnabled uint32 = 0x80040200 // ErrElementNotAvailable is UIA_E_ELEMENTNOTAVAILABLE: the element is gone. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc ErrElementNotAvailable uint32 = 0x80040201 // ErrNotSupported is UIA_E_NOTSUPPORTED: the element does not support the operation. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc ErrNotSupported uint32 = 0x80040204 // ErrInvalidOperation is UIA_E_INVALIDOPERATION. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc ErrInvalidOperation uint32 = 0x80131509 )
The results that a provider answers besides S_OK, E_NOTIMPL and E_FAIL, as the unsigned numbers that the headers write.
const AppendRuntimeID = 3
AppendRuntimeID is UiaAppendRuntimeId: the first number of a runtime ID that UI Automation completes with the identity of the window.
Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc
const FragmentRootID = -1
FragmentRootID is the ID that names the fragment root of a window (not a node of the semantics tree) in a NodeRef.
Flutter: third_party/accessibility/ax/platform/ax_fragment_root_win.cc AXFragmentRootWin
const NoScroll = -1.0
NoScroll is UIA_ScrollPatternNoScroll: the scroll percentage of an axis on which the node does not scroll.
Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc AXPlatformNodeWin::get_HorizontalScrollPercent
const RootID = 0
RootID is the ID of the root node of the semantics tree of a view.
const RootObjectID int32 = -25
RootObjectID is UiaRootObjectId, the object ID of the WM_GETOBJECT with which a client asks for the UI Automation provider of a window.
Flutter: shell/platform/windows/flutter_window.cc
const SupportedTextSelectionSingle = 1
SupportedTextSelectionSingle is SupportedTextSelection_Single: a text field has one selection.
Flutter: third_party/accessibility/ax/platform/ax_platform_node_textprovider_win.cc
Variables ¶
var ( // IfaceSimple is IRawElementProviderSimple. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc AXPlatformNodeWin IfaceSimple = Interface{"IRawElementProviderSimple", win32.MustParseGUID("{d6dd68d1-86fd-4332-8666-9abedea2d24c}"), []string{"get_ProviderOptions", "GetPatternProvider", "GetPropertyValue", "get_HostRawElementProvider"}} // IfaceFragment is IRawElementProviderFragment. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc AXPlatformNodeWin IfaceFragment = Interface{"IRawElementProviderFragment", win32.MustParseGUID("{f7063da8-8359-439c-9297-bbc5299a7d87}"), []string{"Navigate", "GetRuntimeId", "get_BoundingRectangle", "GetEmbeddedFragmentRoots", "SetFocus", "get_FragmentRoot"}} // IfaceFragmentRoot is IRawElementProviderFragmentRoot. // // Flutter: third_party/accessibility/ax/platform/ax_fragment_root_win.cc AXFragmentRootWin IfaceFragmentRoot = Interface{"IRawElementProviderFragmentRoot", win32.MustParseGUID("{620ce2a5-ab8f-40a9-86cb-de3c75599b58}"), []string{"ElementProviderFromPoint", "GetFocus"}} // IfaceInvoke is IInvokeProvider. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc AXPlatformNodeWin IfaceInvoke = Interface{"IInvokeProvider", win32.MustParseGUID("{54fcb24b-e18e-47a2-b4d3-eccbe77599a2}"), []string{"Invoke"}} // IfaceToggle is IToggleProvider. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc AXPlatformNodeWin IfaceToggle = Interface{"IToggleProvider", win32.MustParseGUID("{56d00bd0-c4f4-433c-a836-1a52a57e0892}"), []string{"Toggle", "get_ToggleState"}} // IfaceValue is IValueProvider. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc AXPlatformNodeWin IfaceValue = Interface{"IValueProvider", win32.MustParseGUID("{c7935180-6fb3-4201-b174-7df73adbf64a}"), []string{"SetValue", "get_Value", "get_IsReadOnly"}} // IfaceRangeValue is IRangeValueProvider. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc AXPlatformNodeWin IfaceRangeValue = Interface{"IRangeValueProvider", win32.MustParseGUID("{36dc7aef-33e6-4691-afe1-2be7274b3d33}"), []string{"SetValue", "get_Value", "get_IsReadOnly", "get_Maximum", "get_Minimum", "get_LargeChange", "get_SmallChange"}} // IfaceScroll is IScrollProvider. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc AXPlatformNodeWin IfaceScroll = Interface{"IScrollProvider", win32.MustParseGUID("{b38b8077-1fc3-42a5-8cae-d40c2215055a}"), []string{"Scroll", "SetScrollPercent", "get_HorizontalScrollPercent", "get_VerticalScrollPercent", "get_HorizontalViewSize", "get_VerticalViewSize", "get_HorizontallyScrollable", "get_VerticallyScrollable"}} // IfaceExpandCollapse is IExpandCollapseProvider. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc AXPlatformNodeWin IfaceExpandCollapse = Interface{"IExpandCollapseProvider", win32.MustParseGUID("{d847d3a5-cab0-4a98-8c32-ecb45c59ad24}"), []string{"Expand", "Collapse", "get_ExpandCollapseState"}} // IfaceSelection is ISelectionProvider. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc AXPlatformNodeWin IfaceSelection = Interface{"ISelectionProvider", win32.MustParseGUID("{fb8b03af-3bdf-48d4-bd36-1a65793be168}"), []string{"GetSelection", "get_CanSelectMultiple", "get_IsSelectionRequired"}} // IfaceSelectionItem is ISelectionItemProvider. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc AXPlatformNodeWin IfaceSelectionItem = Interface{"ISelectionItemProvider", win32.MustParseGUID("{2acad808-b2d4-452d-a407-91ff1ad167b2}"), []string{"Select", "AddToSelection", "RemoveFromSelection", "get_IsSelected", "get_SelectionContainer"}} // IfaceText is ITextProvider. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_textprovider_win.cc AXPlatformNodeTextProviderWin IfaceText = Interface{"ITextProvider", win32.MustParseGUID("{3589c92c-63f3-4367-99bb-ada653b77cf2}"), []string{"GetSelection", "GetVisibleRanges", "RangeFromChild", "RangeFromPoint", "get_DocumentRange", "get_SupportedTextSelection"}} // IfaceTextRange is ITextRangeProvider. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_textrangeprovider_win.cc AXPlatformNodeTextRangeProviderWin IfaceTextRange = Interface{"ITextRangeProvider", win32.MustParseGUID("{5347ad7b-c355-46f8-aff5-909033582f63}"), []string{"Clone", "Compare", "CompareEndpoints", "ExpandToEnclosingUnit", "FindAttribute", "FindText", "GetAttributeValue", "GetBoundingRectangles", "GetEnclosingElement", "GetText", "Move", "MoveEndpointByUnit", "MoveEndpointByRange", "Select", "AddToSelection", "RemoveFromSelection", "ScrollIntoView", "GetChildren"}} )
The interfaces.
var Interfaces = []Interface{ IfaceSimple, IfaceFragment, IfaceFragmentRoot, IfaceInvoke, IfaceToggle, IfaceValue, IfaceRangeValue, IfaceScroll, IfaceExpandCollapse, IfaceSelection, IfaceSelectionItem, IfaceText, IfaceTextRange, }
Interfaces lists every interface the providers implement.
Flutter: no counterpart
Functions ¶
func AutomationID ¶
AutomationID is the identifier the app gave the node, or else the node's number.
Flutter: shell/platform/common/flutter_platform_node_delegate.cc FlutterPlatformNodeDelegate::GetStringAttribute
func ByteOffset ¶
ByteOffset is the byte offset in the UTF-8 text of the offset in UTF-16 units; one past the end is the end, and an offset in the middle of a surrogate pair is the start of the pair.
Flutter: no counterpart
func CompareEndpoints ¶
CompareEndpoints is ITextRangeProvider::CompareEndpoints: -1, 0 or 1 as the endpoint of a is before, at or after the endpoint of b.
Flutter: third_party/accessibility/ax/platform/ax_platform_node_textrangeprovider_win.cc AXPlatformNodeTextRangeProviderWin::CompareEndpoints
func HelpText ¶
HelpText is the tooltip of the node; a node that has a label shows its hint as help.
Flutter: shell/platform/common/flutter_platform_node_delegate.cc FlutterPlatformNodeDelegate::GetDescription
func RootRuntimeID ¶
func RootRuntimeID() []int32
RootRuntimeID is the runtime ID of the fragment root of a window.
Flutter: third_party/accessibility/ax/platform/ax_fragment_root_win.cc AXFragmentRootWin::GetRuntimeId
func RuntimeID ¶
RuntimeID is the runtime ID of a node: UiaAppendRuntimeId, which UI Automation completes with the identity of the window, then the node's number plus one (so that no number is 0).
Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc AXPlatformNodeWin::GetRuntimeId
func UTF16Offset ¶
UTF16Offset is the offset in UTF-16 units of the byte offset in the UTF-8 text. An offset outside the text is clamped; one in the middle of a character counts the character.
Flutter: no counterpart
Types ¶
type Change ¶
type Change struct {
Kind ChangeKind
Ref NodeRef
Structure int
Property PropertyID
Old, New Value
Action ui.SemanticsActionEvent
}
Change is one change that Apply or the window setters made.
Flutter: no counterpart
type ChangeKind ¶
type ChangeKind int
ChangeKind says what a Change is.
Flutter: no counterpart
const ( // ChangeNodeAdded: a node appeared, and its provider has to be made. // // Flutter: no counterpart ChangeNodeAdded ChangeKind = iota + 1 // ChangeNodeRemoved: a node went away, and its provider has to be disconnected. // // Flutter: no counterpart ChangeNodeRemoved // ChangeStructure: the children of Ref changed; Structure is the StructureChangeType to raise. // // Flutter: shell/windows accessibility_bridge_windows.cc kChildrenChanged ChangeStructure // ChangeProperty: the property Property of Ref changed from Old to New. // // Flutter: no counterpart ChangeProperty // ChangeFocus: Ref has the keyboard focus (the window is active). // // Flutter: shell/windows accessibility_bridge_windows.cc kFocus ChangeFocus // ChangeLiveRegion: the live region Ref changed. // // Flutter: shell/windows accessibility_bridge_windows.cc kLiveRegionChanged ChangeLiveRegion // ChangeTextChanged: the text of the field Ref changed. // // Flutter: shell/windows accessibility_bridge_windows.cc kTextChanged ChangeTextChanged // ChangeTextSelection: the caret or the selection of the field Ref changed. // // Flutter: shell/windows accessibility_bridge_windows.cc kDocumentSelectionChanged ChangeTextSelection // ChangeWindowOpened: the first tree of the view arrived, so the window of the view has content. // // Flutter: no counterpart ChangeWindowOpened // ChangeAction: the action Action has to be performed now (SetValue waited for it). // // Flutter: no counterpart ChangeAction )
The kinds of change.
type ControlType ¶
type ControlType int32
ControlType is a UIA_*ControlTypeId.
Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc
const ( // ControlTypeButton is UIA_ButtonControlTypeId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc ControlTypeButton ControlType = 50000 // ControlTypeCheckBox is UIA_CheckBoxControlTypeId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc ControlTypeCheckBox ControlType = 50002 // ControlTypeComboBox is UIA_ComboBoxControlTypeId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc ControlTypeComboBox ControlType = 50003 // ControlTypeEdit is UIA_EditControlTypeId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc ControlTypeEdit ControlType = 50004 // ControlTypeHyperlink is UIA_HyperlinkControlTypeId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc ControlTypeHyperlink ControlType = 50005 // ControlTypeImage is UIA_ImageControlTypeId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc ControlTypeImage ControlType = 50006 // ControlTypeListItem is UIA_ListItemControlTypeId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc ControlTypeListItem ControlType = 50007 // ControlTypeList is UIA_ListControlTypeId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc ControlTypeList ControlType = 50008 // ControlTypeMenu is UIA_MenuControlTypeId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc ControlTypeMenu ControlType = 50009 // ControlTypeMenuBar is UIA_MenuBarControlTypeId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc ControlTypeMenuBar ControlType = 50010 // ControlTypeMenuItem is UIA_MenuItemControlTypeId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc ControlTypeMenuItem ControlType = 50011 // ControlTypeProgressBar is UIA_ProgressBarControlTypeId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc ControlTypeProgressBar ControlType = 50012 // ControlTypeRadioButton is UIA_RadioButtonControlTypeId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc ControlTypeRadioButton ControlType = 50013 // ControlTypeScrollBar is UIA_ScrollBarControlTypeId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc ControlTypeScrollBar ControlType = 50014 // ControlTypeSlider is UIA_SliderControlTypeId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc ControlTypeSlider ControlType = 50015 // ControlTypeSpinner is UIA_SpinnerControlTypeId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc ControlTypeSpinner ControlType = 50016 // ControlTypeStatusBar is UIA_StatusBarControlTypeId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc ControlTypeStatusBar ControlType = 50017 // ControlTypeTab is UIA_TabControlTypeId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc ControlTypeTab ControlType = 50018 // ControlTypeTabItem is UIA_TabItemControlTypeId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc ControlTypeTabItem ControlType = 50019 // ControlTypeText is UIA_TextControlTypeId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc ControlTypeText ControlType = 50020 // ControlTypeToolBar is UIA_ToolBarControlTypeId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc ControlTypeToolBar ControlType = 50021 // ControlTypeToolTip is UIA_ToolTipControlTypeId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc ControlTypeToolTip ControlType = 50022 // ControlTypeTree is UIA_TreeControlTypeId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc ControlTypeTree ControlType = 50023 // ControlTypeTreeItem is UIA_TreeItemControlTypeId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc ControlTypeTreeItem ControlType = 50024 // ControlTypeCustom is UIA_CustomControlTypeId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc ControlTypeCustom ControlType = 50025 // ControlTypeGroup is UIA_GroupControlTypeId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc ControlTypeGroup ControlType = 50026 // ControlTypeThumb is UIA_ThumbControlTypeId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc ControlTypeThumb ControlType = 50027 // ControlTypeDataGrid is UIA_DataGridControlTypeId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc ControlTypeDataGrid ControlType = 50028 // ControlTypeDataItem is UIA_DataItemControlTypeId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc ControlTypeDataItem ControlType = 50029 // ControlTypeDocument is UIA_DocumentControlTypeId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc ControlTypeDocument ControlType = 50030 // ControlTypeSplitButton is UIA_SplitButtonControlTypeId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc ControlTypeSplitButton ControlType = 50031 // ControlTypeWindow is UIA_WindowControlTypeId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc ControlTypeWindow ControlType = 50032 // ControlTypePane is UIA_PaneControlTypeId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc ControlTypePane ControlType = 50033 // ControlTypeHeader is UIA_HeaderControlTypeId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc ControlTypeHeader ControlType = 50034 // ControlTypeHeaderItem is UIA_HeaderItemControlTypeId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc ControlTypeHeaderItem ControlType = 50035 // ControlTypeTable is UIA_TableControlTypeId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc ControlTypeTable ControlType = 50036 // ControlTypeTitleBar is UIA_TitleBarControlTypeId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc ControlTypeTitleBar ControlType = 50037 // ControlTypeSeparator is UIA_SeparatorControlTypeId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc ControlTypeSeparator ControlType = 50038 )
The control types (UIA_*ControlTypeId).
func ControlTypeOf ¶
func ControlTypeOf(n *Node) ControlType
ControlTypeOf is the control type of a node. The SemanticsRole decides when there is one; otherwise the flags do, in this order: text field, slider, link, header, image, then the buttons and the checkable nodes; what has text is a Text; the rest is a Group. The root of a view is a Pane.
Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc AXPlatformNodeWin::GetUIAControlType
type Core ¶
type Core struct {
// contains filtered or unexported fields
}
Core is the bridge without the COM glue: the model of the trees under a lock, the on/off state, and the translation of the changes of the trees into events and of the requests of patterns into the framework's actions. Its methods are safe from any goroutine: UI Automation may call the providers on the thread of a client, and the framework's calls come on the UI thread. A request only posts the action to the UI thread (a provider never touches the framework from another thread, SPEC §25.11).
Flutter: shell/platform/windows/accessibility_bridge_windows.cc AccessibilityBridgeWindows
func NewCore ¶
NewCore makes the core over the windows of the platform and the sink of the events.
Flutter: no counterpart
func (*Core) Ask ¶
Ask handles a WM_GETOBJECT (see Enable.Ask). The first one that is answered tells the engine to make the semantics tree; it must run on the UI thread, as the window procedure does.
Flutter: shell/platform/windows/flutter_windows_view.cc FlutterWindowsView::GetNativeViewAccessible
func (*Core) ClientRect ¶
ClientRect is the client area of the view's window on the screen, in physical pixels.
Flutter: no counterpart
func (*Core) Close ¶
func (c *Core) Close()
Close turns the bridge off: the engine is told to stop making the tree, the providers are dropped and the trees forgotten. It may be called twice.
Flutter: no counterpart
func (*Core) Perform ¶
func (c *Core) Perform(events []ui.SemanticsActionEvent)
Perform posts the actions to the UI thread, where the host gives them to the framework.
Flutter: shell/platform/windows/accessibility_bridge_windows.cc AccessibilityBridgeWindows::DispatchAccessibilityAction
func (*Core) Read ¶
Read runs fn on the model under the lock. fn must not call into UI Automation or the framework.
Flutter: no counterpart
func (*Core) RemoveView ¶
RemoveView forgets the tree of a view that was closed.
Flutter: no counterpart
func (*Core) Request ¶
Request runs a request of a pattern: fn works out the actions on the model under the lock, and they are posted to the UI thread. It returns the status.
Flutter: no counterpart
func (*Core) SetWindow ¶
SetWindow tells the title of the window of a view and whether it is active.
Flutter: no counterpart
func (*Core) Start ¶
func (c *Core) Start(host platform.AccessibilityHost)
Start gives the core the host, which it tells when the first client asks for the tree.
Flutter: no counterpart
func (*Core) UpdateSemantics ¶
func (c *Core) UpdateSemantics(view ui.ViewID, update *ui.SemanticsUpdate)
UpdateSemantics takes an update of a view's tree (platform.Accessibility).
Flutter: shell/platform/common/accessibility_bridge.cc AccessibilityBridge::UpdateSemantics
type Enable ¶
type Enable struct {
// contains filtered or unexported fields
}
Enable is the on/off state of the bridge (SPEC §25.11). The bridge starts off. The first WM_GETOBJECT that asks for the UI Automation provider of a window (the object ID UiaRootObjectId) turns it on, as Flutter's embedder does with its first WM_GETOBJECT: the engine then makes the semantics tree. It stays on for the life of the process, because a client that goes away cannot be told apart cheaply (events are raised only while UiaClientsAreListening). Close turns it off for good.
Flutter: shell/platform/windows/flutter_windows_view.cc FlutterWindowsView::GetNativeViewAccessible
func (*Enable) Ask ¶
Ask handles a WM_GETOBJECT with the object ID. It says whether the window answers with the provider (answer) and whether this ask turned the bridge on (turnedOn), in which case the caller tells the engine. An object ID other than UiaRootObjectId (the MSAA clients' OBJID_CLIENT, say) is not answered here: Windows' proxy answers it.
Flutter: shell/platform/windows/flutter_windows_view.cc FlutterWindowsView::GetNativeViewAccessible
func (*Enable) Close ¶
Close turns the bridge off for good. It says whether it was on, so that the caller tells the engine to stop making the tree.
Flutter: no counterpart
type EventID ¶
type EventID int32
EventID is a UIA_*EventId.
Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc
const ( // EventStructureChanged is UIA_StructureChangedEventId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc EventStructureChanged EventID = 20002 // EventAutomationPropertyChanged is UIA_AutomationPropertyChangedEventId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc EventAutomationPropertyChanged EventID = 20004 // EventAutomationFocusChanged is UIA_AutomationFocusChangedEventId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc EventAutomationFocusChanged EventID = 20005 // EventInvokeInvoked is UIA_Invoke_InvokedEventId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc EventInvokeInvoked EventID = 20009 // EventSelectionItemElementSelected is UIA_SelectionItem_ElementSelectedEventId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc EventSelectionItemElementSelected EventID = 20012 // EventSelectionInvalidated is UIA_Selection_InvalidatedEventId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc EventSelectionInvalidated EventID = 20013 // EventTextTextSelectionChanged is UIA_Text_TextSelectionChangedEventId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc EventTextTextSelectionChanged EventID = 20014 // EventTextTextChanged is UIA_Text_TextChangedEventId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc EventTextTextChanged EventID = 20015 // EventWindowWindowOpened is UIA_Window_WindowOpenedEventId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc EventWindowWindowOpened EventID = 20016 // EventWindowWindowClosed is UIA_Window_WindowClosedEventId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc EventWindowWindowClosed EventID = 20017 // EventLiveRegionChanged is UIA_LiveRegionChangedEventId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc EventLiveRegionChanged EventID = 20024 // EventSystemAlert is UIA_SystemAlertEventId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc EventSystemAlert EventID = 20023 // EventNotification is UIA_NotificationEventId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc EventNotification EventID = 20035 // EventLayoutInvalidated is UIA_LayoutInvalidatedEventId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc EventLayoutInvalidated EventID = 20008 // EventMenuOpened is UIA_MenuOpenedEventId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc EventMenuOpened EventID = 20003 // EventMenuClosed is UIA_MenuClosedEventId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc EventMenuClosed EventID = 20007 )
The events (UIA_*EventId).
type EventSink ¶
type EventSink interface {
// Listening says whether a client listens (UiaClientsAreListening). Events are not raised, and
// providers not made for them, while it is false.
Listening() bool
// Structure raises the structure-changed event of the node's children.
Structure(ref NodeRef, kind int)
// PropertyChanged raises the property-changed event.
PropertyChanged(ref NodeRef, id PropertyID, old, now Value)
// Automation raises a plain event (focus, live region, text).
Automation(ref NodeRef, id EventID)
// Disconnect drops the provider of a node that left the tree.
Disconnect(ref NodeRef)
}
EventSink is what the core raises UI Automation events through: the COM glue implements it with the functions of uiautomationcore, and the tests with a recorder. Its methods are called without the core's lock held, because raising an event can make UI Automation call the providers back at once.
Flutter: shell/platform/windows/accessibility_bridge_windows.cc AccessibilityBridgeWindows::DispatchWinAccessibilityEvent
type Interface ¶
type Interface struct {
// Name is the name in the header, such as "IRawElementProviderSimple" (its vtable is Name + "Vtbl").
Name string
// IID is the interface ID.
IID win32.GUID
// Methods are the names of the methods in the vtable, after IUnknown's.
Methods []string
}
Interface describes a COM interface of a provider.
Flutter: no counterpart
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model is the mirror of the semantics trees of the views of the app. Apply says what changed, and the bridge turns that into events. A Model is not safe for concurrent use; the bridge locks it.
Flutter: shell/platform/common/accessibility_bridge.cc AccessibilityBridge
func (*Model) Active ¶
Active says whether the window of the view has the focus.
Flutter: no counterpart
func (*Model) AddToSelection ¶
func (m *Model) AddToSelection(ref NodeRef) ([]ui.SemanticsActionEvent, Status)
AddToSelection is ISelectionItemProvider::AddToSelection, as Select (the selection is single).
Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc AXPlatformNodeWin::AddToSelection
func (*Model) Apply ¶
Apply takes an update of the tree of a view and returns what changed. Nodes that the update leaves unreachable from the root are removed, as the engine does.
Flutter: shell/platform/common/accessibility_bridge.cc AccessibilityBridge::CommitUpdates
func (*Model) Children ¶
Children are the refs of the children of the node, in traversal order; those that the tree does not have are left out.
Flutter: no counterpart
func (*Model) Collapse ¶
func (m *Model) Collapse(ref NodeRef) ([]ui.SemanticsActionEvent, Status)
Collapse is IExpandCollapseProvider::Collapse.
Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc AXPlatformNodeWin::Collapse
func (*Model) Expand ¶
func (m *Model) Expand(ref NodeRef) ([]ui.SemanticsActionEvent, Status)
Expand is IExpandCollapseProvider::Expand.
Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc AXPlatformNodeWin::Expand
func (*Model) Extents ¶
Extents is the rectangle of the node in the pixels of the client area of its window: the rectangle of the node in its own coordinates, moved by the transforms of the node and of its ancestors up to the root (whose transform has the device pixel ratio).
Flutter: shell/platform/common/flutter_platform_node_delegate.cc FlutterPlatformNodeDelegate::GetBoundsRect
func (*Model) Focus ¶
func (m *Model) Focus(ref NodeRef) ([]ui.SemanticsActionEvent, Status)
Focus is IRawElementProviderFragment::SetFocus: the framework focuses the node.
Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc AXPlatformNodeWin::SetFocus
func (*Model) Focused ¶
Focused returns the node of the view that has the keyboard focus, or nil. A window that is not active has none.
Flutter: shell/platform/common/accessibility_bridge.cc AccessibilityBridge::GetFocusedNode
func (*Model) HitTest ¶
HitTest is the deepest node under the point (in the pixels of the client area) that is under the node, or nil. A hidden node and its children are not hit; the last children are tried first, as they are on top.
Flutter: shell/platform/common/accessibility_bridge.cc AccessibilityBridge::GetHitTestedNode
func (*Model) Invoke ¶
func (m *Model) Invoke(ref NodeRef) ([]ui.SemanticsActionEvent, Status)
Invoke is IInvokeProvider::Invoke: the framework taps the node.
Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc AXPlatformNodeWin::Invoke
func (*Model) Name ¶
Name is the name of the node (the Name property): its label; the root has the title of the window when it has no label; a node with no label has its value, unless the value is shown by a pattern (a text field's text, a slider's value), and then its hint.
Flutter: shell/platform/common/flutter_platform_node_delegate.cc FlutterPlatformNodeDelegate::GetName
func (*Model) ParentOf ¶
ParentOf returns the parent of the node, or nil for the root.
Flutter: no counterpart
func (*Model) Patterns ¶
func (m *Model) Patterns(n *Node) PatternSet
Patterns are the patterns a node supports; its flags and actions say which:
Invoke the tap action, on a node that is not checkable, selectable, a text field or a slider Toggle a checked or toggled node that is not a radio button SelectionItem a radio button, or a node with a selected flag Selection a node with children that have a selected flag Value a text field RangeValue a slider, a spin button, a progress bar that says its value Scroll a node with scroll actions Text a text field ExpandCollapse a node with an expanded flag, or the expand or collapse action
Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc AXPlatformNodeWin::GetPatternProviderFactory
func (*Model) Property ¶
func (m *Model) Property(n *Node, id PropertyID) Value
Property is the value of a property of the node, as GetPropertyValue answers it. A property that the node has no value for is ValueEmpty, which UI Automation fills in with its default.
Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc AXPlatformNodeWin::GetPropertyValue
func (*Model) RemoveFromSelection ¶
func (m *Model) RemoveFromSelection(ref NodeRef) ([]ui.SemanticsActionEvent, Status)
RemoveFromSelection is ISelectionItemProvider::RemoveFromSelection: the framework taps a node that is selected.
Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc AXPlatformNodeWin::RemoveFromSelection
func (*Model) RemoveView ¶
RemoveView forgets the tree of a view that closed and says what that changed.
Flutter: no counterpart
func (*Model) Root ¶
Root returns the root node of the view, or nil while the view has no tree.
Flutter: no counterpart
func (*Model) ScreenRect ¶
ScreenRect is the rectangle of the node on the screen: Extents moved by the position of the client area of the window on the screen, in physical pixels (BoundingRectangle).
Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc AXPlatformNodeWin::get_BoundingRectangle
func (*Model) Scroll ¶
Scroll is IScrollProvider::Scroll: a vertical increment asks the framework for the scroll up action (the content moves up, which shows what is further down) and a decrement for scroll down; a horizontal increment is scroll left and a decrement scroll right, as TalkBack's forward and backward are in Flutter's Android embedder. A large amount and a small one are the same single action.
Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc AXPlatformNodeWin::Scroll
func (*Model) Select ¶
func (m *Model) Select(ref NodeRef) ([]ui.SemanticsActionEvent, Status)
Select is ISelectionItemProvider::Select: the framework taps the node when it is not selected.
Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc AXPlatformNodeWin::Select
func (*Model) SelectRange ¶
SelectRange is ITextRangeProvider::Select: the framework sets the selection of the field to the range (the set selection action, in bytes of the UTF-8 text).
Flutter: third_party/accessibility/ax/platform/ax_platform_node_textrangeprovider_win.cc AXPlatformNodeTextRangeProviderWin::Select
func (*Model) SelectedChildren ¶
SelectedChildren are the children of the node that are selected, in order.
Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc AXPlatformNodeWin::GetSelection
func (*Model) SelectionContainer ¶
SelectionContainer is the nearest ancestor of the node that has the Selection pattern, or nil.
Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc AXPlatformNodeWin::get_SelectionContainer
func (*Model) SetRangeValue ¶
SetRangeValue is IRangeValueProvider::SetValue: the framework is asked to take the value one step nearer to the one asked for, as the AT-SPI2 bridge does (a node can only increase and decrease, and a second request before the framework rebuilds would repeat the first).
Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc AXPlatformNodeWin::SetValue
func (*Model) SetScrollPercent ¶
func (m *Model) SetScrollPercent(ref NodeRef, horizontal, vertical float64) ([]ui.SemanticsActionEvent, Status)
SetScrollPercent is IScrollProvider::SetScrollPercent: the framework scrolls to the offset (the scroll to offset action, which the framework offers on a node that allows implicit scrolling). A percentage of NoScroll (-1) leaves an axis alone.
Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc AXPlatformNodeWin::SetScrollPercent
func (*Model) SetValue ¶
SetValue is IValueProvider::SetValue: the text of the field becomes text. The framework offers the action to set the text only while the field has the focus, so a field that has not got it is focused first and the text is set when the next update shows the action (Apply returns it as a ChangeAction).
Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc AXPlatformNodeWin::SetValue
func (*Model) SetWindow ¶
SetWindow sets the title and whether the window of the view has the focus. The title names the root. It says what that changed: the focus event of the node that has the focus when the window is activated.
Flutter: no counterpart
func (*Model) ShowOnScreen ¶
func (m *Model) ShowOnScreen(ref NodeRef) ([]ui.SemanticsActionEvent, Status)
ShowOnScreen is ITextRangeProvider::ScrollIntoView and IScrollItemProvider::ScrollIntoView: the framework shows the node on the screen.
Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc AXPlatformNodeWin::ScrollIntoView
func (*Model) Sibling ¶
Sibling returns the sibling of the node that comes next (delta 1) or before (delta -1) in its parent's children, or nil. The root has none.
Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc AXPlatformNodeWin::Navigate
type Node ¶
type Node struct {
ui.SemanticsNodeUpdate
// View is the view of the node.
View ui.ViewID
// Parent is the ID of the parent, or -1 for the root.
Parent int
}
Node is a node of the mirrored tree: what the framework last said about it.
Flutter: shell/platform/common/flutter_platform_node_delegate.cc FlutterPlatformNodeDelegate
type PatternID ¶
type PatternID int32
PatternID is a UIA_*PatternId.
Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc
const ( // PatternInvoke is UIA_InvokePatternId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc PatternInvoke PatternID = 10000 // PatternSelection is UIA_SelectionPatternId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc PatternSelection PatternID = 10001 // PatternValue is UIA_ValuePatternId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc PatternValue PatternID = 10002 // PatternRangeValue is UIA_RangeValuePatternId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc PatternRangeValue PatternID = 10003 // PatternScroll is UIA_ScrollPatternId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc PatternScroll PatternID = 10004 // PatternExpandCollapse is UIA_ExpandCollapsePatternId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc PatternExpandCollapse PatternID = 10005 // PatternSelectionItem is UIA_SelectionItemPatternId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc PatternSelectionItem PatternID = 10010 // PatternText is UIA_TextPatternId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc PatternText PatternID = 10014 // PatternToggle is UIA_TogglePatternId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc PatternToggle PatternID = 10015 // PatternScrollItem is UIA_ScrollItemPatternId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc PatternScrollItem PatternID = 10017 // PatternWindow is UIA_WindowPatternId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc PatternWindow PatternID = 10009 )
The patterns (UIA_*PatternId).
type PatternSet ¶
type PatternSet uint16
PatternSet is the set of patterns that a node supports.
Flutter: no counterpart
func (PatternSet) Has ¶
func (s PatternSet) Has(p PatternID) bool
Has says whether the set has the pattern.
Flutter: no counterpart
func (PatternSet) List ¶
func (s PatternSet) List() []PatternID
List returns the patterns of the set.
Flutter: no counterpart
type PropertyID ¶
type PropertyID int32
PropertyID is a UIA_*PropertyId.
Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc
const ( // PropRuntimeId is UIA_RuntimeIdPropertyId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc PropRuntimeId PropertyID = 30000 // PropBoundingRectangle is UIA_BoundingRectanglePropertyId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc PropBoundingRectangle PropertyID = 30001 // PropProcessId is UIA_ProcessIdPropertyId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc PropProcessId PropertyID = 30002 // PropControlType is UIA_ControlTypePropertyId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc PropControlType PropertyID = 30003 // PropLocalizedControlType is UIA_LocalizedControlTypePropertyId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc PropLocalizedControlType PropertyID = 30004 // PropName is UIA_NamePropertyId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc PropName PropertyID = 30005 // PropAcceleratorKey is UIA_AcceleratorKeyPropertyId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc PropAcceleratorKey PropertyID = 30006 // PropAccessKey is UIA_AccessKeyPropertyId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc PropAccessKey PropertyID = 30007 // PropHasKeyboardFocus is UIA_HasKeyboardFocusPropertyId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc PropHasKeyboardFocus PropertyID = 30008 // PropIsKeyboardFocusable is UIA_IsKeyboardFocusablePropertyId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc PropIsKeyboardFocusable PropertyID = 30009 // PropIsEnabled is UIA_IsEnabledPropertyId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc PropIsEnabled PropertyID = 30010 // PropAutomationId is UIA_AutomationIdPropertyId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc PropAutomationId PropertyID = 30011 // PropClassName is UIA_ClassNamePropertyId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc PropClassName PropertyID = 30012 // PropHelpText is UIA_HelpTextPropertyId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc PropHelpText PropertyID = 30013 // PropClickablePoint is UIA_ClickablePointPropertyId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc PropClickablePoint PropertyID = 30014 // PropCulture is UIA_CulturePropertyId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc PropCulture PropertyID = 30015 // PropIsControlElement is UIA_IsControlElementPropertyId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc PropIsControlElement PropertyID = 30016 // PropIsContentElement is UIA_IsContentElementPropertyId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc PropIsContentElement PropertyID = 30017 // PropLabeledBy is UIA_LabeledByPropertyId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc PropLabeledBy PropertyID = 30018 // PropIsPassword is UIA_IsPasswordPropertyId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc PropIsPassword PropertyID = 30019 // PropNativeWindowHandle is UIA_NativeWindowHandlePropertyId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc PropNativeWindowHandle PropertyID = 30020 // PropItemType is UIA_ItemTypePropertyId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc PropItemType PropertyID = 30021 // PropIsOffscreen is UIA_IsOffscreenPropertyId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc PropIsOffscreen PropertyID = 30022 // PropOrientation is UIA_OrientationPropertyId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc PropOrientation PropertyID = 30023 // PropFrameworkId is UIA_FrameworkIdPropertyId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc PropFrameworkId PropertyID = 30024 // PropIsRequiredForForm is UIA_IsRequiredForFormPropertyId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc PropIsRequiredForForm PropertyID = 30025 // PropItemStatus is UIA_ItemStatusPropertyId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc PropItemStatus PropertyID = 30026 // PropIsExpandCollapsePatternAvailable is UIA_IsExpandCollapsePatternAvailablePropertyId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc PropIsExpandCollapsePatternAvailable PropertyID = 30028 // PropIsInvokePatternAvailable is UIA_IsInvokePatternAvailablePropertyId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc PropIsInvokePatternAvailable PropertyID = 30031 // PropIsRangeValuePatternAvailable is UIA_IsRangeValuePatternAvailablePropertyId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc PropIsRangeValuePatternAvailable PropertyID = 30033 // PropIsScrollPatternAvailable is UIA_IsScrollPatternAvailablePropertyId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc PropIsScrollPatternAvailable PropertyID = 30034 // PropIsSelectionItemPatternAvailable is UIA_IsSelectionItemPatternAvailablePropertyId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc PropIsSelectionItemPatternAvailable PropertyID = 30036 // PropIsSelectionPatternAvailable is UIA_IsSelectionPatternAvailablePropertyId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc PropIsSelectionPatternAvailable PropertyID = 30037 // PropIsTextPatternAvailable is UIA_IsTextPatternAvailablePropertyId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc PropIsTextPatternAvailable PropertyID = 30040 // PropIsTogglePatternAvailable is UIA_IsTogglePatternAvailablePropertyId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc PropIsTogglePatternAvailable PropertyID = 30041 // PropIsValuePatternAvailable is UIA_IsValuePatternAvailablePropertyId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc PropIsValuePatternAvailable PropertyID = 30043 // PropValueValue is UIA_ValueValuePropertyId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc PropValueValue PropertyID = 30045 // PropValueIsReadOnly is UIA_ValueIsReadOnlyPropertyId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc PropValueIsReadOnly PropertyID = 30046 // PropRangeValueValue is UIA_RangeValueValuePropertyId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc PropRangeValueValue PropertyID = 30047 // PropRangeValueIsReadOnly is UIA_RangeValueIsReadOnlyPropertyId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc PropRangeValueIsReadOnly PropertyID = 30048 // PropRangeValueMinimum is UIA_RangeValueMinimumPropertyId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc PropRangeValueMinimum PropertyID = 30049 // PropRangeValueMaximum is UIA_RangeValueMaximumPropertyId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc PropRangeValueMaximum PropertyID = 30050 // PropRangeValueLargeChange is UIA_RangeValueLargeChangePropertyId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc PropRangeValueLargeChange PropertyID = 30051 // PropRangeValueSmallChange is UIA_RangeValueSmallChangePropertyId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc PropRangeValueSmallChange PropertyID = 30052 // PropScrollHorizontalScrollPercent is UIA_ScrollHorizontalScrollPercentPropertyId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc PropScrollHorizontalScrollPercent PropertyID = 30053 // PropScrollHorizontalViewSize is UIA_ScrollHorizontalViewSizePropertyId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc PropScrollHorizontalViewSize PropertyID = 30054 // PropScrollVerticalScrollPercent is UIA_ScrollVerticalScrollPercentPropertyId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc PropScrollVerticalScrollPercent PropertyID = 30055 // PropScrollVerticalViewSize is UIA_ScrollVerticalViewSizePropertyId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc PropScrollVerticalViewSize PropertyID = 30056 // PropScrollHorizontallyScrollable is UIA_ScrollHorizontallyScrollablePropertyId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc PropScrollHorizontallyScrollable PropertyID = 30057 // PropScrollVerticallyScrollable is UIA_ScrollVerticallyScrollablePropertyId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc PropScrollVerticallyScrollable PropertyID = 30058 // PropSelectionSelection is UIA_SelectionSelectionPropertyId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc PropSelectionSelection PropertyID = 30059 // PropSelectionCanSelectMultiple is UIA_SelectionCanSelectMultiplePropertyId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc PropSelectionCanSelectMultiple PropertyID = 30060 // PropSelectionIsSelectionRequired is UIA_SelectionIsSelectionRequiredPropertyId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc PropSelectionIsSelectionRequired PropertyID = 30061 // PropExpandCollapseExpandCollapseState is UIA_ExpandCollapseExpandCollapseStatePropertyId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc PropExpandCollapseExpandCollapseState PropertyID = 30070 // PropSelectionItemIsSelected is UIA_SelectionItemIsSelectedPropertyId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc PropSelectionItemIsSelected PropertyID = 30079 // PropToggleToggleState is UIA_ToggleToggleStatePropertyId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc PropToggleToggleState PropertyID = 30086 // PropLiveSetting is UIA_LiveSettingPropertyId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc PropLiveSetting PropertyID = 30135 // PropFullDescription is UIA_FullDescriptionPropertyId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc PropFullDescription PropertyID = 30159 // PropHeadingLevel is UIA_HeadingLevelPropertyId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc PropHeadingLevel PropertyID = 30173 // PropIsDialog is UIA_IsDialogPropertyId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc PropIsDialog PropertyID = 30174 // PropPositionInSet is UIA_PositionInSetPropertyId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc PropPositionInSet PropertyID = 30152 // PropSizeOfSet is UIA_SizeOfSetPropertyId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc PropSizeOfSet PropertyID = 30153 // PropLevel is UIA_LevelPropertyId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc PropLevel PropertyID = 30154 // PropLandmarkType is UIA_LandmarkTypePropertyId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc PropLandmarkType PropertyID = 30157 // PropLocalizedLandmarkType is UIA_LocalizedLandmarkTypePropertyId. // // Flutter: third_party/accessibility/ax/platform/ax_platform_node_win.cc PropLocalizedLandmarkType PropertyID = 30158 )
The properties (UIA_*PropertyId).
type Rect ¶
type Rect struct{ X, Y, Width, Height float64 }
Rect is a rectangle in pixels, as UI Automation's UiaRect has it.
Flutter: no counterpart
type Status ¶
type Status int
Status is the outcome of a request that a client made to a pattern.
Flutter: no counterpart
const ( // StatusOK: the request was carried out, or posted to the framework. // // Flutter: no counterpart StatusOK Status = iota // StatusGone: the node is not in the tree (UIA_E_ELEMENTNOTAVAILABLE). // // Flutter: no counterpart StatusGone // StatusDisabled: the node is disabled (UIA_E_ELEMENTNOTENABLED). // // Flutter: no counterpart StatusDisabled // StatusNotSupported: the node cannot do that (UIA_E_NOTSUPPORTED). // // Flutter: no counterpart StatusNotSupported // StatusInvalid: an argument is out of range (E_INVALIDARG). // // Flutter: no counterpart StatusInvalid )
The outcomes.
type Text ¶
type Text struct {
// contains filtered or unexported fields
}
Text is the text of a field as UTF-16 units, with the operations of the Text pattern on ranges.
Flutter: third_party/accessibility/ax/platform/ax_platform_node_textrangeprovider_win.cc AXPlatformNodeTextRangeProviderWin
func (Text) Clamp ¶
Clamp keeps a range inside the text, with Start not after End.
Flutter: no counterpart
func (Text) Expand ¶
Expand is ITextRangeProvider::ExpandToEnclosingUnit: the range grows to the units that hold its ends, unless it already is whole units. A caret becomes the unit that holds it.
Flutter: third_party/accessibility/ax/platform/ax_platform_node_textrangeprovider_win.cc AXPlatformNodeTextRangeProviderWin::ExpandToEnclosingUnit
func (Text) Find ¶
Find is ITextRangeProvider::FindText: the first range in the given one that holds the text (the last one when backward), or false.
Flutter: third_party/accessibility/ax/platform/ax_platform_node_textrangeprovider_win.cc AXPlatformNodeTextRangeProviderWin::FindText
func (Text) Move ¶
Move is ITextRangeProvider::Move: the range becomes the unit that holds its start, and then moves by count units, stopping at the ends of the text. It returns the new range and the number of units moved.
Flutter: third_party/accessibility/ax/platform/ax_platform_node_textrangeprovider_win.cc AXPlatformNodeTextRangeProviderWin::Move
func (Text) MoveEndpoint ¶
MoveEndpoint is ITextRangeProvider::MoveEndpointByUnit: the endpoint moves by count units (forward when it is positive) and stops at the ends of the text. It returns the range and the number of units that it moved. When the start passes the end the end moves with it, and the range is a caret; the same the other way round.
Flutter: third_party/accessibility/ax/platform/ax_platform_node_textrangeprovider_win.cc AXPlatformNodeTextRangeProviderWin::MoveEndpointByUnit
type TextRange ¶
type TextRange struct{ Start, End int }
TextRange is a range of the text of a field, in UTF-16 units: Start is the first unit in it and End the one after the last. A range with Start equal to End is a caret.
Flutter: third_party/accessibility/ax/platform/ax_platform_node_textrangeprovider_win.cc AXPlatformNodeTextRangeProviderWin
func MoveEndpointToEndpoint ¶
MoveEndpointToEndpoint is ITextRangeProvider::MoveEndpointByRange: the endpoint of r takes the position of the endpoint of o. When that puts the start after the end, the other end follows.
Flutter: third_party/accessibility/ax/platform/ax_platform_node_textrangeprovider_win.cc AXPlatformNodeTextRangeProviderWin::MoveEndpointByRange
type Value ¶
Value is the value of a property in plain Go: the COM glue turns it into a VARIANT.
Flutter: no counterpart
type ValueKind ¶
type ValueKind int
ValueKind says what a Value holds.
Flutter: no counterpart
const ( // ValueEmpty is VT_EMPTY: the property has no value from this provider, and UI Automation uses its // default. // // Flutter: no counterpart ValueEmpty ValueKind = iota // ValueBool is VT_BOOL. // // Flutter: no counterpart ValueBool // ValueInt is VT_I4. // // Flutter: no counterpart ValueInt // ValueFloat is VT_R8. // // Flutter: no counterpart ValueFloat // ValueString is VT_BSTR. // // Flutter: no counterpart ValueString )
The kinds of Value.
type Window ¶
type Window interface {
// ClientRect is the client area of the view's window on the screen, in physical pixels; ok is
// false when the window is gone. It is safe from any goroutine.
ClientRect(view ui.ViewID) (x, y, width, height float64, ok bool)
// HWND is the window of the view, 0 when it is gone. It is safe from any goroutine.
HWND(view ui.ViewID) uintptr
// Post runs fn on the UI thread; it is safe from any goroutine.
Post(fn func())
}
Window is what the core asks of the windows of the platform.
Flutter: no counterpart
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package callshim calls a function of the Windows calling convention with floating-point arguments, for the tests of UI Automation (SPEC §25.2): syscall.SyscallN passes integers only, and a COM method that takes a double (IRawElementProviderFragmentRoot::ElementProviderFromPoint, IRangeValueProvider::SetValue, and the client's SetValue and SetScrollPercent) gets it in a floating register.
|
Package callshim calls a function of the Windows calling convention with floating-point arguments, for the tests of UI Automation (SPEC §25.2): syscall.SyscallN passes integers only, and a COM method that takes a double (IRawElementProviderFragmentRoot::ElementProviderFromPoint, IRangeValueProvider::SetValue, and the client's SetValue and SetScrollPercent) gets it in a floating register. |
|
Package semtree builds semantics updates for the tests of UI Automation (SPEC §25.11): the nodes the way the engine fills them in, so that a test states only what it cares about.
|
Package semtree builds semantics updates for the tests of UI Automation (SPEC §25.11): the nodes the way the engine fills them in, so that a test states only what it cares about. |
|
Package uiatest is the UI Automation client that tests use to look at the providers of package uia the way Narrator, NVDA and Accessibility Insights do (SPEC §25.11, §25.13): it creates CUIAutomation, finds the element of a window, walks the tree, reads properties, calls the patterns and listens to events.
|
Package uiatest is the UI Automation client that tests use to look at the providers of package uia the way Narrator, NVDA and Accessibility Insights do (SPEC §25.11, §25.13): it creates CUIAutomation, finds the element of a window, walks the tree, reads properties, calls the patterns and listens to events. |