author | Josh Soref <josh.soref@nokia.com> |
Sun, 01 May 2011 11:04:32 +0200 | |
changeset 85 | 5c770b2dd992 |
parent 84 | 95c76867a243 |
child 86 | 653218ffd9c4 |
permissions | -rw-r--r-- |
4 | 1 |
<!DOCTYPE html> |
74
b1920268c222
Add language and viewport metadata.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
73
diff
changeset
|
2 |
<html lang="en"> |
4 | 3 |
<head> |
4 |
<title>Touch Events Specification</title> |
|
5 |
<meta http-equiv='Content-Type' content='text/html;charset=utf-8'/> |
|
74
b1920268c222
Add language and viewport metadata.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
73
diff
changeset
|
6 |
<meta name="viewport" content="width=device-width"> |
20
3a04fe9b8ef2
Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
19
diff
changeset
|
7 |
<!-- |
4 | 8 |
=== NOTA BENE === |
9 |
For the three scripts below, if your spec resides on dev.w3 you can check them |
|
10 |
out in the same tree and use relative links so that they'll work offline, |
|
11 |
--> |
|
12 |
<script src='http://dev.w3.org/2009/dap/ReSpec.js/js/respec.js' class='remove'></script> |
|
13 |
<script class='remove'> |
|
14 |
var respecConfig = { |
|
15 |
// specification status (e.g. WD, LCWD, NOTE, etc.). If in doubt use ED. |
|
16 |
specStatus: "ED", |
|
20
3a04fe9b8ef2
Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
19
diff
changeset
|
17 |
|
4 | 18 |
// the specification's short name, as in http://www.w3.org/TR/short-name/ |
19 |
shortName: "touch-events", |
|
20 |
||
21 |
// if your specification has a subtitle that goes below the main |
|
22 |
// formal title, define it here |
|
23 |
// subtitle : "an excellent document", |
|
24 |
||
25 |
// if you wish the publication date to be other than today, set this |
|
81
e5b2d26a6892
Corrected changes clobbered due to mistake
Sangwhan Moon <smoon@opera.com>
parents:
80
diff
changeset
|
26 |
publishDate: "2011-05-05", |
4 | 27 |
|
28 |
// if the specification's copyright date is a range of years, specify |
|
29 |
// the start date here: |
|
30 |
// copyrightStart: "2005" |
|
31 |
||
32 |
// if there is a previously published draft, uncomment this and set its YYYY-MM-DD date |
|
33 |
// and its maturity status |
|
34 |
// previousPublishDate: "1977-03-15", |
|
35 |
// previousMaturity: "WD", |
|
36 |
||
37 |
// if there a publicly available Editor's Draft, this is the link |
|
73
16faff414b81
Link to default branch rather than tip.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
72
diff
changeset
|
38 |
edDraftURI: "http://dvcs.w3.org/hg/webevents/raw-file/default/touchevents.html", |
4 | 39 |
|
40 |
// if this is a LCWD, uncomment and set the end of its review period |
|
41 |
// lcEnd: "2009-08-05", |
|
42 |
||
43 |
// if you want to have extra CSS, append them to this list |
|
44 |
// it is recommended that the respec.css stylesheet be kept |
|
8
3349d49e5f46
added force attribute; added issues around InkML, units, preventDefault(), timestamp
shepazu <schepers@w3.org>
parents:
7
diff
changeset
|
45 |
extraCSS: ["http://www.w3.org/StyleSheets/TR/W3C-TR.css", "http://dev.w3.org/2009/dap/ReSpec.js/css/respec.css"], |
4 | 46 |
|
47 |
// editors, add as many as you like |
|
48 |
// only "name" is required |
|
49 |
editors: [ |
|
50 |
{ name: "Doug Schepers", url: "http://schepers.cc/", |
|
51 |
company: "W3C", companyURL: "http://w3.org/" }, |
|
9
8171bbe11ccc
changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents:
8
diff
changeset
|
52 |
{ name: "Sangwhan Moon", |
8171bbe11ccc
changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents:
8
diff
changeset
|
53 |
company: "Opera Software ASA", companyURL: "http://www.opera.com/" }, |
8171bbe11ccc
changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents:
8
diff
changeset
|
54 |
{ name: "Matt Brubeck", |
8171bbe11ccc
changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents:
8
diff
changeset
|
55 |
company: "Mozilla", companyURL: "http://www.mozilla.org/" }, |
4 | 56 |
], |
57 |
||
20
3a04fe9b8ef2
Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
19
diff
changeset
|
58 |
// authors, add as many as you like. |
4 | 59 |
// This is optional, uncomment if you have authors as well as editors. |
60 |
// only "name" is required. Same format as editors. |
|
61 |
||
62 |
//authors: [ |
|
63 |
// { name: "Your Name", url: "http://example.org/", |
|
64 |
// company: "Your Company", companyURL: "http://example.com/" }, |
|
65 |
//], |
|
20
3a04fe9b8ef2
Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
19
diff
changeset
|
66 |
|
4 | 67 |
// name of the WG |
68 |
wg: "Web Events Working Group", |
|
20
3a04fe9b8ef2
Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
19
diff
changeset
|
69 |
|
4 | 70 |
// URI of the public WG page |
71 |
wgURI: "http://www.w3.org/2010/webevents/", |
|
20
3a04fe9b8ef2
Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
19
diff
changeset
|
72 |
|
4 | 73 |
// name (with the @w3c.org) of the public mailing to which comments are due |
74 |
wgPublicList: "public-webevents", |
|
20
3a04fe9b8ef2
Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
19
diff
changeset
|
75 |
|
4 | 76 |
// URI of the patent status for this WG, for Rec-track documents |
77 |
// !!!! IMPORTANT !!!! |
|
78 |
// This is important for Rec-track documents, do not copy a patent URI from a random |
|
79 |
// document unless you know what you're doing. If in doubt ask your friendly neighbourhood |
|
80 |
// Team Contact. |
|
81 |
wgPatentURI: "http://www.w3.org/2004/01/pp-impl/45559/status", |
|
82 |
}; |
|
83 |
</script> |
|
20
3a04fe9b8ef2
Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
19
diff
changeset
|
84 |
|
66
9555f231576e
Fix another validation error.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
61
diff
changeset
|
85 |
<style type="text/css"> |
9
8171bbe11ccc
changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents:
8
diff
changeset
|
86 |
.event { |
8171bbe11ccc
changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents:
8
diff
changeset
|
87 |
font-family: monospace; |
8171bbe11ccc
changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents:
8
diff
changeset
|
88 |
color: #459900; |
8171bbe11ccc
changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents:
8
diff
changeset
|
89 |
} |
23
4958878564b1
ISSUE-8: Add an initTouchEvent method.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
22
diff
changeset
|
90 |
|
4958878564b1
ISSUE-8: Add an initTouchEvent method.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
22
diff
changeset
|
91 |
pre.idl { |
4958878564b1
ISSUE-8: Add an initTouchEvent method.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
22
diff
changeset
|
92 |
white-space: pre-wrap; |
4958878564b1
ISSUE-8: Add an initTouchEvent method.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
22
diff
changeset
|
93 |
} |
9
8171bbe11ccc
changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents:
8
diff
changeset
|
94 |
</style> |
4 | 95 |
</head> |
96 |
<body> |
|
97 |
<section id='abstract'> |
|
85 | 98 |
The Touch Interface specification defines a set of low-level events that |
99 |
represent one or more points of contact with a touch-sensitive surface, |
|
100 |
and changes of those points with respect to the surface and any DOM |
|
101 |
elements displayed upon it (e.g. for touch screens) or associated with it |
|
102 |
(e.g. for drawing tablets without displays). It also addresses |
|
103 |
pen-tablet devices, such as drawing tablets, with consideration toward |
|
104 |
stylus capabilities. |
|
4 | 105 |
</section> |
5 | 106 |
|
81
e5b2d26a6892
Corrected changes clobbered due to mistake
Sangwhan Moon <smoon@opera.com>
parents:
80
diff
changeset
|
107 |
<section id='introduction' class='informative'> |
e5b2d26a6892
Corrected changes clobbered due to mistake
Sangwhan Moon <smoon@opera.com>
parents:
80
diff
changeset
|
108 |
<h2>Introduction</h2> |
e5b2d26a6892
Corrected changes clobbered due to mistake
Sangwhan Moon <smoon@opera.com>
parents:
80
diff
changeset
|
109 |
|
85 | 110 |
<p> |
111 |
User Agents that run on terminals which provide touch input to use web |
|
112 |
applications typically use interpreted mouse events to allow the users |
|
113 |
to access interactive web applications. However, these interpreted |
|
114 |
events, being normalized data based on the physical touch input, tend |
|
115 |
to have limitations on delivering the exact intended user experience. |
|
116 |
Additionally, it is not possible to handle concurrent input regardless |
|
117 |
of the device capability, due the constraints of mouse events: both |
|
118 |
system level limitations, and legacy compatibility. |
|
119 |
</p> |
|
81
e5b2d26a6892
Corrected changes clobbered due to mistake
Sangwhan Moon <smoon@opera.com>
parents:
80
diff
changeset
|
120 |
|
85 | 121 |
<p> |
122 |
Meanwhile, native applications are capable of handling both cases with |
|
123 |
the provided system APIs. |
|
124 |
</p> |
|
125 |
||
126 |
<p> |
|
127 |
The Touch Events specification provides a solution to this problem by |
|
128 |
specifing interfaces to allow web applications to directly handle touch |
|
129 |
events, and multiple touch points for capable devices. |
|
130 |
</p> |
|
81
e5b2d26a6892
Corrected changes clobbered due to mistake
Sangwhan Moon <smoon@opera.com>
parents:
80
diff
changeset
|
131 |
</section> |
e5b2d26a6892
Corrected changes clobbered due to mistake
Sangwhan Moon <smoon@opera.com>
parents:
80
diff
changeset
|
132 |
|
28
4cbcb68446b5
First draft of a Conformance section based on the DAP WG's Contacts API:
Art Barstow <art.barstow@nokia.com>
parents:
27
diff
changeset
|
133 |
<section id='conformance'> |
85 | 134 |
<p> |
135 |
This specification defines conformance criteria that apply to a single |
|
136 |
product: the <dfn id="dfn-user-agent">user agent</dfn> that implements |
|
137 |
the interfaces that it contains. |
|
138 |
</p> |
|
28
4cbcb68446b5
First draft of a Conformance section based on the DAP WG's Contacts API:
Art Barstow <art.barstow@nokia.com>
parents:
27
diff
changeset
|
139 |
|
85 | 140 |
<p> |
141 |
Implementations that use ECMAScript to implement the APIs defined in |
|
142 |
this specification must implement them in a manner consistent with the |
|
143 |
ECMAScript Bindings defined in the Web IDL specification [[!WEBIDL]] as |
|
144 |
this specification uses that specification and terminology. |
|
145 |
</p> |
|
28
4cbcb68446b5
First draft of a Conformance section based on the DAP WG's Contacts API:
Art Barstow <art.barstow@nokia.com>
parents:
27
diff
changeset
|
146 |
|
85 | 147 |
<p> |
148 |
A conforming implementation is required to implement all fields |
|
149 |
defined in this specification. |
|
150 |
</p> |
|
28
4cbcb68446b5
First draft of a Conformance section based on the DAP WG's Contacts API:
Art Barstow <art.barstow@nokia.com>
parents:
27
diff
changeset
|
151 |
</section> |
20
3a04fe9b8ef2
Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
19
diff
changeset
|
152 |
|
4 | 153 |
<section> |
46
e761aa494278
ISSUE-11: Rename TouchPoint to Touch
Matt Brubeck <mbrubeck@mozilla.com>
parents:
45
diff
changeset
|
154 |
<h2><a>Touch</a> Interface</h2> |
85 | 155 |
<p> |
156 |
This interface defines an individual point of contact for a touch |
|
157 |
event. |
|
158 |
</p> |
|
20
3a04fe9b8ef2
Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
19
diff
changeset
|
159 |
|
46
e761aa494278
ISSUE-11: Rename TouchPoint to Touch
Matt Brubeck <mbrubeck@mozilla.com>
parents:
45
diff
changeset
|
160 |
<dl title='interface Touch' class='idl'> |
9
8171bbe11ccc
changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents:
8
diff
changeset
|
161 |
<dt>readonly attribute long identifier</dt> |
5 | 162 |
<dd> |
85 | 163 |
An identification number for each <a>touch point</a>, unique to that |
164 |
<a>touch point</a> per session. |
|
20
3a04fe9b8ef2
Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
19
diff
changeset
|
165 |
|
85 | 166 |
<p> |
167 |
The algorithm for determining the <a>identifier</a> value is as |
|
168 |
follows: |
|
169 |
</p> |
|
10
bad00fb0d663
added identifier algorithm; added glossary; added timestamp to TouchPoint
shepazu <schepers@w3.org>
parents:
9
diff
changeset
|
170 |
<ol> |
85 | 171 |
<li> |
172 |
if there are no other <a>active touch event session</a>s, the |
|
173 |
value of <a>identifier</a> must be <code>0</code> |
|
174 |
</li> |
|
175 |
<li> |
|
176 |
if there is at least one <a>active touch event session</a>, the |
|
177 |
value of <a>identifier</a> must be the lowest integer not |
|
178 |
currently used by any active <a>Touch</a> object in any |
|
179 |
<a>active touch event session</a> |
|
180 |
</li> |
|
19
f6cda6b9d1ae
ISSUE-7: Event targets should be Elements.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
18
diff
changeset
|
181 |
</ol> |
5 | 182 |
</dd> |
4 | 183 |
|
9
8171bbe11ccc
changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents:
8
diff
changeset
|
184 |
<dt>readonly attribute long screenX</dt> |
5 | 185 |
<dd> |
186 |
x-coordinate of point relative to the screen |
|
187 |
</dd> |
|
9
8171bbe11ccc
changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents:
8
diff
changeset
|
188 |
<dt>readonly attribute long screenY</dt> |
5 | 189 |
<dd> |
190 |
y-coordinate of point relative to the screen |
|
191 |
</dd> |
|
4 | 192 |
|
9
8171bbe11ccc
changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents:
8
diff
changeset
|
193 |
<dt>readonly attribute long clientX</dt> |
5 | 194 |
<dd> |
85 | 195 |
x-coordinate of point relative to the viewport, excluding any scroll |
196 |
offset |
|
5 | 197 |
</dd> |
9
8171bbe11ccc
changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents:
8
diff
changeset
|
198 |
<dt>readonly attribute long clientY</dt> |
5 | 199 |
<dd> |
85 | 200 |
y-coordinate of point relative to the viewport, excluding any scroll |
201 |
offset |
|
5 | 202 |
</dd> |
203 |
||
9
8171bbe11ccc
changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents:
8
diff
changeset
|
204 |
<dt>readonly attribute long pageX</dt> |
5 | 205 |
<dd> |
85 | 206 |
x-coordinate of point relative to the viewport, including any scroll |
207 |
offset |
|
5 | 208 |
</dd> |
9
8171bbe11ccc
changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents:
8
diff
changeset
|
209 |
<dt>readonly attribute long pageY</dt> |
5 | 210 |
<dd> |
85 | 211 |
y-coordinate of point relative to the viewport, including any scroll |
212 |
offset |
|
5 | 213 |
</dd> |
214 |
||
9
8171bbe11ccc
changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents:
8
diff
changeset
|
215 |
<dt>readonly attribute long radiusX</dt> |
5 | 216 |
<dd> |
85 | 217 |
the radius of the ellipse which most closely circumscribes the |
218 |
touching area (e.g. finger, stylus) along the x-axis, in pixels of |
|
219 |
the same scale as <a>screenX</a>; <code>1</code> if no value is |
|
220 |
known. The value must be positive. |
|
221 |
<p class="issue" id="issue-units"><strong>Issue:</strong> What are |
|
222 |
units of radiusX/radiusY? CSS Pixels?</p> |
|
5 | 223 |
</dd> |
9
8171bbe11ccc
changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents:
8
diff
changeset
|
224 |
<dt>readonly attribute long radiusY</dt> |
5 | 225 |
<dd> |
85 | 226 |
the radius of the ellipse which most closely circumscribes the |
227 |
touching area (e.g. finger, stylus) along the y-axis, in pixels of |
|
228 |
the same scale as <a>screenY</a>; <code>1</code> if no value is |
|
229 |
known. The value must be positive. |
|
6
83ce29dff849
changed cx/cy to rx/ry, defined units for both; added key modifier attributes; changed identifier to float
shepazu <schepers@w3.org>
parents:
5
diff
changeset
|
230 |
</dd> |
83ce29dff849
changed cx/cy to rx/ry, defined units for both; added key modifier attributes; changed identifier to float
shepazu <schepers@w3.org>
parents:
5
diff
changeset
|
231 |
|
18
1ea45991d3e9
ISSUE-1: Add rotationAngle attribute for elliptical touch areas.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
17
diff
changeset
|
232 |
<dt>readonly attribute float rotationAngle</dt> |
1ea45991d3e9
ISSUE-1: Add rotationAngle attribute for elliptical touch areas.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
17
diff
changeset
|
233 |
<dd> |
32
f1cd4dbbd6f8
Wrap these lines to 80 characters.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
31
diff
changeset
|
234 |
<p> |
f1cd4dbbd6f8
Wrap these lines to 80 characters.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
31
diff
changeset
|
235 |
the angle (in degrees) that the ellipse described by <a>radiusX</a> |
f1cd4dbbd6f8
Wrap these lines to 80 characters.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
31
diff
changeset
|
236 |
and <a>radiusY</a> is rotated clockwise about its center; |
33
be8b19639be5
ACTION-31: Remove restriction on rotationAngle and add explanation.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
32
diff
changeset
|
237 |
<code>0</code> if no value is known. The value must be greater |
be8b19639be5
ACTION-31: Remove restriction on rotationAngle and add explanation.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
32
diff
changeset
|
238 |
than or equal to <code>0</code> and less than <code>90</code>. |
32
f1cd4dbbd6f8
Wrap these lines to 80 characters.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
31
diff
changeset
|
239 |
</p> |
f1cd4dbbd6f8
Wrap these lines to 80 characters.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
31
diff
changeset
|
240 |
<p> |
f1cd4dbbd6f8
Wrap these lines to 80 characters.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
31
diff
changeset
|
241 |
If the ellipse described by <a>radiusX</a> and <a>radiusY</a> is |
33
be8b19639be5
ACTION-31: Remove restriction on rotationAngle and add explanation.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
32
diff
changeset
|
242 |
circular, then <a>rotationAngle</a> has no effect. The user agent |
be8b19639be5
ACTION-31: Remove restriction on rotationAngle and add explanation.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
32
diff
changeset
|
243 |
may use <code>0</code> as the value in this case, or it may use any |
be8b19639be5
ACTION-31: Remove restriction on rotationAngle and add explanation.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
32
diff
changeset
|
244 |
other value in the allowed range. (For example, the user agent may |
37
d5eb1e9315e7
Minor wording change for clarity.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
36
diff
changeset
|
245 |
use the <a>rotationAngle</a> value from the previous touch event, |
d5eb1e9315e7
Minor wording change for clarity.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
36
diff
changeset
|
246 |
to avoid sudden changes.) |
32
f1cd4dbbd6f8
Wrap these lines to 80 characters.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
31
diff
changeset
|
247 |
</p> |
18
1ea45991d3e9
ISSUE-1: Add rotationAngle attribute for elliptical touch areas.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
17
diff
changeset
|
248 |
</dd> |
1ea45991d3e9
ISSUE-1: Add rotationAngle attribute for elliptical touch areas.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
17
diff
changeset
|
249 |
|
8
3349d49e5f46
added force attribute; added issues around InkML, units, preventDefault(), timestamp
shepazu <schepers@w3.org>
parents:
7
diff
changeset
|
250 |
<dt>readonly attribute float force</dt> |
3349d49e5f46
added force attribute; added issues around InkML, units, preventDefault(), timestamp
shepazu <schepers@w3.org>
parents:
7
diff
changeset
|
251 |
<dd> |
85 | 252 |
a relative value of pressure applied, in the range <code>0</code> to |
253 |
<code>1</code>, where <code>0</code> is no pressure, and |
|
254 |
<code>1</code> is the highest level of pressure the touch device is |
|
255 |
capable of sensing; <code>0</code> if no value is known. In |
|
256 |
environments where <a>force</a> is known, the absolute pressure |
|
257 |
represented by the <a>force</a> attribute, and the sensitivity in |
|
258 |
levels of pressure, may vary. |
|
10
bad00fb0d663
added identifier algorithm; added glossary; added timestamp to TouchPoint
shepazu <schepers@w3.org>
parents:
9
diff
changeset
|
259 |
|
85 | 260 |
<p class="issue" id="issue-inkml"> |
261 |
<strong>Issue:</strong> |
|
262 |
Consider aligning with other "channels" and values from |
|
263 |
<a href="http://www.w3.org/TR/InkML/#channelContents">Ink Markup |
|
264 |
Language (InkML)</a>, in addition to <a>force</a>, e.g. adding |
|
265 |
<a>angle</a>, <a>clientZ</a>, <a>rotation</a>, etc. |
|
266 |
</p> |
|
8
3349d49e5f46
added force attribute; added issues around InkML, units, preventDefault(), timestamp
shepazu <schepers@w3.org>
parents:
7
diff
changeset
|
267 |
</dd> |
5 | 268 |
</dl> |
269 |
</section> |
|
270 |
||
271 |
<section> |
|
9
8171bbe11ccc
changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents:
8
diff
changeset
|
272 |
<h2><a>TouchList</a> Interface</h2> |
85 | 273 |
<p> |
274 |
This interface defines a list of individual points of contact for a |
|
275 |
touch event. |
|
276 |
</p> |
|
20
3a04fe9b8ef2
Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
19
diff
changeset
|
277 |
|
5 | 278 |
<dl title='interface TouchList' class='idl'> |
279 |
<dt>readonly attribute unsigned long length</dt> |
|
280 |
<dd> |
|
47
926af59e3515
Fix typos in previous commit
Matt Brubeck <mbrubeck@mozilla.com>
parents:
46
diff
changeset
|
281 |
returns the number of <a>Touch</a>es in the list |
5 | 282 |
</dd> |
60
cc50b9cdc4f8
Remove 'caller'/'caller getter' from item/identifiedTouch
Matt Brubeck <mbrubeck@mozilla.com>
parents:
59
diff
changeset
|
283 |
<dt>getter <a>Touch</a> item (in unsigned long <a>index</a>)</dt> |
5 | 284 |
<dd> |
85 | 285 |
returns the <a>Touch</a> with index <a>index</a> from the list, |
286 |
sorted in order from latest to earliest |
|
5 | 287 |
</dd> |
60
cc50b9cdc4f8
Remove 'caller'/'caller getter' from item/identifiedTouch
Matt Brubeck <mbrubeck@mozilla.com>
parents:
59
diff
changeset
|
288 |
<dt><a>Touch</a> identifiedTouch (in long <a>identifier</a>)</dt> |
5 | 289 |
<dd> |
85 | 290 |
returns the first <a>Touch</a> with long <a>identifier</a> from the |
291 |
list |
|
5 | 292 |
</dd> |
293 |
</dl> |
|
294 |
</section> |
|
295 |
||
296 |
<section> |
|
9
8171bbe11ccc
changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents:
8
diff
changeset
|
297 |
<h2><a>TouchEvent</a> Interface</h2> |
85 | 298 |
<p> |
299 |
This interface defines the <a>touchstart</a>, <a>touchend</a>, |
|
300 |
<a>touchmove</a>, <a>touchenter</a>, <a>touchleave</a>, and |
|
301 |
<a>touchcancel</a> event types. |
|
302 |
</p> |
|
5 | 303 |
|
6
83ce29dff849
changed cx/cy to rx/ry, defined units for both; added key modifier attributes; changed identifier to float
shepazu <schepers@w3.org>
parents:
5
diff
changeset
|
304 |
<dl title='interface TouchEvent : UIEvent' class='idl'> |
9
8171bbe11ccc
changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents:
8
diff
changeset
|
305 |
<dt>readonly attribute <a>TouchList</a> touches</dt> |
4 | 306 |
<dd> |
85 | 307 |
a list of <a>Touch</a>es for every point of contact currently |
308 |
touching the surface |
|
4 | 309 |
</dd> |
9
8171bbe11ccc
changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents:
8
diff
changeset
|
310 |
<dt>readonly attribute <a>TouchList</a> targetTouches</dt> |
4 | 311 |
<dd> |
85 | 312 |
a list of <a>Touch</a>es for every point of contact currently |
313 |
touching the surface, which started on the same target |
|
4 | 314 |
</dd> |
9
8171bbe11ccc
changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents:
8
diff
changeset
|
315 |
<dt>readonly attribute <a>TouchList</a> changedTouches</dt> |
4 | 316 |
<dd> |
85 | 317 |
a list of <a>Touch</a>es for every point of contact which contributed |
318 |
to the event |
|
4 | 319 |
</dd> |
23
4958878564b1
ISSUE-8: Add an initTouchEvent method.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
22
diff
changeset
|
320 |
|
30
795c0f6c44e7
ISSUE-12: altKey/ctrlKey/etc. should be attributes of TouchEvent, not TouchPoint
Matt Brubeck <mbrubeck@mozilla.com>
parents:
29
diff
changeset
|
321 |
<dt>readonly attribute boolean altKey</dt> |
795c0f6c44e7
ISSUE-12: altKey/ctrlKey/etc. should be attributes of TouchEvent, not TouchPoint
Matt Brubeck <mbrubeck@mozilla.com>
parents:
29
diff
changeset
|
322 |
<dd> |
85 | 323 |
<code>true</code> if the alt (Alternate) key modifier is activated; |
324 |
otherwise <code>false</code> |
|
30
795c0f6c44e7
ISSUE-12: altKey/ctrlKey/etc. should be attributes of TouchEvent, not TouchPoint
Matt Brubeck <mbrubeck@mozilla.com>
parents:
29
diff
changeset
|
325 |
</dd> |
795c0f6c44e7
ISSUE-12: altKey/ctrlKey/etc. should be attributes of TouchEvent, not TouchPoint
Matt Brubeck <mbrubeck@mozilla.com>
parents:
29
diff
changeset
|
326 |
<dt>readonly attribute boolean metaKey</dt> |
795c0f6c44e7
ISSUE-12: altKey/ctrlKey/etc. should be attributes of TouchEvent, not TouchPoint
Matt Brubeck <mbrubeck@mozilla.com>
parents:
29
diff
changeset
|
327 |
<dd> |
85 | 328 |
<code>true</code> if the meta (Meta) key modifier is activated; |
329 |
otherwise <code>false</code>. On some platforms this attribute may |
|
330 |
map to a differently-named key modifier. |
|
30
795c0f6c44e7
ISSUE-12: altKey/ctrlKey/etc. should be attributes of TouchEvent, not TouchPoint
Matt Brubeck <mbrubeck@mozilla.com>
parents:
29
diff
changeset
|
331 |
</dd> |
795c0f6c44e7
ISSUE-12: altKey/ctrlKey/etc. should be attributes of TouchEvent, not TouchPoint
Matt Brubeck <mbrubeck@mozilla.com>
parents:
29
diff
changeset
|
332 |
<dt>readonly attribute boolean ctrlKey</dt> |
795c0f6c44e7
ISSUE-12: altKey/ctrlKey/etc. should be attributes of TouchEvent, not TouchPoint
Matt Brubeck <mbrubeck@mozilla.com>
parents:
29
diff
changeset
|
333 |
<dd> |
85 | 334 |
<code>true</code> if the ctrl (Control) key modifier is activated; |
335 |
otherwise <code>false</code> |
|
30
795c0f6c44e7
ISSUE-12: altKey/ctrlKey/etc. should be attributes of TouchEvent, not TouchPoint
Matt Brubeck <mbrubeck@mozilla.com>
parents:
29
diff
changeset
|
336 |
</dd> |
795c0f6c44e7
ISSUE-12: altKey/ctrlKey/etc. should be attributes of TouchEvent, not TouchPoint
Matt Brubeck <mbrubeck@mozilla.com>
parents:
29
diff
changeset
|
337 |
<dt>readonly attribute boolean shiftKey</dt> |
795c0f6c44e7
ISSUE-12: altKey/ctrlKey/etc. should be attributes of TouchEvent, not TouchPoint
Matt Brubeck <mbrubeck@mozilla.com>
parents:
29
diff
changeset
|
338 |
<dd> |
85 | 339 |
<code>true</code> if the shift (Shift) key modifier is activated; |
340 |
otherwise <code>false</code> |
|
30
795c0f6c44e7
ISSUE-12: altKey/ctrlKey/etc. should be attributes of TouchEvent, not TouchPoint
Matt Brubeck <mbrubeck@mozilla.com>
parents:
29
diff
changeset
|
341 |
</dd> |
43
fc6abcf8b74c
ISSUE-10: Add a relatedTarget attribute to the TouchEvent interface.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
42
diff
changeset
|
342 |
<dt>readonly attribute EventTarget? relatedTarget</dt> |
fc6abcf8b74c
ISSUE-10: Add a relatedTarget attribute to the TouchEvent interface.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
42
diff
changeset
|
343 |
<dd> |
fc6abcf8b74c
ISSUE-10: Add a relatedTarget attribute to the TouchEvent interface.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
42
diff
changeset
|
344 |
identifies a secondary EventTarget related to a touch event. This |
fc6abcf8b74c
ISSUE-10: Add a relatedTarget attribute to the TouchEvent interface.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
42
diff
changeset
|
345 |
attribute is used with the <a>touchenter</a> event to indicate the |
fc6abcf8b74c
ISSUE-10: Add a relatedTarget attribute to the TouchEvent interface.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
42
diff
changeset
|
346 |
<a>EventTarget</a> the touch point exited, and with the |
fc6abcf8b74c
ISSUE-10: Add a relatedTarget attribute to the TouchEvent interface.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
42
diff
changeset
|
347 |
<a>touchleave</a> event to indicate the <a>EventTarget</a> the touch |
fc6abcf8b74c
ISSUE-10: Add a relatedTarget attribute to the TouchEvent interface.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
42
diff
changeset
|
348 |
point entered. For other event types, this attribute must be |
fc6abcf8b74c
ISSUE-10: Add a relatedTarget attribute to the TouchEvent interface.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
42
diff
changeset
|
349 |
<code>null</code>. |
fc6abcf8b74c
ISSUE-10: Add a relatedTarget attribute to the TouchEvent interface.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
42
diff
changeset
|
350 |
</dd> |
30
795c0f6c44e7
ISSUE-12: altKey/ctrlKey/etc. should be attributes of TouchEvent, not TouchPoint
Matt Brubeck <mbrubeck@mozilla.com>
parents:
29
diff
changeset
|
351 |
|
23
4958878564b1
ISSUE-8: Add an initTouchEvent method.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
22
diff
changeset
|
352 |
<!-- Methods --> |
4958878564b1
ISSUE-8: Add an initTouchEvent method.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
22
diff
changeset
|
353 |
<dt>void initTouchEvent()</dt> |
4958878564b1
ISSUE-8: Add an initTouchEvent method.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
22
diff
changeset
|
354 |
<dd> |
85 | 355 |
initializes a TouchEvent created through the <a>DocumentEvent</a> |
356 |
interface. |
|
23
4958878564b1
ISSUE-8: Add an initTouchEvent method.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
22
diff
changeset
|
357 |
<dl class='parameters'> |
4958878564b1
ISSUE-8: Add an initTouchEvent method.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
22
diff
changeset
|
358 |
<dt>DOMString type</dt> <dd></dd> |
4958878564b1
ISSUE-8: Add an initTouchEvent method.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
22
diff
changeset
|
359 |
<dt>boolean canBubble</dt> <dd></dd> |
4958878564b1
ISSUE-8: Add an initTouchEvent method.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
22
diff
changeset
|
360 |
<dt>boolean cancelable</dt> <dd></dd> |
68
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
361 |
<dt>AbstractView view</dt> <dd></dd> |
23
4958878564b1
ISSUE-8: Add an initTouchEvent method.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
22
diff
changeset
|
362 |
<dt>long detail</dt> <dd></dd> |
4958878564b1
ISSUE-8: Add an initTouchEvent method.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
22
diff
changeset
|
363 |
<dt>boolean ctrlKey</dt> <dd></dd> |
4958878564b1
ISSUE-8: Add an initTouchEvent method.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
22
diff
changeset
|
364 |
<dt>boolean altKey</dt> <dd></dd> |
4958878564b1
ISSUE-8: Add an initTouchEvent method.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
22
diff
changeset
|
365 |
<dt>boolean shiftKey</dt> <dd></dd> |
4958878564b1
ISSUE-8: Add an initTouchEvent method.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
22
diff
changeset
|
366 |
<dt>boolean metaKey</dt> <dd></dd> |
4958878564b1
ISSUE-8: Add an initTouchEvent method.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
22
diff
changeset
|
367 |
<dt>TouchList touches</dt> <dd></dd> |
4958878564b1
ISSUE-8: Add an initTouchEvent method.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
22
diff
changeset
|
368 |
<dt>TouchList targetTouches</dt> <dd></dd> |
4958878564b1
ISSUE-8: Add an initTouchEvent method.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
22
diff
changeset
|
369 |
<dt>TouchList changedTouches</dt> <dd></dd> |
4958878564b1
ISSUE-8: Add an initTouchEvent method.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
22
diff
changeset
|
370 |
</dl> |
4958878564b1
ISSUE-8: Add an initTouchEvent method.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
22
diff
changeset
|
371 |
</dd> |
4 | 372 |
</dl> |
8
3349d49e5f46
added force attribute; added issues around InkML, units, preventDefault(), timestamp
shepazu <schepers@w3.org>
parents:
7
diff
changeset
|
373 |
|
5 | 374 |
<section> |
85 | 375 |
<h3 id="event-touchstart">The <dfn class="event">touchstart</dfn> |
376 |
event</h3> |
|
377 |
<p> |
|
378 |
A user agent must dispatch this event type to indicate when the user |
|
379 |
places a <a>touch point</a> on the touch surface. |
|
380 |
</p> |
|
55
7df98116715b
Clarify targeting of touchmove and touchend events, and add tests.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
54
diff
changeset
|
381 |
|
85 | 382 |
<p> |
383 |
The target of this event must be an <a>Element</a>. |
|
384 |
</p> |
|
5 | 385 |
</section> |
20
3a04fe9b8ef2
Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
19
diff
changeset
|
386 |
|
5 | 387 |
<section> |
9
8171bbe11ccc
changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents:
8
diff
changeset
|
388 |
<h3 id="event-touchend">The <dfn class="event">touchend</dfn> event</h3> |
85 | 389 |
<p> |
390 |
A user agent must dispatch this event type to indicate when the user |
|
391 |
removes a <a>touch point</a> from the touch surface, also including |
|
392 |
cases where the touch point physically leaves the touch surface, such |
|
393 |
as being dragged off of the screen. |
|
394 |
</p> |
|
54
be35b766b5ef
Wrap some text to 80 characters.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
53
diff
changeset
|
395 |
|
85 | 396 |
<p> |
397 |
The <a>target</a> of this event must be the same <a>Element</a> that |
|
398 |
received the <a>touchstart</a> event when this <a>touch point</a> was |
|
399 |
placed on the surface, even if the <a>touch point</a> has since moved |
|
400 |
outside the interactive area of the <a>target</a> element. |
|
401 |
</p> |
|
55
7df98116715b
Clarify targeting of touchmove and touchend events, and add tests.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
54
diff
changeset
|
402 |
|
85 | 403 |
<p> |
404 |
The <a>touch point</a> or points that were removed must be included |
|
405 |
in the <a>changedTouches</a> attribute of the <a>TouchEvent</a>, and |
|
406 |
must not be included in the <a>touches</a> and <a>targetTouches</a> |
|
407 |
attributes. |
|
408 |
</p> |
|
5 | 409 |
</section> |
20
3a04fe9b8ef2
Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
19
diff
changeset
|
410 |
|
5 | 411 |
<section> |
9
8171bbe11ccc
changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents:
8
diff
changeset
|
412 |
<h3 id="event-touchmove">The <dfn class="event">touchmove</dfn> event</h3> |
85 | 413 |
<p> |
414 |
A user agent must dispatch this event type to indicate when the user |
|
415 |
moves a <a>touch point</a> along the touch surface. |
|
416 |
</p> |
|
54
be35b766b5ef
Wrap some text to 80 characters.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
53
diff
changeset
|
417 |
|
85 | 418 |
<p> |
419 |
The <a>target</a> of this event must be the same <a>Element</a> that |
|
420 |
received the <a>touchstart</a> event when this <a>touch point</a> was |
|
421 |
placed on the surface, even if the <a>touch point</a> has since moved |
|
422 |
outside the interactive area of the <a>target</a> element. |
|
423 |
</p> |
|
54
be35b766b5ef
Wrap some text to 80 characters.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
53
diff
changeset
|
424 |
|
85 | 425 |
<p> |
426 |
If the values of <a>radiusX</a>, <a>radiusY</a>, |
|
427 |
<a>rotationAngle</a>, or <a>force</a> are known, then the user agent |
|
428 |
also must dispatch this event type to indicate when any of these |
|
429 |
attributes of a <a>touch point</a> have changed. |
|
430 |
</p> |
|
431 |
||
432 |
<p> |
|
433 |
Note that the rate at which the user agent sends <a>touchmove</a> |
|
434 |
events is implementation-defined, and may depend on hardware |
|
435 |
capabilities and other implementation details. |
|
436 |
</p> |
|
5 | 437 |
</section> |
20
3a04fe9b8ef2
Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
19
diff
changeset
|
438 |
|
5 | 439 |
<section> |
9
8171bbe11ccc
changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents:
8
diff
changeset
|
440 |
<h3 id="event-touchenter">The <dfn class="event">touchenter</dfn> event</h3> |
85 | 441 |
<p> |
442 |
A user agent must dispatch this event type to indicate when a |
|
443 |
<a>touch point</a> moves onto the interactive area defined by a DOM |
|
444 |
element. Events of this type must not bubble. |
|
445 |
</p> |
|
5 | 446 |
</section> |
20
3a04fe9b8ef2
Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
19
diff
changeset
|
447 |
|
5 | 448 |
<section> |
9
8171bbe11ccc
changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents:
8
diff
changeset
|
449 |
<h3 id="event-touchleave">The <dfn class="event">touchleave</dfn> event</h3> |
85 | 450 |
<p> |
451 |
A user agent must dispatch this event type to indicate when a |
|
452 |
<a>touch point</a> moves off the interactive area defined by a DOM |
|
453 |
element. Events of this type must not bubble. |
|
454 |
</p> |
|
5 | 455 |
</section> |
20
3a04fe9b8ef2
Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
19
diff
changeset
|
456 |
|
5 | 457 |
<section> |
61 | 458 |
<h3 id="event-touchcancel">The <dfn class="event">touchcancel</dfn> event</h3> |
85 | 459 |
<p> |
460 |
A user agent must dispatch this event type to indicate when a touch |
|
461 |
point has been disrupted in an implementation-specific manner, such as |
|
462 |
a synchronous event or action originating from the UA canceling the |
|
463 |
touch, or the touch point leaving the document window into a |
|
464 |
non-document area which is capable of handling user interactions. |
|
465 |
(e.g. The UA's native user interface, plug-ins) A user agent may |
|
466 |
also dispatch this event type when the user places more <a>touch |
|
467 |
point</a>s on the touch surface than the device or implementation is |
|
468 |
configured to store, in which case the earliest <a>Touch</a> object |
|
469 |
in the <a>TouchList</a> should be removed. |
|
470 |
</p> |
|
5 | 471 |
</section> |
4 | 472 |
</section> |
20
3a04fe9b8ef2
Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
19
diff
changeset
|
473 |
|
68
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
474 |
<section> |
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
475 |
<h2><a>DocumentTouch</a> Interface</h2> |
85 | 476 |
<p> |
477 |
The <a>DocumentTouch</a> interface provides a mechanism by which the |
|
478 |
user can create <a>Touch</a> and <a>TouchList</a> objects. The |
|
479 |
<a>DocumentTouch</a> interface must be implemented on the |
|
480 |
<a>Document</a> object. |
|
481 |
</p> |
|
68
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
482 |
|
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
483 |
<dl title='interface DocumentTouch' class='idl'> |
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
484 |
<dt>Touch createTouch()</dt> |
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
485 |
<dd> |
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
486 |
Creates a <a>Touch</a> object with the specified attributes. |
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
487 |
<dl class='parameters'> |
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
488 |
<dt>AbstractView view</dt> <dd></dd> |
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
489 |
<dt>EventTarget target</dt> <dd></dd> |
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
490 |
<dt>long identifier</dt> <dd></dd> |
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
491 |
<dt>long pageX</dt> <dd></dd> |
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
492 |
<dt>long pageY</dt> <dd></dd> |
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
493 |
<dt>long screenX</dt> <dd></dd> |
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
494 |
<dt>long screenY</dt> <dd></dd> |
69
299f0072d6de
Make clientX/Y optional in createTouch.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
68
diff
changeset
|
495 |
<dt>optional long clientX</dt> <dd></dd> |
299f0072d6de
Make clientX/Y optional in createTouch.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
68
diff
changeset
|
496 |
<dt>optional long clientY</dt> <dd></dd> |
68
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
497 |
<dt>optional long radiusX</dt> <dd></dd> |
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
498 |
<dt>optional long radiusY</dt> <dd></dd> |
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
499 |
<dt>optional float rotationAngle</dt> <dd></dd> |
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
500 |
<dt>optional float force</dt> <dd></dd> |
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
501 |
</dl> |
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
502 |
</dd> |
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
503 |
|
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
504 |
<dt>TouchList createTouchList()</dt> |
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
505 |
<dd> |
85 | 506 |
Creates a <a>TouchList</a> object containing the specified |
507 |
<a>Touch</a> objects. |
|
68
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
508 |
<dl class='parameters'> |
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
509 |
<dt>Touch[] touches</dt> <dd></dd> |
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
510 |
</dl> |
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
511 |
</dd> |
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
512 |
|
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
513 |
<dt>TouchList createTouchList()</dt> |
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
514 |
<dd> |
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
515 |
Creates a <a>TouchList</a> object containing a single <a>Touch</a>. |
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
516 |
<dl class='parameters'> |
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
517 |
<dt>Touch touch</dt> <dd></dd> |
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
518 |
</dl> |
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
519 |
</dd> |
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
520 |
</dl> |
72
7d97620f95ec
Add an issue about pageX/Y in createTouch.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
71
diff
changeset
|
521 |
|
85 | 522 |
<p class="issue" id="issue-createTouch-pageXY"> |
523 |
<strong>Issue:</strong> |
|
72
7d97620f95ec
Add an issue about pageX/Y in createTouch.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
71
diff
changeset
|
524 |
Does <a>createTouch</a> need to take both pageX/pageY <em>and</em> |
7d97620f95ec
Add an issue about pageX/Y in createTouch.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
71
diff
changeset
|
525 |
clientX/clientY as parameters? If not, which pair should be removed? |
7d97620f95ec
Add an issue about pageX/Y in createTouch.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
71
diff
changeset
|
526 |
</p> |
68
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
527 |
</section> |
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
528 |
|
35
8624a3d5cbd7
ISSUE-9: Interaction of touch events and mouse events
Matt Brubeck <mbrubeck@mozilla.com>
parents:
34
diff
changeset
|
529 |
<section id="mouse-events"> |
8624a3d5cbd7
ISSUE-9: Interaction of touch events and mouse events
Matt Brubeck <mbrubeck@mozilla.com>
parents:
34
diff
changeset
|
530 |
<h2>Interaction with Mouse Events</h2> |
85 | 531 |
<p> |
532 |
The user agent may dispatch both touch events and mouse events |
|
533 |
[[!DOM-LEVEL-2-EVENTS]] in response to the same user input. If the |
|
534 |
user agent dispatches both touch events and mouse events in response to |
|
535 |
a single user action, then the <a>touchstart</a> event type must be |
|
536 |
dispatched before any mouse event types for that action. If the |
|
537 |
<a>preventDefault</a> method of <a>touchstart</a> or <a>touchmove</a> |
|
538 |
is called, the user agent should not dispatch any mouse event that |
|
539 |
would be a consequential result of the the prevented touch event. |
|
540 |
</p> |
|
58
22e39e76033e
Specify basic preventDefault behavior.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
57
diff
changeset
|
541 |
|
85 | 542 |
<p> |
543 |
The default actions and ordering of any further touch and mouse events |
|
544 |
are implementation-defined, except as specified elsewhere. |
|
545 |
</p> |
|
35
8624a3d5cbd7
ISSUE-9: Interaction of touch events and mouse events
Matt Brubeck <mbrubeck@mozilla.com>
parents:
34
diff
changeset
|
546 |
</section> |
8624a3d5cbd7
ISSUE-9: Interaction of touch events and mouse events
Matt Brubeck <mbrubeck@mozilla.com>
parents:
34
diff
changeset
|
547 |
|
10
bad00fb0d663
added identifier algorithm; added glossary; added timestamp to TouchPoint
shepazu <schepers@w3.org>
parents:
9
diff
changeset
|
548 |
<section> |
bad00fb0d663
added identifier algorithm; added glossary; added timestamp to TouchPoint
shepazu <schepers@w3.org>
parents:
9
diff
changeset
|
549 |
<h2>Glossary</h2> |
20
3a04fe9b8ef2
Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
19
diff
changeset
|
550 |
|
10
bad00fb0d663
added identifier algorithm; added glossary; added timestamp to TouchPoint
shepazu <schepers@w3.org>
parents:
9
diff
changeset
|
551 |
<dl> |
bad00fb0d663
added identifier algorithm; added glossary; added timestamp to TouchPoint
shepazu <schepers@w3.org>
parents:
9
diff
changeset
|
552 |
<dt><dfn>active touch event session</dfn></dt> |
85 | 553 |
<dd> |
554 |
A conceptual state in which there is at least one instance of a |
|
555 |
<a>TouchEvent</a> event with at least one non-empty <a>TouchList</a>. |
|
10
bad00fb0d663
added identifier algorithm; added glossary; added timestamp to TouchPoint
shepazu <schepers@w3.org>
parents:
9
diff
changeset
|
556 |
<!-- <pre class='example'> |
bad00fb0d663
added identifier algorithm; added glossary; added timestamp to TouchPoint
shepazu <schepers@w3.org>
parents:
9
diff
changeset
|
557 |
</pre> --> |
bad00fb0d663
added identifier algorithm; added glossary; added timestamp to TouchPoint
shepazu <schepers@w3.org>
parents:
9
diff
changeset
|
558 |
</dd> |
20
3a04fe9b8ef2
Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
19
diff
changeset
|
559 |
|
12 | 560 |
<dt><dfn>touch point</dfn></dt> |
85 | 561 |
<dd> |
562 |
The coordinate point at which a pointer (e.g finger or stylus) |
|
563 |
intersects the target surface of an interface. This may apply to a |
|
564 |
finger touching a touch-screen, or an digital pen writing on a piece |
|
565 |
of paper. |
|
566 |
</dd> |
|
10
bad00fb0d663
added identifier algorithm; added glossary; added timestamp to TouchPoint
shepazu <schepers@w3.org>
parents:
9
diff
changeset
|
567 |
</dl> |
bad00fb0d663
added identifier algorithm; added glossary; added timestamp to TouchPoint
shepazu <schepers@w3.org>
parents:
9
diff
changeset
|
568 |
</section> |
20
3a04fe9b8ef2
Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
19
diff
changeset
|
569 |
|
71
4c4b691aab2a
Add a link to the issue tracker.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
69
diff
changeset
|
570 |
<section id='issues' class='informative'> |
4c4b691aab2a
Add a link to the issue tracker.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
69
diff
changeset
|
571 |
<h2>Issues</h2> |
85 | 572 |
<p> |
573 |
The working group maintains <a |
|
574 |
href='http://www.w3.org/2010/webevents/track/products/2' |
|
575 |
>a list of open issues in this specification</a>. These issues may be |
|
576 |
addressed in future revisions of the specification. |
|
577 |
</p> |
|
71
4c4b691aab2a
Add a link to the issue tracker.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
69
diff
changeset
|
578 |
</section> |
4c4b691aab2a
Add a link to the issue tracker.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
69
diff
changeset
|
579 |
|
4c4b691aab2a
Add a link to the issue tracker.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
69
diff
changeset
|
580 |
<section class='appendix informative'> |
4 | 581 |
<h2>Acknowledgements</h2> |
582 |
<p> |
|
85 | 583 |
Many thanks to the WebKit engineers for developing the model used as a |
584 |
basis for this spec, Neil Roberts (SitePen) for his summary of WebKit |
|
585 |
touch events, Peter-Paul Koch (PPK) for his writeups and suggestions, |
|
586 |
Robin Berjon for developing the <a |
|
587 |
href="http://dev.w3.org/2009/dap/ReSpec.js/documentation.html" |
|
588 |
>ReSpec.js spec authoring tool</a>, and the WebEvents WG for their many |
|
589 |
contributions. |
|
4 | 590 |
</p> |
20
3a04fe9b8ef2
Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
19
diff
changeset
|
591 |
|
85 | 592 |
<p> |
593 |
Many others have made additional comments as the spec developed, which |
|
594 |
have led to steady improvements. Among them are Matthew Schinckel, |
|
595 |
Andrew Grieve, and Cathy Chan. If I inadvertently omitted your name, |
|
596 |
please let me know. |
|
597 |
</p> |
|
4 | 598 |
</section> |
599 |
</body> |
|
600 |
</html> |