当前位置: 首页>>代码示例>>C++>>正文


C++ NPNetscapeFuncs::setvalue方法代码示例

本文整理汇总了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;
}
开发者ID:DavidWiberg,项目名称:sumatrapdf,代码行数:34,代码来源:npPdfViewer.cpp

示例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;
}
开发者ID:monolithpl,项目名称:sumatrapdf,代码行数:34,代码来源:npPdfViewer.cpp

示例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;
}
开发者ID:ascendancy721,项目名称:gnash,代码行数:9,代码来源:npn_gate.cpp

示例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;
}
开发者ID:vishesh,项目名称:kde-baseapps,代码行数:11,代码来源:wrapper.c

示例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;
}
开发者ID:rhencke,项目名称:mozilla-cvs-history,代码行数:14,代码来源:npn_gate.cpp

示例6: NPN_SetValue

NPError NPN_SetValue(NPP instance, NPPVariable variable, void *value)
{
  return NPNFuncs.setvalue(instance, variable, value);
}
开发者ID:gfunkmonk2,项目名称:mate-movie-player,代码行数:4,代码来源:idolNPNGlue.cpp


注:本文中的NPNetscapeFuncs::setvalue方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。