dom/interfaces/events/nsIDOMMouseEvent.idl

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     2 /* This Source Code Form is subject to the terms of the Mozilla Public
     3  * License, v. 2.0. If a copy of the MPL was not distributed with this
     4  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     6 #include "nsIDOMUIEvent.idl"
     8 /**
     9  * The nsIDOMMouseEvent interface is the datatype for all mouse events
    10  * in the Document Object Model.
    11  *
    12  * For more information on this interface please see
    13  * http://www.w3.org/TR/DOM-Level-2-Events/
    14  */
    16 [scriptable, builtinclass, uuid(df068636-9a5b-11e3-b71f-2c27d728e7f9)]
    17 interface nsIDOMMouseEvent : nsIDOMUIEvent
    18 {
    19   readonly attribute long               screenX;
    20   readonly attribute long               screenY;
    22   readonly attribute long               mozMovementX;
    23   readonly attribute long               mozMovementY;
    25   readonly attribute long               clientX;
    26   readonly attribute long               clientY;
    28   readonly attribute boolean            ctrlKey;
    29   readonly attribute boolean            shiftKey;
    30   readonly attribute boolean            altKey;
    31   readonly attribute boolean            metaKey;
    33   readonly attribute short              button;
    34   readonly attribute unsigned short     buttons;
    35   readonly attribute nsIDOMEventTarget  relatedTarget;
    37   void                      initMouseEvent(in DOMString typeArg,
    38                                            in boolean canBubbleArg,
    39                                            in boolean cancelableArg,
    40                                            in nsIDOMWindow viewArg,
    41                                            in long detailArg,
    42                                            in long screenXArg,
    43                                            in long screenYArg,
    44                                            in long clientXArg,
    45                                            in long clientYArg,
    46                                            in boolean ctrlKeyArg,
    47                                            in boolean altKeyArg,
    48                                            in boolean shiftKeyArg,
    49                                            in boolean metaKeyArg,
    50                                            in unsigned short buttonArg,
    51                                            in nsIDOMEventTarget relatedTargetArg);
    53   // Finger or touch pressure event value
    54   // ranges between 0.0 and 1.0
    55   readonly attribute float mozPressure;
    57   const unsigned short    MOZ_SOURCE_UNKNOWN    = 0;
    58   const unsigned short    MOZ_SOURCE_MOUSE      = 1;
    59   const unsigned short    MOZ_SOURCE_PEN        = 2;
    60   const unsigned short    MOZ_SOURCE_ERASER     = 3;
    61   const unsigned short    MOZ_SOURCE_CURSOR     = 4;
    62   const unsigned short    MOZ_SOURCE_TOUCH      = 5;
    63   const unsigned short    MOZ_SOURCE_KEYBOARD   = 6;
    65   readonly attribute unsigned short mozInputSource;
    67   void                initNSMouseEvent(in DOMString typeArg,
    68                                        in boolean canBubbleArg,
    69                                        in boolean cancelableArg,
    70                                        in nsIDOMWindow viewArg,
    71                                        in long detailArg,
    72                                        in long screenXArg,
    73                                        in long screenYArg,
    74                                        in long clientXArg,
    75                                        in long clientYArg,
    76                                        in boolean ctrlKeyArg,
    77                                        in boolean altKeyArg,
    78                                        in boolean shiftKeyArg,
    79                                        in boolean metaKeyArg,
    80                                        in unsigned short buttonArg,
    81                                        in nsIDOMEventTarget relatedTargetArg,
    82                                        in float pressure,
    83                                        in unsigned short inputSourceArg);
    85   bool getModifierState(in DOMString keyArg);
    86 };

mercurial