mozilla

Revision 139648 of NPP_SetValue

  • Revision slug: NPP_SetValue
  • Revision title: NPP_SetValue
  • Revision id: 139648
  • Created:
  • Creator: Mgjbot
  • Is current revision? No
  • Comment robot Adding: [[ja:NPP SetValue]]

Revision Content

{{ Np-plugin-api() }}

Summary

Sets information about the plug-in.

Syntax

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

Parameters

The function has the following parameters:

instance
Pointer to the current plug-in instance.
variable
The plug-in information the call is setting. For values, see NPP_GetValue.
value
Destination for plug-in information returned by the function.

Returns

  • If successful, the function returns NPERR_NO_ERROR.
  • If unsuccessful, the plug-in is not loaded and the function returns an error code. For possible values, see Error Codes.

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>Sets information about the plug-in.
</p>
<h3 name="Syntax">Syntax</h3>
<pre>#include &lt;npapi.h&gt;
 
NPError NPP_SetValue(void *instance,
                     NPPVariable variable,
                     void *value);
</pre>
<h3 name="Parameters">Parameters</h3>
<p>The function has the following parameters:
</p>
<dl><dt>instance
</dt><dd>Pointer to the current plug-in instance.
</dd></dl>
<dl><dt>variable
</dt><dd>The plug-in information the call is setting. For values, see <a href="en/NPP_GetValue">NPP_GetValue</a>.
</dd></dl>
<dl><dt>value
</dt><dd>Destination for plug-in information returned by the function.
</dd></dl>
<h3 name="Returns">Returns</h3>
<ul><li>If successful, the function returns <code>NPERR_NO_ERROR</code>.
</li><li> If unsuccessful, the plug-in is not loaded and the function returns an error code. For possible values, see <a href="en/NPAPI/Constants#Error_Codes">Error Codes</a>.
</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">NPP_GetValue</a>. The plug-in makes this call from its <a href="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">NPP_New</a>, <a href="en/NPP_GetValue">NPP_GetValue</a>
</p>{{ languages( { "ja": "ja/NPP_SetValue" } ) }}
Revert to this revision