mozilla

Revision 82999 of NPP_GetValue

  • Revision slug: NPP_GetValue
  • Revision title: NPP_GetValue
  • Revision id: 82999
  • Created:
  • Creator: Pmash
  • Is current revision? No
  • Comment typo
Tags: 

Revision Content

{{wiki.template('Np-plugin-api')}}

Summary

Allows the browser to query the plug-in for information.

Syntax

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

Parameters

The function has the following parameters:

instance
Pointer to the current plug-in instance.
variable
Plug-in information the call gets. Values:
  • NPPVpluginWindowBool: Tells whether the plug-in is windowless; true=windowless, false=not windowless
  • NPPVpluginTransparentBool: Tells whether the plug-in is transparent; true=transparent, false=not transparent
value
Plug-in name, returned by the function.

Returns

  • If successful, the function returns NPERR_NO_ERROR.
  • If unsuccessful, the function returns an error code. For possible values, see Error Codes.

Description

NPP_GetValue retrieves plug-in features set with NPP_SetValue, among them whether a plug-in is windowed or windowless and whether JavaScript is enabled.

You can use this method as an optional entry point that the browser can call to determine the plug-in name and description. It returns the requested values, specified by the variable and value parameters, to the plug-in.

See Also

NPP_SetValue

Revision Source

<p>
</p><p>
{{wiki.template('Np-plugin-api')}}
</p>
<h3 name="Summary">Summary</h3>
<p>Allows the browser to query the plug-in for information.
</p>
<h3 name="Syntax">Syntax</h3>
<pre>#include &lt;npapi.h&gt;
 
NPError NPP_GetValue(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>Plug-in information the call gets. Values:
<ul><li>NPPVpluginWindowBool: Tells whether the plug-in is windowless; true=windowless, false=not windowless
</li><li>NPPVpluginTransparentBool: Tells whether the plug-in is transparent; true=transparent, false=not transparent
</li></ul>
</dd></dl>
<dl><dt>value
</dt><dd>Plug-in name, returned by the function.
</dd></dl>
<h3 name="Returns">Returns</h3>
<ul><li> If successful, the function returns NPERR_NO_ERROR.
</li><li> If unsuccessful, 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_GetValue</code> retrieves plug-in features set with <a href="en/NPP_SetValue">NPP_SetValue</a>, among them whether a plug-in is windowed or windowless and whether JavaScript is enabled.
</p><p>You can use this method as an optional entry point that the browser can call to determine the plug-in name and description. It returns the requested values, specified by the variable and value parameters, to the plug-in.
</p>
<h3 name="See_Also">See Also</h3>
<p><a href="en/NPP_SetValue">NPP_SetValue</a>
</p>
Revert to this revision