--- /dev/null
+/*\r
+ * GPAC - Multimedia Framework C SDK\r
+ *\r
+ * Copyright (c) Jean Le Feuvre 2000-2005\r
+ * All rights reserved\r
+ *\r
+ * This file is part of GPAC / modules interfaces\r
+ *\r
+ * GPAC is free software; you can redistribute it and/or modify\r
+ * it under the terms of the GNU Lesser General Public License as published by\r
+ * the Free Software Foundation; either version 2, or (at your option)\r
+ * any later version.\r
+ * \r
+ * GPAC is distributed in the hope that it will be useful,\r
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+ * GNU Lesser General Public License for more details.\r
+ * \r
+ * You should have received a copy of the GNU Lesser General Public\r
+ * License along with this library; see the file COPYING. If not, write to\r
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. \r
+ *\r
+ */\r
+\r
+\r
+#ifndef _GF_MODULE_JS_USR_H_\r
+#define _GF_MODULE_JS_USR_H_\r
+\r
+#ifdef __cplusplus\r
+extern "C" {\r
+#endif\r
+\r
+#include <gpac/module.h>\r
+#include <gpac/scenegraph.h>\r
+\r
+/*interface name and version for JavaScript User Extensions*/\r
+#define GF_JS_USER_EXT_INTERFACE GF_4CC('G','J','S', 0x01)\r
+\r
+typedef struct _js_usr_ext GF_JSUserExtension;\r
+\r
+struct _js_usr_ext\r
+{\r
+ /* interface declaration*/\r
+ GF_DECL_MODULE_INTERFACE\r
+\r
+ /*load JS extension\r
+ doc: scene graph in which the extension is loaded\r
+ jsctx: JavaScript context in which the extension is loaded. \r
+ For BIFS/VRML/X3D, one context is created per script node\r
+ For other graphs, one context is created per scene/document\r
+ global: JavaScript global object for the context\r
+ unload: if true, the extension should be unloaded from the JavaScript context (called upon destroy). Otherwise it should be loaded\r
+ */\r
+ void (*load)(GF_JSUserExtension *jsext, GF_SceneGraph *doc, struct JSContext *jsctx, struct JSObject *global, Bool unload);\r
+ /*module private*/\r
+ void *udta;\r
+};\r
+\r
+\r
+#ifdef __cplusplus\r
+}\r
+#endif\r
+\r
+\r
+#endif /*#define _GF_MODULE_JS_USR_H_*/\r
+\r