2 * Copyright (C) 2010, 2011, 2014-2015 Apple Inc. All rights reserved.
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
14 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23 * THE POSSIBILITY OF SUCH DAMAGE.
26 dictionary MonitorWheelEventsOptions {
27 boolean resetLatching = true;
30 interface EventSendingController {
31 undefined mouseDown(long buttonNumber, object modifierArray, optional DOMString pointerType);
32 undefined mouseUp(long buttonNumber, object modifierArray, optional DOMString pointerType);
33 undefined mouseMoveTo(long x, long y, optional DOMString pointerType);
34 undefined mouseForceClick();
35 undefined startAndCancelMouseForceClick();
36 undefined mouseForceDown();
37 undefined mouseForceUp();
38 undefined mouseForceChanged(double force);
39 undefined mouseScrollBy(long x, long y);
40 undefined mouseScrollByWithWheelAndMomentumPhases(long x, long y, DOMString phase, DOMString momentum);
41 undefined setWheelHasPreciseDeltas(boolean hasPreciseDeltas);
42 undefined continuousMouseScrollBy(long x, long y, optional boolean paged);
43 object contextClick();
44 undefined scheduleAsynchronousClick();
46 undefined leapForward(long milliseconds);
48 // keyDown is really keyUpAndDown, and perhaps should be renamed to reflect that.
49 // rawKeyDown is just the keyDown, and rawKeyUp is just the keyUp
50 undefined keyDown(DOMString key, object modifierArray, long location);
51 undefined rawKeyDown(DOMString key, object modifierArray, long location);
52 undefined rawKeyUp(DOMString key, object modifierArray, long location);
53 undefined scheduleAsynchronousKeyDown(DOMString key);
56 undefined textZoomIn();
57 undefined textZoomOut();
58 undefined zoomPageIn();
59 undefined zoomPageOut();
60 undefined scalePageBy(double scale, double x, double y);
62 undefined monitorWheelEvents(optional MonitorWheelEventsOptions options);
63 undefined callAfterScrollingCompletes(object functionCallback);
65 #if defined(ENABLE_TOUCH_EVENTS) && ENABLE_TOUCH_EVENTS
67 undefined addTouchPoint(long x, long y);
68 undefined updateTouchPoint(long index, long x, long y);
69 undefined setTouchModifier(DOMString modifier, boolean enable);
70 undefined setTouchPointRadius(long radiusX, long radiusY);
71 undefined touchStart();
72 undefined touchMove();
74 undefined touchCancel();
75 undefined clearTouchPoints();
76 undefined releaseTouchPoint(long index);
77 undefined cancelTouchPoint(long index);
80 #if defined(ENABLE_MAC_GESTURE_EVENTS) && ENABLE_MAC_GESTURE_EVENTS
82 undefined scaleGestureStart(double scale);
83 undefined scaleGestureChange(double scale);
84 undefined scaleGestureEnd(double scale);