|
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/. */ |
|
5 |
|
6 #include "nsIDOMUIEvent.idl" |
|
7 |
|
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 */ |
|
15 |
|
16 [scriptable, builtinclass, uuid(df068636-9a5b-11e3-b71f-2c27d728e7f9)] |
|
17 interface nsIDOMMouseEvent : nsIDOMUIEvent |
|
18 { |
|
19 readonly attribute long screenX; |
|
20 readonly attribute long screenY; |
|
21 |
|
22 readonly attribute long mozMovementX; |
|
23 readonly attribute long mozMovementY; |
|
24 |
|
25 readonly attribute long clientX; |
|
26 readonly attribute long clientY; |
|
27 |
|
28 readonly attribute boolean ctrlKey; |
|
29 readonly attribute boolean shiftKey; |
|
30 readonly attribute boolean altKey; |
|
31 readonly attribute boolean metaKey; |
|
32 |
|
33 readonly attribute short button; |
|
34 readonly attribute unsigned short buttons; |
|
35 readonly attribute nsIDOMEventTarget relatedTarget; |
|
36 |
|
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); |
|
52 |
|
53 // Finger or touch pressure event value |
|
54 // ranges between 0.0 and 1.0 |
|
55 readonly attribute float mozPressure; |
|
56 |
|
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; |
|
64 |
|
65 readonly attribute unsigned short mozInputSource; |
|
66 |
|
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); |
|
84 |
|
85 bool getModifierState(in DOMString keyArg); |
|
86 }; |