本文整理汇总了C++中NPNetscapeFuncs::setvalue方法的典型用法代码示例。如果您正苦于以下问题:C++ NPNetscapeFuncs::setvalue方法的具体用法?C++ NPNetscapeFuncs::setvalue怎么用?C++ NPNetscapeFuncs::setvalue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NPNetscapeFuncs
的用法示例。
在下文中一共展示了NPNetscapeFuncs::setvalue方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: NPP_New
NPError NP_LOADDS NPP_New(NPMIMEType pluginType, NPP instance, uint16_t mode, int16_t argc, char* argn[], char* argv[], NPSavedData* saved)
{
plogf("sp: NPP_New() mode=%d ", mode);
if (!instance)
{
plogf("sp: error: NPERR_INVALID_INSTANCE_ERROR");
return NPERR_INVALID_INSTANCE_ERROR;
}
if (pluginType)
plogf("sp: pluginType: %s ", pluginType);
if (saved)
plogf("sp: SavedData: len=%d", saved->len);
instance->pdata = AllocStruct<InstanceData>();
if (!instance->pdata)
{
plogf("sp: error: NPERR_OUT_OF_MEMORY_ERROR");
return NPERR_OUT_OF_MEMORY_ERROR;
}
gNPNFuncs.setvalue(instance, NPPVpluginWindowBool, (void *)true);
InstanceData *data = (InstanceData *)instance->pdata;
bool ok = GetExePath(data->exepath, dimof(data->exepath));
SelectTranslation(ok ? data->exepath : NULL);
if (ok)
data->message = _TR("Opening document in SumatraPDF...");
else
data->message = _TR("Error: SumatraPDF hasn't been found!");
return NPERR_NO_ERROR;
}
示例2: NPP_New
NPError NP_LOADDS NPP_New(NPMIMEType pluginType, NPP instance, uint16_t mode, int16_t argc, char* argn[], char* argv[], NPSavedData* saved)
{
InstanceData *data;
plogf("sp: NPP_New() mode=%d ", mode);
if (!instance)
{
plogf("error: NPERR_INVALID_INSTANCE_ERROR");
return NPERR_INVALID_INSTANCE_ERROR;
}
if (pluginType)
plogf("sp: pluginType: %s ", ScopedMem<TCHAR>(str::conv::FromAnsi(pluginType)));
if (saved)
plogf("sp: SavedData: len=%d", saved->len);
instance->pdata = calloc(1, sizeof(InstanceData));
if (!instance->pdata)
{
plogf("error: NPERR_OUT_OF_MEMORY_ERROR");
return NPERR_OUT_OF_MEMORY_ERROR;
}
data = (InstanceData *)instance->pdata;
gNPNFuncs.setvalue(instance, NPPVpluginWindowBool, (void *)true);
if (GetExePath(data->exepath, dimof(data->exepath)))
data->message = _T("Opening document in SumatraPDF...");
else
data->message = _T("Error: SumatraPDF hasn't been found!");
return NPERR_NO_ERROR;
}
示例3:
NPError
NPN_SetValue(NPP instance, NPPVariable variable, void *value)
{
NPError rv = NPERR_GENERIC_ERROR;
if (NPNFuncs.setvalue) {
rv = NPNFuncs.setvalue(instance, variable, value);
}
return rv;
}
示例4: MyNPN_SetValue
static
NPError MyNPN_SetValue(NPP instance, NPPVariable variable,
void *value)
{
NPError ret;
DEB(ef, "-> NPN_SetValue( %x, %d, 0x%x)\n", instance, variable, value);
ret = gNetscapeFuncs.setvalue( instance, variable, value );
DEB(ef, "<- NPN_SetValue = %d\n", ret);
return ret;
}
示例5: NPN_SetValue
NPError NPN_SetValue(NPP instance, NPPVariable variable, void *value)
{
NPError rv = NPERR_NO_ERROR;
if(logger)
logger->logCall(action_npn_set_value, (DWORD)instance, (DWORD)variable, (DWORD)value);
rv = NPNFuncs.setvalue(instance, variable, value);
if(logger)
logger->logReturn();
return rv;
}
示例6: NPN_SetValue
NPError NPN_SetValue(NPP instance, NPPVariable variable, void *value)
{
return NPNFuncs.setvalue(instance, variable, value);
}