Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 21:42:36 +04:00
|
|
|
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 15:12:37 +04:00
|
|
|
/* 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/. */
|
2001-01-21 12:10:30 +03:00
|
|
|
|
|
|
|
#include "nsIDOMUIEvent.idl"
|
|
|
|
|
2003-01-15 02:05:52 +03:00
|
|
|
/**
|
|
|
|
* The nsIDOMMouseEvent interface is the datatype for all mouse events
|
|
|
|
* in the Document Object Model.
|
|
|
|
*
|
|
|
|
* For more information on this interface please see
|
|
|
|
* http://www.w3.org/TR/DOM-Level-2-Events/
|
|
|
|
*/
|
|
|
|
|
2012-12-22 12:18:08 +04:00
|
|
|
[scriptable, builtinclass, uuid(afb2e57b-2822-4969-b2a9-0cada6859534)]
|
2001-01-23 22:55:34 +03:00
|
|
|
interface nsIDOMMouseEvent : nsIDOMUIEvent
|
2001-01-21 12:10:30 +03:00
|
|
|
{
|
2001-01-22 07:34:24 +03:00
|
|
|
readonly attribute long screenX;
|
|
|
|
readonly attribute long screenY;
|
|
|
|
|
2012-04-12 01:55:21 +04:00
|
|
|
readonly attribute long mozMovementX;
|
|
|
|
readonly attribute long mozMovementY;
|
|
|
|
|
2001-01-22 07:34:24 +03:00
|
|
|
readonly attribute long clientX;
|
|
|
|
readonly attribute long clientY;
|
|
|
|
|
2001-02-09 14:56:32 +03:00
|
|
|
readonly attribute boolean ctrlKey;
|
|
|
|
readonly attribute boolean shiftKey;
|
2003-01-15 02:05:52 +03:00
|
|
|
readonly attribute boolean altKey;
|
2001-02-09 14:56:32 +03:00
|
|
|
readonly attribute boolean metaKey;
|
2001-01-22 07:34:24 +03:00
|
|
|
|
|
|
|
readonly attribute unsigned short button;
|
2012-04-25 07:00:01 +04:00
|
|
|
readonly attribute unsigned short buttons;
|
2001-01-22 07:34:24 +03:00
|
|
|
readonly attribute nsIDOMEventTarget relatedTarget;
|
|
|
|
|
|
|
|
void initMouseEvent(in DOMString typeArg,
|
2005-03-04 05:01:54 +03:00
|
|
|
in boolean canBubbleArg,
|
|
|
|
in boolean cancelableArg,
|
2011-04-24 10:54:25 +04:00
|
|
|
in nsIDOMWindow viewArg,
|
2001-11-14 13:06:21 +03:00
|
|
|
in long detailArg,
|
2001-01-22 07:34:24 +03:00
|
|
|
in long screenXArg,
|
|
|
|
in long screenYArg,
|
|
|
|
in long clientXArg,
|
|
|
|
in long clientYArg,
|
2005-03-04 05:01:54 +03:00
|
|
|
in boolean ctrlKeyArg,
|
2001-05-14 05:54:11 +04:00
|
|
|
in boolean altKeyArg,
|
|
|
|
in boolean shiftKeyArg,
|
|
|
|
in boolean metaKeyArg,
|
2001-01-22 07:34:24 +03:00
|
|
|
in unsigned short buttonArg,
|
2001-05-14 05:54:11 +04:00
|
|
|
in nsIDOMEventTarget relatedTargetArg);
|
2011-08-26 11:43:56 +04:00
|
|
|
|
|
|
|
// Finger or touch pressure event value
|
|
|
|
// ranges between 0.0 and 1.0
|
|
|
|
readonly attribute float mozPressure;
|
|
|
|
|
|
|
|
const unsigned short MOZ_SOURCE_UNKNOWN = 0;
|
|
|
|
const unsigned short MOZ_SOURCE_MOUSE = 1;
|
|
|
|
const unsigned short MOZ_SOURCE_PEN = 2;
|
|
|
|
const unsigned short MOZ_SOURCE_ERASER = 3;
|
|
|
|
const unsigned short MOZ_SOURCE_CURSOR = 4;
|
|
|
|
const unsigned short MOZ_SOURCE_TOUCH = 5;
|
|
|
|
const unsigned short MOZ_SOURCE_KEYBOARD = 6;
|
|
|
|
|
|
|
|
readonly attribute unsigned short mozInputSource;
|
|
|
|
|
|
|
|
void initNSMouseEvent(in DOMString typeArg,
|
|
|
|
in boolean canBubbleArg,
|
|
|
|
in boolean cancelableArg,
|
|
|
|
in nsIDOMWindow viewArg,
|
|
|
|
in long detailArg,
|
|
|
|
in long screenXArg,
|
|
|
|
in long screenYArg,
|
|
|
|
in long clientXArg,
|
|
|
|
in long clientYArg,
|
|
|
|
in boolean ctrlKeyArg,
|
|
|
|
in boolean altKeyArg,
|
|
|
|
in boolean shiftKeyArg,
|
|
|
|
in boolean metaKeyArg,
|
|
|
|
in unsigned short buttonArg,
|
|
|
|
in nsIDOMEventTarget relatedTargetArg,
|
|
|
|
in float pressure,
|
|
|
|
in unsigned short inputSourceArg);
|
2012-04-25 07:00:02 +04:00
|
|
|
|
|
|
|
bool getModifierState(in DOMString keyArg);
|
2001-01-21 12:10:30 +03:00
|
|
|
};
|
2011-12-15 00:36:46 +04:00
|
|
|
|
2012-03-13 08:44:48 +04:00
|
|
|
dictionary MouseEventInit : UIEventInit
|
2011-12-15 00:36:46 +04:00
|
|
|
{
|
2012-03-13 08:44:48 +04:00
|
|
|
long screenX;
|
|
|
|
long screenY;
|
|
|
|
long clientX;
|
|
|
|
long clientY;
|
|
|
|
boolean ctrlKey;
|
|
|
|
boolean shiftKey;
|
|
|
|
boolean altKey;
|
|
|
|
boolean metaKey;
|
|
|
|
unsigned short button;
|
2012-04-25 07:00:01 +04:00
|
|
|
unsigned short buttons;
|
2012-03-13 08:44:48 +04:00
|
|
|
nsIDOMEventTarget relatedTarget;
|
2011-12-15 00:36:46 +04:00
|
|
|
};
|