]>
Commit | Line | Data |
---|---|---|
13701c20 JB |
1 | --- gpac/applications/osmozilla/npplat.h.orig 2005-07-13 16:34:30.000000000 +0200 |
2 | +++ gpac/applications/osmozilla/npplat.h 2011-03-20 09:34:57.624712082 +0100 | |
3 | @@ -49,7 +49,7 @@ | |
4 | #endif | |
5 | ||
6 | #include "npapi.h" | |
7 | -#include "npupp.h" | |
8 | +#include "npfunctions.h" | |
9 | ||
10 | /**************************************************/ | |
11 | /* */ | |
12 | --- gpac/applications/osmozilla/osmozilla.h.orig 2008-10-06 17:17:57.000000000 +0200 | |
13 | +++ gpac/applications/osmozilla/osmozilla.h 2011-03-20 10:04:41.876713758 +0100 | |
14 | @@ -39,6 +39,7 @@ | |
15 | #define __PLUGIN_H__ | |
16 | ||
17 | #include <nsIClassInfo.h> | |
18 | +#include <nsIProgrammingLanguage.h> | |
19 | ||
20 | #include "npplat.h" | |
21 | #include "nsIOsmozilla.h" | |
11d219a5 | 22 | @@ -104,7 +104,7 @@ |
23 | ||
24 | // global to get plugins name & description | |
25 | NPError NS_PluginGetValue(NPPVariable aVariable, void *aValue); | |
26 | -char* NPP_GetMIMEDescription(void); | |
ddb7e9b9 | 27 | +const char* NPP_GetMIMEDescription(void); |
11d219a5 | 28 | |
29 | ||
30 | //#define NO_GPAC | |
13701c20 JB |
31 | --- gpac/applications/osmozilla/osmozilla.cpp.orig 2008-10-06 17:17:57.000000000 +0200 |
32 | +++ gpac/applications/osmozilla/osmozilla.cpp 2011-03-20 10:12:46.068709568 +0100 | |
33 | @@ -856,19 +856,19 @@ | |
34 | return NS_ERROR_NULL_POINTER; | |
35 | ||
36 | if (aIID.Equals(kIZillaPluginIID)) { | |
37 | - *aInstancePtr = NS_STATIC_CAST(nsIOsmozilla *, this); | |
38 | + *aInstancePtr = static_cast<nsIOsmozilla *>(this); | |
39 | AddRef(); | |
40 | return NS_OK; | |
41 | } | |
42 | ||
43 | if (aIID.Equals(kIClassInfoIID)) { | |
44 | - *aInstancePtr = NS_STATIC_CAST(nsIClassInfo *, this); | |
45 | + *aInstancePtr = static_cast<nsIClassInfo *>(this); | |
46 | AddRef(); | |
47 | return NS_OK; | |
48 | } | |
49 | ||
50 | if (aIID.Equals(kISupportsIID)) { | |
51 | - *aInstancePtr = NS_STATIC_CAST(nsISupports *, (NS_STATIC_CAST (nsIOsmozilla *, this))); | |
52 | + *aInstancePtr = static_cast<nsISupports *>((static_cast<nsIOsmozilla *>(this))); | |
53 | AddRef(); | |
54 | return NS_OK; | |
55 | } | |
56 | --- gpac/applications/osmozilla/npn_gate.cpp.orig 2005-07-13 16:34:29.000000000 +0200 | |
57 | +++ gpac/applications/osmozilla/npn_gate.cpp 2011-03-20 10:24:21.496702863 +0100 | |
58 | @@ -58,7 +58,7 @@ | |
59 | NPError rv = NPERR_NO_ERROR; | |
60 | ||
61 | if( navMinorVers >= NPVERS_HAS_NOTIFICATION ) | |
62 | - rv = CallNPN_GetURLNotifyProc(NPNFuncs.geturlnotify, instance, url, target, notifyData); | |
63 | + rv = (*NPNFuncs.geturlnotify)(instance, url, target, notifyData); | |
64 | else | |
65 | rv = NPERR_INCOMPATIBLE_VERSION_ERROR; | |
66 | ||
67 | @@ -67,32 +67,32 @@ | |
68 | ||
69 | NPError NPN_GetURL(NPP instance, const char *url, const char *target) | |
70 | { | |
71 | - NPError rv = CallNPN_GetURLProc(NPNFuncs.geturl, instance, url, target); | |
72 | + NPError rv = (*NPNFuncs.geturl)(instance, url, target); | |
73 | return rv; | |
74 | } | |
75 | ||
76 | -NPError NPN_PostURLNotify(NPP instance, const char* url, const char* window, uint32 len, const char* buf, NPBool file, void* notifyData) | |
77 | +NPError NPN_PostURLNotify(NPP instance, const char* url, const char* window, uint32_t len, const char* buf, NPBool file, void* notifyData) | |
78 | { | |
79 | int navMinorVers = NPNFuncs.version & 0xFF; | |
80 | NPError rv = NPERR_NO_ERROR; | |
81 | ||
82 | if( navMinorVers >= NPVERS_HAS_NOTIFICATION ) | |
83 | - rv = CallNPN_PostURLNotifyProc(NPNFuncs.posturlnotify, instance, url, window, len, buf, file, notifyData); | |
84 | + rv = (*NPNFuncs.posturlnotify)(instance, url, window, len, buf, file, notifyData); | |
85 | else | |
86 | rv = NPERR_INCOMPATIBLE_VERSION_ERROR; | |
87 | ||
88 | return rv; | |
89 | } | |
90 | ||
91 | -NPError NPN_PostURL(NPP instance, const char* url, const char* window, uint32 len, const char* buf, NPBool file) | |
92 | +NPError NPN_PostURL(NPP instance, const char* url, const char* window, uint32_t len, const char* buf, NPBool file) | |
93 | { | |
94 | - NPError rv = CallNPN_PostURLProc(NPNFuncs.posturl, instance, url, window, len, buf, file); | |
95 | + NPError rv = (*NPNFuncs.posturl)(instance, url, window, len, buf, file); | |
96 | return rv; | |
97 | } | |
98 | ||
99 | NPError NPN_RequestRead(NPStream* stream, NPByteRange* rangeList) | |
100 | { | |
101 | - NPError rv = CallNPN_RequestReadProc(NPNFuncs.requestread, stream, rangeList); | |
102 | + NPError rv = (*NPNFuncs.requestread)(stream, rangeList); | |
103 | return rv; | |
104 | } | |
105 | ||
106 | @@ -103,20 +103,20 @@ | |
107 | NPError rv = NPERR_NO_ERROR; | |
108 | ||
109 | if( navMinorVersion >= NPVERS_HAS_STREAMOUTPUT ) | |
110 | - rv = CallNPN_NewStreamProc(NPNFuncs.newstream, instance, type, target, stream); | |
111 | + rv = (*NPNFuncs.newstream)(instance, type, target, stream); | |
112 | else | |
113 | rv = NPERR_INCOMPATIBLE_VERSION_ERROR; | |
114 | ||
115 | return rv; | |
116 | } | |
117 | ||
118 | -int32 NPN_Write(NPP instance, NPStream *stream, int32 len, void *buffer) | |
119 | +int32_t NPN_Write(NPP instance, NPStream *stream, int32_t len, void *buffer) | |
120 | { | |
121 | int navMinorVersion = NPNFuncs.version & 0xFF; | |
122 | - int32 rv = 0; | |
123 | + int32_t rv = 0; | |
124 | ||
125 | if( navMinorVersion >= NPVERS_HAS_STREAMOUTPUT ) | |
126 | - rv = CallNPN_WriteProc(NPNFuncs.write, instance, stream, len, buffer); | |
127 | + rv = (*NPNFuncs.write)(instance, stream, len, buffer); | |
128 | else | |
129 | rv = -1; | |
130 | ||
131 | @@ -129,7 +129,7 @@ | |
132 | NPError rv = NPERR_NO_ERROR; | |
133 | ||
134 | if( navMinorVersion >= NPVERS_HAS_STREAMOUTPUT ) | |
135 | - rv = CallNPN_DestroyStreamProc(NPNFuncs.destroystream, instance, stream, reason); | |
136 | + rv = (*NPNFuncs.destroystream)(instance, stream, reason); | |
137 | else | |
138 | rv = NPERR_INCOMPATIBLE_VERSION_ERROR; | |
139 | ||
140 | @@ -138,78 +138,78 @@ | |
141 | ||
142 | void NPN_Status(NPP instance, const char *message) | |
143 | { | |
144 | - CallNPN_StatusProc(NPNFuncs.status, instance, message); | |
145 | + (*NPNFuncs.status)(instance, message); | |
146 | } | |
147 | ||
148 | const char* NPN_UserAgent(NPP instance) | |
149 | { | |
150 | const char * rv = NULL; | |
151 | - rv = CallNPN_UserAgentProc(NPNFuncs.uagent, instance); | |
152 | + rv = (*NPNFuncs.uagent)(instance); | |
153 | return rv; | |
154 | } | |
155 | ||
156 | -void* NPN_MemAlloc(uint32 size) | |
157 | +void* NPN_MemAlloc(uint32_t size) | |
158 | { | |
159 | void * rv = NULL; | |
160 | - rv = CallNPN_MemAllocProc(NPNFuncs.memalloc, size); | |
161 | + rv = (*NPNFuncs.memalloc)(size); | |
162 | return rv; | |
163 | } | |
164 | ||
165 | void NPN_MemFree(void* ptr) | |
166 | { | |
167 | - CallNPN_MemFreeProc(NPNFuncs.memfree, ptr); | |
168 | + (*NPNFuncs.memfree)(ptr); | |
169 | } | |
170 | ||
171 | -uint32 NPN_MemFlush(uint32 size) | |
172 | +uint32_t NPN_MemFlush(uint32_t size) | |
173 | { | |
174 | - uint32 rv = CallNPN_MemFlushProc(NPNFuncs.memflush, size); | |
175 | + uint32_t rv = (*NPNFuncs.memflush)(size); | |
176 | return rv; | |
177 | } | |
178 | ||
179 | void NPN_ReloadPlugins(NPBool reloadPages) | |
180 | { | |
181 | - CallNPN_ReloadPluginsProc(NPNFuncs.reloadplugins, reloadPages); | |
182 | + (*NPNFuncs.reloadplugins)(reloadPages); | |
183 | } | |
184 | ||
185 | #ifdef OJI | |
186 | JRIEnv* NPN_GetJavaEnv(void) | |
187 | { | |
188 | JRIEnv * rv = NULL; | |
189 | - rv = CallNPN_GetJavaEnvProc(NPNFuncs.getJavaEnv); | |
190 | + rv = (*NPNFuncs.getJavaEnv)(); | |
191 | return rv; | |
192 | } | |
193 | ||
194 | jref NPN_GetJavaPeer(NPP instance) | |
195 | { | |
196 | jref rv; | |
197 | - rv = CallNPN_GetJavaPeerProc(NPNFuncs.getJavaPeer, instance); | |
198 | + rv = (*NPNFuncs.getJavaPeer)(instance); | |
199 | return rv; | |
200 | } | |
201 | #endif | |
202 | ||
203 | NPError NPN_GetValue(NPP instance, NPNVariable variable, void *value) | |
204 | { | |
205 | - NPError rv = CallNPN_GetValueProc(NPNFuncs.getvalue, instance, variable, value); | |
206 | + NPError rv = (*NPNFuncs.getvalue)(instance, variable, value); | |
207 | return rv; | |
208 | } | |
209 | ||
210 | NPError NPN_SetValue(NPP instance, NPPVariable variable, void *value) | |
211 | { | |
212 | - NPError rv = CallNPN_SetValueProc(NPNFuncs.setvalue, instance, variable, value); | |
213 | + NPError rv = (*NPNFuncs.setvalue)(instance, variable, value); | |
214 | return rv; | |
215 | } | |
216 | ||
217 | void NPN_InvalidateRect(NPP instance, NPRect *invalidRect) | |
218 | { | |
219 | - CallNPN_InvalidateRectProc(NPNFuncs.invalidaterect, instance, invalidRect); | |
220 | + (*NPNFuncs.invalidaterect)(instance, invalidRect); | |
221 | } | |
222 | ||
223 | void NPN_InvalidateRegion(NPP instance, NPRegion invalidRegion) | |
224 | { | |
225 | - CallNPN_InvalidateRegionProc(NPNFuncs.invalidateregion, instance, invalidRegion); | |
226 | + (*NPNFuncs.invalidateregion)(instance, invalidRegion); | |
227 | } | |
228 | ||
229 | void NPN_ForceRedraw(NPP instance) | |
230 | { | |
231 | - CallNPN_ForceRedrawProc(NPNFuncs.forceredraw, instance); | |
232 | + (*NPNFuncs.forceredraw)(instance); | |
233 | } | |
a8c7bdfb JB |
234 | --- gpac/configure.orig 2011-05-29 21:09:10.138301981 +0200 |
235 | +++ gpac/configure 2011-05-29 21:27:39.248339117 +0200 | |
236 | @@ -1145,6 +1145,7 @@ | |
237 | ||
238 | #look for GECKO support | |
239 | cat > $TMPCPP << EOF | |
240 | +#include <mozilla-config.h> | |
241 | #include <nsIServiceManager.h> | |
242 | int main( void ) { return 0; } | |
243 | EOF | |
11d219a5 | 244 | --- gpac/applications/osmozilla/osmozilla.cpp~ 2012-01-22 17:15:26.902074831 +0100 |
245 | +++ gpac/applications/osmozilla/osmozilla.cpp 2012-01-22 17:17:43.514543060 +0100 | |
246 | @@ -91,7 +91,7 @@ | |
247 | "application/x-gpac::GPAC plugin;" \ | |
248 | ||
249 | ||
250 | -char* NPP_GetMIMEDescription(void) | |
ddb7e9b9 | 251 | +const char* NPP_GetMIMEDescription(void) |
11d219a5 | 252 | { |
253 | return GPAC_PLUGIN_MIMETYPES; | |
254 | } | |
2b512233 | 255 | --- gpac/applications/osmozilla/np_entry.cpp~ 2005-07-13 16:34:30.000000000 +0200 |
256 | +++ gpac/applications/osmozilla/np_entry.cpp 2012-01-22 17:43:44.464387379 +0100 | |
257 | @@ -172,7 +172,7 @@ | |
258 | return NS_PluginInitialize(); | |
259 | } | |
260 | ||
261 | -char * NP_GetMIMEDescription(void) | |
262 | +const char * NP_GetMIMEDescription(void) | |
263 | { | |
264 | return NPP_GetMIMEDescription(); | |
265 | } |