gecko-dev/modules/plugin/samples/4x-scriptable
beard%netscape.com 423e9e246b [not part of build] 2-way scripting test. 2002-03-27 01:30:04 +00:00
..
macbuild [not part of build] scriptable plugin support for XP_MAC. 2002-03-27 01:10:26 +00:00
acmeIScriptObject.idl [not part of build] 2-way scripting example interface. 2002-03-27 01:14:40 +00:00
doc.html
makefile.win Rename 'install' build phase to 'libs'. 2001-11-21 09:49:41 +00:00
np4xscr.def
np4xscr.rc Adding missing file to the sample project, not part of the build 2001-08-24 21:03:50 +00:00
np_entry.cpp Relicensing Round 1, Take 2. Most C-like NPL files -> NPL/GPL/LGPL. Bug 98089. 2001-09-28 20:14:13 +00:00
npmac.cpp [not part of build] fix mac build bustage. 2002-03-26 23:39:28 +00:00
npn_gate.cpp Relicensing Round 1, Take 2. Most C-like NPL files -> NPL/GPL/LGPL. Bug 98089. 2001-09-28 20:14:13 +00:00
npp_gate.cpp [not part of build] make scriptable plugin work on XP_MAC. 2002-03-26 23:43:49 +00:00
nsI4xScriptablePlugin.idl [not part of build] 2-way plugin scripting example. 2002-03-27 01:16:06 +00:00
nsScriptablePeer.cpp [not part of build] 2-way plugin scripting example. 2002-03-27 01:16:06 +00:00
nsScriptablePeer.h [not part of build] 2-way plugin scripting example. 2002-03-27 01:16:06 +00:00
nsScriptablePeer1.cpp Relicensing Round 1, Take 2. Most C-like NPL files -> NPL/GPL/LGPL. Bug 98089. 2001-09-28 20:14:13 +00:00
nsScriptablePeer1.h Relicensing Round 1, Take 2. Most C-like NPL files -> NPL/GPL/LGPL. Bug 98089. 2001-09-28 20:14:13 +00:00
plugin.cpp [not part of build] make scriptable plugin work on XP_MAC. 2002-03-26 23:43:49 +00:00
plugin.h [not part of build] make scriptable plugin work on XP_MAC. 2002-03-26 23:43:49 +00:00
readme.txt Bugzilla Bug 106386 rid source of these misspellings: persistant persistance priviledge protocal editting editted targetted targetting 2001-12-23 23:23:41 +00:00
resource.h
script-test.html [not part of build] 2-way scripting test. 2002-03-27 01:30:04 +00:00
test.html

readme.txt

This is a plugin sample which demonstrates how with minimal modifications
in the 4.x legacy plugin code to achieve scripting functionality despite
of Mozilla not supporting LiveConnect in the way it was supported in 
Netscape Communicator.

To build the sample:

1. create .xpt and nsI4xScrPlugin.h out of nsI4xScrPlugin.idl file
using Netscape idl compiler xpidl.exe. The command options are:
   xpidl -m header nsI4xScrPlugin.idl
   xpidl -m typelib nsI4xScrPlugin.idl
nsISupports.idl and nsrootidl.idl are needed for this.

2. create a project and build np4xscr.dll -- the plugin itself

3. place .xpt file in the components directory and the dll in the
plugins directory

4. load test.html and see it in work

The current sample code was written for Windows but can be easily 
modified for other platforms.

Important notice: although developers who work on xpcom plugins
are strongly encouraged to use Netscape macros for common interface
method declarations and implementations, in the present sample we 
decided to use their manual implementation. This is because the technique
shown in the sample may be useful for plugins which are supposed to
work under both Mozilla based browsers and Netscape Communicator
(4.x browsers). Using the macros requires linking against some
libraries which are not present in 4.x browsers (xpcom.lib, nspr.lib).

Files which under other circumstances would benefit from using
the macros are nsScriptablePeer.h and nsScriptablePeer.cpp. The versions
which use macros are also included (nsScriptablePeer1.h and 
nsScriptablePeer1.cpp) for reference purposes.

Some header files from mozilla/dist/include and some .idl files from
mozilla/dist/idl are still needed to successfully build the sample.