michael@0: /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "nsIDOMUIEvent.idl" michael@0: michael@0: /** michael@0: * The nsIDOMMouseEvent interface is the datatype for all mouse events michael@0: * in the Document Object Model. michael@0: * michael@0: * For more information on this interface please see michael@0: * http://www.w3.org/TR/DOM-Level-2-Events/ michael@0: */ michael@0: michael@0: [scriptable, builtinclass, uuid(df068636-9a5b-11e3-b71f-2c27d728e7f9)] michael@0: interface nsIDOMMouseEvent : nsIDOMUIEvent michael@0: { michael@0: readonly attribute long screenX; michael@0: readonly attribute long screenY; michael@0: michael@0: readonly attribute long mozMovementX; michael@0: readonly attribute long mozMovementY; michael@0: michael@0: readonly attribute long clientX; michael@0: readonly attribute long clientY; michael@0: michael@0: readonly attribute boolean ctrlKey; michael@0: readonly attribute boolean shiftKey; michael@0: readonly attribute boolean altKey; michael@0: readonly attribute boolean metaKey; michael@0: michael@0: readonly attribute short button; michael@0: readonly attribute unsigned short buttons; michael@0: readonly attribute nsIDOMEventTarget relatedTarget; michael@0: michael@0: void initMouseEvent(in DOMString typeArg, michael@0: in boolean canBubbleArg, michael@0: in boolean cancelableArg, michael@0: in nsIDOMWindow viewArg, michael@0: in long detailArg, michael@0: in long screenXArg, michael@0: in long screenYArg, michael@0: in long clientXArg, michael@0: in long clientYArg, michael@0: in boolean ctrlKeyArg, michael@0: in boolean altKeyArg, michael@0: in boolean shiftKeyArg, michael@0: in boolean metaKeyArg, michael@0: in unsigned short buttonArg, michael@0: in nsIDOMEventTarget relatedTargetArg); michael@0: michael@0: // Finger or touch pressure event value michael@0: // ranges between 0.0 and 1.0 michael@0: readonly attribute float mozPressure; michael@0: michael@0: const unsigned short MOZ_SOURCE_UNKNOWN = 0; michael@0: const unsigned short MOZ_SOURCE_MOUSE = 1; michael@0: const unsigned short MOZ_SOURCE_PEN = 2; michael@0: const unsigned short MOZ_SOURCE_ERASER = 3; michael@0: const unsigned short MOZ_SOURCE_CURSOR = 4; michael@0: const unsigned short MOZ_SOURCE_TOUCH = 5; michael@0: const unsigned short MOZ_SOURCE_KEYBOARD = 6; michael@0: michael@0: readonly attribute unsigned short mozInputSource; michael@0: michael@0: void initNSMouseEvent(in DOMString typeArg, michael@0: in boolean canBubbleArg, michael@0: in boolean cancelableArg, michael@0: in nsIDOMWindow viewArg, michael@0: in long detailArg, michael@0: in long screenXArg, michael@0: in long screenYArg, michael@0: in long clientXArg, michael@0: in long clientYArg, michael@0: in boolean ctrlKeyArg, michael@0: in boolean altKeyArg, michael@0: in boolean shiftKeyArg, michael@0: in boolean metaKeyArg, michael@0: in unsigned short buttonArg, michael@0: in nsIDOMEventTarget relatedTargetArg, michael@0: in float pressure, michael@0: in unsigned short inputSourceArg); michael@0: michael@0: bool getModifierState(in DOMString keyArg); michael@0: };