TouchEvent.hx 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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>A <code>TouchEvent</code> represents an event sent when the state of contacts with a touch-sensitive surface changes. This surface can be a touch screen or trackpad, for example. The event can describe one or more points of contact with the screen and includes support for detecting movement, addition and removal of contact points, and so forth.</p>
  25. <p>Touches are represented by the <code><a rel="custom" href="/api/js/html/Touch">Touch</a></code>
  26. &nbsp;object; each touch is described by a position, size and shape, amount of pressure, and target element. Lists of touches are represented by <code><a rel="custom" href="/api/js/html/TouchList">TouchList</a></code>
  27. objects.</p><br><br>
  28. Documentation for this class was provided by <a href="https://developer.mozilla.org/en/DOM/TouchEvent">MDN</a>. */
  29. @:native("TouchEvent")
  30. extern class TouchEvent extends UIEvent
  31. {
  32. /** A Boolean value indicating whether or not the alt key was down when the touch event was fired. <strong>Read only.</strong> */
  33. var altKey(default,null) : Bool;
  34. /** A <code><a rel="custom" href="https://developer.mozilla.org/en/DOM/TouchList">TouchList</a></code>
  35. of all the <code><a rel="custom" href="https://developer.mozilla.org/en/DOM/Touch">Touch</a></code>
  36. objects representing individual points of contact whose states changed between the previous touch event and this one. <strong>Read only.</strong> */
  37. var changedTouches(default,null) : TouchList;
  38. /** A Boolean value indicating whether or not the control key was down when the touch event was fired. <strong>Read only.</strong> */
  39. var ctrlKey(default,null) : Bool;
  40. /** A Boolean value indicating whether or not the meta key was down when the touch event was fired. <strong>Read only.</strong> */
  41. var metaKey(default,null) : Bool;
  42. /** A Boolean value indicating whether or not the shift key was down when the touch event was fired. <strong>Read only.</strong> */
  43. var shiftKey(default,null) : Bool;
  44. /** A <code><a rel="custom" href="https://developer.mozilla.org/en/DOM/TouchList">TouchList</a></code>
  45. of all the <code><a rel="custom" href="https://developer.mozilla.org/en/DOM/Touch">Touch</a></code>
  46. &nbsp;objects that are both currently in contact with the touch surface <strong>and</strong> were also started on the same element that is the target of the event. <strong>Read only.</strong> */
  47. var targetTouches(default,null) : TouchList;
  48. /** A <code><a rel="custom" href="https://developer.mozilla.org/en/DOM/TouchList">TouchList</a></code>
  49. of all the <code><a rel="custom" href="https://developer.mozilla.org/en/DOM/Touch">Touch</a></code>
  50. &nbsp;objects representing all current points of contact with the surface, regardless of target or changed status. <strong>Read only.</strong> */
  51. var touches(default,null) : TouchList;
  52. function initTouchEvent( touches : TouchList, targetTouches : TouchList, changedTouches : TouchList, type : String, view : DOMWindow, screenX : Int, screenY : Int, clientX : Int, clientY : Int, ctrlKey : Bool, altKey : Bool, shiftKey : Bool, metaKey : Bool ) : Void;
  53. }