PageRenderTime 224ms CodeModel.GetById 120ms app.highlight 2ms RepoModel.GetById 99ms app.codeStats 0ms

/gecko_sdk/idl/nsIWebBrowserFocus.idl

http://firefox-mac-pdf.googlecode.com/
IDL | 112 lines | 13 code | 9 blank | 90 comment | 0 complexity | 6414f7b5194ef0fe69d3221a4e1be5ab MD5 | raw file
  1/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  2 *
  3 * ***** BEGIN LICENSE BLOCK *****
  4 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  5 *
  6 * The contents of this file are subject to the Mozilla Public License Version
  7 * 1.1 (the "License"); you may not use this file except in compliance with
  8 * the License. You may obtain a copy of the License at
  9 * http://www.mozilla.org/MPL/
 10 *
 11 * Software distributed under the License is distributed on an "AS IS" basis,
 12 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
 13 * for the specific language governing rights and limitations under the
 14 * License.
 15 *
 16 * The Original Code is the Mozilla browser.
 17 *
 18 * The Initial Developer of the Original Code is
 19 * Netscape Communications, Inc.
 20 * Portions created by the Initial Developer are Copyright (C) 1999
 21 * the Initial Developer. All Rights Reserved.
 22 *
 23 * Contributor(s):
 24 *   Chris Saari <saari@netscape.com>
 25 *   Dan Rosen <dr@netscape.com>
 26 *
 27 * Alternatively, the contents of this file may be used under the terms of
 28 * either the GNU General Public License Version 2 or later (the "GPL"), or
 29 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
 30 * in which case the provisions of the GPL or the LGPL are applicable instead
 31 * of those above. If you wish to allow use of your version of this file only
 32 * under the terms of either the GPL or the LGPL, and not to allow others to
 33 * use your version of this file under the terms of the MPL, indicate your
 34 * decision by deleting the provisions above and replace them with the notice
 35 * and other provisions required by the GPL or the LGPL. If you do not delete
 36 * the provisions above, a recipient may use your version of this file under
 37 * the terms of any one of the MPL, the GPL or the LGPL.
 38 *
 39 * ***** END LICENSE BLOCK ***** */
 40
 41interface nsIDOMWindow;
 42interface nsIDOMElement;
 43
 44#include "nsISupports.idl"
 45
 46/**
 47 * nsIWebBrowserFocus
 48 * Interface that embedders use for controlling and interacting
 49 * with the browser focus management. The embedded browser can be focused by
 50 * clicking in it or tabbing into it. If the browser is currently focused and
 51 * the embedding application's top level window is disabled, deactivate() must
 52 * be called, and activate() called again when the top level window is
 53 * reactivated for the browser's focus memory to work correctly.
 54 *
 55 * @status FROZEN
 56 */
 57
 58[scriptable, uuid(9c5d3c58-1dd1-11b2-a1c9-f3699284657a)]
 59interface nsIWebBrowserFocus : nsISupports
 60{
 61  /**
 62   * MANDATORY
 63   * activate() is a mandatory call that must be made to the browser
 64   * when the embedding application's window is activated *and* the 
 65   * browser area was the last thing in focus.  This method can also be called
 66   * if the embedding application wishes to give the browser area focus,
 67   * without affecting the currently focused element within the browser.
 68   *
 69   * @note
 70   * If you fail to make this call, mozilla focus memory will not work
 71   * correctly.
 72   */
 73  void activate();
 74
 75  /**
 76   * MANDATORY
 77   * deactivate() is a mandatory call that must be made to the browser
 78   * when the embedding application's window is deactivated *and* the
 79   * browser area was the last thing in focus.  On non-windows platforms,
 80   * deactivate() should also be called when focus moves from the browser
 81   * to the embedding chrome.
 82   *
 83   * @note
 84   * If you fail to make this call, mozilla focus memory will not work
 85   * correctly.
 86   */
 87  void deactivate();
 88
 89  /**
 90   * Give the first element focus within mozilla
 91   * (i.e. TAB was pressed and focus should enter mozilla)
 92   */
 93  void setFocusAtFirstElement();
 94
 95  /**
 96   * Give the last element focus within mozilla
 97   * (i.e. SHIFT-TAB was pressed and focus should enter mozilla)
 98   */
 99  void setFocusAtLastElement();
100  
101  /**
102   * The currently focused nsDOMWindow when the browser is active,
103   * or the last focused nsDOMWindow when the browser is inactive.
104   */
105  attribute nsIDOMWindow focusedWindow;
106  
107  /**
108   * The currently focused nsDOMElement when the browser is active,
109   * or the last focused nsDOMElement when the browser is inactive.
110   */
111  attribute nsIDOMElement focusedElement;
112};