Home | History | Annotate | Download | only in TestNetscapePlugIn

Lines Matching full:args

67     va_list args;
68 va_start(args, format);
70 vsprintf(message + strlen(message), format, args);
71 va_end(args);
76 void pluginLogWithArguments(NPP instance, const char* format, va_list args)
79 vsprintf(message + strlen(message), format, args);
95 va_list args;
96 va_start(args, format);
97 pluginLogWithArguments(instance, format, args);
98 va_end(args);
106 static bool pluginInvoke(NPObject*, NPIdentifier name, const NPVariant* args, uint32_t argCount, NPVariant* result);
439 static bool testIdentifierToString(PluginObject*, const NPVariant* args, uint32_t argCount, NPVariant* result)
443 NPIdentifier identifier = variantToIdentifier(args[0]);
453 static bool testIdentifierToInt(PluginObject*, const NPVariant* args, uint32_t argCount, NPVariant* result)
457 NPIdentifier identifier = variantToIdentifier(args[0]);
465 args, uint32_t argCount, NPVariant* result)
467 if (argCount != 2 || !NPVARIANT_IS_STRING(args[0]))
473 NPUTF8* callbackString = createCStringFromNPVariant(&args[0]);
478 browser->invoke(obj->npp, windowScriptObject, callbackIdentifier, &args[1], 1, &browserResult);
485 static bool testCallback(PluginObject* obj, const NPVariant* args, uint32_t argCount, NPVariant* result)
487 if (!argCount || !NPVARIANT_IS_STRING(args[0]))
493 NPUTF8* callbackString = createCStringFromNPVariant(&args[0]);
507 static bool testCallbackReturn(PluginObject* obj, const NPVariant* args, uint32_t argCount, NPVariant* result)
509 if (argCount != 1 || !NPVARIANT_IS_STRING(args[0]))
515 NPUTF8* callbackString = createCStringFromNPVariant(&args[0]);
536 static bool getURL(PluginObject* obj, const NPVariant* args, uint32_t argCount, NPVariant* result)
538 if (argCount == 2 && NPVARIANT_IS_STRING(args[0]) && NPVARIANT_IS_STRING(args[1])) {
539 NPUTF8* urlString = createCStringFromNPVariant(&args[0]);
540 NPUTF8* targetString = createCStringFromNPVariant(&args[1]);
548 if (argCount == 1 && NPVARIANT_IS_STRING(args[0])) {
549 NPUTF8* urlString = createCStringFromNPVariant(&args[0]);
559 static bool getURLNotify(PluginObject* obj, const NPVariant* args, uint32_t argCount, NPVariant* result)
561 if (argCount != 3 || !NPVARIANT_IS_STRING(args[0])
562 || (!NPVARIANT_IS_STRING(args[1]) && !NPVARIANT_IS_NULL(args[1]))
563 || !NPVARIANT_IS_STRING(args[2]))
566 NPUTF8* urlString = createCStringFromNPVariant(&args[0]);
567 NPUTF8* targetString = (NPVARIANT_IS_STRING(args[1]) ? createCStringFromNPVariant(&args[1]) : 0);
568 NPUTF8* callbackString = createCStringFromNPVariant(&args[2]);
581 static bool testInvokeDefault(PluginObject* obj, const NPVariant* args, uint32_t argCount, NPVariant* result)
583 if (!NPVARIANT_IS_OBJECT(args[0]))
586 NPObject* callback = NPVARIANT_TO_OBJECT(args[0]);
601 static bool destroyStream(PluginObject* obj, const NPVariant* args, uint32_t argCount, NPVariant* result)
608 static bool destroyNullStream(PluginObject* obj, const NPVariant* args, uint32_t argCount, NPVariant* result)
615 static bool testEnumerate(PluginObject* obj, const NPVariant* args, uint32_t argCount, NPVariant* result)
617 if (argCount != 2 || !NPVARIANT_IS_OBJECT(args[0]) || !NPVARIANT_IS_OBJECT(args[1]))
622 if (browser->enumerate(obj->npp, NPVARIANT_TO_OBJECT(args[0]), &identifiers, &count)) {
623 NPObject* outArray = NPVARIANT_TO_OBJECT(args[1]);
632 NPVariant args[1];
633 STRINGZ_TO_NPVARIANT(string, args[0]);
635 if (browser->invoke(obj->npp, outArray, pushIdentifier, args, 1, &browserResult))
647 static bool testGetIntIdentifier(PluginObject*, const NPVariant* args, uint32_t argCount, NPVariant* result)
649 if (argCount != 1 || !NPVARIANT_IS_DOUBLE(args[0]))
652 NPIdentifier identifier = browser->getintidentifier((int)NPVARIANT_TO_DOUBLE(args[0]));
657 static bool testGetProperty(PluginObject* obj, const NPVariant* args, uint32_t argCount, NPVariant* result)
666 assert(NPVARIANT_IS_STRING(args[i]));
667 NPUTF8* propertyString = createCStringFromNPVariant(&args[i]);
691 static bool testHasProperty(PluginObject* obj, const NPVariant* args, uint32_t argCount, NPVariant* result)
693 if (argCount != 2 || !NPVARIANT_IS_OBJECT(args[0]) || !NPVARIANT_IS_STRING(args[1]))
696 NPUTF8* propertyString = createCStringFromNPVariant(&args[1]);
700 bool retval = browser->hasproperty(obj->npp, NPVARIANT_TO_OBJECT(args[0]), propertyIdentifier);
706 static bool testHasMethod(PluginObject* obj, const NPVariant* args, uint32_t argCount, NPVariant* result)
708 if (argCount != 2 || !NPVARIANT_IS_OBJECT(args[0]) || !NPVARIANT_IS_STRING(args[1]))
711 NPUTF8* propertyString = createCStringFromNPVariant(&args[1]);
715 bool retval = browser->hasmethod(obj->npp, NPVARIANT_TO_OBJECT(args[0]), propertyIdentifier);
721 static bool testEvaluate(PluginObject* obj, const NPVariant* args, uint32_t argCount, NPVariant* result)
723 if (argCount != 1 || !NPVARIANT_IS_STRING(args[0]))
728 NPString s = NPVARIANT_TO_STRING(args[0]);
735 static bool testGetPropertyReturnValue(PluginObject* obj, const NPVariant* args, uint32_t argCount, NPVariant* result)
737 if (argCount != 2 || !NPVARIANT_IS_OBJECT(args[0]) || !NPVARIANT_IS_STRING(args[1]))
740 NPUTF8* propertyString = createCStringFromNPVariant(&args[1]);
745 bool retval = browser->getproperty(obj->npp, NPVARIANT_TO_OBJECT(args[0]), propertyIdentifier, &variant);
762 static bool testPostURLFile(PluginObject* obj, const NPVariant* args, uint32_t argCount, NPVariant* result)
764 if (argCount != 4 || !NPVARIANT_IS_STRING(args[0]) || !NPVARIANT_IS_STRING(args[1]) || !NPVARIANT_IS_STRING(args[2]) || !NPVARIANT_IS_STRING(args[3]))
767 NPString urlString = NPVARIANT_TO_STRING(args[0]);
770 NPString targetString = NPVARIANT_TO_STRING(args[1]);
773 NPString pathString = NPVARIANT_TO_STRING(args[2]);
776 NPString contentsString = NPVARIANT_TO_STRING(args[3]);
797 static bool testConstruct(PluginObject* obj, const NPVariant* args, uint32_t argCount, NPVariant* result)
799 if (!argCount || !NPVARIANT_IS_OBJECT(args[0]))
802 return browser->construct(obj->npp, NPVARIANT_TO_OBJECT(args[0]), args + 1, argCount - 1, result);
807 static bool testScriptObjectInvoke(PluginObject* obj, const NPVariant* args, uint32_t argCount, NPVariant* result)
809 if (argCount != 2 || !NPVARIANT_IS_STRING(args[0]) || !NPVARIANT_IS_STRING(args[1]))
815 NPUTF8* callbackString = createCStringFromNPVariant(&args[0]);
821 browser->invoke(obj->npp, windowScriptObject, callbackIdentifier, &args[1], 1, &object_result);
827 NPUTF8* object_mehod_string = createCStringFromNPVariant(&args[1]);
948 static bool testSetStatus(PluginObject* obj, const NPVariant* args, uint32_t argCount, NPVariant* result)
951 if (argCount && NPVARIANT_IS_STRING(args[0])) {
952 NPString statusString = NPVARIANT_TO_STRING(args[0]);
962 static bool testResizeTo(PluginObject* obj, const NPVariant* args, uint32_t argCount, NPVariant* result)
971 if (browser->invoke(obj->npp, windowObject, browser->getstringidentifier("resizePlugin"), args, argCount, &callResult))
981 static bool normalizeOverride(PluginObject* obj, const NPVariant* args, uint32_t argCount, NPVariant* result)
990 if (browser->invoke(obj->npp, windowObject, browser->getstringidentifier("pluginCallback"), args, argCount, &callResult))
996 static bool invalidateRect(PluginObject* obj, const NPVariant* args, uint32_t argCount, NPVariant* result)
1002 rect.left = static_cast<int>(NPVARIANT_TO_DOUBLE(args[0]));
1003 rect.top = static_cast<int>(NPVARIANT_TO_DOUBLE(args[1]));
1004 rect.right = static_cast<int>(NPVARIANT_TO_DOUBLE(args[2]));
1005 rect.bottom = static_cast<int>(NPVARIANT_TO_DOUBLE(args[3]));
1011 static bool pluginInvoke(NPObject* header, NPIdentifier name, const NPVariant* args, uint32_t argCount, NPVariant* result)
1015 return testCallback(plugin, args, argCount, result);
1017 return testCallbackReturn(plugin, args, argCount, result);
1019 return getURL(plugin, args, argCount, result);
1021 return testDOMAccess(plugin, args, argCount, result);
1023 return getURLNotify(plugin, args, argCount, result);
1025 return testInvokeDefault(plugin, args, argCount, result);
1027 return testEnumerate(plugin, args, argCount, result);
1029 return destroyStream(plugin, args, argCount, result);
1031 return testGetIntIdentifier(plugin, args, argCount, result);
1033 return testEvaluate(plugin, args, argCount, result);
1035 return testGetProperty(plugin, args, argCount, result);
1037 return testGetPropertyReturnValue(plugin, args, argCount, result);
1039 return testHasProperty(plugin, args, argCount, result);
1041 return testHasMethod(plugin, args, argCount, result);
1043 return testIdentifierToString(plugin, args, argCount, result);
1045 return testIdentifierToInt(plugin, args, argCount, result);
1047 return testPassTestObject(plugin, args, argCount, result);
1049 return testPostURLFile(plugin, args, argCount, result);
1051 return testConstruct(plugin, args, argCount, result);
1053 return testScriptObjectInvoke(plugin, args, argCount, result);
1061 browser->invoke(plugin->npp, windowScriptObject, name, args, argCount, result);
1077 return destroyNullStream(plugin, args, argCount, result);
1087 browser->getproperty(plugin->npp, NPVARIANT_TO_OBJECT(args[0]), stringVariantToIdentifier(args[1]), result);
1091 browser->setproperty(plugin->npp, NPVARIANT_TO_OBJECT(args[0]), stringVariantToIdentifier(args[1]), &args[2]);
1097 plugin->rememberedObject = NPVARIANT_TO_OBJECT(args[0]);
1115 uint32_t refCount = NPVARIANT_TO_OBJECT(args[0])->referenceCount;
1120 return testSetStatus(plugin, args, argCount, result);
1122 return testResizeTo(plugin, args, argCount, result);
1124 return normalizeOverride(plugin, args, argCount, result);
1126 return invalidateRect(plugin, args, argCount, result);
1199 NPVariant args[2];
1206 INT32_TO_NPVARIANT(reason, args[0]);
1220 STRINGN_TO_NPVARIANT(strHdr, len, args[1]);
1222 NULL_TO_NPVARIANT(args[1]);
1225 if (browser->invoke(object->npp, windowScriptObject, callbackIdentifier, args, 2, &browserResult))
1253 NPVariant args[7];
1255 VOID_TO_NPVARIANT(args[0]);
1256 NULL_TO_NPVARIANT(args[1]);
1257 BOOLEAN_TO_NPVARIANT(true, args[2]);
1258 INT32_TO_NPVARIANT(242, args[3]);
1259 DOUBLE_TO_NPVARIANT(242.242, args[4]);
1260 STRINGZ_TO_NPVARIANT("Hello, World", args[5]);
1261 OBJECT_TO_NPVARIANT(windowScriptObject, args[6]);
1264 if (browser->invoke(npp, windowScriptObject, testNPInvoke, args, 7, &result))