MouseEvent.hx 5.3 KB

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