Commit 2a5c6203 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

More similarities between npmac and npunix

parent 1d4ab44a
......@@ -523,53 +523,49 @@ NPError
NPError
Private_Destroy(NPP instance, NPSavedData** save)
{
NPError err;
err = NPP_Destroy(instance, save);
return err;
PLUGINDEBUGSTR("Destroy");
return NPP_Destroy(instance, save);
}
NPError
Private_SetWindow(NPP instance, NPWindow* window)
{
NPError err;
PLUGINDEBUGSTR("SetWindow");
err = NPP_SetWindow(instance, window);
return err;
}
NPError
Private_GetValue( NPP instance, NPPVariable variable, void *value)
Private_GetValue(NPP instance, NPPVariable variable, void *r_value)
{
NPError err;
err = NPP_GetValue(instance, variable, value);
return err;
PLUGINDEBUGSTR("GetValue");
return NPP_GetValue(instance, variable, r_value);
}
NPError
Private_SetValue( NPP instance, NPNVariable variable, void *value)
Private_SetValue(NPP instance, NPNVariable variable, void *r_value)
{
NPError err;
err = NPP_SetValue(instance, variable, value);
return err;
PLUGINDEBUGSTR("SetValue");
return NPP_SetValue(instance, variable, r_value);
}
NPError
Private_NewStream(NPP instance, NPMIMEType type, NPStream* stream, NPBool seekable, uint16_t* stype)
Private_NewStream(NPP instance, NPMIMEType type, NPStream* stream,
NPBool seekable, uint16_t* stype)
{
NPError err;
PLUGINDEBUGSTR("NewStream");
err = NPP_NewStream(instance, type, stream, seekable, stype);
return err;
}
int32_t Private_WriteReady(NPP instance, NPStream* stream)
int32_t
Private_WriteReady(NPP instance, NPStream* stream)
{
int32_t result;
PLUGINDEBUGSTR("WriteReady");
result = NPP_WriteReady(instance, stream);
return result;
}
......@@ -601,19 +597,29 @@ Private_DestroyStream(NPP instance, NPStream* stream, NPError reason)
return err;
}
int16_t Private_HandleEvent(NPP instance, void* event)
void
Private_URLNotify(NPP instance, const char* url, NPReason reason, void* notifyData)
{
int16_t result;
result = NPP_HandleEvent(instance, event);
return result;
PLUGINDEBUGSTR("URLNotify");
NPP_URLNotify(instance, url, reason, notifyData);
}
void Private_Print(NPP instance, NPPrint* platformPrint)
void
Private_Print(NPP instance, NPPrint* platformPrint)
{
PLUGINDEBUGSTR("Print");
NPP_Print(instance, platformPrint);
}
int16_t
Private_HandleEvent(NPP instance, void* event)
{
int16_t result;
PLUGINDEBUGSTR("HandleEvent");
result = NPP_HandleEvent(instance, event);
return result;
}
void Private_URLNotify(NPP instance, const char* url, NPReason reason, void* notifyData)
{
NPP_URLNotify(instance, url, reason, notifyData);
......
......@@ -522,7 +522,7 @@ Private_New(NPMIMEType pluginType, NPP instance, uint16_t mode,
PLUGINDEBUGSTR("New");
gUserAgent = NPN_UserAgent(instance);
ret = NPP_New(pluginType, instance, mode, argc, argn, argv, saved);
return ret;
return ret;
}
NPError
......@@ -541,6 +541,20 @@ Private_SetWindow(NPP instance, NPWindow* window)
return err;
}
NPError
Private_GetValue(NPP instance, NPPVariable variable, void *r_value)
{
PLUGINDEBUGSTR("GetValue");
return NPP_GetValue(instance, variable, r_value);
}
NPError
Private_SetValue(NPP instance, NPNVariable variable, void *r_value)
{
PLUGINDEBUGSTR("SetValue");
return NPP_SetValue(instance, variable, r_value);
}
NPError
Private_NewStream(NPP instance, NPMIMEType type, NPStream* stream,
NPBool seekable, uint16_t* stype)
......@@ -554,7 +568,7 @@ Private_NewStream(NPP instance, NPMIMEType type, NPStream* stream,
int32_t
Private_WriteReady(NPP instance, NPStream* stream)
{
unsigned int result;
int32_t result;
PLUGINDEBUGSTR("WriteReady");
result = NPP_WriteReady(instance, stream);
return result;
......@@ -589,8 +603,7 @@ Private_DestroyStream(NPP instance, NPStream* stream, NPError reason)
}
void
Private_URLNotify(NPP instance, const char* url,
NPReason reason, void* notifyData)
Private_URLNotify(NPP instance, const char* url, NPReason reason, void* notifyData)
{
PLUGINDEBUGSTR("URLNotify");
NPP_URLNotify(instance, url, reason, notifyData);
......@@ -606,22 +619,10 @@ Private_Print(NPP instance, NPPrint* platformPrint)
int16_t
Private_HandleEvent(NPP instance, NPEvent *event)
{
int16_t result;
PLUGINDEBUGSTR("HandleEvent");
NPP_HandleEvent(instance, event);
}
NPError
Private_GetValue(NPP instance, NPPVariable variable, void *r_value)
{
PLUGINDEBUGSTR("GetValue");
return NPP_GetValue(instance, variable, r_value);
}
NPError
Private_SetValue(NPP instance, NPNVariable variable, void *r_value)
{
PLUGINDEBUGSTR("SetValue");
return NPP_SetValue(instance, variable, r_value);
result = NPP_HandleEvent(instance, event);
return result;
}
/***********************************************************************
......
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