wasm.h (971B)
1 // Copyright 2012-2022 David Robillard <d@drobilla.net> 2 // Copyright 2021-2022 Filipe Coelho <falktx@falktx.com> 3 // SPDX-License-Identifier: ISC 4 5 #ifndef PUGL_SRC_WASM_H 6 #define PUGL_SRC_WASM_H 7 8 #include "../pugl-upstream/src/types.h" 9 10 #include "pugl/pugl.h" 11 12 // #define PUGL_WASM_ASYNC_CLIPBOARD 13 14 struct PuglTimer { 15 PuglView* view; 16 uintptr_t id; 17 }; 18 19 struct PuglWorldInternalsImpl { 20 double scaleFactor; 21 }; 22 23 struct LastMotionValues { 24 double x, y, xRoot, yRoot; 25 }; 26 27 struct PuglInternalsImpl { 28 PuglSurface* surface; 29 bool isFullscreen; 30 bool needsRepaint; 31 bool pointerLocked; 32 bool created; 33 bool visible; 34 uint32_t numTimers; 35 LastMotionValues lastMotion; 36 long buttonPressTimeout; 37 PuglEvent nextButtonEvent; 38 #ifdef PUGL_WASM_ASYNC_CLIPBOARD 39 PuglViewHintValue supportsClipboardRead; 40 PuglViewHintValue supportsClipboardWrite; 41 #endif 42 PuglViewHintValue supportsTouch; 43 char* clipboardData; 44 struct PuglTimer* timers; 45 }; 46 47 #endif // PUGL_SRC_WASM_H