Version 2 of Tcl Browser Plugin Design

Updated 2006-06-08 18:05:24

This page attempts to describe how the Tcl web browser plugin is designed, mostly from the C level and to some extent the Tcl level.


The C lifecycle of a typical single plugin instance: I use NPP_* where the NPAPI has NP_* as that maps to the actual functions in the Tcl browser plugin sources

NPP_Initialize

NPP_New

NPP_SetWindow

NPP_NewStream

NPP_Write

NPP_DestroyStream

NPP_Destroy

NPP_Shutdown


The installation structure of the plugin:

 +--- /path/to/browserdir/plugins/
   +--- (lib)nptcl<ver>.(so|dll)
   +--- nptcl/
     +--- tclplugin.(so|dll) # a [stardll], may also use regular Tcl installation
     +--- basekit(.exe)      # optional, used by default on unix
     +--- plugin<ver>
       +--- config/
       +--- safetcl/
       +--- utils/
       +--- installed.cfg

Mozilla Gecko NPAPI reference: [L1 ]

XPInstall documentation for creating XPIs (plugin delivery): [L2 ]

Old Netscape docs for NPAPI: [L3 ]