NPP_SetValue

  • Revision slug: NPP_SetValue
  • Revision title: NPP_SetValue
  • Revision id: 139650
  • Created:
  • Creator: Josh
  • Is current revision? No
  • Comment 25 words added, 12 words removed

Revision Content

 

{{ Np-plugin-api() }}

Summary

Implemented by plugins. This call is used to inform plugins of variable information controlled by the browser.

Syntax

#include <npapi.h>
 
NPError NPP_SetValue(void *instance,
                     NPNVariable variable,
                     void *value);

Parameters

The function has the following parameters:

instance
Pointer to plugin instance on which to set the variable.
variable
The variable being set.
value
Value for the variable being set.

Returns

  • If successful, the function should return NPERR_NO_ERROR.
  • If unsuccessful, the function should return the most relevant NPAPI error code.

Description

NPP_SetValue sets a variety of features for a plug-in, among them whether a plug-in is windowed or windowless and whether JavaScript is enabled. For possible values, see NPP_GetValue. The plug-in makes this call from its NPP_New method.

For example, to specify that a plug-in is windowless, use NPP_SetValue with NPPVpluginWindowBool as the variable to set and false as the value parameter. If a plug-in does not make this call, it is considered a windowed plug-in.

See Also

NPP_New, NPP_GetValue

{{ languages( { "ja": "ja/NPP_SetValue" } ) }}

Revision Source

<p> </p>
<p>{{ Np-plugin-api() }}</p>
<h3 name="Summary">Summary</h3>
<p>Implemented by plugins. This call is used to inform plugins of variable information controlled by the browser.</p>
<h3 name="Syntax">Syntax</h3>
<pre>#include &lt;npapi.h&gt;
 
NPError NPP_SetValue(void *instance,
                     NPNVariable variable,
                     void *value);
</pre>
<h3 name="Parameters">Parameters</h3>
<p>The function has the following parameters:</p>
<dl><dt>instance </dt><dd>Pointer to plugin instance on which to set the variable.<br>
</dd></dl> <dl><dt>variable </dt><dd>The variable being set.</dd></dl> <dl><dt>value </dt><dd>Value for the variable being set. </dd></dl>
<h3 name="Returns">Returns</h3>
<ul> <li>If successful, the function should return <code>NPERR_NO_ERROR</code>.</li> <li>If unsuccessful, the function should return the most relevant NPAPI error code.</li>
</ul>
<h3 name="Description">Description</h3>
<p><code>NPP_SetValue</code> sets a variety of features for a plug-in, among them whether a plug-in is windowed or windowless and whether JavaScript is enabled. For possible values, see <a href="/en/NPP_GetValue" title="en/NPP_GetValue">NPP_GetValue</a>. The plug-in makes this call from its <a href="/en/NPP_New" title="en/NPP_New">NPP_New</a> method.</p>
<p>For example, to specify that a plug-in is windowless, use <code>NPP_SetValue</code> with <code>NPPVpluginWindowBool</code> as the variable to set and false as the value parameter. If a plug-in does not make this call, it is considered a windowed plug-in.</p>
<h3 name="See_Also">See Also</h3>
<p><a href="/en/NPP_New" title="en/NPP_New">NPP_New</a>, <a href="/en/NPP_GetValue" title="en/NPP_GetValue">NPP_GetValue</a></p>
<p>{{ languages( { "ja": "ja/NPP_SetValue" } ) }}</p>
Revert to this revision