File: emscripten-example-js.h

package info (click to toggle)
cogl 1.22.8-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 17,760 kB
  • sloc: ansic: 113,504; sh: 4,960; makefile: 1,825; xml: 246; javascript: 45; sed: 16
file content (18 lines) | stat: -rw-r--r-- 526 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

#ifndef _EMSCRIPTEN_EXAMPLE_JS_H_
#define _EMSCRIPTEN_EXAMPLE_JS_H_

/*
 * example_js_add_input_listener:
 *
 * Adds an input event listener to the browser's mainloop and whenever
 * input is received then the emscripten mainloop is resumed, if it
 * has been paused.
 *
 * This means we don't have to poll SDL for events and can instead go
 * to sleep waiting in the browser mainloop when there's no input and
 * nothing being animated.
 */
void example_js_add_input_listener (void);

#endif /* _EMSCRIPTEN_EXAMPLE_JS_H_ */