本文整理汇总了C++中NPNetscapeFuncs::evaluate方法的典型用法代码示例。如果您正苦于以下问题:C++ NPNetscapeFuncs::evaluate方法的具体用法?C++ NPNetscapeFuncs::evaluate怎么用?C++ NPNetscapeFuncs::evaluate使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NPNetscapeFuncs
的用法示例。
在下文中一共展示了NPNetscapeFuncs::evaluate方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: strlen
NPError
NPP_New(NPMIMEType pluginType, NPP npp, uint16_t mode, int16_t argc, char *argn[],
char *argv[], NPSavedData *saved)
{
trace_info_f("%s\n", __func__);
NPObject *np_plugin_element_obj;
int err = npn.getvalue(npp, NPNVPluginElementNPObject, &np_plugin_element_obj);
if (err != NPERR_NO_ERROR) {
trace_warning("%s, NPN_GetValue returned %d\n", __func__, err);
goto done;
}
NPVariant result;
NPString script = {
.UTF8Characters = resource_text_libpdf_frontend_js,
.UTF8Length = strlen(resource_text_libpdf_frontend_js),
};
if (!npn.evaluate(npp, np_plugin_element_obj, &script, &result)) {
trace_warning("%s, NPN_Evaluate failed\n", __func__);
}
done:
return NPERR_NO_ERROR;
}
示例2: NPN_Evaluate
bool NPN_Evaluate(NPP id, NPObject* obj, NPString* str, NPVariant* variant)
{
char msg[1024];
sprintf(msg, "NPN_Evaluate");
logger->logMessage(msg);
bool rv = NPNFuncs.evaluate(id, obj, str, variant);
sprintf(msg, "--Return: %x", rv);
logger->logMessage(msg);
return rv;
}
示例3: NPN_Evaluate
bool NPN_Evaluate(NPP npp, NPObject* obj, NPString *script,
NPVariant *result)
{
return NPNFuncs.evaluate(npp, obj, script, result);
}