nsIAccessibleTextLeafRange.idl (1768B)
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- 2 /* This Source Code Form is subject to the terms of the Mozilla Public 3 * License, v. 2.0. If a copy of the MPL was not distributed with this 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 5 6 #include "nsISupports.idl" 7 #include "nsIArray.idl" 8 #include "nsIAccessibleText.idl" 9 10 interface nsIAccessible; 11 12 [scriptable, builtinclass, uuid(9181e777-8954-4f8f-8cee-32f9771e40d7)] 13 interface nsIAccessibleTextLeafPoint : nsISupports 14 { 15 attribute nsIAccessible accessible; 16 17 attribute long offset; 18 19 /** 20 * Find a boundary (word start, line start, etc.) in a specific direction. 21 * If no boundary is found, the start/end of the document is returned 22 * (depending on the direction). 23 * 24 * @param aBoundaryType [in] the boundary type to search for 25 * @param aDirection [in] search next or previous 26 * @param aFlags [in] optional flags for search 27 */ 28 nsIAccessibleTextLeafPoint findBoundary(in AccessibleTextBoundary aBoundaryType, 29 in unsigned long aDirection, 30 in unsigned long aFlags); 31 32 const long DIRECTION_NEXT = 0x0; 33 const long DIRECTION_PREVIOUS = 0x1; 34 35 // Keep these flags up to date with the ones in TextLeafPoint. 36 const unsigned long BOUNDARY_FLAG_DEFAULT = 0x0; 37 // If current point is a matching boundary, return unchanged. 38 const unsigned long BOUNDARY_FLAG_INCLUDE_ORIGIN = 0x1; 39 // Do not search past end of editables. 40 const unsigned long BOUNDARY_FLAG_STOP_IN_EDITABLE = 0x2; 41 // Skip over list items in searches and don't consider them line or paragraph starts. 42 const unsigned long BOUNDARY_FLAG_SKIP_LIST_ITEM_MARKER = 0x4; 43 };