You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
495 lines
20 KiB
495 lines
20 KiB
From: Pavlov Konstantin <thresh@altlinux.ru>
|
|
Date: Wed, 25 Mar 2009 14:28:20 +0000 (+0000)
|
|
Subject: Fix mozilla plugin with xulrunner-1.9.1. Patch from Alexey Gladkov
|
|
X-Git-Tag: 1.0.0-alt0.pre1^0
|
|
X-Git-Url: http://git.altlinux.org/people/thresh/packages/vlc.git?p=vlc.git;a=commitdiff_plain;h=1e8df789f39d5d4c09bf48935ace087e5e5867bd;hp=94de3abc393d1c684fb9129210ecfbc5462b293e
|
|
|
|
Fix mozilla plugin with xulrunner-1.9.1. Patch from Alexey Gladkov
|
|
(legion at altlinux ru)
|
|
---
|
|
|
|
diff --git a/projects/mozilla/support/npmac.cpp b/projects/mozilla/support/npmac.cpp
|
|
index e9ffdc5..a6ca2e4 100644
|
|
--- a/projects/mozilla/support/npmac.cpp
|
|
+++ b/projects/mozilla/support/npmac.cpp
|
|
@@ -1017,20 +1017,20 @@ DEFINE_API_C(NPError) main(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs,
|
|
//
|
|
pluginFuncs->version = (NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR;
|
|
pluginFuncs->size = sizeof(NPPluginFuncs);
|
|
- pluginFuncs->newp = NewNPP_NewProc(PLUGIN_TO_HOST_GLUE(newp, Private_New));
|
|
- pluginFuncs->destroy = NewNPP_DestroyProc(PLUGIN_TO_HOST_GLUE(destroy, Private_Destroy));
|
|
- pluginFuncs->setwindow = NewNPP_SetWindowProc(PLUGIN_TO_HOST_GLUE(setwindow, Private_SetWindow));
|
|
- pluginFuncs->newstream = NewNPP_NewStreamProc(PLUGIN_TO_HOST_GLUE(newstream, Private_NewStream));
|
|
- pluginFuncs->destroystream = NewNPP_DestroyStreamProc(PLUGIN_TO_HOST_GLUE(destroystream, Private_DestroyStream));
|
|
- pluginFuncs->asfile = NewNPP_StreamAsFileProc(PLUGIN_TO_HOST_GLUE(asfile, Private_StreamAsFile));
|
|
- pluginFuncs->writeready = NewNPP_WriteReadyProc(PLUGIN_TO_HOST_GLUE(writeready, Private_WriteReady));
|
|
- pluginFuncs->write = NewNPP_WriteProc(PLUGIN_TO_HOST_GLUE(write, Private_Write));
|
|
- pluginFuncs->print = NewNPP_PrintProc(PLUGIN_TO_HOST_GLUE(print, Private_Print));
|
|
- pluginFuncs->event = NewNPP_HandleEventProc(PLUGIN_TO_HOST_GLUE(event, Private_HandleEvent));
|
|
- pluginFuncs->getvalue = NewNPP_GetValueProc(PLUGIN_TO_HOST_GLUE(getvalue, Private_GetValue));
|
|
+ pluginFuncs->newp = (NPP_NewProcPtr)(PLUGIN_TO_HOST_GLUE(newp, Private_New));
|
|
+ pluginFuncs->destroy = (NPP_DestroyProcPtr)(PLUGIN_TO_HOST_GLUE(destroy, Private_Destroy));
|
|
+ pluginFuncs->setwindow = (NPP_SetWindowProcPtr)(PLUGIN_TO_HOST_GLUE(setwindow, Private_SetWindow));
|
|
+ pluginFuncs->newstream = (NPP_NewStreamProcPtr)(PLUGIN_TO_HOST_GLUE(newstream, Private_NewStream));
|
|
+ pluginFuncs->destroystream = (NPP_DestroyStreamProcPtr)(PLUGIN_TO_HOST_GLUE(destroystream, Private_DestroyStream));
|
|
+ pluginFuncs->asfile = (NPP_StreamAsFileProcPtr)(PLUGIN_TO_HOST_GLUE(asfile, Private_StreamAsFile));
|
|
+ pluginFuncs->writeready = (NPP_WriteReadyProcPtr)(PLUGIN_TO_HOST_GLUE(writeready, Private_WriteReady));
|
|
+ pluginFuncs->write = (NPP_WriteProcPtr)(PLUGIN_TO_HOST_GLUE(write, Private_Write));
|
|
+ pluginFuncs->print = (NPP_PrintProcPtr)(PLUGIN_TO_HOST_GLUE(print, Private_Print));
|
|
+ pluginFuncs->event = (NPP_HandleEventProcPtr)(PLUGIN_TO_HOST_GLUE(event, Private_HandleEvent));
|
|
+ pluginFuncs->getvalue = (NPP_GetValueProcPtr)(PLUGIN_TO_HOST_GLUE(getvalue, Private_GetValue));
|
|
if( navMinorVers >= NPVERS_HAS_NOTIFICATION )
|
|
{
|
|
- pluginFuncs->urlnotify = NewNPP_URLNotifyProc(PLUGIN_TO_HOST_GLUE(urlnotify, Private_URLNotify));
|
|
+ pluginFuncs->urlnotify = (NPP_URLNotifyProcPtr)(PLUGIN_TO_HOST_GLUE(urlnotify, Private_URLNotify));
|
|
}
|
|
#ifdef OJI
|
|
if( navMinorVers >= NPVERS_HAS_LIVECONNECT )
|
|
@@ -1040,7 +1040,7 @@ DEFINE_API_C(NPError) main(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs,
|
|
#else
|
|
pluginFuncs->javaClass = NULL;
|
|
#endif
|
|
- *unloadUpp = NewNPP_ShutdownProc(PLUGIN_TO_HOST_GLUE(shutdown, Private_Shutdown));
|
|
+ *unloadUpp = (NPP_ShutdownProcPtr)(PLUGIN_TO_HOST_GLUE(shutdown, Private_Shutdown));
|
|
|
|
SetUpQD();
|
|
err = Private_Initialize();
|
|
@@ -1176,18 +1176,18 @@ NPError NP_GetEntryPoints(NPPluginFuncs* pluginFuncs)
|
|
|
|
pluginFuncs->version = (NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR;
|
|
pluginFuncs->size = sizeof(NPPluginFuncs);
|
|
- pluginFuncs->newp = NewNPP_NewProc(Private_New);
|
|
- pluginFuncs->destroy = NewNPP_DestroyProc(Private_Destroy);
|
|
- pluginFuncs->setwindow = NewNPP_SetWindowProc(Private_SetWindow);
|
|
- pluginFuncs->newstream = NewNPP_NewStreamProc(Private_NewStream);
|
|
- pluginFuncs->destroystream = NewNPP_DestroyStreamProc(Private_DestroyStream);
|
|
- pluginFuncs->asfile = NewNPP_StreamAsFileProc(Private_StreamAsFile);
|
|
- pluginFuncs->writeready = NewNPP_WriteReadyProc(Private_WriteReady);
|
|
- pluginFuncs->write = NewNPP_WriteProc(Private_Write);
|
|
- pluginFuncs->print = NewNPP_PrintProc(Private_Print);
|
|
- pluginFuncs->event = NewNPP_HandleEventProc(Private_HandleEvent);
|
|
- pluginFuncs->getvalue = NewNPP_GetValueProc(Private_GetValue);
|
|
- pluginFuncs->setvalue = NewNPP_SetValueProc(Private_SetValue);
|
|
+ pluginFuncs->newp = (NPP_NewProcPtr)(Private_New);
|
|
+ pluginFuncs->destroy = (NPP_DestroyProcPtr)(Private_Destroy);
|
|
+ pluginFuncs->setwindow = (NPP_SetWindowProcPtr)(Private_SetWindow);
|
|
+ pluginFuncs->newstream = (NPP_NewStreamProcPtr)(Private_NewStream);
|
|
+ pluginFuncs->destroystream = (NPP_DestroyStreamProcPtr)(Private_DestroyStream);
|
|
+ pluginFuncs->asfile = (NPP_StreamAsFileProcPtr)(Private_StreamAsFile);
|
|
+ pluginFuncs->writeready = (NPP_WriteReadyProcPtr)(Private_WriteReady);
|
|
+ pluginFuncs->write = (NPP_WriteProcPtr)(Private_Write);
|
|
+ pluginFuncs->print = (NPP_PrintProcPtr)(Private_Print);
|
|
+ pluginFuncs->event = (NPP_HandleEventProcPtr)(Private_HandleEvent);
|
|
+ pluginFuncs->getvalue = (NPP_GetValueProcPtr)(Private_GetValue);
|
|
+ pluginFuncs->setvalue = (NPP_SetValueProcPtr)(Private_SetValue);
|
|
if( navMinorVers >= NPVERS_HAS_NOTIFICATION )
|
|
{
|
|
pluginFuncs->urlnotify = Private_URLNotify;
|
|
diff --git a/projects/mozilla/support/npunix.c b/projects/mozilla/support/npunix.c
|
|
index 0f6efc0..9ad454c 100644
|
|
--- a/projects/mozilla/support/npunix.c
|
|
+++ b/projects/mozilla/support/npunix.c
|
|
@@ -103,149 +103,136 @@ NPN_Version(int* plugin_major, int* plugin_minor,
|
|
NPError
|
|
NPN_GetValue(NPP instance, NPNVariable variable, void *r_value)
|
|
{
|
|
- return CallNPN_GetValueProc(gNetscapeFuncs.getvalue,
|
|
- instance, variable, r_value);
|
|
+ return (*gNetscapeFuncs.getvalue)(instance, variable, r_value);
|
|
}
|
|
|
|
NPError
|
|
NPN_SetValue(NPP instance, NPPVariable variable, void *value)
|
|
{
|
|
- return CallNPN_SetValueProc(gNetscapeFuncs.setvalue,
|
|
- instance, variable, value);
|
|
+ return (*gNetscapeFuncs.setvalue)(instance, variable, value);
|
|
}
|
|
|
|
NPError
|
|
NPN_GetURL(NPP instance, const char* url, const char* window)
|
|
{
|
|
- return CallNPN_GetURLProc(gNetscapeFuncs.geturl, instance, url, window);
|
|
+ return (*gNetscapeFuncs.geturl)(instance, url, window);
|
|
}
|
|
|
|
NPError
|
|
NPN_GetURLNotify(NPP instance, const char* url, const char* window, void* notifyData)
|
|
{
|
|
- return CallNPN_GetURLNotifyProc(gNetscapeFuncs.geturlnotify, instance, url, window, notifyData);
|
|
+ return (*gNetscapeFuncs.geturlnotify)(instance, url, window, notifyData);
|
|
}
|
|
|
|
NPError
|
|
NPN_PostURL(NPP instance, const char* url, const char* window,
|
|
uint32_t len, const char* buf, NPBool file)
|
|
{
|
|
- return CallNPN_PostURLProc(gNetscapeFuncs.posturl, instance,
|
|
- url, window, len, buf, file);
|
|
+ return (*gNetscapeFuncs.posturl)(instance, url, window, len, buf, file);
|
|
}
|
|
|
|
NPError
|
|
NPN_PostURLNotify(NPP instance, const char* url, const char* window, uint32_t len,
|
|
const char* buf, NPBool file, void* notifyData)
|
|
{
|
|
- return CallNPN_PostURLNotifyProc(gNetscapeFuncs.posturlnotify,
|
|
- instance, url, window, len, buf, file, notifyData);
|
|
+ return (*gNetscapeFuncs.posturlnotify)(instance, url, window, len, buf, file, notifyData);
|
|
}
|
|
|
|
NPError
|
|
NPN_RequestRead(NPStream* stream, NPByteRange* rangeList)
|
|
{
|
|
- return CallNPN_RequestReadProc(gNetscapeFuncs.requestread,
|
|
- stream, rangeList);
|
|
+ return (*gNetscapeFuncs.requestread)(stream, rangeList);
|
|
}
|
|
|
|
NPError
|
|
NPN_NewStream(NPP instance, NPMIMEType type, const char *window,
|
|
NPStream** stream_ptr)
|
|
{
|
|
- return CallNPN_NewStreamProc(gNetscapeFuncs.newstream, instance,
|
|
- type, window, stream_ptr);
|
|
+ return (*gNetscapeFuncs.newstream)(instance, type, window, stream_ptr);
|
|
}
|
|
|
|
int32_t
|
|
NPN_Write(NPP instance, NPStream* stream, int32_t len, void* buffer)
|
|
{
|
|
- return CallNPN_WriteProc(gNetscapeFuncs.write, instance,
|
|
- stream, len, buffer);
|
|
+ return (*gNetscapeFuncs.write)(instance, stream, len, buffer);
|
|
}
|
|
|
|
NPError
|
|
NPN_DestroyStream(NPP instance, NPStream* stream, NPError reason)
|
|
{
|
|
- return CallNPN_DestroyStreamProc(gNetscapeFuncs.destroystream,
|
|
- instance, stream, reason);
|
|
+ return (*gNetscapeFuncs.destroystream)(instance, stream, reason);
|
|
}
|
|
|
|
void
|
|
NPN_Status(NPP instance, const char* message)
|
|
{
|
|
- CallNPN_StatusProc(gNetscapeFuncs.status, instance, message);
|
|
+ (*gNetscapeFuncs.status)(instance, message);
|
|
}
|
|
|
|
const char*
|
|
NPN_UserAgent(NPP instance)
|
|
{
|
|
- return CallNPN_UserAgentProc(gNetscapeFuncs.uagent, instance);
|
|
+ return (*gNetscapeFuncs.uagent)(instance);
|
|
}
|
|
|
|
void *NPN_MemAlloc(uint32_t size)
|
|
{
|
|
- return CallNPN_MemAllocProc(gNetscapeFuncs.memalloc, size);
|
|
+ return (*gNetscapeFuncs.memalloc)(size);
|
|
}
|
|
|
|
void NPN_MemFree(void* ptr)
|
|
{
|
|
- CallNPN_MemFreeProc(gNetscapeFuncs.memfree, ptr);
|
|
+ (*gNetscapeFuncs.memfree)(ptr);
|
|
}
|
|
|
|
uint32_t NPN_MemFlush(uint32_t size)
|
|
{
|
|
- return CallNPN_MemFlushProc(gNetscapeFuncs.memflush, size);
|
|
+ return (*gNetscapeFuncs.memflush)(size);
|
|
}
|
|
|
|
void NPN_ReloadPlugins(NPBool reloadPages)
|
|
{
|
|
- CallNPN_ReloadPluginsProc(gNetscapeFuncs.reloadplugins, reloadPages);
|
|
+ (*gNetscapeFuncs.reloadplugins)(reloadPages);
|
|
}
|
|
|
|
#ifdef OJI
|
|
JRIEnv* NPN_GetJavaEnv()
|
|
{
|
|
- return CallNPN_GetJavaEnvProc(gNetscapeFuncs.getJavaEnv);
|
|
+ return (*gNetscapeFuncs.getJavaEnv);
|
|
}
|
|
|
|
jref NPN_GetJavaPeer(NPP instance)
|
|
{
|
|
- return CallNPN_GetJavaPeerProc(gNetscapeFuncs.getJavaPeer,
|
|
- instance);
|
|
+ return (*gNetscapeFuncs.getJavaPeer)(instance);
|
|
}
|
|
#endif
|
|
|
|
void
|
|
NPN_InvalidateRect(NPP instance, NPRect *invalidRect)
|
|
{
|
|
- CallNPN_InvalidateRectProc(gNetscapeFuncs.invalidaterect, instance,
|
|
- invalidRect);
|
|
+ (*gNetscapeFuncs.invalidaterect)(instance, invalidRect);
|
|
}
|
|
|
|
void
|
|
NPN_InvalidateRegion(NPP instance, NPRegion invalidRegion)
|
|
{
|
|
- CallNPN_InvalidateRegionProc(gNetscapeFuncs.invalidateregion, instance,
|
|
- invalidRegion);
|
|
+ (*gNetscapeFuncs.invalidateregion)(instance, invalidRegion);
|
|
}
|
|
|
|
void
|
|
NPN_ForceRedraw(NPP instance)
|
|
{
|
|
- CallNPN_ForceRedrawProc(gNetscapeFuncs.forceredraw, instance);
|
|
+ (*gNetscapeFuncs.forceredraw)(instance);
|
|
}
|
|
|
|
void NPN_PushPopupsEnabledState(NPP instance, NPBool enabled)
|
|
{
|
|
- CallNPN_PushPopupsEnabledStateProc(gNetscapeFuncs.pushpopupsenabledstate,
|
|
- instance, enabled);
|
|
+ (*gNetscapeFuncs.pushpopupsenabledstate)(instance, enabled);
|
|
}
|
|
|
|
void NPN_PopPopupsEnabledState(NPP instance)
|
|
{
|
|
- CallNPN_PopPopupsEnabledStateProc(gNetscapeFuncs.poppopupsenabledstate,
|
|
- instance);
|
|
+ (*gNetscapeFuncs.poppopupsenabledstate)(instance);
|
|
}
|
|
|
|
NPIdentifier NPN_GetStringIdentifier(const NPUTF8 *name)
|
|
@@ -253,8 +240,7 @@ NPIdentifier NPN_GetStringIdentifier(const NPUTF8 *name)
|
|
int minor = gNetscapeFuncs.version & 0xFF;
|
|
if( minor >= 14 )
|
|
{
|
|
- return CallNPN_GetStringIdentifierProc(
|
|
- gNetscapeFuncs.getstringidentifier, name);
|
|
+ return (*gNetscapeFuncs.getstringidentifier)(name);
|
|
}
|
|
return NULL;
|
|
}
|
|
@@ -264,19 +250,14 @@ void NPN_GetStringIdentifiers(const NPUTF8 **names, int32_t nameCount,
|
|
{
|
|
int minor = gNetscapeFuncs.version & 0xFF;
|
|
if( minor >= 14 )
|
|
- {
|
|
- CallNPN_GetStringIdentifiersProc(gNetscapeFuncs.getstringidentifiers,
|
|
- names, nameCount, identifiers);
|
|
- }
|
|
+ (*gNetscapeFuncs.getstringidentifiers)(names, nameCount, identifiers);
|
|
}
|
|
|
|
NPIdentifier NPN_GetIntIdentifier(int32_t intid)
|
|
{
|
|
int minor = gNetscapeFuncs.version & 0xFF;
|
|
if( minor >= 14 )
|
|
- {
|
|
- return CallNPN_GetIntIdentifierProc(gNetscapeFuncs.getintidentifier, intid);
|
|
- }
|
|
+ return (*gNetscapeFuncs.getintidentifier)(intid);
|
|
return NULL;
|
|
}
|
|
|
|
@@ -284,11 +265,7 @@ bool NPN_IdentifierIsString(NPIdentifier identifier)
|
|
{
|
|
int minor = gNetscapeFuncs.version & 0xFF;
|
|
if( minor >= 14 )
|
|
- {
|
|
- return CallNPN_IdentifierIsStringProc(
|
|
- gNetscapeFuncs.identifierisstring,
|
|
- identifier);
|
|
- }
|
|
+ return (*gNetscapeFuncs.identifierisstring)(identifier);
|
|
return false;
|
|
}
|
|
|
|
@@ -296,11 +273,7 @@ NPUTF8 *NPN_UTF8FromIdentifier(NPIdentifier identifier)
|
|
{
|
|
int minor = gNetscapeFuncs.version & 0xFF;
|
|
if( minor >= 14 )
|
|
- {
|
|
- return CallNPN_UTF8FromIdentifierProc(
|
|
- gNetscapeFuncs.utf8fromidentifier,
|
|
- identifier);
|
|
- }
|
|
+ return (*gNetscapeFuncs.utf8fromidentifier)(identifier);
|
|
return NULL;
|
|
}
|
|
|
|
@@ -308,11 +281,7 @@ int32_t NPN_IntFromIdentifier(NPIdentifier identifier)
|
|
{
|
|
int minor = gNetscapeFuncs.version & 0xFF;
|
|
if( minor >= 14 )
|
|
- {
|
|
- return CallNPN_IntFromIdentifierProc(
|
|
- gNetscapeFuncs.intfromidentifier,
|
|
- identifier);
|
|
- }
|
|
+ return (*gNetscapeFuncs.intfromidentifier)(identifier);
|
|
return 0;
|
|
}
|
|
|
|
@@ -320,7 +289,7 @@ NPObject *NPN_CreateObject(NPP npp, NPClass *aClass)
|
|
{
|
|
int minor = gNetscapeFuncs.version & 0xFF;
|
|
if( minor >= 14 )
|
|
- return CallNPN_CreateObjectProc(gNetscapeFuncs.createobject, npp, aClass);
|
|
+ return (*gNetscapeFuncs.createobject)(npp, aClass);
|
|
return NULL;
|
|
}
|
|
|
|
@@ -328,7 +297,7 @@ NPObject *NPN_RetainObject(NPObject *obj)
|
|
{
|
|
int minor = gNetscapeFuncs.version & 0xFF;
|
|
if( minor >= 14 )
|
|
- return CallNPN_RetainObjectProc(gNetscapeFuncs.retainobject, obj);
|
|
+ return (*gNetscapeFuncs.retainobject)(obj);
|
|
return NULL;
|
|
}
|
|
|
|
@@ -336,7 +305,7 @@ void NPN_ReleaseObject(NPObject *obj)
|
|
{
|
|
int minor = gNetscapeFuncs.version & 0xFF;
|
|
if( minor >= 14 )
|
|
- CallNPN_ReleaseObjectProc(gNetscapeFuncs.releaseobject, obj);
|
|
+ (*gNetscapeFuncs.releaseobject)(obj);
|
|
}
|
|
|
|
bool NPN_Invoke(NPP npp, NPObject* obj, NPIdentifier methodName,
|
|
@@ -344,8 +313,7 @@ bool NPN_Invoke(NPP npp, NPObject* obj, NPIdentifier methodName,
|
|
{
|
|
int minor = gNetscapeFuncs.version & 0xFF;
|
|
if( minor >= 14 )
|
|
- return CallNPN_InvokeProc(gNetscapeFuncs.invoke, npp, obj, methodName,
|
|
- args, argCount, result);
|
|
+ return (*gNetscapeFuncs.invoke)(npp, obj, methodName, args, argCount, result);
|
|
return false;
|
|
}
|
|
|
|
@@ -354,8 +322,7 @@ bool NPN_InvokeDefault(NPP npp, NPObject* obj, const NPVariant *args,
|
|
{
|
|
int minor = gNetscapeFuncs.version & 0xFF;
|
|
if( minor >= 14 )
|
|
- return CallNPN_InvokeDefaultProc(gNetscapeFuncs.invokeDefault, npp, obj,
|
|
- args, argCount, result);
|
|
+ return (*gNetscapeFuncs.invokeDefault)(npp, obj, args, argCount, result);
|
|
return false;
|
|
}
|
|
|
|
@@ -364,8 +331,7 @@ bool NPN_Evaluate(NPP npp, NPObject* obj, NPString *script,
|
|
{
|
|
int minor = gNetscapeFuncs.version & 0xFF;
|
|
if( minor >= 14 )
|
|
- return CallNPN_EvaluateProc(gNetscapeFuncs.evaluate, npp, obj,
|
|
- script, result);
|
|
+ return (*gNetscapeFuncs.evaluate)(npp, obj, script, result);
|
|
return false;
|
|
}
|
|
|
|
@@ -374,8 +340,7 @@ bool NPN_GetProperty(NPP npp, NPObject* obj, NPIdentifier propertyName,
|
|
{
|
|
int minor = gNetscapeFuncs.version & 0xFF;
|
|
if( minor >= 14 )
|
|
- return CallNPN_GetPropertyProc(gNetscapeFuncs.getproperty, npp, obj,
|
|
- propertyName, result);
|
|
+ return (*gNetscapeFuncs.getproperty)(npp, obj, propertyName, result);
|
|
return false;
|
|
}
|
|
|
|
@@ -384,8 +349,7 @@ bool NPN_SetProperty(NPP npp, NPObject* obj, NPIdentifier propertyName,
|
|
{
|
|
int minor = gNetscapeFuncs.version & 0xFF;
|
|
if( minor >= 14 )
|
|
- return CallNPN_SetPropertyProc(gNetscapeFuncs.setproperty, npp, obj,
|
|
- propertyName, value);
|
|
+ return (*gNetscapeFuncs.setproperty)(npp, obj, propertyName, value);
|
|
return false;
|
|
}
|
|
|
|
@@ -393,8 +357,7 @@ bool NPN_RemoveProperty(NPP npp, NPObject* obj, NPIdentifier propertyName)
|
|
{
|
|
int minor = gNetscapeFuncs.version & 0xFF;
|
|
if( minor >= 14 )
|
|
- return CallNPN_RemovePropertyProc(gNetscapeFuncs.removeproperty, npp, obj,
|
|
- propertyName);
|
|
+ return (*gNetscapeFuncs.removeproperty)(npp, obj, propertyName);
|
|
return false;
|
|
}
|
|
|
|
@@ -402,8 +365,7 @@ bool NPN_HasProperty(NPP npp, NPObject* obj, NPIdentifier propertyName)
|
|
{
|
|
int minor = gNetscapeFuncs.version & 0xFF;
|
|
if( minor >= 14 )
|
|
- return CallNPN_HasPropertyProc(gNetscapeFuncs.hasproperty, npp, obj,
|
|
- propertyName);
|
|
+ return (*gNetscapeFuncs.hasproperty)(npp, obj, propertyName);
|
|
return false;
|
|
}
|
|
|
|
@@ -411,8 +373,7 @@ bool NPN_HasMethod(NPP npp, NPObject* obj, NPIdentifier methodName)
|
|
{
|
|
int minor = gNetscapeFuncs.version & 0xFF;
|
|
if( minor >= 14 )
|
|
- return CallNPN_HasMethodProc(gNetscapeFuncs.hasmethod, npp,
|
|
- obj, methodName);
|
|
+ return (*gNetscapeFuncs.hasmethod)(npp, obj, methodName);
|
|
return false;
|
|
}
|
|
|
|
@@ -420,14 +381,14 @@ void NPN_ReleaseVariantValue(NPVariant *variant)
|
|
{
|
|
int minor = gNetscapeFuncs.version & 0xFF;
|
|
if( minor >= 14 )
|
|
- CallNPN_ReleaseVariantValueProc(gNetscapeFuncs.releasevariantvalue, variant);
|
|
+ (*gNetscapeFuncs.releasevariantvalue)(variant);
|
|
}
|
|
|
|
void NPN_SetException(NPObject* obj, const NPUTF8 *message)
|
|
{
|
|
int minor = gNetscapeFuncs.version & 0xFF;
|
|
if( minor >= 14 )
|
|
- CallNPN_SetExceptionProc(gNetscapeFuncs.setexception, obj, message);
|
|
+ (*gNetscapeFuncs.setexception)(obj, message);
|
|
}
|
|
|
|
/***********************************************************************
|
|
@@ -766,22 +727,22 @@ NP_Initialize(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs)
|
|
*/
|
|
pluginFuncs->version = (NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR;
|
|
pluginFuncs->size = sizeof(NPPluginFuncs);
|
|
- pluginFuncs->newp = NewNPP_NewProc(Private_New);
|
|
- pluginFuncs->destroy = NewNPP_DestroyProc(Private_Destroy);
|
|
- pluginFuncs->setwindow = NewNPP_SetWindowProc(Private_SetWindow);
|
|
- pluginFuncs->newstream = NewNPP_NewStreamProc(Private_NewStream);
|
|
- pluginFuncs->destroystream = NewNPP_DestroyStreamProc(Private_DestroyStream);
|
|
- pluginFuncs->asfile = NewNPP_StreamAsFileProc(Private_StreamAsFile);
|
|
- pluginFuncs->writeready = NewNPP_WriteReadyProc(Private_WriteReady);
|
|
- pluginFuncs->write = NewNPP_WriteProc(Private_Write);
|
|
- pluginFuncs->print = NewNPP_PrintProc(Private_Print);
|
|
- pluginFuncs->getvalue = NewNPP_GetValueProc(Private_GetValue);
|
|
- pluginFuncs->setvalue = NewNPP_SetValueProc(Private_SetValue);
|
|
+ pluginFuncs->newp = (NPP_NewProcPtr)(Private_New);
|
|
+ pluginFuncs->destroy = (NPP_DestroyProcPtr)(Private_Destroy);
|
|
+ pluginFuncs->setwindow = (NPP_SetWindowProcPtr)(Private_SetWindow);
|
|
+ pluginFuncs->newstream = (NPP_NewStreamProcPtr)(Private_NewStream);
|
|
+ pluginFuncs->destroystream = (NPP_DestroyStreamProcPtr)(Private_DestroyStream);
|
|
+ pluginFuncs->asfile = (NPP_StreamAsFileProcPtr)(Private_StreamAsFile);
|
|
+ pluginFuncs->writeready = (NPP_WriteReadyProcPtr)(Private_WriteReady);
|
|
+ pluginFuncs->write = (NPP_WriteProcPtr)(Private_Write);
|
|
+ pluginFuncs->print = (NPP_PrintProcPtr)(Private_Print);
|
|
+ pluginFuncs->getvalue = (NPP_GetValueProcPtr)(Private_GetValue);
|
|
+ pluginFuncs->setvalue = (NPP_SetValueProcPtr)(Private_SetValue);
|
|
|
|
pluginFuncs->event = NULL;
|
|
if( minor >= NPVERS_HAS_NOTIFICATION )
|
|
{
|
|
- pluginFuncs->urlnotify = NewNPP_URLNotifyProc(Private_URLNotify);
|
|
+ pluginFuncs->urlnotify = (NPP_URLNotifyProcPtr)(Private_URLNotify);
|
|
}
|
|
#ifdef OJI
|
|
if( minor >= NPVERS_HAS_LIVECONNECT )
|