1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dom/interfaces/events/nsIDOMMouseEvent.idl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,86 @@ 1.4 +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.8 + 1.9 +#include "nsIDOMUIEvent.idl" 1.10 + 1.11 +/** 1.12 + * The nsIDOMMouseEvent interface is the datatype for all mouse events 1.13 + * in the Document Object Model. 1.14 + * 1.15 + * For more information on this interface please see 1.16 + * http://www.w3.org/TR/DOM-Level-2-Events/ 1.17 + */ 1.18 + 1.19 +[scriptable, builtinclass, uuid(df068636-9a5b-11e3-b71f-2c27d728e7f9)] 1.20 +interface nsIDOMMouseEvent : nsIDOMUIEvent 1.21 +{ 1.22 + readonly attribute long screenX; 1.23 + readonly attribute long screenY; 1.24 + 1.25 + readonly attribute long mozMovementX; 1.26 + readonly attribute long mozMovementY; 1.27 + 1.28 + readonly attribute long clientX; 1.29 + readonly attribute long clientY; 1.30 + 1.31 + readonly attribute boolean ctrlKey; 1.32 + readonly attribute boolean shiftKey; 1.33 + readonly attribute boolean altKey; 1.34 + readonly attribute boolean metaKey; 1.35 + 1.36 + readonly attribute short button; 1.37 + readonly attribute unsigned short buttons; 1.38 + readonly attribute nsIDOMEventTarget relatedTarget; 1.39 + 1.40 + void initMouseEvent(in DOMString typeArg, 1.41 + in boolean canBubbleArg, 1.42 + in boolean cancelableArg, 1.43 + in nsIDOMWindow viewArg, 1.44 + in long detailArg, 1.45 + in long screenXArg, 1.46 + in long screenYArg, 1.47 + in long clientXArg, 1.48 + in long clientYArg, 1.49 + in boolean ctrlKeyArg, 1.50 + in boolean altKeyArg, 1.51 + in boolean shiftKeyArg, 1.52 + in boolean metaKeyArg, 1.53 + in unsigned short buttonArg, 1.54 + in nsIDOMEventTarget relatedTargetArg); 1.55 + 1.56 + // Finger or touch pressure event value 1.57 + // ranges between 0.0 and 1.0 1.58 + readonly attribute float mozPressure; 1.59 + 1.60 + const unsigned short MOZ_SOURCE_UNKNOWN = 0; 1.61 + const unsigned short MOZ_SOURCE_MOUSE = 1; 1.62 + const unsigned short MOZ_SOURCE_PEN = 2; 1.63 + const unsigned short MOZ_SOURCE_ERASER = 3; 1.64 + const unsigned short MOZ_SOURCE_CURSOR = 4; 1.65 + const unsigned short MOZ_SOURCE_TOUCH = 5; 1.66 + const unsigned short MOZ_SOURCE_KEYBOARD = 6; 1.67 + 1.68 + readonly attribute unsigned short mozInputSource; 1.69 + 1.70 + void initNSMouseEvent(in DOMString typeArg, 1.71 + in boolean canBubbleArg, 1.72 + in boolean cancelableArg, 1.73 + in nsIDOMWindow viewArg, 1.74 + in long detailArg, 1.75 + in long screenXArg, 1.76 + in long screenYArg, 1.77 + in long clientXArg, 1.78 + in long clientYArg, 1.79 + in boolean ctrlKeyArg, 1.80 + in boolean altKeyArg, 1.81 + in boolean shiftKeyArg, 1.82 + in boolean metaKeyArg, 1.83 + in unsigned short buttonArg, 1.84 + in nsIDOMEventTarget relatedTargetArg, 1.85 + in float pressure, 1.86 + in unsigned short inputSourceArg); 1.87 + 1.88 + bool getModifierState(in DOMString keyArg); 1.89 +};