OLD | NEW |
| (Empty) |
1 // Common declarations. | |
2 | |
3 interface Acceleration {} | |
4 | |
5 interface CompareHow {} | |
6 | |
7 typedef void EventListener(Event event); | |
8 | |
9 interface MediaQueryListListener {} | |
10 | |
11 interface OptionsObject {} | |
12 | |
13 interface PositionOptions {} | |
14 | |
15 interface RotationRate {} | |
16 | |
17 typedef void TimeoutHandler(); | |
18 | |
19 interface VoidCallback {} | |
20 | |
21 // Key related interfaces. | |
22 | |
23 /** | |
24 * Defines the standard key locations returned by | |
25 * KeyboardEvent.getKeyLocation. | |
26 */ | |
27 interface KeyLocation { | |
28 | |
29 /** | |
30 * The event key is not distinguished as the left or right version | |
31 * of the key, and did not originate from the numeric keypad (or did not | |
32 * originate with a virtual key corresponding to the numeric keypad). | |
33 */ | |
34 static final int STANDARD = 0; | |
35 | |
36 /** | |
37 * The event key is in the left key location. | |
38 */ | |
39 static final int LEFT = 1; | |
40 | |
41 /** | |
42 * The event key is in the right key location. | |
43 */ | |
44 static final int RIGHT = 2; | |
45 | |
46 /** | |
47 * The event key originated on the numeric keypad or with a virtual key | |
48 * corresponding to the numeric keypad. | |
49 */ | |
50 static final int NUMPAD = 3; | |
51 | |
52 /** | |
53 * The event key originated on a mobile device, either on a physical | |
54 * keypad or a virtual keyboard. | |
55 */ | |
56 static final int MOBILE = 4; | |
57 | |
58 /** | |
59 * The event key originated on a game controller or a joystick on a mobile | |
60 * device. | |
61 */ | |
62 static final int JOYSTICK = 5; | |
63 } | |
64 | |
65 /** | |
66 * Defines the standard keyboard identifier names for keys that are returned | |
67 * by KeyEvent.getKeyboardIdentifier when the key does not have a direct | |
68 * unicode mapping. | |
69 */ | |
70 interface KeyName { | |
71 | |
72 /** The Accept (Commit, OK) key */ | |
73 static final String ACCEPT = "Accept"; | |
74 | |
75 /** The Add key */ | |
76 static final String ADD = "Add"; | |
77 | |
78 /** The Again key */ | |
79 static final String AGAIN = "Again"; | |
80 | |
81 /** The All Candidates key */ | |
82 static final String ALL_CANDIDATES = "AllCandidates"; | |
83 | |
84 /** The Alphanumeric key */ | |
85 static final String ALPHANUMERIC = "Alphanumeric"; | |
86 | |
87 /** The Alt (Menu) key */ | |
88 static final String ALT = "Alt"; | |
89 | |
90 /** The Alt-Graph key */ | |
91 static final String ALT_GRAPH = "AltGraph"; | |
92 | |
93 /** The Application key */ | |
94 static final String APPS = "Apps"; | |
95 | |
96 /** The ATTN key */ | |
97 static final String ATTN = "Attn"; | |
98 | |
99 /** The Browser Back key */ | |
100 static final String BROWSER_BACK = "BrowserBack"; | |
101 | |
102 /** The Browser Favorites key */ | |
103 static final String BROWSER_FAVORTIES = "BrowserFavorites"; | |
104 | |
105 /** The Browser Forward key */ | |
106 static final String BROWSER_FORWARD = "BrowserForward"; | |
107 | |
108 /** The Browser Home key */ | |
109 static final String BROWSER_NAME = "BrowserHome"; | |
110 | |
111 /** The Browser Refresh key */ | |
112 static final String BROWSER_REFRESH = "BrowserRefresh"; | |
113 | |
114 /** The Browser Search key */ | |
115 static final String BROWSER_SEARCH = "BrowserSearch"; | |
116 | |
117 /** The Browser Stop key */ | |
118 static final String BROWSER_STOP = "BrowserStop"; | |
119 | |
120 /** The Camera key */ | |
121 static final String CAMERA = "Camera"; | |
122 | |
123 /** The Caps Lock (Capital) key */ | |
124 static final String CAPS_LOCK = "CapsLock"; | |
125 | |
126 /** The Clear key */ | |
127 static final String CLEAR = "Clear"; | |
128 | |
129 /** The Code Input key */ | |
130 static final String CODE_INPUT = "CodeInput"; | |
131 | |
132 /** The Compose key */ | |
133 static final String COMPOSE = "Compose"; | |
134 | |
135 /** The Control (Ctrl) key */ | |
136 static final String CONTROL = "Control"; | |
137 | |
138 /** The Crsel key */ | |
139 static final String CRSEL = "Crsel"; | |
140 | |
141 /** The Convert key */ | |
142 static final String CONVERT = "Convert"; | |
143 | |
144 /** The Copy key */ | |
145 static final String COPY = "Copy"; | |
146 | |
147 /** The Cut key */ | |
148 static final String CUT = "Cut"; | |
149 | |
150 /** The Decimal key */ | |
151 static final String DECIMAL = "Decimal"; | |
152 | |
153 /** The Divide key */ | |
154 static final String DIVIDE = "Divide"; | |
155 | |
156 /** The Down Arrow key */ | |
157 static final String DOWN = "Down"; | |
158 | |
159 /** The diagonal Down-Left Arrow key */ | |
160 static final String DOWN_LEFT = "DownLeft"; | |
161 | |
162 /** The diagonal Down-Right Arrow key */ | |
163 static final String DOWN_RIGHT = "DownRight"; | |
164 | |
165 /** The Eject key */ | |
166 static final String EJECT = "Eject"; | |
167 | |
168 /** The End key */ | |
169 static final String END = "End"; | |
170 | |
171 /** | |
172 * The Enter key. Note: This key value must also be used for the Return | |
173 * (Macintosh numpad) key | |
174 */ | |
175 static final String ENTER = "Enter"; | |
176 | |
177 /** The Erase EOF key */ | |
178 static final String ERASE_EOF= "EraseEof"; | |
179 | |
180 /** The Execute key */ | |
181 static final String EXECUTE = "Execute"; | |
182 | |
183 /** The Exsel key */ | |
184 static final String EXSEL = "Exsel"; | |
185 | |
186 /** The Function switch key */ | |
187 static final String FN = "Fn"; | |
188 | |
189 /** The F1 key */ | |
190 static final String F1 = "F1"; | |
191 | |
192 /** The F2 key */ | |
193 static final String F2 = "F2"; | |
194 | |
195 /** The F3 key */ | |
196 static final String F3 = "F3"; | |
197 | |
198 /** The F4 key */ | |
199 static final String F4 = "F4"; | |
200 | |
201 /** The F5 key */ | |
202 static final String F5 = "F5"; | |
203 | |
204 /** The F6 key */ | |
205 static final String F6 = "F6"; | |
206 | |
207 /** The F7 key */ | |
208 static final String F7 = "F7"; | |
209 | |
210 /** The F8 key */ | |
211 static final String F8 = "F8"; | |
212 | |
213 /** The F9 key */ | |
214 static final String F9 = "F9"; | |
215 | |
216 /** The F10 key */ | |
217 static final String F10 = "F10"; | |
218 | |
219 /** The F11 key */ | |
220 static final String F11 = "F11"; | |
221 | |
222 /** The F12 key */ | |
223 static final String F12 = "F12"; | |
224 | |
225 /** The F13 key */ | |
226 static final String F13 = "F13"; | |
227 | |
228 /** The F14 key */ | |
229 static final String F14 = "F14"; | |
230 | |
231 /** The F15 key */ | |
232 static final String F15 = "F15"; | |
233 | |
234 /** The F16 key */ | |
235 static final String F16 = "F16"; | |
236 | |
237 /** The F17 key */ | |
238 static final String F17 = "F17"; | |
239 | |
240 /** The F18 key */ | |
241 static final String F18 = "F18"; | |
242 | |
243 /** The F19 key */ | |
244 static final String F19 = "F19"; | |
245 | |
246 /** The F20 key */ | |
247 static final String F20 = "F20"; | |
248 | |
249 /** The F21 key */ | |
250 static final String F21 = "F21"; | |
251 | |
252 /** The F22 key */ | |
253 static final String F22 = "F22"; | |
254 | |
255 /** The F23 key */ | |
256 static final String F23 = "F23"; | |
257 | |
258 /** The F24 key */ | |
259 static final String F24 = "F24"; | |
260 | |
261 /** The Final Mode (Final) key used on some asian keyboards */ | |
262 static final String FINAL_MODE = "FinalMode"; | |
263 | |
264 /** The Find key */ | |
265 static final String FIND = "Find"; | |
266 | |
267 /** The Full-Width Characters key */ | |
268 static final String FULL_WIDTH = "FullWidth"; | |
269 | |
270 /** The Half-Width Characters key */ | |
271 static final String HALF_WIDTH = "HalfWidth"; | |
272 | |
273 /** The Hangul (Korean characters) Mode key */ | |
274 static final String HANGUL_MODE = "HangulMode"; | |
275 | |
276 /** The Hanja (Korean characters) Mode key */ | |
277 static final String HANJA_MODE = "HanjaMode"; | |
278 | |
279 /** The Help key */ | |
280 static final String HELP = "Help"; | |
281 | |
282 /** The Hiragana (Japanese Kana characters) key */ | |
283 static final String HIRAGANA = "Hiragana"; | |
284 | |
285 /** The Home key */ | |
286 static final String HOME = "Home"; | |
287 | |
288 /** The Insert (Ins) key */ | |
289 static final String INSERT = "Insert"; | |
290 | |
291 /** The Japanese-Hiragana key */ | |
292 static final String JAPANESE_HIRAGANA = "JapaneseHiragana"; | |
293 | |
294 /** The Japanese-Katakana key */ | |
295 static final String JAPANESE_KATAKANA = "JapaneseKatakana"; | |
296 | |
297 /** The Japanese-Romaji key */ | |
298 static final String JAPANESE_ROMAJI = "JapaneseRomaji"; | |
299 | |
300 /** The Junja Mode key */ | |
301 static final String JUNJA_MODE = "JunjaMode"; | |
302 | |
303 /** The Kana Mode (Kana Lock) key */ | |
304 static final String KANA_MODE = "KanaMode"; | |
305 | |
306 /** | |
307 * The Kanji (Japanese name for ideographic characters of Chinese origin) | |
308 * Mode key | |
309 */ | |
310 static final String KANJI_MODE = "KanjiMode"; | |
311 | |
312 /** The Katakana (Japanese Kana characters) key */ | |
313 static final String KATAKANA = "Katakana"; | |
314 | |
315 /** The Start Application One key */ | |
316 static final String LAUNCH_APPLICATION_1 = "LaunchApplication1"; | |
317 | |
318 /** The Start Application Two key */ | |
319 static final String LAUNCH_APPLICATION_2 = "LaunchApplication2"; | |
320 | |
321 /** The Start Mail key */ | |
322 static final String LAUNCH_MAIL = "LaunchMail"; | |
323 | |
324 /** The Left Arrow key */ | |
325 static final String LEFT = "Left"; | |
326 | |
327 /** The Menu key */ | |
328 static final String MENU = "Menu"; | |
329 | |
330 /** | |
331 * The Meta key. Note: This key value shall be also used for the Apple | |
332 * Command key | |
333 */ | |
334 static final String META = "Meta"; | |
335 | |
336 /** The Media Next Track key */ | |
337 static final String MEDIA_NEXT_TRACK = "MediaNextTrack"; | |
338 | |
339 /** The Media Play Pause key */ | |
340 static final String MEDIA_PAUSE_PLAY = "MediaPlayPause"; | |
341 | |
342 /** The Media Previous Track key */ | |
343 static final String MEDIA_PREVIOUS_TRACK = "MediaPreviousTrack"; | |
344 | |
345 /** The Media Stop key */ | |
346 static final String MEDIA_STOP = "MediaStop"; | |
347 | |
348 /** The Mode Change key */ | |
349 static final String MODE_CHANGE = "ModeChange"; | |
350 | |
351 /** The Next Candidate function key */ | |
352 static final String NEXT_CANDIDATE = "NextCandidate"; | |
353 | |
354 /** The Nonconvert (Don't Convert) key */ | |
355 static final String NON_CONVERT = "Nonconvert"; | |
356 | |
357 /** The Number Lock key */ | |
358 static final String NUM_LOCK = "NumLock"; | |
359 | |
360 /** The Page Down (Next) key */ | |
361 static final String PAGE_DOWN = "PageDown"; | |
362 | |
363 /** The Page Up key */ | |
364 static final String PAGE_UP = "PageUp"; | |
365 | |
366 /** The Paste key */ | |
367 static final String PASTE = "Paste"; | |
368 | |
369 /** The Pause key */ | |
370 static final String PAUSE = "Pause"; | |
371 | |
372 /** The Play key */ | |
373 static final String PLAY = "Play"; | |
374 | |
375 /** | |
376 * The Power key. Note: Some devices may not expose this key to the | |
377 * operating environment | |
378 */ | |
379 static final String POWER = "Power"; | |
380 | |
381 /** The Previous Candidate function key */ | |
382 static final String PREVIOUS_CANDIDATE = "PreviousCandidate"; | |
383 | |
384 /** The Print Screen (PrintScrn, SnapShot) key */ | |
385 static final String PRINT_SCREEN = "PrintScreen"; | |
386 | |
387 /** The Process key */ | |
388 static final String PROCESS = "Process"; | |
389 | |
390 /** The Props key */ | |
391 static final String PROPS = "Props"; | |
392 | |
393 /** The Right Arrow key */ | |
394 static final String RIGHT = "Right"; | |
395 | |
396 /** The Roman Characters function key */ | |
397 static final String ROMAN_CHARACTERS = "RomanCharacters"; | |
398 | |
399 /** The Scroll Lock key */ | |
400 static final String SCROLL = "Scroll"; | |
401 | |
402 /** The Select key */ | |
403 static final String SELECT = "Select"; | |
404 | |
405 /** The Select Media key */ | |
406 static final String SELECT_MEDIA = "SelectMedia"; | |
407 | |
408 /** The Separator key */ | |
409 static final String SEPARATOR = "Separator"; | |
410 | |
411 /** The Shift key */ | |
412 static final String SHIFT = "Shift"; | |
413 | |
414 /** The Soft1 key */ | |
415 static final String SOFT_1 = "Soft1"; | |
416 | |
417 /** The Soft2 key */ | |
418 static final String SOFT_2 = "Soft2"; | |
419 | |
420 /** The Soft3 key */ | |
421 static final String SOFT_3 = "Soft3"; | |
422 | |
423 /** The Soft4 key */ | |
424 static final String SOFT_4 = "Soft4"; | |
425 | |
426 /** The Stop key */ | |
427 static final String STOP = "Stop"; | |
428 | |
429 /** The Subtract key */ | |
430 static final String SUBTRACT = "Subtract"; | |
431 | |
432 /** The Symbol Lock key */ | |
433 static final String SYMBOL_LOCK = "SymbolLock"; | |
434 | |
435 /** The Up Arrow key */ | |
436 static final String UP = "Up"; | |
437 | |
438 /** The diagonal Up-Left Arrow key */ | |
439 static final String UP_LEFT = "UpLeft"; | |
440 | |
441 /** The diagonal Up-Right Arrow key */ | |
442 static final String UP_RIGHT = "UpRight"; | |
443 | |
444 /** The Undo key */ | |
445 static final String UNDO = "Undo"; | |
446 | |
447 /** The Volume Down key */ | |
448 static final String VOLUME_DOWN = "VolumeDown"; | |
449 | |
450 /** The Volume Mute key */ | |
451 static final String VOLUMN_MUTE = "VolumeMute"; | |
452 | |
453 /** The Volume Up key */ | |
454 static final String VOLUMN_UP = "VolumeUp"; | |
455 | |
456 /** The Windows Logo key */ | |
457 static final String WIN = "Win"; | |
458 | |
459 /** The Zoom key */ | |
460 static final String ZOOM = "Zoom"; | |
461 | |
462 /** | |
463 * The Backspace (Back) key. Note: This key value shall be also used for the | |
464 * key labeled 'delete' MacOS keyboards when not modified by the 'Fn' key | |
465 */ | |
466 static final String BACKSPACE = "Backspace"; | |
467 | |
468 /** The Horizontal Tabulation (Tab) key */ | |
469 static final String TAB = "Tab"; | |
470 | |
471 /** The Cancel key */ | |
472 static final String CANCEL = "Cancel"; | |
473 | |
474 /** The Escape (Esc) key */ | |
475 static final String ESC = "Esc"; | |
476 | |
477 /** The Space (Spacebar) key: */ | |
478 static final String SPACEBAR = "Spacebar"; | |
479 | |
480 /** | |
481 * The Delete (Del) Key. Note: This key value shall be also used for the key | |
482 * labeled 'delete' MacOS keyboards when modified by the 'Fn' key | |
483 */ | |
484 static final String DEL = "Del"; | |
485 | |
486 /** The Combining Grave Accent (Greek Varia, Dead Grave) key */ | |
487 static final String DEAD_GRAVE = "DeadGrave"; | |
488 | |
489 /** | |
490 * The Combining Acute Accent (Stress Mark, Greek Oxia, Tonos, Dead Eacute) | |
491 * key | |
492 */ | |
493 static final String DEAD_EACUTE = "DeadEacute"; | |
494 | |
495 /** The Combining Circumflex Accent (Hat, Dead Circumflex) key */ | |
496 static final String DEAD_CIRCUMFLEX = "DeadCircumflex"; | |
497 | |
498 /** The Combining Tilde (Dead Tilde) key */ | |
499 static final String DEAD_TILDE = "DeadTilde"; | |
500 | |
501 /** The Combining Macron (Long, Dead Macron) key */ | |
502 static final String DEAD_MACRON = "DeadMacron"; | |
503 | |
504 /** The Combining Breve (Short, Dead Breve) key */ | |
505 static final String DEAD_BREVE = "DeadBreve"; | |
506 | |
507 /** The Combining Dot Above (Derivative, Dead Above Dot) key */ | |
508 static final String DEAD_ABOVE_DOT = "DeadAboveDot"; | |
509 | |
510 /** | |
511 * The Combining Diaeresis (Double Dot Abode, Umlaut, Greek Dialytika, | |
512 * Double Derivative, Dead Diaeresis) key | |
513 */ | |
514 static final String DEAD_UMLAUT = "DeadUmlaut"; | |
515 | |
516 /** The Combining Ring Above (Dead Above Ring) key */ | |
517 static final String DEAD_ABOVE_RING = "DeadAboveRing"; | |
518 | |
519 /** The Combining Double Acute Accent (Dead Doubleacute) key */ | |
520 static final String DEAD_DOUBLEACUTE = "DeadDoubleacute"; | |
521 | |
522 /** The Combining Caron (Hacek, V Above, Dead Caron) key */ | |
523 static final String DEAD_CARON = "DeadCaron"; | |
524 | |
525 /** The Combining Cedilla (Dead Cedilla) key */ | |
526 static final String DEAD_CEDILLA = "DeadCedilla"; | |
527 | |
528 /** The Combining Ogonek (Nasal Hook, Dead Ogonek) key */ | |
529 static final String DEAD_OGONEK = "DeadOgonek"; | |
530 | |
531 /** | |
532 * The Combining Greek Ypogegrammeni (Greek Non-Spacing Iota Below, Iota | |
533 * Subscript, Dead Iota) key | |
534 */ | |
535 static final String DEAD_IOTA = "DeadIota"; | |
536 | |
537 /** | |
538 * The Combining Katakana-Hiragana Voiced Sound Mark (Dead Voiced Sound) key | |
539 */ | |
540 static final String DEAD_VOICED_SOUND = "DeadVoicedSound"; | |
541 | |
542 /** | |
543 * The Combining Katakana-Hiragana Semi-Voiced Sound Mark (Dead Semivoiced | |
544 * Sound) key | |
545 */ | |
546 static final String DEC_SEMIVOICED_SOUND= "DeadSemivoicedSound"; | |
547 | |
548 /** | |
549 * Key value used when an implementation is unable to identify another key | |
550 * value, due to either hardware, platform, or software constraints | |
551 */ | |
552 static final String UNIDENTIFIED = "Unidentified"; | |
553 } | |
554 | |
555 // FIXME: remove when prefix is working in the VM. | |
556 Window get dom_window() { | |
557 return window; | |
558 } | |
559 | |
560 Document get document() { | |
561 return window.document; | |
562 } | |
563 | |
564 class DOMType extends DOMWrapperBase { | |
565 // FIXME: Remove if/when Dart supports OLS for all objects. | |
566 var dartObjectLocalStorage; | |
567 | |
568 String get typeName() { | |
569 throw new UnsupportedOperationException("typeName must be overridden."); | |
570 } | |
571 } | |
OLD | NEW |