npruntime sample plugin build fix.

This commit is contained in:
Josh Aas 2008-12-16 23:01:47 -08:00
parent 04359072f7
commit 2ca0b53851
2 changed files with 10 additions and 10 deletions

View File

@ -58,8 +58,8 @@ typedef void (*NPP_StreamAsFileProcPtr)(NPP instance, NPStream* stream,
typedef void (*NPP_PrintProcPtr)(NPP instance, NPPrint* platformPrint);
typedef int16_t (*NPP_HandleEventProcPtr)(NPP instance, void* event);
typedef void (*NPP_URLNotifyProcPtr)(NPP instance, const char* url, NPReason reason, void* notifyData);
// Any NPObjects returned to the browser via NPP_GetValue should be retained
// by the plugin on the way out. The browser is responsible for releasing.
/* Any NPObjects returned to the browser via NPP_GetValue should be retained
by the plugin on the way out. The browser is responsible for releasing. */
typedef NPError (*NPP_GetValueProcPtr)(NPP instance, NPPVariable variable, void *ret_value);
typedef NPError (*NPP_SetValueProcPtr)(NPP instance, NPNVariable variable, void *ret_value);
@ -74,8 +74,8 @@ typedef NPError (*NPN_NewStreamProcPtr)(NPP instance, NPMIMEType type, cons
typedef int32_t (*NPN_WriteProcPtr)(NPP instance, NPStream* stream, int32_t len, void* buffer);
typedef NPError (*NPN_DestroyStreamProcPtr)(NPP instance, NPStream* stream, NPReason reason);
typedef void (*NPN_StatusProcPtr)(NPP instance, const char* message);
// Browser manages the lifetime of the buffer returned by NPN_UserAgent, don't
// depend on it sticking around and don't free it.
/* Browser manages the lifetime of the buffer returned by NPN_UserAgent, don't
depend on it sticking around and don't free it. */
typedef const char* (*NPN_UserAgentProcPtr)(NPP instance);
typedef void* (*NPN_MemAllocProcPtr)(uint32_t size);
typedef void (*NPN_MemFreeProcPtr)(void* ptr);

View File

@ -507,8 +507,8 @@ CPlugin::CPlugin(NPP pNPInstance) :
if (!NPN_IdentifierIsString(n)) {
NPString str;
str.utf8characters = "alert('NPN_IdentifierIsString() test failed!');";
str.utf8length = strlen(str.utf8characters);
str.UTF8Characters = "alert('NPN_IdentifierIsString() test failed!');";
str.UTF8Length = strlen(str.UTF8Characters);
NPN_Evaluate(m_pNPInstance, sWindowObj, &str, NULL);
}
@ -523,7 +523,7 @@ CPlugin::CPlugin(NPP pNPInstance) :
NPN_GetProperty(m_pNPInstance, doc, n, &rval);
if (NPVARIANT_IS_STRING(rval)) {
printf ("title = %s\n", NPVARIANT_TO_STRING(rval).utf8characters);
printf ("title = %s\n", NPVARIANT_TO_STRING(rval).UTF8Characters);
NPN_ReleaseVariantValue(&rval);
}
@ -534,8 +534,8 @@ CPlugin::CPlugin(NPP pNPInstance) :
NPN_SetProperty(m_pNPInstance, sWindowObj, n, &v);
NPString str;
str.utf8characters = "document.getElementById('result').innerHTML += '<p>' + 'NPN_Evaluate() test, document = ' + this + '</p>';";
str.utf8length = strlen(str.utf8characters);
str.UTF8Characters = "document.getElementById('result').innerHTML += '<p>' + 'NPN_Evaluate() test, document = ' + this + '</p>';";
str.UTF8Length = strlen(str.UTF8Characters);
NPN_Evaluate(m_pNPInstance, doc, &str, NULL);
@ -572,7 +572,7 @@ CPlugin::CPlugin(NPP pNPInstance) :
NPN_Invoke(sWindowObj, n, vars, 3, &rval);
if (NPVARIANT_IS_STRING(rval)) {
printf ("prompt returned '%s'\n", NPVARIANT_TO_STRING(rval).utf8characters);
printf ("prompt returned '%s'\n", NPVARIANT_TO_STRING(rval).UTF8Characters);
}
NPN_ReleaseVariantValue(&rval);