Debian Codegraph @

contrib/externs/jquery-1.3.2.externs.js

raw symbols SCIP
1 /*
2 * Copyright 2009 Google Inc.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 /**
18 * @fileoverview Externs for jQuery 1.3.2.
19 * The externs defined here are in the order of the jQuery documentation pages.
20 * Note that some functions use different return types depending on the number
21 * of parameters passed in. In this cases, you may need to annotate the type
22 * of the result in your code, so the JSCompiler understands which type you're
23 * expecting. For example:
24 * <code>var elt = /** @type {Element} * / (foo.get(0));</code>
25 * @see http://docs.jquery.com/
26 */
27
28 /**
29 * @param {string|Node|Element|Array.<Element>|Function|Window} arg
30 * @param {(jQueryObject|Document)=} opt_arg
31 * @return {jQueryObject}
32 */
33 var $ = function(arg, opt_arg) {};
34
35 var jQuery = {};
36
37 /** @constructor */
38 function jQueryObject() {}
39
40
41 // http://docs.jquery.com/Core - Object accessors
42
43 /**
44 * @param {Function} callback
45 * @return {jQueryObject}
46 */
47 jQueryObject.prototype.each = function(callback) {};
48
49 /** @return {number} */
50 jQueryObject.prototype.size = function() {};
51
52 /** @type {number} */
53 jQueryObject.prototype.length;
54
55 /** @return {string} */
56 jQueryObject.prototype.selector = function() {};
57
58 /** @return {Element} */
59 jQueryObject.prototype.context = function() {};
60
61 /**
62 * @param {number=} opt_index
63 * @return {Element|Array.<Element>}
64 */
65 jQueryObject.prototype.get = function(opt_index) {};
66
67 /**
68 * @param {Element|jQueryObject} subject
69 * @return {number}
70 */
71 jQueryObject.prototype.index = function(subject) {};
72
73
74 // http://docs.jquery.com/Core - Data
75
76 /**
77 * @param {string} name
78 * @param {string=} opt_value
79 * @return {*}
80 */
81 jQueryObject.prototype.data = function(name, opt_value) {};
82
83 /**
84 * @param {string} name
85 * @return {jQueryObject}
86 */
87 jQueryObject.prototype.removeData = function(name) {};
88
89 /**
90 * @param {(string|Function|Array.<Function>)=} opt_arg1
91 * @param {(Function|Array.<Function>)=} opt_arg2
92 * @return {Array.<Function>|jQueryObject}
93 */
94 jQueryObject.prototype.queue = function(opt_arg1, opt_arg2) {};
95
96 /**
97 * @param {string=} opt_name
98 * @return {jQueryObject}
99 */
100 jQueryObject.prototype.dequeue = function(opt_name) {};
101
102
103 // http://docs.jquery.com/Attributes - Attr
104
105 /**
106 * @param {string|Object} nameOrProperties
107 * @param {*=} opt_value
108 * @return {Object|jQueryObject}
109 */
110 jQueryObject.prototype.attr = function(nameOrProperties, opt_value) {};
111
112 /**
113 * @param {string} name
114 * @return {jQueryObject}
115 */
116 jQueryObject.prototype.removeAttr = function(name) {};
117
118
119 // http://docs.jquery.com/Attributes - Class
120
121 /**
122 * @param {string} klass
123 * @return {jQueryObject}
124 */
125 jQueryObject.prototype.addClass = function(klass) {};
126
127 /**
128 * @param {string} klass
129 * @return {boolean}
130 */
131 jQueryObject.prototype.hasClass = function(klass) {};
132
133 /**
134 * @param {string=} opt_klass
135 * @return {jQueryObject}
136 */
137 jQueryObject.prototype.removeClass = function(opt_klass) {};
138
139 /**
140 * @param {string} klass
141 * @param {boolean=} opt_switch
142 * @return {jQueryObject}
143 */
144 jQueryObject.prototype.toggleClass = function(klass, opt_switch) {};
145
146
147 // http://docs.jquery.com/Attributes - HTML, Text, Value
148
149 /**
150 * @param {string} opt_val
151 * @return {string|jQueryObject}
152 */
153 jQueryObject.prototype.html = function(opt_val) {};
154
155 /**
156 * @param {string=} opt_val
157 * @return {string|jQueryObject}
158 */
159 jQueryObject.prototype.text = function(opt_val) {};
160
161 /**
162 * @param {string|Array.<string>} opt_val
163 * @return {string|Array|jQueryObject}
164 */
165 jQueryObject.prototype.val = function(opt_val) {};
166
167
168 // http://docs.jquery.com/Traversing - Filtering
169
170 /**
171 * @param {number} index
172 * @return {jQueryObject}
173 */
174 jQueryObject.prototype.eq = function(index) {};
175
176 /**
177 * @param {string|Function} arg
178 * @return {jQueryObject}
179 */
180 jQueryObject.prototype.filter = function(arg) {};
181
182 /**
183 * @param {string} expr
184 * @return {boolean}
185 */
186 jQueryObject.prototype.is = function(expr) {};
187
188 /**
189 * @param {Function} callback
190 * @return {jQueryObject}
191 */
192 jQueryObject.prototype.map = function(callback) {};
193
194 /**
195 * @param {string} expr
196 * @return {jQueryObject}
197 */
198 jQueryObject.prototype.not = function(expr) {};
199
200 /**
201 * @param {number} start
202 * @param {number=} opt_end
203 * @return {jQueryObject}
204 */
205 jQueryObject.prototype.slice = function(start, opt_end) {};
206
207
208 // http://docs.jquery.com/Traversing - Finding, Chaining
209
210 /**
211 * @param {string|Element|Array.<Element>} expr
212 * @return {jQueryObject}
213 */
214 jQueryObject.prototype.add = function(expr) {};
215
216 /**
217 * @param {string=} opt_expr
218 * @return {jQueryObject}
219 */
220 jQueryObject.prototype.children = function(opt_expr) {};
221
222 /**
223 * @param {string} expr
224 * @return {jQueryObject}
225 */
226 jQueryObject.prototype.closest = function(expr) {};
227
228 /**
229 * @return {jQueryObject}
230 */
231 jQueryObject.prototype.contents = function() {};
232
233 /**
234 * @param {string} expr
235 * @return {jQueryObject}
236 */
237 jQueryObject.prototype.find = function(expr) {};
238
239 /**
240 * @param {string=} opt_expr
241 * @return {jQueryObject}
242 */
243 jQueryObject.prototype.next = function(opt_expr) {};
244
245 /**
246 * @param {string=} opt_expr
247 * @return {jQueryObject}
248 */
249 jQueryObject.prototype.nextAll = function(opt_expr) {};
250
251 /**
252 * @return {jQueryObject}
253 */
254 jQueryObject.prototype.offsetParent = function() {};
255
256 /**
257 * @param {string=} opt_expr
258 * @return {jQueryObject}
259 */
260 jQueryObject.prototype.parent = function(opt_expr) {};
261
262 /**
263 * @param {string=} opt_expr
264 * @return {jQueryObject}
265 */
266 jQueryObject.prototype.parents = function(opt_expr) {};
267
268 /**
269 * @param {string=} opt_expr
270 * @return {jQueryObject}
271 */
272 jQueryObject.prototype.prev = function(opt_expr) {};
273
274 /**
275 * @param {string=} opt_expr
276 * @return {jQueryObject}
277 */
278 jQueryObject.prototype.prevAll = function(opt_expr) {};
279
280 /**
281 * @param {string=} opt_expr
282 * @return {jQueryObject}
283 */
284 jQueryObject.prototype.siblings = function(opt_expr) {};
285
286 /**
287 * @return {jQueryObject}
288 */
289 jQueryObject.prototype.andSelf = function() {};
290
291 /**
292 * @return {jQueryObject}
293 */
294 jQueryObject.prototype.end = function() {};
295
296
297 // http://docs.jquery.com/Manipulation
298
299 /**
300 * @param {...(string|Node|Element|jQueryObject)} var_args
301 * @return {jQueryObject}
302 */
303 jQueryObject.prototype.append = function(var_args) {};
304
305 /**
306 * @param {string|Node|Element|jQueryObject} target
307 * @return {jQueryObject}
308 */
309 jQueryObject.prototype.appendTo = function(target) {};
310
311 /**
312 * @param {...(string|Node|Element|jQueryObject)} var_args
313 * @return {jQueryObject}
314 */
315 jQueryObject.prototype.prepend = function(var_args) {};
316
317 /**
318 * @param {string|Node|Element|jQueryObject} target
319 * @return {jQueryObject}
320 */
321 jQueryObject.prototype.prependTo = function(target) {};
322
323 /**
324 * @param {...(string|Node|Element|jQueryObject)} var_args
325 * @return {jQueryObject}
326 */
327 jQueryObject.prototype.after = function(var_args) {};
328
329 /**
330 * @param {...(string|Node|Element|jQueryObject)} var_args
331 * @return {jQueryObject}
332 */
333 jQueryObject.prototype.before = function(var_args) {};
334
335 /**
336 * @param {string|Node|Element|jQueryObject} target
337 * @return {jQueryObject}
338 */
339 jQueryObject.prototype.insertAfter = function(target) {};
340
341 /**
342 * @param {string|Node|Element|jQueryObject} target
343 * @return {jQueryObject}
344 */
345 jQueryObject.prototype.insertBefore = function(target) {};
346
347 /**
348 * @param {string|Element} arg
349 * @return {jQueryObject}
350 */
351 jQueryObject.prototype.wrap = function(arg) {};
352
353 /**
354 * @param {string|Element} arg
355 * @return {jQueryObject}
356 */
357 jQueryObject.prototype.wrapAll = function(arg) {};
358
359 /**
360 * @param {string|Element} arg
361 * @return {jQueryObject}
362 */
363 jQueryObject.prototype.wrapInner = function(arg) {};
364
365 /**
366 * @param {string|Node|Element|jQueryObject} content
367 * @return {jQueryObject}
368 */
369 jQueryObject.prototype.replaceWith = function(content) {};
370
371 /**
372 * @param {string} selector
373 * @return {jQueryObject}
374 */
375 jQueryObject.prototype.replaceAll = function(selector) {};
376
377 /**
378 * @return {jQueryObject}
379 */
380 jQueryObject.prototype.empty = function() {};
381
382 /**
383 * @param {string=} opt_expr
384 * @return {jQueryObject}
385 */
386 jQueryObject.prototype.remove = function(opt_expr) {};
387
388 /**
389 * @param {boolean=} opt_cloneEvents
390 * @return {jQueryObject}
391 */
392 jQueryObject.prototype.clone = function(opt_cloneEvents) {};
393
394
395 // http://docs.jquery.com/CSS
396
397 /**
398 * @param {string|Object} nameOrProperties
399 * @param {(string|number|Function)=} opt_value
400 * @return {Object|jQueryObject|string}
401 */
402 jQueryObject.prototype.css = function(nameOrProperties, opt_value) {};
403
404 /**
405 * @return {Object}
406 */
407 jQueryObject.prototype.offset = function() {};
408
409 /**
410 * @return {Object}
411 */
412 jQueryObject.prototype.position = function() {};
413
414 /**
415 * @param {number=} opt_val
416 * @return {number|jQueryObject}
417 */
418 jQueryObject.prototype.scrollTop = function(opt_val) {};
419
420 /**
421 * @param {number=} opt_val
422 * @return {number|jQueryObject}
423 */
424 jQueryObject.prototype.scrollLeft = function(opt_val) {};
425
426 /**
427 * @param {number=} opt_val
428 * @return {number|jQueryObject}
429 */
430 jQueryObject.prototype.height = function(opt_val) {};
431
432 /**
433 * @param {number=} opt_val
434 * @return {number|jQueryObject}
435 */
436 jQueryObject.prototype.width = function(opt_val) {};
437
438 /**
439 * @return {number}
440 */
441 jQueryObject.prototype.innerHeight = function() {};
442
443 /**
444 * @return {number}
445 */
446 jQueryObject.prototype.innerWidth = function() {};
447
448 /**
449 * @param {boolean=} opt_margin
450 * @return {number}
451 */
452 jQueryObject.prototype.outerHeight = function(opt_margin) {};
453
454 /**
455 * @param {boolean=} opt_margin
456 * @return {number}
457 */
458 jQueryObject.prototype.outerWidth = function(opt_margin) {};
459
460
461 // http://docs.jquery.com/Events
462
463 /**
464 * @param {string} type
465 * @param {Function} fn
466 * @return {jQueryObject}
467 */
468 jQueryObject.prototype.live = function(type, fn) {};
469
470 /**
471 * @param {string=} opt_type
472 * @param {Function=} opt_fn
473 * @return {jQueryObject}
474 */
475 jQueryObject.prototype.die = function(opt_type, opt_fn) {};
476
477 /**
478 * @param {Function} over
479 * @param {Function} out
480 * @return {jQueryObject}
481 */
482 jQueryObject.prototype.hover = function(over, out) {};
483
484 /**
485 * @param {Function=} opt_fn
486 * @return {jQueryObject}
487 */
488 jQueryObject.prototype.blur = function(opt_fn) {};
489
490 /**
491 * @param {Function=} opt_fn
492 * @return {jQueryObject}
493 */
494 jQueryObject.prototype.change = function(opt_fn) {};
495
496 /**
497 * @param {Function=} opt_fn
498 * @return {jQueryObject}
499 */
500 jQueryObject.prototype.click = function(opt_fn) {};
501
502 /**
503 * @param {Function=} opt_fn
504 * @return {jQueryObject}
505 */
506 jQueryObject.prototype.dblclick = function(opt_fn) {};
507
508 /**
509 * @param {Function=} opt_fn
510 * @return {jQueryObject}
511 */
512 jQueryObject.prototype.error = function(opt_fn) {};
513
514 /**
515 * @param {Function=} opt_fn
516 * @return {jQueryObject}
517 */
518 jQueryObject.prototype.focus = function(opt_fn) {};
519
520 /**
521 * @param {Function=} opt_fn
522 * @return {jQueryObject}
523 */
524 jQueryObject.prototype.keydown = function(opt_fn) {};
525
526 /**
527 * @param {Function=} opt_fn
528 * @return {jQueryObject}
529 */
530 jQueryObject.prototype.keypress = function(opt_fn) {};
531
532 /**
533 * @param {Function} fn
534 * @return {jQueryObject}
535 */
536 jQueryObject.prototype.keyup = function(fn) {};
537
538 /**
539 * @param {Function} fn
540 * @return {jQueryObject}
541 */
542 jQueryObject.prototype.load = function(fn) {};
543
544 /**
545 * @param {Function} fn
546 * @return {jQueryObject}
547 */
548 jQueryObject.prototype.mousedown = function(fn) {};
549
550 /**
551 * @param {Function} fn
552 * @return {jQueryObject}
553 */
554 jQueryObject.prototype.mouseenter = function(fn) {};
555
556 /**
557 * @param {Function} fn
558 * @return {jQueryObject}
559 */
560 jQueryObject.prototype.mouseleave = function(fn) {};
561
562 /**
563 * @param {Function} fn
564 * @return {jQueryObject}
565 */
566 jQueryObject.prototype.mousemove = function(fn) {};
567
568 /**
569 * @param {Function} fn
570 * @return {jQueryObject}
571 */
572 jQueryObject.prototype.mouseout = function(fn) {};
573
574 /**
575 * @param {Function} fn
576 * @return {jQueryObject}
577 */
578 jQueryObject.prototype.mouseover = function(fn) {};
579
580 /**
581 * @param {Function} fn
582 * @return {jQueryObject}
583 */
584 jQueryObject.prototype.mouseup = function(fn) {};
585
586 /**
587 * @param {Function} fn
588 * @return {jQueryObject}
589 */
590 jQueryObject.prototype.resize = function(fn) {};
591
592 /**
593 * @param {Function} fn
594 * @return {jQueryObject}
595 */
596 jQueryObject.prototype.scroll = function(fn) {};
597
598 /**
599 * @param {Function=} opt_fn
600 * @return {jQueryObject}
601 */
602 jQueryObject.prototype.select = function(opt_fn) {};
603
604 /**
605 * @param {Function=} opt_fn
606 * @return {jQueryObject}
607 */
608 jQueryObject.prototype.submit = function(opt_fn) {};
609
610 /**
611 * @param {Function} fn
612 * @return {jQueryObject}
613 */
614 jQueryObject.prototype.unload = function(fn) {};
615
616
617 // http://docs.jquery.com/Effects
618
619 /**
620 * @param {(number|string)=} opt_speed
621 * @param {Function=} opt_fn
622 * @return {jQueryObject}
623 */
624 jQueryObject.prototype.show = function(opt_speed, opt_fn) {};
625
626 /**
627 * @param {(number|string)=} opt_speed
628 * @param {Function=} opt_fn
629 * @return {jQueryObject}
630 */
631 jQueryObject.prototype.hide = function(opt_speed, opt_fn) {};
632
633 /**
634 * toggle() is defined as both an event and an effect... sigh.
635 * @param {(Function|boolean|number|string)=} opt_arg1
636 * @param {Function=} opt_fn2
637 * @param {...Function} var_args
638 * @return {jQueryObject}
639 */
640 jQueryObject.prototype.toggle = function(opt_arg1, opt_fn2, var_args) {};
641
642 /**
643 * @param {(number|string)=} opt_speed
644 * @param {Function=} opt_fn
645 * @return {jQueryObject}
646 */
647 jQueryObject.prototype.slideDown = function(opt_speed, opt_fn) {};
648
649 /**
650 * @param {(number|string)=} opt_speed
651 * @param {Function=} opt_fn
652 * @return {jQueryObject}
653 */
654 jQueryObject.prototype.slideUp = function(opt_speed, opt_fn) {};
655
656 /**
657 * @param {(number|string)=} opt_speed
658 * @param {Function=} opt_fn
659 * @return {jQueryObject}
660 */
661 jQueryObject.prototype.slideToggle = function(opt_speed, opt_fn) {};
662
663 /**
664 * @param {(number|string)=} opt_speed
665 * @param {Function=} opt_fn
666 * @return {jQueryObject}
667 */
668 jQueryObject.prototype.fadeIn = function(opt_speed, opt_fn) {};
669
670 /**
671 * @param {(number|string)=} opt_speed
672 * @param {Function=} opt_fn
673 * @return {jQueryObject}
674 */
675 jQueryObject.prototype.fadeOut = function(opt_speed, opt_fn) {};
676
677 /**
678 * @param {(number|string)=} opt_speed
679 * @param {number=} opt_opacity
680 * @param {Function=} opt_fn
681 * @return {jQueryObject}
682 */
683 jQueryObject.prototype.fadeTo = function(opt_speed, opt_opacity, opt_fn) {};
684
685 /**
686 * @param {Object} params
687 * @param {(number|string|Object)=} opt_durationOrOptions
688 * @param {string=} opt_easing
689 * @param {Function=} opt_fn
690 * @return {jQueryObject}
691 */
692 jQueryObject.prototype.animate = function(
693 params, opt_durationOrOptions, opt_easing, opt_fn) {};
694
695 /**
696 * @param {boolean} opt_clearQueue
697 * @param {boolean} opt_gotoEnd
698 * @return {jQueryObject}
699 */
700 jQueryObject.prototype.stop = function(opt_clearQueue, opt_gotoEnd) {};
701
702 jQuery.fx = {};
703
704 /** @type {boolean} */
705 jQuery.fx.off;
706
707 // http://docs.jquery.com/Utilities
708
709 /**
710 * @param {number|string|Object} value
711 * @param {Array} array
712 * @return {number}
713 */
714 jQueryObject.prototype.inArray = function(value, array) {};