Mercurial > hg > orthanc-stone
comparison Platforms/Wasm/Defaults.cpp @ 458:e74f9271d653 am-touch-events
removed/updated logs
author | Alain Mazy <alain@mazy.be> |
---|---|
date | Tue, 29 Jan 2019 14:48:59 +0100 |
parents | 3b4df9925db6 |
children | 7105a0bad250 |
comparison
equal
deleted
inserted
replaced
457:3b4df9925db6 | 458:e74f9271d653 |
---|---|
344 | 344 |
345 const char* EMSCRIPTEN_KEEPALIVE SendMessageToStoneApplication(const char* message) | 345 const char* EMSCRIPTEN_KEEPALIVE SendMessageToStoneApplication(const char* message) |
346 { | 346 { |
347 static std::string output; // we don't want the string to be deallocated when we return to JS code so we always use the same string (this is fine since JS is single-thread) | 347 static std::string output; // we don't want the string to be deallocated when we return to JS code so we always use the same string (this is fine since JS is single-thread) |
348 | 348 |
349 printf("SendMessageToStoneApplication\n"); | 349 printf("SendMessageToStoneApplication (JS -> C++): %s\n", message); |
350 printf("%s", message); | |
351 | 350 |
352 if (applicationWasmAdapter.get() != NULL) { | 351 if (applicationWasmAdapter.get() != NULL) { |
353 printf("sending message to C++\n"); | |
354 applicationWasmAdapter->HandleMessageFromWeb(output, std::string(message)); | 352 applicationWasmAdapter->HandleMessageFromWeb(output, std::string(message)); |
355 return output.c_str(); | 353 return output.c_str(); |
356 } | 354 } |
357 printf("This stone application does not have a Web Adapter"); | 355 printf("This stone application does not have a Web Adapter\n"); |
358 return NULL; | 356 return NULL; |
359 } | 357 } |
360 | 358 |
361 | 359 |
362 #ifdef __cplusplus | 360 #ifdef __cplusplus |