Event.hx 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. /*
  2. * Copyright (C)2005-2013 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, do not edit!
  23. package js.html;
  24. /** <p>This chapter describes the DOM Event Model. The <a class="external" rel="external" href="http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-Event" title="http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-Event" target="_blank">Event</a> interface itself is described, as well as the interfaces for event registration on nodes in the DOM, and <a title="en/DOM/element.addEventListener" rel="internal" href="https://developer.mozilla.org/en/DOM/element.addEventListener">event listeners</a>, and several longer examples that show how the various event interfaces relate to one another.</p>
  25. <p>There is an excellent diagram that clearly explains the three phases of event flow through the DOM in the <a class="external" title="http://www.w3.org/TR/DOM-Level-3-Events/#dom-event-architecture" rel="external" href="http://www.w3.org/TR/DOM-Level-3-Events/#dom-event-architecture" target="_blank">DOM Level 3 Events draft</a>.</p><br><br>
  26. Documentation for this class was provided by <a href="https://developer.mozilla.org/en/DOM/event">MDN</a>. */
  27. @:native("Event")
  28. extern class Event
  29. {
  30. static inline var AT_TARGET : Int = 2;
  31. static inline var BLUR : Int = 8192;
  32. static inline var BUBBLING_PHASE : Int = 3;
  33. static inline var CAPTURING_PHASE : Int = 1;
  34. static inline var CHANGE : Int = 32768;
  35. static inline var CLICK : Int = 64;
  36. static inline var DBLCLICK : Int = 128;
  37. static inline var DRAGDROP : Int = 2048;
  38. static inline var FOCUS : Int = 4096;
  39. static inline var KEYDOWN : Int = 256;
  40. static inline var KEYPRESS : Int = 1024;
  41. static inline var KEYUP : Int = 512;
  42. static inline var MOUSEDOWN : Int = 1;
  43. static inline var MOUSEDRAG : Int = 32;
  44. static inline var MOUSEMOVE : Int = 16;
  45. static inline var MOUSEOUT : Int = 8;
  46. static inline var MOUSEOVER : Int = 4;
  47. static inline var MOUSEUP : Int = 2;
  48. static inline var NONE : Int = 0;
  49. static inline var SELECT : Int = 16384;
  50. /** A boolean indicating whether the event bubbles up through the DOM or not. */
  51. var bubbles(default,null) : Bool;
  52. /** A boolean indicating whether the bubbling of the event has been canceled or not. */
  53. var cancelBubble : Bool;
  54. /** A boolean indicating whether the event is cancelable. */
  55. var cancelable(default,null) : Bool;
  56. var clipboardData(default,null) : Clipboard;
  57. /** A reference to the currently registered target for the event. */
  58. var currentTarget(default,null) : EventTarget;
  59. /** Indicates whether or not <code><a rel="custom" href="https://developer.mozilla.org/en/DOM/event.preventDefault">event.preventDefault()</a></code>
  60. has been called on the event. */
  61. var defaultPrevented(default,null) : Bool;
  62. /** Indicates which phase of the event flow is being processed. */
  63. var eventPhase(default,null) : Int;
  64. var returnValue : Bool;
  65. var srcElement(default,null) : EventTarget;
  66. /** A reference to the target to which the event was originally dispatched. */
  67. var target(default,null) : EventTarget;
  68. /** The time that the event was created. */
  69. var timeStamp(default,null) : Int;
  70. /** The name of the event (case-insensitive). */
  71. var type(default,null) : String;
  72. function new( type : String, canBubble : Bool = true, cancelable : Bool = true ) : Void;
  73. function initEvent( eventTypeArg : String, canBubbleArg : Bool, cancelableArg : Bool ) : Void;
  74. function preventDefault() : Void;
  75. function stopImmediatePropagation() : Void;
  76. function stopPropagation() : Void;
  77. }