gecko-dev/dom/interfaces/events/nsIDOMNSEvent.idl

121 строка
4.6 KiB
Plaintext

/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 2000
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Johnny Stenback <jst@netscape.com> (original author)
*
* Alternatively, the contents of this file may be used under the terms of
* either of the GNU General Public License Version 2 or later (the "GPL"),
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "domstubs.idl"
%{C++
#ifdef ERROR
#undef ERROR
#endif
%}
[scriptable, uuid(9be8096b-f795-4045-9664-0c275f36fe5b)]
interface nsIDOMNSEvent : nsISupports
{
const long MOUSEDOWN = 0x00000001;
const long MOUSEUP = 0x00000002;
const long MOUSEOVER = 0x00000004;
const long MOUSEOUT = 0x00000008;
const long MOUSEMOVE = 0x00000010;
const long MOUSEDRAG = 0x00000020;
const long CLICK = 0x00000040;
const long DBLCLICK = 0x00000080;
const long KEYDOWN = 0x00000100;
const long KEYUP = 0x00000200;
const long KEYPRESS = 0x00000400;
const long DRAGDROP = 0x00000800;
const long FOCUS = 0x00001000;
const long BLUR = 0x00002000;
const long SELECT = 0x00004000;
const long CHANGE = 0x00008000;
const long RESET = 0x00010000;
const long SUBMIT = 0x00020000;
const long SCROLL = 0x00040000;
const long LOAD = 0x00080000;
const long UNLOAD = 0x00100000;
const long XFER_DONE = 0x00200000;
const long ABORT = 0x00400000;
const long ERROR = 0x00800000;
const long LOCATE = 0x01000000;
const long MOVE = 0x02000000;
const long RESIZE = 0x04000000;
const long FORWARD = 0x08000000;
const long HELP = 0x10000000;
const long BACK = 0x20000000;
const long TEXT = 0x40000000;
const long ALT_MASK = 0x00000001;
const long CONTROL_MASK = 0x00000002;
const long SHIFT_MASK = 0x00000004;
const long META_MASK = 0x00000008;
/** The original target of the event, before any retargetings. */
readonly attribute nsIDOMEventTarget originalTarget;
/**
* The explicit original target of the event. If the event was retargeted
* for some reason other than an anonymous boundary crossing, this will be set
* to the target before the retargeting occurs. For example, mouse events
* are retargeted to their parent node when they happen over text nodes (bug
* 185889), and in that case .target will show the parent and
* .explicitOriginalTarget will show the text node.
* .explicitOriginalTarget differs from .originalTarget in that it will never
* contain anonymous content.
*/
readonly attribute nsIDOMEventTarget explicitOriginalTarget;
/* XXX This is TEMPORARY.
* The original target, without any retargeting (like textnode retargeting).
* This really needs to be in .originalTarget, but this is a less risky way of
* fixing it.
*/
[noscript] readonly attribute nsIDOMEventTarget tmpRealOriginalTarget;
/**
* @deprecated Use nsIDOMEvent::stopPropagation.
*/
void preventBubble();
/**
* @deprecated Use nsIDOMEvent::stopPropagation.
*/
void preventCapture();
boolean getPreventDefault();
readonly attribute boolean isTrusted;
};