diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-08-26 14:50:01 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-08-26 14:50:01 -0700 |
commit | 1cc28b8e9e94267041bc71afebfbbe3059db4a3f (patch) | |
tree | 107571ed84b48bab5bfb5aea6b7e5b01b814929f /system | |
parent | 06e7518718115977026830676b80c7279e924b5f (diff) | |
parent | 422d9a1f3227ae8f47fa8bd0037c2220bb2017f7 (diff) |
Merge branch 'incoming'
Diffstat (limited to 'system')
-rw-r--r-- | system/include/emscripten/emscripten.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/system/include/emscripten/emscripten.h b/system/include/emscripten/emscripten.h index f0df8dca..1b9a8f25 100644 --- a/system/include/emscripten/emscripten.h +++ b/system/include/emscripten/emscripten.h @@ -19,6 +19,16 @@ extern "C" { #endif /* + * Convenient syntax for inline assembly/js. Allows stuff like + * + * EM_ASM(window.alert('hai')); + * + * Note: double-quotes (") are not supported, but you can use + * single-quotes (') in js anyhow. + */ +#define EM_ASM(...) asm(#__VA_ARGS__) + +/* * Forces LLVM to not dead-code-eliminate a function. Note that * you still need to use EXPORTED_FUNCTIONS so it stays alive * in JS, e.g. @@ -160,6 +170,12 @@ void emscripten_hide_mouse(); void emscripten_set_canvas_size(int width, int height); /* + * Get the current pixel width and height of the <canvas> element + * as well as whether the canvas is fullscreen or not. + */ +void emscripten_get_canvas_size(int *width, int *height, int *isFullscreen); + +/* * Returns the highest-precision representation of the * current time that the browser provides. This uses either * Date.now or performance.now. The result is *not* an |