Replace WTF::move with WTFMove
[WebKit-https.git] / Source / WebCore / dom / MouseEvent.idl
1 /*
2  * Copyright (C) 2006, 2007, 2015 Apple Inc. All rights reserved.
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Library General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Library General Public License for more details.
13  *
14  * You should have received a copy of the GNU Library General Public License
15  * along with this library; see the file COPYING.LIB.  If not, write to
16  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17  * Boston, MA 02110-1301, USA.
18  */
19
20 [
21     ConstructorConditional=DOM4_EVENTS_CONSTRUCTOR,
22     ConstructorTemplate=Event,
23     DoNotCheckConstants,
24 ] interface MouseEvent : UIEvent {
25 #if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT
26     [Conditional=MOUSE_FORCE_EVENTS] const double WEBKIT_FORCE_AT_MOUSE_DOWN        = 1;
27     [Conditional=MOUSE_FORCE_EVENTS] const double WEBKIT_FORCE_AT_FORCE_MOUSE_DOWN  = 2;
28 #endif
29
30     [InitializedByEventConstructor] readonly attribute long             screenX;
31     [InitializedByEventConstructor] readonly attribute long             screenY;
32     [InitializedByEventConstructor] readonly attribute long             clientX;
33     [InitializedByEventConstructor] readonly attribute long             clientY;
34     [InitializedByEventConstructor] readonly attribute boolean          ctrlKey;
35     [InitializedByEventConstructor] readonly attribute boolean          shiftKey;
36     [InitializedByEventConstructor] readonly attribute boolean          altKey;
37     [InitializedByEventConstructor] readonly attribute boolean          metaKey;
38     [InitializedByEventConstructor] readonly attribute unsigned short   button;
39     [InitializedByEventConstructor] readonly attribute EventTarget      relatedTarget;
40     [Conditional=POINTER_LOCK]      readonly attribute long             movementX;
41     [Conditional=POINTER_LOCK]      readonly attribute long             movementY;
42 #if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT
43     [Conditional=MOUSE_FORCE_EVENTS, ImplementedAs=force]readonly attribute double  webkitForce;
44 #endif
45     
46     [ObjCLegacyUnnamedParameters] void initMouseEvent([Default=Undefined] optional DOMString type, 
47                                        [Default=Undefined] optional boolean canBubble, 
48                                        [Default=Undefined] optional boolean cancelable, 
49                                        [Default=Undefined] optional DOMWindow view, 
50                                        [Default=Undefined] optional long detail, 
51                                        [Default=Undefined] optional long screenX, 
52                                        [Default=Undefined] optional long screenY, 
53                                        [Default=Undefined] optional long clientX, 
54                                        [Default=Undefined] optional long clientY, 
55                                        [Default=Undefined] optional boolean ctrlKey, 
56                                        [Default=Undefined] optional boolean altKey, 
57                                        [Default=Undefined] optional boolean shiftKey, 
58                                        [Default=Undefined] optional boolean metaKey, 
59                                        [Default=Undefined] optional unsigned short button, 
60                                        [Default=Undefined] optional EventTarget relatedTarget);
61
62     // extensions
63     readonly attribute long             offsetX;
64     readonly attribute long             offsetY;
65     readonly attribute long             x;
66     readonly attribute long             y;
67     readonly attribute Node             fromElement;
68     readonly attribute Node             toElement;
69
70 #if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT
71     readonly attribute DataTransfer     dataTransfer;
72 #endif
73 };
74