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, bool aFromUser);
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 ScrollingEvent(uint64_t aID, uint64_t aType,
74 uint32_t aScrollX, uint32_t aScrollY,
75 uint32_t aMaxScrollX, uint32_t aMaxScrollY);
77 async AnnouncementEvent(uint64_t aID,
78 nsString aAnnouncement,
81 async TextSelectionChangeEvent(uint64_t aID, TextRangeData[] aSelection);
84 * Tell the parent document to bind the existing document as a new child
87 async BindChildDoc(PDocAccessible aChildDoc, uint64_t aID);
92 async Cache(CacheUpdateType aUpdateType, CacheData[] aData);
95 * Lists of accessibles that either gained or lost a selected state.
97 async SelectedAccessiblesChanged(uint64_t[] aSelectedIDs, uint64_t[] aUnselectedIDs);
100 * Tell the parent process that the given Accessibles are about to be moved
101 * via subsequent hide and show events.
103 async AccessiblesWillMove(uint64_t[] aIDs);
109 * Called as a result of focus shifting from chrome to content
110 * elements through keyboard navigation.
112 async RestoreFocus();
115 async ScrollTo(uint64_t aID, uint32_t aScrollType);
116 async ScrollToPoint(uint64_t aID, uint32_t aScrollType, int32_t aX,
119 async Announce(uint64_t aID, nsString aAnnouncement, uint16_t aPriority);
124 async SetCaretOffset(uint64_t aID, int32_t aOffset);
126 async SetTextSelection(uint64_t aStartID, int32_t aStartOffset,
127 uint64_t aEndID, int32_t aEndOffset,
128 int32_t aSelectionNum);
129 async RemoveTextSelection(uint64_t aID, int32_t aSelectionNum);
131 async ScrollTextLeafRangeIntoView(uint64_t aStartID, int32_t aStartOffset,
132 uint64_t aEndID, int32_t aEndOffset,
133 uint32_t aScrollType);
134 async ScrollSubstringToPoint(uint64_t aID,
135 int32_t aStartOffset,
137 uint32_t aCoordinateType,
138 int32_t aX, int32_t aY);
140 async ReplaceText(uint64_t aID, nsString aText);
141 async InsertText(uint64_t aID, nsString aText, int32_t aPosition);
142 async CopyText(uint64_t aID, int32_t aStartPos, int32_t aEndPos);
143 async CutText(uint64_t aID, int32_t aStartPos, int32_t aEndPos);
144 async DeleteText(uint64_t aID, int32_t aStartPos, int32_t aEndPos);
145 async PasteText(uint64_t aID, int32_t aPosition);
147 async TakeSelection(uint64_t aID);
148 async SetSelected(uint64_t aID, bool aSelected);
150 async DoActionAsync(uint64_t aID, uint8_t aIndex);
152 async SetCurValue(uint64_t aID, double aValue);
154 async TakeFocus(uint64_t aID);
157 * Verify the cache. Used for testing purposes.
159 async VerifyCache(uint64_t aID, uint64_t aCacheDomain, nullable AccAttributes aFields);