« Gecko Plugin API Reference « Plug-in Side Plug-in API
#include <npapi.h>
NPError NPP_New(NPMIMEType pluginType,
NPP instance, uint16 mode,
int16 argc, char *argn[],
char *argv[], NPSavedData *saved);
The function has the following parameters:
NPP_New creates a new instance of a plug-in. It is called after NP_Initialize and is passed the MIME type, embedded or full-screen display mode, and, for embedded plug-ins, information about HTML EMBED arguments.
A new instance pointer (NPP instance) is created by the plug-in, which is valid until the instance is destroyed with NPP_Destroy.
If instance data was saved from a previous instance of the plug-in by the NPP_Destroy function, it is returned in the saved parameter for the current instance to use.
All attributes in the EMBED tag (standard and private) are passed in NPP_New in the argn and argv arrays. The browser ignores any non-standard attributes within an EMBED tag. This gives developers a chance to use private attributes to communicate instance-specific options or other information to the plug-in. Place private options at the end of the list of standard attributes in the EMBED Tag.
Page last modified 10:28, 3 Aug 2007 by Rickwookie?