1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Qt-based LiveConnect Plugins</title>
</head>
<p>
<body bgcolor=#ffffff>
<h1 align=center>Qt-based LiveConnect Plugins for Netscape and Explorer</h1>
<p>
<hr>
<p>
The Qt-based Netscape Plugin software makes it easy to write
plugins
such that they can be used on both Unix/Linux and Windows/95/NT,
in the Netscape and MS-Explorer, and any other
WWW browser supporting the same protocol.
<p>
<h2>How-to</h2>
<p>
<ol>
<li>Download the
<a href="http://home.netscape.com/comprod/development_partners/plugin_api/index.html">
Plugin SDK from Netscape</a>, and copy the following files from there to
<tt>$QTDIR/extensions/nsplugin/src</tt> :
<multicol cols=2>
<ul>
<li>common/npwin.cpp
<li>common/npunix.c
<li>include/npapi.h
<li>include/npupp.h
<li>include/jri.h
<li>include/jri_md.h
<li>include/jritypes.h
</ul>
</multicol>
<li>Build the Netscape Plugin extension library, found in the
<tt>extensions/nsplugin/src</tt> directory of your Qt distribution.
This produces a static library to be linked with your plugin code.
<li>Read the NSPlugin components in the
<a href="annotated.html">class documentation</a>.
<li>Examine the example plugins:
<ul>
<li><a href=trivial-trivial-cpp.html>Trivial example</a>
<li><a href=qtimage-qtimage-cpp.html>Image example</a>
<li><a href=grapher-grapher-cpp.html>Graphing example</a>
</ul>
<li>Do most of your development as a stand-alone Qt application - debugging
Netscape Plugins is cumbersome. You may want to use <tt>signal(2)</tt>
in your plugin to enable core-dumps if your browser disables them.
<li>Note the platform-specific build steps below.
<li>Read about the raw plugin interface
<a href="http://developer.netscape.com/docs/manuals/communicator/plugin/index.htm">
in Netscape's handbook.</a>
<li>If files viewed by a plugin are provided by an HTTP server
(using a <tt>http://...</tt> URL) then
the server must be configured to send the correct MIME type
for the file, such as by editing the <tt>mime.types</tt> file
of Apache. If the files are viewed via a <tt>file://...</tt>
URL, then the browser will use the filename extension to decide
the file type (and hence the plugin to load) - the user may need
to set the filename extension in the Helpers or Applications
section of their browser preferences.
</ol>
<p>
We are working on streamlining the build process for Qt-based Netscape Plugins.
<p>
<h3>Building under X11</h3>
<p>
<ul>
<li>The Makefiles in the examples are appropriate for UNIX/X11.
<li>The user must install the resulting Shared Object in the Plugins
directory of the browser.
</ul>
<p>
<h3>Building under Windows</h3>
<p>
<ul>
<li>Qt needs to be built as a static library when building Netscape plugins, we are
looking into the problem of making it work with Qt as a dynamic library.
<li>Plugins must be named <tt>np</tt><i>name</i><tt>.dll</tt>,
or the browser will ignore them.
<li>The link step must include:
<ul>
<li><tt>/def:</tt><i>name</i><tt>.def</tt>
<li><tt>/dll</tt>
<li>a compiled resource file defining the
file/MIME types accepted by the plugin.
</ul>
<li>The user must install the resulting DLL in the Plugins directory
of the browser.
</ul>
<p>
<h2>Known Bugs</h2>
<p>
The Qt-based LiveConnect Plugin binding code has a number of
minor bugs, but is sufficiently stable for most production applications.
All of these have known solutions which we are working to implement.
<p>
<ul>
<li> MSIE 4.0 support is poor.
<li> Crashes on X11 if window is closed via window manager.
<li> Keyboard problems on Windows.
</ul>
<p><address><hr><div align="center">
<table width="100%" cellspacing="0" border="0"><tr>
<td>Copyright 2001 Trolltech<td><a href="http://www.trolltech.com/trademarks.html">Trademarks</a>
<td align="right"><div align="right">Qt version 2.3.2</div>
</table></div></address></body></html>
|