summaryrefslogtreecommitdiffstats
path: root/accessible/interfaces/nsIAccessibleTextRange.idl
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
commit26a029d407be480d791972afb5975cf62c9360a6 (patch)
treef435a8308119effd964b339f76abb83a57c29483 /accessible/interfaces/nsIAccessibleTextRange.idl
parentInitial commit. (diff)
downloadfirefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz
firefox-26a029d407be480d791972afb5975cf62c9360a6.zip
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--accessible/interfaces/nsIAccessibleTextRange.idl57
1 files changed, 57 insertions, 0 deletions
diff --git a/accessible/interfaces/nsIAccessibleTextRange.idl b/accessible/interfaces/nsIAccessibleTextRange.idl
new file mode 100644
index 0000000000..5a3e6facaf
--- /dev/null
+++ b/accessible/interfaces/nsIAccessibleTextRange.idl
@@ -0,0 +1,57 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#include "nsISupports.idl"
+
+interface nsIAccessible;
+interface nsIAccessibleText;
+interface nsIArray;
+interface nsIVariant;
+
+/**
+ * A range representing a piece of text in the document.
+ */
+[scriptable, builtinclass, uuid(c4515623-55f9-4543-a3d5-c1e9afa588f4)]
+interface nsIAccessibleTextRange : nsISupports
+{
+ readonly attribute nsIAccessibleText startContainer;
+ readonly attribute long startOffset;
+ readonly attribute nsIAccessibleText endContainer;
+ readonly attribute long endOffset;
+
+ /**
+ * Return an accessible containing the whole range
+ */
+ readonly attribute nsIAccessible container;
+
+ /**
+ * Return true if this range has the same end points of the given range.
+ */
+ boolean compare(in nsIAccessibleTextRange aOtherRange);
+
+ /**
+ * The two endpoints of the range (starting and ending).
+ */
+ const unsigned long EndPoint_Start = 1;
+ const unsigned long EndPoint_End = 2;
+
+ /**
+ * Compare this and given ranges end points.
+ *
+ * @return -1/0/1 if this range end point is before/equal/after the given
+ * range end point.
+ */
+ long compareEndPoints(in unsigned long aEndPoint,
+ in nsIAccessibleTextRange aOtherRange,
+ in unsigned long aOtherRangeEndPoint);
+
+ /**
+ * Crops the range by the given accessible element.
+ */
+ boolean crop(in nsIAccessible aContainer);
+
+ const unsigned long AlignToTop = 0;
+ const unsigned long AlignToBottom = 1;
+};