mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Add bindings for TouchEvent DOM interfaces
This commit is contained in:
parent
79f300f038
commit
4ed15a8853
9 changed files with 302 additions and 1 deletions
21
components/script/dom/webidls/Touch.webidl
Normal file
21
components/script/dom/webidls/Touch.webidl
Normal file
|
@ -0,0 +1,21 @@
|
|||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
// http://w3c.github.io/touch-events/#idl-def-Touch
|
||||
|
||||
interface Touch {
|
||||
readonly attribute long identifier;
|
||||
readonly attribute EventTarget target;
|
||||
readonly attribute double screenX;
|
||||
readonly attribute double screenY;
|
||||
readonly attribute double clientX;
|
||||
readonly attribute double clientY;
|
||||
// readonly attribute double pageX;
|
||||
// readonly attribute double pageY;
|
||||
// readonly attribute float radiusX;
|
||||
// readonly attribute float radiusY;
|
||||
// readonly attribute float rotationAngle;
|
||||
// readonly attribute float force;
|
||||
};
|
16
components/script/dom/webidls/TouchEvent.webidl
Normal file
16
components/script/dom/webidls/TouchEvent.webidl
Normal file
|
@ -0,0 +1,16 @@
|
|||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
// http://w3c.github.io/touch-events/#idl-def-TouchEvent
|
||||
|
||||
interface TouchEvent : UIEvent {
|
||||
readonly attribute TouchList touches;
|
||||
readonly attribute TouchList targetTouches;
|
||||
readonly attribute TouchList changedTouches;
|
||||
readonly attribute boolean altKey;
|
||||
readonly attribute boolean metaKey;
|
||||
readonly attribute boolean ctrlKey;
|
||||
readonly attribute boolean shiftKey;
|
||||
};
|
11
components/script/dom/webidls/TouchList.webidl
Normal file
11
components/script/dom/webidls/TouchList.webidl
Normal file
|
@ -0,0 +1,11 @@
|
|||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
// http://w3c.github.io/touch-events/#idl-def-TouchList
|
||||
|
||||
interface TouchList {
|
||||
readonly attribute unsigned long length;
|
||||
getter Touch? item (unsigned long index);
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue