#ifndef __JSAPI_H__#define __JSAPI_H__
#include <string>#include "annotation.h"
class JSAPI{ Annotation* annotations;public: char* getAnnotContent(int annotID);
std::vector<double> getAnnotRect(int annotID);
};
#endif#include "jsapi.h"
char* JSAPI::getAnnotContent(int annotID){ return annotations[annotID].content;}
std::vector<double> JSAPI::getAnnotRect(int annotID){ return annotations[annotID].rect;}interface JSAPI{ void JSAPI(); DOMString getAnnotContent(long annotID);
std::vector<double> getAnnotRect(long annotID);};--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-discuss+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-discuss+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "emscripten-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/emscripten-discuss/18GjJeGOq08/unsubscribe.
To unsubscribe from this group and all its topics, send an email to emscripten-discuss+unsub...@googlegroups.com.
To unsubscribe from this group and all its topics, send an email to emscripten-discuss+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-discuss+unsub...@googlegroups.com.
JSHelper fillRandomArray()
{
int len = rand()%10 + 10;
int pointer = EM_ASM_INT({ var buffer = Module._malloc($0 * 4); return buffer; }, len); int* a = (int*)pointer; for (int i = 0; i < len-1; i++) { a[i] = i*3; }
JSHelper js;
js.pointer = pointer;
js.length
return js;
} var nByte = 4; var charByte = 1; var jsInfo = Module.fillRandomArray(); var buffer = jsInfo.pointer; for (var i = 0; i < jsInfo.length; i++) { console.log(Module.getValue(buffer + i*nByte, 'i32')); }To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-discuss+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "emscripten-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/emscripten-discuss/18GjJeGOq08/unsubscribe.
To unsubscribe from this group and all its topics, send an email to emscripten-discuss+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-discuss+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "emscripten-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/emscripten-discuss/18GjJeGOq08/unsubscribe.
To unsubscribe from this group and all its topics, send an email to emscripten-discuss+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-discuss+unsubscribe@googlegroups.com.
To unsubscribe from this group and all its topics, send an email to emscripten-discuss+unsub...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-discuss+unsub...@googlegroups.com.