Bug 1668452 require an exact match of Window, rate, and device when selecting a Media...
[gecko.git] / accessible / ipc / RemoteAccessibleShared.h
blob75c060fd6120b3dc1cfb778ae23bed48853c845d
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 #ifndef mozilla_a11y_RemoteAccessibleShared_h
8 #define mozilla_a11y_RemoteAccessibleShared_h
10 /**
11 * These are function declarations shared between win/RemoteAccessible.h and
12 * other/RemoteAccessible.h.
16 * Return the states for the proxied accessible.
18 virtual uint64_t State() override;
21 * Return the native states for the proxied accessible.
23 uint64_t NativeState() const;
26 * Set aName to the name of the proxied accessible.
27 * Return the ENameValueFlag passed from Accessible::Name
29 ENameValueFlag Name(nsString& aName) const override;
32 * Set aValue to the value of the proxied accessible.
34 void Value(nsString& aValue) const override;
37 * Set aHelp to the help string of the proxied accessible.
39 void Help(nsString& aHelp) const;
41 /**
42 * Set aDesc to the description of the proxied accessible.
44 void Description(nsString& aDesc) const override;
46 /**
47 * Get the set of attributes on the proxied accessible.
49 virtual already_AddRefed<AccAttributes> Attributes() override;
51 /**
52 * Return set of targets of given relation type.
54 nsTArray<RemoteAccessible*> RelationByType(RelationType aType) const;
56 /**
57 * Get all relations for this accessible.
59 void Relations(nsTArray<RelationType>* aTypes,
60 nsTArray<nsTArray<RemoteAccessible*>>* aTargetSets) const;
62 bool IsSearchbox() const;
64 nsStaticAtom* ARIARoleAtom() const;
66 virtual mozilla::a11y::GroupPos GroupPosition() override;
67 void ScrollTo(uint32_t aScrollType);
68 void ScrollToPoint(uint32_t aScrollType, int32_t aX, int32_t aY);
70 void Announce(const nsString& aAnnouncement, uint16_t aPriority);
72 int32_t CaretLineNumber();
73 virtual int32_t CaretOffset() const override;
74 void SetCaretOffset(int32_t aOffset);
76 virtual void TextSubstring(int32_t aStartOffset, int32_t aEndOfset,
77 nsAString& aText) const override;
79 virtual void TextAfterOffset(int32_t aOffset,
80 AccessibleTextBoundary aBoundaryType,
81 int32_t* aStartOffset, int32_t* aEndOffset,
82 nsAString& aText) override;
84 virtual void TextAtOffset(int32_t aOffset, AccessibleTextBoundary aBoundaryType,
85 int32_t* aStartOffset, int32_t* aEndOffset,
86 nsAString& aText) override;
88 virtual void TextBeforeOffset(int32_t aOffset,
89 AccessibleTextBoundary aBoundaryType,
90 int32_t* aStartOffset, int32_t* aEndOffset,
91 nsAString& aText) override;
93 char16_t CharAt(int32_t aOffset);
95 LayoutDeviceIntRect TextBounds(
96 int32_t aStartOffset, int32_t aEndOffset,
97 uint32_t aCoordType =
98 nsIAccessibleCoordinateType::COORDTYPE_SCREEN_RELATIVE);
100 LayoutDeviceIntRect CharBounds(int32_t aOffset, uint32_t aCoordType);
102 int32_t OffsetAtPoint(int32_t aX, int32_t aY, uint32_t aCoordType);
104 bool SetSelectionBoundsAt(int32_t aSelectionNum, int32_t aStartOffset,
105 int32_t aEndOffset);
107 bool AddToSelection(int32_t aStartOffset, int32_t aEndOffset);
109 bool RemoveFromSelection(int32_t aSelectionNum);
111 void ScrollSubstringTo(int32_t aStartOffset, int32_t aEndOffset,
112 uint32_t aScrollType);
114 void ScrollSubstringToPoint(int32_t aStartOffset, int32_t aEndOffset,
115 uint32_t aCoordinateType, int32_t aX, int32_t aY);
117 void Text(nsString* aText);
119 void ReplaceText(const nsString& aText);
121 bool InsertText(const nsString& aText, int32_t aPosition);
123 bool CopyText(int32_t aStartPos, int32_t aEndPos);
125 bool CutText(int32_t aStartPos, int32_t aEndPos);
127 bool DeleteText(int32_t aStartPos, int32_t aEndPos);
129 bool PasteText(int32_t aPosition);
131 LayoutDeviceIntPoint ImagePosition(uint32_t aCoordType);
133 LayoutDeviceIntSize ImageSize();
135 bool IsLinkValid();
137 uint32_t AnchorCount(bool* aOk);
139 void AnchorURIAt(uint32_t aIndex, nsCString& aURI, bool* aOk);
141 RemoteAccessible* AnchorAt(uint32_t aIndex);
143 uint32_t LinkCount();
145 RemoteAccessible* LinkAt(const uint32_t& aIndex);
147 RemoteAccessible* TableOfACell();
149 uint32_t ColIdx();
151 uint32_t RowIdx();
153 void GetPosition(uint32_t* aColIdx, uint32_t* aRowIdx);
155 uint32_t ColExtent();
157 uint32_t RowExtent();
159 void GetColRowExtents(uint32_t* aColIdx, uint32_t* aRowIdx,
160 uint32_t* aColExtent, uint32_t* aRowExtent);
162 void ColHeaderCells(nsTArray<RemoteAccessible*>* aCells);
164 void RowHeaderCells(nsTArray<RemoteAccessible*>* aCells);
166 bool IsCellSelected();
168 RemoteAccessible* TableCaption();
169 void TableSummary(nsString& aSummary);
170 uint32_t TableColumnCount();
171 uint32_t TableRowCount();
172 RemoteAccessible* TableCellAt(uint32_t aRow, uint32_t aCol);
173 int32_t TableCellIndexAt(uint32_t aRow, uint32_t aCol);
174 int32_t TableColumnIndexAt(uint32_t aCellIndex);
175 int32_t TableRowIndexAt(uint32_t aCellIndex);
176 void TableRowAndColumnIndicesAt(uint32_t aCellIndex, int32_t* aRow,
177 int32_t* aCol);
178 uint32_t TableColumnExtentAt(uint32_t aRow, uint32_t aCol);
179 uint32_t TableRowExtentAt(uint32_t aRow, uint32_t aCol);
180 void TableColumnDescription(uint32_t aCol, nsString& aDescription);
181 void TableRowDescription(uint32_t aRow, nsString& aDescription);
182 bool TableColumnSelected(uint32_t aCol);
183 bool TableRowSelected(uint32_t aRow);
184 bool TableCellSelected(uint32_t aRow, uint32_t aCol);
185 uint32_t TableSelectedCellCount();
186 uint32_t TableSelectedColumnCount();
187 uint32_t TableSelectedRowCount();
188 void TableSelectedCells(nsTArray<RemoteAccessible*>* aCellIDs);
189 void TableSelectedCellIndices(nsTArray<uint32_t>* aCellIndices);
190 void TableSelectedColumnIndices(nsTArray<uint32_t>* aColumnIndices);
191 void TableSelectedRowIndices(nsTArray<uint32_t>* aRowIndices);
192 void TableSelectColumn(uint32_t aCol);
193 void TableSelectRow(uint32_t aRow);
194 void TableUnselectColumn(uint32_t aCol);
195 void TableUnselectRow(uint32_t aRow);
196 bool TableIsProbablyForLayout();
197 RemoteAccessible* AtkTableColumnHeader(int32_t aCol);
198 RemoteAccessible* AtkTableRowHeader(int32_t aRow);
200 KeyBinding AccessKey();
201 KeyBinding KeyboardShortcut();
202 void AtkKeyBinding(nsString& aBinding);
204 double CurValue() const override;
205 double MinValue() const override;
206 double MaxValue() const override;
207 double Step() const override;
208 bool SetCurValue(double aValue);
210 RemoteAccessible* FocusedChild();
211 virtual Accessible* ChildAtPoint(
212 int32_t aX, int32_t aY,
213 LocalAccessible::EWhichChildAtPoint aWhichChild) override;
214 LayoutDeviceIntRect Bounds() const override;
215 nsIntRect BoundsInCSSPixels();
217 void Language(nsString& aLocale);
218 void DocType(nsString& aType);
219 void Title(nsString& aTitle);
220 void URL(nsString& aURL);
221 void MimeType(nsString aMime);
222 void URLDocTypeMimeType(nsString& aURL, nsString& aDocType,
223 nsString& aMimeType);
225 void Extents(bool aNeedsScreenCoords, int32_t* aX, int32_t* aY, int32_t* aWidth,
226 int32_t* aHeight);
228 virtual void DOMNodeID(nsString& aID) const override;
230 #endif