Visit Mozilla.org

NPP GetValue

From MDC


« Gecko Plugin API Reference « Plug-in Side Plug-in API

Contents

[edit] Summary

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

[edit] Syntax

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

[edit] 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.

[edit] Returns

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

[edit] 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.

[edit] See Also

NPP_SetValue