wasm-canvas
window.h File Reference

HTMLWindow (Window) C-DOM-JS-interaction. More...

#include <emscripten.h>
#include <stdlib.h>
Include dependency graph for window.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  HTMLWindow
 

Typedefs

typedef struct HTMLWindow HTMLWindow
 

Functions

HTMLWindowWindow ()
 
void freeWindow (HTMLWindow *window)
 

Detailed Description

HTMLWindow (Window) C-DOM-JS-interaction.

Interfaces with the browser window in which the program is running, typically exposed to JavaScript code.

Author
Alex Tyner

Function Documentation

◆ Window()

HTMLWindow* Window ( )

Retrieves the current HTML Window. Behaves like a singleton – that is, an HTMLWindow is defined with static linkage and only one HTMLWindow should ever be allocated.

If you've called this function to get the HTMLWindow at any point in your program, don't forget to call freeWindow() when you're done with it. For example: freeWindow(Window());