Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
michael@0 | 2 | /* vim: set ts=2 et sw=2 tw=80: */ |
michael@0 | 3 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 4 | * License, v. 2.0. If a copy of the MPL was not distributed with this file, |
michael@0 | 5 | * You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 6 | |
michael@0 | 7 | #include "nsIDOMMouseEvent.idl" |
michael@0 | 8 | |
michael@0 | 9 | [scriptable, builtinclass, uuid(86e2b577-7e61-4ed5-8ddd-c1533bf07137)] |
michael@0 | 10 | interface nsIDOMWheelEvent : nsIDOMMouseEvent |
michael@0 | 11 | { |
michael@0 | 12 | const unsigned long DOM_DELTA_PIXEL = 0x00; |
michael@0 | 13 | const unsigned long DOM_DELTA_LINE = 0x01; |
michael@0 | 14 | const unsigned long DOM_DELTA_PAGE = 0x02; |
michael@0 | 15 | |
michael@0 | 16 | // Note that DOM Level 3 Events defines the type of delta values as float. |
michael@0 | 17 | // However, we should use double for them. Javascript engine always uses |
michael@0 | 18 | // double even if interface attributes are float. If we defined them |
michael@0 | 19 | // as float, that would cause error at casting from float to double. |
michael@0 | 20 | // E.g., following function may return false if the deltaX is float: |
michael@0 | 21 | // |
michael@0 | 22 | // function () { |
michael@0 | 23 | // var event = new WheelEvent("wheel", { deltaX: 0.1 }); |
michael@0 | 24 | // return (event.deltaX == 0.1); |
michael@0 | 25 | // } |
michael@0 | 26 | |
michael@0 | 27 | readonly attribute double deltaX; |
michael@0 | 28 | readonly attribute double deltaY; |
michael@0 | 29 | readonly attribute double deltaZ; |
michael@0 | 30 | readonly attribute unsigned long deltaMode; |
michael@0 | 31 | |
michael@0 | 32 | [noscript] void initWheelEvent(in DOMString typeArg, |
michael@0 | 33 | in boolean canBubbleArg, |
michael@0 | 34 | in boolean cancelableArg, |
michael@0 | 35 | in nsIDOMWindow viewArg, |
michael@0 | 36 | in long detailArg, |
michael@0 | 37 | in long screenXArg, |
michael@0 | 38 | in long screenYArg, |
michael@0 | 39 | in long clientXArg, |
michael@0 | 40 | in long clientYArg, |
michael@0 | 41 | in unsigned short buttonArg, |
michael@0 | 42 | in nsIDOMEventTarget relatedTargetArg, |
michael@0 | 43 | in DOMString modifiersListArg, |
michael@0 | 44 | in double deltaXArg, |
michael@0 | 45 | in double deltaYArg, |
michael@0 | 46 | in double deltaZArg, |
michael@0 | 47 | in unsigned long deltaMode); |
michael@0 | 48 | }; |