]> git.sesse.net Git - vlc/blob - mozilla/control/npolibvlc.h
- more javascript fixes
[vlc] / mozilla / control / npolibvlc.h
1 /*****************************************************************************\r
2  * npolibvlc.h: official Javascript APIs\r
3  *****************************************************************************\r
4  * Copyright (C) 2002-2006 the VideoLAN team\r
5  *\r
6  * Authors: Damien Fouilleul <damien.fouilleul@laposte.net>\r
7  *\r
8  * This program is free software; you can redistribute it and/or modify\r
9  * it under the terms of the GNU General Public License as published by\r
10  * the Free Software Foundation; either version 2 of the License, or\r
11  * (at your option) any later version.\r
12  *\r
13  * This program is distributed in the hope that it will be useful,\r
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
16  * GNU General Public License for more details.\r
17  *\r
18  * You should have received a copy of the GNU General Public License\r
19  * along with this program; if not, write to the Free Software\r
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.\r
21  *****************************************************************************/\r
22 \r
23 /*\r
24 ** defined runtime script objects\r
25 */\r
26 \r
27 #include "nporuntime.h"\r
28 \r
29 class LibvlcRootNPObject: public RuntimeNPObject\r
30 {\r
31 protected:\r
32     friend class RuntimeNPClass<LibvlcRootNPObject>;\r
33 \r
34     LibvlcRootNPObject(NPP instance, const NPClass *aClass);\r
35     virtual ~LibvlcRootNPObject();\r
36 \r
37     static const int propertyCount;\r
38     static const NPUTF8 * const propertyNames[];\r
39 \r
40     InvokeResult getProperty(int index, NPVariant &result);\r
41 \r
42     static const int methodCount;\r
43     static const NPUTF8 * const methodNames[];\r
44 \r
45     NPObject *audioObj;\r
46     NPObject *inputObj;\r
47     NPObject *playlistObj;\r
48     NPObject *videoObj;\r
49 };\r
50 \r
51 class LibvlcAudioNPObject: public RuntimeNPObject\r
52 {\r
53 protected:\r
54     LibvlcAudioNPObject(NPP instance, const NPClass *aClass) :\r
55         RuntimeNPObject(instance, aClass) {};\r
56     virtual ~LibvlcAudioNPObject() {};\r
57 \r
58     friend class RuntimeNPClass<LibvlcAudioNPObject>;\r
59 \r
60     static const int propertyCount;\r
61     static const NPUTF8 * const propertyNames[];\r
62 \r
63     InvokeResult getProperty(int index, NPVariant &result);\r
64     InvokeResult setProperty(int index, const NPVariant &value);\r
65 \r
66     static const int methodCount;\r
67     static const NPUTF8 * const methodNames[];\r
68 \r
69     InvokeResult invoke(int index, const NPVariant *args, uint32_t argCount, NPVariant &result);\r
70 };\r
71 \r
72 class LibvlcInputNPObject: public RuntimeNPObject\r
73 {\r
74 protected:\r
75     friend class RuntimeNPClass<LibvlcInputNPObject>;\r
76 \r
77     LibvlcInputNPObject(NPP instance, const NPClass *aClass) :\r
78         RuntimeNPObject(instance, aClass) {};\r
79         \r
80     virtual ~LibvlcInputNPObject() {};\r
81 \r
82     static const int propertyCount;\r
83     static const NPUTF8 * const propertyNames[];\r
84 \r
85     InvokeResult getProperty(int index, NPVariant &result);\r
86     InvokeResult setProperty(int index, const NPVariant &value);\r
87 \r
88     static const int methodCount;\r
89     static const NPUTF8 * const methodNames[];\r
90 };\r
91 \r
92 class LibvlcPlaylistNPObject: public RuntimeNPObject\r
93 {\r
94 protected:\r
95     friend class RuntimeNPClass<LibvlcPlaylistNPObject>;\r
96 \r
97     LibvlcPlaylistNPObject(NPP instance, const NPClass *aClass) :\r
98         RuntimeNPObject(instance, aClass) {};\r
99     virtual ~LibvlcPlaylistNPObject() {};\r
100 \r
101     static const int propertyCount;\r
102     static const NPUTF8 * const propertyNames[];\r
103 \r
104     InvokeResult getProperty(int index, NPVariant &result);\r
105 \r
106     static const int methodCount;\r
107     static const NPUTF8 * const methodNames[];\r
108 \r
109     InvokeResult invoke(int index, const NPVariant *args, uint32_t argCount, NPVariant &result);\r
110 \r
111     void parseOptions(const NPString &s, int *i_options, char*** ppsz_options);\r
112     void parseOptions(NPObject *obj, int *i_options, char*** ppsz_options);\r
113 };\r
114 \r
115 class LibvlcVideoNPObject: public RuntimeNPObject\r
116 {\r
117 protected:\r
118     friend class RuntimeNPClass<LibvlcVideoNPObject>;\r
119 \r
120     LibvlcVideoNPObject(NPP instance, const NPClass *aClass) :\r
121         RuntimeNPObject(instance, aClass) {};\r
122     virtual ~LibvlcVideoNPObject() {};\r
123 \r
124     static const int propertyCount;\r
125     static const NPUTF8 * const propertyNames[];\r
126 \r
127     InvokeResult getProperty(int index, NPVariant &result);\r
128     InvokeResult setProperty(int index, const NPVariant &value);\r
129 \r
130     static const int methodCount;\r
131     static const NPUTF8 * const methodNames[];\r
132 \r
133     InvokeResult invoke(int index, const NPVariant *args, uint32_t argCount, NPVariant &result);\r
134 };\r
135 \r