You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
181 lines
8.7 KiB
181 lines
8.7 KiB
<!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>TQNPlugin Class</title>
|
|
<style type="text/css"><!--
|
|
fn { margin-left: 1cm; text-indent: -1cm; }
|
|
a:link { color: #004faf; text-decoration: none }
|
|
a:visited { color: #672967; text-decoration: none }
|
|
body { background: #ffffff; color: black; }
|
|
--></style>
|
|
</head>
|
|
<body>
|
|
|
|
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
|
<tr bgcolor="#E5E5E5">
|
|
<td valign=center>
|
|
<a href="index.html">
|
|
<font color="#004faf">Home</font></a>
|
|
| <a href="classes.html">
|
|
<font color="#004faf">All Classes</font></a>
|
|
| <a href="mainclasses.html">
|
|
<font color="#004faf">Main Classes</font></a>
|
|
| <a href="annotated.html">
|
|
<font color="#004faf">Annotated</font></a>
|
|
| <a href="groups.html">
|
|
<font color="#004faf">Grouped Classes</font></a>
|
|
| <a href="functions.html">
|
|
<font color="#004faf">Functions</font></a>
|
|
</td>
|
|
<td align="right" valign="center"><img src="logo32.png" align="right" width="64" height="32" border="0"></td></tr></table><h1 align=center>TQNPlugin Class Reference</h1>
|
|
|
|
<p>The TQNPlugin class provides the main factory for plugin objects.
|
|
<a href="#details">More...</a>
|
|
<p>This class is part of the <b>TQt Netscape Extension</b>.
|
|
<p><tt>#include <<a href="tqnp-h.html">tqnp.h</a>></tt>
|
|
<p><a href="tqnplugin-members.html">List of all member functions.</a>
|
|
<h2>Public Members</h2>
|
|
<ul>
|
|
<li class=fn>virtual <a href="#~TQNPlugin"><b>~TQNPlugin</b></a> ()</li>
|
|
<li class=fn>void <a href="#getVersionInfo"><b>getVersionInfo</b></a> ( int & plugin_major, int & plugin_minor, int & browser_major, int & browser_minor )</li>
|
|
<li class=fn>virtual TQNPInstance * <a href="#newInstance"><b>newInstance</b></a> () = 0</li>
|
|
<li class=fn>virtual const char * <a href="#getMIMEDescription"><b>getMIMEDescription</b></a> () const = 0</li>
|
|
<li class=fn>virtual const char * <a href="#getPluginNameString"><b>getPluginNameString</b></a> () const = 0</li>
|
|
<li class=fn>virtual const char * <a href="#getPluginDescriptionString"><b>getPluginDescriptionString</b></a> () const = 0</li>
|
|
<li class=fn>virtual void * <a href="#getJavaClass"><b>getJavaClass</b></a> ()</li>
|
|
<li class=fn>virtual void <a href="#unuseJavaClass"><b>unuseJavaClass</b></a> ()</li>
|
|
<li class=fn>void * <a href="#getJavaEnv"><b>getJavaEnv</b></a> () const</li>
|
|
</ul>
|
|
<h2>Static Public Members</h2>
|
|
<ul>
|
|
<li class=fn>TQNPlugin * <a href="#create"><b>create</b></a> ()</li>
|
|
<li class=fn>TQNPlugin * <a href="#actual"><b>actual</b></a> ()</li>
|
|
</ul>
|
|
<h2>Protected Members</h2>
|
|
<ul>
|
|
<li class=fn><a href="#TQNPlugin"><b>TQNPlugin</b></a> ()</li>
|
|
</ul>
|
|
<hr><a name="details"></a><h2>Detailed Description</h2>
|
|
<p> This class is defined in the <b>TQt <a href="netscape-plugin.html#Netscape">Netscape</a> Extension</b>, which can be found in the <tt>qt/extensions</tt> directory. It is not included in the main TQt API.
|
|
<p>
|
|
|
|
The TQNPlugin class provides the main factory for plugin objects.
|
|
<p>
|
|
<p> This class is the heart of the plugin. One instance of this object
|
|
is created when the plugin is <em>first</em> needed, by calling
|
|
<a href="#create">TQNPlugin::create</a>(), which must be implemented in your plugin code
|
|
to return some derived class of TQNPlugin. The one TQNPlugin object
|
|
creates all <a href="tqnpinstance.html">TQNPInstance</a> instances for a web browser running in a
|
|
single process.
|
|
<p> Additionally, if TQt is linked to the plugin as a dynamic library,
|
|
only one instance of <a href="ntqapplication.html">TQApplication</a> will exist <em>across all plugins that have been made with TQt</em>. So, your plugin should tread lightly
|
|
on global settings. Do not, for example, use
|
|
<a href="ntqapplication.html#setFont">TQApplication::setFont</a>() - that will change the font in every
|
|
widget of every TQt-based plugin currently loaded!
|
|
|
|
<hr><h2>Member Function Documentation</h2>
|
|
<h3 class=fn><a name="TQNPlugin"></a>TQNPlugin::TQNPlugin ()<tt> [protected]</tt>
|
|
</h3>
|
|
Creates a TQNPlugin. This may only be used by the constructor
|
|
of the class, derived from TQNPlugin, that is returned by your
|
|
plugin's implementation of the <a href="#create">TQNPlugin::create</a>() function.
|
|
|
|
<h3 class=fn><a name="~TQNPlugin"></a>TQNPlugin::~TQNPlugin ()<tt> [virtual]</tt>
|
|
</h3>
|
|
Destroys the TQNPlugin. This is called by the plugin binding code
|
|
just before the plugin is about to be unloaded from memory. If
|
|
newWindow() has been called, a <a href="ntqapplication.html">TQApplication</a> will still exist at
|
|
this time, but will be deleted shortly after, just before the plugin
|
|
is deleted.
|
|
|
|
<h3 class=fn><a href="tqnplugin.html">TQNPlugin</a> * <a name="actual"></a>TQNPlugin::actual ()<tt> [static]</tt>
|
|
</h3>
|
|
Returns the plugin most recently returned by <a href="#create">TQNPlugin::create</a>().
|
|
|
|
<h3 class=fn><a href="tqnplugin.html">TQNPlugin</a> * <a name="create"></a>TQNPlugin::create ()<tt> [static]</tt>
|
|
</h3>
|
|
|
|
<p> This function must be implemented by your plugin code. It should return a
|
|
derived class of TQNPlugin.
|
|
|
|
<h3 class=fn>void * <a name="getJavaClass"></a>TQNPlugin::getJavaClass ()<tt> [virtual]</tt>
|
|
</h3>
|
|
Override this function to return a reference to the Java class that represents
|
|
the plugin. The default returns 0, indicating no class.
|
|
<p> If you override this class, you must also override
|
|
<a href="#unuseJavaClass">TQNPlugin::unuseJavaClass</a>().
|
|
<p> The return value is actually a <tt>jref</tt>; we use <tt>void*</tt> so as to
|
|
avoid burdening plugins which do not require Java.
|
|
<p> <p>See also <a href="#getJavaEnv">getJavaEnv</a>() and <a href="tqnpinstance.html#getJavaPeer">TQNPInstance::getJavaPeer</a>().
|
|
|
|
<h3 class=fn>void * <a name="getJavaEnv"></a>TQNPlugin::getJavaEnv () const
|
|
</h3>
|
|
Returns a pointer to the Java execution environment, or 0 if
|
|
either Java is disabled or an error occurred.
|
|
<p> The return value is actually a <tt>JRIEnv*</tt>; we use <tt>void*</tt> so as
|
|
to avoid burdening plugins which do not require Java.
|
|
<p> <p>See also <a href="#getJavaClass">getJavaClass</a>() and <a href="tqnpinstance.html#getJavaPeer">TQNPInstance::getJavaPeer</a>().
|
|
|
|
<h3 class=fn>const char * <a name="getMIMEDescription"></a>TQNPlugin::getMIMEDescription () const<tt> [pure virtual]</tt>
|
|
</h3>
|
|
|
|
<p> Override this function to return the MIME description of the data formats
|
|
supported by your plugin. The format of this string is shown by
|
|
the following example:
|
|
<p> <pre>
|
|
const char* getMIMEDescription() const
|
|
{
|
|
return "image/x-png:png:PNG Image;"
|
|
"image/png:png:PNG Image;"
|
|
"image/x-portable-bitmap:pbm:PBM Image;"
|
|
"image/x-portable-graymap:pgm:PGM Image;"
|
|
"image/x-portable-pixmap:ppm:PPM Image;"
|
|
"image/bmp:bmp:BMP Image;"
|
|
"image/x-ms-bmp:bmp:BMP Image;"
|
|
"image/x-xpixmap:xpm:XPM Image;"
|
|
"image/xpm:xpm:XPM Image";
|
|
}
|
|
</pre>
|
|
|
|
|
|
<h3 class=fn>const char * <a name="getPluginDescriptionString"></a>TQNPlugin::getPluginDescriptionString () const<tt> [pure virtual]</tt>
|
|
</h3>
|
|
|
|
<p> Returns a pointer to the plain-text description of the plugin.
|
|
|
|
<h3 class=fn>const char * <a name="getPluginNameString"></a>TQNPlugin::getPluginNameString () const<tt> [pure virtual]</tt>
|
|
</h3>
|
|
|
|
<p> Returns a pointer to the plain-text name of the plugin.
|
|
|
|
<h3 class=fn>void <a name="getVersionInfo"></a>TQNPlugin::getVersionInfo ( int & plugin_major, int & plugin_minor, int & browser_major, int & browser_minor )
|
|
</h3>
|
|
Populates <em>*</em><em>plugin_major</em> and <em>*</em><em>plugin_minor</em> with the
|
|
version of the plugin API and populates <em>*</em><em>browser_major</em> and
|
|
<em>*</em><em>browser_minor</em> with the version of the web browser.
|
|
|
|
<h3 class=fn><a href="tqnpinstance.html">TQNPInstance</a> * <a name="newInstance"></a>TQNPlugin::newInstance ()<tt> [pure virtual]</tt>
|
|
</h3>
|
|
|
|
<p> Override this function to return an appropriate derived class of
|
|
<a href="tqnpinstance.html">TQNPInstance</a>.
|
|
|
|
<h3 class=fn>void <a name="unuseJavaClass"></a>TQNPlugin::unuseJavaClass ()<tt> [virtual]</tt>
|
|
</h3>
|
|
This function is called when the plugin is shutting down. The
|
|
function should <em>unuse</em> the Java class returned earlier by
|
|
<a href="#getJavaClass">getJavaClass</a>().
|
|
|
|
<!-- eof -->
|
|
<hr><p>
|
|
This file is part of the <a href="index.html">TQt toolkit</a>.
|
|
Copyright © 1995-2007
|
|
<a href="http://www.trolltech.com/">Trolltech</a>. All Rights Reserved.<p><address><hr><div align=center>
|
|
<table width=100% cellspacing=0 border=0><tr>
|
|
<td>Copyright © 2007
|
|
<a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
|
|
<td align=right><div align=right>TQt 3.3.8</div>
|
|
</table></div></address></body>
|
|
</html>
|