1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144
|
/*
* Copyright (C)2005-2019 Haxe Foundation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
// This file is generated from mozilla\MouseEvent.webidl. Do not edit!
package js.html;
/**
The `MouseEvent` interface represents events that occur due to the user interacting with a pointing device (such as a mouse). Common events using this interface include `click`, `dblclick`, `mouseup`, `mousedown`.
Documentation [MouseEvent](https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent) by [Mozilla Contributors](https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent$history), licensed under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/).
@see <https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent>
**/
@:native("MouseEvent")
extern class MouseEvent extends UIEvent {
/**
The X coordinate of the mouse pointer in global (screen) coordinates.
**/
var screenX(default,null) : Int;
/**
The Y coordinate of the mouse pointer in global (screen) coordinates.
**/
var screenY(default,null) : Int;
/**
The X coordinate of the mouse pointer in local (DOM content) coordinates.
**/
var clientX(default,null) : Int;
/**
The Y coordinate of the mouse pointer in local (DOM content) coordinates.
**/
var clientY(default,null) : Int;
/**
Alias for `MouseEvent.clientX`.
**/
var x(default,null) : Int;
/**
Alias for `MouseEvent.clientY`
**/
var y(default,null) : Int;
/**
The X coordinate of the mouse pointer relative to the position of the padding edge of the target node.
**/
var offsetX(default,null) : Int;
/**
The Y coordinate of the mouse pointer relative to the position of the padding edge of the target node.
**/
var offsetY(default,null) : Int;
/**
Returns `true` if the control key was down when the mouse event was fired.
**/
var ctrlKey(default,null) : Bool;
/**
Returns `true` if the shift key was down when the mouse event was fired.
**/
var shiftKey(default,null) : Bool;
/**
Returns `true` if the alt key was down when the mouse event was fired.
**/
var altKey(default,null) : Bool;
/**
Returns `true` if the meta key was down when the mouse event was fired.
**/
var metaKey(default,null) : Bool;
/**
The button number that was pressed (if applicable) when the mouse event was fired.
**/
var button(default,null) : Int;
/**
The buttons being depressed (if any) when the mouse event was fired.
**/
var buttons(default,null) : Int;
/**
The secondary target for the event, if there is one.
**/
var relatedTarget(default,null) : EventTarget;
/**
Returns the id of the hit region affected by the event. If no hit region is affected, `null` is returned.
**/
var region(default,null) : String;
/**
The X coordinate of the mouse pointer relative to the position of the last `mousemove` event.
**/
var movementX(default,null) : Int;
/**
The Y coordinate of the mouse pointer relative to the position of the last `mousemove` event.
**/
var movementY(default,null) : Int;
/** @throws DOMError */
function new( typeArg : String, ?mouseEventInitDict : MouseEventInit ) : Void;
/**
Initializes the value of a `MouseEvent` created. If the event has already being dispatched, this method does nothing.
**/
function initMouseEvent( typeArg : String, canBubbleArg : Bool = false, cancelableArg : Bool = false, ?viewArg : Window, detailArg : Int = 0, screenXArg : Int = 0, screenYArg : Int = 0, clientXArg : Int = 0, clientYArg : Int = 0, ctrlKeyArg : Bool = false, altKeyArg : Bool = false, shiftKeyArg : Bool = false, metaKeyArg : Bool = false, buttonArg : Int = 0, ?relatedTargetArg : EventTarget ) : Void;
/**
Returns the current state of the specified modifier key. See the `KeyboardEvent.getModifierState`() for details.
**/
function getModifierState( keyArg : String ) : Bool;
function initNSMouseEvent( typeArg : String, canBubbleArg : Bool = false, cancelableArg : Bool = false, ?viewArg : Window, detailArg : Int = 0, screenXArg : Int = 0, screenYArg : Int = 0, clientXArg : Int = 0, clientYArg : Int = 0, ctrlKeyArg : Bool = false, altKeyArg : Bool = false, shiftKeyArg : Bool = false, metaKeyArg : Bool = false, buttonArg : Int = 0, ?relatedTargetArg : EventTarget, pressure : Float = 0.0, inputSourceArg : Int = 0 ) : Void;
}
|