| typedef struct NPObject | NPObject |
| typedef struct NPClass | NPClass |
| typedef char | NPUTF8 |
| typedef struct _NPString | NPString |
| typedef struct _NPVariant | NPVariant |
| void | NPN_ReleaseVariantValue | ( | NPVariant * | variant | ) |
NPN_ReleaseVariantValue() releases the value in the given variant
This must always be called on result variants and such in this API, i.e. any NPVariant whose value comes from a call that passes back an NPVariant must be released using this function. Access to the value in an NPVariant that has been released will result in undefined behavior
| Parameters | |
|---|---|
| variant | The variant whose value is to be released |
| typedef void * | NPIdentifier |
| NPIdentifier | NPN_GetStringIdentifier | ( | const NPUTF8 * | name | ) |
Returns an opaque identifier for the string that is passed in.
| Parameters | |
|---|---|
| name | The string for which an opaque identifier should be returned |
| void | NPN_GetStringIdentifiers | ( | const NPUTF8 ** | names, |
| int32_t | nameCount, | |||
| NPIdentifier * | identifiers | |||
| ) | ||||
| NPIdentifier | NPN_GetIntIdentifier | ( | int32_t | intid | ) |
Returns an opaque identifier for the integer that is passed in.
| Parameters | |
|---|---|
| intid | The integer for which an opaque identifier should be returned |
| bool | NPN_IdentifierIsString | ( | NPIdentifier | identifier | ) |
Determines whether or not an identifier is a string.
| Parameters | |
|---|---|
| identifier | The identifier whose type is to be examined |
| NPUTF8 * | NPN_UTF8FromIdentifier | ( | NPIdentifier | identifier | ) |
Returns the UTF-8 string corresponding to the given string identifier.
| Parameters | |
|---|---|
| identifier | The string identifier whose corresponding string should be returned |
| int32_t | NPN_IntFromIdentifier | ( | NPIdentifier | identifier | ) |
Returns the integer value corresponding to the given integer identifier.
| Parameters | |
|---|---|
| identifier | The integer identifier whose corresponding integer value should be returned |
| typedef NPObject *(* | NPAllocateFunctionPtr |
| typedef void(* | NPDeallocateFunctionPtr |
| typedef void(* | NPInvalidateFunctionPtr |
| typedef bool(* | NPHasMethodFunctionPtr |
| typedef bool(* | NPInvokeFunctionPtr |
| typedef bool(* | NPInvokeDefaultFunctionPtr |
| typedef bool(* | NPHasPropertyFunctionPtr |
| typedef bool(* | NPGetPropertyFunctionPtr |
| typedef bool(* | NPSetPropertyFunctionPtr |
| typedef bool(* | NPRemovePropertyFunctionPtr |
| typedef bool(* | NPEnumerationFunctionPtr |
| typedef bool(* | NPConstructFunctionPtr |
| NPObject * | NPN_CreateObject | ( | NPP | npp, |
| NPClass * | aClass | |||
| ) | ||||
Allocates a new NPObject.
| Parameters | |
|---|---|
| npp | The NPP indicating which plugin wants to instantiate the object |
| aClass | The class to instantiate an object of. |
| NPObject * | NPN_RetainObject | ( | NPObject * | npobj | ) |
Increments the reference count of the given NPObject.
| Parameters | |
|---|---|
| npobj | The NPObject to retain |
| void | NPN_ReleaseObject | ( | NPObject * | npobj | ) |
Decrements the reference count of the given NPObject. If the reference count reaches 0, the NPObject is deallocated by calling its deallocate function if one is provided; if one is not provided, free() is used.
| Parameters | |
|---|---|
| npobj | The NPObject whose reference count should be decremented |
| bool | NPN_Invoke | ( | NPP | npp, |
| NPObject * | npobj, | |||
| NPIdentifier | methodName, | |||
| const NPVariant * | args, | |||
| uint32_t | argCount, | |||
| NPVariant * | result | |||
| ) | ||||
Invokes a method on the given NPObject.
| Parameters | |
|---|---|
| npp | The NPP indicating which plugin wants to call the method on the object |
| npobj | The object on which to invoke a method |
| methodName | A string identifier indicating the name of the name of the method to invoke |
| args | An array of arguments to pass to the method |
| argCount | The number of arguments in the args array |
| result | A pointer to an NPVariant to receive the result returned by the method When the caller no longer needs the result, it must call NPN_ReleaseVariantValue() to release it. |
| bool | NPN_InvokeDefault | ( | NPP | npp, |
| NPObject * | npobj, | |||
| const NPVariant * | args, | |||
| uint32_t | argCount, | |||
| NPVariant * | result | |||
| ) | ||||
Invokes the default method, if one exists, on the given NPObject
| Parameters | |
|---|---|
| npp | The NPP indicating which plugin wants to call the method on the object |
| npobj | The object on which to invoke the default method |
| args | An array of arguments to pass to the method |
| argCount | The number of arguments in the args array |
| result | A pointer to an NPVariant to receive the result returned by the method When the caller no longer needs the result, it must call NPN_ReleaseVariantValue() to release it. |
| bool | NPN_Evaluate | ( | NPP | npp, |
| NPObject * | npobj, | |||
| NPString * | script, | |||
| NPVariant * | result | |||
| ) | ||||
Invokes a method on the given NPObject.
| Parameters | |
|---|---|
| npp | The NPP indicating which plugin instance's window to evaluate the script in. |
| npobj | The object on which to evaluate the script |
| script | The script to evaluate |
| result | On return, contains the value returned by the script The caller must call NPN_ReleaseVariantValue() to release the returned value when it's no longer needed |
| bool | NPN_GetProperty | ( | NPP | npp, |
| NPObject * | npobj, | |||
| NPIdentifier | propertyName, | |||
| NPVariant * | result | |||
| ) | ||||
Gets the value of a property on the specified NPObject.
| Parameters | |
|---|---|
| npp | The NPP indicating which plugin instance's is making the request |
| npobj | The object from which a value is to be retrieved. |
| propertyName | A string identifier indicating the name of the property whose value is to be retrieved |
| result | On return, contains the value of the specified property The caller must call NPN_ReleaseVariantValue() to release the returned value when it's no longer needed |
| bool | NPN_SetProperty | ( | NPP | npp, |
| NPObject * | npobj, | |||
| NPIdentifier | propertyName, | |||
| const NPVariant * | value | |||
| ) | ||||
Sets the value of a property on the specified NPObject.
| Parameters | |
|---|---|
| npp | The NPP indicating which plugin instance's is making the request |
| npobj | The object on which a value is to be set. |
| propertyName | A string identifier indicating the name of the property whose value is to be retrieved |
| value | The value to store in the specified property |
| bool | NPN_RemoveProperty | ( | NPP | npp, |
| NPObject * | npobj, | |||
| NPIdentifier | propertyName | |||
| ) | ||||
Removes a property from the specified NPObject
| Parameters | |
|---|---|
| npp | The NPP indicating which plugin instance's is making the request |
| npobj | The object on which a property is to be deleted |
| propertyName | A string identifier indicating the name of the property to remove |
| bool | NPN_HasProperty | ( | NPP | npp, |
| NPObject * | npobj, | |||
| NPIdentifier | propertyName | |||
| ) | ||||
Determines whether or not the specified NPObject has a particular property
| Parameters | |
|---|---|
| npp | The NPP indicating which plugin instance's is making the request |
| npobj | The object on which to look for the property |
| propertyName | A string identifier indicating the name of the property to look for |
| bool | NPN_HasMethod | ( | NPP | npp, |
| NPObject * | npobj, | |||
| NPIdentifier | methodName | |||
| ) | ||||
Determines whether or not the specified NPObject has a particular method
| Parameters | |
|---|---|
| npp | The NPP indicating which plugin instance's is making the request |
| npobj | The object on which to look for the method |
| methodName | A string identifier indicating the name of the method to look for |
| bool | NPN_Enumerate | ( | NPP | npp, |
| NPObject * | npobj, | |||
| NPIdentifier ** | identifier, | |||
| uint32_t * | count | |||
| ) | ||||
List all of identifiers in a NPObject
| Parameters | |
|---|---|
| npp | The NPP indicating which plugin instance's is making the request |
| npobj | The object on which to look for the indeifiers |
| identifier | array of identifiers returned |
| bool | NPN_Construct | ( | NPP | npp, |
| NPObject * | npobj, | |||
| const NPVariant * | args, | |||
| uint32_t | argCount, | |||
| NPVariant * | result | |||
| ) | ||||
Create a NPObject
| Parameters | |
|---|---|
| npp | The NPP indicating which plugin instance's is making the request |
| npobj | an input NPObject |
| args | An array of arguments to pass to the method |
| argCount | number of arguments |
| result | new created NPObject |
| void | _NPN_SetException | ( | NPObject * | npobj, |
| const NPUTF8 * | message | |||
| ) | ||||