1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 include protocol PBrowser;
9 include DocAccessibleTypes;
11 include "mozilla/GfxMessageUtils.h";
13 using mozilla::LayoutDeviceIntRect from "Units.h";
14 using mozilla::LayoutDeviceIntPoint from "Units.h";
15 using mozilla::LayoutDeviceIntSize from "Units.h";
16 using mozilla::a11y::role from "mozilla/a11y/IPCTypes.h";
17 using mozilla::a11y::AccType from "mozilla/a11y/IPCTypes.h";
18 using mozilla::a11y::AccGenericType from "mozilla/a11y/IPCTypes.h";
19 [RefCounted] using mozilla::a11y::AccAttributes from "mozilla/a11y/IPCTypes.h";
20 using mozilla::a11y::CacheUpdateType from "mozilla/a11y/IPCTypes.h";
21 using mozilla::gfx::Matrix4x4 from "mozilla/gfx/Matrix.h";
31 uint32_t IndexInParent;
33 AccGenericType GenericTypes;
34 uint8_t RoleMapEntryIndex;
35 nullable AccAttributes CacheFields;
46 [ManualDealloc, ChildImpl=virtual, ParentImpl=virtual]
47 protocol PDocAccessible
55 * Notify the parent process the document in the child process is firing an
58 async Event(uint64_t aID, uint32_t type);
59 async ShowEvent(AccessibleData[] aNewTree, bool aEventSuppressed,
60 bool aComplete, bool aFromuser);
61 async HideEvent(uint64_t aRootID, bool aFromUser);
62 async StateChangeEvent(uint64_t aID, uint64_t aState, bool aEnabled);
63 async CaretMoveEvent(uint64_t aID,
64 LayoutDeviceIntRect aCaretRect,
66 bool aIsSelectionCollapsed, bool aIsAtEndOfLine,
67 int32_t aGranularity);
68 async TextChangeEvent(uint64_t aID, nsString aStr, int32_t aStart, uint32_t aLen,
69 bool aIsInsert, bool aFromUser);
70 async SelectionEvent(uint64_t aID, uint64_t aWidgetID, uint32_t aType);
71 async RoleChangedEvent(role aRole, uint8_t aRoleMapEntryIndex);
72 async FocusEvent(uint64_t aID, LayoutDeviceIntRect aCaretRect);
73 async VirtualCursorChangeEvent(uint64_t aID,
74 uint64_t aOldPosition,
77 bool aFromUservcEvent);
78 async ScrollingEvent(uint64_t aID, uint64_t aType,
79 uint32_t aScrollX, uint32_t aScrollY,
80 uint32_t aMaxScrollX, uint32_t aMaxScrollY);
82 async AnnouncementEvent(uint64_t aID,
83 nsString aAnnouncement,
86 async TextSelectionChangeEvent(uint64_t aID, TextRangeData[] aSelection);
89 * Tell the parent document to bind the existing document as a new child
92 async BindChildDoc(PDocAccessible aChildDoc, uint64_t aID);
97 async Cache(CacheUpdateType aUpdateType, CacheData[] aData);
100 * Lists of accessibles that either gained or lost a selected state.
102 async SelectedAccessiblesChanged(uint64_t[] aSelectedIDs, uint64_t[] aUnselectedIDs);
105 * Tell the parent process that the given Accessibles are about to be moved
106 * via subsequent hide and show events.
108 async AccessiblesWillMove(uint64_t[] aIDs);
114 * Called as a result of focus shifting from chrome to content
115 * elements through keyboard navigation.
117 async RestoreFocus();
120 async ScrollTo(uint64_t aID, uint32_t aScrollType);
121 async ScrollToPoint(uint64_t aID, uint32_t aScrollType, int32_t aX,
124 async Announce(uint64_t aID, nsString aAnnouncement, uint16_t aPriority);
129 async SetCaretOffset(uint64_t aID, int32_t aOffset);
131 async SetTextSelection(uint64_t aStartID, int32_t aStartOffset,
132 uint64_t aEndID, int32_t aEndOffset,
133 int32_t aSelectionNum);
134 async RemoveTextSelection(uint64_t aID, int32_t aSelectionNum);
136 async ScrollTextLeafRangeIntoView(uint64_t aStartID, int32_t aStartOffset,
137 uint64_t aEndID, int32_t aEndOffset,
138 uint32_t aScrollType);
139 async ScrollSubstringToPoint(uint64_t aID,
140 int32_t aStartOffset,
142 uint32_t aCoordinateType,
143 int32_t aX, int32_t aY);
145 async ReplaceText(uint64_t aID, nsString aText);
146 async InsertText(uint64_t aID, nsString aText, int32_t aPosition);
147 async CopyText(uint64_t aID, int32_t aStartPos, int32_t aEndPos);
148 async CutText(uint64_t aID, int32_t aStartPos, int32_t aEndPos);
149 async DeleteText(uint64_t aID, int32_t aStartPos, int32_t aEndPos);
150 async PasteText(uint64_t aID, int32_t aPosition);
152 async TakeSelection(uint64_t aID);
153 async SetSelected(uint64_t aID, bool aSelected);
155 async DoActionAsync(uint64_t aID, uint8_t aIndex);
157 async SetCurValue(uint64_t aID, double aValue);
159 async TakeFocus(uint64_t aID);
162 * Verify the cache. Used for testing purposes.
164 async VerifyCache(uint64_t aID, uint64_t aCacheDomain, nullable AccAttributes aFields);