OSDN Git Service

stop using trunk directory in rectool
[rec10/rec10-git.git] / tstools / DtsEdit / src / gpac / modules / js_usr.h
1 /*\r
2  *                      GPAC - Multimedia Framework C SDK\r
3  *\r
4  *                      Copyright (c) Jean Le Feuvre 2000-2005\r
5  *                                      All rights reserved\r
6  *\r
7  *  This file is part of GPAC / modules interfaces\r
8  *\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
13  *   \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
18  *   \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
22  *\r
23  */\r
24 \r
25 \r
26 #ifndef _GF_MODULE_JS_USR_H_\r
27 #define _GF_MODULE_JS_USR_H_\r
28 \r
29 #ifdef __cplusplus\r
30 extern "C" {\r
31 #endif\r
32 \r
33 #include <gpac/module.h>\r
34 #include <gpac/scenegraph.h>\r
35 \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
38 \r
39 typedef struct _js_usr_ext GF_JSUserExtension;\r
40 \r
41 struct _js_usr_ext\r
42 {\r
43         /* interface declaration*/\r
44         GF_DECL_MODULE_INTERFACE\r
45 \r
46         /*load JS extension\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
53         */\r
54         void (*load)(GF_JSUserExtension *jsext, GF_SceneGraph *doc, struct JSContext *jsctx, struct JSObject *global, Bool unload);\r
55         /*module private*/\r
56         void *udta;\r
57 };\r
58 \r
59 \r
60 #ifdef __cplusplus\r
61 }\r
62 #endif\r
63 \r
64 \r
65 #endif  /*#define _GF_MODULE_JS_USR_H_*/\r
66 \r