1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362
|
/*
* Copyright 2009 Closure Compiler Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Definitions for all iPhone extensions. Created from:
* http://developer.apple.com/library/safari/navigation/
*
* @externs
* @author agrieve@google.com (Andrew Grieve)
*/
/**
* The Touch class represents a single touch on the surface. A touch is the
* presence or movement of a finger that is part of a unique multi-touch
* sequence.
* @see http://developer.apple.com/library/safari/#documentation/UserExperience/Reference/TouchClassReference/Touch/Touch.html
* @constructor
*/
function Touch() {}
/**
* The x-coordinate of the touch's location relative to the window's viewport.
* @type {number}
*/
Touch.prototype.clientX;
/**
* The y-coordinate of the touch's location relative to the window's viewport.
* @type {number}
*/
Touch.prototype.clientY;
/**
* The unique identifier for this touch object.
* @type {number}
*/
Touch.prototype.identifier;
/**
* The x-coordinate of the touch's location in page coordinates.
* @type {number}
*/
Touch.prototype.pageX;
/**
* The y-coordinate of the touch's location in page coordinates.
* @type {number}
*/
Touch.prototype.pageY;
/**
* The x-coordinate of the touch's location in screen coordinates.
* @type {number}
*/
Touch.prototype.screenX;
/**
* The y-coordinate of the touch's location in screen coordinates.
* @type {number}
*/
Touch.prototype.screenY;
/**
* The target of this touch.
* @type {EventTarget}
*/
Touch.prototype.target;
/**
* Creates a new Touch object.
* @see http://developer.apple.com/library/safari/#documentation/UserExperience/Reference/DocumentAdditionsReference/DocumentAdditions/DocumentAdditions.html#//apple_ref/javascript/instm/Document/createTouch
* @param {Window} view
* @param {EventTarget} target
* @param {number} identifier
* @param {number} pageX
* @param {number} pageY
* @param {number} screenX
* @param {number} screenY
* @return {Touch}
*/
Document.prototype.createTouch = function(view, target, identifier, pageX,
pageY, screenX, screenY) {};
/**
* The TouchList class is used to represent a collection of Touch objects.
* @see http://developer.apple.com/library/safari/#documentation/UserExperience/Reference/TouchListClassReference/TouchList/TouchList.html
* @constructor
*/
function TouchList() {}
/**
* The number of Touch objects in this TouchList object.
* @type {number}
*/
TouchList.prototype.length;
/**
* Returns the Touch object at the given index.
* @param {number} index
* @return {!Touch}
*/
TouchList.prototype.item = function(index) {};
/**
* Creates a new TouchList object.
* @see http://developer.apple.com/library/safari/#documentation/UserExperience/Reference/DocumentAdditionsReference/DocumentAdditions/DocumentAdditions.html#//apple_ref/javascript/instm/Document/createTouchList
* @param {Array.<Touch>} touches
* @return {TouchList}
*/
Document.prototype.createTouchList = function(touches) {};
/**
* The TouchEvent class encapsulates information about a touch event.
*
* <p>The system continually sends TouchEvent objects to an application as
* fingers touch and move across a surface. A touch event provides a snapshot of
* all touches during a multi-touch sequence, most importantly the touches that
* are new or have changed for a particular target. A multi-touch sequence
* begins when a finger first touches the surface. Other fingers may
* subsequently touch the surface, and all fingers may move across the surface.
* The sequence ends when the last of these fingers is lifted from the surface.
* An application receives touch event objects during each phase of any touch.
* </p>
*
* <p>The different types of TouchEvent objects that can occur are:
* <ul>
* <li>touchstart - Sent when a finger for a given event touches the surface.
* <li>touchmove - Sent when a given event moves on the surface.
* <li>touchend - Sent when a given event lifts from the surface.
* <li>touchcancel - Sent when the system cancels tracking for the touch.
* </ul>
* TouchEvent objects are combined together to form high-level GestureEvent
* objects that are also sent during a multi-touch sequence.</p>
*
* @see http://developer.apple.com/library/safari/#documentation/UserExperience/Reference/TouchEventClassReference/TouchEvent/TouchEvent.html
* @extends {UIEvent}
* @constructor
*/
function TouchEvent() {}
/**
* A collection of Touch objects representing all touches associated with this
* target.
* @type {TouchList}
*/
TouchEvent.prototype.touches;
/**
* A collection of Touch objects representing all touches associated with this
* target.
* @type {TouchList}
*/
TouchEvent.prototype.targetTouches;
/**
* A collection of Touch objects representing all touches that changed in this event.
* @type {TouchList}
*/
TouchEvent.prototype.changedTouches;
/**
* The distance between two fingers since the start of an event as a multiplier
* of the initial distance. The initial value is 1.0. If less than 1.0, the
* gesture is pinch close (to zoom out). If greater than 1.0, the gesture is
* pinch open (to zoom in).
* @type {number}
*/
TouchEvent.prototype.scale;
/**
* The delta rotation since the start of an event, in degrees, where clockwise
* is positive and counter-clockwise is negative. The initial value is 0.0.
* @type {number}
*/
TouchEvent.prototype.rotation;
/**
* Initializes a newly created TouchEvent object.
* @param {string} type
* @param {boolean} canBubble
* @param {boolean} cancelable
* @param {Window} view
* @param {number} detail
* @param {number} screenX
* @param {number} screenY
* @param {number} clientX
* @param {number} clientY
* @param {boolean} ctrlKey
* @param {boolean} altKey
* @param {boolean} shiftKey
* @param {boolean} metaKey
* @param {TouchList} touches
* @param {TouchList} targetTouches
* @param {TouchList} changedTouches
* @param {number} scale
* @param {number} rotation
*/
TouchEvent.prototype.initTouchEvent = function(type, canBubble, cancelable,
view, detail, screenX, screenY, clientX, clientY, ctrlKey, altKey, shiftKey,
metaKey, touches, targetTouches, changedTouches, scale, rotation) {};
/**
* The GestureEvent class encapsulates information about a multi-touch gesture.
*
* GestureEvent objects are high-level events that encapsulate the low-level
* TouchEvent objects. Both GestureEvent and TouchEvent events are sent during
* a multi-touch sequence. Gesture events contain scaling and rotation
* information allowing gestures to be combined, if supported by the platform.
* If not supported, one gesture ends before another starts. Listen for
* GestureEvent events if you want to respond to gestures only, not process
* the low-level TouchEvent objects.
*
* @see http://developer.apple.com/library/safari/#documentation/UserExperience/Reference/GestureEventClassReference/GestureEvent/GestureEvent.html
* @extends {UIEvent}
* @constructor
*/
function GestureEvent() {}
/**
* The distance between two fingers since the start of an event as a multiplier
* of the initial distance. The initial value is 1.0. If less than 1.0, the
* gesture is pinch close (to zoom out). If greater than 1.0, the gesture is
* pinch open (to zoom in).
* @type {number}
*/
GestureEvent.prototype.scale;
/**
* The delta rotation since the start of an event, in degrees, where clockwise
* is positive and counter-clockwise is negative. The initial value is 0.0.
* @type {number}
*/
GestureEvent.prototype.rotation;
/**
* The target of this gesture.
* @type {EventTarget}
*/
GestureEvent.prototype.target;
/**
* Initializes a newly created GestureEvent object.
* @param {string} type
* @param {boolean} canBubble
* @param {boolean} cancelable
* @param {Window} view
* @param {number} detail
* @param {number} screenX
* @param {number} screenY
* @param {number} clientX
* @param {number} clientY
* @param {boolean} ctrlKey
* @param {boolean} altKey
* @param {boolean} shiftKey
* @param {boolean} metaKey
* @param {EventTarget} target
* @param {number} scale
* @param {number} rotation
*/
GestureEvent.prototype.initGestureEvent = function(type, canBubble, cancelable,
view, detail, screenX, screenY, clientX, clientY, ctrlKey, altKey, shiftKey,
metaKey, target, scale, rotation) {};
/**
* Specifies the JavaScript method to invoke when the system cancels tracking
* for the touch.
* @type {?function(!TouchEvent)}
*/
Element.prototype.ontouchcancel = function(e) {};
/**
* Specifies the JavaScript method to invoke when a given event lifts from the
* surface.
* @type {?function(!TouchEvent)}
*/
Element.prototype.ontouchend = function(e) {};
/**
* Specifies the JavaScript method to invoke when a finger for a given event
* moves on the surface.
* @type {?function(!TouchEvent)}
*/
Element.prototype.ontouchmove = function(e) {};
/**
* Specifies the JavaScript method to invoke when a finger for a given event
* touches the surface.
* @type {?function(!TouchEvent)}
*/
Element.prototype.ontouchstart = function(e) {};
/**
* Specifies the JavaScript method to invoke when a gesture is started by
* two or more fingers touching the surface.
* @type {?function(!GestureEvent)}
*/
Element.prototype.ongesturestart = function(e) {};
/**
* Specifies the JavaScript method to invoke when fingers are moved during a
* gesture.
* @type {?function(!GestureEvent)}
*/
Element.prototype.ongesturechange = function(e) {};
/**
* Specifies the JavaScript method to invoke when a gesture ends (when there are
* 0 or 1 fingers touching the surface).
* @type {?function(!GestureEvent)}
*/
Element.prototype.ongestureend = function(e) {};
/**
* Specifies the JavaScript method to invoke when the browser device's
* orientation changes, i.e.the device is rotated.
* @type {?function(!Event)}
* @see http://developer.apple.com/library/IOS/#documentation/AppleApplications/Reference/SafariWebContent/HandlingEvents/HandlingEvents.html
*/
Window.prototype.onorientationchange = function(e) {};
/**
* Returns the orientation of the browser's device, one of [-90, 0, 90, 180].
* @type {number}
* @see http://developer.apple.com/library/IOS/#documentation/AppleApplications/Reference/SafariWebContent/HandlingEvents/HandlingEvents.html
*/
Window.prototype.orientation;
/**
* @implicitCast
* @type {boolean}
*/
HTMLInputElement.prototype.autocorrect;
/**
* @implicitCast
* @type {boolean}
*/
HTMLInputElement.prototype.autocapitalize;
/**
* @implicitCast
* @type {boolean}
*/
HTMLTextAreaElement.prototype.autocorrect;
/**
* @implicitCast
* @type {boolean}
*/
HTMLTextAreaElement.prototype.autocapitalize;
|