mozilla
Your Search Results

    NPP

    Summary

    Represents a single instance of a plug-in. You specify one of these to any NPAPI function that needs to know which plug-in to work with.

    Syntax

    typedef struct _NPP
    {
        void* pdata; /* plug-in private data */
        void* ndata; /* Mozilla private data */
    } NPP_t;
    
    typedef NPP_t*  NPP;

    Fields

    The data structure has the following fields:

    pdata
    A value, whose definition is up to the plug-in, that the plug-in can use to store a pointer to an internal data structure associated with the instance; this field isn't modified by the browser.
    ndata
    A private value, owned by the browser, which is used to store data associated with the instance; this value should not be modified by the plug-in.

    Description

    Gecko creates an NPP structure for each plug-in instance and passes a pointer to it to NPP_New(). This pointer--which is an opaque instance handle of a plug-in--identifies the instance on which API calls should operate. NPP contains private instance data for both the plug-in and the browser.

    The NPP_Destroy() function informs the plug-in when the NPP instance is about to be deleted; after this call returns, the NPP pointer is no longer valid.

    See also

    Document Tags and Contributors

    Contributors to this page: Sheppy, Demos, ethertank, Pmash, kscarfone
    Last updated by: kscarfone,