//"use strict";
// See browser tests for examples (tests/runner.py, search for sdl_). Run with
// python tests/runner.py browser
var LibrarySDL = {
$SDL__deps: ['$FS', '$Browser'],
$SDL: {
defaults: {
width: 320,
height: 200,
copyOnLock: true
},
version: null,
surfaces: {},
events: [],
fonts: [null],
audios: [null],
music: {
audio: null,
volume: 1.0
},
mixerFrequency: 22050,
mixerFormat: 0x8010, // AUDIO_S16LSB
mixerNumChannels: 2,
mixerChunkSize: 1024,
keyboardState: null,
shiftKey: false,
ctrlKey: false,
altKey: false,
startTime: null,
mouseX: 0,
mouseY: 0,
buttonState: 0,
DOMButtons: [0, 0, 0],
DOMEventToSDLEvent: {},
keyCodes: { // DOM code ==> SDL code. See https://developer.mozilla.org/en/Document_Object_Model_%28DOM%29/KeyboardEvent and SDL_keycode.h
38: 1106, // up arrow
40: 1105, // down arrow
37: 1104, // left arrow
39: 1103, // right arrow
33: 1099, // pagedup
34: 1102, // pagedown
17: 305, // control (right, or left)
18: 308, // alt
173: 45, // minus
16: 304, // shift
96: 88 | 1<<10, // keypad 0
97: 89 | 1<<10