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