author | shepazu <schepers@w3.org> |
Fri, 28 Jan 2011 22:46:08 -0500 | |
changeset 11 | c799fd07301e |
parent 10 | bad00fb0d663 |
child 12 | 183be84c0a6c |
permissions | -rw-r--r-- |
4 | 1 |
<!DOCTYPE html> |
2 |
<html> |
|
3 |
<head> |
|
4 |
<title>Touch Events Specification</title> |
|
5 |
<meta http-equiv='Content-Type' content='text/html;charset=utf-8'/> |
|
6 |
<!-- |
|
7 |
=== NOTA BENE === |
|
8 |
For the three scripts below, if your spec resides on dev.w3 you can check them |
|
9 |
out in the same tree and use relative links so that they'll work offline, |
|
10 |
--> |
|
11 |
<script src='http://dev.w3.org/2009/dap/ReSpec.js/js/respec.js' class='remove'></script> |
|
12 |
<script class='remove'> |
|
13 |
var respecConfig = { |
|
14 |
// specification status (e.g. WD, LCWD, NOTE, etc.). If in doubt use ED. |
|
15 |
specStatus: "ED", |
|
16 |
||
17 |
// the specification's short name, as in http://www.w3.org/TR/short-name/ |
|
18 |
shortName: "touch-events", |
|
19 |
||
20 |
// if your specification has a subtitle that goes below the main |
|
21 |
// formal title, define it here |
|
22 |
// subtitle : "an excellent document", |
|
23 |
||
24 |
// if you wish the publication date to be other than today, set this |
|
25 |
// publishDate: "2009-08-06", |
|
26 |
||
27 |
// if the specification's copyright date is a range of years, specify |
|
28 |
// the start date here: |
|
29 |
// copyrightStart: "2005" |
|
30 |
||
31 |
// if there is a previously published draft, uncomment this and set its YYYY-MM-DD date |
|
32 |
// and its maturity status |
|
33 |
// previousPublishDate: "1977-03-15", |
|
34 |
// previousMaturity: "WD", |
|
35 |
||
36 |
// if there a publicly available Editor's Draft, this is the link |
|
5 | 37 |
edDraftURI: "http://dvcs.w3.org/hg/webevents/raw-file/tip/touchevents.html", |
4 | 38 |
|
39 |
// if this is a LCWD, uncomment and set the end of its review period |
|
40 |
// lcEnd: "2009-08-05", |
|
41 |
||
42 |
// if you want to have extra CSS, append them to this list |
|
43 |
// 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
|
44 |
extraCSS: ["http://www.w3.org/StyleSheets/TR/W3C-TR.css", "http://dev.w3.org/2009/dap/ReSpec.js/css/respec.css"], |
4 | 45 |
|
46 |
// editors, add as many as you like |
|
47 |
// only "name" is required |
|
48 |
editors: [ |
|
49 |
{ name: "Doug Schepers", url: "http://schepers.cc/", |
|
50 |
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
|
51 |
{ 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
|
52 |
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
|
53 |
{ 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
|
54 |
company: "Mozilla", companyURL: "http://www.mozilla.org/" }, |
4 | 55 |
], |
56 |
||
57 |
// authors, add as many as you like. |
|
58 |
// This is optional, uncomment if you have authors as well as editors. |
|
59 |
// only "name" is required. Same format as editors. |
|
60 |
||
61 |
//authors: [ |
|
62 |
// { name: "Your Name", url: "http://example.org/", |
|
63 |
// company: "Your Company", companyURL: "http://example.com/" }, |
|
64 |
//], |
|
65 |
||
66 |
// name of the WG |
|
67 |
wg: "Web Events Working Group", |
|
68 |
||
69 |
// URI of the public WG page |
|
70 |
wgURI: "http://www.w3.org/2010/webevents/", |
|
71 |
||
72 |
// name (with the @w3c.org) of the public mailing to which comments are due |
|
73 |
wgPublicList: "public-webevents", |
|
74 |
||
75 |
// URI of the patent status for this WG, for Rec-track documents |
|
76 |
// !!!! IMPORTANT !!!! |
|
77 |
// This is important for Rec-track documents, do not copy a patent URI from a random |
|
78 |
// document unless you know what you're doing. If in doubt ask your friendly neighbourhood |
|
79 |
// Team Contact. |
|
80 |
wgPatentURI: "http://www.w3.org/2004/01/pp-impl/45559/status", |
|
81 |
}; |
|
82 |
</script> |
|
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
|
83 |
|
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
|
84 |
<style> |
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
|
85 |
.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
|
86 |
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
|
87 |
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
|
88 |
} |
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 |
</style> |
4 | 90 |
</head> |
91 |
<body> |
|
92 |
<section id='abstract'> |
|
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
|
93 |
The Touch Interface specification defines a set of low-level events that represent one or more points of contact with a touch-sensitive surface, and changes of those points with respect to the surface and any DOM elements displayed upon it (e.g. for touch screens) or associated with it (e.g. for drawing tablets without displays). It also addresses pen-tablet devices, such as drawing tablets, with consideration toward stylus capabilities. |
4 | 94 |
</section> |
5 | 95 |
|
4 | 96 |
|
97 |
<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
|
98 |
<h2><a>TouchPoint</a> Interface</h2> |
5 | 99 |
<p>This interface defines an individual point of contact for a touch event.</p> |
100 |
||
101 |
<dl title='interface TouchPoint' 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
|
102 |
<dt>readonly attribute long identifier</dt> |
5 | 103 |
<dd> |
10
bad00fb0d663
added identifier algorithm; added glossary; added timestamp to TouchPoint
shepazu <schepers@w3.org>
parents:
9
diff
changeset
|
104 |
An identification number for each touch point, unique to that touch point per session. |
bad00fb0d663
added identifier algorithm; added glossary; added timestamp to TouchPoint
shepazu <schepers@w3.org>
parents:
9
diff
changeset
|
105 |
|
bad00fb0d663
added identifier algorithm; added glossary; added timestamp to TouchPoint
shepazu <schepers@w3.org>
parents:
9
diff
changeset
|
106 |
<p>The algorithm for determining the <a>identifier</a> value is as follows:</p> |
bad00fb0d663
added identifier algorithm; added glossary; added timestamp to TouchPoint
shepazu <schepers@w3.org>
parents:
9
diff
changeset
|
107 |
<ol> |
bad00fb0d663
added identifier algorithm; added glossary; added timestamp to TouchPoint
shepazu <schepers@w3.org>
parents:
9
diff
changeset
|
108 |
<li>if there are no other <a>active touch event session</a>s, the value of <a>identifier</a> must be <code>0</code></li> |
bad00fb0d663
added identifier algorithm; added glossary; added timestamp to TouchPoint
shepazu <schepers@w3.org>
parents:
9
diff
changeset
|
109 |
<li>if there is at least one <a>active touch event session</a>, the value of <a>identifier</a> must be the lowest integer not currently used by any active <a>TouchPoint</a> object in any <a>active touch event session</a></li> |
bad00fb0d663
added identifier algorithm; added glossary; added timestamp to TouchPoint
shepazu <schepers@w3.org>
parents:
9
diff
changeset
|
110 |
</ol> |
5 | 111 |
</dd> |
112 |
<dt>readonly attribute EventTarget target</dt> |
|
113 |
<dd> |
|
114 |
the original proximal event target for this touch point |
|
115 |
</dd> |
|
10
bad00fb0d663
added identifier algorithm; added glossary; added timestamp to TouchPoint
shepazu <schepers@w3.org>
parents:
9
diff
changeset
|
116 |
<dt>readonly attribute DOMTimeStamp timestamp</dt> |
bad00fb0d663
added identifier algorithm; added glossary; added timestamp to TouchPoint
shepazu <schepers@w3.org>
parents:
9
diff
changeset
|
117 |
<dd> |
bad00fb0d663
added identifier algorithm; added glossary; added timestamp to TouchPoint
shepazu <schepers@w3.org>
parents:
9
diff
changeset
|
118 |
The <a>timestamp</a> attribute represents the time when the <a>TouchPoint</a> was initiated and is represented as a DOMTimeStamp [[!DOM-LEVEL-3-CORE]]. |
bad00fb0d663
added identifier algorithm; added glossary; added timestamp to TouchPoint
shepazu <schepers@w3.org>
parents:
9
diff
changeset
|
119 |
<p class="issue" id="issue-timestamp-format"><strong>Issue:</strong> should we align to timestamp as defined in the <a href="http://dev.w3.org/geo/api/#timestamp">Geolocation API spec</a> (as above), or with the datetime as defined in the <a href="http://dev.w3.org/html5/spec/edits.html#attr-mod-datetime">HTML5 spec</a> (attribute DOMString dateTime, where datetime is a <a href="http://dev.w3.org/html5/spec/common-microsyntaxes.html#valid-global-date-and-time-string">valid global date and time string</a>), or to something else (see <a href="http://lists.w3.org/Archives/Public/www-dom/2010OctDec/0069.html">this thread on Event.timeStamp</a>)?</p> |
bad00fb0d663
added identifier algorithm; added glossary; added timestamp to TouchPoint
shepazu <schepers@w3.org>
parents:
9
diff
changeset
|
120 |
|
bad00fb0d663
added identifier algorithm; added glossary; added timestamp to TouchPoint
shepazu <schepers@w3.org>
parents:
9
diff
changeset
|
121 |
<p class="issue" id="issue-timestamp"><strong>Issue:</strong> Should each touchpoint have its own timestamp? Or should we leave timestamps up to script authors? My feeling is that having implicit timestamps may be useful in defining an author-defined gesture-like mapping between low-level and high-level events (e.g. a swipe vs. drag speed threshold expressed as the difference in timestamps)</p> |
bad00fb0d663
added identifier algorithm; added glossary; added timestamp to TouchPoint
shepazu <schepers@w3.org>
parents:
9
diff
changeset
|
122 |
</dd> |
4 | 123 |
|
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
|
124 |
<dt>readonly attribute long screenX</dt> |
5 | 125 |
<dd> |
126 |
x-coordinate of point relative to the screen |
|
127 |
</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
|
128 |
<dt>readonly attribute long screenY</dt> |
5 | 129 |
<dd> |
130 |
y-coordinate of point relative to the screen |
|
131 |
</dd> |
|
4 | 132 |
|
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
|
133 |
<dt>readonly attribute long clientX</dt> |
5 | 134 |
<dd> |
135 |
x-coordinate of point relative to the viewport, excluding any scroll offset |
|
136 |
</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
|
137 |
<dt>readonly attribute long clientY</dt> |
5 | 138 |
<dd> |
139 |
y-coordinate of point relative to the viewport, excluding any scroll offset |
|
140 |
</dd> |
|
141 |
||
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
|
142 |
<dt>readonly attribute long pageX</dt> |
5 | 143 |
<dd> |
144 |
x-coordinate of point relative to the viewport, including any scroll offset |
|
145 |
</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
|
146 |
<dt>readonly attribute long pageY</dt> |
5 | 147 |
<dd> |
148 |
y-coordinate of point relative to the viewport, including any scroll offset |
|
149 |
</dd> |
|
150 |
||
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
|
151 |
<dt>readonly attribute long radiusX</dt> |
5 | 152 |
<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
|
153 |
the radius of the ellipse which most closely circumscribes the touching area (e.g. finger, stylus) along the x-axis, in pixels of the same scale as <a>screenX</a>; <code>1</code> if no value is known. This attribute may not be available on all user agents or platforms. |
10
bad00fb0d663
added identifier algorithm; added glossary; added timestamp to TouchPoint
shepazu <schepers@w3.org>
parents:
9
diff
changeset
|
154 |
<p class="issue" id="issue-units"><strong>Issue:</strong> What are units of radiusX/radiusY? CSS Pixels?</p> |
5 | 155 |
</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
|
156 |
<dt>readonly attribute long radiusY</dt> |
5 | 157 |
<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
|
158 |
the radius of the ellipse which most closely circumscribes the touching area (e.g. finger, stylus) along the y-axis, in pixels of the same scale as <a>screenY</a>; <code>1</code> if no value is known. This attribute may not be available on all user agents or platforms. |
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
|
159 |
</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
|
160 |
|
8
3349d49e5f46
added force attribute; added issues around InkML, units, preventDefault(), timestamp
shepazu <schepers@w3.org>
parents:
7
diff
changeset
|
161 |
<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
|
162 |
<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
|
163 |
a relative value of pressure applied, in the range <code>0</code> to <code>1</code>, where <code>0</code> is no pressure, and <code>1</code> is the highest level of pressure the touch device is capable of sensing; <code>0</code> if no value is known. This attribute may not be available on all user agents or platforms. In environments where <a>force</a> is available, the absolute pressure represented by the <a>force</a> attribute, and the sensitivity in levels of pressure, may vary. |
10
bad00fb0d663
added identifier algorithm; added glossary; added timestamp to TouchPoint
shepazu <schepers@w3.org>
parents:
9
diff
changeset
|
164 |
|
bad00fb0d663
added identifier algorithm; added glossary; added timestamp to TouchPoint
shepazu <schepers@w3.org>
parents:
9
diff
changeset
|
165 |
<p class="issue" id="issue-inkml"><strong>Issue:</strong> Consider aligning with other "channels" and values from <a href="http://www.w3.org/TR/InkML/#channelContents">Ink Markup Language (InkML)</a>, in addition to <a>force</a>, e.g. adding <a>angle</a>, <a>clientZ</a>, <a>rotation</a>, etc.</p> |
8
3349d49e5f46
added force attribute; added issues around InkML, units, preventDefault(), timestamp
shepazu <schepers@w3.org>
parents:
7
diff
changeset
|
166 |
</dd> |
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
|
167 |
|
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
|
168 |
<dt>readonly attribute boolean altKey</dt> |
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
|
169 |
<dd> |
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
|
170 |
<code>true</code> if the alt (Alternate) key modifier is activated; otherwise <code>false</code> |
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
|
171 |
</dd> |
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
|
172 |
<dt>readonly attribute boolean ctrlKey</dt> |
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
|
173 |
<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
|
174 |
<code>true</code> if the ctrl (Control) key modifier is activated; otherwise <code>false</code> |
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
|
175 |
</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
|
176 |
<dt>readonly attribute boolean shiftKey</dt> |
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
|
177 |
<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
|
178 |
<code>true</code> if the shift (Shift) key modifier is activated; otherwise <code>false</code> |
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
|
179 |
</dd> |
5 | 180 |
</dl> |
8
3349d49e5f46
added force attribute; added issues around InkML, units, preventDefault(), timestamp
shepazu <schepers@w3.org>
parents:
7
diff
changeset
|
181 |
|
5 | 182 |
</section> |
183 |
||
184 |
||
185 |
<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
|
186 |
<h2><a>TouchList</a> Interface</h2> |
5 | 187 |
<p>This interface defines a list of individual points of contact for a touch event.</p> |
188 |
||
189 |
<dl title='interface TouchList' class='idl'> |
|
190 |
<dt>readonly attribute unsigned long length</dt> |
|
191 |
<dd> |
|
192 |
returns the number of touchpoints in the list |
|
193 |
</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
|
194 |
<dt>caller getter <a>TouchPoint</a> item (in unsigned long <a>index</a>)</dt> |
5 | 195 |
<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
|
196 |
returns the touchpoint with index <a>index</a> from the list, sorted in order from latest to earliest |
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>caller getter object identifiedPoint (in long <a>identifier</a>)</dt> |
5 | 199 |
<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
|
200 |
returns the first touchpoint with long <a>identifier</a> from the list |
5 | 201 |
</dd> |
202 |
</dl> |
|
203 |
</section> |
|
204 |
||
205 |
||
206 |
<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
|
207 |
<h2><a>TouchEvent</a> Interface</h2> |
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
|
208 |
<p>This interface defines the <a>touchstart</a>, <a>touchend</a>, <a>touchmove</a>, <a>touchenter</a>, <a>touchleave</a>, and <a>touchcancel</a> event types.</p> |
5 | 209 |
|
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
|
210 |
<dl title='interface TouchEvent : UIEvent' class='idl'> |
5 | 211 |
<!-- <dt>readonly attribute views::AbstractView view</dt> |
4 | 212 |
<dd> |
213 |
The <code>view</code> attribute identifies the <code>AbstractView</code> from which the event was generated. |
|
5 | 214 |
</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
|
215 |
<dt>readonly attribute <a>TouchList</a> touches</dt> |
4 | 216 |
<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
|
217 |
a list of <a>TouchPoint</a>s for every point of contact currently touching the surface |
4 | 218 |
</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
|
219 |
<dt>readonly attribute <a>TouchList</a> targetTouches</dt> |
4 | 220 |
<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
|
221 |
a list of <a>TouchPoint</a>s for every point of contact currently touching the surface, which started on the same target |
4 | 222 |
</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
|
223 |
<dt>readonly attribute <a>TouchList</a> changedTouches</dt> |
4 | 224 |
<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
|
225 |
a list of <a>TouchPoint</a>s for every point of contact which contributed to the event |
4 | 226 |
</dd> |
227 |
</dl> |
|
8
3349d49e5f46
added force attribute; added issues around InkML, units, preventDefault(), timestamp
shepazu <schepers@w3.org>
parents:
7
diff
changeset
|
228 |
|
3349d49e5f46
added force attribute; added issues around InkML, units, preventDefault(), timestamp
shepazu <schepers@w3.org>
parents:
7
diff
changeset
|
229 |
<p class="issue" id="issue-preventDefault"><strong>Issue:</strong> define behavior of preventDefault() method.</p> |
3349d49e5f46
added force attribute; added issues around InkML, units, preventDefault(), timestamp
shepazu <schepers@w3.org>
parents:
7
diff
changeset
|
230 |
|
5 | 231 |
|
232 |
<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
|
233 |
<h3 id="event-touchstart">The <dfn class="event">touchstart</dfn> event</h3> |
11
c799fd07301e
added "must dispatch this event type *to indicate* when" as clarification for UA requirements
shepazu <schepers@w3.org>
parents:
10
diff
changeset
|
234 |
<p>A user agent must dispatch this event type to indicate when the user places a touch point on the touch surface.</p> |
5 | 235 |
</section> |
236 |
||
237 |
<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
|
238 |
<h3 id="event-touchend">The <dfn class="event">touchend</dfn> event</h3> |
11
c799fd07301e
added "must dispatch this event type *to indicate* when" as clarification for UA requirements
shepazu <schepers@w3.org>
parents:
10
diff
changeset
|
239 |
<p>A user agent must dispatch this event type to indicate when the user removes a touch point from the touch surface.</p> |
5 | 240 |
</section> |
241 |
||
242 |
<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
|
243 |
<h3 id="event-touchmove">The <dfn class="event">touchmove</dfn> event</h3> |
11
c799fd07301e
added "must dispatch this event type *to indicate* when" as clarification for UA requirements
shepazu <schepers@w3.org>
parents:
10
diff
changeset
|
244 |
<p>A user agent must dispatch this event type to indicate when the user moves a touch point along the touch surface, even outside the interactive area of the <a>target</a> element.</p> |
5 | 245 |
</section> |
246 |
||
247 |
<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
|
248 |
<h3 id="event-touchenter">The <dfn class="event">touchenter</dfn> event</h3> |
11
c799fd07301e
added "must dispatch this event type *to indicate* when" as clarification for UA requirements
shepazu <schepers@w3.org>
parents:
10
diff
changeset
|
249 |
<p>A user agent must dispatch this event type to indicate when a touch point moves onto the interactive area defined by a DOM element on which it did not originate. Events of this type must not bubble.</p> |
5 | 250 |
</section> |
251 |
||
252 |
<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
|
253 |
<h3 id="event-touchleave">The <dfn class="event">touchleave</dfn> event</h3> |
11
c799fd07301e
added "must dispatch this event type *to indicate* when" as clarification for UA requirements
shepazu <schepers@w3.org>
parents:
10
diff
changeset
|
254 |
<p>A user agent must dispatch this event type to indicate when a touch point moves off the interactive area defined by a DOM element. Events of this type must not bubble.</p> |
5 | 255 |
</section> |
256 |
||
257 |
<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
|
258 |
<h3 id="event-touchstart">The <dfn class="event">touchcancel</dfn> event</h3> |
11
c799fd07301e
added "must dispatch this event type *to indicate* when" as clarification for UA requirements
shepazu <schepers@w3.org>
parents:
10
diff
changeset
|
259 |
<p>A user agent must dispatch this event type to indicate when a <a>TouchPoint</a> has been disrupted in an implementation-specific manner, such as by moving outside the bounds of the UA window. A user agent may also dispatch this event type when the user places more touch points on the touch surface than the device or implementation is configured to store, in which case the earliest touch point in the list should be removed.</p> |
5 | 260 |
</section> |
4 | 261 |
</section> |
262 |
||
10
bad00fb0d663
added identifier algorithm; added glossary; added timestamp to TouchPoint
shepazu <schepers@w3.org>
parents:
9
diff
changeset
|
263 |
<section> |
bad00fb0d663
added identifier algorithm; added glossary; added timestamp to TouchPoint
shepazu <schepers@w3.org>
parents:
9
diff
changeset
|
264 |
<h2>Glossary</h2> |
bad00fb0d663
added identifier algorithm; added glossary; added timestamp to TouchPoint
shepazu <schepers@w3.org>
parents:
9
diff
changeset
|
265 |
|
bad00fb0d663
added identifier algorithm; added glossary; added timestamp to TouchPoint
shepazu <schepers@w3.org>
parents:
9
diff
changeset
|
266 |
<dl> |
bad00fb0d663
added identifier algorithm; added glossary; added timestamp to TouchPoint
shepazu <schepers@w3.org>
parents:
9
diff
changeset
|
267 |
<dt><dfn>active touch event session</dfn></dt> |
bad00fb0d663
added identifier algorithm; added glossary; added timestamp to TouchPoint
shepazu <schepers@w3.org>
parents:
9
diff
changeset
|
268 |
<dd>A conceptual state in which there is at least one instance of a <a>TouchEvent</a> event with at least one non-empty <a>TouchList</a>. |
bad00fb0d663
added identifier algorithm; added glossary; added timestamp to TouchPoint
shepazu <schepers@w3.org>
parents:
9
diff
changeset
|
269 |
<!-- <pre class='example'> |
bad00fb0d663
added identifier algorithm; added glossary; added timestamp to TouchPoint
shepazu <schepers@w3.org>
parents:
9
diff
changeset
|
270 |
|
bad00fb0d663
added identifier algorithm; added glossary; added timestamp to TouchPoint
shepazu <schepers@w3.org>
parents:
9
diff
changeset
|
271 |
</pre> --> |
bad00fb0d663
added identifier algorithm; added glossary; added timestamp to TouchPoint
shepazu <schepers@w3.org>
parents:
9
diff
changeset
|
272 |
</dd> |
bad00fb0d663
added identifier algorithm; added glossary; added timestamp to TouchPoint
shepazu <schepers@w3.org>
parents:
9
diff
changeset
|
273 |
|
bad00fb0d663
added identifier algorithm; added glossary; added timestamp to TouchPoint
shepazu <schepers@w3.org>
parents:
9
diff
changeset
|
274 |
</dl> |
bad00fb0d663
added identifier algorithm; added glossary; added timestamp to TouchPoint
shepazu <schepers@w3.org>
parents:
9
diff
changeset
|
275 |
|
bad00fb0d663
added identifier algorithm; added glossary; added timestamp to TouchPoint
shepazu <schepers@w3.org>
parents:
9
diff
changeset
|
276 |
</section> |
bad00fb0d663
added identifier algorithm; added glossary; added timestamp to TouchPoint
shepazu <schepers@w3.org>
parents:
9
diff
changeset
|
277 |
|
4 | 278 |
<section class='appendix'> |
279 |
<h2>Acknowledgements</h2> |
|
280 |
<p> |
|
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
|
281 |
Many thanks to the WebKit engineers for developing the model used as a basis for this spec, Neil Roberts (SitePen) for his summary of WebKit touch events, Peter-Paul Koch (PPK) for his writeups and suggestions, Robin Berjon for developing the <a href="http://dev.w3.org/2009/dap/ReSpec.js/documentation.html">ReSpec.js spec authoring tool</a>, and the WebEvents WG for their many contributions.</a> |
4 | 282 |
</p> |
283 |
</section> |
|
284 |
</body> |
|
285 |
</html> |