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