| qstdweb.cpp |
|
28533 |
- |
| qstdweb_p.h |
|
15528 |
- |
| qwasmanimationdriver.cpp |
|
4355 |
- |
| qwasmanimationdriver_p.h |
|
1292 |
- |
| qwasmglobal.cpp |
|
1535 |
- |
| qwasmglobal_p.h |
|
1919 |
- |
| qwasmlocalfileengine.cpp |
!
\class QWasmFileEngine
\brief The QWasmFileEngine class provides a QAbstractFileEngine
for files that has the prefix ':weblocalfile/'.
|
11563 |
- |
| qwasmlocalfileengine_p.h |
|
4446 |
- |
| qwasmsocket.cpp |
|
9328 |
- |
| qwasmsocket_p.h |
|
2004 |
- |
| qwasmsuspendresumecontrol.cpp |
QWasmSuspendResumeControl controls asyncify suspend and resume when handling native events.
The class supports registering C++ event handlers, and creates a corresponding
JavaScript event handler which can be passed to addEventListener() or similar
API:
auto handler = [](emscripten::val argument){
// handle event
};
uint32_t index = control->registerEventHandler(handler);
element.call<void>("addEventListener", "eventname", control->jsEventHandlerAt(index));
The wasm instance suspends itself by calling the suspend() function, which resumes
and returns whenever there was a native event. Call sendPendingEvents() to send
the native event and invoke the C++ event handlers.
// about to suspend
control->suspend(); // <- instance/app sleeps here
// was resumed, send event(s)
control->sendPendingEvents();
QWasmSuspendResumeControl also supports the case where the wasm instance returns
control to the browser's event loop (without suspending), and will call the C++
event handlers directly in that case.
|
15619 |
- |
| qwasmsuspendresumecontrol_p.h |
|
4013 |
- |