Lines Matching refs:variant
252 static NPUTF8* createCStringFromNPVariant(const NPVariant* variant)
254 size_t length = NPVARIANT_TO_STRING(*variant).UTF8Length;
256 memcpy(result, NPVARIANT_TO_STRING(*variant).UTF8Characters, length);
349 static bool pluginSetProperty(NPObject* obj, NPIdentifier name, const NPVariant* variant)
353 plugin->eventLogging = NPVARIANT_TO_BOOLEAN(*variant);
357 plugin->logDestroy = NPVARIANT_TO_BOOLEAN(*variant);
361 plugin->returnErrorFromNewStream = NPVARIANT_TO_BOOLEAN(*variant);
365 plugin->returnNegativeOneFromWrite = NPVARIANT_TO_BOOLEAN(*variant);
373 browser->setvalue(plugin->npp, NPPVpluginWindowBool, (void *)NPVARIANT_TO_BOOLEAN(*variant));
403 static NPIdentifier stringVariantToIdentifier(NPVariant variant)
405 assert(NPVARIANT_IS_STRING(variant));
406 NPUTF8* utf8String = createCStringFromNPVariant(&variant);
412 static NPIdentifier int32VariantToIdentifier(NPVariant variant)
414 assert(NPVARIANT_IS_INT32(variant));
415 int32_t integer = NPVARIANT_TO_INT32(variant);
419 static NPIdentifier doubleVariantToIdentifier(NPVariant variant)
421 assert(NPVARIANT_IS_DOUBLE(variant));
422 double value = NPVARIANT_TO_DOUBLE(variant);
428 static NPIdentifier variantToIdentifier(NPVariant variant)
430 if (NPVARIANT_IS_STRING(variant))
431 return stringVariantToIdentifier(variant);
432 if (NPVARIANT_IS_INT32(variant))
433 return int32VariantToIdentifier(variant);
434 if (NPVARIANT_IS_DOUBLE(variant))
435 return doubleVariantToIdentifier(variant);
671 NPVariant variant;
672 bool retval = browser->getproperty(obj->npp, object, propertyIdentifier, &variant);
679 assert(NPVARIANT_IS_OBJECT(variant));
680 object = NPVARIANT_TO_OBJECT(variant);
682 *result = variant;
744 NPVariant variant;
745 bool retval = browser->getproperty(obj->npp, NPVARIANT_TO_OBJECT(args[0]), propertyIdentifier, &variant);
747 browser->releasevariantvalue(&variant);