author Ben Turner <bent.mozilla@gmail.com>
Mon, 03 Jun 2013 08:16:06 -0700
changeset 133771 92b8261c3f6eb74460ca44941f5cb0c6b03ddc1d
parent 124924 901a79e85148dc4dd921072683becaf477fb492a
child 133809 5b571c577bdcd8c0fb7e7cf9c435e59def57c2d0
permissions -rw-r--r--
Bug 877952 - 'IndexedDB upgrade should proceed even when file manager directories are not present'. r=janv.

/* 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 "domstubs.idl"

[scriptable, uuid(3615a616-571d-4194-bf54-ccf546067b14)]
interface nsIB2GCameraContent : nsISupports
  /* temporary solution, waiting for getUserMedia */
  DOMString getCameraURI([optional] in jsval options);

[scriptable, uuid(94233b76-3987-4fc0-8924-7596846f9bd3)]
interface nsIB2GKeyboard : nsISupports
  void sendKey(in long keyCode, in long charCode);

  // Select the <select> option specified by index.
  // If this method is called on a <select> that support multiple
  // selection, then the option specified by index will be added to
  // the selection.
  // If this method is called for a select that does not support multiple
  // selection the previous element will be unselected.
  void setSelectedOption(in jsval index);

  // Select the <select> options specified by indexes. All other options
  // will be deselected.
  // If this method is called for a <select> that does not support multiple
  // selection, then the last index specified in indexes will be selected.
  void setSelectedOptions(in jsval indexes);

  // Set the value on the currently focused element. This has to be used
  // for special situations where the value had to be chosen amongst a
  // list (type=month) or a widget (type=date, time, etc.).
  // If the value passed in parameter isn't valid (in the term of HTML5
  // Forms Validation), the value will simply be ignored by the element. 
  void setValue(in jsval value);

  void removeFocus();

  attribute nsIDOMEventListener onfocuschange;

  // Fires when user moves the cursor, changes the selection, or alters the
  // composing text length
  attribute nsIDOMEventListener onselectionchange;

  // The start position of the selection.
  readonly attribute long selectionStart;

  // The stop position of the selection.
  readonly attribute long selectionEnd;

   * Set the selection range of the the editable text.
   * @param start The beginning of the selected text.
   * @param end The end of the selected text.
   * Note that the start position should be less or equal to the end position.
   * To move the cursor, set the start and end position to the same value.
  void setSelectionRange(in long start, in long end);