tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

nsIAccessibleEditableText.idl (2081B)


      1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
      2 *
      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/. */
      6 
      7 #include "nsISupports.idl"
      8 
      9 [scriptable, builtinclass, uuid(28915cca-3366-4034-ba1d-b7afb9b37639)]
     10 interface nsIAccessibleEditableText : nsISupports
     11 {
     12  /**
     13   * Replaces the text represented by this object by the given text.
     14   */
     15  void setTextContents (in AString text);
     16 
     17  /**
     18   * Inserts text at the specified position.
     19   *
     20   * @param text - text that is inserted.
     21   * @param position - index at which to insert the text.
     22   */
     23  void insertText(in AString text, in long position);
     24 
     25  /**
     26   * Copies the text range into the clipboard.
     27   *
     28   * @param startPos - start index of the text to moved into the clipboard.
     29   * @param endPos - end index of the text to moved into the clipboard.
     30   */
     31  void copyText(in long startPos, in long endPos);
     32 
     33  /**
     34   * Deletes a range of text and copies it to the clipboard.
     35   *
     36   * @param startPos - start index of the text to be deleted.
     37   * @param endOffset - end index of the text to be deleted.
     38   */
     39  void cutText(in long startPos, in long endPos);
     40 
     41  /**
     42   * Deletes a range of text.
     43   *
     44   * @param startPos - start index of the text to be deleted.
     45   * @param endPos - end index of the text to be deleted.
     46   */
     47  void deleteText(in long startPos, in long endPos);
     48 
     49  /**
     50   * Pastes text from the clipboard.
     51   *
     52   * @param position - index at which to insert the text from the system
     53   *                   clipboard into the text represented by this object. If
     54   *                   this is TEXT_OFFSET_CARET, the text will be pasted at the
     55   *                   caret just as it would be when pasting using the keyboard
     56   *                   or GUI. This means that if text is already selected, it
     57   *                   will be replaced with the pasted text.
     58   */
     59  [can_run_script]
     60  void pasteText(in long position);
     61 };