Bug 1877642 - Disable browser_fullscreen-tab-close-race.js on apple_silicon !debug...
[gecko.git] / accessible / ipc / PDocAccessible.ipdl
blobd43fad823e55a1dcebb597c00a98e8ee25656f24
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";
23 namespace mozilla {
24 namespace a11y {
26 struct AccessibleData
28   uint64_t ID;
29   role Role;
30   uint64_t ParentID;
31   uint32_t IndexInParent;
32   AccType Type;
33   AccGenericType GenericTypes;
34   uint8_t RoleMapEntryIndex;
35   nullable AccAttributes CacheFields;
38 struct TextRangeData
40   uint64_t StartID;
41   uint64_t EndID;
42   int32_t StartOffset;
43   int32_t EndOffset;
46 [ManualDealloc, ChildImpl=virtual, ParentImpl=virtual]
47 protocol PDocAccessible
49   manager PBrowser;
51 parent:
52   async Shutdown();
54   /*
55    * Notify the parent process the document in the child process is firing an
56    * event.
57    */
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,
65                        int32_t aOffset,
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);
76 #ifndef XP_WIN
77   async AnnouncementEvent(uint64_t aID,
78                           nsString aAnnouncement,
79                           uint16_t aPriority);
80 #endif
81   async TextSelectionChangeEvent(uint64_t aID, TextRangeData[] aSelection);
83   /*
84    * Tell the parent document to bind the existing document as a new child
85    * document.
86    */
87   async BindChildDoc(PDocAccessible aChildDoc, uint64_t aID);
89   /*
90    * Cache The World
91    */
92   async Cache(CacheUpdateType aUpdateType, CacheData[] aData);
94   /*
95    * Lists of accessibles that either gained or lost a selected state.
96    */
97   async SelectedAccessiblesChanged(uint64_t[] aSelectedIDs, uint64_t[] aUnselectedIDs);
99   /*
100    * Tell the parent process that the given Accessibles are about to be moved
101    * via subsequent hide and show events.
102    */
103   async AccessiblesWillMove(uint64_t[] aIDs);
105 child:
106   async __delete__();
108   /*
109    * Called as a result of focus shifting from chrome to content
110    * elements through keyboard navigation.
111    */
112   async RestoreFocus();
114   // LocalAccessible
115   async ScrollTo(uint64_t aID, uint32_t aScrollType);
116   async ScrollToPoint(uint64_t aID, uint32_t aScrollType, int32_t aX,
117                       int32_t aY);
118 #ifndef XP_WIN
119   async Announce(uint64_t aID, nsString aAnnouncement, uint16_t aPriority);
120 #endif
122   // AccessibleText
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,
136                                int32_t aEndOffset,
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);
156   /*
157    * Verify the cache. Used for testing purposes.
158    */
159   async VerifyCache(uint64_t aID, uint64_t aCacheDomain, nullable AccAttributes aFields);