Commit 9a31042d authored by Damien Fouilleul's avatar Damien Fouilleul

- mozilla: formatting, cleanup, and NPN_SetValue/NPP_SetValue support

parent b77f2f8b
......@@ -667,7 +667,7 @@ NPError Private_GetValue( NPP instance, NPPVariable variable, void *value )
NPError err;
EnterCodeResource();
PLUGINDEBUGSTR("\pGetValue;g;");
err = NPP_GetValue( instance, variable, value);
err = NPP_GetValue(instance, variable, value);
ExitCodeResource();
return err;
}
......@@ -677,7 +677,7 @@ NPError Private_SetValue( NPP instance, NPNVariable variable, void *value )
NPError err;
EnterCodeResource();
PLUGINDEBUGSTR("\pSetValue;g;");
err = NPERR_NO_ERROR; //NPP_SetValue( instance, variable, value);
err = NPP_SetValue(instance, variable, value);
ExitCodeResource();
return err;
}
......
......@@ -517,14 +517,14 @@ NPError
Private_GetValue(NPP instance, NPPVariable variable, void *r_value)
{
PLUGINDEBUGSTR("GetValue");
return NPP_GetValue(instance, variable, r_value);
return NPP_GetValue(instance, variable, r_value);
}
NPError
Private_SetValue(NPP instance, NPPVariable variable, void *r_value)
{
PLUGINDEBUGSTR("SetValue");
return NPERR_NO_ERROR; //NPP_SetValue(instance, variable, r_value);
return NPP_SetValue(instance, variable, r_value);
}
JRIGlobalRef
......@@ -697,6 +697,7 @@ NP_Initialize(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs)
pluginFuncs->print = NewNPP_PrintProc(Private_Print);
pluginFuncs->event = NULL;
pluginFuncs->getvalue = NewNPP_GetValueProc(Private_GetValue);
pluginFuncs->setvalue = NewNPP_SetValueProc(Private_SetValue);
if( navMinorVers >= NPVERS_HAS_NOTIFICATION )
{
pluginFuncs->urlnotify = NewNPP_URLNotifyProc(Private_URLNotify);
......
......@@ -117,7 +117,7 @@ NP_GetEntryPoints(NPPluginFuncs* pFuncs)
pFuncs->print = NPP_Print;
pFuncs->event = 0; /// reserved
pFuncs->getvalue = NPP_GetValue;
//pFuncs->setvalue = NPP_SetValue;
pFuncs->setvalue = NPP_SetValue;
g_pluginFuncs = pFuncs;
......
......@@ -133,6 +133,16 @@ NPError NPP_GetValue( NPP instance, NPPVariable variable, void *value )
return NPERR_NO_ERROR;
}
/*
* there is some confusion in gecko headers regarding definition of this API
* NPPVariable is wrongly defined as NPNVariable, which sounds incorrect.
*/
NPError NPP_SetValue( NPP instance, NPNVariable variable, void *value )
{
return NPERR_GENERIC_ERROR;
}
/******************************************************************************
* Mac-only API calls
*****************************************************************************/
......@@ -287,10 +297,14 @@ NPError NPP_New( NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc,
}
status = p_plugin->init(argc, argn, argv);
if( NPERR_NO_ERROR == status ) {
if( NPERR_NO_ERROR == status )
{
instance->pdata = reinterpret_cast<void*>(p_plugin);
//NPN_SetValue(instance, NPPVpluginWindowBool, (void *)false);
NPN_SetValue(instance, NPPVpluginTransparentBool, (void *)false);
}
else {
else
{
delete p_plugin;
}
return status;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment