qnpinstance.html

来自「QT 下载资料仅供参考」· HTML 代码 · 共 320 行 · 第 1/2 页

HTML
320
字号
<h3 class=fn>const char * <a name="argv"></a>QNPInstance::argv ( int&nbsp;i ) const</h3>Returns the value of the <em>i</em>-th argument. See <a href="#argc">argc</a>().<h3 class=fn>void * <a name="getJavaPeer"></a>QNPInstance::getJavaPeer () const</h3>Returns the Java object associated with the plug-in instance, anobject of the <a href="qnplugin.html#getJavaClass">plug-in's Java    class</a>, or 0 if the plug-in does not have a Java class,Java is disabled, or an error occurred.<p> The return value is actually a <tt>jref</tt> we use <tt>void*</tt> so as toavoid burdening plugins which do not require Java.<p> <p>See also <a href="qnplugin.html#getJavaClass">QNPlugin::getJavaClass</a>() and <a href="qnplugin.html#getJavaEnv">QNPlugin::getJavaEnv</a>().<h3 class=fn>void <a name="getURL"></a>QNPInstance::getURL ( const&nbsp;char&nbsp;*&nbsp;url, const&nbsp;char&nbsp;*&nbsp;window = 0 )</h3>Requests that the <em>url</em> be retrieved and sent to the named <em>window</em>. See Netscape's JavaScript documentation for an explanationof window names.<h3 class=fn>void <a name="getURLNotify"></a>QNPInstance::getURLNotify ( const&nbsp;char&nbsp;*&nbsp;url, const&nbsp;char&nbsp;*&nbsp;window = 0, void&nbsp;*&nbsp;data = 0 )</h3>Print the instance full-page. By default, this returns FALSE,causing the browser to call the (embedded) <a href="#print">print</a>() functioninstead. Requests that the given <em>url</em> be retrieved and sent tothe named <em>window</em>. See Netscape's JavaScript documentation foran explanation of window names. Passes the arguments including <em>data</em> to NPN_GetURLNotify.<p> <a href="http://developer.netscape.com/docs/manuals/communicator/plugin/refpgur.htm#npngeturlnotify">Netscape: NPN_GetURLNotify method</a><h3 class=fn><a href="qnpinstance.html#InstanceMode-enum">InstanceMode</a> <a name="mode"></a>QNPInstance::mode () const</h3>Returns the mode of the plugin.<h3 class=fn><a href="qnpstream.html">QNPStream</a>&nbsp;* <a name="newStream"></a>QNPInstance::newStream ( const&nbsp;char&nbsp;*&nbsp;mimetype, const&nbsp;char&nbsp;*&nbsp;window, bool&nbsp;as_file = FALSE )</h3><p><b>This function is under development and is subject to change.</b><p> This function is <em>not tested</em>.<p> Requests the creation of a new data stream <em>from</em> the plug-in.The mime type and window are passed in <em>mimetype</em> and <em>window</em>.<em>as_file</em> holds the <a href="#StreamMode-enum">AsFileOnly</a> flag. It is an interface to theNPN_NewStream function of the Netscape Plugin API.<h3 class=fn>bool <a name="newStreamCreated"></a>QNPInstance::newStreamCreated ( <a href="qnpstream.html">QNPStream</a>&nbsp;*, <a href="qnpinstance.html#StreamMode-enum">StreamMode</a>&nbsp;&amp;&nbsp;smode )<tt> [virtual]</tt></h3><p> This function is called when a new stream has been created. Theinstance should return TRUE if it accepts the processing of thestream. If the instance requires the stream as a file, it shouldset <em>smode</em> to <a href="#StreamMode-enum">AsFileOnly</a>, in which case the data will bedelivered some time later to the <a href="#streamAsFile">streamAsFile</a>() function.Otherwise, the data will be delivered in chunks to the <a href="#write">write</a>()function which must consume at least as much data as was returnedby the most recent call to <a href="#writeReady">writeReady</a>().<p> Note that the <a href="#StreamMode-enum">AsFileOnly</a> method is not supported by Netscape2.0 and MSIE 3.0.<h3 class=fn><a href="qnpwidget.html">QNPWidget</a>&nbsp;* <a name="newWindow"></a>QNPInstance::newWindow ()<tt> [virtual]</tt></h3>Called at most once, at some time after the QNPInstance iscreated. If the plugin requires a window, this function shouldreturn a derived class of <a href="qnpwidget.html">QNPWidget</a> that provides the requiredinterface.<p>Example: <a href="grapher-nsplugin-example.html#x2759">grapher/grapher.cpp</a>.<h3 class=fn>void <a name="notifyURL"></a>QNPInstance::notifyURL ( const&nbsp;char&nbsp;*&nbsp;url, <a href="qnpinstance.html#Reason-enum">Reason</a>&nbsp;r, void&nbsp;*&nbsp;notifyData )<tt> [virtual]</tt></h3><p><b>This function is under development and is subject to change.</b><p> This function is <em>not tested</em>.<p> Called whenever a <em>url</em> is notified after a call toNPN_GetURLNotify with <em>notifyData</em>. The reason is given in <em>r</em>.<p> It is an encapsulation of the NPP_URLNotify function of theNetscape Plugin API.<p> See also:<a href="http://developer.netscape.com/docs/manuals/communicator/plugin/refpgur.htm#nppurlnotify">Netscape: NPP_URLNotify method</a><h3 class=fn>void <a name="postURL"></a>QNPInstance::postURL ( const&nbsp;char&nbsp;*&nbsp;url, const&nbsp;char&nbsp;*&nbsp;window, uint&nbsp;len, const&nbsp;char&nbsp;*&nbsp;buf, bool&nbsp;file )</h3><p><b>This function is under development and is subject to change.</b><p> This function is <em>not tested</em>.<p> It is an interface to the NPN_PostURL function of the NetscapePlugin API.<p> Passes <em>url</em>, <em>window</em>, <em>buf</em>, <em>len</em>, and <em>file</em> toNPN_PostURL.<h3 class=fn>void <a name="print"></a>QNPInstance::print ( <a href="qpainter.html">QPainter</a>&nbsp;* )<tt> [virtual]</tt></h3><p><b>This function is under development and is subject to change.</b><p> This function is <em>not tested</em>.<p> Print the instance embedded in a page.<p> It is an encapsulation of the NPP_Print function of the NetscapePlugin API.<h3 class=fn>bool <a name="printFullPage"></a>QNPInstance::printFullPage ()<tt> [virtual]</tt></h3><p><b>This function is under development and is subject to change.</b><p> This function is <em>not tested</em>.<p> It is an encapsulation of the NPP_Print function of the NetscapePlugin API.<h3 class=fn>void <a name="status"></a>QNPInstance::status ( const&nbsp;char&nbsp;*&nbsp;msg )</h3>Sets the status message in the browser containing this instance to<em>msg</em>.<h3 class=fn>void <a name="streamAsFile"></a>QNPInstance::streamAsFile ( <a href="qnpstream.html">QNPStream</a>&nbsp;*, const&nbsp;char&nbsp;*&nbsp;fname )<tt> [virtual]</tt></h3>Called when a stream is delivered as a single file called <em>fname</em>rather than as chunks. This may be simpler for a plugin to dealwith, but precludes any incremental behavior.<p> Note that the <a href="#StreamMode-enum">AsFileOnly</a> method is not supported by Netscape2.0 and MSIE 3.0.<p> <p>See also <a href="#newStreamCreated">newStreamCreated</a>() and <a href="#newStream">newStream</a>().<h3 class=fn>void <a name="streamDestroyed"></a>QNPInstance::streamDestroyed ( <a href="qnpstream.html">QNPStream</a>&nbsp;* )<tt> [virtual]</tt></h3>Called when a stream is destroyed. At this point, the stream maybe complete() and okay(). If it is not okay(), then an error hasoccurred. If it is okay(), but not complete(), then the user hascancelled the transmission: do not give an error message in thiscase.<h3 class=fn>const char * <a name="userAgent"></a>QNPInstance::userAgent () const</h3>Returns the user agent (browser name) containing this instance.<h3 class=fn><a href="qnpwidget.html">QNPWidget</a>&nbsp;* <a name="widget"></a>QNPInstance::widget ()</h3>Returns the plugin window created by <a href="#newWindow">newWindow</a>(), if any.<h3 class=fn>int <a name="write"></a>QNPInstance::write ( <a href="qnpstream.html">QNPStream</a>&nbsp;*, int&nbsp;offset, int&nbsp;len, void&nbsp;*&nbsp;buffer )<tt> [virtual]</tt></h3><p> Called when incoming data is available for processing by theinstance. The instance <em>must</em> consume at least the amount that itreturned in the most recent call to <a href="#writeReady">writeReady</a>(), but it mayconsume up to the amount given by <em>len</em>. <em>buffer</em> is the dataavailable for consumption. The <em>offset</em> argument is merely aninformational value indicating the total amount of data that hasbeen consumed in prior calls.<p> This function should return the amount of data actually consumed.<p>Example: <a href="grapher-nsplugin-example.html#x2760">grapher/grapher.cpp</a>.<h3 class=fn>int <a name="writeReady"></a>QNPInstance::writeReady ( <a href="qnpstream.html">QNPStream</a>&nbsp;* )<tt> [virtual]</tt></h3>Returns the minimum amount of data the instance is willing toreceive from the given stream.<p> The default returns a very large value.<!-- eof --><hr><p>This file is part of the <a href="index.html">Qt toolkit</a>.Copyright &copy; 1995-2002<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 &copy; 2002 <a href="http://www.trolltech.com">Trolltech</a><td><a href="http://www.trolltech.com/trademarks.html">Trademarks</a><td align=right><div align=right>Qt version 3.0.5</div></table></div></address></body></html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?